webcomponents-hi.js.map 47 KB

1
  1. {"version":3,"sources":["node_modules/@webcomponents/html-imports/src/html-imports.js","src/post-polyfill.js","src/unresolved.js"],"names":["scope","newCustomEvent","type","params","window","CustomEvent","event","document","createEvent","initCustomEvent","bubbles","cancelable","detail","importForElement","element","useNative","ownerDocument","doc","parentNode","closest","importSelector","isImportLink","whenImportsReady","callback","imports","querySelectorAll","rootImportSelector","pending","length","forEach","imp","whenElementLoaded","whenDocumentReady","stateChanged","readyState","body","removeEventListener","addEventListener","whenReady","localName","src","firstChild","onLoadingDone","isIE","node","nodeType","Node","ELEMENT_NODE","rel","constructor","Importer","documents","inflight","dynamicImportsMO","MutationObserver","m","handleMutations","observe","head","childList","subtree","loadImports","list","inverseOrder","increment","i","createElement","currentScript","Object","defineProperty","get","scripts","configurable","CSS_URL_REGEXP","CSS_IMPORT_REGEXP","STYLESHEET_REGEXP","Path","fixUrls","base","href","setAttribute","resolveUrl","getAttribute","r","replaceUrls","textContent","text","linkUrl","regexp","replace","pre","url","post","urlPath","undefined","__workingURL","u","URL","pathname","e","__tempDoc","implementation","createHTMLDocument","__base","appendChild","__anchor","Xhr","async","load","success","fail","match","pieces","split","resource","header","indexOf","atob","decodeURIComponent","request","XMLHttpRequest","open","onload","request.onload","redirectedUrl","responseURL","getResponseHeader","location","origin","protocol","host","response","responseText","status","send","test","navigator","userAgent","links","link","loadImport","import","fireEventIfNeeded","makeDocument","processImportsIfLoadingDone","createDocumentFragment","p1","p2","template","innerHTML","content","baseEl","querySelector","removeAttribute","inlineScriptIndex","n$","importDependenciesSelector","n","importDependencyAttr","encodeURIComponent","num","disconnect","flatten","scriptsOk","stylesOk","fireEvents","waitForStyles","runScripts","DOCUMENT_FRAGMENT_NODE","cloneScript","l","s","s$","clone","attributes","attr","name","value","replaceChild","pendingScriptsSelector","pendingStylesSelector","needsMove","disabledLinkSelector","placeholder","insertBefore","nextSibling","newSibling","dispatchEvent","eventType","mutations","addedNodes","elem","imps","target","native_baseURI","getOwnPropertyDescriptor","prototype","klass","Element","ownerDoc","call","enumerable","HTMLImports","customElements","Template","WebComponents","flushCallback","runAndClearCallback","bootstrap","cb","origWhenReady","requestAnimationFrame","ready","style"],"mappings":"A;;;;;;;;;aASC,SAAA,CAAAA,CAAA,CAAS,CAwnBeC,QAAA,EAAA,CAACC,CAAD,CAAOC,CAAP,CAAkB,CACvC,GAAkC,UAAlC,GAAI,MAAOC,OAAAC,YAAX,CACE,MAAO,KAAIA,WAAJ,CAAgBH,CAAhB,CAAsBC,CAAtB,CAET,KAAMG,EAAqCC,QAAAC,YAAA,CAAqB,aAArB,CAC3CF,EAAAG,gBAAA,CAAsBP,CAAtB,CAA4B,CAAA,CAAQC,CAAAO,QAApC,CAAqD,CAAA,CAAQP,CAAAQ,WAA7D,CAAiFR,CAAAS,OAAjF,CACA,OAAON,EANgC,CArBhBO,QAAA,EAAA,CAAAC,CAAA,CAAW,CAClC,GAAIC,CAAJ,CAEE,MAAOD,EAAAE,cAAA,GAA0BT,QAA1B,CAAqCO,CAAAE,cAArC,CAA6D,IAEtE,KAAIC,EAAMH,CAAA,YACV,IAAI,CAACG,CAAL,EAAYH,CAAAI,WAAZ,CAAgC,CAC9BD,CAAA,CAA+BH,CAAAI,WAC/B,IAA2B,UAA3B,GAAI,MAAOD,EAAAE,QAAX,CAGEF,CAAA,CAAMA,CAAAE,QAAA,CAjdWC,kBAidX,CAHR,KAME,KAAA,CAAO,CAACC,CAAA,CAAaJ,CAAb,CAAR,GAA8BA,CAA9B,CAAoCA,CAAAC,WAApC,EAAA,EAEFJ,CAAA,YAAA,CAAyBG,CAVK,CAYhC,MAAOA,EAlB2B,CApBXK,QAAA,EAAA,CAAAC,CAAA,CAAY,CACnC,IAAIC,EACDjB,QAAAkB,iBAAA,CAtasBC,2CAsatB,CADH;AAEIC,EAAUH,CAAAI,OACTD,EAAL,CAIAE,CAAA,CAAQL,CAAR,CAAiB,QAAA,CAAAM,CAAA,CAAO,CAAA,MAAAC,EAAA,CAAkBD,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sBA,QAA4B,EAAG,CACvD,GAAID,CAAJ,CAAmB,CAEbF,CAAAI,EAAJ,EACEJ,CAAAI,EAAA,CAAmB5M,MAAAG,SAAnB,CAEF,KAAI0M,EAAKH,CACTA,EAAA,CAAgB,IAChBG,EAAA,EACA,OAAO,CAAA,CARU,CADoC,CADzD,CAaIC,EAAgBR,CAAA,UACpBC,EAAA,0BAAA,CAA4C,QAAQ,CAACM,CAAD,CAAK,CACvDH,CAAA,CAAgBG,CAChBC,EAAA,CAAcH,CAAd,CAFuD,CAAzD,CAKAL,EAAA,UAAA,CAA2B,QAAQ,CAACO,CAAD,CAAK,CACtCC,CAAA,CAAc,QAAQ,EAAG,CAInBH,CAAA,EAAJ,CACEL,CAAA,UAAA,CAAyBO,CAAzB,CADF,CAGEA,CAAA,EAPqB,CAAzB,CADsC,CAtByB;AAqCnEP,CAAA,UAAA,CAAyB,QAAQ,EAAG,CAClCS,qBAAA,CAAsB,QAAQ,EAAG,CAC/B/M,MAAAyM,cAAAO,MAAA,CAA6B,CAAA,CAC7B7M,SAAAoL,cAAA,CAAuB,IAAItL,WAAJ,CAAgB,oBAAhB,CAAsC,CAACK,QAAS,CAAA,CAAV,CAAtC,CAAvB,CAF+B,CAAjC,CADkC,CAApC,C,CCrCA,IAAI2M,EAAQ9M,QAAA2D,cAAA,CAAuB,OAAvB,CACZmJ,EAAAhI,YAAA,CAAoB,sIAQpB,KAAI3B,EAAOnD,QAAAiJ,cAAA,CAAuB,MAAvB,CACX9F,EAAA8H,aAAA,CAAkB6B,CAAlB,CAAyB3J,CAAAjB,WAAzB,C","file":"webcomponents-hi.js","sourcesContent":["/**\n * @license\n * Copyright (c) 2016 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\n * The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\n * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\n * Code distributed by Google as part of the polymer project is also\n * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n */\n(scope => {\n\n /********************* base setup *********************/\n const useNative = Boolean('import' in document.createElement('link'));\n\n // Polyfill `currentScript` for browsers without it.\n let currentScript = null;\n if ('currentScript' in document === false) {\n Object.defineProperty(document, 'currentScript', {\n get() {\n return currentScript ||\n // NOTE: only works when called in synchronously executing code.\n // readyState should check if `loading` but IE10 is\n // interactive when scripts run so we cheat. This is not needed by\n // html-imports polyfill but helps generally polyfill `currentScript`.\n (document.readyState !== 'complete' ?\n document.scripts[document.scripts.length - 1] : null);\n },\n configurable: true\n });\n }\n\n /**\n * @param {Array|NodeList|NamedNodeMap} list\n * @param {!Function} callback\n * @param {boolean=} inverseOrder\n */\n const forEach = (list, callback, inverseOrder) => {\n const length = list ? list.length : 0;\n const increment = inverseOrder ? -1 : 1;\n let i = inverseOrder ? length - 1 : 0;\n for (; i < length && i >= 0; i = i + increment) {\n callback(list[i], i);\n }\n };\n\n /********************* path fixup *********************/\n const CSS_URL_REGEXP = /(url\\()([^)]*)(\\))/g;\n const CSS_IMPORT_REGEXP = /(@import[\\s]+(?!url\\())([^;]*)(;)/g;\n const STYLESHEET_REGEXP = /(<link[^>]*)(rel=['|\"]?stylesheet['|\"]?[^>]*>)/g;\n\n // path fixup: style elements in imports must be made relative to the main\n // document. We fixup url's in url() and @import.\n const Path = {\n\n fixUrls(element, base) {\n if (element.href) {\n element.setAttribute('href',\n Path.resolveUrl(element.getAttribute('href'), base));\n }\n if (element.src) {\n element.setAttribute('src',\n Path.resolveUrl(element.getAttribute('src'), base));\n }\n if (element.localName === 'style') {\n const r = Path.replaceUrls(element.textContent, base, CSS_URL_REGEXP);\n element.textContent = Path.replaceUrls(r, base, CSS_IMPORT_REGEXP);\n }\n },\n\n replaceUrls(text, linkUrl, regexp) {\n return text.replace(regexp, (m, pre, url, post) => {\n let urlPath = url.replace(/[\"']/g, '');\n if (linkUrl) {\n urlPath = Path.resolveUrl(urlPath, linkUrl);\n }\n return pre + '\\'' + urlPath + '\\'' + post;\n });\n },\n\n resolveUrl(url, base) {\n // Lazy feature detection.\n if (Path.__workingURL === undefined) {\n Path.__workingURL = false;\n try {\n const u = new URL('b', 'http://a');\n u.pathname = 'c%20d';\n Path.__workingURL = (u.href === 'http://a/c%20d');\n } catch (e) {}\n }\n\n if (Path.__workingURL) {\n return (new URL(url, base)).href;\n }\n\n // Fallback to creating an anchor into a disconnected document.\n let doc = Path.__tempDoc;\n if (!doc) {\n doc = document.implementation.createHTMLDocument('temp');\n Path.__tempDoc = doc;\n doc.__base = doc.createElement('base');\n doc.head.appendChild(doc.__base);\n doc.__anchor = doc.createElement('a');\n }\n doc.__base.href = base;\n doc.__anchor.href = url;\n return doc.__anchor.href || url;\n }\n };\n\n /********************* Xhr processor *********************/\n const Xhr = {\n\n async: true,\n\n /**\n * @param {!string} url\n * @param {!function(!string, string=)} success\n * @param {!function(!string)} fail\n */\n load(url, success, fail) {\n if (!url) {\n fail('error: href must be specified');\n } else if (url.match(/^data:/)) {\n // Handle Data URI Scheme\n const pieces = url.split(',');\n const header = pieces[0];\n let resource = pieces[1];\n if (header.indexOf(';base64') > -1) {\n resource = atob(resource);\n } else {\n resource = decodeURIComponent(resource);\n }\n success(resource);\n } else {\n const request = new XMLHttpRequest();\n request.open('GET', url, Xhr.async);\n request.onload = () => {\n // Servers redirecting an import can add a Location header to help us\n // polyfill correctly. Handle relative and full paths.\n // Prefer responseURL which already resolves redirects\n // https://xhr.spec.whatwg.org/#the-responseurl-attribute\n let redirectedUrl = request.responseURL || request.getResponseHeader('Location');\n if (redirectedUrl && redirectedUrl.indexOf('/') === 0) {\n // In IE location.origin might not work\n // https://connect.microsoft.com/IE/feedback/details/1763802/location-origin-is-undefined-in-ie-11-on-windows-10-but-works-on-windows-7\n const origin = (location.origin || location.protocol + '//' + location.host);\n redirectedUrl = origin + redirectedUrl;\n }\n const resource = /** @type {string} */ (request.response || request.responseText);\n if (request.status === 304 || request.status === 0 ||\n request.status >= 200 && request.status < 300) {\n success(resource, redirectedUrl);\n } else {\n fail(resource);\n }\n };\n request.send();\n }\n }\n };\n\n /********************* importer *********************/\n\n const isIE = /Trident/.test(navigator.userAgent) ||\n /Edge\\/\\d./i.test(navigator.userAgent);\n\n const importSelector = 'link[rel=import]';\n\n // Used to disable loading of resources.\n const importDisableType = 'import-disable';\n\n const disabledLinkSelector = `link[rel=stylesheet][href][type=${importDisableType}]`;\n\n const importDependenciesSelector = `${importSelector}, ${disabledLinkSelector},\n style:not([type]), link[rel=stylesheet][href]:not([type]),\n script:not([type]), script[type=\"application/javascript\"],\n script[type=\"text/javascript\"]`;\n\n const importDependencyAttr = 'import-dependency';\n\n const rootImportSelector = `${importSelector}:not([${importDependencyAttr}])`;\n\n const pendingScriptsSelector = `script[${importDependencyAttr}]`;\n\n const pendingStylesSelector = `style[${importDependencyAttr}],\n link[rel=stylesheet][${importDependencyAttr}]`;\n\n /**\n * Importer will:\n * - load any linked import documents (with deduping)\n * - whenever an import is loaded, prompt the parser to try to parse\n * - observe imported documents for new elements (these are handled via the\n * dynamic importer)\n */\n class Importer {\n constructor() {\n this.documents = {};\n // Used to keep track of pending loads, so that flattening and firing of\n // events can be done when all resources are ready.\n this.inflight = 0;\n this.dynamicImportsMO = new MutationObserver(m => this.handleMutations(m));\n // Observe changes on <head>.\n this.dynamicImportsMO.observe(document.head, {\n childList: true,\n subtree: true\n });\n // 1. Load imports contents\n // 2. Assign them to first import links on the document\n // 3. Wait for import styles & scripts to be done loading/running\n // 4. Fire load/error events\n this.loadImports(document);\n }\n\n /**\n * @param {!(HTMLDocument|DocumentFragment|Element)} doc\n */\n loadImports(doc) {\n const links = /** @type {!NodeList<!HTMLLinkElement>} */\n (doc.querySelectorAll(importSelector));\n forEach(links, link => this.loadImport(link));\n }\n\n /**\n * @param {!HTMLLinkElement} link\n */\n loadImport(link) {\n const url = link.href;\n // This resource is already being handled by another import.\n if (this.documents[url] !== undefined) {\n // If import is already loaded, we can safely associate it to the link\n // and fire the load/error event.\n const imp = this.documents[url];\n if (imp && imp['__loaded']) {\n link.import = imp;\n this.fireEventIfNeeded(link);\n }\n return;\n }\n this.inflight++;\n // Mark it as pending to notify others this url is being loaded.\n this.documents[url] = 'pending';\n Xhr.load(url, (resource, redirectedUrl) => {\n const doc = this.makeDocument(resource, redirectedUrl || url);\n this.documents[url] = doc;\n this.inflight--;\n // Load subtree.\n this.loadImports(doc);\n this.processImportsIfLoadingDone();\n }, () => {\n // If load fails, handle error.\n this.documents[url] = null;\n this.inflight--;\n this.processImportsIfLoadingDone();\n });\n }\n\n /**\n * Creates a new document containing resource and normalizes urls accordingly.\n * @param {string=} resource\n * @param {string=} url\n * @return {!DocumentFragment}\n */\n makeDocument(resource, url) {\n if (!resource) {\n return document.createDocumentFragment();\n }\n\n if (isIE) {\n // <link rel=stylesheet> should be appended to <head>. Not doing so\n // in IE/Edge breaks the cascading order. We disable the loading by\n // setting the type before setting innerHTML to avoid loading\n // resources twice.\n resource = resource.replace(STYLESHEET_REGEXP, (match, p1, p2) => {\n if (match.indexOf('type=') === -1) {\n return `${p1} type=${importDisableType} ${p2}`;\n }\n return match;\n });\n }\n\n let content;\n const template = /** @type {!HTMLTemplateElement} */\n (document.createElement('template'));\n template.innerHTML = resource;\n if (template.content) {\n // This creates issues in Safari10 when used with shadydom (see #12).\n content = template.content;\n } else {\n // <template> not supported, create fragment and move content into it.\n content = document.createDocumentFragment();\n while (template.firstChild) {\n content.appendChild(template.firstChild);\n }\n }\n\n // Support <base> in imported docs. Resolve url and remove its href.\n const baseEl = content.querySelector('base');\n if (baseEl) {\n url = Path.resolveUrl(baseEl.getAttribute('href'), url);\n baseEl.removeAttribute('href');\n }\n\n const n$ = /** @type {!NodeList<!(HTMLLinkElement|HTMLScriptElement|HTMLStyleElement)>} */\n (content.querySelectorAll(importDependenciesSelector));\n // For source map hints.\n let inlineScriptIndex = 0;\n forEach(n$, n => {\n // Listen for load/error events, then fix urls.\n whenElementLoaded(n);\n Path.fixUrls(n, url);\n // Mark for easier selectors.\n n.setAttribute(importDependencyAttr, '');\n // Generate source map hints for inline scripts.\n if (n.localName === 'script' && !n.src && n.textContent) {\n const num = inlineScriptIndex ? `-${inlineScriptIndex}` : '';\n const content = n.textContent + `\\n//# sourceURL=${url}${num}.js\\n`;\n // We use the src attribute so it triggers load/error events, and it's\n // easier to capture errors (e.g. parsing) like this.\n n.setAttribute('src', 'data:text/javascript;charset=utf-8,' + encodeURIComponent(content));\n n.textContent = '';\n inlineScriptIndex++;\n }\n });\n return content;\n }\n\n /**\n * Waits for loaded imports to finish loading scripts and styles, then fires\n * the load/error events.\n */\n processImportsIfLoadingDone() {\n // Wait until all resources are ready, then load import resources.\n if (this.inflight) return;\n\n // Stop observing, flatten & load resource, then restart observing <head>.\n this.dynamicImportsMO.disconnect();\n this.flatten(document);\n // We wait for styles to load, and at the same time we execute the scripts,\n // then fire the load/error events for imports to have faster whenReady\n // callback execution.\n // NOTE: This is different for native behavior where scripts would be\n // executed after the styles before them are loaded.\n // To achieve that, we could select pending styles and scripts in the\n // document and execute them sequentially in their dom order.\n let scriptsOk = false,\n stylesOk = false;\n const onLoadingDone = () => {\n if (stylesOk && scriptsOk) {\n // Catch any imports that might have been added while we\n // weren't looking, wait for them as well.\n this.loadImports(document);\n if (this.inflight) return;\n\n // Restart observing.\n this.dynamicImportsMO.observe(document.head, {\n childList: true,\n subtree: true\n });\n this.fireEvents();\n }\n }\n this.waitForStyles(() => {\n stylesOk = true;\n onLoadingDone();\n });\n this.runScripts(() => {\n scriptsOk = true;\n onLoadingDone();\n });\n }\n\n /**\n * @param {!HTMLDocument} doc\n */\n flatten(doc) {\n const n$ = /** @type {!NodeList<!HTMLLinkElement>} */\n (doc.querySelectorAll(importSelector));\n forEach(n$, n => {\n const imp = this.documents[n.href];\n n.import = /** @type {!Document} */ (imp);\n if (imp && imp.nodeType === Node.DOCUMENT_FRAGMENT_NODE) {\n // We set the .import to be the link itself, and update its readyState.\n // Other links with the same href will point to this link.\n this.documents[n.href] = n;\n n.readyState = 'loading';\n // Suppress Closure warning about incompatible subtype assignment.\n ( /** @type {!HTMLElement} */ (n).import = n);\n this.flatten(imp);\n n.appendChild(imp);\n }\n });\n }\n\n /**\n * Replaces all the imported scripts with a clone in order to execute them.\n * Updates the `currentScript`.\n * @param {!function()} callback\n */\n runScripts(callback) {\n const s$ = document.querySelectorAll(pendingScriptsSelector);\n const l = s$.length;\n const cloneScript = i => {\n if (i < l) {\n // The pending scripts have been generated through innerHTML and\n // browsers won't execute them for security reasons. We cannot use\n // s.cloneNode(true) either, the only way to run the script is manually\n // creating a new element and copying its attributes.\n const s = s$[i];\n const clone = /** @type {!HTMLScriptElement} */\n (document.createElement('script'));\n // Remove import-dependency attribute to avoid double cloning.\n s.removeAttribute(importDependencyAttr);\n forEach(s.attributes, attr => clone.setAttribute(attr.name, attr.value));\n // Update currentScript and replace original with clone script.\n currentScript = clone;\n s.parentNode.replaceChild(clone, s);\n whenElementLoaded(clone, () => {\n currentScript = null;\n cloneScript(i + 1);\n });\n } else {\n callback();\n }\n };\n cloneScript(0);\n }\n\n /**\n * Waits for all the imported stylesheets/styles to be loaded.\n * @param {!function()} callback\n */\n waitForStyles(callback) {\n const s$ = /** @type {!NodeList<!(HTMLLinkElement|HTMLStyleElement)>} */\n (document.querySelectorAll(pendingStylesSelector));\n let pending = s$.length;\n if (!pending) {\n callback();\n return;\n }\n // <link rel=stylesheet> should be appended to <head>. Not doing so\n // in IE/Edge breaks the cascading order\n // https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/10472273/\n // If there is one <link rel=stylesheet> imported, we must move all imported\n // links and styles to <head>.\n const needsMove = isIE && !!document.querySelector(disabledLinkSelector);\n forEach(s$, s => {\n // Listen for load/error events, remove selector once is done loading.\n whenElementLoaded(s, () => {\n s.removeAttribute(importDependencyAttr);\n if (--pending === 0) {\n callback();\n }\n });\n // Check if was already moved to head, to handle the case where the element\n // has already been moved but it is still loading.\n if (needsMove && s.parentNode !== document.head) {\n // Replace the element we're about to move with a placeholder.\n const placeholder = document.createElement(s.localName);\n // Add reference of the moved element.\n placeholder['__appliedElement'] = s;\n // Disable this from appearing in document.styleSheets.\n placeholder.setAttribute('type', 'import-placeholder');\n // Append placeholder next to the sibling, and move original to <head>.\n s.parentNode.insertBefore(placeholder, s.nextSibling);\n let newSibling = importForElement(s);\n while (newSibling && importForElement(newSibling)) {\n newSibling = importForElement(newSibling);\n }\n if (newSibling.parentNode !== document.head) {\n newSibling = null;\n }\n document.head.insertBefore(s, newSibling);\n // Enable the loading of <link rel=stylesheet>.\n s.removeAttribute('type');\n }\n });\n }\n\n /**\n * Fires load/error events for imports in the right order .\n */\n fireEvents() {\n const n$ = /** @type {!NodeList<!HTMLLinkElement>} */\n (document.querySelectorAll(importSelector));\n // Inverse order to have events firing bottom-up.\n forEach(n$, n => this.fireEventIfNeeded(n), true);\n }\n\n /**\n * Fires load/error event for the import if this wasn't done already.\n * @param {!HTMLLinkElement} link\n */\n fireEventIfNeeded(link) {\n // Don't fire twice same event.\n if (!link['__loaded']) {\n link['__loaded'] = true;\n // Update link's import readyState.\n link.import && (link.import.readyState = 'complete');\n const eventType = link.import ? 'load' : 'error';\n link.dispatchEvent(newCustomEvent(eventType, {\n bubbles: false,\n cancelable: false,\n detail: undefined\n }));\n }\n }\n\n /**\n * @param {Array<MutationRecord>} mutations\n */\n handleMutations(mutations) {\n forEach(mutations, m => forEach(m.addedNodes, elem => {\n if (elem && elem.nodeType === Node.ELEMENT_NODE) {\n // NOTE: added scripts are not updating currentScript in IE.\n if (isImportLink(elem)) {\n this.loadImport( /** @type {!HTMLLinkElement} */ (elem));\n } else {\n this.loadImports( /** @type {!Element} */ (elem));\n }\n }\n }));\n }\n }\n\n /**\n * @param {!Node} node\n * @return {boolean}\n */\n const isImportLink = node => {\n return node.nodeType === Node.ELEMENT_NODE && node.localName === 'link' &&\n ( /** @type {!HTMLLinkElement} */ (node).rel === 'import');\n };\n\n /**\n * Waits for an element to finish loading. If already done loading, it will\n * mark the element accordingly.\n * @param {!(HTMLLinkElement|HTMLScriptElement|HTMLStyleElement)} element\n * @param {function()=} callback\n */\n const whenElementLoaded = (element, callback) => {\n if (element['__loaded']) {\n callback && callback();\n } else if ((element.localName === 'script' && !element.src) ||\n (element.localName === 'style' && !element.firstChild)) {\n // Inline scripts and empty styles don't trigger load/error events,\n // consider them already loaded.\n element['__loaded'] = true;\n callback && callback();\n } else {\n const onLoadingDone = event => {\n element.removeEventListener(event.type, onLoadingDone);\n element['__loaded'] = true;\n callback && callback();\n };\n element.addEventListener('load', onLoadingDone);\n // NOTE: We listen only for load events in IE/Edge, because in IE/Edge\n // <style> with @import will fire error events for each failing @import,\n // and finally will trigger the load event when all @import are\n // finished (even if all fail).\n if (!isIE || element.localName !== 'style') {\n element.addEventListener('error', onLoadingDone);\n }\n }\n }\n\n /**\n * Calls the callback when all imports in the document at call time\n * (or at least document ready) have loaded. Callback is called synchronously\n * if imports are already done loading.\n * @param {function()=} callback\n */\n const whenReady = callback => {\n // 1. ensure the document is in a ready state (has dom), then\n // 2. watch for loading of imports and call callback when done\n whenDocumentReady(() => whenImportsReady(() => callback && callback()));\n }\n\n /**\n * Invokes the callback when document is in ready state. Callback is called\n * synchronously if document is already done loading.\n * @param {!function()} callback\n */\n const whenDocumentReady = callback => {\n const stateChanged = () => {\n // NOTE: Firefox can hit readystate interactive without document.body existing.\n // This is anti-spec, but we handle it here anyways by waiting for next change.\n if (document.readyState !== 'loading' && !!document.body) {\n document.removeEventListener('readystatechange', stateChanged);\n callback();\n }\n }\n document.addEventListener('readystatechange', stateChanged);\n stateChanged();\n }\n\n /**\n * Invokes the callback after all imports are loaded. Callback is called\n * synchronously if imports are already done loading.\n * @param {!function()} callback\n */\n const whenImportsReady = callback => {\n let imports = /** @type {!NodeList<!HTMLLinkElement>} */\n (document.querySelectorAll(rootImportSelector));\n let pending = imports.length;\n if (!pending) {\n callback();\n return;\n }\n forEach(imports, imp => whenElementLoaded(imp, () => {\n if (--pending === 0) {\n callback();\n }\n }));\n }\n\n /**\n * Returns the import document containing the element.\n * @param {!Node} element\n * @return {HTMLLinkElement|Document|undefined}\n */\n const importForElement = element => {\n if (useNative) {\n // Return only if not in the main doc!\n return element.ownerDocument !== document ? element.ownerDocument : null;\n }\n let doc = element['__importDoc'];\n if (!doc && element.parentNode) {\n doc = /** @type {!Element} */ (element.parentNode);\n if (typeof doc.closest === 'function') {\n // Element.closest returns the element itself if it matches the selector,\n // so we search the closest import starting from the parent.\n doc = doc.closest(importSelector);\n } else {\n // Walk up the parent tree until we find an import.\n while (!isImportLink(doc) && (doc = doc.parentNode)) {}\n }\n element['__importDoc'] = doc;\n }\n return doc;\n }\n\n const newCustomEvent = (type, params) => {\n if (typeof window.CustomEvent === 'function') {\n return new CustomEvent(type, params);\n }\n const event = /** @type {!CustomEvent} */ (document.createEvent('CustomEvent'));\n event.initCustomEvent(type, Boolean(params.bubbles), Boolean(params.cancelable), params.detail);\n return event;\n };\n\n if (useNative) {\n // Check for imports that might already be done loading by the time this\n // script is actually executed. Native imports are blocking, so the ones\n // available in the document by this time should already have failed\n // or have .import defined.\n const imps = /** @type {!NodeList<!HTMLLinkElement>} */\n (document.querySelectorAll(importSelector));\n forEach(imps, imp => {\n if (!imp.import || imp.import.readyState !== 'loading') {\n imp['__loaded'] = true;\n }\n });\n // Listen for load/error events to capture dynamically added scripts.\n /**\n * @type {!function(!Event)}\n */\n const onLoadingDone = event => {\n const elem = /** @type {!Element} */ (event.target);\n if (isImportLink(elem)) {\n elem['__loaded'] = true;\n }\n };\n document.addEventListener('load', onLoadingDone, true /* useCapture */ );\n document.addEventListener('error', onLoadingDone, true /* useCapture */ );\n } else {\n // Override baseURI so that imported elements' baseURI can be used seemlessly\n // on native or polyfilled html-imports.\n // NOTE: a <link rel=import> will have `link.baseURI === link.href`, as the link\n // itself is used as the `import` document.\n /** @type {Object|undefined} */\n const native_baseURI = Object.getOwnPropertyDescriptor(Node.prototype, 'baseURI');\n // NOTE: if not configurable (e.g. safari9), set it on the Element prototype. \n const klass = !native_baseURI || native_baseURI.configurable ? Node : Element;\n Object.defineProperty(klass.prototype, 'baseURI', {\n get() {\n const ownerDoc = /** @type {HTMLLinkElement} */ (isImportLink(this) ? this : importForElement(this));\n if (ownerDoc) return ownerDoc.href;\n // Use native baseURI if possible.\n if (native_baseURI && native_baseURI.get) return native_baseURI.get.call(this);\n // Polyfill it if not available.\n const base = /** @type {HTMLBaseElement} */ (document.querySelector('base'));\n return (base || window.location).href;\n },\n configurable: true,\n enumerable: true\n });\n\n whenDocumentReady(() => new Importer());\n }\n\n /**\n Add support for the `HTMLImportsLoaded` event and the `HTMLImports.whenReady`\n method. This api is necessary because unlike the native implementation,\n script elements do not force imports to resolve. Instead, users should wrap\n code in either an `HTMLImportsLoaded` handler or after load time in an\n `HTMLImports.whenReady(callback)` call.\n\n NOTE: This module also supports these apis under the native implementation.\n Therefore, if this file is loaded, the same code can be used under both\n the polyfill and native implementation.\n */\n whenReady(() => document.dispatchEvent(newCustomEvent('HTMLImportsLoaded', {\n cancelable: true,\n bubbles: true,\n detail: undefined\n })));\n\n // exports\n scope.useNative = useNative;\n scope.whenReady = whenReady;\n scope.importForElement = importForElement;\n\n})(window.HTMLImports = (window.HTMLImports || {}));","/**\n * @license\n * Copyright (c) 2014 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\n * The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\n * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\n * Code distributed by Google as part of the polymer project is also\n * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n */\n\n'use strict';\n\nlet customElements = window['customElements'];\nlet HTMLImports = window['HTMLImports'];\nlet Template = window['HTMLTemplateElement'];\n\n// global for (1) existence means `WebComponentsReady` will file,\n// (2) WebComponents.ready == true means event has fired.\nwindow.WebComponents = window.WebComponents || {};\n\nif (customElements && customElements['polyfillWrapFlushCallback']) {\n // Here we ensure that the public `HTMLImports.whenReady`\n // always comes *after* custom elements have upgraded.\n let flushCallback;\n let runAndClearCallback = function runAndClearCallback() {\n if (flushCallback) {\n // make sure to run the HTMLTemplateElement polyfill before custom elements upgrade\n if (Template.bootstrap) {\n Template.bootstrap(window.document);\n }\n let cb = flushCallback;\n flushCallback = null;\n cb();\n return true;\n }\n }\n let origWhenReady = HTMLImports['whenReady'];\n customElements['polyfillWrapFlushCallback'](function(cb) {\n flushCallback = cb;\n origWhenReady(runAndClearCallback);\n });\n\n HTMLImports['whenReady'] = function(cb) {\n origWhenReady(function() {\n // custom element code may add dynamic imports\n // to match processing of native custom elements before\n // domContentLoaded, we wait for these imports to resolve first.\n if (runAndClearCallback()) {\n HTMLImports['whenReady'](cb);\n } else {\n cb();\n }\n });\n }\n\n}\n\nHTMLImports['whenReady'](function() {\n requestAnimationFrame(function() {\n window.WebComponents.ready = true;\n document.dispatchEvent(new CustomEvent('WebComponentsReady', {bubbles: true}));\n });\n});","/**\n * @license\n * Copyright (c) 2014 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\n * The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\n * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\n * Code distributed by Google as part of the polymer project is also\n * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n */\n\n'use strict';\n// It's desireable to provide a default stylesheet\n// that's convenient for styling unresolved elements, but\n// it's cumbersome to have to include this manually in every page.\n// It would make sense to put inside some HTMLImport but\n// the HTMLImports polyfill does not allow loading of stylesheets\n// that block rendering. Therefore this injection is tolerated here.\n//\n// NOTE: position: relative fixes IE's failure to inherit opacity\n// when a child is not statically positioned.\nlet style = document.createElement('style');\nstyle.textContent = ''\n + 'body {'\n + 'transition: opacity ease-in 0.2s;'\n + ' } \\n'\n + 'body[unresolved] {'\n + 'opacity: 0; display: block; overflow: hidden; position: relative;'\n + ' } \\n'\n ;\nlet head = document.querySelector('head');\nhead.insertBefore(style, head.firstChild);"]}