{"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","QSA","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","replaceScripts","fragment","template","content","scriptsSelector","script","clone","createElement","attributes","attr","setAttribute","name","value","textContent","replaceChild","selector","childNodes","querySelectorAll","emptyNodeList","list","inverseOrder","increment","i","link","currentScript","Object","defineProperty","get","scripts","configurable","CSS_URL_REGEXP","CSS_IMPORT_REGEXP","STYLESHEET_REGEXP","Path","fixUrls","base","href","resolveUrl","getAttribute","r","replaceUrls","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","loadImport","fireEventIfNeeded","makeDocument","processImportsIfLoadingDone","createDocumentFragment","p1","p2","innerHTML","baseEl","querySelector","removeAttribute","inlineScriptIndex","importDependenciesSelector","n","importDependencyAttr","Error","encodeURIComponent","disconnect","flatten","scriptsOk","stylesOk","fireEvents","waitForStyles","runScripts","DOCUMENT_FRAGMENT_NODE","cloneScript","l","s","s$","pendingScriptsSelector","pendingStylesSelector","needsMove","disabledLinkSelector","placeholder","insertBefore","nextSibling","newSibling","import","dispatchEvent","mutations","addedNodes","elem","importer","imps","target","native_baseURI","getOwnPropertyDescriptor","prototype","klass","Element","ownerDoc","call","enumerable","HTMLLinkElement","HTMLImports","customElements","Template","WebComponents","flushCallback","runAndClearCallback","bootstrap","cb","origWhenReady","requestAnimationFrame","ready","style"],"mappings":"A;;;;;;;;;;;;;;;;;;aASC,SAAA,CAAAA,CAAA,CAAS,CAyqBeC,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,CAjChBO,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,CAtdWC,kBAsdX,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,EACDC,CAAA,CAAIlB,QAAJ;AA1asBmB,2CA0atB,CADH,CAEIC,EAAUH,CAAAI,OACTD,EAAL,CAIAE,CAAA,CAAQL,CAAR,CAAiB,QAAA,C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,MAAAG,SAAnB,CAEF,KAAIiN,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/BtN,MAAAgN,cAAAO,MAAA,CAA6B,CAAA,CAC7BpN,SAAA0L,cAAA,CAAuB,IAAI5L,WAAJ,CAAgB,oBAAhB,CAAsC,CAACK,QAAS,CAAA,CAAV,CAAtC,CAAvB,CAF+B,CAAjC,CADkC,CAApC,C,CCrCA,IAAIkN,EAAQrN,QAAA8D,cAAA,CAAuB,OAAvB,CACZuJ,EAAAjJ,YAAA,CAAoB,sIAQpB,KAAIjB,EAAOnD,QAAA6J,cAAA,CAAuB,MAAvB,CACX1G,EAAAmI,aAAA,CAAkB+B,CAAlB,CAAyBlK,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 link = document.createElement('link');\n  const useNative = Boolean('import' in link);\n  const emptyNodeList = link.querySelectorAll('*');\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  /**\n   * @param {!Node} node\n   * @param {!string} selector\n   * @return {!NodeList<!Element>}\n   */\n  const QSA = (node, selector) => {\n    // IE 11 throws a SyntaxError if a node with no children is queried with\n    // a selector containing the `:not([type])` syntax.\n    if (!node.childNodes.length) {\n      return emptyNodeList;\n    }\n    return node.querySelectorAll(selector);\n  };\n\n  /**\n   * @param {!DocumentFragment} fragment\n   */\n  const replaceScripts = (fragment) => {\n    forEach(QSA(fragment, 'template'), template => {\n      forEach(QSA(template.content, scriptsSelector), script => {\n        const clone = /** @type {!HTMLScriptElement} */\n          (document.createElement('script'));\n        forEach(script.attributes, attr => clone.setAttribute(attr.name, attr.value));\n        clone.textContent = script.textContent;\n        script.parentNode.replaceChild(clone, script);\n      });\n      replaceScripts(template.content);\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 scriptsSelector = `script:not([type]),script[type=\"application/javascript\"],` +\n    `script[type=\"text/javascript\"],script[type=\"module\"]`;\n\n  const importDependenciesSelector = `${importSelector},${disabledLinkSelector},` +\n    `style:not([type]),link[rel=stylesheet][href]:not([type]),` + scriptsSelector;\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        (QSA(doc, 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        content = template.content;\n        // Clone scripts inside templates since they won't execute when the\n        // hosting template is cloned.\n        replaceScripts(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        (QSA(content, 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          if(n.type === 'module') {\n            throw new Error('Inline module scripts are not supported in HTML Imports.');\n          }\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        (QSA(doc, 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          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$ = QSA(document, 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        (QSA(document, 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        (QSA(document, 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      (QSA(document, 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  let importer = null;\n  /**\n   * Ensures imports contained in the element are imported.\n   * Use this to handle dynamic imports attached to body.\n   * @param {!(HTMLDocument|Element)} doc\n   */\n  const loadImports = (doc) => {\n    if (importer) {\n      importer.loadImports(doc);\n    }\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      (QSA(document, 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    // Define 'import' read-only property.\n    Object.defineProperty(HTMLLinkElement.prototype, 'import', {\n      get() {\n        return /** @type {HTMLLinkElement} */ (this)['__import'] || null;\n      },\n      configurable: true,\n      enumerable: true\n    });\n\n    whenDocumentReady(() => {\n      importer = new Importer()\n    });\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  scope.loadImports = loadImports;\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);"]}