{"version":3,"sources":["node_modules/@webcomponents/shadydom/src/shady-data.js"," [synthetic:util/global] "," [synthetic:util/defineproperty] "," [synthetic:es6/symbol] "," [synthetic:es6/util/makeiterator] "," [synthetic:es6/util/arrayfromiterator] ","node_modules/@webcomponents/shadydom/src/utils.js","node_modules/@webcomponents/shadydom/src/flush.js","node_modules/@webcomponents/shadydom/src/observe-changes.js","node_modules/@webcomponents/shadydom/src/innerHTML.js","node_modules/@webcomponents/shadydom/src/patch-native.js","node_modules/@webcomponents/shadydom/src/patch-instances.js","node_modules/@webcomponents/shadydom/src/patch-events.js","node_modules/@webcomponents/shadydom/src/array-splice.js","node_modules/@webcomponents/shadydom/src/link-nodes.js","node_modules/@webcomponents/shadydom/src/style-scoping.js","node_modules/@webcomponents/shadydom/src/patches/Node.js","node_modules/@webcomponents/shadydom/src/attach-shadow.js"," [synthetic:es6/util/arrayfromiterable] ","node_modules/@webcomponents/shadydom/src/patches/ParentNode.js","node_modules/@webcomponents/shadydom/src/patches/DocumentOrFragment.js","node_modules/@webcomponents/shadydom/src/patches/DocumentOrShadowRoot.js","node_modules/@webcomponents/shadydom/src/patches/ElementOrShadowRoot.js","node_modules/@webcomponents/shadydom/src/patches/ShadowRoot.js","node_modules/@webcomponents/shadydom/src/patch-shadyRoot.js","node_modules/@webcomponents/shadydom/src/wrapper.js","node_modules/@webcomponents/shadydom/src/patches/EventTarget.js","node_modules/@webcomponents/shadydom/src/patches/Slotable.js","node_modules/@webcomponents/shadydom/src/patches/Element.js","node_modules/@webcomponents/shadydom/src/patches/HTMLElement.js","node_modules/@webcomponents/shadydom/src/patches/Slot.js","node_modules/@webcomponents/shadydom/src/patches/Document.js","node_modules/@webcomponents/shadydom/src/patches/Window.js","node_modules/@webcomponents/shadydom/src/patch-prototypes.js","node_modules/@webcomponents/shadydom/src/shadydom.js","node_modules/@webcomponents/custom-elements/src/Utilities.js","node_modules/@webcomponents/custom-elements/src/CustomElementInternals.js","node_modules/@webcomponents/custom-elements/src/CustomElementState.js","node_modules/@webcomponents/custom-elements/src/DocumentConstructionObserver.js","node_modules/@webcomponents/custom-elements/src/CustomElementRegistry.js","node_modules/@webcomponents/custom-elements/src/Deferred.js","node_modules/@webcomponents/custom-elements/src/Patch/Native.js","node_modules/@webcomponents/custom-elements/src/AlreadyConstructedMarker.js","node_modules/@webcomponents/custom-elements/src/Patch/HTMLElement.js","node_modules/@webcomponents/custom-elements/src/custom-elements.js","node_modules/@webcomponents/custom-elements/src/Patch/Interface/ParentNode.js","node_modules/@webcomponents/custom-elements/src/Patch/Document.js","node_modules/@webcomponents/custom-elements/src/Patch/Node.js","node_modules/@webcomponents/custom-elements/src/Patch/Interface/ChildNode.js","node_modules/@webcomponents/custom-elements/src/Patch/Element.js","node_modules/@webcomponents/custom-elements/src/Patch/DocumentFragment.js","node_modules/@webcomponents/shadycss/src/css-parse.js","node_modules/@webcomponents/shadycss/src/style-settings.js","node_modules/@webcomponents/shadycss/src/common-regex.js","node_modules/@webcomponents/shadycss/src/unscoped-style-handler.js","node_modules/@webcomponents/shadycss/src/style-util.js","node_modules/@webcomponents/shadycss/src/style-transformer.js","node_modules/@webcomponents/shadycss/src/scoping-shim.js","node_modules/@webcomponents/shadycss/src/document-watcher.js","node_modules/@webcomponents/shadycss/src/style-properties.js","node_modules/@webcomponents/shadycss/src/style-info.js","node_modules/@webcomponents/shadycss/src/style-placeholder.js","node_modules/@webcomponents/shadycss/src/style-cache.js","node_modules/@webcomponents/shadycss/src/template-map.js","node_modules/@webcomponents/shadycss/src/apply-shim-utils.js","node_modules/@webcomponents/shadycss/src/common-utils.js","node_modules/@webcomponents/shadycss/entrypoints/scoping-shim.js","entrypoints/webcomponents-sd-ce-index.js"],"names":["$jscomp.global","$jscomp.defineProperty","$jscomp.initSymbol","$jscomp.Symbol","$jscomp.SYMBOL_PREFIX","$jscomp.arrayIterator","$jscomp.initSymbolIterator","$jscomp.iteratorPrototype","constructor","ShadyData","publicRoot","root","dirty","flattenedNodes","_prevAssignedSlot","_previouslyAssignedNodes","assignedSlot","assignedNodes","observer","childNodes","nextSibling","previousSibling","lastChild","firstChild","parentNode","ownerShadyRoot","undefined","__insideAccessors","__outsideAccessors","__onCallbackListeners","toJSON","ensureShadyDataForNode","node","__shady","shadyDataForNode","settings","window","hasNativeShadowDOM","attachShadow","Element","prototype","getRootNode","Node","desc","Object","getOwnPropertyDescriptor","hasDescriptors","configurable","get","inUse","noPatch","preferPerformance","isTrackingLogicalChildNodes","nodeData","isShadyRoot","obj","_localName","hasShadowRootWithSlot","_hasInsertionPoint","p","matches","matchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector","webkitMatchesSelector","twiddle","document","createTextNode","content","queue","observe","MutationObserver","length","shift","e","textContent","characterData","microtask","callback","push","hasDocumentContains","contains","container","createPolyfilledHTMLCollection","nodes","l","name","getAttribute","isNaN","item","nodes.item","index","namedItem","nodes.namedItem","$jscomp.makeIterator","patchProperties","proto","descriptors","prefix","disallowedPatches","newDescriptor","indexOf","value","defineProperty","getOwnPropertyDescriptors","getOwnPropertyNames","forEach","flushList","scheduled","enqueue","flush","didFlush","AsyncObserver","_scheduled","addedNodes","removedNodes","callbacks","Set","schedule","mutations","takeRecords","cb","observeChildren","sd","add","_callback","_observer","_node","unobserveChildren","handle","delete","size","filterMutations","target","targetRootNode","map","mutation","mutationInScope","Array","from","filter","n","create","m","escapeAttrRegExp","escapeDataRegExp","escapeReplace","c","makeSet","arr","set","i","voidElements","plaintextParents","getInnerHTML","localName","s","c$","child","nodeType","ELEMENT_NODE","tagName","attrs","attributes","attr","replace","TEXT_NODE","data","COMMENT_NODE","console","error","Error","nativeMethods","querySelector","selector","querySelectorAll","nativeTree","installNativeAccessor","NATIVE_PREFIX","defineNativeAccessors","prop","copyProperties","list","descriptor","nodeWalker","createTreeWalker","NodeFilter","SHOW_ALL","elementWalker","SHOW_ELEMENT","inertDoc","implementation","createHTMLDocument","clearNode","ParentNodeAccessors","ParentNodeMethods","addNativePrefixedProperties","eventProps","EventTarget","Window","currentNode","parentElement","DOCUMENT_FRAGMENT_NODE","textWalker","SHOW_TEXT","nextNode","nodeValue","ParentNodeWalkerDescriptors","firstElementChild","lastElementChild","children","childElementCount","HTMLElement","previousElementSibling","nextElementSibling","innerHTML","containerName","htmlContainer","namespaceURI","createElementNS","createElement","newContent","HTMLTemplateElement","DocumentFragment","Document","InsideDescriptors","shadowRoot","OutsideDescriptors","className","enumerable","noInstancePatching","patchOutsideElementAccessors","element","patchInsideElementAccessors","eventWrappersName","Date","now","composedGetter","composedProp","Event","ev","call","alwaysComposed","unpatchedEvents","getRootNodeWithFallback","eventTarget","pathComposer","startNode","composed","composedPath","current","startRoot","host","event","__composedPath","retarget","refNode","path","refNodePath","ancestor","lastRoot","rootIdx","mixinComposedFlag","Base","klazz","type","options","__composed","__proto__","nonBubblingEventsToRetarget","hasRetargeted","__relatedTarget","relatedTarget","fireHandlers","phase","hs","__handlers","fn","__immediatePropagationStopped","retargetNonBubblingEvent","__propagationStopped","AT_TARGET","lastFiredRoot","findListener","wrappers","capture","once","passive","savedType","savedListener","savedCapture","savedOnce","savedPassive","savedNode","addEventListener","fnOrObj","optionsOrCapture","handlerType","handleEvent","__shadyTarget","wrapperFn","patchEvent","lastCurrentTargetDesc","eventPhase","BUBBLING_PHASE","stopImmediatePropagation","CAPTURING_PHASE","bubbles","ret","removeEventListener","idx","splice","activateFocusEventOverrides","EventPatchesDescriptors","EventPatches","isTrusted","currentTarget","__relatedTargetComposedPath","stopPropagation","getPrototypeOf","hasOwnProperty","SHADY_PROTO","patchedProto","PatchedEvent","PatchedCustomEvent","CustomEvent","PatchedMouseEvent","MouseEvent","patchClick","composedClickFn","cancelable","click","eventPropertyNames","substring","newSplice","addedCount","removed","calcSplices","currentEnd","old","oldEnd","currentStart","oldStart","prefixCount","suffixCount","minLength","Math","min","currentValue","previousValue","index1","index2","count","equals","rowCount","columnCount","distances","j","north","west","edits","EDIT_ADD","EDIT_DELETE","northWest","EDIT_LEAVE","EDIT_UPDATE","reverse","splices","oldIndex","linkNode","ref_node","containerData","ref_nodeData","psd","nsd","recordInsertBefore","resetTo","recordRemoveChild","recordChildNodes","first","previous","scopingShim","getScopingShim","removeShadyScoping","currentScopeName","currentScopeIsCorrect","newScopeName","correctScope","currentScope","currentScopeForNode","treeVisitor","visitorFn","doc","nativeIsConnectedAccessors","nativeIsConnected","removeOwnerShadyRoot","firstComposedNode","flattened","scheduleObserver","addedNode","removedNode","NodePatches","childNodes.item","isConnected","ownerDocument","documentElement","tc","cn","join","insertBefore","refData","slotsAdded","ownerRoot","ownerShadyRootForNode","oldScopeName","allowNativeInsert","needsScoping","needsSlotFinding","_pendingSlots","_addSlots","_ensureSlotData","_slotList","_slotMap","$jscomp.arrayFromIterator","_asyncRender","parentData","adoptNode","appendChild","removeChild","skipUnscoping","removingInsertionPoint","_removeContainedSlots","preventNativeRemove","changeSlotContent","replaceChild","cloneNode","deep","ATTRIBUTE_NODE","nc","parent","query","matcher","halter","queryElements","elements","result","ParentNodePatches","QueryPatches","useNative","o","slice","ParentNodeDocumentOrFragmentPatches","assign","DocumentOrFragmentPatches","getElementById","id","DocumentOrShadowRootPatches","activeElement","active","activeRoot","ElementOrShadowRootPatches","ShadowRootPatches","patchShadyAccessors","ShadyRootConstructionToken","isRendering","readyState","rootRendered","ancestorList","ancestors","unshift","ShadyRoot","token","TypeError","SHADYROOT_NAME","mode","hostData","MODE_CLOSED","rootData","_hasRendered","_renderPending","_render","_getPendingDistributionRoot","renderRoot","_getDistributionParent","__childSlotCount","_renderSelf","wasRendering","_validateSlots","_distribute","slot","_clearSlotAssignedNodes","slotData","n$","_distributeNodeToSlot","slotParentRoot","slotParentData","_addAssignedToFlattenedNodes","prevAssignedNodes","_fireSlotChange","slots","composeList","_compose","_composeNode","_isInsertionPoint","_updateChildNodes","d","next","forcedSlot","oldSlot","CATCHALL_NAME","assigned","nestedAssigned","_mapSlots","slotNamesToSort","slotParent","_nameForSlot","_sortSlots","__slotName","sort","a","b","listA","listB","nA","nB","x","_removeFlattenedNodes","didRemove","patchShadyRoot","SHADY_PREFIX","defineProperties","nodeName","connectMap","Map","r","v","k","clear","__shadydom_connectedCallback","__shadydom_disconnectedCallback","ManageConnect","base","connected","disconnected","counter","connectFlag","connectedCallback","base.prototype.__shadydom_connectedCallback","disconnectedCallback","base.prototype.__shadydom_disconnectedCallback","define","Wrapper","addEventListener.prototype","removeEventListener.prototype","appendChild.prototype","insertBefore.prototype","removeChild.prototype","replaceChild.prototype","cloneNode.prototype","getRootNode.prototype","contains.prototype","dispatchEvent.prototype","dispatchEvent","setAttribute.prototype","setAttribute","getAttribute.prototype","removeAttribute.prototype","removeAttribute","attachShadow.prototype","focus.prototype","focus","blur.prototype","blur","importNode.prototype","importNode","DOCUMENT_NODE","getElementById.prototype","querySelector.prototype","querySelectorAll.prototype","assignedNodes.prototype","$jscomp.global.Object.defineProperties","_activeElement","wrapperMap","WeakMap","wrap","wrapper","EventTargetPatches","SlotablePatches","distributeAttributeChange","_updateSlotName","oldName","ElementPatches","HTMLElementPatches","shadowActive","property","shadyData","eventName","SlotPatches","flatten","DocumentPatches","WindowPatches","bind","NonStandardHTMLElement","patchMap","Text","HTMLSlotElement","disallowedNativePatches","applyPatches","disallowed","patch","ShadyDOM","flushInitial","_flushInitial","ShadowRoot","reservedTagList","isValidCustomElementName","reserved","has","validForm","test","nativeValue","__CE_isImportDocument","nextSiblingOrAncestorSibling","start","walkDeepDescendantElements","visitedImports","import","__CE_shadowRoot","setPropertyUnchecked","destination","CustomElementInternals","_localNameToDefinition","_constructorToDefinition","_patches","_hasPatches","setDefinition","definition","constructorFunction","addPatch","listener","patchTree","__CE_patched","connectTree","custom","__CE_state","upgradeElement","disconnectTree","patchAndUpgradeTree","upgrade","gatherElements","__CE_hasRegistry","__CE_documentLoadHandled","clonedVisitedImports","defaultView","localNameToDefinition","constructionStack","pop","failed","__CE_definition","attributeChangedCallback","observedAttributes","oldValue","newValue","namespace","DocumentConstructionObserver","internals","_internals","_document","_handleMutations","childList","subtree","disconnect","Deferred","_resolve","_value","_promise","Promise","resolve","CustomElementRegistry","_elementDefinitionIsRunning","_whenDefinedDeferred","_flushCallback","this._flushCallback","_flushPending","_pendingDefinitions","_documentConstructionObserver","define.prototype","CustomElementRegistry$$module$node_modules$$webcomponents$custom_elements$src$CustomElementRegistry_prototype$define","Function","SyntaxError","getCallback","callbackValue","adoptedCallback","_flush","upgrade.prototype","pendingDefinitions","elementsWithStableDefinitions","elementsWithPendingDefinitions","pendingElements","pendingUpgradableElements","deferred","get.prototype","whenDefined.prototype","CustomElementRegistry$$module$node_modules$$webcomponents$custom_elements$src$CustomElementRegistry_prototype$whenDefined","whenDefined","reject","prior","some","polyfillWrapFlushCallback.prototype","polyfillWrapFlushCallback","outer","inner","Document_createElement","Document_createElementNS","Document_importNode","Document_prepend","Document_append","DocumentFragment_prepend","DocumentFragment_append","Node_cloneNode","Node_appendChild","Node_insertBefore","Node_removeChild","Node_replaceChild","Node_textContent","Element_attachShadow","Element_innerHTML","Element_getAttribute","Element_setAttribute","Element_removeAttribute","Element_getAttributeNS","getAttributeNS","Element_setAttributeNS","setAttributeNS","Element_removeAttributeNS","removeAttributeNS","Element_insertAdjacentElement","Element_insertAdjacentHTML","Element_prepend","Element_append","Element_before","Element_after","Element_replaceWith","Element_remove","HTMLElement_innerHTML","HTMLElement_insertAdjacentElement","HTMLElement_insertAdjacentHTML","$jscompDefaultExport","AlreadyConstructedMarker","constructorToDefinition","$jscompDefaultExport$$module$node_modules$$webcomponents$custom_elements$src$Patch$Native.Document_createElement.call","setPrototypeOf","lastIndex","$jscompDefaultExport$$module$node_modules$$webcomponents$custom_elements$src$Patch$Native.HTMLElement","writable","builtIn","appendPrependPatch","builtInMethod","connectedElements","apply","prepend","append","clone","$jscompDefaultExport$$module$node_modules$$webcomponents$custom_elements$src$Patch$Native.Document_importNode.call","NS_HTML","$jscompDefaultExport$$module$node_modules$$webcomponents$custom_elements$src$Patch$Native.Document_createElementNS.call","PatchParentNode","$jscompDefaultExport$$module$node_modules$$webcomponents$custom_elements$src$Patch$Native.Document_prepend","$jscompDefaultExport$$module$node_modules$$webcomponents$custom_elements$src$Patch$Native.Document_append","patch_textContent","baseDescriptor","assignedValue","childNodesLength","insertedNodes","nativeResult","$jscompDefaultExport$$module$node_modules$$webcomponents$custom_elements$src$Patch$Native.Node_insertBefore.call","nodeWasConnected","$jscompDefaultExport$$module$node_modules$$webcomponents$custom_elements$src$Patch$Native.Node_appendChild.call","$jscompDefaultExport$$module$node_modules$$webcomponents$custom_elements$src$Patch$Native.Node_cloneNode.call","$jscompDefaultExport$$module$node_modules$$webcomponents$custom_elements$src$Patch$Native.Node_removeChild.call","nodeToInsert","nodeToRemove","$jscompDefaultExport$$module$node_modules$$webcomponents$custom_elements$src$Patch$Native.Node_replaceChild.call","nodeToInsertWasConnected","thisIsConnected","$jscompDefaultExport$$module$node_modules$$webcomponents$custom_elements$src$Patch$Native.Node_textContent","$jscompDefaultExport$$module$node_modules$$webcomponents$custom_elements$src$Patch$Native.Node_textContent.get","parts","beforeAfterPatch","$jscompDefaultExport$$module$node_modules$$webcomponents$custom_elements$src$Patch$Native.Element_before","$jscompDefaultExport$$module$node_modules$$webcomponents$custom_elements$src$Patch$Native.Element_after","$jscompDefaultExport$$module$node_modules$$webcomponents$custom_elements$src$Patch$Native.Element_replaceWith","wasConnected","$jscompDefaultExport$$module$node_modules$$webcomponents$custom_elements$src$Patch$Native.Element_remove","patch_innerHTML","htmlString","removedElements","patch_insertAdjacentElement","baseMethod","position","insertedElement","patch_insertAdjacentHTML","upgradeNodesInRange","end","text","toLowerCase","marker","String","$jscompDefaultExport$$module$node_modules$$webcomponents$custom_elements$src$Patch$Native.Element_attachShadow","init","$jscompDefaultExport$$module$node_modules$$webcomponents$custom_elements$src$Patch$Native.Element_attachShadow.call","$jscompDefaultExport$$module$node_modules$$webcomponents$custom_elements$src$Patch$Native.Element_innerHTML","$jscompDefaultExport$$module$node_modules$$webcomponents$custom_elements$src$Patch$Native.Element_innerHTML.get","$jscompDefaultExport$$module$node_modules$$webcomponents$custom_elements$src$Patch$Native.HTMLElement_innerHTML","$jscompDefaultExport$$module$node_modules$$webcomponents$custom_elements$src$Patch$Native.HTMLElement_innerHTML.get","isTemplate","rawElement","$jscompDefaultExport$$module$node_modules$$webcomponents$custom_elements$src$Patch$Native.Element_setAttribute.call","$jscompDefaultExport$$module$node_modules$$webcomponents$custom_elements$src$Patch$Native.Element_getAttribute.call","$jscompDefaultExport$$module$node_modules$$webcomponents$custom_elements$src$Patch$Native.Element_setAttributeNS.call","$jscompDefaultExport$$module$node_modules$$webcomponents$custom_elements$src$Patch$Native.Element_getAttributeNS.call","$jscompDefaultExport$$module$node_modules$$webcomponents$custom_elements$src$Patch$Native.Element_removeAttribute.call","$jscompDefaultExport$$module$node_modules$$webcomponents$custom_elements$src$Patch$Native.Element_removeAttributeNS.call","$jscompDefaultExport$$module$node_modules$$webcomponents$custom_elements$src$Patch$Native.HTMLElement_insertAdjacentElement","$jscompDefaultExport$$module$node_modules$$webcomponents$custom_elements$src$Patch$Native.Element_insertAdjacentElement","warn","$jscompDefaultExport$$module$node_modules$$webcomponents$custom_elements$src$Patch$Native.HTMLElement_insertAdjacentHTML","$jscompDefaultExport$$module$node_modules$$webcomponents$custom_elements$src$Patch$Native.Element_insertAdjacentHTML","$jscompDefaultExport$$module$node_modules$$webcomponents$custom_elements$src$Patch$Native.Element_prepend","$jscompDefaultExport$$module$node_modules$$webcomponents$custom_elements$src$Patch$Native.Element_append","PatchChildNode","priorCustomElements","PatchHTMLElement","PatchDocument","$jscompDefaultExport$$module$node_modules$$webcomponents$custom_elements$src$Patch$Native.DocumentFragment_prepend","$jscompDefaultExport$$module$node_modules$$webcomponents$custom_elements$src$Patch$Native.DocumentFragment_append","PatchNode","PatchElement","customElements","StyleNode","parse","RX$$module$node_modules$$webcomponents$shadycss$src$css_parse.comments","RX$$module$node_modules$$webcomponents$shadycss$src$css_parse.port","parseCss","OPEN_BRACE","CLOSE_BRACE","t","trim","ss","_expandUnicodeEscapes","RX$$module$node_modules$$webcomponents$shadycss$src$css_parse.multipleSpaces","lastIndexOf","AT_START","MEDIA_START","types$$module$node_modules$$webcomponents$shadycss$src$css_parse.MEDIA_RULE","match","RX$$module$node_modules$$webcomponents$shadycss$src$css_parse.keyframesRule","types$$module$node_modules$$webcomponents$shadycss$src$css_parse.KEYFRAMES_RULE","split","VAR_START","types$$module$node_modules$$webcomponents$shadycss$src$css_parse.MIXIN_RULE","types$$module$node_modules$$webcomponents$shadycss$src$css_parse.STYLE_RULE","r$","code","repeat","stringify","preserveProperties","cssText","rules","RX$$module$node_modules$$webcomponents$shadycss$src$css_parse.customProp","RX$$module$node_modules$$webcomponents$shadycss$src$css_parse.mixinProp","RX$$module$node_modules$$webcomponents$shadycss$src$css_parse.mixinApply","RX$$module$node_modules$$webcomponents$shadycss$src$css_parse.varApply","STYLE_RULE","KEYFRAMES_RULE","MEDIA_RULE","MIXIN_RULE","comments","port","customProp","mixinProp","mixinApply","varApply","keyframesRule","multipleSpaces","nativeShadow","nativeCssVariables_","calcCssVariables","navigator","userAgent","CSS","supports","cssBuild","ShadyCSS","disableRuntime","nativeCss","nativeCssVariables","module$node_modules$$webcomponents$shadycss$src$style_settings.cssBuild","VAR_ASSIGN","MIXIN_MATCH","VAR_CONSUMED","ANIMATION_MATCH","MEDIA_MATCH","BRACKETED","styleTextSet","toCssText","forEachRule","rulesForStyle","style","isKeyframesSelector","rule","styleRuleCallback","keyframesRuleCallback","onlyActiveRules","skipRules","matchMedia","applyCss","moniker","contextNode","applyStyle","lastHeadApplyNode","applyStylePlaceHolder","placeHolder","createComment","scope","head","after","compareDocumentPosition","DOCUMENT_POSITION_PRECEDING","findMatchingParen","level","processVariableAndFallback","str","suffix","comma","fallback","setElementClassRaw","getIsExtends","typeExtension","is","extends","splitSelectorList","part","getCssBuild","__cssBuild","attrValue","CSS_BUILD_ATTR","buildComment","Comment","commentParts","isOptimalCssBuild","StyleTransformer","domAddScope","_transformDom","transformer","_content","shouldRemoveScope","classList","remove","SCOPE_NAME","CLASS","domReplaceScope","oldScope","newScope","domRemoveScope","elementStyles","styleRules","css","ext","hostScope","_calcHostScope","_calcElementScope","CSS_CLASS_PREFIX","isScoped","_transformRule","transformedSelector","_transformRuleCss","_transformComplexSelector","p$","COMPLEX_SELECTOR_SEP","_twiddleNthPlus","NTH","inside","_preserveMatchesPseudo","MATCHES","input","MATCHES_REPLACEMENT","_replaceMatchesPseudo","reduce","acc","cur","stop","isNth","isMatches","SLOTTED_START","SIMPLE_SELECTOR_SEP","info","_transformCompoundSelector","combinator","slottedIndex","SLOTTED","HOST","_transformHostSelector","_transformSimpleSelector","slotted","SLOTTED_PAREN","paren","DIR_PAREN","before","dir","output","PSEUDO_PREFIX","HOST_PAREN","SIMPLE_SELECTOR_PREFIX","SELECTOR_NO_MATCH","normalizeRootSelector","ROOT","_transformDocumentSelector","SCOPE_DOC_SELECTOR","StyleInfo","ast","placeholder","ownStylePropertyNames","overrideStyleProperties","customStyle","scopeSelector","styleProperties","styleInfo","_getStyleRules","method","IS_IE","StyleProperties","decorateStyles","props","keyframes","ruleIndex","decorateRule","propertyInfo","collectPropertiesInCssText","exec","onKeyframesRule","_keyframes","names","properties","collectProperties","collectCssText","collectConsumingCssText","any","valueForProperty","valueForProperties","propertyValue","colon","pp","propertyDataFromStyles","selectorToMatch","parseInt","key","whenHostOrRootRule","parsedSelector","isRoot","isHost","hostAndRootPropertiesForScope","hostProps","rootProps","_element","transformStyles","hostSelector","hostRx","RegExp","StyleInfo$$module$node_modules$$webcomponents$shadycss$src$style_info.get","keyframeTransforms","_elementKeyframeTransforms","applyProperties","applyKeyframeTransforms","hasAnimations","keyframeNamesToTransform","keyframe","transform","_scopeSelector","keyframesRules","keyframesNameRx","_scopeKeyframes","transformedKeyframesName","scopeId","_keyframesRuleTransformer","applyCustomStyle","XSCOPE_NAME","placeholderMap","ce","origDefine","wrappedDefine","clazz","StyleCache","cache","store","tagname","styleElement","typeMax","scopeRegExp","getCurrentScope","getOwnerScope","handler","mxns","mxn","unscopedNodes","unscopedNode","scopeForPreviouslyUnscopedNode","delayedStart","body","requestAnimationFrame","module$node_modules$$webcomponents$shadycss$src$document_watcher.flush","templateMap","promise","invalidate","elementName","template","templateIsValid","startValidatingTemplate","_validating","then","adoptedCssTextMap","styleCache","ScopingShim","_scopeCounter","_documentOwner","_documentOwnerStyleInfo","StyleInfo$$module$node_modules$$webcomponents$shadycss$src$style_info.set","_elementsHaveApplied","_customStyleInterface","_applyShim","flush.prototype","getStyleAst.prototype","getStyleAst","styleAstToString.prototype","styleAstToString","prepareTemplate.prototype","prepareTemplate","prepareTemplateDom","prepareTemplateStyles","prepareTemplateStyles.prototype","_prepared","optimalBuild","styleTextParts","styles","hasAttribute","scopingAttribute","newStyle","_gatherStyles","_ensure","hasMixins","ownPropertyNames","_generateStaticStyle","shadowroot","_style","_ownPropertyNames","prepareAdoptedCssText.prototype","prepareAdoptedCssText","cssTextArray","prepareTemplateDom.prototype","_domPrepared","_prepareHost","_ensureCustomStyleInterface","CustomStyleInterface","transformCustomStyleForDocument","flushCustomStyles","_ensureApplyShim","ApplyShim","flushCustomStyles.prototype","customStyles","_revalidateCustomStyleApplyShim","_revalidateApplyShim","_updateProperties","_applyCustomStyles","styleDocument","styleElement.prototype","overrideProps","_mixOverrideStyleProps","styleElementNativeVariables","styleElementShimVariables","_applyStyleProperties","cacheEntry","fetch","entry","_validate","pn","cachedStyle","oldScopeSelector","_generateScopeSelector","applyElementStyle","applyElementScopeSelector","removeProperty","setProperty","_styleOwnerForNode","owner","ownerStyleInfo","ownerProperties","hostAndRootProps","propertiesMatchingHost","_mixinOverrideStyles","overrides","reify","styleDocument.prototype","styleSubtree","styleSubtree.prototype","wrappedHost","shadowChildren","transformCustomStyleForDocument.prototype","documentRule","getComputedStyleValue.prototype","getComputedStyleValue","getComputedStyle","getPropertyValue","setElementClass.prototype","setElementClass","classString","classes","scopeName","classAttr","k$","_styleInfoForNode.prototype","_styleInfoForNode","scopeNode.prototype","scopeNode","unscopeNode.prototype","unscopeNode","scopeForNode.prototype","scopeForNode","currentScopeForNode.prototype","elementExtends","WebComponents","fire","ready","wait"],"mappings":"A;;;;;;;;;;;;;;;;;;aAWA,IAAA,CAAA,CCgCAA,EAb2B,WAAlB,EAAC,MAAO,OAAR,EAAiC,MAAjC,GAa0B,IAb1B,CAa0B,IAb1B,CAEe,WAAlB,EAAC,MAAO,OAAR,EAA2C,IAA3C,EAAiC,MAAjC,CAAmD,MAAnD,CAW6B,IDhCnC,CEyBAC,GAC4D,UAAxD,EAAsB,MAAO,OAAA,iBAA7B,CACA,MAAA,eADA,CAEA,QAAQ,CAAC,CAAD,CAAS,CAAT,CAAmB,CAAnB,CAA+B,CAOjC,CAAJ,EAAc,KAAA,UAAd,EAAiC,CAAjC,EAA2C,MAAA,UAA3C,GACA,CAAA,CAAO,CAAP,CADA,CACmB,CAAA,MADnB,CAPqC,CCZtB,SAAA,GAAQ,EAAG,CAE9BC,EAAA,CAAqB,QAAQ,EAAG,EAE3BF,EAAA,OAAL,GACEA,CAAA,OADF,CAC6BG,EAD7B,CAJ8B,CAehC,IAAAA,GAAuD,QAAQ,EAAG,CAChE,IAAI,EAAU,CAUd,OAJA,SAAe,CAAC,CAAD,CAAkB,CAC/B,MA9BoBC,gBA8BpB,EAC6B,CAD7B,EACgD,EADhD,EACuD,CAAA,EAFxB,CAP+B,CAAZ,EAoBzB;QAAA,GAAQ,EAAG,CACtCF,EAAA,EACA,KAAI,EAAiBF,CAAA,OAAA,SAChB,EAAL,GACE,CADF,CACmBA,CAAA,OAAA,SADnB,CAEMA,CAAA,OAAA,CAAyB,UAAzB,CAFN,CAK8C,WAA9C,EAAI,MAAO,MAAA,UAAA,CAAgB,CAAhB,CAAX,EACEC,EAAA,CACI,KAAA,UADJ,CACqB,CADrB,CACqC,CAC/B,aAAc,CAAA,CADiB,CAE/B,SAAU,CAAA,CAFqB,CAO/B,MAAO,QAAQ,EAAG,CAChB,MAAOI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,GAAW/B,MAAA+B,SAGf/B,OAAA0qC,cAAA,CAAuB1qC,MAAA0qC,cAAvB,EAA+C,EAE/CC,SAASA,GAAI,EAAG,CACdzH,qBAAA,CAAsB,QAAA,EAAM,CAC1BljC,MAAA0qC,cAAAE,MAAA,CAA6B,CAAA,CAC7B5qC,OAAA+B,SAAAgf,cAAA,CAA8B,IAAI7O,WAAJ,CAAgB,oBAAhB,CAAsC,CAAElB,QAAS,CAAA,CAAX,CAAtC,CAA9B,CAF0B,CAA5B,CADc,CAOhB65B,QAASA,GAAI,EAAG,CACdF,EAAA,EACA5oC,GAAAmP,oBAAA,CAA6B,kBAA7B,CAAiD25B,EAAjD,CAFc,CAKY,SAA5B,GAAI9oC,EAAA+Y,WAAJ,CACE6vB,EAAA,EADF,CAGE5oC,EAAAoO,iBAAA,CAA0B,kBAA1B,CAA8C06B,EAA9C","file":"webcomponents-sd-ce.js","sourcesContent":["/**\n@license\nCopyright (c) 2016 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\nThe complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\nThe complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\nCode distributed by Google as part of the polymer project is also\nsubject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n*/\n\n\nexport class ShadyData {\n constructor() {\n /** @type {ShadowRoot} */\n this.root = null;\n /** @type {ShadowRoot} */\n this.publicRoot = null;\n this.dirty = false;\n this.observer = null;\n /** @type {Array} */\n this.assignedNodes = null;\n /** @type {Element} */\n this.assignedSlot = null;\n /** @type {Array} */\n this._previouslyAssignedNodes = null;\n /** @type {Element} */\n this._prevAssignedSlot = null;\n /** @type {Array} */\n this.flattenedNodes = null;\n this.ownerShadyRoot = undefined;\n /** @type {Node|undefined} */\n this.parentNode = undefined;\n /** @type {Node|undefined} */\n this.firstChild = undefined;\n /** @type {Node|undefined} */\n this.lastChild = undefined;\n /** @type {Node|undefined} */\n this.previousSibling = undefined;\n /** @type {Node|undefined} */\n this.nextSibling = undefined;\n /** @type {Array|undefined} */\n this.childNodes = undefined;\n this.__outsideAccessors = false;\n this.__insideAccessors = false;\n this.__onCallbackListeners = {};\n }\n\n /** @override */\n toJSON() {\n return {};\n }\n}\n\nexport function ensureShadyDataForNode(node) {\n if (!node.__shady) {\n node.__shady = new ShadyData();\n }\n return node.__shady;\n}\n\nexport function shadyDataForNode(node) {\n return node && node.__shady;\n}\n",null,null,null,null,null,"/**\n@license\nCopyright (c) 2016 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\nThe complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\nThe complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\nCode distributed by Google as part of the polymer project is also\nsubject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n*/\nimport {shadyDataForNode} from './shady-data.js';\n\n/** @type {!Object} */\nexport const settings = window['ShadyDOM'] || {};\n\nsettings.hasNativeShadowDOM = Boolean(Element.prototype.attachShadow && Node.prototype.getRootNode);\n\nconst desc = Object.getOwnPropertyDescriptor(Node.prototype, 'firstChild');\n\nsettings.hasDescriptors = Boolean(desc && desc.configurable && desc.get);\nsettings.inUse = settings['force'] || !settings.hasNativeShadowDOM;\nsettings.noPatch = settings['noPatch'] || false;\nsettings.preferPerformance = settings['preferPerformance'];\n\nexport const isTrackingLogicalChildNodes = (node) => {\n const nodeData = shadyDataForNode(node);\n return (nodeData && nodeData.firstChild !== undefined);\n}\n\nexport const isShadyRoot = (obj) => {\n return Boolean(obj._localName === 'ShadyRoot');\n}\n\nexport const hasShadowRootWithSlot = (node) => {\n const nodeData = shadyDataForNode(node);\n let root = nodeData && nodeData.root;\n return (root && root._hasInsertionPoint());\n}\n\nlet p = Element.prototype;\nlet matches = p.matches || p.matchesSelector ||\n p.mozMatchesSelector || p.msMatchesSelector ||\n p.oMatchesSelector || p.webkitMatchesSelector;\n\nexport const matchesSelector = (element, selector) => {\n return matches.call(element, selector);\n}\n\nexport const mixin = (target, source) => {\n for (var i in source) {\n target[i] = source[i];\n }\n return target;\n}\n\n// NOTE, prefer MutationObserver over Promise for microtask timing\n// for consistency x-platform.\nlet twiddle = document.createTextNode('');\nlet content = 0;\nlet queue = [];\nnew MutationObserver(() => {\n while (queue.length) {\n // catch errors in user code...\n try {\n queue.shift()();\n } catch(e) {\n // enqueue another record and throw\n twiddle.textContent = content++;\n throw(e);\n }\n }\n}).observe(twiddle, {characterData: true});\n\n// use MutationObserver to get microtask async timing.\nexport const microtask = (callback) => {\n queue.push(callback);\n twiddle.textContent = content++;\n}\n\nexport const hasDocumentContains = Boolean(document.contains);\n\nexport const contains = (container, node) => {\n while (node) {\n if (node == container) {\n return true;\n }\n node = node[SHADY_PREFIX + 'parentNode'];\n }\n return false;\n}\n\nconst getNodeHTMLCollectionName = (node) =>\n node.getAttribute('id') || node.getAttribute('name');\n\nconst isValidHTMLCollectionName = (name) => name !== 'length' && isNaN(name);\n\nexport const createPolyfilledHTMLCollection = (nodes) => {\n // Note: loop in reverse so that the first named item matches the named property\n for (let l = nodes.length - 1; l >= 0; l--) {\n const node = nodes[l];\n const name = getNodeHTMLCollectionName(node);\n\n if (name && isValidHTMLCollectionName(name)) {\n nodes[name] = node;\n }\n }\n nodes.item = function(index) {\n return nodes[index];\n }\n nodes.namedItem = function(name) {\n if (isValidHTMLCollectionName(name) && nodes[name]) {\n return nodes[name];\n }\n\n for (const node of nodes) {\n const nodeName = getNodeHTMLCollectionName(node);\n\n if (nodeName == name) {\n return node;\n }\n }\n\n return null;\n };\n return nodes;\n}\n\nexport const NATIVE_PREFIX = '__shady_native_';\nexport const SHADY_PREFIX = '__shady_';\n\n\n\n/**\n * Patch a group of accessors on an object only if it exists or if the `force`\n * argument is true.\n * @param {!Object} proto\n * @param {!Object} descriptors\n * @param {string=} prefix\n * @param {Array=} disallowedPatches\n */\nexport const patchProperties = (proto, descriptors, prefix = '', disallowedPatches) => {\n for (let p in descriptors) {\n const newDescriptor = descriptors[p];\n if (disallowedPatches && disallowedPatches.indexOf(p) >= 0) {\n continue;\n }\n newDescriptor.configurable = true;\n const name = prefix + p;\n // NOTE: we prefer writing directly because some browsers\n // have descriptors that are writable but not configurable (e.g.\n // `appendChild` on older browsers)\n if (newDescriptor.value) {\n proto[name] = newDescriptor.value;\n } else {\n // NOTE: this can throw if 'force' is used so catch the error.\n try {\n Object.defineProperty(proto, name, newDescriptor);\n } catch(e) {\n // this error is harmless so we just trap it.\n }\n }\n }\n}\n\n/** @type {!function(new:HTMLElement)} */\nexport const NativeHTMLElement =\n (window['customElements'] && window['customElements']['nativeHTMLElement']) ||\n HTMLElement;\n\n// note, this is not a perfect polyfill since it doesn't include symbols\n/** @return {!Object} */\nexport const getOwnPropertyDescriptors = (obj) => {\n const descriptors = {};\n Object.getOwnPropertyNames(obj).forEach((name) => {\n descriptors[name] = Object.getOwnPropertyDescriptor(obj, name);\n });\n return descriptors;\n};\n","/**\n@license\nCopyright (c) 2016 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\nThe complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\nThe complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\nCode distributed by Google as part of the polymer project is also\nsubject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n*/\n\nimport * as utils from './utils.js';\n\n// render enqueuer/flusher\nlet flushList = [];\nlet scheduled;\nexport function enqueue(callback) {\n if (!scheduled) {\n scheduled = true;\n utils.microtask(flush);\n }\n flushList.push(callback);\n}\n\nexport function flush() {\n scheduled = false;\n let didFlush = Boolean(flushList.length);\n while (flushList.length) {\n flushList.shift()();\n }\n return didFlush;\n}\n\nflush['list'] = flushList;\n","/**\n@license\nCopyright (c) 2016 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\nThe complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\nThe complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\nCode distributed by Google as part of the polymer project is also\nsubject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n*/\n\nimport * as utils from './utils.js';\nimport {ensureShadyDataForNode} from './shady-data.js';\n\nclass AsyncObserver {\n\n constructor() {\n this._scheduled = false;\n this.addedNodes = [];\n this.removedNodes = [];\n this.callbacks = new Set();\n }\n\n schedule() {\n if (!this._scheduled) {\n this._scheduled = true;\n utils.microtask(() => {\n this.flush();\n });\n }\n }\n\n flush() {\n if (this._scheduled) {\n this._scheduled = false;\n let mutations = this.takeRecords();\n if (mutations.length) {\n this.callbacks.forEach(function(cb) {\n cb(mutations);\n });\n }\n }\n }\n\n takeRecords() {\n if (this.addedNodes.length || this.removedNodes.length) {\n let mutations = [{\n addedNodes: this.addedNodes,\n removedNodes: this.removedNodes\n }];\n this.addedNodes = [];\n this.removedNodes = [];\n return mutations;\n }\n return [];\n }\n\n}\n\n// TODO(sorvell): consider instead polyfilling MutationObserver\n// directly so that users do not have to fork their code.\n// Supporting the entire api may be challenging: e.g. filtering out\n// removed nodes in the wrong scope and seeing non-distributing\n// subtree child mutations.\nexport let observeChildren = function(node, callback) {\n const sd = ensureShadyDataForNode(node);\n if (!sd.observer) {\n sd.observer = new AsyncObserver();\n }\n sd.observer.callbacks.add(callback);\n let observer = sd.observer;\n return {\n _callback: callback,\n _observer: observer,\n _node: node,\n takeRecords() {\n return observer.takeRecords()\n }\n };\n}\n\nexport let unobserveChildren = function(handle) {\n let observer = handle && handle._observer;\n if (observer) {\n observer.callbacks.delete(handle._callback);\n if (!observer.callbacks.size) {\n ensureShadyDataForNode(handle._node).observer = null;\n }\n }\n}\n\nexport function filterMutations(mutations, target) {\n /** @const {Node} */\n const targetRootNode = target.getRootNode();\n return mutations.map(function(mutation) {\n /** @const {boolean} */\n const mutationInScope = (targetRootNode === mutation.target.getRootNode());\n if (mutationInScope && mutation.addedNodes) {\n let nodes = Array.from(mutation.addedNodes).filter(function(n) {\n return (targetRootNode === n.getRootNode());\n });\n if (nodes.length) {\n mutation = Object.create(mutation);\n Object.defineProperty(mutation, 'addedNodes', {\n value: nodes,\n configurable: true\n });\n return mutation;\n }\n } else if (mutationInScope) {\n return mutation;\n }\n }).filter(function(m) { return m});\n}\n","/**\n@license\nCopyright (c) 2016 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\nThe complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\nThe complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\nCode distributed by Google as part of the polymer project is also\nsubject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n*/\n\n// Cribbed from ShadowDOM polyfill\n// https://github.com/webcomponents/webcomponentsjs/blob/master/src/ShadowDOM/wrappers/HTMLElement.js#L28\n/////////////////////////////////////////////////////////////////////////////\n// innerHTML and outerHTML\n\n// http://www.whatwg.org/specs/web-apps/current-work/multipage/the-end.html#escapingString\nlet escapeAttrRegExp = /[&\\u00A0\"]/g;\nlet escapeDataRegExp = /[&\\u00A0<>]/g;\n\nfunction escapeReplace(c) {\n switch (c) {\n case '&':\n return '&';\n case '<':\n return '<';\n case '>':\n return '>';\n case '\"':\n return '"';\n case '\\u00A0':\n return ' ';\n }\n}\n\nfunction escapeAttr(s) {\n return s.replace(escapeAttrRegExp, escapeReplace);\n}\n\nfunction escapeData(s) {\n return s.replace(escapeDataRegExp, escapeReplace);\n}\n\nfunction makeSet(arr) {\n let set = {};\n for (let i = 0; i < arr.length; i++) {\n set[arr[i]] = true;\n }\n return set;\n}\n\n// http://www.whatwg.org/specs/web-apps/current-work/#void-elements\nlet voidElements = makeSet([\n 'area',\n 'base',\n 'br',\n 'col',\n 'command',\n 'embed',\n 'hr',\n 'img',\n 'input',\n 'keygen',\n 'link',\n 'meta',\n 'param',\n 'source',\n 'track',\n 'wbr'\n]);\n\nlet plaintextParents = makeSet([\n 'style',\n 'script',\n 'xmp',\n 'iframe',\n 'noembed',\n 'noframes',\n 'plaintext',\n 'noscript'\n]);\n\n/**\n * @param {Node} node\n * @param {Node} parentNode\n * @param {Function=} callback\n */\nexport function getOuterHTML(node, parentNode, callback) {\n switch (node.nodeType) {\n case Node.ELEMENT_NODE: {\n let tagName = node.localName;\n let s = '<' + tagName;\n let attrs = node.attributes;\n for (let i = 0, attr; (attr = attrs[i]); i++) {\n s += ' ' + attr.name + '=\"' + escapeAttr(attr.value) + '\"';\n }\n s += '>';\n if (voidElements[tagName]) {\n return s;\n }\n return s + getInnerHTML(node, callback) + '';\n }\n case Node.TEXT_NODE: {\n let data = /** @type {Text} */ (node).data;\n if (parentNode && plaintextParents[parentNode.localName]) {\n return data;\n }\n return escapeData(data);\n }\n case Node.COMMENT_NODE: {\n return '';\n }\n default: {\n window.console.error(node);\n throw new Error('not implemented');\n }\n }\n}\n\n/**\n * @param {Node} node\n * @param {Function=} callback\n */\nexport function getInnerHTML(node, callback) {\n if (node.localName === 'template') {\n node = /** @type {HTMLTemplateElement} */ (node).content;\n }\n let s = '';\n let c$ = callback ? callback(node) : node.childNodes;\n for (let i=0, l=c$.length, child; (i {\n nativeTree[name] = (node) => node[NATIVE_PREFIX + name];\n}\n\nconst installNativeMethod = (name, fn) => {\n if (!nativeMethods[name]) {\n nativeMethods[name] = fn;\n }\n}\n\n\nconst defineNativeAccessors = (proto, descriptors) => {\n patchProperties(proto, descriptors, NATIVE_PREFIX);\n // make native accessors available to users\n for (let prop in descriptors) {\n installNativeAccessor(prop);\n }\n}\n\nconst copyProperties = (proto, list = []) => {\n for (let i = 0; i < list.length; i++) {\n const name = list[i];\n const descriptor = Object.getOwnPropertyDescriptor(proto, name);\n if (descriptor) {\n Object.defineProperty(proto, NATIVE_PREFIX + name, descriptor);\n // make native methods/accessors available to users\n if (descriptor.value) {\n installNativeMethod(name, descriptor.value);\n } else {\n installNativeAccessor(name);\n\n }\n }\n }\n}\n\n/** @type {!TreeWalker} */\nconst nodeWalker = document.createTreeWalker(document, NodeFilter.SHOW_ALL,\n null, false);\n\n/** @type {!TreeWalker} */\nconst elementWalker = document.createTreeWalker(document, NodeFilter.SHOW_ELEMENT,\n null, false);\n\n/** @type {!Document} */\nconst inertDoc = document.implementation.createHTMLDocument('inert');\n\nconst clearNode = node => {\n let firstChild;\n while ((firstChild = node[NATIVE_PREFIX + 'firstChild'])) {\n node[NATIVE_PREFIX + 'removeChild'](firstChild);\n }\n}\n\nconst ParentNodeAccessors = [\n 'firstElementChild',\n 'lastElementChild',\n 'children',\n 'childElementCount',\n];\n\nconst ParentNodeMethods = [\n 'querySelector',\n 'querySelectorAll'\n // 'append', 'prepend'\n];\n\nexport const addNativePrefixedProperties = () => {\n\n // EventTarget\n const eventProps = [\n 'dispatchEvent',\n 'addEventListener',\n 'removeEventListener'\n ];\n if (window.EventTarget) {\n copyProperties(window.EventTarget.prototype, eventProps);\n } else {\n copyProperties(Node.prototype, eventProps);\n copyProperties(Window.prototype, eventProps);\n }\n\n\n // Node\n if (hasDescriptors) {\n copyProperties(Node.prototype, [\n 'parentNode',\n 'firstChild',\n 'lastChild',\n 'previousSibling',\n 'nextSibling',\n 'childNodes',\n 'parentElement',\n 'textContent',\n ]);\n } else {\n defineNativeAccessors(Node.prototype, {\n parentNode: {\n /** @this {Node} */\n get() {\n nodeWalker.currentNode = this;\n return nodeWalker.parentNode();\n }\n },\n firstChild: {\n /** @this {Node} */\n get() {\n nodeWalker.currentNode = this;\n return nodeWalker.firstChild();\n }\n },\n lastChild: {\n /** @this {Node} */\n get() {\n nodeWalker.currentNode = this;\n return nodeWalker.lastChild();\n }\n\n },\n previousSibling: {\n /** @this {Node} */\n get() {\n nodeWalker.currentNode = this;\n return nodeWalker.previousSibling();\n }\n },\n nextSibling: {\n /** @this {Node} */\n get() {\n nodeWalker.currentNode = this;\n return nodeWalker.nextSibling();\n }\n },\n // TODO(sorvell): make this a NodeList or whatever\n childNodes: {\n /** @this {Node} */\n get() {\n const nodes = [];\n nodeWalker.currentNode = this;\n let n = nodeWalker.firstChild();\n while (n) {\n nodes.push(n);\n n = nodeWalker.nextSibling();\n }\n return nodes;\n }\n },\n parentElement: {\n /** @this {Node} */\n get() {\n elementWalker.currentNode = this;\n return elementWalker.parentNode();\n }\n },\n textContent: {\n /** @this {Node} */\n get() {\n /* eslint-disable no-case-declarations */\n switch (this.nodeType) {\n case Node.ELEMENT_NODE:\n case Node.DOCUMENT_FRAGMENT_NODE:\n // TODO(sorvell): This cannot be a single TreeWalker that's reused\n // at least for Safari 9, but it's unclear why.\n const textWalker = document.createTreeWalker(this, NodeFilter.SHOW_TEXT,\n null, false);\n let content = '', n;\n while ( (n = textWalker.nextNode()) ) {\n // TODO(sorvell): can't use textContent since we patch it on Node.prototype!\n // However, should probably patch it only on element.\n content += n.nodeValue;\n }\n return content;\n default:\n return this.nodeValue;\n }\n },\n // Needed on browsers that do not proper accessors (e.g. old versions of Chrome)\n /** @this {Node} */\n set(value) {\n if (typeof value === 'undefined' || value === null) {\n value = ''\n }\n switch (this.nodeType) {\n case Node.ELEMENT_NODE:\n case Node.DOCUMENT_FRAGMENT_NODE:\n clearNode(this);\n // Document fragments must have no childnodes if setting a blank string\n if (value.length > 0 || this.nodeType === Node.ELEMENT_NODE) {\n // Note: old Chrome versions require 2nd argument here\n this[NATIVE_PREFIX + 'insertBefore'](document.createTextNode(value), undefined);\n }\n break;\n default:\n // TODO(sorvell): can't do this if patch nodeValue.\n this.nodeValue = value;\n break;\n }\n }\n }\n });\n }\n\n copyProperties(Node.prototype, [\n 'appendChild',\n 'insertBefore',\n 'removeChild',\n 'replaceChild',\n 'cloneNode',\n 'contains'\n ]);\n\n const ParentNodeWalkerDescriptors = {\n firstElementChild: {\n /** @this {ParentNode} */\n get() {\n elementWalker.currentNode = this;\n return elementWalker.firstChild();\n }\n },\n lastElementChild: {\n /** @this {ParentNode} */\n get() {\n elementWalker.currentNode = this;\n return elementWalker.lastChild();\n }\n },\n children: {\n /** @this {ParentNode} */\n get() {\n let nodes = [];\n elementWalker.currentNode = this;\n let n = elementWalker.firstChild();\n while (n) {\n nodes.push(n);\n n = elementWalker.nextSibling();\n }\n return utils.createPolyfilledHTMLCollection(nodes);\n }\n },\n childElementCount: {\n /** @this {ParentNode} */\n get() {\n if (this.children) {\n return this.children.length;\n }\n return 0;\n }\n }\n };\n\n // Element\n if (hasDescriptors) {\n copyProperties(Element.prototype, ParentNodeAccessors);\n\n copyProperties(Element.prototype, [\n 'previousElementSibling',\n 'nextElementSibling',\n 'innerHTML'\n ]);\n\n // NOTE, on IE 11 / Edge 15 children and/or innerHTML are on HTMLElement instead of Element\n if (Object.getOwnPropertyDescriptor(HTMLElement.prototype, 'children')) {\n copyProperties(HTMLElement.prototype, [\n 'children'\n ]);\n }\n if (Object.getOwnPropertyDescriptor(HTMLElement.prototype, 'innerHTML')) {\n copyProperties(HTMLElement.prototype, [\n 'innerHTML'\n ]);\n }\n } else {\n defineNativeAccessors(Element.prototype, ParentNodeWalkerDescriptors);\n defineNativeAccessors(Element.prototype, {\n previousElementSibling: {\n /** @this {Element} */\n get() {\n elementWalker.currentNode = this;\n return elementWalker.previousSibling();\n }\n },\n nextElementSibling: {\n /** @this {Element} */\n get() {\n elementWalker.currentNode = this;\n return elementWalker.nextSibling();\n }\n },\n innerHTML: {\n /** @this {Element} */\n get() {\n return getInnerHTML(this, n => n[NATIVE_PREFIX + 'childNodes']);\n },\n // Needed on browsers that do not proper accessors (e.g. old versions of Chrome)\n /** @this {Element} */\n set(value) {\n const content = this.localName === 'template' ?\n /** @type {HTMLTemplateElement} */(this).content : this;\n clearNode(content);\n const containerName = this.localName || 'div';\n let htmlContainer;\n if (!this.namespaceURI || this.namespaceURI === inertDoc.namespaceURI) {\n htmlContainer = inertDoc.createElement(containerName);\n } else {\n htmlContainer = inertDoc.createElementNS(this.namespaceURI, containerName);\n }\n htmlContainer.innerHTML = value;\n const newContent = this.localName === 'template' ?\n /** @type {HTMLTemplateElement} */(htmlContainer).content : htmlContainer;\n let firstChild;\n while ((firstChild = newContent[NATIVE_PREFIX + 'firstChild'])) {\n // Note: old Chrome versions require 2nd argument here\n content[NATIVE_PREFIX + 'insertBefore'](firstChild, undefined);\n }\n }\n }\n });\n }\n\n copyProperties(Element.prototype, [\n 'setAttribute',\n 'getAttribute',\n 'hasAttribute',\n 'removeAttribute',\n // on older Safari, these are on Element.\n 'focus',\n 'blur',\n ]);\n copyProperties(Element.prototype, ParentNodeMethods);\n\n // HTMLElement\n copyProperties(HTMLElement.prototype, [\n 'focus',\n 'blur',\n // On IE these are on HTMLElement\n 'contains'\n ]);\n\n if (hasDescriptors) {\n copyProperties(HTMLElement.prototype, [\n 'parentElement',\n 'children',\n 'innerHTML'\n ]);\n }\n\n // HTMLTemplateElement\n if (window.HTMLTemplateElement) {\n copyProperties(window.HTMLTemplateElement.prototype, ['innerHTML']);\n }\n\n // DocumentFragment\n if (hasDescriptors) {\n // NOTE, IE 11 does not have on DocumentFragment\n // firstElementChild\n // lastElementChild\n copyProperties(DocumentFragment.prototype, ParentNodeAccessors);\n } else {\n defineNativeAccessors(DocumentFragment.prototype, ParentNodeWalkerDescriptors);\n }\n\n copyProperties(DocumentFragment.prototype, ParentNodeMethods);\n\n // Document\n if (hasDescriptors) {\n copyProperties(Document.prototype, ParentNodeAccessors);\n copyProperties(Document.prototype, [\n 'activeElement'\n ]);\n } else {\n defineNativeAccessors(Document.prototype, ParentNodeWalkerDescriptors);\n }\n\n copyProperties(Document.prototype, [\n 'importNode',\n 'getElementById'\n ]);\n copyProperties(Document.prototype, ParentNodeMethods);\n\n};\n","/**\n@license\nCopyright (c) 2016 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\nThe complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\nThe complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\nCode distributed by Google as part of the polymer project is also\nsubject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n*/\n\nimport * as utils from './utils.js';\nimport {ensureShadyDataForNode} from './shady-data.js';\n\nexport const InsideDescriptors = utils.getOwnPropertyDescriptors({\n\n /** @this {Node} */\n get childNodes() {\n return this[utils.SHADY_PREFIX + 'childNodes'];\n },\n\n /** @this {Node} */\n get firstChild() {\n return this[utils.SHADY_PREFIX + 'firstChild'];\n },\n\n /** @this {Node} */\n get lastChild() {\n return this[utils.SHADY_PREFIX + 'lastChild'];\n },\n\n /** @this {Node} */\n get textContent() {\n return this[utils.SHADY_PREFIX + 'textContent'];\n },\n\n /** @this {Node} */\n set textContent(value) {\n this[utils.SHADY_PREFIX + 'textContent'] = value;\n },\n\n /** @this {Node} */\n get childElementCount() {\n return this[utils.SHADY_PREFIX + 'childElementCount'];\n },\n\n /** @this {Node} */\n get children() {\n return this[utils.SHADY_PREFIX + 'children'];\n },\n\n /** @this {Node} */\n get firstElementChild() {\n return this[utils.SHADY_PREFIX + 'firstElementChild'];\n },\n\n /** @this {Node} */\n get lastElementChild() {\n return this[utils.SHADY_PREFIX + 'lastElementChild'];\n },\n\n /** @this {Node} */\n get innerHTML() {\n return this[utils.SHADY_PREFIX + 'innerHTML'];\n },\n\n /** @this {Node} */\n set innerHTML(value) {\n return this[utils.SHADY_PREFIX + 'innerHTML'] = value;\n },\n\n /** @this {Node} */\n get shadowRoot() {\n return this[utils.SHADY_PREFIX + 'shadowRoot'];\n }\n\n});\n\nexport const OutsideDescriptors = utils.getOwnPropertyDescriptors({\n\n /** @this {Node} */\n get parentElement() {\n return this[utils.SHADY_PREFIX + 'parentElement'];\n },\n\n /** @this {Node} */\n get parentNode() {\n return this[utils.SHADY_PREFIX + 'parentNode'];\n },\n\n /** @this {Node} */\n get nextSibling() {\n return this[utils.SHADY_PREFIX + 'nextSibling'];\n },\n\n /** @this {Node} */\n get previousSibling() {\n return this[utils.SHADY_PREFIX + 'previousSibling'];\n },\n\n /** @this {Node} */\n get nextElementSibling() {\n return this[utils.SHADY_PREFIX + 'nextElementSibling'];\n },\n\n /** @this {Node} */\n get previousElementSibling() {\n return this[utils.SHADY_PREFIX + 'previousElementSibling'];\n },\n\n /** @this {Node} */\n get className() {\n return this[utils.SHADY_PREFIX + 'className'];\n },\n\n /** @this {Node} */\n set className(value) {\n return this[utils.SHADY_PREFIX + 'className'] = value;\n }\n\n});\n\nfor (let prop in InsideDescriptors) {\n InsideDescriptors[prop].enumerable = false;\n}\n\nfor (let prop in OutsideDescriptors) {\n OutsideDescriptors[prop].enumerable = false;\n}\n\nconst noInstancePatching = utils.settings.hasDescriptors || utils.settings.noPatch;\n\n// ensure an element has patched \"outside\" accessors; no-op when not needed\nexport let patchOutsideElementAccessors = noInstancePatching ?\n function() {} : function(element) {\n const sd = ensureShadyDataForNode(element);\n if (!sd.__outsideAccessors) {\n sd.__outsideAccessors = true;\n utils.patchProperties(element, OutsideDescriptors);\n }\n }\n\n// ensure an element has patched \"inside\" accessors; no-op when not needed\nexport let patchInsideElementAccessors = noInstancePatching ?\n function() {} : function(element) {\n const sd = ensureShadyDataForNode(element);\n if (!sd.__insideAccessors) {\n sd.__insideAccessors = true;\n utils.patchProperties(element, InsideDescriptors);\n }\n }","/**\n@license\nCopyright (c) 2016 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\nThe complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\nThe complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\nCode distributed by Google as part of the polymer project is also\nsubject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n*/\n\nimport * as utils from './utils.js';\nimport {shadyDataForNode} from './shady-data.js';\n\n/*\nMake this name unique so it is unlikely to conflict with properties on objects passed to `addEventListener`\nhttps://github.com/webcomponents/shadydom/issues/173\n*/\nconst /** string */ eventWrappersName = `__eventWrappers${Date.now()}`;\n\n/** @type {?function(!Event): boolean} */\nconst composedGetter = (() => {\n const composedProp = Object.getOwnPropertyDescriptor(Event.prototype, 'composed');\n return composedProp ? (ev) => composedProp.get.call(ev) : null;\n})();\n\n// https://github.com/w3c/webcomponents/issues/513#issuecomment-224183937\nconst alwaysComposed = {\n 'blur': true,\n 'focus': true,\n 'focusin': true,\n 'focusout': true,\n 'click': true,\n 'dblclick': true,\n 'mousedown': true,\n 'mouseenter': true,\n 'mouseleave': true,\n 'mousemove': true,\n 'mouseout': true,\n 'mouseover': true,\n 'mouseup': true,\n 'wheel': true,\n 'beforeinput': true,\n 'input': true,\n 'keydown': true,\n 'keyup': true,\n 'compositionstart': true,\n 'compositionupdate': true,\n 'compositionend': true,\n 'touchstart': true,\n 'touchend': true,\n 'touchmove': true,\n 'touchcancel': true,\n 'pointerover': true,\n 'pointerenter': true,\n 'pointerdown': true,\n 'pointermove': true,\n 'pointerup': true,\n 'pointercancel': true,\n 'pointerout': true,\n 'pointerleave': true,\n 'gotpointercapture': true,\n 'lostpointercapture': true,\n 'dragstart': true,\n 'drag': true,\n 'dragenter': true,\n 'dragleave': true,\n 'dragover': true,\n 'drop': true,\n 'dragend': true,\n 'DOMActivate': true,\n 'DOMFocusIn': true,\n 'DOMFocusOut': true,\n 'keypress': true\n};\n\nconst unpatchedEvents = {\n 'DOMAttrModified': true,\n 'DOMAttributeNameChanged': true,\n 'DOMCharacterDataModified': true,\n 'DOMElementNameChanged': true,\n 'DOMNodeInserted': true,\n 'DOMNodeInsertedIntoDocument': true,\n 'DOMNodeRemoved': true,\n 'DOMNodeRemovedFromDocument': true,\n 'DOMSubtreeModified': true\n}\n\n/**\n * Some EventTarget subclasses are not Node subclasses, and you cannot call\n * `getRootNode()` on them.\n *\n * @param {!(Node|EventTarget)} eventTarget\n * @return {!(Node|EventTarget)}\n */\nfunction getRootNodeWithFallback(eventTarget) {\n if (eventTarget instanceof Node) {\n return eventTarget[utils.SHADY_PREFIX + 'getRootNode']();\n } else {\n return eventTarget;\n }\n}\n\nfunction pathComposer(startNode, composed) {\n let composedPath = [];\n let current = startNode;\n let startRoot = getRootNodeWithFallback(startNode);\n while (current) {\n composedPath.push(current);\n if (current[utils.SHADY_PREFIX + 'assignedSlot']) {\n current = current[utils.SHADY_PREFIX + 'assignedSlot'];\n } else if (current.nodeType === Node.DOCUMENT_FRAGMENT_NODE && current.host && (composed || current !== startRoot)) {\n current = current.host;\n } else {\n current = current[utils.SHADY_PREFIX + 'parentNode'];\n }\n }\n // event composedPath includes window when startNode's ownerRoot is document\n if (composedPath[composedPath.length - 1] === document) {\n composedPath.push(window);\n }\n return composedPath;\n}\n\nexport const composedPath = (event) => {\n if (!event.__composedPath) {\n event.__composedPath = pathComposer(event.target, true);\n }\n return event.__composedPath;\n}\n\nfunction retarget(refNode, path) {\n if (!utils.isShadyRoot) {\n return refNode;\n }\n // If ANCESTOR's root is not a shadow root or ANCESTOR's root is BASE's\n // shadow-including inclusive ancestor, return ANCESTOR.\n let refNodePath = pathComposer(refNode, true);\n let p$ = path;\n for (let i=0, ancestor, lastRoot, root, rootIdx; i < p$.length; i++) {\n ancestor = p$[i];\n root = getRootNodeWithFallback(ancestor);\n if (root !== lastRoot) {\n rootIdx = refNodePath.indexOf(root);\n lastRoot = root;\n }\n if (!utils.isShadyRoot(root) || rootIdx > -1) {\n return ancestor;\n }\n }\n}\n\nlet EventPatches = {\n\n /**\n * @this {Event}\n */\n get composed() {\n if (this.__composed === undefined) {\n // if there's an original `composed` getter on the Event prototype, use that\n if (composedGetter) {\n // TODO(web-padawan): see https://github.com/webcomponents/shadydom/issues/275\n this.__composed = this.type === 'focusin' || this.type === 'focusout' || composedGetter(this);\n // If the event is trusted, or `isTrusted` is not supported, check the list of always composed events\n } else if (this.isTrusted !== false) {\n this.__composed = alwaysComposed[this.type];\n }\n }\n return /** @type {!Event} */(this).__composed || false;\n },\n\n /**\n * @this {Event}\n */\n composedPath() {\n if (!this.__composedPath) {\n this.__composedPath = pathComposer(this['__target'], this.composed);\n }\n return /** @type {!Event} */(this).__composedPath;\n },\n\n /**\n * @this {Event}\n */\n get target() {\n return retarget(this.currentTarget || this['__previousCurrentTarget'], this.composedPath());\n },\n\n // http://w3c.github.io/webcomponents/spec/shadow/#event-relatedtarget-retargeting\n /**\n * @this {Event}\n */\n get relatedTarget() {\n if (!this.__relatedTarget) {\n return null;\n }\n if (!this.__relatedTargetComposedPath) {\n this.__relatedTargetComposedPath = pathComposer(this.__relatedTarget, true);\n }\n // find the deepest node in relatedTarget composed path that is in the same root with the currentTarget\n return retarget(this.currentTarget || this['__previousCurrentTarget'], /** @type {!Event} */(this).__relatedTargetComposedPath);\n },\n /**\n * @this {Event}\n */\n stopPropagation() {\n Event.prototype.stopPropagation.call(this);\n this.__propagationStopped = true;\n },\n /**\n * @this {Event}\n */\n stopImmediatePropagation() {\n Event.prototype.stopImmediatePropagation.call(this);\n this.__immediatePropagationStopped = true;\n this.__propagationStopped = true;\n }\n\n};\n\nfunction mixinComposedFlag(Base) {\n // NOTE: avoiding use of `class` here so that transpiled output does not\n // try to do `Base.call` with a dom construtor.\n let klazz = function(type, options) {\n let event = new Base(type, options);\n event.__composed = options && Boolean(options['composed']);\n return event;\n }\n // put constructor properties on subclass\n klazz.__proto__ = Base;\n klazz.prototype = Base.prototype;\n return klazz;\n}\n\nlet nonBubblingEventsToRetarget = {\n 'focus': true,\n 'blur': true\n};\n\n\n/**\n * Check if the event has been retargeted by comparing original `target`, and calculated `target`\n * @param {Event} event\n * @return {boolean} True if the original target and calculated target are the same\n */\nfunction hasRetargeted(event) {\n return event['__target'] !== event.target || event.__relatedTarget !== event.relatedTarget;\n}\n\n/**\n *\n * @param {Event} event\n * @param {Node} node\n * @param {string} phase\n */\nfunction fireHandlers(event, node, phase) {\n let hs = node.__handlers && node.__handlers[event.type] &&\n node.__handlers[event.type][phase];\n if (hs) {\n for (let i = 0, fn; (fn = hs[i]); i++) {\n if (hasRetargeted(event) && event.target === event.relatedTarget) {\n return;\n }\n fn.call(node, event);\n if (event.__immediatePropagationStopped) {\n return;\n }\n }\n }\n}\n\nfunction retargetNonBubblingEvent(e) {\n let path = e.composedPath();\n let node;\n // override `currentTarget` to let patched `target` calculate correctly\n Object.defineProperty(e, 'currentTarget', {\n get: function() {\n return node;\n },\n configurable: true\n });\n for (let i = path.length - 1; i >= 0; i--) {\n node = path[i];\n // capture phase fires all capture handlers\n fireHandlers(e, node, 'capture');\n if (e.__propagationStopped) {\n return;\n }\n }\n\n // set the event phase to `AT_TARGET` as in spec\n Object.defineProperty(e, 'eventPhase', {get() { return Event.AT_TARGET }});\n\n // the event only needs to be fired when owner roots change when iterating the event path\n // keep track of the last seen owner root\n let lastFiredRoot;\n for (let i = 0; i < path.length; i++) {\n node = path[i];\n const nodeData = shadyDataForNode(node);\n const root = nodeData && nodeData.root;\n if (i === 0 || (root && root === lastFiredRoot)) {\n fireHandlers(e, node, 'bubble');\n // don't bother with window, it doesn't have `getRootNode` and will be last in the path anyway\n if (node !== window) {\n lastFiredRoot = node[utils.SHADY_PREFIX + 'getRootNode']();\n }\n if (e.__propagationStopped) {\n return;\n }\n }\n }\n}\n\nfunction listenerSettingsEqual(savedListener, node, type, capture, once, passive) {\n let {\n node: savedNode,\n type: savedType,\n capture: savedCapture,\n once: savedOnce,\n passive: savedPassive\n } = savedListener;\n return node === savedNode &&\n type === savedType &&\n capture === savedCapture &&\n once === savedOnce &&\n passive === savedPassive;\n}\n\nexport function findListener(wrappers, node, type, capture, once, passive) {\n for (let i = 0; i < wrappers.length; i++) {\n if (listenerSettingsEqual(wrappers[i], node, type, capture, once, passive)) {\n return i;\n }\n }\n return -1;\n}\n\n/**\n * Firefox can throw on accessing eventWrappers inside of `removeEventListener` during a selenium run\n * Try/Catch accessing eventWrappers to work around\n * https://bugzilla.mozilla.org/show_bug.cgi?id=1353074\n */\nfunction getEventWrappers(eventLike) {\n let wrappers = null;\n try {\n wrappers = eventLike[eventWrappersName];\n } catch (e) {} // eslint-disable-line no-empty\n return wrappers;\n}\n\n/**\n * @this {EventTarget}\n */\nexport function addEventListener(type, fnOrObj, optionsOrCapture) {\n if (!fnOrObj) {\n return;\n }\n\n const handlerType = typeof fnOrObj;\n\n // bail if `fnOrObj` is not a function, not an object\n if (handlerType !== 'function' && handlerType !== 'object') {\n return;\n }\n\n // bail if `fnOrObj` is an object without a `handleEvent` method\n if (handlerType === 'object' && (!fnOrObj.handleEvent || typeof fnOrObj.handleEvent !== 'function')) {\n return;\n }\n\n if (unpatchedEvents[type]) {\n return this[utils.NATIVE_PREFIX + 'addEventListener'](type, fnOrObj, optionsOrCapture);\n }\n\n // The callback `fn` might be used for multiple nodes/events. Since we generate\n // a wrapper function, we need to keep track of it when we remove the listener.\n // It's more efficient to store the node/type/options information as Array in\n // `fn` itself rather than the node (we assume that the same callback is used\n // for few nodes at most, whereas a node will likely have many event listeners).\n // NOTE(valdrin) invoking external functions is costly, inline has better perf.\n let capture, once, passive;\n if (optionsOrCapture && typeof optionsOrCapture === 'object') {\n capture = Boolean(optionsOrCapture.capture);\n once = Boolean(optionsOrCapture.once);\n passive = Boolean(optionsOrCapture.passive);\n } else {\n capture = Boolean(optionsOrCapture);\n once = false;\n passive = false;\n }\n // hack to let ShadyRoots have event listeners\n // event listener will be on host, but `currentTarget`\n // will be set to shadyroot for event listener\n let target = (optionsOrCapture && optionsOrCapture.__shadyTarget) || this;\n\n let wrappers = fnOrObj[eventWrappersName];\n if (wrappers) {\n // Stop if the wrapper function has already been created.\n if (findListener(wrappers, target, type, capture, once, passive) > -1) {\n return;\n }\n } else {\n fnOrObj[eventWrappersName] = [];\n }\n\n /**\n * @this {HTMLElement}\n * @param {Event} e\n */\n const wrapperFn = function(e) {\n // Support `once` option.\n if (once) {\n this[utils.SHADY_PREFIX + 'removeEventListener'](type, fnOrObj, optionsOrCapture);\n }\n if (!e['__target']) {\n patchEvent(e);\n }\n let lastCurrentTargetDesc;\n if (target !== this) {\n // replace `currentTarget` to make `target` and `relatedTarget` correct for inside the shadowroot\n lastCurrentTargetDesc = Object.getOwnPropertyDescriptor(e, 'currentTarget');\n Object.defineProperty(e, 'currentTarget', {get() { return target }, configurable: true});\n }\n e['__previousCurrentTarget'] = e['currentTarget'];\n // Always check if a shadowRoot is in the current event path.\n // If it is not, the event was generated on either the host of the shadowRoot\n // or a children of the host.\n if (utils.isShadyRoot(target) && e.composedPath().indexOf(target) == -1) {\n return;\n }\n // There are two critera that should stop events from firing on this node\n // 1. the event is not composed and the current node is not in the same root as the target\n // 2. when bubbling, if after retargeting, relatedTarget and target point to the same node\n if (e.composed || e.composedPath().indexOf(target) > -1) {\n if (hasRetargeted(e) && e.target === e.relatedTarget) {\n if (e.eventPhase === Event.BUBBLING_PHASE) {\n e.stopImmediatePropagation();\n }\n return;\n }\n // prevent non-bubbling events from triggering bubbling handlers on shadowroot, but only if not in capture phase\n if (e.eventPhase !== Event.CAPTURING_PHASE && !e.bubbles && e.target !== target && !(target instanceof Window)) {\n return;\n }\n let ret = handlerType === 'function' ?\n fnOrObj.call(target, e) :\n (fnOrObj.handleEvent && fnOrObj.handleEvent(e));\n if (target !== this) {\n // replace the \"correct\" `currentTarget`\n if (lastCurrentTargetDesc) {\n Object.defineProperty(e, 'currentTarget', lastCurrentTargetDesc);\n lastCurrentTargetDesc = null;\n } else {\n delete e['currentTarget'];\n }\n }\n return ret;\n }\n };\n\n // Store the wrapper information.\n fnOrObj[eventWrappersName].push({\n // note: use target here which is either a shadowRoot\n // (when the host element is proxy'ing the event) or this element\n node: target,\n type: type,\n capture: capture,\n once: once,\n passive: passive,\n wrapperFn: wrapperFn\n });\n\n if (nonBubblingEventsToRetarget[type]) {\n this.__handlers = this.__handlers || {};\n this.__handlers[type] = this.__handlers[type] ||\n {'capture': [], 'bubble': []};\n this.__handlers[type][capture ? 'capture' : 'bubble'].push(wrapperFn);\n } else {\n this[utils.NATIVE_PREFIX + 'addEventListener'](type, wrapperFn, optionsOrCapture);\n }\n}\n\n/**\n * @this {EventTarget}\n */\nexport function removeEventListener(type, fnOrObj, optionsOrCapture) {\n if (!fnOrObj) {\n return;\n }\n if (unpatchedEvents[type]) {\n return this[utils.NATIVE_PREFIX + 'removeEventListener'](type, fnOrObj, optionsOrCapture);\n }\n // NOTE(valdrin) invoking external functions is costly, inline has better perf.\n let capture, once, passive;\n if (optionsOrCapture && typeof optionsOrCapture === 'object') {\n capture = Boolean(optionsOrCapture.capture);\n once = Boolean(optionsOrCapture.once);\n passive = Boolean(optionsOrCapture.passive);\n } else {\n capture = Boolean(optionsOrCapture);\n once = false;\n passive = false;\n }\n let target = (optionsOrCapture && optionsOrCapture.__shadyTarget) || this;\n // Search the wrapped function.\n let wrapperFn = undefined;\n let wrappers = getEventWrappers(fnOrObj);\n if (wrappers) {\n let idx = findListener(wrappers, target, type, capture, once, passive);\n if (idx > -1) {\n wrapperFn = wrappers.splice(idx, 1)[0].wrapperFn;\n // Cleanup.\n if (!wrappers.length) {\n fnOrObj[eventWrappersName] = undefined;\n }\n }\n }\n this[utils.NATIVE_PREFIX + 'removeEventListener'](type, wrapperFn || fnOrObj, optionsOrCapture);\n if (wrapperFn && nonBubblingEventsToRetarget[type] &&\n this.__handlers && this.__handlers[type]) {\n const arr = this.__handlers[type][capture ? 'capture' : 'bubble'];\n const idx = arr.indexOf(wrapperFn);\n if (idx > -1) {\n arr.splice(idx, 1);\n }\n }\n}\n\nfunction activateFocusEventOverrides() {\n for (let ev in nonBubblingEventsToRetarget) {\n window[utils.NATIVE_PREFIX + 'addEventListener'](ev, function(e) {\n if (!e['__target']) {\n patchEvent(e);\n retargetNonBubblingEvent(e);\n }\n }, true);\n }\n}\n\nconst EventPatchesDescriptors = utils.getOwnPropertyDescriptors(EventPatches);\n\nconst SHADY_PROTO = '__shady_patchedProto';\nconst SHADY_SOURCE_PROTO = '__shady_sourceProto';\n\nfunction patchEvent(event) {\n event['__target'] = event.target;\n event.__relatedTarget = event.relatedTarget;\n // attempt to patch prototype (via cache)\n if (utils.settings.hasDescriptors) {\n const proto = Object.getPrototypeOf(event);\n if (!Object.hasOwnProperty(proto, SHADY_PROTO)) {\n const patchedProto = Object.create(proto);\n patchedProto[SHADY_SOURCE_PROTO] = proto;\n utils.patchProperties(patchedProto, EventPatchesDescriptors);\n proto[SHADY_PROTO] = patchedProto;\n }\n event.__proto__ = proto[SHADY_PROTO];\n // and fallback to patching instance\n } else {\n utils.patchProperties(event, EventPatchesDescriptors);\n }\n}\n\nlet PatchedEvent = mixinComposedFlag(Event);\nlet PatchedCustomEvent = mixinComposedFlag(CustomEvent);\nlet PatchedMouseEvent = mixinComposedFlag(MouseEvent);\n\n\nexport function patchEvents() {\n activateFocusEventOverrides();\n window.Event = PatchedEvent;\n window.CustomEvent = PatchedCustomEvent;\n window.MouseEvent = PatchedMouseEvent;\n}\n\nexport function patchClick() {\n // Fix up `Element.prototype.click()` if `isTrusted` is supported, but `composed` isn't\n if (!composedGetter && Object.getOwnPropertyDescriptor(Event.prototype, 'isTrusted')) {\n /** @this {Element} */\n const composedClickFn = function() {\n const ev = new MouseEvent('click', {\n bubbles: true,\n cancelable: true,\n composed: true\n });\n this[utils.SHADY_PREFIX + 'dispatchEvent'](ev);\n };\n if (Element.prototype.click) {\n Element.prototype.click = composedClickFn;\n } else if (HTMLElement.prototype.click) {\n HTMLElement.prototype.click = composedClickFn;\n }\n }\n}\n\nexport const eventPropertyNames = Object.getOwnPropertyNames(Document.prototype)\n .filter(name => name.substring(0,2) === 'on');\n","/**\n@license\nCopyright (c) 2016 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\nThe complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\nThe complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\nCode distributed by Google as part of the polymer project is also\nsubject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n*/\n\nfunction newSplice(index, removed, addedCount) {\n return {\n index: index,\n removed: removed,\n addedCount: addedCount\n };\n}\n\nconst EDIT_LEAVE = 0;\nconst EDIT_UPDATE = 1;\nconst EDIT_ADD = 2;\nconst EDIT_DELETE = 3;\n\n// Note: This function is *based* on the computation of the Levenshtein\n// \"edit\" distance. The one change is that \"updates\" are treated as two\n// edits - not one. With Array splices, an update is really a delete\n// followed by an add. By retaining this, we optimize for \"keeping\" the\n// maximum array items in the original array. For example:\n//\n// 'xxxx123' -> '123yyyy'\n//\n// With 1-edit updates, the shortest path would be just to update all seven\n// characters. With 2-edit updates, we delete 4, leave 3, and add 4. This\n// leaves the substring '123' intact.\nfunction calcEditDistances(current, currentStart, currentEnd,\n old, oldStart, oldEnd) {\n // \"Deletion\" columns\n let rowCount = oldEnd - oldStart + 1;\n let columnCount = currentEnd - currentStart + 1;\n let distances = new Array(rowCount);\n\n // \"Addition\" rows. Initialize null column.\n for (let i = 0; i < rowCount; i++) {\n distances[i] = new Array(columnCount);\n distances[i][0] = i;\n }\n\n // Initialize null row\n for (let j = 0; j < columnCount; j++)\n distances[0][j] = j;\n\n for (let i = 1; i < rowCount; i++) {\n for (let j = 1; j < columnCount; j++) {\n if (equals(current[currentStart + j - 1], old[oldStart + i - 1]))\n distances[i][j] = distances[i - 1][j - 1];\n else {\n let north = distances[i - 1][j] + 1;\n let west = distances[i][j - 1] + 1;\n distances[i][j] = north < west ? north : west;\n }\n }\n }\n\n return distances;\n}\n\n// This starts at the final weight, and walks \"backward\" by finding\n// the minimum previous weight recursively until the origin of the weight\n// matrix.\nfunction spliceOperationsFromEditDistances(distances) {\n let i = distances.length - 1;\n let j = distances[0].length - 1;\n let current = distances[i][j];\n let edits = [];\n while (i > 0 || j > 0) {\n if (i == 0) {\n edits.push(EDIT_ADD);\n j--;\n continue;\n }\n if (j == 0) {\n edits.push(EDIT_DELETE);\n i--;\n continue;\n }\n let northWest = distances[i - 1][j - 1];\n let west = distances[i - 1][j];\n let north = distances[i][j - 1];\n\n let min;\n if (west < north)\n min = west < northWest ? west : northWest;\n else\n min = north < northWest ? north : northWest;\n\n if (min == northWest) {\n if (northWest == current) {\n edits.push(EDIT_LEAVE);\n } else {\n edits.push(EDIT_UPDATE);\n current = northWest;\n }\n i--;\n j--;\n } else if (min == west) {\n edits.push(EDIT_DELETE);\n i--;\n current = west;\n } else {\n edits.push(EDIT_ADD);\n j--;\n current = north;\n }\n }\n\n edits.reverse();\n return edits;\n}\n\n/**\n * Splice Projection functions:\n *\n * A splice map is a representation of how a previous array of items\n * was transformed into a new array of items. Conceptually it is a list of\n * tuples of\n *\n * \n *\n * which are kept in ascending index order of. The tuple represents that at\n * the |index|, |removed| sequence of items were removed, and counting forward\n * from |index|, |addedCount| items were added.\n */\n\n/**\n * Lacking individual splice mutation information, the minimal set of\n * splices can be synthesized given the previous state and final state of an\n * array. The basic approach is to calculate the edit distance matrix and\n * choose the shortest path through it.\n *\n * Complexity: O(l * p)\n * l: The length of the current array\n * p: The length of the old array\n */\nfunction calcSplices(current, currentStart, currentEnd,\n old, oldStart, oldEnd) {\n let prefixCount = 0;\n let suffixCount = 0;\n let splice;\n\n let minLength = Math.min(currentEnd - currentStart, oldEnd - oldStart);\n if (currentStart == 0 && oldStart == 0)\n prefixCount = sharedPrefix(current, old, minLength);\n\n if (currentEnd == current.length && oldEnd == old.length)\n suffixCount = sharedSuffix(current, old, minLength - prefixCount);\n\n currentStart += prefixCount;\n oldStart += prefixCount;\n currentEnd -= suffixCount;\n oldEnd -= suffixCount;\n\n if (currentEnd - currentStart == 0 && oldEnd - oldStart == 0)\n return [];\n\n if (currentStart == currentEnd) {\n splice = newSplice(currentStart, [], 0);\n while (oldStart < oldEnd)\n splice.removed.push(old[oldStart++]);\n\n return [ splice ];\n } else if (oldStart == oldEnd)\n return [ newSplice(currentStart, [], currentEnd - currentStart) ];\n\n let ops = spliceOperationsFromEditDistances(\n calcEditDistances(current, currentStart, currentEnd,\n old, oldStart, oldEnd));\n\n splice = undefined;\n let splices = [];\n let index = currentStart;\n let oldIndex = oldStart;\n for (let i = 0; i < ops.length; i++) {\n switch(ops[i]) {\n case EDIT_LEAVE:\n if (splice) {\n splices.push(splice);\n splice = undefined;\n }\n\n index++;\n oldIndex++;\n break;\n case EDIT_UPDATE:\n if (!splice)\n splice = newSplice(index, [], 0);\n\n splice.addedCount++;\n index++;\n\n splice.removed.push(old[oldIndex]);\n oldIndex++;\n break;\n case EDIT_ADD:\n if (!splice)\n splice = newSplice(index, [], 0);\n\n splice.addedCount++;\n index++;\n break;\n case EDIT_DELETE:\n if (!splice)\n splice = newSplice(index, [], 0);\n\n splice.removed.push(old[oldIndex]);\n oldIndex++;\n break;\n }\n }\n\n if (splice) {\n splices.push(splice);\n }\n return splices;\n}\n\nfunction sharedPrefix(current, old, searchLength) {\n for (let i = 0; i < searchLength; i++)\n if (!equals(current[i], old[i]))\n return i;\n return searchLength;\n}\n\nfunction sharedSuffix(current, old, searchLength) {\n let index1 = current.length;\n let index2 = old.length;\n let count = 0;\n while (count < searchLength && equals(current[--index1], old[--index2]))\n count++;\n\n return count;\n}\n\nfunction equals(currentValue, previousValue) {\n return currentValue === previousValue;\n}\n\nexport function calculateSplices(current, previous) {\n return calcSplices(current, 0, current.length, previous, 0,\n previous.length);\n}\n\n","/**\n@license\nCopyright (c) 2016 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\nThe complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\nThe complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\nCode distributed by Google as part of the polymer project is also\nsubject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n*/\n\nimport * as utils from './utils.js';\nimport {shadyDataForNode, ensureShadyDataForNode} from './shady-data.js';\nimport {patchInsideElementAccessors, patchOutsideElementAccessors} from './patch-instances.js';\n\nfunction linkNode(node, container, ref_node) {\n patchOutsideElementAccessors(node);\n ref_node = ref_node || null;\n const nodeData = ensureShadyDataForNode(node);\n const containerData = ensureShadyDataForNode(container);\n const ref_nodeData = ref_node ? ensureShadyDataForNode(ref_node) : null;\n // update ref_node.previousSibling <-> node\n nodeData.previousSibling = ref_node ? ref_nodeData.previousSibling :\n container[utils.SHADY_PREFIX + 'lastChild'];\n let psd = shadyDataForNode(nodeData.previousSibling);\n if (psd) {\n psd.nextSibling = node;\n }\n // update node <-> ref_node\n let nsd = shadyDataForNode(nodeData.nextSibling = ref_node);\n if (nsd) {\n nsd.previousSibling = node;\n }\n // update node <-> container\n nodeData.parentNode = container;\n if (ref_node) {\n if (ref_node === containerData.firstChild) {\n containerData.firstChild = node;\n }\n } else {\n containerData.lastChild = node;\n if (!containerData.firstChild) {\n containerData.firstChild = node;\n }\n }\n // remove caching of childNodes\n containerData.childNodes = null;\n}\n\nexport const recordInsertBefore = (node, container, ref_node) => {\n patchInsideElementAccessors(container);\n const containerData = ensureShadyDataForNode(container);\n if (containerData.firstChild !== undefined) {\n containerData.childNodes = null;\n }\n // handle document fragments\n if (node.nodeType === Node.DOCUMENT_FRAGMENT_NODE) {\n let c$ = node[utils.SHADY_PREFIX + 'childNodes'];\n for (let i=0; i < c$.length; i++) {\n linkNode(c$[i], container, ref_node);\n }\n // cleanup logical dom in doc fragment.\n const nodeData = ensureShadyDataForNode(node);\n let resetTo = (nodeData.firstChild !== undefined) ? null : undefined;\n nodeData.firstChild = nodeData.lastChild = resetTo;\n nodeData.childNodes = resetTo;\n } else {\n linkNode(node, container, ref_node);\n }\n}\n\nexport const recordRemoveChild = (node, container) => {\n const nodeData = ensureShadyDataForNode(node);\n const containerData = ensureShadyDataForNode(container);\n if (node === containerData.firstChild) {\n containerData.firstChild = nodeData.nextSibling;\n }\n if (node === containerData.lastChild) {\n containerData.lastChild = nodeData.previousSibling;\n }\n let p = nodeData.previousSibling;\n let n = nodeData.nextSibling;\n if (p) {\n ensureShadyDataForNode(p).nextSibling = n;\n }\n if (n) {\n ensureShadyDataForNode(n).previousSibling = p;\n }\n // When an element is removed, logical data is no longer tracked.\n // Explicitly set `undefined` here to indicate this. This is disginguished\n // from `null` which is set if info is null.\n nodeData.parentNode = nodeData.previousSibling =\n nodeData.nextSibling = undefined;\n if (containerData.childNodes !== undefined) {\n // remove caching of childNodes\n containerData.childNodes = null;\n }\n}\n\n/**\n * @param {!Node} node\n */\nexport const recordChildNodes = (node) => {\n const nodeData = ensureShadyDataForNode(node);\n if (nodeData.firstChild === undefined) {\n // remove caching of childNodes\n nodeData.childNodes = null;\n const first = nodeData.firstChild = node[utils.NATIVE_PREFIX + 'firstChild'] || null;\n nodeData.lastChild = node[utils.NATIVE_PREFIX + 'lastChild'] || null;\n patchInsideElementAccessors(node);\n for (let n = first, previous; n; (n = n[utils.NATIVE_PREFIX + 'nextSibling'])) {\n const sd = ensureShadyDataForNode(n);\n sd.parentNode = node;\n sd.nextSibling = n[utils.NATIVE_PREFIX + 'nextSibling'] || null;\n sd.previousSibling = previous || null;\n previous = n;\n patchOutsideElementAccessors(n);\n }\n }\n}\n","/**\n@license\nCopyright (c) 2016 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\nThe complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\nThe complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\nCode distributed by Google as part of the polymer project is also\nsubject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n*/\n\nimport * as utils from './utils.js';\n\nlet scopingShim = null;\n\nexport function getScopingShim() {\n if (!scopingShim) {\n scopingShim = window['ShadyCSS'] && window['ShadyCSS']['ScopingShim'];\n }\n return scopingShim || null;\n}\n\n/**\n * @param {!Node} node\n * @param {string} attr\n * @param {string} value\n */\nexport function scopeClassAttribute(node, attr, value) {\n const scopingShim = getScopingShim();\n if (scopingShim && attr === 'class') {\n scopingShim['setElementClass'](node, value);\n return true;\n }\n return false;\n}\n\n/**\n * @param {!Node} node\n * @param {string} newScopeName\n */\nexport function addShadyScoping(node, newScopeName) {\n const scopingShim = getScopingShim();\n if (!scopingShim) {\n return;\n }\n scopingShim['scopeNode'](node, newScopeName);\n}\n\n/**\n * @param {!Node} node\n * @param {string} currentScopeName\n */\nexport function removeShadyScoping(node, currentScopeName) {\n const scopingShim = getScopingShim();\n if (!scopingShim) {\n return;\n }\n scopingShim['unscopeNode'](node, currentScopeName);\n}\n\n/**\n * @param {!Node} node\n * @param {string} newScopeName\n * @param {string} oldScopeName\n */\nexport function replaceShadyScoping(node, newScopeName, oldScopeName) {\n const scopingShim = getScopingShim();\n if (!scopingShim) {\n return;\n }\n if (oldScopeName) {\n removeShadyScoping(node, oldScopeName);\n }\n addShadyScoping(node, newScopeName);\n}\n\n/**\n * @param {!Node} node\n * @param {string} newScopeName\n * @return {boolean}\n */\nexport function currentScopeIsCorrect(node, newScopeName) {\n const scopingShim = getScopingShim();\n if (!scopingShim) {\n return true;\n }\n if (node.nodeType === Node.DOCUMENT_FRAGMENT_NODE) {\n // NOTE: as an optimization, only check that all the top-level children\n // have the correct scope.\n let correctScope = true;\n const childNodes = node[utils.SHADY_PREFIX + 'childNodes'];\n for (let idx = 0; correctScope && (idx < childNodes.length); idx++) {\n correctScope = correctScope &&\n currentScopeIsCorrect(childNodes[idx], newScopeName);\n }\n return correctScope;\n }\n if (node.nodeType !== Node.ELEMENT_NODE) {\n return true;\n }\n const currentScope = scopingShim['currentScopeForNode'](node);\n return currentScope === newScopeName;\n}\n\n/**\n * @param {!Node} node\n * @return {string}\n */\nexport function currentScopeForNode(node) {\n if (node.nodeType !== Node.ELEMENT_NODE) {\n return '';\n }\n const scopingShim = getScopingShim();\n if (!scopingShim) {\n return '';\n }\n return scopingShim['currentScopeForNode'](node);\n}\n\n/**\n * Walk over a node's tree and apply visitorFn to each element node\n *\n * @param {Node} node\n * @param {function(!Node):void} visitorFn\n */\nexport function treeVisitor(node, visitorFn) {\n if (!node) {\n return;\n }\n // this check is necessary if `node` is a Document Fragment\n if (node.nodeType === Node.ELEMENT_NODE) {\n visitorFn(node);\n }\n const childNodes = node[utils.SHADY_PREFIX + 'childNodes'];\n for (let idx = 0, n; idx < childNodes.length; idx++) {\n n = childNodes[idx];\n if (n.nodeType === Node.ELEMENT_NODE) {\n treeVisitor(n, visitorFn);\n }\n }\n}","/**\n@license\nCopyright (c) 2016 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\nThe complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\nThe complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\nCode distributed by Google as part of the polymer project is also\nsubject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n*/\n\nimport * as utils from '../utils.js';\nimport {getScopingShim, removeShadyScoping, replaceShadyScoping,\n treeVisitor, currentScopeForNode, currentScopeIsCorrect } from '../style-scoping.js';\nimport {shadyDataForNode, ensureShadyDataForNode} from '../shady-data.js';\nimport {recordInsertBefore, recordRemoveChild} from '../link-nodes.js';\nimport {ownerShadyRootForNode} from '../attach-shadow.js';\n\nconst doc = window.document;\n\nconst preferPerformance = utils.settings.preferPerformance;\n\nconst nativeIsConnectedAccessors =\n/** @type {ObjectPropertyDescriptor} */(\n Object.getOwnPropertyDescriptor(Node.prototype, 'isConnected')\n);\n\nconst nativeIsConnected = nativeIsConnectedAccessors && nativeIsConnectedAccessors.get;\n\nexport function clearNode(node) {\n let firstChild;\n while ((firstChild = node[utils.SHADY_PREFIX + 'firstChild'])) {\n node[utils.SHADY_PREFIX + 'removeChild'](firstChild);\n }\n}\n\nfunction removeOwnerShadyRoot(node) {\n // optimization: only reset the tree if node is actually in a root\n if (hasCachedOwnerRoot(node)) {\n let c$ = node[utils.SHADY_PREFIX + 'childNodes'];\n for (let i=0, l=c$.length, n; (i 0 || this.nodeType === Node.ELEMENT_NODE) {\n this[utils.SHADY_PREFIX + 'insertBefore'](document.createTextNode(value))\n }\n }\n break;\n default:\n // Note, be wary of patching `nodeValue`.\n this.nodeValue = value;\n break;\n }\n },\n\n // Patched `insertBefore`. Note that all mutations that add nodes are routed\n // here. When a is added or a node is added to a host with a shadowRoot\n // with a slot, a standard dom `insert` call is aborted and `_asyncRender`\n // is called on the relevant shadowRoot. In all other cases, a standard dom\n // `insert` can be made, but the location and ref_node may need to be changed.\n /**\n * @this {Node}\n * @param {Node} node\n * @param {Node=} ref_node\n */\n insertBefore(node, ref_node) {\n // optimization: assume native insertBefore is ok if the nodes are not in the document.\n if (this.ownerDocument !== doc && node.ownerDocument !== doc) {\n this[utils.NATIVE_PREFIX + 'insertBefore'](node, ref_node);\n return node;\n }\n if (node === this) {\n throw Error(`Failed to execute 'appendChild' on 'Node': The new child element contains the parent.`);\n }\n if (ref_node) {\n const refData = shadyDataForNode(ref_node);\n const p = refData && refData.parentNode;\n if ((p !== undefined && p !== this) ||\n (p === undefined && ref_node[utils.NATIVE_PREFIX + 'parentNode'] !== this)) {\n throw Error(`Failed to execute 'insertBefore' on 'Node': The node ` +\n `before which the new node is to be inserted is not a child of this node.`);\n }\n }\n if (ref_node === node) {\n return node;\n }\n /** @type {!Array} */\n const slotsAdded = [];\n const ownerRoot = ownerShadyRootForNode(this);\n /** @type {string} */\n const newScopeName = ownerRoot ? ownerRoot.host.localName : currentScopeForNode(this);\n /** @type {string} */\n let oldScopeName;\n // remove from existing location\n const parentNode = node[utils.SHADY_PREFIX + 'parentNode'];\n if (parentNode) {\n oldScopeName = currentScopeForNode(node);\n parentNode[utils.SHADY_PREFIX + 'removeChild'](node,\n Boolean(ownerRoot) || !ownerShadyRootForNode(node));\n }\n // add to new parent\n let allowNativeInsert = true;\n const needsScoping = (!preferPerformance || node['__noInsertionPoint'] === undefined) &&\n !currentScopeIsCorrect(node, newScopeName);\n const needsSlotFinding = ownerRoot && !node['__noInsertionPoint'] &&\n (!preferPerformance || node.nodeType === Node.DOCUMENT_FRAGMENT_NODE);\n if (needsSlotFinding || needsScoping) {\n // NOTE: avoid node.removeChild as this *can* trigger another patched\n // method (e.g. custom elements) and we want only the shady method to run.\n // The following table describes what style scoping actions should happen as a result of this insertion.\n // document -> shadowRoot: replace\n // shadowRoot -> shadowRoot: replace\n // shadowRoot -> shadowRoot of same type: do nothing\n // shadowRoot -> document: allow unscoping\n // document -> document: do nothing\n // The \"same type of shadowRoot\" and \"document to document cases rely on `currentScopeIsCorrect` returning true\n if (needsScoping) {\n // in a document or disconnected tree, replace scoping if necessary\n oldScopeName = oldScopeName || currentScopeForNode(node);\n }\n treeVisitor(node, (node) => {\n if (needsSlotFinding && node.localName === 'slot') {\n slotsAdded.push(/** @type {!HTMLSlotElement} */(node));\n }\n if (needsScoping) {\n replaceShadyScoping(node, newScopeName, oldScopeName);\n }\n });\n }\n // if a slot is added, must render containing root.\n if (this.localName === 'slot' || slotsAdded.length) {\n if (slotsAdded.length) {\n ownerRoot._addSlots(slotsAdded);\n }\n if (ownerRoot) {\n ownerRoot._asyncRender();\n }\n }\n if (utils.isTrackingLogicalChildNodes(this)) {\n recordInsertBefore(node, this, ref_node);\n // when inserting into a host with a shadowRoot with slot, use\n // `shadowRoot._asyncRender()` via `attach-shadow` module\n const parentData = shadyDataForNode(this);\n if (utils.hasShadowRootWithSlot(this)) {\n parentData.root._asyncRender();\n allowNativeInsert = false;\n // when inserting into a host with shadowRoot with NO slot, do nothing\n // as the node should not be added to composed dome anywhere.\n } else if (parentData.root) {\n allowNativeInsert = false;\n }\n }\n if (allowNativeInsert) {\n // if adding to a shadyRoot, add to host instead\n let container = utils.isShadyRoot(this) ?\n /** @type {ShadowRoot} */(this).host : this;\n // if ref_node, get the ref_node that's actually in composed dom.\n if (ref_node) {\n ref_node = firstComposedNode(ref_node);\n container[utils.NATIVE_PREFIX + 'insertBefore'](node, ref_node);\n } else {\n container[utils.NATIVE_PREFIX + 'appendChild'](node);\n }\n // Since ownerDocument is not patched, it can be incorrect after this call\n // if the node is physically appended via distribution. This can result\n // in the custom elements polyfill not upgrading the node if it's in an inert doc.\n // We correct this by calling `adoptNode`.\n } else if (node.ownerDocument !== this.ownerDocument) {\n this.ownerDocument.adoptNode(node);\n }\n scheduleObserver(this, node);\n return node;\n },\n\n /**\n * @this {Node}\n * @param {Node} node\n */\n appendChild(node) {\n return this[utils.SHADY_PREFIX + 'insertBefore'](node);\n },\n\n /**\n * Patched `removeChild`. Note that all dom \"removals\" are routed here.\n * Removes the given `node` from the element's `children`.\n * This method also performs dom composition.\n * @this {Node}\n * @param {Node} node\n * @param {boolean=} skipUnscoping\n */\n removeChild(node, skipUnscoping = false) {\n if (this.ownerDocument !== doc) {\n return this[utils.NATIVE_PREFIX + 'removeChild'](node);\n }\n if (node[utils.SHADY_PREFIX + 'parentNode'] !== this) {\n throw Error('The node to be removed is not a child of this node: ' +\n node);\n }\n let preventNativeRemove;\n let ownerRoot = ownerShadyRootForNode(node);\n const removingInsertionPoint = ownerRoot && ownerRoot._removeContainedSlots(node);\n const parentData = shadyDataForNode(this);\n if (utils.isTrackingLogicalChildNodes(this)) {\n recordRemoveChild(node, this);\n if (utils.hasShadowRootWithSlot(this)) {\n parentData.root._asyncRender();\n preventNativeRemove = true;\n }\n }\n // unscope a node leaving a ShadowRoot if ShadyCSS is present, and this node\n // is not going to be rescoped in `insertBefore`\n if (getScopingShim() && !skipUnscoping && ownerRoot) {\n const oldScopeName = currentScopeForNode(node);\n treeVisitor(node, (node) => {\n removeShadyScoping(node, oldScopeName);\n });\n }\n removeOwnerShadyRoot(node);\n // if removing slot, must render containing root\n if (ownerRoot) {\n let changeSlotContent = this && this.localName === 'slot';\n if (changeSlotContent) {\n preventNativeRemove = true;\n }\n if (removingInsertionPoint || changeSlotContent) {\n ownerRoot._asyncRender();\n }\n }\n if (!preventNativeRemove) {\n // if removing from a shadyRoot, remove from host instead\n let container = utils.isShadyRoot(this) ?\n /** @type {ShadowRoot} */(this).host :\n this;\n // not guaranteed to physically be in container; e.g.\n // (1) if parent has a shadyRoot, element may or may not at distributed\n // location (could be undistributed)\n // (2) if parent is a slot, element may not ben in composed dom\n if (!(parentData.root || node.localName === 'slot') ||\n (container === node[utils.NATIVE_PREFIX + 'parentNode'])) {\n container[utils.NATIVE_PREFIX + 'removeChild'](node);\n }\n }\n scheduleObserver(this, null, node);\n return node;\n },\n\n /**\n * @this {Node}\n * @param {Node} node\n * @param {Node=} ref_node\n */\n replaceChild(node, ref_node) {\n this[utils.SHADY_PREFIX + 'insertBefore'](node, ref_node);\n this[utils.SHADY_PREFIX + 'removeChild'](ref_node);\n return node;\n },\n\n /**\n * @this {Node}\n * @param {boolean=} deep\n */\n cloneNode(deep) {\n if (this.localName == 'template') {\n return this[utils.NATIVE_PREFIX + 'cloneNode'](deep);\n } else {\n const n = this[utils.NATIVE_PREFIX + 'cloneNode'](false);\n // Attribute nodes historically had childNodes, but they have later\n // been removed from the spec.\n // Make sure we do not do a deep clone on them for old browsers (IE11)\n if (deep && n.nodeType !== Node.ATTRIBUTE_NODE) {\n let c$ = this[utils.SHADY_PREFIX + 'childNodes'];\n for (let i=0, nc; i < c$.length; i++) {\n nc = c$[i][utils.SHADY_PREFIX + 'cloneNode'](true);\n n[utils.SHADY_PREFIX + 'appendChild'](nc);\n }\n }\n return n;\n }\n },\n\n /**\n * @this {Node}\n * @param {Object=} options\n */\n // TODO(sorvell): implement `options` e.g. `{ composed: boolean }`\n getRootNode(options) { // eslint-disable-line no-unused-vars\n if (!this || !this.nodeType) {\n return;\n }\n const nodeData = ensureShadyDataForNode(this);\n let root = nodeData.ownerShadyRoot;\n if (root === undefined) {\n if (utils.isShadyRoot(this)) {\n root = this;\n nodeData.ownerShadyRoot = root;\n } else {\n let parent = this[utils.SHADY_PREFIX + 'parentNode'];\n root = parent ? parent[utils.SHADY_PREFIX + 'getRootNode'](options) : this;\n // memo-ize result for performance but only memo-ize\n // result if node is in the document. This avoids a problem where a root\n // can be cached while an element is inside a fragment.\n // If this happens and we cache the result, the value can become stale\n // because for perf we avoid processing the subtree of added fragments.\n if (document.documentElement[utils.NATIVE_PREFIX + 'contains'](this)) {\n nodeData.ownerShadyRoot = root;\n }\n }\n\n }\n return root;\n },\n\n /** @this {Node} */\n contains(node) {\n return utils.contains(this, node);\n }\n\n});\n","/**\n@license\nCopyright (c) 2016 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\nThe complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\nThe complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\nCode distributed by Google as part of the polymer project is also\nsubject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n*/\n\nimport {calculateSplices} from './array-splice.js';\nimport * as utils from './utils.js';\nimport {enqueue} from './flush.js';\nimport {ensureShadyDataForNode, shadyDataForNode} from './shady-data.js';\nimport {recordChildNodes} from './link-nodes.js';\nimport {patchShadyRoot} from './patch-shadyRoot.js';\n\n// Do not export this object. It must be passed as the first argument to the\n// ShadyRoot constructor in `attachShadow` to prevent the constructor from\n// throwing. This prevents the user from being able to manually construct a\n// ShadyRoot (i.e. `new ShadowRoot()`).\nconst ShadyRootConstructionToken = {};\n\nconst CATCHALL_NAME = '__catchall';\nconst SHADYROOT_NAME = 'ShadyRoot';\n\nconst MODE_CLOSED = 'closed';\n\nlet isRendering = utils.settings['deferConnectionCallbacks'] && document.readyState === 'loading';\nlet rootRendered;\n\nfunction ancestorList(node) {\n let ancestors = [];\n do {\n ancestors.unshift(node);\n } while ((node = node[utils.SHADY_PREFIX + 'parentNode']));\n return ancestors;\n}\n\n/**\n * @extends {ShadowRoot}\n */\nclass ShadyRoot {\n\n constructor(token, host, options) {\n if (token !== ShadyRootConstructionToken) {\n throw new TypeError('Illegal constructor');\n }\n // NOTE: set a fake local name so this element can be\n // distinguished from a DocumentFragment when patching.\n // FF doesn't allow this to be `localName`\n this._localName = SHADYROOT_NAME;\n // root <=> host\n this.host = host;\n /** @type {!string|undefined} */\n this.mode = options && options.mode;\n recordChildNodes(host);\n const hostData = ensureShadyDataForNode(host);\n /** @type {!ShadyRoot} */\n hostData.root = this;\n hostData.publicRoot = this.mode !== MODE_CLOSED ? this : null;\n // setup root\n const rootData = ensureShadyDataForNode(this);\n rootData.firstChild = rootData.lastChild =\n rootData.parentNode = rootData.nextSibling =\n rootData.previousSibling = null;\n rootData.childNodes = [];\n // state flags\n this._renderPending = false;\n this._hasRendered = false;\n // marsalled lazily\n this._slotList = null;\n /** @type {Object>} */\n this._slotMap = null;\n this._pendingSlots = null;\n // NOTE: optimization flag, only require an asynchronous render\n // to record parsed children if flag is not set.\n if (utils.settings['preferPerformance']) {\n let n;\n while ((n = host[utils.NATIVE_PREFIX + 'firstChild'])) {\n host[utils.NATIVE_PREFIX + 'removeChild'](n);\n }\n } else {\n this._asyncRender();\n }\n }\n\n _asyncRender() {\n if (!this._renderPending) {\n this._renderPending = true;\n enqueue(() => this._render());\n }\n }\n\n // returns the oldest renderPending ancestor root.\n _getPendingDistributionRoot() {\n let renderRoot;\n let root = this;\n while (root) {\n if (root._renderPending) {\n renderRoot = root;\n }\n root = root._getDistributionParent();\n }\n return renderRoot;\n }\n\n // Returns the shadyRoot `this.host` if `this.host`\n // has children that require distribution.\n _getDistributionParent() {\n let root = this.host[utils.SHADY_PREFIX + 'getRootNode']();\n if (!utils.isShadyRoot(root)) {\n return;\n }\n const nodeData = shadyDataForNode(this.host);\n if (nodeData && nodeData.__childSlotCount > 0) {\n return root;\n }\n }\n\n // Renders the top most render pending shadowRoot in the distribution tree.\n // This is safe because when a distribution parent renders, all children render.\n _render() {\n // If this root is not pending, it needs no rendering work. Any pending\n // parent that needs to render wll cause this root to render.\n const root = this._renderPending && this._getPendingDistributionRoot();\n if (root) {\n root._renderSelf();\n }\n }\n\n _flushInitial() {\n if (!this._hasRendered && this._renderPending) {\n this._render();\n }\n }\n\n /** @override */\n _renderSelf() {\n // track rendering state.\n const wasRendering = isRendering;\n isRendering = true;\n this._renderPending = false;\n if (this._slotList) {\n this._distribute();\n this._compose();\n }\n // NOTE: optimization flag, only process parsed children\n // if optimization flag is not set.\n // on initial render remove any undistributed children.\n if (!utils.settings['preferPerformance'] && !this._hasRendered) {\n const c$ = this.host[utils.SHADY_PREFIX + 'childNodes'];\n for (let i=0, l=c$.length; i < l; i++) {\n const child = c$[i];\n const data = shadyDataForNode(child);\n if (child[utils.NATIVE_PREFIX + 'parentNode'] === this.host &&\n (child.localName === 'slot' || !data.assignedSlot)) {\n this.host[utils.NATIVE_PREFIX + 'removeChild'](child);\n }\n }\n }\n this._hasRendered = true;\n isRendering = wasRendering;\n if (rootRendered) {\n rootRendered();\n }\n }\n\n _distribute() {\n this._validateSlots();\n // capture # of previously assigned nodes to help determine if dirty.\n for (let i=0, slot; i < this._slotList.length; i++) {\n slot = this._slotList[i];\n this._clearSlotAssignedNodes(slot);\n }\n // distribute host children.\n for (let n=this.host[utils.SHADY_PREFIX + 'firstChild']; n; n=n[utils.SHADY_PREFIX + 'nextSibling']) {\n this._distributeNodeToSlot(n);\n }\n // fallback content, slotchange, and dirty roots\n for (let i=0; i < this._slotList.length; i++) {\n const slot = this._slotList[i];\n const slotData = shadyDataForNode(slot);\n // distribute fallback content\n if (!slotData.assignedNodes.length) {\n for (let n=slot[utils.SHADY_PREFIX + 'firstChild']; n; n=n[utils.SHADY_PREFIX + 'nextSibling']) {\n this._distributeNodeToSlot(n, slot);\n }\n }\n const slotParentData = shadyDataForNode(slot[utils.SHADY_PREFIX + 'parentNode']);\n const slotParentRoot = slotParentData && slotParentData.root;\n if (slotParentRoot && (slotParentRoot._hasInsertionPoint() || slotParentRoot._renderPending)) {\n slotParentRoot._renderSelf();\n }\n this._addAssignedToFlattenedNodes(slotData.flattenedNodes,\n slotData.assignedNodes);\n let prevAssignedNodes = slotData._previouslyAssignedNodes;\n if (prevAssignedNodes) {\n for (let i=0; i < prevAssignedNodes.length; i++) {\n shadyDataForNode(prevAssignedNodes[i])._prevAssignedSlot = null;\n }\n slotData._previouslyAssignedNodes = null;\n // dirty if previously less assigned nodes than previously assigned.\n if (prevAssignedNodes.length > slotData.assignedNodes.length) {\n slotData.dirty = true;\n }\n }\n /* Note: A slot is marked dirty whenever a node is newly assigned to it\n or a node is assigned to a different slot (done in `_distributeNodeToSlot`)\n or if the number of nodes assigned to the slot has decreased (done above);\n */\n if (slotData.dirty) {\n slotData.dirty = false;\n this._fireSlotChange(slot);\n }\n }\n }\n\n /**\n * Distributes given `node` to the appropriate slot based on its `slot`\n * attribute. If `forcedSlot` is given, then the node is distributed to the\n * `forcedSlot`.\n * Note: slot to which the node is assigned will be marked dirty for firing\n * `slotchange`.\n * @param {Node} node\n * @param {Node=} forcedSlot\n *\n */\n _distributeNodeToSlot(node, forcedSlot) {\n const nodeData = ensureShadyDataForNode(node);\n let oldSlot = nodeData._prevAssignedSlot;\n nodeData._prevAssignedSlot = null;\n let slot = forcedSlot;\n if (!slot) {\n let name = node[utils.SHADY_PREFIX + 'slot'] || CATCHALL_NAME;\n const list = this._slotMap[name];\n slot = list && list[0];\n }\n if (slot) {\n const slotData = ensureShadyDataForNode(slot);\n slotData.assignedNodes.push(node);\n nodeData.assignedSlot = slot;\n } else {\n nodeData.assignedSlot = undefined;\n }\n if (oldSlot !== nodeData.assignedSlot) {\n if (nodeData.assignedSlot) {\n ensureShadyDataForNode(nodeData.assignedSlot).dirty = true;\n }\n }\n }\n\n /**\n * Clears the assignedNodes tracking data for a given `slot`. Note, the current\n * assigned node data is tracked (via _previouslyAssignedNodes and\n * _prevAssignedSlot) to see if `slotchange` should fire. This data may be out\n * of date at this time because the assigned nodes may have already been\n * distributed to another root. This is ok since this data is only used to\n * track changes.\n * @param {HTMLSlotElement} slot\n */\n _clearSlotAssignedNodes(slot) {\n const slotData = shadyDataForNode(slot);\n let n$ = slotData.assignedNodes;\n slotData.assignedNodes = [];\n slotData.flattenedNodes = [];\n slotData._previouslyAssignedNodes = n$;\n if (n$) {\n for (let i=0; i < n$.length; i++) {\n let n = shadyDataForNode(n$[i]);\n n._prevAssignedSlot = n.assignedSlot;\n // only clear if it was previously set to this slot;\n // this helps ensure that if the node has otherwise been distributed\n // ignore it.\n if (n.assignedSlot === slot) {\n n.assignedSlot = null;\n }\n }\n }\n }\n\n _addAssignedToFlattenedNodes(flattened, assigned) {\n for (let i=0, n; (i elements and not the\n // shadowRoot into the host. The latter is performend via a fast path\n // in the `logical-mutation`.insertBefore.\n _compose() {\n const slots = this._slotList;\n let composeList = [];\n for (let i=0; i < slots.length; i++) {\n const parent = slots[i][utils.SHADY_PREFIX + 'parentNode'];\n /* compose node only if:\n (1) parent does not have a shadowRoot since shadowRoot has already\n composed into the host\n (2) we're not already composing it\n [consider (n^2) but rare better than Set]\n */\n const parentData = shadyDataForNode(parent);\n if (!(parentData && parentData.root) &&\n composeList.indexOf(parent) < 0) {\n composeList.push(parent);\n }\n }\n for (let i=0; i < composeList.length; i++) {\n const node = composeList[i];\n const targetNode = node === this ? this.host : node;\n this._updateChildNodes(targetNode, this._composeNode(node));\n }\n }\n\n // Returns the list of nodes which should be rendered inside `node`.\n _composeNode(node) {\n let children = [];\n let c$ = node[utils.SHADY_PREFIX + 'childNodes'];\n for (let i = 0; i < c$.length; i++) {\n let child = c$[i];\n // Note: if we see a slot here, the nodes are guaranteed to need to be\n // composed here. This is because if there is redistribution, it has\n // already been handled by this point.\n if (this._isInsertionPoint(child)) {\n let flattenedNodes = shadyDataForNode(child).flattenedNodes;\n for (let j = 0; j < flattenedNodes.length; j++) {\n let distributedNode = flattenedNodes[j];\n children.push(distributedNode);\n }\n } else {\n children.push(child);\n }\n }\n return children;\n }\n\n _isInsertionPoint(node) {\n return node.localName == 'slot';\n }\n\n // Ensures that the rendered node list inside `container` is `children`.\n _updateChildNodes(container, children) {\n let composed = Array.prototype.slice.call(container[utils.NATIVE_PREFIX + 'childNodes']);\n let splices = calculateSplices(children, composed);\n // process removals\n for (let i=0, d=0, s; (i {\n let listA = ancestorList(a);\n let listB = ancestorList(b);\n for (var i=0; i < listA.length; i++) {\n let nA = listA[i];\n let nB = listB[i];\n if (nA !== nB) {\n let c$ = Array.from(nA[utils.SHADY_PREFIX + 'parentNode'][utils.SHADY_PREFIX + 'childNodes']);\n return c$.indexOf(nA) - c$.indexOf(nB);\n }\n }\n });\n }\n\n /**\n * Removes from tracked slot data any slots contained within `container` and\n * then updates the tracked data (_slotList and _slotMap).\n * Any removed slots also have their `assignedNodes` removed from comopsed dom.\n */\n _removeContainedSlots(container) {\n if (!this._slotList) {\n return;\n }\n this._validateSlots();\n let didRemove;\n const map = this._slotMap;\n for (let n in map) {\n const slots = map[n];\n for (let i=0; i < slots.length; i++) {\n const slot = slots[i];\n if (utils.contains(container, slot)) {\n slots.splice(i, 1);\n const x = this._slotList.indexOf(slot);\n if (x >= 0) {\n this._slotList.splice(x, 1);\n const slotParentData = shadyDataForNode(slot[utils.SHADY_PREFIX + 'parentNode']);\n if (slotParentData && slotParentData.__childSlotCount) {\n slotParentData.__childSlotCount--;\n }\n }\n i--;\n this._removeFlattenedNodes(slot);\n didRemove = true;\n }\n }\n }\n return didRemove;\n }\n\n _updateSlotName(slot) {\n if (!this._slotList) {\n return;\n }\n // make sure slotMap is initialized with this slot\n this._validateSlots();\n const oldName = slot.__slotName;\n const name = this._nameForSlot(slot);\n if (name === oldName) {\n return;\n }\n // remove from existing tracking\n let slots = this._slotMap[oldName];\n const i = slots.indexOf(slot);\n if (i >= 0) {\n slots.splice(i, 1);\n }\n // add to new location and sort if nedessary\n let list = this._slotMap[name] || (this._slotMap[name] = []);\n list.push(slot);\n if (list.length > 1) {\n this._slotMap[name] = this._sortSlots(list);\n }\n }\n\n _removeFlattenedNodes(slot) {\n const data = shadyDataForNode(slot);\n let n$ = data.flattenedNodes;\n if (n$) {\n for (let i=0; i {\n if (!host) {\n throw new Error('Must provide a host.');\n }\n if (!options) {\n throw new Error('Not enough arguments.');\n }\n return new ShadyRoot(ShadyRootConstructionToken, host, options);\n}\n\n// Mitigate connect/disconnect spam by wrapping custom element classes.\nif (window['customElements'] && utils.settings.inUse && !utils.settings['preferPerformance']) {\n\n // process connect/disconnect after roots have rendered to avoid\n // issues with reaction stack.\n let connectMap = new Map();\n rootRendered = function() {\n // allow elements to connect\n // save map state (without needing polyfills on IE11)\n const r = [];\n connectMap.forEach((v, k) => {\n r.push([k, v]);\n });\n connectMap.clear();\n for (let i=0; i < r.length; i++) {\n const e = r[i][0], value = r[i][1];\n if (value) {\n e.__shadydom_connectedCallback();\n } else {\n e.__shadydom_disconnectedCallback();\n }\n }\n }\n\n // Document is in loading state and flag is set (deferConnectionCallbacks)\n // so process connection stack when `readystatechange` fires.\n if (isRendering) {\n document.addEventListener('readystatechange', () => {\n isRendering = false;\n rootRendered();\n }, {once: true});\n }\n\n /*\n * (1) elements can only be connected/disconnected if they are in the expected\n * state.\n * (2) never run connect/disconnect during rendering to avoid reaction stack issues.\n */\n const ManageConnect = (base, connected, disconnected) => {\n let counter = 0;\n const connectFlag = `__isConnected${counter++}`;\n if (connected || disconnected) {\n\n /** @this {!HTMLElement} */\n base.prototype.connectedCallback = base.prototype.__shadydom_connectedCallback = function() {\n // if rendering defer connected\n // otherwise connect only if we haven't already\n if (isRendering) {\n connectMap.set(this, true);\n } else if (!this[connectFlag]) {\n this[connectFlag] = true;\n if (connected) {\n connected.call(this);\n }\n }\n }\n\n /** @this {!HTMLElement} */\n base.prototype.disconnectedCallback = base.prototype.__shadydom_disconnectedCallback = function() {\n // if rendering, cancel a pending connection and queue disconnect,\n // otherwise disconnect only if a connection has been allowed\n if (isRendering) {\n // This is necessary only because calling removeChild\n // on a node that requires distribution leaves it in the DOM tree\n // until distribution.\n // NOTE: remember this is checking the patched isConnected to determine\n // if the node is in the logical tree.\n if (!this.isConnected) {\n connectMap.set(this, false);\n }\n } else if (this[connectFlag]) {\n this[connectFlag] = false;\n if (disconnected) {\n disconnected.call(this);\n }\n }\n }\n }\n\n return base;\n }\n\n const define = window['customElements']['define'];\n // NOTE: Instead of patching customElements.define,\n // re-define on the CustomElementRegistry.prototype.define\n // for Safari 10 compatibility (it's flakey otherwise).\n Object.defineProperty(window['CustomElementRegistry'].prototype, 'define', {\n value: function(name, constructor) {\n const connected = constructor.prototype.connectedCallback;\n const disconnected = constructor.prototype.disconnectedCallback;\n define.call(window['customElements'], name,\n ManageConnect(constructor, connected, disconnected));\n // unpatch connected/disconnected on class; custom elements tears this off\n // so the patch is maintained, but if the user calls these methods for\n // e.g. testing, they will be as expected.\n constructor.prototype.connectedCallback = connected;\n constructor.prototype.disconnectedCallback = disconnected;\n }\n });\n\n}\n\n/** @return {!ShadyRoot|undefined} */\nexport const ownerShadyRootForNode = (node) => {\n let root = node[utils.SHADY_PREFIX + 'getRootNode']();\n if (utils.isShadyRoot(root)) {\n return root;\n }\n}\n",null,"/**\n@license\nCopyright (c) 2016 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\nThe complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\nThe complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\nCode distributed by Google as part of the polymer project is also\nsubject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n*/\n\nimport * as utils from '../utils.js';\nimport {shadyDataForNode} from '../shady-data.js';\n\n/**\n * @param {Node} node\n * @param {Function} matcher\n * @param {Function=} halter\n */\nexport function query(node, matcher, halter) {\n let list = [];\n queryElements(node[utils.SHADY_PREFIX + 'childNodes'], matcher,\n halter, list);\n return list;\n}\n\nfunction queryElements(elements, matcher, halter, list) {\n for (let i=0, l=elements.length, c; (i e[utils.SHADY_PREFIX + 'getRootNode']() == root);\n }\n return query(this, function(n) {\n return utils.matchesSelector(n, selector);\n });\n }\n\n});\n\n// Create a custom `ParentNodeDocumentOrFragment` that optionally does not\n// mixin querySelector/All; this is a performance optimization.\nexport const ParentNodeDocumentOrFragmentPatches = utils.settings.preferPerformance ?\n Object.assign({}, ParentNodePatches) : ParentNodePatches;\n\nObject.assign(ParentNodePatches, QueryPatches);","/**\n@license\nCopyright (c) 2016 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\nThe complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\nThe complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\nCode distributed by Google as part of the polymer project is also\nsubject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n*/\nimport * as utils from '../utils.js';\nimport { query } from './ParentNode.js';\n\nexport const DocumentOrFragmentPatches = utils.getOwnPropertyDescriptors({\n\n /**\n * @this {Element}\n * @param {string} id\n */\n getElementById(id) {\n if (id === '') {\n return null;\n }\n let result = query(this, function(n) {\n return n.id == id;\n }, function(n) {\n return Boolean(n);\n })[0];\n return result || null;\n }\n\n});","/**\n@license\nCopyright (c) 2016 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\nThe complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\nThe complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\nCode distributed by Google as part of the polymer project is also\nsubject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n*/\n\nimport * as utils from '../utils.js';\nimport {ownerShadyRootForNode} from '../attach-shadow.js';\n\nfunction getDocumentActiveElement() {\n if (utils.settings.hasDescriptors) {\n return document[utils.NATIVE_PREFIX + 'activeElement'];\n } else {\n return document.activeElement;\n }\n}\n\nexport const DocumentOrShadowRootPatches = utils.getOwnPropertyDescriptors({\n\n /** @this {Document|ShadowRoot} */\n get activeElement() {\n let active = getDocumentActiveElement();\n // In IE11, activeElement might be an empty object if the document is\n // contained in an iframe.\n // https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/10998788/\n if (!active || !active.nodeType) {\n return null;\n }\n let isShadyRoot = !!(utils.isShadyRoot(this));\n if (this !== document) {\n // If this node isn't a document or shady root, then it doesn't have\n // an active element.\n if (!isShadyRoot) {\n return null;\n }\n // If this shady root's host is the active element or the active\n // element is not a descendant of the host (in the composed tree),\n // then it doesn't have an active element.\n if (this.host === active ||\n !this.host[utils.NATIVE_PREFIX + 'contains'](active)) {\n return null;\n }\n }\n // This node is either the document or a shady root of which the active\n // element is a (composed) descendant of its host; iterate upwards to\n // find the active element's most shallow host within it.\n let activeRoot = ownerShadyRootForNode(active);\n while (activeRoot && activeRoot !== this) {\n active = activeRoot.host;\n activeRoot = ownerShadyRootForNode(active);\n }\n if (this === document) {\n // This node is the document, so activeRoot should be null.\n return activeRoot ? null : active;\n } else {\n // This node is a non-document shady root, and it should be\n // activeRoot.\n return activeRoot === this ? active : null;\n }\n }\n});\n","/**\n@license\nCopyright (c) 2016 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\nThe complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\nThe complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\nCode distributed by Google as part of the polymer project is also\nsubject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n*/\n\nimport * as utils from '../utils.js';\nimport {getInnerHTML} from '../innerHTML.js';\nimport {clearNode} from './Node.js';\n\n/** @type {!Document} */\nconst inertDoc = document.implementation.createHTMLDocument('inert');\n\nexport const ElementOrShadowRootPatches = utils.getOwnPropertyDescriptors({\n\n /** @this {Element} */\n get innerHTML() {\n if (utils.isTrackingLogicalChildNodes(this)) {\n const content = this.localName === 'template' ?\n /** @type {HTMLTemplateElement} */(this).content : this;\n return getInnerHTML(content, (e) => e[utils.SHADY_PREFIX + 'childNodes']);\n } else {\n return this[utils.NATIVE_PREFIX + 'innerHTML'];\n }\n },\n\n /**\n * @this {Element}\n * @param {string} value\n */\n set innerHTML(value) {\n if (this.localName === 'template') {\n this[utils.NATIVE_PREFIX + 'innerHTML'] = value;\n } else {\n clearNode(this);\n const containerName = this.localName || 'div';\n let htmlContainer;\n if (!this.namespaceURI || this.namespaceURI === inertDoc.namespaceURI) {\n htmlContainer = inertDoc.createElement(containerName);\n } else {\n htmlContainer = inertDoc.createElementNS(this.namespaceURI, containerName);\n }\n if (utils.settings.hasDescriptors) {\n htmlContainer[utils.NATIVE_PREFIX + 'innerHTML'] = value;\n } else {\n htmlContainer.innerHTML = value;\n }\n let firstChild;\n while ((firstChild = htmlContainer[utils.SHADY_PREFIX + 'firstChild'])) {\n this[utils.SHADY_PREFIX + 'insertBefore'](firstChild);\n }\n }\n }\n\n});\n","/**\n@license\nCopyright (c) 2016 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\nThe complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\nThe complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\nCode distributed by Google as part of the polymer project is also\nsubject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n*/\n\nimport * as utils from '../utils.js';\n\nexport const ShadowRootPatches = utils.getOwnPropertyDescriptors({\n\n /**\n * @this {ShadowRoot}\n * @param {string} type\n * @param {Function} fn\n * @param {Object|boolean=} optionsOrCapture\n */\n addEventListener(type, fn, optionsOrCapture) {\n if (typeof optionsOrCapture !== 'object') {\n optionsOrCapture = {\n capture: Boolean(optionsOrCapture)\n }\n }\n optionsOrCapture.__shadyTarget = this;\n this.host[utils.SHADY_PREFIX + 'addEventListener'](type, fn, optionsOrCapture);\n },\n\n /**\n * @this {ShadowRoot}\n * @param {string} type\n * @param {Function} fn\n * @param {Object|boolean=} optionsOrCapture\n */\n removeEventListener(type, fn, optionsOrCapture) {\n if (typeof optionsOrCapture !== 'object') {\n optionsOrCapture = {\n capture: Boolean(optionsOrCapture)\n }\n }\n optionsOrCapture.__shadyTarget = this;\n this.host[utils.SHADY_PREFIX + 'removeEventListener'](type, fn, optionsOrCapture);\n }\n\n});\n","/**\n@license\nCopyright (c) 2016 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\nThe complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\nThe complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\nCode distributed by Google as part of the polymer project is also\nsubject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n*/\n\nimport * as utils from './utils.js';\nimport {NodePatches} from './patches/Node.js';\nimport {OutsideDescriptors, InsideDescriptors} from './patch-instances.js';\nimport {ParentNodePatches} from './patches/ParentNode.js';\nimport {DocumentOrFragmentPatches} from './patches/DocumentOrFragment.js';\nimport {DocumentOrShadowRootPatches} from './patches/DocumentOrShadowRoot.js';\nimport {ElementOrShadowRootPatches} from './patches/ElementOrShadowRoot.js';\nimport {ShadowRootPatches} from './patches/ShadowRoot.js';\n\n/**\n * @param {!Object} proto\n * @param {string=} prefix\n */\nconst patchShadyAccessors = (proto, prefix) => {\n utils.patchProperties(proto, ShadowRootPatches, prefix);\n utils.patchProperties(proto, DocumentOrShadowRootPatches, prefix);\n utils.patchProperties(proto, ElementOrShadowRootPatches, prefix);\n // We ensure ParentNode accessors since these do not exist in Edge/IE on DocumentFragments.\n utils.patchProperties(proto, ParentNodePatches, prefix);\n // Ensure `shadowRoot` has basic descriptors when we cannot rely\n // on them coming from DocumentFragment.\n //\n // Case 1, noPatching: Because we want noPatch ShadyRoots to have native property\n // names so that they do not have to be wrapped...\n // When we do *not* patch Node/DocumentFragment.prototype\n // we must manually install those properties on ShadyRoot's prototype.\n // Note, it's important to only install these in this mode so as not to stomp\n // over CustomElements polyfill's patches on Node/DocumentFragment methods.\n if (utils.settings.noPatch && !prefix) {\n utils.patchProperties(proto, NodePatches, prefix);\n utils.patchProperties(proto, DocumentOrFragmentPatches, prefix);\n // Case 2, bad descriptors: Ensure accessors are on ShadowRoot.\n // These descriptors are normally used for instance patching but because\n // ShadyRoot can always be patched, just do it to the prototype.\n } else if (!utils.settings.hasDescriptors) {\n utils.patchProperties(proto, OutsideDescriptors);\n utils.patchProperties(proto, InsideDescriptors);\n }\n}\n\nexport const patchShadyRoot = (proto) => {\n proto.__proto__ = DocumentFragment.prototype;\n\n // patch both prefixed and not, even when noPatch == true.\n patchShadyAccessors(proto, utils.SHADY_PREFIX);\n patchShadyAccessors(proto);\n\n // Ensure native properties are all safely wrapped since ShadowRoot is not an\n // actual DocumentFragment instance.\n Object.defineProperties(proto, {\n nodeType: {\n value: Node.DOCUMENT_FRAGMENT_NODE,\n configurable: true\n },\n nodeName: {\n value: '#document-fragment',\n configurable: true\n },\n nodeValue: {\n value: null,\n configurable: true\n }\n });\n\n // make undefined\n [\n 'localName',\n 'namespaceURI',\n 'prefix'\n ].forEach((prop) => {\n Object.defineProperty(proto, prop, {\n value: undefined,\n configurable: true\n });\n });\n\n // defer properties to host\n [\n 'ownerDocument',\n 'baseURI',\n 'isConnected'\n ].forEach((prop) => {\n Object.defineProperty(proto, prop, {\n /** @this {ShadowRoot} */\n get() {\n return this.host[prop];\n },\n configurable: true\n });\n });\n}\n","/**\n@license\nCopyright (c) 2016 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\nThe complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\nThe complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\nCode distributed by Google as part of the polymer project is also\nsubject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n*/\n\nimport * as utils from './utils.js';\nimport {eventPropertyNames} from './patch-events.js';\n\n/** @implements {IWrapper} */\nclass Wrapper {\n\n /** @param {!Node} node */\n constructor(node) {\n this.node = node;\n }\n\n // node\n addEventListener(name, fn, options) {\n return this.node[utils.SHADY_PREFIX + 'addEventListener'](name, fn, options);\n }\n\n removeEventListener(name, fn, options) {\n return this.node[utils.SHADY_PREFIX + 'removeEventListener'](name, fn, options);\n }\n\n appendChild(node) {\n return this.node[utils.SHADY_PREFIX + 'appendChild'](node);\n }\n\n insertBefore(node, ref_node) {\n return this.node[utils.SHADY_PREFIX + 'insertBefore'](node, ref_node);\n }\n\n removeChild(node) {\n return this.node[utils.SHADY_PREFIX + 'removeChild'](node);\n }\n\n replaceChild(node, ref_node) {\n return this.node[utils.SHADY_PREFIX + 'replaceChild'](node, ref_node);\n }\n\n cloneNode(deep) {\n return this.node[utils.SHADY_PREFIX + 'cloneNode'](deep);\n }\n\n getRootNode(options) {\n return this.node[utils.SHADY_PREFIX + 'getRootNode'](options);\n }\n\n contains(node) {\n return this.node[utils.SHADY_PREFIX + 'contains'](node);\n }\n\n dispatchEvent(event) {\n return this.node[utils.SHADY_PREFIX + 'dispatchEvent'](event);\n }\n\n // element\n setAttribute(name, value) {\n this.node[utils.SHADY_PREFIX + 'setAttribute'](name, value);\n }\n\n // NOTE: not needed, just here for balance\n getAttribute(name) {\n return this.node[utils.NATIVE_PREFIX + 'getAttribute'](name);\n }\n\n // NOTE: not needed, just here for balance\n hasAttribute(name) {\n return this.node[utils.NATIVE_PREFIX + 'hasAttribute'](name);\n }\n\n removeAttribute(name) {\n this.node[utils.SHADY_PREFIX + 'removeAttribute'](name);\n }\n\n attachShadow(options) {\n return this.node[utils.SHADY_PREFIX + 'attachShadow'](options);\n }\n\n /** @return {!Node|undefined} */\n get activeElement() {\n if (utils.isShadyRoot(this.node) || this.node.nodeType === Node.DOCUMENT_NODE) {\n const e = this.node[utils.SHADY_PREFIX + 'activeElement'];\n return e;\n }\n }\n\n /**\n * Installed for compatibility with browsers (older Chrome/Safari) that do\n * not have a configurable `activeElement` accessor. Enables noPatch and\n * patch mode both to consistently use ShadyDOM.wrap(document)._activeElement.\n * @override\n * @return {!Node|undefined}\n */\n get _activeElement() {\n return this.activeElement;\n }\n\n // NOTE: not needed, just here for balance\n /** @override */\n focus() {\n this.node[utils.NATIVE_PREFIX + 'focus']();\n }\n\n blur() {\n this.node[utils.SHADY_PREFIX + 'blur']();\n }\n\n // document\n importNode(node, deep) {\n if (this.node.nodeType === Node.DOCUMENT_NODE) {\n return this.node[utils.SHADY_PREFIX + 'importNode'](node, deep);\n }\n }\n\n getElementById(id) {\n if (this.node.nodeType === Node.DOCUMENT_NODE) {\n return this.node[utils.SHADY_PREFIX + 'getElementById'](id);\n }\n }\n\n // query\n querySelector(selector) {\n return this.node[utils.SHADY_PREFIX + 'querySelector'](selector);\n }\n\n querySelectorAll(selector, useNative) {\n return this.node[utils.SHADY_PREFIX + 'querySelectorAll'](selector, useNative);\n }\n\n // slot\n assignedNodes(options) {\n if (this.node.localName === 'slot') {\n return this.node[utils.SHADY_PREFIX + 'assignedNodes'](options);\n }\n }\n\n get host() {\n if (utils.isShadyRoot(this.node)) {\n return /** @type {!ShadowRoot} */(this.node).host;\n }\n }\n\n get parentNode() {\n return this.node[utils.SHADY_PREFIX + 'parentNode'];\n }\n\n get firstChild() {\n return this.node[utils.SHADY_PREFIX + 'firstChild'];\n }\n\n get lastChild() {\n return this.node[utils.SHADY_PREFIX + 'lastChild'];\n }\n\n get nextSibling() {\n return this.node[utils.SHADY_PREFIX + 'nextSibling'];\n }\n\n get previousSibling() {\n return this.node[utils.SHADY_PREFIX + 'previousSibling'];\n }\n\n get childNodes() {\n return this.node[utils.SHADY_PREFIX + 'childNodes'];\n }\n\n get parentElement() {\n return this.node[utils.SHADY_PREFIX + 'parentElement'];\n }\n\n get firstElementChild() {\n return this.node[utils.SHADY_PREFIX + 'firstElementChild'];\n }\n\n get lastElementChild() {\n return this.node[utils.SHADY_PREFIX + 'lastElementChild'];\n }\n\n get nextElementSibling() {\n return this.node[utils.SHADY_PREFIX + 'nextElementSibling'];\n }\n\n get previousElementSibling() {\n return this.node[utils.SHADY_PREFIX + 'previousElementSibling'];\n }\n\n get children() {\n return this.node[utils.SHADY_PREFIX + 'children'];\n }\n\n get childElementCount() {\n return this.node[utils.SHADY_PREFIX + 'childElementCount'];\n }\n\n get shadowRoot() {\n return this.node[utils.SHADY_PREFIX + 'shadowRoot'];\n }\n\n get assignedSlot() {\n return this.node[utils.SHADY_PREFIX + 'assignedSlot'];\n }\n\n get isConnected() {\n return this.node[utils.SHADY_PREFIX + 'isConnected'];\n }\n\n get innerHTML() {\n return this.node[utils.SHADY_PREFIX + 'innerHTML'];\n }\n\n set innerHTML(value) {\n this.node[utils.SHADY_PREFIX + 'innerHTML'] = value;\n }\n\n get textContent() {\n return this.node[utils.SHADY_PREFIX + 'textContent'];\n }\n\n set textContent(value) {\n this.node[utils.SHADY_PREFIX + 'textContent'] = value;\n }\n\n get slot() {\n return this.node[utils.SHADY_PREFIX + 'slot'];\n }\n\n set slot(value) {\n this.node[utils.SHADY_PREFIX + 'slot'] = value;\n }\n\n}\n\neventPropertyNames.forEach(name => {\n Object.defineProperty(Wrapper.prototype, name, {\n /** @this {Wrapper} */\n get() {\n return this.node[utils.SHADY_PREFIX + name];\n },\n /** @this {Wrapper} */\n set(value) {\n this.node[utils.SHADY_PREFIX + name] = value;\n },\n configurable: true\n });\n\n});\n\nexport {Wrapper};\n\nconst wrapperMap = new WeakMap();\n\nexport function wrap(obj) {\n if (utils.isShadyRoot(obj) || obj instanceof Wrapper) {\n return obj;\n }\n let wrapper = wrapperMap.get(obj)\n if (!wrapper) {\n wrapper = new Wrapper(obj);\n wrapperMap.set(obj, wrapper);\n }\n return wrapper;\n}\n","/**\n@license\nCopyright (c) 2016 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\nThe complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\nThe complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\nCode distributed by Google as part of the polymer project is also\nsubject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n*/\n\nimport * as utils from '../utils.js';\nimport {flush} from '../flush.js';\nimport {addEventListener, removeEventListener} from '../patch-events.js';\n\nexport const EventTargetPatches = utils.getOwnPropertyDescriptors({\n\n /** @this {Node} */\n dispatchEvent(event) {\n flush();\n return this[utils.NATIVE_PREFIX + 'dispatchEvent'](event);\n },\n\n addEventListener,\n\n removeEventListener\n\n});","/**\n@license\nCopyright (c) 2016 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\nThe complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\nThe complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\nCode distributed by Google as part of the polymer project is also\nsubject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n*/\n\nimport * as utils from '../utils.js';\nimport {shadyDataForNode} from '../shady-data.js';\n\nexport const SlotablePatches = utils.getOwnPropertyDescriptors({\n\n /** @this {Node} */\n get assignedSlot() {\n // Force any parent's shadowRoot to flush so that distribution occurs\n // and this node has an assignedSlot.\n const parent = this[utils.SHADY_PREFIX + 'parentNode'];\n const ownerRoot = parent && parent[utils.SHADY_PREFIX + 'shadowRoot'];\n if (ownerRoot) {\n ownerRoot._render();\n }\n const nodeData = shadyDataForNode(this);\n return nodeData && nodeData.assignedSlot || null;\n }\n\n});\n","/**\n@license\nCopyright (c) 2016 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\nThe complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\nThe complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\nCode distributed by Google as part of the polymer project is also\nsubject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n*/\n\nimport * as utils from '../utils.js';\nimport {scopeClassAttribute} from '../style-scoping.js';\nimport {shadyDataForNode} from '../shady-data.js';\nimport {attachShadow, ownerShadyRootForNode} from '../attach-shadow.js';\n\nconst doc = window.document;\n\n/**\n * Should be called whenever an attribute changes. If the `slot` attribute\n * changes, provokes rendering if necessary. If a `` element's `name`\n * attribute changes, updates the root's slot map and renders.\n * @param {Node} node\n * @param {string} name\n */\nfunction distributeAttributeChange(node, name) {\n if (name === 'slot') {\n const parent = node[utils.SHADY_PREFIX + 'parentNode'];\n if (utils.hasShadowRootWithSlot(parent)) {\n shadyDataForNode(parent).root._asyncRender();\n }\n } else if (node.localName === 'slot' && name === 'name') {\n let root = ownerShadyRootForNode(node);\n if (root) {\n root._updateSlotName(node);\n root._asyncRender();\n }\n }\n}\n\nexport const ElementPatches = utils.getOwnPropertyDescriptors({\n\n /** @this {Element} */\n get previousElementSibling() {\n const nodeData = shadyDataForNode(this);\n if (nodeData && nodeData.previousSibling !== undefined) {\n let n = this[utils.SHADY_PREFIX + 'previousSibling'];\n while (n && n.nodeType !== Node.ELEMENT_NODE) {\n n = n[utils.SHADY_PREFIX + 'previousSibling'];\n }\n return n;\n } else {\n return this[utils.NATIVE_PREFIX + 'previousElementSibling'];\n }\n },\n\n /** @this {Element} */\n get nextElementSibling() {\n const nodeData = shadyDataForNode(this);\n if (nodeData && nodeData.nextSibling !== undefined) {\n let n = this[utils.SHADY_PREFIX + 'nextSibling'];\n while (n && n.nodeType !== Node.ELEMENT_NODE) {\n n = n[utils.SHADY_PREFIX + 'nextSibling'];\n }\n return n;\n } else {\n return this[utils.NATIVE_PREFIX + 'nextElementSibling'];\n }\n },\n\n /** @this {Element} */\n get slot() {\n return this.getAttribute('slot');\n },\n\n /** @this {Element} */\n set slot(value) {\n this[utils.SHADY_PREFIX + 'setAttribute']('slot', value);\n },\n\n // Note: Can be patched on element prototype on all browsers.\n // Must be patched on instance on browsers that support native Shadow DOM\n // but do not have builtin accessors (old Chrome).\n /** @this {Element} */\n get shadowRoot() {\n const nodeData = shadyDataForNode(this);\n return nodeData && nodeData.publicRoot || null;\n },\n\n /** @this {Element} */\n get className() {\n return this.getAttribute('class') || '';\n },\n\n /**\n * @this {Element}\n * @param {string} value\n */\n set className(value) {\n this[utils.SHADY_PREFIX + 'setAttribute']('class', value);\n },\n\n /**\n * @this {Element}\n * @param {string} attr\n * @param {string} value\n */\n setAttribute(attr, value) {\n if (this.ownerDocument !== doc) {\n this[utils.NATIVE_PREFIX + 'setAttribute'](attr, value);\n } else if (!scopeClassAttribute(this, attr, value)) {\n this[utils.NATIVE_PREFIX + 'setAttribute'](attr, value);\n distributeAttributeChange(this, attr);\n }\n },\n\n /**\n * @this {Element}\n * @param {string} attr\n */\n removeAttribute(attr) {\n this[utils.NATIVE_PREFIX + 'removeAttribute'](attr);\n distributeAttributeChange(this, attr);\n },\n\n /**\n * @this {Element}\n * @param {!{mode: string}} options\n */\n attachShadow(options) {\n return attachShadow(this, options);\n }\n\n});\n","/**\n@license\nCopyright (c) 2016 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\nThe complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\nThe complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\nCode distributed by Google as part of the polymer project is also\nsubject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n*/\n\nimport * as utils from '../utils.js';\nimport {eventPropertyNames} from '../patch-events.js';\nimport {shadyDataForNode, ensureShadyDataForNode} from '../shady-data.js';\n\nexport const HTMLElementPatches = utils.getOwnPropertyDescriptors({\n\n /** @this {HTMLElement} */\n blur() {\n const nodeData = shadyDataForNode(this);\n let root = nodeData && nodeData.root;\n let shadowActive = root && root.activeElement;\n if (shadowActive) {\n shadowActive[utils.SHADY_PREFIX + 'blur']();\n } else {\n this[utils.NATIVE_PREFIX + 'blur']();\n }\n }\n\n});\n\neventPropertyNames.forEach(property => {\n HTMLElementPatches[property] = {\n /** @this {HTMLElement} */\n set: function(fn) {\n const shadyData = ensureShadyDataForNode(this);\n const eventName = property.substring(2);\n shadyData.__onCallbackListeners[property] && this.removeEventListener(eventName, shadyData.__onCallbackListeners[property]);\n this[utils.SHADY_PREFIX + 'addEventListener'](eventName, fn);\n shadyData.__onCallbackListeners[property] = fn;\n },\n /** @this {HTMLElement} */\n get() {\n const shadyData = shadyDataForNode(this);\n return shadyData && shadyData.__onCallbackListeners[property];\n },\n configurable: true\n };\n});\n\n","/**\n@license\nCopyright (c) 2016 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\nThe complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\nThe complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\nCode distributed by Google as part of the polymer project is also\nsubject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n*/\n\nimport * as utils from '../utils.js';\nimport {shadyDataForNode} from '../shady-data.js';\n\nexport const SlotPatches = utils.getOwnPropertyDescriptors({\n\n /**\n * @this {HTMLSlotElement}\n * @param {Object=} options\n */\n assignedNodes(options) {\n if (this.localName === 'slot') {\n // Force any containing shadowRoot to flush so that distribution occurs\n // and this node has assignedNodes.\n const root = this[utils.SHADY_PREFIX + 'getRootNode']();\n if (root && utils.isShadyRoot(root)) {\n root._render();\n }\n const nodeData = shadyDataForNode(this);\n return nodeData ?\n ((options && options.flatten ? nodeData.flattenedNodes :\n nodeData.assignedNodes) || []) :\n [];\n }\n }\n\n});\n","/**\n@license\nCopyright (c) 2016 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\nThe complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\nThe complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\nCode distributed by Google as part of the polymer project is also\nsubject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n*/\n\nimport * as utils from '../utils.js';\n\nconst doc = window.document;\n\nexport const DocumentPatches = utils.getOwnPropertyDescriptors({\n\n // note: Though not technically correct, we fast path `importNode`\n // when called on a node not owned by the main document.\n // This allows, for example, elements that cannot\n // contain custom elements and are therefore not likely to contain shadowRoots\n // to cloned natively. This is a fairly significant performance win.\n /**\n * @this {Document}\n * @param {Node} node\n * @param {boolean} deep\n */\n importNode(node, deep) {\n // A template element normally has no children with shadowRoots, so make\n // sure we always make a deep copy to correctly construct the template.content\n if (node.ownerDocument !== doc || node.localName === 'template') {\n return this[utils.NATIVE_PREFIX + 'importNode'](node, deep);\n }\n let n = this[utils.NATIVE_PREFIX + 'importNode'](node, false);\n if (deep) {\n let c$ = node[utils.SHADY_PREFIX + 'childNodes'];\n for (let i=0, nc; i < c$.length; i++) {\n nc = this[utils.SHADY_PREFIX + 'importNode'](c$[i], true);\n n[utils.SHADY_PREFIX + 'appendChild'](nc);\n }\n }\n return n;\n }\n\n});","/**\n@license\nCopyright (c) 2016 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\nThe complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\nThe complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\nCode distributed by Google as part of the polymer project is also\nsubject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n*/\nimport * as utils from '../utils.js';\nimport {addEventListener, removeEventListener} from '../patch-events.js';\n\nexport const WindowPatches = utils.getOwnPropertyDescriptors({\n\n // NOTE: ensure these methods are bound to `window` so that `this` is correct\n // when called directly from global context without a receiver; e.g.\n // `addEventListener(...)`.\n addEventListener: addEventListener.bind(window),\n\n removeEventListener: removeEventListener.bind(window)\n\n});","/**\n@license\nCopyright (c) 2016 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\nThe complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\nThe complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\nCode distributed by Google as part of the polymer project is also\nsubject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n*/\n\nimport * as utils from './utils.js';\nimport {EventTargetPatches} from './patches/EventTarget.js';\nimport {NodePatches} from './patches/Node.js';\nimport {SlotablePatches} from './patches/Slotable.js';\nimport {ParentNodePatches, ParentNodeDocumentOrFragmentPatches} from './patches/ParentNode.js';\nimport {ElementPatches} from './patches/Element.js';\nimport {ElementOrShadowRootPatches} from './patches/ElementOrShadowRoot.js';\nimport {HTMLElementPatches} from './patches/HTMLElement.js';\nimport {SlotPatches} from './patches/Slot.js';\nimport {DocumentOrFragmentPatches} from './patches/DocumentOrFragment.js';\nimport {DocumentOrShadowRootPatches} from './patches/DocumentOrShadowRoot.js';\nimport {DocumentPatches} from './patches/Document.js';\nimport {WindowPatches} from './patches/Window.js';\n\n// Some browsers (IE/Edge) have non-standard HTMLElement accessors.\nconst NonStandardHTMLElement = {};\n\nif (Object.getOwnPropertyDescriptor(HTMLElement.prototype, 'parentElement')) {\n NonStandardHTMLElement.parentElement = NodePatches.parentElement;\n}\n\nif (Object.getOwnPropertyDescriptor(HTMLElement.prototype, 'contains')) {\n NonStandardHTMLElement.contains = NodePatches.contains;\n}\n\nif (Object.getOwnPropertyDescriptor(HTMLElement.prototype, 'children')) {\n NonStandardHTMLElement.children = ParentNodePatches.children;\n}\n\nif (Object.getOwnPropertyDescriptor(HTMLElement.prototype, 'innerHTML')) {\n NonStandardHTMLElement.innerHTML = ElementOrShadowRootPatches.innerHTML;\n}\n\nif (Object.getOwnPropertyDescriptor(HTMLElement.prototype, 'className')) {\n NonStandardHTMLElement.className = ElementPatches.className;\n}\n\n// Avoid patching `innerHTML` if it does not exist on Element (IE)\n// and we can patch accessors (hasDescriptors).\nconst ElementShouldHaveInnerHTML = !utils.settings.hasDescriptors || 'innerHTML' in Element.prototype;\n\n// setup patching\nconst patchMap = {\n EventTarget: [EventTargetPatches],\n Node: [NodePatches, !window.EventTarget ? EventTargetPatches : null],\n Text: [SlotablePatches],\n Element: [ElementPatches, ParentNodePatches, SlotablePatches,\n ElementShouldHaveInnerHTML ? ElementOrShadowRootPatches : null,\n !window.HTMLSlotElement ? SlotPatches : null],\n HTMLElement: [HTMLElementPatches, NonStandardHTMLElement],\n HTMLSlotElement: [SlotPatches],\n DocumentFragment: [ParentNodeDocumentOrFragmentPatches, DocumentOrFragmentPatches],\n Document: [DocumentPatches, ParentNodeDocumentOrFragmentPatches, DocumentOrFragmentPatches, DocumentOrShadowRootPatches],\n Window: [WindowPatches]\n}\n\nconst getPatchPrototype = (name) => window[name] && window[name].prototype;\n\n// Note, must avoid patching accessors on prototypes when descriptors are not correct\n// because the CustomElements polyfill checks if these exist before patching instances.\n// CustomElements polyfill *only* cares about these accessors.\nconst disallowedNativePatches = utils.settings.hasDescriptors ? null : ['innerHTML', 'textContent'];\n\n/** @param {string=} prefix */\nexport const applyPatches = (prefix) => {\n const disallowed = prefix ? null : disallowedNativePatches;\n for (let p in patchMap) {\n const proto = getPatchPrototype(p);\n patchMap[p].forEach(patch => proto && patch &&\n utils.patchProperties(proto, patch, prefix, disallowed));\n }\n}\n\nexport const addShadyPrefixedProperties = () => {\n // perform shady patches\n applyPatches(utils.SHADY_PREFIX);\n\n // install `_activeElement` because some browsers (older Chrome/Safari) do not have\n // a 'configurable' `activeElement` accesssor.\n const descriptor = DocumentOrShadowRootPatches.activeElement;\n Object.defineProperty(document, '_activeElement', descriptor);\n\n // On Window, we're patching `addEventListener` which is a weird auto-bound\n // property that is not directly on the Window prototype.\n utils.patchProperties(Window.prototype, WindowPatches, utils.SHADY_PREFIX);\n};\n","/**\n@license\nCopyright (c) 2016 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\nThe complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\nThe complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\nCode distributed by Google as part of the polymer project is also\nsubject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n*/\n\n/**\n * Patches elements that interacts with ShadyDOM\n * such that tree traversal and mutation apis act like they would under\n * ShadowDOM.\n *\n * This import enables seemless interaction with ShadyDOM powered\n * custom elements, enabling better interoperation with 3rd party code,\n * libraries, and frameworks that use DOM tree manipulation apis.\n */\n\nimport * as utils from './utils.js';\nimport {flush, enqueue} from './flush.js';\nimport {observeChildren, unobserveChildren, filterMutations} from './observe-changes.js';\nimport {addNativePrefixedProperties, nativeMethods, nativeTree} from './patch-native.js';\nimport {patchInsideElementAccessors, patchOutsideElementAccessors} from './patch-instances.js';\nimport {patchEvents, patchClick, composedPath} from './patch-events.js';\nimport {ShadyRoot} from './attach-shadow.js';\nimport {wrap, Wrapper} from './wrapper.js';\nimport {addShadyPrefixedProperties, applyPatches} from './patch-prototypes.js';\n\nif (utils.settings.inUse) {\n let ShadyDOM = {\n // TODO(sorvell): remove when Polymer does not depend on this.\n 'inUse': utils.settings.inUse,\n // NOTE: old browsers without prototype accessors (very old Chrome\n // and Safari) need manually patched accessors to properly set\n // `innerHTML` and `textContent` when an element is:\n // (1) inside a shadowRoot\n // (2) does not have special (slot) children itself\n // (3) and setting the property needs to provoke distribution (because\n // a nested slot is added/removed)\n 'patch': (node) => {\n patchInsideElementAccessors(node);\n patchOutsideElementAccessors(node);\n return node;\n },\n 'isShadyRoot': utils.isShadyRoot,\n 'enqueue': enqueue,\n 'flush': flush,\n 'flushInitial': (root) => {\n root._flushInitial();\n },\n 'settings': utils.settings,\n 'filterMutations': filterMutations,\n 'observeChildren': observeChildren,\n 'unobserveChildren': unobserveChildren,\n // Set to true to defer native custom elements connection until the\n // document has fully parsed. This enables custom elements that create\n // shadowRoots to be defined while the document is loading. Elements\n // customized as they are created by the parser will successfully\n // render with this flag on.\n 'deferConnectionCallbacks': utils.settings['deferConnectionCallbacks'],\n // Set to true to speed up the polyfill slightly at the cost of correctness\n // * does not patch querySelector/All on Document or DocumentFragment\n // * does not wrap connected/disconnected callbacks to de-dup these\n // when using native customElements\n // * does not wait to process children of elements with shadowRoots\n // meaning shadowRoots should not be created while an element is parsing\n // (e.g. if a custom element that creates a shadowRoot is defined before\n // a candidate element in the document below it.\n 'preferPerformance': utils.settings['preferPerformance'],\n // Integration point with ShadyCSS to disable styling MutationObserver,\n // as ShadyDOM will now handle dynamic scoping.\n 'handlesDynamicScoping': true,\n 'wrap': utils.settings.noPatch ? wrap : (n) => n,\n 'Wrapper': Wrapper,\n 'composedPath': composedPath,\n // Set to true to avoid patching regular platform property names. When set,\n // Shadow DOM compatible behavior is only available when accessing DOM\n // API using `ShadyDOM.wrap`, e.g. `ShadyDOM.wrap(element).shadowRoot`.\n // This setting provides a small performance boost, but requires all DOM API\n // access that requires Shadow DOM behavior to be proxied via `ShadyDOM.wrap`.\n 'noPatch': utils.settings.noPatch,\n 'nativeMethods': nativeMethods,\n 'nativeTree': nativeTree\n };\n\n window['ShadyDOM'] = ShadyDOM;\n\n // Modifies native prototypes for Node, Element, etc. to\n // make native platform behavior available at prefixed names, e.g.\n // `utils.NATIVE_PREFIX + 'firstChild'` or `__shady_native_firstChild`.\n // This allows the standard names to be safely patched while retaining the\n // ability for native behavior to be used. This polyfill manipulates DOM\n // by using this saved native behavior.\n // Note, some browsers do not have proper element descriptors for\n // accessors; in this case, native behavior for these accessors is simulated\n // via a TreeWalker.\n addNativePrefixedProperties();\n\n // Modifies native prototypes for Node, Element, etc. to make ShadowDOM\n // behavior available at prefixed names, e.g.\n // `utils.SHADY_PREFIX + 'firstChild` or `__shady_firstChild`. This is done\n // so this polyfill can perform Shadow DOM style DOM manipulation.\n // Because patching normal platform property names is optional, these prefixed\n // names are used internally.\n addShadyPrefixedProperties();\n\n // Modifies native prototypes for Node, Element, etc. to patch\n // regular platform property names to have Shadow DOM compatible API behavior.\n // This applies the utils.SHADY_PREFIX behavior to normal names. For example,\n // if `noPatch` is not set, then `el.__shady_firstChild` is equivalent to\n // `el.firstChild`.\n // NOTE, on older browsers (old Chrome/Safari) native accessors cannot be\n // patched on prototypes (e.g. Node.prototype.firstChild cannot be modified).\n // On these browsers, instance level patching is performed where needed; this\n // instance patching is only done when `noPatch` is *not* set.\n if (!utils.settings.noPatch) {\n applyPatches();\n // Patch click event behavior only if we're patching\n patchClick()\n }\n\n // For simplicity, patch events unconditionally.\n // Patches the event system to have Shadow DOM compatible behavior (e.g.\n // event retargeting). When `noPatch` is set, retargeting is only available\n // when adding event listeners and dispatching events via `ShadyDOM.wrap`\n // (e.g. `ShadyDOM.wrap(element).addEventListener(...)`).\n patchEvents();\n\n window.ShadowRoot = /** @type {function(new:ShadowRoot)} */(ShadyRoot);\n}\n","const reservedTagList = new Set([\n 'annotation-xml',\n 'color-profile',\n 'font-face',\n 'font-face-src',\n 'font-face-uri',\n 'font-face-format',\n 'font-face-name',\n 'missing-glyph',\n]);\n\n/**\n * @param {string} localName\n * @returns {boolean}\n */\nexport function isValidCustomElementName(localName) {\n const reserved = reservedTagList.has(localName);\n const validForm = /^[a-z][.0-9_a-z]*-[\\-.0-9_a-z]*$/.test(localName);\n return !reserved && validForm;\n}\n\n/**\n * @private\n * @param {!Node} node\n * @return {boolean}\n */\nexport function isConnected(node) {\n // Use `Node#isConnected`, if defined.\n const nativeValue = node.isConnected;\n if (nativeValue !== undefined) {\n return nativeValue;\n }\n\n /** @type {?Node|undefined} */\n let current = node;\n while (current && !(current.__CE_isImportDocument || current instanceof Document)) {\n current = current.parentNode || (window.ShadowRoot && current instanceof ShadowRoot ? current.host : undefined);\n }\n return !!(current && (current.__CE_isImportDocument || current instanceof Document));\n}\n\n/**\n * @param {!Node} root\n * @param {!Node} start\n * @return {?Node}\n */\nfunction nextSiblingOrAncestorSibling(root, start) {\n let node = start;\n while (node && node !== root && !node.nextSibling) {\n node = node.parentNode;\n }\n return (!node || node === root) ? null : node.nextSibling;\n}\n\n/**\n * @param {!Node} root\n * @param {!Node} start\n * @return {?Node}\n */\nfunction nextNode(root, start) {\n return start.firstChild ? start.firstChild : nextSiblingOrAncestorSibling(root, start);\n}\n\n/**\n * @param {!Node} root\n * @param {!function(!Element)} callback\n * @param {!Set=} visitedImports\n */\nexport function walkDeepDescendantElements(root, callback, visitedImports = new Set()) {\n let node = root;\n while (node) {\n if (node.nodeType === Node.ELEMENT_NODE) {\n const element = /** @type {!Element} */(node);\n\n callback(element);\n\n const localName = element.localName;\n if (localName === 'link' && element.getAttribute('rel') === 'import') {\n // If this import (polyfilled or not) has it's root node available,\n // walk it.\n const importNode = /** @type {!Node} */ (element.import);\n if (importNode instanceof Node && !visitedImports.has(importNode)) {\n // Prevent multiple walks of the same import root.\n visitedImports.add(importNode);\n\n for (let child = importNode.firstChild; child; child = child.nextSibling) {\n walkDeepDescendantElements(child, callback, visitedImports);\n }\n }\n\n // Ignore descendants of import links to prevent attempting to walk the\n // elements created by the HTML Imports polyfill that we just walked\n // above.\n node = nextSiblingOrAncestorSibling(root, element);\n continue;\n } else if (localName === 'template') {\n // Ignore descendants of templates. There shouldn't be any descendants\n // because they will be moved into `.content` during construction in\n // browsers that support template but, in case they exist and are still\n // waiting to be moved by a polyfill, they will be ignored.\n node = nextSiblingOrAncestorSibling(root, element);\n continue;\n }\n\n // Walk shadow roots.\n const shadowRoot = element.__CE_shadowRoot;\n if (shadowRoot) {\n for (let child = shadowRoot.firstChild; child; child = child.nextSibling) {\n walkDeepDescendantElements(child, callback, visitedImports);\n }\n }\n }\n\n node = nextNode(root, node);\n }\n}\n\n/**\n * Used to suppress Closure's \"Modifying the prototype is only allowed if the\n * constructor is in the same scope\" warning without using\n * `@suppress {newCheckTypes, duplicate}` because `newCheckTypes` is too broad.\n *\n * @param {!Object} destination\n * @param {string} name\n * @param {*} value\n */\nexport function setPropertyUnchecked(destination, name, value) {\n destination[name] = value;\n}\n","import * as Utilities from './Utilities.js';\nimport CEState from './CustomElementState.js';\n\nexport default class CustomElementInternals {\n constructor() {\n /** @type {!Map} */\n this._localNameToDefinition = new Map();\n\n /** @type {!Map} */\n this._constructorToDefinition = new Map();\n\n /** @type {!Array} */\n this._patches = [];\n\n /** @type {boolean} */\n this._hasPatches = false;\n }\n\n /**\n * @param {string} localName\n * @param {!CustomElementDefinition} definition\n */\n setDefinition(localName, definition) {\n this._localNameToDefinition.set(localName, definition);\n this._constructorToDefinition.set(definition.constructorFunction, definition);\n }\n\n /**\n * @param {string} localName\n * @return {!CustomElementDefinition|undefined}\n */\n localNameToDefinition(localName) {\n return this._localNameToDefinition.get(localName);\n }\n\n /**\n * @param {!Function} constructor\n * @return {!CustomElementDefinition|undefined}\n */\n constructorToDefinition(constructor) {\n return this._constructorToDefinition.get(constructor);\n }\n\n /**\n * @param {!function(!Node)} listener\n */\n addPatch(listener) {\n this._hasPatches = true;\n this._patches.push(listener);\n }\n\n /**\n * @param {!Node} node\n */\n patchTree(node) {\n if (!this._hasPatches) return;\n\n Utilities.walkDeepDescendantElements(node, element => this.patch(element));\n }\n\n /**\n * @param {!Node} node\n */\n patch(node) {\n if (!this._hasPatches) return;\n\n if (node.__CE_patched) return;\n node.__CE_patched = true;\n\n for (let i = 0; i < this._patches.length; i++) {\n this._patches[i](node);\n }\n }\n\n /**\n * @param {!Node} root\n */\n connectTree(root) {\n const elements = [];\n\n Utilities.walkDeepDescendantElements(root, element => elements.push(element));\n\n for (let i = 0; i < elements.length; i++) {\n const element = elements[i];\n if (element.__CE_state === CEState.custom) {\n this.connectedCallback(element);\n } else {\n this.upgradeElement(element);\n }\n }\n }\n\n /**\n * @param {!Node} root\n */\n disconnectTree(root) {\n const elements = [];\n\n Utilities.walkDeepDescendantElements(root, element => elements.push(element));\n\n for (let i = 0; i < elements.length; i++) {\n const element = elements[i];\n if (element.__CE_state === CEState.custom) {\n this.disconnectedCallback(element);\n }\n }\n }\n\n /**\n * Upgrades all uncustomized custom elements at and below a root node for\n * which there is a definition. When custom element reaction callbacks are\n * assumed to be called synchronously (which, by the current DOM / HTML spec\n * definitions, they are *not*), callbacks for both elements customized\n * synchronously by the parser and elements being upgraded occur in the same\n * relative order.\n *\n * NOTE: This function, when used to simulate the construction of a tree that\n * is already created but not customized (i.e. by the parser), does *not*\n * prevent the element from reading the 'final' (true) state of the tree. For\n * example, the element, during truly synchronous parsing / construction would\n * see that it contains no children as they have not yet been inserted.\n * However, this function does not modify the tree, the element will\n * (incorrectly) have children. Additionally, self-modification restrictions\n * for custom element constructors imposed by the DOM spec are *not* enforced.\n *\n *\n * The following nested list shows the steps extending down from the HTML\n * spec's parsing section that cause elements to be synchronously created and\n * upgraded:\n *\n * The \"in body\" insertion mode:\n * https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inbody\n * - Switch on token:\n * .. other cases ..\n * -> Any other start tag\n * - [Insert an HTML element](below) for the token.\n *\n * Insert an HTML element:\n * https://html.spec.whatwg.org/multipage/syntax.html#insert-an-html-element\n * - Insert a foreign element for the token in the HTML namespace:\n * https://html.spec.whatwg.org/multipage/syntax.html#insert-a-foreign-element\n * - Create an element for a token:\n * https://html.spec.whatwg.org/multipage/syntax.html#create-an-element-for-the-token\n * - Will execute script flag is true?\n * - (Element queue pushed to the custom element reactions stack.)\n * - Create an element:\n * https://dom.spec.whatwg.org/#concept-create-element\n * - Sync CE flag is true?\n * - Constructor called.\n * - Self-modification restrictions enforced.\n * - Sync CE flag is false?\n * - (Upgrade reaction enqueued.)\n * - Attributes appended to element.\n * (`attributeChangedCallback` reactions enqueued.)\n * - Will execute script flag is true?\n * - (Element queue popped from the custom element reactions stack.\n * Reactions in the popped stack are invoked.)\n * - (Element queue pushed to the custom element reactions stack.)\n * - Insert the element:\n * https://dom.spec.whatwg.org/#concept-node-insert\n * - Shadow-including descendants are connected. During parsing\n * construction, there are no shadow-*excluding* descendants.\n * However, the constructor may have validly attached a shadow\n * tree to itself and added descendants to that shadow tree.\n * (`connectedCallback` reactions enqueued.)\n * - (Element queue popped from the custom element reactions stack.\n * Reactions in the popped stack are invoked.)\n *\n * @param {!Node} root\n * @param {{\n * visitedImports: (!Set|undefined),\n * upgrade: (!function(!Element)|undefined),\n * }=} options\n */\n patchAndUpgradeTree(root, options = {}) {\n const visitedImports = options.visitedImports || new Set();\n const upgrade = options.upgrade || (element => this.upgradeElement(element));\n\n const elements = [];\n\n const gatherElements = element => {\n if (element.localName === 'link' && element.getAttribute('rel') === 'import') {\n // The HTML Imports polyfill sets a descendant element of the link to\n // the `import` property, specifically this is *not* a Document.\n const importNode = /** @type {?Node} */ (element.import);\n\n if (importNode instanceof Node) {\n importNode.__CE_isImportDocument = true;\n // Connected links are associated with the registry.\n importNode.__CE_hasRegistry = true;\n }\n\n if (importNode && importNode.readyState === 'complete') {\n importNode.__CE_documentLoadHandled = true;\n } else {\n // If this link's import root is not available, its contents can't be\n // walked. Wait for 'load' and walk it when it's ready.\n element.addEventListener('load', () => {\n const importNode = /** @type {!Node} */ (element.import);\n\n if (importNode.__CE_documentLoadHandled) return;\n importNode.__CE_documentLoadHandled = true;\n\n // Clone the `visitedImports` set that was populated sync during\n // the `patchAndUpgradeTree` call that caused this 'load' handler to\n // be added. Then, remove *this* link's import node so that we can\n // walk that import again, even if it was partially walked later\n // during the same `patchAndUpgradeTree` call.\n const clonedVisitedImports = new Set(visitedImports);\n clonedVisitedImports.delete(importNode);\n\n this.patchAndUpgradeTree(importNode, {visitedImports: clonedVisitedImports, upgrade});\n });\n }\n } else {\n elements.push(element);\n }\n };\n\n // `walkDeepDescendantElements` populates (and internally checks against)\n // `visitedImports` when traversing a loaded import.\n Utilities.walkDeepDescendantElements(root, gatherElements, visitedImports);\n\n if (this._hasPatches) {\n for (let i = 0; i < elements.length; i++) {\n this.patch(elements[i]);\n }\n }\n\n for (let i = 0; i < elements.length; i++) {\n upgrade(elements[i]);\n }\n }\n\n /**\n * @param {!HTMLElement} element\n */\n upgradeElement(element) {\n const currentState = element.__CE_state;\n if (currentState !== undefined) return;\n\n // Prevent elements created in documents without a browsing context from\n // upgrading.\n //\n // https://html.spec.whatwg.org/multipage/custom-elements.html#look-up-a-custom-element-definition\n // \"If document does not have a browsing context, return null.\"\n //\n // https://html.spec.whatwg.org/multipage/window-object.html#dom-document-defaultview\n // \"The defaultView IDL attribute of the Document interface, on getting,\n // must return this Document's browsing context's WindowProxy object, if\n // this Document has an associated browsing context, or null otherwise.\"\n const ownerDocument = element.ownerDocument;\n if (\n !ownerDocument.defaultView &&\n !(ownerDocument.__CE_isImportDocument && ownerDocument.__CE_hasRegistry)\n ) return;\n\n const definition = this.localNameToDefinition(element.localName);\n if (!definition) return;\n\n definition.constructionStack.push(element);\n\n const constructor = definition.constructorFunction;\n try {\n try {\n let result = new (constructor)();\n if (result !== element) {\n throw new Error('The custom element constructor did not produce the element being upgraded.');\n }\n } finally {\n definition.constructionStack.pop();\n }\n } catch (e) {\n element.__CE_state = CEState.failed;\n throw e;\n }\n\n element.__CE_state = CEState.custom;\n element.__CE_definition = definition;\n\n if (definition.attributeChangedCallback) {\n const observedAttributes = definition.observedAttributes;\n for (let i = 0; i < observedAttributes.length; i++) {\n const name = observedAttributes[i];\n const value = element.getAttribute(name);\n if (value !== null) {\n this.attributeChangedCallback(element, name, null, value, null);\n }\n }\n }\n\n if (Utilities.isConnected(element)) {\n this.connectedCallback(element);\n }\n }\n\n /**\n * @param {!Element} element\n */\n connectedCallback(element) {\n const definition = element.__CE_definition;\n if (definition.connectedCallback) {\n definition.connectedCallback.call(element);\n }\n }\n\n /**\n * @param {!Element} element\n */\n disconnectedCallback(element) {\n const definition = element.__CE_definition;\n if (definition.disconnectedCallback) {\n definition.disconnectedCallback.call(element);\n }\n }\n\n /**\n * @param {!Element} element\n * @param {string} name\n * @param {?string} oldValue\n * @param {?string} newValue\n * @param {?string} namespace\n */\n attributeChangedCallback(element, name, oldValue, newValue, namespace) {\n const definition = element.__CE_definition;\n if (\n definition.attributeChangedCallback &&\n definition.observedAttributes.indexOf(name) > -1\n ) {\n definition.attributeChangedCallback.call(element, name, oldValue, newValue, namespace);\n }\n }\n}\n","/**\n * @enum {number}\n */\nconst CustomElementState = {\n custom: 1,\n failed: 2,\n};\n\nexport default CustomElementState;\n","import CustomElementInternals from './CustomElementInternals.js';\n\nexport default class DocumentConstructionObserver {\n constructor(internals, doc) {\n /**\n * @type {!CustomElementInternals}\n */\n this._internals = internals;\n\n /**\n * @type {!Document}\n */\n this._document = doc;\n\n /**\n * @type {MutationObserver|undefined}\n */\n this._observer = undefined;\n\n\n // Simulate tree construction for all currently accessible nodes in the\n // document.\n this._internals.patchAndUpgradeTree(this._document);\n\n if (this._document.readyState === 'loading') {\n this._observer = new MutationObserver(this._handleMutations.bind(this));\n\n // Nodes created by the parser are given to the observer *before* the next\n // task runs. Inline scripts are run in a new task. This means that the\n // observer will be able to handle the newly parsed nodes before the inline\n // script is run.\n this._observer.observe(this._document, {\n childList: true,\n subtree: true,\n });\n }\n }\n\n disconnect() {\n if (this._observer) {\n this._observer.disconnect();\n }\n }\n\n /**\n * @param {!Array} mutations\n */\n _handleMutations(mutations) {\n // Once the document's `readyState` is 'interactive' or 'complete', all new\n // nodes created within that document will be the result of script and\n // should be handled by patching.\n const readyState = this._document.readyState;\n if (readyState === 'interactive' || readyState === 'complete') {\n this.disconnect();\n }\n\n for (let i = 0; i < mutations.length; i++) {\n const addedNodes = mutations[i].addedNodes;\n for (let j = 0; j < addedNodes.length; j++) {\n const node = addedNodes[j];\n this._internals.patchAndUpgradeTree(node);\n }\n }\n }\n}\n","import CustomElementInternals from './CustomElementInternals.js';\nimport DocumentConstructionObserver from './DocumentConstructionObserver.js';\nimport Deferred from './Deferred.js';\nimport * as Utilities from './Utilities.js';\n\n/**\n * @unrestricted\n */\nexport default class CustomElementRegistry {\n\n /**\n * @param {!CustomElementInternals} internals\n */\n constructor(internals) {\n /**\n * @private\n * @type {boolean}\n */\n this._elementDefinitionIsRunning = false;\n\n /**\n * @private\n * @type {!CustomElementInternals}\n */\n this._internals = internals;\n\n /**\n * @private\n * @type {!Map>}\n */\n this._whenDefinedDeferred = new Map();\n\n /**\n * The default flush callback triggers the document walk synchronously.\n * @private\n * @type {!Function}\n */\n this._flushCallback = fn => fn();\n\n /**\n * @private\n * @type {boolean}\n */\n this._flushPending = false;\n\n /**\n * @private\n * @type {!Array}\n */\n this._pendingDefinitions = [];\n\n /**\n * @private\n * @type {!DocumentConstructionObserver}\n */\n this._documentConstructionObserver = new DocumentConstructionObserver(internals, document);\n }\n\n /**\n * @param {string} localName\n * @param {!Function} constructor\n */\n define(localName, constructor) {\n if (!(constructor instanceof Function)) {\n throw new TypeError('Custom element constructors must be functions.');\n }\n\n if (!Utilities.isValidCustomElementName(localName)) {\n throw new SyntaxError(`The element name '${localName}' is not valid.`);\n }\n\n if (this._internals.localNameToDefinition(localName)) {\n throw new Error(`A custom element with name '${localName}' has already been defined.`);\n }\n\n if (this._elementDefinitionIsRunning) {\n throw new Error('A custom element is already being defined.');\n }\n this._elementDefinitionIsRunning = true;\n\n let connectedCallback;\n let disconnectedCallback;\n let adoptedCallback;\n let attributeChangedCallback;\n let observedAttributes;\n try {\n /** @type {!Object} */\n const prototype = constructor.prototype;\n if (!(prototype instanceof Object)) {\n throw new TypeError('The custom element constructor\\'s prototype is not an object.');\n }\n\n function getCallback(name) {\n const callbackValue = prototype[name];\n if (callbackValue !== undefined && !(callbackValue instanceof Function)) {\n throw new Error(`The '${name}' callback must be a function.`);\n }\n return callbackValue;\n }\n\n connectedCallback = getCallback('connectedCallback');\n disconnectedCallback = getCallback('disconnectedCallback');\n adoptedCallback = getCallback('adoptedCallback');\n attributeChangedCallback = getCallback('attributeChangedCallback');\n observedAttributes = constructor['observedAttributes'] || [];\n } catch (e) {\n return;\n } finally {\n this._elementDefinitionIsRunning = false;\n }\n\n const definition = {\n localName,\n constructorFunction: constructor,\n connectedCallback,\n disconnectedCallback,\n adoptedCallback,\n attributeChangedCallback,\n observedAttributes,\n constructionStack: [],\n };\n\n this._internals.setDefinition(localName, definition);\n this._pendingDefinitions.push(definition);\n\n // If we've already called the flush callback and it hasn't called back yet,\n // don't call it again.\n if (!this._flushPending) {\n this._flushPending = true;\n this._flushCallback(() => this._flush());\n }\n }\n\n upgrade(element) {\n this._internals.patchAndUpgradeTree(element);\n }\n\n _flush() {\n // If no new definitions were defined, don't attempt to flush. This could\n // happen if a flush callback keeps the function it is given and calls it\n // multiple times.\n if (this._flushPending === false) return;\n this._flushPending = false;\n\n const pendingDefinitions = this._pendingDefinitions;\n\n /**\n * Unupgraded elements with definitions that were defined *before* the last\n * flush, in document order.\n * @type {!Array}\n */\n const elementsWithStableDefinitions = [];\n\n /**\n * A map from `localName`s of definitions that were defined *after* the last\n * flush to unupgraded elements matching that definition, in document order.\n * @type {!Map>}\n */\n const elementsWithPendingDefinitions = new Map();\n for (let i = 0; i < pendingDefinitions.length; i++) {\n elementsWithPendingDefinitions.set(pendingDefinitions[i].localName, []);\n }\n\n this._internals.patchAndUpgradeTree(document, {\n upgrade: element => {\n // Ignore the element if it has already upgraded or failed to upgrade.\n if (element.__CE_state !== undefined) return;\n\n const localName = element.localName;\n\n // If there is an applicable pending definition for the element, add the\n // element to the list of elements to be upgraded with that definition.\n const pendingElements = elementsWithPendingDefinitions.get(localName);\n if (pendingElements) {\n pendingElements.push(element);\n // If there is *any other* applicable definition for the element, add it\n // to the list of elements with stable definitions that need to be upgraded.\n } else if (this._internals.localNameToDefinition(localName)) {\n elementsWithStableDefinitions.push(element);\n }\n },\n });\n\n // Upgrade elements with 'stable' definitions first.\n for (let i = 0; i < elementsWithStableDefinitions.length; i++) {\n this._internals.upgradeElement(elementsWithStableDefinitions[i]);\n }\n\n // Upgrade elements with 'pending' definitions in the order they were defined.\n while (pendingDefinitions.length > 0) {\n const definition = pendingDefinitions.shift();\n const localName = definition.localName;\n\n // Attempt to upgrade all applicable elements.\n const pendingUpgradableElements = elementsWithPendingDefinitions.get(definition.localName);\n for (let i = 0; i < pendingUpgradableElements.length; i++) {\n this._internals.upgradeElement(pendingUpgradableElements[i]);\n }\n\n // Resolve any promises created by `whenDefined` for the definition.\n const deferred = this._whenDefinedDeferred.get(localName);\n if (deferred) {\n deferred.resolve(undefined);\n }\n }\n }\n\n /**\n * @param {string} localName\n * @return {Function|undefined}\n */\n get(localName) {\n const definition = this._internals.localNameToDefinition(localName);\n if (definition) {\n return definition.constructorFunction;\n }\n\n return undefined;\n }\n\n /**\n * @param {string} localName\n * @return {!Promise}\n */\n whenDefined(localName) {\n if (!Utilities.isValidCustomElementName(localName)) {\n return Promise.reject(new SyntaxError(`'${localName}' is not a valid custom element name.`));\n }\n\n const prior = this._whenDefinedDeferred.get(localName);\n if (prior) {\n return prior.toPromise();\n }\n\n const deferred = new Deferred();\n this._whenDefinedDeferred.set(localName, deferred);\n\n const definition = this._internals.localNameToDefinition(localName);\n // Resolve immediately only if the given local name has a definition *and*\n // the full document walk to upgrade elements with that local name has\n // already happened.\n if (definition && !this._pendingDefinitions.some(d => d.localName === localName)) {\n deferred.resolve(undefined);\n }\n\n return deferred.toPromise();\n }\n\n polyfillWrapFlushCallback(outer) {\n this._documentConstructionObserver.disconnect();\n const inner = this._flushCallback;\n this._flushCallback = flush => outer(() => inner(flush));\n }\n}\n\n// Closure compiler exports.\nwindow['CustomElementRegistry'] = CustomElementRegistry;\nCustomElementRegistry.prototype['define'] = CustomElementRegistry.prototype.define;\nCustomElementRegistry.prototype['upgrade'] = CustomElementRegistry.prototype.upgrade;\nCustomElementRegistry.prototype['get'] = CustomElementRegistry.prototype.get;\nCustomElementRegistry.prototype['whenDefined'] = CustomElementRegistry.prototype.whenDefined;\nCustomElementRegistry.prototype['polyfillWrapFlushCallback'] = CustomElementRegistry.prototype.polyfillWrapFlushCallback;\n","/**\n * @template T\n */\nexport default class Deferred {\n constructor() {\n /**\n * @private\n * @type {T|undefined}\n */\n this._value = undefined;\n\n /**\n * @private\n * @type {Function|undefined}\n */\n this._resolve = undefined;\n\n /**\n * @private\n * @type {!Promise}\n */\n this._promise = new Promise(resolve => {\n this._resolve = resolve;\n\n if (this._value) {\n resolve(this._value);\n }\n });\n }\n\n /**\n * @param {T} value\n */\n resolve(value) {\n if (this._value) {\n throw new Error('Already resolved.');\n }\n\n this._value = value;\n\n if (this._resolve) {\n this._resolve(value);\n }\n }\n\n /**\n * @return {!Promise}\n */\n toPromise() {\n return this._promise;\n }\n}\n","export default {\n Document_createElement: window.Document.prototype.createElement,\n Document_createElementNS: window.Document.prototype.createElementNS,\n Document_importNode: window.Document.prototype.importNode,\n Document_prepend: window.Document.prototype['prepend'],\n Document_append: window.Document.prototype['append'],\n DocumentFragment_prepend: window.DocumentFragment.prototype['prepend'],\n DocumentFragment_append: window.DocumentFragment.prototype['append'],\n Node_cloneNode: window.Node.prototype.cloneNode,\n Node_appendChild: window.Node.prototype.appendChild,\n Node_insertBefore: window.Node.prototype.insertBefore,\n Node_removeChild: window.Node.prototype.removeChild,\n Node_replaceChild: window.Node.prototype.replaceChild,\n Node_textContent: Object.getOwnPropertyDescriptor(window.Node.prototype, 'textContent'),\n Element_attachShadow: window.Element.prototype['attachShadow'],\n Element_innerHTML: Object.getOwnPropertyDescriptor(window.Element.prototype, 'innerHTML'),\n Element_getAttribute: window.Element.prototype.getAttribute,\n Element_setAttribute: window.Element.prototype.setAttribute,\n Element_removeAttribute: window.Element.prototype.removeAttribute,\n Element_getAttributeNS: window.Element.prototype.getAttributeNS,\n Element_setAttributeNS: window.Element.prototype.setAttributeNS,\n Element_removeAttributeNS: window.Element.prototype.removeAttributeNS,\n Element_insertAdjacentElement: window.Element.prototype['insertAdjacentElement'],\n Element_insertAdjacentHTML: window.Element.prototype['insertAdjacentHTML'],\n Element_prepend: window.Element.prototype['prepend'],\n Element_append: window.Element.prototype['append'],\n Element_before: window.Element.prototype['before'],\n Element_after: window.Element.prototype['after'],\n Element_replaceWith: window.Element.prototype['replaceWith'],\n Element_remove: window.Element.prototype['remove'],\n HTMLElement: window.HTMLElement,\n HTMLElement_innerHTML: Object.getOwnPropertyDescriptor(window.HTMLElement.prototype, 'innerHTML'),\n HTMLElement_insertAdjacentElement: window.HTMLElement.prototype['insertAdjacentElement'],\n HTMLElement_insertAdjacentHTML: window.HTMLElement.prototype['insertAdjacentHTML'],\n};\n","/**\n * This class exists only to work around Closure's lack of a way to describe\n * singletons. It represents the 'already constructed marker' used in custom\n * element construction stacks.\n *\n * https://html.spec.whatwg.org/#concept-already-constructed-marker\n * @extends AlreadyConstructedMarkerType\n */\nclass AlreadyConstructedMarker {}\n\nexport default new AlreadyConstructedMarker();\n","import Native from './Native.js';\nimport CustomElementInternals from '../CustomElementInternals.js';\nimport CEState from '../CustomElementState.js';\nimport AlreadyConstructedMarker from '../AlreadyConstructedMarker.js';\n\n/**\n * @param {!CustomElementInternals} internals\n */\nexport default function(internals) {\n window['HTMLElement'] = (function() {\n /**\n * @type {function(new: HTMLElement): !HTMLElement}\n */\n function HTMLElement() {\n // This should really be `new.target` but `new.target` can't be emulated\n // in ES5. Assuming the user keeps the default value of the constructor's\n // prototype's `constructor` property, this is equivalent.\n const constructor = /** @type {!Function} */ (this.constructor);\n\n const definition = internals.constructorToDefinition(constructor);\n if (!definition) {\n throw new Error('The custom element being constructed was not registered with `customElements`.');\n }\n\n const constructionStack = definition.constructionStack;\n\n if (constructionStack.length === 0) {\n const element = /** @type {!HTMLElement} */ (Native.Document_createElement.call(document, definition.localName));\n Object.setPrototypeOf(element, constructor.prototype);\n element.__CE_state = CEState.custom;\n element.__CE_definition = definition;\n internals.patch(element);\n return element;\n }\n\n const lastIndex = constructionStack.length - 1;\n const element = constructionStack[lastIndex];\n if (element === AlreadyConstructedMarker) {\n throw new Error('The HTMLElement constructor was either called reentrantly for this constructor or called multiple times.');\n }\n const toConstructElement = /** @type {!HTMLElement} */ (element);\n constructionStack[lastIndex] = AlreadyConstructedMarker;\n\n Object.setPrototypeOf(toConstructElement, constructor.prototype);\n internals.patch(toConstructElement);\n\n return toConstructElement;\n }\n\n HTMLElement.prototype = Native.HTMLElement.prototype;\n // Safari 9 has `writable: false` on the propertyDescriptor\n // Make it writable so that TypeScript can patch up the\n // constructor in the ES5 compiled code.\n Object.defineProperty(HTMLElement.prototype, 'constructor', {\n writable: true,\n configurable: true,\n enumerable: false,\n value: HTMLElement\n });\n\n return HTMLElement;\n })();\n};\n","/**\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\nimport CustomElementInternals from './CustomElementInternals.js';\nimport CustomElementRegistry from './CustomElementRegistry.js';\n\nimport PatchHTMLElement from './Patch/HTMLElement.js';\nimport PatchDocument from './Patch/Document.js';\nimport PatchDocumentFragment from './Patch/DocumentFragment.js';\nimport PatchNode from './Patch/Node.js';\nimport PatchElement from './Patch/Element.js';\n\nconst priorCustomElements = window['customElements'];\n\nif (!priorCustomElements ||\n priorCustomElements['forcePolyfill'] ||\n (typeof priorCustomElements['define'] != 'function') ||\n (typeof priorCustomElements['get'] != 'function')) {\n /** @type {!CustomElementInternals} */\n const internals = new CustomElementInternals();\n\n PatchHTMLElement(internals);\n PatchDocument(internals);\n PatchDocumentFragment(internals);\n PatchNode(internals);\n PatchElement(internals);\n\n // The main document is always associated with the registry.\n document.__CE_hasRegistry = true;\n\n /** @type {!CustomElementRegistry} */\n const customElements = new CustomElementRegistry(internals);\n\n Object.defineProperty(window, 'customElements', {\n configurable: true,\n enumerable: true,\n value: customElements,\n });\n}\n","import CustomElementInternals from '../../CustomElementInternals.js';\nimport * as Utilities from '../../Utilities.js';\n\n/**\n * @typedef {{\n * prepend: !function(...(!Node|string)),\n * append: !function(...(!Node|string)),\n * }}\n */\nlet ParentNodeNativeMethods;\n\n/**\n * @param {!CustomElementInternals} internals\n * @param {!Object} destination\n * @param {!ParentNodeNativeMethods} builtIn\n */\nexport default function(internals, destination, builtIn) {\n /**\n * @param {!function(...(!Node|string))} builtInMethod\n * @return {!function(...(!Node|string))}\n */\n function appendPrependPatch(builtInMethod) {\n return function(...nodes) {\n /**\n * A copy of `nodes`, with any DocumentFragment replaced by its children.\n * @type {!Array}\n */\n const flattenedNodes = [];\n\n /**\n * Elements in `nodes` that were connected before this call.\n * @type {!Array}\n */\n const connectedElements = [];\n\n for (var i = 0; i < nodes.length; i++) {\n const node = nodes[i];\n\n if (node instanceof Element && Utilities.isConnected(node)) {\n connectedElements.push(node);\n }\n\n if (node instanceof DocumentFragment) {\n for (let child = node.firstChild; child; child = child.nextSibling) {\n flattenedNodes.push(child);\n }\n } else {\n flattenedNodes.push(node);\n }\n }\n\n builtInMethod.apply(this, nodes);\n\n for (let i = 0; i < connectedElements.length; i++) {\n internals.disconnectTree(connectedElements[i]);\n }\n\n if (Utilities.isConnected(this)) {\n for (let i = 0; i < flattenedNodes.length; i++) {\n const node = flattenedNodes[i];\n if (node instanceof Element) {\n internals.connectTree(node);\n }\n }\n }\n };\n }\n\n if (builtIn.prepend !== undefined) {\n Utilities.setPropertyUnchecked(destination, 'prepend', appendPrependPatch(builtIn.prepend));\n }\n\n if (builtIn.append !== undefined) {\n Utilities.setPropertyUnchecked(destination, 'append', appendPrependPatch(builtIn.append));\n }\n};\n","import Native from './Native.js';\nimport CustomElementInternals from '../CustomElementInternals.js';\nimport * as Utilities from '../Utilities.js';\n\nimport PatchParentNode from './Interface/ParentNode.js';\n\n/**\n * @param {!CustomElementInternals} internals\n */\nexport default function(internals) {\n Utilities.setPropertyUnchecked(Document.prototype, 'createElement',\n /**\n * @this {Document}\n * @param {string} localName\n * @return {!Element}\n */\n function(localName) {\n // Only create custom elements if this document is associated with the registry.\n if (this.__CE_hasRegistry) {\n const definition = internals.localNameToDefinition(localName);\n if (definition) {\n return new (definition.constructorFunction)();\n }\n }\n\n const result = /** @type {!Element} */\n (Native.Document_createElement.call(this, localName));\n internals.patch(result);\n return result;\n });\n\n Utilities.setPropertyUnchecked(Document.prototype, 'importNode',\n /**\n * @this {Document}\n * @param {!Node} node\n * @param {boolean=} deep\n * @return {!Node}\n */\n function(node, deep) {\n const clone = /** @type {!Node} */ (Native.Document_importNode.call(this, node, !!deep));\n // Only create custom elements if this document is associated with the registry.\n if (!this.__CE_hasRegistry) {\n internals.patchTree(clone);\n } else {\n internals.patchAndUpgradeTree(clone);\n }\n return clone;\n });\n\n const NS_HTML = \"http://www.w3.org/1999/xhtml\";\n\n Utilities.setPropertyUnchecked(Document.prototype, 'createElementNS',\n /**\n * @this {Document}\n * @param {?string} namespace\n * @param {string} localName\n * @return {!Element}\n */\n function(namespace, localName) {\n // Only create custom elements if this document is associated with the registry.\n if (this.__CE_hasRegistry && (namespace === null || namespace === NS_HTML)) {\n const definition = internals.localNameToDefinition(localName);\n if (definition) {\n return new (definition.constructorFunction)();\n }\n }\n\n const result = /** @type {!Element} */\n (Native.Document_createElementNS.call(this, namespace, localName));\n internals.patch(result);\n return result;\n });\n\n PatchParentNode(internals, Document.prototype, {\n prepend: Native.Document_prepend,\n append: Native.Document_append,\n });\n};\n","import Native from './Native.js';\nimport CustomElementInternals from '../CustomElementInternals.js';\nimport * as Utilities from '../Utilities.js';\n\n/**\n * @param {!CustomElementInternals} internals\n */\nexport default function(internals) {\n // `Node#nodeValue` is implemented on `Attr`.\n // `Node#textContent` is implemented on `Attr`, `Element`.\n\n Utilities.setPropertyUnchecked(Node.prototype, 'insertBefore',\n /**\n * @this {Node}\n * @param {!Node} node\n * @param {?Node} refNode\n * @return {!Node}\n */\n function(node, refNode) {\n if (node instanceof DocumentFragment) {\n const insertedNodes = Array.prototype.slice.apply(node.childNodes);\n const nativeResult = Native.Node_insertBefore.call(this, node, refNode);\n\n // DocumentFragments can't be connected, so `disconnectTree` will never\n // need to be called on a DocumentFragment's children after inserting it.\n\n if (Utilities.isConnected(this)) {\n for (let i = 0; i < insertedNodes.length; i++) {\n internals.connectTree(insertedNodes[i]);\n }\n }\n\n return nativeResult;\n }\n\n const nodeWasConnected = Utilities.isConnected(node);\n const nativeResult = Native.Node_insertBefore.call(this, node, refNode);\n\n if (nodeWasConnected) {\n internals.disconnectTree(node);\n }\n\n if (Utilities.isConnected(this)) {\n internals.connectTree(node);\n }\n\n return nativeResult;\n });\n\n Utilities.setPropertyUnchecked(Node.prototype, 'appendChild',\n /**\n * @this {Node}\n * @param {!Node} node\n * @return {!Node}\n */\n function(node) {\n if (node instanceof DocumentFragment) {\n const insertedNodes = Array.prototype.slice.apply(node.childNodes);\n const nativeResult = Native.Node_appendChild.call(this, node);\n\n // DocumentFragments can't be connected, so `disconnectTree` will never\n // need to be called on a DocumentFragment's children after inserting it.\n\n if (Utilities.isConnected(this)) {\n for (let i = 0; i < insertedNodes.length; i++) {\n internals.connectTree(insertedNodes[i]);\n }\n }\n\n return nativeResult;\n }\n\n const nodeWasConnected = Utilities.isConnected(node);\n const nativeResult = Native.Node_appendChild.call(this, node);\n\n if (nodeWasConnected) {\n internals.disconnectTree(node);\n }\n\n if (Utilities.isConnected(this)) {\n internals.connectTree(node);\n }\n\n return nativeResult;\n });\n\n Utilities.setPropertyUnchecked(Node.prototype, 'cloneNode',\n /**\n * @this {Node}\n * @param {boolean=} deep\n * @return {!Node}\n */\n function(deep) {\n const clone = Native.Node_cloneNode.call(this, !!deep);\n // Only create custom elements if this element's owner document is\n // associated with the registry.\n if (!this.ownerDocument.__CE_hasRegistry) {\n internals.patchTree(clone);\n } else {\n internals.patchAndUpgradeTree(clone);\n }\n return clone;\n });\n\n Utilities.setPropertyUnchecked(Node.prototype, 'removeChild',\n /**\n * @this {Node}\n * @param {!Node} node\n * @return {!Node}\n */\n function(node) {\n const nodeWasConnected = Utilities.isConnected(node);\n const nativeResult = Native.Node_removeChild.call(this, node);\n\n if (nodeWasConnected) {\n internals.disconnectTree(node);\n }\n\n return nativeResult;\n });\n\n Utilities.setPropertyUnchecked(Node.prototype, 'replaceChild',\n /**\n * @this {Node}\n * @param {!Node} nodeToInsert\n * @param {!Node} nodeToRemove\n * @return {!Node}\n */\n function(nodeToInsert, nodeToRemove) {\n if (nodeToInsert instanceof DocumentFragment) {\n const insertedNodes = Array.prototype.slice.apply(nodeToInsert.childNodes);\n const nativeResult = Native.Node_replaceChild.call(this, nodeToInsert, nodeToRemove);\n\n // DocumentFragments can't be connected, so `disconnectTree` will never\n // need to be called on a DocumentFragment's children after inserting it.\n\n if (Utilities.isConnected(this)) {\n internals.disconnectTree(nodeToRemove);\n for (let i = 0; i < insertedNodes.length; i++) {\n internals.connectTree(insertedNodes[i]);\n }\n }\n\n return nativeResult;\n }\n\n const nodeToInsertWasConnected = Utilities.isConnected(nodeToInsert);\n const nativeResult = Native.Node_replaceChild.call(this, nodeToInsert, nodeToRemove);\n const thisIsConnected = Utilities.isConnected(this);\n\n if (thisIsConnected) {\n internals.disconnectTree(nodeToRemove);\n }\n\n if (nodeToInsertWasConnected) {\n internals.disconnectTree(nodeToInsert);\n }\n\n if (thisIsConnected) {\n internals.connectTree(nodeToInsert);\n }\n\n return nativeResult;\n });\n\n\n function patch_textContent(destination, baseDescriptor) {\n Object.defineProperty(destination, 'textContent', {\n enumerable: baseDescriptor.enumerable,\n configurable: true,\n get: baseDescriptor.get,\n set: /** @this {Node} */ function(assignedValue) {\n // If this is a text node then there are no nodes to disconnect.\n if (this.nodeType === Node.TEXT_NODE) {\n baseDescriptor.set.call(this, assignedValue);\n return;\n }\n\n let removedNodes = undefined;\n // Checking for `firstChild` is faster than reading `childNodes.length`\n // to compare with 0.\n if (this.firstChild) {\n // Using `childNodes` is faster than `children`, even though we only\n // care about elements.\n const childNodes = this.childNodes;\n const childNodesLength = childNodes.length;\n if (childNodesLength > 0 && Utilities.isConnected(this)) {\n // Copying an array by iterating is faster than using slice.\n removedNodes = new Array(childNodesLength);\n for (let i = 0; i < childNodesLength; i++) {\n removedNodes[i] = childNodes[i];\n }\n }\n }\n\n baseDescriptor.set.call(this, assignedValue);\n\n if (removedNodes) {\n for (let i = 0; i < removedNodes.length; i++) {\n internals.disconnectTree(removedNodes[i]);\n }\n }\n },\n });\n }\n\n if (Native.Node_textContent && Native.Node_textContent.get) {\n patch_textContent(Node.prototype, Native.Node_textContent);\n } else {\n internals.addPatch(function(element) {\n patch_textContent(element, {\n enumerable: true,\n configurable: true,\n // NOTE: This implementation of the `textContent` getter assumes that\n // text nodes' `textContent` getter will not be patched.\n get: /** @this {Node} */ function() {\n /** @type {!Array} */\n const parts = [];\n\n for (let i = 0; i < this.childNodes.length; i++) {\n parts.push(this.childNodes[i].textContent);\n }\n\n return parts.join('');\n },\n set: /** @this {Node} */ function(assignedValue) {\n while (this.firstChild) {\n Native.Node_removeChild.call(this, this.firstChild);\n }\n Native.Node_appendChild.call(this, document.createTextNode(assignedValue));\n },\n });\n });\n }\n};\n","import CustomElementInternals from '../../CustomElementInternals.js';\nimport * as Utilities from '../../Utilities.js';\n\n/**\n * @typedef {{\n * before: !function(...(!Node|string)),\n * after: !function(...(!Node|string)),\n * replaceWith: !function(...(!Node|string)),\n * remove: !function(),\n * }}\n */\nlet ChildNodeNativeMethods;\n\n/**\n * @param {!CustomElementInternals} internals\n * @param {!Object} destination\n * @param {!ChildNodeNativeMethods} builtIn\n */\nexport default function(internals, destination, builtIn) {\n /**\n * @param {!function(...(!Node|string))} builtInMethod\n * @return {!function(...(!Node|string))}\n */\n function beforeAfterPatch(builtInMethod) {\n return function(...nodes) {\n /**\n * A copy of `nodes`, with any DocumentFragment replaced by its children.\n * @type {!Array}\n */\n const flattenedNodes = [];\n\n /**\n * Elements in `nodes` that were connected before this call.\n * @type {!Array}\n */\n const connectedElements = [];\n\n for (var i = 0; i < nodes.length; i++) {\n const node = nodes[i];\n\n if (node instanceof Element && Utilities.isConnected(node)) {\n connectedElements.push(node);\n }\n\n if (node instanceof DocumentFragment) {\n for (let child = node.firstChild; child; child = child.nextSibling) {\n flattenedNodes.push(child);\n }\n } else {\n flattenedNodes.push(node);\n }\n }\n\n builtInMethod.apply(this, nodes);\n\n for (let i = 0; i < connectedElements.length; i++) {\n internals.disconnectTree(connectedElements[i]);\n }\n\n if (Utilities.isConnected(this)) {\n for (let i = 0; i < flattenedNodes.length; i++) {\n const node = flattenedNodes[i];\n if (node instanceof Element) {\n internals.connectTree(node);\n }\n }\n }\n };\n }\n\n if (builtIn.before !== undefined) {\n Utilities.setPropertyUnchecked(destination, 'before', beforeAfterPatch(builtIn.before));\n }\n\n if (builtIn.before !== undefined) {\n Utilities.setPropertyUnchecked(destination, 'after', beforeAfterPatch(builtIn.after));\n }\n\n if (builtIn.replaceWith !== undefined) {\n Utilities.setPropertyUnchecked(destination, 'replaceWith',\n /**\n * @param {...(!Node|string)} nodes\n */\n function(...nodes) {\n /**\n * A copy of `nodes`, with any DocumentFragment replaced by its children.\n * @type {!Array}\n */\n const flattenedNodes = [];\n\n /**\n * Elements in `nodes` that were connected before this call.\n * @type {!Array}\n */\n const connectedElements = [];\n\n for (var i = 0; i < nodes.length; i++) {\n const node = nodes[i];\n\n if (node instanceof Element && Utilities.isConnected(node)) {\n connectedElements.push(node);\n }\n\n if (node instanceof DocumentFragment) {\n for (let child = node.firstChild; child; child = child.nextSibling) {\n flattenedNodes.push(child);\n }\n } else {\n flattenedNodes.push(node);\n }\n }\n\n const wasConnected = Utilities.isConnected(this);\n\n builtIn.replaceWith.apply(this, nodes);\n\n for (let i = 0; i < connectedElements.length; i++) {\n internals.disconnectTree(connectedElements[i]);\n }\n\n if (wasConnected) {\n internals.disconnectTree(this);\n for (let i = 0; i < flattenedNodes.length; i++) {\n const node = flattenedNodes[i];\n if (node instanceof Element) {\n internals.connectTree(node);\n }\n }\n }\n });\n }\n\n if (builtIn.remove !== undefined) {\n Utilities.setPropertyUnchecked(destination, 'remove',\n function() {\n const wasConnected = Utilities.isConnected(this);\n\n builtIn.remove.call(this);\n\n if (wasConnected) {\n internals.disconnectTree(this);\n }\n });\n }\n};\n","import Native from './Native.js';\nimport CustomElementInternals from '../CustomElementInternals.js';\nimport CEState from '../CustomElementState.js';\nimport * as Utilities from '../Utilities.js';\n\nimport PatchParentNode from './Interface/ParentNode.js';\nimport PatchChildNode from './Interface/ChildNode.js';\n\n/**\n * @param {!CustomElementInternals} internals\n */\nexport default function(internals) {\n if (Native.Element_attachShadow) {\n Utilities.setPropertyUnchecked(Element.prototype, 'attachShadow',\n /**\n * @this {Element}\n * @param {!{mode: string}} init\n * @return {ShadowRoot}\n */\n function(init) {\n const shadowRoot = Native.Element_attachShadow.call(this, init);\n this.__CE_shadowRoot = shadowRoot;\n return shadowRoot;\n });\n }\n\n\n function patch_innerHTML(destination, baseDescriptor) {\n Object.defineProperty(destination, 'innerHTML', {\n enumerable: baseDescriptor.enumerable,\n configurable: true,\n get: baseDescriptor.get,\n set: /** @this {Element} */ function(htmlString) {\n const isConnected = Utilities.isConnected(this);\n\n // NOTE: In IE11, when using the native `innerHTML` setter, all nodes\n // that were previously descendants of the context element have all of\n // their children removed as part of the set - the entire subtree is\n // 'disassembled'. This work around walks the subtree *before* using the\n // native setter.\n /** @type {!Array|undefined} */\n let removedElements = undefined;\n if (isConnected) {\n removedElements = [];\n Utilities.walkDeepDescendantElements(this, element => {\n if (element !== this) {\n removedElements.push(element);\n }\n });\n }\n\n baseDescriptor.set.call(this, htmlString);\n\n if (removedElements) {\n for (let i = 0; i < removedElements.length; i++) {\n const element = removedElements[i];\n if (element.__CE_state === CEState.custom) {\n internals.disconnectedCallback(element);\n }\n }\n }\n\n // Only create custom elements if this element's owner document is\n // associated with the registry.\n if (!this.ownerDocument.__CE_hasRegistry) {\n internals.patchTree(this);\n } else {\n internals.patchAndUpgradeTree(this);\n }\n return htmlString;\n },\n });\n }\n\n if (Native.Element_innerHTML && Native.Element_innerHTML.get) {\n patch_innerHTML(Element.prototype, Native.Element_innerHTML);\n } else if (Native.HTMLElement_innerHTML && Native.HTMLElement_innerHTML.get) {\n patch_innerHTML(HTMLElement.prototype, Native.HTMLElement_innerHTML);\n } else {\n\n internals.addPatch(function(element) {\n patch_innerHTML(element, {\n enumerable: true,\n configurable: true,\n // Implements getting `innerHTML` by performing an unpatched `cloneNode`\n // of the element and returning the resulting element's `innerHTML`.\n // TODO: Is this too expensive?\n get: /** @this {Element} */ function() {\n return Native.Node_cloneNode.call(this, true).innerHTML;\n },\n // Implements setting `innerHTML` by creating an unpatched element,\n // setting `innerHTML` of that element and replacing the target\n // element's children with those of the unpatched element.\n set: /** @this {Element} */ function(assignedValue) {\n // NOTE: re-route to `content` for `template` elements.\n // We need to do this because `template.appendChild` does not\n // route into `template.content`.\n const isTemplate = (this.localName === 'template');\n /** @type {!Node} */\n const content = isTemplate ? (/** @type {!HTMLTemplateElement} */\n (this)).content : this;\n /** @type {!Node} */\n const rawElement = Native.Document_createElementNS.call(document,\n this.namespaceURI, this.localName);\n rawElement.innerHTML = assignedValue;\n\n while (content.childNodes.length > 0) {\n Native.Node_removeChild.call(content, content.childNodes[0]);\n }\n const container = isTemplate ? rawElement.content : rawElement;\n while (container.childNodes.length > 0) {\n Native.Node_appendChild.call(content, container.childNodes[0]);\n }\n },\n });\n });\n }\n\n\n Utilities.setPropertyUnchecked(Element.prototype, 'setAttribute',\n /**\n * @this {Element}\n * @param {string} name\n * @param {string} newValue\n */\n function(name, newValue) {\n // Fast path for non-custom elements.\n if (this.__CE_state !== CEState.custom) {\n return Native.Element_setAttribute.call(this, name, newValue);\n }\n\n const oldValue = Native.Element_getAttribute.call(this, name);\n Native.Element_setAttribute.call(this, name, newValue);\n newValue = Native.Element_getAttribute.call(this, name);\n internals.attributeChangedCallback(this, name, oldValue, newValue, null);\n });\n\n Utilities.setPropertyUnchecked(Element.prototype, 'setAttributeNS',\n /**\n * @this {Element}\n * @param {?string} namespace\n * @param {string} name\n * @param {string} newValue\n */\n function(namespace, name, newValue) {\n // Fast path for non-custom elements.\n if (this.__CE_state !== CEState.custom) {\n return Native.Element_setAttributeNS.call(this, namespace, name, newValue);\n }\n\n const oldValue = Native.Element_getAttributeNS.call(this, namespace, name);\n Native.Element_setAttributeNS.call(this, namespace, name, newValue);\n newValue = Native.Element_getAttributeNS.call(this, namespace, name);\n internals.attributeChangedCallback(this, name, oldValue, newValue, namespace);\n });\n\n Utilities.setPropertyUnchecked(Element.prototype, 'removeAttribute',\n /**\n * @this {Element}\n * @param {string} name\n */\n function(name) {\n // Fast path for non-custom elements.\n if (this.__CE_state !== CEState.custom) {\n return Native.Element_removeAttribute.call(this, name);\n }\n\n const oldValue = Native.Element_getAttribute.call(this, name);\n Native.Element_removeAttribute.call(this, name);\n if (oldValue !== null) {\n internals.attributeChangedCallback(this, name, oldValue, null, null);\n }\n });\n\n Utilities.setPropertyUnchecked(Element.prototype, 'removeAttributeNS',\n /**\n * @this {Element}\n * @param {?string} namespace\n * @param {string} name\n */\n function(namespace, name) {\n // Fast path for non-custom elements.\n if (this.__CE_state !== CEState.custom) {\n return Native.Element_removeAttributeNS.call(this, namespace, name);\n }\n\n const oldValue = Native.Element_getAttributeNS.call(this, namespace, name);\n Native.Element_removeAttributeNS.call(this, namespace, name);\n // In older browsers, `Element#getAttributeNS` may return the empty string\n // instead of null if the attribute does not exist. For details, see;\n // https://developer.mozilla.org/en-US/docs/Web/API/Element/getAttributeNS#Notes\n const newValue = Native.Element_getAttributeNS.call(this, namespace, name);\n if (oldValue !== newValue) {\n internals.attributeChangedCallback(this, name, oldValue, newValue, namespace);\n }\n });\n\n\n function patch_insertAdjacentElement(destination, baseMethod) {\n Utilities.setPropertyUnchecked(destination, 'insertAdjacentElement',\n /**\n * @this {Element}\n * @param {string} position\n * @param {!Element} element\n * @return {?Element}\n */\n function(position, element) {\n const wasConnected = Utilities.isConnected(element);\n const insertedElement = /** @type {!Element} */\n (baseMethod.call(this, position, element));\n\n if (wasConnected) {\n internals.disconnectTree(element);\n }\n\n if (Utilities.isConnected(insertedElement)) {\n internals.connectTree(element);\n }\n return insertedElement;\n });\n }\n\n if (Native.HTMLElement_insertAdjacentElement) {\n patch_insertAdjacentElement(HTMLElement.prototype, Native.HTMLElement_insertAdjacentElement);\n } else if (Native.Element_insertAdjacentElement) {\n patch_insertAdjacentElement(Element.prototype, Native.Element_insertAdjacentElement);\n } else {\n console.warn('Custom Elements: `Element#insertAdjacentElement` was not patched.');\n }\n\n\n function patch_insertAdjacentHTML(destination, baseMethod) {\n /**\n * Patches and upgrades all nodes which are siblings between `start`\n * (inclusive) and `end` (exclusive). If `end` is `null`, then all siblings\n * following `start` will be patched and upgraded.\n * @param {!Node} start\n * @param {?Node} end\n */\n function upgradeNodesInRange(start, end) {\n const nodes = [];\n for (let node = start; node !== end; node = node.nextSibling) {\n nodes.push(node);\n }\n for (let i = 0; i < nodes.length; i++) {\n internals.patchAndUpgradeTree(nodes[i]);\n }\n }\n\n Utilities.setPropertyUnchecked(destination, 'insertAdjacentHTML',\n /**\n * @this {Element}\n * @param {string} position\n * @param {string} text\n */\n function(position, text) {\n position = position.toLowerCase();\n\n if (position === \"beforebegin\") {\n const marker = this.previousSibling;\n baseMethod.call(this, position, text);\n upgradeNodesInRange(marker || /** @type {!Node} */ (this.parentNode.firstChild), this);\n } else if (position === \"afterbegin\") {\n const marker = this.firstChild;\n baseMethod.call(this, position, text);\n upgradeNodesInRange(/** @type {!Node} */ (this.firstChild), marker);\n } else if (position === \"beforeend\") {\n const marker = this.lastChild;\n baseMethod.call(this, position, text);\n upgradeNodesInRange(marker || /** @type {!Node} */ (this.firstChild), null);\n } else if (position === \"afterend\") {\n const marker = this.nextSibling;\n baseMethod.call(this, position, text);\n upgradeNodesInRange(/** @type {!Node} */ (this.nextSibling), marker);\n } else {\n throw new SyntaxError(`The value provided (${String(position)}) is ` +\n \"not one of 'beforebegin', 'afterbegin', 'beforeend', or 'afterend'.\");\n }\n });\n }\n\n if (Native.HTMLElement_insertAdjacentHTML) {\n patch_insertAdjacentHTML(HTMLElement.prototype, Native.HTMLElement_insertAdjacentHTML);\n } else if (Native.Element_insertAdjacentHTML) {\n patch_insertAdjacentHTML(Element.prototype, Native.Element_insertAdjacentHTML);\n } else {\n console.warn('Custom Elements: `Element#insertAdjacentHTML` was not patched.');\n }\n\n\n PatchParentNode(internals, Element.prototype, {\n prepend: Native.Element_prepend,\n append: Native.Element_append,\n });\n\n PatchChildNode(internals, Element.prototype, {\n before: Native.Element_before,\n after: Native.Element_after,\n replaceWith: Native.Element_replaceWith,\n remove: Native.Element_remove,\n });\n};\n","import CustomElementInternals from '../CustomElementInternals.js';\nimport Native from './Native.js';\nimport PatchParentNode from './Interface/ParentNode.js';\n\n/**\n * @param {!CustomElementInternals} internals\n */\nexport default function(internals) {\n PatchParentNode(internals, DocumentFragment.prototype, {\n prepend: Native.DocumentFragment_prepend,\n append: Native.DocumentFragment_append,\n });\n};\n","/**\n@license\nCopyright (c) 2017 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\nThe complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\nThe complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\nCode distributed by Google as part of the polymer project is also\nsubject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n*/\n\n/*\nExtremely simple css parser. Intended to be not more than what we need\nand definitely not necessarily correct =).\n*/\n\n'use strict';\n\n/** @unrestricted */\nclass StyleNode {\n constructor() {\n /** @type {number} */\n this['start'] = 0;\n /** @type {number} */\n this['end'] = 0;\n /** @type {StyleNode} */\n this['previous'] = null;\n /** @type {StyleNode} */\n this['parent'] = null;\n /** @type {Array} */\n this['rules'] = null;\n /** @type {string} */\n this['parsedCssText'] = '';\n /** @type {string} */\n this['cssText'] = '';\n /** @type {boolean} */\n this['atRule'] = false;\n /** @type {number} */\n this['type'] = 0;\n /** @type {string} */\n this['keyframesName'] = '';\n /** @type {string} */\n this['selector'] = '';\n /** @type {string} */\n this['parsedSelector'] = '';\n }\n}\n\nexport {StyleNode}\n\n// given a string of css, return a simple rule tree\n/**\n * @param {string} text\n * @return {StyleNode}\n */\nexport function parse(text) {\n text = clean(text);\n return parseCss(lex(text), text);\n}\n\n// remove stuff we don't care about that may hinder parsing\n/**\n * @param {string} cssText\n * @return {string}\n */\nfunction clean(cssText) {\n return cssText.replace(RX.comments, '').replace(RX.port, '');\n}\n\n// super simple {...} lexer that returns a node tree\n/**\n * @param {string} text\n * @return {StyleNode}\n */\nfunction lex(text) {\n let root = new StyleNode();\n root['start'] = 0;\n root['end'] = text.length\n let n = root;\n for (let i = 0, l = text.length; i < l; i++) {\n if (text[i] === OPEN_BRACE) {\n if (!n['rules']) {\n n['rules'] = [];\n }\n let p = n;\n let previous = p['rules'][p['rules'].length - 1] || null;\n n = new StyleNode();\n n['start'] = i + 1;\n n['parent'] = p;\n n['previous'] = previous;\n p['rules'].push(n);\n } else if (text[i] === CLOSE_BRACE) {\n n['end'] = i + 1;\n n = n['parent'] || root;\n }\n }\n return root;\n}\n\n// add selectors/cssText to node tree\n/**\n * @param {StyleNode} node\n * @param {string} text\n * @return {StyleNode}\n */\nfunction parseCss(node, text) {\n let t = text.substring(node['start'], node['end'] - 1);\n node['parsedCssText'] = node['cssText'] = t.trim();\n if (node['parent']) {\n let ss = node['previous'] ? node['previous']['end'] : node['parent']['start'];\n t = text.substring(ss, node['start'] - 1);\n t = _expandUnicodeEscapes(t);\n t = t.replace(RX.multipleSpaces, ' ');\n // TODO(sorvell): ad hoc; make selector include only after last ;\n // helps with mixin syntax\n t = t.substring(t.lastIndexOf(';') + 1);\n let s = node['parsedSelector'] = node['selector'] = t.trim();\n node['atRule'] = (s.indexOf(AT_START) === 0);\n // note, support a subset of rule types...\n if (node['atRule']) {\n if (s.indexOf(MEDIA_START) === 0) {\n node['type'] = types.MEDIA_RULE;\n } else if (s.match(RX.keyframesRule)) {\n node['type'] = types.KEYFRAMES_RULE;\n node['keyframesName'] =\n node['selector'].split(RX.multipleSpaces).pop();\n }\n } else {\n if (s.indexOf(VAR_START) === 0) {\n node['type'] = types.MIXIN_RULE;\n } else {\n node['type'] = types.STYLE_RULE;\n }\n }\n }\n let r$ = node['rules'];\n if (r$) {\n for (let i = 0, l = r$.length, r;\n (i < l) && (r = r$[i]); i++) {\n parseCss(r, text);\n }\n }\n return node;\n}\n\n/**\n * conversion of sort unicode escapes with spaces like `\\33 ` (and longer) into\n * expanded form that doesn't require trailing space `\\000033`\n * @param {string} s\n * @return {string}\n */\nfunction _expandUnicodeEscapes(s) {\n return s.replace(/\\\\([0-9a-f]{1,6})\\s/gi, function() {\n let code = arguments[1],\n repeat = 6 - code.length;\n while (repeat--) {\n code = '0' + code;\n }\n return '\\\\' + code;\n });\n}\n\n/**\n * stringify parsed css.\n * @param {StyleNode} node\n * @param {boolean=} preserveProperties\n * @param {string=} text\n * @return {string}\n */\nexport function stringify(node, preserveProperties, text = '') {\n // calc rule cssText\n let cssText = '';\n if (node['cssText'] || node['rules']) {\n let r$ = node['rules'];\n if (r$ && !_hasMixinRules(r$)) {\n for (let i = 0, l = r$.length, r;\n (i < l) && (r = r$[i]); i++) {\n cssText = stringify(r, preserveProperties, cssText);\n }\n } else {\n cssText = preserveProperties ? node['cssText'] :\n removeCustomProps(node['cssText']);\n cssText = cssText.trim();\n if (cssText) {\n cssText = ' ' + cssText + '\\n';\n }\n }\n }\n // emit rule if there is cssText\n if (cssText) {\n if (node['selector']) {\n text += node['selector'] + ' ' + OPEN_BRACE + '\\n';\n }\n text += cssText;\n if (node['selector']) {\n text += CLOSE_BRACE + '\\n\\n';\n }\n }\n return text;\n}\n\n/**\n * @param {Array} rules\n * @return {boolean}\n */\nfunction _hasMixinRules(rules) {\n let r = rules[0];\n return Boolean(r) && Boolean(r['selector']) && r['selector'].indexOf(VAR_START) === 0;\n}\n\n/**\n * @param {string} cssText\n * @return {string}\n */\nfunction removeCustomProps(cssText) {\n cssText = removeCustomPropAssignment(cssText);\n return removeCustomPropApply(cssText);\n}\n\n/**\n * @param {string} cssText\n * @return {string}\n */\nexport function removeCustomPropAssignment(cssText) {\n return cssText\n .replace(RX.customProp, '')\n .replace(RX.mixinProp, '');\n}\n\n/**\n * @param {string} cssText\n * @return {string}\n */\nfunction removeCustomPropApply(cssText) {\n return cssText\n .replace(RX.mixinApply, '')\n .replace(RX.varApply, '');\n}\n\n/** @enum {number} */\nexport const types = {\n STYLE_RULE: 1,\n KEYFRAMES_RULE: 7,\n MEDIA_RULE: 4,\n MIXIN_RULE: 1000\n}\n\nconst OPEN_BRACE = '{';\nconst CLOSE_BRACE = '}';\n\n// helper regexp's\nconst RX = {\n comments: /\\/\\*[^*]*\\*+([^/*][^*]*\\*+)*\\//gim,\n port: /@import[^;]*;/gim,\n customProp: /(?:^[^;\\-\\s}]+)?--[^;{}]*?:[^{};]*?(?:[;\\n]|$)/gim,\n mixinProp: /(?:^[^;\\-\\s}]+)?--[^;{}]*?:[^{};]*?{[^}]*?}(?:[;\\n]|$)?/gim,\n mixinApply: /@apply\\s*\\(?[^);]*\\)?\\s*(?:[;\\n]|$)?/gim,\n varApply: /[^;:]*?:[^;]*?var\\([^;]*\\)(?:[;\\n]|$)?/gim,\n keyframesRule: /^@[^\\s]*keyframes/,\n multipleSpaces: /\\s+/g\n}\n\nconst VAR_START = '--';\nconst MEDIA_START = '@media';\nconst AT_START = '@';\n","/**\n@license\nCopyright (c) 2017 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\nThe complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\nThe complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\nCode distributed by Google as part of the polymer project is also\nsubject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n*/\n\n'use strict';\n\nexport const nativeShadow = !(window['ShadyDOM'] && window['ShadyDOM']['inUse']);\nlet nativeCssVariables_;\n\n/**\n * @param {(ShadyCSSOptions | ShadyCSSInterface)=} settings\n */\nfunction calcCssVariables(settings) {\n if (settings && settings['shimcssproperties']) {\n nativeCssVariables_ = false;\n } else {\n // chrome 49 has semi-working css vars, check if box-shadow works\n // safari 9.1 has a recalc bug: https://bugs.webkit.org/show_bug.cgi?id=155782\n // However, shim css custom properties are only supported with ShadyDOM enabled,\n // so fall back on native if we do not detect ShadyDOM\n // Edge 15: custom properties used in ::before and ::after will also be used in the parent element\n // https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/12414257/\n nativeCssVariables_ = nativeShadow || Boolean(!navigator.userAgent.match(/AppleWebKit\\/601|Edge\\/15/) &&\n window.CSS && CSS.supports && CSS.supports('box-shadow', '0 0 0 var(--foo)'));\n }\n}\n\n/** @type {string | undefined} */\nexport let cssBuild;\nif (window.ShadyCSS && window.ShadyCSS.cssBuild !== undefined) {\n cssBuild = window.ShadyCSS.cssBuild;\n}\n\n/** @type {boolean} */\nexport const disableRuntime = Boolean(window.ShadyCSS && window.ShadyCSS.disableRuntime);\n\nif (window.ShadyCSS && window.ShadyCSS.nativeCss !== undefined) {\n nativeCssVariables_ = window.ShadyCSS.nativeCss;\n} else if (window.ShadyCSS) {\n calcCssVariables(window.ShadyCSS);\n // reset window variable to let ShadyCSS API take its place\n window.ShadyCSS = undefined;\n} else {\n calcCssVariables(window['WebComponents'] && window['WebComponents']['flags']);\n}\n\n// Hack for type error under new type inference which doesn't like that\n// nativeCssVariables is updated in a function and assigns the type\n// `function(): ?` instead of `boolean`.\nexport const nativeCssVariables = /** @type {boolean} */(nativeCssVariables_);","/**\n@license\nCopyright (c) 2017 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\nThe complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\nThe complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\nCode distributed by Google as part of the polymer project is also\nsubject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n*/\n\nexport const VAR_ASSIGN = /(?:^|[;\\s{]\\s*)(--[\\w-]*?)\\s*:\\s*(?:((?:'(?:\\\\'|.)*?'|\"(?:\\\\\"|.)*?\"|\\([^)]*?\\)|[^};{])+)|\\{([^}]*)\\}(?:(?=[;\\s}])|$))/gi;\nexport const MIXIN_MATCH = /(?:^|\\W+)@apply\\s*\\(?([^);\\n]*)\\)?/gi;\nexport const VAR_CONSUMED = /(--[\\w-]+)\\s*([:,;)]|$)/gi;\nexport const ANIMATION_MATCH = /(animation\\s*:)|(animation-name\\s*:)/;\nexport const MEDIA_MATCH = /@media\\s(.*)/;\nexport const IS_VAR = /^--/;\nexport const BRACKETED = /\\{[^}]*\\}/g;\nexport const HOST_PREFIX = '(?:^|[^.#[:])';\nexport const HOST_SUFFIX = '($|[.:[\\\\s>+~])';\n","/**\n@license\nCopyright (c) 2017 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\nThe complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\nThe complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\nCode distributed by Google as part of the polymer project is also\nsubject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n*/\n\n'use strict';\n\n/** @type {!Set} */\nconst styleTextSet = new Set();\n\nexport const scopingAttribute = 'shady-unscoped';\n\n/**\n * Add a specifically-marked style to the document directly, and only one copy of that style.\n *\n * @param {!HTMLStyleElement} style\n * @return {undefined}\n */\nexport function processUnscopedStyle(style) {\n const text = style.textContent;\n if (!styleTextSet.has(text)) {\n styleTextSet.add(text);\n const newStyle = style.cloneNode(true);\n document.head.appendChild(newStyle);\n }\n}\n\n/**\n * Check if a style is supposed to be unscoped\n * @param {!HTMLStyleElement} style\n * @return {boolean} true if the style has the unscoping attribute\n */\nexport function isUnscopedStyle(style) {\n return style.hasAttribute(scopingAttribute);\n}","/**\n@license\nCopyright (c) 2017 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\nThe complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\nThe complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\nCode distributed by Google as part of the polymer project is also\nsubject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n*/\n\n'use strict';\n\nimport {nativeShadow, nativeCssVariables, cssBuild} from './style-settings.js';\nimport {parse, stringify, types, StyleNode} from './css-parse.js'; // eslint-disable-line no-unused-vars\nimport {MEDIA_MATCH} from './common-regex.js';\nimport {processUnscopedStyle, isUnscopedStyle} from './unscoped-style-handler.js';\n\n/**\n * @param {string|StyleNode} rules\n * @param {function(StyleNode)=} callback\n * @return {string}\n */\nexport function toCssText (rules, callback) {\n if (!rules) {\n return '';\n }\n if (typeof rules === 'string') {\n rules = parse(rules);\n }\n if (callback) {\n forEachRule(rules, callback);\n }\n return stringify(rules, nativeCssVariables);\n}\n\n/**\n * @param {HTMLStyleElement} style\n * @return {StyleNode}\n */\nexport function rulesForStyle(style) {\n if (!style['__cssRules'] && style.textContent) {\n style['__cssRules'] = parse(style.textContent);\n }\n return style['__cssRules'] || null;\n}\n\n// Tests if a rule is a keyframes selector, which looks almost exactly\n// like a normal selector but is not (it has nothing to do with scoping\n// for example).\n/**\n * @param {StyleNode} rule\n * @return {boolean}\n */\nexport function isKeyframesSelector(rule) {\n return Boolean(rule['parent']) &&\n rule['parent']['type'] === types.KEYFRAMES_RULE;\n}\n\n/**\n * @param {StyleNode} node\n * @param {Function=} styleRuleCallback\n * @param {Function=} keyframesRuleCallback\n * @param {boolean=} onlyActiveRules\n */\nexport function forEachRule(node, styleRuleCallback, keyframesRuleCallback, onlyActiveRules) {\n if (!node) {\n return;\n }\n let skipRules = false;\n let type = node['type'];\n if (onlyActiveRules) {\n if (type === types.MEDIA_RULE) {\n let matchMedia = node['selector'].match(MEDIA_MATCH);\n if (matchMedia) {\n // if rule is a non matching @media rule, skip subrules\n if (!window.matchMedia(matchMedia[1]).matches) {\n skipRules = true;\n }\n }\n }\n }\n if (type === types.STYLE_RULE) {\n styleRuleCallback(node);\n } else if (keyframesRuleCallback &&\n type === types.KEYFRAMES_RULE) {\n keyframesRuleCallback(node);\n } else if (type === types.MIXIN_RULE) {\n skipRules = true;\n }\n let r$ = node['rules'];\n if (r$ && !skipRules) {\n for (let i=0, l=r$.length, r; (i node);\n\n/**\n * @param {Element | {is: string, extends: string}} element\n * @return {{is: string, typeExtension: string}}\n */\nexport function getIsExtends(element) {\n let localName = element['localName'];\n let is = '', typeExtension = '';\n /*\n NOTE: technically, this can be wrong for certain svg elements\n with `-` in the name like ``\n */\n if (localName) {\n if (localName.indexOf('-') > -1) {\n is = localName;\n } else {\n typeExtension = localName;\n is = (element.getAttribute && element.getAttribute('is')) || '';\n }\n } else {\n is = /** @type {?} */(element).is;\n typeExtension = /** @type {?} */(element).extends;\n }\n return {is, typeExtension};\n}\n\n/**\n * @param {Element|DocumentFragment} element\n * @return {string}\n */\nexport function gatherStyleText(element) {\n /** @type {!Array} */\n const styleTextParts = [];\n const styles = /** @type {!NodeList} */(element.querySelectorAll('style'));\n for (let i = 0; i < styles.length; i++) {\n const style = styles[i];\n if (isUnscopedStyle(style)) {\n if (!nativeShadow) {\n processUnscopedStyle(style);\n style.parentNode.removeChild(style);\n }\n } else {\n styleTextParts.push(style.textContent);\n style.parentNode.removeChild(style);\n }\n }\n return styleTextParts.join('').trim();\n}\n\n/**\n * Split a selector separated by commas into an array in a smart way\n * @param {string} selector\n * @return {!Array}\n */\nexport function splitSelectorList(selector) {\n const parts = [];\n let part = '';\n for (let i = 0; i >= 0 && i < selector.length; i++) {\n // A selector with parentheses will be one complete part\n if (selector[i] === '(') {\n // find the matching paren\n const end = findMatchingParen(selector, i);\n // push the paren block into the part\n part += selector.slice(i, end + 1);\n // move the index to after the paren block\n i = end;\n } else if (selector[i] === ',') {\n parts.push(part);\n part = '';\n } else {\n part += selector[i];\n }\n }\n // catch any pieces after the last comma\n if (part) {\n parts.push(part);\n }\n return parts;\n}\n\nconst CSS_BUILD_ATTR = 'css-build';\n\n/**\n * Return the polymer-css-build \"build type\" applied to this element\n *\n * @param {!HTMLElement} element\n * @return {string} Can be \"\", \"shady\", or \"shadow\"\n */\nexport function getCssBuild(element) {\n if (cssBuild !== undefined) {\n return /** @type {string} */(cssBuild);\n }\n if (element.__cssBuild === undefined) {\n // try attribute first, as it is the common case\n const attrValue = element.getAttribute(CSS_BUILD_ATTR);\n if (attrValue) {\n element.__cssBuild = attrValue;\n } else {\n const buildComment = getBuildComment(element);\n if (buildComment !== '') {\n // remove build comment so it is not needlessly copied into every element instance\n removeBuildComment(element);\n }\n element.__cssBuild = buildComment;\n }\n }\n return element.__cssBuild || '';\n}\n\n/**\n * Check if the given element, either a