@genesislcap/foundation-shell 14.401.1 → 14.401.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/InjectManifest.aed1bdab30d5eaa7a9d8474a484e4846.js.map +1 -0
- package/dist/index.html +1 -1
- package/dist/main.0e8ca22628a117f16a5f.js +20 -0
- package/dist/main.3afadfd92bca590ba294755357fa898d.js.map +1 -0
- package/dist/npm.consola.00ba577c5cd42994a359.js +2 -0
- package/dist/npm.consola.f930c689c4458d511a70b8a85c7ce418.js.map +1 -0
- package/dist/npm.microsoft.9a8d569a86ddb71ef224f86caf2bff7c.js.map +1 -0
- package/dist/npm.microsoft.9b7cca951db576bc267c.js +2 -0
- package/dist/sw.js +2 -2
- package/dist/swRegistration.9c6ab3734b3caa4b3139.js +2 -0
- package/dist/swRegistration.ab8c2335596df9580f9a8f08596cc408.js.map +1 -0
- package/package.json +14 -14
- package/dist/InjectManifest.7484f54f24d9c6ccd55d3fab2b931c3d.js.map +0 -1
- package/dist/main.28e2c6e62cb2cb27422e0673f4decb7c.js.map +0 -1
- package/dist/main.cc981f7b7ee2b7176ecb.js +0 -20
- package/dist/npm.consola.7679147eb62b795d3c6f8b656e7cbad6.js.map +0 -1
- package/dist/npm.consola.bbc98955813b22b881a7.js +0 -2
- package/dist/npm.microsoft.7e017c0ac867c96c95f5610ad9fc520b.js.map +0 -1
- package/dist/npm.microsoft.bc8a98e27c50c4f95eb7.js +0 -2
- package/dist/swRegistration.62be30216fc0bea997b141bc21a731a5.js.map +0 -1
- package/dist/swRegistration.69d348f375815d32a934.js +0 -2
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"npm.microsoft.xxxxxxxxxxxxxxxxxxxx.js","mappings":"mNAOO,MAAMA,EAAyBC,OAAOC,OAAO,CAIhDC,QAAQ,YAQCC,EAAmB,CAC5BC,OAAOC,GACIA,EAAQ,OAAS,QAE5BC,SAASD,GACDA,SAEU,UAAVA,IACU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3S,GACP1C,CACX,EAGJ,MAAMqX,EAEN,6IAUO,SAASnS,EAAKoI,KAAYC,GAC7B,MAAM6F,EAAa,GACnB,IAAIlO,EAAO,GACX,IAAK,IAAI9I,EAAI,EAAGC,EAAKiR,EAAQhR,OAAS,EAAGF,EAAIC,IAAMD,EAAG,CAClD,MAAMkb,EAAgBhK,EAAQlR,GAC9B,IAAIvC,EAAQ0T,EAAOnR,GAEnB,GADA8I,GAAQoS,EACJzd,aAAiBmc,EAAc,CAC/B,MAAMrY,EAAW9D,EACjBA,EAAQ,IAAM8D,CAClB,CAIA,GAHqB,mBAAV9D,IACPA,EAAQ,IAAIoY,EAAqBpY,IAEjCA,aAAiBoW,EAAuB,CACxC,MAAMsH,EAAQF,EAAuBG,KAAKF,GAC5B,OAAVC,IACA1d,EAAM6W,WAAa6G,EAAM,GAEjC,CACI1d,aAAiBkW,GAIjB7K,GAAQrL,EAAMsW,kBAAkBiD,EAAW9W,QAC3C8W,EAAWjX,KAAKtC,IAGhBqL,GAAQrL,CAEhB,CAEA,OADAqL,GAAQoI,EAAQA,EAAQhR,OAAS,GAC1B,IAAI0Z,EAAa9Q,EAAMkO,EAClC,C","sources":["webpack://@genesislcap/foundation-shell/../../../node_modules/@microsoft/fast-element/dist/esm/components/attributes.js","webpack://@genesislcap/foundation-shell/../../../node_modules/@microsoft/fast-element/dist/esm/components/fast-definitions.js","webpack://@genesislcap/foundation-shell/../../../node_modules/@microsoft/fast-element/dist/esm/components/controller.js","webpack://@genesislcap/foundation-shell/../../../node_modules/@microsoft/fast-element/dist/esm/components/fast-element.js","webpack://@genesislcap/foundation-shell/../../../node_modules/@microsoft/fast-element/dist/esm/dom.js","webpack://@genesislcap/foundation-shell/../../../node_modules/@microsoft/fast-element/dist/esm/observation/notifier.js","webpack://@genesislcap/foundation-shell/../../../node_modules/@microsoft/fast-element/dist/esm/observation/observable.js","webpack://@genesislcap/foundation-shell/../../../node_modules/@microsoft/fast-element/dist/esm/platform.js","webpack://@genesislcap/foundation-shell/../../../node_modules/@microsoft/fast-element/dist/esm/styles/css-directive.js","webpack://@genesislcap/foundation-shell/../../../node_modules/@microsoft/fast-element/dist/esm/styles/css.js","webpack://@genesislcap/foundation-shell/../../../node_modules/@microsoft/fast-element/dist/esm/styles/element-styles.js","webpack://@genesislcap/foundation-shell/../../../node_modules/@microsoft/fast-element/dist/esm/templating/html-directive.js","webpack://@genesislcap/foundation-shell/../../../node_modules/@microsoft/fast-element/dist/esm/templating/binding.js","webpack://@genesislcap/foundation-shell/../../../node_modules/@microsoft/fast-element/dist/esm/templating/compiler.js","webpack://@genesislcap/foundation-shell/../../../node_modules/@microsoft/fast-element/dist/esm/templating/view.js","webpack://@genesislcap/foundation-shell/../../../node_modules/@microsoft/fast-element/dist/esm/templating/template.js"],"sourcesContent":["import { Observable } from \"../observation/observable.js\";\nimport { DOM } from \"../dom.js\";\nimport { createMetadataLocator } from \"../platform.js\";\n/**\n * Metadata used to configure a custom attribute's behavior.\n * @public\n */\nexport const AttributeConfiguration = Object.freeze({\n /**\n * Locates all attribute configurations associated with a type.\n */\n locate: createMetadataLocator(),\n});\n/**\n * A {@link ValueConverter} that converts to and from `boolean` values.\n * @remarks\n * Used automatically when the `boolean` {@link AttributeMode} is selected.\n * @public\n */\nexport const booleanConverter = {\n toView(value) {\n return value ? \"true\" : \"false\";\n },\n fromView(value) {\n if (value === null ||\n value === void 0 ||\n value === \"false\" ||\n value === false ||\n value === 0) {\n return false;\n }\n return true;\n },\n};\n/**\n * A {@link ValueConverter} that converts to and from `number` values.\n * @remarks\n * This converter allows for nullable numbers, returning `null` if the\n * input was `null`, `undefined`, or `NaN`.\n * @public\n */\nexport const nullableNumberConverter = {\n toView(value) {\n if (value === null || value === undefined) {\n return null;\n }\n const number = value * 1;\n return isNaN(number) ? null : number.toString();\n },\n fromView(value) {\n if (value === null || value === undefined) {\n return null;\n }\n const number = value * 1;\n return isNaN(number) ? null : number;\n },\n};\n/**\n * An implementation of {@link Accessor} that supports reactivity,\n * change callbacks, attribute reflection, and type conversion for\n * custom elements.\n * @public\n */\nexport class AttributeDefinition {\n /**\n * Creates an instance of AttributeDefinition.\n * @param Owner - The class constructor that owns this attribute.\n * @param name - The name of the property associated with the attribute.\n * @param attribute - The name of the attribute in HTML.\n * @param mode - The {@link AttributeMode} that describes the behavior of this attribute.\n * @param converter - A {@link ValueConverter} that integrates with the property getter/setter\n * to convert values to and from a DOM string.\n */\n constructor(Owner, name, attribute = name.toLowerCase(), mode = \"reflect\", converter) {\n this.guards = new Set();\n this.Owner = Owner;\n this.name = name;\n this.attribute = attribute;\n this.mode = mode;\n this.converter = converter;\n this.fieldName = `_${name}`;\n this.callbackName = `${name}Changed`;\n this.hasCallback = this.callbackName in Owner.prototype;\n if (mode === \"boolean\" && converter === void 0) {\n this.converter = booleanConverter;\n }\n }\n /**\n * Sets the value of the attribute/property on the source element.\n * @param source - The source element to access.\n * @param value - The value to set the attribute/property to.\n */\n setValue(source, newValue) {\n const oldValue = source[this.fieldName];\n const converter = this.converter;\n if (converter !== void 0) {\n newValue = converter.fromView(newValue);\n }\n if (oldValue !== newValue) {\n source[this.fieldName] = newValue;\n this.tryReflectToAttribute(source);\n if (this.hasCallback) {\n source[this.callbackName](oldValue, newValue);\n }\n source.$fastController.notify(this.name);\n }\n }\n /**\n * Gets the value of the attribute/property on the source element.\n * @param source - The source element to access.\n */\n getValue(source) {\n Observable.track(source, this.name);\n return source[this.fieldName];\n }\n /** @internal */\n onAttributeChangedCallback(element, value) {\n if (this.guards.has(element)) {\n return;\n }\n this.guards.add(element);\n this.setValue(element, value);\n this.guards.delete(element);\n }\n tryReflectToAttribute(element) {\n const mode = this.mode;\n const guards = this.guards;\n if (guards.has(element) || mode === \"fromView\") {\n return;\n }\n DOM.queueUpdate(() => {\n guards.add(element);\n const latestValue = element[this.fieldName];\n switch (mode) {\n case \"reflect\":\n const converter = this.converter;\n DOM.setAttribute(element, this.attribute, converter !== void 0 ? converter.toView(latestValue) : latestValue);\n break;\n case \"boolean\":\n DOM.setBooleanAttribute(element, this.attribute, latestValue);\n break;\n }\n guards.delete(element);\n });\n }\n /**\n * Collects all attribute definitions associated with the owner.\n * @param Owner - The class constructor to collect attribute for.\n * @param attributeLists - Any existing attributes to collect and merge with those associated with the owner.\n * @internal\n */\n static collect(Owner, ...attributeLists) {\n const attributes = [];\n attributeLists.push(AttributeConfiguration.locate(Owner));\n for (let i = 0, ii = attributeLists.length; i < ii; ++i) {\n const list = attributeLists[i];\n if (list === void 0) {\n continue;\n }\n for (let j = 0, jj = list.length; j < jj; ++j) {\n const config = list[j];\n if (typeof config === \"string\") {\n attributes.push(new AttributeDefinition(Owner, config));\n }\n else {\n attributes.push(new AttributeDefinition(Owner, config.property, config.attribute, config.mode, config.converter));\n }\n }\n }\n return attributes;\n }\n}\nexport function attr(configOrTarget, prop) {\n let config;\n function decorator($target, $prop) {\n if (arguments.length > 1) {\n // Non invocation:\n // - @attr\n // Invocation with or w/o opts:\n // - @attr()\n // - @attr({...opts})\n config.property = $prop;\n }\n AttributeConfiguration.locate($target.constructor).push(config);\n }\n if (arguments.length > 1) {\n // Non invocation:\n // - @attr\n config = {};\n decorator(configOrTarget, prop);\n return;\n }\n // Invocation with or w/o opts:\n // - @attr()\n // - @attr({...opts})\n config = configOrTarget === void 0 ? {} : configOrTarget;\n return decorator;\n}\n","import { FAST } from \"../platform.js\";\nimport { Observable } from \"../observation/observable.js\";\nimport { ElementStyles } from \"../styles/element-styles.js\";\nimport { AttributeDefinition } from \"./attributes.js\";\nconst defaultShadowOptions = { mode: \"open\" };\nconst defaultElementOptions = {};\nconst fastRegistry = FAST.getById(4 /* elementRegistry */, () => {\n const typeToDefinition = new Map();\n return Object.freeze({\n register(definition) {\n if (typeToDefinition.has(definition.type)) {\n return false;\n }\n typeToDefinition.set(definition.type, definition);\n return true;\n },\n getByType(key) {\n return typeToDefinition.get(key);\n },\n });\n});\n/**\n * Defines metadata for a FASTElement.\n * @public\n */\nexport class FASTElementDefinition {\n /**\n * Creates an instance of FASTElementDefinition.\n * @param type - The type this definition is being created for.\n * @param nameOrConfig - The name of the element to define or a config object\n * that describes the element to define.\n */\n constructor(type, nameOrConfig = type.definition) {\n if (typeof nameOrConfig === \"string\") {\n nameOrConfig = { name: nameOrConfig };\n }\n this.type = type;\n this.name = nameOrConfig.name;\n this.template = nameOrConfig.template;\n const attributes = AttributeDefinition.collect(type, nameOrConfig.attributes);\n const observedAttributes = new Array(attributes.length);\n const propertyLookup = {};\n const attributeLookup = {};\n for (let i = 0, ii = attributes.length; i < ii; ++i) {\n const current = attributes[i];\n observedAttributes[i] = current.attribute;\n propertyLookup[current.name] = current;\n attributeLookup[current.attribute] = current;\n }\n this.attributes = attributes;\n this.observedAttributes = observedAttributes;\n this.propertyLookup = propertyLookup;\n this.attributeLookup = attributeLookup;\n this.shadowOptions =\n nameOrConfig.shadowOptions === void 0\n ? defaultShadowOptions\n : nameOrConfig.shadowOptions === null\n ? void 0\n : Object.assign(Object.assign({}, defaultShadowOptions), nameOrConfig.shadowOptions);\n this.elementOptions =\n nameOrConfig.elementOptions === void 0\n ? defaultElementOptions\n : Object.assign(Object.assign({}, defaultElementOptions), nameOrConfig.elementOptions);\n this.styles =\n nameOrConfig.styles === void 0\n ? void 0\n : Array.isArray(nameOrConfig.styles)\n ? ElementStyles.create(nameOrConfig.styles)\n : nameOrConfig.styles instanceof ElementStyles\n ? nameOrConfig.styles\n : ElementStyles.create([nameOrConfig.styles]);\n }\n /**\n * Indicates if this element has been defined in at least one registry.\n */\n get isDefined() {\n return !!fastRegistry.getByType(this.type);\n }\n /**\n * Defines a custom element based on this definition.\n * @param registry - The element registry to define the element in.\n */\n define(registry = customElements) {\n const type = this.type;\n if (fastRegistry.register(this)) {\n const attributes = this.attributes;\n const proto = type.prototype;\n for (let i = 0, ii = attributes.length; i < ii; ++i) {\n Observable.defineProperty(proto, attributes[i]);\n }\n Reflect.defineProperty(type, \"observedAttributes\", {\n value: this.observedAttributes,\n enumerable: true,\n });\n }\n if (!registry.get(this.name)) {\n registry.define(this.name, type, this.elementOptions);\n }\n return this;\n }\n}\n/**\n * Gets the element definition associated with the specified type.\n * @param type - The custom element type to retrieve the definition for.\n */\nFASTElementDefinition.forType = fastRegistry.getByType;\n","import { DOM } from \"../dom.js\";\nimport { PropertyChangeNotifier } from \"../observation/notifier.js\";\nimport { defaultExecutionContext, Observable } from \"../observation/observable.js\";\nimport { FASTElementDefinition } from \"./fast-definitions.js\";\nconst shadowRoots = new WeakMap();\nconst defaultEventOptions = {\n bubbles: true,\n composed: true,\n cancelable: true,\n};\nfunction getShadowRoot(element) {\n return element.shadowRoot || shadowRoots.get(element) || null;\n}\n/**\n * Controls the lifecycle and rendering of a `FASTElement`.\n * @public\n */\nexport class Controller extends PropertyChangeNotifier {\n /**\n * Creates a Controller to control the specified element.\n * @param element - The element to be controlled by this controller.\n * @param definition - The element definition metadata that instructs this\n * controller in how to handle rendering and other platform integrations.\n * @internal\n */\n constructor(element, definition) {\n super(element);\n this.boundObservables = null;\n this.behaviors = null;\n this.needsInitialization = true;\n this._template = null;\n this._styles = null;\n this._isConnected = false;\n /**\n * This allows Observable.getNotifier(...) to return the Controller\n * when the notifier for the Controller itself is being requested. The\n * result is that the Observable system does not need to create a separate\n * instance of Notifier for observables on the Controller. The component and\n * the controller will now share the same notifier, removing one-object construct\n * per web component instance.\n */\n this.$fastController = this;\n /**\n * The view associated with the custom element.\n * @remarks\n * If `null` then the element is managing its own rendering.\n */\n this.view = null;\n this.element = element;\n this.definition = definition;\n const shadowOptions = definition.shadowOptions;\n if (shadowOptions !== void 0) {\n const shadowRoot = element.attachShadow(shadowOptions);\n if (shadowOptions.mode === \"closed\") {\n shadowRoots.set(element, shadowRoot);\n }\n }\n // Capture any observable values that were set by the binding engine before\n // the browser upgraded the element. Then delete the property since it will\n // shadow the getter/setter that is required to make the observable operate.\n // Later, in the connect callback, we'll re-apply the values.\n const accessors = Observable.getAccessors(element);\n if (accessors.length > 0) {\n const boundObservables = (this.boundObservables = Object.create(null));\n for (let i = 0, ii = accessors.length; i < ii; ++i) {\n const propertyName = accessors[i].name;\n const value = element[propertyName];\n if (value !== void 0) {\n delete element[propertyName];\n boundObservables[propertyName] = value;\n }\n }\n }\n }\n /**\n * Indicates whether or not the custom element has been\n * connected to the document.\n */\n get isConnected() {\n Observable.track(this, \"isConnected\");\n return this._isConnected;\n }\n setIsConnected(value) {\n this._isConnected = value;\n Observable.notify(this, \"isConnected\");\n }\n /**\n * Gets/sets the template used to render the component.\n * @remarks\n * This value can only be accurately read after connect but can be set at any time.\n */\n get template() {\n return this._template;\n }\n set template(value) {\n if (this._template === value) {\n return;\n }\n this._template = value;\n if (!this.needsInitialization) {\n this.renderTemplate(value);\n }\n }\n /**\n * Gets/sets the primary styles used for the component.\n * @remarks\n * This value can only be accurately read after connect but can be set at any time.\n */\n get styles() {\n return this._styles;\n }\n set styles(value) {\n if (this._styles === value) {\n return;\n }\n if (this._styles !== null) {\n this.removeStyles(this._styles);\n }\n this._styles = value;\n if (!this.needsInitialization && value !== null) {\n this.addStyles(value);\n }\n }\n /**\n * Adds styles to this element. Providing an HTMLStyleElement will attach the element instance to the shadowRoot.\n * @param styles - The styles to add.\n */\n addStyles(styles) {\n const target = getShadowRoot(this.element) ||\n this.element.getRootNode();\n if (styles instanceof HTMLStyleElement) {\n target.append(styles);\n }\n else if (!styles.isAttachedTo(target)) {\n const sourceBehaviors = styles.behaviors;\n styles.addStylesTo(target);\n if (sourceBehaviors !== null) {\n this.addBehaviors(sourceBehaviors);\n }\n }\n }\n /**\n * Removes styles from this element. Providing an HTMLStyleElement will detach the element instance from the shadowRoot.\n * @param styles - the styles to remove.\n */\n removeStyles(styles) {\n const target = getShadowRoot(this.element) ||\n this.element.getRootNode();\n if (styles instanceof HTMLStyleElement) {\n target.removeChild(styles);\n }\n else if (styles.isAttachedTo(target)) {\n const sourceBehaviors = styles.behaviors;\n styles.removeStylesFrom(target);\n if (sourceBehaviors !== null) {\n this.removeBehaviors(sourceBehaviors);\n }\n }\n }\n /**\n * Adds behaviors to this element.\n * @param behaviors - The behaviors to add.\n */\n addBehaviors(behaviors) {\n const targetBehaviors = this.behaviors || (this.behaviors = new Map());\n const length = behaviors.length;\n const behaviorsToBind = [];\n for (let i = 0; i < length; ++i) {\n const behavior = behaviors[i];\n if (targetBehaviors.has(behavior)) {\n targetBehaviors.set(behavior, targetBehaviors.get(behavior) + 1);\n }\n else {\n targetBehaviors.set(behavior, 1);\n behaviorsToBind.push(behavior);\n }\n }\n if (this._isConnected) {\n const element = this.element;\n for (let i = 0; i < behaviorsToBind.length; ++i) {\n behaviorsToBind[i].bind(element, defaultExecutionContext);\n }\n }\n }\n /**\n * Removes behaviors from this element.\n * @param behaviors - The behaviors to remove.\n * @param force - Forces unbinding of behaviors.\n */\n removeBehaviors(behaviors, force = false) {\n const targetBehaviors = this.behaviors;\n if (targetBehaviors === null) {\n return;\n }\n const length = behaviors.length;\n const behaviorsToUnbind = [];\n for (let i = 0; i < length; ++i) {\n const behavior = behaviors[i];\n if (targetBehaviors.has(behavior)) {\n const count = targetBehaviors.get(behavior) - 1;\n count === 0 || force\n ? targetBehaviors.delete(behavior) && behaviorsToUnbind.push(behavior)\n : targetBehaviors.set(behavior, count);\n }\n }\n if (this._isConnected) {\n const element = this.element;\n for (let i = 0; i < behaviorsToUnbind.length; ++i) {\n behaviorsToUnbind[i].unbind(element);\n }\n }\n }\n /**\n * Runs connected lifecycle behavior on the associated element.\n */\n onConnectedCallback() {\n if (this._isConnected) {\n return;\n }\n const element = this.element;\n if (this.needsInitialization) {\n this.finishInitialization();\n }\n else if (this.view !== null) {\n this.view.bind(element, defaultExecutionContext);\n }\n const behaviors = this.behaviors;\n if (behaviors !== null) {\n for (const [behavior] of behaviors) {\n behavior.bind(element, defaultExecutionContext);\n }\n }\n this.setIsConnected(true);\n }\n /**\n * Runs disconnected lifecycle behavior on the associated element.\n */\n onDisconnectedCallback() {\n if (!this._isConnected) {\n return;\n }\n this.setIsConnected(false);\n const view = this.view;\n if (view !== null) {\n view.unbind();\n }\n const behaviors = this.behaviors;\n if (behaviors !== null) {\n const element = this.element;\n for (const [behavior] of behaviors) {\n behavior.unbind(element);\n }\n }\n }\n /**\n * Runs the attribute changed callback for the associated element.\n * @param name - The name of the attribute that changed.\n * @param oldValue - The previous value of the attribute.\n * @param newValue - The new value of the attribute.\n */\n onAttributeChangedCallback(name, oldValue, newValue) {\n const attrDef = this.definition.attributeLookup[name];\n if (attrDef !== void 0) {\n attrDef.onAttributeChangedCallback(this.element, newValue);\n }\n }\n /**\n * Emits a custom HTML event.\n * @param type - The type name of the event.\n * @param detail - The event detail object to send with the event.\n * @param options - The event options. By default bubbles and composed.\n * @remarks\n * Only emits events if connected.\n */\n emit(type, detail, options) {\n if (this._isConnected) {\n return this.element.dispatchEvent(new CustomEvent(type, Object.assign(Object.assign({ detail }, defaultEventOptions), options)));\n }\n return false;\n }\n finishInitialization() {\n const element = this.element;\n const boundObservables = this.boundObservables;\n // If we have any observables that were bound, re-apply their values.\n if (boundObservables !== null) {\n const propertyNames = Object.keys(boundObservables);\n for (let i = 0, ii = propertyNames.length; i < ii; ++i) {\n const propertyName = propertyNames[i];\n element[propertyName] = boundObservables[propertyName];\n }\n this.boundObservables = null;\n }\n const definition = this.definition;\n // 1. Template overrides take top precedence.\n if (this._template === null) {\n if (this.element.resolveTemplate) {\n // 2. Allow for element instance overrides next.\n this._template = this.element.resolveTemplate();\n }\n else if (definition.template) {\n // 3. Default to the static definition.\n this._template = definition.template || null;\n }\n }\n // If we have a template after the above process, render it.\n // If there's no template, then the element author has opted into\n // custom rendering and they will managed the shadow root's content themselves.\n if (this._template !== null) {\n this.renderTemplate(this._template);\n }\n // 1. Styles overrides take top precedence.\n if (this._styles === null) {\n if (this.element.resolveStyles) {\n // 2. Allow for element instance overrides next.\n this._styles = this.element.resolveStyles();\n }\n else if (definition.styles) {\n // 3. Default to the static definition.\n this._styles = definition.styles || null;\n }\n }\n // If we have styles after the above process, add them.\n if (this._styles !== null) {\n this.addStyles(this._styles);\n }\n this.needsInitialization = false;\n }\n renderTemplate(template) {\n const element = this.element;\n // When getting the host to render to, we start by looking\n // up the shadow root. If there isn't one, then that means\n // we're doing a Light DOM render to the element's direct children.\n const host = getShadowRoot(element) || element;\n if (this.view !== null) {\n // If there's already a view, we need to unbind and remove through dispose.\n this.view.dispose();\n this.view = null;\n }\n else if (!this.needsInitialization) {\n // If there was previous custom rendering, we need to clear out the host.\n DOM.removeChildNodes(host);\n }\n if (template) {\n // If a new template was provided, render it.\n this.view = template.render(element, host, element);\n }\n }\n /**\n * Locates or creates a controller for the specified element.\n * @param element - The element to return the controller for.\n * @remarks\n * The specified element must have a {@link FASTElementDefinition}\n * registered either through the use of the {@link customElement}\n * decorator or a call to `FASTElement.define`.\n */\n static forCustomElement(element) {\n const controller = element.$fastController;\n if (controller !== void 0) {\n return controller;\n }\n const definition = FASTElementDefinition.forType(element.constructor);\n if (definition === void 0) {\n throw new Error(\"Missing FASTElement definition.\");\n }\n return (element.$fastController = new Controller(element, definition));\n }\n}\n","import { Controller } from \"./controller.js\";\nimport { FASTElementDefinition, } from \"./fast-definitions.js\";\n/* eslint-disable-next-line @typescript-eslint/explicit-function-return-type */\nfunction createFASTElement(BaseType) {\n return class extends BaseType {\n constructor() {\n /* eslint-disable-next-line */\n super();\n Controller.forCustomElement(this);\n }\n $emit(type, detail, options) {\n return this.$fastController.emit(type, detail, options);\n }\n connectedCallback() {\n this.$fastController.onConnectedCallback();\n }\n disconnectedCallback() {\n this.$fastController.onDisconnectedCallback();\n }\n attributeChangedCallback(name, oldValue, newValue) {\n this.$fastController.onAttributeChangedCallback(name, oldValue, newValue);\n }\n };\n}\n/**\n * A minimal base class for FASTElements that also provides\n * static helpers for working with FASTElements.\n * @public\n */\nexport const FASTElement = Object.assign(createFASTElement(HTMLElement), {\n /**\n * Creates a new FASTElement base class inherited from the\n * provided base type.\n * @param BaseType - The base element type to inherit from.\n */\n from(BaseType) {\n return createFASTElement(BaseType);\n },\n /**\n * Defines a platform custom element based on the provided type and definition.\n * @param type - The custom element type to define.\n * @param nameOrDef - The name of the element to define or a definition object\n * that describes the element to define.\n */\n define(type, nameOrDef) {\n return new FASTElementDefinition(type, nameOrDef).define().type;\n },\n});\n/**\n * Decorator: Defines a platform custom element based on `FASTElement`.\n * @param nameOrDef - The name of the element to define or a definition object\n * that describes the element to define.\n * @public\n */\nexport function customElement(nameOrDef) {\n /* eslint-disable-next-line @typescript-eslint/explicit-function-return-type */\n return function (type) {\n new FASTElementDefinition(type, nameOrDef).define();\n };\n}\n","import { $global } from \"./platform.js\";\nconst updateQueue = $global.FAST.getById(1 /* updateQueue */, () => {\n const tasks = [];\n const pendingErrors = [];\n function throwFirstError() {\n if (pendingErrors.length) {\n throw pendingErrors.shift();\n }\n }\n function tryRunTask(task) {\n try {\n task.call();\n }\n catch (error) {\n pendingErrors.push(error);\n setTimeout(throwFirstError, 0);\n }\n }\n function process() {\n const capacity = 1024;\n let index = 0;\n while (index < tasks.length) {\n tryRunTask(tasks[index]);\n index++;\n // Prevent leaking memory for long chains of recursive calls to `DOM.queueUpdate`.\n // If we call `DOM.queueUpdate` within a task scheduled by `DOM.queueUpdate`, the queue will\n // grow, but to avoid an O(n) walk for every task we execute, we don't\n // shift tasks off the queue after they have been executed.\n // Instead, we periodically shift 1024 tasks off the queue.\n if (index > capacity) {\n // Manually shift all values starting at the index back to the\n // beginning of the queue.\n for (let scan = 0, newLength = tasks.length - index; scan < newLength; scan++) {\n tasks[scan] = tasks[scan + index];\n }\n tasks.length -= index;\n index = 0;\n }\n }\n tasks.length = 0;\n }\n function enqueue(callable) {\n if (tasks.length < 1) {\n $global.requestAnimationFrame(process);\n }\n tasks.push(callable);\n }\n return Object.freeze({\n enqueue,\n process,\n });\n});\n/* eslint-disable */\nconst fastHTMLPolicy = $global.trustedTypes.createPolicy(\"fast-html\", {\n createHTML: html => html,\n});\n/* eslint-enable */\nlet htmlPolicy = fastHTMLPolicy;\nconst marker = `fast-${Math.random().toString(36).substring(2, 8)}`;\n/** @internal */\nexport const _interpolationStart = `${marker}{`;\n/** @internal */\nexport const _interpolationEnd = `}${marker}`;\n/**\n * Common DOM APIs.\n * @public\n */\nexport const DOM = Object.freeze({\n /**\n * Indicates whether the DOM supports the adoptedStyleSheets feature.\n */\n supportsAdoptedStyleSheets: Array.isArray(document.adoptedStyleSheets) &&\n \"replace\" in CSSStyleSheet.prototype,\n /**\n * Sets the HTML trusted types policy used by the templating engine.\n * @param policy - The policy to set for HTML.\n * @remarks\n * This API can only be called once, for security reasons. It should be\n * called by the application developer at the start of their program.\n */\n setHTMLPolicy(policy) {\n if (htmlPolicy !== fastHTMLPolicy) {\n throw new Error(\"The HTML policy can only be set once.\");\n }\n htmlPolicy = policy;\n },\n /**\n * Turns a string into trusted HTML using the configured trusted types policy.\n * @param html - The string to turn into trusted HTML.\n * @remarks\n * Used internally by the template engine when creating templates\n * and setting innerHTML.\n */\n createHTML(html) {\n return htmlPolicy.createHTML(html);\n },\n /**\n * Determines if the provided node is a template marker used by the runtime.\n * @param node - The node to test.\n */\n isMarker(node) {\n return node && node.nodeType === 8 && node.data.startsWith(marker);\n },\n /**\n * Given a marker node, extract the {@link HTMLDirective} index from the placeholder.\n * @param node - The marker node to extract the index from.\n */\n extractDirectiveIndexFromMarker(node) {\n return parseInt(node.data.replace(`${marker}:`, \"\"));\n },\n /**\n * Creates a placeholder string suitable for marking out a location *within*\n * an attribute value or HTML content.\n * @param index - The directive index to create the placeholder for.\n * @remarks\n * Used internally by binding directives.\n */\n createInterpolationPlaceholder(index) {\n return `${_interpolationStart}${index}${_interpolationEnd}`;\n },\n /**\n * Creates a placeholder that manifests itself as an attribute on an\n * element.\n * @param attributeName - The name of the custom attribute.\n * @param index - The directive index to create the placeholder for.\n * @remarks\n * Used internally by attribute directives such as `ref`, `slotted`, and `children`.\n */\n createCustomAttributePlaceholder(attributeName, index) {\n return `${attributeName}=\"${this.createInterpolationPlaceholder(index)}\"`;\n },\n /**\n * Creates a placeholder that manifests itself as a marker within the DOM structure.\n * @param index - The directive index to create the placeholder for.\n * @remarks\n * Used internally by structural directives such as `repeat`.\n */\n createBlockPlaceholder(index) {\n return `<!--${marker}:${index}-->`;\n },\n /**\n * Schedules DOM update work in the next async batch.\n * @param callable - The callable function or object to queue.\n */\n queueUpdate: updateQueue.enqueue,\n /**\n * Immediately processes all work previously scheduled\n * through queueUpdate.\n * @remarks\n * This also forces nextUpdate promises\n * to resolve.\n */\n processUpdates: updateQueue.process,\n /**\n * Resolves with the next DOM update.\n */\n nextUpdate() {\n return new Promise(updateQueue.enqueue);\n },\n /**\n * Sets an attribute value on an element.\n * @param element - The element to set the attribute value on.\n * @param attributeName - The attribute name to set.\n * @param value - The value of the attribute to set.\n * @remarks\n * If the value is `null` or `undefined`, the attribute is removed, otherwise\n * it is set to the provided value using the standard `setAttribute` API.\n */\n setAttribute(element, attributeName, value) {\n if (value === null || value === undefined) {\n element.removeAttribute(attributeName);\n }\n else {\n element.setAttribute(attributeName, value);\n }\n },\n /**\n * Sets a boolean attribute value.\n * @param element - The element to set the boolean attribute value on.\n * @param attributeName - The attribute name to set.\n * @param value - The value of the attribute to set.\n * @remarks\n * If the value is true, the attribute is added; otherwise it is removed.\n */\n setBooleanAttribute(element, attributeName, value) {\n value\n ? element.setAttribute(attributeName, \"\")\n : element.removeAttribute(attributeName);\n },\n /**\n * Removes all the child nodes of the provided parent node.\n * @param parent - The node to remove the children from.\n */\n removeChildNodes(parent) {\n for (let child = parent.firstChild; child !== null; child = parent.firstChild) {\n parent.removeChild(child);\n }\n },\n /**\n * Creates a TreeWalker configured to walk a template fragment.\n * @param fragment - The fragment to walk.\n */\n createTemplateWalker(fragment) {\n return document.createTreeWalker(fragment, 133, // element, text, comment\n null, false);\n },\n});\n","/**\n * An implementation of {@link Notifier} that efficiently keeps track of\n * subscribers interested in a specific change notification on an\n * observable source.\n *\n * @remarks\n * This set is optimized for the most common scenario of 1 or 2 subscribers.\n * With this in mind, it can store a subscriber in an internal field, allowing it to avoid Array#push operations.\n * If the set ever exceeds two subscribers, it upgrades to an array automatically.\n * @public\n */\nexport class SubscriberSet {\n /**\n * Creates an instance of SubscriberSet for the specified source.\n * @param source - The object source that subscribers will receive notifications from.\n * @param initialSubscriber - An initial subscriber to changes.\n */\n constructor(source, initialSubscriber) {\n this.sub1 = void 0;\n this.sub2 = void 0;\n this.spillover = void 0;\n this.source = source;\n this.sub1 = initialSubscriber;\n }\n /**\n * Checks whether the provided subscriber has been added to this set.\n * @param subscriber - The subscriber to test for inclusion in this set.\n */\n has(subscriber) {\n return this.spillover === void 0\n ? this.sub1 === subscriber || this.sub2 === subscriber\n : this.spillover.indexOf(subscriber) !== -1;\n }\n /**\n * Subscribes to notification of changes in an object's state.\n * @param subscriber - The object that is subscribing for change notification.\n */\n subscribe(subscriber) {\n const spillover = this.spillover;\n if (spillover === void 0) {\n if (this.has(subscriber)) {\n return;\n }\n if (this.sub1 === void 0) {\n this.sub1 = subscriber;\n return;\n }\n if (this.sub2 === void 0) {\n this.sub2 = subscriber;\n return;\n }\n this.spillover = [this.sub1, this.sub2, subscriber];\n this.sub1 = void 0;\n this.sub2 = void 0;\n }\n else {\n const index = spillover.indexOf(subscriber);\n if (index === -1) {\n spillover.push(subscriber);\n }\n }\n }\n /**\n * Unsubscribes from notification of changes in an object's state.\n * @param subscriber - The object that is unsubscribing from change notification.\n */\n unsubscribe(subscriber) {\n const spillover = this.spillover;\n if (spillover === void 0) {\n if (this.sub1 === subscriber) {\n this.sub1 = void 0;\n }\n else if (this.sub2 === subscriber) {\n this.sub2 = void 0;\n }\n }\n else {\n const index = spillover.indexOf(subscriber);\n if (index !== -1) {\n spillover.splice(index, 1);\n }\n }\n }\n /**\n * Notifies all subscribers.\n * @param args - Data passed along to subscribers during notification.\n */\n notify(args) {\n const spillover = this.spillover;\n const source = this.source;\n if (spillover === void 0) {\n const sub1 = this.sub1;\n const sub2 = this.sub2;\n if (sub1 !== void 0) {\n sub1.handleChange(source, args);\n }\n if (sub2 !== void 0) {\n sub2.handleChange(source, args);\n }\n }\n else {\n for (let i = 0, ii = spillover.length; i < ii; ++i) {\n spillover[i].handleChange(source, args);\n }\n }\n }\n}\n/**\n * An implementation of Notifier that allows subscribers to be notified\n * of individual property changes on an object.\n * @public\n */\nexport class PropertyChangeNotifier {\n /**\n * Creates an instance of PropertyChangeNotifier for the specified source.\n * @param source - The object source that subscribers will receive notifications from.\n */\n constructor(source) {\n this.subscribers = {};\n this.sourceSubscribers = null;\n this.source = source;\n }\n /**\n * Notifies all subscribers, based on the specified property.\n * @param propertyName - The property name, passed along to subscribers during notification.\n */\n notify(propertyName) {\n var _a;\n const subscribers = this.subscribers[propertyName];\n if (subscribers !== void 0) {\n subscribers.notify(propertyName);\n }\n (_a = this.sourceSubscribers) === null || _a === void 0 ? void 0 : _a.notify(propertyName);\n }\n /**\n * Subscribes to notification of changes in an object's state.\n * @param subscriber - The object that is subscribing for change notification.\n * @param propertyToWatch - The name of the property that the subscriber is interested in watching for changes.\n */\n subscribe(subscriber, propertyToWatch) {\n var _a;\n if (propertyToWatch) {\n let subscribers = this.subscribers[propertyToWatch];\n if (subscribers === void 0) {\n this.subscribers[propertyToWatch] = subscribers = new SubscriberSet(this.source);\n }\n subscribers.subscribe(subscriber);\n }\n else {\n this.sourceSubscribers =\n (_a = this.sourceSubscribers) !== null && _a !== void 0 ? _a : new SubscriberSet(this.source);\n this.sourceSubscribers.subscribe(subscriber);\n }\n }\n /**\n * Unsubscribes from notification of changes in an object's state.\n * @param subscriber - The object that is unsubscribing from change notification.\n * @param propertyToUnwatch - The name of the property that the subscriber is no longer interested in watching.\n */\n unsubscribe(subscriber, propertyToUnwatch) {\n var _a;\n if (propertyToUnwatch) {\n const subscribers = this.subscribers[propertyToUnwatch];\n if (subscribers !== void 0) {\n subscribers.unsubscribe(subscriber);\n }\n }\n else {\n (_a = this.sourceSubscribers) === null || _a === void 0 ? void 0 : _a.unsubscribe(subscriber);\n }\n }\n}\n","import { DOM } from \"../dom.js\";\nimport { createMetadataLocator, FAST } from \"../platform.js\";\nimport { PropertyChangeNotifier, SubscriberSet } from \"./notifier.js\";\n/**\n * Common Observable APIs.\n * @public\n */\nexport const Observable = FAST.getById(2 /* observable */, () => {\n const volatileRegex = /(:|&&|\\|\\||if)/;\n const notifierLookup = new WeakMap();\n const queueUpdate = DOM.queueUpdate;\n let watcher = void 0;\n let createArrayObserver = (array) => {\n throw new Error(\"Must call enableArrayObservation before observing arrays.\");\n };\n function getNotifier(source) {\n let found = source.$fastController || notifierLookup.get(source);\n if (found === void 0) {\n if (Array.isArray(source)) {\n found = createArrayObserver(source);\n }\n else {\n notifierLookup.set(source, (found = new PropertyChangeNotifier(source)));\n }\n }\n return found;\n }\n const getAccessors = createMetadataLocator();\n class DefaultObservableAccessor {\n constructor(name) {\n this.name = name;\n this.field = `_${name}`;\n this.callback = `${name}Changed`;\n }\n getValue(source) {\n if (watcher !== void 0) {\n watcher.watch(source, this.name);\n }\n return source[this.field];\n }\n setValue(source, newValue) {\n const field = this.field;\n const oldValue = source[field];\n if (oldValue !== newValue) {\n source[field] = newValue;\n const callback = source[this.callback];\n if (typeof callback === \"function\") {\n callback.call(source, oldValue, newValue);\n }\n getNotifier(source).notify(this.name);\n }\n }\n }\n class BindingObserverImplementation extends SubscriberSet {\n constructor(binding, initialSubscriber, isVolatileBinding = false) {\n super(binding, initialSubscriber);\n this.binding = binding;\n this.isVolatileBinding = isVolatileBinding;\n this.needsRefresh = true;\n this.needsQueue = true;\n this.first = this;\n this.last = null;\n this.propertySource = void 0;\n this.propertyName = void 0;\n this.notifier = void 0;\n this.next = void 0;\n }\n observe(source, context) {\n if (this.needsRefresh && this.last !== null) {\n this.disconnect();\n }\n const previousWatcher = watcher;\n watcher = this.needsRefresh ? this : void 0;\n this.needsRefresh = this.isVolatileBinding;\n const result = this.binding(source, context);\n watcher = previousWatcher;\n return result;\n }\n disconnect() {\n if (this.last !== null) {\n let current = this.first;\n while (current !== void 0) {\n current.notifier.unsubscribe(this, current.propertyName);\n current = current.next;\n }\n this.last = null;\n this.needsRefresh = this.needsQueue = true;\n }\n }\n watch(propertySource, propertyName) {\n const prev = this.last;\n const notifier = getNotifier(propertySource);\n const current = prev === null ? this.first : {};\n current.propertySource = propertySource;\n current.propertyName = propertyName;\n current.notifier = notifier;\n notifier.subscribe(this, propertyName);\n if (prev !== null) {\n if (!this.needsRefresh) {\n // Declaring the variable prior to assignment below circumvents\n // a bug in Angular's optimization process causing infinite recursion\n // of this watch() method. Details https://github.com/microsoft/fast/issues/4969\n let prevValue;\n watcher = void 0;\n /* eslint-disable-next-line */\n prevValue = prev.propertySource[prev.propertyName];\n /* eslint-disable-next-line @typescript-eslint/no-this-alias */\n watcher = this;\n if (propertySource === prevValue) {\n this.needsRefresh = true;\n }\n }\n prev.next = current;\n }\n this.last = current;\n }\n handleChange() {\n if (this.needsQueue) {\n this.needsQueue = false;\n queueUpdate(this);\n }\n }\n call() {\n if (this.last !== null) {\n this.needsQueue = true;\n this.notify(this);\n }\n }\n records() {\n let next = this.first;\n return {\n next: () => {\n const current = next;\n if (current === undefined) {\n return { value: void 0, done: true };\n }\n else {\n next = next.next;\n return {\n value: current,\n done: false,\n };\n }\n },\n [Symbol.iterator]: function () {\n return this;\n },\n };\n }\n }\n return Object.freeze({\n /**\n * @internal\n * @param factory - The factory used to create array observers.\n */\n setArrayObserverFactory(factory) {\n createArrayObserver = factory;\n },\n /**\n * Gets a notifier for an object or Array.\n * @param source - The object or Array to get the notifier for.\n */\n getNotifier,\n /**\n * Records a property change for a source object.\n * @param source - The object to record the change against.\n * @param propertyName - The property to track as changed.\n */\n track(source, propertyName) {\n if (watcher !== void 0) {\n watcher.watch(source, propertyName);\n }\n },\n /**\n * Notifies watchers that the currently executing property getter or function is volatile\n * with respect to its observable dependencies.\n */\n trackVolatile() {\n if (watcher !== void 0) {\n watcher.needsRefresh = true;\n }\n },\n /**\n * Notifies subscribers of a source object of changes.\n * @param source - the object to notify of changes.\n * @param args - The change args to pass to subscribers.\n */\n notify(source, args) {\n getNotifier(source).notify(args);\n },\n /**\n * Defines an observable property on an object or prototype.\n * @param target - The target object to define the observable on.\n * @param nameOrAccessor - The name of the property to define as observable;\n * or a custom accessor that specifies the property name and accessor implementation.\n */\n defineProperty(target, nameOrAccessor) {\n if (typeof nameOrAccessor === \"string\") {\n nameOrAccessor = new DefaultObservableAccessor(nameOrAccessor);\n }\n getAccessors(target).push(nameOrAccessor);\n Reflect.defineProperty(target, nameOrAccessor.name, {\n enumerable: true,\n get: function () {\n return nameOrAccessor.getValue(this);\n },\n set: function (newValue) {\n nameOrAccessor.setValue(this, newValue);\n },\n });\n },\n /**\n * Finds all the observable accessors defined on the target,\n * including its prototype chain.\n * @param target - The target object to search for accessor on.\n */\n getAccessors,\n /**\n * Creates a {@link BindingObserver} that can watch the\n * provided {@link Binding} for changes.\n * @param binding - The binding to observe.\n * @param initialSubscriber - An initial subscriber to changes in the binding value.\n * @param isVolatileBinding - Indicates whether the binding's dependency list must be re-evaluated on every value evaluation.\n */\n binding(binding, initialSubscriber, isVolatileBinding = this.isVolatileBinding(binding)) {\n return new BindingObserverImplementation(binding, initialSubscriber, isVolatileBinding);\n },\n /**\n * Determines whether a binding expression is volatile and needs to have its dependency list re-evaluated\n * on every evaluation of the value.\n * @param binding - The binding to inspect.\n */\n isVolatileBinding(binding) {\n return volatileRegex.test(binding.toString());\n },\n });\n});\n/**\n * Decorator: Defines an observable property on the target.\n * @param target - The target to define the observable on.\n * @param nameOrAccessor - The property name or accessor to define the observable as.\n * @public\n */\nexport function observable(target, nameOrAccessor) {\n Observable.defineProperty(target, nameOrAccessor);\n}\n/**\n * Decorator: Marks a property getter as having volatile observable dependencies.\n * @param target - The target that the property is defined on.\n * @param name - The property name.\n * @param name - The existing descriptor.\n * @public\n */\nexport function volatile(target, name, descriptor) {\n return Object.assign({}, descriptor, {\n get: function () {\n Observable.trackVolatile();\n return descriptor.get.apply(this);\n },\n });\n}\nconst contextEvent = FAST.getById(3 /* contextEvent */, () => {\n let current = null;\n return {\n get() {\n return current;\n },\n set(event) {\n current = event;\n },\n };\n});\n/**\n * Provides additional contextual information available to behaviors and expressions.\n * @public\n */\nexport class ExecutionContext {\n constructor() {\n /**\n * The index of the current item within a repeat context.\n */\n this.index = 0;\n /**\n * The length of the current collection within a repeat context.\n */\n this.length = 0;\n /**\n * The parent data object within a repeat context.\n */\n this.parent = null;\n /**\n * The parent execution context when in nested context scenarios.\n */\n this.parentContext = null;\n }\n /**\n * The current event within an event handler.\n */\n get event() {\n return contextEvent.get();\n }\n /**\n * Indicates whether the current item within a repeat context\n * has an even index.\n */\n get isEven() {\n return this.index % 2 === 0;\n }\n /**\n * Indicates whether the current item within a repeat context\n * has an odd index.\n */\n get isOdd() {\n return this.index % 2 !== 0;\n }\n /**\n * Indicates whether the current item within a repeat context\n * is the first item in the collection.\n */\n get isFirst() {\n return this.index === 0;\n }\n /**\n * Indicates whether the current item within a repeat context\n * is somewhere in the middle of the collection.\n */\n get isInMiddle() {\n return !this.isFirst && !this.isLast;\n }\n /**\n * Indicates whether the current item within a repeat context\n * is the last item in the collection.\n */\n get isLast() {\n return this.index === this.length - 1;\n }\n /**\n * Sets the event for the current execution context.\n * @param event - The event to set.\n * @internal\n */\n static setEvent(event) {\n contextEvent.set(event);\n }\n}\nObservable.defineProperty(ExecutionContext.prototype, \"index\");\nObservable.defineProperty(ExecutionContext.prototype, \"length\");\n/**\n * The default execution context used in binding expressions.\n * @public\n */\nexport const defaultExecutionContext = Object.seal(new ExecutionContext());\n","/**\n * A reference to globalThis, with support\n * for browsers that don't yet support the spec.\n * @public\n */\nexport const $global = (function () {\n if (typeof globalThis !== \"undefined\") {\n // We're running in a modern environment.\n return globalThis;\n }\n if (typeof global !== \"undefined\") {\n // We're running in NodeJS\n return global;\n }\n if (typeof self !== \"undefined\") {\n // We're running in a worker.\n return self;\n }\n if (typeof window !== \"undefined\") {\n // We're running in the browser's main thread.\n return window;\n }\n try {\n // Hopefully we never get here...\n // Not all environments allow eval and Function. Use only as a last resort:\n // eslint-disable-next-line no-new-func\n return new Function(\"return this\")();\n }\n catch (_a) {\n // If all fails, give up and create an object.\n // eslint-disable-next-line @typescript-eslint/consistent-type-assertions\n return {};\n }\n})();\n// API-only Polyfill for trustedTypes\nif ($global.trustedTypes === void 0) {\n $global.trustedTypes = { createPolicy: (n, r) => r };\n}\nconst propConfig = {\n configurable: false,\n enumerable: false,\n writable: false,\n};\nif ($global.FAST === void 0) {\n Reflect.defineProperty($global, \"FAST\", Object.assign({ value: Object.create(null) }, propConfig));\n}\n/**\n * The FAST global.\n * @internal\n */\nexport const FAST = $global.FAST;\nif (FAST.getById === void 0) {\n const storage = Object.create(null);\n Reflect.defineProperty(FAST, \"getById\", Object.assign({ value(id, initialize) {\n let found = storage[id];\n if (found === void 0) {\n found = initialize ? (storage[id] = initialize()) : null;\n }\n return found;\n } }, propConfig));\n}\n/**\n * A readonly, empty array.\n * @remarks\n * Typically returned by APIs that return arrays when there are\n * no actual items to return.\n * @internal\n */\nexport const emptyArray = Object.freeze([]);\n/**\n * Creates a function capable of locating metadata associated with a type.\n * @returns A metadata locator function.\n * @internal\n */\nexport function createMetadataLocator() {\n const metadataLookup = new WeakMap();\n return function (target) {\n let metadata = metadataLookup.get(target);\n if (metadata === void 0) {\n let currentTarget = Reflect.getPrototypeOf(target);\n while (metadata === void 0 && currentTarget !== null) {\n metadata = metadataLookup.get(currentTarget);\n currentTarget = Reflect.getPrototypeOf(currentTarget);\n }\n metadata = metadata === void 0 ? [] : metadata.slice(0);\n metadataLookup.set(target, metadata);\n }\n return metadata;\n };\n}\n","/**\n * Directive for use in {@link css}.\n *\n * @public\n */\nexport class CSSDirective {\n /**\n * Creates a CSS fragment to interpolate into the CSS document.\n * @returns - the string to interpolate into CSS\n */\n createCSS() {\n return \"\";\n }\n /**\n * Creates a behavior to bind to the host element.\n * @returns - the behavior to bind to the host element, or undefined.\n */\n createBehavior() {\n return undefined;\n }\n}\n","import { CSSDirective } from \"./css-directive.js\";\nimport { ElementStyles } from \"./element-styles.js\";\nfunction collectStyles(strings, values) {\n const styles = [];\n let cssString = \"\";\n const behaviors = [];\n for (let i = 0, ii = strings.length - 1; i < ii; ++i) {\n cssString += strings[i];\n let value = values[i];\n if (value instanceof CSSDirective) {\n const behavior = value.createBehavior();\n value = value.createCSS();\n if (behavior) {\n behaviors.push(behavior);\n }\n }\n if (value instanceof ElementStyles || value instanceof CSSStyleSheet) {\n if (cssString.trim() !== \"\") {\n styles.push(cssString);\n cssString = \"\";\n }\n styles.push(value);\n }\n else {\n cssString += value;\n }\n }\n cssString += strings[strings.length - 1];\n if (cssString.trim() !== \"\") {\n styles.push(cssString);\n }\n return {\n styles,\n behaviors,\n };\n}\n/**\n * Transforms a template literal string into styles.\n * @param strings - The string fragments that are interpolated with the values.\n * @param values - The values that are interpolated with the string fragments.\n * @remarks\n * The css helper supports interpolation of strings and ElementStyle instances.\n * @public\n */\nexport function css(strings, ...values) {\n const { styles, behaviors } = collectStyles(strings, values);\n const elementStyles = ElementStyles.create(styles);\n if (behaviors.length) {\n elementStyles.withBehaviors(...behaviors);\n }\n return elementStyles;\n}\nclass CSSPartial extends CSSDirective {\n constructor(styles, behaviors) {\n super();\n this.behaviors = behaviors;\n this.css = \"\";\n const stylesheets = styles.reduce((accumulated, current) => {\n if (typeof current === \"string\") {\n this.css += current;\n }\n else {\n accumulated.push(current);\n }\n return accumulated;\n }, []);\n if (stylesheets.length) {\n this.styles = ElementStyles.create(stylesheets);\n }\n }\n createBehavior() {\n return this;\n }\n createCSS() {\n return this.css;\n }\n bind(el) {\n if (this.styles) {\n el.$fastController.addStyles(this.styles);\n }\n if (this.behaviors.length) {\n el.$fastController.addBehaviors(this.behaviors);\n }\n }\n unbind(el) {\n if (this.styles) {\n el.$fastController.removeStyles(this.styles);\n }\n if (this.behaviors.length) {\n el.$fastController.removeBehaviors(this.behaviors);\n }\n }\n}\n/**\n * Transforms a template literal string into partial CSS.\n * @param strings - The string fragments that are interpolated with the values.\n * @param values - The values that are interpolated with the string fragments.\n * @public\n */\nexport function cssPartial(strings, ...values) {\n const { styles, behaviors } = collectStyles(strings, values);\n return new CSSPartial(styles, behaviors);\n}\n","import { DOM } from \"../dom.js\";\n/**\n * Represents styles that can be applied to a custom element.\n * @public\n */\nexport class ElementStyles {\n constructor() {\n this.targets = new WeakSet();\n }\n /** @internal */\n addStylesTo(target) {\n this.targets.add(target);\n }\n /** @internal */\n removeStylesFrom(target) {\n this.targets.delete(target);\n }\n /** @internal */\n isAttachedTo(target) {\n return this.targets.has(target);\n }\n /**\n * Associates behaviors with this set of styles.\n * @param behaviors - The behaviors to associate.\n */\n withBehaviors(...behaviors) {\n this.behaviors =\n this.behaviors === null ? behaviors : this.behaviors.concat(behaviors);\n return this;\n }\n}\n/**\n * Create ElementStyles from ComposableStyles.\n */\nElementStyles.create = (() => {\n if (DOM.supportsAdoptedStyleSheets) {\n const styleSheetCache = new Map();\n return (styles) => \n // eslint-disable-next-line @typescript-eslint/no-use-before-define\n new AdoptedStyleSheetsStyles(styles, styleSheetCache);\n }\n // eslint-disable-next-line @typescript-eslint/no-use-before-define\n return (styles) => new StyleElementStyles(styles);\n})();\nfunction reduceStyles(styles) {\n return styles\n .map((x) => x instanceof ElementStyles ? reduceStyles(x.styles) : [x])\n .reduce((prev, curr) => prev.concat(curr), []);\n}\nfunction reduceBehaviors(styles) {\n return styles\n .map((x) => (x instanceof ElementStyles ? x.behaviors : null))\n .reduce((prev, curr) => {\n if (curr === null) {\n return prev;\n }\n if (prev === null) {\n prev = [];\n }\n return prev.concat(curr);\n }, null);\n}\n/**\n * A Symbol that can be added to a CSSStyleSheet to cause it to be prepended (rather than appended) to adoptedStyleSheets.\n * @public\n */\nexport const prependToAdoptedStyleSheetsSymbol = Symbol(\"prependToAdoptedStyleSheets\");\nfunction separateSheetsToPrepend(sheets) {\n const prepend = [];\n const append = [];\n sheets.forEach(x => (x[prependToAdoptedStyleSheetsSymbol] ? prepend : append).push(x));\n return { prepend, append };\n}\nlet addAdoptedStyleSheets = (target, sheets) => {\n const { prepend, append } = separateSheetsToPrepend(sheets);\n target.adoptedStyleSheets = [...prepend, ...target.adoptedStyleSheets, ...append];\n};\nlet removeAdoptedStyleSheets = (target, sheets) => {\n target.adoptedStyleSheets = target.adoptedStyleSheets.filter((x) => sheets.indexOf(x) === -1);\n};\nif (DOM.supportsAdoptedStyleSheets) {\n try {\n // Test if browser implementation uses FrozenArray.\n // If not, use push / splice to alter the stylesheets\n // in place. This circumvents a bug in Safari 16.4 where\n // periodically, assigning the array would previously\n // cause sheets to be removed.\n document.adoptedStyleSheets.push();\n document.adoptedStyleSheets.splice();\n addAdoptedStyleSheets = (target, sheets) => {\n const { prepend, append } = separateSheetsToPrepend(sheets);\n target.adoptedStyleSheets.splice(0, 0, ...prepend);\n target.adoptedStyleSheets.push(...append);\n };\n removeAdoptedStyleSheets = (target, sheets) => {\n for (const sheet of sheets) {\n const index = target.adoptedStyleSheets.indexOf(sheet);\n if (index !== -1) {\n target.adoptedStyleSheets.splice(index, 1);\n }\n }\n };\n }\n catch (e) {\n // Do nothing if an error is thrown, the default\n // case handles FrozenArray.\n }\n}\n/**\n * https://wicg.github.io/construct-stylesheets/\n * https://developers.google.com/web/updates/2019/02/constructable-stylesheets\n *\n * @internal\n */\nexport class AdoptedStyleSheetsStyles extends ElementStyles {\n constructor(styles, styleSheetCache) {\n super();\n this.styles = styles;\n this.styleSheetCache = styleSheetCache;\n this._styleSheets = void 0;\n this.behaviors = reduceBehaviors(styles);\n }\n get styleSheets() {\n if (this._styleSheets === void 0) {\n const styles = this.styles;\n const styleSheetCache = this.styleSheetCache;\n this._styleSheets = reduceStyles(styles).map((x) => {\n if (x instanceof CSSStyleSheet) {\n return x;\n }\n let sheet = styleSheetCache.get(x);\n if (sheet === void 0) {\n sheet = new CSSStyleSheet();\n sheet.replaceSync(x);\n styleSheetCache.set(x, sheet);\n }\n return sheet;\n });\n }\n return this._styleSheets;\n }\n addStylesTo(target) {\n addAdoptedStyleSheets(target, this.styleSheets);\n super.addStylesTo(target);\n }\n removeStylesFrom(target) {\n removeAdoptedStyleSheets(target, this.styleSheets);\n super.removeStylesFrom(target);\n }\n}\nlet styleClassId = 0;\nfunction getNextStyleClass() {\n return `fast-style-class-${++styleClassId}`;\n}\n/**\n * @internal\n */\nexport class StyleElementStyles extends ElementStyles {\n constructor(styles) {\n super();\n this.styles = styles;\n this.behaviors = null;\n this.behaviors = reduceBehaviors(styles);\n this.styleSheets = reduceStyles(styles);\n this.styleClass = getNextStyleClass();\n }\n addStylesTo(target) {\n const styleSheets = this.styleSheets;\n const styleClass = this.styleClass;\n target = this.normalizeTarget(target);\n for (let i = 0; i < styleSheets.length; i++) {\n const element = document.createElement(\"style\");\n element.innerHTML = styleSheets[i];\n element.className = styleClass;\n target.append(element);\n }\n super.addStylesTo(target);\n }\n removeStylesFrom(target) {\n target = this.normalizeTarget(target);\n const styles = target.querySelectorAll(`.${this.styleClass}`);\n for (let i = 0, ii = styles.length; i < ii; ++i) {\n target.removeChild(styles[i]);\n }\n super.removeStylesFrom(target);\n }\n isAttachedTo(target) {\n return super.isAttachedTo(this.normalizeTarget(target));\n }\n normalizeTarget(target) {\n return target === document ? document.body : target;\n }\n}\n","import { DOM } from \"../dom.js\";\n/**\n * Instructs the template engine to apply behavior to a node.\n * @public\n */\nexport class HTMLDirective {\n constructor() {\n /**\n * The index of the DOM node to which the created behavior will apply.\n */\n this.targetIndex = 0;\n }\n}\n/**\n * A {@link HTMLDirective} that targets a named attribute or property on a node.\n * @public\n */\nexport class TargetedHTMLDirective extends HTMLDirective {\n constructor() {\n super(...arguments);\n /**\n * Creates a placeholder string based on the directive's index within the template.\n * @param index - The index of the directive within the template.\n */\n this.createPlaceholder = DOM.createInterpolationPlaceholder;\n }\n}\n/**\n * A directive that attaches special behavior to an element via a custom attribute.\n * @public\n */\nexport class AttachedBehaviorHTMLDirective extends HTMLDirective {\n /**\n *\n * @param name - The name of the behavior; used as a custom attribute on the element.\n * @param behavior - The behavior to instantiate and attach to the element.\n * @param options - Options to pass to the behavior during creation.\n */\n constructor(name, behavior, options) {\n super();\n this.name = name;\n this.behavior = behavior;\n this.options = options;\n }\n /**\n * Creates a placeholder string based on the directive's index within the template.\n * @param index - The index of the directive within the template.\n * @remarks\n * Creates a custom attribute placeholder.\n */\n createPlaceholder(index) {\n return DOM.createCustomAttributePlaceholder(this.name, index);\n }\n /**\n * Creates a behavior for the provided target node.\n * @param target - The node instance to create the behavior for.\n * @remarks\n * Creates an instance of the `behavior` type this directive was constructed with\n * and passes the target and options to that `behavior`'s constructor.\n */\n createBehavior(target) {\n return new this.behavior(target, this.options);\n }\n}\n","import { DOM } from \"../dom.js\";\nimport { ExecutionContext, Observable, } from \"../observation/observable.js\";\nimport { TargetedHTMLDirective } from \"./html-directive.js\";\nfunction normalBind(source, context) {\n this.source = source;\n this.context = context;\n if (this.bindingObserver === null) {\n this.bindingObserver = Observable.binding(this.binding, this, this.isBindingVolatile);\n }\n this.updateTarget(this.bindingObserver.observe(source, context));\n}\nfunction triggerBind(source, context) {\n this.source = source;\n this.context = context;\n this.target.addEventListener(this.targetName, this);\n}\nfunction normalUnbind() {\n this.bindingObserver.disconnect();\n this.source = null;\n this.context = null;\n}\nfunction contentUnbind() {\n this.bindingObserver.disconnect();\n this.source = null;\n this.context = null;\n const view = this.target.$fastView;\n if (view !== void 0 && view.isComposed) {\n view.unbind();\n view.needsBindOnly = true;\n }\n}\nfunction triggerUnbind() {\n this.target.removeEventListener(this.targetName, this);\n this.source = null;\n this.context = null;\n}\nfunction updateAttributeTarget(value) {\n DOM.setAttribute(this.target, this.targetName, value);\n}\nfunction updateBooleanAttributeTarget(value) {\n DOM.setBooleanAttribute(this.target, this.targetName, value);\n}\nfunction updateContentTarget(value) {\n // If there's no actual value, then this equates to the\n // empty string for the purposes of content bindings.\n if (value === null || value === undefined) {\n value = \"\";\n }\n // If the value has a \"create\" method, then it's a template-like.\n if (value.create) {\n this.target.textContent = \"\";\n let view = this.target.$fastView;\n // If there's no previous view that we might be able to\n // reuse then create a new view from the template.\n if (view === void 0) {\n view = value.create();\n }\n else {\n // If there is a previous view, but it wasn't created\n // from the same template as the new value, then we\n // need to remove the old view if it's still in the DOM\n // and create a new view from the template.\n if (this.target.$fastTemplate !== value) {\n if (view.isComposed) {\n view.remove();\n view.unbind();\n }\n view = value.create();\n }\n }\n // It's possible that the value is the same as the previous template\n // and that there's actually no need to compose it.\n if (!view.isComposed) {\n view.isComposed = true;\n view.bind(this.source, this.context);\n view.insertBefore(this.target);\n this.target.$fastView = view;\n this.target.$fastTemplate = value;\n }\n else if (view.needsBindOnly) {\n view.needsBindOnly = false;\n view.bind(this.source, this.context);\n }\n }\n else {\n const view = this.target.$fastView;\n // If there is a view and it's currently composed into\n // the DOM, then we need to remove it.\n if (view !== void 0 && view.isComposed) {\n view.isComposed = false;\n view.remove();\n if (view.needsBindOnly) {\n view.needsBindOnly = false;\n }\n else {\n view.unbind();\n }\n }\n this.target.textContent = value;\n }\n}\nfunction updatePropertyTarget(value) {\n this.target[this.targetName] = value;\n}\nfunction updateClassTarget(value) {\n const classVersions = this.classVersions || Object.create(null);\n const target = this.target;\n let version = this.version || 0;\n // Add the classes, tracking the version at which they were added.\n if (value !== null && value !== undefined && value.length) {\n const names = value.split(/\\s+/);\n for (let i = 0, ii = names.length; i < ii; ++i) {\n const currentName = names[i];\n if (currentName === \"\") {\n continue;\n }\n classVersions[currentName] = version;\n target.classList.add(currentName);\n }\n }\n this.classVersions = classVersions;\n this.version = version + 1;\n // If this is the first call to add classes, there's no need to remove old ones.\n if (version === 0) {\n return;\n }\n // Remove classes from the previous version.\n version -= 1;\n for (const name in classVersions) {\n if (classVersions[name] === version) {\n target.classList.remove(name);\n }\n }\n}\n/**\n * A directive that configures data binding to element content and attributes.\n * @public\n */\nexport class HTMLBindingDirective extends TargetedHTMLDirective {\n /**\n * Creates an instance of BindingDirective.\n * @param binding - A binding that returns the data used to update the DOM.\n */\n constructor(binding) {\n super();\n this.binding = binding;\n this.bind = normalBind;\n this.unbind = normalUnbind;\n this.updateTarget = updateAttributeTarget;\n this.isBindingVolatile = Observable.isVolatileBinding(this.binding);\n }\n /**\n * Gets/sets the name of the attribute or property that this\n * binding is targeting.\n */\n get targetName() {\n return this.originalTargetName;\n }\n set targetName(value) {\n this.originalTargetName = value;\n if (value === void 0) {\n return;\n }\n switch (value[0]) {\n case \":\":\n this.cleanedTargetName = value.substr(1);\n this.updateTarget = updatePropertyTarget;\n if (this.cleanedTargetName === \"innerHTML\") {\n const binding = this.binding;\n this.binding = (s, c) => DOM.createHTML(binding(s, c));\n }\n break;\n case \"?\":\n this.cleanedTargetName = value.substr(1);\n this.updateTarget = updateBooleanAttributeTarget;\n break;\n case \"@\":\n this.cleanedTargetName = value.substr(1);\n this.bind = triggerBind;\n this.unbind = triggerUnbind;\n break;\n default:\n this.cleanedTargetName = value;\n if (value === \"class\") {\n this.updateTarget = updateClassTarget;\n }\n break;\n }\n }\n /**\n * Makes this binding target the content of an element rather than\n * a particular attribute or property.\n */\n targetAtContent() {\n this.updateTarget = updateContentTarget;\n this.unbind = contentUnbind;\n }\n /**\n * Creates the runtime BindingBehavior instance based on the configuration\n * information stored in the BindingDirective.\n * @param target - The target node that the binding behavior should attach to.\n */\n createBehavior(target) {\n /* eslint-disable-next-line @typescript-eslint/no-use-before-define */\n return new BindingBehavior(target, this.binding, this.isBindingVolatile, this.bind, this.unbind, this.updateTarget, this.cleanedTargetName);\n }\n}\n/**\n * A behavior that updates content and attributes based on a configured\n * BindingDirective.\n * @public\n */\nexport class BindingBehavior {\n /**\n * Creates an instance of BindingBehavior.\n * @param target - The target of the data updates.\n * @param binding - The binding that returns the latest value for an update.\n * @param isBindingVolatile - Indicates whether the binding has volatile dependencies.\n * @param bind - The operation to perform during binding.\n * @param unbind - The operation to perform during unbinding.\n * @param updateTarget - The operation to perform when updating.\n * @param targetName - The name of the target attribute or property to update.\n */\n constructor(target, binding, isBindingVolatile, bind, unbind, updateTarget, targetName) {\n /** @internal */\n this.source = null;\n /** @internal */\n this.context = null;\n /** @internal */\n this.bindingObserver = null;\n this.target = target;\n this.binding = binding;\n this.isBindingVolatile = isBindingVolatile;\n this.bind = bind;\n this.unbind = unbind;\n this.updateTarget = updateTarget;\n this.targetName = targetName;\n }\n /** @internal */\n handleChange() {\n this.updateTarget(this.bindingObserver.observe(this.source, this.context));\n }\n /** @internal */\n handleEvent(event) {\n ExecutionContext.setEvent(event);\n const result = this.binding(this.source, this.context);\n ExecutionContext.setEvent(null);\n if (result !== true) {\n event.preventDefault();\n }\n }\n}\n","import { _interpolationEnd, _interpolationStart, DOM } from \"../dom.js\";\nimport { HTMLBindingDirective } from \"./binding.js\";\nlet sharedContext = null;\nclass CompilationContext {\n addFactory(factory) {\n factory.targetIndex = this.targetIndex;\n this.behaviorFactories.push(factory);\n }\n captureContentBinding(directive) {\n directive.targetAtContent();\n this.addFactory(directive);\n }\n reset() {\n this.behaviorFactories = [];\n this.targetIndex = -1;\n }\n release() {\n /* eslint-disable-next-line @typescript-eslint/no-this-alias */\n sharedContext = this;\n }\n static borrow(directives) {\n const shareable = sharedContext || new CompilationContext();\n shareable.directives = directives;\n shareable.reset();\n sharedContext = null;\n return shareable;\n }\n}\nfunction createAggregateBinding(parts) {\n if (parts.length === 1) {\n return parts[0];\n }\n let targetName;\n const partCount = parts.length;\n const finalParts = parts.map((x) => {\n if (typeof x === \"string\") {\n return () => x;\n }\n targetName = x.targetName || targetName;\n return x.binding;\n });\n const binding = (scope, context) => {\n let output = \"\";\n for (let i = 0; i < partCount; ++i) {\n output += finalParts[i](scope, context);\n }\n return output;\n };\n const directive = new HTMLBindingDirective(binding);\n directive.targetName = targetName;\n return directive;\n}\nconst interpolationEndLength = _interpolationEnd.length;\nfunction parseContent(context, value) {\n const valueParts = value.split(_interpolationStart);\n if (valueParts.length === 1) {\n return null;\n }\n const bindingParts = [];\n for (let i = 0, ii = valueParts.length; i < ii; ++i) {\n const current = valueParts[i];\n const index = current.indexOf(_interpolationEnd);\n let literal;\n if (index === -1) {\n literal = current;\n }\n else {\n const directiveIndex = parseInt(current.substring(0, index));\n bindingParts.push(context.directives[directiveIndex]);\n literal = current.substring(index + interpolationEndLength);\n }\n if (literal !== \"\") {\n bindingParts.push(literal);\n }\n }\n return bindingParts;\n}\nfunction compileAttributes(context, node, includeBasicValues = false) {\n const attributes = node.attributes;\n for (let i = 0, ii = attributes.length; i < ii; ++i) {\n const attr = attributes[i];\n const attrValue = attr.value;\n const parseResult = parseContent(context, attrValue);\n let result = null;\n if (parseResult === null) {\n if (includeBasicValues) {\n result = new HTMLBindingDirective(() => attrValue);\n result.targetName = attr.name;\n }\n }\n else {\n result = createAggregateBinding(parseResult);\n }\n if (result !== null) {\n node.removeAttributeNode(attr);\n i--;\n ii--;\n context.addFactory(result);\n }\n }\n}\nfunction compileContent(context, node, walker) {\n const parseResult = parseContent(context, node.textContent);\n if (parseResult !== null) {\n let lastNode = node;\n for (let i = 0, ii = parseResult.length; i < ii; ++i) {\n const currentPart = parseResult[i];\n const currentNode = i === 0\n ? node\n : lastNode.parentNode.insertBefore(document.createTextNode(\"\"), lastNode.nextSibling);\n if (typeof currentPart === \"string\") {\n currentNode.textContent = currentPart;\n }\n else {\n currentNode.textContent = \" \";\n context.captureContentBinding(currentPart);\n }\n lastNode = currentNode;\n context.targetIndex++;\n if (currentNode !== node) {\n walker.nextNode();\n }\n }\n context.targetIndex--;\n }\n}\n/**\n * Compiles a template and associated directives into a raw compilation\n * result which include a cloneable DocumentFragment and factories capable\n * of attaching runtime behavior to nodes within the fragment.\n * @param template - The template to compile.\n * @param directives - The directives referenced by the template.\n * @remarks\n * The template that is provided for compilation is altered in-place\n * and cannot be compiled again. If the original template must be preserved,\n * it is recommended that you clone the original and pass the clone to this API.\n * @public\n */\nexport function compileTemplate(template, directives) {\n const fragment = template.content;\n // https://bugs.chromium.org/p/chromium/issues/detail?id=1111864\n document.adoptNode(fragment);\n const context = CompilationContext.borrow(directives);\n compileAttributes(context, template, true);\n const hostBehaviorFactories = context.behaviorFactories;\n context.reset();\n const walker = DOM.createTemplateWalker(fragment);\n let node;\n while ((node = walker.nextNode())) {\n context.targetIndex++;\n switch (node.nodeType) {\n case 1: // element node\n compileAttributes(context, node);\n break;\n case 3: // text node\n compileContent(context, node, walker);\n break;\n case 8: // comment\n if (DOM.isMarker(node)) {\n context.addFactory(directives[DOM.extractDirectiveIndexFromMarker(node)]);\n }\n }\n }\n let targetOffset = 0;\n if (\n // If the first node in a fragment is a marker, that means it's an unstable first node,\n // because something like a when, repeat, etc. could add nodes before the marker.\n // To mitigate this, we insert a stable first node. However, if we insert a node,\n // that will alter the result of the TreeWalker. So, we also need to offset the target index.\n DOM.isMarker(fragment.firstChild) ||\n // Or if there is only one node and a directive, it means the template's content\n // is *only* the directive. In that case, HTMLView.dispose() misses any nodes inserted by\n // the directive. Inserting a new node ensures proper disposal of nodes added by the directive.\n (fragment.childNodes.length === 1 && directives.length)) {\n fragment.insertBefore(document.createComment(\"\"), fragment.firstChild);\n targetOffset = -1;\n }\n const viewBehaviorFactories = context.behaviorFactories;\n context.release();\n return {\n fragment,\n viewBehaviorFactories,\n hostBehaviorFactories,\n targetOffset,\n };\n}\n","// A singleton Range instance used to efficiently remove ranges of DOM nodes.\n// See the implementation of HTMLView below for further details.\nconst range = document.createRange();\n/**\n * The standard View implementation, which also implements ElementView and SyntheticView.\n * @public\n */\nexport class HTMLView {\n /**\n * Constructs an instance of HTMLView.\n * @param fragment - The html fragment that contains the nodes for this view.\n * @param behaviors - The behaviors to be applied to this view.\n */\n constructor(fragment, behaviors) {\n this.fragment = fragment;\n this.behaviors = behaviors;\n /**\n * The data that the view is bound to.\n */\n this.source = null;\n /**\n * The execution context the view is running within.\n */\n this.context = null;\n this.firstChild = fragment.firstChild;\n this.lastChild = fragment.lastChild;\n }\n /**\n * Appends the view's DOM nodes to the referenced node.\n * @param node - The parent node to append the view's DOM nodes to.\n */\n appendTo(node) {\n node.appendChild(this.fragment);\n }\n /**\n * Inserts the view's DOM nodes before the referenced node.\n * @param node - The node to insert the view's DOM before.\n */\n insertBefore(node) {\n if (this.fragment.hasChildNodes()) {\n node.parentNode.insertBefore(this.fragment, node);\n }\n else {\n const end = this.lastChild;\n if (node.previousSibling === end)\n return;\n const parentNode = node.parentNode;\n let current = this.firstChild;\n let next;\n while (current !== end) {\n next = current.nextSibling;\n parentNode.insertBefore(current, node);\n current = next;\n }\n parentNode.insertBefore(end, node);\n }\n }\n /**\n * Removes the view's DOM nodes.\n * The nodes are not disposed and the view can later be re-inserted.\n */\n remove() {\n const fragment = this.fragment;\n const end = this.lastChild;\n let current = this.firstChild;\n let next;\n while (current !== end) {\n next = current.nextSibling;\n fragment.appendChild(current);\n current = next;\n }\n fragment.appendChild(end);\n }\n /**\n * Removes the view and unbinds its behaviors, disposing of DOM nodes afterward.\n * Once a view has been disposed, it cannot be inserted or bound again.\n */\n dispose() {\n const parent = this.firstChild.parentNode;\n const end = this.lastChild;\n let current = this.firstChild;\n let next;\n while (current !== end) {\n next = current.nextSibling;\n parent.removeChild(current);\n current = next;\n }\n parent.removeChild(end);\n const behaviors = this.behaviors;\n const oldSource = this.source;\n for (let i = 0, ii = behaviors.length; i < ii; ++i) {\n behaviors[i].unbind(oldSource);\n }\n }\n /**\n * Binds a view's behaviors to its binding source.\n * @param source - The binding source for the view's binding behaviors.\n * @param context - The execution context to run the behaviors within.\n */\n bind(source, context) {\n const behaviors = this.behaviors;\n if (this.source === source) {\n return;\n }\n else if (this.source !== null) {\n const oldSource = this.source;\n this.source = source;\n this.context = context;\n for (let i = 0, ii = behaviors.length; i < ii; ++i) {\n const current = behaviors[i];\n current.unbind(oldSource);\n current.bind(source, context);\n }\n }\n else {\n this.source = source;\n this.context = context;\n for (let i = 0, ii = behaviors.length; i < ii; ++i) {\n behaviors[i].bind(source, context);\n }\n }\n }\n /**\n * Unbinds a view's behaviors from its binding source.\n */\n unbind() {\n if (this.source === null) {\n return;\n }\n const behaviors = this.behaviors;\n const oldSource = this.source;\n for (let i = 0, ii = behaviors.length; i < ii; ++i) {\n behaviors[i].unbind(oldSource);\n }\n this.source = null;\n }\n /**\n * Efficiently disposes of a contiguous range of synthetic view instances.\n * @param views - A contiguous range of views to be disposed.\n */\n static disposeContiguousBatch(views) {\n if (views.length === 0) {\n return;\n }\n range.setStartBefore(views[0].firstChild);\n range.setEndAfter(views[views.length - 1].lastChild);\n range.deleteContents();\n for (let i = 0, ii = views.length; i < ii; ++i) {\n const view = views[i];\n const behaviors = view.behaviors;\n const oldSource = view.source;\n for (let j = 0, jj = behaviors.length; j < jj; ++j) {\n behaviors[j].unbind(oldSource);\n }\n }\n }\n}\n","import { DOM } from \"../dom.js\";\nimport { defaultExecutionContext } from \"../observation/observable.js\";\nimport { compileTemplate } from \"./compiler.js\";\nimport { HTMLView } from \"./view.js\";\nimport { HTMLDirective, TargetedHTMLDirective, } from \"./html-directive.js\";\nimport { HTMLBindingDirective } from \"./binding.js\";\n/**\n * A template capable of creating HTMLView instances or rendering directly to DOM.\n * @public\n */\n/* eslint-disable-next-line @typescript-eslint/no-unused-vars */\nexport class ViewTemplate {\n /**\n * Creates an instance of ViewTemplate.\n * @param html - The html representing what this template will instantiate, including placeholders for directives.\n * @param directives - The directives that will be connected to placeholders in the html.\n */\n constructor(html, directives) {\n this.behaviorCount = 0;\n this.hasHostBehaviors = false;\n this.fragment = null;\n this.targetOffset = 0;\n this.viewBehaviorFactories = null;\n this.hostBehaviorFactories = null;\n this.html = html;\n this.directives = directives;\n }\n /**\n * Creates an HTMLView instance based on this template definition.\n * @param hostBindingTarget - The element that host behaviors will be bound to.\n */\n create(hostBindingTarget) {\n if (this.fragment === null) {\n let template;\n const html = this.html;\n if (typeof html === \"string\") {\n template = document.createElement(\"template\");\n template.innerHTML = DOM.createHTML(html);\n const fec = template.content.firstElementChild;\n if (fec !== null && fec.tagName === \"TEMPLATE\") {\n template = fec;\n }\n }\n else {\n template = html;\n }\n const result = compileTemplate(template, this.directives);\n this.fragment = result.fragment;\n this.viewBehaviorFactories = result.viewBehaviorFactories;\n this.hostBehaviorFactories = result.hostBehaviorFactories;\n this.targetOffset = result.targetOffset;\n this.behaviorCount =\n this.viewBehaviorFactories.length + this.hostBehaviorFactories.length;\n this.hasHostBehaviors = this.hostBehaviorFactories.length > 0;\n }\n const fragment = this.fragment.cloneNode(true);\n const viewFactories = this.viewBehaviorFactories;\n const behaviors = new Array(this.behaviorCount);\n const walker = DOM.createTemplateWalker(fragment);\n let behaviorIndex = 0;\n let targetIndex = this.targetOffset;\n let node = walker.nextNode();\n for (let ii = viewFactories.length; behaviorIndex < ii; ++behaviorIndex) {\n const factory = viewFactories[behaviorIndex];\n const factoryIndex = factory.targetIndex;\n while (node !== null) {\n if (targetIndex === factoryIndex) {\n behaviors[behaviorIndex] = factory.createBehavior(node);\n break;\n }\n else {\n node = walker.nextNode();\n targetIndex++;\n }\n }\n }\n if (this.hasHostBehaviors) {\n const hostFactories = this.hostBehaviorFactories;\n for (let i = 0, ii = hostFactories.length; i < ii; ++i, ++behaviorIndex) {\n behaviors[behaviorIndex] = hostFactories[i].createBehavior(hostBindingTarget);\n }\n }\n return new HTMLView(fragment, behaviors);\n }\n /**\n * Creates an HTMLView from this template, binds it to the source, and then appends it to the host.\n * @param source - The data source to bind the template to.\n * @param host - The Element where the template will be rendered.\n * @param hostBindingTarget - An HTML element to target the host bindings at if different from the\n * host that the template is being attached to.\n */\n render(source, host, hostBindingTarget) {\n if (typeof host === \"string\") {\n host = document.getElementById(host);\n }\n if (hostBindingTarget === void 0) {\n hostBindingTarget = host;\n }\n const view = this.create(hostBindingTarget);\n view.bind(source, defaultExecutionContext);\n view.appendTo(host);\n return view;\n }\n}\n// Much thanks to LitHTML for working this out!\nconst lastAttributeNameRegex = \n/* eslint-disable-next-line no-control-regex */\n/([ \\x09\\x0a\\x0c\\x0d])([^\\0-\\x1F\\x7F-\\x9F \"'>=/]+)([ \\x09\\x0a\\x0c\\x0d]*=[ \\x09\\x0a\\x0c\\x0d]*(?:[^ \\x09\\x0a\\x0c\\x0d\"'`<>=]*|\"[^\"]*|'[^']*))$/;\n/**\n * Transforms a template literal string into a renderable ViewTemplate.\n * @param strings - The string fragments that are interpolated with the values.\n * @param values - The values that are interpolated with the string fragments.\n * @remarks\n * The html helper supports interpolation of strings, numbers, binding expressions,\n * other template instances, and Directive instances.\n * @public\n */\nexport function html(strings, ...values) {\n const directives = [];\n let html = \"\";\n for (let i = 0, ii = strings.length - 1; i < ii; ++i) {\n const currentString = strings[i];\n let value = values[i];\n html += currentString;\n if (value instanceof ViewTemplate) {\n const template = value;\n value = () => template;\n }\n if (typeof value === \"function\") {\n value = new HTMLBindingDirective(value);\n }\n if (value instanceof TargetedHTMLDirective) {\n const match = lastAttributeNameRegex.exec(currentString);\n if (match !== null) {\n value.targetName = match[2];\n }\n }\n if (value instanceof HTMLDirective) {\n // Since not all values are directives, we can't use i\n // as the index for the placeholder. Instead, we need to\n // use directives.length to get the next index.\n html += value.createPlaceholder(directives.length);\n directives.push(value);\n }\n else {\n html += value;\n }\n }\n html += strings[strings.length - 1];\n return new ViewTemplate(html, directives);\n}\n"],"names":["AttributeConfiguration","Object","freeze","locate","booleanConverter","toView","value","fromView","AttributeDefinition","constructor","Owner","name","attribute","toLowerCase","mode","converter","this","guards","Set","fieldName","callbackName","hasCallback","prototype","setValue","source","newValue","oldValue","tryReflectToAttribute","$fastController","notify","getValue","track","onAttributeChangedCallback","element","has","add","delete","queueUpdate","latestValue","setAttribute","setBooleanAttribute","collect","attributeLists","attributes","push","i","ii","length","list","j","jj","config","property","defaultShadowOptions","defaultElementOptions","fastRegistry","getById","typeToDefinition","Map","register","definition","type","set","getByType","key","get","FASTElementDefinition","nameOrConfig","template","observedAttributes","Array","propertyLookup","attributeLookup","current","shadowOptions","assign","elementOptions","styles","isArray","create","isDefined","define","registry","customElements","proto","defineProperty","Reflect","enumerable","forType","shadowRoots","WeakMap","defaultEventOptions","bubbles","composed","cancelable","getShadowRoot","shadowRoot","Controller","super","boundObservables","behaviors","needsInitialization","_template","_styles","_isConnected","view","attachShadow","accessors","getAccessors","propertyName","isConnected","setIsConnected","renderTemplate","removeStyles","addStyles","target","getRootNode","HTMLStyleElement","append","isAttachedTo","sourceBehaviors","addStylesTo","addBehaviors","removeChild","removeStylesFrom","removeBehaviors","targetBehaviors","behaviorsToBind","behavior","bind","force","behaviorsToUnbind","count","unbind","onConnectedCallback","finishInitialization","onDisconnectedCallback","attrDef","emit","detail","options","dispatchEvent","CustomEvent","propertyNames","keys","resolveTemplate","resolveStyles","host","dispose","removeChildNodes","render","forCustomElement","controller","Error","createFASTElement","BaseType","$emit","connectedCallback","disconnectedCallback","attributeChangedCallback","FASTElement","HTMLElement","from","nameOrDef","customElement","updateQueue","FAST","tasks","pendingErrors","throwFirstError","shift","tryRunTask","task","call","error","setTimeout","process","index","scan","newLength","enqueue","callable","requestAnimationFrame","fastHTMLPolicy","trustedTypes","createPolicy","createHTML","html","htmlPolicy","marker","Math","random","toString","substring","_interpolationStart","_interpolationEnd","DOM","supportsAdoptedStyleSheets","document","adoptedStyleSheets","CSSStyleSheet","setHTMLPolicy","policy","isMarker","node","nodeType","data","startsWith","extractDirectiveIndexFromMarker","parseInt","replace","createInterpolationPlaceholder","createCustomAttributePlaceholder","attributeName","createBlockPlaceholder","processUpdates","nextUpdate","Promise","removeAttribute","parent","child","firstChild","createTemplateWalker","fragment","createTreeWalker","SubscriberSet","initialSubscriber","sub1","sub2","spillover","subscriber","indexOf","subscribe","unsubscribe","splice","args","handleChange","PropertyChangeNotifier","subscribers","sourceSubscribers","_a","propertyToWatch","propertyToUnwatch","Observable","volatileRegex","notifierLookup","watcher","createArrayObserver","array","getNotifier","found","DefaultObservableAccessor","field","callback","watch","BindingObserverImplementation","binding","isVolatileBinding","needsRefresh","needsQueue","first","last","propertySource","notifier","next","observe","context","disconnect","previousWatcher","result","prev","prevValue","records","undefined","done","Symbol","iterator","setArrayObserverFactory","factory","trackVolatile","nameOrAccessor","test","observable","contextEvent","event","ExecutionContext","parentContext","isEven","isOdd","isFirst","isInMiddle","isLast","setEvent","defaultExecutionContext","seal","$global","globalThis","g","self","window","Function","n","r","propConfig","configurable","writable","storage","id","initialize","createMetadataLocator","metadataLookup","metadata","currentTarget","getPrototypeOf","slice","CSSDirective","createCSS","createBehavior","collectStyles","strings","values","cssString","trim","css","elementStyles","withBehaviors","ElementStyles","targets","WeakSet","concat","reduceStyles","map","x","reduce","curr","reduceBehaviors","styleSheetCache","AdoptedStyleSheetsStyles","StyleElementStyles","prependToAdoptedStyleSheetsSymbol","separateSheetsToPrepend","sheets","prepend","forEach","addAdoptedStyleSheets","removeAdoptedStyleSheets","filter","sheet","e","_styleSheets","styleSheets","replaceSync","styleClassId","styleClass","normalizeTarget","createElement","innerHTML","className","querySelectorAll","body","HTMLDirective","targetIndex","TargetedHTMLDirective","arguments","createPlaceholder","normalBind","bindingObserver","isBindingVolatile","updateTarget","triggerBind","addEventListener","targetName","normalUnbind","contentUnbind","$fastView","isComposed","needsBindOnly","triggerUnbind","removeEventListener","updateAttributeTarget","updateBooleanAttributeTarget","updateContentTarget","textContent","$fastTemplate","remove","insertBefore","updatePropertyTarget","updateClassTarget","classVersions","version","names","split","currentName","classList","HTMLBindingDirective","originalTargetName","cleanedTargetName","substr","s","c","targetAtContent","BindingBehavior","handleEvent","preventDefault","sharedContext","CompilationContext","addFactory","behaviorFactories","captureContentBinding","directive","reset","release","borrow","directives","shareable","createAggregateBinding","parts","partCount","finalParts","scope","output","interpolationEndLength","parseContent","valueParts","bindingParts","literal","directiveIndex","compileAttributes","includeBasicValues","attr","attrValue","parseResult","removeAttributeNode","compileContent","walker","lastNode","currentPart","currentNode","parentNode","createTextNode","nextSibling","nextNode","range","createRange","HTMLView","lastChild","appendTo","appendChild","hasChildNodes","end","previousSibling","oldSource","disposeContiguousBatch","views","setStartBefore","setEndAfter","deleteContents","ViewTemplate","behaviorCount","hasHostBehaviors","targetOffset","viewBehaviorFactories","hostBehaviorFactories","hostBindingTarget","fec","content","firstElementChild","tagName","adoptNode","childNodes","createComment","compileTemplate","cloneNode","viewFactories","behaviorIndex","factoryIndex","hostFactories","getElementById","lastAttributeNameRegex","currentString","match","exec"],"sourceRoot":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_genesislcap_foundation_shell=self.webpackChunk_genesislcap_foundation_shell||[]).push([[544],{528(t,e,s){s.d(e,{L:()=>C,E:()=>S});var i=s(395),n=s(366),r=s(453),o=s(768),l=s(761);const a=Object.freeze({locate:(0,o.iX)()}),h={toView:t=>t?"true":"false",fromView:t=>null!=t&&"false"!==t&&!1!==t&&0!==t};class c{constructor(t,e,s=e.toLowerCase(),i="reflect",n){this.guards=new Set,this.Owner=t,this.name=e,this.attribute=s,this.mode=i,this.converter=n,this.fieldName=`_${e}`,this.callbackName=`${e}Changed`,this.hasCallback=this.callbackName in t.prototype,"boolean"===i&&void 0===n&&(this.converter=h)}setValue(t,e){const s=t[this.fieldName],i=this.converter;void 0!==i&&(e=i.fromView(e)),s!==e&&(t[this.fieldName]=e,this.tryReflectToAttribute(t),this.hasCallback&&t[this.callbackName](s,e),t.$fastController.notify(this.name))}getValue(t){return r.cP.track(t,this.name),t[this.fieldName]}onAttributeChangedCallback(t,e){this.guards.has(t)||(this.guards.add(t),this.setValue(t,e),this.guards.delete(t))}tryReflectToAttribute(t){const e=this.mode,s=this.guards;s.has(t)||"fromView"===e||i.dv.queueUpdate(()=>{s.add(t);const n=t[this.fieldName];switch(e){case"reflect":const e=this.converter;i.dv.setAttribute(t,this.attribute,void 0!==e?e.toView(n):n);break;case"boolean":i.dv.setBooleanAttribute(t,this.attribute,n)}s.delete(t)})}static collect(t,...e){const s=[];e.push(a.locate(t));for(let i=0,n=e.length;i<n;++i){const n=e[i];if(void 0!==n)for(let e=0,i=n.length;e<i;++e){const i=n[e];"string"==typeof i?s.push(new c(t,i)):s.push(new c(t,i.property,i.attribute,i.mode,i.converter))}}return s}}const d={mode:"open"},u={},f=o.Zx.getById(4,()=>{const t=new Map;return Object.freeze({register:e=>!t.has(e.type)&&(t.set(e.type,e),!0),getByType:e=>t.get(e)})});class b{constructor(t,e=t.definition){"string"==typeof e&&(e={name:e}),this.type=t,this.name=e.name,this.template=e.template;const s=c.collect(t,e.attributes),i=new Array(s.length),n={},r={};for(let t=0,e=s.length;t<e;++t){const e=s[t];i[t]=e.attribute,n[e.name]=e,r[e.attribute]=e}this.attributes=s,this.observedAttributes=i,this.propertyLookup=n,this.attributeLookup=r,this.shadowOptions=void 0===e.shadowOptions?d:null===e.shadowOptions?void 0:Object.assign(Object.assign({},d),e.shadowOptions),this.elementOptions=void 0===e.elementOptions?u:Object.assign(Object.assign({},u),e.elementOptions),this.styles=void 0===e.styles?void 0:Array.isArray(e.styles)?l.vv.create(e.styles):e.styles instanceof l.vv?e.styles:l.vv.create([e.styles])}get isDefined(){return!!f.getByType(this.type)}define(t=customElements){const e=this.type;if(f.register(this)){const t=this.attributes,s=e.prototype;for(let e=0,i=t.length;e<i;++e)r.cP.defineProperty(s,t[e]);Reflect.defineProperty(e,"observedAttributes",{value:this.observedAttributes,enumerable:!0})}return t.get(this.name)||t.define(this.name,e,this.elementOptions),this}}b.forType=f.getByType;const g=new WeakMap,p={bubbles:!0,composed:!0,cancelable:!0};function v(t){return t.shadowRoot||g.get(t)||null}class m extends n.S{constructor(t,e){super(t),this.boundObservables=null,this.behaviors=null,this.needsInitialization=!0,this._template=null,this._styles=null,this._isConnected=!1,this.$fastController=this,this.view=null,this.element=t,this.definition=e;const s=e.shadowOptions;if(void 0!==s){const e=t.attachShadow(s);"closed"===s.mode&&g.set(t,e)}const i=r.cP.getAccessors(t);if(i.length>0){const e=this.boundObservables=Object.create(null);for(let s=0,n=i.length;s<n;++s){const n=i[s].name,r=t[n];void 0!==r&&(delete t[n],e[n]=r)}}}get isConnected(){return r.cP.track(this,"isConnected"),this._isConnected}setIsConnected(t){this._isConnected=t,r.cP.notify(this,"isConnected")}get template(){return this._template}set template(t){this._template!==t&&(this._template=t,this.needsInitialization||this.renderTemplate(t))}get styles(){return this._styles}set styles(t){this._styles!==t&&(null!==this._styles&&this.removeStyles(this._styles),this._styles=t,this.needsInitialization||null===t||this.addStyles(t))}addStyles(t){const e=v(this.element)||this.element.getRootNode();if(t instanceof HTMLStyleElement)e.append(t);else if(!t.isAttachedTo(e)){const s=t.behaviors;t.addStylesTo(e),null!==s&&this.addBehaviors(s)}}removeStyles(t){const e=v(this.element)||this.element.getRootNode();if(t instanceof HTMLStyleElement)e.removeChild(t);else if(t.isAttachedTo(e)){const s=t.behaviors;t.removeStylesFrom(e),null!==s&&this.removeBehaviors(s)}}addBehaviors(t){const e=this.behaviors||(this.behaviors=new Map),s=t.length,i=[];for(let n=0;n<s;++n){const s=t[n];e.has(s)?e.set(s,e.get(s)+1):(e.set(s,1),i.push(s))}if(this._isConnected){const t=this.element;for(let e=0;e<i.length;++e)i[e].bind(t,r.Fj)}}removeBehaviors(t,e=!1){const s=this.behaviors;if(null===s)return;const i=t.length,n=[];for(let r=0;r<i;++r){const i=t[r];if(s.has(i)){const t=s.get(i)-1;0===t||e?s.delete(i)&&n.push(i):s.set(i,t)}}if(this._isConnected){const t=this.element;for(let e=0;e<n.length;++e)n[e].unbind(t)}}onConnectedCallback(){if(this._isConnected)return;const t=this.element;this.needsInitialization?this.finishInitialization():null!==this.view&&this.view.bind(t,r.Fj);const e=this.behaviors;if(null!==e)for(const[s]of e)s.bind(t,r.Fj);this.setIsConnected(!0)}onDisconnectedCallback(){if(!this._isConnected)return;this.setIsConnected(!1);const t=this.view;null!==t&&t.unbind();const e=this.behaviors;if(null!==e){const t=this.element;for(const[s]of e)s.unbind(t)}}onAttributeChangedCallback(t,e,s){const i=this.definition.attributeLookup[t];void 0!==i&&i.onAttributeChangedCallback(this.element,s)}emit(t,e,s){return!!this._isConnected&&this.element.dispatchEvent(new CustomEvent(t,Object.assign(Object.assign({detail:e},p),s)))}finishInitialization(){const t=this.element,e=this.boundObservables;if(null!==e){const s=Object.keys(e);for(let i=0,n=s.length;i<n;++i){const n=s[i];t[n]=e[n]}this.boundObservables=null}const s=this.definition;null===this._template&&(this.element.resolveTemplate?this._template=this.element.resolveTemplate():s.template&&(this._template=s.template||null)),null!==this._template&&this.renderTemplate(this._template),null===this._styles&&(this.element.resolveStyles?this._styles=this.element.resolveStyles():s.styles&&(this._styles=s.styles||null)),null!==this._styles&&this.addStyles(this._styles),this.needsInitialization=!1}renderTemplate(t){const e=this.element,s=v(e)||e;null!==this.view?(this.view.dispose(),this.view=null):this.needsInitialization||i.dv.removeChildNodes(s),t&&(this.view=t.render(e,s,e))}static forCustomElement(t){const e=t.$fastController;if(void 0!==e)return e;const s=b.forType(t.constructor);if(void 0===s)throw new Error("Missing FASTElement definition.");return t.$fastController=new m(t,s)}}function y(t){return class extends t{constructor(){super(),m.forCustomElement(this)}$emit(t,e,s){return this.$fastController.emit(t,e,s)}connectedCallback(){this.$fastController.onConnectedCallback()}disconnectedCallback(){this.$fastController.onDisconnectedCallback()}attributeChangedCallback(t,e,s){this.$fastController.onAttributeChangedCallback(t,e,s)}}}const C=Object.assign(y(HTMLElement),{from:t=>y(t),define:(t,e)=>new b(t,e).define().type});function S(t){return function(e){new b(e,t).define()}}},395(t,e,s){s.d(e,{No:()=>h,ae:()=>a,dv:()=>c});var i=s(768);const n=i.am.FAST.getById(1,()=>{const t=[],e=[];function s(){if(e.length)throw e.shift()}function n(t){try{t.call()}catch(t){e.push(t),setTimeout(s,0)}}function r(){let e=0;for(;e<t.length;)if(n(t[e]),e++,e>1024){for(let s=0,i=t.length-e;s<i;s++)t[s]=t[s+e];t.length-=e,e=0}t.length=0}return Object.freeze({enqueue:function(e){t.length<1&&i.am.requestAnimationFrame(r),t.push(e)},process:r})}),r=i.am.trustedTypes.createPolicy("fast-html",{createHTML:t=>t});let o=r;const l=`fast-${Math.random().toString(36).substring(2,8)}`,a=`${l}{`,h=`}${l}`,c=Object.freeze({supportsAdoptedStyleSheets:Array.isArray(document.adoptedStyleSheets)&&"replace"in CSSStyleSheet.prototype,setHTMLPolicy(t){if(o!==r)throw new Error("The HTML policy can only be set once.");o=t},createHTML:t=>o.createHTML(t),isMarker:t=>t&&8===t.nodeType&&t.data.startsWith(l),extractDirectiveIndexFromMarker:t=>parseInt(t.data.replace(`${l}:`,"")),createInterpolationPlaceholder:t=>`${a}${t}${h}`,createCustomAttributePlaceholder(t,e){return`${t}="${this.createInterpolationPlaceholder(e)}"`},createBlockPlaceholder:t=>`\x3c!--${l}:${t}--\x3e`,queueUpdate:n.enqueue,processUpdates:n.process,nextUpdate:()=>new Promise(n.enqueue),setAttribute(t,e,s){null==s?t.removeAttribute(e):t.setAttribute(e,s)},setBooleanAttribute(t,e,s){s?t.setAttribute(e,""):t.removeAttribute(e)},removeChildNodes(t){for(let e=t.firstChild;null!==e;e=t.firstChild)t.removeChild(e)},createTemplateWalker:t=>document.createTreeWalker(t,133,null,!1)})},366(t,e,s){s.d(e,{S:()=>n,l:()=>i});class i{constructor(t,e){this.sub1=void 0,this.sub2=void 0,this.spillover=void 0,this.source=t,this.sub1=e}has(t){return void 0===this.spillover?this.sub1===t||this.sub2===t:-1!==this.spillover.indexOf(t)}subscribe(t){const e=this.spillover;if(void 0===e){if(this.has(t))return;if(void 0===this.sub1)return void(this.sub1=t);if(void 0===this.sub2)return void(this.sub2=t);this.spillover=[this.sub1,this.sub2,t],this.sub1=void 0,this.sub2=void 0}else{-1===e.indexOf(t)&&e.push(t)}}unsubscribe(t){const e=this.spillover;if(void 0===e)this.sub1===t?this.sub1=void 0:this.sub2===t&&(this.sub2=void 0);else{const s=e.indexOf(t);-1!==s&&e.splice(s,1)}}notify(t){const e=this.spillover,s=this.source;if(void 0===e){const e=this.sub1,i=this.sub2;void 0!==e&&e.handleChange(s,t),void 0!==i&&i.handleChange(s,t)}else for(let i=0,n=e.length;i<n;++i)e[i].handleChange(s,t)}}class n{constructor(t){this.subscribers={},this.sourceSubscribers=null,this.source=t}notify(t){var e;const s=this.subscribers[t];void 0!==s&&s.notify(t),null===(e=this.sourceSubscribers)||void 0===e||e.notify(t)}subscribe(t,e){var s;if(e){let s=this.subscribers[e];void 0===s&&(this.subscribers[e]=s=new i(this.source)),s.subscribe(t)}else this.sourceSubscribers=null!==(s=this.sourceSubscribers)&&void 0!==s?s:new i(this.source),this.sourceSubscribers.subscribe(t)}unsubscribe(t,e){var s;if(e){const s=this.subscribers[e];void 0!==s&&s.unsubscribe(t)}else null===(s=this.sourceSubscribers)||void 0===s||s.unsubscribe(t)}}},453(t,e,s){s.d(e,{Fj:()=>c,ao:()=>h,cP:()=>o,sH:()=>l});var i=s(395),n=s(768),r=s(366);const o=n.Zx.getById(2,()=>{const t=/(:|&&|\|\||if)/,e=new WeakMap,s=i.dv.queueUpdate;let o,l=t=>{throw new Error("Must call enableArrayObservation before observing arrays.")};function a(t){let s=t.$fastController||e.get(t);return void 0===s&&(Array.isArray(t)?s=l(t):e.set(t,s=new r.S(t))),s}const h=(0,n.iX)();class c{constructor(t){this.name=t,this.field=`_${t}`,this.callback=`${t}Changed`}getValue(t){return void 0!==o&&o.watch(t,this.name),t[this.field]}setValue(t,e){const s=this.field,i=t[s];if(i!==e){t[s]=e;const n=t[this.callback];"function"==typeof n&&n.call(t,i,e),a(t).notify(this.name)}}}class d extends r.l{constructor(t,e,s=!1){super(t,e),this.binding=t,this.isVolatileBinding=s,this.needsRefresh=!0,this.needsQueue=!0,this.first=this,this.last=null,this.propertySource=void 0,this.propertyName=void 0,this.notifier=void 0,this.next=void 0}observe(t,e){this.needsRefresh&&null!==this.last&&this.disconnect();const s=o;o=this.needsRefresh?this:void 0,this.needsRefresh=this.isVolatileBinding;const i=this.binding(t,e);return o=s,i}disconnect(){if(null!==this.last){let t=this.first;for(;void 0!==t;)t.notifier.unsubscribe(this,t.propertyName),t=t.next;this.last=null,this.needsRefresh=this.needsQueue=!0}}watch(t,e){const s=this.last,i=a(t),n=null===s?this.first:{};if(n.propertySource=t,n.propertyName=e,n.notifier=i,i.subscribe(this,e),null!==s){if(!this.needsRefresh){let e;o=void 0,e=s.propertySource[s.propertyName],o=this,t===e&&(this.needsRefresh=!0)}s.next=n}this.last=n}handleChange(){this.needsQueue&&(this.needsQueue=!1,s(this))}call(){null!==this.last&&(this.needsQueue=!0,this.notify(this))}records(){let t=this.first;return{next:()=>{const e=t;return void 0===e?{value:void 0,done:!0}:(t=t.next,{value:e,done:!1})},[Symbol.iterator]:function(){return this}}}}return Object.freeze({setArrayObserverFactory(t){l=t},getNotifier:a,track(t,e){void 0!==o&&o.watch(t,e)},trackVolatile(){void 0!==o&&(o.needsRefresh=!0)},notify(t,e){a(t).notify(e)},defineProperty(t,e){"string"==typeof e&&(e=new c(e)),h(t).push(e),Reflect.defineProperty(t,e.name,{enumerable:!0,get:function(){return e.getValue(this)},set:function(t){e.setValue(this,t)}})},getAccessors:h,binding(t,e,s=this.isVolatileBinding(t)){return new d(t,e,s)},isVolatileBinding:e=>t.test(e.toString())})});function l(t,e){o.defineProperty(t,e)}const a=n.Zx.getById(3,()=>{let t=null;return{get:()=>t,set(e){t=e}}});class h{constructor(){this.index=0,this.length=0,this.parent=null,this.parentContext=null}get event(){return a.get()}get isEven(){return this.index%2==0}get isOdd(){return this.index%2!=0}get isFirst(){return 0===this.index}get isInMiddle(){return!this.isFirst&&!this.isLast}get isLast(){return this.index===this.length-1}static setEvent(t){a.set(t)}}o.defineProperty(h.prototype,"index"),o.defineProperty(h.prototype,"length");const c=Object.seal(new h)},768(t,e,s){s.d(e,{Zx:()=>r,am:()=>i,iX:()=>o});const i=function(){if("undefined"!=typeof globalThis)return globalThis;if(void 0!==s.g)return s.g;if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;try{return new Function("return this")()}catch(t){return{}}}();void 0===i.trustedTypes&&(i.trustedTypes={createPolicy:(t,e)=>e});const n={configurable:!1,enumerable:!1,writable:!1};void 0===i.FAST&&Reflect.defineProperty(i,"FAST",Object.assign({value:Object.create(null)},n));const r=i.FAST;if(void 0===r.getById){const t=Object.create(null);Reflect.defineProperty(r,"getById",Object.assign({value(e,s){let i=t[e];return void 0===i&&(i=s?t[e]=s():null),i}},n))}Object.freeze([]);function o(){const t=new WeakMap;return function(e){let s=t.get(e);if(void 0===s){let i=Reflect.getPrototypeOf(e);for(;void 0===s&&null!==i;)s=t.get(i),i=Reflect.getPrototypeOf(i);s=void 0===s?[]:s.slice(0),t.set(e,s)}return s}}},782(t,e,s){s.d(e,{A:()=>o});class i{createCSS(){return""}createBehavior(){}}var n=s(761);function r(t,e){const s=[];let r="";const o=[];for(let l=0,a=t.length-1;l<a;++l){r+=t[l];let a=e[l];if(a instanceof i){const t=a.createBehavior();a=a.createCSS(),t&&o.push(t)}a instanceof n.vv||a instanceof CSSStyleSheet?(""!==r.trim()&&(s.push(r),r=""),s.push(a)):r+=a}return r+=t[t.length-1],""!==r.trim()&&s.push(r),{styles:s,behaviors:o}}function o(t,...e){const{styles:s,behaviors:i}=r(t,e),o=n.vv.create(s);return i.length&&o.withBehaviors(...i),o}},761(t,e,s){s.d(e,{vv:()=>n});var i=s(395);class n{constructor(){this.targets=new WeakSet}addStylesTo(t){this.targets.add(t)}removeStylesFrom(t){this.targets.delete(t)}isAttachedTo(t){return this.targets.has(t)}withBehaviors(...t){return this.behaviors=null===this.behaviors?t:this.behaviors.concat(t),this}}function r(t){return t.map(t=>t instanceof n?r(t.styles):[t]).reduce((t,e)=>t.concat(e),[])}function o(t){return t.map(t=>t instanceof n?t.behaviors:null).reduce((t,e)=>null===e?t:(null===t&&(t=[]),t.concat(e)),null)}n.create=(()=>{if(i.dv.supportsAdoptedStyleSheets){const t=new Map;return e=>new d(e,t)}return t=>new f(t)})();const l=Symbol("prependToAdoptedStyleSheets");function a(t){const e=[],s=[];return t.forEach(t=>(t[l]?e:s).push(t)),{prepend:e,append:s}}let h=(t,e)=>{const{prepend:s,append:i}=a(e);t.adoptedStyleSheets=[...s,...t.adoptedStyleSheets,...i]},c=(t,e)=>{t.adoptedStyleSheets=t.adoptedStyleSheets.filter(t=>-1===e.indexOf(t))};if(i.dv.supportsAdoptedStyleSheets)try{document.adoptedStyleSheets.push(),document.adoptedStyleSheets.splice(),h=(t,e)=>{const{prepend:s,append:i}=a(e);t.adoptedStyleSheets.splice(0,0,...s),t.adoptedStyleSheets.push(...i)},c=(t,e)=>{for(const s of e){const e=t.adoptedStyleSheets.indexOf(s);-1!==e&&t.adoptedStyleSheets.splice(e,1)}}}catch(t){}class d extends n{constructor(t,e){super(),this.styles=t,this.styleSheetCache=e,this._styleSheets=void 0,this.behaviors=o(t)}get styleSheets(){if(void 0===this._styleSheets){const t=this.styles,e=this.styleSheetCache;this._styleSheets=r(t).map(t=>{if(t instanceof CSSStyleSheet)return t;let s=e.get(t);return void 0===s&&(s=new CSSStyleSheet,s.replaceSync(t),e.set(t,s)),s})}return this._styleSheets}addStylesTo(t){h(t,this.styleSheets),super.addStylesTo(t)}removeStylesFrom(t){c(t,this.styleSheets),super.removeStylesFrom(t)}}let u=0;class f extends n{constructor(t){super(),this.styles=t,this.behaviors=null,this.behaviors=o(t),this.styleSheets=r(t),this.styleClass="fast-style-class-"+ ++u}addStylesTo(t){const e=this.styleSheets,s=this.styleClass;t=this.normalizeTarget(t);for(let i=0;i<e.length;i++){const n=document.createElement("style");n.innerHTML=e[i],n.className=s,t.append(n)}super.addStylesTo(t)}removeStylesFrom(t){const e=(t=this.normalizeTarget(t)).querySelectorAll(`.${this.styleClass}`);for(let s=0,i=e.length;s<i;++s)t.removeChild(e[s]);super.removeStylesFrom(t)}isAttachedTo(t){return super.isAttachedTo(this.normalizeTarget(t))}normalizeTarget(t){return t===document?document.body:t}}},329(t,e,s){s.d(e,{q:()=>F});var i=s(395),n=s(453);class r{constructor(){this.targetIndex=0}}class o extends r{constructor(){super(...arguments),this.createPlaceholder=i.dv.createInterpolationPlaceholder}}function l(t,e){this.source=t,this.context=e,null===this.bindingObserver&&(this.bindingObserver=n.cP.binding(this.binding,this,this.isBindingVolatile)),this.updateTarget(this.bindingObserver.observe(t,e))}function a(t,e){this.source=t,this.context=e,this.target.addEventListener(this.targetName,this)}function h(){this.bindingObserver.disconnect(),this.source=null,this.context=null}function c(){this.bindingObserver.disconnect(),this.source=null,this.context=null;const t=this.target.$fastView;void 0!==t&&t.isComposed&&(t.unbind(),t.needsBindOnly=!0)}function d(){this.target.removeEventListener(this.targetName,this),this.source=null,this.context=null}function u(t){i.dv.setAttribute(this.target,this.targetName,t)}function f(t){i.dv.setBooleanAttribute(this.target,this.targetName,t)}function b(t){if(null==t&&(t=""),t.create){this.target.textContent="";let e=this.target.$fastView;void 0===e?e=t.create():this.target.$fastTemplate!==t&&(e.isComposed&&(e.remove(),e.unbind()),e=t.create()),e.isComposed?e.needsBindOnly&&(e.needsBindOnly=!1,e.bind(this.source,this.context)):(e.isComposed=!0,e.bind(this.source,this.context),e.insertBefore(this.target),this.target.$fastView=e,this.target.$fastTemplate=t)}else{const e=this.target.$fastView;void 0!==e&&e.isComposed&&(e.isComposed=!1,e.remove(),e.needsBindOnly?e.needsBindOnly=!1:e.unbind()),this.target.textContent=t}}function g(t){this.target[this.targetName]=t}function p(t){const e=this.classVersions||Object.create(null),s=this.target;let i=this.version||0;if(null!=t&&t.length){const n=t.split(/\s+/);for(let t=0,r=n.length;t<r;++t){const r=n[t];""!==r&&(e[r]=i,s.classList.add(r))}}if(this.classVersions=e,this.version=i+1,0!==i){i-=1;for(const t in e)e[t]===i&&s.classList.remove(t)}}class v extends o{constructor(t){super(),this.binding=t,this.bind=l,this.unbind=h,this.updateTarget=u,this.isBindingVolatile=n.cP.isVolatileBinding(this.binding)}get targetName(){return this.originalTargetName}set targetName(t){if(this.originalTargetName=t,void 0!==t)switch(t[0]){case":":if(this.cleanedTargetName=t.substr(1),this.updateTarget=g,"innerHTML"===this.cleanedTargetName){const t=this.binding;this.binding=(e,s)=>i.dv.createHTML(t(e,s))}break;case"?":this.cleanedTargetName=t.substr(1),this.updateTarget=f;break;case"@":this.cleanedTargetName=t.substr(1),this.bind=a,this.unbind=d;break;default:this.cleanedTargetName=t,"class"===t&&(this.updateTarget=p)}}targetAtContent(){this.updateTarget=b,this.unbind=c}createBehavior(t){return new m(t,this.binding,this.isBindingVolatile,this.bind,this.unbind,this.updateTarget,this.cleanedTargetName)}}class m{constructor(t,e,s,i,n,r,o){this.source=null,this.context=null,this.bindingObserver=null,this.target=t,this.binding=e,this.isBindingVolatile=s,this.bind=i,this.unbind=n,this.updateTarget=r,this.targetName=o}handleChange(){this.updateTarget(this.bindingObserver.observe(this.source,this.context))}handleEvent(t){n.ao.setEvent(t);const e=this.binding(this.source,this.context);n.ao.setEvent(null),!0!==e&&t.preventDefault()}}let y=null;class C{addFactory(t){t.targetIndex=this.targetIndex,this.behaviorFactories.push(t)}captureContentBinding(t){t.targetAtContent(),this.addFactory(t)}reset(){this.behaviorFactories=[],this.targetIndex=-1}release(){y=this}static borrow(t){const e=y||new C;return e.directives=t,e.reset(),y=null,e}}function S(t){if(1===t.length)return t[0];let e;const s=t.length,i=t.map(t=>"string"==typeof t?()=>t:(e=t.targetName||e,t.binding)),n=new v((t,e)=>{let n="";for(let r=0;r<s;++r)n+=i[r](t,e);return n});return n.targetName=e,n}const x=i.No.length;function w(t,e){const s=e.split(i.ae);if(1===s.length)return null;const n=[];for(let e=0,r=s.length;e<r;++e){const r=s[e],o=r.indexOf(i.No);let l;if(-1===o)l=r;else{const e=parseInt(r.substring(0,o));n.push(t.directives[e]),l=r.substring(o+x)}""!==l&&n.push(l)}return n}function T(t,e,s=!1){const i=e.attributes;for(let n=0,r=i.length;n<r;++n){const o=i[n],l=o.value,a=w(t,l);let h=null;null===a?s&&(h=new v(()=>l),h.targetName=o.name):h=S(a),null!==h&&(e.removeAttributeNode(o),n--,r--,t.addFactory(h))}}function B(t,e,s){const i=w(t,e.textContent);if(null!==i){let n=e;for(let r=0,o=i.length;r<o;++r){const o=i[r],l=0===r?e:n.parentNode.insertBefore(document.createTextNode(""),n.nextSibling);"string"==typeof o?l.textContent=o:(l.textContent=" ",t.captureContentBinding(o)),n=l,t.targetIndex++,l!==e&&s.nextNode()}t.targetIndex--}}const O=document.createRange();class N{constructor(t,e){this.fragment=t,this.behaviors=e,this.source=null,this.context=null,this.firstChild=t.firstChild,this.lastChild=t.lastChild}appendTo(t){t.appendChild(this.fragment)}insertBefore(t){if(this.fragment.hasChildNodes())t.parentNode.insertBefore(this.fragment,t);else{const e=this.lastChild;if(t.previousSibling===e)return;const s=t.parentNode;let i,n=this.firstChild;for(;n!==e;)i=n.nextSibling,s.insertBefore(n,t),n=i;s.insertBefore(e,t)}}remove(){const t=this.fragment,e=this.lastChild;let s,i=this.firstChild;for(;i!==e;)s=i.nextSibling,t.appendChild(i),i=s;t.appendChild(e)}dispose(){const t=this.firstChild.parentNode,e=this.lastChild;let s,i=this.firstChild;for(;i!==e;)s=i.nextSibling,t.removeChild(i),i=s;t.removeChild(e);const n=this.behaviors,r=this.source;for(let t=0,e=n.length;t<e;++t)n[t].unbind(r)}bind(t,e){const s=this.behaviors;if(this.source!==t)if(null!==this.source){const i=this.source;this.source=t,this.context=e;for(let n=0,r=s.length;n<r;++n){const r=s[n];r.unbind(i),r.bind(t,e)}}else{this.source=t,this.context=e;for(let i=0,n=s.length;i<n;++i)s[i].bind(t,e)}}unbind(){if(null===this.source)return;const t=this.behaviors,e=this.source;for(let s=0,i=t.length;s<i;++s)t[s].unbind(e);this.source=null}static disposeContiguousBatch(t){if(0!==t.length){O.setStartBefore(t[0].firstChild),O.setEndAfter(t[t.length-1].lastChild),O.deleteContents();for(let e=0,s=t.length;e<s;++e){const s=t[e],i=s.behaviors,n=s.source;for(let t=0,e=i.length;t<e;++t)i[t].unbind(n)}}}}class A{constructor(t,e){this.behaviorCount=0,this.hasHostBehaviors=!1,this.fragment=null,this.targetOffset=0,this.viewBehaviorFactories=null,this.hostBehaviorFactories=null,this.html=t,this.directives=e}create(t){if(null===this.fragment){let t;const e=this.html;if("string"==typeof e){t=document.createElement("template"),t.innerHTML=i.dv.createHTML(e);const s=t.content.firstElementChild;null!==s&&"TEMPLATE"===s.tagName&&(t=s)}else t=e;const s=function(t,e){const s=t.content;document.adoptNode(s);const n=C.borrow(e);T(n,t,!0);const r=n.behaviorFactories;n.reset();const o=i.dv.createTemplateWalker(s);let l;for(;l=o.nextNode();)switch(n.targetIndex++,l.nodeType){case 1:T(n,l);break;case 3:B(n,l,o);break;case 8:i.dv.isMarker(l)&&n.addFactory(e[i.dv.extractDirectiveIndexFromMarker(l)])}let a=0;(i.dv.isMarker(s.firstChild)||1===s.childNodes.length&&e.length)&&(s.insertBefore(document.createComment(""),s.firstChild),a=-1);const h=n.behaviorFactories;return n.release(),{fragment:s,viewBehaviorFactories:h,hostBehaviorFactories:r,targetOffset:a}}(t,this.directives);this.fragment=s.fragment,this.viewBehaviorFactories=s.viewBehaviorFactories,this.hostBehaviorFactories=s.hostBehaviorFactories,this.targetOffset=s.targetOffset,this.behaviorCount=this.viewBehaviorFactories.length+this.hostBehaviorFactories.length,this.hasHostBehaviors=this.hostBehaviorFactories.length>0}const e=this.fragment.cloneNode(!0),s=this.viewBehaviorFactories,n=new Array(this.behaviorCount),r=i.dv.createTemplateWalker(e);let o=0,l=this.targetOffset,a=r.nextNode();for(let t=s.length;o<t;++o){const t=s[o],e=t.targetIndex;for(;null!==a;){if(l===e){n[o]=t.createBehavior(a);break}a=r.nextNode(),l++}}if(this.hasHostBehaviors){const e=this.hostBehaviorFactories;for(let s=0,i=e.length;s<i;++s,++o)n[o]=e[s].createBehavior(t)}return new N(e,n)}render(t,e,s){"string"==typeof e&&(e=document.getElementById(e)),void 0===s&&(s=e);const i=this.create(s);return i.bind(t,n.Fj),i.appendTo(e),i}}const k=/([ \x09\x0a\x0c\x0d])([^\0-\x1F\x7F-\x9F "'>=/]+)([ \x09\x0a\x0c\x0d]*=[ \x09\x0a\x0c\x0d]*(?:[^ \x09\x0a\x0c\x0d"'`<>=]*|"[^"]*|'[^']*))$/;function F(t,...e){const s=[];let i="";for(let n=0,l=t.length-1;n<l;++n){const l=t[n];let a=e[n];if(i+=l,a instanceof A){const t=a;a=()=>t}if("function"==typeof a&&(a=new v(a)),a instanceof o){const t=k.exec(l);null!==t&&(a.targetName=t[2])}a instanceof r?(i+=a.createPlaceholder(s.length),s.push(a)):i+=a}return i+=t[t.length-1],new A(i,s)}}}]);
|
|
2
|
+
//# sourceMappingURL=npm.microsoft.9a8d569a86ddb71ef224f86caf2bff7c.js.map
|
package/dist/sw.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
(()=>{"use strict";var e={136:()=>{try{self["workbox:core:6.5.4"]&&_()}catch(e){}},227:()=>{try{self["workbox:routing:6.5.4"]&&_()}catch(e){}},357:()=>{try{self["workbox:core:6.5.3"]&&_()}catch(e){}},390:()=>{try{self["workbox:strategies:6.5.4"]&&_()}catch(e){}},447:()=>{try{self["workbox:precaching:6.5.4"]&&_()}catch(e){}},535:()=>{try{self["workbox:cacheable-response:6.5.3"]&&_()}catch(e){}},626:()=>{try{self["workbox:expiration:6.5.4"]&&_()}catch(e){}}},t={};function s(n){var a=t[n];if(void 0!==a){if(void 0!==a.error)throw a.error;return a.exports}var r=t[n]={exports:{}},i=!0;try{e[n](r,r.exports,s),i=!1}finally{i&&delete t[n]}return r.exports}function n(e,t,s,n){return new(s||(s=Promise))(function(a,r){function i(e){try{c(n.next(e))}catch(e){r(e)}}function o(e){try{c(n.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?a(e.value):(t=e.value,t instanceof s?t:new s(function(e){e(t)})).then(i,o)}c((n=n.apply(e,t||[])).next())})}Object.create;Object.create;"function"==typeof SuppressedError&&SuppressedError;s(357);Error;s(535);class a{constructor(e={}){this._statuses=e.statuses,this._headers=e.headers}isResponseCacheable(e){let t=!0;return this._statuses&&(t=this._statuses.includes(e.status)),this._headers&&t&&(t=Object.keys(this._headers).some(t=>e.headers.get(t)===this._headers[t])),t}}class r{constructor(e){this.cacheWillUpdate=async({response:e})=>this._cacheableResponse.isResponseCacheable(e)?e:null,this._cacheableResponse=new a(e)}}s(136);const i=(e,...t)=>{let s=e;return t.length>0&&(s+=` :: ${JSON.stringify(t)}`),s};class o extends Error{constructor(e,t){super(i(e,t)),this.name=e,this.details=t}}const c=new Set;const h={googleAnalytics:"googleAnalytics",precache:"precache-v2",prefix:"workbox",runtime:"runtime",suffix:"undefined"!=typeof registration?registration.scope:""},l=e=>[h.prefix,e,h.suffix].filter(e=>e&&e.length>0).join("-"),u=e=>e||l(h.precache),d=e=>e||l(h.runtime);function f(e,t){const s=new URL(e);for(const e of t)s.searchParams.delete(e);return s.href}let p;function g(e){e.then(()=>{})}class w{constructor(){this.promise=new Promise((e,t)=>{this.resolve=e,this.reject=t})}}const m=e=>new URL(String(e),location.href).href.replace(new RegExp(`^${location.origin}`),"");function y(e){return new Promise(t=>setTimeout(t,e))}function v(e,t){const s=t();return e.waitUntil(s),s}async function b(e,t){let s=null;if(e.url){s=new URL(e.url).origin}if(s!==self.location.origin)throw new o("cross-origin-copy-response",{origin:s});const n=e.clone(),a={headers:new Headers(n.headers),status:n.status,statusText:n.statusText},r=t?t(a):a,i=function(){if(void 0===p){const e=new Response("");if("body"in e)try{new Response(e.body),p=!0}catch(e){p=!1}p=!1}return p}()?n.body:await n.blob();return new Response(i,r)}let R,x;const C=new WeakMap,E=new WeakMap,q=new WeakMap,L=new WeakMap,k=new WeakMap;let U={get(e,t,s){if(e instanceof IDBTransaction){if("done"===t)return E.get(e);if("objectStoreNames"===t)return e.objectStoreNames||q.get(e);if("store"===t)return s.objectStoreNames[1]?void 0:s.objectStore(s.objectStoreNames[0])}return N(e[t])},set:(e,t,s)=>(e[t]=s,!0),has:(e,t)=>e instanceof IDBTransaction&&("done"===t||"store"===t)||t in e};function T(e){return e!==IDBDatabase.prototype.transaction||"objectStoreNames"in IDBTransaction.prototype?(x||(x=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])).includes(e)?function(...t){return e.apply(P(this),t),N(C.get(this))}:function(...t){return N(e.apply(P(this),t))}:function(t,...s){const n=e.call(P(this),t,...s);return q.set(n,t.sort?t.sort():[t]),N(n)}}function D(e){return"function"==typeof e?T(e):(e instanceof IDBTransaction&&function(e){if(E.has(e))return;const t=new Promise((t,s)=>{const n=()=>{e.removeEventListener("complete",a),e.removeEventListener("error",r),e.removeEventListener("abort",r)},a=()=>{t(),n()},r=()=>{s(e.error||new DOMException("AbortError","AbortError")),n()};e.addEventListener("complete",a),e.addEventListener("error",r),e.addEventListener("abort",r)});E.set(e,t)}(e),t=e,(R||(R=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])).some(e=>t instanceof e)?new Proxy(e,U):e);var t}function N(e){if(e instanceof IDBRequest)return function(e){const t=new Promise((t,s)=>{const n=()=>{e.removeEventListener("success",a),e.removeEventListener("error",r)},a=()=>{t(N(e.result)),n()},r=()=>{s(e.error),n()};e.addEventListener("success",a),e.addEventListener("error",r)});return t.then(t=>{t instanceof IDBCursor&&C.set(t,e)}).catch(()=>{}),k.set(t,e),t}(e);if(L.has(e))return L.get(e);const t=D(e);return t!==e&&(L.set(e,t),k.set(t,e)),t}const P=e=>k.get(e);const M=["get","getKey","getAll","getAllKeys","count"],S=["put","add","delete","clear"],I=new Map;function K(e,t){if(!(e instanceof IDBDatabase)||t in e||"string"!=typeof t)return;if(I.get(t))return I.get(t);const s=t.replace(/FromIndex$/,""),n=t!==s,a=S.includes(s);if(!(s in(n?IDBIndex:IDBObjectStore).prototype)||!a&&!M.includes(s))return;const r=async function(e,...t){const r=this.transaction(e,a?"readwrite":"readonly");let i=r.store;return n&&(i=i.index(t.shift())),(await Promise.all([i[s](...t),a&&r.done]))[0]};return I.set(t,r),r}U=(e=>({...e,get:(t,s,n)=>K(t,s)||e.get(t,s,n),has:(t,s)=>!!K(t,s)||e.has(t,s)}))(U);s(626);const O="cache-entries",W=e=>{const t=new URL(e,location.href);return t.hash="",t.href};class A{constructor(e){this._db=null,this._cacheName=e}_upgradeDb(e){const t=e.createObjectStore(O,{keyPath:"id"});t.createIndex("cacheName","cacheName",{unique:!1}),t.createIndex("timestamp","timestamp",{unique:!1})}_upgradeDbAndDeleteOldDbs(e){this._upgradeDb(e),this._cacheName&&function(e,{blocked:t}={}){const s=indexedDB.deleteDatabase(e);t&&s.addEventListener("blocked",e=>t(e.oldVersion,e)),N(s).then(()=>{})}(this._cacheName)}async setTimestamp(e,t){const s={url:e=W(e),timestamp:t,cacheName:this._cacheName,id:this._getId(e)},n=(await this.getDb()).transaction(O,"readwrite",{durability:"relaxed"});await n.store.put(s),await n.done}async getTimestamp(e){const t=await this.getDb(),s=await t.get(O,this._getId(e));return null==s?void 0:s.timestamp}async expireEntries(e,t){const s=await this.getDb();let n=await s.transaction(O).store.index("timestamp").openCursor(null,"prev");const a=[];let r=0;for(;n;){const s=n.value;s.cacheName===this._cacheName&&(e&&s.timestamp<e||t&&r>=t?a.push(n.value):r++),n=await n.continue()}const i=[];for(const e of a)await s.delete(O,e.id),i.push(e.url);return i}_getId(e){return this._cacheName+"|"+W(e)}async getDb(){return this._db||(this._db=await function(e,t,{blocked:s,upgrade:n,blocking:a,terminated:r}={}){const i=indexedDB.open(e,t),o=N(i);return n&&i.addEventListener("upgradeneeded",e=>{n(N(i.result),e.oldVersion,e.newVersion,N(i.transaction),e)}),s&&i.addEventListener("blocked",e=>s(e.oldVersion,e.newVersion,e)),o.then(e=>{r&&e.addEventListener("close",()=>r()),a&&e.addEventListener("versionchange",e=>a(e.oldVersion,e.newVersion,e))}).catch(()=>{}),o}("workbox-expiration",1,{upgrade:this._upgradeDbAndDeleteOldDbs.bind(this)})),this._db}}class j{constructor(e,t={}){this._isRunning=!1,this._rerunRequested=!1,this._maxEntries=t.maxEntries,this._maxAgeSeconds=t.maxAgeSeconds,this._matchOptions=t.matchOptions,this._cacheName=e,this._timestampModel=new A(e)}async expireEntries(){if(this._isRunning)return void(this._rerunRequested=!0);this._isRunning=!0;const e=this._maxAgeSeconds?Date.now()-1e3*this._maxAgeSeconds:0,t=await this._timestampModel.expireEntries(e,this._maxEntries),s=await self.caches.open(this._cacheName);for(const e of t)await s.delete(e,this._matchOptions);this._isRunning=!1,this._rerunRequested&&(this._rerunRequested=!1,g(this.expireEntries()))}async updateTimestamp(e){await this._timestampModel.setTimestamp(e,Date.now())}async isURLExpired(e){if(this._maxAgeSeconds){const t=await this._timestampModel.getTimestamp(e),s=Date.now()-1e3*this._maxAgeSeconds;return void 0===t||t<s}return!1}async delete(){this._rerunRequested=!1,await this._timestampModel.expireEntries(1/0)}}s(447);function B(e){if(!e)throw new o("add-to-cache-list-unexpected-type",{entry:e});if("string"==typeof e){const t=new URL(e,location.href);return{cacheKey:t.href,url:t.href}}const{revision:t,url:s}=e;if(!s)throw new o("add-to-cache-list-unexpected-type",{entry:e});if(!t){const e=new URL(s,location.href);return{cacheKey:e.href,url:e.href}}const n=new URL(s,location.href),a=new URL(s,location.href);return n.searchParams.set("__WB_REVISION__",t),{cacheKey:n.href,url:a.href}}class H{constructor(){this.updatedURLs=[],this.notUpdatedURLs=[],this.handlerWillStart=async({request:e,state:t})=>{t&&(t.originalRequest=e)},this.cachedResponseWillBeUsed=async({event:e,state:t,cachedResponse:s})=>{if("install"===e.type&&t&&t.originalRequest&&t.originalRequest instanceof Request){const e=t.originalRequest.url;s?this.notUpdatedURLs.push(e):this.updatedURLs.push(e)}return s}}}class F{constructor({precacheController:e}){this.cacheKeyWillBeUsed=async({request:e,params:t})=>{const s=(null==t?void 0:t.cacheKey)||this._precacheController.getCacheKeyForURL(e.url);return s?new Request(s,{headers:e.headers}):e},this._precacheController=e}}s(390);function V(e){return"string"==typeof e?new Request(e):e}class ${constructor(e,t){this._cacheKeys={},Object.assign(this,t),this.event=t.event,this._strategy=e,this._handlerDeferred=new w,this._extendLifetimePromises=[],this._plugins=[...e.plugins],this._pluginStateMap=new Map;for(const e of this._plugins)this._pluginStateMap.set(e,{});this.event.waitUntil(this._handlerDeferred.promise)}async fetch(e){const{event:t}=this;let s=V(e);if("navigate"===s.mode&&t instanceof FetchEvent&&t.preloadResponse){const e=await t.preloadResponse;if(e)return e}const n=this.hasCallback("fetchDidFail")?s.clone():null;try{for(const e of this.iterateCallbacks("requestWillFetch"))s=await e({request:s.clone(),event:t})}catch(e){if(e instanceof Error)throw new o("plugin-error-request-will-fetch",{thrownErrorMessage:e.message})}const a=s.clone();try{let e;e=await fetch(s,"navigate"===s.mode?void 0:this._strategy.fetchOptions);for(const s of this.iterateCallbacks("fetchDidSucceed"))e=await s({event:t,request:a,response:e});return e}catch(e){throw n&&await this.runCallbacks("fetchDidFail",{error:e,event:t,originalRequest:n.clone(),request:a.clone()}),e}}async fetchAndCachePut(e){const t=await this.fetch(e),s=t.clone();return this.waitUntil(this.cachePut(e,s)),t}async cacheMatch(e){const t=V(e);let s;const{cacheName:n,matchOptions:a}=this._strategy,r=await this.getCacheKey(t,"read"),i=Object.assign(Object.assign({},a),{cacheName:n});s=await caches.match(r,i);for(const e of this.iterateCallbacks("cachedResponseWillBeUsed"))s=await e({cacheName:n,matchOptions:a,cachedResponse:s,request:r,event:this.event})||void 0;return s}async cachePut(e,t){const s=V(e);await y(0);const n=await this.getCacheKey(s,"write");if(!t)throw new o("cache-put-with-no-response",{url:m(n.url)});const a=await this._ensureResponseSafeToCache(t);if(!a)return!1;const{cacheName:r,matchOptions:i}=this._strategy,h=await self.caches.open(r),l=this.hasCallback("cacheDidUpdate"),u=l?await async function(e,t,s,n){const a=f(t.url,s);if(t.url===a)return e.match(t,n);const r=Object.assign(Object.assign({},n),{ignoreSearch:!0}),i=await e.keys(t,r);for(const t of i)if(a===f(t.url,s))return e.match(t,n)}(h,n.clone(),["__WB_REVISION__"],i):null;try{await h.put(n,l?a.clone():a)}catch(e){if(e instanceof Error)throw"QuotaExceededError"===e.name&&await async function(){for(const e of c)await e()}(),e}for(const e of this.iterateCallbacks("cacheDidUpdate"))await e({cacheName:r,oldResponse:u,newResponse:a.clone(),request:n,event:this.event});return!0}async getCacheKey(e,t){const s=`${e.url} | ${t}`;if(!this._cacheKeys[s]){let n=e;for(const e of this.iterateCallbacks("cacheKeyWillBeUsed"))n=V(await e({mode:t,request:n,event:this.event,params:this.params}));this._cacheKeys[s]=n}return this._cacheKeys[s]}hasCallback(e){for(const t of this._strategy.plugins)if(e in t)return!0;return!1}async runCallbacks(e,t){for(const s of this.iterateCallbacks(e))await s(t)}*iterateCallbacks(e){for(const t of this._strategy.plugins)if("function"==typeof t[e]){const s=this._pluginStateMap.get(t),n=n=>{const a=Object.assign(Object.assign({},n),{state:s});return t[e](a)};yield n}}waitUntil(e){return this._extendLifetimePromises.push(e),e}async doneWaiting(){let e;for(;e=this._extendLifetimePromises.shift();)await e}destroy(){this._handlerDeferred.resolve(null)}async _ensureResponseSafeToCache(e){let t=e,s=!1;for(const e of this.iterateCallbacks("cacheWillUpdate"))if(t=await e({request:this.request,response:t,event:this.event})||void 0,s=!0,!t)break;return s||t&&200!==t.status&&(t=void 0),t}}class Q{constructor(e={}){this.cacheName=d(e.cacheName),this.plugins=e.plugins||[],this.fetchOptions=e.fetchOptions,this.matchOptions=e.matchOptions}handle(e){const[t]=this.handleAll(e);return t}handleAll(e){e instanceof FetchEvent&&(e={event:e,request:e.request});const t=e.event,s="string"==typeof e.request?new Request(e.request):e.request,n="params"in e?e.params:void 0,a=new $(this,{event:t,request:s,params:n}),r=this._getResponse(a,s,t);return[r,this._awaitComplete(r,a,s,t)]}async _getResponse(e,t,s){let n;await e.runCallbacks("handlerWillStart",{event:s,request:t});try{if(n=await this._handle(t,e),!n||"error"===n.type)throw new o("no-response",{url:t.url})}catch(a){if(a instanceof Error)for(const r of e.iterateCallbacks("handlerDidError"))if(n=await r({error:a,event:s,request:t}),n)break;if(!n)throw a}for(const a of e.iterateCallbacks("handlerWillRespond"))n=await a({event:s,request:t,response:n});return n}async _awaitComplete(e,t,s,n){let a,r;try{a=await e}catch(r){}try{await t.runCallbacks("handlerDidRespond",{event:n,request:s,response:a}),await t.doneWaiting()}catch(e){e instanceof Error&&(r=e)}if(await t.runCallbacks("handlerDidComplete",{event:n,request:s,response:a,error:r}),t.destroy(),r)throw r}}class Y extends Q{constructor(e={}){e.cacheName=u(e.cacheName),super(e),this._fallbackToNetwork=!1!==e.fallbackToNetwork,this.plugins.push(Y.copyRedirectedCacheableResponsesPlugin)}async _handle(e,t){const s=await t.cacheMatch(e);return s||(t.event&&"install"===t.event.type?await this._handleInstall(e,t):await this._handleFetch(e,t))}async _handleFetch(e,t){let s;const n=t.params||{};if(!this._fallbackToNetwork)throw new o("missing-precache-entry",{cacheName:this.cacheName,url:e.url});{0;const a=n.integrity,r=e.integrity,i=!r||r===a;if(s=await t.fetch(new Request(e,{integrity:"no-cors"!==e.mode?r||a:void 0})),a&&i&&"no-cors"!==e.mode){this._useDefaultCacheabilityPluginIfNeeded();await t.cachePut(e,s.clone());0}}return s}async _handleInstall(e,t){this._useDefaultCacheabilityPluginIfNeeded();const s=await t.fetch(e);if(!await t.cachePut(e,s.clone()))throw new o("bad-precaching-response",{url:e.url,status:s.status});return s}_useDefaultCacheabilityPluginIfNeeded(){let e=null,t=0;for(const[s,n]of this.plugins.entries())n!==Y.copyRedirectedCacheableResponsesPlugin&&(n===Y.defaultPrecacheCacheabilityPlugin&&(e=s),n.cacheWillUpdate&&t++);0===t?this.plugins.push(Y.defaultPrecacheCacheabilityPlugin):t>1&&null!==e&&this.plugins.splice(e,1)}}Y.defaultPrecacheCacheabilityPlugin={cacheWillUpdate:async({response:e})=>!e||e.status>=400?null:e},Y.copyRedirectedCacheableResponsesPlugin={cacheWillUpdate:async({response:e})=>e.redirected?await b(e):e};class G{constructor({cacheName:e,plugins:t=[],fallbackToNetwork:s=!0}={}){this._urlsToCacheKeys=new Map,this._urlsToCacheModes=new Map,this._cacheKeysToIntegrities=new Map,this._strategy=new Y({cacheName:u(e),plugins:[...t,new F({precacheController:this})],fallbackToNetwork:s}),this.install=this.install.bind(this),this.activate=this.activate.bind(this)}get strategy(){return this._strategy}precache(e){this.addToCacheList(e),this._installAndActiveListenersAdded||(self.addEventListener("install",this.install),self.addEventListener("activate",this.activate),this._installAndActiveListenersAdded=!0)}addToCacheList(e){const t=[];for(const s of e){"string"==typeof s?t.push(s):s&&void 0===s.revision&&t.push(s.url);const{cacheKey:e,url:n}=B(s),a="string"!=typeof s&&s.revision?"reload":"default";if(this._urlsToCacheKeys.has(n)&&this._urlsToCacheKeys.get(n)!==e)throw new o("add-to-cache-list-conflicting-entries",{firstEntry:this._urlsToCacheKeys.get(n),secondEntry:e});if("string"!=typeof s&&s.integrity){if(this._cacheKeysToIntegrities.has(e)&&this._cacheKeysToIntegrities.get(e)!==s.integrity)throw new o("add-to-cache-list-conflicting-integrities",{url:n});this._cacheKeysToIntegrities.set(e,s.integrity)}if(this._urlsToCacheKeys.set(n,e),this._urlsToCacheModes.set(n,a),t.length>0){const e=`Workbox is precaching URLs without revision info: ${t.join(", ")}\nThis is generally NOT safe. Learn more at https://bit.ly/wb-precache`;console.warn(e)}}}install(e){return v(e,async()=>{const t=new H;this.strategy.plugins.push(t);for(const[t,s]of this._urlsToCacheKeys){const n=this._cacheKeysToIntegrities.get(s),a=this._urlsToCacheModes.get(t),r=new Request(t,{integrity:n,cache:a,credentials:"same-origin"});await Promise.all(this.strategy.handleAll({params:{cacheKey:s},request:r,event:e}))}const{updatedURLs:s,notUpdatedURLs:n}=t;return{updatedURLs:s,notUpdatedURLs:n}})}activate(e){return v(e,async()=>{const e=await self.caches.open(this.strategy.cacheName),t=await e.keys(),s=new Set(this._urlsToCacheKeys.values()),n=[];for(const a of t)s.has(a.url)||(await e.delete(a),n.push(a.url));return{deletedURLs:n}})}getURLsToCacheKeys(){return this._urlsToCacheKeys}getCachedURLs(){return[...this._urlsToCacheKeys.keys()]}getCacheKeyForURL(e){const t=new URL(e,location.href);return this._urlsToCacheKeys.get(t.href)}getIntegrityForCacheKey(e){return this._cacheKeysToIntegrities.get(e)}async matchPrecache(e){const t=e instanceof Request?e.url:e,s=this.getCacheKeyForURL(t);if(s){return(await self.caches.open(this.strategy.cacheName)).match(s)}}createHandlerBoundToURL(e){const t=this.getCacheKeyForURL(e);if(!t)throw new o("non-precached-url",{url:e});return s=>(s.request=new Request(e),s.params=Object.assign({cacheKey:t},s.params),this.strategy.handle(s))}}let J;const Z=()=>(J||(J=new G),J);s(227);const z=e=>e&&"object"==typeof e?e:{handle:e};class X{constructor(e,t,s="GET"){this.handler=z(t),this.match=e,this.method=s}setCatchHandler(e){this.catchHandler=z(e)}}class ee extends X{constructor(e,t,s){super(({url:t})=>{const s=e.exec(t.href);if(s&&(t.origin===location.origin||0===s.index))return s.slice(1)},t,s)}}class te{constructor(){this._routes=new Map,this._defaultHandlerMap=new Map}get routes(){return this._routes}addFetchListener(){self.addEventListener("fetch",e=>{const{request:t}=e,s=this.handleRequest({request:t,event:e});s&&e.respondWith(s)})}addCacheListener(){self.addEventListener("message",e=>{if(e.data&&"CACHE_URLS"===e.data.type){const{payload:t}=e.data;0;const s=Promise.all(t.urlsToCache.map(t=>{"string"==typeof t&&(t=[t]);const s=new Request(...t);return this.handleRequest({request:s,event:e})}));e.waitUntil(s),e.ports&&e.ports[0]&&s.then(()=>e.ports[0].postMessage(!0))}})}handleRequest({request:e,event:t}){const s=new URL(e.url,location.href);if(!s.protocol.startsWith("http"))return void 0;const n=s.origin===location.origin,{params:a,route:r}=this.findMatchingRoute({event:t,request:e,sameOrigin:n,url:s});let i=r&&r.handler;const o=e.method;if(!i&&this._defaultHandlerMap.has(o)&&(i=this._defaultHandlerMap.get(o)),!i)return void 0;let c;try{c=i.handle({url:s,request:e,event:t,params:a})}catch(e){c=Promise.reject(e)}const h=r&&r.catchHandler;return c instanceof Promise&&(this._catchHandler||h)&&(c=c.catch(async n=>{if(h){0;try{return await h.handle({url:s,request:e,event:t,params:a})}catch(e){e instanceof Error&&(n=e)}}if(this._catchHandler)return this._catchHandler.handle({url:s,request:e,event:t});throw n})),c}findMatchingRoute({url:e,sameOrigin:t,request:s,event:n}){const a=this._routes.get(s.method)||[];for(const r of a){let a;const i=r.match({url:e,sameOrigin:t,request:s,event:n});if(i)return a=i,(Array.isArray(a)&&0===a.length||i.constructor===Object&&0===Object.keys(i).length||"boolean"==typeof i)&&(a=void 0),{route:r,params:a}}return{}}setDefaultHandler(e,t="GET"){this._defaultHandlerMap.set(t,z(e))}setCatchHandler(e){this._catchHandler=z(e)}registerRoute(e){this._routes.has(e.method)||this._routes.set(e.method,[]),this._routes.get(e.method).push(e)}unregisterRoute(e){if(!this._routes.has(e.method))throw new o("unregister-route-but-not-found-with-method",{method:e.method});const t=this._routes.get(e.method).indexOf(e);if(!(t>-1))throw new o("unregister-route-route-not-registered");this._routes.get(e.method).splice(t,1)}}let se;const ne=()=>(se||(se=new te,se.addFetchListener(),se.addCacheListener()),se);function ae(e,t,s){let n;if("string"==typeof e){const a=new URL(e,location.href);0;n=new X(({url:e})=>e.href===a.href,t,s)}else if(e instanceof RegExp)n=new ee(e,t,s);else if("function"==typeof e)n=new X(e,t,s);else{if(!(e instanceof X))throw new o("unsupported-route-type",{moduleName:"workbox-routing",funcName:"registerRoute",paramName:"capture"});n=e}return ne().registerRoute(n),n}class re extends X{constructor(e,t){super(({request:s})=>{const n=e.getURLsToCacheKeys();for(const a of function*(e,{ignoreURLParametersMatching:t=[/^utm_/,/^fbclid$/],directoryIndex:s="index.html",cleanURLs:n=!0,urlManipulation:a}={}){const r=new URL(e,location.href);r.hash="",yield r.href;const i=function(e,t=[]){for(const s of[...e.searchParams.keys()])t.some(e=>e.test(s))&&e.searchParams.delete(s);return e}(r,t);if(yield i.href,s&&i.pathname.endsWith("/")){const e=new URL(i.href);e.pathname+=s,yield e.href}if(n){const e=new URL(i.href);e.pathname+=".html",yield e.href}if(a){const e=a({url:r});for(const t of e)yield t.href}}(s.url,t)){const t=n.get(a);if(t){return{cacheKey:t,integrity:e.getIntegrityForCacheKey(t)}}}},e.strategy)}}const ie={cacheWillUpdate:async({response:e})=>200===e.status||0===e.status?e:null};var oe,ce;console.log("Hello from sw.js v0.0.1"),self.addEventListener("activate",()=>self.clients.claim()),function(e){Z().precache(e)}([{'revision':'5c035540edea453294160c87b69d6efc','url':'/assets/icon.svg'},{'revision':'f6c355a52feba073e894db3d5b561ddc','url':'/dts/app/app.d.ts'},{'revision':'078b6a5c77374f3e6010259f49de61c3','url':'/dts/app/behaviors.d.ts'},{'revision':'75ba0437a002fa52f35a11c6e031fb83','url':'/dts/app/config.d.ts'},{'revision':'15fd8d96dc0bb0147a927cd655991d61','url':'/dts/app/index.d.ts'},{'revision':'75b251d8772324af462b31c734091efe','url':'/dts/app/types.d.ts'},{'revision':'465b8a967c17935b86d36a5a12fe7b71','url':'/dts/app/utils.d.ts'},{'revision':'d8c2f99b493635c8c25ff0a01b297da5','url':'/dts/index.d.ts'},{'revision':'2057a4ce7f492309ceb05c78e1abf2f8','url':'/dts/index.docs.d.ts'},{'revision':'5d05b2cca398071e8b7bd80f8a37ff80','url':'/dts/main/index.d.ts'},{'revision':'127ad4e70d39a7beb238977a6ad7790c','url':'/dts/main/main.d.ts'},{'revision':'5ce23c1e29e802698be958444fcac33a','url':'/dts/main/main.styles.d.ts'},{'revision':'5a9c7f1e56b35773b19ea8fc6fd779d1','url':'/dts/main/main.template.d.ts'},{'revision':'a4a585ff72bb0a204cfe49b476bd9b80','url':'/dts/pbc/index.d.ts'},{'revision':'36878d18600216555e06ab792adc10eb','url':'/dts/pbc/pbc.d.ts'},{'revision':'ddd7a8ed096a3139c726dc3a1c606f78','url':'/dts/pbc/vite/exports.d.ts'},{'revision':'d6e2176ecbaafe1bc42b9f15136946d0','url':'/dts/pbc/vite/index.d.ts'},{'revision':'e372dabcf39748888ec80c9849ba7265','url':'/dts/pbc/vite/utils.d.ts'},{'revision':'ddd7a8ed096a3139c726dc3a1c606f78','url':'/dts/pbc/webpack/exports.d.ts'},{'revision':'d6e2176ecbaafe1bc42b9f15136946d0','url':'/dts/pbc/webpack/index.d.ts'},{'revision':'7708c6a06e46698dfdfaef9ecdccb9a0','url':'/dts/pbc/webpack/utils.d.ts'},{'revision':'1d6bffdf6619ff38e64181ac26bf4297','url':'/dts/serviceWorker/registration.d.ts'},{'revision':'0ab8d9f2503966e9295ae54cc6f64a4a','url':'/dts/serviceWorker/serviceWorker.d.ts'},{'revision':'65230a59ca53b222394cb29719af898c','url':'/dts/utils/index.d.ts'},{'revision':'dc36fe29c255f4306be90d0f53681e24','url':'/dts/utils/logger.d.ts'},{'revision':'d4f850463f4df51860be6f46b599e7ce','url':'/favicon.ico'},{'revision':'cc17e8be9eaa486dc5dbec2ed2fa5a25','url':'/index.html'},{'revision':null,'url':'/main.cc981f7b7ee2b7176ecb.js'},{'revision':null,'url':'/npm.consola.bbc98955813b22b881a7.js'},{'revision':null,'url':'/npm.microsoft.bc8a98e27c50c4f95eb7.js'},{'revision':null,'url':'/swRegistration.69d348f375815d32a934.js'}]||[]),function(e){const t=Z();ae(new re(t,e))}(oe),ae(({request:e})=>"navigate"===e.mode,new class extends Q{constructor(e={}){super(e),this.plugins.some(e=>"cacheWillUpdate"in e)||this.plugins.unshift(ie),this._networkTimeoutSeconds=e.networkTimeoutSeconds||0}async _handle(e,t){const s=[];const n=[];let a;if(this._networkTimeoutSeconds){const{id:r,promise:i}=this._getTimeoutPromise({request:e,logs:s,handler:t});a=r,n.push(i)}const r=this._getNetworkPromise({timeoutId:a,request:e,logs:s,handler:t});n.push(r);const i=await t.waitUntil((async()=>await t.waitUntil(Promise.race(n))||await r)());if(!i)throw new o("no-response",{url:e.url});return i}_getTimeoutPromise({request:e,logs:t,handler:s}){let n;return{promise:new Promise(t=>{n=setTimeout(async()=>{t(await s.cacheMatch(e))},1e3*this._networkTimeoutSeconds)}),id:n}}async _getNetworkPromise({timeoutId:e,request:t,logs:s,handler:n}){let a,r;try{r=await n.fetchAndCachePut(t)}catch(e){e instanceof Error&&(a=e)}return e&&clearTimeout(e),!a&&r||(r=await n.cacheMatch(t)),r}}({cacheName:"pages",plugins:[new r({statuses:[200]})]})),ae(({request:e})=>"style"===e.destination||"script"===e.destination||"worker"===e.destination,new class extends Q{constructor(e={}){super(e),this.plugins.some(e=>"cacheWillUpdate"in e)||this.plugins.unshift(ie)}async _handle(e,t){const s=t.fetchAndCachePut(e).catch(()=>{});t.waitUntil(s);let n,a=await t.cacheMatch(e);if(a)0;else{0;try{a=await s}catch(e){e instanceof Error&&(n=e)}}if(!a)throw new o("no-response",{url:e.url,error:n});return a}}({cacheName:"assets",plugins:[new r({statuses:[200]})]})),ae(({request:e})=>"image"===e.destination,new class extends Q{async _handle(e,t){let s,n=await t.cacheMatch(e);if(n)0;else{0;try{n=await t.fetchAndCachePut(e)}catch(e){e instanceof Error&&(s=e)}0}if(!n)throw new o("no-response",{url:e.url,error:s});return n}}({cacheName:"images",plugins:[new r({statuses:[200]}),new class{constructor(e={}){this.cachedResponseWillBeUsed=async({event:e,request:t,cacheName:s,cachedResponse:n})=>{if(!n)return null;const a=this._isResponseDateFresh(n),r=this._getCacheExpiration(s);g(r.expireEntries());const i=r.updateTimestamp(t.url);if(e)try{e.waitUntil(i)}catch(e){0}return a?n:null},this.cacheDidUpdate=async({cacheName:e,request:t})=>{const s=this._getCacheExpiration(e);await s.updateTimestamp(t.url),await s.expireEntries()},this._config=e,this._maxAgeSeconds=e.maxAgeSeconds,this._cacheExpirations=new Map,e.purgeOnQuotaError&&function(e){c.add(e)}(()=>this.deleteCacheAndMetadata())}_getCacheExpiration(e){if(e===d())throw new o("expire-custom-caches-only");let t=this._cacheExpirations.get(e);return t||(t=new j(e,this._config),this._cacheExpirations.set(e,t)),t}_isResponseDateFresh(e){if(!this._maxAgeSeconds)return!0;const t=this._getDateHeaderTimestamp(e);if(null===t)return!0;return t>=Date.now()-1e3*this._maxAgeSeconds}_getDateHeaderTimestamp(e){if(!e.headers.has("date"))return null;const t=e.headers.get("date"),s=new Date(t).getTime();return isNaN(s)?null:s}async deleteCacheAndMetadata(){for(const[e,t]of this._cacheExpirations)await self.caches.delete(e),await t.delete();this._cacheExpirations=new Map}}({maxEntries:50,maxAgeSeconds:2592e3})]})),function(e){e.skipWaiting="skipWaiting"}(ce||(ce={})),self.addEventListener("message",e=>{if(e.data&&e.data.type===ce.skipWaiting)self.skipWaiting()});const he={applicationServerKey:(e=>{const t=(e+"=".repeat((4-e.length%4)%4)).replace(/-/g,"+").replace(/_/g,"/"),s=self.atob(t),n=new Uint8Array(s.length);for(let e=0;e<s.length;e+=1)n[e]=s.charCodeAt(e);return n})("BHjc7KuOaU4j6MNOs_Mm90By-mPPUqn8Y94I0yv-aYP03ip2nfq8ti_n1mH01QxW9mWtjY8d2-VdcblQYl1Zq-M"),userVisibleOnly:!0};self.addEventListener("activate",()=>n(void 0,void 0,void 0,function*(){try{const e=yield self.registration.pushManager.subscribe(he),t=yield(e=>n(void 0,void 0,void 0,function*(){return(yield fetch("http://localhost:6050/push/save",{method:"post",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).json()}))(e);console.log(t)}catch(e){console.error("SW activate error",e)}})),self.addEventListener("push",e=>{console.log("SW received a push message",e);const{data:t}=e;if(!t)return void console.error("no data in message");const s=t.text()||"Push Message Title";e.waitUntil(self.registration.showNotification(s,{tag:"genesis-global-notification-tag",body:t.text()}))}),self.addEventListener("notificationclose",({notification:e})=>{const t=e.data;console.log("SW notification close",t)}),self.addEventListener("notificationclick",({action:e,notification:t})=>{const s=t.data;console.log("SW notification click",s,e),"close"!==e||t.close()})})();
|
|
2
|
-
//# sourceMappingURL=InjectManifest.
|
|
1
|
+
(()=>{"use strict";var e={535(){try{self["workbox:cacheable-response:6.5.3"]&&_()}catch(e){}},357(){try{self["workbox:core:6.5.3"]&&_()}catch(e){}},136(){try{self["workbox:core:6.5.4"]&&_()}catch(e){}},626(){try{self["workbox:expiration:6.5.4"]&&_()}catch(e){}},447(){try{self["workbox:precaching:6.5.4"]&&_()}catch(e){}},227(){try{self["workbox:routing:6.5.4"]&&_()}catch(e){}},390(){try{self["workbox:strategies:6.5.4"]&&_()}catch(e){}}},t={};function s(n){var a=t[n];if(void 0!==a){if(void 0!==a.error)throw a.error;return a.exports}var r=t[n]={exports:{}},i=!0;try{e[n](r,r.exports,s),i=!1}finally{i&&delete t[n]}return r.exports}function n(e,t,s,n){return new(s||(s=Promise))(function(a,r){function i(e){try{c(n.next(e))}catch(e){r(e)}}function o(e){try{c(n.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?a(e.value):(t=e.value,t instanceof s?t:new s(function(e){e(t)})).then(i,o)}c((n=n.apply(e,t||[])).next())})}Object.create;Object.create;"function"==typeof SuppressedError&&SuppressedError;s(357);Error;s(535);class a{constructor(e={}){this._statuses=e.statuses,this._headers=e.headers}isResponseCacheable(e){let t=!0;return this._statuses&&(t=this._statuses.includes(e.status)),this._headers&&t&&(t=Object.keys(this._headers).some(t=>e.headers.get(t)===this._headers[t])),t}}class r{constructor(e){this.cacheWillUpdate=async({response:e})=>this._cacheableResponse.isResponseCacheable(e)?e:null,this._cacheableResponse=new a(e)}}s(136);const i=(e,...t)=>{let s=e;return t.length>0&&(s+=` :: ${JSON.stringify(t)}`),s};class o extends Error{constructor(e,t){super(i(e,t)),this.name=e,this.details=t}}const c=new Set;const h={googleAnalytics:"googleAnalytics",precache:"precache-v2",prefix:"workbox",runtime:"runtime",suffix:"undefined"!=typeof registration?registration.scope:""},l=e=>[h.prefix,e,h.suffix].filter(e=>e&&e.length>0).join("-"),u=e=>e||l(h.precache),d=e=>e||l(h.runtime);function f(e,t){const s=new URL(e);for(const e of t)s.searchParams.delete(e);return s.href}let p;function g(e){e.then(()=>{})}class w{constructor(){this.promise=new Promise((e,t)=>{this.resolve=e,this.reject=t})}}const m=e=>new URL(String(e),location.href).href.replace(new RegExp(`^${location.origin}`),"");function y(e){return new Promise(t=>setTimeout(t,e))}function v(e,t){const s=t();return e.waitUntil(s),s}async function b(e,t){let s=null;if(e.url){s=new URL(e.url).origin}if(s!==self.location.origin)throw new o("cross-origin-copy-response",{origin:s});const n=e.clone(),a={headers:new Headers(n.headers),status:n.status,statusText:n.statusText},r=t?t(a):a,i=function(){if(void 0===p){const e=new Response("");if("body"in e)try{new Response(e.body),p=!0}catch(e){p=!1}p=!1}return p}()?n.body:await n.blob();return new Response(i,r)}let R,x;const C=new WeakMap,E=new WeakMap,q=new WeakMap,L=new WeakMap,k=new WeakMap;let U={get(e,t,s){if(e instanceof IDBTransaction){if("done"===t)return E.get(e);if("objectStoreNames"===t)return e.objectStoreNames||q.get(e);if("store"===t)return s.objectStoreNames[1]?void 0:s.objectStore(s.objectStoreNames[0])}return N(e[t])},set:(e,t,s)=>(e[t]=s,!0),has:(e,t)=>e instanceof IDBTransaction&&("done"===t||"store"===t)||t in e};function T(e){return e!==IDBDatabase.prototype.transaction||"objectStoreNames"in IDBTransaction.prototype?(x||(x=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])).includes(e)?function(...t){return e.apply(P(this),t),N(C.get(this))}:function(...t){return N(e.apply(P(this),t))}:function(t,...s){const n=e.call(P(this),t,...s);return q.set(n,t.sort?t.sort():[t]),N(n)}}function D(e){return"function"==typeof e?T(e):(e instanceof IDBTransaction&&function(e){if(E.has(e))return;const t=new Promise((t,s)=>{const n=()=>{e.removeEventListener("complete",a),e.removeEventListener("error",r),e.removeEventListener("abort",r)},a=()=>{t(),n()},r=()=>{s(e.error||new DOMException("AbortError","AbortError")),n()};e.addEventListener("complete",a),e.addEventListener("error",r),e.addEventListener("abort",r)});E.set(e,t)}(e),t=e,(R||(R=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])).some(e=>t instanceof e)?new Proxy(e,U):e);var t}function N(e){if(e instanceof IDBRequest)return function(e){const t=new Promise((t,s)=>{const n=()=>{e.removeEventListener("success",a),e.removeEventListener("error",r)},a=()=>{t(N(e.result)),n()},r=()=>{s(e.error),n()};e.addEventListener("success",a),e.addEventListener("error",r)});return t.then(t=>{t instanceof IDBCursor&&C.set(t,e)}).catch(()=>{}),k.set(t,e),t}(e);if(L.has(e))return L.get(e);const t=D(e);return t!==e&&(L.set(e,t),k.set(t,e)),t}const P=e=>k.get(e);const M=["get","getKey","getAll","getAllKeys","count"],S=["put","add","delete","clear"],I=new Map;function K(e,t){if(!(e instanceof IDBDatabase)||t in e||"string"!=typeof t)return;if(I.get(t))return I.get(t);const s=t.replace(/FromIndex$/,""),n=t!==s,a=S.includes(s);if(!(s in(n?IDBIndex:IDBObjectStore).prototype)||!a&&!M.includes(s))return;const r=async function(e,...t){const r=this.transaction(e,a?"readwrite":"readonly");let i=r.store;return n&&(i=i.index(t.shift())),(await Promise.all([i[s](...t),a&&r.done]))[0]};return I.set(t,r),r}U=(e=>({...e,get:(t,s,n)=>K(t,s)||e.get(t,s,n),has:(t,s)=>!!K(t,s)||e.has(t,s)}))(U);s(626);const O="cache-entries",W=e=>{const t=new URL(e,location.href);return t.hash="",t.href};class A{constructor(e){this._db=null,this._cacheName=e}_upgradeDb(e){const t=e.createObjectStore(O,{keyPath:"id"});t.createIndex("cacheName","cacheName",{unique:!1}),t.createIndex("timestamp","timestamp",{unique:!1})}_upgradeDbAndDeleteOldDbs(e){this._upgradeDb(e),this._cacheName&&function(e,{blocked:t}={}){const s=indexedDB.deleteDatabase(e);t&&s.addEventListener("blocked",e=>t(e.oldVersion,e)),N(s).then(()=>{})}(this._cacheName)}async setTimestamp(e,t){const s={url:e=W(e),timestamp:t,cacheName:this._cacheName,id:this._getId(e)},n=(await this.getDb()).transaction(O,"readwrite",{durability:"relaxed"});await n.store.put(s),await n.done}async getTimestamp(e){const t=await this.getDb(),s=await t.get(O,this._getId(e));return null==s?void 0:s.timestamp}async expireEntries(e,t){const s=await this.getDb();let n=await s.transaction(O).store.index("timestamp").openCursor(null,"prev");const a=[];let r=0;for(;n;){const s=n.value;s.cacheName===this._cacheName&&(e&&s.timestamp<e||t&&r>=t?a.push(n.value):r++),n=await n.continue()}const i=[];for(const e of a)await s.delete(O,e.id),i.push(e.url);return i}_getId(e){return this._cacheName+"|"+W(e)}async getDb(){return this._db||(this._db=await function(e,t,{blocked:s,upgrade:n,blocking:a,terminated:r}={}){const i=indexedDB.open(e,t),o=N(i);return n&&i.addEventListener("upgradeneeded",e=>{n(N(i.result),e.oldVersion,e.newVersion,N(i.transaction),e)}),s&&i.addEventListener("blocked",e=>s(e.oldVersion,e.newVersion,e)),o.then(e=>{r&&e.addEventListener("close",()=>r()),a&&e.addEventListener("versionchange",e=>a(e.oldVersion,e.newVersion,e))}).catch(()=>{}),o}("workbox-expiration",1,{upgrade:this._upgradeDbAndDeleteOldDbs.bind(this)})),this._db}}class j{constructor(e,t={}){this._isRunning=!1,this._rerunRequested=!1,this._maxEntries=t.maxEntries,this._maxAgeSeconds=t.maxAgeSeconds,this._matchOptions=t.matchOptions,this._cacheName=e,this._timestampModel=new A(e)}async expireEntries(){if(this._isRunning)return void(this._rerunRequested=!0);this._isRunning=!0;const e=this._maxAgeSeconds?Date.now()-1e3*this._maxAgeSeconds:0,t=await this._timestampModel.expireEntries(e,this._maxEntries),s=await self.caches.open(this._cacheName);for(const e of t)await s.delete(e,this._matchOptions);this._isRunning=!1,this._rerunRequested&&(this._rerunRequested=!1,g(this.expireEntries()))}async updateTimestamp(e){await this._timestampModel.setTimestamp(e,Date.now())}async isURLExpired(e){if(this._maxAgeSeconds){const t=await this._timestampModel.getTimestamp(e),s=Date.now()-1e3*this._maxAgeSeconds;return void 0===t||t<s}return!1}async delete(){this._rerunRequested=!1,await this._timestampModel.expireEntries(1/0)}}s(447);function B(e){if(!e)throw new o("add-to-cache-list-unexpected-type",{entry:e});if("string"==typeof e){const t=new URL(e,location.href);return{cacheKey:t.href,url:t.href}}const{revision:t,url:s}=e;if(!s)throw new o("add-to-cache-list-unexpected-type",{entry:e});if(!t){const e=new URL(s,location.href);return{cacheKey:e.href,url:e.href}}const n=new URL(s,location.href),a=new URL(s,location.href);return n.searchParams.set("__WB_REVISION__",t),{cacheKey:n.href,url:a.href}}class H{constructor(){this.updatedURLs=[],this.notUpdatedURLs=[],this.handlerWillStart=async({request:e,state:t})=>{t&&(t.originalRequest=e)},this.cachedResponseWillBeUsed=async({event:e,state:t,cachedResponse:s})=>{if("install"===e.type&&t&&t.originalRequest&&t.originalRequest instanceof Request){const e=t.originalRequest.url;s?this.notUpdatedURLs.push(e):this.updatedURLs.push(e)}return s}}}class F{constructor({precacheController:e}){this.cacheKeyWillBeUsed=async({request:e,params:t})=>{const s=(null==t?void 0:t.cacheKey)||this._precacheController.getCacheKeyForURL(e.url);return s?new Request(s,{headers:e.headers}):e},this._precacheController=e}}s(390);function V(e){return"string"==typeof e?new Request(e):e}class ${constructor(e,t){this._cacheKeys={},Object.assign(this,t),this.event=t.event,this._strategy=e,this._handlerDeferred=new w,this._extendLifetimePromises=[],this._plugins=[...e.plugins],this._pluginStateMap=new Map;for(const e of this._plugins)this._pluginStateMap.set(e,{});this.event.waitUntil(this._handlerDeferred.promise)}async fetch(e){const{event:t}=this;let s=V(e);if("navigate"===s.mode&&t instanceof FetchEvent&&t.preloadResponse){const e=await t.preloadResponse;if(e)return e}const n=this.hasCallback("fetchDidFail")?s.clone():null;try{for(const e of this.iterateCallbacks("requestWillFetch"))s=await e({request:s.clone(),event:t})}catch(e){if(e instanceof Error)throw new o("plugin-error-request-will-fetch",{thrownErrorMessage:e.message})}const a=s.clone();try{let e;e=await fetch(s,"navigate"===s.mode?void 0:this._strategy.fetchOptions);for(const s of this.iterateCallbacks("fetchDidSucceed"))e=await s({event:t,request:a,response:e});return e}catch(e){throw n&&await this.runCallbacks("fetchDidFail",{error:e,event:t,originalRequest:n.clone(),request:a.clone()}),e}}async fetchAndCachePut(e){const t=await this.fetch(e),s=t.clone();return this.waitUntil(this.cachePut(e,s)),t}async cacheMatch(e){const t=V(e);let s;const{cacheName:n,matchOptions:a}=this._strategy,r=await this.getCacheKey(t,"read"),i=Object.assign(Object.assign({},a),{cacheName:n});s=await caches.match(r,i);for(const e of this.iterateCallbacks("cachedResponseWillBeUsed"))s=await e({cacheName:n,matchOptions:a,cachedResponse:s,request:r,event:this.event})||void 0;return s}async cachePut(e,t){const s=V(e);await y(0);const n=await this.getCacheKey(s,"write");if(!t)throw new o("cache-put-with-no-response",{url:m(n.url)});const a=await this._ensureResponseSafeToCache(t);if(!a)return!1;const{cacheName:r,matchOptions:i}=this._strategy,h=await self.caches.open(r),l=this.hasCallback("cacheDidUpdate"),u=l?await async function(e,t,s,n){const a=f(t.url,s);if(t.url===a)return e.match(t,n);const r=Object.assign(Object.assign({},n),{ignoreSearch:!0}),i=await e.keys(t,r);for(const t of i)if(a===f(t.url,s))return e.match(t,n)}(h,n.clone(),["__WB_REVISION__"],i):null;try{await h.put(n,l?a.clone():a)}catch(e){if(e instanceof Error)throw"QuotaExceededError"===e.name&&await async function(){for(const e of c)await e()}(),e}for(const e of this.iterateCallbacks("cacheDidUpdate"))await e({cacheName:r,oldResponse:u,newResponse:a.clone(),request:n,event:this.event});return!0}async getCacheKey(e,t){const s=`${e.url} | ${t}`;if(!this._cacheKeys[s]){let n=e;for(const e of this.iterateCallbacks("cacheKeyWillBeUsed"))n=V(await e({mode:t,request:n,event:this.event,params:this.params}));this._cacheKeys[s]=n}return this._cacheKeys[s]}hasCallback(e){for(const t of this._strategy.plugins)if(e in t)return!0;return!1}async runCallbacks(e,t){for(const s of this.iterateCallbacks(e))await s(t)}*iterateCallbacks(e){for(const t of this._strategy.plugins)if("function"==typeof t[e]){const s=this._pluginStateMap.get(t),n=n=>{const a=Object.assign(Object.assign({},n),{state:s});return t[e](a)};yield n}}waitUntil(e){return this._extendLifetimePromises.push(e),e}async doneWaiting(){let e;for(;e=this._extendLifetimePromises.shift();)await e}destroy(){this._handlerDeferred.resolve(null)}async _ensureResponseSafeToCache(e){let t=e,s=!1;for(const e of this.iterateCallbacks("cacheWillUpdate"))if(t=await e({request:this.request,response:t,event:this.event})||void 0,s=!0,!t)break;return s||t&&200!==t.status&&(t=void 0),t}}class Q{constructor(e={}){this.cacheName=d(e.cacheName),this.plugins=e.plugins||[],this.fetchOptions=e.fetchOptions,this.matchOptions=e.matchOptions}handle(e){const[t]=this.handleAll(e);return t}handleAll(e){e instanceof FetchEvent&&(e={event:e,request:e.request});const t=e.event,s="string"==typeof e.request?new Request(e.request):e.request,n="params"in e?e.params:void 0,a=new $(this,{event:t,request:s,params:n}),r=this._getResponse(a,s,t);return[r,this._awaitComplete(r,a,s,t)]}async _getResponse(e,t,s){let n;await e.runCallbacks("handlerWillStart",{event:s,request:t});try{if(n=await this._handle(t,e),!n||"error"===n.type)throw new o("no-response",{url:t.url})}catch(a){if(a instanceof Error)for(const r of e.iterateCallbacks("handlerDidError"))if(n=await r({error:a,event:s,request:t}),n)break;if(!n)throw a}for(const a of e.iterateCallbacks("handlerWillRespond"))n=await a({event:s,request:t,response:n});return n}async _awaitComplete(e,t,s,n){let a,r;try{a=await e}catch(r){}try{await t.runCallbacks("handlerDidRespond",{event:n,request:s,response:a}),await t.doneWaiting()}catch(e){e instanceof Error&&(r=e)}if(await t.runCallbacks("handlerDidComplete",{event:n,request:s,response:a,error:r}),t.destroy(),r)throw r}}class Y extends Q{constructor(e={}){e.cacheName=u(e.cacheName),super(e),this._fallbackToNetwork=!1!==e.fallbackToNetwork,this.plugins.push(Y.copyRedirectedCacheableResponsesPlugin)}async _handle(e,t){const s=await t.cacheMatch(e);return s||(t.event&&"install"===t.event.type?await this._handleInstall(e,t):await this._handleFetch(e,t))}async _handleFetch(e,t){let s;const n=t.params||{};if(!this._fallbackToNetwork)throw new o("missing-precache-entry",{cacheName:this.cacheName,url:e.url});{0;const a=n.integrity,r=e.integrity,i=!r||r===a;if(s=await t.fetch(new Request(e,{integrity:"no-cors"!==e.mode?r||a:void 0})),a&&i&&"no-cors"!==e.mode){this._useDefaultCacheabilityPluginIfNeeded();await t.cachePut(e,s.clone());0}}return s}async _handleInstall(e,t){this._useDefaultCacheabilityPluginIfNeeded();const s=await t.fetch(e);if(!await t.cachePut(e,s.clone()))throw new o("bad-precaching-response",{url:e.url,status:s.status});return s}_useDefaultCacheabilityPluginIfNeeded(){let e=null,t=0;for(const[s,n]of this.plugins.entries())n!==Y.copyRedirectedCacheableResponsesPlugin&&(n===Y.defaultPrecacheCacheabilityPlugin&&(e=s),n.cacheWillUpdate&&t++);0===t?this.plugins.push(Y.defaultPrecacheCacheabilityPlugin):t>1&&null!==e&&this.plugins.splice(e,1)}}Y.defaultPrecacheCacheabilityPlugin={cacheWillUpdate:async({response:e})=>!e||e.status>=400?null:e},Y.copyRedirectedCacheableResponsesPlugin={cacheWillUpdate:async({response:e})=>e.redirected?await b(e):e};class G{constructor({cacheName:e,plugins:t=[],fallbackToNetwork:s=!0}={}){this._urlsToCacheKeys=new Map,this._urlsToCacheModes=new Map,this._cacheKeysToIntegrities=new Map,this._strategy=new Y({cacheName:u(e),plugins:[...t,new F({precacheController:this})],fallbackToNetwork:s}),this.install=this.install.bind(this),this.activate=this.activate.bind(this)}get strategy(){return this._strategy}precache(e){this.addToCacheList(e),this._installAndActiveListenersAdded||(self.addEventListener("install",this.install),self.addEventListener("activate",this.activate),this._installAndActiveListenersAdded=!0)}addToCacheList(e){const t=[];for(const s of e){"string"==typeof s?t.push(s):s&&void 0===s.revision&&t.push(s.url);const{cacheKey:e,url:n}=B(s),a="string"!=typeof s&&s.revision?"reload":"default";if(this._urlsToCacheKeys.has(n)&&this._urlsToCacheKeys.get(n)!==e)throw new o("add-to-cache-list-conflicting-entries",{firstEntry:this._urlsToCacheKeys.get(n),secondEntry:e});if("string"!=typeof s&&s.integrity){if(this._cacheKeysToIntegrities.has(e)&&this._cacheKeysToIntegrities.get(e)!==s.integrity)throw new o("add-to-cache-list-conflicting-integrities",{url:n});this._cacheKeysToIntegrities.set(e,s.integrity)}if(this._urlsToCacheKeys.set(n,e),this._urlsToCacheModes.set(n,a),t.length>0){const e=`Workbox is precaching URLs without revision info: ${t.join(", ")}\nThis is generally NOT safe. Learn more at https://bit.ly/wb-precache`;console.warn(e)}}}install(e){return v(e,async()=>{const t=new H;this.strategy.plugins.push(t);for(const[t,s]of this._urlsToCacheKeys){const n=this._cacheKeysToIntegrities.get(s),a=this._urlsToCacheModes.get(t),r=new Request(t,{integrity:n,cache:a,credentials:"same-origin"});await Promise.all(this.strategy.handleAll({params:{cacheKey:s},request:r,event:e}))}const{updatedURLs:s,notUpdatedURLs:n}=t;return{updatedURLs:s,notUpdatedURLs:n}})}activate(e){return v(e,async()=>{const e=await self.caches.open(this.strategy.cacheName),t=await e.keys(),s=new Set(this._urlsToCacheKeys.values()),n=[];for(const a of t)s.has(a.url)||(await e.delete(a),n.push(a.url));return{deletedURLs:n}})}getURLsToCacheKeys(){return this._urlsToCacheKeys}getCachedURLs(){return[...this._urlsToCacheKeys.keys()]}getCacheKeyForURL(e){const t=new URL(e,location.href);return this._urlsToCacheKeys.get(t.href)}getIntegrityForCacheKey(e){return this._cacheKeysToIntegrities.get(e)}async matchPrecache(e){const t=e instanceof Request?e.url:e,s=this.getCacheKeyForURL(t);if(s){return(await self.caches.open(this.strategy.cacheName)).match(s)}}createHandlerBoundToURL(e){const t=this.getCacheKeyForURL(e);if(!t)throw new o("non-precached-url",{url:e});return s=>(s.request=new Request(e),s.params=Object.assign({cacheKey:t},s.params),this.strategy.handle(s))}}let J;const Z=()=>(J||(J=new G),J);s(227);const z=e=>e&&"object"==typeof e?e:{handle:e};class X{constructor(e,t,s="GET"){this.handler=z(t),this.match=e,this.method=s}setCatchHandler(e){this.catchHandler=z(e)}}class ee extends X{constructor(e,t,s){super(({url:t})=>{const s=e.exec(t.href);if(s&&(t.origin===location.origin||0===s.index))return s.slice(1)},t,s)}}class te{constructor(){this._routes=new Map,this._defaultHandlerMap=new Map}get routes(){return this._routes}addFetchListener(){self.addEventListener("fetch",e=>{const{request:t}=e,s=this.handleRequest({request:t,event:e});s&&e.respondWith(s)})}addCacheListener(){self.addEventListener("message",e=>{if(e.data&&"CACHE_URLS"===e.data.type){const{payload:t}=e.data;0;const s=Promise.all(t.urlsToCache.map(t=>{"string"==typeof t&&(t=[t]);const s=new Request(...t);return this.handleRequest({request:s,event:e})}));e.waitUntil(s),e.ports&&e.ports[0]&&s.then(()=>e.ports[0].postMessage(!0))}})}handleRequest({request:e,event:t}){const s=new URL(e.url,location.href);if(!s.protocol.startsWith("http"))return void 0;const n=s.origin===location.origin,{params:a,route:r}=this.findMatchingRoute({event:t,request:e,sameOrigin:n,url:s});let i=r&&r.handler;const o=e.method;if(!i&&this._defaultHandlerMap.has(o)&&(i=this._defaultHandlerMap.get(o)),!i)return void 0;let c;try{c=i.handle({url:s,request:e,event:t,params:a})}catch(e){c=Promise.reject(e)}const h=r&&r.catchHandler;return c instanceof Promise&&(this._catchHandler||h)&&(c=c.catch(async n=>{if(h){0;try{return await h.handle({url:s,request:e,event:t,params:a})}catch(e){e instanceof Error&&(n=e)}}if(this._catchHandler)return this._catchHandler.handle({url:s,request:e,event:t});throw n})),c}findMatchingRoute({url:e,sameOrigin:t,request:s,event:n}){const a=this._routes.get(s.method)||[];for(const r of a){let a;const i=r.match({url:e,sameOrigin:t,request:s,event:n});if(i)return a=i,(Array.isArray(a)&&0===a.length||i.constructor===Object&&0===Object.keys(i).length||"boolean"==typeof i)&&(a=void 0),{route:r,params:a}}return{}}setDefaultHandler(e,t="GET"){this._defaultHandlerMap.set(t,z(e))}setCatchHandler(e){this._catchHandler=z(e)}registerRoute(e){this._routes.has(e.method)||this._routes.set(e.method,[]),this._routes.get(e.method).push(e)}unregisterRoute(e){if(!this._routes.has(e.method))throw new o("unregister-route-but-not-found-with-method",{method:e.method});const t=this._routes.get(e.method).indexOf(e);if(!(t>-1))throw new o("unregister-route-route-not-registered");this._routes.get(e.method).splice(t,1)}}let se;const ne=()=>(se||(se=new te,se.addFetchListener(),se.addCacheListener()),se);function ae(e,t,s){let n;if("string"==typeof e){const a=new URL(e,location.href);0;n=new X(({url:e})=>e.href===a.href,t,s)}else if(e instanceof RegExp)n=new ee(e,t,s);else if("function"==typeof e)n=new X(e,t,s);else{if(!(e instanceof X))throw new o("unsupported-route-type",{moduleName:"workbox-routing",funcName:"registerRoute",paramName:"capture"});n=e}return ne().registerRoute(n),n}class re extends X{constructor(e,t){super(({request:s})=>{const n=e.getURLsToCacheKeys();for(const a of function*(e,{ignoreURLParametersMatching:t=[/^utm_/,/^fbclid$/],directoryIndex:s="index.html",cleanURLs:n=!0,urlManipulation:a}={}){const r=new URL(e,location.href);r.hash="",yield r.href;const i=function(e,t=[]){for(const s of[...e.searchParams.keys()])t.some(e=>e.test(s))&&e.searchParams.delete(s);return e}(r,t);if(yield i.href,s&&i.pathname.endsWith("/")){const e=new URL(i.href);e.pathname+=s,yield e.href}if(n){const e=new URL(i.href);e.pathname+=".html",yield e.href}if(a){const e=a({url:r});for(const t of e)yield t.href}}(s.url,t)){const t=n.get(a);if(t){return{cacheKey:t,integrity:e.getIntegrityForCacheKey(t)}}}},e.strategy)}}const ie={cacheWillUpdate:async({response:e})=>200===e.status||0===e.status?e:null};var oe,ce;console.log("Hello from sw.js v0.0.1"),self.addEventListener("activate",()=>self.clients.claim()),function(e){Z().precache(e)}([{'revision':'5c035540edea453294160c87b69d6efc','url':'/assets/icon.svg'},{'revision':'f6c355a52feba073e894db3d5b561ddc','url':'/dts/app/app.d.ts'},{'revision':'078b6a5c77374f3e6010259f49de61c3','url':'/dts/app/behaviors.d.ts'},{'revision':'75ba0437a002fa52f35a11c6e031fb83','url':'/dts/app/config.d.ts'},{'revision':'15fd8d96dc0bb0147a927cd655991d61','url':'/dts/app/index.d.ts'},{'revision':'75b251d8772324af462b31c734091efe','url':'/dts/app/types.d.ts'},{'revision':'465b8a967c17935b86d36a5a12fe7b71','url':'/dts/app/utils.d.ts'},{'revision':'d8c2f99b493635c8c25ff0a01b297da5','url':'/dts/index.d.ts'},{'revision':'2057a4ce7f492309ceb05c78e1abf2f8','url':'/dts/index.docs.d.ts'},{'revision':'5d05b2cca398071e8b7bd80f8a37ff80','url':'/dts/main/index.d.ts'},{'revision':'127ad4e70d39a7beb238977a6ad7790c','url':'/dts/main/main.d.ts'},{'revision':'5ce23c1e29e802698be958444fcac33a','url':'/dts/main/main.styles.d.ts'},{'revision':'5a9c7f1e56b35773b19ea8fc6fd779d1','url':'/dts/main/main.template.d.ts'},{'revision':'a4a585ff72bb0a204cfe49b476bd9b80','url':'/dts/pbc/index.d.ts'},{'revision':'36878d18600216555e06ab792adc10eb','url':'/dts/pbc/pbc.d.ts'},{'revision':'ddd7a8ed096a3139c726dc3a1c606f78','url':'/dts/pbc/vite/exports.d.ts'},{'revision':'d6e2176ecbaafe1bc42b9f15136946d0','url':'/dts/pbc/vite/index.d.ts'},{'revision':'e372dabcf39748888ec80c9849ba7265','url':'/dts/pbc/vite/utils.d.ts'},{'revision':'ddd7a8ed096a3139c726dc3a1c606f78','url':'/dts/pbc/webpack/exports.d.ts'},{'revision':'d6e2176ecbaafe1bc42b9f15136946d0','url':'/dts/pbc/webpack/index.d.ts'},{'revision':'7708c6a06e46698dfdfaef9ecdccb9a0','url':'/dts/pbc/webpack/utils.d.ts'},{'revision':'1d6bffdf6619ff38e64181ac26bf4297','url':'/dts/serviceWorker/registration.d.ts'},{'revision':'0ab8d9f2503966e9295ae54cc6f64a4a','url':'/dts/serviceWorker/serviceWorker.d.ts'},{'revision':'65230a59ca53b222394cb29719af898c','url':'/dts/utils/index.d.ts'},{'revision':'dc36fe29c255f4306be90d0f53681e24','url':'/dts/utils/logger.d.ts'},{'revision':'d4f850463f4df51860be6f46b599e7ce','url':'/favicon.ico'},{'revision':'201286b5cd015c42077a14f28aa55fd3','url':'/index.html'},{'revision':null,'url':'/main.0e8ca22628a117f16a5f.js'},{'revision':null,'url':'/npm.consola.00ba577c5cd42994a359.js'},{'revision':null,'url':'/npm.microsoft.9b7cca951db576bc267c.js'},{'revision':null,'url':'/swRegistration.9c6ab3734b3caa4b3139.js'}]||[]),function(e){const t=Z();ae(new re(t,e))}(oe),ae(({request:e})=>"navigate"===e.mode,new class extends Q{constructor(e={}){super(e),this.plugins.some(e=>"cacheWillUpdate"in e)||this.plugins.unshift(ie),this._networkTimeoutSeconds=e.networkTimeoutSeconds||0}async _handle(e,t){const s=[];const n=[];let a;if(this._networkTimeoutSeconds){const{id:r,promise:i}=this._getTimeoutPromise({request:e,logs:s,handler:t});a=r,n.push(i)}const r=this._getNetworkPromise({timeoutId:a,request:e,logs:s,handler:t});n.push(r);const i=await t.waitUntil((async()=>await t.waitUntil(Promise.race(n))||await r)());if(!i)throw new o("no-response",{url:e.url});return i}_getTimeoutPromise({request:e,logs:t,handler:s}){let n;return{promise:new Promise(t=>{n=setTimeout(async()=>{t(await s.cacheMatch(e))},1e3*this._networkTimeoutSeconds)}),id:n}}async _getNetworkPromise({timeoutId:e,request:t,logs:s,handler:n}){let a,r;try{r=await n.fetchAndCachePut(t)}catch(e){e instanceof Error&&(a=e)}return e&&clearTimeout(e),!a&&r||(r=await n.cacheMatch(t)),r}}({cacheName:"pages",plugins:[new r({statuses:[200]})]})),ae(({request:e})=>"style"===e.destination||"script"===e.destination||"worker"===e.destination,new class extends Q{constructor(e={}){super(e),this.plugins.some(e=>"cacheWillUpdate"in e)||this.plugins.unshift(ie)}async _handle(e,t){const s=t.fetchAndCachePut(e).catch(()=>{});t.waitUntil(s);let n,a=await t.cacheMatch(e);if(a)0;else{0;try{a=await s}catch(e){e instanceof Error&&(n=e)}}if(!a)throw new o("no-response",{url:e.url,error:n});return a}}({cacheName:"assets",plugins:[new r({statuses:[200]})]})),ae(({request:e})=>"image"===e.destination,new class extends Q{async _handle(e,t){let s,n=await t.cacheMatch(e);if(n)0;else{0;try{n=await t.fetchAndCachePut(e)}catch(e){e instanceof Error&&(s=e)}0}if(!n)throw new o("no-response",{url:e.url,error:s});return n}}({cacheName:"images",plugins:[new r({statuses:[200]}),new class{constructor(e={}){this.cachedResponseWillBeUsed=async({event:e,request:t,cacheName:s,cachedResponse:n})=>{if(!n)return null;const a=this._isResponseDateFresh(n),r=this._getCacheExpiration(s);g(r.expireEntries());const i=r.updateTimestamp(t.url);if(e)try{e.waitUntil(i)}catch(e){0}return a?n:null},this.cacheDidUpdate=async({cacheName:e,request:t})=>{const s=this._getCacheExpiration(e);await s.updateTimestamp(t.url),await s.expireEntries()},this._config=e,this._maxAgeSeconds=e.maxAgeSeconds,this._cacheExpirations=new Map,e.purgeOnQuotaError&&function(e){c.add(e)}(()=>this.deleteCacheAndMetadata())}_getCacheExpiration(e){if(e===d())throw new o("expire-custom-caches-only");let t=this._cacheExpirations.get(e);return t||(t=new j(e,this._config),this._cacheExpirations.set(e,t)),t}_isResponseDateFresh(e){if(!this._maxAgeSeconds)return!0;const t=this._getDateHeaderTimestamp(e);if(null===t)return!0;return t>=Date.now()-1e3*this._maxAgeSeconds}_getDateHeaderTimestamp(e){if(!e.headers.has("date"))return null;const t=e.headers.get("date"),s=new Date(t).getTime();return isNaN(s)?null:s}async deleteCacheAndMetadata(){for(const[e,t]of this._cacheExpirations)await self.caches.delete(e),await t.delete();this._cacheExpirations=new Map}}({maxEntries:50,maxAgeSeconds:2592e3})]})),function(e){e.skipWaiting="skipWaiting"}(ce||(ce={})),self.addEventListener("message",e=>{if(e.data&&e.data.type===ce.skipWaiting)self.skipWaiting()});const he={applicationServerKey:(e=>{const t=(e+"=".repeat((4-e.length%4)%4)).replace(/-/g,"+").replace(/_/g,"/"),s=self.atob(t),n=new Uint8Array(s.length);for(let e=0;e<s.length;e+=1)n[e]=s.charCodeAt(e);return n})("BHjc7KuOaU4j6MNOs_Mm90By-mPPUqn8Y94I0yv-aYP03ip2nfq8ti_n1mH01QxW9mWtjY8d2-VdcblQYl1Zq-M"),userVisibleOnly:!0};self.addEventListener("activate",()=>n(void 0,void 0,void 0,function*(){try{const e=yield self.registration.pushManager.subscribe(he),t=yield(e=>n(void 0,void 0,void 0,function*(){return(yield fetch("http://localhost:6050/push/save",{method:"post",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).json()}))(e);console.log(t)}catch(e){console.error("SW activate error",e)}})),self.addEventListener("push",e=>{console.log("SW received a push message",e);const{data:t}=e;if(!t)return void console.error("no data in message");const s=t.text()||"Push Message Title";e.waitUntil(self.registration.showNotification(s,{tag:"genesis-global-notification-tag",body:t.text()}))}),self.addEventListener("notificationclose",({notification:e})=>{const t=e.data;console.log("SW notification close",t)}),self.addEventListener("notificationclick",({action:e,notification:t})=>{const s=t.data;console.log("SW notification click",s,e),"close"!==e||t.close()})})();
|
|
2
|
+
//# sourceMappingURL=InjectManifest.aed1bdab30d5eaa7a9d8474a484e4846.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
({183(){var i=this&&this.__awaiter||function(i,n,o,r){return new(o||(o=Promise))(function(t,e){function s(i){try{c(r.next(i))}catch(i){e(i)}}function a(i){try{c(r.throw(i))}catch(i){e(i)}}function c(i){var n;i.done?t(i.value):(n=i.value,n instanceof o?n:new o(function(i){i(n)})).then(s,a)}c((r=r.apply(i,n||[])).next())})};const n=n=>i(this,void 0,void 0,function*(){return navigator.serviceWorker.register("/sw.js",n)}),o=()=>i(this,void 0,void 0,function*(){"granted"!==(yield window.Notification.requestPermission())&&console.error("Permission not granted for Notification")});window.addEventListener("load",()=>i(this,void 0,void 0,function*(){(()=>{if(!("serviceWorker"in navigator))throw new Error("No Service Worker support!");if(!("PushManager"in window))throw new Error("No Push API support!")})(),yield o(),yield n({scope:"/"})}))}})[183].call({});
|
|
2
|
+
//# sourceMappingURL=swRegistration.ab8c2335596df9580f9a8f08596cc408.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"swRegistration.xxxxxxxxxxxxxxxxxxxx.js","mappings":"QAAA,IAAIA,EAAaC,MAAQA,KAAKD,WAAc,SAAUE,EAASC,EAAYC,EAAGC,GAE1E,OAAO,IAAKD,IAAMA,EAAIE,UAAU,SAAUC,EAASC,GAC/C,SAASC,EAAUC,GAAS,IAAMC,EAAKN,EAAUO,KAAKF,GAAS,CAAE,MAAOG,GAAKL,EAAOK,EAAI,CAAE,CAC1F,SAASC,EAASJ,GAAS,IAAMC,EAAKN,EAAiB,MAAEK,GAAS,CAAE,MAAOG,GAAKL,EAAOK,EAAI,CAAE,CAC7F,SAASF,EAAKI,GAJlB,IAAeL,EAIaK,EAAOC,KAAOT,EAAQQ,EAAOL,QAJ1CA,EAIyDK,EAAOL,MAJhDA,aAAiBN,EAAIM,EAAQ,IAAIN,EAAE,SAAUG,GAAWA,EAAQG,EAAQ,IAIjBO,KAAKR,EAAWK,EAAW,CAC7GH,GAAMN,EAAYA,EAAUa,MAAMhB,EAASC,GAAc,KAAKS,OAClE,EACJ,EACA,MAQMO,EAAyBC,GAAwBpB,EAAUC,UAAM,OAAQ,EAAQ,YAAe,OAAOoB,UAAUC,cAAcC,SAAS,SAAUH,EAAsB,GACxKI,EAAgC,IAAMxB,EAAUC,UAAM,OAAQ,EAAQ,YAErD,mBADMwB,OAAOC,aAAaC,sBAEzCC,QAAQC,MAAM,0CAEtB,GACAJ,OAAOK,iBAAiB,OAAQ,IAAM9B,EAAUC,UAAM,OAAQ,EAAQ,YAf5C,MACtB,KAAM,kBAAmBoB,WACrB,MAAM,IAAIU,MAAM,8BAEpB,KAAM,gBAAiBN,QACnB,MAAM,IAAIM,MAAM,yBAWpBC,SACMR,UACAL,EAAsB,CAAEc,MAAO,KACzC,G,ICxBoB,KAAKC,KADC,CAAC","sources":["webpack://@genesislcap/foundation-shell/./src/serviceWorker/registration.ts","webpack://@genesislcap/foundation-shell/webpack/startup"],"sourcesContent":["var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nconst checkCapabilities = () => {\n if (!('serviceWorker' in navigator)) {\n throw new Error('No Service Worker support!');\n }\n if (!('PushManager' in window)) {\n throw new Error('No Push API support!');\n }\n};\nconst registerServiceWorker = (registrationOptions) => __awaiter(this, void 0, void 0, function* () { return navigator.serviceWorker.register('/sw.js', registrationOptions); });\nconst requestNotificationPermission = () => __awaiter(this, void 0, void 0, function* () {\n const permission = yield window.Notification.requestPermission();\n if (permission !== 'granted') {\n console.error('Permission not granted for Notification');\n }\n});\nwindow.addEventListener('load', () => __awaiter(this, void 0, void 0, function* () {\n checkCapabilities();\n yield requestNotificationPermission();\n yield registerServiceWorker({ scope: '/' });\n}));\n","// startup\n// Load entry module and return exports\n// This entry module is referenced by other modules so it can't be inlined\nvar __webpack_exports__ = {};\n__webpack_modules__[183].call(__webpack_exports__);\n"],"names":["__awaiter","this","thisArg","_arguments","P","generator","Promise","resolve","reject","fulfilled","value","step","next","e","rejected","result","done","then","apply","registerServiceWorker","registrationOptions","navigator","serviceWorker","register","requestNotificationPermission","window","Notification","requestPermission","console","error","addEventListener","Error","checkCapabilities","scope","call"],"sourceRoot":""}
|