@momentum-design/components 0.29.1 → 0.30.0

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.
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../node_modules/@lit/reactive-element/src/css-tag.ts", "../../../../node_modules/@lit/reactive-element/src/reactive-element.ts", "../../../../node_modules/lit-html/src/lit-html.ts", "../../../../node_modules/lit-element/src/lit-element.ts", "../../../../node_modules/@lit/reactive-element/src/decorators/property.ts", "../../../../node_modules/@lit/reactive-element/src/decorators/state.ts", "../../../../node_modules/@lit/reactive-element/src/decorators/base.ts", "../../../../node_modules/@lit/reactive-element/src/decorators/query.ts", "../../../../node_modules/@lit/reactive-element/src/decorators/query-assigned-elements.ts", "../../../../node_modules/lit-html/src/directives/if-defined.ts", "../../src/models/component/component.styles.ts", "../../src/models/component/component.component.ts", "../../src/models/component/index.ts", "../../../../node_modules/@lit/context/src/lib/context-request-event.ts", "../../../../node_modules/@lit/context/src/lib/controllers/context-consumer.ts", "../../../../node_modules/@lit/context/src/lib/value-notifier.ts", "../../../../node_modules/@lit/context/src/lib/controllers/context-provider.ts", "../../src/models/provider/provider.styles.ts", "../../src/models/provider/provider.component.ts", "../../src/models/provider/index.ts", "../../src/utils/tag-name/constants.ts", "../../src/utils/tag-name/index.ts", "../../src/components/avatar/avatar.constants.ts", "../../src/utils/mixins/AvatarComponentMixin.ts", "../../src/utils/mixins/IconNameMixin.ts", "../../src/utils/styles/index.ts", "../../src/components/avatar/avatar.styles.ts", "../../src/components/presence/presence.constants.ts", "../../src/components/text/text.constants.ts", "../../src/components/avatar/avatar.utils.ts", "../../src/components/avatar/avatar.component.ts", "../../src/components/icon/icon.styles.ts", "../../src/utils/provider/index.ts", "../../src/components/iconprovider/iconprovider.constants.ts", "../../src/components/iconprovider/iconprovider.context.ts", "../../src/components/iconprovider/iconprovider.component.ts", "../../src/utils/icon-cache/index.ts", "../../src/components/icon/icon.utils.ts", "../../src/components/icon/icon.constants.ts", "../../src/components/icon/icon.component.ts", "../../src/components/icon/index.ts", "../../src/components/presence/presence.styles.ts", "../../src/components/presence/presence.utils.ts", "../../src/components/presence/presence.component.ts", "../../src/components/presence/index.ts", "../../src/components/text/fonts.styles.ts", "../../src/components/text/text.styles.ts", "../../src/components/text/text.component.ts", "../../src/components/text/index.ts", "../../src/components/avatar/index.ts", "../../src/components/buttonsimple/buttonsimple.constants.ts", "../../src/components/button/button.constants.ts", "../../src/utils/mixins/DisabledMixin.ts", "../../src/utils/mixins/TabIndexMixin.ts", "../../src/components/buttonsimple/buttonsimple.styles.ts", "../../src/components/buttonsimple/buttonsimple.component.ts", "../../src/components/avatarbutton/avatarbutton.styles.ts", "../../src/components/avatarbutton/avatarbutton.component.ts", "../../src/components/avatarbutton/avatarbutton.constants.ts", "../../src/components/avatarbutton/index.ts", "../../../../node_modules/lit-html/src/directive.ts", "../../../../node_modules/lit-html/src/directives/class-map.ts", "../../src/components/badge/badge.constants.ts", "../../src/components/badge/badge.styles.ts", "../../src/components/badge/badge.component.ts", "../../src/components/badge/index.ts", "../../src/components/bullet/bullet.styles.ts", "../../src/components/bullet/bullet.constants.ts", "../../src/components/bullet/bullet.component.ts", "../../src/components/bullet/index.ts", "../../src/components/button/button.styles.ts", "../../src/components/button/button.utils.ts", "../../src/components/button/button.component.ts", "../../src/components/button/index.ts", "../../src/utils/mixins/DataAriaLabelMixin.ts", "../../../../node_modules/uuid/dist/esm-browser/stringify.js", "../../../../node_modules/uuid/dist/esm-browser/rng.js", "../../../../node_modules/uuid/dist/esm-browser/native.js", "../../../../node_modules/uuid/dist/esm-browser/v4.js", "../../src/utils/mixins/FormInternalsMixin.ts", "../../src/components/formfieldwrapper/formfieldwrapper.constants.ts", "../../src/components/formfieldwrapper/formfieldwrapper.styles.ts", "../../src/components/formfieldwrapper/formfieldwrapper.utils.ts", "../../src/components/formfieldwrapper/formfieldwrapper.component.ts", "../../src/components/checkbox/checkbox.constants.ts", "../../src/components/checkbox/checkbox.styles.ts", "../../src/components/checkbox/checkbox.component.ts", "../../src/components/checkbox/index.ts", "../../src/components/divider/divider.constants.ts", "../../src/components/divider/divider.styles.ts", "../../src/components/divider/divider.component.ts", "../../src/components/divider/index.ts", "../../src/components/formfieldgroup/formfieldgroup.constants.ts", "../../src/components/formfieldgroup/formfieldgroup.styles.ts", "../../src/components/formfieldgroup/formfieldgroup.component.ts", "../../src/components/formfieldgroup/index.ts", "../../src/components/iconprovider/index.ts", "../../src/components/input/input.styles.ts", "../../src/components/formfieldwrapper/index.ts", "../../src/components/input/input.constants.ts", "../../src/components/input/input.component.ts", "../../src/components/input/index.ts", "../../src/components/link/link.constants.ts", "../../src/components/link/link.styles.ts", "../../src/components/link/link.component.ts", "../../src/components/link/index.ts", "../../src/components/listitem/listitem.constants.ts", "../../src/components/list/list.constants.ts", "../../src/components/list/list.styles.ts", "../../src/components/list/list.component.ts", "../../src/components/list/index.ts", "../../src/components/listitem/listitem.styles.ts", "../../src/components/listitem/listitem.component.ts", "../../src/components/listitem/index.ts", "../../src/components/marker/marker.styles.ts", "../../src/components/marker/marker.constants.ts", "../../src/components/marker/marker.component.ts", "../../src/components/marker/index.ts", "../../../../node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs", "../../../../node_modules/@floating-ui/core/dist/floating-ui.core.mjs", "../../../../node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.mjs", "../../../../node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs", "../../src/components/popover/popover.styles.ts", "../../src/components/modalcontainer/modalcontainer.constants.ts", "../../src/components/popover/popover.constants.ts", "../../src/utils/mixins/FocusTrapMixin.ts", "../../src/components/popover/popover.stack.ts", "../../src/utils/mixins/DataAriaDescribedbyMixin.ts", "../../src/utils/mixins/DataAriaLabelledbyMixin.ts", "../../src/components/popover/popover.events.ts", "../../src/components/popover/popover.utils.ts", "../../src/components/popover/popover.component.ts", "../../src/components/modalcontainer/modalcontainer.styles.ts", "../../src/components/modalcontainer/modalcontainer.component.ts", "../../src/components/modalcontainer/index.ts", "../../src/components/popover/index.ts", "../../src/components/radio/radio.styles.ts", "../../src/components/radio/radio.component.ts", "../../src/components/radio/radio.constants.ts", "../../src/components/radio/index.ts", "../../src/components/radiogroup/radiogroup.component.ts", "../../src/components/radiogroup/radiogroup.constants.ts", "../../src/components/radiogroup/index.ts", "../../src/components/spinner/spinner.styles.ts", "../../src/components/spinner/spinner.constants.ts", "../../src/components/spinner/spinner.component.ts", "../../src/components/spinner/index.ts", "../../src/components/tab/tab.styles.ts", "../../src/components/tab/tab.constants.ts", "../../src/components/tab/tab.component.ts", "../../src/components/tab/index.ts", "../../src/components/themeprovider/themeprovider.constants.ts", "../../src/components/themeprovider/themeprovider.context.ts", "../../src/components/themeprovider/themeprovider.styles.ts", "../../src/components/themeprovider/themeprovider.component.ts", "../../src/components/themeprovider/index.ts", "../../src/components/toggle/toggle.styles.ts", "../../src/components/toggle/toggle.constants.ts", "../../src/components/toggle/toggle.component.ts", "../../src/components/toggle/index.ts", "../../../../node_modules/@tanstack/virtual-core/src/utils.ts", "../../../../node_modules/@tanstack/virtual-core/src/index.ts", "../../../../node_modules/@tanstack/lit-virtual/src/index.ts", "../../../../node_modules/lit-html/src/directive-helpers.ts", "../../../../node_modules/lit-html/src/async-directive.ts", "../../../../node_modules/lit-html/src/directives/ref.ts", "../../src/components/virtualizedlist/virtualizedlist.styles.ts", "../../src/components/virtualizedlist/virtualizedlist.constants.ts", "../../src/components/virtualizedlist/virtualizedlist.component.ts", "../../src/components/virtualizedlist/index.ts"],
4
- "sourcesContent": ["/**\n * @license\n * Copyright 2019 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\n\nconst NODE_MODE = false;\n\n// Allows minifiers to rename references to globalThis\nconst global = globalThis;\n\n/**\n * Whether the current browser supports `adoptedStyleSheets`.\n */\nexport const supportsAdoptingStyleSheets: boolean =\n global.ShadowRoot &&\n (global.ShadyCSS === undefined || global.ShadyCSS.nativeShadow) &&\n 'adoptedStyleSheets' in Document.prototype &&\n 'replace' in CSSStyleSheet.prototype;\n\n/**\n * A CSSResult or native CSSStyleSheet.\n *\n * In browsers that support constructible CSS style sheets, CSSStyleSheet\n * object can be used for styling along side CSSResult from the `css`\n * template tag.\n */\nexport type CSSResultOrNative = CSSResult | CSSStyleSheet;\n\nexport type CSSResultArray = Array<CSSResultOrNative | CSSResultArray>;\n\n/**\n * A single CSSResult, CSSStyleSheet, or an array or nested arrays of those.\n */\nexport type CSSResultGroup = CSSResultOrNative | CSSResultArray;\n\nconst constructionToken = Symbol();\n\nconst cssTagCache = new WeakMap<TemplateStringsArray, CSSStyleSheet>();\n\n/**\n * A container for a string of CSS text, that may be used to create a CSSStyleSheet.\n *\n * CSSResult is the return value of `css`-tagged template literals and\n * `unsafeCSS()`. In order to ensure that CSSResults are only created via the\n * `css` tag and `unsafeCSS()`, CSSResult cannot be constructed directly.\n */\nexport class CSSResult {\n // This property needs to remain unminified.\n ['_$cssResult$'] = true;\n readonly cssText: string;\n private _styleSheet?: CSSStyleSheet;\n private _strings: TemplateStringsArray | undefined;\n\n private constructor(\n cssText: string,\n strings: TemplateStringsArray | undefined,\n safeToken: symbol\n ) {\n if (safeToken !== constructionToken) {\n throw new Error(\n 'CSSResult is not constructable. Use `unsafeCSS` or `css` instead.'\n );\n }\n this.cssText = cssText;\n this._strings = strings;\n }\n\n // This is a getter so that it's lazy. In practice, this means stylesheets\n // are not created until the first element instance is made.\n get styleSheet(): CSSStyleSheet | undefined {\n // If `supportsAdoptingStyleSheets` is true then we assume CSSStyleSheet is\n // constructable.\n let styleSheet = this._styleSheet;\n const strings = this._strings;\n if (supportsAdoptingStyleSheets && styleSheet === undefined) {\n const cacheable = strings !== undefined && strings.length === 1;\n if (cacheable) {\n styleSheet = cssTagCache.get(strings);\n }\n if (styleSheet === undefined) {\n (this._styleSheet = styleSheet = new CSSStyleSheet()).replaceSync(\n this.cssText\n );\n if (cacheable) {\n cssTagCache.set(strings, styleSheet);\n }\n }\n }\n return styleSheet;\n }\n\n toString(): string {\n return this.cssText;\n }\n}\n\ntype ConstructableCSSResult = CSSResult & {\n new (\n cssText: string,\n strings: TemplateStringsArray | undefined,\n safeToken: symbol\n ): CSSResult;\n};\n\nconst textFromCSSResult = (value: CSSResultGroup | number) => {\n // This property needs to remain unminified.\n if ((value as CSSResult)['_$cssResult$'] === true) {\n return (value as CSSResult).cssText;\n } else if (typeof value === 'number') {\n return value;\n } else {\n throw new Error(\n `Value passed to 'css' function must be a 'css' function result: ` +\n `${value}. Use 'unsafeCSS' to pass non-literal values, but take care ` +\n `to ensure page security.`\n );\n }\n};\n\n/**\n * Wrap a value for interpolation in a {@linkcode css} tagged template literal.\n *\n * This is unsafe because untrusted CSS text can be used to phone home\n * or exfiltrate data to an attacker controlled site. Take care to only use\n * this with trusted input.\n */\nexport const unsafeCSS = (value: unknown) =>\n new (CSSResult as ConstructableCSSResult)(\n typeof value === 'string' ? value : String(value),\n undefined,\n constructionToken\n );\n\n/**\n * A template literal tag which can be used with LitElement's\n * {@linkcode LitElement.styles} property to set element styles.\n *\n * For security reasons, only literal string values and number may be used in\n * embedded expressions. To incorporate non-literal values {@linkcode unsafeCSS}\n * may be used inside an expression.\n */\nexport const css = (\n strings: TemplateStringsArray,\n ...values: (CSSResultGroup | number)[]\n): CSSResult => {\n const cssText =\n strings.length === 1\n ? strings[0]\n : values.reduce(\n (acc, v, idx) => acc + textFromCSSResult(v) + strings[idx + 1],\n strings[0]\n );\n return new (CSSResult as ConstructableCSSResult)(\n cssText,\n strings,\n constructionToken\n );\n};\n\n/**\n * Applies the given styles to a `shadowRoot`. When Shadow DOM is\n * available but `adoptedStyleSheets` is not, styles are appended to the\n * `shadowRoot` to [mimic spec behavior](https://wicg.github.io/construct-stylesheets/#using-constructed-stylesheets).\n * Note, when shimming is used, any styles that are subsequently placed into\n * the shadowRoot should be placed *before* any shimmed adopted styles. This\n * will match spec behavior that gives adopted sheets precedence over styles in\n * shadowRoot.\n */\nexport const adoptStyles = (\n renderRoot: ShadowRoot,\n styles: Array<CSSResultOrNative>\n) => {\n if (supportsAdoptingStyleSheets) {\n (renderRoot as ShadowRoot).adoptedStyleSheets = styles.map((s) =>\n s instanceof CSSStyleSheet ? s : s.styleSheet!\n );\n } else {\n for (const s of styles) {\n const style = document.createElement('style');\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const nonce = (global as any)['litNonce'];\n if (nonce !== undefined) {\n style.setAttribute('nonce', nonce);\n }\n style.textContent = (s as CSSResult).cssText;\n renderRoot.appendChild(style);\n }\n }\n};\n\nconst cssResultFromStyleSheet = (sheet: CSSStyleSheet) => {\n let cssText = '';\n for (const rule of sheet.cssRules) {\n cssText += rule.cssText;\n }\n return unsafeCSS(cssText);\n};\n\nexport const getCompatibleStyle =\n supportsAdoptingStyleSheets ||\n (NODE_MODE && global.CSSStyleSheet === undefined)\n ? (s: CSSResultOrNative) => s\n : (s: CSSResultOrNative) =>\n s instanceof CSSStyleSheet ? cssResultFromStyleSheet(s) : s;\n", "/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\n\n/**\n * Use this module if you want to create your own base class extending\n * {@link ReactiveElement}.\n * @packageDocumentation\n */\n\nimport {\n getCompatibleStyle,\n adoptStyles,\n CSSResultGroup,\n CSSResultOrNative,\n} from './css-tag.js';\nimport type {\n ReactiveController,\n ReactiveControllerHost,\n} from './reactive-controller.js';\n\n// In the Node build, this import will be injected by Rollup:\n// import {HTMLElement, customElements} from '@lit-labs/ssr-dom-shim';\n\nexport * from './css-tag.js';\nexport type {\n ReactiveController,\n ReactiveControllerHost,\n} from './reactive-controller.js';\n\n/**\n * Removes the `readonly` modifier from properties in the union K.\n *\n * This is a safer way to cast a value to a type with a mutable version of a\n * readonly field, than casting to an interface with the field re-declared\n * because it preserves the type of all the fields and warns on typos.\n */\ntype Mutable<T, K extends keyof T> = Omit<T, K> & {\n -readonly [P in keyof Pick<T, K>]: P extends K ? T[P] : never;\n};\n\n// TODO (justinfagnani): Add `hasOwn` here when we ship ES2022\nconst {\n is,\n defineProperty,\n getOwnPropertyDescriptor,\n getOwnPropertyNames,\n getOwnPropertySymbols,\n getPrototypeOf,\n} = Object;\n\nconst NODE_MODE = false;\n\n// Lets a minifier replace globalThis references with a minified name\nconst global = globalThis;\n\nif (NODE_MODE) {\n global.customElements ??= customElements;\n}\n\nconst DEV_MODE = true;\n\nlet issueWarning: (code: string, warning: string) => void;\n\nconst trustedTypes = (global as unknown as {trustedTypes?: {emptyScript: ''}})\n .trustedTypes;\n\n// Temporary workaround for https://crbug.com/993268\n// Currently, any attribute starting with \"on\" is considered to be a\n// TrustedScript source. Such boolean attributes must be set to the equivalent\n// trusted emptyScript value.\nconst emptyStringForBooleanAttribute = trustedTypes\n ? (trustedTypes.emptyScript as unknown as '')\n : '';\n\nconst polyfillSupport = DEV_MODE\n ? global.reactiveElementPolyfillSupportDevMode\n : global.reactiveElementPolyfillSupport;\n\nif (DEV_MODE) {\n // Ensure warnings are issued only 1x, even if multiple versions of Lit\n // are loaded.\n const issuedWarnings: Set<string | undefined> = (global.litIssuedWarnings ??=\n new Set());\n\n // Issue a warning, if we haven't already.\n issueWarning = (code: string, warning: string) => {\n warning += ` See https://lit.dev/msg/${code} for more information.`;\n if (!issuedWarnings.has(warning)) {\n console.warn(warning);\n issuedWarnings.add(warning);\n }\n };\n\n issueWarning(\n 'dev-mode',\n `Lit is in dev mode. Not recommended for production!`\n );\n\n // Issue polyfill support warning.\n if (global.ShadyDOM?.inUse && polyfillSupport === undefined) {\n issueWarning(\n 'polyfill-support-missing',\n `Shadow DOM is being polyfilled via \\`ShadyDOM\\` but ` +\n `the \\`polyfill-support\\` module has not been loaded.`\n );\n }\n}\n\n/**\n * Contains types that are part of the unstable debug API.\n *\n * Everything in this API is not stable and may change or be removed in the future,\n * even on patch releases.\n */\n// eslint-disable-next-line @typescript-eslint/no-namespace\nexport namespace ReactiveUnstable {\n /**\n * When Lit is running in dev mode and `window.emitLitDebugLogEvents` is true,\n * we will emit 'lit-debug' events to window, with live details about the update and render\n * lifecycle. These can be useful for writing debug tooling and visualizations.\n *\n * Please be aware that running with window.emitLitDebugLogEvents has performance overhead,\n * making certain operations that are normally very cheap (like a no-op render) much slower,\n * because we must copy data and dispatch events.\n */\n // eslint-disable-next-line @typescript-eslint/no-namespace\n export namespace DebugLog {\n export type Entry = Update;\n export interface Update {\n kind: 'update';\n }\n }\n}\n\ninterface DebugLoggingWindow {\n // Even in dev mode, we generally don't want to emit these events, as that's\n // another level of cost, so only emit them when DEV_MODE is true _and_ when\n // window.emitLitDebugEvents is true.\n emitLitDebugLogEvents?: boolean;\n}\n\n/**\n * Useful for visualizing and logging insights into what the Lit template system is doing.\n *\n * Compiled out of prod mode builds.\n */\nconst debugLogEvent = DEV_MODE\n ? (event: ReactiveUnstable.DebugLog.Entry) => {\n const shouldEmit = (global as unknown as DebugLoggingWindow)\n .emitLitDebugLogEvents;\n if (!shouldEmit) {\n return;\n }\n global.dispatchEvent(\n new CustomEvent<ReactiveUnstable.DebugLog.Entry>('lit-debug', {\n detail: event,\n })\n );\n }\n : undefined;\n\n/*\n * When using Closure Compiler, JSCompiler_renameProperty(property, object) is\n * replaced at compile time by the munged name for object[property]. We cannot\n * alias this function, so we have to use a small shim that has the same\n * behavior when not compiling.\n */\n/*@__INLINE__*/\nconst JSCompiler_renameProperty = <P extends PropertyKey>(\n prop: P,\n _obj: unknown\n): P => prop;\n\n/**\n * Converts property values to and from attribute values.\n */\nexport interface ComplexAttributeConverter<Type = unknown, TypeHint = unknown> {\n /**\n * Called to convert an attribute value to a property\n * value.\n */\n fromAttribute?(value: string | null, type?: TypeHint): Type;\n\n /**\n * Called to convert a property value to an attribute\n * value.\n *\n * It returns unknown instead of string, to be compatible with\n * https://github.com/WICG/trusted-types (and similar efforts).\n */\n toAttribute?(value: Type, type?: TypeHint): unknown;\n}\n\ntype AttributeConverter<Type = unknown, TypeHint = unknown> =\n | ComplexAttributeConverter<Type>\n | ((value: string | null, type?: TypeHint) => Type);\n\n/**\n * Defines options for a property accessor.\n */\nexport interface PropertyDeclaration<Type = unknown, TypeHint = unknown> {\n /**\n * When set to `true`, indicates the property is internal private state. The\n * property should not be set by users. When using TypeScript, this property\n * should be marked as `private` or `protected`, and it is also a common\n * practice to use a leading `_` in the name. The property is not added to\n * `observedAttributes`.\n */\n readonly state?: boolean;\n\n /**\n * Indicates how and whether the property becomes an observed attribute.\n * If the value is `false`, the property is not added to `observedAttributes`.\n * If true or absent, the lowercased property name is observed (e.g. `fooBar`\n * becomes `foobar`). If a string, the string value is observed (e.g\n * `attribute: 'foo-bar'`).\n */\n readonly attribute?: boolean | string;\n\n /**\n * Indicates the type of the property. This is used only as a hint for the\n * `converter` to determine how to convert the attribute\n * to/from a property.\n */\n readonly type?: TypeHint;\n\n /**\n * Indicates how to convert the attribute to/from a property. If this value\n * is a function, it is used to convert the attribute value a the property\n * value. If it's an object, it can have keys for `fromAttribute` and\n * `toAttribute`. If no `toAttribute` function is provided and\n * `reflect` is set to `true`, the property value is set directly to the\n * attribute. A default `converter` is used if none is provided; it supports\n * `Boolean`, `String`, `Number`, `Object`, and `Array`. Note,\n * when a property changes and the converter is used to update the attribute,\n * the property is never updated again as a result of the attribute changing,\n * and vice versa.\n */\n readonly converter?: AttributeConverter<Type, TypeHint>;\n\n /**\n * Indicates if the property should reflect to an attribute.\n * If `true`, when the property is set, the attribute is set using the\n * attribute name determined according to the rules for the `attribute`\n * property option and the value of the property converted using the rules\n * from the `converter` property option.\n */\n readonly reflect?: boolean;\n\n /**\n * A function that indicates if a property should be considered changed when\n * it is set. The function should take the `newValue` and `oldValue` and\n * return `true` if an update should be requested.\n */\n hasChanged?(value: Type, oldValue: Type): boolean;\n\n /**\n * Indicates whether an accessor will be created for this property. By\n * default, an accessor will be generated for this property that requests an\n * update when set. If this flag is `true`, no accessor will be created, and\n * it will be the user's responsibility to call\n * `this.requestUpdate(propertyName, oldValue)` to request an update when\n * the property changes.\n */\n readonly noAccessor?: boolean;\n\n /**\n * Whether this property is wrapping accessors. This is set by `@property`\n * to control the initial value change and reflection logic.\n *\n * @internal\n */\n wrapped?: boolean;\n}\n\n/**\n * Map of properties to PropertyDeclaration options. For each property an\n * accessor is made, and the property is processed according to the\n * PropertyDeclaration options.\n */\nexport interface PropertyDeclarations {\n readonly [key: string]: PropertyDeclaration;\n}\n\ntype PropertyDeclarationMap = Map<PropertyKey, PropertyDeclaration>;\n\ntype AttributeMap = Map<string, PropertyKey>;\n\n/**\n * A Map of property keys to values.\n *\n * Takes an optional type parameter T, which when specified as a non-any,\n * non-unknown type, will make the Map more strongly-typed, associating the map\n * keys with their corresponding value type on T.\n *\n * Use `PropertyValues<this>` when overriding ReactiveElement.update() and\n * other lifecycle methods in order to get stronger type-checking on keys\n * and values.\n */\n// This type is conditional so that if the parameter T is not specified, or\n// is `any`, the type will include `Map<PropertyKey, unknown>`. Since T is not\n// given in the uses of PropertyValues in this file, all uses here fallback to\n// meaning `Map<PropertyKey, unknown>`, but if a developer uses\n// `PropertyValues<this>` (or any other value for T) they will get a\n// strongly-typed Map type.\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport type PropertyValues<T = any> = T extends object\n ? PropertyValueMap<T>\n : Map<PropertyKey, unknown>;\n\n/**\n * Do not use, instead prefer {@linkcode PropertyValues}.\n */\n// This type must be exported such that JavaScript generated by the Google\n// Closure Compiler can import a type reference.\nexport interface PropertyValueMap<T> extends Map<PropertyKey, unknown> {\n get<K extends keyof T>(k: K): T[K] | undefined;\n set<K extends keyof T>(key: K, value: T[K]): this;\n has<K extends keyof T>(k: K): boolean;\n delete<K extends keyof T>(k: K): boolean;\n}\n\nexport const defaultConverter: ComplexAttributeConverter = {\n toAttribute(value: unknown, type?: unknown): unknown {\n switch (type) {\n case Boolean:\n value = value ? emptyStringForBooleanAttribute : null;\n break;\n case Object:\n case Array:\n // if the value is `null` or `undefined` pass this through\n // to allow removing/no change behavior.\n value = value == null ? value : JSON.stringify(value);\n break;\n }\n return value;\n },\n\n fromAttribute(value: string | null, type?: unknown) {\n let fromValue: unknown = value;\n switch (type) {\n case Boolean:\n fromValue = value !== null;\n break;\n case Number:\n fromValue = value === null ? null : Number(value);\n break;\n case Object:\n case Array:\n // Do *not* generate exception when invalid JSON is set as elements\n // don't normally complain on being mis-configured.\n // TODO(sorvell): Do generate exception in *dev mode*.\n try {\n // Assert to adhere to Bazel's \"must type assert JSON parse\" rule.\n fromValue = JSON.parse(value!) as unknown;\n } catch (e) {\n fromValue = null;\n }\n break;\n }\n return fromValue;\n },\n};\n\nexport interface HasChanged {\n (value: unknown, old: unknown): boolean;\n}\n\n/**\n * Change function that returns true if `value` is different from `oldValue`.\n * This method is used as the default for a property's `hasChanged` function.\n */\nexport const notEqual: HasChanged = (value: unknown, old: unknown): boolean =>\n !is(value, old);\n\nconst defaultPropertyDeclaration: PropertyDeclaration = {\n attribute: true,\n type: String,\n converter: defaultConverter,\n reflect: false,\n hasChanged: notEqual,\n};\n\n/**\n * A string representing one of the supported dev mode warning categories.\n */\nexport type WarningKind =\n | 'change-in-update'\n | 'migration'\n | 'async-perform-update';\n\nexport type Initializer = (element: ReactiveElement) => void;\n\n// Temporary, until google3 is on TypeScript 5.2\ndeclare global {\n interface SymbolConstructor {\n readonly metadata: unique symbol;\n }\n}\n\n// Ensure metadata is enabled. TypeScript does not polyfill\n// Symbol.metadata, so we must ensure that it exists.\n(Symbol as {metadata: symbol}).metadata ??= Symbol('metadata');\n\ndeclare global {\n // This is public global API, do not change!\n // eslint-disable-next-line no-var\n var litPropertyMetadata: WeakMap<\n object,\n Map<PropertyKey, PropertyDeclaration>\n >;\n}\n\n// Map from a class's metadata object to property options\n// Note that we must use nullish-coalescing assignment so that we only use one\n// map even if we load multiple version of this module.\nglobal.litPropertyMetadata ??= new WeakMap<\n object,\n Map<PropertyKey, PropertyDeclaration>\n>();\n\n/**\n * Base element class which manages element properties and attributes. When\n * properties change, the `update` method is asynchronously called. This method\n * should be supplied by subclasses to render updates as desired.\n * @noInheritDoc\n */\nexport abstract class ReactiveElement\n // In the Node build, this `extends` clause will be substituted with\n // `(globalThis.HTMLElement ?? HTMLElement)`.\n //\n // This way, we will first prefer any global `HTMLElement` polyfill that the\n // user has assigned, and then fall back to the `HTMLElement` shim which has\n // been imported (see note at the top of this file about how this import is\n // generated by Rollup). Note that the `HTMLElement` variable has been\n // shadowed by this import, so it no longer refers to the global.\n extends HTMLElement\n implements ReactiveControllerHost\n{\n // Note: these are patched in only in DEV_MODE.\n /**\n * Read or set all the enabled warning categories for this class.\n *\n * This property is only used in development builds.\n *\n * @nocollapse\n * @category dev-mode\n */\n static enabledWarnings?: WarningKind[];\n\n /**\n * Enable the given warning category for this class.\n *\n * This method only exists in development builds, so it should be accessed\n * with a guard like:\n *\n * ```ts\n * // Enable for all ReactiveElement subclasses\n * ReactiveElement.enableWarning?.('migration');\n *\n * // Enable for only MyElement and subclasses\n * MyElement.enableWarning?.('migration');\n * ```\n *\n * @nocollapse\n * @category dev-mode\n */\n static enableWarning?: (warningKind: WarningKind) => void;\n\n /**\n * Disable the given warning category for this class.\n *\n * This method only exists in development builds, so it should be accessed\n * with a guard like:\n *\n * ```ts\n * // Disable for all ReactiveElement subclasses\n * ReactiveElement.disableWarning?.('migration');\n *\n * // Disable for only MyElement and subclasses\n * MyElement.disableWarning?.('migration');\n * ```\n *\n * @nocollapse\n * @category dev-mode\n */\n static disableWarning?: (warningKind: WarningKind) => void;\n\n /**\n * Adds an initializer function to the class that is called during instance\n * construction.\n *\n * This is useful for code that runs against a `ReactiveElement`\n * subclass, such as a decorator, that needs to do work for each\n * instance, such as setting up a `ReactiveController`.\n *\n * ```ts\n * const myDecorator = (target: typeof ReactiveElement, key: string) => {\n * target.addInitializer((instance: ReactiveElement) => {\n * // This is run during construction of the element\n * new MyController(instance);\n * });\n * }\n * ```\n *\n * Decorating a field will then cause each instance to run an initializer\n * that adds a controller:\n *\n * ```ts\n * class MyElement extends LitElement {\n * @myDecorator foo;\n * }\n * ```\n *\n * Initializers are stored per-constructor. Adding an initializer to a\n * subclass does not add it to a superclass. Since initializers are run in\n * constructors, initializers will run in order of the class hierarchy,\n * starting with superclasses and progressing to the instance's class.\n *\n * @nocollapse\n */\n static addInitializer(initializer: Initializer) {\n this.__prepare();\n (this._initializers ??= []).push(initializer);\n }\n\n static _initializers?: Initializer[];\n\n /*\n * Due to closure compiler ES6 compilation bugs, @nocollapse is required on\n * all static methods and properties with initializers. Reference:\n * - https://github.com/google/closure-compiler/issues/1776\n */\n\n /**\n * Maps attribute names to properties; for example `foobar` attribute to\n * `fooBar` property. Created lazily on user subclasses when finalizing the\n * class.\n * @nocollapse\n */\n private static __attributeToPropertyMap: AttributeMap;\n\n /**\n * Marks class as having been finalized, which includes creating properties\n * from `static properties`, but does *not* include all properties created\n * from decorators.\n * @nocollapse\n */\n protected static finalized: true | undefined;\n\n /**\n * Memoized list of all element properties, including any superclass\n * properties. Created lazily on user subclasses when finalizing the class.\n *\n * @nocollapse\n * @category properties\n */\n static elementProperties: PropertyDeclarationMap;\n\n /**\n * User-supplied object that maps property names to `PropertyDeclaration`\n * objects containing options for configuring reactive properties. When\n * a reactive property is set the element will update and render.\n *\n * By default properties are public fields, and as such, they should be\n * considered as primarily settable by element users, either via attribute or\n * the property itself.\n *\n * Generally, properties that are changed by the element should be private or\n * protected fields and should use the `state: true` option. Properties\n * marked as `state` do not reflect from the corresponding attribute\n *\n * However, sometimes element code does need to set a public property. This\n * should typically only be done in response to user interaction, and an event\n * should be fired informing the user; for example, a checkbox sets its\n * `checked` property when clicked and fires a `changed` event. Mutating\n * public properties should typically not be done for non-primitive (object or\n * array) properties. In other cases when an element needs to manage state, a\n * private property set with the `state: true` option should be used. When\n * needed, state properties can be initialized via public properties to\n * facilitate complex interactions.\n * @nocollapse\n * @category properties\n */\n static properties: PropertyDeclarations;\n\n /**\n * Memoized list of all element styles.\n * Created lazily on user subclasses when finalizing the class.\n * @nocollapse\n * @category styles\n */\n static elementStyles: Array<CSSResultOrNative> = [];\n\n /**\n * Array of styles to apply to the element. The styles should be defined\n * using the {@linkcode css} tag function, via constructible stylesheets, or\n * imported from native CSS module scripts.\n *\n * Note on Content Security Policy:\n *\n * Element styles are implemented with `<style>` tags when the browser doesn't\n * support adopted StyleSheets. To use such `<style>` tags with the style-src\n * CSP directive, the style-src value must either include 'unsafe-inline' or\n * `nonce-<base64-value>` with `<base64-value>` replaced be a server-generated\n * nonce.\n *\n * To provide a nonce to use on generated `<style>` elements, set\n * `window.litNonce` to a server-generated nonce in your page's HTML, before\n * loading application code:\n *\n * ```html\n * <script>\n * // Generated and unique per request:\n * window.litNonce = 'a1b2c3d4';\n * </script>\n * ```\n * @nocollapse\n * @category styles\n */\n static styles?: CSSResultGroup;\n\n /**\n * Returns a list of attributes corresponding to the registered properties.\n * @nocollapse\n * @category attributes\n */\n static get observedAttributes() {\n // Ensure we've created all properties\n this.finalize();\n // this.__attributeToPropertyMap is only undefined after finalize() in\n // ReactiveElement itself. ReactiveElement.observedAttributes is only\n // accessed with ReactiveElement as the receiver when a subclass or mixin\n // calls super.observedAttributes\n return (\n this.__attributeToPropertyMap && [...this.__attributeToPropertyMap.keys()]\n );\n }\n\n private __instanceProperties?: PropertyValues = undefined;\n\n /**\n * Creates a property accessor on the element prototype if one does not exist\n * and stores a {@linkcode PropertyDeclaration} for the property with the\n * given options. The property setter calls the property's `hasChanged`\n * property option or uses a strict identity check to determine whether or not\n * to request an update.\n *\n * This method may be overridden to customize properties; however,\n * when doing so, it's important to call `super.createProperty` to ensure\n * the property is setup correctly. This method calls\n * `getPropertyDescriptor` internally to get a descriptor to install.\n * To customize what properties do when they are get or set, override\n * `getPropertyDescriptor`. To customize the options for a property,\n * implement `createProperty` like this:\n *\n * ```ts\n * static createProperty(name, options) {\n * options = Object.assign(options, {myOption: true});\n * super.createProperty(name, options);\n * }\n * ```\n *\n * @nocollapse\n * @category properties\n */\n static createProperty(\n name: PropertyKey,\n options: PropertyDeclaration = defaultPropertyDeclaration\n ) {\n // If this is a state property, force the attribute to false.\n if (options.state) {\n (options as Mutable<PropertyDeclaration, 'attribute'>).attribute = false;\n }\n this.__prepare();\n this.elementProperties.set(name, options);\n if (!options.noAccessor) {\n const key = DEV_MODE\n ? // Use Symbol.for in dev mode to make it easier to maintain state\n // when doing HMR.\n Symbol.for(`${String(name)} (@property() cache)`)\n : Symbol();\n const descriptor = this.getPropertyDescriptor(name, key, options);\n if (descriptor !== undefined) {\n defineProperty(this.prototype, name, descriptor);\n }\n }\n }\n\n /**\n * Returns a property descriptor to be defined on the given named property.\n * If no descriptor is returned, the property will not become an accessor.\n * For example,\n *\n * ```ts\n * class MyElement extends LitElement {\n * static getPropertyDescriptor(name, key, options) {\n * const defaultDescriptor =\n * super.getPropertyDescriptor(name, key, options);\n * const setter = defaultDescriptor.set;\n * return {\n * get: defaultDescriptor.get,\n * set(value) {\n * setter.call(this, value);\n * // custom action.\n * },\n * configurable: true,\n * enumerable: true\n * }\n * }\n * }\n * ```\n *\n * @nocollapse\n * @category properties\n */\n protected static getPropertyDescriptor(\n name: PropertyKey,\n key: string | symbol,\n options: PropertyDeclaration\n ): PropertyDescriptor | undefined {\n const {get, set} = getOwnPropertyDescriptor(this.prototype, name) ?? {\n get(this: ReactiveElement) {\n return this[key as keyof typeof this];\n },\n set(this: ReactiveElement, v: unknown) {\n (this as unknown as Record<string | symbol, unknown>)[key] = v;\n },\n };\n if (DEV_MODE && get == null) {\n if ('value' in (getOwnPropertyDescriptor(this.prototype, name) ?? {})) {\n throw new Error(\n `Field ${JSON.stringify(String(name))} on ` +\n `${this.name} was declared as a reactive property ` +\n `but it's actually declared as a value on the prototype. ` +\n `Usually this is due to using @property or @state on a method.`\n );\n }\n issueWarning(\n 'reactive-property-without-getter',\n `Field ${JSON.stringify(String(name))} on ` +\n `${this.name} was declared as a reactive property ` +\n `but it does not have a getter. This will be an error in a ` +\n `future version of Lit.`\n );\n }\n return {\n get(this: ReactiveElement) {\n return get?.call(this);\n },\n set(this: ReactiveElement, value: unknown) {\n const oldValue = get?.call(this);\n set!.call(this, value);\n this.requestUpdate(name, oldValue, options);\n },\n configurable: true,\n enumerable: true,\n };\n }\n\n /**\n * Returns the property options associated with the given property.\n * These options are defined with a `PropertyDeclaration` via the `properties`\n * object or the `@property` decorator and are registered in\n * `createProperty(...)`.\n *\n * Note, this method should be considered \"final\" and not overridden. To\n * customize the options for a given property, override\n * {@linkcode createProperty}.\n *\n * @nocollapse\n * @final\n * @category properties\n */\n static getPropertyOptions(name: PropertyKey) {\n return this.elementProperties.get(name) ?? defaultPropertyDeclaration;\n }\n\n // Temporary, until google3 is on TypeScript 5.2\n declare static [Symbol.metadata]: object & Record<PropertyKey, unknown>;\n\n /**\n * Initializes static own properties of the class used in bookkeeping\n * for element properties, initializers, etc.\n *\n * Can be called multiple times by code that needs to ensure these\n * properties exist before using them.\n *\n * This method ensures the superclass is finalized so that inherited\n * property metadata can be copied down.\n * @nocollapse\n */\n private static __prepare() {\n if (\n this.hasOwnProperty(JSCompiler_renameProperty('elementProperties', this))\n ) {\n // Already prepared\n return;\n }\n // Finalize any superclasses\n const superCtor = getPrototypeOf(this) as typeof ReactiveElement;\n superCtor.finalize();\n\n // Create own set of initializers for this class if any exist on the\n // superclass and copy them down. Note, for a small perf boost, avoid\n // creating initializers unless needed.\n if (superCtor._initializers !== undefined) {\n this._initializers = [...superCtor._initializers];\n }\n // Initialize elementProperties from the superclass\n this.elementProperties = new Map(superCtor.elementProperties);\n }\n\n /**\n * Finishes setting up the class so that it's ready to be registered\n * as a custom element and instantiated.\n *\n * This method is called by the ReactiveElement.observedAttributes getter.\n * If you override the observedAttributes getter, you must either call\n * super.observedAttributes to trigger finalization, or call finalize()\n * yourself.\n *\n * @nocollapse\n */\n protected static finalize() {\n if (this.hasOwnProperty(JSCompiler_renameProperty('finalized', this))) {\n return;\n }\n this.finalized = true;\n this.__prepare();\n\n // Create properties from the static properties block:\n if (this.hasOwnProperty(JSCompiler_renameProperty('properties', this))) {\n const props = this.properties;\n const propKeys = [\n ...getOwnPropertyNames(props),\n ...getOwnPropertySymbols(props),\n ] as Array<keyof typeof props>;\n for (const p of propKeys) {\n this.createProperty(p, props[p]);\n }\n }\n\n // Create properties from standard decorator metadata:\n const metadata = this[Symbol.metadata];\n if (metadata !== null) {\n const properties = litPropertyMetadata.get(metadata);\n if (properties !== undefined) {\n for (const [p, options] of properties) {\n this.elementProperties.set(p, options);\n }\n }\n }\n\n // Create the attribute-to-property map\n this.__attributeToPropertyMap = new Map();\n for (const [p, options] of this.elementProperties) {\n const attr = this.__attributeNameForProperty(p, options);\n if (attr !== undefined) {\n this.__attributeToPropertyMap.set(attr, p);\n }\n }\n\n this.elementStyles = this.finalizeStyles(this.styles);\n\n if (DEV_MODE) {\n if (this.hasOwnProperty('createProperty')) {\n issueWarning(\n 'no-override-create-property',\n 'Overriding ReactiveElement.createProperty() is deprecated. ' +\n 'The override will not be called with standard decorators'\n );\n }\n if (this.hasOwnProperty('getPropertyDescriptor')) {\n issueWarning(\n 'no-override-get-property-descriptor',\n 'Overriding ReactiveElement.getPropertyDescriptor() is deprecated. ' +\n 'The override will not be called with standard decorators'\n );\n }\n }\n }\n\n /**\n * Options used when calling `attachShadow`. Set this property to customize\n * the options for the shadowRoot; for example, to create a closed\n * shadowRoot: `{mode: 'closed'}`.\n *\n * Note, these options are used in `createRenderRoot`. If this method\n * is customized, options should be respected if possible.\n * @nocollapse\n * @category rendering\n */\n static shadowRootOptions: ShadowRootInit = {mode: 'open'};\n\n /**\n * Takes the styles the user supplied via the `static styles` property and\n * returns the array of styles to apply to the element.\n * Override this method to integrate into a style management system.\n *\n * Styles are deduplicated preserving the _last_ instance in the list. This\n * is a performance optimization to avoid duplicated styles that can occur\n * especially when composing via subclassing. The last item is kept to try\n * to preserve the cascade order with the assumption that it's most important\n * that last added styles override previous styles.\n *\n * @nocollapse\n * @category styles\n */\n protected static finalizeStyles(\n styles?: CSSResultGroup\n ): Array<CSSResultOrNative> {\n const elementStyles = [];\n if (Array.isArray(styles)) {\n // Dedupe the flattened array in reverse order to preserve the last items.\n // Casting to Array<unknown> works around TS error that\n // appears to come from trying to flatten a type CSSResultArray.\n const set = new Set((styles as Array<unknown>).flat(Infinity).reverse());\n // Then preserve original order by adding the set items in reverse order.\n for (const s of set) {\n elementStyles.unshift(getCompatibleStyle(s as CSSResultOrNative));\n }\n } else if (styles !== undefined) {\n elementStyles.push(getCompatibleStyle(styles));\n }\n return elementStyles;\n }\n\n /**\n * Node or ShadowRoot into which element DOM should be rendered. Defaults\n * to an open shadowRoot.\n * @category rendering\n */\n readonly renderRoot!: HTMLElement | DocumentFragment;\n\n /**\n * Returns the property name for the given attribute `name`.\n * @nocollapse\n */\n private static __attributeNameForProperty(\n name: PropertyKey,\n options: PropertyDeclaration\n ) {\n const attribute = options.attribute;\n return attribute === false\n ? undefined\n : typeof attribute === 'string'\n ? attribute\n : typeof name === 'string'\n ? name.toLowerCase()\n : undefined;\n }\n\n // Initialize to an unresolved Promise so we can make sure the element has\n // connected before first update.\n private __updatePromise!: Promise<boolean>;\n\n /**\n * True if there is a pending update as a result of calling `requestUpdate()`.\n * Should only be read.\n * @category updates\n */\n isUpdatePending = false;\n\n /**\n * Is set to `true` after the first update. The element code cannot assume\n * that `renderRoot` exists before the element `hasUpdated`.\n * @category updates\n */\n hasUpdated = false;\n\n /**\n * Map with keys for any properties that have changed since the last\n * update cycle with previous values.\n *\n * @internal\n */\n _$changedProperties!: PropertyValues;\n\n /**\n * Properties that should be reflected when updated.\n */\n private __reflectingProperties?: Set<PropertyKey>;\n\n /**\n * Name of currently reflecting property\n */\n private __reflectingProperty: PropertyKey | null = null;\n\n /**\n * Set of controllers.\n */\n private __controllers?: Set<ReactiveController>;\n\n constructor() {\n super();\n this.__initialize();\n }\n\n /**\n * Internal only override point for customizing work done when elements\n * are constructed.\n */\n private __initialize() {\n this.__updatePromise = new Promise<boolean>(\n (res) => (this.enableUpdating = res)\n );\n this._$changedProperties = new Map();\n // This enqueues a microtask that ust run before the first update, so it\n // must be called before requestUpdate()\n this.__saveInstanceProperties();\n // ensures first update will be caught by an early access of\n // `updateComplete`\n this.requestUpdate();\n (this.constructor as typeof ReactiveElement)._initializers?.forEach((i) =>\n i(this)\n );\n }\n\n /**\n * Registers a `ReactiveController` to participate in the element's reactive\n * update cycle. The element automatically calls into any registered\n * controllers during its lifecycle callbacks.\n *\n * If the element is connected when `addController()` is called, the\n * controller's `hostConnected()` callback will be immediately called.\n * @category controllers\n */\n addController(controller: ReactiveController) {\n (this.__controllers ??= new Set()).add(controller);\n // If a controller is added after the element has been connected,\n // call hostConnected. Note, re-using existence of `renderRoot` here\n // (which is set in connectedCallback) to avoid the need to track a\n // first connected state.\n if (this.renderRoot !== undefined && this.isConnected) {\n controller.hostConnected?.();\n }\n }\n\n /**\n * Removes a `ReactiveController` from the element.\n * @category controllers\n */\n removeController(controller: ReactiveController) {\n this.__controllers?.delete(controller);\n }\n\n /**\n * Fixes any properties set on the instance before upgrade time.\n * Otherwise these would shadow the accessor and break these properties.\n * The properties are stored in a Map which is played back after the\n * constructor runs. Note, on very old versions of Safari (<=9) or Chrome\n * (<=41), properties created for native platform properties like (`id` or\n * `name`) may not have default values set in the element constructor. On\n * these browsers native properties appear on instances and therefore their\n * default value will overwrite any element default (e.g. if the element sets\n * this.id = 'id' in the constructor, the 'id' will become '' since this is\n * the native platform default).\n */\n private __saveInstanceProperties() {\n const instanceProperties = new Map<PropertyKey, unknown>();\n const elementProperties = (this.constructor as typeof ReactiveElement)\n .elementProperties;\n for (const p of elementProperties.keys() as IterableIterator<keyof this>) {\n if (this.hasOwnProperty(p)) {\n instanceProperties.set(p, this[p]);\n delete this[p];\n }\n }\n if (instanceProperties.size > 0) {\n this.__instanceProperties = instanceProperties;\n }\n }\n\n /**\n * Returns the node into which the element should render and by default\n * creates and returns an open shadowRoot. Implement to customize where the\n * element's DOM is rendered. For example, to render into the element's\n * childNodes, return `this`.\n *\n * @return Returns a node into which to render.\n * @category rendering\n */\n protected createRenderRoot(): HTMLElement | DocumentFragment {\n const renderRoot =\n this.shadowRoot ??\n this.attachShadow(\n (this.constructor as typeof ReactiveElement).shadowRootOptions\n );\n adoptStyles(\n renderRoot,\n (this.constructor as typeof ReactiveElement).elementStyles\n );\n return renderRoot;\n }\n\n /**\n * On first connection, creates the element's renderRoot, sets up\n * element styling, and enables updating.\n * @category lifecycle\n */\n connectedCallback() {\n // Create renderRoot before controllers `hostConnected`\n (this as Mutable<typeof this, 'renderRoot'>).renderRoot ??=\n this.createRenderRoot();\n this.enableUpdating(true);\n this.__controllers?.forEach((c) => c.hostConnected?.());\n }\n\n /**\n * Note, this method should be considered final and not overridden. It is\n * overridden on the element instance with a function that triggers the first\n * update.\n * @category updates\n */\n protected enableUpdating(_requestedUpdate: boolean) {}\n\n /**\n * Allows for `super.disconnectedCallback()` in extensions while\n * reserving the possibility of making non-breaking feature additions\n * when disconnecting at some point in the future.\n * @category lifecycle\n */\n disconnectedCallback() {\n this.__controllers?.forEach((c) => c.hostDisconnected?.());\n }\n\n /**\n * Synchronizes property values when attributes change.\n *\n * Specifically, when an attribute is set, the corresponding property is set.\n * You should rarely need to implement this callback. If this method is\n * overridden, `super.attributeChangedCallback(name, _old, value)` must be\n * called.\n *\n * See [using the lifecycle callbacks](https://developer.mozilla.org/en-US/docs/Web/Web_Components/Using_custom_elements#using_the_lifecycle_callbacks)\n * on MDN for more information about the `attributeChangedCallback`.\n * @category attributes\n */\n attributeChangedCallback(\n name: string,\n _old: string | null,\n value: string | null\n ) {\n this._$attributeToProperty(name, value);\n }\n\n private __propertyToAttribute(name: PropertyKey, value: unknown) {\n const elemProperties: PropertyDeclarationMap = (\n this.constructor as typeof ReactiveElement\n ).elementProperties;\n const options = elemProperties.get(name)!;\n const attr = (\n this.constructor as typeof ReactiveElement\n ).__attributeNameForProperty(name, options);\n if (attr !== undefined && options.reflect === true) {\n const converter =\n (options.converter as ComplexAttributeConverter)?.toAttribute !==\n undefined\n ? (options.converter as ComplexAttributeConverter)\n : defaultConverter;\n const attrValue = converter.toAttribute!(value, options.type);\n if (\n DEV_MODE &&\n (this.constructor as typeof ReactiveElement).enabledWarnings!.includes(\n 'migration'\n ) &&\n attrValue === undefined\n ) {\n issueWarning(\n 'undefined-attribute-value',\n `The attribute value for the ${name as string} property is ` +\n `undefined on element ${this.localName}. The attribute will be ` +\n `removed, but in the previous version of \\`ReactiveElement\\`, ` +\n `the attribute would not have changed.`\n );\n }\n // Track if the property is being reflected to avoid\n // setting the property again via `attributeChangedCallback`. Note:\n // 1. this takes advantage of the fact that the callback is synchronous.\n // 2. will behave incorrectly if multiple attributes are in the reaction\n // stack at time of calling. However, since we process attributes\n // in `update` this should not be possible (or an extreme corner case\n // that we'd like to discover).\n // mark state reflecting\n this.__reflectingProperty = name;\n if (attrValue == null) {\n this.removeAttribute(attr);\n } else {\n this.setAttribute(attr, attrValue as string);\n }\n // mark state not reflecting\n this.__reflectingProperty = null;\n }\n }\n\n /** @internal */\n _$attributeToProperty(name: string, value: string | null) {\n const ctor = this.constructor as typeof ReactiveElement;\n // Note, hint this as an `AttributeMap` so closure clearly understands\n // the type; it has issues with tracking types through statics\n const propName = (ctor.__attributeToPropertyMap as AttributeMap).get(name);\n // Use tracking info to avoid reflecting a property value to an attribute\n // if it was just set because the attribute changed.\n if (propName !== undefined && this.__reflectingProperty !== propName) {\n const options = ctor.getPropertyOptions(propName);\n const converter =\n typeof options.converter === 'function'\n ? {fromAttribute: options.converter}\n : options.converter?.fromAttribute !== undefined\n ? options.converter\n : defaultConverter;\n // mark state reflecting\n this.__reflectingProperty = propName;\n this[propName as keyof this] = converter.fromAttribute!(\n value,\n options.type\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ) as any;\n // mark state not reflecting\n this.__reflectingProperty = null;\n }\n }\n\n /**\n * Requests an update which is processed asynchronously. This should be called\n * when an element should update based on some state not triggered by setting\n * a reactive property. In this case, pass no arguments. It should also be\n * called when manually implementing a property setter. In this case, pass the\n * property `name` and `oldValue` to ensure that any configured property\n * options are honored.\n *\n * @param name name of requesting property\n * @param oldValue old value of requesting property\n * @param options property options to use instead of the previously\n * configured options\n * @category updates\n */\n requestUpdate(\n name?: PropertyKey,\n oldValue?: unknown,\n options?: PropertyDeclaration\n ): void {\n // If we have a property key, perform property update steps.\n if (name !== undefined) {\n if (DEV_MODE && (name as unknown) instanceof Event) {\n issueWarning(\n ``,\n `The requestUpdate() method was called with an Event as the property name. This is probably a mistake caused by binding this.requestUpdate as an event listener. Instead bind a function that will call it with no arguments: () => this.requestUpdate()`\n );\n }\n options ??= (\n this.constructor as typeof ReactiveElement\n ).getPropertyOptions(name);\n const hasChanged = options.hasChanged ?? notEqual;\n const newValue = this[name as keyof this];\n if (hasChanged(newValue, oldValue)) {\n this._$changeProperty(name, oldValue, options);\n } else {\n // Abort the request if the property should not be considered changed.\n return;\n }\n }\n if (this.isUpdatePending === false) {\n this.__updatePromise = this.__enqueueUpdate();\n }\n }\n\n /**\n * @internal\n */\n _$changeProperty(\n name: PropertyKey,\n oldValue: unknown,\n options: PropertyDeclaration\n ) {\n // TODO (justinfagnani): Create a benchmark of Map.has() + Map.set(\n // vs just Map.set()\n if (!this._$changedProperties.has(name)) {\n this._$changedProperties.set(name, oldValue);\n }\n // Add to reflecting properties set.\n // Note, it's important that every change has a chance to add the\n // property to `__reflectingProperties`. This ensures setting\n // attribute + property reflects correctly.\n if (options.reflect === true && this.__reflectingProperty !== name) {\n (this.__reflectingProperties ??= new Set<PropertyKey>()).add(name);\n }\n }\n\n /**\n * Sets up the element to asynchronously update.\n */\n private async __enqueueUpdate() {\n this.isUpdatePending = true;\n try {\n // Ensure any previous update has resolved before updating.\n // This `await` also ensures that property changes are batched.\n await this.__updatePromise;\n } catch (e) {\n // Refire any previous errors async so they do not disrupt the update\n // cycle. Errors are refired so developers have a chance to observe\n // them, and this can be done by implementing\n // `window.onunhandledrejection`.\n Promise.reject(e);\n }\n const result = this.scheduleUpdate();\n // If `scheduleUpdate` returns a Promise, we await it. This is done to\n // enable coordinating updates with a scheduler. Note, the result is\n // checked to avoid delaying an additional microtask unless we need to.\n if (result != null) {\n await result;\n }\n return !this.isUpdatePending;\n }\n\n /**\n * Schedules an element update. You can override this method to change the\n * timing of updates by returning a Promise. The update will await the\n * returned Promise, and you should resolve the Promise to allow the update\n * to proceed. If this method is overridden, `super.scheduleUpdate()`\n * must be called.\n *\n * For instance, to schedule updates to occur just before the next frame:\n *\n * ```ts\n * override protected async scheduleUpdate(): Promise<unknown> {\n * await new Promise((resolve) => requestAnimationFrame(() => resolve()));\n * super.scheduleUpdate();\n * }\n * ```\n * @category updates\n */\n protected scheduleUpdate(): void | Promise<unknown> {\n const result = this.performUpdate();\n if (\n DEV_MODE &&\n (this.constructor as typeof ReactiveElement).enabledWarnings!.includes(\n 'async-perform-update'\n ) &&\n typeof (result as unknown as Promise<unknown> | undefined)?.then ===\n 'function'\n ) {\n issueWarning(\n 'async-perform-update',\n `Element ${this.localName} returned a Promise from performUpdate(). ` +\n `This behavior is deprecated and will be removed in a future ` +\n `version of ReactiveElement.`\n );\n }\n return result;\n }\n\n /**\n * Performs an element update. Note, if an exception is thrown during the\n * update, `firstUpdated` and `updated` will not be called.\n *\n * Call `performUpdate()` to immediately process a pending update. This should\n * generally not be needed, but it can be done in rare cases when you need to\n * update synchronously.\n *\n * @category updates\n */\n protected performUpdate(): void {\n // Abort any update if one is not pending when this is called.\n // This can happen if `performUpdate` is called early to \"flush\"\n // the update.\n if (!this.isUpdatePending) {\n return;\n }\n debugLogEvent?.({kind: 'update'});\n if (!this.hasUpdated) {\n // Create renderRoot before first update. This occurs in `connectedCallback`\n // but is done here to support out of tree calls to `enableUpdating`/`performUpdate`.\n (this as Mutable<typeof this, 'renderRoot'>).renderRoot ??=\n this.createRenderRoot();\n if (DEV_MODE) {\n // Produce warning if any reactive properties on the prototype are\n // shadowed by class fields. Instance fields set before upgrade are\n // deleted by this point, so any own property is caused by class field\n // initialization in the constructor.\n const ctor = this.constructor as typeof ReactiveElement;\n const shadowedProperties = [...ctor.elementProperties.keys()].filter(\n (p) => this.hasOwnProperty(p) && p in getPrototypeOf(this)\n );\n if (shadowedProperties.length) {\n throw new Error(\n `The following properties on element ${this.localName} will not ` +\n `trigger updates as expected because they are set using class ` +\n `fields: ${shadowedProperties.join(', ')}. ` +\n `Native class fields and some compiled output will overwrite ` +\n `accessors used for detecting changes. See ` +\n `https://lit.dev/msg/class-field-shadowing ` +\n `for more information.`\n );\n }\n }\n // Mixin instance properties once, if they exist.\n if (this.__instanceProperties) {\n // TODO (justinfagnani): should we use the stored value? Could a new value\n // have been set since we stored the own property value?\n for (const [p, value] of this.__instanceProperties) {\n this[p as keyof this] = value as this[keyof this];\n }\n this.__instanceProperties = undefined;\n }\n // Trigger initial value reflection and populate the initial\n // changedProperties map, but only for the case of experimental\n // decorators on accessors, which will not have already populated the\n // changedProperties map. We can't know if these accessors had\n // initializers, so we just set them anyway - a difference from\n // experimental decorators on fields and standard decorators on\n // auto-accessors.\n // For context why experimentalDecorators with auto accessors are handled\n // specifically also see:\n // https://github.com/lit/lit/pull/4183#issuecomment-1711959635\n const elementProperties = (this.constructor as typeof ReactiveElement)\n .elementProperties;\n if (elementProperties.size > 0) {\n for (const [p, options] of elementProperties) {\n if (\n options.wrapped === true &&\n !this._$changedProperties.has(p) &&\n this[p as keyof this] !== undefined\n ) {\n this._$changeProperty(p, this[p as keyof this], options);\n }\n }\n }\n }\n let shouldUpdate = false;\n const changedProperties = this._$changedProperties;\n try {\n shouldUpdate = this.shouldUpdate(changedProperties);\n if (shouldUpdate) {\n this.willUpdate(changedProperties);\n this.__controllers?.forEach((c) => c.hostUpdate?.());\n this.update(changedProperties);\n } else {\n this.__markUpdated();\n }\n } catch (e) {\n // Prevent `firstUpdated` and `updated` from running when there's an\n // update exception.\n shouldUpdate = false;\n // Ensure element can accept additional updates after an exception.\n this.__markUpdated();\n throw e;\n }\n // The update is no longer considered pending and further updates are now allowed.\n if (shouldUpdate) {\n this._$didUpdate(changedProperties);\n }\n }\n\n /**\n * Invoked before `update()` to compute values needed during the update.\n *\n * Implement `willUpdate` to compute property values that depend on other\n * properties and are used in the rest of the update process.\n *\n * ```ts\n * willUpdate(changedProperties) {\n * // only need to check changed properties for an expensive computation.\n * if (changedProperties.has('firstName') || changedProperties.has('lastName')) {\n * this.sha = computeSHA(`${this.firstName} ${this.lastName}`);\n * }\n * }\n *\n * render() {\n * return html`SHA: ${this.sha}`;\n * }\n * ```\n *\n * @category updates\n */\n protected willUpdate(_changedProperties: PropertyValues): void {}\n\n // Note, this is an override point for polyfill-support.\n // @internal\n _$didUpdate(changedProperties: PropertyValues) {\n this.__controllers?.forEach((c) => c.hostUpdated?.());\n if (!this.hasUpdated) {\n this.hasUpdated = true;\n this.firstUpdated(changedProperties);\n }\n this.updated(changedProperties);\n if (\n DEV_MODE &&\n this.isUpdatePending &&\n (this.constructor as typeof ReactiveElement).enabledWarnings!.includes(\n 'change-in-update'\n )\n ) {\n issueWarning(\n 'change-in-update',\n `Element ${this.localName} scheduled an update ` +\n `(generally because a property was set) ` +\n `after an update completed, causing a new update to be scheduled. ` +\n `This is inefficient and should be avoided unless the next update ` +\n `can only be scheduled as a side effect of the previous update.`\n );\n }\n }\n\n private __markUpdated() {\n this._$changedProperties = new Map();\n this.isUpdatePending = false;\n }\n\n /**\n * Returns a Promise that resolves when the element has completed updating.\n * The Promise value is a boolean that is `true` if the element completed the\n * update without triggering another update. The Promise result is `false` if\n * a property was set inside `updated()`. If the Promise is rejected, an\n * exception was thrown during the update.\n *\n * To await additional asynchronous work, override the `getUpdateComplete`\n * method. For example, it is sometimes useful to await a rendered element\n * before fulfilling this Promise. To do this, first await\n * `super.getUpdateComplete()`, then any subsequent state.\n *\n * @return A promise of a boolean that resolves to true if the update completed\n * without triggering another update.\n * @category updates\n */\n get updateComplete(): Promise<boolean> {\n return this.getUpdateComplete();\n }\n\n /**\n * Override point for the `updateComplete` promise.\n *\n * It is not safe to override the `updateComplete` getter directly due to a\n * limitation in TypeScript which means it is not possible to call a\n * superclass getter (e.g. `super.updateComplete.then(...)`) when the target\n * language is ES5 (https://github.com/microsoft/TypeScript/issues/338).\n * This method should be overridden instead. For example:\n *\n * ```ts\n * class MyElement extends LitElement {\n * override async getUpdateComplete() {\n * const result = await super.getUpdateComplete();\n * await this._myChild.updateComplete;\n * return result;\n * }\n * }\n * ```\n *\n * @return A promise of a boolean that resolves to true if the update completed\n * without triggering another update.\n * @category updates\n */\n protected getUpdateComplete(): Promise<boolean> {\n return this.__updatePromise;\n }\n\n /**\n * Controls whether or not `update()` should be called when the element requests\n * an update. By default, this method always returns `true`, but this can be\n * customized to control when to update.\n *\n * @param _changedProperties Map of changed properties with old values\n * @category updates\n */\n protected shouldUpdate(_changedProperties: PropertyValues): boolean {\n return true;\n }\n\n /**\n * Updates the element. This method reflects property values to attributes.\n * It can be overridden to render and keep updated element DOM.\n * Setting properties inside this method will *not* trigger\n * another update.\n *\n * @param _changedProperties Map of changed properties with old values\n * @category updates\n */\n protected update(_changedProperties: PropertyValues) {\n // The forEach() expression will only run when when __reflectingProperties is\n // defined, and it returns undefined, setting __reflectingProperties to\n // undefined\n this.__reflectingProperties &&= this.__reflectingProperties.forEach((p) =>\n this.__propertyToAttribute(p, this[p as keyof this])\n ) as undefined;\n this.__markUpdated();\n }\n\n /**\n * Invoked whenever the element is updated. Implement to perform\n * post-updating tasks via DOM APIs, for example, focusing an element.\n *\n * Setting properties inside this method will trigger the element to update\n * again after this update cycle completes.\n *\n * @param _changedProperties Map of changed properties with old values\n * @category updates\n */\n protected updated(_changedProperties: PropertyValues) {}\n\n /**\n * Invoked when the element is first updated. Implement to perform one time\n * work on the element after update.\n *\n * ```ts\n * firstUpdated() {\n * this.renderRoot.getElementById('my-text-area').focus();\n * }\n * ```\n *\n * Setting properties inside this method will trigger the element to update\n * again after this update cycle completes.\n *\n * @param _changedProperties Map of changed properties with old values\n * @category updates\n */\n protected firstUpdated(_changedProperties: PropertyValues) {}\n}\n// Assigned here to work around a jscompiler bug with static fields\n// when compiling to ES5.\n// https://github.com/google/closure-compiler/issues/3177\n(ReactiveElement as unknown as Record<string, unknown>)[\n JSCompiler_renameProperty('elementProperties', ReactiveElement)\n] = new Map();\n(ReactiveElement as unknown as Record<string, unknown>)[\n JSCompiler_renameProperty('finalized', ReactiveElement)\n] = new Map();\n\n// Apply polyfills if available\npolyfillSupport?.({ReactiveElement});\n\n// Dev mode warnings...\nif (DEV_MODE) {\n // Default warning set.\n ReactiveElement.enabledWarnings = [\n 'change-in-update',\n 'async-perform-update',\n ];\n const ensureOwnWarnings = function (ctor: typeof ReactiveElement) {\n if (\n !ctor.hasOwnProperty(JSCompiler_renameProperty('enabledWarnings', ctor))\n ) {\n ctor.enabledWarnings = ctor.enabledWarnings!.slice();\n }\n };\n ReactiveElement.enableWarning = function (\n this: typeof ReactiveElement,\n warning: WarningKind\n ) {\n ensureOwnWarnings(this);\n if (!this.enabledWarnings!.includes(warning)) {\n this.enabledWarnings!.push(warning);\n }\n };\n ReactiveElement.disableWarning = function (\n this: typeof ReactiveElement,\n warning: WarningKind\n ) {\n ensureOwnWarnings(this);\n const i = this.enabledWarnings!.indexOf(warning);\n if (i >= 0) {\n this.enabledWarnings!.splice(i, 1);\n }\n };\n}\n\n// IMPORTANT: do not change the property name or the assignment expression.\n// This line will be used in regexes to search for ReactiveElement usage.\n(global.reactiveElementVersions ??= []).push('2.0.4');\nif (DEV_MODE && global.reactiveElementVersions.length > 1) {\n issueWarning!(\n 'multiple-versions',\n `Multiple versions of Lit loaded. Loading multiple versions ` +\n `is not recommended.`\n );\n}\n", "/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\n\n// IMPORTANT: these imports must be type-only\nimport type {Directive, DirectiveResult, PartInfo} from './directive.js';\nimport type {TrustedHTML, TrustedTypesWindow} from 'trusted-types/lib';\n\nconst DEV_MODE = true;\nconst ENABLE_EXTRA_SECURITY_HOOKS = true;\nconst ENABLE_SHADYDOM_NOPATCH = true;\nconst NODE_MODE = false;\n\n// Allows minifiers to rename references to globalThis\nconst global = globalThis;\n\n/**\n * Contains types that are part of the unstable debug API.\n *\n * Everything in this API is not stable and may change or be removed in the future,\n * even on patch releases.\n */\n// eslint-disable-next-line @typescript-eslint/no-namespace\nexport namespace LitUnstable {\n /**\n * When Lit is running in dev mode and `window.emitLitDebugLogEvents` is true,\n * we will emit 'lit-debug' events to window, with live details about the update and render\n * lifecycle. These can be useful for writing debug tooling and visualizations.\n *\n * Please be aware that running with window.emitLitDebugLogEvents has performance overhead,\n * making certain operations that are normally very cheap (like a no-op render) much slower,\n * because we must copy data and dispatch events.\n */\n // eslint-disable-next-line @typescript-eslint/no-namespace\n export namespace DebugLog {\n export type Entry =\n | TemplatePrep\n | TemplateInstantiated\n | TemplateInstantiatedAndUpdated\n | TemplateUpdating\n | BeginRender\n | EndRender\n | CommitPartEntry\n | SetPartValue;\n export interface TemplatePrep {\n kind: 'template prep';\n template: Template;\n strings: TemplateStringsArray;\n clonableTemplate: HTMLTemplateElement;\n parts: TemplatePart[];\n }\n export interface BeginRender {\n kind: 'begin render';\n id: number;\n value: unknown;\n container: HTMLElement | DocumentFragment;\n options: RenderOptions | undefined;\n part: ChildPart | undefined;\n }\n export interface EndRender {\n kind: 'end render';\n id: number;\n value: unknown;\n container: HTMLElement | DocumentFragment;\n options: RenderOptions | undefined;\n part: ChildPart;\n }\n export interface TemplateInstantiated {\n kind: 'template instantiated';\n template: Template | CompiledTemplate;\n instance: TemplateInstance;\n options: RenderOptions | undefined;\n fragment: Node;\n parts: Array<Part | undefined>;\n values: unknown[];\n }\n export interface TemplateInstantiatedAndUpdated {\n kind: 'template instantiated and updated';\n template: Template | CompiledTemplate;\n instance: TemplateInstance;\n options: RenderOptions | undefined;\n fragment: Node;\n parts: Array<Part | undefined>;\n values: unknown[];\n }\n export interface TemplateUpdating {\n kind: 'template updating';\n template: Template | CompiledTemplate;\n instance: TemplateInstance;\n options: RenderOptions | undefined;\n parts: Array<Part | undefined>;\n values: unknown[];\n }\n export interface SetPartValue {\n kind: 'set part';\n part: Part;\n value: unknown;\n valueIndex: number;\n values: unknown[];\n templateInstance: TemplateInstance;\n }\n\n export type CommitPartEntry =\n | CommitNothingToChildEntry\n | CommitText\n | CommitNode\n | CommitAttribute\n | CommitProperty\n | CommitBooleanAttribute\n | CommitEventListener\n | CommitToElementBinding;\n\n export interface CommitNothingToChildEntry {\n kind: 'commit nothing to child';\n start: ChildNode;\n end: ChildNode | null;\n parent: Disconnectable | undefined;\n options: RenderOptions | undefined;\n }\n\n export interface CommitText {\n kind: 'commit text';\n node: Text;\n value: unknown;\n options: RenderOptions | undefined;\n }\n\n export interface CommitNode {\n kind: 'commit node';\n start: Node;\n parent: Disconnectable | undefined;\n value: Node;\n options: RenderOptions | undefined;\n }\n\n export interface CommitAttribute {\n kind: 'commit attribute';\n element: Element;\n name: string;\n value: unknown;\n options: RenderOptions | undefined;\n }\n\n export interface CommitProperty {\n kind: 'commit property';\n element: Element;\n name: string;\n value: unknown;\n options: RenderOptions | undefined;\n }\n\n export interface CommitBooleanAttribute {\n kind: 'commit boolean attribute';\n element: Element;\n name: string;\n value: boolean;\n options: RenderOptions | undefined;\n }\n\n export interface CommitEventListener {\n kind: 'commit event listener';\n element: Element;\n name: string;\n value: unknown;\n oldListener: unknown;\n options: RenderOptions | undefined;\n // True if we're removing the old event listener (e.g. because settings changed, or value is nothing)\n removeListener: boolean;\n // True if we're adding a new event listener (e.g. because first render, or settings changed)\n addListener: boolean;\n }\n\n export interface CommitToElementBinding {\n kind: 'commit to element binding';\n element: Element;\n value: unknown;\n options: RenderOptions | undefined;\n }\n }\n}\n\ninterface DebugLoggingWindow {\n // Even in dev mode, we generally don't want to emit these events, as that's\n // another level of cost, so only emit them when DEV_MODE is true _and_ when\n // window.emitLitDebugEvents is true.\n emitLitDebugLogEvents?: boolean;\n}\n\n/**\n * Useful for visualizing and logging insights into what the Lit template system is doing.\n *\n * Compiled out of prod mode builds.\n */\nconst debugLogEvent = DEV_MODE\n ? (event: LitUnstable.DebugLog.Entry) => {\n const shouldEmit = (global as unknown as DebugLoggingWindow)\n .emitLitDebugLogEvents;\n if (!shouldEmit) {\n return;\n }\n global.dispatchEvent(\n new CustomEvent<LitUnstable.DebugLog.Entry>('lit-debug', {\n detail: event,\n }),\n );\n }\n : undefined;\n// Used for connecting beginRender and endRender events when there are nested\n// renders when errors are thrown preventing an endRender event from being\n// called.\nlet debugLogRenderId = 0;\n\nlet issueWarning: (code: string, warning: string) => void;\n\nif (DEV_MODE) {\n global.litIssuedWarnings ??= new Set();\n\n // Issue a warning, if we haven't already.\n issueWarning = (code: string, warning: string) => {\n warning += code\n ? ` See https://lit.dev/msg/${code} for more information.`\n : '';\n if (!global.litIssuedWarnings!.has(warning)) {\n console.warn(warning);\n global.litIssuedWarnings!.add(warning);\n }\n };\n\n issueWarning(\n 'dev-mode',\n `Lit is in dev mode. Not recommended for production!`,\n );\n}\n\nconst wrap =\n ENABLE_SHADYDOM_NOPATCH &&\n global.ShadyDOM?.inUse &&\n global.ShadyDOM?.noPatch === true\n ? (global.ShadyDOM!.wrap as <T extends Node>(node: T) => T)\n : <T extends Node>(node: T) => node;\n\nconst trustedTypes = (global as unknown as TrustedTypesWindow).trustedTypes;\n\n/**\n * Our TrustedTypePolicy for HTML which is declared using the html template\n * tag function.\n *\n * That HTML is a developer-authored constant, and is parsed with innerHTML\n * before any untrusted expressions have been mixed in. Therefor it is\n * considered safe by construction.\n */\nconst policy = trustedTypes\n ? trustedTypes.createPolicy('lit-html', {\n createHTML: (s) => s,\n })\n : undefined;\n\n/**\n * Used to sanitize any value before it is written into the DOM. This can be\n * used to implement a security policy of allowed and disallowed values in\n * order to prevent XSS attacks.\n *\n * One way of using this callback would be to check attributes and properties\n * against a list of high risk fields, and require that values written to such\n * fields be instances of a class which is safe by construction. Closure's Safe\n * HTML Types is one implementation of this technique (\n * https://github.com/google/safe-html-types/blob/master/doc/safehtml-types.md).\n * The TrustedTypes polyfill in API-only mode could also be used as a basis\n * for this technique (https://github.com/WICG/trusted-types).\n *\n * @param node The HTML node (usually either a #text node or an Element) that\n * is being written to. Note that this is just an exemplar node, the write\n * may take place against another instance of the same class of node.\n * @param name The name of an attribute or property (for example, 'href').\n * @param type Indicates whether the write that's about to be performed will\n * be to a property or a node.\n * @return A function that will sanitize this class of writes.\n */\nexport type SanitizerFactory = (\n node: Node,\n name: string,\n type: 'property' | 'attribute',\n) => ValueSanitizer;\n\n/**\n * A function which can sanitize values that will be written to a specific kind\n * of DOM sink.\n *\n * See SanitizerFactory.\n *\n * @param value The value to sanitize. Will be the actual value passed into\n * the lit-html template literal, so this could be of any type.\n * @return The value to write to the DOM. Usually the same as the input value,\n * unless sanitization is needed.\n */\nexport type ValueSanitizer = (value: unknown) => unknown;\n\nconst identityFunction: ValueSanitizer = (value: unknown) => value;\nconst noopSanitizer: SanitizerFactory = (\n _node: Node,\n _name: string,\n _type: 'property' | 'attribute',\n) => identityFunction;\n\n/** Sets the global sanitizer factory. */\nconst setSanitizer = (newSanitizer: SanitizerFactory) => {\n if (!ENABLE_EXTRA_SECURITY_HOOKS) {\n return;\n }\n if (sanitizerFactoryInternal !== noopSanitizer) {\n throw new Error(\n `Attempted to overwrite existing lit-html security policy.` +\n ` setSanitizeDOMValueFactory should be called at most once.`,\n );\n }\n sanitizerFactoryInternal = newSanitizer;\n};\n\n/**\n * Only used in internal tests, not a part of the public API.\n */\nconst _testOnlyClearSanitizerFactoryDoNotCallOrElse = () => {\n sanitizerFactoryInternal = noopSanitizer;\n};\n\nconst createSanitizer: SanitizerFactory = (node, name, type) => {\n return sanitizerFactoryInternal(node, name, type);\n};\n\n// Added to an attribute name to mark the attribute as bound so we can find\n// it easily.\nconst boundAttributeSuffix = '$lit$';\n\n// This marker is used in many syntactic positions in HTML, so it must be\n// a valid element name and attribute name. We don't support dynamic names (yet)\n// but this at least ensures that the parse tree is closer to the template\n// intention.\nconst marker = `lit$${Math.random().toFixed(9).slice(2)}$`;\n\n// String used to tell if a comment is a marker comment\nconst markerMatch = '?' + marker;\n\n// Text used to insert a comment marker node. We use processing instruction\n// syntax because it's slightly smaller, but parses as a comment node.\nconst nodeMarker = `<${markerMatch}>`;\n\nconst d =\n NODE_MODE && global.document === undefined\n ? ({\n createTreeWalker() {\n return {};\n },\n } as unknown as Document)\n : document;\n\n// Creates a dynamic marker. We never have to search for these in the DOM.\nconst createMarker = () => d.createComment('');\n\n// https://tc39.github.io/ecma262/#sec-typeof-operator\ntype Primitive = null | undefined | boolean | number | string | symbol | bigint;\nconst isPrimitive = (value: unknown): value is Primitive =>\n value === null || (typeof value != 'object' && typeof value != 'function');\nconst isArray = Array.isArray;\nconst isIterable = (value: unknown): value is Iterable<unknown> =>\n isArray(value) ||\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n typeof (value as any)?.[Symbol.iterator] === 'function';\n\nconst SPACE_CHAR = `[ \\t\\n\\f\\r]`;\nconst ATTR_VALUE_CHAR = `[^ \\t\\n\\f\\r\"'\\`<>=]`;\nconst NAME_CHAR = `[^\\\\s\"'>=/]`;\n\n// These regexes represent the five parsing states that we care about in the\n// Template's HTML scanner. They match the *end* of the state they're named\n// after.\n// Depending on the match, we transition to a new state. If there's no match,\n// we stay in the same state.\n// Note that the regexes are stateful. We utilize lastIndex and sync it\n// across the multiple regexes used. In addition to the five regexes below\n// we also dynamically create a regex to find the matching end tags for raw\n// text elements.\n\n/**\n * End of text is: `<` followed by:\n * (comment start) or (tag) or (dynamic tag binding)\n */\nconst textEndRegex = /<(?:(!--|\\/[^a-zA-Z])|(\\/?[a-zA-Z][^>\\s]*)|(\\/?$))/g;\nconst COMMENT_START = 1;\nconst TAG_NAME = 2;\nconst DYNAMIC_TAG_NAME = 3;\n\nconst commentEndRegex = /-->/g;\n/**\n * Comments not started with <!--, like </{, can be ended by a single `>`\n */\nconst comment2EndRegex = />/g;\n\n/**\n * The tagEnd regex matches the end of the \"inside an opening\" tag syntax\n * position. It either matches a `>`, an attribute-like sequence, or the end\n * of the string after a space (attribute-name position ending).\n *\n * See attributes in the HTML spec:\n * https://www.w3.org/TR/html5/syntax.html#elements-attributes\n *\n * \" \\t\\n\\f\\r\" are HTML space characters:\n * https://infra.spec.whatwg.org/#ascii-whitespace\n *\n * So an attribute is:\n * * The name: any character except a whitespace character, (\"), ('), \">\",\n * \"=\", or \"/\". Note: this is different from the HTML spec which also excludes control characters.\n * * Followed by zero or more space characters\n * * Followed by \"=\"\n * * Followed by zero or more space characters\n * * Followed by:\n * * Any character except space, ('), (\"), \"<\", \">\", \"=\", (`), or\n * * (\") then any non-(\"), or\n * * (') then any non-(')\n */\nconst tagEndRegex = new RegExp(\n `>|${SPACE_CHAR}(?:(${NAME_CHAR}+)(${SPACE_CHAR}*=${SPACE_CHAR}*(?:${ATTR_VALUE_CHAR}|(\"|')|))|$)`,\n 'g',\n);\nconst ENTIRE_MATCH = 0;\nconst ATTRIBUTE_NAME = 1;\nconst SPACES_AND_EQUALS = 2;\nconst QUOTE_CHAR = 3;\n\nconst singleQuoteAttrEndRegex = /'/g;\nconst doubleQuoteAttrEndRegex = /\"/g;\n/**\n * Matches the raw text elements.\n *\n * Comments are not parsed within raw text elements, so we need to search their\n * text content for marker strings.\n */\nconst rawTextElement = /^(?:script|style|textarea|title)$/i;\n\n/** TemplateResult types */\nconst HTML_RESULT = 1;\nconst SVG_RESULT = 2;\nconst MATHML_RESULT = 3;\n\ntype ResultType = typeof HTML_RESULT | typeof SVG_RESULT | typeof MATHML_RESULT;\n\n// TemplatePart types\n// IMPORTANT: these must match the values in PartType\nconst ATTRIBUTE_PART = 1;\nconst CHILD_PART = 2;\nconst PROPERTY_PART = 3;\nconst BOOLEAN_ATTRIBUTE_PART = 4;\nconst EVENT_PART = 5;\nconst ELEMENT_PART = 6;\nconst COMMENT_PART = 7;\n\n/**\n * The return type of the template tag functions, {@linkcode html} and\n * {@linkcode svg} when it hasn't been compiled by @lit-labs/compiler.\n *\n * A `TemplateResult` object holds all the information about a template\n * expression required to render it: the template strings, expression values,\n * and type of template (html or svg).\n *\n * `TemplateResult` objects do not create any DOM on their own. To create or\n * update DOM you need to render the `TemplateResult`. See\n * [Rendering](https://lit.dev/docs/components/rendering) for more information.\n *\n */\nexport type UncompiledTemplateResult<T extends ResultType = ResultType> = {\n // This property needs to remain unminified.\n ['_$litType$']: T;\n strings: TemplateStringsArray;\n values: unknown[];\n};\n\n/**\n * This is a template result that may be either uncompiled or compiled.\n *\n * In the future, TemplateResult will be this type. If you want to explicitly\n * note that a template result is potentially compiled, you can reference this\n * type and it will continue to behave the same through the next major version\n * of Lit. This can be useful for code that wants to prepare for the next\n * major version of Lit.\n */\nexport type MaybeCompiledTemplateResult<T extends ResultType = ResultType> =\n | UncompiledTemplateResult<T>\n | CompiledTemplateResult;\n\n/**\n * The return type of the template tag functions, {@linkcode html} and\n * {@linkcode svg}.\n *\n * A `TemplateResult` object holds all the information about a template\n * expression required to render it: the template strings, expression values,\n * and type of template (html or svg).\n *\n * `TemplateResult` objects do not create any DOM on their own. To create or\n * update DOM you need to render the `TemplateResult`. See\n * [Rendering](https://lit.dev/docs/components/rendering) for more information.\n *\n * In Lit 4, this type will be an alias of\n * MaybeCompiledTemplateResult, so that code will get type errors if it assumes\n * that Lit templates are not compiled. When deliberately working with only\n * one, use either {@linkcode CompiledTemplateResult} or\n * {@linkcode UncompiledTemplateResult} explicitly.\n */\nexport type TemplateResult<T extends ResultType = ResultType> =\n UncompiledTemplateResult<T>;\n\nexport type HTMLTemplateResult = TemplateResult<typeof HTML_RESULT>;\n\nexport type SVGTemplateResult = TemplateResult<typeof SVG_RESULT>;\n\nexport type MathMLTemplateResult = TemplateResult<typeof MATHML_RESULT>;\n\n/**\n * A TemplateResult that has been compiled by @lit-labs/compiler, skipping the\n * prepare step.\n */\nexport interface CompiledTemplateResult {\n // This is a factory in order to make template initialization lazy\n // and allow ShadyRenderOptions scope to be passed in.\n // This property needs to remain unminified.\n ['_$litType$']: CompiledTemplate;\n values: unknown[];\n}\n\nexport interface CompiledTemplate extends Omit<Template, 'el'> {\n // el is overridden to be optional. We initialize it on first render\n el?: HTMLTemplateElement;\n\n // The prepared HTML string to create a template element from.\n // The type is a TemplateStringsArray to guarantee that the value came from\n // source code, preventing a JSON injection attack.\n h: TemplateStringsArray;\n}\n\n/**\n * Generates a template literal tag function that returns a TemplateResult with\n * the given result type.\n */\nconst tag =\n <T extends ResultType>(type: T) =>\n (strings: TemplateStringsArray, ...values: unknown[]): TemplateResult<T> => {\n // Warn against templates octal escape sequences\n // We do this here rather than in render so that the warning is closer to the\n // template definition.\n if (DEV_MODE && strings.some((s) => s === undefined)) {\n console.warn(\n 'Some template strings are undefined.\\n' +\n 'This is probably caused by illegal octal escape sequences.',\n );\n }\n if (DEV_MODE) {\n // Import static-html.js results in a circular dependency which g3 doesn't\n // handle. Instead we know that static values must have the field\n // `_$litStatic$`.\n if (\n values.some((val) => (val as {_$litStatic$: unknown})?.['_$litStatic$'])\n ) {\n issueWarning(\n '',\n `Static values 'literal' or 'unsafeStatic' cannot be used as values to non-static templates.\\n` +\n `Please use the static 'html' tag function. See https://lit.dev/docs/templates/expressions/#static-expressions`,\n );\n }\n }\n return {\n // This property needs to remain unminified.\n ['_$litType$']: type,\n strings,\n values,\n };\n };\n\n/**\n * Interprets a template literal as an HTML template that can efficiently\n * render to and update a container.\n *\n * ```ts\n * const header = (title: string) => html`<h1>${title}</h1>`;\n * ```\n *\n * The `html` tag returns a description of the DOM to render as a value. It is\n * lazy, meaning no work is done until the template is rendered. When rendering,\n * if a template comes from the same expression as a previously rendered result,\n * it's efficiently updated instead of replaced.\n */\nexport const html = tag(HTML_RESULT);\n\n/**\n * Interprets a template literal as an SVG fragment that can efficiently render\n * to and update a container.\n *\n * ```ts\n * const rect = svg`<rect width=\"10\" height=\"10\"></rect>`;\n *\n * const myImage = html`\n * <svg viewBox=\"0 0 10 10\" xmlns=\"http://www.w3.org/2000/svg\">\n * ${rect}\n * </svg>`;\n * ```\n *\n * The `svg` *tag function* should only be used for SVG fragments, or elements\n * that would be contained **inside** an `<svg>` HTML element. A common error is\n * placing an `<svg>` *element* in a template tagged with the `svg` tag\n * function. The `<svg>` element is an HTML element and should be used within a\n * template tagged with the {@linkcode html} tag function.\n *\n * In LitElement usage, it's invalid to return an SVG fragment from the\n * `render()` method, as the SVG fragment will be contained within the element's\n * shadow root and thus not be properly contained within an `<svg>` HTML\n * element.\n */\nexport const svg = tag(SVG_RESULT);\n\n/**\n * Interprets a template literal as MathML fragment that can efficiently render\n * to and update a container.\n *\n * ```ts\n * const num = mathml`<mn>1</mn>`;\n *\n * const eq = html`\n * <math>\n * ${num}\n * </math>`;\n * ```\n *\n * The `mathml` *tag function* should only be used for MathML fragments, or\n * elements that would be contained **inside** a `<math>` HTML element. A common\n * error is placing a `<math>` *element* in a template tagged with the `mathml`\n * tag function. The `<math>` element is an HTML element and should be used\n * within a template tagged with the {@linkcode html} tag function.\n *\n * In LitElement usage, it's invalid to return an MathML fragment from the\n * `render()` method, as the MathML fragment will be contained within the\n * element's shadow root and thus not be properly contained within a `<math>`\n * HTML element.\n */\nexport const mathml = tag(MATHML_RESULT);\n\n/**\n * A sentinel value that signals that a value was handled by a directive and\n * should not be written to the DOM.\n */\nexport const noChange = Symbol.for('lit-noChange');\n\n/**\n * A sentinel value that signals a ChildPart to fully clear its content.\n *\n * ```ts\n * const button = html`${\n * user.isAdmin\n * ? html`<button>DELETE</button>`\n * : nothing\n * }`;\n * ```\n *\n * Prefer using `nothing` over other falsy values as it provides a consistent\n * behavior between various expression binding contexts.\n *\n * In child expressions, `undefined`, `null`, `''`, and `nothing` all behave the\n * same and render no nodes. In attribute expressions, `nothing` _removes_ the\n * attribute, while `undefined` and `null` will render an empty string. In\n * property expressions `nothing` becomes `undefined`.\n */\nexport const nothing = Symbol.for('lit-nothing');\n\n/**\n * The cache of prepared templates, keyed by the tagged TemplateStringsArray\n * and _not_ accounting for the specific template tag used. This means that\n * template tags cannot be dynamic - they must statically be one of html, svg,\n * or attr. This restriction simplifies the cache lookup, which is on the hot\n * path for rendering.\n */\nconst templateCache = new WeakMap<TemplateStringsArray, Template>();\n\n/**\n * Object specifying options for controlling lit-html rendering. Note that\n * while `render` may be called multiple times on the same `container` (and\n * `renderBefore` reference node) to efficiently update the rendered content,\n * only the options passed in during the first render are respected during\n * the lifetime of renders to that unique `container` + `renderBefore`\n * combination.\n */\nexport interface RenderOptions {\n /**\n * An object to use as the `this` value for event listeners. It's often\n * useful to set this to the host component rendering a template.\n */\n host?: object;\n /**\n * A DOM node before which to render content in the container.\n */\n renderBefore?: ChildNode | null;\n /**\n * Node used for cloning the template (`importNode` will be called on this\n * node). This controls the `ownerDocument` of the rendered DOM, along with\n * any inherited context. Defaults to the global `document`.\n */\n creationScope?: {importNode(node: Node, deep?: boolean): Node};\n /**\n * The initial connected state for the top-level part being rendered. If no\n * `isConnected` option is set, `AsyncDirective`s will be connected by\n * default. Set to `false` if the initial render occurs in a disconnected tree\n * and `AsyncDirective`s should see `isConnected === false` for their initial\n * render. The `part.setConnected()` method must be used subsequent to initial\n * render to change the connected state of the part.\n */\n isConnected?: boolean;\n}\n\nconst walker = d.createTreeWalker(\n d,\n 129 /* NodeFilter.SHOW_{ELEMENT|COMMENT} */,\n);\n\nlet sanitizerFactoryInternal: SanitizerFactory = noopSanitizer;\n\n//\n// Classes only below here, const variable declarations only above here...\n//\n// Keeping variable declarations and classes together improves minification.\n// Interfaces and type aliases can be interleaved freely.\n//\n\n// Type for classes that have a `_directive` or `_directives[]` field, used by\n// `resolveDirective`\nexport interface DirectiveParent {\n _$parent?: DirectiveParent;\n _$isConnected: boolean;\n __directive?: Directive;\n __directives?: Array<Directive | undefined>;\n}\n\nfunction trustFromTemplateString(\n tsa: TemplateStringsArray,\n stringFromTSA: string,\n): TrustedHTML {\n // A security check to prevent spoofing of Lit template results.\n // In the future, we may be able to replace this with Array.isTemplateObject,\n // though we might need to make that check inside of the html and svg\n // functions, because precompiled templates don't come in as\n // TemplateStringArray objects.\n if (!isArray(tsa) || !tsa.hasOwnProperty('raw')) {\n let message = 'invalid template strings array';\n if (DEV_MODE) {\n message = `\n Internal Error: expected template strings to be an array\n with a 'raw' field. Faking a template strings array by\n calling html or svg like an ordinary function is effectively\n the same as calling unsafeHtml and can lead to major security\n issues, e.g. opening your code up to XSS attacks.\n If you're using the html or svg tagged template functions normally\n and still seeing this error, please file a bug at\n https://github.com/lit/lit/issues/new?template=bug_report.md\n and include information about your build tooling, if any.\n `\n .trim()\n .replace(/\\n */g, '\\n');\n }\n throw new Error(message);\n }\n return policy !== undefined\n ? policy.createHTML(stringFromTSA)\n : (stringFromTSA as unknown as TrustedHTML);\n}\n\n/**\n * Returns an HTML string for the given TemplateStringsArray and result type\n * (HTML or SVG), along with the case-sensitive bound attribute names in\n * template order. The HTML contains comment markers denoting the `ChildPart`s\n * and suffixes on bound attributes denoting the `AttributeParts`.\n *\n * @param strings template strings array\n * @param type HTML or SVG\n * @return Array containing `[html, attrNames]` (array returned for terseness,\n * to avoid object fields since this code is shared with non-minified SSR\n * code)\n */\nconst getTemplateHtml = (\n strings: TemplateStringsArray,\n type: ResultType,\n): [TrustedHTML, Array<string>] => {\n // Insert makers into the template HTML to represent the position of\n // bindings. The following code scans the template strings to determine the\n // syntactic position of the bindings. They can be in text position, where\n // we insert an HTML comment, attribute value position, where we insert a\n // sentinel string and re-write the attribute name, or inside a tag where\n // we insert the sentinel string.\n const l = strings.length - 1;\n // Stores the case-sensitive bound attribute names in the order of their\n // parts. ElementParts are also reflected in this array as undefined\n // rather than a string, to disambiguate from attribute bindings.\n const attrNames: Array<string> = [];\n let html =\n type === SVG_RESULT ? '<svg>' : type === MATHML_RESULT ? '<math>' : '';\n\n // When we're inside a raw text tag (not it's text content), the regex\n // will still be tagRegex so we can find attributes, but will switch to\n // this regex when the tag ends.\n let rawTextEndRegex: RegExp | undefined;\n\n // The current parsing state, represented as a reference to one of the\n // regexes\n let regex = textEndRegex;\n\n for (let i = 0; i < l; i++) {\n const s = strings[i];\n // The index of the end of the last attribute name. When this is\n // positive at end of a string, it means we're in an attribute value\n // position and need to rewrite the attribute name.\n // We also use a special value of -2 to indicate that we encountered\n // the end of a string in attribute name position.\n let attrNameEndIndex = -1;\n let attrName: string | undefined;\n let lastIndex = 0;\n let match!: RegExpExecArray | null;\n\n // The conditions in this loop handle the current parse state, and the\n // assignments to the `regex` variable are the state transitions.\n while (lastIndex < s.length) {\n // Make sure we start searching from where we previously left off\n regex.lastIndex = lastIndex;\n match = regex.exec(s);\n if (match === null) {\n break;\n }\n lastIndex = regex.lastIndex;\n if (regex === textEndRegex) {\n if (match[COMMENT_START] === '!--') {\n regex = commentEndRegex;\n } else if (match[COMMENT_START] !== undefined) {\n // We started a weird comment, like </{\n regex = comment2EndRegex;\n } else if (match[TAG_NAME] !== undefined) {\n if (rawTextElement.test(match[TAG_NAME])) {\n // Record if we encounter a raw-text element. We'll switch to\n // this regex at the end of the tag.\n rawTextEndRegex = new RegExp(`</${match[TAG_NAME]}`, 'g');\n }\n regex = tagEndRegex;\n } else if (match[DYNAMIC_TAG_NAME] !== undefined) {\n if (DEV_MODE) {\n throw new Error(\n 'Bindings in tag names are not supported. Please use static templates instead. ' +\n 'See https://lit.dev/docs/templates/expressions/#static-expressions',\n );\n }\n regex = tagEndRegex;\n }\n } else if (regex === tagEndRegex) {\n if (match[ENTIRE_MATCH] === '>') {\n // End of a tag. If we had started a raw-text element, use that\n // regex\n regex = rawTextEndRegex ?? textEndRegex;\n // We may be ending an unquoted attribute value, so make sure we\n // clear any pending attrNameEndIndex\n attrNameEndIndex = -1;\n } else if (match[ATTRIBUTE_NAME] === undefined) {\n // Attribute name position\n attrNameEndIndex = -2;\n } else {\n attrNameEndIndex = regex.lastIndex - match[SPACES_AND_EQUALS].length;\n attrName = match[ATTRIBUTE_NAME];\n regex =\n match[QUOTE_CHAR] === undefined\n ? tagEndRegex\n : match[QUOTE_CHAR] === '\"'\n ? doubleQuoteAttrEndRegex\n : singleQuoteAttrEndRegex;\n }\n } else if (\n regex === doubleQuoteAttrEndRegex ||\n regex === singleQuoteAttrEndRegex\n ) {\n regex = tagEndRegex;\n } else if (regex === commentEndRegex || regex === comment2EndRegex) {\n regex = textEndRegex;\n } else {\n // Not one of the five state regexes, so it must be the dynamically\n // created raw text regex and we're at the close of that element.\n regex = tagEndRegex;\n rawTextEndRegex = undefined;\n }\n }\n\n if (DEV_MODE) {\n // If we have a attrNameEndIndex, which indicates that we should\n // rewrite the attribute name, assert that we're in a valid attribute\n // position - either in a tag, or a quoted attribute value.\n console.assert(\n attrNameEndIndex === -1 ||\n regex === tagEndRegex ||\n regex === singleQuoteAttrEndRegex ||\n regex === doubleQuoteAttrEndRegex,\n 'unexpected parse state B',\n );\n }\n\n // We have four cases:\n // 1. We're in text position, and not in a raw text element\n // (regex === textEndRegex): insert a comment marker.\n // 2. We have a non-negative attrNameEndIndex which means we need to\n // rewrite the attribute name to add a bound attribute suffix.\n // 3. We're at the non-first binding in a multi-binding attribute, use a\n // plain marker.\n // 4. We're somewhere else inside the tag. If we're in attribute name\n // position (attrNameEndIndex === -2), add a sequential suffix to\n // generate a unique attribute name.\n\n // Detect a binding next to self-closing tag end and insert a space to\n // separate the marker from the tag end:\n const end =\n regex === tagEndRegex && strings[i + 1].startsWith('/>') ? ' ' : '';\n html +=\n regex === textEndRegex\n ? s + nodeMarker\n : attrNameEndIndex >= 0\n ? (attrNames.push(attrName!),\n s.slice(0, attrNameEndIndex) +\n boundAttributeSuffix +\n s.slice(attrNameEndIndex)) +\n marker +\n end\n : s + marker + (attrNameEndIndex === -2 ? i : end);\n }\n\n const htmlResult: string | TrustedHTML =\n html +\n (strings[l] || '<?>') +\n (type === SVG_RESULT ? '</svg>' : type === MATHML_RESULT ? '</math>' : '');\n\n // Returned as an array for terseness\n return [trustFromTemplateString(strings, htmlResult), attrNames];\n};\n\n/** @internal */\nexport type {Template};\nclass Template {\n /** @internal */\n el!: HTMLTemplateElement;\n\n parts: Array<TemplatePart> = [];\n\n constructor(\n // This property needs to remain unminified.\n {strings, ['_$litType$']: type}: UncompiledTemplateResult,\n options?: RenderOptions,\n ) {\n let node: Node | null;\n let nodeIndex = 0;\n let attrNameIndex = 0;\n const partCount = strings.length - 1;\n const parts = this.parts;\n\n // Create template element\n const [html, attrNames] = getTemplateHtml(strings, type);\n this.el = Template.createElement(html, options);\n walker.currentNode = this.el.content;\n\n // Re-parent SVG or MathML nodes into template root\n if (type === SVG_RESULT || type === MATHML_RESULT) {\n const wrapper = this.el.content.firstChild!;\n wrapper.replaceWith(...wrapper.childNodes);\n }\n\n // Walk the template to find binding markers and create TemplateParts\n while ((node = walker.nextNode()) !== null && parts.length < partCount) {\n if (node.nodeType === 1) {\n if (DEV_MODE) {\n const tag = (node as Element).localName;\n // Warn if `textarea` includes an expression and throw if `template`\n // does since these are not supported. We do this by checking\n // innerHTML for anything that looks like a marker. This catches\n // cases like bindings in textarea there markers turn into text nodes.\n if (\n /^(?:textarea|template)$/i!.test(tag) &&\n (node as Element).innerHTML.includes(marker)\n ) {\n const m =\n `Expressions are not supported inside \\`${tag}\\` ` +\n `elements. See https://lit.dev/msg/expression-in-${tag} for more ` +\n `information.`;\n if (tag === 'template') {\n throw new Error(m);\n } else issueWarning('', m);\n }\n }\n // TODO (justinfagnani): for attempted dynamic tag names, we don't\n // increment the bindingIndex, and it'll be off by 1 in the element\n // and off by two after it.\n if ((node as Element).hasAttributes()) {\n for (const name of (node as Element).getAttributeNames()) {\n if (name.endsWith(boundAttributeSuffix)) {\n const realName = attrNames[attrNameIndex++];\n const value = (node as Element).getAttribute(name)!;\n const statics = value.split(marker);\n const m = /([.?@])?(.*)/.exec(realName)!;\n parts.push({\n type: ATTRIBUTE_PART,\n index: nodeIndex,\n name: m[2],\n strings: statics,\n ctor:\n m[1] === '.'\n ? PropertyPart\n : m[1] === '?'\n ? BooleanAttributePart\n : m[1] === '@'\n ? EventPart\n : AttributePart,\n });\n (node as Element).removeAttribute(name);\n } else if (name.startsWith(marker)) {\n parts.push({\n type: ELEMENT_PART,\n index: nodeIndex,\n });\n (node as Element).removeAttribute(name);\n }\n }\n }\n // TODO (justinfagnani): benchmark the regex against testing for each\n // of the 3 raw text element names.\n if (rawTextElement.test((node as Element).tagName)) {\n // For raw text elements we need to split the text content on\n // markers, create a Text node for each segment, and create\n // a TemplatePart for each marker.\n const strings = (node as Element).textContent!.split(marker);\n const lastIndex = strings.length - 1;\n if (lastIndex > 0) {\n (node as Element).textContent = trustedTypes\n ? (trustedTypes.emptyScript as unknown as '')\n : '';\n // Generate a new text node for each literal section\n // These nodes are also used as the markers for node parts\n // We can't use empty text nodes as markers because they're\n // normalized when cloning in IE (could simplify when\n // IE is no longer supported)\n for (let i = 0; i < lastIndex; i++) {\n (node as Element).append(strings[i], createMarker());\n // Walk past the marker node we just added\n walker.nextNode();\n parts.push({type: CHILD_PART, index: ++nodeIndex});\n }\n // Note because this marker is added after the walker's current\n // node, it will be walked to in the outer loop (and ignored), so\n // we don't need to adjust nodeIndex here\n (node as Element).append(strings[lastIndex], createMarker());\n }\n }\n } else if (node.nodeType === 8) {\n const data = (node as Comment).data;\n if (data === markerMatch) {\n parts.push({type: CHILD_PART, index: nodeIndex});\n } else {\n let i = -1;\n while ((i = (node as Comment).data.indexOf(marker, i + 1)) !== -1) {\n // Comment node has a binding marker inside, make an inactive part\n // The binding won't work, but subsequent bindings will\n parts.push({type: COMMENT_PART, index: nodeIndex});\n // Move to the end of the match\n i += marker.length - 1;\n }\n }\n }\n nodeIndex++;\n }\n\n if (DEV_MODE) {\n // If there was a duplicate attribute on a tag, then when the tag is\n // parsed into an element the attribute gets de-duplicated. We can detect\n // this mismatch if we haven't precisely consumed every attribute name\n // when preparing the template. This works because `attrNames` is built\n // from the template string and `attrNameIndex` comes from processing the\n // resulting DOM.\n if (attrNames.length !== attrNameIndex) {\n throw new Error(\n `Detected duplicate attribute bindings. This occurs if your template ` +\n `has duplicate attributes on an element tag. For example ` +\n `\"<input ?disabled=\\${true} ?disabled=\\${false}>\" contains a ` +\n `duplicate \"disabled\" attribute. The error was detected in ` +\n `the following template: \\n` +\n '`' +\n strings.join('${...}') +\n '`',\n );\n }\n }\n\n // We could set walker.currentNode to another node here to prevent a memory\n // leak, but every time we prepare a template, we immediately render it\n // and re-use the walker in new TemplateInstance._clone().\n debugLogEvent &&\n debugLogEvent({\n kind: 'template prep',\n template: this,\n clonableTemplate: this.el,\n parts: this.parts,\n strings,\n });\n }\n\n // Overridden via `litHtmlPolyfillSupport` to provide platform support.\n /** @nocollapse */\n static createElement(html: TrustedHTML, _options?: RenderOptions) {\n const el = d.createElement('template');\n el.innerHTML = html as unknown as string;\n return el;\n }\n}\n\nexport interface Disconnectable {\n _$parent?: Disconnectable;\n _$disconnectableChildren?: Set<Disconnectable>;\n // Rather than hold connection state on instances, Disconnectables recursively\n // fetch the connection state from the RootPart they are connected in via\n // getters up the Disconnectable tree via _$parent references. This pushes the\n // cost of tracking the isConnected state to `AsyncDirectives`, and avoids\n // needing to pass all Disconnectables (parts, template instances, and\n // directives) their connection state each time it changes, which would be\n // costly for trees that have no AsyncDirectives.\n _$isConnected: boolean;\n}\n\nfunction resolveDirective(\n part: ChildPart | AttributePart | ElementPart,\n value: unknown,\n parent: DirectiveParent = part,\n attributeIndex?: number,\n): unknown {\n // Bail early if the value is explicitly noChange. Note, this means any\n // nested directive is still attached and is not run.\n if (value === noChange) {\n return value;\n }\n let currentDirective =\n attributeIndex !== undefined\n ? (parent as AttributePart).__directives?.[attributeIndex]\n : (parent as ChildPart | ElementPart | Directive).__directive;\n const nextDirectiveConstructor = isPrimitive(value)\n ? undefined\n : // This property needs to remain unminified.\n (value as DirectiveResult)['_$litDirective$'];\n if (currentDirective?.constructor !== nextDirectiveConstructor) {\n // This property needs to remain unminified.\n currentDirective?.['_$notifyDirectiveConnectionChanged']?.(false);\n if (nextDirectiveConstructor === undefined) {\n currentDirective = undefined;\n } else {\n currentDirective = new nextDirectiveConstructor(part as PartInfo);\n currentDirective._$initialize(part, parent, attributeIndex);\n }\n if (attributeIndex !== undefined) {\n ((parent as AttributePart).__directives ??= [])[attributeIndex] =\n currentDirective;\n } else {\n (parent as ChildPart | Directive).__directive = currentDirective;\n }\n }\n if (currentDirective !== undefined) {\n value = resolveDirective(\n part,\n currentDirective._$resolve(part, (value as DirectiveResult).values),\n currentDirective,\n attributeIndex,\n );\n }\n return value;\n}\n\nexport type {TemplateInstance};\n/**\n * An updateable instance of a Template. Holds references to the Parts used to\n * update the template instance.\n */\nclass TemplateInstance implements Disconnectable {\n _$template: Template;\n _$parts: Array<Part | undefined> = [];\n\n /** @internal */\n _$parent: ChildPart;\n /** @internal */\n _$disconnectableChildren?: Set<Disconnectable> = undefined;\n\n constructor(template: Template, parent: ChildPart) {\n this._$template = template;\n this._$parent = parent;\n }\n\n // Called by ChildPart parentNode getter\n get parentNode() {\n return this._$parent.parentNode;\n }\n\n // See comment in Disconnectable interface for why this is a getter\n get _$isConnected() {\n return this._$parent._$isConnected;\n }\n\n // This method is separate from the constructor because we need to return a\n // DocumentFragment and we don't want to hold onto it with an instance field.\n _clone(options: RenderOptions | undefined) {\n const {\n el: {content},\n parts: parts,\n } = this._$template;\n const fragment = (options?.creationScope ?? d).importNode(content, true);\n walker.currentNode = fragment;\n\n let node = walker.nextNode()!;\n let nodeIndex = 0;\n let partIndex = 0;\n let templatePart = parts[0];\n\n while (templatePart !== undefined) {\n if (nodeIndex === templatePart.index) {\n let part: Part | undefined;\n if (templatePart.type === CHILD_PART) {\n part = new ChildPart(\n node as HTMLElement,\n node.nextSibling,\n this,\n options,\n );\n } else if (templatePart.type === ATTRIBUTE_PART) {\n part = new templatePart.ctor(\n node as HTMLElement,\n templatePart.name,\n templatePart.strings,\n this,\n options,\n );\n } else if (templatePart.type === ELEMENT_PART) {\n part = new ElementPart(node as HTMLElement, this, options);\n }\n this._$parts.push(part);\n templatePart = parts[++partIndex];\n }\n if (nodeIndex !== templatePart?.index) {\n node = walker.nextNode()!;\n nodeIndex++;\n }\n }\n // We need to set the currentNode away from the cloned tree so that we\n // don't hold onto the tree even if the tree is detached and should be\n // freed.\n walker.currentNode = d;\n return fragment;\n }\n\n _update(values: Array<unknown>) {\n let i = 0;\n for (const part of this._$parts) {\n if (part !== undefined) {\n debugLogEvent &&\n debugLogEvent({\n kind: 'set part',\n part,\n value: values[i],\n valueIndex: i,\n values,\n templateInstance: this,\n });\n if ((part as AttributePart).strings !== undefined) {\n (part as AttributePart)._$setValue(values, part as AttributePart, i);\n // The number of values the part consumes is part.strings.length - 1\n // since values are in between template spans. We increment i by 1\n // later in the loop, so increment it by part.strings.length - 2 here\n i += (part as AttributePart).strings!.length - 2;\n } else {\n part._$setValue(values[i]);\n }\n }\n i++;\n }\n }\n}\n\n/*\n * Parts\n */\ntype AttributeTemplatePart = {\n readonly type: typeof ATTRIBUTE_PART;\n readonly index: number;\n readonly name: string;\n readonly ctor: typeof AttributePart;\n readonly strings: ReadonlyArray<string>;\n};\ntype ChildTemplatePart = {\n readonly type: typeof CHILD_PART;\n readonly index: number;\n};\ntype ElementTemplatePart = {\n readonly type: typeof ELEMENT_PART;\n readonly index: number;\n};\ntype CommentTemplatePart = {\n readonly type: typeof COMMENT_PART;\n readonly index: number;\n};\n\n/**\n * A TemplatePart represents a dynamic part in a template, before the template\n * is instantiated. When a template is instantiated Parts are created from\n * TemplateParts.\n */\ntype TemplatePart =\n | ChildTemplatePart\n | AttributeTemplatePart\n | ElementTemplatePart\n | CommentTemplatePart;\n\nexport type Part =\n | ChildPart\n | AttributePart\n | PropertyPart\n | BooleanAttributePart\n | ElementPart\n | EventPart;\n\nexport type {ChildPart};\nclass ChildPart implements Disconnectable {\n readonly type = CHILD_PART;\n readonly options: RenderOptions | undefined;\n _$committedValue: unknown = nothing;\n /** @internal */\n __directive?: Directive;\n /** @internal */\n _$startNode: ChildNode;\n /** @internal */\n _$endNode: ChildNode | null;\n private _textSanitizer: ValueSanitizer | undefined;\n /** @internal */\n _$parent: Disconnectable | undefined;\n /**\n * Connection state for RootParts only (i.e. ChildPart without _$parent\n * returned from top-level `render`). This field is unused otherwise. The\n * intention would be clearer if we made `RootPart` a subclass of `ChildPart`\n * with this field (and a different _$isConnected getter), but the subclass\n * caused a perf regression, possibly due to making call sites polymorphic.\n * @internal\n */\n __isConnected: boolean;\n\n // See comment in Disconnectable interface for why this is a getter\n get _$isConnected() {\n // ChildParts that are not at the root should always be created with a\n // parent; only RootChildNode's won't, so they return the local isConnected\n // state\n return this._$parent?._$isConnected ?? this.__isConnected;\n }\n\n // The following fields will be patched onto ChildParts when required by\n // AsyncDirective\n /** @internal */\n _$disconnectableChildren?: Set<Disconnectable> = undefined;\n /** @internal */\n _$notifyConnectionChanged?(\n isConnected: boolean,\n removeFromParent?: boolean,\n from?: number,\n ): void;\n /** @internal */\n _$reparentDisconnectables?(parent: Disconnectable): void;\n\n constructor(\n startNode: ChildNode,\n endNode: ChildNode | null,\n parent: TemplateInstance | ChildPart | undefined,\n options: RenderOptions | undefined,\n ) {\n this._$startNode = startNode;\n this._$endNode = endNode;\n this._$parent = parent;\n this.options = options;\n // Note __isConnected is only ever accessed on RootParts (i.e. when there is\n // no _$parent); the value on a non-root-part is \"don't care\", but checking\n // for parent would be more code\n this.__isConnected = options?.isConnected ?? true;\n if (ENABLE_EXTRA_SECURITY_HOOKS) {\n // Explicitly initialize for consistent class shape.\n this._textSanitizer = undefined;\n }\n }\n\n /**\n * The parent node into which the part renders its content.\n *\n * A ChildPart's content consists of a range of adjacent child nodes of\n * `.parentNode`, possibly bordered by 'marker nodes' (`.startNode` and\n * `.endNode`).\n *\n * - If both `.startNode` and `.endNode` are non-null, then the part's content\n * consists of all siblings between `.startNode` and `.endNode`, exclusively.\n *\n * - If `.startNode` is non-null but `.endNode` is null, then the part's\n * content consists of all siblings following `.startNode`, up to and\n * including the last child of `.parentNode`. If `.endNode` is non-null, then\n * `.startNode` will always be non-null.\n *\n * - If both `.endNode` and `.startNode` are null, then the part's content\n * consists of all child nodes of `.parentNode`.\n */\n get parentNode(): Node {\n let parentNode: Node = wrap(this._$startNode).parentNode!;\n const parent = this._$parent;\n if (\n parent !== undefined &&\n parentNode?.nodeType === 11 /* Node.DOCUMENT_FRAGMENT */\n ) {\n // If the parentNode is a DocumentFragment, it may be because the DOM is\n // still in the cloned fragment during initial render; if so, get the real\n // parentNode the part will be committed into by asking the parent.\n parentNode = (parent as ChildPart | TemplateInstance).parentNode;\n }\n return parentNode;\n }\n\n /**\n * The part's leading marker node, if any. See `.parentNode` for more\n * information.\n */\n get startNode(): Node | null {\n return this._$startNode;\n }\n\n /**\n * The part's trailing marker node, if any. See `.parentNode` for more\n * information.\n */\n get endNode(): Node | null {\n return this._$endNode;\n }\n\n _$setValue(value: unknown, directiveParent: DirectiveParent = this): void {\n if (DEV_MODE && this.parentNode === null) {\n throw new Error(\n `This \\`ChildPart\\` has no \\`parentNode\\` and therefore cannot accept a value. This likely means the element containing the part was manipulated in an unsupported way outside of Lit's control such that the part's marker nodes were ejected from DOM. For example, setting the element's \\`innerHTML\\` or \\`textContent\\` can do this.`,\n );\n }\n value = resolveDirective(this, value, directiveParent);\n if (isPrimitive(value)) {\n // Non-rendering child values. It's important that these do not render\n // empty text nodes to avoid issues with preventing default <slot>\n // fallback content.\n if (value === nothing || value == null || value === '') {\n if (this._$committedValue !== nothing) {\n debugLogEvent &&\n debugLogEvent({\n kind: 'commit nothing to child',\n start: this._$startNode,\n end: this._$endNode,\n parent: this._$parent,\n options: this.options,\n });\n this._$clear();\n }\n this._$committedValue = nothing;\n } else if (value !== this._$committedValue && value !== noChange) {\n this._commitText(value);\n }\n // This property needs to remain unminified.\n } else if ((value as TemplateResult)['_$litType$'] !== undefined) {\n this._commitTemplateResult(value as TemplateResult);\n } else if ((value as Node).nodeType !== undefined) {\n if (DEV_MODE && this.options?.host === value) {\n this._commitText(\n `[probable mistake: rendered a template's host in itself ` +\n `(commonly caused by writing \\${this} in a template]`,\n );\n console.warn(\n `Attempted to render the template host`,\n value,\n `inside itself. This is almost always a mistake, and in dev mode `,\n `we render some warning text. In production however, we'll `,\n `render it, which will usually result in an error, and sometimes `,\n `in the element disappearing from the DOM.`,\n );\n return;\n }\n this._commitNode(value as Node);\n } else if (isIterable(value)) {\n this._commitIterable(value);\n } else {\n // Fallback, will render the string representation\n this._commitText(value);\n }\n }\n\n private _insert<T extends Node>(node: T) {\n return wrap(wrap(this._$startNode).parentNode!).insertBefore(\n node,\n this._$endNode,\n );\n }\n\n private _commitNode(value: Node): void {\n if (this._$committedValue !== value) {\n this._$clear();\n if (\n ENABLE_EXTRA_SECURITY_HOOKS &&\n sanitizerFactoryInternal !== noopSanitizer\n ) {\n const parentNodeName = this._$startNode.parentNode?.nodeName;\n if (parentNodeName === 'STYLE' || parentNodeName === 'SCRIPT') {\n let message = 'Forbidden';\n if (DEV_MODE) {\n if (parentNodeName === 'STYLE') {\n message =\n `Lit does not support binding inside style nodes. ` +\n `This is a security risk, as style injection attacks can ` +\n `exfiltrate data and spoof UIs. ` +\n `Consider instead using css\\`...\\` literals ` +\n `to compose styles, and do dynamic styling with ` +\n `css custom properties, ::parts, <slot>s, ` +\n `and by mutating the DOM rather than stylesheets.`;\n } else {\n message =\n `Lit does not support binding inside script nodes. ` +\n `This is a security risk, as it could allow arbitrary ` +\n `code execution.`;\n }\n }\n throw new Error(message);\n }\n }\n debugLogEvent &&\n debugLogEvent({\n kind: 'commit node',\n start: this._$startNode,\n parent: this._$parent,\n value: value,\n options: this.options,\n });\n this._$committedValue = this._insert(value);\n }\n }\n\n private _commitText(value: unknown): void {\n // If the committed value is a primitive it means we called _commitText on\n // the previous render, and we know that this._$startNode.nextSibling is a\n // Text node. We can now just replace the text content (.data) of the node.\n if (\n this._$committedValue !== nothing &&\n isPrimitive(this._$committedValue)\n ) {\n const node = wrap(this._$startNode).nextSibling as Text;\n if (ENABLE_EXTRA_SECURITY_HOOKS) {\n if (this._textSanitizer === undefined) {\n this._textSanitizer = createSanitizer(node, 'data', 'property');\n }\n value = this._textSanitizer(value);\n }\n debugLogEvent &&\n debugLogEvent({\n kind: 'commit text',\n node,\n value,\n options: this.options,\n });\n (node as Text).data = value as string;\n } else {\n if (ENABLE_EXTRA_SECURITY_HOOKS) {\n const textNode = d.createTextNode('');\n this._commitNode(textNode);\n // When setting text content, for security purposes it matters a lot\n // what the parent is. For example, <style> and <script> need to be\n // handled with care, while <span> does not. So first we need to put a\n // text node into the document, then we can sanitize its content.\n if (this._textSanitizer === undefined) {\n this._textSanitizer = createSanitizer(textNode, 'data', 'property');\n }\n value = this._textSanitizer(value);\n debugLogEvent &&\n debugLogEvent({\n kind: 'commit text',\n node: textNode,\n value,\n options: this.options,\n });\n textNode.data = value as string;\n } else {\n this._commitNode(d.createTextNode(value as string));\n debugLogEvent &&\n debugLogEvent({\n kind: 'commit text',\n node: wrap(this._$startNode).nextSibling as Text,\n value,\n options: this.options,\n });\n }\n }\n this._$committedValue = value;\n }\n\n private _commitTemplateResult(\n result: TemplateResult | CompiledTemplateResult,\n ): void {\n // This property needs to remain unminified.\n const {values, ['_$litType$']: type} = result;\n // If $litType$ is a number, result is a plain TemplateResult and we get\n // the template from the template cache. If not, result is a\n // CompiledTemplateResult and _$litType$ is a CompiledTemplate and we need\n // to create the <template> element the first time we see it.\n const template: Template | CompiledTemplate =\n typeof type === 'number'\n ? this._$getTemplate(result as UncompiledTemplateResult)\n : (type.el === undefined &&\n (type.el = Template.createElement(\n trustFromTemplateString(type.h, type.h[0]),\n this.options,\n )),\n type);\n\n if ((this._$committedValue as TemplateInstance)?._$template === template) {\n debugLogEvent &&\n debugLogEvent({\n kind: 'template updating',\n template,\n instance: this._$committedValue as TemplateInstance,\n parts: (this._$committedValue as TemplateInstance)._$parts,\n options: this.options,\n values,\n });\n (this._$committedValue as TemplateInstance)._update(values);\n } else {\n const instance = new TemplateInstance(template as Template, this);\n const fragment = instance._clone(this.options);\n debugLogEvent &&\n debugLogEvent({\n kind: 'template instantiated',\n template,\n instance,\n parts: instance._$parts,\n options: this.options,\n fragment,\n values,\n });\n instance._update(values);\n debugLogEvent &&\n debugLogEvent({\n kind: 'template instantiated and updated',\n template,\n instance,\n parts: instance._$parts,\n options: this.options,\n fragment,\n values,\n });\n this._commitNode(fragment);\n this._$committedValue = instance;\n }\n }\n\n // Overridden via `litHtmlPolyfillSupport` to provide platform support.\n /** @internal */\n _$getTemplate(result: UncompiledTemplateResult) {\n let template = templateCache.get(result.strings);\n if (template === undefined) {\n templateCache.set(result.strings, (template = new Template(result)));\n }\n return template;\n }\n\n private _commitIterable(value: Iterable<unknown>): void {\n // For an Iterable, we create a new InstancePart per item, then set its\n // value to the item. This is a little bit of overhead for every item in\n // an Iterable, but it lets us recurse easily and efficiently update Arrays\n // of TemplateResults that will be commonly returned from expressions like:\n // array.map((i) => html`${i}`), by reusing existing TemplateInstances.\n\n // If value is an array, then the previous render was of an\n // iterable and value will contain the ChildParts from the previous\n // render. If value is not an array, clear this part and make a new\n // array for ChildParts.\n if (!isArray(this._$committedValue)) {\n this._$committedValue = [];\n this._$clear();\n }\n\n // Lets us keep track of how many items we stamped so we can clear leftover\n // items from a previous render\n const itemParts = this._$committedValue as ChildPart[];\n let partIndex = 0;\n let itemPart: ChildPart | undefined;\n\n for (const item of value) {\n if (partIndex === itemParts.length) {\n // If no existing part, create a new one\n // TODO (justinfagnani): test perf impact of always creating two parts\n // instead of sharing parts between nodes\n // https://github.com/lit/lit/issues/1266\n itemParts.push(\n (itemPart = new ChildPart(\n this._insert(createMarker()),\n this._insert(createMarker()),\n this,\n this.options,\n )),\n );\n } else {\n // Reuse an existing part\n itemPart = itemParts[partIndex];\n }\n itemPart._$setValue(item);\n partIndex++;\n }\n\n if (partIndex < itemParts.length) {\n // itemParts always have end nodes\n this._$clear(\n itemPart && wrap(itemPart._$endNode!).nextSibling,\n partIndex,\n );\n // Truncate the parts array so _value reflects the current state\n itemParts.length = partIndex;\n }\n }\n\n /**\n * Removes the nodes contained within this Part from the DOM.\n *\n * @param start Start node to clear from, for clearing a subset of the part's\n * DOM (used when truncating iterables)\n * @param from When `start` is specified, the index within the iterable from\n * which ChildParts are being removed, used for disconnecting directives in\n * those Parts.\n *\n * @internal\n */\n _$clear(\n start: ChildNode | null = wrap(this._$startNode).nextSibling,\n from?: number,\n ) {\n this._$notifyConnectionChanged?.(false, true, from);\n while (start && start !== this._$endNode) {\n const n = wrap(start!).nextSibling;\n (wrap(start!) as Element).remove();\n start = n;\n }\n }\n /**\n * Implementation of RootPart's `isConnected`. Note that this method\n * should only be called on `RootPart`s (the `ChildPart` returned from a\n * top-level `render()` call). It has no effect on non-root ChildParts.\n * @param isConnected Whether to set\n * @internal\n */\n setConnected(isConnected: boolean) {\n if (this._$parent === undefined) {\n this.__isConnected = isConnected;\n this._$notifyConnectionChanged?.(isConnected);\n } else if (DEV_MODE) {\n throw new Error(\n 'part.setConnected() may only be called on a ' +\n 'RootPart returned from render().',\n );\n }\n }\n}\n\n/**\n * A top-level `ChildPart` returned from `render` that manages the connected\n * state of `AsyncDirective`s created throughout the tree below it.\n */\nexport interface RootPart extends ChildPart {\n /**\n * Sets the connection state for `AsyncDirective`s contained within this root\n * ChildPart.\n *\n * lit-html does not automatically monitor the connectedness of DOM rendered;\n * as such, it is the responsibility of the caller to `render` to ensure that\n * `part.setConnected(false)` is called before the part object is potentially\n * discarded, to ensure that `AsyncDirective`s have a chance to dispose of\n * any resources being held. If a `RootPart` that was previously\n * disconnected is subsequently re-connected (and its `AsyncDirective`s should\n * re-connect), `setConnected(true)` should be called.\n *\n * @param isConnected Whether directives within this tree should be connected\n * or not\n */\n setConnected(isConnected: boolean): void;\n}\n\nexport type {AttributePart};\nclass AttributePart implements Disconnectable {\n readonly type:\n | typeof ATTRIBUTE_PART\n | typeof PROPERTY_PART\n | typeof BOOLEAN_ATTRIBUTE_PART\n | typeof EVENT_PART = ATTRIBUTE_PART;\n readonly element: HTMLElement;\n readonly name: string;\n readonly options: RenderOptions | undefined;\n\n /**\n * If this attribute part represents an interpolation, this contains the\n * static strings of the interpolation. For single-value, complete bindings,\n * this is undefined.\n */\n readonly strings?: ReadonlyArray<string>;\n /** @internal */\n _$committedValue: unknown | Array<unknown> = nothing;\n /** @internal */\n __directives?: Array<Directive | undefined>;\n /** @internal */\n _$parent: Disconnectable;\n /** @internal */\n _$disconnectableChildren?: Set<Disconnectable> = undefined;\n\n protected _sanitizer: ValueSanitizer | undefined;\n\n get tagName() {\n return this.element.tagName;\n }\n\n // See comment in Disconnectable interface for why this is a getter\n get _$isConnected() {\n return this._$parent._$isConnected;\n }\n\n constructor(\n element: HTMLElement,\n name: string,\n strings: ReadonlyArray<string>,\n parent: Disconnectable,\n options: RenderOptions | undefined,\n ) {\n this.element = element;\n this.name = name;\n this._$parent = parent;\n this.options = options;\n if (strings.length > 2 || strings[0] !== '' || strings[1] !== '') {\n this._$committedValue = new Array(strings.length - 1).fill(new String());\n this.strings = strings;\n } else {\n this._$committedValue = nothing;\n }\n if (ENABLE_EXTRA_SECURITY_HOOKS) {\n this._sanitizer = undefined;\n }\n }\n\n /**\n * Sets the value of this part by resolving the value from possibly multiple\n * values and static strings and committing it to the DOM.\n * If this part is single-valued, `this._strings` will be undefined, and the\n * method will be called with a single value argument. If this part is\n * multi-value, `this._strings` will be defined, and the method is called\n * with the value array of the part's owning TemplateInstance, and an offset\n * into the value array from which the values should be read.\n * This method is overloaded this way to eliminate short-lived array slices\n * of the template instance values, and allow a fast-path for single-valued\n * parts.\n *\n * @param value The part value, or an array of values for multi-valued parts\n * @param valueIndex the index to start reading values from. `undefined` for\n * single-valued parts\n * @param noCommit causes the part to not commit its value to the DOM. Used\n * in hydration to prime attribute parts with their first-rendered value,\n * but not set the attribute, and in SSR to no-op the DOM operation and\n * capture the value for serialization.\n *\n * @internal\n */\n _$setValue(\n value: unknown | Array<unknown>,\n directiveParent: DirectiveParent = this,\n valueIndex?: number,\n noCommit?: boolean,\n ) {\n const strings = this.strings;\n\n // Whether any of the values has changed, for dirty-checking\n let change = false;\n\n if (strings === undefined) {\n // Single-value binding case\n value = resolveDirective(this, value, directiveParent, 0);\n change =\n !isPrimitive(value) ||\n (value !== this._$committedValue && value !== noChange);\n if (change) {\n this._$committedValue = value;\n }\n } else {\n // Interpolation case\n const values = value as Array<unknown>;\n value = strings[0];\n\n let i, v;\n for (i = 0; i < strings.length - 1; i++) {\n v = resolveDirective(this, values[valueIndex! + i], directiveParent, i);\n\n if (v === noChange) {\n // If the user-provided value is `noChange`, use the previous value\n v = (this._$committedValue as Array<unknown>)[i];\n }\n change ||=\n !isPrimitive(v) || v !== (this._$committedValue as Array<unknown>)[i];\n if (v === nothing) {\n value = nothing;\n } else if (value !== nothing) {\n value += (v ?? '') + strings[i + 1];\n }\n // We always record each value, even if one is `nothing`, for future\n // change detection.\n (this._$committedValue as Array<unknown>)[i] = v;\n }\n }\n if (change && !noCommit) {\n this._commitValue(value);\n }\n }\n\n /** @internal */\n _commitValue(value: unknown) {\n if (value === nothing) {\n (wrap(this.element) as Element).removeAttribute(this.name);\n } else {\n if (ENABLE_EXTRA_SECURITY_HOOKS) {\n if (this._sanitizer === undefined) {\n this._sanitizer = sanitizerFactoryInternal(\n this.element,\n this.name,\n 'attribute',\n );\n }\n value = this._sanitizer(value ?? '');\n }\n debugLogEvent &&\n debugLogEvent({\n kind: 'commit attribute',\n element: this.element,\n name: this.name,\n value,\n options: this.options,\n });\n (wrap(this.element) as Element).setAttribute(\n this.name,\n (value ?? '') as string,\n );\n }\n }\n}\n\nexport type {PropertyPart};\nclass PropertyPart extends AttributePart {\n override readonly type = PROPERTY_PART;\n\n /** @internal */\n override _commitValue(value: unknown) {\n if (ENABLE_EXTRA_SECURITY_HOOKS) {\n if (this._sanitizer === undefined) {\n this._sanitizer = sanitizerFactoryInternal(\n this.element,\n this.name,\n 'property',\n );\n }\n value = this._sanitizer(value);\n }\n debugLogEvent &&\n debugLogEvent({\n kind: 'commit property',\n element: this.element,\n name: this.name,\n value,\n options: this.options,\n });\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n (this.element as any)[this.name] = value === nothing ? undefined : value;\n }\n}\n\nexport type {BooleanAttributePart};\nclass BooleanAttributePart extends AttributePart {\n override readonly type = BOOLEAN_ATTRIBUTE_PART;\n\n /** @internal */\n override _commitValue(value: unknown) {\n debugLogEvent &&\n debugLogEvent({\n kind: 'commit boolean attribute',\n element: this.element,\n name: this.name,\n value: !!(value && value !== nothing),\n options: this.options,\n });\n (wrap(this.element) as Element).toggleAttribute(\n this.name,\n !!value && value !== nothing,\n );\n }\n}\n\ntype EventListenerWithOptions = EventListenerOrEventListenerObject &\n Partial<AddEventListenerOptions>;\n\n/**\n * An AttributePart that manages an event listener via add/removeEventListener.\n *\n * This part works by adding itself as the event listener on an element, then\n * delegating to the value passed to it. This reduces the number of calls to\n * add/removeEventListener if the listener changes frequently, such as when an\n * inline function is used as a listener.\n *\n * Because event options are passed when adding listeners, we must take case\n * to add and remove the part as a listener when the event options change.\n */\nexport type {EventPart};\nclass EventPart extends AttributePart {\n override readonly type = EVENT_PART;\n\n constructor(\n element: HTMLElement,\n name: string,\n strings: ReadonlyArray<string>,\n parent: Disconnectable,\n options: RenderOptions | undefined,\n ) {\n super(element, name, strings, parent, options);\n\n if (DEV_MODE && this.strings !== undefined) {\n throw new Error(\n `A \\`<${element.localName}>\\` has a \\`@${name}=...\\` listener with ` +\n 'invalid content. Event listeners in templates must have exactly ' +\n 'one expression and no surrounding text.',\n );\n }\n }\n\n // EventPart does not use the base _$setValue/_resolveValue implementation\n // since the dirty checking is more complex\n /** @internal */\n override _$setValue(\n newListener: unknown,\n directiveParent: DirectiveParent = this,\n ) {\n newListener =\n resolveDirective(this, newListener, directiveParent, 0) ?? nothing;\n if (newListener === noChange) {\n return;\n }\n const oldListener = this._$committedValue;\n\n // If the new value is nothing or any options change we have to remove the\n // part as a listener.\n const shouldRemoveListener =\n (newListener === nothing && oldListener !== nothing) ||\n (newListener as EventListenerWithOptions).capture !==\n (oldListener as EventListenerWithOptions).capture ||\n (newListener as EventListenerWithOptions).once !==\n (oldListener as EventListenerWithOptions).once ||\n (newListener as EventListenerWithOptions).passive !==\n (oldListener as EventListenerWithOptions).passive;\n\n // If the new value is not nothing and we removed the listener, we have\n // to add the part as a listener.\n const shouldAddListener =\n newListener !== nothing &&\n (oldListener === nothing || shouldRemoveListener);\n\n debugLogEvent &&\n debugLogEvent({\n kind: 'commit event listener',\n element: this.element,\n name: this.name,\n value: newListener,\n options: this.options,\n removeListener: shouldRemoveListener,\n addListener: shouldAddListener,\n oldListener,\n });\n if (shouldRemoveListener) {\n this.element.removeEventListener(\n this.name,\n this,\n oldListener as EventListenerWithOptions,\n );\n }\n if (shouldAddListener) {\n // Beware: IE11 and Chrome 41 don't like using the listener as the\n // options object. Figure out how to deal w/ this in IE11 - maybe\n // patch addEventListener?\n this.element.addEventListener(\n this.name,\n this,\n newListener as EventListenerWithOptions,\n );\n }\n this._$committedValue = newListener;\n }\n\n handleEvent(event: Event) {\n if (typeof this._$committedValue === 'function') {\n this._$committedValue.call(this.options?.host ?? this.element, event);\n } else {\n (this._$committedValue as EventListenerObject).handleEvent(event);\n }\n }\n}\n\nexport type {ElementPart};\nclass ElementPart implements Disconnectable {\n readonly type = ELEMENT_PART;\n\n /** @internal */\n __directive?: Directive;\n\n // This is to ensure that every Part has a _$committedValue\n _$committedValue: undefined;\n\n /** @internal */\n _$parent!: Disconnectable;\n\n /** @internal */\n _$disconnectableChildren?: Set<Disconnectable> = undefined;\n\n options: RenderOptions | undefined;\n\n constructor(\n public element: Element,\n parent: Disconnectable,\n options: RenderOptions | undefined,\n ) {\n this._$parent = parent;\n this.options = options;\n }\n\n // See comment in Disconnectable interface for why this is a getter\n get _$isConnected() {\n return this._$parent._$isConnected;\n }\n\n _$setValue(value: unknown): void {\n debugLogEvent &&\n debugLogEvent({\n kind: 'commit to element binding',\n element: this.element,\n value,\n options: this.options,\n });\n resolveDirective(this, value);\n }\n}\n\n/**\n * END USERS SHOULD NOT RELY ON THIS OBJECT.\n *\n * Private exports for use by other Lit packages, not intended for use by\n * external users.\n *\n * We currently do not make a mangled rollup build of the lit-ssr code. In order\n * to keep a number of (otherwise private) top-level exports mangled in the\n * client side code, we export a _$LH object containing those members (or\n * helper methods for accessing private fields of those members), and then\n * re-export them for use in lit-ssr. This keeps lit-ssr agnostic to whether the\n * client-side code is being used in `dev` mode or `prod` mode.\n *\n * This has a unique name, to disambiguate it from private exports in\n * lit-element, which re-exports all of lit-html.\n *\n * @private\n */\nexport const _$LH = {\n // Used in lit-ssr\n _boundAttributeSuffix: boundAttributeSuffix,\n _marker: marker,\n _markerMatch: markerMatch,\n _HTML_RESULT: HTML_RESULT,\n _getTemplateHtml: getTemplateHtml,\n // Used in tests and private-ssr-support\n _TemplateInstance: TemplateInstance,\n _isIterable: isIterable,\n _resolveDirective: resolveDirective,\n _ChildPart: ChildPart,\n _AttributePart: AttributePart,\n _BooleanAttributePart: BooleanAttributePart,\n _EventPart: EventPart,\n _PropertyPart: PropertyPart,\n _ElementPart: ElementPart,\n};\n\n// Apply polyfills if available\nconst polyfillSupport = DEV_MODE\n ? global.litHtmlPolyfillSupportDevMode\n : global.litHtmlPolyfillSupport;\npolyfillSupport?.(Template, ChildPart);\n\n// IMPORTANT: do not change the property name or the assignment expression.\n// This line will be used in regexes to search for lit-html usage.\n(global.litHtmlVersions ??= []).push('3.2.0');\nif (DEV_MODE && global.litHtmlVersions.length > 1) {\n issueWarning!(\n 'multiple-versions',\n `Multiple versions of Lit loaded. ` +\n `Loading multiple versions is not recommended.`,\n );\n}\n\n/**\n * Renders a value, usually a lit-html TemplateResult, to the container.\n *\n * This example renders the text \"Hello, Zoe!\" inside a paragraph tag, appending\n * it to the container `document.body`.\n *\n * ```js\n * import {html, render} from 'lit';\n *\n * const name = \"Zoe\";\n * render(html`<p>Hello, ${name}!</p>`, document.body);\n * ```\n *\n * @param value Any [renderable\n * value](https://lit.dev/docs/templates/expressions/#child-expressions),\n * typically a {@linkcode TemplateResult} created by evaluating a template tag\n * like {@linkcode html} or {@linkcode svg}.\n * @param container A DOM container to render to. The first render will append\n * the rendered value to the container, and subsequent renders will\n * efficiently update the rendered value if the same result type was\n * previously rendered there.\n * @param options See {@linkcode RenderOptions} for options documentation.\n * @see\n * {@link https://lit.dev/docs/libraries/standalone-templates/#rendering-lit-html-templates| Rendering Lit HTML Templates}\n */\nexport const render = (\n value: unknown,\n container: HTMLElement | DocumentFragment,\n options?: RenderOptions,\n): RootPart => {\n if (DEV_MODE && container == null) {\n // Give a clearer error message than\n // Uncaught TypeError: Cannot read properties of null (reading\n // '_$litPart$')\n // which reads like an internal Lit error.\n throw new TypeError(`The container to render into may not be ${container}`);\n }\n const renderId = DEV_MODE ? debugLogRenderId++ : 0;\n const partOwnerNode = options?.renderBefore ?? container;\n // This property needs to remain unminified.\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n let part: ChildPart = (partOwnerNode as any)['_$litPart$'];\n debugLogEvent &&\n debugLogEvent({\n kind: 'begin render',\n id: renderId,\n value,\n container,\n options,\n part,\n });\n if (part === undefined) {\n const endNode = options?.renderBefore ?? null;\n // This property needs to remain unminified.\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n (partOwnerNode as any)['_$litPart$'] = part = new ChildPart(\n container.insertBefore(createMarker(), endNode),\n endNode,\n undefined,\n options ?? {},\n );\n }\n part._$setValue(value);\n debugLogEvent &&\n debugLogEvent({\n kind: 'end render',\n id: renderId,\n value,\n container,\n options,\n part,\n });\n return part as RootPart;\n};\n\nif (ENABLE_EXTRA_SECURITY_HOOKS) {\n render.setSanitizer = setSanitizer;\n render.createSanitizer = createSanitizer;\n if (DEV_MODE) {\n render._testOnlyClearSanitizerFactoryDoNotCallOrElse =\n _testOnlyClearSanitizerFactoryDoNotCallOrElse;\n }\n}\n", "/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\n\n/**\n * The main LitElement module, which defines the {@linkcode LitElement} base\n * class and related APIs.\n *\n * LitElement components can define a template and a set of observed\n * properties. Changing an observed property triggers a re-render of the\n * element.\n *\n * Import {@linkcode LitElement} and {@linkcode html} from this module to\n * create a component:\n *\n * ```js\n * import {LitElement, html} from 'lit-element';\n *\n * class MyElement extends LitElement {\n *\n * // Declare observed properties\n * static get properties() {\n * return {\n * adjective: {}\n * }\n * }\n *\n * constructor() {\n * this.adjective = 'awesome';\n * }\n *\n * // Define the element's template\n * render() {\n * return html`<p>your ${adjective} template here</p>`;\n * }\n * }\n *\n * customElements.define('my-element', MyElement);\n * ```\n *\n * `LitElement` extends {@linkcode ReactiveElement} and adds lit-html\n * templating. The `ReactiveElement` class is provided for users that want to\n * build their own custom element base classes that don't use lit-html.\n *\n * @packageDocumentation\n */\nimport {PropertyValues, ReactiveElement} from '@lit/reactive-element';\nimport {render, RenderOptions, noChange, RootPart} from 'lit-html';\nexport * from '@lit/reactive-element';\nexport * from 'lit-html';\n\nimport {LitUnstable} from 'lit-html';\nimport {ReactiveUnstable} from '@lit/reactive-element';\n\n/**\n * Contains types that are part of the unstable debug API.\n *\n * Everything in this API is not stable and may change or be removed in the future,\n * even on patch releases.\n */\n// eslint-disable-next-line @typescript-eslint/no-namespace\nexport namespace Unstable {\n /**\n * When Lit is running in dev mode and `window.emitLitDebugLogEvents` is true,\n * we will emit 'lit-debug' events to window, with live details about the update and render\n * lifecycle. These can be useful for writing debug tooling and visualizations.\n *\n * Please be aware that running with window.emitLitDebugLogEvents has performance overhead,\n * making certain operations that are normally very cheap (like a no-op render) much slower,\n * because we must copy data and dispatch events.\n */\n // eslint-disable-next-line @typescript-eslint/no-namespace\n export namespace DebugLog {\n export type Entry =\n | LitUnstable.DebugLog.Entry\n | ReactiveUnstable.DebugLog.Entry;\n }\n}\n/*\n * When using Closure Compiler, JSCompiler_renameProperty(property, object) is\n * replaced at compile time by the munged name for object[property]. We cannot\n * alias this function, so we have to use a small shim that has the same\n * behavior when not compiling.\n */\n/*@__INLINE__*/\nconst JSCompiler_renameProperty = <P extends PropertyKey>(\n prop: P,\n _obj: unknown\n): P => prop;\n\nconst DEV_MODE = true;\n\nlet issueWarning: (code: string, warning: string) => void;\n\nif (DEV_MODE) {\n // Ensure warnings are issued only 1x, even if multiple versions of Lit\n // are loaded.\n const issuedWarnings: Set<string | undefined> =\n (globalThis.litIssuedWarnings ??= new Set());\n\n // Issue a warning, if we haven't already.\n issueWarning = (code: string, warning: string) => {\n warning += ` See https://lit.dev/msg/${code} for more information.`;\n if (!issuedWarnings.has(warning)) {\n console.warn(warning);\n issuedWarnings.add(warning);\n }\n };\n}\n\n/**\n * Base element class that manages element properties and attributes, and\n * renders a lit-html template.\n *\n * To define a component, subclass `LitElement` and implement a\n * `render` method to provide the component's template. Define properties\n * using the {@linkcode LitElement.properties properties} property or the\n * {@linkcode property} decorator.\n */\nexport class LitElement extends ReactiveElement {\n // This property needs to remain unminified.\n static ['_$litElement$'] = true;\n\n /**\n * @category rendering\n */\n readonly renderOptions: RenderOptions = {host: this};\n\n private __childPart: RootPart | undefined = undefined;\n\n /**\n * @category rendering\n */\n protected override createRenderRoot() {\n const renderRoot = super.createRenderRoot();\n // When adoptedStyleSheets are shimmed, they are inserted into the\n // shadowRoot by createRenderRoot. Adjust the renderBefore node so that\n // any styles in Lit content render before adoptedStyleSheets. This is\n // important so that adoptedStyleSheets have precedence over styles in\n // the shadowRoot.\n this.renderOptions.renderBefore ??= renderRoot!.firstChild as ChildNode;\n return renderRoot;\n }\n\n /**\n * Updates the element. This method reflects property values to attributes\n * and calls `render` to render DOM via lit-html. Setting properties inside\n * this method will *not* trigger another update.\n * @param changedProperties Map of changed properties with old values\n * @category updates\n */\n protected override update(changedProperties: PropertyValues) {\n // Setting properties in `render` should not trigger an update. Since\n // updates are allowed after super.update, it's important to call `render`\n // before that.\n const value = this.render();\n if (!this.hasUpdated) {\n this.renderOptions.isConnected = this.isConnected;\n }\n super.update(changedProperties);\n this.__childPart = render(value, this.renderRoot, this.renderOptions);\n }\n\n /**\n * Invoked when the component is added to the document's DOM.\n *\n * In `connectedCallback()` you should setup tasks that should only occur when\n * the element is connected to the document. The most common of these is\n * adding event listeners to nodes external to the element, like a keydown\n * event handler added to the window.\n *\n * ```ts\n * connectedCallback() {\n * super.connectedCallback();\n * addEventListener('keydown', this._handleKeydown);\n * }\n * ```\n *\n * Typically, anything done in `connectedCallback()` should be undone when the\n * element is disconnected, in `disconnectedCallback()`.\n *\n * @category lifecycle\n */\n override connectedCallback() {\n super.connectedCallback();\n this.__childPart?.setConnected(true);\n }\n\n /**\n * Invoked when the component is removed from the document's DOM.\n *\n * This callback is the main signal to the element that it may no longer be\n * used. `disconnectedCallback()` should ensure that nothing is holding a\n * reference to the element (such as event listeners added to nodes external\n * to the element), so that it is free to be garbage collected.\n *\n * ```ts\n * disconnectedCallback() {\n * super.disconnectedCallback();\n * window.removeEventListener('keydown', this._handleKeydown);\n * }\n * ```\n *\n * An element may be re-connected after being disconnected.\n *\n * @category lifecycle\n */\n override disconnectedCallback() {\n super.disconnectedCallback();\n this.__childPart?.setConnected(false);\n }\n\n /**\n * Invoked on each update to perform rendering tasks. This method may return\n * any value renderable by lit-html's `ChildPart` - typically a\n * `TemplateResult`. Setting properties inside this method will *not* trigger\n * the element to update.\n * @category rendering\n */\n protected render(): unknown {\n return noChange;\n }\n}\n\n/**\n * Ensure this class is marked as `finalized` as an optimization ensuring\n * it will not needlessly try to `finalize`.\n *\n * Note this property name is a string to prevent breaking Closure JS Compiler\n * optimizations. See @lit/reactive-element for more information.\n */\n(LitElement as unknown as Record<string, unknown>)[\n JSCompiler_renameProperty('finalized', LitElement)\n] = true;\n\n// Install hydration if available\nglobalThis.litElementHydrateSupport?.({LitElement});\n\n// Apply polyfills if available\nconst polyfillSupport = DEV_MODE\n ? globalThis.litElementPolyfillSupportDevMode\n : globalThis.litElementPolyfillSupport;\npolyfillSupport?.({LitElement});\n\n/**\n * END USERS SHOULD NOT RELY ON THIS OBJECT.\n *\n * Private exports for use by other Lit packages, not intended for use by\n * external users.\n *\n * We currently do not make a mangled rollup build of the lit-ssr code. In order\n * to keep a number of (otherwise private) top-level exports mangled in the\n * client side code, we export a _$LE object containing those members (or\n * helper methods for accessing private fields of those members), and then\n * re-export them for use in lit-ssr. This keeps lit-ssr agnostic to whether the\n * client-side code is being used in `dev` mode or `prod` mode.\n *\n * This has a unique name, to disambiguate it from private exports in\n * lit-html, since this module re-exports all of lit-html.\n *\n * @private\n */\nexport const _$LE = {\n _$attributeToProperty: (\n el: LitElement,\n name: string,\n value: string | null\n ) => {\n // eslint-disable-next-line\n (el as any)._$attributeToProperty(name, value);\n },\n // eslint-disable-next-line\n _$changedProperties: (el: LitElement) => (el as any)._$changedProperties,\n};\n\n// IMPORTANT: do not change the property name or the assignment expression.\n// This line will be used in regexes to search for LitElement usage.\n(globalThis.litElementVersions ??= []).push('4.1.0');\nif (DEV_MODE && globalThis.litElementVersions.length > 1) {\n issueWarning!(\n 'multiple-versions',\n `Multiple versions of Lit loaded. Loading multiple versions ` +\n `is not recommended.`\n );\n}\n", "/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\n\n/*\n * IMPORTANT: For compatibility with tsickle and the Closure JS compiler, all\n * property decorators (but not class decorators) in this file that have\n * an @ExportDecoratedItems annotation must be defined as a regular function,\n * not an arrow function.\n */\n\nimport {\n type PropertyDeclaration,\n type ReactiveElement,\n defaultConverter,\n notEqual,\n} from '../reactive-element.js';\nimport type {Interface} from './base.js';\n\nconst DEV_MODE = true;\n\nlet issueWarning: (code: string, warning: string) => void;\n\nif (DEV_MODE) {\n // Ensure warnings are issued only 1x, even if multiple versions of Lit\n // are loaded.\n const issuedWarnings: Set<string | undefined> =\n (globalThis.litIssuedWarnings ??= new Set());\n\n // Issue a warning, if we haven't already.\n issueWarning = (code: string, warning: string) => {\n warning += ` See https://lit.dev/msg/${code} for more information.`;\n if (!issuedWarnings.has(warning)) {\n console.warn(warning);\n issuedWarnings.add(warning);\n }\n };\n}\n\n// Overloads for property decorator so that TypeScript can infer the correct\n// return type when a decorator is used as an accessor decorator or a setter\n// decorator.\nexport type PropertyDecorator = {\n // accessor decorator signature\n <C extends Interface<ReactiveElement>, V>(\n target: ClassAccessorDecoratorTarget<C, V>,\n context: ClassAccessorDecoratorContext<C, V>\n ): ClassAccessorDecoratorResult<C, V>;\n\n // setter decorator signature\n <C extends Interface<ReactiveElement>, V>(\n target: (value: V) => void,\n context: ClassSetterDecoratorContext<C, V>\n ): (this: C, value: V) => void;\n\n // legacy decorator signature\n (\n protoOrDescriptor: Object,\n name: PropertyKey,\n descriptor?: PropertyDescriptor\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ): any;\n};\n\nconst legacyProperty = (\n options: PropertyDeclaration | undefined,\n proto: Object,\n name: PropertyKey\n) => {\n const hasOwnProperty = proto.hasOwnProperty(name);\n (proto.constructor as typeof ReactiveElement).createProperty(\n name,\n hasOwnProperty ? {...options, wrapped: true} : options\n );\n // For accessors (which have a descriptor on the prototype) we need to\n // return a descriptor, otherwise TypeScript overwrites the descriptor we\n // define in createProperty() with the original descriptor. We don't do this\n // for fields, which don't have a descriptor, because this could overwrite\n // descriptor defined by other decorators.\n return hasOwnProperty\n ? Object.getOwnPropertyDescriptor(proto, name)\n : undefined;\n};\n\n// This is duplicated from a similar variable in reactive-element.ts, but\n// actually makes sense to have this default defined with the decorator, so\n// that different decorators could have different defaults.\nconst defaultPropertyDeclaration: PropertyDeclaration = {\n attribute: true,\n type: String,\n converter: defaultConverter,\n reflect: false,\n hasChanged: notEqual,\n};\n\n// Temporary type, until google3 is on TypeScript 5.2\ntype StandardPropertyContext<C, V> = (\n | ClassAccessorDecoratorContext<C, V>\n | ClassSetterDecoratorContext<C, V>\n) & {metadata: object};\n\n/**\n * Wraps a class accessor or setter so that `requestUpdate()` is called with the\n * property name and old value when the accessor is set.\n */\nexport const standardProperty = <C extends Interface<ReactiveElement>, V>(\n options: PropertyDeclaration = defaultPropertyDeclaration,\n target: ClassAccessorDecoratorTarget<C, V> | ((value: V) => void),\n context: StandardPropertyContext<C, V>\n): ClassAccessorDecoratorResult<C, V> | ((this: C, value: V) => void) => {\n const {kind, metadata} = context;\n\n if (DEV_MODE && metadata == null) {\n issueWarning(\n 'missing-class-metadata',\n `The class ${target} is missing decorator metadata. This ` +\n `could mean that you're using a compiler that supports decorators ` +\n `but doesn't support decorator metadata, such as TypeScript 5.1. ` +\n `Please update your compiler.`\n );\n }\n\n // Store the property options\n let properties = globalThis.litPropertyMetadata.get(metadata);\n if (properties === undefined) {\n globalThis.litPropertyMetadata.set(metadata, (properties = new Map()));\n }\n properties.set(context.name, options);\n\n if (kind === 'accessor') {\n // Standard decorators cannot dynamically modify the class, so we can't\n // replace a field with accessors. The user must use the new `accessor`\n // keyword instead.\n const {name} = context;\n return {\n set(this: ReactiveElement, v: V) {\n const oldValue = (\n target as ClassAccessorDecoratorTarget<C, V>\n ).get.call(this as unknown as C);\n (target as ClassAccessorDecoratorTarget<C, V>).set.call(\n this as unknown as C,\n v\n );\n this.requestUpdate(name, oldValue, options);\n },\n init(this: ReactiveElement, v: V): V {\n if (v !== undefined) {\n this._$changeProperty(name, undefined, options);\n }\n return v;\n },\n } as unknown as ClassAccessorDecoratorResult<C, V>;\n } else if (kind === 'setter') {\n const {name} = context;\n return function (this: ReactiveElement, value: V) {\n const oldValue = this[name as keyof ReactiveElement];\n (target as (value: V) => void).call(this, value);\n this.requestUpdate(name, oldValue, options);\n } as unknown as (this: C, value: V) => void;\n }\n throw new Error(`Unsupported decorator location: ${kind}`);\n};\n\n/**\n * A class field or accessor decorator which creates a reactive property that\n * reflects a corresponding attribute value. When a decorated property is set\n * the element will update and render. A {@linkcode PropertyDeclaration} may\n * optionally be supplied to configure property features.\n *\n * This decorator should only be used for public fields. As public fields,\n * properties should be considered as primarily settable by element users,\n * either via attribute or the property itself.\n *\n * Generally, properties that are changed by the element should be private or\n * protected fields and should use the {@linkcode state} decorator.\n *\n * However, sometimes element code does need to set a public property. This\n * should typically only be done in response to user interaction, and an event\n * should be fired informing the user; for example, a checkbox sets its\n * `checked` property when clicked and fires a `changed` event. Mutating public\n * properties should typically not be done for non-primitive (object or array)\n * properties. In other cases when an element needs to manage state, a private\n * property decorated via the {@linkcode state} decorator should be used. When\n * needed, state properties can be initialized via public properties to\n * facilitate complex interactions.\n *\n * ```ts\n * class MyElement {\n * @property({ type: Boolean })\n * clicked = false;\n * }\n * ```\n * @category Decorator\n * @ExportDecoratedItems\n */\nexport function property(options?: PropertyDeclaration): PropertyDecorator {\n return <C extends Interface<ReactiveElement>, V>(\n protoOrTarget:\n | object\n | ClassAccessorDecoratorTarget<C, V>\n | ((value: V) => void),\n nameOrContext:\n | PropertyKey\n | ClassAccessorDecoratorContext<C, V>\n | ClassSetterDecoratorContext<C, V>\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ): any => {\n return (\n typeof nameOrContext === 'object'\n ? standardProperty<C, V>(\n options,\n protoOrTarget as\n | ClassAccessorDecoratorTarget<C, V>\n | ((value: V) => void),\n nameOrContext as StandardPropertyContext<C, V>\n )\n : legacyProperty(\n options,\n protoOrTarget as Object,\n nameOrContext as PropertyKey\n )\n ) as PropertyDecorator;\n };\n}\n", "/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\n\n/*\n * IMPORTANT: For compatibility with tsickle and the Closure JS compiler, all\n * property decorators (but not class decorators) in this file that have\n * an @ExportDecoratedItems annotation must be defined as a regular function,\n * not an arrow function.\n */\n\nimport {property} from './property.js';\n\nexport interface StateDeclaration<Type = unknown> {\n /**\n * A function that indicates if a property should be considered changed when\n * it is set. The function should take the `newValue` and `oldValue` and\n * return `true` if an update should be requested.\n */\n hasChanged?(value: Type, oldValue: Type): boolean;\n}\n\n/**\n * @deprecated use StateDeclaration\n */\nexport type InternalPropertyDeclaration<Type = unknown> =\n StateDeclaration<Type>;\n\n/**\n * Declares a private or protected reactive property that still triggers\n * updates to the element when it changes. It does not reflect from the\n * corresponding attribute.\n *\n * Properties declared this way must not be used from HTML or HTML templating\n * systems, they're solely for properties internal to the element. These\n * properties may be renamed by optimization tools like closure compiler.\n * @category Decorator\n */\nexport function state(options?: StateDeclaration) {\n return property({\n ...options,\n // Add both `state` and `attribute` because we found a third party\n // controller that is keying off of PropertyOptions.state to determine\n // whether a field is a private internal property or not.\n state: true,\n attribute: false,\n });\n}\n", "/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\n\n/**\n * Generates a public interface type that removes private and protected fields.\n * This allows accepting otherwise incompatible versions of the type (e.g. from\n * multiple copies of the same package in `node_modules`).\n */\nexport type Interface<T> = {\n [K in keyof T]: T[K];\n};\n\nexport type Constructor<T> = {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n new (...args: any[]): T;\n};\n\n/**\n * Wraps up a few best practices when returning a property descriptor from a\n * decorator.\n *\n * Marks the defined property as configurable, and enumerable, and handles\n * the case where we have a busted Reflect.decorate zombiefill (e.g. in Angular\n * apps).\n *\n * @internal\n */\nexport const desc = (\n obj: object,\n name: PropertyKey | ClassAccessorDecoratorContext<unknown, unknown>,\n descriptor: PropertyDescriptor\n) => {\n // For backwards compatibility, we keep them configurable and enumerable.\n descriptor.configurable = true;\n descriptor.enumerable = true;\n if (\n // We check for Reflect.decorate each time, in case the zombiefill\n // is applied via lazy loading some Angular code.\n (Reflect as typeof Reflect & {decorate?: unknown}).decorate &&\n typeof name !== 'object'\n ) {\n // If we're called as a legacy decorator, and Reflect.decorate is present\n // then we have no guarantees that the returned descriptor will be\n // defined on the class, so we must apply it directly ourselves.\n\n Object.defineProperty(obj, name, descriptor);\n }\n return descriptor;\n};\n", "/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\n\n/*\n * IMPORTANT: For compatibility with tsickle and the Closure JS compiler, all\n * property decorators (but not class decorators) in this file that have\n * an @ExportDecoratedItems annotation must be defined as a regular function,\n * not an arrow function.\n */\nimport type {ReactiveElement} from '../reactive-element.js';\nimport {desc, type Interface} from './base.js';\n\nconst DEV_MODE = true;\n\nlet issueWarning: (code: string, warning: string) => void;\n\nif (DEV_MODE) {\n // Ensure warnings are issued only 1x, even if multiple versions of Lit\n // are loaded.\n const issuedWarnings: Set<string | undefined> =\n (globalThis.litIssuedWarnings ??= new Set());\n\n // Issue a warning, if we haven't already.\n issueWarning = (code: string, warning: string) => {\n warning += code\n ? ` See https://lit.dev/msg/${code} for more information.`\n : '';\n if (!issuedWarnings.has(warning)) {\n console.warn(warning);\n issuedWarnings.add(warning);\n }\n };\n}\n\nexport type QueryDecorator = {\n // legacy\n (\n proto: Interface<ReactiveElement>,\n name: PropertyKey,\n descriptor?: PropertyDescriptor\n // Note TypeScript requires the return type to be `void|any`\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ): void | any;\n\n // standard\n <C extends Interface<ReactiveElement>, V extends Element | null>(\n value: ClassAccessorDecoratorTarget<C, V>,\n context: ClassAccessorDecoratorContext<C, V>\n ): ClassAccessorDecoratorResult<C, V>;\n};\n\n/**\n * A property decorator that converts a class property into a getter that\n * executes a querySelector on the element's renderRoot.\n *\n * @param selector A DOMString containing one or more selectors to match.\n * @param cache An optional boolean which when true performs the DOM query only\n * once and caches the result.\n *\n * See: https://developer.mozilla.org/en-US/docs/Web/API/Document/querySelector\n *\n * ```ts\n * class MyElement {\n * @query('#first')\n * first: HTMLDivElement;\n *\n * render() {\n * return html`\n * <div id=\"first\"></div>\n * <div id=\"second\"></div>\n * `;\n * }\n * }\n * ```\n * @category Decorator\n */\nexport function query(selector: string, cache?: boolean): QueryDecorator {\n return (<C extends Interface<ReactiveElement>, V extends Element | null>(\n protoOrTarget: ClassAccessorDecoratorTarget<C, V>,\n nameOrContext: PropertyKey | ClassAccessorDecoratorContext<C, V>,\n descriptor?: PropertyDescriptor\n ) => {\n const doQuery = (el: Interface<ReactiveElement>): V => {\n const result = (el.renderRoot?.querySelector(selector) ?? null) as V;\n if (DEV_MODE && result === null && cache && !el.hasUpdated) {\n const name =\n typeof nameOrContext === 'object'\n ? nameOrContext.name\n : nameOrContext;\n issueWarning(\n '',\n `@query'd field ${JSON.stringify(String(name))} with the 'cache' ` +\n `flag set for selector '${selector}' has been accessed before ` +\n `the first update and returned null. This is expected if the ` +\n `renderRoot tree has not been provided beforehand (e.g. via ` +\n `Declarative Shadow DOM). Therefore the value hasn't been cached.`\n );\n }\n // TODO: if we want to allow users to assert that the query will never\n // return null, we need a new option and to throw here if the result\n // is null.\n return result;\n };\n if (cache) {\n // Accessors to wrap from either:\n // 1. The decorator target, in the case of standard decorators\n // 2. The property descriptor, in the case of experimental decorators\n // on auto-accessors.\n // 3. Functions that access our own cache-key property on the instance,\n // in the case of experimental decorators on fields.\n const {get, set} =\n typeof nameOrContext === 'object'\n ? protoOrTarget\n : descriptor ??\n (() => {\n const key = DEV_MODE\n ? Symbol(`${String(nameOrContext)} (@query() cache)`)\n : Symbol();\n type WithCache = ReactiveElement & {\n [key: symbol]: Element | null;\n };\n return {\n get() {\n return (this as WithCache)[key];\n },\n set(v) {\n (this as WithCache)[key] = v;\n },\n };\n })();\n return desc(protoOrTarget, nameOrContext, {\n get(this: ReactiveElement): V {\n let result: V = get!.call(this);\n if (result === undefined) {\n result = doQuery(this);\n if (result !== null || this.hasUpdated) {\n set!.call(this, result);\n }\n }\n return result;\n },\n });\n } else {\n // This object works as the return type for both standard and\n // experimental decorators.\n return desc(protoOrTarget, nameOrContext, {\n get(this: ReactiveElement) {\n return doQuery(this);\n },\n });\n }\n }) as QueryDecorator;\n}\n", "/**\n * @license\n * Copyright 2021 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\n\n/*\n * IMPORTANT: For compatibility with tsickle and the Closure JS compiler, all\n * property decorators (but not class decorators) in this file that have\n * an @ExportDecoratedItems annotation must be defined as a regular function,\n * not an arrow function.\n */\n\nimport type {ReactiveElement} from '../reactive-element.js';\nimport type {QueryAssignedNodesOptions} from './query-assigned-nodes.js';\nimport {desc, type Interface} from './base.js';\n\nexport type QueryAssignedElementsDecorator = {\n // legacy\n (\n proto: Interface<ReactiveElement>,\n name: PropertyKey,\n descriptor?: PropertyDescriptor\n // Note TypeScript requires the return type to be `void|any`\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ): void | any;\n\n // standard\n <C extends Interface<ReactiveElement>, V extends Array<Element>>(\n value: ClassAccessorDecoratorTarget<C, V>,\n context: ClassAccessorDecoratorContext<C, V>\n ): ClassAccessorDecoratorResult<C, V>;\n};\n\n/**\n * Options for the {@linkcode queryAssignedElements} decorator. Extends the\n * options that can be passed into\n * [HTMLSlotElement.assignedElements](https://developer.mozilla.org/en-US/docs/Web/API/HTMLSlotElement/assignedElements).\n */\nexport interface QueryAssignedElementsOptions\n extends QueryAssignedNodesOptions {\n /**\n * CSS selector used to filter the elements returned. For example, a selector\n * of `\".item\"` will only include elements with the `item` class.\n */\n selector?: string;\n}\n\n/**\n * A property decorator that converts a class property into a getter that\n * returns the `assignedElements` of the given `slot`. Provides a declarative\n * way to use\n * [`HTMLSlotElement.assignedElements`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLSlotElement/assignedElements).\n *\n * Can be passed an optional {@linkcode QueryAssignedElementsOptions} object.\n *\n * Example usage:\n * ```ts\n * class MyElement {\n * @queryAssignedElements({ slot: 'list' })\n * listItems!: Array<HTMLElement>;\n * @queryAssignedElements()\n * unnamedSlotEls!: Array<HTMLElement>;\n *\n * render() {\n * return html`\n * <slot name=\"list\"></slot>\n * <slot></slot>\n * `;\n * }\n * }\n * ```\n *\n * Note, the type of this property should be annotated as `Array<HTMLElement>`.\n *\n * @category Decorator\n */\nexport function queryAssignedElements(\n options?: QueryAssignedElementsOptions\n): QueryAssignedElementsDecorator {\n return (<V extends Array<Element>>(\n obj: object,\n name: PropertyKey | ClassAccessorDecoratorContext<unknown, unknown>\n ) => {\n const {slot, selector} = options ?? {};\n const slotSelector = `slot${slot ? `[name=${slot}]` : ':not([name])'}`;\n return desc(obj, name, {\n get(this: ReactiveElement): V {\n const slotEl =\n this.renderRoot?.querySelector<HTMLSlotElement>(slotSelector);\n const elements = slotEl?.assignedElements(options) ?? [];\n return (\n selector === undefined\n ? elements\n : elements.filter((node) => node.matches(selector))\n ) as V;\n },\n });\n }) as QueryAssignedElementsDecorator;\n}\n", "/**\n * @license\n * Copyright 2018 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\n\nimport {nothing} from '../lit-html.js';\n\n/**\n * For AttributeParts, sets the attribute if the value is defined and removes\n * the attribute if the value is undefined.\n *\n * For other part types, this directive is a no-op.\n */\nexport const ifDefined = <T>(value: T) => value ?? nothing;\n", "import { css } from 'lit';\n\nexport default css`\n :host {\n box-sizing: border-box;\n }\n\n :host *,\n :host *::before,\n :host *::after {\n box-sizing: inherit;\n }\n`;\n", "import { CSSResult, LitElement } from 'lit';\nimport styles from './component.styles';\n\n/**\n * Core Component class to ultimately be inherited by all Web Components within\n * this package.\n *\n * LitElement defines class and style automatically to allow passing in styling\n * overrides. We are keeping those to allow for further customization.\n *\n * @public\n */\nclass Component extends LitElement {\n /**\n * Register `this` extended `Component` Class as a custom element within the\n * DOM's custom elements registry.\n *\n * @remarks\n * This method must be called in order for this component to be consumable\n * within the DOM.\n *\n * @example\n * ```ts\n * import CustomComponent from './custom-component';\n *\n * // Standard registration.\n * CustomComponent.register();\n *\n * // Custom registration.\n * CustomComponent.register({\n * name: 'custom-component',\n * prefix: 'prefix',\n * });\n *\n * export default CustomComponent;\n * ```\n *\n *\n * @returns - Void.\n */\n public static register(namespace: string): void {\n if (customElements.get(namespace)) {\n return;\n }\n\n customElements.define(namespace, this as any);\n }\n\n /**\n * Styles associated with the Base Component.\n */\n public static override styles: Array<CSSResult> = [styles];\n}\n\nexport default Component;\n", "import Component from './component.component';\n\nexport type {\n RegisterOptions as ComponentRegisterOptions,\n} from './component.types';\n\nexport default Component;\n", "/**\n * @license\n * Copyright 2021 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\n\nimport {ContextType, Context} from './create-context.js';\n\ndeclare global {\n interface HTMLElementEventMap {\n /**\n * A 'context-request' event can be emitted by any element which desires\n * a context value to be injected by an external provider.\n */\n 'context-request': ContextRequestEvent<Context<unknown, unknown>>;\n }\n}\n\n/**\n * A callback which is provided by a context requester and is called with the value satisfying the request.\n * This callback can be called multiple times by context providers as the requested value is changed.\n */\nexport type ContextCallback<ValueType> = (\n value: ValueType,\n unsubscribe?: () => void\n) => void;\n\n/**\n * Interface definition for a ContextRequest\n */\nexport interface ContextRequest<C extends Context<unknown, unknown>> {\n readonly context: C;\n readonly callback: ContextCallback<ContextType<C>>;\n readonly subscribe?: boolean;\n}\n\n/**\n * An event fired by a context requester to signal it desires a specified context with the given key.\n *\n * A provider should inspect the `context` property of the event to determine if it has a value that can\n * satisfy the request, calling the `callback` with the requested value if so.\n *\n * If the requested context event contains a truthy `subscribe` value, then a provider can call the callback\n * multiple times if the value is changed, if this is the case the provider should pass an `unsubscribe`\n * method to the callback which consumers can invoke to indicate they no longer wish to receive these updates.\n *\n * If no `subscribe` value is present in the event, then the provider can assume that this is a 'one time'\n * request for the context and can therefore not track the consumer.\n */\nexport class ContextRequestEvent<C extends Context<unknown, unknown>>\n extends Event\n implements ContextRequest<C>\n{\n readonly context: C;\n readonly callback: ContextCallback<ContextType<C>>;\n readonly subscribe?: boolean;\n\n /**\n *\n * @param context the context key to request\n * @param callback the callback that should be invoked when the context with the specified key is available\n * @param subscribe when, true indicates we want to subscribe to future updates\n */\n constructor(\n context: C,\n callback: ContextCallback<ContextType<C>>,\n subscribe?: boolean\n ) {\n super('context-request', {bubbles: true, composed: true});\n this.context = context;\n this.callback = callback;\n this.subscribe = subscribe ?? false;\n }\n}\n", "/**\n * @license\n * Copyright 2021 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\n\nimport {\n ContextCallback,\n ContextRequestEvent,\n} from '../context-request-event.js';\nimport type {Context, ContextType} from '../create-context.js';\nimport type {\n ReactiveController,\n ReactiveControllerHost,\n} from '@lit/reactive-element';\n\nexport interface Options<C extends Context<unknown, unknown>> {\n context: C;\n callback?: (value: ContextType<C>, dispose?: () => void) => void;\n subscribe?: boolean;\n}\n\n/**\n * A ReactiveController which adds context consuming behavior to a custom\n * element by dispatching `context-request` events.\n *\n * When the host element is connected to the document it will emit a\n * `context-request` event with its context key. When the context request\n * is satisfied the controller will invoke the callback, if present, and\n * trigger a host update so it can respond to the new value.\n *\n * It will also call the dispose method given by the provider when the\n * host element is disconnected.\n */\nexport class ContextConsumer<\n C extends Context<unknown, unknown>,\n HostElement extends ReactiveControllerHost & HTMLElement,\n> implements ReactiveController\n{\n protected host: HostElement;\n private context: C;\n private callback?: (value: ContextType<C>, dispose?: () => void) => void;\n private subscribe = false;\n\n private provided = false;\n\n value?: ContextType<C> = undefined;\n\n constructor(host: HostElement, options: Options<C>);\n /** @deprecated Use new ContextConsumer(host, options) */\n constructor(\n host: HostElement,\n context: C,\n callback?: (value: ContextType<C>, dispose?: () => void) => void,\n subscribe?: boolean\n );\n constructor(\n host: HostElement,\n contextOrOptions: C | Options<C>,\n callback?: (value: ContextType<C>, dispose?: () => void) => void,\n subscribe?: boolean\n ) {\n this.host = host;\n // This is a potentially fragile duck-type. It means a context object can't\n // have a property name context and be used in positional argument form.\n if ((contextOrOptions as Options<C>).context !== undefined) {\n const options = contextOrOptions as Options<C>;\n this.context = options.context;\n this.callback = options.callback;\n this.subscribe = options.subscribe ?? false;\n } else {\n this.context = contextOrOptions as C;\n this.callback = callback;\n this.subscribe = subscribe ?? false;\n }\n this.host.addController(this);\n }\n\n private unsubscribe?: () => void;\n\n hostConnected(): void {\n this.dispatchRequest();\n }\n\n hostDisconnected(): void {\n if (this.unsubscribe) {\n this.unsubscribe();\n this.unsubscribe = undefined;\n }\n }\n\n private dispatchRequest() {\n this.host.dispatchEvent(\n new ContextRequestEvent(this.context, this._callback, this.subscribe)\n );\n }\n\n // This function must have stable identity to properly dedupe in ContextRoot\n // if this element connects multiple times.\n private _callback: ContextCallback<ContextType<C>> = (value, unsubscribe) => {\n // some providers will pass an unsubscribe function indicating they may provide future values\n if (this.unsubscribe) {\n // if the unsubscribe function changes this implies we have changed provider\n if (this.unsubscribe !== unsubscribe) {\n // cleanup the old provider\n this.provided = false;\n this.unsubscribe();\n }\n // if we don't support subscription, immediately unsubscribe\n if (!this.subscribe) {\n this.unsubscribe();\n }\n }\n\n // store the value so that it can be retrieved from the controller\n this.value = value;\n // schedule an update in case this value is used in a template\n this.host.requestUpdate();\n\n // only invoke callback if we are either expecting updates or have not yet\n // been provided a value\n if (!this.provided || this.subscribe) {\n this.provided = true;\n if (this.callback) {\n this.callback(value, unsubscribe);\n }\n }\n\n this.unsubscribe = unsubscribe;\n };\n}\n", "/**\n * @license\n * Copyright 2021 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\n\nimport {ContextCallback} from './context-request-event.js';\n\n/**\n * A disposer function\n */\ntype Disposer = () => void;\n\ninterface CallbackInfo {\n disposer: Disposer;\n consumerHost: Element;\n}\n\n/**\n * A simple class which stores a value, and triggers registered callbacks when\n * the value is changed via its setter.\n *\n * An implementor might use other observable patterns such as MobX or Redux to\n * get behavior like this. But this is a pretty minimal approach that will\n * likely work for a number of use cases.\n */\nexport class ValueNotifier<T> {\n protected readonly subscriptions = new Map<\n ContextCallback<T>,\n CallbackInfo\n >();\n private _value!: T;\n get value(): T {\n return this._value;\n }\n set value(v: T) {\n this.setValue(v);\n }\n\n setValue(v: T, force = false) {\n const update = force || !Object.is(v, this._value);\n this._value = v;\n if (update) {\n this.updateObservers();\n }\n }\n\n constructor(defaultValue?: T) {\n if (defaultValue !== undefined) {\n this.value = defaultValue;\n }\n }\n\n updateObservers = (): void => {\n for (const [callback, {disposer}] of this.subscriptions) {\n callback(this._value, disposer);\n }\n };\n\n addCallback(\n callback: ContextCallback<T>,\n consumerHost: Element,\n subscribe?: boolean\n ): void {\n if (!subscribe) {\n // just call the callback once and we're done\n callback(this.value);\n return;\n }\n if (!this.subscriptions.has(callback)) {\n this.subscriptions.set(callback, {\n disposer: () => {\n this.subscriptions.delete(callback);\n },\n consumerHost,\n });\n }\n const {disposer} = this.subscriptions.get(callback)!;\n callback(this.value, disposer);\n }\n\n clearCallbacks(): void {\n this.subscriptions.clear();\n }\n}\n", "/**\n * @license\n * Copyright 2021 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\n\nimport {ContextRequestEvent} from '../context-request-event.js';\nimport {ValueNotifier} from '../value-notifier.js';\nimport type {Context, ContextType} from '../create-context.js';\nimport type {\n ReactiveController,\n ReactiveControllerHost,\n} from '@lit/reactive-element';\n\ndeclare global {\n interface HTMLElementEventMap {\n /**\n * A 'context-provider' event can be emitted by any element which hosts\n * a context provider to indicate it is available for use.\n */\n 'context-provider': ContextProviderEvent<Context<unknown, unknown>>;\n }\n}\n\nexport class ContextProviderEvent<\n C extends Context<unknown, unknown>,\n> extends Event {\n readonly context: C;\n\n /**\n *\n * @param context the context which this provider can provide\n */\n constructor(context: C) {\n super('context-provider', {bubbles: true, composed: true});\n this.context = context;\n }\n}\n\nexport interface Options<C extends Context<unknown, unknown>> {\n context: C;\n initialValue?: ContextType<C>;\n}\n\ntype ReactiveElementHost = Partial<ReactiveControllerHost> & HTMLElement;\n\n/**\n * A ReactiveController which adds context provider behavior to a\n * custom element.\n *\n * This controller simply listens to the `context-request` event when\n * the host is connected to the DOM and registers the received callbacks\n * against its observable Context implementation.\n *\n * The controller may also be attached to any HTML element in which case it's\n * up to the user to call hostConnected() when attached to the DOM. This is\n * done automatically for any custom elements implementing\n * ReactiveControllerHost.\n */\nexport class ContextProvider<\n T extends Context<unknown, unknown>,\n HostElement extends ReactiveElementHost = ReactiveElementHost,\n >\n extends ValueNotifier<ContextType<T>>\n implements ReactiveController\n{\n protected readonly host: HostElement;\n private readonly context: T;\n\n constructor(host: HostElement, options: Options<T>);\n /** @deprecated Use new ContextProvider(host, options) */\n constructor(host: HostElement, context: T, initialValue?: ContextType<T>);\n constructor(\n host: HostElement,\n contextOrOptions: T | Options<T>,\n initialValue?: ContextType<T>\n ) {\n super(\n (contextOrOptions as Options<T>).context !== undefined\n ? (contextOrOptions as Options<T>).initialValue\n : initialValue\n );\n this.host = host;\n if ((contextOrOptions as Options<T>).context !== undefined) {\n this.context = (contextOrOptions as Options<T>).context;\n } else {\n this.context = contextOrOptions as T;\n }\n this.attachListeners();\n this.host.addController?.(this);\n }\n\n onContextRequest = (\n ev: ContextRequestEvent<Context<unknown, unknown>>\n ): void => {\n // Only call the callback if the context matches.\n // Also, in case an element is a consumer AND a provider\n // of the same context, we want to avoid the element to self-register.\n // The check on composedPath (as opposed to ev.target) is to cover cases\n // where the consumer is in the shadowDom of the provider (in which case,\n // event.target === this.host because of event retargeting).\n const consumerHost = ev.composedPath()[0] as Element;\n if (ev.context !== this.context || consumerHost === this.host) {\n return;\n }\n ev.stopPropagation();\n this.addCallback(ev.callback, consumerHost, ev.subscribe);\n };\n\n /**\n * When we get a provider request event, that means a child of this element\n * has just woken up. If it's a provider of our context, then we may need to\n * re-parent our subscriptions, because is a more specific provider than us\n * for its subtree.\n */\n onProviderRequest = (\n ev: ContextProviderEvent<Context<unknown, unknown>>\n ): void => {\n // Ignore events when the context doesn't match.\n // Also, in case an element is a consumer AND a provider\n // of the same context it shouldn't provide to itself.\n // We use composedPath (as opposed to ev.target) to cover cases\n // where the consumer is in the shadowDom of the provider (in which case,\n // event.target === this.host because of event retargeting).\n const childProviderHost = ev.composedPath()[0] as Element;\n if (ev.context !== this.context || childProviderHost === this.host) {\n return;\n }\n // Re-parent all of our subscriptions in case this new child provider\n // should take them over.\n const seen = new Set<unknown>();\n for (const [callback, {consumerHost}] of this.subscriptions) {\n // Prevent infinite loops in the case where a one host element\n // is providing the same context multiple times.\n //\n // While normally it's a no-op to attempt to re-parent a subscription\n // that already has its proper parent, in the case where there's more\n // than one ValueProvider for the same context on the same hostElement,\n // they will each call the consumer, and since they will each have their\n // own dispose function, a well behaved consumer will notice the change\n // in dispose function and call their old one.\n //\n // This will cause the subscriptions to thrash, but worse, without this\n // set check here, we can end up in an infinite loop, as we add and remove\n // the same subscriptions onto the end of the map over and over.\n if (seen.has(callback)) {\n continue;\n }\n seen.add(callback);\n consumerHost.dispatchEvent(\n new ContextRequestEvent(this.context, callback, true)\n );\n }\n ev.stopPropagation();\n };\n\n private attachListeners() {\n this.host.addEventListener('context-request', this.onContextRequest);\n this.host.addEventListener('context-provider', this.onProviderRequest);\n }\n\n hostConnected(): void {\n // emit an event to signal a provider is available for this context\n this.host.dispatchEvent(new ContextProviderEvent(this.context));\n }\n}\n", "import { css } from 'lit';\n\nconst styles = css`\n :host {\n display: contents;\n }\n`;\n\nexport default styles;\n", "import { ContextProvider } from '@lit/context';\nimport { CSSResult, html } from 'lit';\n\nimport Component from '../component';\n\nimport styles from './provider.styles';\n\ntype ConstructorOptions<C> = {\n context: { __context__: C };\n initialValue?: C;\n};\n\n/**\n * Provider Component class to ultimately be inherited by all Provider-type Web\n * Components within this package.\n *\n * @public\n */\nabstract class Provider<C> extends Component {\n /**\n * Constructor of the Provider.\n *\n * Execute in the constructor of the provider implementation,\n * like so\n *\n * ```\n * constructor() {\n * super(TAG_NAME, {initialValue: new ContextClass(defaultValues)});\n * }\n * ```\n * @param host - host of where the context will be hooked onto, e.g. this\n * @param context - context (returned by createContext)\n * @param initialValue - initialValue of the ContextClass, like `new ContextClass(defaultValues)`\n */\n constructor({ context, initialValue }: ConstructorOptions<C>) {\n super();\n\n this.context = new ContextProvider(this, {\n context,\n initialValue,\n });\n }\n\n /**\n * Context associated with this provider.\n *\n * @remarks\n * Providing a Context type as a generic when creating extended Provider Class\n * definitions will help enforce the property validation.\n */\n protected context: ContextProvider<{ __context__: C }>;\n\n /**\n * Styles associated with this Provider Component.\n */\n public static override styles: Array<CSSResult> = [...Component.styles, styles];\n\n /**\n * Update the context of this Provider and trigger its consumers to update.\n *\n * @remarks\n * This method is called every time this Provider is re-rendered and should\n * be used to update the local Context based on any deltas between this\n * Provider's attributes and this Provider's context that caused the\n * re-render. If the `render()` method is overwritten, this call must be made\n * manually.\n */\n protected abstract updateContext(): void;\n\n /**\n * Render this Provider.\n *\n * @remarks\n * This method calls `updateContext()` then validates whether or not to\n * update all consumers based on the results of the `shouldUpdateConsumers`\n * getter.\n *\n * @returns - This Provider as an HTML Element.\n */\n public override render() {\n this.updateContext();\n\n return html`<slot></slot>`;\n }\n}\n\nexport default Provider;\n", "import Provider from './provider.component';\n\nexport default Provider;\n", "const NAMESPACE = {\n PREFIX: 'mdc' as const,\n SEPARATOR: '-' as const,\n};\n\nconst CONSTANTS = {\n NAMESPACE,\n};\n\nexport default CONSTANTS;\n", "/* eslint-disable implicit-arrow-linebreak */\n/* eslint-disable max-len */\nimport CONSTANTS from './constants';\n\n// make ReturnType a String Literal to make it usable in the HTMLElementTagNameMap per component\n// using Template Literal Types: https://www.typescriptlang.org/docs/handbook/2/template-literal-types.html\ntype ReturnType<ComponentName extends string> =\n `${typeof CONSTANTS.NAMESPACE.PREFIX}${typeof CONSTANTS.NAMESPACE.SEPARATOR}${ComponentName}`;\n\nconst constructTagName = <ComponentName extends string>(componentName: ComponentName): ReturnType<ComponentName> =>\n [CONSTANTS.NAMESPACE.PREFIX, componentName].join(CONSTANTS.NAMESPACE.SEPARATOR) as ReturnType<ComponentName>;\n\nexport default {\n constructTagName,\n};\n", "import utils from '../../utils/tag-name';\nimport type { IconNames } from '../icon/icon.types';\n\nconst TAG_NAME = utils.constructTagName('avatar');\n\nconst AVATAR_TYPE = {\n COUNTER: 'counter',\n ICON: 'icon',\n PHOTO: 'photo',\n TEXT: 'text',\n} as const;\n\nconst MAX_COUNTER = 99;\nconst ICON_NAME: Extract<IconNames, 'user-regular'> = 'user-regular';\n\nconst AVATAR_SIZE = {\n 24: 24,\n 32: 32,\n 48: 48,\n 64: 64,\n 72: 72,\n 88: 88,\n 124: 124,\n} as const;\n\nconst DEFAULTS = {\n TYPE: AVATAR_TYPE.PHOTO,\n SIZE: AVATAR_SIZE[32],\n ICON_NAME,\n} as const;\n\nexport {\n TAG_NAME,\n DEFAULTS,\n AVATAR_TYPE,\n MAX_COUNTER,\n AVATAR_SIZE,\n};\n", "import { property } from 'lit/decorators.js';\nimport { DEFAULTS as AVATAR_DEFAULTS } from '../../components/avatar/avatar.constants';\nimport type { AvatarSize } from '../../components/avatar/avatar.types';\nimport type { PresenceType } from '../../components/presence/presence.types';\nimport type { Component } from '../../models';\nimport type { Constructor } from './index.types';\n\nexport interface AvatarComponentMixinInterface {\n src?: string;\n initials?: string;\n presence?: PresenceType;\n size: AvatarSize;\n counter?: number;\n isTyping: boolean;\n}\n\nexport const AvatarComponentMixin = <T extends Constructor<Component>>(\n superClass: T,\n) => {\n class InnerMixinClass extends superClass {\n /**\n * The src is the url which will be used to display the avatar.\n * When the src is loading, we will display the initials as a placeholder.\n */\n @property({ type: String })\n src?: string;\n\n /**\n * The initials to be displayed for the avatar.\n */\n @property({ type: String })\n initials?: string;\n\n /**\n * The presence is the status which can be used to display the\n * activity state of a user or a space within an avatar component.\n *\n * Acceptable values include:\n * - `active`\n * - `away`\n * - `away-calling`\n * - `busy`\n * - `dnd`\n * - `meeting`\n * - `on-call`\n * - `on-device`\n * - `on-mobile`\n * - `pause`\n * - `pto`\n * - `presenting`\n * - `quiet`\n * - `scheduled`\n */\n @property({ type: String })\n presence?: PresenceType;\n\n /**\n * Acceptable values include (size in px unit):\n * - 24\n * - 32\n * - 48\n * - 64\n * - 72\n * - 88\n * - 124\n *\n * @default 32\n */\n @property({ type: Number, reflect: true, attribute: 'size' })\n size: AvatarSize = AVATAR_DEFAULTS.SIZE;\n\n /**\n * The counter is the number which can be displayed on the avatar.\n * The maximum number is 99 and if the given number is greater than 99,\n * then the avatar will be displayed as `99+`.\n * If the given number is a negative number,\n * then the avatar will be displayed as `0`.\n */\n @property({ type: Number })\n counter?: number;\n\n /**\n * Represents the typing indicator when the user is typing.\n * @default false\n */\n @property({ type: Boolean, attribute: 'is-typing' })\n isTyping = false;\n }\n // Cast return type to your mixin's interface intersected with the superClass type\n return InnerMixinClass as Constructor<AvatarComponentMixinInterface> & T;\n};\n", "import { LitElement } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport type { Constructor } from './index.types';\nimport type { IconNames } from '../../components/icon/icon.types';\n\nexport interface IconNameMixinInterface {\n iconName: IconNames;\n}\n\nexport const IconNameMixin = <T extends Constructor<LitElement>>(\n superClass: T,\n) => {\n class InnerMixinClass extends superClass {\n /**\n * Name of the icon (= filename).\n *\n * If no `icon-name` is provided, no icon will be rendered.\n */\n @property({ type: String, attribute: 'icon-name' })\n iconName?: IconNames;\n }\n // Cast return type to your mixin's interface intersected with the superClass type\n return InnerMixinClass as Constructor<IconNameMixinInterface> & T;\n};\n", "import { css } from 'lit';\n\nconst hostFitContentStyles = css`\n :host {\n align-items: center;\n display: flex;\n height: fit-content;\n justify-content: center;\n width: fit-content;\n }\n`;\n\nconst hostFocusRingStyles = (applyFocusRingOnClass = false) => {\n const baseHostStyleVariables = css`\n :host {\n --mdc-focus-ring-inner-color: var(--mds-color-theme-focus-default-0);\n --mdc-focus-ring-middle-color: var(--mds-color-theme-focus-default-1);\n --mdc-focus-ring-outer-color: var(--mds-color-theme-focus-default-2);\n\n --mdc-focus-ring-inner-width: 0.125rem;\n --mdc-focus-ring-middle-width: calc(2 * var(--mdc-focus-ring-inner-width));\n --mdc-focus-ring-outer-width: calc(0.0625rem + var(--mdc-focus-ring-middle-width));\n\n --mdc-focus-ring-middle-offset: var(--mdc-focus-ring-inner-width);\n --mdc-focus-ring-outer-offset: calc(var(--mdc-focus-ring-inner-width) + var(--mdc-focus-ring-middle-width));\n }\n `;\n const boxShadow = css`0 0 0 var(--mdc-focus-ring-inner-width) var(--mdc-focus-ring-inner-color),\n 0 0 0 var(--mdc-focus-ring-middle-width) var(--mdc-focus-ring-middle-color),\n 0 0 0 var(--mdc-focus-ring-outer-width) var(--mdc-focus-ring-outer-color)\n `;\n if (applyFocusRingOnClass) {\n return [\n baseHostStyleVariables,\n css`\n .mdc-focus-ring:focus-visible {\n outline: none;\n }\n :host([disabled]) .mdc-focus-ring:focus {\n box-shadow: none;\n }\n /* Add focus ring to parent when child is focused. The parent element must have class name mdc-focus-ring */\n .mdc-focus-ring:focus-within {\n position: relative;\n box-shadow: ${boxShadow};\n }\n /* Remove focus ring from parent when children has its own focus ring.\n The child element must have class name own-focus-ring */\n .mdc-focus-ring:has(.own-focus-ring:focus-visible){\n box-shadow: none;\n }\n\n /* High Contrast Mode */\n @media (forced-colors: active) {\n .mdc-focus-ring:focus-within {\n outline: 0.125rem solid var(--mds-color-theme-focus-default-0);\n }\n }\n `,\n ];\n }\n return [\n baseHostStyleVariables,\n css`\n :host(:focus-visible) {\n outline: none;\n }\n :host([disabled]:focus) {\n box-shadow: none;\n }\n :host(:focus) {\n position: relative;\n box-shadow: ${boxShadow};\n }\n /* High Contrast Mode */\n @media (forced-colors: active) {\n :host(:focus) {\n outline: 0.125rem solid var(--mds-color-theme-focus-default-0);\n }\n }\n `,\n ];\n};\n\nexport { hostFitContentStyles, hostFocusRingStyles };\n", "import { css } from 'lit';\nimport { hostFitContentStyles } from '../../utils/styles';\n\nconst styles = [hostFitContentStyles, css`\n :host {\n --mdc-avatar-default-background-color: var(--mds-color-theme-avatar-default);\n --mdc-avatar-default-foreground-color: var(--mds-color-theme-common-text-primary-normal);\n --mdc-avatar-loading-indicator-background-color: var(--mds-color-theme-common-text-primary-disabled);\n --mdc-avatar-loading-indicator-foreground-color: var(--mdc-avatar-default-foreground-color);\n --mdc-avatar-loading-overlay-background-color: var(--mds-color-theme-common-overlays-secondary-normal);\n }\n :host([size=\"124\"])::part(content) {\n width: 7.75rem;\n height: 7.75rem;\n }\n :host([size=\"88\"])::part(content) {\n width: 5.5rem;\n height: 5.5rem;\n }\n :host([size=\"72\"])::part(content) {\n width: 4.5rem;\n height: 4.5rem;\n }\n :host([size=\"64\"])::part(content) {\n width: 4rem;\n height: 4rem;\n }\n :host([size=\"48\"])::part(content) {\n width: 3rem;\n height: 3rem;\n }\n :host([size=\"32\"])::part(content) {\n width: 2rem;\n height: 2rem;\n }\n :host([size=\"24\"])::part(content) {\n width: 1.5rem;\n height: 1.5rem;\n }\n :host([size=\"124\"])::part(loader) {\n transform: scale(1.5);\n }\n :host([size=\"88\"])::part(loader) {\n transform: scale(1.2);\n }\n :host([size=\"72\"])::part(loader),\n :host([size=\"64\"])::part(loader) {\n transform: scale(0.8);\n }\n :host([size=\"48\"])::part(loader) {\n transform: scale(0.6);\n }\n :host([size=\"32\"])::part(loader) {\n transform: scale(0.4);\n }\n :host([size=\"24\"])::part(loader) {\n transform: scale(0.3);\n }\n :host::part(content) {\n width: 2rem;\n height: 2rem;\n background-color: var(--mdc-avatar-default-background-color);\n color: var(--mdc-avatar-default-foreground-color);\n border-radius: 100vh;\n position: relative;\n display: grid;\n place-items: center;\n }\n :host::part(photo) {\n border-radius: 100vh;\n height: 100%;\n width: 100%;\n object-fit: cover;\n overflow: hidden;\n }\n :host::part(presence) {\n position: absolute;\n bottom: 0;\n right: 0;\n }\n :host::part(loading-wrapper) {\n position: absolute;\n border-radius: 100vh;\n width: 100%;\n height: 100%;\n background-color: var(--mdc-avatar-loading-overlay-background-color);\n display: grid;\n place-items: center;\n }\n :host::part(loader) {\n position: absolute;\n width: 1rem;\n transform: scale(0.4);\n aspect-ratio: 1;\n border-radius: 100vh;\n animation: loading-key 1s infinite linear alternate;\n }\n @keyframes loading-key {\n 0% {\n box-shadow: 1.25rem 0 var(--mdc-avatar-loading-indicator-foreground-color),\n -1.25rem 0 var(--mdc-avatar-loading-indicator-background-color);\n background: var(--mdc-avatar-loading-indicator-foreground-color);\n }\n 33% {\n box-shadow: 1.25rem 0 var(--mdc-avatar-loading-indicator-foreground-color),\n -1.25rem 0 var(--mdc-avatar-loading-indicator-background-color);\n background: var(--mdc-avatar-loading-indicator-background-color);\n }\n 66% {\n box-shadow: 1.25rem 0 var(--mdc-avatar-loading-indicator-background-color),\n -1.25rem 0 var(--mdc-avatar-loading-indicator-foreground-color);\n background: var(--mdc-avatar-loading-indicator-background-color);\n }\n 100%{\n box-shadow: 1.25rem 0 var(--mdc-avatar-loading-indicator-background-color),\n -1.25rem 0 var(--mdc-avatar-loading-indicator-foreground-color);\n background: var(--mdc-avatar-loading-indicator-foreground-color);\n }\n }\n\n /* High Contrast Mode */\n @media (forced-colors: active) {\n :host::part(content) {\n outline: 0.125rem solid;\n }\n }\n`];\n\nexport default styles;\n", "import utils from '../../utils/tag-name';\n\nconst TAG_NAME = utils.constructTagName('presence');\n\nconst TYPE = {\n ACTIVE: 'active',\n AWAY: 'away',\n AWAY_CALLING: 'away-calling',\n BUSY: 'busy',\n DND: 'dnd',\n MEETING: 'meeting',\n ON_CALL: 'on-call',\n ON_DEVICE: 'on-device',\n ON_MOBILE: 'on-mobile',\n PAUSE: 'pause',\n PTO: 'pto',\n PRESENTING: 'presenting',\n QUIET: 'quiet',\n SCHEDULED: 'scheduled',\n} as const;\n\nconst SIZE = {\n XX_SMALL: 'xx_small',\n X_SMALL: 'x_small',\n SMALL: 'small',\n MIDSIZE: 'midsize',\n LARGE: 'large',\n X_LARGE: 'x_large',\n XX_LARGE: 'xx_large',\n} as const;\n\nconst DEFAULTS = {\n TYPE: TYPE.ACTIVE,\n SIZE: SIZE.SMALL,\n} as const;\n\nexport { TAG_NAME, DEFAULTS, TYPE, SIZE };\n", "import utils from '../../utils/tag-name';\n\nconst TAG_NAME = utils.constructTagName('text');\n\nconst TYPE = {\n BODY_SMALL_REGULAR: 'body-small-regular',\n BODY_SMALL_MEDIUM: 'body-small-medium',\n BODY_SMALL_BOLD: 'body-small-bold',\n BODY_MIDSIZE_REGULAR: 'body-midsize-regular',\n BODY_MIDSIZE_MEDIUM: 'body-midsize-medium',\n BODY_MIDSIZE_BOLD: 'body-midsize-bold',\n BODY_LARGE_REGULAR: 'body-large-regular',\n BODY_LARGE_MEDIUM: 'body-large-medium',\n BODY_LARGE_BOLD: 'body-large-bold',\n BODY_SMALL_REGULAR_UNDERLINE: 'body-small-regular-underline',\n BODY_SMALL_MEDIUM_UNDERLINE: 'body-small-medium-underline',\n BODY_MIDSIZE_REGULAR_UNDERLINE: 'body-midsize-regular-underline',\n BODY_MIDSIZE_MEDIUM_UNDERLINE: 'body-midsize-medium-underline',\n BODY_LARGE_REGULAR_UNDERLINE: 'body-large-regular-underline',\n BODY_LARGE_MEDIUM_UNDERLINE: 'body-large-medium-underline',\n HEADING_SMALL_REGULAR: 'heading-small-regular',\n HEADING_SMALL_MEDIUM: 'heading-small-medium',\n HEADING_SMALL_BOLD: 'heading-small-bold',\n HEADING_MIDSIZE_REGULAR: 'heading-midsize-regular',\n HEADING_MIDSIZE_MEDIUM: 'heading-midsize-medium',\n HEADING_MIDSIZE_BOLD: 'heading-midsize-bold',\n HEADING_LARGE_REGULAR: 'heading-large-regular',\n HEADING_LARGE_MEDIUM: 'heading-large-medium',\n HEADING_LARGE_BOLD: 'heading-large-bold',\n HEADING_XLARGE_REGULAR: 'heading-xlarge-regular',\n HEADING_XLARGE_MEDIUM: 'heading-xlarge-medium',\n HEADING_XLARGE_BOLD: 'heading-xlarge-bold',\n HEADLINE_SMALL_LIGHT: 'headline-small-light',\n HEADLINE_SMALL_REGULAR: 'headline-small-regular',\n} as const;\n\nconst VALID_TEXT_TAGS = {\n H1: 'h1',\n H2: 'h2',\n H3: 'h3',\n H4: 'h4',\n H5: 'h5',\n H6: 'h6',\n P: 'p',\n SMALL: 'small',\n SPAN: 'span',\n DIV: 'div',\n} as const;\n\nconst DEFAULTS = {\n TYPE: TYPE.BODY_LARGE_REGULAR,\n TEXT_ELEMENT_TAGNAME: VALID_TEXT_TAGS.P,\n CSS_PART_TEXT: 'text',\n CHILDREN: 'The quick brown fox jumps over the lazy dog',\n} as const;\n\nexport { TAG_NAME, DEFAULTS, TYPE, VALID_TEXT_TAGS };\n", "import { SIZE as PRESENCE_SIZE } from '../presence/presence.constants';\nimport type { PresenceSize } from '../presence/presence.types';\nimport { TYPE as FONT_TYPE } from '../text/text.constants';\nimport type { TextType } from '../text/text.types';\nimport { AVATAR_SIZE } from './avatar.constants';\nimport type { AvatarSize } from './avatar.types';\n\nconst getPresenceSize = (size: AvatarSize): PresenceSize => {\n const avatarPresenceSizeMap: Record<AvatarSize, PresenceSize> = {\n [AVATAR_SIZE[124]]: PRESENCE_SIZE.XX_LARGE,\n [AVATAR_SIZE[88]]: PRESENCE_SIZE.X_LARGE,\n [AVATAR_SIZE[72]]: PRESENCE_SIZE.LARGE,\n [AVATAR_SIZE[64]]: PRESENCE_SIZE.MIDSIZE,\n [AVATAR_SIZE[48]]: PRESENCE_SIZE.SMALL,\n [AVATAR_SIZE[32]]: PRESENCE_SIZE.X_SMALL,\n [AVATAR_SIZE[24]]: PRESENCE_SIZE.XX_SMALL,\n };\n return avatarPresenceSizeMap[size] || PRESENCE_SIZE.X_SMALL; // default size of presence\n};\n\nconst getAvatarIconSize = (size: AvatarSize): number => {\n const avatarIconSizeMap: Record<AvatarSize, number> = {\n [AVATAR_SIZE[124]]: 4.75,\n [AVATAR_SIZE[88]]: 3,\n [AVATAR_SIZE[72]]: 2.5,\n [AVATAR_SIZE[64]]: 2.25,\n [AVATAR_SIZE[48]]: 1.75,\n [AVATAR_SIZE[32]]: 1.25,\n [AVATAR_SIZE[24]]: 1,\n };\n return avatarIconSizeMap[size] || 1.25; // default size of icon\n};\n\nconst getAvatarTextFontSize = (size: AvatarSize): TextType => {\n const avatarTextFontSizeMap: Record<AvatarSize, TextType> = {\n [AVATAR_SIZE[124]]: FONT_TYPE.HEADING_XLARGE_MEDIUM,\n [AVATAR_SIZE[88]]: FONT_TYPE.HEADING_LARGE_MEDIUM,\n [AVATAR_SIZE[72]]: FONT_TYPE.HEADING_MIDSIZE_MEDIUM,\n [AVATAR_SIZE[64]]: FONT_TYPE.HEADING_SMALL_MEDIUM,\n [AVATAR_SIZE[48]]: FONT_TYPE.HEADING_SMALL_MEDIUM,\n [AVATAR_SIZE[32]]: FONT_TYPE.BODY_MIDSIZE_MEDIUM,\n [AVATAR_SIZE[24]]: FONT_TYPE.BODY_SMALL_MEDIUM,\n };\n return avatarTextFontSizeMap[size] || FONT_TYPE.BODY_MIDSIZE_MEDIUM; // default size of text font\n};\n\nexport {\n getAvatarIconSize,\n getAvatarTextFontSize,\n getPresenceSize,\n};\n", "import type { PropertyValues, TemplateResult } from 'lit';\nimport { CSSResult, html, nothing } from 'lit';\nimport { state } from 'lit/decorators.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport { Component } from '../../models';\nimport { AvatarComponentMixin } from '../../utils/mixins/AvatarComponentMixin';\nimport { IconNameMixin } from '../../utils/mixins/IconNameMixin';\nimport { AVATAR_TYPE, DEFAULTS, MAX_COUNTER } from './avatar.constants';\nimport styles from './avatar.styles';\nimport type { AvatarType } from './avatar.types';\nimport { getAvatarIconSize, getAvatarTextFontSize, getPresenceSize } from './avatar.utils';\n\n/**\n * The `mdc-avatar` component is used to represent a person or a space.\n * An avatar can be an icon, initials, counter and photo.\n *\n * To set the photo of an avatar,\n * you need to set \"src\" attribute.\n *\n * While the avatar image is loading, as a placeholder,\n * we will show the initials text.\n * If the initials are not specified then,\n * we will show `user-regular` icon as a placeholder.\n *\n * By default, if there are no attributes specified,\n * then the default avatar will be an icon with `user-regular` name.\n *\n * The avatar component is non clickable and non interactive/focusable component.\n * If the avatar is typing, then the loading indicator will be displayed.\n * If the counter type avatar is set to a negative number, then we will display 0.\n * The presence indicator will be hidden when the counter property is set.\n *\n * @dependency mdc-icon\n * @dependency mdc-presence\n * @dependency mdc-text\n *\n * @tagname mdc-avatar\n *\n * @cssproperty --mdc-avatar-default-background-color - Allows customization of the default background color.\n * @cssproperty --mdc-avatar-default-foreground-color - Allows customization of the default foreground color.\n * @cssproperty --mdc-avatar-loading-indicator-background-color -\n * Allows customization of the loading indicator background color.\n * @cssproperty --mdc-avatar-loading-indicator-foreground-color -\n * Allows customization of the loading indicator foreground color.\n * @cssproperty --mdc-avatar-loading-overlay-background-color -\n * Allows customization of the loading overlay background color.\n */\nclass Avatar extends AvatarComponentMixin(IconNameMixin(Component)) {\n /**\n * @internal\n */\n @state() private isPhotoLoaded = false;\n\n /**\n * @internal\n * The avatar presence will be hidden if the avatar type is COUNTER.\n * If the presence is set, it will be rendered as a child of the avatar.\n *\n * @param type - The type of the avatar.\n * @returns The presence template or an empty template.\n */\n private getPresenceTemplateBasedOnType(type: AvatarType): TemplateResult | typeof nothing {\n // avatar type of counter should not have presence\n if (type === AVATAR_TYPE.COUNTER && (this.counter || this.counter === 0)) {\n return nothing;\n }\n if (this.presence) {\n return html`\n <mdc-presence part=\"presence\" type=\"${this.presence}\" size=\"${getPresenceSize(this.size)}\"></mdc-presence>\n `;\n }\n return nothing;\n }\n\n /**\n * @internal\n * Sets `isPhotoLoaded` to `true` when the avatar photo is loaded.\n * This is used to hide the avatar photo initially and show it only when it is loaded.\n */\n private handleOnLoad(): void {\n this.isPhotoLoaded = true;\n }\n\n /**\n * @internal\n * Handles errors that occur during the image loading process.\n * Sets `isPhotoLoaded` to `false` to indicate the failure and throws an error message.\n * The error message suggests checking the `src` attribute.\n */\n private handleOnError(): void {\n this.isPhotoLoaded = false;\n if (this.onerror) {\n this.onerror('There was a problem while fetching the <img/>. Please check the src attribute and try again.');\n }\n }\n\n /**\n * @internal\n * Generates the photo template for the avatar component.\n * Utilizes the `src` attribute to display an image.\n * The photo remains hidden until it is fully loaded;\n * upon successful loading, the `handleOnLoad` method sets `isPhotoLoaded` to true.\n * In the event of a loading error, the `handleOnError` method sets `isPhotoLoaded` to false and raises an error.\n *\n * @returns The template result containing the avatar photo.\n */\n private photoTemplate(): TemplateResult {\n return html`\n <img\n part=\"photo\"\n src=\"${ifDefined(this.src)}\"\n aria-hidden=\"true\"\n ?hidden=\"${!this.isPhotoLoaded}\"\n @load=\"${this.handleOnLoad}\"\n @error=\"${this.handleOnError}\"\n />\n `;\n }\n\n /**\n * @internal\n * Generates the icon template for the photo avatar component.\n * Utilizes the `mdc-icon` component to display an icon.\n * If the `iconName` property is not provided, it defaults to the `DEFAULTS.ICON_NAME`.\n *\n * @returns The template result containing the avatar icon.\n */\n private iconTemplate(): TemplateResult {\n const name = this.iconName || DEFAULTS.ICON_NAME;\n return html`\n <mdc-icon\n name=\"${ifDefined(name)}\"\n length-unit=\"rem\"\n size=\"${getAvatarIconSize(this.size)}\"\n ></mdc-icon>\n `;\n }\n\n /**\n * @internal\n * Generates the text template for the initials/counter avatar component.\n * Utilizes the `mdc-text` component to display text.\n *\n * @param content - the text content to be displayed\n * @returns The template result containing the avatar text.\n */\n private textTemplate(content: string): TemplateResult {\n return html`\n <mdc-text\n type=\"${getAvatarTextFontSize(this.size)}\"\n tagname=\"span\"\n >\n ${content}\n </mdc-text>\n `;\n }\n\n /**\n * @internal\n * Generates the text content for counter avatar by converting the given number to a string.\n * If the counter exceeds the maximum limit of 99, it will return the maximum limit as a string\n * followed by a '+' character.\n *\n * @param counter - the number to be converted to a string\n * @returns the counter text\n */\n private generateCounterText(counter: number): string {\n // If the consumer provides a negative number, we set it to 0.\n if (counter < 0) {\n return '0';\n }\n if (counter > MAX_COUNTER) {\n return `${MAX_COUNTER}+`;\n }\n return counter.toString();\n }\n\n /**\n * @internal\n * Converts the given initials to uppercase and takes the first two characters.\n * This is used to generate the text content for the initials avatar.\n *\n * @param initials - the string containing the initials\n * @returns the first two uppercase characters of the given initials\n */\n private generateInitialsText(initials: string): string {\n return initials.toUpperCase().slice(0, 2);\n }\n\n /**\n * @internal\n * Generates the text content based on the given type.\n * If the type is TEXT, it will use the initials property and generate the first two uppercase characters.\n * If the type is COUNTER, it uses the value of counter property and\n * generate the string representation of the counter.\n * The generated content is then passed to the `textTemplate` method to generate the final template.\n *\n * @param type - the type of the avatar\n * @returns the template result containing the avatar text\n */\n private generateTextContent(type: AvatarType): TemplateResult {\n let content = '';\n if (type === AVATAR_TYPE.TEXT && this.initials) {\n content = this.generateInitialsText(this.initials);\n }\n if (type === AVATAR_TYPE.COUNTER && (this.counter || this.counter === 0)) {\n content = this.generateCounterText(this.counter);\n }\n return this.textTemplate(content);\n }\n\n /**\n * @internal\n * Returns the type of the avatar component based on the user-provided inputs.\n *\n * @returns the type of the avatar component\n */\n private getTypeBasedOnInputs(): AvatarType {\n if (this.src) {\n return AVATAR_TYPE.PHOTO;\n }\n if (this.iconName) {\n return AVATAR_TYPE.ICON;\n }\n if (this.initials) {\n return AVATAR_TYPE.TEXT;\n }\n if (this.counter || this.counter === 0) {\n return AVATAR_TYPE.COUNTER;\n }\n return AVATAR_TYPE.ICON;\n }\n\n /**\n * @internal\n * Returns the template result based on the type of the avatar component.\n * The type is determined by `getTypeBasedOnInputs` based on user's input.\n * Based on the generated type, template result is generated.\n *\n * @param type - the type of the avatar component\n * @returns the template result containing the avatar content\n */\n private getTemplateBasedOnType(type: AvatarType): TemplateResult {\n switch (type) {\n case AVATAR_TYPE.PHOTO:\n return this.photoTemplate();\n case AVATAR_TYPE.TEXT:\n case AVATAR_TYPE.COUNTER:\n return this.generateTextContent(type);\n case AVATAR_TYPE.ICON:\n default:\n return this.iconTemplate();\n }\n }\n\n /**\n * @internal\n * Represents the loading indicator for the avatar when typing.\n * If the avatar is in typing state, this method returns a loading indicator\n * comprising three small filled dots, scaled based on the avatar size.\n *\n * @returns The template result containing the loading indicator, or an empty template if not typing.\n */\n private getLoadingContent(): TemplateResult | typeof nothing {\n if (!this.isTyping) {\n return nothing;\n }\n return html`<div part=\"loading-wrapper\"><div part=\"loader\"></div></div>`;\n }\n\n /**\n * @internal\n * Generates the photo placeholder content for the avatar component.\n * If the photo is not yet loaded, and the avatar type is PHOTO with initials provided,\n * it generates and returns the initials as a placeholder text.\n * If the photo is already loaded, it returns an empty template.\n *\n * @param type - The type of the avatar.\n * @returns The template result containing the placeholder content or an empty template.\n */\n private getPhotoPlaceHolderContent(type: AvatarType): TemplateResult | typeof nothing {\n // if photo is already loaded then no need to show placeholder\n if (this.isPhotoLoaded) {\n return nothing;\n }\n if (type === AVATAR_TYPE.PHOTO) {\n if (this.initials) {\n return this.textTemplate(this.generateInitialsText(this.initials));\n }\n return this.iconTemplate();\n }\n return nothing;\n }\n\n public override update(changedProperties: PropertyValues): void {\n super.update(changedProperties);\n\n if (changedProperties.has('src') && !this.src) {\n // Reset photo loaded if src is empty\n this.isPhotoLoaded = false;\n }\n }\n\n public override render(): TemplateResult {\n const type = this.getTypeBasedOnInputs();\n return html`\n <div part=\"content\" aria-hidden=\"true\">\n ${this.getPhotoPlaceHolderContent(type)}\n ${this.getTemplateBasedOnType(type)}\n ${this.getLoadingContent()}\n ${this.getPresenceTemplateBasedOnType(type)}\n </div>\n `;\n }\n\n public static override styles: Array<CSSResult> = [...Component.styles, ...styles];\n}\n\nexport default Avatar;\n", "import { css } from 'lit';\nimport { hostFitContentStyles, hostFocusRingStyles } from '../../utils/styles';\n\nconst styles = [\n hostFitContentStyles,\n css`\n :host {\n --mdc-icon-fill-color: currentColor;\n --mdc-icon-size: var(--computed-icon-size);\n --mdc-icon-border-radius: 0.25rem;\n\n height: var(--mdc-icon-size);\n width: var(--mdc-icon-size);\n border-radius: var(--mdc-icon-border-radius);\n }\n :host::part(icon) {\n height: 100%;\n width: 100%;\n fill: var(--mdc-icon-fill-color);\n }\n `,\n ...hostFocusRingStyles(),\n];\n\nexport default styles;\n", "import { Context, ContextConsumer } from '@lit/context';\nimport { ReactiveElement } from 'lit';\n\ntype ConsumeOptions<C> = {\n host: ReactiveElement;\n context: C;\n subscribe?:boolean\n}\nconst consume = <C extends Context<unknown, unknown>>(options: ConsumeOptions<C>) => {\n const { host, context, subscribe } = options;\n\n return new ContextConsumer<C, typeof host>(host, {\n context,\n subscribe: subscribe ?? true,\n });\n};\n\nconst providerUtils = {\n consume,\n};\nexport default providerUtils;\n", "import utils from '../../utils/tag-name';\n\nconst TAG_NAME = utils.constructTagName('iconprovider');\n\nconst ALLOWED_FILE_EXTENSIONS = ['svg'];\nconst ALLOWED_LENGTH_UNITS = ['em', 'rem', 'px', '%'];\nconst LENGTH_UNIT_SIZE = {\n px: 16,\n em: 1,\n rem: 1,\n '%': 100,\n} as Record<string, number>;\n\nconst DEFAULTS = {\n FILE_EXTENSION: 'svg',\n LENGTH_UNIT: 'em',\n SIZE: LENGTH_UNIT_SIZE.em,\n SHOULD_CACHE: false,\n ICON_SET: 'momentum-icons',\n} as const;\n\nexport { TAG_NAME, DEFAULTS, ALLOWED_FILE_EXTENSIONS, ALLOWED_LENGTH_UNITS, LENGTH_UNIT_SIZE };\n", "import { createContext } from '@lit/context';\n\nimport { TAG_NAME } from './iconprovider.constants';\nimport type { IconSet, CacheStrategy } from './iconprovider.types';\n\nclass IconProviderContext {\n public iconSet?: IconSet;\n\n public fileExtension?: string;\n\n public url?: string;\n\n public lengthUnit?: string;\n\n public size?: number;\n\n public cacheName?: string;\n\n public cacheStrategy?: CacheStrategy;\n\n // create typed lit context as part of the IconProviderContext\n public static readonly context = createContext<IconProviderContext>(TAG_NAME);\n}\n\nexport default IconProviderContext;\n", "import { property } from 'lit/decorators.js';\nimport { Provider } from '../../models';\nimport IconProviderContext from './iconprovider.context';\nimport { ALLOWED_FILE_EXTENSIONS, DEFAULTS, ALLOWED_LENGTH_UNITS } from './iconprovider.constants';\nimport type { CacheStrategy, IconSet } from './iconprovider.types';\n\n/**\n * IconProvider component, which allows to be consumed from sub components\n * (see `providerUtils.consume` for how to consume)\n *\n * Attribute `iconSet` can be set to either `momentum-icons` or `custom-icons`.\n * If `momentum-icons` is selected, the icons will be fetched from the\n * Momentum Design System icon set per a dynamic JS Import (no need to provide a URL).\n * This requires the consumer to have the `@momentum-designs` package installed and the\n * build tooling needs to support dynamic imports.\n *\n * If `custom-icons` is selected, the icons will be fetched from the provided URL.\n * This requires the consumer to provide a URL from which the icons will be fetched and\n * the consumer needs to make sure to bundle the icons in the application.\n *\n * If `cacheStrategy` is provided (only works with iconSet = `custom-icons`), the\n * IconProvider will cache the icons in the selected cache (either web-api-cache or in-memory-cache),\n * to avoid fetching the same icon multiple times over the network.\n * This is useful when the same icon is used multiple times in the application.\n * To consider:\n * - The `in-memory-cache` is not persisted and will be lost when the\n * IconProvider is removed from the DOM.\n * - The `web-api-cache` is persisted, but only works in https environments\n * (https://developer.mozilla.org/en-US/docs/Web/API/Cache).\n *\n * @tagname mdc-iconprovider\n *\n * @slot - children\n */\nclass IconProvider extends Provider<IconProviderContext> {\n constructor() {\n // initialise the context by running the Provider constructor:\n super({\n context: IconProviderContext.context,\n initialValue: new IconProviderContext(),\n });\n }\n\n /**\n * Context object of the IconProvider, to be consumed by child components\n */\n public static get Context() {\n return IconProviderContext.context;\n }\n\n /**\n * Icon set to be used\n *\n * If `momentum-icons` is selected, the icons will be fetched from the\n * Momentum Design System icon set per a dynamic JS Import (no need to provide a URL).\n * This requires the consumer to have the `@momentum-designs` package installed and the\n * build tooling needs to support dynamic imports.\n *\n * If `custom-icons` is selected, the icons will be fetched from the provided URL.\n * This requires the consumer to provide a URL from which the icons will be fetched and\n * the consumer needs to make sure to bundle the icons in the application.\n *\n * @default momentum-icons\n */\n @property({ type: String, attribute: 'icon-set', reflect: true })\n iconSet?: IconSet = DEFAULTS.ICON_SET;\n\n /**\n * Url of where icons will be fetched from\n * (if Icon set is `custom-icons`, this will be the base url)\n */\n @property({ type: String })\n url?: string;\n\n /**\n * File extension of icons\n * (if Icon set is `custom-icons`, this will be the file extension for icons)\n * @default svg\n */\n @property({ type: String, attribute: 'file-extension', reflect: true })\n fileExtension?: string = DEFAULTS.FILE_EXTENSION;\n\n /**\n * Length unit used for sizing of icons\n * @default em\n */\n @property({ type: String, attribute: 'length-unit', reflect: true })\n lengthUnit: string = DEFAULTS.LENGTH_UNIT;\n\n /**\n * The default size of the icon.\n * If not set, it falls back to the size defined by the length unit.\n * @default 1\n */\n @property({ type: Number, reflect: true })\n size?: number = DEFAULTS.SIZE;\n\n /**\n * Icons Cache Strategy to use\n *\n * **Can only be used if Icon set is `custom-icons`**\n *\n * Choose `in-memory-cache` to cache icons in a JS cache (in-memory cache).\n * Choose `web-cache-api` to cache icons using the Web Cache API.\n *\n * NOTE: `cache-name` must be provided if `cache-strategy` is provided.\n *\n * If not provided or invalid value provided, the icons will not be cached.\n * @default undefined\n */\n @property({ type: String, attribute: 'cache-strategy' })\n cacheStrategy?: CacheStrategy;\n\n /**\n * Icons Cache Name to use (cache strategy must be provided)\n *\n * If provided, Icons inside the provider will be cached in the\n * cache (determined by `cache-strategy`) with the provided name.\n *\n * NOTE: `cache-name` requires `cache-strategy` to be set.\n *\n * If not provided, the icons will not be cached.\n * @default undefined\n */\n @property({ type: String, attribute: 'cache-name' })\n cacheName?: string;\n\n private updateValuesInContext() {\n // only update fileExtension on context if its an allowed fileExtension\n if (this.fileExtension && ALLOWED_FILE_EXTENSIONS.includes(this.fileExtension)) {\n this.context.value.fileExtension = this.fileExtension;\n } else {\n // Ensure both fileExtension and context are updated to the default if its not an allowed fileExtension\n this.fileExtension = DEFAULTS.FILE_EXTENSION;\n this.context.value.fileExtension = DEFAULTS.FILE_EXTENSION;\n }\n this.context.value.iconSet = this.iconSet;\n this.context.value.url = this.url;\n this.context.value.size = this.size;\n this.context.value.cacheName = this.cacheName;\n this.context.value.cacheStrategy = this.cacheStrategy;\n\n if (this.lengthUnit && ALLOWED_LENGTH_UNITS.includes(this.lengthUnit)) {\n this.context.value.lengthUnit = this.lengthUnit;\n } else {\n // Ensure both lengthUnit and context are updated to the default if its not an allowed lengthUnit\n this.lengthUnit = DEFAULTS.LENGTH_UNIT;\n this.context.value.lengthUnit = DEFAULTS.LENGTH_UNIT;\n }\n }\n\n protected updateContext(): void {\n if (\n this.context.value.fileExtension !== this.fileExtension\n || this.context.value.iconSet !== this.iconSet\n || this.context.value.url !== this.url\n || this.context.value.lengthUnit !== this.lengthUnit\n || this.context.value.size !== this.size\n || this.context.value.cacheName !== this.cacheName\n || this.context.value.cacheStrategy !== this.cacheStrategy\n ) {\n this.updateValuesInContext();\n this.context.updateObservers();\n }\n }\n}\nexport default IconProvider;\n", "type IconCache = Map<string, string>;\ntype Registry = Record<string, IconCache>;\nexport type CacheStrategy = 'in-memory-cache' | 'web-cache-api';\n\nconst registry: Registry = {};\n\n/**\n * Cache, using In-Memory Cache (Map)\n * @param name - name of the cache (used as an identifier)\n * @returns Object with set, get and delete methods\n */\nexport const inMemoryCache = async (name: string) => {\n if (registry[name] === undefined) {\n registry[name] = new Map();\n }\n\n return {\n async set(request: Request, response: Response) {\n registry[name].set(request.url, await response.text());\n },\n async get(request: Request) {\n return registry[name].get(request.url);\n },\n async delete(request: Request) {\n registry[name].delete(request.url);\n },\n };\n};\n\n/**\n * Cache, using Web API Cache\n * @param name - name of the cache (used as an identifier)\n * @returns Object with set, get and delete methods\n */\nexport const webAPIIconsCache = async (name: string) => {\n const cache = await caches.open(name);\n\n return {\n set: async (request: Request, response: Response) => {\n await cache.put(request, response);\n },\n get: async (request: Request) => {\n const response = await cache.match(request);\n return response?.text();\n },\n delete: async (request: Request) => {\n await cache.delete(request);\n },\n };\n};\n\n/**\n * Function to return the cache based on the cache strategy\n * @param cacheName - name of the cache to be used\n * @param cacheStrategy - strategy to be used for caching\n * @returns the cache based on the strategy\n */\nexport const iconsCache = async (cacheName: string, cacheStrategy: CacheStrategy) => {\n if (cacheStrategy === 'in-memory-cache') {\n return inMemoryCache(cacheName);\n }\n\n return webAPIIconsCache(cacheName);\n};\n", "import { iconsCache } from '../../utils/icon-cache';\nimport type { CacheStrategy } from '../../utils/icon-cache';\n\ninterface Args {\n url: string;\n name: string;\n fileExtension: string;\n cacheStrategy?: CacheStrategy;\n cacheName?: string;\n renewSignal: () => AbortSignal;\n}\n\n/**\n * Utility function for fetching the icon from the provided `request`.\n * It will throw an error if the response is not ok.\n * @param request - The request object to fetch the icon\n * @returns Promise<Response> - The response from the fetch\n * @throws Error if the response is not ok\n */\nconst fetchIcon = async (request: Request): Promise<Response> =>\n fetch(request).then((response) => {\n if (!response.ok) {\n throw new Error('There was a problem while fetching the icon!');\n }\n return response;\n });\n\n/**\n * Fetches a dynamic SVG icon based on the provided `url`, `name` and `fileExtension`.\n * The fetch is aborted if the signal is aborted.\n *\n * This function also includes the logic to cache the fetched icon using the In Memory Cache or Web Cache API.\n * If the `cacheStrategy` is set to `web-cache-api` or `in-memory-cache` and `cacheName` is provided,\n * the fetched icon will be cached using the respective cache.\n *\n * It will throw an error if the response is not ok.\n *\n * @param url - The base url of the icon\n * @param name - The name of the icon\n * @param fileExtension - The file extension of the icon\n * @param signal - The signal to abort the fetch.\n * It is used to cancel the fetch when the component is disconnected or updated.\n * @param cacheStrategy - The cache strategy to use.\n * @param cacheName - The cache name to use.\n *\n * @returns Response string from the fetch\n * @throws Error if the response is not ok\n */\nconst svgFetch = async ({\n url,\n name,\n fileExtension,\n cacheStrategy,\n cacheName,\n renewSignal,\n}: Args): Promise<string> => {\n // abort the previous fetch request if it is still pending\n // and create a new signal\n const signal = renewSignal();\n const request = new Request(`${url}/${name}.${fileExtension}`, {\n signal,\n });\n\n // if there is no cache defined (cacheName and cacheStrategy properly set),\n // fetch the icon and return the response\n if (!cacheName || !cacheStrategy || !['in-memory-cache', 'web-cache-api'].includes(cacheStrategy)) {\n return fetchIcon(request).then((response) => response.text());\n }\n\n return iconsCache(cacheName, cacheStrategy).then((iconsCache) =>\n iconsCache\n .get(request)\n .then((responseFromCache) => {\n // **If entry in cache, return**\n if (responseFromCache) {\n return responseFromCache;\n }\n\n // **Otherwise, fetch and cache if successful**\n // Both fetchIcon() and iconsCache.set() \"consume\" the request,\n // so we need to make a copy.\n // (see https://developer.mozilla.org/en-US/docs/Web/API/Request/clone)\n return fetchIcon(request.clone()).then((response) => {\n // This avoids caching responses that we know are errors\n // (i.e. HTTP status code of 4xx or 5xx).\n if (response.status < 400 && response.headers.has('content-type')) {\n // Call .clone() on the response to save copy to cache.\n // https://developer.mozilla.org/en-US/docs/Web/API/Request/clone\n return iconsCache.set?.(request, response.clone()).then(() => response.text());\n }\n return response.text();\n });\n })\n .catch((error) => {\n // Note that a HTTP error response (e.g. 404) will NOT trigger\n // an exception.\n // It will return a normal response object that has the appropriate\n // error code set.\n throw new Error(`Error in caching the Icon ${name}, ${error}`);\n }));\n};\n\nexport { svgFetch };\n", "import utils from '../../utils/tag-name';\n\nconst TAG_NAME = utils.constructTagName('icon');\n\nconst DEFAULTS = {\n NAME: undefined,\n SIZE: 1,\n} as const;\n\nexport { TAG_NAME, DEFAULTS };\n", "import { CSSResult, html } from 'lit';\nimport { property, state } from 'lit/decorators.js';\nimport styles from './icon.styles';\nimport { Component } from '../../models';\nimport providerUtils from '../../utils/provider';\nimport IconProvider from '../iconprovider/iconprovider.component';\nimport { svgFetch } from './icon.utils';\nimport { DEFAULTS } from './icon.constants';\nimport type { IconNames } from './icon.types';\n/**\n * Icon component that dynamically displays SVG icons based on a valid name.\n *\n * This component must be mounted within an `IconProvider` component.\n *\n * The `IconProvider` defines the source URL from which icons are consumed.\n * The `Icon` component accepts a `name` attribute, which corresponds to\n * the file name of the icon to be loaded from the specified URL.\n *\n * Once fetched, the icon will be rendered. If the fetching process is unsuccessful,\n * no icon will be displayed.\n *\n * The `size` attribute allows for dynamic sizing of the icon based on the provided\n * `length-unit` attribute. This unit can either come from the `IconProvider`\n * or can be overridden for each individual icon. For example:\n * if `size = 1` and `length-unit = 'em'`, the dimensions of the icon will be\n * `width: 1em; height: 1em`.\n *\n * Regarding accessibility, there are three types of icons: decorative, informative and informative standalone.\n *\n * ### Decorative Icons\n * - Decorative icons do not convey any essential information to the content of a page.\n * - They should be hidden from screen readers (SR) to prevent confusion for users.\n * - For decorative icons, an `aria-label` is not required, and the `role` will be set to null.\n *\n * ### Informative Icons\n * - Informative icons convey important information that is not adequately represented\n * by surrounding text or components.\n * - They provide valuable context and must be announced by assistive technologies.\n * - For informative icons, an `aria-label` is required, and the `role` will be set to \"img\" automatically.\n * - If an `aria-label` is provided, the role will be set to 'img'; if it is absent,\n * the role will be unset.\n *\n * ### Informative Standalone Icons\n * - If an icon is informative (as mentioned above) and does not belong to a button (=standalone), it must\n * have a Tooltip that describes what it means.\n * - For informative standalone icons, an `aria-label` & `tabindex=\"0\"` is required,\n * and the `role` will be set to \"img\" automatically.\n * - **Only use this when a Icon is standalone and is not part of a button or other interactive elements.**\n *\n * @tagname mdc-icon\n *\n * @cssproperty --mdc-icon-fill-color - Allows customization of the default fill color.\n * @cssproperty --mdc-icon-size - Allows customization of the icon size.\n * @cssproperty --mdc-icon-border-radius - Allows customization of the icon border radius.\n */\nclass Icon extends Component {\n @state()\n private iconData?: HTMLElement;\n\n @state()\n private lengthUnitFromContext?: string;\n\n @state()\n private sizeFromContext?: number;\n\n /**\n * Name of the icon (= filename)\n */\n @property({ type: String, reflect: true })\n name?: IconNames = DEFAULTS.NAME;\n\n /**\n * Size of the icon (works in combination with length unit)\n */\n @property({ type: Number })\n size?: number;\n\n /**\n * Length unit attribute for overriding length-unit from `IconProvider`\n */\n @property({ type: String, attribute: 'length-unit' })\n lengthUnit?: string;\n\n /**\n * Aria-label attribute to be set for accessibility\n */\n @property({ type: String, attribute: 'aria-label' })\n override ariaLabel: string | null = null;\n\n private readonly iconProviderContext = providerUtils.consume({ host: this, context: IconProvider.Context });\n\n @state() private abortController: AbortController;\n\n constructor() {\n super();\n this.abortController = new AbortController(); // Initialize AbortController\n }\n\n /**\n * Parse the icon string to an html element, set the attributes and\n * return the icon element\n *\n * @param iconData - The icon string to be parsed\n * @returns iconElement\n */\n private prepareIconElement(iconData: string) {\n const iconElement = new DOMParser().parseFromString(iconData, 'text/html').body.children[0];\n\n if (this.name) {\n iconElement.setAttribute('data-name', this.name);\n }\n iconElement.setAttribute('part', 'icon');\n // set aria-hidden=true for SVG to avoid screen readers\n iconElement.setAttribute('aria-hidden', 'true');\n\n return iconElement;\n }\n\n /**\n * Fetches the icon (currently only svg) and sets state and attributes once fetched successfully\n *\n * This method uses abortController.signal to cancel the fetch request when the component is disconnected or updated.\n * If the request is aborted after the fetch() call has been fulfilled but before the response body has been read,\n * then attempting to read the response body will reject with an AbortError exception.\n */\n private async getIconData() {\n if (this.iconProviderContext.value) {\n const { fileExtension, url, cacheName, iconSet, cacheStrategy } = this.iconProviderContext.value;\n if (iconSet === 'custom-icons' && url && fileExtension && this.name) {\n // function to abort the fetch request and create a new signal\n // (directly passing the abortcontroller to the fetch request per reference\n // will not work due to JS call-by-sharing behavior)\n const renewSignal = () => {\n this.abortController.abort();\n this.abortController = new AbortController();\n return this.abortController.signal;\n };\n\n // fetch icon data (including caching logic)\n return svgFetch({\n url,\n name: this.name,\n fileExtension,\n cacheName,\n cacheStrategy,\n renewSignal,\n })\n .then((iconData) => {\n // parse the fetched icon string to an html element and set the attributes\n const iconElement = this.prepareIconElement(iconData);\n this.handleIconLoadedSuccess(iconElement as HTMLElement);\n })\n .catch((error) => {\n this.handleIconLoadedFailure(error);\n });\n }\n\n if (iconSet === 'momentum-icons' && this.name) {\n // dynamic import of the lit template from the momentum icons package\n return import(`@momentum-design/icons/dist/ts/${this.name}.ts`)\n .then((module) => {\n this.handleIconLoadedSuccess(module.default());\n })\n .catch((error) => {\n this.handleIconLoadedFailure(error);\n });\n }\n }\n\n const noIconProviderError = new Error('IconProvider not found or not properly set up.');\n this.handleIconLoadedFailure(noIconProviderError);\n return Promise.reject(noIconProviderError);\n }\n\n /**\n * Sets the iconData state to the fetched icon.\n * Dispatches a 'load' event on the component once the icon has been successfully loaded.\n * @param iconHtml - The icon html element which has been fetched from the icon provider.\n */\n private handleIconLoadedSuccess(iconHtml: HTMLElement) {\n // update iconData state once fetched:\n this.iconData = iconHtml;\n\n // when icon is fetched successfully, trigger icon load event.\n const loadEvent = new Event('load', {\n bubbles: true,\n cancelable: true,\n });\n this.dispatchEvent(loadEvent);\n }\n\n /**\n * Dispatches an 'error' event on the component when the icon fetching has failed.\n * This event bubbles and is cancelable.\n * The error detail is set to the error object.\n */\n private handleIconLoadedFailure(error: unknown) {\n const errorEvent = new CustomEvent('error', {\n bubbles: true,\n cancelable: true,\n detail: { error },\n });\n this.dispatchEvent(errorEvent);\n }\n\n /**\n * Updates the size by setting the width and height\n */\n private updateSize() {\n if (this.computedIconSize && (this.lengthUnit || this.lengthUnitFromContext)) {\n const value = `${this.computedIconSize}${this.lengthUnit ?? this.lengthUnitFromContext}`;\n // set the computed icon size as a css variable to be used in the icon styles\n this.style.setProperty('--computed-icon-size', value);\n }\n }\n\n private get computedIconSize() {\n return this.size ?? this.sizeFromContext ?? DEFAULTS.SIZE;\n }\n\n override updated(changedProperties: Map<string, any>) {\n super.updated(changedProperties);\n\n if (changedProperties.has('name')) {\n // fetch icon data if name changes:\n this.getIconData().catch((err) => {\n if (err.name !== 'AbortError' && this.onerror) {\n this.onerror(err);\n }\n });\n }\n\n if (changedProperties.has('ariaLabel')) {\n this.role = this.ariaLabel ? 'img' : null;\n }\n\n if (changedProperties.has('size') || changedProperties.has('lengthUnit')) {\n this.updateSize();\n }\n\n if (this.lengthUnitFromContext !== this.iconProviderContext.value?.lengthUnit) {\n this.lengthUnitFromContext = this.iconProviderContext.value?.lengthUnit;\n this.updateSize();\n }\n\n if (this.sizeFromContext !== this.iconProviderContext.value?.size) {\n this.sizeFromContext = this.iconProviderContext.value?.size;\n this.updateSize();\n }\n }\n\n override render() {\n return html` ${this.iconData} `;\n }\n\n public static override styles: Array<CSSResult> = [...Component.styles, ...styles];\n}\n\nexport default Icon;\n", "import Icon from './icon.component';\nimport { TAG_NAME } from './icon.constants';\n\nIcon.register(TAG_NAME);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n ['mdc-icon']: Icon\n }\n}\n\nexport default Icon;\n", "import { css } from 'lit';\nimport { hostFitContentStyles } from '../../utils/styles';\n\nconst styles = [\n hostFitContentStyles,\n css`\n :host {\n --mdc-presence-active-background-color: var(--mds-color-theme-indicator-stable);\n --mdc-presence-away-background-color: var(--mds-color-theme-indicator-locked);\n --mdc-presence-away-calling-background-color: var(--mds-color-theme-indicator-locked);\n --mdc-presence-busy-background-color: var(--mds-color-theme-indicator-unstable);\n --mdc-presence-dnd-background-color: var(--mds-color-theme-indicator-attention);\n --mdc-presence-meeting-background-color: var(--mds-color-theme-indicator-unstable);\n --mdc-presence-on-call-background-color: var(--mds-color-theme-indicator-unstable);\n --mdc-presence-on-device-background-color: var(--mds-color-theme-indicator-locked);\n --mdc-presence-on-mobile-background-color: var(--mds-color-theme-indicator-locked);\n --mdc-presence-pause-background-color: var(--mds-color-theme-indicator-locked);\n --mdc-presence-pto-background-color: var(--mds-color-theme-indicator-locked);\n --mdc-presence-presenting-background-color: var(--mds-color-theme-indicator-attention);\n --mdc-presence-quiet-background-color: var(--mds-color-theme-indicator-locked);\n --mdc-presence-scheduled-background-color: var(--mds-color-theme-indicator-unstable);\n --mdc-presence-overlay-background-color: var(--mds-color-theme-background-solid-primary-normal);\n }\n\n .mdc-presence {\n border-radius: 50%;\n background-color: var(--mdc-presence-overlay-background-color);\n display: flex;\n justify-content: center;\n align-items: center;\n }\n .mdc-presence__xx_small,\n .mdc-presence__x_small,\n .mdc-presence__small {\n width: 1.0625rem;\n height: 1.0625rem;\n }\n .mdc-presence__midsize {\n width: 1.419375rem;\n height: 1.419375rem;\n }\n .mdc-presence__large {\n width: 1.596875rem;\n height: 1.596875rem;\n }\n .mdc-presence__x_large {\n width: 1.951875rem;\n height: 1.951875rem;\n }\n .mdc-presence__xx_large {\n width: 2.75rem;\n height: 2.75rem;\n }\n\n .mdc-presence-icon {\n border-radius: 50%;\n }\n .mdc-presence-icon__active {\n color: var(--mdc-presence-active-background-color);\n }\n .mdc-presence-icon__away {\n color: var(--mdc-presence-away-background-color);\n }\n .mdc-presence-icon__away-calling {\n color: var(--mdc-presence-away-calling-background-color);\n }\n .mdc-presence-icon__busy {\n color: var(--mdc-presence-busy-background-color);\n }\n .mdc-presence-icon__dnd {\n color: var(--mdc-presence-dnd-background-color);\n }\n .mdc-presence-icon__meeting {\n color: var(--mdc-presence-meeting-background-color);\n }\n .mdc-presence-icon__on-call {\n color: var(--mdc-presence-on-call-background-color);\n }\n .mdc-presence-icon__on-device {\n color: var(--mdc-presence-on-device-background-color);\n }\n .mdc-presence-icon__on-mobile {\n color: var(--mdc-presence-on-mobile-background-color);\n }\n .mdc-presence-icon__pause {\n color: var(--mdc-presence-pause-background-color);\n }\n .mdc-presence-icon__pto {\n color: var(--mdc-presence-pto-background-color);\n }\n .mdc-presence-icon__presenting {\n color: var(--mdc-presence-presenting-background-color);\n }\n .mdc-presence-icon__quiet {\n color: var(--mdc-presence-quiet-background-color);\n }\n .mdc-presence-icon__scheduled {\n color: var(--mdc-presence-scheduled-background-color);\n }\n `,\n];\n\nexport default styles;\n", "import { TYPE } from './presence.constants';\nimport type { PresenceType } from './presence.types';\n\nexport const getIconValue = (type: PresenceType) => {\n switch (type) {\n case TYPE.AWAY:\n return 'recents-presence-badge-filled';\n case TYPE.AWAY_CALLING:\n return 'away-calling-presence-filled';\n case TYPE.BUSY:\n return 'busy-presence-bold';\n case TYPE.DND:\n return 'dnd-presence-badge-filled';\n case TYPE.MEETING:\n return 'camera-filled';\n case TYPE.ON_CALL:\n return 'handset-filled';\n case TYPE.ON_DEVICE:\n return 'generic-device-video-badge-filled';\n case TYPE.ON_MOBILE:\n return 'phone-badge-filled';\n case TYPE.PAUSE:\n return 'pause-badge-filled';\n case TYPE.PTO:\n return 'pto-presence-filled';\n case TYPE.PRESENTING:\n return 'share-screen-badge-filled';\n case TYPE.QUIET:\n return 'quiet-hours-presence-filled';\n case TYPE.SCHEDULED:\n return 'meetings-presence-badge-filled';\n case TYPE.ACTIVE:\n default:\n return 'active-presence-small-filled';\n }\n};\n", "import { CSSResult, html } from 'lit';\nimport { property, state } from 'lit/decorators.js';\nimport { Component } from '../../models';\nimport { DEFAULTS, SIZE } from './presence.constants';\nimport styles from './presence.styles';\nimport type { PresenceType, PresenceSize } from './presence.types';\nimport { getIconValue } from './presence.utils';\n\n/**\n * The `mdc-presence` component is a versatile UI element used to\n * display the presence status of a user or entity within an avatar component.\n *\n * This component is ideal for use within avatar UIs where the presence status\n * needs to be visually represented.\n *\n * @dependency mdc-icon\n *\n * @tagname mdc-presence\n *\n * @cssproperty --mdc-presence-active-background-color - The background color of the presence type active.\n * @cssproperty --mdc-presence-away-background-color - The background color of the presence type away.\n * @cssproperty --mdc-presence-away-calling-background-color - The background color of the presence type away-calling.\n * @cssproperty --mdc-presence-busy-background-color - The background color of the presence type busy.\n * @cssproperty --mdc-presence-dnd-background-color - The background color of the presence type dnd.\n * @cssproperty --mdc-presence-meeting-background-color - The background color of the presence type meeting.\n * @cssproperty --mdc-presence-on-call-background-color - The background color of the presence type on-call.\n * @cssproperty --mdc-presence-on-device-background-color - The background color of the presence type on-device.\n * @cssproperty --mdc-presence-on-mobile-background-color - The background color of the presence type on-mobile.\n * @cssproperty --mdc-presence-pause-background-color - The background color of the presence type pause.\n * @cssproperty --mdc-presence-pto-background-color - The background color of the presence type pto.\n * @cssproperty --mdc-presence-presenting-background-color - The background color of the presence type presenting.\n * @cssproperty --mdc-presence-quiet-background-color - The background color of the presence type quiet.\n * @cssproperty --mdc-presence-scheduled-background-color - The background color of the presence type scheduled.\n * @cssproperty --mdc-presence-overlay-background-color - The background color of the presence type overlay.\n */\nclass Presence extends Component {\n /**\n * Supported presence types:\n * - `active`\n * - `away`\n * - `away-calling`\n * - `busy`\n * - `dnd`\n * - `meeting`\n * - `on-call`\n * - `on-device`\n * - `on-mobile`\n * - `pause`\n * - `pto`\n * - `presenting`\n * - `quiet`\n * - `scheduled`\n * @default active\n */\n @property({ type: String, reflect: true })\n type: PresenceType = DEFAULTS.TYPE;\n\n /**\n * Acceptable values include:\n * - XX_SMALL\n * - X_SMALL\n * - SMALL\n * - MIDSIZE\n * - LARGE\n * - X_LARGE\n * - XX_LARGE\n *\n * Presence icons are minimum 14px in size, meaning XX_Small, X_Small and Small presence\n * icons will be no smaller than 14px.\n * @default small\n */\n @property({ type: String, reflect: true })\n size: PresenceSize = DEFAULTS.SIZE;\n\n /**\n * @internal\n * State to track the current icon type (previous type until the new icon is loaded)\n */\n @state()\n private currentIconType: PresenceType = DEFAULTS.TYPE;\n\n /**\n * Get the size of the presence icon based on the given size type\n */\n private get iconSize() {\n switch (this.size) {\n case SIZE.MIDSIZE:\n return 1.16125;\n case SIZE.LARGE:\n return 1.30625;\n case SIZE.X_LARGE:\n return 1.596875;\n case SIZE.XX_LARGE:\n return 2.25;\n case SIZE.XX_SMALL:\n case SIZE.X_SMALL:\n case SIZE.SMALL:\n default:\n this.size = DEFAULTS.SIZE;\n return 0.875;\n }\n }\n\n /**\n * Get the icon name based on the presence type\n */\n private get icon() {\n const iconName = getIconValue(this.type);\n if (iconName === 'active-presence-small-filled') {\n this.type = DEFAULTS.TYPE;\n }\n return iconName;\n }\n\n /**\n * Handles the successful load of an icon.\n * Sets the `currentIconType` property to match the `type` property.\n */\n private handleOnLoad(): void {\n this.currentIconType = this.type;\n }\n\n /**\n * Handles an error that occurs when loading an icon.\n */\n private handleOnError(): void {\n if (this.onerror) {\n this.onerror('There was a problem while fetching the icon. Please check the icon name and try again.');\n }\n }\n\n public override render() {\n return html`\n <div class=\"mdc-presence mdc-presence__${this.size}\">\n <mdc-icon\n class=\"mdc-presence-icon mdc-presence-icon__${this.currentIconType}\"\n name=\"${this.icon}\"\n size=\"${this.iconSize}\"\n @load=\"${this.handleOnLoad}\"\n @error=\"${this.handleOnError}\"\n ></mdc-icon>\n </div>\n `;\n }\n\n public static override styles: Array<CSSResult> = [...Component.styles, ...styles];\n}\n\nexport default Presence;\n", "import Presence from './presence.component';\nimport { TAG_NAME } from './presence.constants';\nimport '../icon';\n\nPresence.register(TAG_NAME);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n ['mdc-presence']: Presence\n }\n}\n\nexport default Presence;\n", "import { css } from 'lit';\n\nexport const fontsStyles = css`\n :host::part(text) {\n font-size: unset;\n font-weight: unset;\n line-height: unset;\n text-decoration: unset;\n text-transform: unset;\n white-space: inherit;\n overflow: inherit;\n text-overflow: inherit;\n }\n\n :host([type=\"headline-small-regular\"]) {\n font-size: var(--mds-font-apps-headline-small-regular-font-size);\n font-weight: var(--mds-font-apps-headline-small-regular-font-weight);\n line-height: var(--mds-font-apps-headline-small-regular-line-height);\n text-decoration: var(--mds-font-apps-headline-small-regular-text-decoration);\n text-transform: var(--mds-font-apps-headline-small-regular-text-case);\n }\n\n :host([type=\"headline-small-light\"]) {\n font-size: var(--mds-font-apps-headline-small-light-font-size);\n font-weight: var(--mds-font-apps-headline-small-light-font-weight);\n line-height: var(--mds-font-apps-headline-small-light-line-height);\n text-decoration: var(--mds-font-apps-headline-small-light-text-decoration);\n text-transform: var(--mds-font-apps-headline-small-light-text-case);\n }\n\n :host([type=\"heading-xlarge-bold\"]) {\n font-size: var(--mds-font-apps-heading-xlarge-bold-font-size);\n font-weight: var(--mds-font-apps-heading-xlarge-bold-font-weight);\n line-height: var(--mds-font-apps-heading-xlarge-bold-line-height);\n text-decoration: var(--mds-font-apps-heading-xlarge-bold-text-decoration);\n text-transform: var(--mds-font-apps-heading-xlarge-bold-text-case);\n }\n \n :host([type=\"heading-xlarge-medium\"]) {\n font-size: var(--mds-font-apps-heading-xlarge-medium-font-size);\n font-weight: var(--mds-font-apps-heading-xlarge-medium-font-weight);\n line-height: var(--mds-font-apps-heading-xlarge-medium-line-height);\n text-decoration: var(--mds-font-apps-heading-xlarge-medium-text-decoration);\n text-transform: var(--mds-font-apps-heading-xlarge-medium-text-case);\n }\n \n :host([type=\"heading-xlarge-regular\"]) {\n font-size: var(--mds-font-apps-heading-xlarge-regular-font-size);\n font-weight: var(--mds-font-apps-heading-xlarge-regular-font-weight);\n line-height: var(--mds-font-apps-heading-xlarge-regular-line-height);\n text-decoration: var(--mds-font-apps-heading-xlarge-regular-text-decoration);\n text-transform: var(--mds-font-apps-heading-xlarge-regular-text-case);\n }\n\n :host([type=\"heading-large-bold\"]) {\n font-size: var(--mds-font-apps-heading-large-bold-font-size);\n font-weight: var(--mds-font-apps-heading-large-bold-font-weight);\n line-height: var(--mds-font-apps-heading-large-bold-line-height);\n text-decoration: var(--mds-font-apps-heading-large-bold-text-decoration);\n text-transform: var(--mds-font-apps-heading-large-bold-text-case);\n }\n \n :host([type=\"heading-large-medium\"]) {\n font-size: var(--mds-font-apps-heading-large-medium-font-size);\n font-weight: var(--mds-font-apps-heading-large-medium-font-weight);\n line-height: var(--mds-font-apps-heading-large-medium-line-height);\n text-decoration: var(--mds-font-apps-heading-large-medium-text-decoration);\n text-transform: var(--mds-font-apps-heading-large-medium-text-case);\n }\n \n :host([type=\"heading-large-regular\"]) {\n font-size: var(--mds-font-apps-heading-large-regular-font-size);\n font-weight: var(--mds-font-apps-heading-large-regular-font-weight);\n line-height: var(--mds-font-apps-heading-large-regular-line-height);\n text-decoration: var(--mds-font-apps-heading-large-regular-text-decoration);\n text-transform: var(--mds-font-apps-heading-large-regular-text-case);\n }\n\n :host([type=\"heading-midsize-bold\"]) {\n font-size: var(--mds-font-apps-heading-midsize-bold-font-size);\n font-weight: var(--mds-font-apps-heading-midsize-bold-font-weight);\n line-height: var(--mds-font-apps-heading-midsize-bold-line-height);\n text-decoration: var(--mds-font-apps-heading-midsize-bold-text-decoration);\n text-transform: var(--mds-font-apps-heading-midsize-bold-text-case);\n }\n \n :host([type=\"heading-midsize-medium\"]) {\n font-size: var(--mds-font-apps-heading-midsize-medium-font-size);\n font-weight: var(--mds-font-apps-heading-midsize-medium-font-weight);\n line-height: var(--mds-font-apps-heading-midsize-medium-line-height);\n text-decoration: var(--mds-font-apps-heading-midsize-medium-text-decoration);\n text-transform: var(--mds-font-apps-heading-midsize-medium-text-case);\n }\n \n :host([type=\"heading-midsize-regular\"]) {\n font-size: var(--mds-font-apps-heading-midsize-regular-font-size);\n font-weight: var(--mds-font-apps-heading-midsize-regular-font-weight);\n line-height: var(--mds-font-apps-heading-midsize-regular-line-height);\n text-decoration: var(--mds-font-apps-heading-midsize-regular-text-decoration);\n text-transform: var(--mds-font-apps-heading-midsize-regular-text-case);\n }\n\n :host([type=\"heading-small-bold\"]) {\n font-size: var(--mds-font-apps-heading-small-bold-font-size);\n font-weight: var(--mds-font-apps-heading-small-bold-font-weight);\n line-height: var(--mds-font-apps-heading-small-bold-line-height);\n text-decoration: var(--mds-font-apps-heading-small-bold-text-decoration);\n text-transform: var(--mds-font-apps-heading-small-bold-text-case);\n }\n \n :host([type=\"heading-small-medium\"]) {\n font-size: var(--mds-font-apps-heading-small-medium-font-size);\n font-weight: var(--mds-font-apps-heading-small-medium-font-weight);\n line-height: var(--mds-font-apps-heading-small-medium-line-height);\n text-decoration: var(--mds-font-apps-heading-small-medium-text-decoration);\n text-transform: var(--mds-font-apps-heading-small-medium-text-case);\n }\n \n :host([type=\"heading-small-regular\"]) {\n font-size: var(--mds-font-apps-heading-small-regular-font-size);\n font-weight: var(--mds-font-apps-heading-small-regular-font-weight);\n line-height: var(--mds-font-apps-heading-small-regular-line-height);\n text-decoration: var(--mds-font-apps-heading-small-regular-text-decoration);\n text-transform: var(--mds-font-apps-heading-small-regular-text-case);\n }\n\n :host([type=\"body-large-bold\"]) {\n font-size: var(--mds-font-apps-body-large-bold-font-size);\n font-weight: var(--mds-font-apps-body-large-bold-font-weight);\n line-height: var(--mds-font-apps-body-large-bold-line-height);\n text-decoration: var(--mds-font-apps-body-large-bold-text-decoration);\n text-transform: var(--mds-font-apps-body-large-bold-text-case);\n }\n \n :host([type=\"body-large-medium-underline\"]) {\n font-size: var(--mds-font-apps-body-large-medium-underline-font-size);\n font-weight: var(--mds-font-apps-body-large-medium-underline-font-weight);\n line-height: var(--mds-font-apps-body-large-medium-underline-line-height);\n text-decoration: var(--mds-font-apps-body-large-medium-underline-text-decoration);\n text-transform: var(--mds-font-apps-body-large-medium-underline-text-case);\n }\n \n :host([type=\"body-large-medium\"]) {\n font-size: var(--mds-font-apps-body-large-medium-font-size);\n font-weight: var(--mds-font-apps-body-large-medium-font-weight);\n line-height: var(--mds-font-apps-body-large-medium-line-height);\n text-decoration: var(--mds-font-apps-body-large-medium-text-decoration);\n text-transform: var(--mds-font-apps-body-large-medium-text-case);\n }\n \n :host([type=\"body-large-regular-underline\"]) {\n font-size: var(--mds-font-apps-body-large-regular-underline-font-size);\n font-weight: var(--mds-font-apps-body-large-regular-underline-font-weight);\n line-height: var(--mds-font-apps-body-large-regular-underline-line-height);\n text-decoration: var(--mds-font-apps-body-large-regular-underline-text-decoration);\n text-transform: var(--mds-font-apps-body-large-regular-underline-text-case);\n }\n \n :host([type=\"body-large-regular\"]) {\n font-size: var(--mds-font-apps-body-large-regular-font-size);\n font-weight: var(--mds-font-apps-body-large-regular-font-weight);\n line-height: var(--mds-font-apps-body-large-regular-line-height);\n text-decoration: var(--mds-font-apps-body-large-regular-text-decoration);\n text-transform: var(--mds-font-apps-body-large-regular-text-case);\n }\n\n :host([type=\"body-midsize-bold\"]) {\n font-size: var(--mds-font-apps-body-midsize-bold-font-size);\n font-weight: var(--mds-font-apps-body-midsize-bold-font-weight);\n line-height: var(--mds-font-apps-body-midsize-bold-line-height);\n text-decoration: var(--mds-font-apps-body-midsize-bold-text-decoration);\n text-transform: var(--mds-font-apps-body-midsize-bold-text-case);\n }\n \n :host([type=\"body-midsize-medium-underline\"]) {\n font-size: var(--mds-font-apps-body-midsize-medium-underline-font-size);\n font-weight: var(--mds-font-apps-body-midsize-medium-underline-font-weight);\n line-height: var(--mds-font-apps-body-midsize-medium-underline-line-height);\n text-decoration: var(--mds-font-apps-body-midsize-medium-underline-text-decoration);\n text-transform: var(--mds-font-apps-body-midsize-medium-underline-text-case);\n }\n \n :host([type=\"body-midsize-medium\"]) {\n font-size: var(--mds-font-apps-body-midsize-medium-font-size);\n font-weight: var(--mds-font-apps-body-midsize-medium-font-weight);\n line-height: var(--mds-font-apps-body-midsize-medium-line-height);\n text-decoration: var(--mds-font-apps-body-midsize-medium-text-decoration);\n text-transform: var(--mds-font-apps-body-midsize-medium-text-case);\n }\n \n :host([type=\"body-midsize-regular-underline\"]) {\n font-size: var(--mds-font-apps-body-midsize-regular-underline-font-size);\n font-weight: var(--mds-font-apps-body-midsize-regular-underline-font-weight);\n line-height: var(--mds-font-apps-body-midsize-regular-underline-line-height);\n text-decoration: var(--mds-font-apps-body-midsize-regular-underline-text-decoration);\n text-transform: var(--mds-font-apps-body-midsize-regular-underline-text-case);\n }\n \n :host([type=\"body-midsize-regular\"]) {\n font-size: var(--mds-font-apps-body-midsize-regular-font-size);\n font-weight: var(--mds-font-apps-body-midsize-regular-font-weight);\n line-height: var(--mds-font-apps-body-midsize-regular-line-height);\n text-decoration: var(--mds-font-apps-body-midsize-regular-text-decoration);\n text-transform: var(--mds-font-apps-body-midsize-regular-text-case);\n }\n\n :host([type=\"body-small-bold\"]) {\n font-size: var(--mds-font-apps-body-small-bold-font-size);\n font-weight: var(--mds-font-apps-body-small-bold-font-weight);\n line-height: var(--mds-font-apps-body-small-bold-line-height);\n text-decoration: var(--mds-font-apps-body-small-bold-text-decoration);\n text-transform: var(--mds-font-apps-body-small-bold-text-case);\n }\n \n :host([type=\"body-small-medium-underline\"]) {\n font-size: var(--mds-font-apps-body-small-medium-underline-font-size);\n font-weight: var(--mds-font-apps-body-small-medium-underline-font-weight);\n line-height: var(--mds-font-apps-body-small-medium-underline-line-height);\n text-decoration: var(--mds-font-apps-body-small-medium-underline-text-decoration);\n text-transform: var(--mds-font-apps-body-small-medium-underline-text-case);\n }\n \n :host([type=\"body-small-medium\"]) {\n font-size: var(--mds-font-apps-body-small-medium-font-size);\n font-weight: var(--mds-font-apps-body-small-medium-font-weight);\n line-height: var(--mds-font-apps-body-small-medium-line-height);\n text-decoration: var(--mds-font-apps-body-small-medium-text-decoration);\n text-transform: var(--mds-font-apps-body-small-medium-text-case);\n }\n \n :host([type=\"body-small-regular-underline\"]) {\n font-size: var(--mds-font-apps-body-small-regular-underline-font-size);\n font-weight: var(--mds-font-apps-body-small-regular-underline-font-weight);\n line-height: var(--mds-font-apps-body-small-regular-underline-line-height);\n text-decoration: var(--mds-font-apps-body-small-regular-underline-text-decoration);\n text-transform: var(--mds-font-apps-body-small-regular-underline-text-case);\n }\n \n :host([type=\"body-small-regular\"]) {\n font-size: var(--mds-font-apps-body-small-regular-font-size);\n font-weight: var(--mds-font-apps-body-small-regular-font-weight);\n line-height: var(--mds-font-apps-body-small-regular-line-height);\n text-decoration: var(--mds-font-apps-body-small-regular-text-decoration);\n text-transform: var(--mds-font-apps-body-small-regular-text-case);\n }\n`;\n", "import { css } from 'lit';\nimport { fontsStyles } from './fonts.styles';\n\nconst styles = [\n css`\n :host {\n --mdc-text-font-family: var(--mdc-themeprovider-font-family);\n\n display: block;\n font-family: var(--mdc-text-font-family);\n }\n `,\n // type specific font styles:\n fontsStyles,\n];\n\nexport default styles;\n", "import { CSSResult, html } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport styles from './text.styles';\nimport { Component } from '../../models';\nimport { DEFAULTS, VALID_TEXT_TAGS } from './text.constants';\nimport type { TextType, TagName } from './text.types';\n\n/**\n * Text component for creating styled text elements.\n * It has to be mounted within the ThemeProvider to access color and font tokens.\n *\n * The `type` attribute allows changing the text style.\n * The `tagname` attribute allows changing the tag name of the text element.\n * The default tag name is `p`.\n *\n * The `tagname` attribute should be a valid HTML tag name.\n * If the `tagname` attribute is not a valid HTML tag name, the default tag name will be used.\n *\n * The styling is applied based on the `type` attribute.\n *\n * @tagname mdc-text\n * @slot - Default slot for text content\n *\n * @csspart text - The text element\n */\nclass Text extends Component {\n /**\n * Specifies the text style to be applied.\n *\n * Acceptable values include:\n *\n * - 'body-small-regular'\n * - 'body-small-medium'\n * - 'body-small-bold'\n * - 'body-midsize-regular'\n * - 'body-midsize-medium'\n * - 'body-midsize-bold'\n * - 'body-large-regular'\n * - 'body-large-medium'\n * - 'body-large-bold'\n * - 'body-small-regular-underline'\n * - 'body-small-medium-underline'\n * - 'body-midsize-regular-underline'\n * - 'body-midsize-medium-underline'\n * - 'body-large-regular-underline'\n * - 'body-large-medium-underline'\n * - 'heading-small-regular'\n * - 'heading-small-medium'\n * - 'heading-small-bold'\n * - 'heading-midsize-regular'\n * - 'heading-midsize-medium'\n * - 'heading-midsize-bold'\n * - 'heading-large-regular'\n * - 'heading-large-medium'\n * - 'heading-large-bold'\n * - 'heading-xlarge-regular'\n * - 'heading-xlarge-medium'\n * - 'heading-xlarge-bold'\n * - 'headline-small-light'\n * - 'headline-small-regular'\n * @default body-large-regular\n */\n @property({ attribute: 'type', reflect: true, type: String })\n public type: TextType = DEFAULTS.TYPE;\n\n /**\n * Specifies the HTML tag name for the text element. The default tag name is `p`.\n * This attribute is optional. When set, it changes the tag name of the text element.\n *\n * Acceptable values include:\n *\n * - 'h1'\n * - 'h2'\n * - 'h3'\n * - 'h4'\n * - 'h5'\n * - 'h6'\n * - 'p'\n * - 'small'\n * - 'span'\n * - 'div'\n *\n * For instance, setting this attribute to `h2` will render the text element as an `h2` element.\n * Note that the styling is determined by the `type` attribute.\n */\n @property({ attribute: 'tagname', reflect: true, type: String })\n public tagname?: TagName = DEFAULTS.TEXT_ELEMENT_TAGNAME;\n\n public override render() {\n // Lit does not support dynamically changing values for the tag name of a custom element.\n // Read more: https://lit.dev/docs/templates/expressions/#invalid-locations\n switch (this.tagname) {\n case VALID_TEXT_TAGS.H1: return html`<h1 part=${DEFAULTS.CSS_PART_TEXT}><slot></slot></h1>`;\n case VALID_TEXT_TAGS.H2: return html`<h2 part=${DEFAULTS.CSS_PART_TEXT}><slot></slot></h2>`;\n case VALID_TEXT_TAGS.H3: return html`<h3 part=${DEFAULTS.CSS_PART_TEXT}><slot></slot></h3>`;\n case VALID_TEXT_TAGS.H4: return html`<h4 part=${DEFAULTS.CSS_PART_TEXT}><slot></slot></h4>`;\n case VALID_TEXT_TAGS.H5: return html`<h5 part=${DEFAULTS.CSS_PART_TEXT}><slot></slot></h5>`;\n case VALID_TEXT_TAGS.H6: return html`<h6 part=${DEFAULTS.CSS_PART_TEXT}><slot></slot></h6>`;\n case VALID_TEXT_TAGS.DIV: return html`<div part=${DEFAULTS.CSS_PART_TEXT}><slot></slot></div>`;\n case VALID_TEXT_TAGS.SPAN: return html`<span part=${DEFAULTS.CSS_PART_TEXT}><slot></slot></span>`;\n case VALID_TEXT_TAGS.SMALL: return html`<small part=${DEFAULTS.CSS_PART_TEXT}><slot></slot></small>`;\n case VALID_TEXT_TAGS.P:\n default: return html`<p part=${DEFAULTS.CSS_PART_TEXT}><slot></slot></p>`;\n }\n }\n\n public static override styles: Array<CSSResult> = [...Component.styles, ...styles];\n}\n\nexport default Text;\n", "import Text from './text.component';\nimport { TAG_NAME } from './text.constants';\n\nText.register(TAG_NAME);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n ['mdc-text']: Text\n }\n}\n\nexport default Text;\n", "import Avatar from './avatar.component';\nimport { TAG_NAME } from './avatar.constants';\nimport '../icon';\nimport '../presence';\nimport '../text';\n\nAvatar.register(TAG_NAME);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n ['mdc-avatar']: Avatar\n }\n}\n\nexport default Avatar;\n", "import utils from '../../utils/tag-name';\n\nconst TAG_NAME = utils.constructTagName('buttonsimple');\n\nconst BUTTON_SIZES = {\n 20: 20,\n 24: 24,\n 28: 28,\n 32: 32,\n 40: 40,\n 48: 48,\n 52: 52,\n 64: 64,\n 72: 72,\n 88: 88,\n 124: 124,\n} as const;\n\nconst BUTTON_TYPE = {\n BUTTON: 'button',\n SUBMIT: 'submit',\n RESET: 'reset',\n} as const;\n\nconst DEFAULTS = {\n SIZE: BUTTON_SIZES[32],\n TYPE: BUTTON_TYPE.BUTTON,\n ROLE: 'button',\n};\n\nexport {\n TAG_NAME,\n DEFAULTS,\n BUTTON_TYPE,\n BUTTON_SIZES,\n};\n", "import utils from '../../utils/tag-name';\nimport { BUTTON_TYPE } from '../buttonsimple/buttonsimple.constants';\n\nconst TAG_NAME = utils.constructTagName('button');\n\nconst BUTTON_VARIANTS = {\n PRIMARY: 'primary',\n SECONDARY: 'secondary',\n TERTIARY: 'tertiary',\n} as const;\n\nconst PILL_BUTTON_SIZES = {\n 40: 40,\n 32: 32,\n 28: 28,\n 24: 24,\n} as const;\n\nconst ICON_BUTTON_SIZES = {\n 64: 64,\n 52: 52,\n 20: 20,\n ...PILL_BUTTON_SIZES,\n} as const;\n\nconst BUTTON_COLORS = {\n POSITIVE: 'positive',\n NEGATIVE: 'negative',\n ACCENT: 'accent',\n PROMOTIONAL: 'promotional',\n DEFAULT: 'default',\n} as const;\n\nconst BUTTON_TYPE_INTERNAL = {\n PILL: 'pill',\n ICON: 'icon',\n PILL_WITH_ICON: 'pill-with-icon',\n} as const;\n\nconst DEFAULTS = {\n VARIANT: BUTTON_VARIANTS.PRIMARY,\n SIZE: PILL_BUTTON_SIZES[32],\n COLOR: BUTTON_COLORS.DEFAULT,\n TYPE_INTERNAL: BUTTON_TYPE_INTERNAL.ICON,\n TYPE: BUTTON_TYPE.BUTTON,\n};\n\nexport {\n TAG_NAME,\n DEFAULTS,\n BUTTON_VARIANTS,\n PILL_BUTTON_SIZES,\n ICON_BUTTON_SIZES,\n BUTTON_COLORS,\n BUTTON_TYPE_INTERNAL,\n BUTTON_TYPE,\n};\n", "import { LitElement } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport type { Constructor } from './index.types';\n\nexport interface DisabledMixinInterface {\n disabled: boolean;\n}\n\nexport const DisabledMixin = <T extends Constructor<LitElement>>(\n superClass: T,\n) => {\n class InnerMixinClass extends superClass {\n /**\n * Indicates whether the component is disabled.\n * When the component is disabled for user interaction; it is not focusable or clickable.\n * @default false\n */\n @property({ reflect: true, type: Boolean }) disabled = false;\n }\n // Cast return type to your mixin's interface intersected with the superClass type\n return InnerMixinClass as Constructor<DisabledMixinInterface> & T;\n};\n", "import { LitElement } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport type { Constructor } from './index.types';\n\nexport interface TabIndexMixinInterface {\n tabIndex: number;\n}\n\nexport const TabIndexMixin = <T extends Constructor<LitElement>>(\n superClass: T,\n) => {\n class InnerMixinClass extends superClass {\n /**\n * This property specifies the tab order of the element.\n * @default 0\n */\n @property({ reflect: true, type: Number }) override tabIndex = 0;\n }\n // Cast return type to your mixin's interface intersected with the superClass type\n return InnerMixinClass as Constructor<TabIndexMixinInterface> & T;\n};\n", "import { css } from 'lit';\nimport { hostFitContentStyles, hostFocusRingStyles } from '../../utils/styles';\n\nconst styles = [hostFitContentStyles, css`\n :host {\n border: 0.0625rem solid transparent;\n cursor: pointer;\n \n background-color: var(--mds-color-theme-text-primary-normal); \n color: var(--mds-color-theme-inverted-text-secondary-normal);\n font-size: var(--mds-font-apps-body-midsize-regular-font-size);\n outline: none;\n\n --mdc-button-height-size-124: 7.75rem;\n --mdc-button-height-size-88: 5.5rem;\n --mdc-button-height-size-72: 4.5rem;\n --mdc-button-height-size-64: 4rem;\n --mdc-button-height-size-52: 3.25rem;\n --mdc-button-height-size-40: 2.5rem;\n --mdc-button-height-size-32: 2rem;\n --mdc-button-height-size-28: 1.75rem;\n --mdc-button-height-size-24: 1.5rem;\n --mdc-button-height-size-20: 1.25rem;\n }\n \n :host([disabled]), :host([soft-disabled]){\n background-color: var(--mds-color-theme-text-primary-disabled);\n }\n :host([size=\"124\"]){\n height: var(--mdc-button-height-size-124);\n }\n :host([size=\"88\"]){\n height: var(--mdc-button-height-size-88);\n }\n :host([size=\"72\"]){\n height: var(--mdc-button-height-size-72);\n }\n :host([size=\"64\"]){\n height: var(--mdc-button-height-size-64);\n }\n :host([size=\"52\"]){\n height: var(--mdc-button-height-size-52);\n }\n :host([size=\"40\"]){\n height: var(--mdc-button-height-size-40);\n }\n :host([size=\"32\"]){\n height: var(--mdc-button-height-size-32);\n }\n :host([size=\"28\"]){\n height: var(--mdc-button-height-size-28);\n font-size: var(--mds-font-size-body-midsize);\n }\n :host([size=\"24\"]){\n height: var(--mdc-button-height-size-24);\n }\n :host([size=\"20\"]){\n height: var(--mdc-button-height-size-20);\n }\n`, ...hostFocusRingStyles()];\n\nexport default styles;\n", "import type { PropertyValues } from 'lit';\nimport { CSSResult, html } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport { Component } from '../../models';\nimport { DisabledMixin } from '../../utils/mixins/DisabledMixin';\nimport { TabIndexMixin } from '../../utils/mixins/TabIndexMixin';\nimport { BUTTON_TYPE, DEFAULTS } from './buttonsimple.constants';\nimport styles from './buttonsimple.styles';\nimport type { ButtonSize, ButtonType } from './buttonsimple.types';\n\n/**\n * `mdc-buttonsimple` is a component that can be configured in various ways to suit different use cases.\n * It is used as an internal component and is not intended to be used directly by consumers.\n * Consumers should use the `mdc-button` component instead.\n *\n * @event click - (React: onClick) This event is dispatched when the button is clicked.\n * @event keydown - (React: onKeyDown) This event is dispatched when a key is pressed down on the button.\n * @event keyup - (React: onKeyUp) This event is dispatched when a key is released on the button.\n * @event focus - (React: onFocus) This event is dispatched when the button receives focus.\n *\n * @tagname mdc-buttonsimple\n */\nclass Buttonsimple extends TabIndexMixin(DisabledMixin(Component)) {\n /**\n * The button's active state indicates whether it is currently toggled on (active) or off (inactive).\n * When the active state is true, the button is considered to be in an active state, meaning it is toggled on.\n * Conversely, when the active state is false, the button is in an inactive state, indicating it is toggled off.\n * @default false\n */\n @property({ type: Boolean, reflect: true }) active = false;\n\n /**\n * Indicates whether the button is soft disabled.\n * When set to `true`, the button appears visually disabled but still allows\n * focus, click, and keyboard actions to be passed through.\n *\n * **Important:** When using soft disabled, consumers must ensure that\n * the button behaves like a disabled button, allowing only focus and\n * preventing any interactions (clicks or keyboard actions) from triggering unintended actions.\n * @default false\n */\n @property({ type: Boolean, attribute: 'soft-disabled' }) softDisabled = false;\n\n /**\n * Simplebutton size is a super set of all the sizes supported by children components.\n * @default 32\n */\n @property({ type: Number, reflect: true }) size: ButtonSize = DEFAULTS.SIZE;\n\n /**\n * This property defines the ARIA role for the element. By default, it is set to 'button'.\n * Consumers should override this role when:\n * - The element is being used in a context where a different role is more appropriate.\n * - Custom behaviors are implemented that require a specific ARIA role for accessibility purposes.\n * @default button\n */\n @property({ type: String, reflect: true }) override role = DEFAULTS.ROLE;\n\n /**\n * This property defines the type attribute for the button element.\n * The type attribute specifies the behavior of the button when it is clicked.\n * - **submit**: The button submits the form data to the server.\n * - **reset**: The button resets the form data to its initial state.\n * - **button**: The button does nothing when clicked.\n * @default button\n */\n @property({ reflect: true })\n type: ButtonType = DEFAULTS.TYPE;\n\n /**\n * @internal\n */\n private prevTabindex = 0;\n\n /** @internal */\n static formAssociated = true;\n\n /** @internal */\n private internals: ElementInternals;\n\n /** @internal */\n get form(): HTMLFormElement | null {\n return this.internals.form;\n }\n\n constructor() {\n super();\n /** @internal */\n this.internals = this.attachInternals();\n this.addEventListener('click', this.executeAction.bind(this));\n this.addEventListener('keydown', this.handleKeyDown.bind(this));\n this.addEventListener('keyup', this.handleKeyUp.bind(this));\n this.addEventListener('blur', this.handleBlur.bind(this));\n }\n\n public override update(changedProperties: PropertyValues): void {\n super.update(changedProperties);\n\n if (changedProperties.has('disabled')) {\n this.setDisabled(this, this.disabled);\n }\n if (changedProperties.has('softDisabled')) {\n this.setSoftDisabled(this, this.softDisabled);\n }\n if (changedProperties.has('active')) {\n this.setActive(this, this.active);\n }\n }\n\n protected executeAction() {\n if (this.type === BUTTON_TYPE.SUBMIT && this.form) {\n this.form.requestSubmit();\n }\n\n if (this.type === BUTTON_TYPE.RESET && this.form) {\n this.form.reset();\n }\n }\n\n /**\n * Sets the aria-pressed attribute based on the active state of the button.\n * @param element - The button element\n * @param active - The active state of the element\n */\n protected setActive(element: HTMLElement, active: boolean) {\n if (active) {\n element.setAttribute('aria-pressed', 'true');\n } else {\n element.removeAttribute('aria-pressed');\n }\n }\n\n /**\n * Sets the soft-disabled attribute for the button.\n * When soft-disabled, the button looks to be disabled but remains focusable and clickable.\n * Also sets/removes aria-disabled attribute.\n *\n * @param element - The button element.\n * @param softDisabled - The soft-disabled state.\n */\n private setSoftDisabled(element: HTMLElement, softDisabled: boolean) {\n if (softDisabled) {\n element.setAttribute('aria-disabled', 'true');\n } else {\n element.removeAttribute('aria-disabled');\n }\n }\n\n /**\n * Sets the disabled attribute for the button.\n * When disabled, the button is not focusable or clickable, and tabindex is set to -1.\n * The previous tabindex is stored and restored when enabled.\n * Also sets/removes aria-disabled attribute.\n *\n * @param element - The button element.\n * @param disabled - The disabled state.\n */\n private setDisabled(element: HTMLElement, disabled: boolean) {\n if (disabled) {\n element.setAttribute('aria-disabled', 'true');\n this.prevTabindex = this.tabIndex;\n this.tabIndex = -1;\n } else {\n if (this.tabIndex === -1) {\n this.tabIndex = this.prevTabindex;\n }\n element.removeAttribute('aria-disabled');\n }\n }\n\n private triggerClickEvent() {\n const clickEvent = new MouseEvent('click', {\n bubbles: true,\n cancelable: true,\n view: window,\n });\n this.dispatchEvent(clickEvent);\n }\n\n /**\n * In case the button is pressed and the focus is lost while pressing,\n * the pressed class is removed.\n */\n private handleBlur() {\n if (this.classList.contains('pressed')) {\n this.classList.remove('pressed');\n }\n }\n\n /**\n * Handles the keydown event on the button.\n * If the key is 'Enter' or 'Space', the button is pressed.\n * If the key is 'Enter', the button is pressed. The native HTML button works in the same way.\n *\n * @param event - The keyboard event.\n */\n private handleKeyDown(event: KeyboardEvent) {\n if (['Enter', ' '].includes(event.key)) {\n this.classList.add('pressed');\n if (event.key === 'Enter') {\n this.triggerClickEvent();\n }\n }\n }\n\n /**\n * Handles the keyup event on the button.\n * If the key is 'Enter' or 'Space', the button is clicked.\n * If the key is 'Space', the button is pressed. The native HTML button works in the same way.\n *\n * @param event - The keyboard event.\n */\n private handleKeyUp(event: KeyboardEvent) {\n if (['Enter', ' '].includes(event.key)) {\n this.classList.remove('pressed');\n if (event.key === ' ') {\n this.triggerClickEvent();\n }\n }\n }\n\n public override render() {\n return html`\n <slot></slot>\n `;\n }\n\n public static override styles: Array<CSSResult> = [...Component.styles, ...styles];\n}\n\nexport default Buttonsimple;\n", "import { css } from 'lit';\nimport { hostFitContentStyles, hostFocusRingStyles } from '../../utils/styles';\n\nconst styles = [hostFitContentStyles, css`\n :host {\n padding: unset;\n margin: unset;\n outline: none;\n border-radius: 0.25rem;\n }\n`, ...hostFocusRingStyles()];\n\nexport default styles;\n", "import type { PropertyValues } from 'lit';\nimport { CSSResult, html } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport { AvatarComponentMixin } from '../../utils/mixins/AvatarComponentMixin';\nimport { IconNameMixin } from '../../utils/mixins/IconNameMixin';\nimport { AVATAR_SIZE, DEFAULTS } from '../avatar/avatar.constants';\nimport type { AvatarSize } from '../avatar/avatar.types';\nimport { DEFAULTS as BUTTON_DEFAULTS } from '../button/button.constants';\nimport Buttonsimple from '../buttonsimple/buttonsimple.component';\nimport styles from './avatarbutton.styles';\n\n/**\n * The `mdc-avatarbutton` component is an interactable version of the `mdc-avatar` component.\n *\n * This component is made by extending `buttonsimple` class.\n * The button component acts as a wrapper for the avatar component.\n *\n * @dependency mdc-avatar\n *\n * @event click - (React: onClick) This event is dispatched when the avatarbutton is clicked.\n * @event keydown - (React: onKeyDown) This event is dispatched when a key is pressed down on the avatarbutton.\n * @event keyup - (React: onKeyUp) This event is dispatched when a key is released on the avatarbutton.\n * @event focus - (React: onFocus) This event is dispatched when the avatarbutton receives focus.\n *\n * @tagname mdc-avatarbutton\n */\nclass AvatarButton extends AvatarComponentMixin(IconNameMixin(Buttonsimple)) {\n /**\n * Aria-label attribute to be set for accessibility\n */\n @property({ type: String, attribute: 'aria-label' })\n override ariaLabel: string | null = null;\n\n constructor() {\n super();\n\n this.active = undefined as unknown as boolean;\n this.disabled = undefined as unknown as boolean;\n this.softDisabled = undefined as unknown as boolean;\n this.role = 'button';\n this.type = BUTTON_DEFAULTS.TYPE;\n }\n\n override update(changedProperties: PropertyValues): void {\n super.update(changedProperties);\n if (changedProperties.has('size')) {\n this.setSize(this.size);\n }\n }\n\n private setSize(size: AvatarSize) {\n this.setAttribute('size', Object.values(AVATAR_SIZE).includes(size) ? `${size}` : DEFAULTS.SIZE.toString());\n }\n\n public override render() {\n return html`\n <mdc-avatar\n slot=\"prefixIcon\"\n ?is-typing=\"${this.isTyping}\"\n counter=\"${ifDefined(this.counter)}\"\n icon-name=\"${ifDefined(this.iconName)}\"\n initials=\"${ifDefined(this.initials)}\"\n presence=\"${ifDefined(this.presence)}\"\n size=\"${ifDefined(this.size)}\"\n src=\"${ifDefined(this.src)}\"\n ></mdc-avatar>\n `;\n }\n\n public static override styles: Array<CSSResult> = [...styles];\n}\n\nexport default AvatarButton;\n", "import utils from '../../utils/tag-name';\n\nconst TAG_NAME = utils.constructTagName('avatarbutton');\n\nexport { TAG_NAME };\n", "import AvatarButton from './avatarbutton.component';\nimport { TAG_NAME } from './avatarbutton.constants';\nimport '../avatar';\n\nAvatarButton.register(TAG_NAME);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n ['mdc-avatarbutton']: AvatarButton\n }\n}\n\nexport default AvatarButton;\n", "/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\n\nimport {Disconnectable, Part} from './lit-html.js';\n\nexport {\n AttributePart,\n BooleanAttributePart,\n ChildPart,\n ElementPart,\n EventPart,\n Part,\n PropertyPart,\n} from './lit-html.js';\n\nexport interface DirectiveClass {\n new (part: PartInfo): Directive;\n}\n\n/**\n * This utility type extracts the signature of a directive class's render()\n * method so we can use it for the type of the generated directive function.\n */\nexport type DirectiveParameters<C extends Directive> = Parameters<C['render']>;\n\n/**\n * A generated directive function doesn't evaluate the directive, but just\n * returns a DirectiveResult object that captures the arguments.\n */\nexport interface DirectiveResult<C extends DirectiveClass = DirectiveClass> {\n /**\n * This property needs to remain unminified.\n * @internal\n */\n ['_$litDirective$']: C;\n /** @internal */\n values: DirectiveParameters<InstanceType<C>>;\n}\n\nexport const PartType = {\n ATTRIBUTE: 1,\n CHILD: 2,\n PROPERTY: 3,\n BOOLEAN_ATTRIBUTE: 4,\n EVENT: 5,\n ELEMENT: 6,\n} as const;\n\nexport type PartType = (typeof PartType)[keyof typeof PartType];\n\nexport interface ChildPartInfo {\n readonly type: typeof PartType.CHILD;\n}\n\nexport interface AttributePartInfo {\n readonly type:\n | typeof PartType.ATTRIBUTE\n | typeof PartType.PROPERTY\n | typeof PartType.BOOLEAN_ATTRIBUTE\n | typeof PartType.EVENT;\n readonly strings?: ReadonlyArray<string>;\n readonly name: string;\n readonly tagName: string;\n}\n\nexport interface ElementPartInfo {\n readonly type: typeof PartType.ELEMENT;\n}\n\n/**\n * Information about the part a directive is bound to.\n *\n * This is useful for checking that a directive is attached to a valid part,\n * such as with directive that can only be used on attribute bindings.\n */\nexport type PartInfo = ChildPartInfo | AttributePartInfo | ElementPartInfo;\n\n/**\n * Creates a user-facing directive function from a Directive class. This\n * function has the same parameters as the directive's render() method.\n */\nexport const directive =\n <C extends DirectiveClass>(c: C) =>\n (...values: DirectiveParameters<InstanceType<C>>): DirectiveResult<C> => ({\n // This property needs to remain unminified.\n ['_$litDirective$']: c,\n values,\n });\n\n/**\n * Base class for creating custom directives. Users should extend this class,\n * implement `render` and/or `update`, and then pass their subclass to\n * `directive`.\n */\nexport abstract class Directive implements Disconnectable {\n //@internal\n __part!: Part;\n //@internal\n __attributeIndex: number | undefined;\n //@internal\n __directive?: Directive;\n\n //@internal\n _$parent!: Disconnectable;\n\n // These will only exist on the AsyncDirective subclass\n //@internal\n _$disconnectableChildren?: Set<Disconnectable>;\n // This property needs to remain unminified.\n //@internal\n ['_$notifyDirectiveConnectionChanged']?(isConnected: boolean): void;\n\n constructor(_partInfo: PartInfo) {}\n\n // See comment in Disconnectable interface for why this is a getter\n get _$isConnected() {\n return this._$parent._$isConnected;\n }\n\n /** @internal */\n _$initialize(\n part: Part,\n parent: Disconnectable,\n attributeIndex: number | undefined,\n ) {\n this.__part = part;\n this._$parent = parent;\n this.__attributeIndex = attributeIndex;\n }\n /** @internal */\n _$resolve(part: Part, props: Array<unknown>): unknown {\n return this.update(part, props);\n }\n\n abstract render(...props: Array<unknown>): unknown;\n\n update(_part: Part, props: Array<unknown>): unknown {\n return this.render(...props);\n }\n}\n", "/**\n * @license\n * Copyright 2018 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\n\nimport {AttributePart, noChange} from '../lit-html.js';\nimport {\n directive,\n Directive,\n DirectiveParameters,\n PartInfo,\n PartType,\n} from '../directive.js';\n\n/**\n * A key-value set of class names to truthy values.\n */\nexport interface ClassInfo {\n readonly [name: string]: string | boolean | number;\n}\n\nclass ClassMapDirective extends Directive {\n /**\n * Stores the ClassInfo object applied to a given AttributePart.\n * Used to unset existing values when a new ClassInfo object is applied.\n */\n private _previousClasses?: Set<string>;\n private _staticClasses?: Set<string>;\n\n constructor(partInfo: PartInfo) {\n super(partInfo);\n if (\n partInfo.type !== PartType.ATTRIBUTE ||\n partInfo.name !== 'class' ||\n (partInfo.strings?.length as number) > 2\n ) {\n throw new Error(\n '`classMap()` can only be used in the `class` attribute ' +\n 'and must be the only part in the attribute.',\n );\n }\n }\n\n render(classInfo: ClassInfo) {\n // Add spaces to ensure separation from static classes\n return (\n ' ' +\n Object.keys(classInfo)\n .filter((key) => classInfo[key])\n .join(' ') +\n ' '\n );\n }\n\n override update(part: AttributePart, [classInfo]: DirectiveParameters<this>) {\n // Remember dynamic classes on the first render\n if (this._previousClasses === undefined) {\n this._previousClasses = new Set();\n if (part.strings !== undefined) {\n this._staticClasses = new Set(\n part.strings\n .join(' ')\n .split(/\\s/)\n .filter((s) => s !== ''),\n );\n }\n for (const name in classInfo) {\n if (classInfo[name] && !this._staticClasses?.has(name)) {\n this._previousClasses.add(name);\n }\n }\n return this.render(classInfo);\n }\n\n const classList = part.element.classList;\n\n // Remove old classes that no longer apply\n for (const name of this._previousClasses) {\n if (!(name in classInfo)) {\n classList.remove(name);\n this._previousClasses!.delete(name);\n }\n }\n\n // Add or remove classes based on their classMap value\n for (const name in classInfo) {\n // We explicitly want a loose truthy check of `value` because it seems\n // more convenient that '' and 0 are skipped.\n const value = !!classInfo[name];\n if (\n value !== this._previousClasses.has(name) &&\n !this._staticClasses?.has(name)\n ) {\n if (value) {\n classList.add(name);\n this._previousClasses.add(name);\n } else {\n classList.remove(name);\n this._previousClasses.delete(name);\n }\n }\n }\n return noChange;\n }\n}\n\n/**\n * A directive that applies dynamic CSS classes.\n *\n * This must be used in the `class` attribute and must be the only part used in\n * the attribute. It takes each property in the `classInfo` argument and adds\n * the property name to the element's `classList` if the property value is\n * truthy; if the property value is falsy, the property name is removed from\n * the element's `class`.\n *\n * For example `{foo: bar}` applies the class `foo` if the value of `bar` is\n * truthy.\n *\n * @param classInfo\n */\nexport const classMap = directive(ClassMapDirective);\n\n/**\n * The type of the class that powers this directive. Necessary for naming the\n * directive's return type.\n */\nexport type {ClassMapDirective};\n", "import utils from '../../utils/tag-name';\n\nconst TAG_NAME = utils.constructTagName('badge');\n\nconst TYPE = {\n DOT: 'dot',\n ICON: 'icon',\n COUNTER: 'counter',\n SUCCESS: 'success',\n WARNING: 'warning',\n ERROR: 'error',\n} as const;\n\nconst ICON_NAMES_LIST = {\n SUCCESS_ICON_NAME: 'check-circle-badge-filled',\n WARNING_ICON_NAME: 'warning-badge-filled',\n ERROR_ICON_NAME: 'error-legacy-badge-filled',\n} as const;\n\nconst ICON_VARIANT = {\n PRIMARY: 'primary',\n SECONDARY: 'secondary',\n} as const;\n\nconst ICON_STATE = {\n SUCCESS: 'success',\n WARNING: 'warning',\n ERROR: 'error',\n} as const;\n\nconst BACKGROUND_STYLES = {\n ...ICON_VARIANT,\n ...ICON_STATE,\n} as const;\n\nconst DEFAULTS = {\n TYPE: TYPE.DOT,\n MAX_COUNTER: 99,\n MAX_COUNTER_LIMIT: 999,\n VARIANT: ICON_VARIANT.PRIMARY,\n ICON_SIZE: 1,\n} as const;\n\nexport { TAG_NAME, DEFAULTS, TYPE, ICON_STATE, ICON_VARIANT, ICON_NAMES_LIST, BACKGROUND_STYLES };\n", "import { css } from 'lit';\nimport { hostFitContentStyles } from '../../utils/styles';\n\nconst styles = [\n hostFitContentStyles,\n css`\n :host {\n --mdc-badge-primary-foreground-color: var(--mds-color-theme-common-text-primary-normal);\n --mdc-badge-primary-background-color: var(--mds-color-theme-background-accent-normal);\n\n --mdc-badge-secondary-foreground-color: var(--mds-color-theme-text-secondary-normal);\n --mdc-badge-secondary-background-color: var(--mds-color-theme-background-alert-default-normal);\n\n --mdc-badge-success-foreground-color: var(--mds-color-theme-text-success-normal);\n --mdc-badge-success-background-color: var(--mds-color-theme-background-alert-success-normal);\n \n --mdc-badge-warning-foreground-color: var(--mds-color-theme-text-warning-normal);\n --mdc-badge-warning-background-color: var(--mds-color-theme-background-alert-warning-normal);\n \n --mdc-badge-error-foreground-color: var(--mds-color-theme-text-error-normal);\n --mdc-badge-error-background-color: var(--mds-color-theme-background-alert-error-normal);\n \n --mdc-badge-overlay-background-color: var(--mds-color-theme-background-solid-primary-normal);\n \n color: var(--mdc-badge-primary-foreground-color);\n }\n .mdc-badge-overlay {\n outline: 0.0625rem solid var(--mdc-badge-overlay-background-color);\n }\n .mdc-badge-text {\n padding: 0 0.25rem;\n border-radius: 6.25rem;\n min-width: 1rem;\n display: flex;\n justify-content: center;\n background-color: var(--mdc-badge-primary-background-color);\n }\n .mdc-badge-dot {\n width: 0.75rem;\n height: 0.75rem;\n border-radius: 50%;\n background-color: var(--mdc-badge-primary-background-color);\n }\n .mdc-badge-icon {\n padding: 2px;\n border-radius: 50%;\n }\n .mdc-badge-icon__primary {\n background-color: var(--mdc-badge-primary-background-color);\n color: var(--mdc-badge-primary-foreground-color);\n }\n .mdc-badge-icon__success {\n background-color: var(--mdc-badge-success-background-color);\n color: var(--mdc-badge-success-foreground-color);\n }\n .mdc-badge-icon__warning {\n background-color: var(--mdc-badge-warning-background-color);\n color: var(--mdc-badge-warning-foreground-color);\n }\n .mdc-badge-icon__error {\n background-color: var(--mdc-badge-error-background-color);\n color: var(--mdc-badge-error-foreground-color);\n }\n .mdc-badge-icon__secondary {\n background-color: var(--mdc-badge-secondary-background-color);\n color: var(--mdc-badge-secondary-foreground-color);\n }\n\n /* High Contrast Mode */\n @media (forced-colors: active) {\n .mdc-badge-dot, .mdc-badge-icon, .mdc-badge-text {\n outline: 0.125rem solid;\n }\n }\n `,\n];\n\nexport default styles;\n", "import type { PropertyValues, TemplateResult } from 'lit';\nimport { CSSResult, html } from 'lit';\nimport { classMap } from 'lit-html/directives/class-map.js';\nimport { property } from 'lit/decorators.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport { Component } from '../../models';\nimport { IconNameMixin } from '../../utils/mixins/IconNameMixin';\nimport type { IconNames } from '../icon/icon.types';\nimport { TYPE as FONT_TYPE, VALID_TEXT_TAGS } from '../text/text.constants';\nimport { DEFAULTS, ICON_NAMES_LIST, ICON_STATE, ICON_VARIANT, TYPE as BADGE_TYPE } from './badge.constants';\nimport styles from './badge.styles';\nimport type { BadgeType, IconVariant } from './badge.types';\n\n/**\n * The `mdc-badge` component is a versatile UI element used to\n * display dot, icons, counters, success, warning and error type badge.\n *\n * Supported badge types:\n * - `dot`: Displays a dot notification badge with a blue color.\n * - `icon`: Displays a badge with a specified icon using the `icon-name` attribute.\n * - `counter`: Displays a badge with a counter value. If the counter exceeds the `max-counter`,\n * it shows `maxCounter+`. The maximum value of the counter is 999 and anything above that will be set to `999+`.\n * - `success`: Displays a success badge with a check circle icon and green color.\n * - `warning`: Displays a warning badge with a warning icon and yellow color.\n * - `error`: Displays a error badge with a error legacy icon and red color.\n *\n * For `icon`, `success`, `warning` and `error` types, the `mdc-icon` component is used to render the icon.\n *\n * For the `counter` type, the `mdc-text` component is used to render the counter value.\n *\n * @dependency mdc-icon\n * @dependency mdc-text\n *\n * @tagname mdc-badge\n *\n * @cssproperty --mdc-badge-primary-foreground-color - The foreground color of the primary badge.\n * @cssproperty --mdc-badge-primary-background-color - The background color of the primary badge.\n * @cssproperty --mdc-badge-secondary-foreground-color - The foreground color of the secondary badge.\n * @cssproperty --mdc-badge-secondary-background-color - The background color of the secondary badge.\n * @cssproperty --mdc-badge-success-foreground-color - The foreground color of the success badge.\n * @cssproperty --mdc-badge-success-background-color - The background color of the success badge.\n * @cssproperty --mdc-badge-warning-foreground-color - The foreground color of the warning badge.\n * @cssproperty --mdc-badge-warning-background-color - The background color of the warning badge.\n * @cssproperty --mdc-badge-error-foreground-color - The foreground color of the error badge.\n * @cssproperty --mdc-badge-error-background-color - The background color of the error badge.\n * @cssproperty --mdc-badge-overlay-background-color - The background color of the badge overlay.\n */\nclass Badge extends IconNameMixin(Component) {\n /**\n * Type of the badge\n * Can be `dot` (notification) , `icon`, `counter`, `success`, `warning` or `error`.\n */\n @property({ type: String, reflect: true })\n type?: BadgeType;\n\n /**\n * Type of the variant can be `primary` or `secondary`.\n * It defines the background and foreground color of the icon.\n * @default primary\n */\n @property({ type: String, reflect: true })\n variant: IconVariant = DEFAULTS.VARIANT;\n\n /**\n * Counter is the number which can be provided in the badge.\n */\n @property({ type: Number })\n counter?: number;\n\n /**\n * The maximum number can be set up to 999, anything above that will be rendered as _999+_.\n * The max counter can be `9`, `99` or `999`.\n * @default 99\n */\n @property({ type: Number, attribute: 'max-counter', reflect: true })\n maxCounter: number = DEFAULTS.MAX_COUNTER;\n\n /**\n * Overlay is to add a thin outline to the badge.\n * This will help distinguish between the badge and the button,\n * where the badge will be layered on top of a button.\n * @default false\n */\n @property({ type: Boolean })\n overlay = false;\n\n /**\n * Aria-label attribute to be set for accessibility\n * @default null\n */\n @property({ type: String, attribute: 'aria-label' })\n override ariaLabel: string | null = null;\n\n /**\n * If `type` is set to `counter` and if `counter` is greater than `maxCounter`,\n * then it will return a string the maxCounter value as string.\n * Otherwise, it will return a string representation of `counter`.\n * If `counter` is not a number, it will return an empty string.\n * @param maxCounter - the maximum limit which can be displayed on the badge\n * @param counter - the number to be displayed on the badge\n * @returns the string representation of the counter\n */\n private getCounterText(maxCounter: number, counter?: number): string {\n if (counter === undefined || typeof counter !== 'number' || maxCounter === 0) {\n return '';\n }\n if (counter > maxCounter) {\n return `${maxCounter}+`;\n }\n // At any given time, the max limit should not cross 999.\n if (maxCounter > DEFAULTS.MAX_COUNTER_LIMIT || counter > DEFAULTS.MAX_COUNTER_LIMIT) {\n return `${DEFAULTS.MAX_COUNTER_LIMIT}+`;\n }\n return counter.toString();\n }\n\n /**\n * Method to generate the badge icon.\n * @param iconName - the name of the icon from the icon set\n * @param backgroundClassPostfix - postfix for the class to style the badge icon.\n * @returns the template result of the icon.\n */\n private getBadgeIcon(iconName: string, backgroundClassPostfix: string): TemplateResult {\n return html`\n <mdc-icon\n class=\"mdc-badge-icon ${classMap({\n 'mdc-badge-overlay': this.overlay,\n [`mdc-badge-icon__${backgroundClassPostfix}`]: true,\n })}\"\n name=\"${ifDefined(iconName as IconNames)}\"\n size=\"${DEFAULTS.ICON_SIZE}\"\n ></mdc-icon>\n `;\n }\n\n /**\n * Method to generate the badge dot template.\n * @returns the template result of the dot with mdc-badge-dot class.\n */\n private getBadgeDot(): TemplateResult {\n return html`<div class=\"mdc-badge-dot ${classMap({ 'mdc-badge-overlay': this.overlay })}\"></div>`;\n }\n\n /**\n * Method to generate the badge text and counter template.\n * @returns the template result of the text.\n */\n private getBadgeCounterText(): TemplateResult {\n return html`\n <mdc-text\n type=\"${FONT_TYPE.BODY_SMALL_MEDIUM}\"\n tagname=\"${VALID_TEXT_TAGS.DIV}\"\n class=\"mdc-badge-text ${classMap({ 'mdc-badge-overlay': this.overlay })}\"\n >\n ${this.getCounterText(this.maxCounter, this.counter)}\n </mdc-text>\n `;\n }\n\n /**\n * Method to set the role based on the aria-label provided.\n * If the aria-label is provided, the role of the element will be 'img'.\n * Otherwise, the role will be null.\n */\n private setRoleByAriaLabel(): void {\n if (this.ariaLabel) {\n this.role = 'img';\n } else {\n this.role = null;\n }\n }\n\n /**\n * Generates the badge content based on the badge type.\n * Utilizes various helper methods to create the appropriate badge template based on the\n * current badge type. Supports 'dot', 'icon', 'counter', 'success', 'warning', and 'error'\n * types, returning the corresponding template result for each type.\n * @returns the TemplateResult for the current badge type.\n */\n private getBadgeContentBasedOnType(): TemplateResult {\n if (this.variant && !Object.values(ICON_VARIANT).includes(this.variant)) {\n this.variant = DEFAULTS.VARIANT;\n }\n const { iconName, type, variant } = this;\n switch (type) {\n case BADGE_TYPE.ICON:\n return this.getBadgeIcon(iconName || '', variant);\n case BADGE_TYPE.COUNTER:\n return this.getBadgeCounterText();\n case BADGE_TYPE.SUCCESS:\n return this.getBadgeIcon(ICON_NAMES_LIST.SUCCESS_ICON_NAME, ICON_STATE.SUCCESS);\n case BADGE_TYPE.WARNING:\n return this.getBadgeIcon(ICON_NAMES_LIST.WARNING_ICON_NAME, ICON_STATE.WARNING);\n case BADGE_TYPE.ERROR:\n return this.getBadgeIcon(ICON_NAMES_LIST.ERROR_ICON_NAME, ICON_STATE.ERROR);\n case BADGE_TYPE.DOT:\n default:\n this.type = BADGE_TYPE.DOT;\n return this.getBadgeDot();\n }\n }\n\n public override update(changedProperties: PropertyValues): void {\n super.update(changedProperties);\n\n if (changedProperties.has('ariaLabel')) {\n this.setRoleByAriaLabel();\n }\n }\n\n public override render() {\n return this.getBadgeContentBasedOnType();\n }\n\n public static override styles: Array<CSSResult> = [...Component.styles, ...styles];\n}\n\nexport default Badge;\n", "import Badge from './badge.component';\nimport { TAG_NAME } from './badge.constants';\nimport '../icon';\nimport '../text';\n\nBadge.register(TAG_NAME);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n ['mdc-badge']: Badge\n }\n}\n\nexport default Badge;\n", "import { css } from 'lit';\n\nconst styles = css`\n :host {\n --mdc-bullet-background-color: var(--mds-color-theme-outline-secondary-normal);\n --mdc-bullet-size-small: 0.25rem;\n --mdc-bullet-size-medium: 0.5rem;\n --mdc-bullet-size-large: 1rem;\n\n border-radius: 50%;\n display: block;\n aspect-ratio: 1;\n background-color: var(--mdc-bullet-background-color);\n }\n :host([size=\"small\"]) {\n height: var(--mdc-bullet-size-small);\n }\n :host([size=\"medium\"]) {\n height: var(--mdc-bullet-size-medium);\n }\n :host([size=\"large\"]) {\n height: var(--mdc-bullet-size-large);\n }\n`;\n\nexport default [styles];\n", "import utils from '../../utils/tag-name';\n\nconst TAG_NAME = utils.constructTagName('bullet');\n\nconst SIZE = {\n SMALL: 'small',\n MEDIUM: 'medium',\n LARGE: 'large',\n} as const;\n\nexport { TAG_NAME, SIZE };\n", "import { property } from 'lit/decorators.js';\nimport type { CSSResult } from 'lit';\nimport styles from './bullet.styles';\nimport { Component } from '../../models';\nimport { SIZE } from './bullet.constants';\nimport type { Size } from './bullet.types';\n\n/**\n * Bullet component, which is a visual marker\n * and be used to organize and present items in a list format.\n *\n * @tagname mdc-bullet\n *\n * @cssproperty --mdc-bullet-background-color - background color of the bullet\n * @cssproperty --mdc-bullet-size-small - small size value of the bullet\n * @cssproperty --mdc-bullet-size-medium - medium size value of the bullet\n * @cssproperty --mdc-bullet-size-large - large size value of the bullet\n*/\nclass Bullet extends Component {\n /**\n * Size of the bullet\n *\n * Possible values: 'small', 'medium', 'large'\n * @default small\n */\n @property({ type: String, reflect: true })\n public size: Size = SIZE.SMALL;\n\n public static override styles: Array<CSSResult> = [...Component.styles, ...styles];\n}\n\nexport default Bullet;\n", "import Bullet from './bullet.component';\nimport { TAG_NAME } from './bullet.constants';\n\nBullet.register(TAG_NAME);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n ['mdc-bullet']: Bullet\n }\n}\n\nexport default Bullet;\n", "import { css } from 'lit';\n\nconst styles = css`\n :host {\n background-color: transparent;\n border-radius: 1.25rem;\n font-weight: var(--mds-font-apps-body-large-medium-font-weight);\n outline: none;\n\n --mdc-button-primary-color: var(--mds-color-theme-inverted-text-primary-normal);\n --mdc-button-primary-background-color: var(--mds-color-theme-button-primary-normal);\n --mdc-button-primary-hover-background-color: var(--mds-color-theme-button-primary-hover);\n --mdc-button-primary-pressed-background-color: var(--mds-color-theme-button-primary-pressed);\n --mdc-button-primary-disabled-background-color: var(--mds-color-theme-button-primary-disabled);\n --mdc-button-primary-disabled-color: var(--mds-color-theme-text-primary-disabled);\n \n --mdc-button-secondary-color: var(--mds-color-theme-text-primary-normal);\n --mdc-button-secondary-border-color: var(--mds-color-theme-outline-button-normal);\n --mdc-button-secondary-hover-background-color: var(--mds-color-theme-button-secondary-hover);\n --mdc-button-secondary-pressed-background-color: var(--mds-color-theme-button-secondary-pressed);\n --mdc-button-secondary-disabled-background-color: var(--mds-color-theme-button-secondary-disabled);\n --mdc-button-secondary-disabled-color: var(--mds-color-theme-text-primary-disabled);\n --mdc-button-secondary-disabled-border-color: var(--mds-color-theme-outline-primary-disabled);\n\n --mdc-button-tertiary-color: var(--mds-color-theme-text-primary-normal);\n --mdc-button-tertiary-hover-background-color: var(--mds-color-theme-button-secondary-hover);\n --mdc-button-tertiary-pressed-background-color: var(--mds-color-theme-button-secondary-pressed);\n --mdc-button-tertiary-disabled-background-color: var(--mds-color-theme-button-secondary-disabled);\n --mdc-button-tertiary-disabled-color: var(--mds-color-theme-text-primary-disabled);\n\n --mdc-button-line-height-size-40: var(--mds-font-lineheight-body-large);\n --mdc-button-line-height-size-32: var(--mds-font-lineheight-body-large);\n --mdc-button-line-height-size-28: var(--mds-font-lineheight-body-midsize);\n --mdc-button-line-height-size-24: var(--mds-font-lineheight-body-small);\n }\n\n :host([active]){\n font-weight: var(--mds-font-apps-body-large-bold-font-weight);\n }\n\n :host([variant=\"primary\"]){\n background: var(--mdc-button-primary-background-color);\n color: var(--mdc-button-primary-color);\n }\n :host([variant=\"primary\"]:hover){\n background: var(--mdc-button-primary-hover-background-color);\n }\n :host([variant=\"primary\"]:active), :host([variant=\"primary\"].pressed){\n background: var(--mdc-button-primary-pressed-background-color);\n }\n :host([variant=\"primary\"][disabled]), :host([variant=\"primary\"][soft-disabled]){\n background: var(--mdc-button-primary-disabled-background-color);\n color: var(--mdc-button-primary-disabled-color);\n cursor: auto;\n }\n\n :host([variant=\"secondary\"]){\n color: var(--mdc-button-secondary-color);\n border-color: var(--mdc-button-secondary-border-color);\n }\n :host([variant=\"secondary\"]:hover){\n background: var(--mdc-button-secondary-hover-background-color);\n }\n :host([variant=\"secondary\"]:active), :host([variant=\"secondary\"].pressed){\n background: var(--mdc-button-secondary-pressed-background-color);\n }\n :host([variant=\"secondary\"][disabled]),\n :host([variant=\"secondary\"][soft-disabled]){\n color: var(--mdc-button-primary-disabled-color);\n border-color: var(--mdc-button-secondary-disabled-border-color);\n background: var(--mdc-button-secondary-disabled-background-color);\n cursor: auto;\n }\n\n :host([variant=\"tertiary\"]){\n border-color: transparent;\n color: var(--mdc-button-tertiary-color);\n }\n :host([variant=\"tertiary\"]:hover){\n background: var(--mdc-button-tertiary-hover-background-color);\n }\n :host([variant=\"tertiary\"]:active), :host([variant=\"tertiary\"].pressed){\n background: var(--mdc-button-tertiary-pressed-background-color);\n }\n :host([variant=\"tertiary\"][disabled]), \n :host([variant=\"tertiary\"][soft-disabled]){\n color: var(--mdc-button-tertiary-disabled-color);\n background: var(--mdc-button-tertiary-disabled-background-color);\n cursor: auto;\n }\n\n :host([size=\"64\"][data-btn-type='icon']), \n :host([size=\"52\"][data-btn-type='icon']), \n :host([size=\"40\"][data-btn-type='icon']), \n :host([size=\"32\"][data-btn-type='icon']),\n :host([size=\"28\"][data-btn-type='icon']),\n :host([size=\"24\"][data-btn-type='icon']){\n border-radius: 6.25rem;\n aspect-ratio: 1;\n padding: unset;\n }\n :host([size=\"40\"]){\n font-size: var(--mds-font-size-body-large);\n line-height: var(--mdc-button-line-height-size-40);\n padding: 0 1rem;\n gap: 0.5rem;\n }\n :host([size=\"32\"]){\n font-size: var(--mds-font-size-body-large);\n line-height: var(--mdc-button-line-height-size-32);\n padding: 0 0.75rem;\n gap: 0.375rem;\n }\n :host([size=\"28\"]){\n font-size: var(--mds-font-size-body-midsize);\n line-height: var(--mdc-button-line-height-size-28);\n padding: 0 0.75rem;\n gap: 0.375rem;\n }\n :host([size=\"24\"]){\n font-size: var(--mds-font-size-body-small);\n line-height: var(--mdc-button-line-height-size-24);\n padding: 0 0.625rem;\n gap: 0.25rem;\n }\n :host([size=\"20\"]){\n padding: 0.0625rem;\n aspect-ratio: 1;\n }\n\n :host([color=\"accent\"]){\n --mdc-button-primary-color: var(--mds-color-theme-common-text-primary-normal);\n --mdc-button-primary-background-color: var(--mds-color-theme-button-accent-normal);\n --mdc-button-primary-hover-background-color: var(--mds-color-theme-button-accent-hover);\n --mdc-button-primary-pressed-background-color: var(--mds-color-theme-button-accent-pressed);\n\n --mdc-button-secondary-color: var(--mds-color-theme-text-accent-normal);\n --mdc-button-secondary-border-color: var(--mds-color-theme-outline-theme-normal);\n --mdc-button-secondary-hover-background-color: var(--mds-color-theme-button-secondary-hover);\n --mdc-button-secondary-pressed-background-color: var(--mds-color-theme-button-secondary-pressed);\n }\n :host([color=\"positive\"]){\n --mdc-button-primary-color: var(--mds-color-theme-common-text-primary-normal);\n --mdc-button-primary-background-color: var(--mds-color-theme-button-join-normal);\n --mdc-button-primary-hover-background-color: var(--mds-color-theme-button-join-hover);\n --mdc-button-primary-pressed-background-color: var(--mds-color-theme-button-join-pressed);\n\n --mdc-button-secondary-color: var(--mds-color-theme-text-success-normal);\n --mdc-button-secondary-border-color: var(--mds-color-theme-outline-join-normal);\n --mdc-button-secondary-hover-background-color: var(--mds-color-theme-button-secondary-hover);\n --mdc-button-secondary-pressed-background-color: var(--mds-color-theme-button-secondary-pressed);\n }\n :host([color=\"negative\"]){\n --mdc-button-primary-color: var(--mds-color-theme-common-text-primary-normal);\n --mdc-button-primary-background-color: var(--mds-color-theme-button-cancel-normal);\n --mdc-button-primary-hover-background-color: var(--mds-color-theme-button-cancel-hover);\n --mdc-button-primary-pressed-background-color: var(--mds-color-theme-button-cancel-pressed);\n\n --mdc-button-secondary-color: var(--mds-color-theme-text-error-normal);\n --mdc-button-secondary-border-color: var(--mds-color-theme-outline-cancel-normal);\n --mdc-button-secondary-hover-background-color: var(--mds-color-theme-button-secondary-hover);\n --mdc-button-secondary-pressed-background-color: var(--mds-color-theme-button-secondary-pressed);\n }\n :host([color=\"promotional\"]){\n --mdc-button-primary-color: var(--mds-color-theme-common-text-primary-normal);\n --mdc-button-primary-background-color: var(--mds-color-theme-common-button-promotion-normal);\n --mdc-button-primary-hover-background-color: var(--mds-color-theme-common-button-promotion-hover);\n --mdc-button-primary-pressed-background-color: var(--mds-color-theme-common-button-promotion-active);\n\n --mdc-button-secondary-color: var(--mds-color-theme-text-primary-normal);\n --mdc-button-secondary-border-color: var(--mds-color-theme-outline-promotion-normal);\n --mdc-button-secondary-hover-background-color: var(--mds-color-theme-button-secondary-hover);\n --mdc-button-secondary-pressed-background-color: var(--mds-color-theme-button-secondary-pressed);\n }\n`;\n\nexport default [styles];\n", "import { ICON_BUTTON_SIZES } from './button.constants';\nimport { IconButtonSize } from './button.types';\n\n/**\n * Returns the icon size multiplier based on the provided button size.\n *\n * @param size - The size of the button.\n * @returns The multiplier for the icon size.\n */\nconst getIconSize = (size: IconButtonSize): number => {\n switch (size) {\n case ICON_BUTTON_SIZES[64]: return 2;\n case ICON_BUTTON_SIZES[52]: return 1.75;\n case ICON_BUTTON_SIZES[40]: return 1.25;\n default: return 1;\n }\n};\n\n/**\n * Returns the name of the icon without the style suffix.\n *\n * @param iconName - The name of the icon.\n * @returns The name of the icon without the suffix.\n */\nconst getIconNameWithoutStyle = (iconName: string): string => {\n const iconParts = iconName.split('-');\n const variants = ['bold', 'filled', 'regular', 'light'];\n return iconParts.filter((part) => !variants.includes(part)).join('-');\n};\n\nexport { getIconSize, getIconNameWithoutStyle };\n", "import type { PropertyValues } from 'lit';\nimport { CSSResult, html } from 'lit';\nimport { property, state } from 'lit/decorators.js';\nimport Buttonsimple from '../buttonsimple/buttonsimple.component';\nimport type { IconNames } from '../icon/icon.types';\nimport {\n BUTTON_COLORS,\n BUTTON_TYPE_INTERNAL,\n BUTTON_VARIANTS,\n DEFAULTS,\n ICON_BUTTON_SIZES,\n PILL_BUTTON_SIZES,\n} from './button.constants';\nimport styles from './button.styles';\nimport type { ButtonColor, ButtonTypeInternal, ButtonVariant, IconButtonSize, PillButtonSize } from './button.types';\nimport { getIconNameWithoutStyle, getIconSize } from './button.utils';\n\n/**\n * `mdc-button` is a component that can be configured in various ways to suit different use cases.\n *\n * Button Variants:\n * - **Primary**: Solid background color.\n * - **Secondary**: Transparent background with a solid border.\n * - **Tertiary**: No background or border, appears as plain text but retains all button functionalities.\n *\n * Button Colors:\n * - **Positive**: Green color.\n * - **Negative**: Red color.\n * - **Accent**: Blue color.\n * - **Promotional**: Purple color.\n * - **Default**: White color.\n *\n * Button Sizes (in REM units):\n * - **Pill button**: 40, 32, 28, 24.\n * - **Icon button**: 64, 52, 40, 32, 28, 24.\n * - **Tertiary icon button**: 20.\n *\n * Button Types:\n * - **Pill button**: A button that contains text value. Commonly used for call to action, tags, or filters.\n * - **Pill button with icons**: A button containing an icon either on the left or right side of the button.\n * - **Icon button**: A button represented by just an icon without any text.\n * The type of button is inferred based on the presence of slot and/or prefix and postfix icons.\n *\n * @dependency mdc-icon\n *\n * @event click - (React: onClick) This event is dispatched when the button is clicked.\n * @event keydown - (React: onKeyDown) This event is dispatched when a key is pressed down on the button.\n * @event keyup - (React: onKeyUp) This event is dispatched when a key is released on the button.\n * @event focus - (React: onFocus) This event is dispatched when the button receives focus.\n *\n * @tagname mdc-button\n *\n * @slot - Text label of the button.\n */\nclass Button extends Buttonsimple {\n /**\n * The name of the icon to display as a prefix.\n * The icon is displayed on the left side of the button.\n */\n @property({ type: String, attribute: 'prefix-icon', reflect: true }) prefixIcon?: string;\n\n /**\n * The name of the icon to display as a postfix.\n * The icon is displayed on the right side of the button.\n */\n @property({ type: String, attribute: 'postfix-icon', reflect: true }) postfixIcon?: string;\n\n /**\n * There are 3 variants of button: primary, secondary, tertiary. They are styled differently.\n * - **Primary**: Solid background color.\n * - **Secondary**: Transparent background with a solid border.\n * - **Tertiary**: No background or border, appears as plain text but retains all button functionalities.\n * @default primary\n */\n @property({ type: String }) variant: ButtonVariant = DEFAULTS.VARIANT;\n\n /**\n * Button sizing is based on the button type.\n * - **Pill button**: 40, 32, 28, 24.\n * - **Icon button**: 64, 52, 40, 32, 28, 24.\n * - Tertiary icon button can also be 20.\n * @default 32\n */\n @property({ type: Number }) override size: PillButtonSize | IconButtonSize = DEFAULTS.SIZE;\n\n /**\n * There are 5 colors for button: positive, negative, accent, promotional, default.\n * @default default\n */\n @property({ type: String }) color: ButtonColor = DEFAULTS.COLOR;\n\n /**\n * This property defines the ARIA role for the element. By default, it is set to 'button'.\n * Consumers should override this role when:\n * - The element is being used in a context where a different role is more appropriate.\n * - Custom behaviors are implemented that require a specific ARIA role for accessibility purposes.\n * @default button\n */\n @property({ type: String, reflect: true }) override role = 'button';\n\n /** @internal */\n @state() private typeInternal: ButtonTypeInternal = DEFAULTS.TYPE_INTERNAL;\n\n /** @internal */\n @state() private iconSize = 1;\n\n /**\n * @internal\n */\n private prevPrefixIcon?: string;\n\n /**\n * @internal\n */\n private prevPostfixIcon?: string;\n\n public override update(changedProperties: PropertyValues): void {\n super.update(changedProperties);\n\n if (changedProperties.has('active')) {\n this.modifyIconName(this.active);\n }\n if (changedProperties.has('size')) {\n this.setSize(this.size);\n }\n if (changedProperties.has('variant')) {\n this.setVariant(this.variant);\n this.setSize(this.size);\n }\n if (changedProperties.has('color')) {\n this.setColor(this.color);\n }\n if (changedProperties.has('typeInternal')) {\n this.setSize(this.size);\n }\n if (changedProperties.has('prefixIcon') || changedProperties.has('postfixIcon')) {\n this.inferButtonType();\n }\n }\n\n /**\n * Modifies the icon name based on the active state.\n * If the button is active, the icon name is suffixed with '-filled'.\n * If the button is inactive, the icon name is restored to its original value.\n * If '-filled' icon is not available, the icon name remains unchanged.\n *\n * @param active - The active state.\n */\n private modifyIconName(active: boolean) {\n if (active) {\n if (this.prefixIcon) {\n this.prevPrefixIcon = this.prefixIcon;\n this.prefixIcon = `${getIconNameWithoutStyle(this.prefixIcon)}-filled`;\n }\n if (this.postfixIcon) {\n this.prevPostfixIcon = this.postfixIcon;\n this.postfixIcon = `${getIconNameWithoutStyle(this.postfixIcon)}-filled`;\n }\n } else {\n if (this.prevPrefixIcon) {\n this.prefixIcon = this.prevPrefixIcon;\n }\n if (this.prevPostfixIcon) {\n this.postfixIcon = this.prevPostfixIcon;\n }\n }\n }\n\n /**\n * Sets the variant attribute for the button component.\n * If the provided variant is not included in the BUTTON_VARIANTS,\n * it defaults to the value specified in DEFAULTS.VARIANT.\n *\n * @param variant - The variant to set.\n */\n private setVariant(variant: ButtonVariant) {\n this.setAttribute('variant', Object.values(BUTTON_VARIANTS).includes(variant) ? variant : DEFAULTS.VARIANT);\n }\n\n /**\n * Sets the size attribute for the button component.\n * Validates the size based on the button type (icon, pill, or tertiary).\n * Defaults to DEFAULTS.SIZE if invalid.\n *\n * @param size - The size to set.\n */\n private setSize(size: PillButtonSize | IconButtonSize) {\n const isIconType = this.typeInternal === BUTTON_TYPE_INTERNAL.ICON;\n const isValidSize = isIconType\n ? Object.values(ICON_BUTTON_SIZES).includes(size)\n && !(size === ICON_BUTTON_SIZES[20] && this.variant !== BUTTON_VARIANTS.TERTIARY)\n : Object.values(PILL_BUTTON_SIZES).includes(size as PillButtonSize);\n\n this.setAttribute('size', isValidSize ? `${size}` : `${DEFAULTS.SIZE}`);\n this.iconSize = getIconSize(size);\n }\n\n /**\n * Sets the color attribute for the button.\n * Defaults to DEFAULTS.COLOR if invalid or for tertiary buttons.\n *\n * @param color - The color to set.\n */\n private setColor(color: ButtonColor) {\n if (!Object.values(BUTTON_COLORS).includes(color) || this.variant === BUTTON_VARIANTS.TERTIARY) {\n this.setAttribute('color', `${DEFAULTS.COLOR}`);\n } else {\n this.setAttribute('color', color);\n }\n }\n\n /**\n * Infers the type of button based on the presence of slot and/or prefix and postfix icons.\n * @param slot - default slot of button\n */\n private inferButtonType() {\n const slot = this.shadowRoot\n ?.querySelector('slot')\n ?.assignedNodes()\n .filter((node) => node.nodeType !== Node.TEXT_NODE || node.textContent?.trim())\n .length;\n if (slot && (this.prefixIcon || this.postfixIcon)) {\n this.typeInternal = BUTTON_TYPE_INTERNAL.PILL_WITH_ICON;\n this.setAttribute('data-btn-type', 'pill-with-icon');\n } else if (!slot && (this.prefixIcon || this.postfixIcon)) {\n this.typeInternal = BUTTON_TYPE_INTERNAL.ICON;\n this.setAttribute('data-btn-type', 'icon');\n } else {\n this.typeInternal = BUTTON_TYPE_INTERNAL.PILL;\n this.setAttribute('data-btn-type', 'pill');\n }\n }\n\n public override render() {\n return html`\n ${this.prefixIcon\n ? html` <mdc-icon\n name=\"${this.prefixIcon as IconNames}\"\n part=\"prefix-icon\"\n size=${this.iconSize}\n length-unit=\"rem\"\n >\n </mdc-icon>`\n : ''}\n <slot @slotchange=${this.inferButtonType}></slot>\n ${this.postfixIcon\n ? html` <mdc-icon\n name=\"${this.postfixIcon as IconNames}\"\n part=\"postfix-icon\"\n size=${this.iconSize}\n length-unit=\"rem\"\n >\n </mdc-icon>`\n : ''}\n `;\n }\n\n public static override styles: Array<CSSResult> = [...Buttonsimple.styles, ...styles];\n}\n\nexport default Button;\n", "import Button from './button.component';\nimport { TAG_NAME } from './button.constants';\nimport '../icon';\n\nButton.register(TAG_NAME);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n ['mdc-button']: Button\n }\n}\n\nexport default Button;\n", "import { LitElement } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport type { Constructor } from './index.types';\n\nexport interface DataAriaLabelMixinInterface {\n dataAriaLabel: string | null;\n}\n\nexport const DataAriaLabelMixin = <T extends Constructor<LitElement>>(\n superClass: T,\n) => {\n class InnerMixinClass extends superClass {\n /**\n * Defines a string value that labels the current element.\n * The Aria-Label attribute to be set for accessibility.\n * @default null\n */\n @property({ type: String, reflect: true, attribute: 'data-aria-label' }) dataAriaLabel: string | null = null;\n }\n // Cast return type to your mixin's interface intersected with the superClass type\n return InnerMixinClass as Constructor<DataAriaLabelMixinInterface> & T;\n};\n", "import validate from './validate.js';\nconst byteToHex = [];\nfor (let i = 0; i < 256; ++i) {\n byteToHex.push((i + 0x100).toString(16).slice(1));\n}\nexport function unsafeStringify(arr, offset = 0) {\n return (byteToHex[arr[offset + 0]] +\n byteToHex[arr[offset + 1]] +\n byteToHex[arr[offset + 2]] +\n byteToHex[arr[offset + 3]] +\n '-' +\n byteToHex[arr[offset + 4]] +\n byteToHex[arr[offset + 5]] +\n '-' +\n byteToHex[arr[offset + 6]] +\n byteToHex[arr[offset + 7]] +\n '-' +\n byteToHex[arr[offset + 8]] +\n byteToHex[arr[offset + 9]] +\n '-' +\n byteToHex[arr[offset + 10]] +\n byteToHex[arr[offset + 11]] +\n byteToHex[arr[offset + 12]] +\n byteToHex[arr[offset + 13]] +\n byteToHex[arr[offset + 14]] +\n byteToHex[arr[offset + 15]]).toLowerCase();\n}\nfunction stringify(arr, offset = 0) {\n const uuid = unsafeStringify(arr, offset);\n if (!validate(uuid)) {\n throw TypeError('Stringified UUID is invalid');\n }\n return uuid;\n}\nexport default stringify;\n", "let getRandomValues;\nconst rnds8 = new Uint8Array(16);\nexport default function rng() {\n if (!getRandomValues) {\n if (typeof crypto === 'undefined' || !crypto.getRandomValues) {\n throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');\n }\n getRandomValues = crypto.getRandomValues.bind(crypto);\n }\n return getRandomValues(rnds8);\n}\n", "const randomUUID = typeof crypto !== 'undefined' && crypto.randomUUID && crypto.randomUUID.bind(crypto);\nexport default { randomUUID };\n", "import native from './native.js';\nimport rng from './rng.js';\nimport { unsafeStringify } from './stringify.js';\nfunction v4(options, buf, offset) {\n if (native.randomUUID && !buf && !options) {\n return native.randomUUID();\n }\n options = options || {};\n const rnds = options.random ?? options.rng?.() ?? rng();\n if (rnds.length < 16) {\n throw new Error('Random bytes length must be >= 16');\n }\n rnds[6] = (rnds[6] & 0x0f) | 0x40;\n rnds[8] = (rnds[8] & 0x3f) | 0x80;\n if (buf) {\n offset = offset || 0;\n if (offset < 0 || offset + 16 > buf.length) {\n throw new RangeError(`UUID byte range ${offset}:${offset + 15} is out of buffer bounds`);\n }\n for (let i = 0; i < 16; ++i) {\n buf[offset + i] = rnds[i];\n }\n return buf;\n }\n return unsafeStringify(rnds);\n}\nexport default v4;\n", "import { LitElement } from 'lit';\nimport { property, query } from 'lit/decorators.js';\nimport { v4 as uuidv4 } from 'uuid';\nimport type { Constructor } from './index.types';\n\nexport interface AssociatedFormControl {\n autofocus: boolean;\n disabled: boolean;\n name: string;\n value: string | string[];\n\n pattern?: string;\n min?: number | string;\n max?: number | string;\n step?: number;\n required?: boolean;\n minLength?: number;\n maxLength?: number;\n validationMessage?: string;\n\n readonly form: HTMLFormElement | null;\n readonly validity: ValidityState;\n readonly willValidate: boolean;\n\n checkValidity(): boolean;\n reportValidity(): boolean;\n\n formDisabledCallback?(disabled: boolean): void;\n formResetCallback(): void;\n formStateRestoreCallback(\n state: string | FormData | File,\n mode: 'restore' | 'autocomplete'\n ): void;\n }\n\nexport interface FormInternalsMixinInterface {\n name: string;\n value: string;\n form: HTMLFormElement | null;\n validity: ValidityState;\n validationMessage: string;\n willValidate: boolean;\n internals: ElementInternals;\n inputElement: HTMLInputElement;\n setValidity(): void;\n checkValidity(): boolean;\n reportValidity(): boolean;\n\n}\n\nexport const FormInternalsMixin = <T extends Constructor<LitElement>>(\n superClass: T,\n) => {\n class InnerMixinClass extends superClass {\n /**\n * Indicates the name of the component group.\n * They are used to group elements in a form together.\n * @default ''\n */\n @property({ reflect: true, type: String }) name = '';\n\n /**\n * Indicates the value of the component group (ex: input, checkbox, radio, select etc...)\n * @default ''\n */\n @property({ reflect: true, type: String }) value = '';\n\n /**\n * Custom validation message that will override the default message and displayed when the input is invalid.\n */\n @property({ reflect: true, type: String, attribute: 'validation-message' }) validationMessage?: string;\n\n /** @internal */\n static formAssociated = true;\n\n /** @internal */\n internals: ElementInternals;\n\n /** @internal */\n get form(): HTMLFormElement | null {\n return this.internals.form;\n }\n\n get validity(): ValidityState {\n return this.internals.validity;\n }\n\n get willValidate() {\n return this.internals.willValidate;\n }\n\n constructor(...args: any[]) {\n super(args);\n\n /** @internal */\n this.internals = this.attachInternals();\n this.id = `mdc-input-${uuidv4()}`;\n }\n\n /**\n * Sets the validity of the input field based on the input field's validity.\n * @returns void\n */\n setValidity() {\n if (this.inputElement) {\n this.internals.setValidity(\n this.inputElement.validity,\n this.inputElement.validationMessage,\n this.inputElement,\n );\n }\n }\n\n checkValidity(): boolean {\n this.setValidity();\n return this.internals.checkValidity();\n }\n\n reportValidity() {\n this.setValidity();\n return this.internals.reportValidity();\n }\n\n /**\n * @internal\n * The input element\n */\n @query('input') inputElement!: HTMLInputElement;\n }\n // Cast return type to your mixin's interface intersected with the superClass type\n return InnerMixinClass as Constructor<FormInternalsMixinInterface> & T;\n};\n", "import utils from '../../utils/tag-name';\nimport { TYPE, VALID_TEXT_TAGS } from '../text/text.constants';\n\nconst TAG_NAME = utils.constructTagName('formfieldwrapper');\n\nconst VALIDATION = {\n DEFAULT: 'default',\n ERROR: 'error',\n PRIORITY: 'priority',\n SUCCESS: 'success',\n WARNING: 'warning',\n} as const;\n\nconst DEFAULTS = {\n VALIDATION: VALIDATION.DEFAULT,\n HELPER_TEXT_ID: 'helper-text-id',\n HEADING_ID: 'heading-id',\n} as const;\n\nconst MDC_TEXT_OPTIONS = {\n TAGNAME: VALID_TEXT_TAGS.SPAN,\n TYPE: TYPE.BODY_MIDSIZE_REGULAR,\n HEADER_TYPE: TYPE.BODY_MIDSIZE_BOLD,\n};\n\nexport { TAG_NAME, VALIDATION, DEFAULTS, MDC_TEXT_OPTIONS };\n", "import { css } from 'lit';\nimport { hostFitContentStyles } from '../../utils/styles';\n\nconst styles = [\n hostFitContentStyles,\n css`\n :host {\n flex-direction: column;\n align-items: flex-start;\n gap: 0.5rem;\n }\n :host([disabled]),\n :host([disabled]) .mdc-label,\n :host([disabled]) .mdc-help-text,\n :host([disabled][help-text-type='error']) .mdc-help-text,\n :host([disabled][help-text-type='success']) .mdc-help-text,\n :host([disabled][help-text-type='warning']) .mdc-help-text,\n :host([disabled][help-text-type='priority']) .mdc-help-text {\n color: var(--mds-color-theme-text-primary-disabled);\n }\n\n .mdc-label-text,\n .mdc-help-text {\n font-size: var(--mds-font-size-body-midsize);\n line-height: var(--mds-font-lineheight-body-midsize);\n display: flex;\n align-items: center;\n gap: 0.5rem;\n width: 100%;\n }\n\n .mdc-label {\n color: var(--mds-color-theme-text-primary-normal);\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n\n .mdc-help-text {\n color: var(--mds-color-theme-text-secondary-normal);\n }\n\n :host([help-text-type='error']) .mdc-help-text {\n color: var(--mds-color-theme-text-error-normal);\n }\n :host([help-text-type='warning']) .mdc-help-text {\n color: var(--mds-color-theme-text-warning-normal);\n }\n :host([help-text-type='success']) .mdc-help-text {\n color: var(--mds-color-theme-text-success-normal);\n }\n :host([help-text-type='priority']) .mdc-help-text {\n color: var(--mds-color-theme-text-accent-normal);\n }\n `,\n];\n\nexport default styles;\n", "import { VALIDATION } from './formfieldwrapper.constants';\nimport type { HelperIconsList, ValidationType } from './formfieldwrapper.types';\n\nconst getHelperIcon = (type: ValidationType): HelperIconsList | '' => {\n const helperIconSizeMap: Record<\n ValidationType,\n HelperIconsList\n > = {\n [VALIDATION.ERROR]: 'error-legacy-badge-filled',\n [VALIDATION.WARNING]: 'warning-badge-filled',\n [VALIDATION.SUCCESS]: 'check-circle-badge-filled',\n [VALIDATION.PRIORITY]: 'priority-badge-filled',\n [VALIDATION.DEFAULT]: '',\n };\n return helperIconSizeMap[type] || '';\n};\n\nexport { getHelperIcon };\n", "import { CSSResult, html, nothing } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport { Component } from '../../models';\nimport { DisabledMixin } from '../../utils/mixins/DisabledMixin';\nimport { DEFAULTS, MDC_TEXT_OPTIONS } from './formfieldwrapper.constants';\nimport styles from './formfieldwrapper.styles';\nimport type { ValidationType } from './formfieldwrapper.types';\nimport { getHelperIcon } from './formfieldwrapper.utils';\n\n/**\n * formfieldwrapper is a component that contains the label and helper/validation text\n * that can be configured in various ways to suit different use cases (most of the input related components).\n * It is used as an internal component and is not intended to be used directly by consumers.\n *\n * @tagname mdc-formfieldwrapper\n *\n * @slot label-info - slot to add the label info icon\n *\n */\nclass FormfieldWrapper extends DisabledMixin(Component) {\n /**\n * The label of the input field. It is linked to the input field using the `for` attribute.\n */\n @property({ reflect: true, type: String }) label?: string;\n\n /**\n * The required label of the input field.\n * When an appropriate string value is set,\n * the input field is marked as required and the label is appended with this text.\n */\n @property({ type: String, reflect: true, attribute: 'required-label' }) requiredLabel?: string;\n\n /**\n * The unique id of the input field. It is used to link the input field with the label.\n * @default `mdc-input-${uuidv4()}`\n */\n @property({ type: String }) override id = '';\n\n /**\n * The type of help text. It can be 'default', 'error', 'warning', 'success', 'priority'.\n */\n @property({ reflect: true, attribute: 'help-text-type' }) helpTextType: ValidationType = DEFAULTS.VALIDATION;\n\n /**\n * The help text that is displayed below the input field.\n */\n @property({ type: String, reflect: true, attribute: 'help-text' }) helpText?: string;\n\n /** @internal */\n protected shouldRenderLabel: Boolean = true;\n\n /**\n * creates the label element when the label property is set.\n * id is used to link the label with the input field.\n * @returns void\n */\n protected renderLabelElement() {\n if (!this.label) {\n return nothing;\n }\n\n return this.shouldRenderLabel\n ? html`<label for=\"${this.id}\" class=\"mdc-label\" part=\"label\">${this.label}</label>`\n : html` <mdc-text\n id=\"${DEFAULTS.HEADING_ID}\"\n tagname=\"${MDC_TEXT_OPTIONS.TAGNAME}\"\n type=\"${MDC_TEXT_OPTIONS.HEADER_TYPE}\"\n part=\"label\"\n >${this.label}</mdc-text\n >`;\n }\n\n protected renderRequiredLabel() {\n if (!this.requiredLabel) {\n return nothing;\n }\n\n return html`\n <mdc-text part=\"required-label\" tagname=${MDC_TEXT_OPTIONS.TAGNAME} type=${MDC_TEXT_OPTIONS.TYPE}>\n (${this.requiredLabel})\n </mdc-text>\n `;\n }\n\n /**\n * creates the helpertext icon based on the helpTextType for validation.\n * If the helpTextType is not set, it defaults to 'default' and it doesn't display any icon.\n * @returns void\n */\n protected renderHelpTextIcon() {\n if (!this.helpText) {\n return nothing;\n }\n const helperIcon = getHelperIcon(this.helpTextType || DEFAULTS.VALIDATION);\n if (helperIcon && !this.disabled) {\n return html`<mdc-icon part=\"helper-icon\" size=\"1\" length-unit=\"rem\" name=${helperIcon}></mdc-icon>`;\n }\n return nothing;\n }\n\n /**\n * creates the helper text component when the helpertext value is set.\n * It is also used to display the validation message based on the helpTextType.\n * @returns void\n */\n protected renderHelpText() {\n if (!this.helpText) {\n return nothing;\n }\n return html`\n <mdc-text\n id=\"${DEFAULTS.HELPER_TEXT_ID}\"\n part=\"help-text\"\n tagname=${MDC_TEXT_OPTIONS.TAGNAME}\n type=${MDC_TEXT_OPTIONS.TYPE}\n >\n ${this.helpText}\n </mdc-text>\n `;\n }\n\n /**\n * renders the mdc-label-text container that contains the label and labelInfoToggleTip.\n * @returns void\n */\n protected renderLabel() {\n if (!this.label) return nothing;\n return html`<div class=\"mdc-label-text\" part=\"label-text\">\n <slot name=\"label\">${this.renderLabelElement()}</slot>\n <slot name=\"required-label\">${this.renderRequiredLabel()}</slot>\n <slot name=\"label-info\"></slot>\n </div>`;\n }\n\n /**\n * renders the mdc-help-text container that contains the helpertext icon and helpertext.\n * @returns void\n */\n protected renderHelperText() {\n if (!this.helpText) {\n return nothing;\n }\n return html`<div class=\"mdc-help-text\" part=\"mdc-help-text\">\n <slot name=\"help-icon\">${this.renderHelpTextIcon()}</slot>\n <slot name=\"help-text\">${this.renderHelpText()}</slot>\n </div>`;\n }\n\n public static override styles: Array<CSSResult> = [...Component.styles, ...styles];\n}\n\nexport default FormfieldWrapper;\n", "import utils from '../../utils/tag-name';\nimport type { IconNames } from '../icon/icon.types';\n\nconst TAG_NAME = utils.constructTagName('checkbox');\n\nconst ICON_NAME = {\n CHECKED: 'check-bold' as Extract<IconNames, 'check-bold'>,\n INDETERMINATE: 'minus-bold' as Extract<IconNames, 'minus-bold'>,\n} as const;\n\nexport { TAG_NAME, ICON_NAME };\n", "import { css } from 'lit';\nimport { hostFocusRingStyles } from '../../utils/styles';\n\nconst styles = [css`\n :host {\n --mdc-checkbox-background-color-hover: var(--mds-color-theme-control-inactive-hover);\n --mdc-checkbox-border-color: var(--mds-color-theme-outline-button-normal);\n --mdc-checkbox-checked-background-color-hover: var(--mds-color-theme-control-active-hover);\n --mdc-checkbox-checked-background-color: var(--mds-color-theme-control-active-normal);\n --mdc-checkbox-checked-pressed-icon-color: var(--mds-color-theme-control-active-pressed);\n --mdc-checkbox-disabled-background-color: var(--mds-color-theme-control-inactive-disabled);\n --mdc-checkbox-disabled-border-color: var(--mds-color-theme-outline-primary-disabled);\n --mdc-checkbox-disabled-checked-icon-color: var(--mds-color-theme-control-active-disabled);\n --mdc-checkbox-disabled-icon-color: var(--mds-color-theme-text-primary-disabled);\n --mdc-checkbox-icon-background-color: var(--mds-color-theme-control-inactive-normal);\n --mdc-checkbox-icon-border-color: var(--mds-color-theme-outline-input-normal);\n --mdc-checkbox-icon-color: var(--mds-color-theme-inverted-text-primary-normal);\n --mdc-checkbox-pressed-icon-color: var(--mds-color-theme-control-inactive-pressed);\n\n flex-direction: row;\n align-items: flex-start;\n }\n .mdc-label, .input {\n cursor: pointer;\n }\n :host([checked]) .icon-container,\n :host([indeterminate]) .icon-container {\n background: var(--mdc-checkbox-checked-background-color);\n border: unset;\n }\n :host([checked]) .container:hover .icon-container,\n :host([indeterminate]) .container:hover .icon-container {\n background: var(--mdc-checkbox-checked-background-color-hover);\n }\n :host([checked]) .container:active .icon-container,\n :host([indeterminate]) .container:active .icon-container {\n background: var(--mdc-checkbox-checked-pressed-icon-color);\n }\n :host([disabled]) .mdc-label,\n :host([disabled]) .input {\n cursor: default;\n }\n :host([disabled]) .container:hover {\n background: unset;\n }\n :host([disabled]) .icon-container {\n border-color: var(--mdc-checkbox-disabled-border-color);\n background: var(--mdc-checkbox-disabled-background-color);\n }\n :host([disabled]) .icon {\n --mdc-icon-fill-color: var(--mdc-checkbox-disabled-icon-color);\n }\n :host([disabled][checked]) .icon-container,\n :host([disabled][indeterminate]) .icon-container {\n background: var(--mdc-checkbox-disabled-checked-icon-color);\n border: 0.0625rem solid var(--mdc-checkbox-disabled-border-color);\n }\n .input {\n margin: 0;\n padding: 0;\n position: absolute;\n opacity: 0.1%;\n overflow: visible;\n z-index: 1;\n }\n .icon-container {\n display: flex;\n align-items: center;\n border: 0.0625rem solid var(--mdc-checkbox-icon-border-color);\n background: var(--mdc-checkbox-icon-background-color);\n }\n .container:hover {\n background: var(--mdc-checkbox-background-color-hover);\n }\n .container:active {\n background: var(--mdc-checkbox-pressed-icon-color);\n }\n .input, .icon-container {\n width: 1rem;\n height: 1rem;\n }\n .input,\n .icon-container,\n .container {\n border-radius: 0.125rem;\n }\n .icon {\n --mdc-icon-fill-color: var(--mdc-checkbox-icon-color);\n }\n .container {\n margin: 0.125rem 0;\n }\n .text-container {\n display: flex;\n flex-direction: column;\n gap: 0.25rem;\n }\n \n /* High Contrast Mode */\n @media (forced-colors: active) {\n :host([checked]) .icon-container,\n :host([indeterminate]) .icon-container {\n border: 0.0625rem solid var(--mdc-checkbox-border-color);\n }\n }\n`, ...hostFocusRingStyles(true)];\n\nexport default styles;\n", "import { CSSResult, html, nothing, PropertyValues } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport { DataAriaLabelMixin } from '../../utils/mixins/DataAriaLabelMixin';\nimport { AssociatedFormControl, FormInternalsMixin } from '../../utils/mixins/FormInternalsMixin';\nimport FormfieldWrapper from '../formfieldwrapper/formfieldwrapper.component';\nimport { DEFAULTS as FORMFIELD_DEFAULTS } from '../formfieldwrapper/formfieldwrapper.constants';\nimport type { ValidationType } from '../formfieldwrapper/formfieldwrapper.types';\nimport { ICON_NAME } from './checkbox.constants';\nimport styles from './checkbox.styles';\n\n/**\n * Checkboxes allow users to select multiple options from a list or turn an item/feature on or off.\n * These are often used in forms, settings, and selections in lists.\n *\n * A checkbox component contains an optional label and an optional helper text.\n *\n * To create a group of checkboxes, use the FormFieldGroup component.\n *\n * @dependency mdc-icon\n *\n * @tagname mdc-checkbox\n *\n * @event change - (React: onChange) Event that gets dispatched when the checkbox state changes.\n * @event focus - (React: onFocus) Event that gets dispatched when the checkbox receives focus.\n *\n * @cssproperty --mdc-checkbox-background-color-hover - Allows customization of the background color on hover.\n * @cssproperty --mdc-checkbox-border-color - Border color in high contrast.\n * @cssproperty --mdc-checkbox-checked-background-color - Background color for a selected checkbox.\n * @cssproperty --mdc-checkbox-checked-background-color-hover - Background color for a selected checkbox when hovered.\n * @cssproperty --mdc-checkbox-checked-pressed-icon-color - Background color for a selected checkbox when pressed.\n * @cssproperty --mdc-checkbox-disabled-background-color - Background color for a disabled checkbox.\n * @cssproperty --mdc-checkbox-disabled-border-color - Border color for a disabled checkbox.\n * @cssproperty --mdc-checkbox-disabled-checked-icon-color - Background color for a disabled, selected checkbox.\n * @cssproperty --mdc-checkbox-disabled-icon-color - Icon color for a disabled checkbox.\n * @cssproperty --mdc-checkbox-icon-background-color - Background color for an unselected checkbox.\n * @cssproperty --mdc-checkbox-icon-border-color - Default background color for an unselected checkbox.\n * @cssproperty --mdc-checkbox-icon-color - Icon color for an unselected checkbox.\n * @cssproperty --mdc-checkbox-pressed-icon-color - Background color for a selected checkbox when pressed.\n */\nclass Checkbox extends FormInternalsMixin(DataAriaLabelMixin(FormfieldWrapper)) implements AssociatedFormControl {\n /**\n * Determines whether the checkbox is selected or unselected.\n *\n * @default false\n */\n @property({ type: Boolean, reflect: true }) checked = false;\n\n /**\n * This property is used to determine the parent checkbox in a nested checkbox group.\n * If any one of the children is unselected, then the parent checkbox will be indeterminate.\n * If all children are either selected or unselected, then the parent checkbox will not be indeterminate.\n *\n * @default false\n */\n @property({ type: Boolean, reflect: true }) indeterminate = false;\n\n /**\n * Automatically focus on the element when the page loads.\n * [MDN Reference](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/autofocus)\n * @default false\n */\n @property({ type: Boolean, reflect: true }) override autofocus = false;\n\n constructor() {\n super();\n // Checkbox does not contain helpTextType property.\n this.helpTextType = undefined as unknown as ValidationType;\n }\n\n /**\n * Updates the form value to reflect the current state of the checkbox.\n * If checked, the value is set to either the user-provided value or 'on' if no value is provided.\n * If unchecked, the value is set to null.\n */\n private setFormValue() {\n let actualValue: string | null = null;\n\n if (this.checked) {\n actualValue = !this.value ? 'on' : this.value;\n } else {\n actualValue = null;\n }\n\n this.manageRequired();\n this.internals.setFormValue(actualValue);\n }\n\n /**\n * Manages the required state of the checkbox.\n * If the checkbox is not checked and the requiredLabel property is set, then the checkbox is invalid.\n */\n private manageRequired() {\n if (!this.checked && this.requiredLabel) {\n if (this.validationMessage) {\n this.inputElement.setCustomValidity(this.validationMessage);\n } else {\n this.inputElement.setCustomValidity('');\n }\n this.setValidity();\n } else {\n this.internals.setValidity({});\n }\n }\n\n /** @internal\n * Resets the checkbox to its initial state.\n * The checked property is set to false.\n */\n formResetCallback(): void {\n this.checked = false;\n this.indeterminate = false;\n }\n\n /** @internal */\n formStateRestoreCallback(\n state: string,\n ): void {\n if (state) {\n this.checked = true;\n }\n }\n\n /**\n * Toggles the state of the checkbox element.\n * If the element is not disabled, then\n * the checked property is toggled and the indeterminate property is set to false.\n */\n private toggleState(): void {\n if (!this.disabled) {\n this.checked = !this.checked;\n this.indeterminate = false;\n }\n }\n\n /**\n * Handles the keydown event on the checkbox.\n * When the user presses Enter, the form is submitted.\n * @param event - The keyboard event.\n */\n private handleKeyDown(event: KeyboardEvent): void {\n if (event.key === 'Enter') {\n this.form?.requestSubmit();\n }\n }\n\n /**\n * Toggles the state of the checkbox element.\n * and dispatch the new change event.\n */\n public handleChange(event: Event): void {\n this.toggleState();\n const EventConstructor = event.constructor as typeof Event;\n this.dispatchEvent(new EventConstructor(event.type, event));\n }\n\n public override update(changedProperties: PropertyValues): void {\n super.update(changedProperties);\n\n if (changedProperties.has('checked')) {\n this.setFormValue();\n }\n }\n\n private renderLabelAndHelperText = () => {\n if (!this.label) return nothing;\n return html`<div class=\"text-container\">\n ${this.renderLabel()}\n ${this.renderHelperText()}\n </div>`;\n };\n\n public override render() {\n const checkboxIconContent = (this.checked || this.indeterminate) ? html`\n <mdc-icon\n class=\"icon\"\n name=\"${this.indeterminate ? ICON_NAME.INDETERMINATE : ICON_NAME.CHECKED}\"\n size=\"1\"\n length-unit=\"rem\"\n ></mdc-icon>\n ` : nothing;\n\n return html`\n <div class=\"container mdc-focus-ring\">\n <input\n id=\"${this.id}\"\n type=\"checkbox\"\n class=\"input\"\n ?autofocus=\"${this.autofocus}\"\n name=\"${ifDefined(this.name)}\"\n value=\"${ifDefined(this.value)}\"\n ?required=\"${!!this.requiredLabel}\"\n .checked=\"${this.checked}\"\n aria-checked=\"${this.indeterminate ? 'mixed' : this.checked}\"\n .indeterminate=\"${this.indeterminate}\"\n .disabled=\"${this.disabled}\"\n aria-label=\"${this.dataAriaLabel ?? ''}\"\n tabindex=\"${this.disabled ? -1 : 0}\"\n aria-describedby=\"${ifDefined(this.helpText ? FORMFIELD_DEFAULTS.HELPER_TEXT_ID : '')}\"\n @change=${this.handleChange}\n @keydown=${this.handleKeyDown}\n />\n <div class=\"icon-container\">${checkboxIconContent}</div>\n </div>\n ${this.renderLabelAndHelperText()}\n `;\n }\n\n public static override styles: Array<CSSResult> = [...FormfieldWrapper.styles, ...styles];\n}\n\nexport default Checkbox;\n", "import Checkbox from './checkbox.component';\nimport { TAG_NAME } from './checkbox.constants';\nimport '../icon';\n\nCheckbox.register(TAG_NAME);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n ['mdc-checkbox']: Checkbox;\n }\n}\n\nexport default Checkbox;\n", "import utils from '../../utils/tag-name';\nimport { TAG_NAME as BUTTON_TAG } from '../button/button.constants';\nimport { TAG_NAME as TEXT_TAG } from '../text/text.constants';\n\nconst TAG_NAME = utils.constructTagName('divider');\n\nconst DIVIDER_ORIENTATION = {\n HORIZONTAL: 'horizontal',\n VERTICAL: 'vertical',\n} as const;\n\nconst DIVIDER_VARIANT = {\n SOLID: 'solid',\n GRADIENT: 'gradient',\n} as const;\n\n/**\n * Direction types for both the arrow and button component.\n * These directions are dependent on the divider's orientation.\n */\nconst DIRECTIONS = {\n POSITIVE: 'positive',\n NEGATIVE: 'negative',\n} as const;\n\nconst ARROW_ICONS = {\n UP: 'arrow-up-regular',\n DOWN: 'arrow-down-regular',\n LEFT: 'arrow-left-regular',\n RIGHT: 'arrow-right-regular',\n} as const;\n\nconst DEFAULTS = {\n ORIENTATION: DIVIDER_ORIENTATION.HORIZONTAL,\n VARIANT: DIVIDER_VARIANT.SOLID,\n ARROW_DIRECTION: DIRECTIONS.NEGATIVE,\n BUTTON_DIRECTION: DIRECTIONS.NEGATIVE,\n} as const;\n\nexport {\n TAG_NAME,\n DEFAULTS,\n DIVIDER_VARIANT,\n DIVIDER_ORIENTATION,\n DIRECTIONS,\n BUTTON_TAG,\n TEXT_TAG,\n ARROW_ICONS,\n};\n", "import { css } from 'lit';\nimport { hostFitContentStyles } from '../../utils/styles';\n\n/**\n * Divider component styles\n */\nconst styles = [\n hostFitContentStyles,\n /* Host styles */\n css`\n :host {\n --mdc-divider-background-color: var(--mds-color-theme-outline-secondary-normal);\n --mdc-divider-width: 0.0625rem;\n --mdc-divider-horizontal-gradient: var(--mds-color-theme-gradientdivider-default-normal);\n --mdc-divider-vertical-gradient: var(--mds-color-theme-gradientdivider-vertical-normal);\n --mdc-divider-text-size: var(--mds-font-size-body-midsize);\n --mdc-divider-text-color: var(--mds-color-theme-text-secondary-normal);\n --mdc-divider-text-line-height: var(--mds-font-lineheight-body-midsize);\n --mdc-divider-text-margin: 1.5rem;\n --mdc-divider-grabber-button-border-radius: 0.5rem;\n --mdc-divider-grabber-button-border-color: var(--mds-color-theme-outline-secondary-normal);\n --mdc-divider-grabber-button-background-color-normal: var(--mds-color-theme-overlay-button-secondary-normal);\n --mdc-divider-grabber-button-background-color-hover: var(--mds-color-theme-overlay-button-secondary-hover);\n --mdc-divider-grabber-button-background-color-pressed: var(--mds-color-theme-overlay-button-secondary-pressed);\n\n display: flex;\n justify-content: center;\n }\n\n /* Primary and grabber divider styles */\n :host([data-type='mdc-primary-divider']),\n :host([data-type='mdc-grabber-divider']) {\n background-color: var(--mdc-divider-background-color);\n }\n\n @media (forced-colors: active) {\n /* Primary and grabber divider styles */\n :host([data-type='mdc-primary-divider'][button-position='positive']),\n :host([data-type='mdc-grabber-divider'][button-position='positive']) {\n border: 0;\n border-top: var(--mdc-divider-width) solid var(--mdc-divider-background-color);\n }\n\n :host([data-type='mdc-primary-divider'][button-position='negative']),\n :host([data-type='mdc-grabber-divider'][button-position='negative']) {\n border: 0;\n border-bottom: var(--mdc-divider-width) solid var(--mdc-divider-background-color);\n }\n\n :host([data-type='mdc-primary-divider'][orientation='vertical'][button-position='positive']),\n :host([data-type='mdc-grabber-divider'][orientation='vertical'][button-position='positive']),\n :host([data-type='mdc-primary-divider'][orientation='vertical'][button-position='negative']:dir(rtl)),\n :host([data-type='mdc-grabber-divider'][orientation='vertical'][button-position='negative']:dir(rtl)) {\n border: 0;\n border-right: var(--mdc-divider-width) solid var(--mdc-divider-background-color);\n }\n\n :host([data-type='mdc-primary-divider'][orientation='vertical'][button-position='negative']),\n :host([data-type='mdc-grabber-divider'][orientation='vertical'][button-position='negative']),\n :host([data-type='mdc-primary-divider'][orientation='vertical'][button-position='positive']:dir(rtl)),\n :host([data-type='mdc-grabber-divider'][orientation='vertical'][button-position='positive']:dir(rtl)) {\n border: 0;\n border-left: var(--mdc-divider-width) solid var(--mdc-divider-background-color);\n }\n }\n\n /* Orientation-specific styles */\n :host([orientation='horizontal']) {\n flex-direction: row;\n height: var(--mdc-divider-width);\n width: 100%;\n }\n\n :host([orientation='vertical']:not([data-type='mdc-text-divider'])) {\n flex-direction: column;\n height: 100%;\n width: var(--mdc-divider-width);\n }\n\n /* Gradient styles for primary and grabber dividers */\n :host([orientation='horizontal'][variant='gradient'][data-type='mdc-primary-divider']),\n :host([orientation='horizontal'][variant='gradient'][data-type='mdc-grabber-divider']) {\n background: var(--mdc-divider-horizontal-gradient);\n }\n\n :host([orientation='vertical'][variant='gradient'][data-type='mdc-primary-divider']),\n :host([orientation='vertical'][variant='gradient'][data-type='mdc-grabber-divider']) {\n background: var(--mdc-divider-vertical-gradient);\n }\n\n /* Hiding slotted content for primary dividers */\n :host([data-type='mdc-primary-divider']) ::slotted(*) {\n display: none;\n }\n\n /** Button divider styles */\n\n ::slotted(mdc-button) {\n background-color: var(--mdc-divider-grabber-button-background-color-normal);\n border-color: var(--mdc-divider-grabber-button-border-color);\n }\n\n ::slotted(mdc-button:hover) {\n background-color: var(--mdc-divider-grabber-button-background-color-hover);\n }\n\n ::slotted(mdc-button:active) {\n background-color: var(--mdc-divider-grabber-button-background-color-pressed);\n }\n\n :host([orientation='vertical']) ::slotted(mdc-button) {\n width: 1.25rem;\n height: 2.5rem;\n border-radius: 0\n var(--mdc-divider-grabber-button-border-radius)\n var(--mdc-divider-grabber-button-border-radius)\n 0;\n }\n\n :host([orientation='horizontal']) ::slotted(mdc-button) {\n height: 1.25rem;\n width: 2.5rem;\n border-radius: 0\n 0\n var(--mdc-divider-grabber-button-border-radius)\n var(--mdc-divider-grabber-button-border-radius);\n }\n\n :host([orientation='horizontal'][button-position='positive']),\n :host([orientation='vertical'][button-position='negative']) {\n align-items: end;\n }\n\n :host([orientation='horizontal'][button-position='negative']),\n :host([orientation='vertical'][button-position='positive']) {\n align-items: start;\n }\n\n :host([orientation='horizontal'][button-position='positive']) ::slotted(mdc-button) {\n border-radius: var(--mdc-divider-grabber-button-border-radius)\n var(--mdc-divider-grabber-button-border-radius)\n 0\n 0;\n margin: 0;\n margin-bottom: var(--mdc-divider-width);\n border-bottom: 0;\n }\n\n :host([orientation='horizontal'][button-position='negative']) ::slotted(mdc-button) {\n margin: 0;\n margin-top: var(--mdc-divider-width);\n border-top: 0;\n }\n\n :host([orientation='vertical'][button-position='negative']:dir(ltr)) ::slotted(mdc-button),\n :host([orientation='vertical'][button-position='negative']:dir(rtl)) ::slotted(mdc-button) {\n border-radius: var(--mdc-divider-grabber-button-border-radius)\n 0\n 0\n var(--mdc-divider-grabber-button-border-radius);\n margin: 0;\n margin-right: var(--mdc-divider-width);\n border-right: 0;\n }\n\n :host([orientation='vertical'][button-position='positive']:dir(ltr)) ::slotted(mdc-button),\n :host([orientation='vertical'][button-position='positive']:dir(rtl)) ::slotted(mdc-button) {\n margin: 0;\n margin-left: var(--mdc-divider-width);\n border-left: 0;\n }\n\n :host([orientation='vertical'][button-position='positive']:dir(rtl)) ::slotted(mdc-button) {\n border-radius: 0\n var(--mdc-divider-grabber-button-border-radius)\n var(--mdc-divider-grabber-button-border-radius)\n 0;\n transform: rotate(180deg);\n margin: 0;\n margin-right: var(--mdc-divider-width);\n }\n\n :host([orientation='vertical'][button-position='negative']:dir(rtl)) ::slotted(mdc-button) {\n transform: rotate(180deg);\n margin: 0;\n margin-left: var(--mdc-divider-width);\n }\n\n /** Text divider styles */\n :host([orientation='horizontal'][variant='gradient'][data-type='mdc-text-divider']),\n :host([orientation='horizontal'][variant='solid'][data-type='mdc-text-divider']) {\n align-items: center;\n }\n\n :host([data-type='mdc-text-divider']) > div {\n width: 100%;\n height: 100%;\n background-color: var(--mdc-divider-background-color);\n }\n\n @media (forced-colors: active) {\n :host([data-type='mdc-text-divider']) > div {\n border-bottom: var(--mdc-divider-width) solid var(--mdc-divider-background-color);\n }\n }\n\n :host([orientation='horizontal'][variant='gradient'][data-type='mdc-text-divider']) > div:first-of-type {\n background: linear-gradient(to right, transparent, 30%, var(--mdc-divider-background-color));\n }\n\n :host([orientation='horizontal'][variant='gradient'][data-type='mdc-text-divider']) > div:last-of-type {\n background: linear-gradient(to left, transparent, 30%, var(--mdc-divider-background-color));\n }\n\n :host([data-type='mdc-text-divider']) ::slotted(mdc-text) {\n margin: 0 var(--mdc-divider-text-margin);\n color: var(--mdc-divider-text-color);\n font-size: var(--mdc-divider-text-size);\n line-height: var(--mdc-divider-text-line-height);\n }\n `,\n];\n\nexport default styles;\n", "import type { PropertyValues } from 'lit';\nimport { CSSResult, html } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport { Component } from '../../models';\nimport {\n ARROW_ICONS,\n BUTTON_TAG,\n DEFAULTS,\n DIRECTIONS,\n DIVIDER_ORIENTATION,\n DIVIDER_VARIANT,\n TEXT_TAG,\n} from './divider.constants';\nimport styles from './divider.styles';\nimport type { Directions, DividerOrientation, DividerVariant } from './divider.types';\n\n/**\n * `mdc-divider` is a component that provides a line to separate and organize content.\n * It can also include a button or text positioned centrally, allowing users to interact with the layout.\n *\n * **Divider Orientation:**\n * - **Horizontal**: A thin, horizontal line.\n * - **Vertical**: A thin, vertical line.\n *\n * **Divider Variants:**\n * - **solid**: Solid line.\n * - **gradient**: Gradient Line.\n *\n * **Divider Types:**\n * - The type of divider is inferred based on the kind of slot present.\n * - **Primary**: A simple horizontal or vertical divider.\n * - **Text**: A horizontal divider with a text label in the center.\n * - **Grabber Button**: A horizontal or vertical divider with a styled button in the center.\n *\n * **Accessibility:**\n * - When the slot is replaced by an `mdc-button`:\n * - `aria-label` should be passed to the `mdc-button`.\n * - `aria-expanded` should be passed to the `mdc-button`.\n *\n * **Notes:**\n * - If the slot is replaced by an invalid tag name or contains multiple elements,\n * the divider defaults to the **Primary** type.\n * - To override the styles of the divider, use the provided CSS custom properties.\n *\n * @tagname mdc-divider\n *\n * @cssproperty --mdc-divider-background-color - background color of the divider\n * @cssproperty --mdc-divider-width - width of the divider\n * @cssproperty --mdc-divider-horizontal-gradient - gradient of the horizontal divider\n * @cssproperty --mdc-divider-vertical-gradient - gradient of the vertical divider\n * @cssproperty --mdc-divider-text-size - font size of label in the text divider\n * @cssproperty --mdc-divider-text-color - font color of label in the text divider\n * @cssproperty --mdc-divider-text-margin - left and right margin of label in the text divider\n * @cssproperty --mdc-divider-text-line-height - line height of label in the text divider\n * @cssproperty --mdc-divider-grabber-button-background-color-normal - background color of the grabber button\n * in rest state\n * @cssproperty --mdc-divider-grabber-button-background-color-hover - background color of the grabber button\n * in hover state\n * @cssproperty --mdc-divider-grabber-button-background-color-pressed - background color of the grabber button\n * in pressed state\n * @cssproperty --mdc-divider-grabber-button-border-color - border color of the grabber button\n * @cssproperty --mdc-divider-grabber-button-border-radius - border radius of the grabber button\n */\nclass Divider extends Component {\n /**\n * Two orientations of divider\n * - **horizontal**: A thin, horizontal line with 0.0625rem width.\n * - **vertical**: A thin, vertical line with 0.0625rem width.\n *\n * Note: We do not support \"Vertical Text Divider\" as of now.\n * @default horizontal\n */\n @property({ type: String, reflect: true })\n orientation: DividerOrientation = DEFAULTS.ORIENTATION;\n\n /**\n * Two variants of divider\n * - **solid**: Solid line.\n * - **gradient**: Gradient Line that fades on either sides of the divider.\n * @default solid\n */\n @property({ type: String, reflect: true })\n variant: DividerVariant = DEFAULTS.VARIANT;\n\n /**\n * Direction of the arrow icon, if applicable.\n * - **positive**\n * - **negative**\n *\n * Note: Positive and Negative directions are defined based on Cartesian plane.\n * @default 'negative'\n */\n @property({ type: String, attribute: 'arrow-direction', reflect: true })\n arrowDirection: Directions = DEFAULTS.ARROW_DIRECTION;\n\n /**\n * Position of the button, if applicable.\n * - **positive**\n * - **negative**\n *\n * Note: Positive and Negative directions are defined based on Cartesian plane.\n * @default 'negative'\n */\n @property({ type: String, attribute: 'button-position', reflect: true })\n buttonPosition: Directions = DEFAULTS.BUTTON_DIRECTION;\n\n /**\n * Sets the variant attribute for the divider component.\n * If the provided variant is not included in the DIVIDER_VARIANT,\n * it defaults to the value specified in DEFAULTS.VARIANT.\n *\n * @param variant - The variant to set.\n */\n private setVariant(variant: DividerVariant) {\n this.setAttribute('variant', Object.values(DIVIDER_VARIANT).includes(variant) ? variant : DEFAULTS.VARIANT);\n }\n\n /**\n * Sets the orientation attribute for the divider component.\n * If the provided orientation is not included in the DIVIDER_ORIENTATION,\n * it defaults to the value specified in DEFAULTS.ORIENTATION.\n *\n * @param orientation - The orientation to set.\n */\n private setOrientation(orientation: DividerOrientation) {\n this.setAttribute(\n 'orientation',\n Object.values(DIVIDER_ORIENTATION).includes(orientation) ? orientation : DEFAULTS.ORIENTATION,\n );\n }\n\n /**\n * Sets the buttonPosition and arrowDirection attribute for the divider component.\n * If the provided buttonPosition and arrowDirection are not included in the DIRECTIONS,\n * it defaults to the value specified in DIRECTIONS based on the ORIENTATION.\n *\n * @param buttonPosition - The buttonPosition to set.\n * @param arrowDirection - The arrowDirection to set.\n */\n private ensureValidDirections() {\n const defaultDirection = this.orientation === DIVIDER_ORIENTATION.HORIZONTAL\n ? DIRECTIONS.NEGATIVE\n : DIRECTIONS.POSITIVE;\n\n if (!Object.values(DIRECTIONS).includes(this.buttonPosition as Directions)) {\n this.buttonPosition = defaultDirection;\n }\n\n if (!Object.values(DIRECTIONS).includes(this.arrowDirection as Directions)) {\n this.arrowDirection = defaultDirection;\n }\n }\n\n /**\n * Configures the grabber button within the divider.\n *\n * - Sets the `prefix-icon` attribute for the grabber button based\n * on the `arrow-direction` and `orientation` properties.\n *\n * This method updates the DOM element dynamically if a grabber button is present.\n */\n private setGrabberButton(): void {\n this.ensureValidDirections();\n const buttonElement = this.querySelector('mdc-button');\n if (buttonElement) {\n const iconType = this.getArrowIcon();\n buttonElement.setAttribute('variant', 'secondary');\n buttonElement.setAttribute('prefix-icon', iconType);\n }\n }\n\n /**\n * Determines the arrow icon based on the consumer-defined `arrowDirection`.\n *\n * @returns The icon that represents the arrow direction.\n */\n private getArrowIcon(): string {\n const isHorizontal = this.orientation === DIVIDER_ORIENTATION.HORIZONTAL;\n const isPositive = this.arrowDirection === DIRECTIONS.POSITIVE;\n\n if (isHorizontal) {\n return isPositive ? ARROW_ICONS.UP : ARROW_ICONS.DOWN;\n }\n\n return isPositive ? ARROW_ICONS.RIGHT : ARROW_ICONS.LEFT;\n }\n\n public override update(changedProperties: PropertyValues): void {\n super.update(changedProperties);\n\n if (changedProperties.has('orientation')) {\n this.setOrientation(this.orientation);\n }\n\n if (changedProperties.has('variant')) {\n this.setVariant(this.variant);\n }\n\n if (\n changedProperties.has('orientation')\n || changedProperties.has('arrowDirection')\n || changedProperties.has('buttonPosition')\n ) {\n this.setGrabberButton();\n }\n }\n\n /**\n * Infers the type of divider based on the kind of slot present.\n * @param slot - default slot of divider\n */\n private inferDividerType() {\n const slot = this.shadowRoot?.querySelector('slot');\n const assignedElements = slot?.assignedElements({ flatten: true }) || [];\n if (assignedElements.length > 1) return;\n\n const hasTextChild = assignedElements.some((el) => el.tagName === TEXT_TAG.toUpperCase());\n const hasButtonChild = assignedElements.some((el) => el.tagName === BUTTON_TAG.toUpperCase());\n\n if (hasTextChild && !hasButtonChild) {\n this.setAttribute('data-type', 'mdc-text-divider');\n } else if (!hasTextChild && hasButtonChild) {\n this.setAttribute('data-type', 'mdc-grabber-divider');\n this.setGrabberButton();\n }\n }\n\n constructor() {\n super();\n this.setAttribute('data-type', 'mdc-primary-divider');\n }\n\n protected override render() {\n return html`\n <div></div>\n <slot @slotchange=${this.inferDividerType}></slot>\n <div></div>\n `;\n }\n\n public static override styles: Array<CSSResult> = [...Component.styles, ...styles];\n}\n\nexport default Divider;\n", "import Divider from './divider.component';\nimport { TAG_NAME } from './divider.constants';\n\nDivider.register(TAG_NAME);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n ['mdc-divider']: Divider\n }\n}\n\nexport default Divider;\n", "import utils from '../../utils/tag-name';\n\nconst TAG_NAME = utils.constructTagName('formfieldgroup');\n\nconst ROLE = {\n RADIOGROUP: 'radiogroup',\n GROUP: 'group',\n} as const;\n\nexport { ROLE, TAG_NAME };\n", "import { css } from 'lit';\n\nconst styles = css`\n\n :host::part(container) {\n display: flex;\n flex-direction: column;\n gap: 0.75rem;\n }\n\n :host::part(group-header) {\n display: flex;\n flex-direction: column;\n gap: 0.25rem;\n }\n\n :host::part(label-text){\n font-weight: bold;\n }\n`;\n\nexport default [styles];\n", "import type { CSSResult } from 'lit';\nimport { html } from 'lit';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport { DataAriaLabelMixin } from '../../utils/mixins/DataAriaLabelMixin';\nimport FormfieldWrapper from '../formfieldwrapper/formfieldwrapper.component';\nimport { ROLE } from './formfieldgroup.constants';\nimport { DEFAULTS as FORMFIELD_DEFAULTS } from '../formfieldwrapper/formfieldwrapper.constants';\nimport styles from './formfieldgroup.styles';\nimport type { ValidationType } from '../formfieldwrapper/formfieldwrapper.types';\n\n/**\n * `mdc-formfieldgroup` component, groups the form field components together.\n * All passed in children will have a gap of 12px (0.75rem) each applied.\n *\n * This component is specifically for creating a `checkbox` group and a `toggle` group component.\n * For the radiogroup use the RadioGroup component instead.\n *\n * The header text and description text are displayed above the items with accessible labels.<br/>\n * The consumer has to provide atleast the header-text or the aria-label,\n * like one of them <b>has</b> to be passed in always, otherwise its not accessible.\n *\n * The role will be set to `group`.\n * The aria-label will be set with the data-aria-label property.\n * The aria-labelledby will be set with the header id which contains the header text information.\n * The aria-describedby will be set with the description id which contains the description text information.\n *\n * @tagname mdc-formfieldgroup\n *\n * @slot default - This is a default slot for checkbox or toggle components.\n */\nclass FormfieldGroup extends DataAriaLabelMixin(FormfieldWrapper) {\n /**\n * @internal\n * This is used to set the role of the component as `radiogroup` if this is true and to 'group' if it is false.\n */\n protected isRadio = false;\n\n constructor() {\n super();\n /** @internal */\n this.shouldRenderLabel = false;\n this.id = '';\n this.helpTextType = undefined as unknown as ValidationType;\n this.disabled = undefined as unknown as boolean;\n }\n\n public override render() {\n return html`\n <div\n part=\"container\"\n role=\"${this.isRadio ? ROLE.RADIOGROUP : ROLE.GROUP}\"\n aria-labelledby=\"${FORMFIELD_DEFAULTS.HEADING_ID}\"\n aria-describedby=\"${ifDefined(this.helpText ? FORMFIELD_DEFAULTS.HELPER_TEXT_ID : '')}\"\n aria-label=\"${this.dataAriaLabel ?? ''}\"\n >\n <div part=\"group-header\">\n ${this.renderLabel()}\n ${this.renderHelperText()}\n </div>\n <slot></slot>\n </div>\n `;\n }\n\n public static override styles: Array<CSSResult> = [...FormfieldWrapper.styles, ...styles];\n}\n\nexport default FormfieldGroup;\n", "import FormfieldGroup from './formfieldgroup.component';\nimport { TAG_NAME } from './formfieldgroup.constants';\nimport '../text';\n\nFormfieldGroup.register(TAG_NAME);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n ['mdc-formfieldgroup']: FormfieldGroup\n }\n}\n\nexport default FormfieldGroup;\n", "import IconProvider from './iconprovider.component';\nimport { TAG_NAME } from './iconprovider.constants';\n\nIconProvider.register(TAG_NAME);\n\nexport default IconProvider;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n ['mdc-iconprovider']: IconProvider\n }\n}\n", "import { css } from 'lit';\nimport { hostFocusRingStyles } from '../../utils/styles';\n\nconst styles = [css`\n :host{\n --mdc-input-disabled-border-color: var(--mds-color-theme-outline-primary-disabled);\n --mdc-input-disabled-text-color: var(--mds-color-theme-text-primary-disabled);\n --mdc-input-disabled-background-color: var(--mds-color-theme-background-primary-disabled);\n --mdc-input-border-color: var(--mds-color-theme-outline-input-normal);\n --mdc-input-text-color: var(--mds-color-theme-text-primary-normal);\n --mdc-input-background-color: var(--mds-color-theme-background-primary-ghost);\n --mdc-input-selection-background-color: var(--mds-color-theme-background-accent-active);\n --mdc-input-selection-text-color: var(--mds-color-theme-inverted-text-primary-normal);\n --mdc-input-support-text-color: var(--mds-color-theme-text-secondary-normal);\n --mdc-input-hover-background-color: var(--mds-color-theme-background-primary-hover);\n --mdc-input-focused-background-color: var(--mds-color-theme-background-primary-active);\n --mdc-input-focused-border-color: var(--mds-color-theme-outline-input-active);\n --mdc-input-error-border-color: var(--mds-color-theme-text-error-normal);\n --mdc-input-warning-border-color: var(--mds-color-theme-text-warning-normal);\n --mdc-input-success-border-color: var(--mds-color-theme-text-success-normal);\n --mdc-input-primary-border-color: var(--mds-color-theme-text-accent-normal);\n }\n\n :host, .input-container, .input-section, .input{\n width: 100%;\n }\n\n :host([readonly]) .leading-icon {\n color: var(--mdc-input-support-text-color);\n }\n\n :host([disabled]) .input,\n :host([disabled]) .input::placeholder,\n :host([disabled]) .prefix-text{\n color: var(--mdc-input-disabled-text-color);\n }\n\n :host([disabled]) .input,\n :host([readonly]) .input{\n border-color: var(--mdc-input-disabled-border-color);\n background: var(--mdc-input-disabled-background-color);\n }\n\n :host([disabled][help-text-type=\"default\"]) .input-container,\n :host([disabled][help-text-type=\"success\"]) .input-container,\n :host([disabled][help-text-type=\"warning\"]) .input-container,\n :host([disabled][help-text-type=\"error\"]) .input-container,\n :host([disabled][help-text-type=\"priority\"]) .input-container{\n border-color: var(--mdc-input-disabled-border-color);\n }\n\n .leading-icon{\n aspect-ratio: 1;\n }\n\n .input-container{\n height: 2rem;\n border-radius: 0.5rem;\n border: 0.0625rem solid var(--mdc-input-border-color);\n display: flex;\n align-items: center;\n gap: 0.375rem;\n padding: 0.34375rem 0.375rem 0.34375rem 0.75rem;\n min-width: 3.25rem;\n }\n\n .input-section{\n display: flex;\n gap: 0.25rem;\n }\n\n .input {\n border: none;\n color: var(--mdc-input-text-color);\n background-color: var(--mdc-input-background-color);\n outline: none;\n }\n\n .input::selection { \n background-color: var(--mdc-input-selection-background-color);\n color: var(--mdc-input-selection-text-color);\n }\n\n .prefix-text{\n color: var(--mdc-input-support-text-color);\n white-space: nowrap; // restrict prefix text to be in one line\n }\n\n :host(:not([disabled])) .input-container:hover{\n background-color: var(--mdc-input-hover-background-color);\n }\n\n :host(:not([disabled])) .input-container:active, :host(:not([disabled])) .input-container:focus-within{\n background-color: var(--mdc-input-focused-background-color);\n border-color: var(--mdc-input-focused-border-color);\n }\n\n .input::placeholder{\n color: var(--mdc-input-support-text-color);\n }\n\n :host([help-text-type=\"error\"]) .input-container, :host([help-text-type=\"error\"]) .input-container:focus-within {\n border-color: var(--mdc-input-error-border-color);\n }\n :host([help-text-type=\"warning\"]) .input-container, :host([help-text-type=\"warning\"]) .input-container:focus-within {\n border-color: var(--mdc-input-warning-border-color);\n }\n :host([help-text-type=\"success\"]) .input-container, :host([help-text-type=\"success\"]) .input-container:focus-within {\n border-color: var(--mdc-input-success-border-color);\n }\n :host([help-text-type=\"priority\"]) .input-container, :host([help-text-type=\"priority\"]) input-container:focus-within {\n border-color: var(--mdc-input-primary-border-color);\n }\n\n .hidden{\n opacity: 0;\n pointer-events: none;\n }\n`, ...hostFocusRingStyles(true)];\n\nexport default styles;\n", "import FormfieldWrapper from './formfieldwrapper.component';\nimport { TAG_NAME } from './formfieldwrapper.constants';\nimport '../icon';\nimport '../text';\n\nFormfieldWrapper.register(TAG_NAME);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n ['mdc-formfieldwrapper']: FormfieldWrapper;\n }\n}\n\nexport default FormfieldWrapper;\n", "import utils from '../../utils/tag-name';\nimport { BUTTON_VARIANTS, ICON_BUTTON_SIZES } from '../button/button.constants';\nimport { VALIDATION } from '../formfieldwrapper/formfieldwrapper.constants';\nimport { TYPE, VALID_TEXT_TAGS } from '../text/text.constants';\n\nconst TAG_NAME = utils.constructTagName('input');\n\nconst AUTO_CAPITALIZE = {\n OFF: 'off',\n NONE: 'none',\n ON: 'on',\n SENTENCES: 'sentences',\n WORDS: 'words',\n CHARACTERS: 'characters',\n} as const;\n\nconst PREFIX_TEXT_OPTIONS = {\n MAX_LENGTH: 10,\n HELPERTEXT: 'Prefix text should not exceed 10 characters',\n VALIDATION: VALIDATION.ERROR,\n};\n\nconst DEFAULTS = {\n VALIDATION: VALIDATION.DEFAULT,\n ICON_SIZE_VALUE: 1,\n ICON_SIZE_UNIT: 'rem',\n CLEAR_BUTTON_ICON: 'cancel-bold',\n CLEAR_BUTTON_VARIANT: BUTTON_VARIANTS.TERTIARY,\n CLEAR_BUTTON_SIZE: ICON_BUTTON_SIZES[20],\n PREFIX_TEXT_TYPE: TYPE.BODY_MIDSIZE_REGULAR,\n PREFIX_TEXT_TAG: VALID_TEXT_TAGS.SPAN,\n};\n\nexport { TAG_NAME, PREFIX_TEXT_OPTIONS, AUTO_CAPITALIZE, DEFAULTS };\n", "import { CSSResult, html, nothing, PropertyValueMap } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport styles from './input.styles';\nimport FormfieldWrapper from '../formfieldwrapper';\nimport { AUTO_CAPITALIZE, DEFAULTS, PREFIX_TEXT_OPTIONS } from './input.constants';\nimport { DEFAULTS as FORMFIELD_DEFAULTS } from '../formfieldwrapper/formfieldwrapper.constants';\nimport type { IconNames } from '../icon/icon.types';\nimport type { AutoCapitalizeType } from './input.types';\nimport { DataAriaLabelMixin } from '../../utils/mixins/DataAriaLabelMixin';\nimport { FormInternalsMixin, AssociatedFormControl } from '../../utils/mixins/FormInternalsMixin';\n/**\n * mdc-input is a component that allows users to input text.\n * It contains:\n * - label field - describe the input field.\n * - input field - contains the value\n * - help text or validation message - displayed below the input field.\n * - trailing button - it displays a clear the input field.\n * - prefix text - displayed before the input field.\n * - leading icon - displayed before the input field.\n * - clear-aria-label - aria label for the trailing button.\n * - all the attributes of the input field.\n *\n * @tagname mdc-input\n *\n * @event input - (React: onInput) This event is dispatched when the value of the input field changes (every press).\n * @event change - (React: onChange) This event is dispatched when the value of the input field changes (on blur).\n * @event focus - (React: onFocus) This event is dispatched when the input receives focus.\n * @event blur - (React: onBlur) This event is dispatched when the input loses focus.\n *\n * @dependency mdc-icon\n * @dependency mdc-text\n * @dependency mdc-button\n *\n * @cssproperty --mdc-input-disabled-border-color - Border color for the input container when disabled\n * @cssproperty --mdc-input-disabled-text-color - Text color for the input field when disabled\n * @cssproperty --mdc-input-disabled-background-color - Background color for the input field when disabled\n * @cssproperty --mdc-input-border-color - Border color for the input container\n * @cssproperty --mdc-input-text-color - Text color for the input field\n * @cssproperty --mdc-input-background-color - Background color for the input field\n * @cssproperty --mdc-input-selection-background-color - Background color for the selected text\n * @cssproperty --mdc-input-selection-text-color - Text color for the selected text\n * @cssproperty --mdc-input-support-text-color - Text color for the help text\n * @cssproperty --mdc-input-hover-background-color - Background color for the input field when hovered\n * @cssproperty --mdc-input-focused-background-color - Background color for the input field when focused\n * @cssproperty --mdc-input-focused-border-color - Border color for the input container when focused\n * @cssproperty --mdc-input-error-border-color - Border color for the input container when error\n * @cssproperty --mdc-input-warning-border-color - Border color for the input container when warning\n * @cssproperty --mdc-input-success-border-color - Border color for the input container when success\n * @cssproperty --mdc-input-primary-border-color - Border color for the input container when primary\n *\n */\n\nclass Input extends FormInternalsMixin(DataAriaLabelMixin(FormfieldWrapper)) implements AssociatedFormControl {\n /**\n * The placeholder text that is displayed when the input field is empty.\n */\n @property({ type: String }) placeholder = '';\n\n /**\n * readonly attribute of the input field. If true, the input field is read-only.\n */\n @property({ type: Boolean }) readonly = false;\n\n /**\n * The prefix text that is displayed before the input field. It has a max length of 10 characters.\n * When the prefix text is set, make sure to set the 'data-aria-label'\n * attribute with the appropriate value for accessibility.\n */\n @property({ type: String, attribute: 'prefix-text' }) prefixText?: string;\n\n /**\n * The leading icon that is displayed before the input field.\n */\n @property({ type: String, attribute: 'leading-icon' }) leadingIcon?: IconNames;\n\n /**\n * The trailing button when set to true, shows a clear button that clears the input field.\n * @default false\n */\n @property({ type: Boolean, attribute: 'trailing-button' }) trailingButton = false;\n\n /**\n * The maximum number of characters that the input field can accept.\n */\n @property({ type: Number }) maxlength?: number;\n\n /**\n * The minimum number of characters that the input field can accept.\n */\n @property({ type: Number }) minlength?: number;\n\n /**\n * The autocapitalize attribute of the input field.\n * @default 'off'\n */\n @property({ type: String }) override autocapitalize: AutoCapitalizeType = AUTO_CAPITALIZE.OFF;\n\n /**\n * The autocomplete attribute of the input field.\n * @default 'off'\n */\n @property({ type: String }) autocomplete: any = 'off';\n\n /**\n * If true, the input field is focused when the component is rendered.\n * @default false\n */\n @property({ type: Boolean }) override autofocus = false;\n\n /**\n * Specifies the name of the directionality of text for submission purposes (e.g., \"rtl\" for right-to-left).\n */\n @property({ type: String }) dirname?: string;\n\n /**\n * The pattern attribute of the input field.\n * Specifies a regular expression that the input value must match for validation purposes.\n */\n @property({ type: String }) pattern?: string;\n\n /**\n * The list attribute of the input field.\n * Identifies a list of pre-defined options to suggest to the user.\n */\n @property({ type: String }) list?: string;\n\n /**\n * The size attribute of the input field.\n * Specifies the width of the input field.\n * @default undefined\n */\n @property({ type: Number }) size?: number | undefined;\n\n /**\n * Aria label for the trailing button. If trailing button is set to true, this label is used for the clear button.\n * @default ''\n */\n @property({ type: String, attribute: 'clear-aria-label' }) clearAriaLabel = '';\n\n override connectedCallback(): void {\n super.connectedCallback();\n\n this.updateComplete.then(() => {\n if (this.inputElement) {\n this.inputElement.checkValidity();\n this.setInputValidity();\n this.internals.setFormValue(this.inputElement.value);\n }\n }).catch((error) => {\n if (this.onerror) {\n this.onerror(error);\n }\n });\n }\n\n /** @internal */\n formResetCallback(): void {\n this.value = '';\n this.requestUpdate();\n }\n\n /** @internal */\n formStateRestoreCallback(\n state: string,\n ): void {\n this.value = state;\n }\n\n /**\n * Handles the value change of the input field.\n * Sets the form value and updates the validity of the input field.\n * @returns void\n */\n handleValueChange() {\n this.updateComplete.then(() => {\n this.setInputValidity();\n }).catch((error) => {\n if (this.onerror) {\n this.onerror(error);\n }\n });\n }\n\n protected override updated(changedProperties: PropertyValueMap<any> | Map<PropertyKey, unknown>): void {\n super.updated(changedProperties);\n if (changedProperties.has('value')) {\n this.handleValueChange();\n }\n }\n\n private setInputValidity() {\n if (this.validationMessage && this.value === '') {\n this.inputElement.setCustomValidity(this.validationMessage);\n } else {\n this.inputElement.setCustomValidity('');\n }\n this.setValidity();\n }\n\n /**\n * This function is called when the attribute changes.\n * It updates the validity of the input field based on the input field's validity.\n *\n * @param name - attribute name\n * @param old - old value\n * @param value - new value\n */\n override attributeChangedCallback(\n name: string,\n old: string | null,\n value: string | null,\n ): void {\n super.attributeChangedCallback(name, old, value);\n\n const validationRelatedAttributes = [\n 'maxlength',\n 'minlength',\n 'pattern',\n 'required',\n ];\n\n if (validationRelatedAttributes.includes(name)) {\n this.updateComplete.then(() => {\n this.setInputValidity();\n }).catch((error) => {\n if (this.onerror) {\n this.onerror(error);\n }\n });\n }\n }\n\n /**\n * Updates the value of the input field.\n * Sets the form value.\n * @returns void\n */\n private updateValue() {\n this.value = this.inputElement.value;\n this.internals.setFormValue(this.inputElement.value);\n }\n\n /**\n * Handles the input event of the input field.\n * Updates the value and sets the validity of the input field.\n *\n */\n private onInput() {\n this.updateValue();\n this.setInputValidity();\n }\n\n /**\n * Handles the change event of the input field.\n * Updates the value and sets the validity of the input field.\n *\n * The 'change' event does not bubble up through the shadow DOM as it was not composed.\n * Therefore, we need to re-dispatch the same event to ensure it is propagated correctly.\n * Read more: https://developer.mozilla.org/en-US/docs/Web/API/Event/composed\n *\n * @param event - Event which contains information about the value change.\n */\n private onChange(event: Event) {\n this.updateValue();\n this.setInputValidity();\n const EventConstructor = event.constructor as typeof Event;\n this.dispatchEvent(new EventConstructor(event.type, event));\n }\n\n /**\n * Handles the keydown event of the input field.\n * If the key pressed is 'Enter', it submits the form.\n * @param event - Keyboard event\n */\n private handleKeyDown(event: KeyboardEvent) {\n if (event.key === 'Enter') {\n this.form?.requestSubmit();\n }\n }\n\n /**\n * Renders the leading icon before the input field.\n * If the leading icon is not set, it will not be displayed.\n *\n * @returns void\n */\n protected renderLeadingIcon() {\n if (!this.leadingIcon) {\n return nothing;\n }\n return html`\n <mdc-icon \n class=\"leading-icon\" \n part=\"leading-icon\"\n name=${this.leadingIcon} \n size=\"${DEFAULTS.ICON_SIZE_VALUE}\" \n length-unit=\"${DEFAULTS.ICON_SIZE_UNIT}\">\n </mdc-icon>\n `;\n }\n\n /**\n * Renders the prefix text before the input field.\n * If the prefix text is more than 10 characters,\n * - it will not be displayed.\n * - the validation messsage will be displayed.\n *\n * Note: We are setting aria-hidden so that the screen reader does not read the prefix text.\n * The consumers should set the appropriate aria-label for the input field using 'data-aria-label' attribute.\n * @returns void\n */\n protected renderPrefixText() {\n if (!this.prefixText) {\n return nothing;\n }\n return html`\n <mdc-text \n class=\"prefix-text\" \n tagname=\"${DEFAULTS.PREFIX_TEXT_TAG}\" \n type=\"${DEFAULTS.PREFIX_TEXT_TYPE}\"\n aria-hidden=\"true\"\n >\n ${this.prefixText.slice(0, PREFIX_TEXT_OPTIONS.MAX_LENGTH)}\n </mdc-text>\n `;\n }\n\n /**\n * Clears the input field.\n */\n private clearInputText() {\n this.value = '';\n // focus the input field after clearing the text\n this.inputElement?.focus();\n }\n\n /**\n * Renders the trailing button to clear the input field if the trailingButton is set to true.\n * @returns void\n */\n protected renderTrailingButton() {\n if (!this.trailingButton) {\n return nothing;\n }\n return html`\n <mdc-button \n part='trailing-button'\n class='own-focus-ring ${!this.value ? 'hidden' : ''}'\n prefix-icon='${DEFAULTS.CLEAR_BUTTON_ICON}'\n variant='${DEFAULTS.CLEAR_BUTTON_VARIANT}'\n size=\"${DEFAULTS.CLEAR_BUTTON_SIZE}\"\n aria-label=\"${this.clearAriaLabel}\"\n @click=${this.clearInputText}\n ?disabled=${this.disabled || this.readonly || !this.value}\n ></mdc-button>\n `;\n }\n\n public override render() {\n return html`\n ${this.renderLabel()}\n <div class=\"input-container mdc-focus-ring\" part=\"input-container\">\n <slot name=\"input-leading-icon\">${this.renderLeadingIcon()}</slot>\n <div class=\"input-section\" part=\"input-section\">\n <slot name=\"input-prefix-text\">${this.renderPrefixText()}</slot>\n <slot name=\"input\">\n <input \n aria-label=\"${this.dataAriaLabel ?? ''}\"\n class='input'\n part='input'\n id=\"${this.id}\"\n name=\"${this.name}\"\n .value=\"${this.value}\"\n ?disabled=\"${this.disabled}\"\n ?readonly=\"${this.readonly}\"\n ?required=\"${!!this.requiredLabel}\"\n type=\"text\"\n aria-describedby=\"${ifDefined(this.helpText ? FORMFIELD_DEFAULTS.HELPER_TEXT_ID : '')}\"\n aria-invalid=\"${this.helpTextType === 'error' ? 'true' : 'false'}\"\n placeholder=${ifDefined(this.placeholder)}\n minlength=${ifDefined(this.minlength)}\n maxlength=${ifDefined(this.maxlength)}\n autocapitalize=${this.autocapitalize}\n autocomplete=${this.autocomplete}\n ?autofocus=\"${this.autofocus}\"\n dirname=${ifDefined(this.dirname)}\n pattern=${ifDefined(this.pattern)}\n list=${ifDefined(this.list)}\n size=${ifDefined(this.size)}\n @input=${this.onInput}\n @change=${this.onChange}\n @keydown=${this.handleKeyDown}\n />\n </slot>\n </div>\n <slot name=\"trailing-button\">${this.renderTrailingButton()}</slot>\n </div>\n ${this.helpText ? this.renderHelperText() : nothing}\n `;\n }\n\n public static override styles: Array<CSSResult> = [...FormfieldWrapper.styles, ...styles];\n}\n\nexport default Input;\n", "import Input from './input.component';\nimport { TAG_NAME } from './input.constants';\nimport '../button';\nimport '../icon';\nimport '../text';\n\nInput.register(TAG_NAME);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n ['mdc-input']: Input\n }\n}\n\nexport default Input;\n", "import utils from '../../utils/tag-name';\n\nconst TAG_NAME = utils.constructTagName('link');\n\nconst LINK_SIZES = {\n LARGE: 'large',\n MIDSIZE: 'midsize',\n SMALL: 'small',\n} as const;\n\nconst LINK_ICON_SIZES = {\n LARGE: 1,\n MIDSIZE: 0.875,\n SMALL: 0.75,\n} as const;\n\nconst DEFAULTS = {\n INLINE: false,\n INVERTED: false,\n LINK_SIZE: LINK_SIZES.LARGE,\n};\n\nexport {\n DEFAULTS,\n LINK_ICON_SIZES,\n LINK_SIZES,\n TAG_NAME,\n};\n", "import { css } from 'lit';\nimport { hostFitContentStyles, hostFocusRingStyles } from '../../utils/styles';\n\nconst styles = [hostFitContentStyles, css`\n\n :host {\n\n --mdc-link-border-radius: 0.25rem;\n --mdc-link-color-active: var(--mds-color-theme-text-accent-active);\n --mdc-link-color-disabled: var(--mds-color-theme-text-primary-disabled);\n --mdc-link-color-hover: var(--mds-color-theme-text-accent-hover);\n --mdc-link-color-normal: var(--mds-color-theme-text-accent-normal);\n --mdc-link-icon-margin-left: 0.25rem;\n --mdc-link-inverted-color-active: var(--mds-color-theme-inverted-text-accent-active);\n --mdc-link-inverted-color-disabled: var(--mds-color-theme-inverted-text-primary-disabled);\n --mdc-link-inverted-color-hover: var(--mds-color-theme-inverted-text-accent-hover);\n --mdc-link-inverted-color-normal: var(--mds-color-theme-inverted-text-accent-normal);\n --mdc-link-text-decoration-disabled: underline;\n }\n\n :host::part(link-container){\n border-radius: var(--mdc-link-border-radius);\n color: var(--mdc-link-color-normal);\n }\n\n ::slotted(a) {\n outline: none;\n align-items: center;\n color: inherit;\n display: flex;\n gap: var(--mdc-link-icon-margin-left);\n text-decoration: inherit;\n text-underline-offset: auto;\n text-underline-position: from-font;\n }\n\n :host(:hover)::part(link-container) {\n color: var(--mdc-link-color-hover);\n }\n\n :host(:active)::part(link-container) {\n color: var(--mdc-link-color-active);\n }\n\n :host([inline]) {\n display: inline-flex;\n }\n\n :host([inverted])::part(link-container) {\n color: var(--mdc-link-inverted-color-normal);\n }\n\n :host([inverted]:hover)::part(link-container) {\n color: var(--mdc-link-inverted-color-hover);\n }\n\n :host([inverted]:active)::part(link-container) {\n color: var(--mdc-link-inverted-color-active);\n }\n\n :host([size=\"large\"])::part(link-container) {\n font-size: var(--mds-font-apps-body-large-regular-font-size);\n font-weight: var(--mds-font-apps-body-large-regular-font-weight);\n line-height: var(--mds-font-apps-body-large-regular-line-height);\n text-decoration: var(--mds-font-apps-body-large-regular-text-decoration);\n text-transform: var(--mds-font-apps-body-large-regular-text-case);\n }\n\n :host([size=\"midsize\"])::part(link-container) {\n font-size: var(--mds-font-apps-body-midsize-regular-font-size);\n font-weight: var(--mds-font-apps-body-midsize-regular-font-weight);\n line-height: var(--mds-font-apps-body-midsize-regular-line-height);\n text-decoration: var(--mds-font-apps-body-midsize-regular-text-decoration);\n text-transform: var(--mds-font-apps-body-midsize-regular-text-case);\n }\n\n :host([size=\"small\"])::part(link-container) {\n font-size: var(--mds-font-apps-body-small-regular-font-size);\n font-weight: var(--mds-font-apps-body-small-regular-font-weight);\n line-height: var(--mds-font-apps-body-small-regular-line-height);\n text-decoration: var(--mds-font-apps-body-small-regular-text-decoration);\n text-transform: var(--mds-font-apps-body-small-regular-text-case);\n }\n\n :host([size=\"large\"]:hover)::part(link-container),\n :host([size=\"large\"]:active)::part(link-container),\n :host([size=\"large\"][inline])::part(link-container) {\n font-size: var(--mds-font-apps-body-large-regular-underline-font-size);\n font-weight: var(--mds-font-apps-body-large-regular-underline-font-weight);\n line-height: var(--mds-font-apps-body-large-regular-underline-line-height);\n text-decoration: var(--mds-font-apps-body-large-regular-underline-text-decoration);\n text-transform: var(--mds-font-apps-body-large-regular-underline-text-case);\n }\n\n :host([size=\"midsize\"]:hover)::part(link-container),\n :host([size=\"midsize\"]:active)::part(link-container),\n :host([size=\"midsize\"][inline])::part(link-container) {\n font-size: var(--mds-font-apps-body-midsize-regular-underline-font-size);\n font-weight: var(--mds-font-apps-body-midsize-regular-underline-font-weight);\n line-height: var(--mds-font-apps-body-midsize-regular-underline-line-height);\n text-decoration: var(--mds-font-apps-body-midsize-regular-underline-text-decoration);\n text-transform: var(--mds-font-apps-body-midsize-regular-underline-text-case);\n }\n\n :host([size=\"small\"]:hover)::part(link-container),\n :host([size=\"small\"]:active)::part(link-container),\n :host([size=\"small\"][inline])::part(link-container) {\n font-size: var(--mds-font-apps-body-small-regular-underline-font-size);\n font-weight: var(--mds-font-apps-body-small-regular-underline-font-weight);\n line-height: var(--mds-font-apps-body-small-regular-underline-line-height);\n text-decoration: var(--mds-font-apps-body-small-regular-underline-text-decoration);\n text-transform: var(--mds-font-apps-body-small-regular-underline-text-case);\n }\n\n :host([disabled])::part(link-container) {\n color: var(--mdc-link-color-disabled);\n pointer-events: none;\n }\n\n :host([inverted][disabled])::part(link-container) {\n color: var(--mdc-link-inverted-color-disabled);\n }\n`, ...hostFocusRingStyles(true),\ncss`\n :host(:active)::part(link-container) {\n box-shadow: none;\n }\n`];\n\nexport default styles;\n", "import type { PropertyValues } from 'lit';\nimport { CSSResult, html } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport { Component } from '../../models';\nimport { DisabledMixin } from '../../utils/mixins/DisabledMixin';\nimport { IconNameMixin } from '../../utils/mixins/IconNameMixin';\nimport { DEFAULTS, LINK_ICON_SIZES, LINK_SIZES } from './link.constants';\nimport styles from './link.styles';\nimport type { LinkSize } from './link.types';\n\n/**\n * `mdc-link` component can be used to navigate to a different page\n * within the application or to an external site. It can be used to link to\n * emails or phone numbers.\n *\n * The `children` of the link component is expected to be an anchor element\n * containing the text, href, and other attributes.\n *\n * For `icon`, the `mdc-icon` component is used to render the icon.\n *\n * @dependency mdc-icon\n *\n * @tagname mdc-link\n *\n * @cssproperty --mdc-link-border-radius - Border radius of the link\n * @cssproperty --mdc-link-color-active - Text and icon color of the link in active state\n * @cssproperty --mdc-link-color-disabled - Text and icon color of the link in disabled state\n * @cssproperty --mdc-link-color-hover - Text and icon color of the link in hover state\n * @cssproperty --mdc-link-color-normal - Text and icon color of the link in normal state\n * @cssproperty --mdc-link-icon-margin-left - Gap between the text and icon (only applicable when an icon is set)\n * @cssproperty --mdc-link-inverted-color-active - Text and icon color of the inverted link in active state\n * @cssproperty --mdc-link-inverted-color-disabled - Text and icon color of the inverted link in disabled state\n * @cssproperty --mdc-link-inverted-color-hover - Text and icon color of the inverted link in hover state\n * @cssproperty --mdc-link-inverted-color-normal - Text and icon color of the inverted link in normal state\n * @cssproperty --mdc-link-text-decoration-disabled - Text decoration of the link in disabled state for all variants\n */\nclass Link extends DisabledMixin(IconNameMixin(Component)) {\n /**\n * The link can be inline or standalone.\n * @default false\n */\n @property({ type: Boolean, reflect: true })\n inline: boolean = DEFAULTS.INLINE;\n\n /**\n * The link color can be inverted by setting the inverted attribute to true.\n * @default false\n */\n @property({ type: Boolean, reflect: true })\n inverted: boolean = DEFAULTS.INVERTED;\n\n /**\n * Size of the link.\n * Acceptable values include:\n *\n * - 'small'\n * - 'midsize'\n * - 'large'\n *\n * @default large\n */\n @property({ type: String, reflect: true })\n size: LinkSize = DEFAULTS.LINK_SIZE;\n\n /**\n * Used to store the previous tabindex value of the host element\n * null value means that the host element did not have a tabindex attribute.\n * @internal\n */\n private prevTabindex : number | null = null;\n\n /**\n * Method to get the size of the trailing icon based on the link size.\n * @returns The icon size value and units.\n */\n private getIconSize(): number {\n switch (this.size) {\n case LINK_SIZES.SMALL:\n return LINK_ICON_SIZES.SMALL;\n case LINK_SIZES.MIDSIZE:\n return LINK_ICON_SIZES.MIDSIZE;\n default:\n return LINK_ICON_SIZES.LARGE;\n }\n }\n\n /**\n * Updates the tabindex of the host element to disable or enable the link.\n * When disabled, the link is not focusable or clickable, and tabindex is set to -1\n * and aria-disabled attribute is set to true\n * When link is not disabled, the previous tabindex of the host element is restored\n * and aria-disabled attribute is removed.\n *\n * @param disabled - The disabled state of icon\n */\n private setDisabled(disabled: boolean) {\n if (disabled) {\n this.prevTabindex = this.hasAttribute('tabindex') ? this.tabIndex : null;\n this.tabIndex = -1;\n this.setAttribute('aria-disabled', 'true');\n } else if (this.prevTabindex === null) {\n this.removeAttribute('tabindex');\n this.removeAttribute('aria-disabled');\n } else {\n this.tabIndex = this.prevTabindex;\n this.removeAttribute('aria-disabled');\n }\n }\n\n /**\n * Method to create and append trailing icon to the first anchor element in the slot.\n * If no icon name is provided, no icon will be rendered.\n */\n private updateTrailingIcon() {\n const anchorElement = this.shadowRoot?.querySelector('slot')\n ?.assignedElements({ flatten: true }).find((element) => element.tagName === 'A');\n\n const iconSize = this.getIconSize();\n\n if (this.iconName && anchorElement) {\n const trailingIcon = document.createElement('mdc-icon');\n trailingIcon.setAttribute('name', this.iconName);\n trailingIcon.setAttribute('size', `${iconSize}`);\n trailingIcon.setAttribute('length-unit', 'rem');\n anchorElement.appendChild(trailingIcon);\n }\n }\n\n public override update(changedProperties: PropertyValues): void {\n super.update(changedProperties);\n if (changedProperties.has('disabled')) {\n this.setDisabled(this.disabled);\n }\n }\n\n public override render() {\n return html`\n <div part='link-container' class='mdc-focus-ring'>\n <slot @slotchange=${this.updateTrailingIcon}></slot>\n </div>\n `;\n }\n\n public static override styles: Array<CSSResult> = [...Component.styles, ...styles];\n}\n\nexport default Link;\n", "import Link from './link.component';\nimport { TAG_NAME } from './link.constants';\nimport '../icon';\n\nLink.register(TAG_NAME);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n ['mdc-link']: Link\n }\n}\n\nexport default Link;\n", "import utils from '../../utils/tag-name';\n\nconst TAG_NAME = utils.constructTagName('listitem');\n\nconst LISTITEM_VARIANTS = {\n FULL_WIDTH: 'full-width',\n INSET_PILL: 'inset-pill',\n INSET_RECTANGLE: 'inset-rectangle',\n} as const;\n\nconst DEFAULTS = {\n VARIANT: LISTITEM_VARIANTS.FULL_WIDTH,\n} as const;\n\nexport { DEFAULTS, TAG_NAME, LISTITEM_VARIANTS };\n", "import utils from '../../utils/tag-name';\n\nconst TAG_NAME = utils.constructTagName('list');\n\nconst KEYS = {\n ARROW_DOWN: 'ArrowDown',\n ARROW_UP: 'ArrowUp',\n HOME: 'Home',\n END: 'End',\n} as const;\n\nconst HEADER_ID = 'header-id';\n\nexport { TAG_NAME, KEYS, HEADER_ID };\n", "import { css } from 'lit';\n\nconst styles = css`\n :host::part(header-text) {\n padding: 0.5rem 0.75rem;\n }\n`;\n\nexport default [styles];\n", "import type { CSSResult } from 'lit';\nimport { html, nothing } from 'lit';\nimport { property, queryAssignedElements } from 'lit/decorators.js';\nimport { Component } from '../../models';\nimport { DataAriaLabelMixin } from '../../utils/mixins/DataAriaLabelMixin';\nimport { TAG_NAME as LISTITEM_TAGNAME } from '../listitem/listitem.constants';\nimport { TYPE, VALID_TEXT_TAGS } from '../text/text.constants';\nimport { HEADER_ID, KEYS } from './list.constants';\nimport styles from './list.styles';\n\n/**\n * mdc-list component is used to display a group of list items. It is used as a container to wrap other list items.\n *\n * @tagname mdc-list\n *\n * @dependency mdc-text\n *\n * @slot default - This is a default/unnamed slot\n */\nclass List extends DataAriaLabelMixin(Component) {\n @queryAssignedElements({ selector: LISTITEM_TAGNAME })\n listItems!: Array<HTMLElement>;\n\n /**\n * The header text of the list.\n */\n @property({ type: String, attribute: 'header-text', reflect: true }) headerText?: string;\n\n constructor() {\n super();\n this.addEventListener('keydown', this.handleKeyDown);\n }\n\n /**\n * Handles the keydown event on the list element.\n * If the key is 'ArrowUp' or 'ArrowDown', it focuses to the previous or next list item\n * and sets the active tabindex of the list item.\n * Prevents the default event behavior.\n * @param event - The keyboard event.\n */\n private handleKeyDown(event: KeyboardEvent): void {\n const currentIndex = this.getCurrentIndex(event.target);\n const newIndex = this.getNewIndexBasedOnKey(event.key, currentIndex, this.listItems.length);\n if (newIndex !== undefined) {\n this.listItems[newIndex]?.focus();\n this.resetTabIndexAndSetActiveTabIndex(newIndex);\n }\n }\n\n /**\n * Returns the index of the given target in the listItems array.\n * If the target is not a list item, but a child element of a list item,\n * it returns the index of the parent list item.\n * @param target - The target element to find the index of.\n * @returns The index of the target element in the listItems array.\n */\n private getCurrentIndex(target: EventTarget | null): number {\n return this.listItems.findIndex((node) => node === target || node === (target as HTMLElement).parentElement);\n }\n\n /**\n * Calculates a new index based on the pressed keyboard key.\n * Supports navigation keys for moving focus within a list.\n * @param key - The key that was pressed.\n * @param currentIndex - The current index of the focused list item.\n * @param wrappedDivsCount - The total number of list items.\n * @returns The new index to focus on, or undefined if the key is not supported.\n */\n private getNewIndexBasedOnKey(key: string, currentIndex: number, wrappedDivsCount: number): number | undefined {\n switch (key) {\n case KEYS.ARROW_DOWN:\n return (currentIndex + 1) % wrappedDivsCount;\n case KEYS.ARROW_UP:\n return (currentIndex - 1 + wrappedDivsCount) % wrappedDivsCount;\n case KEYS.HOME:\n return 0;\n case KEYS.END:\n return wrappedDivsCount - 1;\n default:\n return undefined;\n }\n }\n\n /**\n * Handles the mouse click event on the list element.\n * Finds the index of the target element in the list items array and calls\n * `resetTabIndexAndSetActiveTabIndex` with that index.\n * @param event - The mouse event.\n */\n private handleMouseClick(event: MouseEvent): void {\n const newIndex = this.getCurrentIndex(event.target);\n this.resetTabIndexAndSetActiveTabIndex(newIndex);\n }\n\n /**\n * Resets all list items tabindex to -1 and sets the tabindex of the\n * element at the given index to 0, effectively setting the active\n * element. This is used when navigating the list via keyboard.\n *\n * @param newIndex - The index of the new active element in the list.\n */\n private resetTabIndexAndSetActiveTabIndex(newIndex: number) {\n this.listItems.forEach((node, index) => {\n const newTabindex = newIndex === index ? '0' : '-1';\n node?.setAttribute('tabindex', newTabindex);\n });\n }\n\n public override firstUpdated(): void {\n // For the first, we set the first element only as active.\n this.resetTabIndexAndSetActiveTabIndex(0);\n }\n\n public override render() {\n const headerText = this.headerText ? html`\n <mdc-text\n id=\"${HEADER_ID}\"\n part=\"header-text\"\n type=\"${TYPE.BODY_MIDSIZE_BOLD}\"\n tagname=\"${VALID_TEXT_TAGS.SPAN}\"\n >${this.headerText}</mdc-text>\n ` : nothing;\n return html`\n <div\n role=\"list\"\n aria-labelledby=\"${this.headerText ? HEADER_ID : ''}\"\n aria-label=\"${this.dataAriaLabel ?? ''}\"\n >\n ${headerText}\n <slot role=\"presentation\" @click=\"${this.handleMouseClick}\"></slot>\n </div>\n `;\n }\n\n public static override styles: Array<CSSResult> = [...Component.styles, ...styles];\n}\n\nexport default List;\n", "import List from './list.component';\nimport { TAG_NAME } from './list.constants';\nimport '../text';\n\nList.register(TAG_NAME);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n ['mdc-list']: List\n }\n}\n\nexport default List;\n", "import { css } from 'lit';\nimport { hostFocusRingStyles } from '../../utils/styles';\n\nconst styles = css`\n :host {\n --mdc-listitem-default-background-color: var(--mds-color-theme-background-primary-ghost);\n --mdc-listitem-background-color-hover: var(--mds-color-theme-background-primary-hover);\n --mdc-listitem-background-color-active: var(--mds-color-theme-background-primary-active);\n --mdc-listitem-primary-label-color: var(--mds-color-theme-text-primary-normal);\n --mdc-listitem-secondary-label-color: var(--mds-color-theme-text-secondary-normal);\n --mdc-listitem-disabled-color: var(--mds-color-theme-text-primary-disabled);\n }\n :host {\n background-color: var(--mdc-listitem-default-background-color);\n column-gap: 0.75rem;\n cursor: pointer;\n display: flex;\n flex-direction: row;\n padding: 0.5rem 0.75rem;\n width: 100%;\n }\n :host([variant=\"inset-rectangle\"]) {\n border-radius: 0.5rem;\n }\n :host([variant=\"inset-pill\"]) {\n border-radius: 3.125rem;\n }\n :host([disabled]),\n :host([disabled])::part(leading-text-secondary-label),\n :host([disabled])::part(leading-text-tertiary-label),\n :host([disabled])::part(leading-text-primary-label),\n :host([disabled])::part(trailing-text-side-header),\n :host([disabled])::part(trailing-text-subline) {\n color: var(--mdc-listitem-disabled-color);\n cursor: default;\n }\n :host(:hover) {\n background-color: var(--mdc-listitem-background-color-hover);\n }\n :host(:active) {\n background-color: var(--mdc-listitem-background-color-active);\n }\n :host::part(trailing) {\n margin-left: auto;\n }\n :host::part(trailing):dir(rtl) {\n margin-left: unset;\n margin-right: auto;\n }\n :host::part(leading), :host::part(trailing) {\n align-items: center;\n column-gap: 0.75rem;\n display: flex;\n }\n :host::part(leading-text-secondary-label), :host::part(leading-text-tertiary-label) {\n color: var(--mdc-listitem-secondary-label-color);\n }\n :host::part(leading-text-primary-label), :host::part(trailing-text-side-header), :host::part(trailing-text-subline) {\n color: var(--mdc-listitem-primary-label-color);\n }\n :host::part(trailing-text) {\n text-align: right;\n }\n ::slotted([slot=\"leading-controls\"]), ::slotted([slot=\"trailing-controls\"]) {\n align-items: center;\n column-gap: 0.75rem;\n display: flex;\n flex-direction: row;\n }\n`;\nexport default [styles, ...hostFocusRingStyles()];\n", "import type { CSSResult, PropertyValues } from 'lit';\nimport { html, nothing, TemplateResult } from 'lit';\nimport { property, queryAssignedElements } from 'lit/decorators.js';\nimport { Component } from '../../models';\nimport { DataAriaLabelMixin } from '../../utils/mixins/DataAriaLabelMixin';\nimport { DisabledMixin } from '../../utils/mixins/DisabledMixin';\nimport { TabIndexMixin } from '../../utils/mixins/TabIndexMixin';\nimport { TYPE, VALID_TEXT_TAGS } from '../text/text.constants';\nimport type { TextType } from '../text/text.types';\nimport { DEFAULTS } from './listitem.constants';\nimport styles from './listitem.styles';\nimport type { ListItemVariants } from './listitem.types';\n\n/**\n * mdc-listitem component is used to display a label with different types of controls.\n * There can be three types of controls, a radio button, a checkbox on the\n * leading side and a toggle on the trailing side.\n * The list item can contain an avatar on the leading side and a badge on the trailing side.\n * Additionally, the list item can contain a side header and a subline text.\n *\n * The leading and trailing slots can be used to display controls and text. <br/>\n * Based on the leading/trailing slot, the position of the controls and text can be adjusted. <br/>\n * Please use mdc-list as a parent element even when there is only listitem for a11y purpose.\n *\n * @tagname mdc-listitem\n *\n * @dependency mdc-text\n *\n * @slot leading-controls - slot for list item controls to appear of leading end.\n * @slot leading-text-primary-label - slot for list item primary label.\n * @slot leading-text-secondary-label - slot for list item secondary label.\n * @slot leading-text-tertiary-label - slot for list item tertiary label.\n * @slot trailing-text-side-header - slot for list item side header text.\n * @slot trailing-text-subline - slot for list item subline text.\n * @slot trailing-controls - slot for list item controls to appear of trailing end.\n *\n * @cssproperty --mdc-listitem-default-background-color - Allows customization of the default background color.\n * @cssproperty --mdc-listitem-background-color-hover - Allows customization of the background color on hover.\n * @cssproperty --mdc-listitem-background-color-active - Allows customization of the background color when pressed.\n * @cssproperty --mdc-listitem-primary-label-color\n * - Allows customization of the primary label, side header and subline text slot color.\n * @cssproperty --mdc-listitem-secondary-label-color\n * - Allows customization of the secondary and teritary label text slot color.\n */\nclass ListItem extends DataAriaLabelMixin(DisabledMixin(TabIndexMixin(Component))) {\n @queryAssignedElements({ slot: 'leading-controls' })\n leadingControlsSlot!: Array<HTMLElement>;\n\n @queryAssignedElements({ slot: 'trailing-controls' })\n trailingControlsSlot!: Array<HTMLElement>;\n\n /**\n * The variant of the list item. It can be a pill, rectangle or a full-width.\n * @default 'full-width'\n */\n @property({ type: String, reflect: true }) variant: ListItemVariants = DEFAULTS.VARIANT;\n\n /**\n * The primary label of the list item.\n * This appears on the leading side of the list item.\n */\n @property({ type: String, reflect: true }) label?: string;\n\n /**\n * The secondary label of the list item.\n * This appears on the leading side of the list item.\n */\n @property({ type: String, reflect: true, attribute: 'secondary-label' }) secondaryLabel?: string;\n\n /**\n * The tertiary label of the list item.\n * This appears on the leading side of the list item.\n */\n @property({ type: String, reflect: true, attribute: 'tertiary-label' }) tertiaryLabel?: string;\n\n /**\n * The header text of the list item.\n * This appears on the trailing side of the list item.\n */\n @property({ type: String, reflect: true, attribute: 'side-header-text' }) sideHeaderText?: string;\n\n /**\n * The subline text of the list item.\n * This appears on the trailing side of the list item.\n */\n @property({ type: String, reflect: true, attribute: 'subline-text' }) sublineText?: string;\n\n constructor() {\n super();\n this.role = 'listitem';\n }\n\n /**\n * Generates a template for a text slot with the specified content.\n *\n * @param slotName - The name of the slot to be used.\n * @param type - The type of the text element.\n * @param content - The text content to be displayed within the slot.\n * @returns A TemplateResult containing a slot with an `mdc-text` element of type BODY_SMALL_REGULAR.\n */\n private getText(slotName: string, type: TextType, content?: string): TemplateResult | typeof nothing {\n if (!content) {\n return nothing;\n }\n return html`\n <slot name=\"${slotName}\">\n <mdc-text part=\"${slotName}\" type=\"${type}\" tagname=\"${VALID_TEXT_TAGS.SPAN}\">${content}</mdc-text>\n </slot>\n `;\n }\n\n /**\n * Disable or enable all slotted elements in the leading and trailing slots.\n * This is useful when the list item is disabled, to prevent the user from interacting with the controls.\n * @param disabled - Whether to disable or enable the controls.\n */\n private disableSlottedChildren(disabled: boolean): void {\n [...this.leadingControlsSlot, ...this.trailingControlsSlot].forEach((element) => {\n if (disabled) {\n element.setAttribute('disabled', '');\n } else {\n element.removeAttribute('disabled');\n }\n });\n }\n\n public override update(changedProperties: PropertyValues): void {\n super.update(changedProperties);\n\n if (changedProperties.has('disabled')) {\n this.tabIndex = this.disabled ? -1 : 0;\n this.disableSlottedChildren(this.disabled);\n }\n }\n\n public override render() {\n return html`\n <div part=\"leading\">\n <slot name=\"leading-controls\"></slot>\n <div part=\"leading-text\">\n ${this.getText('leading-text-primary-label', TYPE.BODY_MIDSIZE_REGULAR, this.label)}\n ${this.getText('leading-text-secondary-label', TYPE.BODY_SMALL_REGULAR, this.secondaryLabel)}\n ${this.getText('leading-text-tertiary-label', TYPE.BODY_SMALL_REGULAR, this.tertiaryLabel)}\n </div>\n </div>\n <div part=\"trailing\">\n <div part=\"trailing-text\">\n ${this.getText('trailing-text-side-header', TYPE.BODY_MIDSIZE_REGULAR, this.sideHeaderText)}\n ${this.getText('trailing-text-subline', TYPE.BODY_SMALL_REGULAR, this.sublineText)}\n </div>\n <slot name=\"trailing-controls\"></slot>\n </div>\n `;\n }\n\n public static override styles: Array<CSSResult> = [...Component.styles, ...styles];\n}\n\nexport default ListItem;\n", "import ListItem from './listitem.component';\nimport { TAG_NAME } from './listitem.constants';\nimport '../text';\n\nListItem.register(TAG_NAME);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n ['mdc-listitem']: ListItem\n }\n}\n\nexport default ListItem;\n", "import { css } from 'lit';\n\nconst styles = css`\n :host {\n --mdc-marker-width: 0.25rem;\n --mdc-marker-solid-background-color: var(--mds-color-theme-outline-secondary-normal);\n --mdc-marker-striped-color: var(--mds-color-theme-outline-secondary-normal);\n --mdc-marker-striped-background-color: transparent; \n\n width: var(--mdc-marker-width);\n height: 100%;\n display: block;\n }\n\n :host([variant='solid']) {\n background: var(--mdc-marker-solid-background-color);\n }\n\n :host([variant='striped']) {\n background: repeating-linear-gradient(\n 135deg,\n var(--mdc-marker-striped-color),\n var(--mdc-marker-striped-color) 0.1875rem,\n var(--mdc-marker-striped-background-color) 0.1875rem, \n var(--mdc-marker-striped-background-color) 0.375rem\n );\n }\n`;\n\nexport default [styles];\n", "import utils from '../../utils/tag-name';\n\nconst TAG_NAME = utils.constructTagName('marker');\n\nconst MARKER_VARIANTS = {\n SOLID: 'solid',\n STRIPED: 'striped',\n} as const;\n\nexport { TAG_NAME, MARKER_VARIANTS };\n", "import { CSSResult } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport styles from './marker.styles';\nimport { Component } from '../../models';\nimport type { MarkerVariants } from './marker.types';\nimport { MARKER_VARIANTS } from './marker.constants';\n\n/**\n * `mdc-marker`, which is a vertical line and\n * used to draw attention to specific parts of\n * the content or to signify important information.\n *\n * **Marker Variants**:\n * - **solid**: Solid marker.\n * - **striped**: Striped marker.\n *\n * @tagname mdc-marker\n *\n * @cssproperty --mdc-marker-solid-background-color - Allows customization of the default background color\n * in solid variant.\n * @cssproperty --mdc-marker-striped-color - Allows customization of the default stripes in striped variant.\n * @cssproperty --mdc-marker-striped-background-color - Allows customization of the default background color\n * in striped variant.\n * @cssproperty --mdc-marker-width - Allows customization of the default width.\n */\nclass Marker extends Component {\n /**\n * There are two variants of markers, each with a width of 0.25rem:\n * - **solid**: Solid marker.\n * - **striped**: Striped marker.\n * @default solid\n */\n @property({ type: String, reflect: true })\n public variant: MarkerVariants = MARKER_VARIANTS.SOLID;\n\n public static override styles: Array<CSSResult> = [...Component.styles, ...styles];\n}\n\nexport default Marker;\n", "import Marker from './marker.component';\nimport { TAG_NAME } from './marker.constants';\n\nMarker.register(TAG_NAME);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n ['mdc-marker']: Marker\n }\n}\n\nexport default Marker;\n", "/**\n * Custom positioning reference element.\n * @see https://floating-ui.com/docs/virtual-elements\n */\n\nconst sides = ['top', 'right', 'bottom', 'left'];\nconst alignments = ['start', 'end'];\nconst placements = /*#__PURE__*/sides.reduce((acc, side) => acc.concat(side, side + \"-\" + alignments[0], side + \"-\" + alignments[1]), []);\nconst min = Math.min;\nconst max = Math.max;\nconst round = Math.round;\nconst floor = Math.floor;\nconst createCoords = v => ({\n x: v,\n y: v\n});\nconst oppositeSideMap = {\n left: 'right',\n right: 'left',\n bottom: 'top',\n top: 'bottom'\n};\nconst oppositeAlignmentMap = {\n start: 'end',\n end: 'start'\n};\nfunction clamp(start, value, end) {\n return max(start, min(value, end));\n}\nfunction evaluate(value, param) {\n return typeof value === 'function' ? value(param) : value;\n}\nfunction getSide(placement) {\n return placement.split('-')[0];\n}\nfunction getAlignment(placement) {\n return placement.split('-')[1];\n}\nfunction getOppositeAxis(axis) {\n return axis === 'x' ? 'y' : 'x';\n}\nfunction getAxisLength(axis) {\n return axis === 'y' ? 'height' : 'width';\n}\nfunction getSideAxis(placement) {\n return ['top', 'bottom'].includes(getSide(placement)) ? 'y' : 'x';\n}\nfunction getAlignmentAxis(placement) {\n return getOppositeAxis(getSideAxis(placement));\n}\nfunction getAlignmentSides(placement, rects, rtl) {\n if (rtl === void 0) {\n rtl = false;\n }\n const alignment = getAlignment(placement);\n const alignmentAxis = getAlignmentAxis(placement);\n const length = getAxisLength(alignmentAxis);\n let mainAlignmentSide = alignmentAxis === 'x' ? alignment === (rtl ? 'end' : 'start') ? 'right' : 'left' : alignment === 'start' ? 'bottom' : 'top';\n if (rects.reference[length] > rects.floating[length]) {\n mainAlignmentSide = getOppositePlacement(mainAlignmentSide);\n }\n return [mainAlignmentSide, getOppositePlacement(mainAlignmentSide)];\n}\nfunction getExpandedPlacements(placement) {\n const oppositePlacement = getOppositePlacement(placement);\n return [getOppositeAlignmentPlacement(placement), oppositePlacement, getOppositeAlignmentPlacement(oppositePlacement)];\n}\nfunction getOppositeAlignmentPlacement(placement) {\n return placement.replace(/start|end/g, alignment => oppositeAlignmentMap[alignment]);\n}\nfunction getSideList(side, isStart, rtl) {\n const lr = ['left', 'right'];\n const rl = ['right', 'left'];\n const tb = ['top', 'bottom'];\n const bt = ['bottom', 'top'];\n switch (side) {\n case 'top':\n case 'bottom':\n if (rtl) return isStart ? rl : lr;\n return isStart ? lr : rl;\n case 'left':\n case 'right':\n return isStart ? tb : bt;\n default:\n return [];\n }\n}\nfunction getOppositeAxisPlacements(placement, flipAlignment, direction, rtl) {\n const alignment = getAlignment(placement);\n let list = getSideList(getSide(placement), direction === 'start', rtl);\n if (alignment) {\n list = list.map(side => side + \"-\" + alignment);\n if (flipAlignment) {\n list = list.concat(list.map(getOppositeAlignmentPlacement));\n }\n }\n return list;\n}\nfunction getOppositePlacement(placement) {\n return placement.replace(/left|right|bottom|top/g, side => oppositeSideMap[side]);\n}\nfunction expandPaddingObject(padding) {\n return {\n top: 0,\n right: 0,\n bottom: 0,\n left: 0,\n ...padding\n };\n}\nfunction getPaddingObject(padding) {\n return typeof padding !== 'number' ? expandPaddingObject(padding) : {\n top: padding,\n right: padding,\n bottom: padding,\n left: padding\n };\n}\nfunction rectToClientRect(rect) {\n const {\n x,\n y,\n width,\n height\n } = rect;\n return {\n width,\n height,\n top: y,\n left: x,\n right: x + width,\n bottom: y + height,\n x,\n y\n };\n}\n\nexport { alignments, clamp, createCoords, evaluate, expandPaddingObject, floor, getAlignment, getAlignmentAxis, getAlignmentSides, getAxisLength, getExpandedPlacements, getOppositeAlignmentPlacement, getOppositeAxis, getOppositeAxisPlacements, getOppositePlacement, getPaddingObject, getSide, getSideAxis, max, min, placements, rectToClientRect, round, sides };\n", "import { getSideAxis, getAlignmentAxis, getAxisLength, getSide, getAlignment, evaluate, getPaddingObject, rectToClientRect, min, clamp, placements, getAlignmentSides, getOppositeAlignmentPlacement, getOppositePlacement, getExpandedPlacements, getOppositeAxisPlacements, sides, max, getOppositeAxis } from '@floating-ui/utils';\nexport { rectToClientRect } from '@floating-ui/utils';\n\nfunction computeCoordsFromPlacement(_ref, placement, rtl) {\n let {\n reference,\n floating\n } = _ref;\n const sideAxis = getSideAxis(placement);\n const alignmentAxis = getAlignmentAxis(placement);\n const alignLength = getAxisLength(alignmentAxis);\n const side = getSide(placement);\n const isVertical = sideAxis === 'y';\n const commonX = reference.x + reference.width / 2 - floating.width / 2;\n const commonY = reference.y + reference.height / 2 - floating.height / 2;\n const commonAlign = reference[alignLength] / 2 - floating[alignLength] / 2;\n let coords;\n switch (side) {\n case 'top':\n coords = {\n x: commonX,\n y: reference.y - floating.height\n };\n break;\n case 'bottom':\n coords = {\n x: commonX,\n y: reference.y + reference.height\n };\n break;\n case 'right':\n coords = {\n x: reference.x + reference.width,\n y: commonY\n };\n break;\n case 'left':\n coords = {\n x: reference.x - floating.width,\n y: commonY\n };\n break;\n default:\n coords = {\n x: reference.x,\n y: reference.y\n };\n }\n switch (getAlignment(placement)) {\n case 'start':\n coords[alignmentAxis] -= commonAlign * (rtl && isVertical ? -1 : 1);\n break;\n case 'end':\n coords[alignmentAxis] += commonAlign * (rtl && isVertical ? -1 : 1);\n break;\n }\n return coords;\n}\n\n/**\n * Computes the `x` and `y` coordinates that will place the floating element\n * next to a given reference element.\n *\n * This export does not have any `platform` interface logic. You will need to\n * write one for the platform you are using Floating UI with.\n */\nconst computePosition = async (reference, floating, config) => {\n const {\n placement = 'bottom',\n strategy = 'absolute',\n middleware = [],\n platform\n } = config;\n const validMiddleware = middleware.filter(Boolean);\n const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(floating));\n let rects = await platform.getElementRects({\n reference,\n floating,\n strategy\n });\n let {\n x,\n y\n } = computeCoordsFromPlacement(rects, placement, rtl);\n let statefulPlacement = placement;\n let middlewareData = {};\n let resetCount = 0;\n for (let i = 0; i < validMiddleware.length; i++) {\n const {\n name,\n fn\n } = validMiddleware[i];\n const {\n x: nextX,\n y: nextY,\n data,\n reset\n } = await fn({\n x,\n y,\n initialPlacement: placement,\n placement: statefulPlacement,\n strategy,\n middlewareData,\n rects,\n platform,\n elements: {\n reference,\n floating\n }\n });\n x = nextX != null ? nextX : x;\n y = nextY != null ? nextY : y;\n middlewareData = {\n ...middlewareData,\n [name]: {\n ...middlewareData[name],\n ...data\n }\n };\n if (reset && resetCount <= 50) {\n resetCount++;\n if (typeof reset === 'object') {\n if (reset.placement) {\n statefulPlacement = reset.placement;\n }\n if (reset.rects) {\n rects = reset.rects === true ? await platform.getElementRects({\n reference,\n floating,\n strategy\n }) : reset.rects;\n }\n ({\n x,\n y\n } = computeCoordsFromPlacement(rects, statefulPlacement, rtl));\n }\n i = -1;\n }\n }\n return {\n x,\n y,\n placement: statefulPlacement,\n strategy,\n middlewareData\n };\n};\n\n/**\n * Resolves with an object of overflow side offsets that determine how much the\n * element is overflowing a given clipping boundary on each side.\n * - positive = overflowing the boundary by that number of pixels\n * - negative = how many pixels left before it will overflow\n * - 0 = lies flush with the boundary\n * @see https://floating-ui.com/docs/detectOverflow\n */\nasync function detectOverflow(state, options) {\n var _await$platform$isEle;\n if (options === void 0) {\n options = {};\n }\n const {\n x,\n y,\n platform,\n rects,\n elements,\n strategy\n } = state;\n const {\n boundary = 'clippingAncestors',\n rootBoundary = 'viewport',\n elementContext = 'floating',\n altBoundary = false,\n padding = 0\n } = evaluate(options, state);\n const paddingObject = getPaddingObject(padding);\n const altContext = elementContext === 'floating' ? 'reference' : 'floating';\n const element = elements[altBoundary ? altContext : elementContext];\n const clippingClientRect = rectToClientRect(await platform.getClippingRect({\n element: ((_await$platform$isEle = await (platform.isElement == null ? void 0 : platform.isElement(element))) != null ? _await$platform$isEle : true) ? element : element.contextElement || (await (platform.getDocumentElement == null ? void 0 : platform.getDocumentElement(elements.floating))),\n boundary,\n rootBoundary,\n strategy\n }));\n const rect = elementContext === 'floating' ? {\n x,\n y,\n width: rects.floating.width,\n height: rects.floating.height\n } : rects.reference;\n const offsetParent = await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(elements.floating));\n const offsetScale = (await (platform.isElement == null ? void 0 : platform.isElement(offsetParent))) ? (await (platform.getScale == null ? void 0 : platform.getScale(offsetParent))) || {\n x: 1,\n y: 1\n } : {\n x: 1,\n y: 1\n };\n const elementClientRect = rectToClientRect(platform.convertOffsetParentRelativeRectToViewportRelativeRect ? await platform.convertOffsetParentRelativeRectToViewportRelativeRect({\n elements,\n rect,\n offsetParent,\n strategy\n }) : rect);\n return {\n top: (clippingClientRect.top - elementClientRect.top + paddingObject.top) / offsetScale.y,\n bottom: (elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom) / offsetScale.y,\n left: (clippingClientRect.left - elementClientRect.left + paddingObject.left) / offsetScale.x,\n right: (elementClientRect.right - clippingClientRect.right + paddingObject.right) / offsetScale.x\n };\n}\n\n/**\n * Provides data to position an inner element of the floating element so that it\n * appears centered to the reference element.\n * @see https://floating-ui.com/docs/arrow\n */\nconst arrow = options => ({\n name: 'arrow',\n options,\n async fn(state) {\n const {\n x,\n y,\n placement,\n rects,\n platform,\n elements,\n middlewareData\n } = state;\n // Since `element` is required, we don't Partial<> the type.\n const {\n element,\n padding = 0\n } = evaluate(options, state) || {};\n if (element == null) {\n return {};\n }\n const paddingObject = getPaddingObject(padding);\n const coords = {\n x,\n y\n };\n const axis = getAlignmentAxis(placement);\n const length = getAxisLength(axis);\n const arrowDimensions = await platform.getDimensions(element);\n const isYAxis = axis === 'y';\n const minProp = isYAxis ? 'top' : 'left';\n const maxProp = isYAxis ? 'bottom' : 'right';\n const clientProp = isYAxis ? 'clientHeight' : 'clientWidth';\n const endDiff = rects.reference[length] + rects.reference[axis] - coords[axis] - rects.floating[length];\n const startDiff = coords[axis] - rects.reference[axis];\n const arrowOffsetParent = await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(element));\n let clientSize = arrowOffsetParent ? arrowOffsetParent[clientProp] : 0;\n\n // DOM platform can return `window` as the `offsetParent`.\n if (!clientSize || !(await (platform.isElement == null ? void 0 : platform.isElement(arrowOffsetParent)))) {\n clientSize = elements.floating[clientProp] || rects.floating[length];\n }\n const centerToReference = endDiff / 2 - startDiff / 2;\n\n // If the padding is large enough that it causes the arrow to no longer be\n // centered, modify the padding so that it is centered.\n const largestPossiblePadding = clientSize / 2 - arrowDimensions[length] / 2 - 1;\n const minPadding = min(paddingObject[minProp], largestPossiblePadding);\n const maxPadding = min(paddingObject[maxProp], largestPossiblePadding);\n\n // Make sure the arrow doesn't overflow the floating element if the center\n // point is outside the floating element's bounds.\n const min$1 = minPadding;\n const max = clientSize - arrowDimensions[length] - maxPadding;\n const center = clientSize / 2 - arrowDimensions[length] / 2 + centerToReference;\n const offset = clamp(min$1, center, max);\n\n // If the reference is small enough that the arrow's padding causes it to\n // to point to nothing for an aligned placement, adjust the offset of the\n // floating element itself. To ensure `shift()` continues to take action,\n // a single reset is performed when this is true.\n const shouldAddOffset = !middlewareData.arrow && getAlignment(placement) != null && center !== offset && rects.reference[length] / 2 - (center < min$1 ? minPadding : maxPadding) - arrowDimensions[length] / 2 < 0;\n const alignmentOffset = shouldAddOffset ? center < min$1 ? center - min$1 : center - max : 0;\n return {\n [axis]: coords[axis] + alignmentOffset,\n data: {\n [axis]: offset,\n centerOffset: center - offset - alignmentOffset,\n ...(shouldAddOffset && {\n alignmentOffset\n })\n },\n reset: shouldAddOffset\n };\n }\n});\n\nfunction getPlacementList(alignment, autoAlignment, allowedPlacements) {\n const allowedPlacementsSortedByAlignment = alignment ? [...allowedPlacements.filter(placement => getAlignment(placement) === alignment), ...allowedPlacements.filter(placement => getAlignment(placement) !== alignment)] : allowedPlacements.filter(placement => getSide(placement) === placement);\n return allowedPlacementsSortedByAlignment.filter(placement => {\n if (alignment) {\n return getAlignment(placement) === alignment || (autoAlignment ? getOppositeAlignmentPlacement(placement) !== placement : false);\n }\n return true;\n });\n}\n/**\n * Optimizes the visibility of the floating element by choosing the placement\n * that has the most space available automatically, without needing to specify a\n * preferred placement. Alternative to `flip`.\n * @see https://floating-ui.com/docs/autoPlacement\n */\nconst autoPlacement = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n name: 'autoPlacement',\n options,\n async fn(state) {\n var _middlewareData$autoP, _middlewareData$autoP2, _placementsThatFitOnE;\n const {\n rects,\n middlewareData,\n placement,\n platform,\n elements\n } = state;\n const {\n crossAxis = false,\n alignment,\n allowedPlacements = placements,\n autoAlignment = true,\n ...detectOverflowOptions\n } = evaluate(options, state);\n const placements$1 = alignment !== undefined || allowedPlacements === placements ? getPlacementList(alignment || null, autoAlignment, allowedPlacements) : allowedPlacements;\n const overflow = await detectOverflow(state, detectOverflowOptions);\n const currentIndex = ((_middlewareData$autoP = middlewareData.autoPlacement) == null ? void 0 : _middlewareData$autoP.index) || 0;\n const currentPlacement = placements$1[currentIndex];\n if (currentPlacement == null) {\n return {};\n }\n const alignmentSides = getAlignmentSides(currentPlacement, rects, await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating)));\n\n // Make `computeCoords` start from the right place.\n if (placement !== currentPlacement) {\n return {\n reset: {\n placement: placements$1[0]\n }\n };\n }\n const currentOverflows = [overflow[getSide(currentPlacement)], overflow[alignmentSides[0]], overflow[alignmentSides[1]]];\n const allOverflows = [...(((_middlewareData$autoP2 = middlewareData.autoPlacement) == null ? void 0 : _middlewareData$autoP2.overflows) || []), {\n placement: currentPlacement,\n overflows: currentOverflows\n }];\n const nextPlacement = placements$1[currentIndex + 1];\n\n // There are more placements to check.\n if (nextPlacement) {\n return {\n data: {\n index: currentIndex + 1,\n overflows: allOverflows\n },\n reset: {\n placement: nextPlacement\n }\n };\n }\n const placementsSortedByMostSpace = allOverflows.map(d => {\n const alignment = getAlignment(d.placement);\n return [d.placement, alignment && crossAxis ?\n // Check along the mainAxis and main crossAxis side.\n d.overflows.slice(0, 2).reduce((acc, v) => acc + v, 0) :\n // Check only the mainAxis.\n d.overflows[0], d.overflows];\n }).sort((a, b) => a[1] - b[1]);\n const placementsThatFitOnEachSide = placementsSortedByMostSpace.filter(d => d[2].slice(0,\n // Aligned placements should not check their opposite crossAxis\n // side.\n getAlignment(d[0]) ? 2 : 3).every(v => v <= 0));\n const resetPlacement = ((_placementsThatFitOnE = placementsThatFitOnEachSide[0]) == null ? void 0 : _placementsThatFitOnE[0]) || placementsSortedByMostSpace[0][0];\n if (resetPlacement !== placement) {\n return {\n data: {\n index: currentIndex + 1,\n overflows: allOverflows\n },\n reset: {\n placement: resetPlacement\n }\n };\n }\n return {};\n }\n };\n};\n\n/**\n * Optimizes the visibility of the floating element by flipping the `placement`\n * in order to keep it in view when the preferred placement(s) will overflow the\n * clipping boundary. Alternative to `autoPlacement`.\n * @see https://floating-ui.com/docs/flip\n */\nconst flip = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n name: 'flip',\n options,\n async fn(state) {\n var _middlewareData$arrow, _middlewareData$flip;\n const {\n placement,\n middlewareData,\n rects,\n initialPlacement,\n platform,\n elements\n } = state;\n const {\n mainAxis: checkMainAxis = true,\n crossAxis: checkCrossAxis = true,\n fallbackPlacements: specifiedFallbackPlacements,\n fallbackStrategy = 'bestFit',\n fallbackAxisSideDirection = 'none',\n flipAlignment = true,\n ...detectOverflowOptions\n } = evaluate(options, state);\n\n // If a reset by the arrow was caused due to an alignment offset being\n // added, we should skip any logic now since `flip()` has already done its\n // work.\n // https://github.com/floating-ui/floating-ui/issues/2549#issuecomment-1719601643\n if ((_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) {\n return {};\n }\n const side = getSide(placement);\n const initialSideAxis = getSideAxis(initialPlacement);\n const isBasePlacement = getSide(initialPlacement) === initialPlacement;\n const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating));\n const fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipAlignment ? [getOppositePlacement(initialPlacement)] : getExpandedPlacements(initialPlacement));\n const hasFallbackAxisSideDirection = fallbackAxisSideDirection !== 'none';\n if (!specifiedFallbackPlacements && hasFallbackAxisSideDirection) {\n fallbackPlacements.push(...getOppositeAxisPlacements(initialPlacement, flipAlignment, fallbackAxisSideDirection, rtl));\n }\n const placements = [initialPlacement, ...fallbackPlacements];\n const overflow = await detectOverflow(state, detectOverflowOptions);\n const overflows = [];\n let overflowsData = ((_middlewareData$flip = middlewareData.flip) == null ? void 0 : _middlewareData$flip.overflows) || [];\n if (checkMainAxis) {\n overflows.push(overflow[side]);\n }\n if (checkCrossAxis) {\n const sides = getAlignmentSides(placement, rects, rtl);\n overflows.push(overflow[sides[0]], overflow[sides[1]]);\n }\n overflowsData = [...overflowsData, {\n placement,\n overflows\n }];\n\n // One or more sides is overflowing.\n if (!overflows.every(side => side <= 0)) {\n var _middlewareData$flip2, _overflowsData$filter;\n const nextIndex = (((_middlewareData$flip2 = middlewareData.flip) == null ? void 0 : _middlewareData$flip2.index) || 0) + 1;\n const nextPlacement = placements[nextIndex];\n if (nextPlacement) {\n // Try next placement and re-run the lifecycle.\n return {\n data: {\n index: nextIndex,\n overflows: overflowsData\n },\n reset: {\n placement: nextPlacement\n }\n };\n }\n\n // First, find the candidates that fit on the mainAxis side of overflow,\n // then find the placement that fits the best on the main crossAxis side.\n let resetPlacement = (_overflowsData$filter = overflowsData.filter(d => d.overflows[0] <= 0).sort((a, b) => a.overflows[1] - b.overflows[1])[0]) == null ? void 0 : _overflowsData$filter.placement;\n\n // Otherwise fallback.\n if (!resetPlacement) {\n switch (fallbackStrategy) {\n case 'bestFit':\n {\n var _overflowsData$filter2;\n const placement = (_overflowsData$filter2 = overflowsData.filter(d => {\n if (hasFallbackAxisSideDirection) {\n const currentSideAxis = getSideAxis(d.placement);\n return currentSideAxis === initialSideAxis ||\n // Create a bias to the `y` side axis due to horizontal\n // reading directions favoring greater width.\n currentSideAxis === 'y';\n }\n return true;\n }).map(d => [d.placement, d.overflows.filter(overflow => overflow > 0).reduce((acc, overflow) => acc + overflow, 0)]).sort((a, b) => a[1] - b[1])[0]) == null ? void 0 : _overflowsData$filter2[0];\n if (placement) {\n resetPlacement = placement;\n }\n break;\n }\n case 'initialPlacement':\n resetPlacement = initialPlacement;\n break;\n }\n }\n if (placement !== resetPlacement) {\n return {\n reset: {\n placement: resetPlacement\n }\n };\n }\n }\n return {};\n }\n };\n};\n\nfunction getSideOffsets(overflow, rect) {\n return {\n top: overflow.top - rect.height,\n right: overflow.right - rect.width,\n bottom: overflow.bottom - rect.height,\n left: overflow.left - rect.width\n };\n}\nfunction isAnySideFullyClipped(overflow) {\n return sides.some(side => overflow[side] >= 0);\n}\n/**\n * Provides data to hide the floating element in applicable situations, such as\n * when it is not in the same clipping context as the reference element.\n * @see https://floating-ui.com/docs/hide\n */\nconst hide = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n name: 'hide',\n options,\n async fn(state) {\n const {\n rects\n } = state;\n const {\n strategy = 'referenceHidden',\n ...detectOverflowOptions\n } = evaluate(options, state);\n switch (strategy) {\n case 'referenceHidden':\n {\n const overflow = await detectOverflow(state, {\n ...detectOverflowOptions,\n elementContext: 'reference'\n });\n const offsets = getSideOffsets(overflow, rects.reference);\n return {\n data: {\n referenceHiddenOffsets: offsets,\n referenceHidden: isAnySideFullyClipped(offsets)\n }\n };\n }\n case 'escaped':\n {\n const overflow = await detectOverflow(state, {\n ...detectOverflowOptions,\n altBoundary: true\n });\n const offsets = getSideOffsets(overflow, rects.floating);\n return {\n data: {\n escapedOffsets: offsets,\n escaped: isAnySideFullyClipped(offsets)\n }\n };\n }\n default:\n {\n return {};\n }\n }\n }\n };\n};\n\nfunction getBoundingRect(rects) {\n const minX = min(...rects.map(rect => rect.left));\n const minY = min(...rects.map(rect => rect.top));\n const maxX = max(...rects.map(rect => rect.right));\n const maxY = max(...rects.map(rect => rect.bottom));\n return {\n x: minX,\n y: minY,\n width: maxX - minX,\n height: maxY - minY\n };\n}\nfunction getRectsByLine(rects) {\n const sortedRects = rects.slice().sort((a, b) => a.y - b.y);\n const groups = [];\n let prevRect = null;\n for (let i = 0; i < sortedRects.length; i++) {\n const rect = sortedRects[i];\n if (!prevRect || rect.y - prevRect.y > prevRect.height / 2) {\n groups.push([rect]);\n } else {\n groups[groups.length - 1].push(rect);\n }\n prevRect = rect;\n }\n return groups.map(rect => rectToClientRect(getBoundingRect(rect)));\n}\n/**\n * Provides improved positioning for inline reference elements that can span\n * over multiple lines, such as hyperlinks or range selections.\n * @see https://floating-ui.com/docs/inline\n */\nconst inline = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n name: 'inline',\n options,\n async fn(state) {\n const {\n placement,\n elements,\n rects,\n platform,\n strategy\n } = state;\n // A MouseEvent's client{X,Y} coords can be up to 2 pixels off a\n // ClientRect's bounds, despite the event listener being triggered. A\n // padding of 2 seems to handle this issue.\n const {\n padding = 2,\n x,\n y\n } = evaluate(options, state);\n const nativeClientRects = Array.from((await (platform.getClientRects == null ? void 0 : platform.getClientRects(elements.reference))) || []);\n const clientRects = getRectsByLine(nativeClientRects);\n const fallback = rectToClientRect(getBoundingRect(nativeClientRects));\n const paddingObject = getPaddingObject(padding);\n function getBoundingClientRect() {\n // There are two rects and they are disjoined.\n if (clientRects.length === 2 && clientRects[0].left > clientRects[1].right && x != null && y != null) {\n // Find the first rect in which the point is fully inside.\n return clientRects.find(rect => x > rect.left - paddingObject.left && x < rect.right + paddingObject.right && y > rect.top - paddingObject.top && y < rect.bottom + paddingObject.bottom) || fallback;\n }\n\n // There are 2 or more connected rects.\n if (clientRects.length >= 2) {\n if (getSideAxis(placement) === 'y') {\n const firstRect = clientRects[0];\n const lastRect = clientRects[clientRects.length - 1];\n const isTop = getSide(placement) === 'top';\n const top = firstRect.top;\n const bottom = lastRect.bottom;\n const left = isTop ? firstRect.left : lastRect.left;\n const right = isTop ? firstRect.right : lastRect.right;\n const width = right - left;\n const height = bottom - top;\n return {\n top,\n bottom,\n left,\n right,\n width,\n height,\n x: left,\n y: top\n };\n }\n const isLeftSide = getSide(placement) === 'left';\n const maxRight = max(...clientRects.map(rect => rect.right));\n const minLeft = min(...clientRects.map(rect => rect.left));\n const measureRects = clientRects.filter(rect => isLeftSide ? rect.left === minLeft : rect.right === maxRight);\n const top = measureRects[0].top;\n const bottom = measureRects[measureRects.length - 1].bottom;\n const left = minLeft;\n const right = maxRight;\n const width = right - left;\n const height = bottom - top;\n return {\n top,\n bottom,\n left,\n right,\n width,\n height,\n x: left,\n y: top\n };\n }\n return fallback;\n }\n const resetRects = await platform.getElementRects({\n reference: {\n getBoundingClientRect\n },\n floating: elements.floating,\n strategy\n });\n if (rects.reference.x !== resetRects.reference.x || rects.reference.y !== resetRects.reference.y || rects.reference.width !== resetRects.reference.width || rects.reference.height !== resetRects.reference.height) {\n return {\n reset: {\n rects: resetRects\n }\n };\n }\n return {};\n }\n };\n};\n\n// For type backwards-compatibility, the `OffsetOptions` type was also\n// Derivable.\n\nasync function convertValueToCoords(state, options) {\n const {\n placement,\n platform,\n elements\n } = state;\n const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating));\n const side = getSide(placement);\n const alignment = getAlignment(placement);\n const isVertical = getSideAxis(placement) === 'y';\n const mainAxisMulti = ['left', 'top'].includes(side) ? -1 : 1;\n const crossAxisMulti = rtl && isVertical ? -1 : 1;\n const rawValue = evaluate(options, state);\n\n // eslint-disable-next-line prefer-const\n let {\n mainAxis,\n crossAxis,\n alignmentAxis\n } = typeof rawValue === 'number' ? {\n mainAxis: rawValue,\n crossAxis: 0,\n alignmentAxis: null\n } : {\n mainAxis: rawValue.mainAxis || 0,\n crossAxis: rawValue.crossAxis || 0,\n alignmentAxis: rawValue.alignmentAxis\n };\n if (alignment && typeof alignmentAxis === 'number') {\n crossAxis = alignment === 'end' ? alignmentAxis * -1 : alignmentAxis;\n }\n return isVertical ? {\n x: crossAxis * crossAxisMulti,\n y: mainAxis * mainAxisMulti\n } : {\n x: mainAxis * mainAxisMulti,\n y: crossAxis * crossAxisMulti\n };\n}\n\n/**\n * Modifies the placement by translating the floating element along the\n * specified axes.\n * A number (shorthand for `mainAxis` or distance), or an axes configuration\n * object may be passed.\n * @see https://floating-ui.com/docs/offset\n */\nconst offset = function (options) {\n if (options === void 0) {\n options = 0;\n }\n return {\n name: 'offset',\n options,\n async fn(state) {\n var _middlewareData$offse, _middlewareData$arrow;\n const {\n x,\n y,\n placement,\n middlewareData\n } = state;\n const diffCoords = await convertValueToCoords(state, options);\n\n // If the placement is the same and the arrow caused an alignment offset\n // then we don't need to change the positioning coordinates.\n if (placement === ((_middlewareData$offse = middlewareData.offset) == null ? void 0 : _middlewareData$offse.placement) && (_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) {\n return {};\n }\n return {\n x: x + diffCoords.x,\n y: y + diffCoords.y,\n data: {\n ...diffCoords,\n placement\n }\n };\n }\n };\n};\n\n/**\n * Optimizes the visibility of the floating element by shifting it in order to\n * keep it in view when it will overflow the clipping boundary.\n * @see https://floating-ui.com/docs/shift\n */\nconst shift = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n name: 'shift',\n options,\n async fn(state) {\n const {\n x,\n y,\n placement\n } = state;\n const {\n mainAxis: checkMainAxis = true,\n crossAxis: checkCrossAxis = false,\n limiter = {\n fn: _ref => {\n let {\n x,\n y\n } = _ref;\n return {\n x,\n y\n };\n }\n },\n ...detectOverflowOptions\n } = evaluate(options, state);\n const coords = {\n x,\n y\n };\n const overflow = await detectOverflow(state, detectOverflowOptions);\n const crossAxis = getSideAxis(getSide(placement));\n const mainAxis = getOppositeAxis(crossAxis);\n let mainAxisCoord = coords[mainAxis];\n let crossAxisCoord = coords[crossAxis];\n if (checkMainAxis) {\n const minSide = mainAxis === 'y' ? 'top' : 'left';\n const maxSide = mainAxis === 'y' ? 'bottom' : 'right';\n const min = mainAxisCoord + overflow[minSide];\n const max = mainAxisCoord - overflow[maxSide];\n mainAxisCoord = clamp(min, mainAxisCoord, max);\n }\n if (checkCrossAxis) {\n const minSide = crossAxis === 'y' ? 'top' : 'left';\n const maxSide = crossAxis === 'y' ? 'bottom' : 'right';\n const min = crossAxisCoord + overflow[minSide];\n const max = crossAxisCoord - overflow[maxSide];\n crossAxisCoord = clamp(min, crossAxisCoord, max);\n }\n const limitedCoords = limiter.fn({\n ...state,\n [mainAxis]: mainAxisCoord,\n [crossAxis]: crossAxisCoord\n });\n return {\n ...limitedCoords,\n data: {\n x: limitedCoords.x - x,\n y: limitedCoords.y - y,\n enabled: {\n [mainAxis]: checkMainAxis,\n [crossAxis]: checkCrossAxis\n }\n }\n };\n }\n };\n};\n/**\n * Built-in `limiter` that will stop `shift()` at a certain point.\n */\nconst limitShift = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n options,\n fn(state) {\n const {\n x,\n y,\n placement,\n rects,\n middlewareData\n } = state;\n const {\n offset = 0,\n mainAxis: checkMainAxis = true,\n crossAxis: checkCrossAxis = true\n } = evaluate(options, state);\n const coords = {\n x,\n y\n };\n const crossAxis = getSideAxis(placement);\n const mainAxis = getOppositeAxis(crossAxis);\n let mainAxisCoord = coords[mainAxis];\n let crossAxisCoord = coords[crossAxis];\n const rawOffset = evaluate(offset, state);\n const computedOffset = typeof rawOffset === 'number' ? {\n mainAxis: rawOffset,\n crossAxis: 0\n } : {\n mainAxis: 0,\n crossAxis: 0,\n ...rawOffset\n };\n if (checkMainAxis) {\n const len = mainAxis === 'y' ? 'height' : 'width';\n const limitMin = rects.reference[mainAxis] - rects.floating[len] + computedOffset.mainAxis;\n const limitMax = rects.reference[mainAxis] + rects.reference[len] - computedOffset.mainAxis;\n if (mainAxisCoord < limitMin) {\n mainAxisCoord = limitMin;\n } else if (mainAxisCoord > limitMax) {\n mainAxisCoord = limitMax;\n }\n }\n if (checkCrossAxis) {\n var _middlewareData$offse, _middlewareData$offse2;\n const len = mainAxis === 'y' ? 'width' : 'height';\n const isOriginSide = ['top', 'left'].includes(getSide(placement));\n const limitMin = rects.reference[crossAxis] - rects.floating[len] + (isOriginSide ? ((_middlewareData$offse = middlewareData.offset) == null ? void 0 : _middlewareData$offse[crossAxis]) || 0 : 0) + (isOriginSide ? 0 : computedOffset.crossAxis);\n const limitMax = rects.reference[crossAxis] + rects.reference[len] + (isOriginSide ? 0 : ((_middlewareData$offse2 = middlewareData.offset) == null ? void 0 : _middlewareData$offse2[crossAxis]) || 0) - (isOriginSide ? computedOffset.crossAxis : 0);\n if (crossAxisCoord < limitMin) {\n crossAxisCoord = limitMin;\n } else if (crossAxisCoord > limitMax) {\n crossAxisCoord = limitMax;\n }\n }\n return {\n [mainAxis]: mainAxisCoord,\n [crossAxis]: crossAxisCoord\n };\n }\n };\n};\n\n/**\n * Provides data that allows you to change the size of the floating element \u2014\n * for instance, prevent it from overflowing the clipping boundary or match the\n * width of the reference element.\n * @see https://floating-ui.com/docs/size\n */\nconst size = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n name: 'size',\n options,\n async fn(state) {\n var _state$middlewareData, _state$middlewareData2;\n const {\n placement,\n rects,\n platform,\n elements\n } = state;\n const {\n apply = () => {},\n ...detectOverflowOptions\n } = evaluate(options, state);\n const overflow = await detectOverflow(state, detectOverflowOptions);\n const side = getSide(placement);\n const alignment = getAlignment(placement);\n const isYAxis = getSideAxis(placement) === 'y';\n const {\n width,\n height\n } = rects.floating;\n let heightSide;\n let widthSide;\n if (side === 'top' || side === 'bottom') {\n heightSide = side;\n widthSide = alignment === ((await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating))) ? 'start' : 'end') ? 'left' : 'right';\n } else {\n widthSide = side;\n heightSide = alignment === 'end' ? 'top' : 'bottom';\n }\n const maximumClippingHeight = height - overflow.top - overflow.bottom;\n const maximumClippingWidth = width - overflow.left - overflow.right;\n const overflowAvailableHeight = min(height - overflow[heightSide], maximumClippingHeight);\n const overflowAvailableWidth = min(width - overflow[widthSide], maximumClippingWidth);\n const noShift = !state.middlewareData.shift;\n let availableHeight = overflowAvailableHeight;\n let availableWidth = overflowAvailableWidth;\n if ((_state$middlewareData = state.middlewareData.shift) != null && _state$middlewareData.enabled.x) {\n availableWidth = maximumClippingWidth;\n }\n if ((_state$middlewareData2 = state.middlewareData.shift) != null && _state$middlewareData2.enabled.y) {\n availableHeight = maximumClippingHeight;\n }\n if (noShift && !alignment) {\n const xMin = max(overflow.left, 0);\n const xMax = max(overflow.right, 0);\n const yMin = max(overflow.top, 0);\n const yMax = max(overflow.bottom, 0);\n if (isYAxis) {\n availableWidth = width - 2 * (xMin !== 0 || xMax !== 0 ? xMin + xMax : max(overflow.left, overflow.right));\n } else {\n availableHeight = height - 2 * (yMin !== 0 || yMax !== 0 ? yMin + yMax : max(overflow.top, overflow.bottom));\n }\n }\n await apply({\n ...state,\n availableWidth,\n availableHeight\n });\n const nextDimensions = await platform.getDimensions(elements.floating);\n if (width !== nextDimensions.width || height !== nextDimensions.height) {\n return {\n reset: {\n rects: true\n }\n };\n }\n return {};\n }\n };\n};\n\nexport { arrow, autoPlacement, computePosition, detectOverflow, flip, hide, inline, limitShift, offset, shift, size };\n", "function hasWindow() {\n return typeof window !== 'undefined';\n}\nfunction getNodeName(node) {\n if (isNode(node)) {\n return (node.nodeName || '').toLowerCase();\n }\n // Mocked nodes in testing environments may not be instances of Node. By\n // returning `#document` an infinite loop won't occur.\n // https://github.com/floating-ui/floating-ui/issues/2317\n return '#document';\n}\nfunction getWindow(node) {\n var _node$ownerDocument;\n return (node == null || (_node$ownerDocument = node.ownerDocument) == null ? void 0 : _node$ownerDocument.defaultView) || window;\n}\nfunction getDocumentElement(node) {\n var _ref;\n return (_ref = (isNode(node) ? node.ownerDocument : node.document) || window.document) == null ? void 0 : _ref.documentElement;\n}\nfunction isNode(value) {\n if (!hasWindow()) {\n return false;\n }\n return value instanceof Node || value instanceof getWindow(value).Node;\n}\nfunction isElement(value) {\n if (!hasWindow()) {\n return false;\n }\n return value instanceof Element || value instanceof getWindow(value).Element;\n}\nfunction isHTMLElement(value) {\n if (!hasWindow()) {\n return false;\n }\n return value instanceof HTMLElement || value instanceof getWindow(value).HTMLElement;\n}\nfunction isShadowRoot(value) {\n if (!hasWindow() || typeof ShadowRoot === 'undefined') {\n return false;\n }\n return value instanceof ShadowRoot || value instanceof getWindow(value).ShadowRoot;\n}\nfunction isOverflowElement(element) {\n const {\n overflow,\n overflowX,\n overflowY,\n display\n } = getComputedStyle(element);\n return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && !['inline', 'contents'].includes(display);\n}\nfunction isTableElement(element) {\n return ['table', 'td', 'th'].includes(getNodeName(element));\n}\nfunction isTopLayer(element) {\n return [':popover-open', ':modal'].some(selector => {\n try {\n return element.matches(selector);\n } catch (e) {\n return false;\n }\n });\n}\nfunction isContainingBlock(elementOrCss) {\n const webkit = isWebKit();\n const css = isElement(elementOrCss) ? getComputedStyle(elementOrCss) : elementOrCss;\n\n // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block\n return css.transform !== 'none' || css.perspective !== 'none' || (css.containerType ? css.containerType !== 'normal' : false) || !webkit && (css.backdropFilter ? css.backdropFilter !== 'none' : false) || !webkit && (css.filter ? css.filter !== 'none' : false) || ['transform', 'perspective', 'filter'].some(value => (css.willChange || '').includes(value)) || ['paint', 'layout', 'strict', 'content'].some(value => (css.contain || '').includes(value));\n}\nfunction getContainingBlock(element) {\n let currentNode = getParentNode(element);\n while (isHTMLElement(currentNode) && !isLastTraversableNode(currentNode)) {\n if (isContainingBlock(currentNode)) {\n return currentNode;\n } else if (isTopLayer(currentNode)) {\n return null;\n }\n currentNode = getParentNode(currentNode);\n }\n return null;\n}\nfunction isWebKit() {\n if (typeof CSS === 'undefined' || !CSS.supports) return false;\n return CSS.supports('-webkit-backdrop-filter', 'none');\n}\nfunction isLastTraversableNode(node) {\n return ['html', 'body', '#document'].includes(getNodeName(node));\n}\nfunction getComputedStyle(element) {\n return getWindow(element).getComputedStyle(element);\n}\nfunction getNodeScroll(element) {\n if (isElement(element)) {\n return {\n scrollLeft: element.scrollLeft,\n scrollTop: element.scrollTop\n };\n }\n return {\n scrollLeft: element.scrollX,\n scrollTop: element.scrollY\n };\n}\nfunction getParentNode(node) {\n if (getNodeName(node) === 'html') {\n return node;\n }\n const result =\n // Step into the shadow DOM of the parent of a slotted node.\n node.assignedSlot ||\n // DOM Element detected.\n node.parentNode ||\n // ShadowRoot detected.\n isShadowRoot(node) && node.host ||\n // Fallback.\n getDocumentElement(node);\n return isShadowRoot(result) ? result.host : result;\n}\nfunction getNearestOverflowAncestor(node) {\n const parentNode = getParentNode(node);\n if (isLastTraversableNode(parentNode)) {\n return node.ownerDocument ? node.ownerDocument.body : node.body;\n }\n if (isHTMLElement(parentNode) && isOverflowElement(parentNode)) {\n return parentNode;\n }\n return getNearestOverflowAncestor(parentNode);\n}\nfunction getOverflowAncestors(node, list, traverseIframes) {\n var _node$ownerDocument2;\n if (list === void 0) {\n list = [];\n }\n if (traverseIframes === void 0) {\n traverseIframes = true;\n }\n const scrollableAncestor = getNearestOverflowAncestor(node);\n const isBody = scrollableAncestor === ((_node$ownerDocument2 = node.ownerDocument) == null ? void 0 : _node$ownerDocument2.body);\n const win = getWindow(scrollableAncestor);\n if (isBody) {\n const frameElement = getFrameElement(win);\n return list.concat(win, win.visualViewport || [], isOverflowElement(scrollableAncestor) ? scrollableAncestor : [], frameElement && traverseIframes ? getOverflowAncestors(frameElement) : []);\n }\n return list.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor, [], traverseIframes));\n}\nfunction getFrameElement(win) {\n return win.parent && Object.getPrototypeOf(win.parent) ? win.frameElement : null;\n}\n\nexport { getComputedStyle, getContainingBlock, getDocumentElement, getFrameElement, getNearestOverflowAncestor, getNodeName, getNodeScroll, getOverflowAncestors, getParentNode, getWindow, isContainingBlock, isElement, isHTMLElement, isLastTraversableNode, isNode, isOverflowElement, isShadowRoot, isTableElement, isTopLayer, isWebKit };\n", "import { rectToClientRect, detectOverflow as detectOverflow$1, offset as offset$1, autoPlacement as autoPlacement$1, shift as shift$1, flip as flip$1, size as size$1, hide as hide$1, arrow as arrow$1, inline as inline$1, limitShift as limitShift$1, computePosition as computePosition$1 } from '@floating-ui/core';\nimport { round, createCoords, max, min, floor } from '@floating-ui/utils';\nimport { getComputedStyle, isHTMLElement, isElement, getWindow, isWebKit, getFrameElement, getNodeScroll, getDocumentElement, isTopLayer, getNodeName, isOverflowElement, getOverflowAncestors, getParentNode, isLastTraversableNode, isContainingBlock, isTableElement, getContainingBlock } from '@floating-ui/utils/dom';\nexport { getOverflowAncestors } from '@floating-ui/utils/dom';\n\nfunction getCssDimensions(element) {\n const css = getComputedStyle(element);\n // In testing environments, the `width` and `height` properties are empty\n // strings for SVG elements, returning NaN. Fallback to `0` in this case.\n let width = parseFloat(css.width) || 0;\n let height = parseFloat(css.height) || 0;\n const hasOffset = isHTMLElement(element);\n const offsetWidth = hasOffset ? element.offsetWidth : width;\n const offsetHeight = hasOffset ? element.offsetHeight : height;\n const shouldFallback = round(width) !== offsetWidth || round(height) !== offsetHeight;\n if (shouldFallback) {\n width = offsetWidth;\n height = offsetHeight;\n }\n return {\n width,\n height,\n $: shouldFallback\n };\n}\n\nfunction unwrapElement(element) {\n return !isElement(element) ? element.contextElement : element;\n}\n\nfunction getScale(element) {\n const domElement = unwrapElement(element);\n if (!isHTMLElement(domElement)) {\n return createCoords(1);\n }\n const rect = domElement.getBoundingClientRect();\n const {\n width,\n height,\n $\n } = getCssDimensions(domElement);\n let x = ($ ? round(rect.width) : rect.width) / width;\n let y = ($ ? round(rect.height) : rect.height) / height;\n\n // 0, NaN, or Infinity should always fallback to 1.\n\n if (!x || !Number.isFinite(x)) {\n x = 1;\n }\n if (!y || !Number.isFinite(y)) {\n y = 1;\n }\n return {\n x,\n y\n };\n}\n\nconst noOffsets = /*#__PURE__*/createCoords(0);\nfunction getVisualOffsets(element) {\n const win = getWindow(element);\n if (!isWebKit() || !win.visualViewport) {\n return noOffsets;\n }\n return {\n x: win.visualViewport.offsetLeft,\n y: win.visualViewport.offsetTop\n };\n}\nfunction shouldAddVisualOffsets(element, isFixed, floatingOffsetParent) {\n if (isFixed === void 0) {\n isFixed = false;\n }\n if (!floatingOffsetParent || isFixed && floatingOffsetParent !== getWindow(element)) {\n return false;\n }\n return isFixed;\n}\n\nfunction getBoundingClientRect(element, includeScale, isFixedStrategy, offsetParent) {\n if (includeScale === void 0) {\n includeScale = false;\n }\n if (isFixedStrategy === void 0) {\n isFixedStrategy = false;\n }\n const clientRect = element.getBoundingClientRect();\n const domElement = unwrapElement(element);\n let scale = createCoords(1);\n if (includeScale) {\n if (offsetParent) {\n if (isElement(offsetParent)) {\n scale = getScale(offsetParent);\n }\n } else {\n scale = getScale(element);\n }\n }\n const visualOffsets = shouldAddVisualOffsets(domElement, isFixedStrategy, offsetParent) ? getVisualOffsets(domElement) : createCoords(0);\n let x = (clientRect.left + visualOffsets.x) / scale.x;\n let y = (clientRect.top + visualOffsets.y) / scale.y;\n let width = clientRect.width / scale.x;\n let height = clientRect.height / scale.y;\n if (domElement) {\n const win = getWindow(domElement);\n const offsetWin = offsetParent && isElement(offsetParent) ? getWindow(offsetParent) : offsetParent;\n let currentWin = win;\n let currentIFrame = getFrameElement(currentWin);\n while (currentIFrame && offsetParent && offsetWin !== currentWin) {\n const iframeScale = getScale(currentIFrame);\n const iframeRect = currentIFrame.getBoundingClientRect();\n const css = getComputedStyle(currentIFrame);\n const left = iframeRect.left + (currentIFrame.clientLeft + parseFloat(css.paddingLeft)) * iframeScale.x;\n const top = iframeRect.top + (currentIFrame.clientTop + parseFloat(css.paddingTop)) * iframeScale.y;\n x *= iframeScale.x;\n y *= iframeScale.y;\n width *= iframeScale.x;\n height *= iframeScale.y;\n x += left;\n y += top;\n currentWin = getWindow(currentIFrame);\n currentIFrame = getFrameElement(currentWin);\n }\n }\n return rectToClientRect({\n width,\n height,\n x,\n y\n });\n}\n\n// If <html> has a CSS width greater than the viewport, then this will be\n// incorrect for RTL.\nfunction getWindowScrollBarX(element, rect) {\n const leftScroll = getNodeScroll(element).scrollLeft;\n if (!rect) {\n return getBoundingClientRect(getDocumentElement(element)).left + leftScroll;\n }\n return rect.left + leftScroll;\n}\n\nfunction getHTMLOffset(documentElement, scroll, ignoreScrollbarX) {\n if (ignoreScrollbarX === void 0) {\n ignoreScrollbarX = false;\n }\n const htmlRect = documentElement.getBoundingClientRect();\n const x = htmlRect.left + scroll.scrollLeft - (ignoreScrollbarX ? 0 :\n // RTL <body> scrollbar.\n getWindowScrollBarX(documentElement, htmlRect));\n const y = htmlRect.top + scroll.scrollTop;\n return {\n x,\n y\n };\n}\n\nfunction convertOffsetParentRelativeRectToViewportRelativeRect(_ref) {\n let {\n elements,\n rect,\n offsetParent,\n strategy\n } = _ref;\n const isFixed = strategy === 'fixed';\n const documentElement = getDocumentElement(offsetParent);\n const topLayer = elements ? isTopLayer(elements.floating) : false;\n if (offsetParent === documentElement || topLayer && isFixed) {\n return rect;\n }\n let scroll = {\n scrollLeft: 0,\n scrollTop: 0\n };\n let scale = createCoords(1);\n const offsets = createCoords(0);\n const isOffsetParentAnElement = isHTMLElement(offsetParent);\n if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {\n if (getNodeName(offsetParent) !== 'body' || isOverflowElement(documentElement)) {\n scroll = getNodeScroll(offsetParent);\n }\n if (isHTMLElement(offsetParent)) {\n const offsetRect = getBoundingClientRect(offsetParent);\n scale = getScale(offsetParent);\n offsets.x = offsetRect.x + offsetParent.clientLeft;\n offsets.y = offsetRect.y + offsetParent.clientTop;\n }\n }\n const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll, true) : createCoords(0);\n return {\n width: rect.width * scale.x,\n height: rect.height * scale.y,\n x: rect.x * scale.x - scroll.scrollLeft * scale.x + offsets.x + htmlOffset.x,\n y: rect.y * scale.y - scroll.scrollTop * scale.y + offsets.y + htmlOffset.y\n };\n}\n\nfunction getClientRects(element) {\n return Array.from(element.getClientRects());\n}\n\n// Gets the entire size of the scrollable document area, even extending outside\n// of the `<html>` and `<body>` rect bounds if horizontally scrollable.\nfunction getDocumentRect(element) {\n const html = getDocumentElement(element);\n const scroll = getNodeScroll(element);\n const body = element.ownerDocument.body;\n const width = max(html.scrollWidth, html.clientWidth, body.scrollWidth, body.clientWidth);\n const height = max(html.scrollHeight, html.clientHeight, body.scrollHeight, body.clientHeight);\n let x = -scroll.scrollLeft + getWindowScrollBarX(element);\n const y = -scroll.scrollTop;\n if (getComputedStyle(body).direction === 'rtl') {\n x += max(html.clientWidth, body.clientWidth) - width;\n }\n return {\n width,\n height,\n x,\n y\n };\n}\n\nfunction getViewportRect(element, strategy) {\n const win = getWindow(element);\n const html = getDocumentElement(element);\n const visualViewport = win.visualViewport;\n let width = html.clientWidth;\n let height = html.clientHeight;\n let x = 0;\n let y = 0;\n if (visualViewport) {\n width = visualViewport.width;\n height = visualViewport.height;\n const visualViewportBased = isWebKit();\n if (!visualViewportBased || visualViewportBased && strategy === 'fixed') {\n x = visualViewport.offsetLeft;\n y = visualViewport.offsetTop;\n }\n }\n return {\n width,\n height,\n x,\n y\n };\n}\n\n// Returns the inner client rect, subtracting scrollbars if present.\nfunction getInnerBoundingClientRect(element, strategy) {\n const clientRect = getBoundingClientRect(element, true, strategy === 'fixed');\n const top = clientRect.top + element.clientTop;\n const left = clientRect.left + element.clientLeft;\n const scale = isHTMLElement(element) ? getScale(element) : createCoords(1);\n const width = element.clientWidth * scale.x;\n const height = element.clientHeight * scale.y;\n const x = left * scale.x;\n const y = top * scale.y;\n return {\n width,\n height,\n x,\n y\n };\n}\nfunction getClientRectFromClippingAncestor(element, clippingAncestor, strategy) {\n let rect;\n if (clippingAncestor === 'viewport') {\n rect = getViewportRect(element, strategy);\n } else if (clippingAncestor === 'document') {\n rect = getDocumentRect(getDocumentElement(element));\n } else if (isElement(clippingAncestor)) {\n rect = getInnerBoundingClientRect(clippingAncestor, strategy);\n } else {\n const visualOffsets = getVisualOffsets(element);\n rect = {\n x: clippingAncestor.x - visualOffsets.x,\n y: clippingAncestor.y - visualOffsets.y,\n width: clippingAncestor.width,\n height: clippingAncestor.height\n };\n }\n return rectToClientRect(rect);\n}\nfunction hasFixedPositionAncestor(element, stopNode) {\n const parentNode = getParentNode(element);\n if (parentNode === stopNode || !isElement(parentNode) || isLastTraversableNode(parentNode)) {\n return false;\n }\n return getComputedStyle(parentNode).position === 'fixed' || hasFixedPositionAncestor(parentNode, stopNode);\n}\n\n// A \"clipping ancestor\" is an `overflow` element with the characteristic of\n// clipping (or hiding) child elements. This returns all clipping ancestors\n// of the given element up the tree.\nfunction getClippingElementAncestors(element, cache) {\n const cachedResult = cache.get(element);\n if (cachedResult) {\n return cachedResult;\n }\n let result = getOverflowAncestors(element, [], false).filter(el => isElement(el) && getNodeName(el) !== 'body');\n let currentContainingBlockComputedStyle = null;\n const elementIsFixed = getComputedStyle(element).position === 'fixed';\n let currentNode = elementIsFixed ? getParentNode(element) : element;\n\n // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block\n while (isElement(currentNode) && !isLastTraversableNode(currentNode)) {\n const computedStyle = getComputedStyle(currentNode);\n const currentNodeIsContaining = isContainingBlock(currentNode);\n if (!currentNodeIsContaining && computedStyle.position === 'fixed') {\n currentContainingBlockComputedStyle = null;\n }\n const shouldDropCurrentNode = elementIsFixed ? !currentNodeIsContaining && !currentContainingBlockComputedStyle : !currentNodeIsContaining && computedStyle.position === 'static' && !!currentContainingBlockComputedStyle && ['absolute', 'fixed'].includes(currentContainingBlockComputedStyle.position) || isOverflowElement(currentNode) && !currentNodeIsContaining && hasFixedPositionAncestor(element, currentNode);\n if (shouldDropCurrentNode) {\n // Drop non-containing blocks.\n result = result.filter(ancestor => ancestor !== currentNode);\n } else {\n // Record last containing block for next iteration.\n currentContainingBlockComputedStyle = computedStyle;\n }\n currentNode = getParentNode(currentNode);\n }\n cache.set(element, result);\n return result;\n}\n\n// Gets the maximum area that the element is visible in due to any number of\n// clipping ancestors.\nfunction getClippingRect(_ref) {\n let {\n element,\n boundary,\n rootBoundary,\n strategy\n } = _ref;\n const elementClippingAncestors = boundary === 'clippingAncestors' ? isTopLayer(element) ? [] : getClippingElementAncestors(element, this._c) : [].concat(boundary);\n const clippingAncestors = [...elementClippingAncestors, rootBoundary];\n const firstClippingAncestor = clippingAncestors[0];\n const clippingRect = clippingAncestors.reduce((accRect, clippingAncestor) => {\n const rect = getClientRectFromClippingAncestor(element, clippingAncestor, strategy);\n accRect.top = max(rect.top, accRect.top);\n accRect.right = min(rect.right, accRect.right);\n accRect.bottom = min(rect.bottom, accRect.bottom);\n accRect.left = max(rect.left, accRect.left);\n return accRect;\n }, getClientRectFromClippingAncestor(element, firstClippingAncestor, strategy));\n return {\n width: clippingRect.right - clippingRect.left,\n height: clippingRect.bottom - clippingRect.top,\n x: clippingRect.left,\n y: clippingRect.top\n };\n}\n\nfunction getDimensions(element) {\n const {\n width,\n height\n } = getCssDimensions(element);\n return {\n width,\n height\n };\n}\n\nfunction getRectRelativeToOffsetParent(element, offsetParent, strategy) {\n const isOffsetParentAnElement = isHTMLElement(offsetParent);\n const documentElement = getDocumentElement(offsetParent);\n const isFixed = strategy === 'fixed';\n const rect = getBoundingClientRect(element, true, isFixed, offsetParent);\n let scroll = {\n scrollLeft: 0,\n scrollTop: 0\n };\n const offsets = createCoords(0);\n if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {\n if (getNodeName(offsetParent) !== 'body' || isOverflowElement(documentElement)) {\n scroll = getNodeScroll(offsetParent);\n }\n if (isOffsetParentAnElement) {\n const offsetRect = getBoundingClientRect(offsetParent, true, isFixed, offsetParent);\n offsets.x = offsetRect.x + offsetParent.clientLeft;\n offsets.y = offsetRect.y + offsetParent.clientTop;\n } else if (documentElement) {\n // If the <body> scrollbar appears on the left (e.g. RTL systems). Use\n // Firefox with layout.scrollbar.side = 3 in about:config to test this.\n offsets.x = getWindowScrollBarX(documentElement);\n }\n }\n const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll) : createCoords(0);\n const x = rect.left + scroll.scrollLeft - offsets.x - htmlOffset.x;\n const y = rect.top + scroll.scrollTop - offsets.y - htmlOffset.y;\n return {\n x,\n y,\n width: rect.width,\n height: rect.height\n };\n}\n\nfunction isStaticPositioned(element) {\n return getComputedStyle(element).position === 'static';\n}\n\nfunction getTrueOffsetParent(element, polyfill) {\n if (!isHTMLElement(element) || getComputedStyle(element).position === 'fixed') {\n return null;\n }\n if (polyfill) {\n return polyfill(element);\n }\n let rawOffsetParent = element.offsetParent;\n\n // Firefox returns the <html> element as the offsetParent if it's non-static,\n // while Chrome and Safari return the <body> element. The <body> element must\n // be used to perform the correct calculations even if the <html> element is\n // non-static.\n if (getDocumentElement(element) === rawOffsetParent) {\n rawOffsetParent = rawOffsetParent.ownerDocument.body;\n }\n return rawOffsetParent;\n}\n\n// Gets the closest ancestor positioned element. Handles some edge cases,\n// such as table ancestors and cross browser bugs.\nfunction getOffsetParent(element, polyfill) {\n const win = getWindow(element);\n if (isTopLayer(element)) {\n return win;\n }\n if (!isHTMLElement(element)) {\n let svgOffsetParent = getParentNode(element);\n while (svgOffsetParent && !isLastTraversableNode(svgOffsetParent)) {\n if (isElement(svgOffsetParent) && !isStaticPositioned(svgOffsetParent)) {\n return svgOffsetParent;\n }\n svgOffsetParent = getParentNode(svgOffsetParent);\n }\n return win;\n }\n let offsetParent = getTrueOffsetParent(element, polyfill);\n while (offsetParent && isTableElement(offsetParent) && isStaticPositioned(offsetParent)) {\n offsetParent = getTrueOffsetParent(offsetParent, polyfill);\n }\n if (offsetParent && isLastTraversableNode(offsetParent) && isStaticPositioned(offsetParent) && !isContainingBlock(offsetParent)) {\n return win;\n }\n return offsetParent || getContainingBlock(element) || win;\n}\n\nconst getElementRects = async function (data) {\n const getOffsetParentFn = this.getOffsetParent || getOffsetParent;\n const getDimensionsFn = this.getDimensions;\n const floatingDimensions = await getDimensionsFn(data.floating);\n return {\n reference: getRectRelativeToOffsetParent(data.reference, await getOffsetParentFn(data.floating), data.strategy),\n floating: {\n x: 0,\n y: 0,\n width: floatingDimensions.width,\n height: floatingDimensions.height\n }\n };\n};\n\nfunction isRTL(element) {\n return getComputedStyle(element).direction === 'rtl';\n}\n\nconst platform = {\n convertOffsetParentRelativeRectToViewportRelativeRect,\n getDocumentElement,\n getClippingRect,\n getOffsetParent,\n getElementRects,\n getClientRects,\n getDimensions,\n getScale,\n isElement,\n isRTL\n};\n\n// https://samthor.au/2021/observing-dom/\nfunction observeMove(element, onMove) {\n let io = null;\n let timeoutId;\n const root = getDocumentElement(element);\n function cleanup() {\n var _io;\n clearTimeout(timeoutId);\n (_io = io) == null || _io.disconnect();\n io = null;\n }\n function refresh(skip, threshold) {\n if (skip === void 0) {\n skip = false;\n }\n if (threshold === void 0) {\n threshold = 1;\n }\n cleanup();\n const {\n left,\n top,\n width,\n height\n } = element.getBoundingClientRect();\n if (!skip) {\n onMove();\n }\n if (!width || !height) {\n return;\n }\n const insetTop = floor(top);\n const insetRight = floor(root.clientWidth - (left + width));\n const insetBottom = floor(root.clientHeight - (top + height));\n const insetLeft = floor(left);\n const rootMargin = -insetTop + \"px \" + -insetRight + \"px \" + -insetBottom + \"px \" + -insetLeft + \"px\";\n const options = {\n rootMargin,\n threshold: max(0, min(1, threshold)) || 1\n };\n let isFirstUpdate = true;\n function handleObserve(entries) {\n const ratio = entries[0].intersectionRatio;\n if (ratio !== threshold) {\n if (!isFirstUpdate) {\n return refresh();\n }\n if (!ratio) {\n // If the reference is clipped, the ratio is 0. Throttle the refresh\n // to prevent an infinite loop of updates.\n timeoutId = setTimeout(() => {\n refresh(false, 1e-7);\n }, 1000);\n } else {\n refresh(false, ratio);\n }\n }\n isFirstUpdate = false;\n }\n\n // Older browsers don't support a `document` as the root and will throw an\n // error.\n try {\n io = new IntersectionObserver(handleObserve, {\n ...options,\n // Handle <iframe>s\n root: root.ownerDocument\n });\n } catch (e) {\n io = new IntersectionObserver(handleObserve, options);\n }\n io.observe(element);\n }\n refresh(true);\n return cleanup;\n}\n\n/**\n * Automatically updates the position of the floating element when necessary.\n * Should only be called when the floating element is mounted on the DOM or\n * visible on the screen.\n * @returns cleanup function that should be invoked when the floating element is\n * removed from the DOM or hidden from the screen.\n * @see https://floating-ui.com/docs/autoUpdate\n */\nfunction autoUpdate(reference, floating, update, options) {\n if (options === void 0) {\n options = {};\n }\n const {\n ancestorScroll = true,\n ancestorResize = true,\n elementResize = typeof ResizeObserver === 'function',\n layoutShift = typeof IntersectionObserver === 'function',\n animationFrame = false\n } = options;\n const referenceEl = unwrapElement(reference);\n const ancestors = ancestorScroll || ancestorResize ? [...(referenceEl ? getOverflowAncestors(referenceEl) : []), ...getOverflowAncestors(floating)] : [];\n ancestors.forEach(ancestor => {\n ancestorScroll && ancestor.addEventListener('scroll', update, {\n passive: true\n });\n ancestorResize && ancestor.addEventListener('resize', update);\n });\n const cleanupIo = referenceEl && layoutShift ? observeMove(referenceEl, update) : null;\n let reobserveFrame = -1;\n let resizeObserver = null;\n if (elementResize) {\n resizeObserver = new ResizeObserver(_ref => {\n let [firstEntry] = _ref;\n if (firstEntry && firstEntry.target === referenceEl && resizeObserver) {\n // Prevent update loops when using the `size` middleware.\n // https://github.com/floating-ui/floating-ui/issues/1740\n resizeObserver.unobserve(floating);\n cancelAnimationFrame(reobserveFrame);\n reobserveFrame = requestAnimationFrame(() => {\n var _resizeObserver;\n (_resizeObserver = resizeObserver) == null || _resizeObserver.observe(floating);\n });\n }\n update();\n });\n if (referenceEl && !animationFrame) {\n resizeObserver.observe(referenceEl);\n }\n resizeObserver.observe(floating);\n }\n let frameId;\n let prevRefRect = animationFrame ? getBoundingClientRect(reference) : null;\n if (animationFrame) {\n frameLoop();\n }\n function frameLoop() {\n const nextRefRect = getBoundingClientRect(reference);\n if (prevRefRect && (nextRefRect.x !== prevRefRect.x || nextRefRect.y !== prevRefRect.y || nextRefRect.width !== prevRefRect.width || nextRefRect.height !== prevRefRect.height)) {\n update();\n }\n prevRefRect = nextRefRect;\n frameId = requestAnimationFrame(frameLoop);\n }\n update();\n return () => {\n var _resizeObserver2;\n ancestors.forEach(ancestor => {\n ancestorScroll && ancestor.removeEventListener('scroll', update);\n ancestorResize && ancestor.removeEventListener('resize', update);\n });\n cleanupIo == null || cleanupIo();\n (_resizeObserver2 = resizeObserver) == null || _resizeObserver2.disconnect();\n resizeObserver = null;\n if (animationFrame) {\n cancelAnimationFrame(frameId);\n }\n };\n}\n\n/**\n * Resolves with an object of overflow side offsets that determine how much the\n * element is overflowing a given clipping boundary on each side.\n * - positive = overflowing the boundary by that number of pixels\n * - negative = how many pixels left before it will overflow\n * - 0 = lies flush with the boundary\n * @see https://floating-ui.com/docs/detectOverflow\n */\nconst detectOverflow = detectOverflow$1;\n\n/**\n * Modifies the placement by translating the floating element along the\n * specified axes.\n * A number (shorthand for `mainAxis` or distance), or an axes configuration\n * object may be passed.\n * @see https://floating-ui.com/docs/offset\n */\nconst offset = offset$1;\n\n/**\n * Optimizes the visibility of the floating element by choosing the placement\n * that has the most space available automatically, without needing to specify a\n * preferred placement. Alternative to `flip`.\n * @see https://floating-ui.com/docs/autoPlacement\n */\nconst autoPlacement = autoPlacement$1;\n\n/**\n * Optimizes the visibility of the floating element by shifting it in order to\n * keep it in view when it will overflow the clipping boundary.\n * @see https://floating-ui.com/docs/shift\n */\nconst shift = shift$1;\n\n/**\n * Optimizes the visibility of the floating element by flipping the `placement`\n * in order to keep it in view when the preferred placement(s) will overflow the\n * clipping boundary. Alternative to `autoPlacement`.\n * @see https://floating-ui.com/docs/flip\n */\nconst flip = flip$1;\n\n/**\n * Provides data that allows you to change the size of the floating element \u2014\n * for instance, prevent it from overflowing the clipping boundary or match the\n * width of the reference element.\n * @see https://floating-ui.com/docs/size\n */\nconst size = size$1;\n\n/**\n * Provides data to hide the floating element in applicable situations, such as\n * when it is not in the same clipping context as the reference element.\n * @see https://floating-ui.com/docs/hide\n */\nconst hide = hide$1;\n\n/**\n * Provides data to position an inner element of the floating element so that it\n * appears centered to the reference element.\n * @see https://floating-ui.com/docs/arrow\n */\nconst arrow = arrow$1;\n\n/**\n * Provides improved positioning for inline reference elements that can span\n * over multiple lines, such as hyperlinks or range selections.\n * @see https://floating-ui.com/docs/inline\n */\nconst inline = inline$1;\n\n/**\n * Built-in `limiter` that will stop `shift()` at a certain point.\n */\nconst limitShift = limitShift$1;\n\n/**\n * Computes the `x` and `y` coordinates that will place the floating element\n * next to a given reference element.\n */\nconst computePosition = (reference, floating, options) => {\n // This caches the expensive `getClippingElementAncestors` function so that\n // multiple lifecycle resets re-use the same result. It only lives for a\n // single call. If other functions become expensive, we can add them as well.\n const cache = new Map();\n const mergedOptions = {\n platform,\n ...options\n };\n const platformWithCache = {\n ...mergedOptions.platform,\n _c: cache\n };\n return computePosition$1(reference, floating, {\n ...mergedOptions,\n platform: platformWithCache\n });\n};\n\nexport { arrow, autoPlacement, autoUpdate, computePosition, detectOverflow, flip, hide, inline, limitShift, offset, platform, shift, size };\n", "import { css } from 'lit';\n\nconst styles = css`\n :host {\n --mdc-popover-arrow-border-radius: 0.1875rem;\n --mdc-popover-arrow-border: 0.0625rem solid var(--mds-color-theme-outline-secondary-normal);\n\n --mdc-popover-primary-background-color: var(--mds-color-theme-background-solid-primary-normal);\n --mdc-popover-inverted-background-color: var(--mds-color-theme-inverted-background-normal);\n --mdc-popover-inverted-border-color: var(--mds-color-theme-inverted-outline-primary-normal);\n --mdc-popover-inverted-text-color: var(--mds-color-theme-inverted-text-primary-normal);\n }\n\n :host([color='contrast']) .popover-container {\n .popover-arrow {\n background-color: var(--mdc-popover-inverted-background-color);\n border-color: var(--mdc-popover-inverted-border-color);\n }\n\n .popover-close {\n color: var(--mdc-popover-inverted-text-color);\n }\n }\n\n .popover-container {\n display: none;\n position: absolute;\n box-sizing: content-box;\n }\n\n :host([visible]) .popover-container {\n display: block;\n }\n\n .popover-container::part(container) {\n padding: 0;\n }\n\n :host::part(popover-content) {\n position: relative;\n padding: 0.75rem;\n overflow-y: auto;\n min-width: max-content;\n z-index: 9998;\n }\n\n .popover-backdrop {\n z-index: 999;\n position: fixed;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n background: transparent;\n }\n\n .popover-hover-bridge {\n position: absolute;\n transform: translateX(-50%);\n background: transparent;\n pointer-events: auto;\n }\n\n .popover-arrow {\n position: absolute;\n width: 1rem;\n height: 1rem;\n background-color: var(--mdc-popover-primary-background-color);\n transform: rotate(45deg);\n pointer-events: none;\n border: var(--mdc-popover-arrow-border);\n }\n\n .popover-close {\n position: absolute;\n right: 0.75rem;\n top: 0.75rem;\n cursor: pointer;\n z-index: 9999;\n }\n\n .popover-arrow[data-side='top'] {\n border-top: none;\n border-left: none;\n border-bottom-right-radius: var(--mdc-popover-arrow-border-radius);\n border-top-left-radius: 100%;\n }\n\n .popover-arrow[data-side='bottom'] {\n border-bottom: none;\n border-right: none;\n border-top-left-radius: var(--mdc-popover-arrow-border-radius);\n border-bottom-right-radius: 100%;\n }\n\n .popover-arrow[data-side='right'] {\n border-top: none;\n border-right: none;\n border-bottom-left-radius: var(--mdc-popover-arrow-border-radius);\n border-top-right-radius: 100%;\n }\n\n .popover-arrow[data-side='left'] {\n border-bottom: none;\n border-left: none;\n border-top-right-radius: var(--mdc-popover-arrow-border-radius);\n border-bottom-left-radius: 100%;\n }\n`;\n\nexport default [styles];\n", "import utils from '../../utils/tag-name';\n\nconst TAG_NAME = utils.constructTagName('modalcontainer');\n\nconst COLOR = {\n TONAL: 'tonal',\n CONTRAST: 'contrast',\n} as const;\n\nconst ELEVATION = {\n 0: 0,\n 1: 1,\n 2: 2,\n 3: 3,\n 4: 4,\n} as const;\n\nconst DEFAULTS = {\n COLOR: COLOR.TONAL,\n ELEVATION: ELEVATION[0],\n ROLE: 'dialog',\n ARIA_MODAL: false,\n CHILDREN: 'Lorem ipsum dolor sit amet',\n} as const;\n\nexport { TAG_NAME, COLOR, DEFAULTS, ELEVATION };\n", "import utils from '../../utils/tag-name';\nimport { COLOR } from '../modalcontainer/modalcontainer.constants';\n\nconst TAG_NAME = utils.constructTagName('popover');\n\nconst POPOVER_PLACEMENT = {\n LEFT_START: 'left-start',\n LEFT: 'left',\n LEFT_END: 'left-end',\n RIGHT_START: 'right-start',\n RIGHT: 'right',\n RIGHT_END: 'right-end',\n TOP_START: 'top-start',\n TOP: 'top',\n TOP_END: 'top-end',\n BOTTOM_START: 'bottom-start',\n BOTTOM: 'bottom',\n BOTTOM_END: 'bottom-end',\n} as const;\n\nconst TRIGGER = {\n CLICK: 'click',\n MOUSEENTER: 'mouseenter',\n FOCUSIN: 'focusin',\n MANUAL: 'manual',\n} as const;\n\nconst DEFAULTS = {\n PLACEMENT: POPOVER_PLACEMENT.BOTTOM,\n TRIGGER: TRIGGER.CLICK,\n COLOR: COLOR.TONAL,\n OFFSET: 4,\n VISIBLE: false,\n ARROW: false,\n CLOSE_BUTTON: false,\n FOCUS_TRAP: false,\n INTERACTIVE: false,\n PREVENT_SCROLL: false,\n HIDE_ON_ESCAPE: false,\n HIDE_ON_BLUR: false,\n HIDE_ON_CLICK_OUTSIDE: false,\n FOCUS_BACK: false,\n BACKDROP: false,\n FLIP: true,\n SIZE: false,\n DELAY: '0,0',\n ROLE: 'dialog',\n Z_INDEX: 1000,\n} as const;\n\nexport { TAG_NAME, POPOVER_PLACEMENT, TRIGGER, DEFAULTS };\n", "import { property } from 'lit/decorators.js';\nimport type { Constructor } from './index.types';\nimport { DEFAULTS as POPOVER_DEFAULTS } from '../../components/popover/popover.constants';\n\nexport interface FocusTrapClassInterface {\n enabledFocusTrap: boolean;\n enabledPreventScroll: boolean;\n setFocusableElements(): void;\n setInitialFocus(prefferableElement?: number): void;\n deactivateFocusTrap(): void;\n}\n\nexport const FocusTrapMixin = <T extends Constructor<HTMLElement>>(superClass: T) => {\n class FocusTrap extends superClass {\n /**\n * Determines whether the focus trap is enabled.\n * If true, focus will be restricted to the content within this component.\n * @default false\n */\n @property({ type: Boolean })\n enabledFocusTrap: boolean = POPOVER_DEFAULTS.FOCUS_TRAP;\n\n /**\n * Prevent outside scrolling when popover show.\n * @default false\n */\n @property({ type: Boolean })\n enabledPreventScroll: boolean = POPOVER_DEFAULTS.PREVENT_SCROLL;\n\n /** @internal */\n private focusTrapIndex: number = -1;\n\n /** @internal */\n private focusableElements: HTMLElement[] = [];\n\n shouldWrapFocus: () => boolean = () => true;\n\n constructor(...args: any[]) {\n super(...args);\n this.addEventListener('keydown', this.handleKeydown);\n }\n\n /**\n * Deactivate the focus trap.\n */\n deactivateFocusTrap() {\n this.enabledFocusTrap = false;\n this.enabledPreventScroll = false;\n this.focusTrapIndex = -1;\n document.body.style.overflow = '';\n }\n\n /**\n * Checks if the element has no client rectangles (not visible in the viewport).\n *\n * @param element - The element to check.\n * @returns True if the element has no client rectangles.\n */\n private hasNoClientRects(element: HTMLElement) {\n return element.getClientRects().length === 0;\n }\n\n /**\n * Checks if the element has zero dimensions (width and height are both 0).\n *\n * @param element - The element to check.\n * @returns True if the element has zero dimensions.\n */\n private hasZeroDimensions(element: HTMLElement) {\n const { width, height } = element.getBoundingClientRect();\n const { offsetWidth, offsetHeight } = element;\n\n return offsetWidth + offsetHeight + height + width === 0;\n }\n\n /**\n * Determines if the element is not visible in the DOM.\n *\n * @param element - The element to check.\n * @returns True if the element is not visible.\n */\n private isNotVisible(element: HTMLElement) {\n return this.hasZeroDimensions(element) || this.hasNoClientRects(element);\n }\n\n /**\n * Checks if the element has inline styles that make it hidden.\n *\n * @param element - The element to check.\n * @returns True if the element has inline styles that make it hidden.\n */\n private hasHiddenStyle(element: HTMLElement) {\n const { display, opacity, visibility } = element.style;\n return display === 'none' || opacity === '0' || visibility === 'hidden' || visibility === 'collapse';\n }\n\n /**\n * Checks if the element is hidden by a computed style.\n *\n * @param element - The element to check.\n * @returns True if the element is hidden by a computed style.\n */\n private hasComputedHidden(element: HTMLElement) {\n const computedStyle = getComputedStyle(element);\n return computedStyle.visibility === 'hidden' || computedStyle.height === '0' || computedStyle.display === 'none';\n }\n\n /**\n * Checks if the element is hidden from the user.\n *\n * @param element - The element to check.\n * @returns True if the element is hidden.\n */\n private isHidden(element: HTMLElement) {\n return (\n element.hasAttribute('hidden')\n || element.getAttribute('aria-hidden') === 'true'\n || this.hasHiddenStyle(element)\n || this.isNotVisible(element)\n || this.hasComputedHidden(element)\n );\n }\n\n /**\n * Checks if the element is not tabbable.\n *\n * @param element - The element to check.\n * @returns True if the element is not tabbable.\n */\n private isNotTabbable(element: HTMLElement) {\n return element.getAttribute('tabindex') === '-1';\n }\n\n /**\n * Checks if the element is interactive.\n *\n * @param element - The element to check.\n * @returns True if the element is interactive.\n */\n private isInteractiveElement(element: HTMLElement): boolean {\n const interactiveTags = new Set(['BUTTON', 'DETAILS', 'EMBED', 'IFRAME', 'SELECT', 'TEXTAREA']);\n\n if (interactiveTags.has(element.tagName)) {\n return true;\n }\n if (element instanceof HTMLAnchorElement && element.hasAttribute('href')) {\n return true;\n }\n if (element instanceof HTMLInputElement && element.type !== 'hidden') {\n return true;\n }\n if (\n (element instanceof HTMLAudioElement || element instanceof HTMLVideoElement)\n && element.hasAttribute('controls')\n ) {\n return true;\n }\n if (\n (element instanceof HTMLImageElement || element instanceof HTMLObjectElement)\n && element.hasAttribute('usemap')\n ) {\n return true;\n }\n if (element.hasAttribute('tabindex') && element.tabIndex > -1) {\n return true;\n }\n\n return false;\n }\n\n /**\n * Checks if the element is focusable.\n *\n * @param element - The element to check.\n * @returns True if the element is focusable.\n */\n private isFocusable(element: HTMLElement) {\n if (this.isHidden(element) || this.isNotTabbable(element)) {\n return false;\n }\n return this.isInteractiveElement(element);\n }\n\n /**\n * Recursively finds all focusable elements within the given root and its descendants.\n *\n * @param root - The root element to search for focusable elements.\n * @param matches - The set of focusable elements.\n * @returns The list of focusable elements.\n */\n private findFocusable(root: ShadowRoot | HTMLElement, matches: Set<HTMLElement> = new Set()): HTMLElement[] {\n if (root instanceof HTMLElement && this.isFocusable(root)) {\n matches.add(root);\n }\n const children = Array.from(root.children) as HTMLElement[];\n\n children.forEach((child: Node) => {\n const element = child as HTMLElement;\n\n if (this.isFocusable(element)) {\n matches.add(element);\n }\n\n if (element.shadowRoot) {\n this.findFocusable(element.shadowRoot, matches);\n } else if (element.tagName === 'SLOT') {\n const assignedNodes = (element as HTMLSlotElement).assignedElements({ flatten: true });\n assignedNodes.forEach((node) => {\n if (node instanceof HTMLElement) {\n this.findFocusable(node, matches);\n }\n });\n } else {\n this.findFocusable(element, matches);\n }\n });\n\n return [...matches];\n }\n\n /**\n * Updates the list of focusable elements within the component's shadow root.\n */\n public setFocusableElements() {\n if (!this.shadowRoot) return;\n\n this.focusableElements = this.findFocusable(this.shadowRoot, new Set());\n }\n\n /**\n * Sets the initial focus within the container.\n *\n * @param prefferableElement - The index of the prefferable element to focus.\n */\n public setInitialFocus(prefferableElement: number = 0) {\n if (this.focusableElements.length === 0) return;\n\n if (this.enabledPreventScroll) {\n document.body.style.overflow = 'hidden';\n }\n\n if (this.focusableElements[prefferableElement]) {\n this.focusTrapIndex = prefferableElement;\n this.focusableElements[prefferableElement].focus();\n }\n }\n\n /**\n * Calculates the next index for the focus trap.\n *\n * @param currentIndex - The current index.\n * @param step - The step to calculate the next index.\n * @returns The next index.\n */\n private calculateNextIndex(currentIndex: number, step: number) {\n const { length } = this.focusableElements;\n const wrapFocus = this.shouldWrapFocus();\n\n if (currentIndex === -1) {\n return step > 0 ? 0 : length - 1;\n }\n\n let nextIndex = currentIndex + step;\n\n if (wrapFocus) {\n if (nextIndex < 0) nextIndex = length - 1;\n if (nextIndex >= length) nextIndex = 0;\n } else {\n if (nextIndex < 0) nextIndex = 0;\n if (nextIndex >= length) nextIndex = length - 1;\n }\n\n return nextIndex;\n }\n\n /**\n * Returns the deepest active element in the shadow DOM.\n *\n * @returns The deepest active element.\n */\n private getDeepActiveElement() {\n let host: Element | null = document.activeElement || document.body;\n while (host instanceof HTMLElement && host.shadowRoot?.activeElement) {\n host = host.shadowRoot.activeElement;\n }\n\n return (host as HTMLElement) || document.body;\n }\n\n /**\n * Finds the index of the active element within the focusable elements.\n *\n * @param activeElement - The active element.\n * @returns The index of the active element.\n */\n private findElement(activeElement: HTMLElement) {\n return this.focusableElements.findIndex((element) => this.isEqualFocusNode(activeElement, element));\n }\n\n /**\n * Checks if the active element is equal to the given element.\n *\n * @param activeElement - The active element.\n * @param element - The element to compare.\n * @returns True if the active element is equal to the given element.\n */\n private isEqualFocusNode(activeElement: HTMLElement, element: HTMLElement) {\n if (activeElement.nodeType >= 0) {\n return element.isEqualNode(activeElement) && element === activeElement;\n }\n return false;\n }\n\n /**\n * Traps focus within the container.\n *\n * @param direction - The direction of the focus trap.\n * If true, the focus will be trapped in the previous element.\n */\n private trapFocus(direction: boolean) {\n if (this.focusableElements.length === 0) return;\n\n const activeElement = this.getDeepActiveElement!() as HTMLElement;\n const activeIndex = this.findElement(activeElement);\n\n if (direction) {\n this.focusTrapIndex = this.calculateNextIndex(activeIndex, -1);\n } else {\n this.focusTrapIndex = this.calculateNextIndex(activeIndex, 1);\n }\n\n const nextElement = this.focusableElements[this.focusTrapIndex];\n if (nextElement) {\n nextElement.focus();\n }\n }\n\n /**\n * Traps focus within the container.\n *\n * @param event - The keyboard event.\n */\n private handleKeydown(event: KeyboardEvent) {\n if (!this.enabledFocusTrap || !this.focusableElements.length) {\n return;\n }\n\n if (event.key === 'Tab') {\n event.preventDefault();\n this.trapFocus(event.shiftKey);\n }\n }\n }\n\n return FocusTrap as Constructor<HTMLElement & FocusTrapClassInterface> & T;\n};\n", "import type Popover from './popover.component';\n\n/**\n * Manages a stack of popovers to control their order and lifecycle.\n * This class allows adding, removing, and retrieving popovers\n * while maintaining their stacking behavior.\n *\n */\nclass PopoverStack {\n /**\n * Stack to maintain the order of popovers\n * @internal\n */\n private stack: Popover[] = [];\n\n /**\n * Adds a popover to the stack\n *\n * @param popover - Popover instance\n */\n push(popover: Popover) {\n this.stack.push(popover);\n }\n\n /**\n * Removes the last popover from the stack\n *\n * @returns The last popover in the stack\n */\n pop(): Popover | undefined {\n return this.stack.pop();\n }\n\n /**\n * Returns the last popover in the stack\n * without removing it\n *\n * @returns The last popover in the stack\n */\n peek(): Popover | undefined {\n return this.stack[this.stack.length - 1];\n }\n\n /**\n * Removes a popover from the stack\n *\n * @param popover - Popover instance\n */\n remove(popover: Popover) {\n this.stack = this.stack.filter((item) => item !== popover);\n }\n\n /**\n * Clears the stack\n */\n clear() {\n this.stack = [];\n }\n}\n\nexport const popoverStack = new PopoverStack();\n", "import { LitElement } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport type { Constructor } from './index.types';\n\nexport interface DataAriaDescribedbyMixinInterface {\n dataAriaDescribedby: string | null;\n}\n\nexport const DataAriaDescribedbyMixin = <T extends Constructor<LitElement>>(\n superClass: T,\n) => {\n class InnerMixinClass extends superClass {\n /**\n * Defines an ID reference to one or more elements that provide additional\n * descriptive information for the current element.\n * The `aria-describedby` attribute to be set for accessibility.\n * @default null\n */\n @property({ type: String, reflect: true, attribute: 'data-aria-describedby' })\n dataAriaDescribedby: string | null = null;\n }\n // Cast return type to your mixin's interface intersected with the superClass type\n return InnerMixinClass as Constructor<DataAriaDescribedbyMixinInterface> & T;\n};\n", "import { LitElement } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport type { Constructor } from './index.types';\n\nexport interface DataAriaLabelledbyMixinInterface {\n dataAriaLabelledby: string | null;\n}\n\nexport const DataAriaLabelledbyMixin = <T extends Constructor<LitElement>>(\n superClass: T,\n) => {\n class InnerMixinClass extends superClass {\n /**\n * Defines an ID reference to one or more elements that label the current element.\n * The `aria-labelledby` attribute to be set for accessibility.\n * @default null\n */\n @property({ type: String, reflect: true, attribute: 'data-aria-labelledby' })\n dataAriaLabelledby: string | null = null;\n }\n // Cast return type to your mixin's interface intersected with the superClass type\n return InnerMixinClass as Constructor<DataAriaLabelledbyMixinInterface> & T;\n};\n", "import type Popover from './popover.component';\n\nexport class PopoverEventManager {\n /**\n * Dispatches a custom event for the popover.\n *\n * @param eventName - The name of the event.\n * @param instance - The popover instance.\n */\n static dispatchPopoverEvent(eventName: string, instance: Popover) {\n instance.dispatchEvent(\n new CustomEvent(eventName, {\n detail: { show: instance.visible },\n composed: true,\n bubbles: true,\n }),\n );\n }\n\n /**\n * Custom event that is fired when the popover is shown.\n *\n * @param instance - The popover instance.\n */\n static onShowPopover(instance: Popover) {\n this.dispatchPopoverEvent('popover-on-show', instance);\n }\n\n /**\n * Custom event that is fired when the popover is hidden.\n *\n * @param instance - The popover instance.\n */\n static onHidePopover(instance: Popover) {\n this.dispatchPopoverEvent('popover-on-hide', instance);\n }\n\n /**\n * Custom event that is fired when the popover is created.\n *\n * @param instance - The popover instance.\n */\n static onCreatedPopover(instance: Popover) {\n this.dispatchPopoverEvent('popover-on-created', instance);\n }\n\n /**\n * Custom event that is fired when the popover is destroyed.\n *\n * @param instance - The popover instance.\n */\n static onDestroyedPopover(instance: Popover) {\n this.dispatchPopoverEvent('popover-on-destroyed', instance);\n }\n}\n", "import type Popover from './popover.component';\n\nexport class PopoverUtils {\n /** @internal */\n private popover: Popover;\n\n /** @internal */\n private arrowPixelChange: boolean = false;\n\n constructor(popover: Popover) {\n this.popover = popover;\n }\n\n /**\n * Parses the delay string and sets the open and close delay values.\n * If the delay string is invalid, the delay is set to 0.\n * @returns An array containing the open and close delay values.\n * @throws An error if the delay value is invalid.\n */\n setupDelay() {\n try {\n const [openDelay, closeDelay] = this.popover.delay.split(',').map((delay) => {\n const parsed = parseInt(delay, 10);\n if (Number.isNaN(parsed) || parsed < 0) {\n throw new Error(`Invalid delay value: ${delay}`);\n }\n return parsed;\n });\n\n return [openDelay, closeDelay];\n } catch (error) {\n this.popover.delay = '0,0';\n return [0, 0];\n }\n }\n\n /**\n * Sets up the hover bridge for the popover.\n * The hover bridge is used to prevent the popover from closing when the mouse is over the popover.\n *\n * @param placement - The placement of the popover.\n */\n setupHoverBridge(placement: string) {\n const hoverBridge = this.popover.renderRoot.querySelector('.popover-hover-bridge') as HTMLElement;\n Object.assign(hoverBridge.style, {\n top: '',\n left: '',\n right: '',\n bottom: '',\n });\n const bridgeSize = `calc(${this.popover.showArrow ? '0.75rem + ' : ''}${this.popover.offset}px)`;\n const modalContainer = this.popover.shadowRoot?.querySelector('mdc-modalcontainer') as HTMLElement;\n const popoverHeight = modalContainer.offsetHeight || 0;\n const popoverWidth = modalContainer.offsetWidth || 0;\n\n if (hoverBridge) {\n const side = placement.split('-')[0];\n switch (side) {\n case 'top':\n hoverBridge.style.height = bridgeSize;\n hoverBridge.style.bottom = `calc(-1 * (${bridgeSize}))`;\n hoverBridge.style.left = '50%';\n hoverBridge.style.width = `${popoverWidth}px`;\n break;\n case 'left':\n hoverBridge.style.height = `${popoverHeight}px`;\n hoverBridge.style.width = bridgeSize;\n hoverBridge.style.right = `calc(-1.5 * (${bridgeSize}))`;\n break;\n case 'right':\n hoverBridge.style.height = `${popoverHeight}px`;\n hoverBridge.style.width = bridgeSize;\n hoverBridge.style.left = `calc(-0.5 * (${bridgeSize}))`;\n break;\n case 'bottom':\n default:\n hoverBridge.style.height = bridgeSize;\n hoverBridge.style.top = `calc(-1 * (${bridgeSize}))`;\n hoverBridge.style.left = '50%';\n hoverBridge.style.width = `${popoverWidth}px`;\n break;\n }\n }\n }\n\n /**\n * If the `appendTo` property is set, finds the corresponding\n * DOM element by its ID, and appends this popover as a child of that element.\n */\n setupAppendTo() {\n if (this.popover.appendTo) {\n const appendToElement = document.getElementById(this.popover.appendTo);\n if (appendToElement) {\n appendToElement.appendChild(this.popover);\n }\n }\n }\n\n /**\n * Sets up the accessibility attributes for the popover.\n */\n setupAccessibility() {\n if (this.popover.interactive) {\n if (!this.popover.dataAriaLabel) {\n this.popover.dataAriaLabel = this.popover.triggerElement?.ariaLabel\n || this.popover.triggerElement?.textContent\n || '';\n }\n if (!this.popover.dataAriaLabelledby) {\n this.popover.dataAriaLabelledby = this.popover.triggerElement?.id || '';\n }\n }\n }\n\n /**\n * Updates the arrow style based on the arrow data and placement.\n *\n * @param arrowData - The arrow data x and y.\n * @param placement - The placement of the popover.\n */\n updateArrowStyle(arrowData: { x?: number; y?: number }, placement: string): void {\n if (!this.popover.arrowElement) return;\n\n const side = placement.split('-')[0];\n const staticSide = {\n top: 'bottom',\n right: 'left',\n bottom: 'top',\n left: 'right',\n }[side] as 'top' | 'bottom' | 'left' | 'right';\n\n const { x: arrowX, y: arrowY } = arrowData;\n const rect = this.popover.arrowElement.getBoundingClientRect();\n const parent = this.popover.arrowElement.offsetParent?.getBoundingClientRect();\n\n if (!this.arrowPixelChange) {\n const pixelDiff = parent?.[staticSide] ? 12 - Math.abs(rect[staticSide] - parent[staticSide]) : 0;\n if (Math.round(pixelDiff) === 1) {\n this.arrowPixelChange = true;\n } else {\n this.arrowPixelChange = false;\n }\n }\n\n const arrowPixelDiff = this.arrowPixelChange ? 0.5 : 0;\n this.popover.arrowElement.setAttribute('data-side', side);\n\n Object.assign(this.popover.arrowElement.style, {\n left: arrowX != null ? `${arrowX}px` : '',\n top: arrowY != null ? `${arrowY}px` : '',\n [staticSide]: `${-this.popover.arrowElement.offsetHeight / 2 - arrowPixelDiff}px`,\n });\n }\n\n /**\n * Updates the popover style based on the x and y position.\n *\n * @param x - The x position.\n * @param y - The y position.\n */\n updatePopoverStyle(x: number, y: number): void {\n if (!this.popover.containerElement) return;\n\n Object.assign(this.popover.containerElement.style, {\n left: `${x}px`,\n top: `${y}px`,\n });\n }\n}\n", "import { CSSResult, html, nothing, PropertyValues } from 'lit';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport { property } from 'lit/decorators.js';\nimport { computePosition, autoUpdate, offset, flip, shift, arrow, size } from '@floating-ui/dom';\nimport styles from './popover.styles';\nimport { Component } from '../../models';\nimport { FocusTrapMixin } from '../../utils/mixins/FocusTrapMixin';\nimport { popoverStack } from './popover.stack';\nimport type { PopoverPlacement, PopoverTrigger } from './popover.types';\nimport type { ModalContainerColor } from '../modalcontainer/modalcontainer.types';\nimport { COLOR } from '../modalcontainer/modalcontainer.constants';\nimport { DEFAULTS, POPOVER_PLACEMENT, TRIGGER } from './popover.constants';\nimport { ValueOf } from '../../utils/types';\nimport { DataAriaLabelMixin } from '../../utils/mixins/DataAriaLabelMixin';\nimport { DataAriaDescribedbyMixin } from '../../utils/mixins/DataAriaDescribedbyMixin';\nimport { DataAriaLabelledbyMixin } from '../../utils/mixins/DataAriaLabelledbyMixin';\nimport { PopoverEventManager } from './popover.events';\nimport { PopoverUtils } from './popover.utils';\n\n/**\n * Popover component is a lightweight floating UI element that displays additional content when triggered.\n * It can be used for tooltips, dropdowns, or contextual menus.\n * The popover automatically positions itself based on available space and\n * supports dynamic height adjustments with scrollable content when needed\u3002\n *\n * @dependency mdc-button\n * @dependency mdc-modalcontainer\n *\n * @tagname mdc-popover\n *\n * @cssproperty --mdc-popover-arrow-border-radius - radius of the arrow border\n * @cssproperty --mdc-popover-arrow-border - border of the arrow\n * @cssproperty --mdc-popover-primary-background-color - primary background color of the popover\n * @cssproperty --mdc-popover-inverted-background-color - inverted background color of the popover\n * @cssproperty --mdc-popover-inverted-border-color - inverted border color of the popover\n * @cssproperty --mdc-popover-inverted-text-color - inverted text color of the popover\n *\n * @slot - Default slot for modal container\n *\n */\nclass Popover extends DataAriaLabelMixin(DataAriaLabelledbyMixin(DataAriaDescribedbyMixin(FocusTrapMixin(Component)))) {\n /**\n * The unique ID of the popover.\n */\n @property({ type: String })\n override id: string = '';\n\n /**\n * The ID of the element that triggers the popover.\n * This attribute is required for the popover to work.\n */\n @property({ type: String })\n triggerID: string = '';\n\n /**\n * Determines the events that cause the Popover to show.\n * Multiple event names should be separated by spaces.\n * For example to allow both click and hover, use 'click mouseenter' as the trigger.\n * - **click**\n * - **mouseenter**\n * - **focusin**\n * - **manual**\n * @default click\n */\n @property({ type: String, reflect: true })\n trigger: PopoverTrigger = DEFAULTS.TRIGGER;\n\n /**\n * The placement of the popover.\n * - **top**\n * - **top-start**\n * - **top-end**\n * - **bottom**\n * - **bottom-start**\n * - **bottom-end**\n * - **left**\n * - **left-start**\n * - **left-end**\n * - **right**\n * - **right-start**\n * - **right-end**\n * @default bottom\n */\n @property({ type: String, reflect: true })\n placement: PopoverPlacement = DEFAULTS.PLACEMENT;\n\n /**\n * Color of the popover\n * - **tonal**\n * - **contrast**\n * @default tonal\n */\n @property({ type: String, reflect: true })\n color: ModalContainerColor = DEFAULTS.COLOR;\n\n /**\n * The visibility of the popover.\n * @default false\n */\n @property({ type: Boolean, reflect: true })\n visible: boolean = DEFAULTS.VISIBLE;\n\n /**\n * The offset of the popover.\n * @default 4\n */\n @property({ type: Number, reflect: true })\n offset: number = DEFAULTS.OFFSET;\n\n /**\n * Determines whether the focus trap is enabled.\n * If true, focus will be restricted to the content within this component.\n * @default false\n */\n @property({ type: Boolean, reflect: true, attribute: 'focus-trap' })\n focusTrap: boolean = DEFAULTS.FOCUS_TRAP;\n\n /**\n * Prevent outside scrolling when popover show.\n * @default false\n */\n @property({ type: Boolean, reflect: true, attribute: 'prevent-scroll' })\n preventScroll: boolean = DEFAULTS.PREVENT_SCROLL;\n\n /**\n * The arrow visibility of the popover.\n * @default false\n */\n @property({ type: Boolean, attribute: 'show-arrow' })\n showArrow: boolean = DEFAULTS.ARROW;\n\n /**\n * The close button visibility of the popover.\n * @default false\n */\n @property({ type: Boolean, reflect: true, attribute: 'close-button' })\n closeButton: boolean = DEFAULTS.CLOSE_BUTTON;\n\n /**\n * Determines whether the popover is interactive\u3002\n * @default false\n */\n @property({ type: Boolean, reflect: true })\n interactive: boolean = DEFAULTS.INTERACTIVE;\n\n /**\n * The delay of the show/hide popover.\n * @default 0,0\n */\n @property({ type: String, reflect: true })\n delay: string = DEFAULTS.DELAY;\n\n /**\n * Hide popover on escape key press.\n * @default false\n */\n @property({ type: Boolean, reflect: true, attribute: 'hide-on-escape' })\n hideOnEscape: boolean = DEFAULTS.HIDE_ON_ESCAPE;\n\n /**\n * Hide popover on blur.\n * @default false\n */\n @property({ type: Boolean, reflect: true, attribute: 'hide-on-blur' })\n hideOnBlur: boolean = DEFAULTS.HIDE_ON_BLUR;\n\n /**\n * Hide on outside click of the popover.\n * @default false\n */\n @property({ type: Boolean, reflect: true, attribute: 'hide-on-outside-click' })\n hideOnOutsideClick: boolean = DEFAULTS.HIDE_ON_CLICK_OUTSIDE;\n\n /**\n * The focus back to trigger after the popover hide.\n * @default false\n */\n @property({ type: Boolean, reflect: true, attribute: 'focus-back-to-trigger' })\n focusBackToTrigger: boolean = DEFAULTS.FOCUS_BACK;\n\n /**\n * Determines whether the popover with backdrop.\n * Other than popover and trigger element, the rest of the screen will be covered with a backdrop.\n * @default false\n */\n @property({ type: Boolean, reflect: true })\n backdrop: boolean = DEFAULTS.BACKDROP;\n\n /**\n * Changes the placement of popover to keep it in view when scrolling.\n * @default true\n */\n @property({ type: Boolean, reflect: true })\n flip: boolean = DEFAULTS.FLIP;\n\n /**\n * Changes the size of popover to keep it in view when scrolling.\n * @default false\n */\n @property({ type: Boolean, reflect: true })\n size: boolean = DEFAULTS.SIZE;\n\n /**\n * The z-index of the popover.\n * @default 1000\n */\n @property({ type: Number, reflect: true, attribute: 'z-index' })\n zIndex: number = DEFAULTS.Z_INDEX;\n\n /**\n * Element ID that the popover append to.\n * @default ''\n */\n @property({ type: String, reflect: true, attribute: 'append-to' })\n appendTo: string = '';\n\n /**\n * aria-label attribute to be set for close button accessibility.\n * @default null\n */\n @property({ type: String, attribute: 'close-button-aria-label' })\n closeButtonAriaLabel: string | null = null;\n\n /**\n * Role of the popover\n * @default dialog\n */\n @property({ type: String, reflect: true, attribute: 'data-role' })\n dataRole: HTMLElement['role'] = DEFAULTS.ROLE;\n\n public arrowElement: HTMLElement | null = null;\n\n /** @internal */\n public triggerElement: HTMLElement | null = null;\n\n /** @internal */\n public containerElement: HTMLElement | null = null;\n\n /** @internal */\n private hoverTimer: number | null = null;\n\n /** @internal */\n private isTriggerClicked: boolean = false;\n\n /** @internal */\n private openDelay: number = 0;\n\n /** @internal */\n private closeDelay: number = 0;\n\n /** @internal */\n private utils: PopoverUtils;\n\n constructor() {\n super();\n this.utils = new PopoverUtils(this);\n }\n\n protected override async firstUpdated(changedProperties: PropertyValues) {\n super.firstUpdated(changedProperties);\n this.containerElement = this.renderRoot.querySelector('.popover-container');\n this.utils.setupAppendTo();\n [this.openDelay, this.closeDelay] = this.utils.setupDelay();\n this.setupTriggerListener();\n this.utils.setupAccessibility();\n PopoverEventManager.onCreatedPopover(this);\n\n if (this.visible) {\n await this.positionPopover();\n await this.handleCreatePopoverFirstUpdate();\n }\n }\n\n override async disconnectedCallback() {\n super.disconnectedCallback();\n await this.removeEventListeners();\n PopoverEventManager.onDestroyedPopover(this);\n popoverStack.remove(this);\n }\n\n /**\n * Sets up the trigger event listeners based on the trigger type.\n */\n private setupTriggerListener() {\n if (!this.triggerID) return;\n\n this.triggerElement = document.getElementById(this.triggerID);\n if (!this.triggerElement) return;\n\n if (this.trigger === 'mouseenter') {\n if (this.interactive) {\n // if the popover is interactive, there is interactive content inside the popover\n // so we can't use the focusin trigger, since after closing with escape key, the\n // popover keeps opening. So we need to use the click trigger instead.\n this.trigger = 'mouseenter click';\n } else {\n // non-interactive popovers with trigger mouseenter (like a tooltip) should also open\n // when focusing to the trigger element\n this.trigger = 'mouseenter focusin';\n }\n }\n\n if (this.trigger.includes('click')) {\n this.triggerElement.addEventListener('click', this.togglePopoverVisible);\n }\n if (this.trigger.includes('mouseenter')) {\n const hoverBridge = this.renderRoot.querySelector('.popover-hover-bridge');\n this.triggerElement.addEventListener('mouseenter', this.showPopover);\n this.triggerElement.addEventListener('mouseleave', this.startCloseDelay);\n this.containerElement?.addEventListener('mouseenter', this.cancelCloseDelay);\n this.containerElement?.addEventListener('mouseleave', this.startCloseDelay);\n hoverBridge?.addEventListener('mouseenter', this.cancelCloseDelay);\n }\n if (this.trigger.includes('focusin')) {\n this.triggerElement.addEventListener('focusin', this.showPopover);\n if (!this.interactive) {\n this.triggerElement.addEventListener('focusout', this.hidePopover);\n }\n }\n this.addEventListener('focus-trap-exit', this.hidePopover);\n }\n\n /**\n * Removes the trigger event listeners.\n */\n private removeEventListeners() {\n if (!this.triggerElement) return;\n const hoverBridge = this.renderRoot.querySelector('.popover-hover-bridge');\n this.triggerElement.removeEventListener('click', this.togglePopoverVisible);\n this.triggerElement.removeEventListener('mouseenter', this.showPopover);\n this.triggerElement.removeEventListener('mouseleave', this.hidePopover);\n this.containerElement?.removeEventListener('mouseenter', this.cancelCloseDelay);\n this.containerElement?.removeEventListener('mouseleave', this.startCloseDelay);\n this.triggerElement.removeEventListener('focusin', this.showPopover);\n this.triggerElement.removeEventListener('focusout', this.hidePopover);\n hoverBridge?.removeEventListener('mouseenter', this.cancelCloseDelay);\n\n this.removeEventListener('focus-trap-exit', this.hidePopover);\n }\n\n protected override async updated(changedProperties: PropertyValues) {\n super.updated(changedProperties);\n\n if (changedProperties.has('visible')) {\n const oldValue = changedProperties.get('visible') as boolean;\n await this.isOpenUpdated(oldValue, this.visible);\n }\n if (changedProperties.has('placement')) {\n this.setAttribute(\n 'placement',\n Object.values(POPOVER_PLACEMENT).includes(this.placement) ? this.placement : DEFAULTS.PLACEMENT,\n );\n }\n if (changedProperties.has('delay')) {\n [this.openDelay, this.closeDelay] = this.utils.setupDelay();\n }\n if (changedProperties.has('trigger')) {\n const triggers = this.trigger.split(' ');\n const validTriggers = triggers.filter((trigger) =>\n Object.values(TRIGGER).includes(trigger as ValueOf<typeof TRIGGER>));\n\n this.setAttribute('trigger', validTriggers.length > 0 ? this.trigger : DEFAULTS.TRIGGER);\n this.removeEventListeners();\n this.setupTriggerListener();\n }\n if (changedProperties.has('color')) {\n this.setAttribute('color', Object.values(COLOR).includes(this.color) ? this.color : DEFAULTS.COLOR);\n }\n if (changedProperties.has('zIndex')) {\n this.setAttribute('z-index', `${this.zIndex}`);\n }\n if (changedProperties.has('append-to')) {\n this.utils.setupAppendTo();\n }\n if (\n changedProperties.has('interactive')\n || changedProperties.has('data-aria-label')\n || changedProperties.has('data-aria-labelledby')\n ) {\n this.utils.setupAccessibility();\n }\n }\n\n /**\n * Handles the outside click event to close the popover.\n *\n * @param event - The mouse event.\n */\n private onOutsidePopoverClick = (event: MouseEvent) => {\n if (popoverStack.peek() !== this) return;\n\n let insidePopoverClick = false;\n const path = event.composedPath();\n insidePopoverClick = this.contains(event.target as Node) || path.includes(this.triggerElement!);\n const backdropElement = this.renderRoot.querySelector('.popover-backdrop');\n const clickedOnBackdrop = backdropElement ? path.includes(backdropElement) : false;\n\n if (!insidePopoverClick || clickedOnBackdrop) {\n this.hidePopover();\n }\n };\n\n /**\n * Handles the escape keydown event to close the popover.\n *\n * @param event - The keyboard event.\n */\n private onEscapeKeydown = (event: KeyboardEvent) => {\n if (!this.visible || event.code !== 'Escape') {\n return;\n }\n\n event.preventDefault();\n this.hidePopover();\n };\n\n /**\n * Handles the popover focus out event.\n *\n * @param event - The focus event.\n */\n private onPopoverFocusOut = (event: FocusEvent) => {\n if (!this.contains(event.relatedTarget as Node)) {\n this.hidePopover();\n }\n };\n\n /**\n * Handles the popover visibility change and position the popover.\n * Handles the exit event to close the popover.\n *\n * @param oldValue - The old value of the visible property.\n * @param newValue - The new value of the visible property.\n */\n private async isOpenUpdated(oldValue: boolean, newValue: boolean) {\n if (oldValue === newValue || !this.triggerElement) {\n return;\n }\n\n if (newValue) {\n this.enabledFocusTrap = this.focusTrap;\n this.enabledPreventScroll = this.preventScroll;\n\n if (this.backdrop) {\n const popoverBackdrop = this.renderRoot.querySelector('.popover-backdrop') as HTMLElement;\n popoverBackdrop.style.zIndex = `${this.zIndex - 1}`;\n this.triggerElement.style.zIndex = `${this.zIndex}`;\n }\n\n this.positionPopover();\n await this.handleCreatePopoverFirstUpdate();\n\n if (this.hideOnBlur) {\n this.containerElement?.addEventListener('focusout', this.onPopoverFocusOut);\n if (this.trigger === 'click') {\n this.triggerElement.style.pointerEvents = 'none';\n }\n }\n if (this.hideOnOutsideClick) {\n document.addEventListener('click', this.onOutsidePopoverClick);\n }\n if (this.hideOnEscape) {\n document.addEventListener('keydown', this.onEscapeKeydown);\n }\n\n this.triggerElement.setAttribute('aria-expanded', 'true');\n if (this.interactive) {\n this.triggerElement.setAttribute(\n 'aria-haspopup',\n this.triggerElement.getAttribute('aria-haspopup') || 'dialog',\n );\n }\n } else {\n if (this.hideOnBlur) {\n this.containerElement?.removeEventListener('focusout', this.onPopoverFocusOut);\n if (this.trigger === 'click') {\n this.triggerElement.style.pointerEvents = '';\n }\n }\n if (this.hideOnOutsideClick) {\n document.removeEventListener('click', this.onOutsidePopoverClick);\n }\n if (this.hideOnEscape) {\n document.removeEventListener('keydown', this.onEscapeKeydown);\n }\n\n this.deactivateFocusTrap?.();\n this.triggerElement.removeAttribute('aria-expanded');\n if (this.interactive) {\n this.triggerElement.removeAttribute('aria-haspopup');\n }\n if (this.focusBackToTrigger) {\n this.triggerElement?.focus();\n }\n }\n }\n\n /**\n * Starts the close delay timer.\n * If the popover is not interactive, it will close the popover after the delay.\n */\n private startCloseDelay = () => {\n if (!this.interactive) {\n this.hidePopover();\n } else {\n if (this.isTriggerClicked) return;\n this.hoverTimer = window.setTimeout(() => {\n this.visible = false;\n }, this.closeDelay);\n }\n };\n\n /**\n * Cancels the close delay timer.\n */\n private cancelCloseDelay = () => {\n if (this.hoverTimer) {\n clearTimeout(this.hoverTimer);\n this.hoverTimer = null;\n }\n };\n\n /**\n * Shows the popover.\n */\n public showPopover = () => {\n this.cancelCloseDelay();\n setTimeout(() => {\n this.visible = true;\n PopoverEventManager.onShowPopover(this);\n }, this.openDelay);\n if (popoverStack.peek() !== this) {\n popoverStack.push(this);\n }\n };\n\n /**\n * Hides the popover.\n */\n public hidePopover = () => {\n if (popoverStack.peek() === this) {\n setTimeout(() => {\n this.visible = false;\n PopoverEventManager.onHidePopover(this);\n this.isTriggerClicked = false;\n }, this.closeDelay);\n popoverStack.pop();\n }\n };\n\n /**\n * Toggles the popover visibility.\n */\n public togglePopoverVisible = () => {\n if (this.isTriggerClicked) {\n this.hidePopover();\n } else {\n this.showPopover();\n this.isTriggerClicked = true;\n }\n };\n\n /**\n * Sets the focusable elements inside the popover.\n */\n private async handleCreatePopoverFirstUpdate() {\n if (this.visible && this.interactive) {\n this.setFocusableElements?.();\n await this.updateComplete;\n this.setInitialFocus?.();\n }\n }\n\n /**\n * Positions the popover based on the trigger element.\n * It also handles the flip, size and arrow placement.\n * It uses the floating-ui/dom library to calculate the position.\n */\n private positionPopover() {\n if (!this.triggerElement || !this.containerElement) return;\n\n const middleware = [shift()];\n let popoverOffset = this.offset;\n\n if (this.flip) {\n middleware.push(flip());\n }\n\n if (this.size) {\n const popoverContent = this.containerElement.querySelector('[part=\"popover-content\"]') as HTMLElement;\n middleware.push(\n size({\n apply({ availableHeight }) {\n if (!popoverContent) return;\n Object.assign(popoverContent.style, {\n maxHeight: `${availableHeight}px`,\n });\n },\n padding: 50,\n }),\n );\n }\n\n if (this.showArrow) {\n this.arrowElement = this.renderRoot.querySelector('.popover-arrow');\n if (this.arrowElement) {\n const arrowLen = this.arrowElement.offsetHeight;\n const arrowOffset = Math.sqrt(2 * arrowLen ** 2) / 2;\n popoverOffset = arrowOffset + this.offset;\n middleware.push(arrow({ element: this.arrowElement, padding: 12 }));\n }\n }\n\n middleware.push(offset(popoverOffset));\n\n autoUpdate(this.triggerElement, this.containerElement, async () => {\n if (!this.triggerElement || !this.containerElement) return;\n\n const { x, y, middlewareData, placement } = await computePosition(this.triggerElement, this.containerElement, {\n placement: this.placement,\n middleware,\n });\n\n this.utils.updatePopoverStyle(x, y);\n if (middlewareData.arrow && this.arrowElement) {\n this.utils.updateArrowStyle(middlewareData.arrow, placement);\n }\n if (this.trigger.includes('mouseenter')) {\n this.utils.setupHoverBridge(placement);\n }\n });\n }\n\n public override render() {\n return html`\n ${this.backdrop && this.visible ? html`<div class=\"popover-backdrop\"></div>` : nothing}\n <mdc-modalcontainer\n class=\"popover-container\"\n elevation=\"3\"\n color=${this.color}\n ?data-aria-modal=${this.interactive}\n data-role=\"${ifDefined(this.dataRole)}\"\n data-aria-label=\"${ifDefined(this.interactive ? this.dataAriaLabel : undefined)}\"\n data-aria-labelledby=\"${ifDefined(this.interactive ? this.dataAriaLabelledby : undefined)}\"\n data-aria-describedby=\"${ifDefined(this.interactive ? this.dataAriaDescribedby : undefined)}\"\n style=\"z-index: ${this.zIndex};\"\n >\n <div class=\"popover-hover-bridge\"></div>\n ${this.closeButton\n ? html` <mdc-button\n class=\"popover-close\"\n prefix-icon=\"cancel-bold\"\n variant=\"tertiary\"\n size=\"20\"\n aria-label=${ifDefined(this.closeButtonAriaLabel)}\n @click=\"${this.hidePopover}\"\n ></mdc-button>`\n : nothing}\n ${this.showArrow ? html`<div class=\"popover-arrow\"></div>` : nothing}\n <div part=\"popover-content\">\n <slot></slot>\n </div>\n </mdc-modalcontainer>\n `;\n }\n\n public static override styles: Array<CSSResult> = [...Component.styles, ...styles];\n}\n\nexport default Popover;\n", "import { css } from 'lit';\nimport { hostFitContentStyles } from '../../utils/styles';\n\nconst styles = [\n hostFitContentStyles,\n css`\n :host {\n --mdc-modalcontainer-primary-background-color: var(--mds-color-theme-background-solid-primary-normal);\n --mdc-modalcontainer-border-color: var(--mds-color-theme-outline-secondary-normal);\n --mdc-modalcontainer-inverted-background-color: var(--mds-color-theme-inverted-background-normal);\n --mdc-modalcontainer-inverted-border-color: var(--mds-color-theme-inverted-outline-primary-normal);\n --mdc-modalcontainer-inverted-text-color: var(--mds-color-theme-inverted-text-primary-normal);\n --mdc-modalcontainer-elevation-1: var(--mds-elevation-1);\n --mdc-modalcontainer-elevation-2: var(--mds-elevation-2);\n --mdc-modalcontainer-elevation-3: var(--mds-elevation-3);\n --mdc-modalcontainer-elevation-4: var(--mds-elevation-4);\n }\n\n :host::part(container) {\n padding: 0.75rem;\n background-color: var(--mdc-modalcontainer-primary-background-color);\n border-radius: 0.5rem;\n border: 0.0625rem solid var(--mdc-modalcontainer-border-color);\n }\n\n :host([color='contrast'])::part(container) {\n background-color: var(--mdc-modalcontainer-inverted-background-color);\n border: 0.0625rem solid var(--mdc-modalcontainer-inverted-border-color);\n color: var(--mdc-modalcontainer-inverted-text-color);\n }\n\n :host([elevation='1'])::part(container) {\n filter: var(--mdc-modalcontainer-elevation-1);\n }\n :host([elevation='2'])::part(container) {\n filter: var(--mdc-modalcontainer-elevation-2);\n }\n :host([elevation='3'])::part(container) {\n filter: var(--mdc-modalcontainer-elevation-3);\n }\n :host([elevation='4'])::part(container) {\n filter: var(--mdc-modalcontainer-elevation-4);\n }\n `,\n];\n\nexport default styles;\n", "import { CSSResult, html } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport styles from './modalcontainer.styles';\nimport { Component } from '../../models';\nimport { DEFAULTS } from './modalcontainer.constants';\nimport type { ModalContainerColor, ModalContainerElevation } from './modalcontainer.types';\nimport { DataAriaLabelMixin } from '../../utils/mixins/DataAriaLabelMixin';\nimport { DataAriaDescribedbyMixin } from '../../utils/mixins/DataAriaDescribedbyMixin';\nimport { DataAriaLabelledbyMixin } from '../../utils/mixins/DataAriaLabelledbyMixin';\n\n/**\n * The `mdc-modalcontainer` component is an element used to\n * display a modal container that can further be used in popover.\n *\n * @tagname mdc-modalcontainer\n *\n * @cssproperty --mdc-modalcontainer-primary-background-color - primary background color of the modalcontainer\n * @cssproperty --mdc-modalcontainer-border-color - border color of the modalcontainer\n * @cssproperty --mdc-modalcontainer-inverted-background-color - inverted background color of the modalcontainer\n * @cssproperty --mdc-modalcontainer-inverted-border-color - inverted border color of the modalcontainer\n * @cssproperty --mdc-modalcontainer-inverted-text-color - inverted text color of the modalcontainer\n *\n * @slot - Default slot for modal container\n */\nclass Modalcontainer extends DataAriaLabelMixin(DataAriaLabelledbyMixin(DataAriaDescribedbyMixin(Component))) {\n /**\n * Color of the modalcontainer\n * - **tonal**\n * - **contrast**\n * @default tonal\n */\n @property({ type: String, reflect: true })\n color: ModalContainerColor = DEFAULTS.COLOR;\n\n /**\n * Elevation of the modalcontainer where each value corresponds to a different drop shadow.\n * - **0**\n * - **1**\n * - **2**\n * - **3**\n * - **4**\n * @default 0\n */\n @property({ type: Number, reflect: true })\n elevation: ModalContainerElevation = DEFAULTS.ELEVATION;\n\n /**\n * Role of the modalcontainer\n * @default dialog\n */\n @property({ type: String, reflect: true, attribute: 'data-role' })\n dataRole: HTMLElement['role'] = DEFAULTS.ROLE;\n\n /**\n * Aria modal of the modalcontainer\n * @default false\n */\n @property({ type: Boolean, reflect: true, attribute: 'data-aria-modal' })\n dataAriaModal: boolean = DEFAULTS.ARIA_MODAL;\n\n public override render() {\n return html`\n <div\n role=\"${ifDefined(this.dataRole)}\"\n aria-modal=${ifDefined(this.dataAriaModal === true ? 'true' : undefined)}\n aria-label=\"${ifDefined(this.dataAriaLabel)}\"\n aria-labelledby=\"${ifDefined(this.dataAriaLabelledby)}\"\n aria-describedby=\"${ifDefined(this.dataAriaDescribedby)}\"\n part=\"container\"\n >\n <slot></slot>\n </div>\n `;\n }\n\n public static override styles: Array<CSSResult> = [...Component.styles, ...styles];\n}\n\nexport default Modalcontainer;\n", "import Modalcontainer from './modalcontainer.component';\nimport { TAG_NAME } from './modalcontainer.constants';\n\nModalcontainer.register(TAG_NAME);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n ['mdc-modalcontainer']: Modalcontainer\n }\n}\n\nexport default Modalcontainer;\n", "import Popover from './popover.component';\nimport { TAG_NAME } from './popover.constants';\nimport '../button';\nimport '../modalcontainer';\n\nPopover.register(TAG_NAME);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n ['mdc-popover']: Popover\n }\n}\n\nexport default Popover;\n", "import { css } from 'lit';\nimport { hostFitContentStyles, hostFocusRingStyles } from '../../utils/styles';\n\nconst styles = [hostFitContentStyles, css`\n :host{\n --mdc-radio-inner-circle-size: 0.375rem;\n --mdc-radio-text-disabled-color: var(--mds-color-theme-text-primary-disabled);\n --mdc-radio-disabled-border-color: var(--mds-color-theme-outline-primary-disabled);\n --mdc-radio-normal-border-color: var(--mds-color-theme-outline-input-normal);\n --mdc-radio-inner-circle-normal-background: var(--mds-color-theme-inverted-text-primary-normal);\n --mdc-radio-inner-circle-disabled-background: var(--mds-color-theme-inverted-text-primary-disabled);\n\n --mdc-radio-control-inactive-color: var(--mds-color-theme-control-inactive-normal);\n --mdc-radio-control-inactive-hover: var(--mds-color-theme-control-inactive-hover);\n --mdc-radio-control-inactive-pressed-color: var(--mds-color-theme-control-inactive-pressed);\n --mdc-radio-control-inactive-disabled-background: var(--mds-color-theme-control-inactive-disabled);\n\n --mdc-radio-control-active-color: var(--mds-color-theme-control-active-normal);\n --mdc-radio-control-active-hover-color: var(--mds-color-theme-control-active-hover);\n --mdc-radio-control-active-pressed-color: var(--mds-color-theme-control-active-pressed);\n --mdc-radio-control-active-disabled-background: var(--mds-color-theme-control-active-disabled);\n\n }\n :host([readonly]) .mdc-radio__input,\n :host([disabled]) .mdc-radio__input,\n :host([disabled]) .mdc-label,\n :host([readonly]) .mdc-label{\n cursor: default;\n }\n\n .mdc-label {\n cursor: pointer;\n }\n\n :host([disabled]) .mdc-radio__label-text,\n :host([disabled]) .mdc-radio__help-text {\n color: var(--mdc-radio-text-disabled-color);\n }\n\n :host([disabled]) .mdc-radio__icon,\n :host([disabled]) .mdc-radio__container:hover .mdc-radio__icon,\n :host([disabled][readonly]) .mdc-radio__icon,\n :host([disabled][readonly]) .mdc-radio__container:hover .mdc-radio__icon {\n border-color: var(--mdc-radio-disabled-border-color);\n background: var(--mdc-radio-control-inactive-disabled-background);\n }\n\n :host([disabled][checked]) .mdc-radio__icon,\n :host([disabled][checked]) .mdc-radio__container:hover .mdc-radio__icon,\n :host([disabled][readonly][checked]) .mdc-radio__icon,\n :host([disabled][readonly][checked]) .mdc-radio__container:hover .mdc-radio__icon {\n border: var(--mdc-radio-control-active-disabled-background);\n background: var(--mdc-radio-control-active-disabled-background);\n }\n\n :host([disabled][checked]) .mdc-radio__icon:after,\n :host([disabled][checked]) .mdc-radio__container:hover .mdc-radio__icon:after,\n :host([disabled][readonly][checked]) .mdc-radio__icon:after,\n :host([disabled][readonly][checked]) .mdc-radio__container:hover .mdc-radio__icon:after {\n background: var(--mdc-radio-inner-circle-disabled-background);\n }\n\n :host .mdc-radio__icon {\n position: absolute;\n top: 0;\n left: 0;\n width: 1rem;\n height: 1rem;\n border: 0.0625rem solid var(--mdc-radio-normal-border-color);\n background-color: var(--mdc-radio-control-inactive-color);\n border-radius: 50%;\n }\n\n :host([checked]) .mdc-radio__icon {\n border-color: var(--mdc-radio-control-active-color);\n background-color: var(--mdc-radio-control-active-color);\n }\n\n :host([checked]) .mdc-radio__icon:after {\n display: block;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n width: var(--mdc-radio-inner-circle-size);\n height: var(--mdc-radio-inner-circle-size);\n border-radius: 50%;\n background: var(--mdc-radio-inner-circle-normal-background);\n }\n\n :host .mdc-radio__input:hover ~ .mdc-radio__icon {\n border-color: var(--mdc-radio-normal-border-color);\n background-color: var(--mdc-radio-control-inactive-hover);\n }\n\n :host([checked]) .mdc-radio__input:hover ~ .mdc-radio__icon {\n border-color: var(--mdc-radio-control-active-hover-color);\n background-color: var(--mdc-radio-control-active-hover-color);\n }\n\n :host .mdc-radio__input:active ~ .mdc-radio__icon {\n border-color: var(--mdc-radio-normal-border-color);\n background-color: var(--mdc-radio-control-inactive-pressed-color);\n }\n\n :host([checked]) .mdc-radio__input:active ~ .mdc-radio__icon {\n border-color: var(--mdc-radio-control-active-pressed-color);\n background-color: var(--mdc-radio-control-active-pressed-color);\n }\n\n :host([readonly]) .mdc-radio__icon,\n :host([readonly]) .mdc-radio__container:hover .mdc-radio__icon {\n border-color: var(--mdc-radio-normal-border-color);\n background-color: var(--mdc-radio-control-inactive-color);\n }\n\n :host([readonly][checked]) .mdc-radio__icon {\n border-color: var(--mdc-radio-normal-border-color);\n }\n\n :host([readonly][checked]) .mdc-radio__icon:after,\n :host([readonly][checked]) .mdc-radio__container:hover .mdc-radio__icon:after,\n :host([readonly][checked]) .mdc-radio__container:active .mdc-radio__icon:after {\n background-color: var(--mdc-radio-text-disabled-color);\n }\n\n .mdc-radio__container {\n display: flex;\n align-items: start;\n gap: 0.5rem;\n }\n .mdc-radio__icon-container {\n display: block;\n position: relative;\n width: 1rem;\n height: 1rem;\n margin: 0.125rem 0;\n border-radius: 50%;\n }\n\n .mdc-radio__icon-container input{\n position: absolute;\n opacity: 0;\n margin: 0;\n width: 100%;\n height: 100%;\n cursor: pointer;\n z-index: 2;\n }\n \n .mdc-radio__icon-container .mdc-radio__icon:after {\n content: \"\";\n position: absolute;\n display: none;\n }\n\n .mdc-radio__label-container{\n display: flex;\n flex-direction: column;\n justify-content: center;\n gap: 0.25rem;\n }\n :host::part(required-label){\n display: none;\n }\n\n`, ...hostFocusRingStyles(true)];\n\nexport default styles;\n", "/* eslint-disable no-param-reassign */\nimport { CSSResult, html, nothing, PropertyValues } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport styles from './radio.styles';\nimport FormfieldWrapper from '../formfieldwrapper/formfieldwrapper.component';\nimport { DataAriaLabelMixin } from '../../utils/mixins/DataAriaLabelMixin';\nimport { AssociatedFormControl, FormInternalsMixin } from '../../utils/mixins/FormInternalsMixin';\nimport { ValidationType } from '../formfieldwrapper/formfieldwrapper.types';\nimport { DEFAULTS as FORMFIELD_DEFAULTS } from '../formfieldwrapper/formfieldwrapper.constants';\n\n/**\n * Radio allow users to select single options from a list or turn an item/feature on or off.\n * These are often used in forms, settings, and selection in lists.\n *\n * A radio component contains an optional label, optional info icon and an optional helper text.\n * @dependency mdc-formfieldwrapper\n *\n * @tagname mdc-radio\n *\n * @event change - (React: onChange) Event that gets dispatched when the radio state changes.\n * @event focus - (React: onFocus) Event that gets dispatched when the radio receives focus.\n *\n * @cssproperty --mdc-radio-inner-circle-size - size of the inner circle\n * @cssproperty --mdc-radio-text-disabled-color - color of the label when disabled\n * @cssproperty --mdc-radio-disabled-border-color - color of the radio button border when disabled\n * @cssproperty --mdc-radio-normal-border-color - color of the radio button border when normal\n * @cssproperty --mdc-radio-inner-circle-normal-background - background color of the inner circle when normal\n * @cssproperty --mdc-radio-inner-circle-disabled-background - background color of the inner circle when disabled\n * @cssproperty --mdc-radio-control-inactive-color - color of the radio button when inactive\n * @cssproperty --mdc-radio-control-inactive-hover - color of the radio button when inactive and hovered\n * @cssproperty --mdc-radio-control-inactive-pressed-color - color of the radio button when inactive and pressed\n * @cssproperty --mdc-radio-control-inactive-disabled-background - background color of the radio button when\n * inactive and disabled\n * @cssproperty --mdc-radio-control-active-color - color of the radio button when active\n * @cssproperty --mdc-radio-control-active-hover-color - color of the radio button when active and hovered\n * @cssproperty --mdc-radio-control-active-pressed-color - color of the radio button when active and pressed\n * @cssproperty --mdc-radio-control-active-disabled-background - background color of the radio button\n * when active and disabled\n *\n */\n\nclass Radio extends FormInternalsMixin(DataAriaLabelMixin(FormfieldWrapper)) implements AssociatedFormControl {\n /**\n * Determines whether the radio is selected or unselected.\n *\n * @default false\n */\n @property({ type: Boolean, reflect: true }) checked = false;\n\n /**\n * Determines whether the radio is read-only.\n *\n * @default false\n */\n @property({ type: Boolean, reflect: true }) readonly = false;\n\n /**\n * Automatically focus on the element when the page loads.\n * [MDN Reference](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/autofocus)\n * @default false\n */\n @property({ type: Boolean, reflect: true }) override autofocus = false;\n\n constructor() {\n super();\n // Radio does not contain helpTextType property.\n this.helpTextType = undefined as unknown as ValidationType;\n }\n\n override firstUpdated() {\n this.updateTabIndex();\n }\n\n /**\n * Returns all radios within the same group (name).\n */\n private getAllRadiosWithinSameGroup(): Radio[] {\n return Array.from(document.querySelectorAll(`mdc-radio[name=\"${this.name}\"]`));\n }\n\n /**\n * The 'change' event does not bubble up through the shadow DOM as it was not composed.\n * Therefore, we need to re-dispatch the same event to ensure it is propagated correctly.\n * Read more: https://developer.mozilla.org/en-US/docs/Web/API/Event/composed\n */\n private dispatchChangeEvent(event: Event): void {\n const EventConstructor = event.constructor as typeof Event;\n this.dispatchEvent(new EventConstructor(event.type, event));\n }\n\n /** @internal */\n formResetCallback(): void {\n const radios = this.getAllRadiosWithinSameGroup();\n\n radios.forEach((radio) => {\n radio.checked = false;\n });\n\n this.updateComplete.then(() => {\n this.setActualFormValue();\n }).catch((error) => {\n if (this.onerror) {\n this.onerror(error);\n }\n });\n }\n\n /** @internal */\n formStateRestoreCallback(\n state: string,\n ): void {\n if (this.value === state && state !== '') {\n this.checked = true;\n }\n }\n\n /**\n * @internal\n */\n setComponentValidity(isValid: boolean) {\n if (isValid) {\n this.internals.setValidity({});\n } else if (this.requiredLabel && !this.checked) {\n if (this.validationMessage) {\n this.inputElement.setCustomValidity(this.validationMessage);\n } else {\n this.inputElement.setCustomValidity('');\n }\n this.setValidity();\n }\n this.updateTabIndex();\n }\n\n /**\n * Sets the validity of the group of radios.\n * @param radios - Array of radios of the same group\n * @param isValid - Boolean value to set the validity of the group\n */\n private setGroupValidity(radios: Radio[], isValid: boolean) {\n this.updateComplete.then(() => {\n radios.forEach((radio) => {\n radio.setComponentValidity(isValid);\n });\n }).catch((error) => {\n if (this.onerror) {\n this.onerror(error);\n }\n });\n }\n\n /**\n * Updates the form value to reflect the current state of the radio.\n * If checked, the value is set to the user-provided value.\n * If unchecked, the value is set to null.\n */\n private setActualFormValue() {\n let actualValue: string | null = '';\n\n if (this.checked) {\n actualValue = !this.value ? 'on' : this.value;\n } else {\n actualValue = null;\n }\n\n const radios = this.getAllRadiosWithinSameGroup();\n if (this.checked) {\n this.setGroupValidity(radios, true);\n } else {\n const anyRequired = radios.some((r) => r.requiredLabel);\n const anyChecked = !!radios.find((r) => r.checked);\n const isInvalid = anyRequired && !anyChecked;\n this.setGroupValidity(radios, !isInvalid);\n }\n\n this.internals.setFormValue(actualValue);\n }\n\n /**\n * Handles the change event on the radio element.\n * This will toggle the state of the radio element.\n * Dispatches the change event.\n */\n private handleChange(event: Event): void {\n if (this.disabled || this.readonly) return;\n\n const radios = this.getAllRadiosWithinSameGroup();\n radios.forEach((radio) => {\n /**\n * Uncheck all radios in the same group (name)\n */\n const radioElement = radio.shadowRoot?.querySelector('input');\n if (radioElement) {\n radio.checked = false;\n radioElement.checked = false;\n }\n });\n this.checked = true;\n const inputElement = this.shadowRoot?.querySelector('input');\n if (inputElement) {\n inputElement.checked = true;\n }\n this.dispatchChangeEvent(event);\n }\n\n /**\n * Updates the state of the radio button at the specified index within the enabled radios.\n * Focuses the radio button and triggers the change event if the radio button is not read-only.\n *\n * @param enabledRadios - An array of enabled radio buttons within the same group.\n * @param index - The index of the radio button to be updated within the enabled radios array.\n * @param event - The event that triggered the update.\n */\n private updateRadio(enabledRadios: Radio[], index: number, event: Event) {\n enabledRadios[index].shadowRoot?.querySelector('input')?.focus();\n enabledRadios[index].handleChange(event);\n }\n\n /**\n * Handles the keydown event (Arrow Up/Down/Left/Right) on the radio element.\n */\n private handleKeyDown(event: KeyboardEvent): void {\n if (this.disabled) return;\n\n const radios = this.getAllRadiosWithinSameGroup();\n const enabledRadios = radios.filter((radio) => !radio.disabled);\n const currentIndex = enabledRadios.indexOf(this);\n\n if (['ArrowDown', 'ArrowRight'].includes(event.key)) {\n // Move focus to the next radio\n const nextIndex = (currentIndex + 1) % enabledRadios.length;\n this.updateRadio(enabledRadios, nextIndex, event);\n } else if (['ArrowUp', 'ArrowLeft'].includes(event.key)) {\n // Move focus to the previous radio\n const prevIndex = (currentIndex - 1 + enabledRadios.length) % enabledRadios.length;\n this.updateRadio(enabledRadios, prevIndex, event);\n } else if (event.key === ' ') {\n this.updateRadio(enabledRadios, currentIndex, event);\n }\n this.updateTabIndex();\n\n if (event.key === 'Enter') {\n this.form?.requestSubmit();\n }\n }\n\n /**\n * Update tab index for all radios in the same group (name)\n * If any radio group is checked, it will have a tab index of 0\n * If no radio group is checked, the first enabled radio will have a tab index of 0\n */\n private updateTabIndex(): void {\n const radios = this.getAllRadiosWithinSameGroup();\n const checked = radios.find((radio) => radio.checked);\n const firstEnabledRadio = radios.find((radio) => !radio.disabled);\n radios.forEach((radio) => {\n const inputElement = radio.shadowRoot?.querySelector('input');\n if (inputElement) {\n inputElement.tabIndex = -1;\n if (radio === checked) {\n inputElement.tabIndex = 0;\n } else if (!checked && radio === firstEnabledRadio) {\n inputElement.tabIndex = 0;\n }\n }\n });\n }\n\n public override update(changedProperties: PropertyValues): void {\n super.update(changedProperties);\n\n if (changedProperties.has('checked')) {\n this.setActualFormValue();\n }\n }\n\n private renderLabelAndHelperText = () => {\n if (!this.label) return nothing;\n return html`<div class=\"mdc-radio__label-container\">\n ${this.renderLabel()}\n ${this.renderHelperText()}\n </div>`;\n };\n\n public override render() {\n return html`\n <div class=\"mdc-radio__container\">\n <div class=\"mdc-radio__icon-container mdc-focus-ring\">\n <input\n id=\"${this.id}\"\n type=\"radio\"\n role=\"radio\"\n ?autofocus=\"${this.autofocus}\"\n name=\"${ifDefined(this.name)}\"\n value=\"${ifDefined(this.value)}\"\n ?required=\"${!!this.requiredLabel}\"\n @change=${this.handleChange}\n @keydown=${this.handleKeyDown}\n ?checked=${this.checked}\n ?readonly=${this.readonly}\n ?disabled=${this.disabled}\n class=\"mdc-radio__input\"\n aria-checked=\"${this.checked}\"\n aria-describedby=\"${ifDefined(this.helpText ? FORMFIELD_DEFAULTS.HELPER_TEXT_ID : '')}\"\n aria-label=\"${this.dataAriaLabel ?? ''}\"\n />\n <span class=\"mdc-radio__icon\"></span>\n </div>\n ${this.renderLabelAndHelperText()}\n </div>\n `;\n }\n\n public static override styles: Array<CSSResult> = [...FormfieldWrapper.styles, ...styles];\n}\n\nexport default Radio;\n", "import utils from '../../utils/tag-name';\n\nconst TAG_NAME = utils.constructTagName('radio');\n\nexport { TAG_NAME };\n", "import Radio from './radio.component';\nimport { TAG_NAME } from './radio.constants';\n\nRadio.register(TAG_NAME);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n ['mdc-radio']: Radio;\n }\n}\n\nexport default Radio;\n", "import { CSSResult } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport FormfieldGroup from '../formfieldgroup';\nimport { TAG_NAME as RADIO_TAGNAME } from '../radio/radio.constants';\n\n/**\n * `mdc-radiogroup` - This is the wrapper component for radio buttons which are grouped together.\n * It can have a header text and a description. It enables users to select a single option from a set of options.\n * It is often used in forms, settings, and selection in lists. It automatically group the radio buttons inside it.\n *\n * @tagname mdc-radiogroup\n *\n * @cssproperty --mdc-radiogroup-description-text-normal - color of the description text\n *\n */\nclass RadioGroup extends FormfieldGroup {\n /**\n * Name of the radio group.\n * They are used to group elements in a form together.\n * @default ''\n */\n @property({ type: String }) name = '';\n\n constructor() {\n super();\n // This is used to set the role of the component as `radiogroup`.\n /** @internal */\n this.isRadio = true;\n }\n\n /**\n * Using name property to group the radio buttons together.\n * If the name is not set, it will be set to the name of the radio group.\n */\n override firstUpdated() {\n Array.from(this.shadowRoot?.querySelectorAll('slot') || [])\n ?.flatMap((slot) => slot.assignedElements({ flatten: true }))\n ?.filter((el) => el.tagName.toLowerCase() === RADIO_TAGNAME)\n ?.filter((radio) => !radio.hasAttribute('name'))\n ?.forEach((radio) => {\n radio.setAttribute('name', this.name);\n if (this.requiredLabel) radio.setAttribute('required-label', this.requiredLabel);\n });\n }\n\n public static override styles: Array<CSSResult> = [...FormfieldGroup.styles];\n}\n\nexport default RadioGroup;\n", "import utils from '../../utils/tag-name';\n\nconst TAG_NAME = utils.constructTagName('radiogroup');\n\nexport { TAG_NAME };\n", "import RadioGroup from './radiogroup.component';\nimport { TAG_NAME } from './radiogroup.constants';\n\nRadioGroup.register(TAG_NAME);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n ['mdc-radiogroup']: RadioGroup\n }\n}\n\nexport default RadioGroup;\n", "import { css } from 'lit';\nimport { hostFitContentStyles } from '../../utils/styles';\n\nconst styles = [hostFitContentStyles, css`\n :host {\n --mdc-spinner-default-color: var(--mds-color-theme-control-active-normal);\n --mdc-spinner-inverted-color: var(--mds-color-theme-inverted-control-active-normal);\n --mdc-spinner-button-variant-color: currentColor;\n --mdc-spinner-color: var(--mdc-spinner-default-color);\n --mdc-spinner-size: 100%;\n }\n\n :host([inverted]) {\n --mdc-spinner-color: var(--mdc-spinner-inverted-color);\n }\n\n :host([size=\"large\"]) {\n --mdc-spinner-size: 6rem;\n }\n\n :host([size=\"midsize\"]) {\n --mdc-spinner-size: 3rem;\n }\n\n :host([size=\"small\"]) {\n --mdc-spinner-size: 1.5rem;\n }\n\n :host([variant=\"button\"]) {\n --mdc-spinner-color: var(--mdc-spinner-button-variant-color);\n }\n\n :host::part(container) {\n width: var(--mdc-spinner-size);\n height: var(--mdc-spinner-size);\n animation: rotate 1.5s linear infinite;\n }\n\n :host::part(circle) {\n fill: none;\n stroke: var(--mdc-spinner-color);\n stroke-width: 8%;\n stroke-linecap: round;\n animation: dash 1.5s ease-in-out infinite;\n transform: rotate(-90deg);\n transform-origin: center;\n }\n\n @keyframes rotate {\n 100% { transform: rotate(360deg); }\n }\n\n @keyframes dash {\n 0% {\n stroke-dasharray: 1, 470;\n }\n 50% {\n stroke-dasharray: 209, 470;\n stroke-dashoffset: -83;\n }\n 100% {\n stroke-dasharray: 209, 470;\n stroke-dashoffset: -292;\n }\n }\n`];\n\nexport default styles;\n", "import utils from '../../utils/tag-name';\n\nconst TAG_NAME = utils.constructTagName('spinner');\n\nconst SPINNER_SIZES = {\n LARGE: 'large',\n MIDSIZE: 'midsize',\n SMALL: 'small',\n} as const;\n\nconst SPINNER_VARIANT = {\n STANDALONE: 'standalone',\n BUTTON: 'button',\n} as const;\n\nconst DEFAULTS = {\n VARIANT: SPINNER_VARIANT.STANDALONE,\n SIZE: SPINNER_SIZES.MIDSIZE,\n INVERTED: false,\n};\n\nexport { TAG_NAME, SPINNER_SIZES, SPINNER_VARIANT, DEFAULTS };\n", "import { CSSResult, html } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport styles from './spinner.styles';\nimport { Component } from '../../models';\n\nimport { SpinnerSize, SpinnerVariant } from './spinner.types';\nimport { DEFAULTS } from './spinner.constants';\n\n/**\n * `mdc-spinner` is loading spinner which is an indeterminate progress indicator, meaning\n * it's best for cases where the progress or duration of a process is variable or unknown.\n *\n * Spinner Variants:\n * - **Standalone (Default)**: Track has a blue color.\n * - **Button**: To be used when placed in a button to show that the button\u2019s action is currently in progress.\n * To ensure a minimum 3:1 contrast ratio, the color is changed internally to be the same color as the button\u2019s\n * icon or label text.\n *\n * Spinner Sizes:\n * - **Large (96px)**: Use when replacing entire regions or pages that are still loading\n * - **MidSize (48px) (Default)**: Use for most use cases.\n * - **Small (24px)**: Use for inline with loading text.\n *\n * Customisation of the spinner size is allowed by setting the size to undefined and using the --mdc-spinner-size\n * CSS property.\n *\n * Spinner Colors:\n * - **Default**: Use for most use cases.\n * - **Inverted**: Only to be used within inverted components, such as coachmarks.\n *\n * Regarding accessibility, if an aria-label is provided, the role will be set to 'img'; if it is absent, the role\n * will be unset\n * and aria-hidden will be set to 'true' so the spinner will be ignored by screen readers.\n *\n * @tagname mdc-spinner\n *\n * @cssproperty --mdc-spinner-default-color - Allows customization of the default spinner color.\n * @cssproperty --mdc-spinner-inverted-color - Allows customization of the inverted spinner color.\n * @cssproperty --mdc-spinner-button-variant-color - Allows customization of the spinner Button variant color.\n * @cssproperty --mdc-spinner-size - Allows customization of the spinner size.\n *\n * @csspart container - The svg which contains the circle spinner.\n * @csspart circle - The circle of the spinner.\n */\nclass Spinner extends Component {\n /**\n * The spinner color can be inverted by setting the inverted attribute to true.\n * @default false\n */\n @property({ type: Boolean, reflect: true })\n inverted = DEFAULTS.INVERTED;\n\n /**\n * Size of the spinner.\n * Acceptable values include:\n *\n * - 'small'\n * - 'midsize'\n * - 'large'\n * - 'undefined'\n *\n * @default midsize\n */\n @property({ type: String, reflect: true })\n size?: SpinnerSize = DEFAULTS.SIZE;\n\n /**\n * Aria-label attribute to be set for accessibility\n */\n @property({ type: String, attribute: 'aria-label' })\n override ariaLabel: string | null = null;\n\n /**\n * There are 2 variants of spinner: default and button. Their coloring is different.\n * - **Standalone (Default)**: Track has a blue color.\n * - **Button**: To be used when placed in a button to show that the button\u2019s action is currently in progress.\n * To ensure a minimum 3:1 contrast ratio, change the active indicator color to be the same color as the button\u2019s\n * icon or label text.\n * @default standalone\n */\n @property({ type: String, reflect: true })\n variant: SpinnerVariant = DEFAULTS.VARIANT;\n\n override updated(changedProperties: Map<string, any>) {\n super.updated(changedProperties);\n\n if (changedProperties.has('ariaLabel')) {\n this.role = this.ariaLabel ? 'img' : null;\n this.ariaHidden = this.ariaLabel ? 'false' : 'true';\n }\n }\n\n public override render() {\n return html`\n <svg part=\"container\" viewBox=\"0 0 100 100\">\n <circle part=\"circle\" cx=\"50\" cy=\"50\" r=\"46\"></circle>\n </svg>\n `;\n }\n\n public static override styles: Array<CSSResult> = [...Component.styles, ...styles];\n}\n\nexport default Spinner;\n", "import Spinner from './spinner.component';\nimport { TAG_NAME } from './spinner.constants';\n\nSpinner.register(TAG_NAME);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n ['mdc-spinner']: Spinner\n }\n}\n\nexport default Spinner;\n", "import { css } from 'lit';\nimport { hostFitContentStyles, hostFocusRingStyles } from '../../utils/styles';\n\nconst styles = [hostFitContentStyles, css`\n\n :host {\n --mdc-tab-content-gap: 0.5rem;\n --mdc-tab-height: 2rem;\n\n --mdc-tab-glass-active-background-color-disabled: var(--mds-color-theme-button-primary-disabled);\n --mdc-tab-glass-active-background-color-hover: var(--mds-color-theme-button-primary-hover);\n --mdc-tab-glass-active-background-color-normal: var(--mds-color-theme-button-primary-normal);\n --mdc-tab-glass-active-background-color-pressed: var(--mds-color-theme-button-primary-pressed);\n\n --mdc-tab-glass-active-color: var(--mds-color-theme-inverted-text-primary-normal);\n --mdc-tab-glass-active-color-disabled: var(--mds-color-theme-inverted-text-primary-disabled);\n\n --mdc-tab-glass-border-radius: 0.5rem;\n\n --mdc-tab-glass-inactive-background-color-disabled: var(--mds-color-theme-button-secondary-disabled);\n --mdc-tab-glass-inactive-background-color-hover: var(--mds-color-theme-button-secondary-hover);\n --mdc-tab-glass-inactive-background-color-normal: var(--mds-color-theme-button-secondary-normal);\n --mdc-tab-glass-inactive-background-color-pressed: var(--mds-color-theme-button-secondary-pressed);\n\n --mdc-tab-glass-inactive-color: var(--mds-color-theme-text-secondary-normal);\n --mdc-tab-glass-inactive-color-disabled: var(--mds-color-theme-text-primary-disabled);\n\n --mdc-tab-line-active-background-color-disabled: var(--mds-color-theme-button-secondary-disabled);\n --mdc-tab-line-active-background-color-hover: var(--mds-color-theme-button-secondary-hover);\n --mdc-tab-line-active-background-color-normal: var(--mds-color-theme-button-secondary-normal);\n --mdc-tab-line-active-background-color-pressed: var(--mds-color-theme-button-secondary-pressed);\n\n --mdc-tab-line-active-color: var(--mds-color-theme-text-primary-normal);\n --mdc-tab-line-active-color-disabled: var(--mds-color-theme-text-primary-disabled);\n\n --mdc-tab-line-active-indicator-color: var(--mds-color-theme-outline-input-active);\n --mdc-tab-line-active-indicator-color-disabled: var(--mds-color-theme-outline-primary-disabled);\n --mdc-tab-line-active-indicator-height: 0.125rem;\n --mdc-tab-line-active-indicator-width: 100%;\n\n --mdc-tab-line-border-bottom-left-radius: 0;\n --mdc-tab-line-border-bottom-right-radius: 0;\n --mdc-tab-line-border-top-left-radius: 0.25rem;\n --mdc-tab-line-border-top-right-radius: 0.25rem;\n\n --mdc-tab-line-inactive-background-color-disabled: var(--mds-color-theme-button-secondary-disabled);\n --mdc-tab-line-inactive-background-color-hover: var(--mds-color-theme-button-secondary-hover);\n --mdc-tab-line-inactive-background-color-normal: var(--mds-color-theme-button-secondary-normal);\n --mdc-tab-line-inactive-background-color-pressed: var(--mds-color-theme-button-secondary-pressed);\n\n --mdc-tab-line-inactive-color: var(--mds-color-theme-text-secondary-normal);\n --mdc-tab-line-inactive-color-disabled: var(--mds-color-theme-text-primary-disabled);\n\n --mdc-tab-padding-left: 0.75rem;\n --mdc-tab-padding-right: 0.75rem;\n\n --mdc-tab-pill-active-background-color-disabled: var(--mds-color-theme-button-secondary-active-normal);\n --mdc-tab-pill-active-background-color-hover: var(--mds-color-theme-button-secondary-active-hover);\n --mdc-tab-pill-active-background-color-normal: var(--mds-color-theme-button-secondary-active-normal);\n --mdc-tab-pill-active-background-color-pressed: var(--mds-color-theme-button-secondary-active-pressed);\n\n --mdc-tab-pill-active-color: var(--mds-color-theme-text-primary-normal);\n --mdc-tab-pill-active-color-disabled: var(--mds-color-theme-text-primary-disabled);\n\n --mdc-tab-pill-border-radius: 0.5rem;\n\n --mdc-tab-pill-inactive-background-color-disabled: var(--mds-color-theme-button-secondary-disabled);\n --mdc-tab-pill-inactive-background-color-hover: var(--mds-color-theme-button-secondary-hover);\n --mdc-tab-pill-inactive-background-color-normal: var(--mds-color-theme-button-secondary-normal);\n --mdc-tab-pill-inactive-background-color-pressed: var(--mds-color-theme-button-secondary-pressed);\n\n --mdc-tab-pill-inactive-color: var(--mds-color-theme-text-secondary-normal);\n --mdc-tab-pill-inactive-color-disabled: var(--mds-color-theme-text-primary-disabled);\n\n flex-direction: column;\n height: var(--mdc-tab-height);\n padding-left: var(--mdc-tab-padding-left);\n padding-right: var(--mdc-tab-padding-right);\n position: relative;\n border: none;\n }\n\n :host::part(container) {\n align-items: center;\n display: flex;\n flex-direction: row;\n gap: var(--mdc-tab-content-gap);\n justify-content: center;\n width: fit-content;\n }\n\n :host::part(text) {\n display: flex;\n flex-direction: column;\n }\n\n :host::part(text)::after{\n content: attr(data-text);\n height: 0;\n visibility: hidden;\n overflow: hidden;\n user-select: none;\n pointer-events: none;\n /* body-midsize-bold font styling */\n font-size: var(--mds-font-apps-body-midsize-bold-font-size);\n font-weight: var(--mds-font-apps-body-midsize-bold-font-weight);\n line-height: var(--mds-font-apps-body-midsize-bold-line-height);\n text-decoration: var(--mds-font-apps-body-midsize-bold-text-decoration);\n text-transform: var(--mds-font-apps-body-midsize-bold-text-case);\n }\n\n :host::part(indicator) {\n width: var(--mdc-tab-line-active-indicator-width);\n height: var(--mdc-tab-line-active-indicator-height);\n bottom: 0;\n position: absolute;\n visibility: hidden;\n }\n\n :host([disabled]) {\n cursor: default;\n }\n\n :host([variant=\"glass\"]) {\n background-color: var(--mdc-tab-glass-inactive-background-color-normal);\n border-radius: var(--mdc-tab-glass-border-radius);\n color: var(--mdc-tab-glass-inactive-color);\n }\n\n :host([variant=\"glass\"]:hover) {\n background-color: var(--mdc-tab-glass-inactive-background-color-hover);\n }\n\n :host([variant=\"glass\"]:active) {\n background-color: var(--mdc-tab-glass-inactive-background-color-pressed);\n }\n\n :host([variant=\"glass\"][disabled]) {\n background-color: var(--mdc-tab-glass-inactive-background-color-disabled);\n color: var(--mdc-tab-glass-inactive-color-disabled);\n }\n\n :host([variant=\"glass\"][active]) {\n background-color: var(--mdc-tab-glass-active-background-color-normal);\n color: var(--mdc-tab-glass-active-color);\n }\n\n :host([variant=\"glass\"][active]:hover) {\n background-color: var(--mdc-tab-glass-active-background-color-hover);\n }\n\n :host([variant=\"glass\"][active]:active) {\n background-color: var(--mdc-tab-glass-active-background-color-pressed);\n }\n\n :host([variant=\"glass\"][active][disabled]) {\n background-color: var(--mdc-tab-glass-active-background-color-disabled);\n color: var(--mdc-tab-glass-active-color-disabled);\n }\n\n :host([variant=\"line\"]) {\n background-color: var(--mdc-tab-line-inactive-background-color-normal);\n border-top-left-radius: var(--mdc-tab-line-border-top-left-radius);\n border-top-right-radius: var(--mdc-tab-line-border-top-right-radius);\n border-bottom-left-radius: var(--mdc-tab-line-border-bottom-left-radius);\n border-bottom-right-radius: var(--mdc-tab-line-border-bottom-right-radius);\n color: var(--mdc-tab-line-inactive-color);\n }\n\n :host([variant=\"line\"]:hover) {\n background-color: var(--mdc-tab-line-inactive-background-color-hover);\n }\n\n :host([variant=\"line\"]:active) {\n background-color: var(--mdc-tab-line-inactive-background-color-pressed);\n }\n\n :host([variant=\"line\"][disabled]) {\n background-color: var(--mdc-tab-line-inactive-background-color-disabled);\n color: var(--mdc-tab-line-inactive-color-disabled);\n }\n\n :host([variant=\"line\"][active]) {\n background-color: var(--mdc-tab-line-active-background-color-normal);\n color: var(--mdc-tab-line-active-color);\n }\n\n :host([variant=\"line\"][active])::part(indicator) {\n background-color:var(--mdc-tab-line-active-indicator-color);\n visibility: visible;\n }\n\n :host([variant=\"line\"][active]:hover) {\n background-color: var(--mdc-tab-line-active-background-color-hover);\n }\n\n :host([variant=\"line\"][active]:active) {\n background-color: var(--mdc-tab-line-active-background-color-pressed);\n }\n\n :host([variant=\"line\"][active][disabled]) {\n background-color: var(--mdc-tab-line-active-background-color-disabled);\n color: var(--mdc-tab-line-active-color-disabled);\n }\n\n :host([variant=\"line\"][active][disabled])::part(indicator) {\n background-color:var(--mdc-tab-line-active-indicator-color-disabled);\n }\n\n :host([variant=\"pill\"]) {\n background-color: var(--mdc-tab-pill-inactive-background-color-normal);\n border-radius: var(--mdc-tab-pill-border-radius);\n color: var(--mdc-tab-pill-inactive-color);\n }\n\n :host([variant=\"pill\"]:hover) {\n background-color: var(--mdc-tab-pill-inactive-background-color-hover);\n }\n\n :host([variant=\"pill\"]:active) {\n background-color: var(--mdc-tab-pill-inactive-background-color-pressed);\n }\n\n :host([variant=\"pill\"][disabled]) {\n background-color: var(--mdc-tab-pill-inactive-background-color-disabled);\n color: var(--mdc-tab-pill-inactive-color-disabled);\n }\n\n :host([variant=\"pill\"][active]) {\n background-color: var(--mdc-tab-pill-active-background-color-normal);\n color: var(--mdc-tab-pill-active-color);\n }\n\n :host([variant=\"pill\"][active]:hover) {\n background-color: var(--mdc-tab-pill-active-background-color-hover);\n }\n\n :host([variant=\"pill\"][active]:active) {\n background-color: var(--mdc-tab-pill-active-background-color-pressed);\n }\n\n :host([variant=\"pill\"][active][disabled]) {\n background-color: var(--mdc-tab-pill-active-background-color-disabled);\n color: var(--mdc-tab-pill-active-color-disabled);\n }\n\n`, ...hostFocusRingStyles()];\nexport default styles;\n", "import utils from '../../utils/tag-name';\n\nconst TAG_NAME = utils.constructTagName('tab');\n\nconst TAB_VARIANTS = {\n GLASS: 'glass',\n LINE: 'line',\n PILL: 'pill',\n} as const;\n\nconst DEFAULTS = {\n VARIANT: TAB_VARIANTS.PILL,\n} as const;\n\nexport { DEFAULTS, TAG_NAME, TAB_VARIANTS };\n", "import { CSSResult, html, nothing, PropertyValues } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport styles from './tab.styles';\nimport type { IconNames } from '../icon/icon.types';\nimport { DEFAULTS, TAB_VARIANTS } from './tab.constants';\nimport type { Variant } from './tab.types';\nimport { getIconNameWithoutStyle } from '../button/button.utils';\nimport Buttonsimple from '../buttonsimple/buttonsimple.component';\nimport { ButtonSize, ButtonType } from '../buttonsimple/buttonsimple.types';\nimport { TYPE, VALID_TEXT_TAGS } from '../text/text.constants';\nimport { IconNameMixin } from '../../utils/mixins/IconNameMixin';\n\n/**\n * `mdc-tab` is Tab component to be used within the Tabgroup.\n *\n * Passing in the attribute `text` to the tab component is changing the text displayed in the tab.\n *\n * The `slot=\"badge\"` can be used to add a badge to the tab.\n *\n * The `slot=\"chip\"` can be used to add a chip to the tab.\n *\n * For `icon`, the `mdc-icon` component is used to render the icon.\n *\n * Note: Icons can be used in conjunction with badges or chips.\n * Badges and chips should not be used at the same time.\n *\n * @dependency mdc-icon\n * @dependency mdc-text\n *\n * @event click - (React: onClick) This event is dispatched when the tab is clicked.\n * @event keydown - (React: onKeyDown) This event is dispatched when a key is pressed down on the tab.\n * @event keyup - (React: onKeyUp) This event is dispatched when a key is released on the tab.\n * @event focus - (React: onFocus) This event is dispatched when the tab receives focus.\n *\n * @tagname mdc-tab\n *\n * @cssproperty --mdc-tab-content-gap - Gap between the badge(if provided), icon and text.\n * @cssproperty --mdc-tab-height - Height of the tab.\n * @cssproperty --mdc-tab-glass-active-background-color-disabled - Background color for active glass tab\n * in disabled state.\n * @cssproperty --mdc-tab-glass-active-background-color-hover - Background color for active glass tab in hover state.\n * @cssproperty --mdc-tab-glass-active-background-color-normal - Background color for active glass tab in rest state.\n * @cssproperty --mdc-tab-glass-active-background-color-pressed - Background color for active glass tab\n * in pressed state.\n * @cssproperty --mdc-tab-glass-active-color - Text and icon color for active glass tab.\n * @cssproperty --mdc-tab-glass-active-color-disabled - Text and icon color for active glass tab in disabled state.\n * @cssproperty --mdc-tab-glass-border-radius - Border radius for glass tab.\n * @cssproperty --mdc-tab-glass-inactive-background-color-disabled - Background color for inactive glass tab\n * in disabled state.\n * @cssproperty --mdc-tab-glass-inactive-background-color-hover - Background color for inactive glass tab\n * in hover state.\n * @cssproperty --mdc-tab-glass-inactive-background-color-normal - Background color for inactive glass tab\n * in rest state.\n * @cssproperty --mdc-tab-glass-inactive-background-color-pressed - Background color for inactive glass tab\n * in pressed state.\n * @cssproperty --mdc-tab-glass-inactive-color - Text and icon color for inactive glass tab.\n * @cssproperty --mdc-tab-glass-inactive-color-disabled - Text and icon color for inactive glass tab in disabled state.\n * @cssproperty --mdc-tab-line-active-background-color-pressed - Background color for active line tab in pressed state.\n * @cssproperty --mdc-tab-line-active-background-color-disabled - Background color for active line tab\n * in disabled state.\n * @cssproperty --mdc-tab-line-active-background-color-hover - Background color for active line tab in hover state.\n * @cssproperty --mdc-tab-line-active-background-color-normal - Background color for active line tab in rest state.\n * @cssproperty --mdc-tab-line-active-color - Text and icon color for active line tab.\n * @cssproperty --mdc-tab-line-active-color-disabled - Text and icon color for active line tab in disabled state.\n * @cssproperty --mdc-tab-line-active-indicator-color - color for indicator in active line tab.\n * @cssproperty --mdc-tab-line-active-indicator-color-disabled - Color for indicator in active line tab\n * in disabled state.\n * @cssproperty --mdc-tab-line-active-indicator-height - Height for indicator in active line tab.\n * @cssproperty --mdc-tab-line-active-indicator-width - Width for indicator in active line tab.\n * @cssproperty --mdc-tab-line-border-bottom-left-radius - Bottom left border radius for line tab.\n * @cssproperty --mdc-tab-line-border-bottom-right-radius - Bottom right border radius for line tab.\n * @cssproperty --mdc-tab-line-border-top-left-radius - Top left border radius for line tab.\n * @cssproperty --mdc-tab-line-border-top-right-radius - Top right border radius for line tab.\n * @cssproperty --mdc-tab-line-inactive-background-color-pressed - Background color for inactive line tab\n * in pressed state.\n * @cssproperty --mdc-tab-line-inactive-background-color-disabled - Background color for inactive line tab\n * in disabled state\n * @cssproperty --mdc-tab-line-inactive-background-color-hover - Background color for inactive line tab in hover state.\n * @cssproperty --mdc-tab-line-inactive-background-color-normal - Background color for inactive line tab\n * in rest state.\n * @cssproperty --mdc-tab-line-inactive-color - Text and icon color for inactive line tab.\n * @cssproperty --mdc-tab-line-inactive-color-disabled - Text and icon color for inactive line tab in disabled state.\n * @cssproperty --mdc-tab-padding-left - Padding left for the tab.\n * @cssproperty --mdc-tab-padding-right - Padding right for the tab.\n * @cssproperty --mdc-tab-pill-active-background-color-pressed - Background color for active pill tab in pressed state.\n * @cssproperty --mdc-tab-pill-active-background-color-disabled - Background color for active pill tab\n * in disabled state.\n * @cssproperty --mdc-tab-pill-active-background-color-hover - Background color for active pill tab in hover state.\n * @cssproperty --mdc-tab-pill-active-background-color-normal - Background color for active pill tab in rest state.\n * @cssproperty --mdc-tab-pill-active-color - Text and icon color for active pill tab.\n * @cssproperty --mdc-tab-pill-active-color-disabled - Text and icon color for active pill tab in disabled state.\n * @cssproperty --mdc-tab-pill-border-radius - Border radius for pill tab.\n * @cssproperty --mdc-tab-pill-inactive-background-color-pressed - Background color for inactive pill tab\n * in pressed state.\n * @cssproperty --mdc-tab-pill-inactive-background-color-disabled - Background color for inactive pill tab\n * in disabled state.\n * @cssproperty --mdc-tab-pill-inactive-background-color-hover - Background color for inactive pill tab in hover state.\n * @cssproperty --mdc-tab-pill-inactive-background-color-normal - Background color for inactive pill tab in rest state.\n * @cssproperty --mdc-tab-pill-inactive-color - Text and icon color for inactive pill tab.\n * @cssproperty --mdc-tab-pill-inactive-color-disabled - Text and icon color for inactive pill tab in disabled state.\n */\nclass Tab extends IconNameMixin(Buttonsimple) {\n /**\n * Text to be displayed in the tab.\n * If no `text` is provided, no text will be rendered,\n * `aria-label` should be set on the tab.\n */\n @property({ type: String, reflect: true })\n text?: string;\n\n /**\n * Tab can have three variants:\n * - `glass`\n * - `line`\n * - `pill`\n *\n * It defines the background and foreground color of the tab.\n * @default pill\n */\n @property({ type: String, reflect: true })\n variant: Variant = DEFAULTS.VARIANT;\n\n /**\n * @internal\n */\n private prevIconName?: string;\n\n constructor() {\n super();\n this.role = 'tab';\n this.softDisabled = undefined as unknown as boolean;\n this.size = undefined as unknown as ButtonSize;\n this.type = undefined as unknown as ButtonType;\n }\n\n /**\n * Modifies the icon name based on the active state.\n * If the tab is active, the icon name is suffixed with '-filled'.\n * If the tab is inactive, the icon name is restored to its original value.\n * If '-filled' icon is not available, the icon name remains unchanged.\n *\n * @param active - The active state.\n */\n\n private modifyIconName(active: boolean): void {\n if (this.iconName) {\n if (active) {\n this.prevIconName = this.iconName;\n this.iconName = `${getIconNameWithoutStyle(this.iconName)}-filled` as IconNames;\n } else if (this.prevIconName) {\n this.iconName = this.prevIconName as IconNames;\n }\n }\n }\n\n /**\n * Sets the variant attribute for the tab component.\n * If the provided variant is not included in the TAB_VARIANTS,\n * it defaults to the value specified in DEFAULTS.VARIANT.\n *\n * @param variant - The variant to set.\n */\n private setVariant(variant: Variant): void {\n this.setAttribute('variant', Object.values(TAB_VARIANTS).includes(variant) ? variant : DEFAULTS.VARIANT);\n }\n\n /**\n * Sets the aria-selected attribute based on the active state of the Tab.\n * If the tab is active, the filled version of the icon is displayed,\n * else the icon is restored to its original value.\n *\n * @param element - The tab element.\n * @param active - The active state of the tab.\n */\n protected override setActive(element: HTMLElement, active: boolean) {\n element.setAttribute('aria-selected', active ? 'true' : 'false');\n this.modifyIconName(active);\n }\n\n protected override executeAction() {\n // Toggle the active state of the tab.\n this.active = !this.active;\n }\n\n public override update(changedProperties: PropertyValues): void {\n super.update(changedProperties);\n if (changedProperties.has('variant')) {\n this.setVariant(this.variant);\n }\n }\n\n public override render() {\n return html`\n <div part=\"container\">\n ${this.iconName\n ? html` <mdc-icon name=\"${this.iconName as IconNames}\" size=\"1\" length-unit=\"rem\" part=\"icon\"></mdc-icon>`\n : nothing}\n ${this.text\n ? html` <mdc-text\n type=${this.active ? TYPE.BODY_MIDSIZE_BOLD : TYPE.BODY_MIDSIZE_MEDIUM}\n tagname=${VALID_TEXT_TAGS.SPAN}\n data-text=${this.text}\n part=\"text\"\n >${this.text}</mdc-text\n >`\n : nothing}\n <slot name=\"badge\"></slot>\n <slot name=\"chip\"></slot>\n </div>\n <div part=\"indicator\"></div>\n `;\n }\n\n public static override styles: Array<CSSResult> = [...Buttonsimple.styles, ...styles];\n}\n\nexport default Tab;\n", "import Tab from './tab.component';\nimport { TAG_NAME } from './tab.constants';\nimport '../icon';\nimport '../text';\n\nTab.register(TAG_NAME);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n ['mdc-tab']: Tab\n }\n}\n\nexport default Tab;\n", "/* eslint-disable implicit-arrow-linebreak */\nimport utils from '../../utils/tag-name';\n\nconst TAG_NAME = utils.constructTagName('themeprovider');\n\nconst DEFAULTS = {\n THEMECLASS: 'mds-theme-stable-darkWebex' as const,\n} as const;\n\nexport { DEFAULTS, TAG_NAME };\n", "import { createContext } from '@lit/context';\n\nimport { TAG_NAME } from './themeprovider.constants';\n\nclass ThemeProviderContext {\n public themeclass?: string;\n\n // create typed lit context as part of the ThemeProviderContext\n public static context = createContext<ThemeProviderContext>(TAG_NAME);\n\n // constructor to allow setting the defaultThemeClass\n constructor(defaultThemeClass?: string) {\n this.themeclass = defaultThemeClass;\n }\n}\n\nexport default ThemeProviderContext;\n", "import { css } from 'lit';\n\nconst styles = css`\n :host {\n --mdc-themeprovider-color-default: var(--mds-color-theme-text-primary-normal);\n --mdc-themeprovider-font-family: var(--mds-font-family-primary);\n --mdc-themeprovider-font-weight: 400;\n /* adjusting Inter's letter spacing to better match the old CiscoSans */\n --mdc-themeprovider-letter-spacing-adjustment: -0.25px;\n /* Adjusting font feature settings for accessibility reasons */\n --mdc-themeprovider-font-feature-settings: \"ss02\" on;\n\n /* Custom scrollbar variables */\n --mdc-themeprovider-scrollbar-track-color: var(--mds-color-theme-background-secondary-normal);\n --mdc-themeprovider-scrollbar-thumb-color: var(--mds-color-theme-scrollbar-button-normal);\n --mdc-themeprovider-scrollbar-thumb-hover-color: var(--mds-color-theme-scrollbar-button-hover);\n --mdc-themeprovider-scrollbar-thumb-active-color: var(--mds-color-theme-scrollbar-button-pressed);\n \n color: var(--mdc-themeprovider-color-default);\n font-family: var(--mdc-themeprovider-font-family);\n font-weight: var(--mdc-themeprovider-font-weight);\n letter-spacing: var(--mdc-themeprovider-letter-spacing-adjustment);\n\n font-feature-settings: var(--mdc-themeprovider-font-feature-settings);\n }\n \n/** Scrollbar Theme for Chrome, Edge, and Firefox. This has limited support on other browsers.\n https://developer.mozilla.org/en-US/docs/Web/CSS/scrollbar-color for more details */\n * {\n scrollbar-color: var(--mdc-themeprovider-scrollbar-thumb-color) var(--mdc-themeprovider-scrollbar-track-color);\n }\n`;\n\nexport default [styles];\n", "import { property, state } from 'lit/decorators.js';\nimport { CSSResult } from 'lit';\nimport { DEFAULTS } from './themeprovider.constants';\nimport { Provider } from '../../models';\nimport ThemeProviderContext from './themeprovider.context';\nimport styles from './themeprovider.styles';\n\n/**\n * ThemeProvider component, which sets the passed in themeclass as class.\n * If the themeclass switches, the existing themeclass will be removed as a class\n * and the new themeclass will be added.\n *\n * CSS variables defined in the themeclass will be used for the styling of child dom nodes.\n *\n * Themeclass context can be be consumed from Lit child components\n * (see providerUtils.consume for how to consume)\n *\n * ThemeProvider also includes basic font defaults for text.\n *\n * @tagname mdc-themeprovider\n *\n * @slot - children\n *\n * @cssproperty --mdc-themeprovider-color-default - Option to override the default color,\n * default: color-theme-text-primary-normal\n * @cssproperty --mdc-themeprovider-font-family - Option to override the font family,\n * default: `Momentum` (from momentum-design/fonts)\n * @cssproperty --mdc-themeprovider-font-weight - Option to override the font weight, default: `400`\n * @cssproperty --mdc-themeprovider-letter-spacing-adjustment - Option to override the default letter-spacing,\n * default: `-0.25px` (this is to match the old CiscoSans)\n * @cssproperty --mdc-themeprovider-font-feature-settings - Option to override the font feature settings,\n * default: `\"ss02\" on`\n * @cssproperty --mdc-themeprovider-scrollbar-track-color - Option to override the color of the scrollbar track.\n * @cssproperty --mdc-themeprovider-scrollbar-thumb-color - Option to override the color of the scrollbar thumb.\n * @cssproperty --mdc-themeprovider-scrollbar-thumb-hover-color - Option to override the color of the\n * scrollbar thumb on hover. Applicable only on webkit browsers.\n * @cssproperty --mdc-themeprovider-scrollbar-thumb-active-color - Option to override the color of the\n * scrollbar thumb on press. Applicable only on webkit browsers.\n */\nclass ThemeProvider extends Provider<ThemeProviderContext> {\n constructor() {\n super({\n context: ThemeProviderContext.context,\n initialValue: new ThemeProviderContext(DEFAULTS.THEMECLASS),\n });\n }\n\n /**\n * Context object of the ThemeProvider, to be consumed by child components\n */\n public static get Context() {\n return ThemeProviderContext.context;\n }\n\n /**\n * To keep track of the current theme class\n * @internal\n */\n @state()\n private currentThemeClass?: string;\n\n /**\n * Current theme class\n *\n * Has to be fully qualified, such that\n * the theme class matches the class of the respective\n * theme stylesheet\n *\n * Default: 'mds-theme-stable-darkWebex'\n */\n @property({ type: String })\n themeclass: string = DEFAULTS.THEMECLASS;\n\n protected override updated(changedProperties: Map<string, any>) {\n super.updated(changedProperties);\n\n if (changedProperties.has('themeclass')) {\n this.setThemeInClassList();\n this.currentThemeClass = this.themeclass;\n }\n }\n\n /**\n * Update all observing components of this\n * provider to update the themeclass\n *\n * Is called on every re-render, see Provider class\n */\n protected updateContext(): void {\n if (this.context.value.themeclass !== this.themeclass) {\n this.context.value.themeclass = this.themeclass;\n\n this.context.updateObservers();\n }\n }\n\n /**\n * Function to update the active theme classnames to update the theme tokens\n * as CSS variables on the web component.\n */\n private setThemeInClassList() {\n // remove all existing theme classes from the classList:\n if (this.currentThemeClass) {\n this.classList.remove(...this.currentThemeClass.split(' '));\n }\n // add current theme class to classList:\n if (this.themeclass) {\n this.classList.add(...this.themeclass.split(' '));\n }\n }\n\n public static override styles: Array<CSSResult> = [...Provider.styles, ...styles];\n}\n\nexport default ThemeProvider;\n", "import ThemeProvider from './themeprovider.component';\nimport { TAG_NAME } from './themeprovider.constants';\n\nThemeProvider.register(TAG_NAME);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n ['mdc-themeprovider']: ThemeProvider\n }\n}\n\nexport default ThemeProvider;\n", "import { css } from 'lit';\nimport { hostFitContentStyles, hostFocusRingStyles } from '../../utils/styles';\n\nconst styles = [hostFitContentStyles, css`\n :host {\n --mdc-toggle-width: 3rem;\n --mdc-toggle-height: 1.5rem;\n --mdc-toggle-width-compact: 2rem;\n --mdc-toggle-height-compact: 1rem;\n --mdc-toggle-border-radius: 0.75rem;\n --mdc-toggle-border-radius-compact: 0.5rem;\n --mdc-toggle-border: 0.0625rem solid var(--mds-color-theme-outline-input-normal);\n\n --mdc-toggle-inactive-rest-color: var(--mds-color-theme-control-inactive-normal);\n --mdc-toggle-inactive-hover-color: var(--mds-color-theme-control-inactive-hover);\n --mdc-toggle-inactive-pressed-color: var(--mds-color-theme-control-inactive-pressed);\n --mdc-toggle-inactive-disabled-color: var(--mds-color-theme-control-inactive-disabled);\n --mdc-toggle-active-rest-color: var(--mds-color-theme-control-active-normal);\n --mdc-toggle-active-hover-color: var(--mds-color-theme-control-active-hover);\n --mdc-toggle-active-pressed-color: var(--mds-color-theme-control-active-pressed);\n --mdc-toggle-active-disabled-color: var(--mds-color-theme-control-active-disabled);\n\n --mdc-toggle-label-lineheight: var(--mds-font-lineheight-body-midsize);\n --mdc-toggle-label-fontsize: var(--mds-font-size-body-midsize);\n --mdc-toggle-label-fontweight: 400;\n --mdc-toggle-label-color-disabled: var(--mds-color-theme-text-primary-disabled);\n --mdc-toggle-help-text-color: var(--mds-color-theme-text-secondary-normal);\n\n --mdc-toggle-icon-color-normal: var(--mds-color-theme-common-inverted-text-primary-normal);\n --mdc-toggle-icon-color-disabled: var(--mds-color-theme-common-inverted-text-primary-disabled);\n --mdc-toggle-icon-background-color-normal: var(--mds-color-theme-common-text-primary-normal);\n --mdc-toggle-icon-background-color-disabled: var(--mds-color-theme-common-text-primary-disabled);\n }\n\n :host([label]), :host([help-text]){\n display: grid;\n grid-template-rows: auto auto;\n grid-template-columns: auto auto;\n column-gap: 0.75rem;\n row-gap: 0.25rem;\n }\n\n :host([help-text='']) {\n grid-template-rows: auto;\n row-gap: 0rem;\n }\n\n .mdc-toggle__container {\n position: relative;\n border-radius: var(--mdc-toggle-border-radius);\n }\n\n .mdc-toggle__input {\n opacity: 0;\n position: absolute;\n cursor: pointer;\n margin: 0;\n width: var(--mdc-toggle-width);\n height: var(--mdc-toggle-height);\n }\n\n .mdc-toggle__slider {\n width: var(--mdc-toggle-width);\n height: var(--mdc-toggle-height);\n background: var(--mdc-toggle-inactive-rest-color);\n border-radius: var(--mdc-toggle-border-radius);\n border: var(--mdc-toggle-border);\n display: flex;\n align-items: center;\n justify-content: flex-start;\n transition: background-color 0.3s ease;\n outline: none;\n padding: 0.0625rem;\n }\n\n :host([checked]) .mdc-toggle__slider {\n background-color: var(--mdc-toggle-active-rest-color);\n justify-content: flex-end;\n border-color: transparent;\n }\n\n :host([size='compact']) .mdc-toggle__slider {\n width: var(--mdc-toggle-width-compact);\n height: var(--mdc-toggle-height-compact);\n border-radius: var(--mdc-toggle-border-radius-compact);\n }\n :host([size='compact']) .mdc-toggle__input {\n width: var(--mdc-toggle-width-compact);\n height: var(--mdc-toggle-height-compact);\n }\n\n .mdc-toggle__icon {\n padding: 0.25rem;\n --mdc-icon-fill-color: var(--mdc-toggle-icon-color-normal);\n background-color: var(--mdc-toggle-icon-background-color-normal);\n border-radius: 50%;\n }\n\n :host([disabled]) .mdc-toggle__icon {\n --mdc-icon-fill-color: var(--mdc-toggle-icon-color-disabled);\n }\n\n :host([size='compact']) .mdc-toggle__icon {\n padding: 0.125rem;\n }\n\n :host(:not([disabled])) .mdc-toggle__container:hover .mdc-toggle__slider {\n background-color: var(--mdc-toggle-inactive-hover-color);\n }\n\n :host(:not([disabled])) .mdc-toggle__container:active .mdc-toggle__slider {\n background-color: var(--mdc-toggle-inactive-pressed-color);\n }\n\n :host(:not([disabled])[checked]) .mdc-toggle__container:hover .mdc-toggle__slider {\n background-color: var(--mdc-toggle-active-hover-color);\n }\n\n :host(:not([disabled])[checked]) .mdc-toggle__container:active .mdc-toggle__slider {\n background-color: var(--mdc-toggle-active-pressed-color);\n }\n\n :host([disabled]) .mdc-toggle__slider {\n background-color: var(--mdc-toggle-inactive-disabled-color);\n }\n\n :host([disabled][checked]) .mdc-toggle__slider {\n background-color: var(--mdc-toggle-active-disabled-color);\n }\n\n :host([disabled]) .mdc-toggle__icon {\n background-color: var(--mdc-toggle-icon-background-color-disabled);\n }\n\n .mdc-label-text, .mdc-help-text {\n font-size: var(--mdc-toggle-label-fontsize);\n font-weight: var(--mdc-toggle-label-fontweight);\n line-height: var(--mdc-toggle-label-lineheight);\n grid-column: 2;\n }\n\n .mdc-help-text {\n color: var(--mdc-toggle-help-text-color);\n }\n\n :host([disabled]) .mdc-label-text, :host([disabled]) .mdc-help-text {\n color: var(--mdc-toggle-label-color-disabled);\n }\n\n /* High Contrast Mode */\n @media (forced-colors: active) {\n :host([checked]) .mdc-toggle__slider, .mdc-toggle__icon {\n border: var(--mdc-toggle-border);\n }\n }\n`, ...hostFocusRingStyles(true)];\n\nexport default styles;\n", "import utils from '../../utils/tag-name';\nimport type { IconNames } from '../icon/icon.types';\n\nconst TAG_NAME = utils.constructTagName('toggle');\n\nconst TOGGLE_SIZE = {\n DEFAULT: 'default',\n COMPACT: 'compact',\n} as const;\n\nconst ICON_NAME = {\n CHECKED: 'check-bold' as Extract<IconNames, 'check-bold'>,\n UNCHECKED: 'cancel-bold' as Extract<IconNames, 'cancel-bold'>,\n} as const;\n\nconst ICON_SIZE_IN_REM = {\n compact: 0.75,\n default: 1.25,\n};\n\nconst DEFAULTS = {\n SIZE: TOGGLE_SIZE.DEFAULT,\n VALIDATION_MESSAGE: 'Please toggle this switch if you want to proceed.',\n} as const;\n\nexport { TAG_NAME, DEFAULTS, TOGGLE_SIZE, ICON_NAME, ICON_SIZE_IN_REM };\n", "import { CSSResult, html, PropertyValueMap } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport styles from './toggle.styles';\nimport FormfieldWrapper from '../formfieldwrapper';\nimport { DEFAULTS as FORMFIELD_DEFAULTS } from '../formfieldwrapper/formfieldwrapper.constants';\nimport { DEFAULTS, ICON_NAME, ICON_SIZE_IN_REM, TOGGLE_SIZE } from './toggle.constants';\nimport { ToggleSize } from './toggle.types';\nimport type { ValidationType } from '../formfieldwrapper/formfieldwrapper.types';\nimport { DataAriaLabelMixin } from '../../utils/mixins/DataAriaLabelMixin';\nimport { AssociatedFormControl, FormInternalsMixin } from '../../utils/mixins/FormInternalsMixin';\n\n/**\n * Toggle Component is an interactive control used to switch between two mutually exclusive options,\n * such as On/Off, Active/Inactive. These are commonly used in settings panels, forms, and preference selections\n * where users need to enable or disable a feature.\n * It contains an optional label and an optional helper text.\n *\n * To create a group of toggles, use the FormFieldGroup component.\n *\n * Note: It internally renders a checkbox styled as a toggle switch.\n *\n * @dependency mdc-icon\n *\n * @tagname mdc-toggle\n *\n * @event change - (React: onChange) Event that gets dispatched when the toggle state changes.\n * @event focus - (React: onFocus) Event that gets dispatched when the toggle receives focus.\n *\n * @cssproperty --mdc-toggle-width - width of the toggle\n * @cssproperty --mdc-toggle-height - height of the toggle\n * @cssproperty --mdc-toggle-width-compact - width of the toggle when it's size is compact\n * @cssproperty --mdc-toggle-height-compact - height of the toggle when it's size is compact\n * @cssproperty --mdc-toggle-border-radius - border radius of the toggle\n * @cssproperty --mdc-toggle-border-radius-compact - border radius of the toggle when it's size is compact\n * @cssproperty --mdc-toggle-border - border of the toggle\n * @cssproperty --mdc-toggle-inactive-rest-color - background color of the inactive toggle in rest state\n * @cssproperty --mdc-toggle-inactive-hover-color - background color of the inactive toggle in hover state\n * @cssproperty --mdc-toggle-inactive-pressed-color - background color of the inactive toggle in pressed state\n * @cssproperty --mdc-toggle-inactive-disabled-color - background color of the inactive toggle in disabled state\n * @cssproperty --mdc-toggle-active-rest-color - background color of the active toggle in rest state\n * @cssproperty --mdc-toggle-active-hover-color - background color of the active toggle in hover state\n * @cssproperty --mdc-toggle-active-pressed-color - background color of the active toggle in pressed state\n * @cssproperty --mdc-toggle-active-disabled-color - background color of the active toggle in disabled state\n * @cssproperty --mdc-toggle-help-text-color - color of the help text label\n * @cssproperty --mdc-toggle-label-color-disabled - color of the toggle label and help text in disabled state\n *\n */\nclass Toggle extends FormInternalsMixin(DataAriaLabelMixin(FormfieldWrapper)) implements AssociatedFormControl {\n /**\n * Determines whether the toggle is active or inactive.\n * @default false\n */\n @property({ type: Boolean, reflect: true })\n checked = false;\n\n /**\n * Determines toggle size in rem (height is specified here).\n * - **Default**: 1.5\n * - **Compact**: 1\n * @default default\n */\n @property({ type: String, reflect: true })\n size: ToggleSize = DEFAULTS.SIZE;\n\n /**\n * Automatically focus on the element when the page loads.\n * [MDN Reference](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/autofocus)\n * @default false\n */\n @property({ type: Boolean, reflect: true }) override autofocus = false;\n\n constructor() {\n super();\n // Toggle does not contain helpTextType property.\n this.helpTextType = undefined as unknown as ValidationType;\n }\n\n /** @internal\n * Resets the checkbox to its initial state.\n * The checked property is set to false.\n */\n formResetCallback(): void {\n this.checked = false;\n }\n\n /** @internal */\n formStateRestoreCallback(\n state: string,\n ): void {\n if (state) {\n this.checked = true;\n }\n }\n\n /**\n * Manages the required state of the checkbox.\n * If the checkbox is not checked and the requiredLabel property is set, then the checkbox is invalid.\n */\n private manageRequired() {\n if (!this.checked && this.requiredLabel) {\n if (this.validationMessage) {\n this.inputElement.setCustomValidity(this.validationMessage);\n } else {\n this.inputElement.setCustomValidity('');\n }\n this.setValidity();\n } else {\n this.internals.setValidity({});\n }\n }\n\n /**\n * Updates the form value to reflect the current state of the toggle.\n * If toggle is switched on, the value is set to either the user-provided value or 'isActive' if no value is provided.\n * If toggle is switched off, the value is set to null.\n */\n private setFormValue() {\n let actualValue: string | null = null;\n\n if (this.checked) {\n actualValue = !this.value ? 'isActive' : this.value;\n } else {\n actualValue = null;\n }\n\n this.manageRequired();\n\n this.internals.setFormValue(actualValue);\n }\n\n /**\n * Toggles the state of the toggle element.\n * If the element is not disabled, then the checked property is toggled.\n */\n private toggleState(): void {\n if (!this.disabled) {\n this.checked = !this.checked;\n }\n }\n\n /**\n * Handles the keydown event on the toggle element.\n * When the user presses Enter, the form is submitted.\n * @param event - The keyboard event.\n */\n private handleKeyDown(event: KeyboardEvent): void {\n if (event.key === 'Enter') {\n this.form?.requestSubmit();\n }\n }\n\n /**\n * Toggles the state of the toggle element.\n * and dispatch the new change event.\n */\n private handleChange(event: Event) {\n this.toggleState();\n const EventConstructor = event.constructor as typeof Event;\n this.dispatchEvent(new EventConstructor(event.type, event));\n }\n\n /**\n * Sets the size attribute for the toggle component.\n * If the provided size is not included in the TOGGLE_SIZE,\n * it defaults to the value specified in DEFAULTS.SIZE.\n *\n * @param size - The size to set.\n */\n private setToggleSize(size: ToggleSize) {\n this.setAttribute('size', Object.values(TOGGLE_SIZE).includes(size) ? size : DEFAULTS.SIZE);\n }\n\n public override update(changedProperties: PropertyValueMap<any> | Map<PropertyKey, unknown>): void {\n super.update(changedProperties);\n\n if (changedProperties.has('checked')) {\n this.setFormValue();\n }\n\n if (changedProperties.has('size')) {\n this.setToggleSize(this.size);\n }\n }\n\n public override render() {\n return html`\n <div class=\"mdc-toggle__container mdc-focus-ring\">\n <input\n id=\"${this.id}\"\n type=\"checkbox\"\n class=\"mdc-toggle__input\"\n role=\"switch\"\n ?autofocus=\"${this.autofocus}\"\n ?required=\"${!!this.requiredLabel}\"\n name=\"${ifDefined(this.name)}\"\n value=\"${ifDefined(this.value)}\"\n .checked=\"${this.checked}\"\n aria-checked=\"${this.checked}\"\n .disabled=\"${this.disabled}\"\n aria-describedby=\"${ifDefined(this.helpText ? FORMFIELD_DEFAULTS.HELPER_TEXT_ID : '')}\"\n aria-label=\"${this.dataAriaLabel ?? ''}\"\n tabindex=\"${this.disabled ? -1 : 0}\"\n @change=\"${this.handleChange}\"\n @keydown=\"${this.handleKeyDown}\"\n />\n <div class=\"mdc-toggle__slider\">\n <mdc-icon\n name=\"${this.checked ? ICON_NAME.CHECKED : ICON_NAME.UNCHECKED}\"\n class=\"mdc-toggle__icon\"\n length-unit=\"rem\"\n size=\"${ICON_SIZE_IN_REM[this.size]}\"\n ></mdc-icon>\n </div>\n </div>\n ${this.renderLabel()}\n ${this.renderHelperText()}\n `;\n }\n\n public static override styles: Array<CSSResult> = [...FormfieldWrapper.styles, ...styles];\n}\n\nexport default Toggle;\n", "import Toggle from './toggle.component';\nimport { TAG_NAME } from './toggle.constants';\nimport '../icon';\n\nToggle.register(TAG_NAME);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n ['mdc-toggle']: Toggle\n }\n}\n\nexport default Toggle;\n", "export type NoInfer<A extends any> = [A][A extends any ? 0 : never]\n\nexport type PartialKeys<T, K extends keyof T> = Omit<T, K> & Partial<Pick<T, K>>\n\nexport function memo<TDeps extends ReadonlyArray<any>, TResult>(\n getDeps: () => [...TDeps],\n fn: (...args: NoInfer<[...TDeps]>) => TResult,\n opts: {\n key: false | string\n debug?: () => boolean\n onChange?: (result: TResult) => void\n initialDeps?: TDeps\n },\n) {\n let deps = opts.initialDeps ?? []\n let result: TResult | undefined\n\n return (): TResult => {\n let depTime: number\n if (opts.key && opts.debug?.()) depTime = Date.now()\n\n const newDeps = getDeps()\n\n const depsChanged =\n newDeps.length !== deps.length ||\n newDeps.some((dep: any, index: number) => deps[index] !== dep)\n\n if (!depsChanged) {\n return result!\n }\n\n deps = newDeps\n\n let resultTime: number\n if (opts.key && opts.debug?.()) resultTime = Date.now()\n\n result = fn(...newDeps)\n\n if (opts.key && opts.debug?.()) {\n const depEndTime = Math.round((Date.now() - depTime!) * 100) / 100\n const resultEndTime = Math.round((Date.now() - resultTime!) * 100) / 100\n const resultFpsPercentage = resultEndTime / 16\n\n const pad = (str: number | string, num: number) => {\n str = String(str)\n while (str.length < num) {\n str = ' ' + str\n }\n return str\n }\n\n console.info(\n `%c⏱ ${pad(resultEndTime, 5)} /${pad(depEndTime, 5)} ms`,\n `\n font-size: .6rem;\n font-weight: bold;\n color: hsl(${Math.max(\n 0,\n Math.min(120 - 120 * resultFpsPercentage, 120),\n )}deg 100% 31%);`,\n opts?.key,\n )\n }\n\n opts?.onChange?.(result)\n\n return result\n }\n}\n\nexport function notUndefined<T>(value: T | undefined, msg?: string): T {\n if (value === undefined) {\n throw new Error(`Unexpected undefined${msg ? `: ${msg}` : ''}`)\n } else {\n return value\n }\n}\n\nexport const approxEqual = (a: number, b: number) => Math.abs(a - b) < 1\n\nexport const debounce = (\n targetWindow: Window & typeof globalThis,\n fn: Function,\n ms: number,\n) => {\n let timeoutId: number\n return function (this: any, ...args: Array<any>) {\n targetWindow.clearTimeout(timeoutId)\n timeoutId = targetWindow.setTimeout(() => fn.apply(this, args), ms)\n }\n}\n", "import { approxEqual, debounce, memo, notUndefined } from './utils'\n\nexport * from './utils'\n\n//\n\ntype ScrollDirection = 'forward' | 'backward'\n\ntype ScrollAlignment = 'start' | 'center' | 'end' | 'auto'\n\ntype ScrollBehavior = 'auto' | 'smooth'\n\nexport interface ScrollToOptions {\n align?: ScrollAlignment\n behavior?: ScrollBehavior\n}\n\ntype ScrollToOffsetOptions = ScrollToOptions\n\ntype ScrollToIndexOptions = ScrollToOptions\n\nexport interface Range {\n startIndex: number\n endIndex: number\n overscan: number\n count: number\n}\n\ntype Key = number | string | bigint\n\nexport interface VirtualItem {\n key: Key\n index: number\n start: number\n end: number\n size: number\n lane: number\n}\n\nexport interface Rect {\n width: number\n height: number\n}\n\n//\n\nexport const defaultKeyExtractor = (index: number) => index\n\nexport const defaultRangeExtractor = (range: Range) => {\n const start = Math.max(range.startIndex - range.overscan, 0)\n const end = Math.min(range.endIndex + range.overscan, range.count - 1)\n\n const arr = []\n\n for (let i = start; i <= end; i++) {\n arr.push(i)\n }\n\n return arr\n}\n\nexport const observeElementRect = <T extends Element>(\n instance: Virtualizer<T, any>,\n cb: (rect: Rect) => void,\n) => {\n const element = instance.scrollElement\n if (!element) {\n return\n }\n const targetWindow = instance.targetWindow\n if (!targetWindow) {\n return\n }\n\n const handler = (rect: Rect) => {\n const { width, height } = rect\n cb({ width: Math.round(width), height: Math.round(height) })\n }\n\n handler(element.getBoundingClientRect())\n\n if (!targetWindow.ResizeObserver) {\n return () => {}\n }\n\n const observer = new targetWindow.ResizeObserver((entries) => {\n const entry = entries[0]\n if (entry?.borderBoxSize) {\n const box = entry.borderBoxSize[0]\n if (box) {\n handler({ width: box.inlineSize, height: box.blockSize })\n return\n }\n }\n handler(element.getBoundingClientRect())\n })\n\n observer.observe(element, { box: 'border-box' })\n\n return () => {\n observer.unobserve(element)\n }\n}\n\nconst addEventListenerOptions = {\n passive: true,\n}\n\nexport const observeWindowRect = (\n instance: Virtualizer<Window, any>,\n cb: (rect: Rect) => void,\n) => {\n const element = instance.scrollElement\n if (!element) {\n return\n }\n\n const handler = () => {\n cb({ width: element.innerWidth, height: element.innerHeight })\n }\n handler()\n\n element.addEventListener('resize', handler, addEventListenerOptions)\n\n return () => {\n element.removeEventListener('resize', handler)\n }\n}\n\nconst supportsScrollend =\n typeof window == 'undefined' ? true : 'onscrollend' in window\n\ntype ObserveOffsetCallBack = (offset: number, isScrolling: boolean) => void\n\nexport const observeElementOffset = <T extends Element>(\n instance: Virtualizer<T, any>,\n cb: ObserveOffsetCallBack,\n) => {\n const element = instance.scrollElement\n if (!element) {\n return\n }\n const targetWindow = instance.targetWindow\n if (!targetWindow) {\n return\n }\n\n let offset = 0\n const fallback =\n instance.options.useScrollendEvent && supportsScrollend\n ? () => undefined\n : debounce(\n targetWindow,\n () => {\n cb(offset, false)\n },\n instance.options.isScrollingResetDelay,\n )\n\n const createHandler = (isScrolling: boolean) => () => {\n const { horizontal, isRtl } = instance.options\n offset = horizontal\n ? element['scrollLeft'] * ((isRtl && -1) || 1)\n : element['scrollTop']\n fallback()\n cb(offset, isScrolling)\n }\n const handler = createHandler(true)\n const endHandler = createHandler(false)\n endHandler()\n\n element.addEventListener('scroll', handler, addEventListenerOptions)\n element.addEventListener('scrollend', endHandler, addEventListenerOptions)\n\n return () => {\n element.removeEventListener('scroll', handler)\n element.removeEventListener('scrollend', endHandler)\n }\n}\n\nexport const observeWindowOffset = (\n instance: Virtualizer<Window, any>,\n cb: ObserveOffsetCallBack,\n) => {\n const element = instance.scrollElement\n if (!element) {\n return\n }\n const targetWindow = instance.targetWindow\n if (!targetWindow) {\n return\n }\n\n let offset = 0\n const fallback =\n instance.options.useScrollendEvent && supportsScrollend\n ? () => undefined\n : debounce(\n targetWindow,\n () => {\n cb(offset, false)\n },\n instance.options.isScrollingResetDelay,\n )\n\n const createHandler = (isScrolling: boolean) => () => {\n offset = element[instance.options.horizontal ? 'scrollX' : 'scrollY']\n fallback()\n cb(offset, isScrolling)\n }\n const handler = createHandler(true)\n const endHandler = createHandler(false)\n endHandler()\n\n element.addEventListener('scroll', handler, addEventListenerOptions)\n element.addEventListener('scrollend', endHandler, addEventListenerOptions)\n\n return () => {\n element.removeEventListener('scroll', handler)\n element.removeEventListener('scrollend', endHandler)\n }\n}\n\nexport const measureElement = <TItemElement extends Element>(\n element: TItemElement,\n entry: ResizeObserverEntry | undefined,\n instance: Virtualizer<any, TItemElement>,\n) => {\n if (entry?.borderBoxSize) {\n const box = entry.borderBoxSize[0]\n if (box) {\n const size = Math.round(\n box[instance.options.horizontal ? 'inlineSize' : 'blockSize'],\n )\n return size\n }\n }\n return Math.round(\n element.getBoundingClientRect()[\n instance.options.horizontal ? 'width' : 'height'\n ],\n )\n}\n\nexport const windowScroll = <T extends Window>(\n offset: number,\n {\n adjustments = 0,\n behavior,\n }: { adjustments?: number; behavior?: ScrollBehavior },\n instance: Virtualizer<T, any>,\n) => {\n const toOffset = offset + adjustments\n\n instance.scrollElement?.scrollTo?.({\n [instance.options.horizontal ? 'left' : 'top']: toOffset,\n behavior,\n })\n}\n\nexport const elementScroll = <T extends Element>(\n offset: number,\n {\n adjustments = 0,\n behavior,\n }: { adjustments?: number; behavior?: ScrollBehavior },\n instance: Virtualizer<T, any>,\n) => {\n const toOffset = offset + adjustments\n\n instance.scrollElement?.scrollTo?.({\n [instance.options.horizontal ? 'left' : 'top']: toOffset,\n behavior,\n })\n}\n\nexport interface VirtualizerOptions<\n TScrollElement extends Element | Window,\n TItemElement extends Element,\n> {\n // Required from the user\n count: number\n getScrollElement: () => TScrollElement | null\n estimateSize: (index: number) => number\n\n // Required from the framework adapter (but can be overridden)\n scrollToFn: (\n offset: number,\n options: { adjustments?: number; behavior?: ScrollBehavior },\n instance: Virtualizer<TScrollElement, TItemElement>,\n ) => void\n observeElementRect: (\n instance: Virtualizer<TScrollElement, TItemElement>,\n cb: (rect: Rect) => void,\n ) => void | (() => void)\n observeElementOffset: (\n instance: Virtualizer<TScrollElement, TItemElement>,\n cb: ObserveOffsetCallBack,\n ) => void | (() => void)\n // Optional\n debug?: boolean\n initialRect?: Rect\n onChange?: (\n instance: Virtualizer<TScrollElement, TItemElement>,\n sync: boolean,\n ) => void\n measureElement?: (\n element: TItemElement,\n entry: ResizeObserverEntry | undefined,\n instance: Virtualizer<TScrollElement, TItemElement>,\n ) => number\n overscan?: number\n horizontal?: boolean\n paddingStart?: number\n paddingEnd?: number\n scrollPaddingStart?: number\n scrollPaddingEnd?: number\n initialOffset?: number | (() => number)\n getItemKey?: (index: number) => Key\n rangeExtractor?: (range: Range) => Array<number>\n scrollMargin?: number\n gap?: number\n indexAttribute?: string\n initialMeasurementsCache?: Array<VirtualItem>\n lanes?: number\n isScrollingResetDelay?: number\n useScrollendEvent?: boolean\n enabled?: boolean\n isRtl?: boolean\n}\n\nexport class Virtualizer<\n TScrollElement extends Element | Window,\n TItemElement extends Element,\n> {\n private unsubs: Array<void | (() => void)> = []\n options!: Required<VirtualizerOptions<TScrollElement, TItemElement>>\n scrollElement: TScrollElement | null = null\n targetWindow: (Window & typeof globalThis) | null = null\n isScrolling = false\n private scrollToIndexTimeoutId: number | null = null\n measurementsCache: Array<VirtualItem> = []\n private itemSizeCache = new Map<Key, number>()\n private pendingMeasuredCacheIndexes: Array<number> = []\n scrollRect: Rect | null = null\n scrollOffset: number | null = null\n scrollDirection: ScrollDirection | null = null\n private scrollAdjustments = 0\n shouldAdjustScrollPositionOnItemSizeChange:\n | undefined\n | ((\n item: VirtualItem,\n delta: number,\n instance: Virtualizer<TScrollElement, TItemElement>,\n ) => boolean)\n elementsCache = new Map<Key, TItemElement>()\n private observer = (() => {\n let _ro: ResizeObserver | null = null\n\n const get = () => {\n if (_ro) {\n return _ro\n }\n\n if (!this.targetWindow || !this.targetWindow.ResizeObserver) {\n return null\n }\n\n return (_ro = new this.targetWindow.ResizeObserver((entries) => {\n entries.forEach((entry) => {\n this._measureElement(entry.target as TItemElement, entry)\n })\n }))\n }\n\n return {\n disconnect: () => {\n get()?.disconnect()\n _ro = null\n },\n observe: (target: Element) =>\n get()?.observe(target, { box: 'border-box' }),\n unobserve: (target: Element) => get()?.unobserve(target),\n }\n })()\n range: { startIndex: number; endIndex: number } | null = null\n\n constructor(opts: VirtualizerOptions<TScrollElement, TItemElement>) {\n this.setOptions(opts)\n }\n\n setOptions = (opts: VirtualizerOptions<TScrollElement, TItemElement>) => {\n Object.entries(opts).forEach(([key, value]) => {\n if (typeof value === 'undefined') delete (opts as any)[key]\n })\n\n this.options = {\n debug: false,\n initialOffset: 0,\n overscan: 1,\n paddingStart: 0,\n paddingEnd: 0,\n scrollPaddingStart: 0,\n scrollPaddingEnd: 0,\n horizontal: false,\n getItemKey: defaultKeyExtractor,\n rangeExtractor: defaultRangeExtractor,\n onChange: () => {},\n measureElement,\n initialRect: { width: 0, height: 0 },\n scrollMargin: 0,\n gap: 0,\n indexAttribute: 'data-index',\n initialMeasurementsCache: [],\n lanes: 1,\n isScrollingResetDelay: 150,\n enabled: true,\n isRtl: false,\n useScrollendEvent: true,\n ...opts,\n }\n }\n\n private notify = (sync: boolean) => {\n this.options.onChange?.(this, sync)\n }\n\n private maybeNotify = memo(\n () => {\n this.calculateRange()\n\n return [\n this.isScrolling,\n this.range ? this.range.startIndex : null,\n this.range ? this.range.endIndex : null,\n ]\n },\n (isScrolling) => {\n this.notify(isScrolling)\n },\n {\n key: process.env.NODE_ENV !== 'production' && 'maybeNotify',\n debug: () => this.options.debug,\n initialDeps: [\n this.isScrolling,\n this.range ? this.range.startIndex : null,\n this.range ? this.range.endIndex : null,\n ] as [boolean, number | null, number | null],\n },\n )\n\n private cleanup = () => {\n this.unsubs.filter(Boolean).forEach((d) => d!())\n this.unsubs = []\n this.observer.disconnect()\n this.scrollElement = null\n this.targetWindow = null\n }\n\n _didMount = () => {\n return () => {\n this.cleanup()\n }\n }\n\n _willUpdate = () => {\n const scrollElement = this.options.enabled\n ? this.options.getScrollElement()\n : null\n\n if (this.scrollElement !== scrollElement) {\n this.cleanup()\n\n if (!scrollElement) {\n this.maybeNotify()\n return\n }\n\n this.scrollElement = scrollElement\n\n if (this.scrollElement && 'ownerDocument' in this.scrollElement) {\n this.targetWindow = this.scrollElement.ownerDocument.defaultView\n } else {\n this.targetWindow = this.scrollElement?.window ?? null\n }\n\n this.elementsCache.forEach((cached) => {\n this.observer.observe(cached)\n })\n\n this._scrollToOffset(this.getScrollOffset(), {\n adjustments: undefined,\n behavior: undefined,\n })\n\n this.unsubs.push(\n this.options.observeElementRect(this, (rect) => {\n this.scrollRect = rect\n this.maybeNotify()\n }),\n )\n\n this.unsubs.push(\n this.options.observeElementOffset(this, (offset, isScrolling) => {\n this.scrollAdjustments = 0\n this.scrollDirection = isScrolling\n ? this.getScrollOffset() < offset\n ? 'forward'\n : 'backward'\n : null\n this.scrollOffset = offset\n this.isScrolling = isScrolling\n\n this.maybeNotify()\n }),\n )\n }\n }\n\n private getSize = () => {\n if (!this.options.enabled) {\n this.scrollRect = null\n return 0\n }\n\n this.scrollRect = this.scrollRect ?? this.options.initialRect\n\n return this.scrollRect[this.options.horizontal ? 'width' : 'height']\n }\n\n private getScrollOffset = () => {\n if (!this.options.enabled) {\n this.scrollOffset = null\n return 0\n }\n\n this.scrollOffset =\n this.scrollOffset ??\n (typeof this.options.initialOffset === 'function'\n ? this.options.initialOffset()\n : this.options.initialOffset)\n\n return this.scrollOffset\n }\n\n private getFurthestMeasurement = (\n measurements: Array<VirtualItem>,\n index: number,\n ) => {\n const furthestMeasurementsFound = new Map<number, true>()\n const furthestMeasurements = new Map<number, VirtualItem>()\n for (let m = index - 1; m >= 0; m--) {\n const measurement = measurements[m]!\n\n if (furthestMeasurementsFound.has(measurement.lane)) {\n continue\n }\n\n const previousFurthestMeasurement = furthestMeasurements.get(\n measurement.lane,\n )\n if (\n previousFurthestMeasurement == null ||\n measurement.end > previousFurthestMeasurement.end\n ) {\n furthestMeasurements.set(measurement.lane, measurement)\n } else if (measurement.end < previousFurthestMeasurement.end) {\n furthestMeasurementsFound.set(measurement.lane, true)\n }\n\n if (furthestMeasurementsFound.size === this.options.lanes) {\n break\n }\n }\n\n return furthestMeasurements.size === this.options.lanes\n ? Array.from(furthestMeasurements.values()).sort((a, b) => {\n if (a.end === b.end) {\n return a.index - b.index\n }\n\n return a.end - b.end\n })[0]\n : undefined\n }\n\n private getMeasurementOptions = memo(\n () => [\n this.options.count,\n this.options.paddingStart,\n this.options.scrollMargin,\n this.options.getItemKey,\n this.options.enabled,\n ],\n (count, paddingStart, scrollMargin, getItemKey, enabled) => {\n this.pendingMeasuredCacheIndexes = []\n return {\n count,\n paddingStart,\n scrollMargin,\n getItemKey,\n enabled,\n }\n },\n {\n key: false,\n },\n )\n\n private getMeasurements = memo(\n () => [this.getMeasurementOptions(), this.itemSizeCache],\n (\n { count, paddingStart, scrollMargin, getItemKey, enabled },\n itemSizeCache,\n ) => {\n if (!enabled) {\n this.measurementsCache = []\n this.itemSizeCache.clear()\n return []\n }\n\n if (this.measurementsCache.length === 0) {\n this.measurementsCache = this.options.initialMeasurementsCache\n this.measurementsCache.forEach((item) => {\n this.itemSizeCache.set(item.key, item.size)\n })\n }\n\n const min =\n this.pendingMeasuredCacheIndexes.length > 0\n ? Math.min(...this.pendingMeasuredCacheIndexes)\n : 0\n this.pendingMeasuredCacheIndexes = []\n\n const measurements = this.measurementsCache.slice(0, min)\n\n for (let i = min; i < count; i++) {\n const key = getItemKey(i)\n\n const furthestMeasurement =\n this.options.lanes === 1\n ? measurements[i - 1]\n : this.getFurthestMeasurement(measurements, i)\n\n const start = furthestMeasurement\n ? furthestMeasurement.end + this.options.gap\n : paddingStart + scrollMargin\n\n const measuredSize = itemSizeCache.get(key)\n const size =\n typeof measuredSize === 'number'\n ? measuredSize\n : this.options.estimateSize(i)\n\n const end = start + size\n\n const lane = furthestMeasurement\n ? furthestMeasurement.lane\n : i % this.options.lanes\n\n measurements[i] = {\n index: i,\n start,\n size,\n end,\n key,\n lane,\n }\n }\n\n this.measurementsCache = measurements\n\n return measurements\n },\n {\n key: process.env.NODE_ENV !== 'production' && 'getMeasurements',\n debug: () => this.options.debug,\n },\n )\n\n calculateRange = memo(\n () => [this.getMeasurements(), this.getSize(), this.getScrollOffset()],\n (measurements, outerSize, scrollOffset) => {\n return (this.range =\n measurements.length > 0 && outerSize > 0\n ? calculateRange({\n measurements,\n outerSize,\n scrollOffset,\n })\n : null)\n },\n {\n key: process.env.NODE_ENV !== 'production' && 'calculateRange',\n debug: () => this.options.debug,\n },\n )\n\n private getIndexes = memo(\n () => {\n let startIndex: number | null = null\n let endIndex: number | null = null\n const range = this.calculateRange()\n if (range) {\n startIndex = range.startIndex\n endIndex = range.endIndex\n }\n return [\n this.options.rangeExtractor,\n this.options.overscan,\n this.options.count,\n startIndex,\n endIndex,\n ]\n },\n (rangeExtractor, overscan, count, startIndex, endIndex) => {\n return startIndex === null || endIndex === null\n ? []\n : rangeExtractor({\n startIndex,\n endIndex,\n overscan,\n count,\n })\n },\n {\n key: process.env.NODE_ENV !== 'production' && 'getIndexes',\n debug: () => this.options.debug,\n },\n )\n\n indexFromElement = (node: TItemElement) => {\n const attributeName = this.options.indexAttribute\n const indexStr = node.getAttribute(attributeName)\n\n if (!indexStr) {\n console.warn(\n `Missing attribute name '${attributeName}={index}' on measured element.`,\n )\n return -1\n }\n\n return parseInt(indexStr, 10)\n }\n\n private _measureElement = (\n node: TItemElement,\n entry: ResizeObserverEntry | undefined,\n ) => {\n const index = this.indexFromElement(node)\n const item = this.measurementsCache[index]\n if (!item) {\n return\n }\n const key = item.key\n const prevNode = this.elementsCache.get(key)\n\n if (prevNode !== node) {\n if (prevNode) {\n this.observer.unobserve(prevNode)\n }\n this.observer.observe(node)\n this.elementsCache.set(key, node)\n }\n\n if (node.isConnected) {\n this.resizeItem(index, this.options.measureElement(node, entry, this))\n }\n }\n\n resizeItem = (index: number, size: number) => {\n const item = this.measurementsCache[index]\n if (!item) {\n return\n }\n const itemSize = this.itemSizeCache.get(item.key) ?? item.size\n const delta = size - itemSize\n\n if (delta !== 0) {\n if (\n this.shouldAdjustScrollPositionOnItemSizeChange !== undefined\n ? this.shouldAdjustScrollPositionOnItemSizeChange(item, delta, this)\n : item.start < this.getScrollOffset() + this.scrollAdjustments\n ) {\n if (process.env.NODE_ENV !== 'production' && this.options.debug) {\n console.info('correction', delta)\n }\n\n this._scrollToOffset(this.getScrollOffset(), {\n adjustments: (this.scrollAdjustments += delta),\n behavior: undefined,\n })\n }\n\n this.pendingMeasuredCacheIndexes.push(item.index)\n this.itemSizeCache = new Map(this.itemSizeCache.set(item.key, size))\n\n this.notify(false)\n }\n }\n\n measureElement = (node: TItemElement | null | undefined) => {\n if (!node) {\n this.elementsCache.forEach((cached, key) => {\n if (!cached.isConnected) {\n this.observer.unobserve(cached)\n this.elementsCache.delete(key)\n }\n })\n return\n }\n\n this._measureElement(node, undefined)\n }\n\n getVirtualItems = memo(\n () => [this.getIndexes(), this.getMeasurements()],\n (indexes, measurements) => {\n const virtualItems: Array<VirtualItem> = []\n\n for (let k = 0, len = indexes.length; k < len; k++) {\n const i = indexes[k]!\n const measurement = measurements[i]!\n\n virtualItems.push(measurement)\n }\n\n return virtualItems\n },\n {\n key: process.env.NODE_ENV !== 'production' && 'getVirtualItems',\n debug: () => this.options.debug,\n },\n )\n\n getVirtualItemForOffset = (offset: number) => {\n const measurements = this.getMeasurements()\n if (measurements.length === 0) {\n return undefined\n }\n return notUndefined(\n measurements[\n findNearestBinarySearch(\n 0,\n measurements.length - 1,\n (index: number) => notUndefined(measurements[index]).start,\n offset,\n )\n ],\n )\n }\n\n getOffsetForAlignment = (toOffset: number, align: ScrollAlignment) => {\n const size = this.getSize()\n const scrollOffset = this.getScrollOffset()\n\n if (align === 'auto') {\n if (toOffset >= scrollOffset + size) {\n align = 'end'\n }\n }\n\n if (align === 'end') {\n toOffset -= size\n }\n\n const scrollSizeProp = this.options.horizontal\n ? 'scrollWidth'\n : 'scrollHeight'\n const scrollSize = this.scrollElement\n ? 'document' in this.scrollElement\n ? this.scrollElement.document.documentElement[scrollSizeProp]\n : this.scrollElement[scrollSizeProp]\n : 0\n\n const maxOffset = scrollSize - size\n\n return Math.max(Math.min(maxOffset, toOffset), 0)\n }\n\n getOffsetForIndex = (index: number, align: ScrollAlignment = 'auto') => {\n index = Math.max(0, Math.min(index, this.options.count - 1))\n\n const item = this.measurementsCache[index]\n if (!item) {\n return undefined\n }\n\n const size = this.getSize()\n const scrollOffset = this.getScrollOffset()\n\n if (align === 'auto') {\n if (item.end >= scrollOffset + size - this.options.scrollPaddingEnd) {\n align = 'end'\n } else if (item.start <= scrollOffset + this.options.scrollPaddingStart) {\n align = 'start'\n } else {\n return [scrollOffset, align] as const\n }\n }\n\n const centerOffset =\n item.start - this.options.scrollPaddingStart + (item.size - size) / 2\n\n switch (align) {\n case 'center':\n return [this.getOffsetForAlignment(centerOffset, align), align] as const\n case 'end':\n return [\n this.getOffsetForAlignment(\n item.end + this.options.scrollPaddingEnd,\n align,\n ),\n align,\n ] as const\n default:\n return [\n this.getOffsetForAlignment(\n item.start - this.options.scrollPaddingStart,\n align,\n ),\n align,\n ] as const\n }\n }\n\n private isDynamicMode = () => this.elementsCache.size > 0\n\n private cancelScrollToIndex = () => {\n if (this.scrollToIndexTimeoutId !== null && this.targetWindow) {\n this.targetWindow.clearTimeout(this.scrollToIndexTimeoutId)\n this.scrollToIndexTimeoutId = null\n }\n }\n\n scrollToOffset = (\n toOffset: number,\n { align = 'start', behavior }: ScrollToOffsetOptions = {},\n ) => {\n this.cancelScrollToIndex()\n\n if (behavior === 'smooth' && this.isDynamicMode()) {\n console.warn(\n 'The `smooth` scroll behavior is not fully supported with dynamic size.',\n )\n }\n\n this._scrollToOffset(this.getOffsetForAlignment(toOffset, align), {\n adjustments: undefined,\n behavior,\n })\n }\n\n scrollToIndex = (\n index: number,\n { align: initialAlign = 'auto', behavior }: ScrollToIndexOptions = {},\n ) => {\n index = Math.max(0, Math.min(index, this.options.count - 1))\n\n this.cancelScrollToIndex()\n\n if (behavior === 'smooth' && this.isDynamicMode()) {\n console.warn(\n 'The `smooth` scroll behavior is not fully supported with dynamic size.',\n )\n }\n\n const offsetAndAlign = this.getOffsetForIndex(index, initialAlign)\n if (!offsetAndAlign) return\n\n const [offset, align] = offsetAndAlign\n\n this._scrollToOffset(offset, { adjustments: undefined, behavior })\n\n if (behavior !== 'smooth' && this.isDynamicMode() && this.targetWindow) {\n this.scrollToIndexTimeoutId = this.targetWindow.setTimeout(() => {\n this.scrollToIndexTimeoutId = null\n\n const elementInDOM = this.elementsCache.has(\n this.options.getItemKey(index),\n )\n\n if (elementInDOM) {\n const [latestOffset] = notUndefined(\n this.getOffsetForIndex(index, align),\n )\n\n if (!approxEqual(latestOffset, this.getScrollOffset())) {\n this.scrollToIndex(index, { align, behavior })\n }\n } else {\n this.scrollToIndex(index, { align, behavior })\n }\n })\n }\n }\n\n scrollBy = (delta: number, { behavior }: ScrollToOffsetOptions = {}) => {\n this.cancelScrollToIndex()\n\n if (behavior === 'smooth' && this.isDynamicMode()) {\n console.warn(\n 'The `smooth` scroll behavior is not fully supported with dynamic size.',\n )\n }\n\n this._scrollToOffset(this.getScrollOffset() + delta, {\n adjustments: undefined,\n behavior,\n })\n }\n\n getTotalSize = () => {\n const measurements = this.getMeasurements()\n\n let end: number\n // If there are no measurements, set the end to paddingStart\n if (measurements.length === 0) {\n end = this.options.paddingStart\n } else {\n // If lanes is 1, use the last measurement's end, otherwise find the maximum end value among all measurements\n end =\n this.options.lanes === 1\n ? (measurements[measurements.length - 1]?.end ?? 0)\n : Math.max(\n ...measurements.slice(-this.options.lanes).map((m) => m.end),\n )\n }\n\n return Math.max(\n end - this.options.scrollMargin + this.options.paddingEnd,\n 0,\n )\n }\n\n private _scrollToOffset = (\n offset: number,\n {\n adjustments,\n behavior,\n }: {\n adjustments: number | undefined\n behavior: ScrollBehavior | undefined\n },\n ) => {\n this.options.scrollToFn(offset, { behavior, adjustments }, this)\n }\n\n measure = () => {\n this.itemSizeCache = new Map()\n this.notify(false)\n }\n}\n\nconst findNearestBinarySearch = (\n low: number,\n high: number,\n getCurrentValue: (i: number) => number,\n value: number,\n) => {\n while (low <= high) {\n const middle = ((low + high) / 2) | 0\n const currentValue = getCurrentValue(middle)\n\n if (currentValue < value) {\n low = middle + 1\n } else if (currentValue > value) {\n high = middle - 1\n } else {\n return middle\n }\n }\n\n if (low > 0) {\n return low - 1\n } else {\n return 0\n }\n}\n\nfunction calculateRange({\n measurements,\n outerSize,\n scrollOffset,\n}: {\n measurements: Array<VirtualItem>\n outerSize: number\n scrollOffset: number\n}) {\n const count = measurements.length - 1\n const getOffset = (index: number) => measurements[index]!.start\n\n const startIndex = findNearestBinarySearch(0, count, getOffset, scrollOffset)\n let endIndex = startIndex\n\n while (\n endIndex < count &&\n measurements[endIndex]!.end < scrollOffset + outerSize\n ) {\n endIndex++\n }\n\n return { startIndex, endIndex }\n}\n", "import {\n Virtualizer,\n elementScroll,\n observeElementOffset,\n observeElementRect,\n observeWindowOffset,\n observeWindowRect,\n windowScroll,\n} from '@tanstack/virtual-core'\nimport type { ReactiveController, ReactiveControllerHost } from 'lit'\nimport type { PartialKeys, VirtualizerOptions } from '@tanstack/virtual-core'\n\nclass VirtualizerControllerBase<\n TScrollElement extends Element | Window,\n TItemElement extends Element,\n> implements ReactiveController\n{\n host: ReactiveControllerHost\n\n private readonly virtualizer: Virtualizer<TScrollElement, TItemElement>\n\n private cleanup: () => void = () => {}\n\n constructor(\n host: ReactiveControllerHost,\n options: VirtualizerOptions<TScrollElement, TItemElement>,\n ) {\n ;(this.host = host).addController(this)\n\n const resolvedOptions: VirtualizerOptions<TScrollElement, TItemElement> = {\n ...options,\n onChange: (instance, sync) => {\n this.host.updateComplete.then(() => this.host.requestUpdate())\n options.onChange?.(instance, sync)\n },\n }\n this.virtualizer = new Virtualizer(resolvedOptions)\n }\n\n public getVirtualizer() {\n return this.virtualizer\n }\n\n async hostConnected() {\n this.cleanup = this.virtualizer._didMount()\n }\n\n hostUpdated() {\n this.virtualizer._willUpdate()\n }\n\n hostDisconnected() {\n this.cleanup()\n }\n}\n\nexport class VirtualizerController<\n TScrollElement extends Element,\n TItemElement extends Element,\n> extends VirtualizerControllerBase<TScrollElement, TItemElement> {\n constructor(\n host: ReactiveControllerHost,\n options: PartialKeys<\n VirtualizerOptions<TScrollElement, TItemElement>,\n 'observeElementRect' | 'observeElementOffset' | 'scrollToFn'\n >,\n ) {\n super(host, {\n observeElementRect: observeElementRect,\n observeElementOffset: observeElementOffset,\n scrollToFn: elementScroll,\n ...options,\n })\n }\n}\n\nexport class WindowVirtualizerController<\n TItemElement extends Element,\n> extends VirtualizerControllerBase<Window, TItemElement> {\n constructor(\n host: ReactiveControllerHost,\n options: PartialKeys<\n VirtualizerOptions<Window, TItemElement>,\n | 'getScrollElement'\n | 'observeElementRect'\n | 'observeElementOffset'\n | 'scrollToFn'\n >,\n ) {\n super(host, {\n getScrollElement: () => (typeof document !== 'undefined' ? window : null),\n observeElementRect: observeWindowRect,\n observeElementOffset: observeWindowOffset,\n scrollToFn: windowScroll,\n initialOffset: () =>\n typeof document !== 'undefined' ? window.scrollY : 0,\n ...options,\n })\n }\n}\n", "/**\n * @license\n * Copyright 2020 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\n\nimport {\n _$LH,\n Part,\n DirectiveParent,\n CompiledTemplateResult,\n MaybeCompiledTemplateResult,\n UncompiledTemplateResult,\n} from './lit-html.js';\nimport {\n DirectiveResult,\n DirectiveClass,\n PartInfo,\n AttributePartInfo,\n} from './directive.js';\ntype Primitive = null | undefined | boolean | number | string | symbol | bigint;\n\nconst {_ChildPart: ChildPart} = _$LH;\n\ntype ChildPart = InstanceType<typeof ChildPart>;\n\nconst ENABLE_SHADYDOM_NOPATCH = true;\n\nconst wrap =\n ENABLE_SHADYDOM_NOPATCH &&\n window.ShadyDOM?.inUse &&\n window.ShadyDOM?.noPatch === true\n ? window.ShadyDOM!.wrap\n : (node: Node) => node;\n\n/**\n * Tests if a value is a primitive value.\n *\n * See https://tc39.github.io/ecma262/#sec-typeof-operator\n */\nexport const isPrimitive = (value: unknown): value is Primitive =>\n value === null || (typeof value != 'object' && typeof value != 'function');\n\nexport const TemplateResultType = {\n HTML: 1,\n SVG: 2,\n MATHML: 3,\n} as const;\n\nexport type TemplateResultType =\n (typeof TemplateResultType)[keyof typeof TemplateResultType];\n\ntype IsTemplateResult = {\n (val: unknown): val is MaybeCompiledTemplateResult;\n <T extends TemplateResultType>(\n val: unknown,\n type: T,\n ): val is UncompiledTemplateResult<T>;\n};\n\n/**\n * Tests if a value is a TemplateResult or a CompiledTemplateResult.\n */\nexport const isTemplateResult: IsTemplateResult = (\n value: unknown,\n type?: TemplateResultType,\n): value is UncompiledTemplateResult =>\n type === undefined\n ? // This property needs to remain unminified.\n (value as UncompiledTemplateResult)?.['_$litType$'] !== undefined\n : (value as UncompiledTemplateResult)?.['_$litType$'] === type;\n\n/**\n * Tests if a value is a CompiledTemplateResult.\n */\nexport const isCompiledTemplateResult = (\n value: unknown,\n): value is CompiledTemplateResult => {\n return (value as CompiledTemplateResult)?.['_$litType$']?.h != null;\n};\n\n/**\n * Tests if a value is a DirectiveResult.\n */\nexport const isDirectiveResult = (value: unknown): value is DirectiveResult =>\n // This property needs to remain unminified.\n (value as DirectiveResult)?.['_$litDirective$'] !== undefined;\n\n/**\n * Retrieves the Directive class for a DirectiveResult\n */\nexport const getDirectiveClass = (value: unknown): DirectiveClass | undefined =>\n // This property needs to remain unminified.\n (value as DirectiveResult)?.['_$litDirective$'];\n\n/**\n * Tests whether a part has only a single-expression with no strings to\n * interpolate between.\n *\n * Only AttributePart and PropertyPart can have multiple expressions.\n * Multi-expression parts have a `strings` property and single-expression\n * parts do not.\n */\nexport const isSingleExpression = (part: PartInfo) =>\n (part as AttributePartInfo).strings === undefined;\n\nconst createMarker = () => document.createComment('');\n\n/**\n * Inserts a ChildPart into the given container ChildPart's DOM, either at the\n * end of the container ChildPart, or before the optional `refPart`.\n *\n * This does not add the part to the containerPart's committed value. That must\n * be done by callers.\n *\n * @param containerPart Part within which to add the new ChildPart\n * @param refPart Part before which to add the new ChildPart; when omitted the\n * part added to the end of the `containerPart`\n * @param part Part to insert, or undefined to create a new part\n */\nexport const insertPart = (\n containerPart: ChildPart,\n refPart?: ChildPart,\n part?: ChildPart,\n): ChildPart => {\n const container = wrap(containerPart._$startNode).parentNode!;\n\n const refNode =\n refPart === undefined ? containerPart._$endNode : refPart._$startNode;\n\n if (part === undefined) {\n const startNode = wrap(container).insertBefore(createMarker(), refNode);\n const endNode = wrap(container).insertBefore(createMarker(), refNode);\n part = new ChildPart(\n startNode,\n endNode,\n containerPart,\n containerPart.options,\n );\n } else {\n const endNode = wrap(part._$endNode!).nextSibling;\n const oldParent = part._$parent;\n const parentChanged = oldParent !== containerPart;\n if (parentChanged) {\n part._$reparentDisconnectables?.(containerPart);\n // Note that although `_$reparentDisconnectables` updates the part's\n // `_$parent` reference after unlinking from its current parent, that\n // method only exists if Disconnectables are present, so we need to\n // unconditionally set it here\n part._$parent = containerPart;\n // Since the _$isConnected getter is somewhat costly, only\n // read it once we know the subtree has directives that need\n // to be notified\n let newConnectionState;\n if (\n part._$notifyConnectionChanged !== undefined &&\n (newConnectionState = containerPart._$isConnected) !==\n oldParent!._$isConnected\n ) {\n part._$notifyConnectionChanged(newConnectionState);\n }\n }\n if (endNode !== refNode || parentChanged) {\n let start: Node | null = part._$startNode;\n while (start !== endNode) {\n const n: Node | null = wrap(start!).nextSibling;\n wrap(container).insertBefore(start!, refNode);\n start = n;\n }\n }\n }\n\n return part;\n};\n\n/**\n * Sets the value of a Part.\n *\n * Note that this should only be used to set/update the value of user-created\n * parts (i.e. those created using `insertPart`); it should not be used\n * by directives to set the value of the directive's container part. Directives\n * should return a value from `update`/`render` to update their part state.\n *\n * For directives that require setting their part value asynchronously, they\n * should extend `AsyncDirective` and call `this.setValue()`.\n *\n * @param part Part to set\n * @param value Value to set\n * @param index For `AttributePart`s, the index to set\n * @param directiveParent Used internally; should not be set by user\n */\nexport const setChildPartValue = <T extends ChildPart>(\n part: T,\n value: unknown,\n directiveParent: DirectiveParent = part,\n): T => {\n part._$setValue(value, directiveParent);\n return part;\n};\n\n// A sentinel value that can never appear as a part value except when set by\n// live(). Used to force a dirty-check to fail and cause a re-render.\nconst RESET_VALUE = {};\n\n/**\n * Sets the committed value of a ChildPart directly without triggering the\n * commit stage of the part.\n *\n * This is useful in cases where a directive needs to update the part such\n * that the next update detects a value change or not. When value is omitted,\n * the next update will be guaranteed to be detected as a change.\n *\n * @param part\n * @param value\n */\nexport const setCommittedValue = (part: Part, value: unknown = RESET_VALUE) =>\n (part._$committedValue = value);\n\n/**\n * Returns the committed value of a ChildPart.\n *\n * The committed value is used for change detection and efficient updates of\n * the part. It can differ from the value set by the template or directive in\n * cases where the template value is transformed before being committed.\n *\n * - `TemplateResult`s are committed as a `TemplateInstance`\n * - Iterables are committed as `Array<ChildPart>`\n * - All other types are committed as the template value or value returned or\n * set by a directive.\n *\n * @param part\n */\nexport const getCommittedValue = (part: ChildPart) => part._$committedValue;\n\n/**\n * Removes a ChildPart from the DOM, including any of its content.\n *\n * @param part The Part to remove\n */\nexport const removePart = (part: ChildPart) => {\n part._$notifyConnectionChanged?.(false, true);\n let start: ChildNode | null = part._$startNode;\n const end: ChildNode | null = wrap(part._$endNode!).nextSibling;\n while (start !== end) {\n const n: ChildNode | null = wrap(start!).nextSibling;\n (wrap(start!) as ChildNode).remove();\n start = n;\n }\n};\n\nexport const clearPart = (part: ChildPart) => {\n part._$clear();\n};\n", "/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\n\n/**\n * Overview:\n *\n * This module is designed to add support for an async `setValue` API and\n * `disconnected` callback to directives with the least impact on the core\n * runtime or payload when that feature is not used.\n *\n * The strategy is to introduce a `AsyncDirective` subclass of\n * `Directive` that climbs the \"parent\" tree in its constructor to note which\n * branches of lit-html's \"logical tree\" of data structures contain such\n * directives and thus need to be crawled when a subtree is being cleared (or\n * manually disconnected) in order to run the `disconnected` callback.\n *\n * The \"nodes\" of the logical tree include Parts, TemplateInstances (for when a\n * TemplateResult is committed to a value of a ChildPart), and Directives; these\n * all implement a common interface called `DisconnectableChild`. Each has a\n * `_$parent` reference which is set during construction in the core code, and a\n * `_$disconnectableChildren` field which is initially undefined.\n *\n * The sparse tree created by means of the `AsyncDirective` constructor\n * crawling up the `_$parent` tree and placing a `_$disconnectableChildren` Set\n * on each parent that includes each child that contains a\n * `AsyncDirective` directly or transitively via its children. In order to\n * notify connection state changes and disconnect (or reconnect) a tree, the\n * `_$notifyConnectionChanged` API is patched onto ChildParts as a directive\n * climbs the parent tree, which is called by the core when clearing a part if\n * it exists. When called, that method iterates over the sparse tree of\n * Set<DisconnectableChildren> built up by AsyncDirectives, and calls\n * `_$notifyDirectiveConnectionChanged` on any directives that are encountered\n * in that tree, running the required callbacks.\n *\n * A given \"logical tree\" of lit-html data-structures might look like this:\n *\n * ChildPart(N1) _$dC=[D2,T3]\n * ._directive\n * AsyncDirective(D2)\n * ._value // user value was TemplateResult\n * TemplateInstance(T3) _$dC=[A4,A6,N10,N12]\n * ._$parts[]\n * AttributePart(A4) _$dC=[D5]\n * ._directives[]\n * AsyncDirective(D5)\n * AttributePart(A6) _$dC=[D7,D8]\n * ._directives[]\n * AsyncDirective(D7)\n * Directive(D8) _$dC=[D9]\n * ._directive\n * AsyncDirective(D9)\n * ChildPart(N10) _$dC=[D11]\n * ._directive\n * AsyncDirective(D11)\n * ._value\n * string\n * ChildPart(N12) _$dC=[D13,N14,N16]\n * ._directive\n * AsyncDirective(D13)\n * ._value // user value was iterable\n * Array<ChildPart>\n * ChildPart(N14) _$dC=[D15]\n * ._value\n * string\n * ChildPart(N16) _$dC=[D17,T18]\n * ._directive\n * AsyncDirective(D17)\n * ._value // user value was TemplateResult\n * TemplateInstance(T18) _$dC=[A19,A21,N25]\n * ._$parts[]\n * AttributePart(A19) _$dC=[D20]\n * ._directives[]\n * AsyncDirective(D20)\n * AttributePart(A21) _$dC=[22,23]\n * ._directives[]\n * AsyncDirective(D22)\n * Directive(D23) _$dC=[D24]\n * ._directive\n * AsyncDirective(D24)\n * ChildPart(N25) _$dC=[D26]\n * ._directive\n * AsyncDirective(D26)\n * ._value\n * string\n *\n * Example 1: The directive in ChildPart(N12) updates and returns `nothing`. The\n * ChildPart will _clear() itself, and so we need to disconnect the \"value\" of\n * the ChildPart (but not its directive). In this case, when `_clear()` calls\n * `_$notifyConnectionChanged()`, we don't iterate all of the\n * _$disconnectableChildren, rather we do a value-specific disconnection: i.e.\n * since the _value was an Array<ChildPart> (because an iterable had been\n * committed), we iterate the array of ChildParts (N14, N16) and run\n * `setConnected` on them (which does recurse down the full tree of\n * `_$disconnectableChildren` below it, and also removes N14 and N16 from N12's\n * `_$disconnectableChildren`). Once the values have been disconnected, we then\n * check whether the ChildPart(N12)'s list of `_$disconnectableChildren` is empty\n * (and would remove it from its parent TemplateInstance(T3) if so), but since\n * it would still contain its directive D13, it stays in the disconnectable\n * tree.\n *\n * Example 2: In the course of Example 1, `setConnected` will reach\n * ChildPart(N16); in this case the entire part is being disconnected, so we\n * simply iterate all of N16's `_$disconnectableChildren` (D17,T18) and\n * recursively run `setConnected` on them. Note that we only remove children\n * from `_$disconnectableChildren` for the top-level values being disconnected\n * on a clear; doing this bookkeeping lower in the tree is wasteful since it's\n * all being thrown away.\n *\n * Example 3: If the LitElement containing the entire tree above becomes\n * disconnected, it will run `childPart.setConnected()` (which calls\n * `childPart._$notifyConnectionChanged()` if it exists); in this case, we\n * recursively run `setConnected()` over the entire tree, without removing any\n * children from `_$disconnectableChildren`, since this tree is required to\n * re-connect the tree, which does the same operation, simply passing\n * `isConnected: true` down the tree, signaling which callback to run.\n */\n\nimport {AttributePart, ChildPart, Disconnectable, Part} from './lit-html.js';\nimport {isSingleExpression} from './directive-helpers.js';\nimport {Directive, PartInfo, PartType} from './directive.js';\nexport * from './directive.js';\n\nconst DEV_MODE = true;\n\n/**\n * Recursively walks down the tree of Parts/TemplateInstances/Directives to set\n * the connected state of directives and run `disconnected`/ `reconnected`\n * callbacks.\n *\n * @return True if there were children to disconnect; false otherwise\n */\nconst notifyChildrenConnectedChanged = (\n parent: Disconnectable,\n isConnected: boolean,\n): boolean => {\n const children = parent._$disconnectableChildren;\n if (children === undefined) {\n return false;\n }\n for (const obj of children) {\n // The existence of `_$notifyDirectiveConnectionChanged` is used as a \"brand\" to\n // disambiguate AsyncDirectives from other DisconnectableChildren\n // (as opposed to using an instanceof check to know when to call it); the\n // redundancy of \"Directive\" in the API name is to avoid conflicting with\n // `_$notifyConnectionChanged`, which exists `ChildParts` which are also in\n // this list\n // Disconnect Directive (and any nested directives contained within)\n // This property needs to remain unminified.\n (obj as AsyncDirective)['_$notifyDirectiveConnectionChanged']?.(\n isConnected,\n false,\n );\n // Disconnect Part/TemplateInstance\n notifyChildrenConnectedChanged(obj, isConnected);\n }\n return true;\n};\n\n/**\n * Removes the given child from its parent list of disconnectable children, and\n * if the parent list becomes empty as a result, removes the parent from its\n * parent, and so forth up the tree when that causes subsequent parent lists to\n * become empty.\n */\nconst removeDisconnectableFromParent = (obj: Disconnectable) => {\n let parent, children;\n do {\n if ((parent = obj._$parent) === undefined) {\n break;\n }\n children = parent._$disconnectableChildren!;\n children.delete(obj);\n obj = parent;\n } while (children?.size === 0);\n};\n\nconst addDisconnectableToParent = (obj: Disconnectable) => {\n // Climb the parent tree, creating a sparse tree of children needing\n // disconnection\n for (let parent; (parent = obj._$parent); obj = parent) {\n let children = parent._$disconnectableChildren;\n if (children === undefined) {\n parent._$disconnectableChildren = children = new Set();\n } else if (children.has(obj)) {\n // Once we've reached a parent that already contains this child, we\n // can short-circuit\n break;\n }\n children.add(obj);\n installDisconnectAPI(parent);\n }\n};\n\n/**\n * Changes the parent reference of the ChildPart, and updates the sparse tree of\n * Disconnectable children accordingly.\n *\n * Note, this method will be patched onto ChildPart instances and called from\n * the core code when parts are moved between different parents.\n */\nfunction reparentDisconnectables(this: ChildPart, newParent: Disconnectable) {\n if (this._$disconnectableChildren !== undefined) {\n removeDisconnectableFromParent(this);\n this._$parent = newParent;\n addDisconnectableToParent(this);\n } else {\n this._$parent = newParent;\n }\n}\n\n/**\n * Sets the connected state on any directives contained within the committed\n * value of this part (i.e. within a TemplateInstance or iterable of\n * ChildParts) and runs their `disconnected`/`reconnected`s, as well as within\n * any directives stored on the ChildPart (when `valueOnly` is false).\n *\n * `isClearingValue` should be passed as `true` on a top-level part that is\n * clearing itself, and not as a result of recursively disconnecting directives\n * as part of a `clear` operation higher up the tree. This both ensures that any\n * directive on this ChildPart that produced a value that caused the clear\n * operation is not disconnected, and also serves as a performance optimization\n * to avoid needless bookkeeping when a subtree is going away; when clearing a\n * subtree, only the top-most part need to remove itself from the parent.\n *\n * `fromPartIndex` is passed only in the case of a partial `_clear` running as a\n * result of truncating an iterable.\n *\n * Note, this method will be patched onto ChildPart instances and called from the\n * core code when parts are cleared or the connection state is changed by the\n * user.\n */\nfunction notifyChildPartConnectedChanged(\n this: ChildPart,\n isConnected: boolean,\n isClearingValue = false,\n fromPartIndex = 0,\n) {\n const value = this._$committedValue;\n const children = this._$disconnectableChildren;\n if (children === undefined || children.size === 0) {\n return;\n }\n if (isClearingValue) {\n if (Array.isArray(value)) {\n // Iterable case: Any ChildParts created by the iterable should be\n // disconnected and removed from this ChildPart's disconnectable\n // children (starting at `fromPartIndex` in the case of truncation)\n for (let i = fromPartIndex; i < value.length; i++) {\n notifyChildrenConnectedChanged(value[i], false);\n removeDisconnectableFromParent(value[i]);\n }\n } else if (value != null) {\n // TemplateInstance case: If the value has disconnectable children (will\n // only be in the case that it is a TemplateInstance), we disconnect it\n // and remove it from this ChildPart's disconnectable children\n notifyChildrenConnectedChanged(value as Disconnectable, false);\n removeDisconnectableFromParent(value as Disconnectable);\n }\n } else {\n notifyChildrenConnectedChanged(this, isConnected);\n }\n}\n\n/**\n * Patches disconnection API onto ChildParts.\n */\nconst installDisconnectAPI = (obj: Disconnectable) => {\n if ((obj as ChildPart).type == PartType.CHILD) {\n (obj as ChildPart)._$notifyConnectionChanged ??=\n notifyChildPartConnectedChanged;\n (obj as ChildPart)._$reparentDisconnectables ??= reparentDisconnectables;\n }\n};\n\n/**\n * An abstract `Directive` base class whose `disconnected` method will be\n * called when the part containing the directive is cleared as a result of\n * re-rendering, or when the user calls `part.setConnected(false)` on\n * a part that was previously rendered containing the directive (as happens\n * when e.g. a LitElement disconnects from the DOM).\n *\n * If `part.setConnected(true)` is subsequently called on a\n * containing part, the directive's `reconnected` method will be called prior\n * to its next `update`/`render` callbacks. When implementing `disconnected`,\n * `reconnected` should also be implemented to be compatible with reconnection.\n *\n * Note that updates may occur while the directive is disconnected. As such,\n * directives should generally check the `this.isConnected` flag during\n * render/update to determine whether it is safe to subscribe to resources\n * that may prevent garbage collection.\n */\nexport abstract class AsyncDirective extends Directive {\n // As opposed to other Disconnectables, AsyncDirectives always get notified\n // when the RootPart connection changes, so the public `isConnected`\n // is a locally stored variable initialized via its part's getter and synced\n // via `_$notifyDirectiveConnectionChanged`. This is cheaper than using\n // the _$isConnected getter, which has to look back up the tree each time.\n /**\n * The connection state for this Directive.\n */\n isConnected!: boolean;\n\n // @internal\n override _$disconnectableChildren?: Set<Disconnectable> = undefined;\n /**\n * Initialize the part with internal fields\n * @param part\n * @param parent\n * @param attributeIndex\n */\n override _$initialize(\n part: Part,\n parent: Disconnectable,\n attributeIndex: number | undefined,\n ) {\n super._$initialize(part, parent, attributeIndex);\n addDisconnectableToParent(this);\n this.isConnected = part._$isConnected;\n }\n // This property needs to remain unminified.\n /**\n * Called from the core code when a directive is going away from a part (in\n * which case `shouldRemoveFromParent` should be true), and from the\n * `setChildrenConnected` helper function when recursively changing the\n * connection state of a tree (in which case `shouldRemoveFromParent` should\n * be false).\n *\n * @param isConnected\n * @param isClearingDirective - True when the directive itself is being\n * removed; false when the tree is being disconnected\n * @internal\n */\n override ['_$notifyDirectiveConnectionChanged'](\n isConnected: boolean,\n isClearingDirective = true,\n ) {\n if (isConnected !== this.isConnected) {\n this.isConnected = isConnected;\n if (isConnected) {\n this.reconnected?.();\n } else {\n this.disconnected?.();\n }\n }\n if (isClearingDirective) {\n notifyChildrenConnectedChanged(this, isConnected);\n removeDisconnectableFromParent(this);\n }\n }\n\n /**\n * Sets the value of the directive's Part outside the normal `update`/`render`\n * lifecycle of a directive.\n *\n * This method should not be called synchronously from a directive's `update`\n * or `render`.\n *\n * @param directive The directive to update\n * @param value The value to set\n */\n setValue(value: unknown) {\n if (isSingleExpression(this.__part as unknown as PartInfo)) {\n this.__part._$setValue(value, this);\n } else {\n // this.__attributeIndex will be defined in this case, but\n // assert it in dev mode\n if (DEV_MODE && this.__attributeIndex === undefined) {\n throw new Error(`Expected this.__attributeIndex to be a number`);\n }\n const newValues = [...(this.__part._$committedValue as Array<unknown>)];\n newValues[this.__attributeIndex!] = value;\n (this.__part as AttributePart)._$setValue(newValues, this, 0);\n }\n }\n\n /**\n * User callbacks for implementing logic to release any resources/subscriptions\n * that may have been retained by this directive. Since directives may also be\n * re-connected, `reconnected` should also be implemented to restore the\n * working state of the directive prior to the next render.\n */\n protected disconnected() {}\n protected reconnected() {}\n}\n", "/**\n * @license\n * Copyright 2020 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nimport {nothing, ElementPart} from '../lit-html.js';\nimport {directive, AsyncDirective} from '../async-directive.js';\n\n/**\n * Creates a new Ref object, which is container for a reference to an element.\n */\nexport const createRef = <T = Element>() => new Ref<T>();\n\n/**\n * An object that holds a ref value.\n */\nclass Ref<T = Element> {\n /**\n * The current Element value of the ref, or else `undefined` if the ref is no\n * longer rendered.\n */\n readonly value?: T;\n}\n\nexport type {Ref};\n\ninterface RefInternal {\n value: Element | undefined;\n}\n\n// When callbacks are used for refs, this map tracks the last value the callback\n// was called with, for ensuring a directive doesn't clear the ref if the ref\n// has already been rendered to a new spot. It is double-keyed on both the\n// context (`options.host`) and the callback, since we auto-bind class methods\n// to `options.host`.\nconst lastElementForContextAndCallback = new WeakMap<\n object,\n WeakMap<Function, Element | undefined>\n>();\n\nexport type RefOrCallback<T = Element> = Ref<T> | ((el: T | undefined) => void);\n\nclass RefDirective extends AsyncDirective {\n private _element?: Element;\n private _ref?: RefOrCallback;\n private _context?: object;\n\n render(_ref?: RefOrCallback) {\n return nothing;\n }\n\n override update(part: ElementPart, [ref]: Parameters<this['render']>) {\n const refChanged = ref !== this._ref;\n if (refChanged && this._ref !== undefined) {\n // The ref passed to the directive has changed;\n // unset the previous ref's value\n this._updateRefValue(undefined);\n }\n if (refChanged || this._lastElementForRef !== this._element) {\n // We either got a new ref or this is the first render;\n // store the ref/element & update the ref value\n this._ref = ref;\n this._context = part.options?.host;\n this._updateRefValue((this._element = part.element));\n }\n return nothing;\n }\n\n private _updateRefValue(element: Element | undefined) {\n if (!this.isConnected) {\n element = undefined;\n }\n if (typeof this._ref === 'function') {\n // If the current ref was called with a previous value, call with\n // `undefined`; We do this to ensure callbacks are called in a consistent\n // way regardless of whether a ref might be moving up in the tree (in\n // which case it would otherwise be called with the new value before the\n // previous one unsets it) and down in the tree (where it would be unset\n // before being set). Note that element lookup is keyed by\n // both the context and the callback, since we allow passing unbound\n // functions that are called on options.host, and we want to treat\n // these as unique \"instances\" of a function.\n const context = this._context ?? globalThis;\n let lastElementForCallback =\n lastElementForContextAndCallback.get(context);\n if (lastElementForCallback === undefined) {\n lastElementForCallback = new WeakMap();\n lastElementForContextAndCallback.set(context, lastElementForCallback);\n }\n if (lastElementForCallback.get(this._ref) !== undefined) {\n this._ref.call(this._context, undefined);\n }\n lastElementForCallback.set(this._ref, element);\n // Call the ref with the new element value\n if (element !== undefined) {\n this._ref.call(this._context, element);\n }\n } else {\n (this._ref as RefInternal)!.value = element;\n }\n }\n\n private get _lastElementForRef() {\n return typeof this._ref === 'function'\n ? lastElementForContextAndCallback\n .get(this._context ?? globalThis)\n ?.get(this._ref)\n : this._ref?.value;\n }\n\n override disconnected() {\n // Only clear the box if our element is still the one in it (i.e. another\n // directive instance hasn't rendered its element to it before us); that\n // only happens in the event of the directive being cleared (not via manual\n // disconnection)\n if (this._lastElementForRef === this._element) {\n this._updateRefValue(undefined);\n }\n }\n\n override reconnected() {\n // If we were manually disconnected, we can safely put our element back in\n // the box, since no rendering could have occurred to change its state\n this._updateRefValue(this._element);\n }\n}\n\n/**\n * Sets the value of a Ref object or calls a ref callback with the element it's\n * bound to.\n *\n * A Ref object acts as a container for a reference to an element. A ref\n * callback is a function that takes an element as its only argument.\n *\n * The ref directive sets the value of the Ref object or calls the ref callback\n * during rendering, if the referenced element changed.\n *\n * Note: If a ref callback is rendered to a different element position or is\n * removed in a subsequent render, it will first be called with `undefined`,\n * followed by another call with the new element it was rendered to (if any).\n *\n * ```js\n * // Using Ref object\n * const inputRef = createRef();\n * render(html`<input ${ref(inputRef)}>`, container);\n * inputRef.value.focus();\n *\n * // Using callback\n * const callback = (inputElement) => inputElement.focus();\n * render(html`<input ${ref(callback)}>`, container);\n * ```\n */\nexport const ref = directive(RefDirective);\n\n/**\n * The type of the class that powers this directive. Necessary for naming the\n * directive's return type.\n */\nexport type {RefDirective};\n", "import { css } from 'lit';\n\nconst styles = [\n css`\n :host::part(scroll) {\n height: 100%;\n width: 100%;\n overflow-y: auto;\n }\n :host::part(container) {\n position: relative;\n width: 100%;\n }\n `,\n];\n\nexport default styles;\n", "import utils from '../../utils/tag-name';\n\nconst TAG_NAME = utils.constructTagName('virtualizedlist');\nconst VIRTUALIZED_WRAPPER_TAG_NAME = utils.constructTagName('virtualizedwrapper');\n\nconst DEFAULTS = {\n VIRTUALIZER_PROPS: {\n count: 0,\n estimateSize: () => 0,\n },\n};\n\nexport { TAG_NAME, DEFAULTS, VIRTUALIZED_WRAPPER_TAG_NAME };\n", "import { CSSResult, PropertyValues, TemplateResult, html } from 'lit';\nimport { VirtualizerController } from '@tanstack/lit-virtual';\nimport { property } from 'lit/decorators.js';\nimport { Virtualizer, VirtualItem } from '@tanstack/virtual-core';\nimport { StyleInfo } from 'lit/directives/style-map.js';\nimport { Ref, createRef, ref } from 'lit/directives/ref.js';\nimport styles from './virtualizedlist.styles';\nimport { Component } from '../../models';\nimport { DEFAULTS } from './virtualizedlist.constants';\nimport { SetListDataProps, VirtualizerProps } from './virtualizedlist.types';\n\n/**\n * `mdc-virtualizedlist` component for creating custom virtualized lists.\n * IMPORTANT: This component does not create it's own list/list items.\n * Use the setlistdata callback prop to update client state in order to\n * Pass list/listitems as a child of this component, which this will virtuailze\n * This implementation handles dynamic lists as well as fixed sized lists.\n * Please refer to [Tanstack Virtual Docs](https://tanstack.com/virtual/latest) for more in depth documentation.\n *\n * @tagname mdc-virtualizedlist\n *\n * @event onscroll - (React: onScroll) Event that gets called when user scrolls inside of list.\n *\n * @slot - Client side List with nested list items.\n */\nclass VirtualizedList extends Component {\n /**\n * Callback that gets called when user scrolls inside of list. This gives access to the scroll container element\n * as well via the event. Particularly useful for\n * handling logic related when the user scrolls to the top or bottom of a list.\n * @default undefined\n */\n @property({ type: Function, attribute: 'onscroll' })\n override onscroll: ((this: GlobalEventHandlers, ev: Event) => void) | null;\n\n /**\n * Object that sets and updates the virtualizer with any relevant props.\n * There are two required object props in order to get virtualization to work properly.\n * count - The length of your list that you are virtualizing.\n * As your list grows/shrinks, this component must be updated with the appropriate value\n * (Same with any other updated prop).\n * estimateSize - A function that returns the estimated size of your items.\n * If your list is fixed, this will just be the size of your items.\n * If your list is dynamic, try to return approximate the size of each item.\n *\n * A full list of possible props can be in\n * [Tanstack Virtualizer API Docs](https://tanstack.com/virtual/latest/docs/api/virtualizer)\n *\n */\n @property({ type: Object, attribute: 'virtualizerprops' })\n virtualizerProps: VirtualizerProps = DEFAULTS.VIRTUALIZER_PROPS;\n\n /**\n * Callback that gets envoked when updates to the virtualizer interally occur.\n * This must be implemented in such a way that this function will trigger update to parent.\n *\n * virtualItems - Array that will be what the client displays on screen. Use this to render\n * a List of your choosing with these items nested inside as your ListItems.\n * measureElement - Ref to pass to each ListItem rendered client side.\n * Each ListItem should also be be passed key and a data-index (which can be found on the virtualItem).\n * listStyle - This should be passed as the style attribute to your List.\n */\n @property({ type: Function, attribute: 'setlistdata' })\n setlistdata: (({ virtualItems, measureElement, listStyle }: SetListDataProps) => void) | null;\n\n /**\n * @internal\n */\n private virtualizerController: VirtualizerController<Element, Element> | null;\n\n public scrollElementRef: Ref<HTMLDivElement> = createRef();\n\n public virtualizer: Virtualizer<Element, Element> | null;\n\n public virtualItems: Array<VirtualItem> = [];\n\n constructor() {\n super();\n this.virtualizerController = null;\n this.virtualizer = null;\n this.setlistdata = null;\n this.onscroll = null;\n }\n\n /**\n * This override is necessary to update the virtualizer with relevant props\n * if the client updates any props (most commonly, count). Updating the options\n * this way ensures we don't initialize a new virtualizer upon very prop change.\n */\n public override update(changedProperties: PropertyValues): void {\n super.update(changedProperties);\n\n if (changedProperties.get('virtualizerProps')) {\n this.setVirtualizerOptions();\n }\n }\n\n /**\n * This is needed in order to ensure the initial render happens\n */\n public override firstUpdated(changedProperties: PropertyValues): void {\n super.firstUpdated(changedProperties);\n this.setVirtualizerOptions();\n }\n\n /**\n * @internal\n * Update virtuailzer with the union of the two virtualizer options (current, passed in).\n */\n private setVirtualizerOptions(): void {\n this.virtualizer?.setOptions({ ...this.virtualizer.options, ...this.virtualizerProps });\n this.requestUpdate();\n }\n\n public override connectedCallback(): void {\n this.virtualizerController = new VirtualizerController(this, {\n count: this.virtualizerProps.count!,\n estimateSize: this.virtualizerProps?.estimateSize!,\n getScrollElement: () => this.scrollElementRef.value || null,\n ...this.virtualizerProps,\n });\n\n super.connectedCallback();\n }\n\n /**\n * @internal\n * Renders the list wrapper and invokes the callback which eventually will render in the slot.\n * Uses getTotalSize to update the height of the wrapper. This value is equal to the total size\n * OR the total estimated size (if you haven't physically scrolled the entire list)\n * Passes the virtualItems, measureElement, and listStyle to callback for client to pass in as child\n *\n * @returns The template result containing the list wrapper.\n */\n private getVirtualizedListWrapper(virtualizerController: VirtualizerController<Element, Element>): TemplateResult {\n this.virtualizer = virtualizerController.getVirtualizer();\n\n const { getTotalSize, getVirtualItems, measureElement } = this.virtualizer;\n\n const newVirtualItems = getVirtualItems();\n\n // Only update client if there's a difference in virtual items\n if (newVirtualItems !== this.virtualItems) {\n this.virtualItems = newVirtualItems;\n\n const virtualItems = getVirtualItems();\n // this style is required to be rendered by the client side list in order to handle scrolling properly\n const listStyle: Readonly<StyleInfo> = {\n position: 'absolute',\n top: 0,\n left: 0,\n width: '100%',\n transform: `translateY(${virtualItems[0]?.start ?? 0}px)`,\n };\n\n // pass back data to client for rendering\n if (this.setlistdata) {\n this.setlistdata({ virtualItems, measureElement, listStyle });\n }\n }\n\n return html`<div\n part=\"container\"\n style=\"height: ${getTotalSize()}px;\"\n >\n <slot></slot>\n </div>`;\n }\n\n public override render() {\n return html`<div\n ${ref(this.scrollElementRef)}\n part=\"scroll\"\n @scroll=${this.onscroll && this.onscroll}\n >\n ${this.virtualizerController ? this.getVirtualizedListWrapper(this.virtualizerController) : html``}\n </div>\n `;\n }\n\n public static override styles: Array<CSSResult> = [...Component.styles, ...styles];\n}\n\nexport default VirtualizedList;\n", "import VirtualizedList from './virtualizedlist.component';\nimport { TAG_NAME } from './virtualizedlist.constants';\n\nVirtualizedList.register(TAG_NAME);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n ['mdc-virtualizedlist']: VirtualizedList\n }\n}\n\nexport default VirtualizedList;\n"],
5
- "mappings": "+NAMA,IAGMA,GAASC,WAKFC,GACXF,GAAOG,aACNH,GAAOI,WADDD,QAC2BH,GAAOI,SAASC,eAClD,uBAAwBC,SAASC,WACjC,YAAaC,cAAcD,UAkBvBE,GAAoBC,OAAAA,EAEpBC,GAAc,IAAIC,QASXC,GATWD,KASXC,CAOX,YACEC,EACAC,EACAC,EAAAA,CAEA,GAVFC,KAAe,aAAA,GAUTD,IAAcP,GAChB,MAAUS,MACR,mEAAA,EAGJD,KAAKH,QAAUA,EACfG,KAAKE,EAAWJ,CACjB,CAID,IAAA,YAAIK,CAGF,IAAIA,EAAaH,KAAKI,EAChBN,EAAUE,KAAKE,EACrB,GAAIjB,IAA+BkB,IAA/BlB,OAAyD,CAC3D,IAAMoB,EAAYP,IAAZO,QAAqCP,EAAQQ,SAAW,EAC1DD,IACFF,EAAaT,GAAYa,IAAIT,CAAAA,GAE3BK,IAF2BL,UAG5BE,KAAKI,EAAcD,EAAa,IAAIZ,eAAiBiB,YACpDR,KAAKH,OAAAA,EAEHQ,GACFX,GAAYe,IAAIX,EAASK,CAAAA,EAG9B,CACD,OAAOA,CACR,CAED,UAAAO,CACE,OAAOV,KAAKH,OACb,CAAA,EAiCUc,GAAaC,G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,SAASC,EAAQ,EAQjC,IAAOC,GAAQF",
4
+ "sourcesContent": ["/**\n * @license\n * Copyright 2019 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\n\nconst NODE_MODE = false;\n\n// Allows minifiers to rename references to globalThis\nconst global = globalThis;\n\n/**\n * Whether the current browser supports `adoptedStyleSheets`.\n */\nexport const supportsAdoptingStyleSheets: boolean =\n global.ShadowRoot &&\n (global.ShadyCSS === undefined || global.ShadyCSS.nativeShadow) &&\n 'adoptedStyleSheets' in Document.prototype &&\n 'replace' in CSSStyleSheet.prototype;\n\n/**\n * A CSSResult or native CSSStyleSheet.\n *\n * In browsers that support constructible CSS style sheets, CSSStyleSheet\n * object can be used for styling along side CSSResult from the `css`\n * template tag.\n */\nexport type CSSResultOrNative = CSSResult | CSSStyleSheet;\n\nexport type CSSResultArray = Array<CSSResultOrNative | CSSResultArray>;\n\n/**\n * A single CSSResult, CSSStyleSheet, or an array or nested arrays of those.\n */\nexport type CSSResultGroup = CSSResultOrNative | CSSResultArray;\n\nconst constructionToken = Symbol();\n\nconst cssTagCache = new WeakMap<TemplateStringsArray, CSSStyleSheet>();\n\n/**\n * A container for a string of CSS text, that may be used to create a CSSStyleSheet.\n *\n * CSSResult is the return value of `css`-tagged template literals and\n * `unsafeCSS()`. In order to ensure that CSSResults are only created via the\n * `css` tag and `unsafeCSS()`, CSSResult cannot be constructed directly.\n */\nexport class CSSResult {\n // This property needs to remain unminified.\n ['_$cssResult$'] = true;\n readonly cssText: string;\n private _styleSheet?: CSSStyleSheet;\n private _strings: TemplateStringsArray | undefined;\n\n private constructor(\n cssText: string,\n strings: TemplateStringsArray | undefined,\n safeToken: symbol\n ) {\n if (safeToken !== constructionToken) {\n throw new Error(\n 'CSSResult is not constructable. Use `unsafeCSS` or `css` instead.'\n );\n }\n this.cssText = cssText;\n this._strings = strings;\n }\n\n // This is a getter so that it's lazy. In practice, this means stylesheets\n // are not created until the first element instance is made.\n get styleSheet(): CSSStyleSheet | undefined {\n // If `supportsAdoptingStyleSheets` is true then we assume CSSStyleSheet is\n // constructable.\n let styleSheet = this._styleSheet;\n const strings = this._strings;\n if (supportsAdoptingStyleSheets && styleSheet === undefined) {\n const cacheable = strings !== undefined && strings.length === 1;\n if (cacheable) {\n styleSheet = cssTagCache.get(strings);\n }\n if (styleSheet === undefined) {\n (this._styleSheet = styleSheet = new CSSStyleSheet()).replaceSync(\n this.cssText\n );\n if (cacheable) {\n cssTagCache.set(strings, styleSheet);\n }\n }\n }\n return styleSheet;\n }\n\n toString(): string {\n return this.cssText;\n }\n}\n\ntype ConstructableCSSResult = CSSResult & {\n new (\n cssText: string,\n strings: TemplateStringsArray | undefined,\n safeToken: symbol\n ): CSSResult;\n};\n\nconst textFromCSSResult = (value: CSSResultGroup | number) => {\n // This property needs to remain unminified.\n if ((value as CSSResult)['_$cssResult$'] === true) {\n return (value as CSSResult).cssText;\n } else if (typeof value === 'number') {\n return value;\n } else {\n throw new Error(\n `Value passed to 'css' function must be a 'css' function result: ` +\n `${value}. Use 'unsafeCSS' to pass non-literal values, but take care ` +\n `to ensure page security.`\n );\n }\n};\n\n/**\n * Wrap a value for interpolation in a {@linkcode css} tagged template literal.\n *\n * This is unsafe because untrusted CSS text can be used to phone home\n * or exfiltrate data to an attacker controlled site. Take care to only use\n * this with trusted input.\n */\nexport const unsafeCSS = (value: unknown) =>\n new (CSSResult as ConstructableCSSResult)(\n typeof value === 'string' ? value : String(value),\n undefined,\n constructionToken\n );\n\n/**\n * A template literal tag which can be used with LitElement's\n * {@linkcode LitElement.styles} property to set element styles.\n *\n * For security reasons, only literal string values and number may be used in\n * embedded expressions. To incorporate non-literal values {@linkcode unsafeCSS}\n * may be used inside an expression.\n */\nexport const css = (\n strings: TemplateStringsArray,\n ...values: (CSSResultGroup | number)[]\n): CSSResult => {\n const cssText =\n strings.length === 1\n ? strings[0]\n : values.reduce(\n (acc, v, idx) => acc + textFromCSSResult(v) + strings[idx + 1],\n strings[0]\n );\n return new (CSSResult as ConstructableCSSResult)(\n cssText,\n strings,\n constructionToken\n );\n};\n\n/**\n * Applies the given styles to a `shadowRoot`. When Shadow DOM is\n * available but `adoptedStyleSheets` is not, styles are appended to the\n * `shadowRoot` to [mimic spec behavior](https://wicg.github.io/construct-stylesheets/#using-constructed-stylesheets).\n * Note, when shimming is used, any styles that are subsequently placed into\n * the shadowRoot should be placed *before* any shimmed adopted styles. This\n * will match spec behavior that gives adopted sheets precedence over styles in\n * shadowRoot.\n */\nexport const adoptStyles = (\n renderRoot: ShadowRoot,\n styles: Array<CSSResultOrNative>\n) => {\n if (supportsAdoptingStyleSheets) {\n (renderRoot as ShadowRoot).adoptedStyleSheets = styles.map((s) =>\n s instanceof CSSStyleSheet ? s : s.styleSheet!\n );\n } else {\n for (const s of styles) {\n const style = document.createElement('style');\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const nonce = (global as any)['litNonce'];\n if (nonce !== undefined) {\n style.setAttribute('nonce', nonce);\n }\n style.textContent = (s as CSSResult).cssText;\n renderRoot.appendChild(style);\n }\n }\n};\n\nconst cssResultFromStyleSheet = (sheet: CSSStyleSheet) => {\n let cssText = '';\n for (const rule of sheet.cssRules) {\n cssText += rule.cssText;\n }\n return unsafeCSS(cssText);\n};\n\nexport const getCompatibleStyle =\n supportsAdoptingStyleSheets ||\n (NODE_MODE && global.CSSStyleSheet === undefined)\n ? (s: CSSResultOrNative) => s\n : (s: CSSResultOrNative) =>\n s instanceof CSSStyleSheet ? cssResultFromStyleSheet(s) : s;\n", "/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\n\n/**\n * Use this module if you want to create your own base class extending\n * {@link ReactiveElement}.\n * @packageDocumentation\n */\n\nimport {\n getCompatibleStyle,\n adoptStyles,\n CSSResultGroup,\n CSSResultOrNative,\n} from './css-tag.js';\nimport type {\n ReactiveController,\n ReactiveControllerHost,\n} from './reactive-controller.js';\n\n// In the Node build, this import will be injected by Rollup:\n// import {HTMLElement, customElements} from '@lit-labs/ssr-dom-shim';\n\nexport * from './css-tag.js';\nexport type {\n ReactiveController,\n ReactiveControllerHost,\n} from './reactive-controller.js';\n\n/**\n * Removes the `readonly` modifier from properties in the union K.\n *\n * This is a safer way to cast a value to a type with a mutable version of a\n * readonly field, than casting to an interface with the field re-declared\n * because it preserves the type of all the fields and warns on typos.\n */\ntype Mutable<T, K extends keyof T> = Omit<T, K> & {\n -readonly [P in keyof Pick<T, K>]: P extends K ? T[P] : never;\n};\n\n// TODO (justinfagnani): Add `hasOwn` here when we ship ES2022\nconst {\n is,\n defineProperty,\n getOwnPropertyDescriptor,\n getOwnPropertyNames,\n getOwnPropertySymbols,\n getPrototypeOf,\n} = Object;\n\nconst NODE_MODE = false;\n\n// Lets a minifier replace globalThis references with a minified name\nconst global = globalThis;\n\nif (NODE_MODE) {\n global.customElements ??= customElements;\n}\n\nconst DEV_MODE = true;\n\nlet issueWarning: (code: string, warning: string) => void;\n\nconst trustedTypes = (global as unknown as {trustedTypes?: {emptyScript: ''}})\n .trustedTypes;\n\n// Temporary workaround for https://crbug.com/993268\n// Currently, any attribute starting with \"on\" is considered to be a\n// TrustedScript source. Such boolean attributes must be set to the equivalent\n// trusted emptyScript value.\nconst emptyStringForBooleanAttribute = trustedTypes\n ? (trustedTypes.emptyScript as unknown as '')\n : '';\n\nconst polyfillSupport = DEV_MODE\n ? global.reactiveElementPolyfillSupportDevMode\n : global.reactiveElementPolyfillSupport;\n\nif (DEV_MODE) {\n // Ensure warnings are issued only 1x, even if multiple versions of Lit\n // are loaded.\n const issuedWarnings: Set<string | undefined> = (global.litIssuedWarnings ??=\n new Set());\n\n // Issue a warning, if we haven't already.\n issueWarning = (code: string, warning: string) => {\n warning += ` See https://lit.dev/msg/${code} for more information.`;\n if (!issuedWarnings.has(warning)) {\n console.warn(warning);\n issuedWarnings.add(warning);\n }\n };\n\n issueWarning(\n 'dev-mode',\n `Lit is in dev mode. Not recommended for production!`\n );\n\n // Issue polyfill support warning.\n if (global.ShadyDOM?.inUse && polyfillSupport === undefined) {\n issueWarning(\n 'polyfill-support-missing',\n `Shadow DOM is being polyfilled via \\`ShadyDOM\\` but ` +\n `the \\`polyfill-support\\` module has not been loaded.`\n );\n }\n}\n\n/**\n * Contains types that are part of the unstable debug API.\n *\n * Everything in this API is not stable and may change or be removed in the future,\n * even on patch releases.\n */\n// eslint-disable-next-line @typescript-eslint/no-namespace\nexport namespace ReactiveUnstable {\n /**\n * When Lit is running in dev mode and `window.emitLitDebugLogEvents` is true,\n * we will emit 'lit-debug' events to window, with live details about the update and render\n * lifecycle. These can be useful for writing debug tooling and visualizations.\n *\n * Please be aware that running with window.emitLitDebugLogEvents has performance overhead,\n * making certain operations that are normally very cheap (like a no-op render) much slower,\n * because we must copy data and dispatch events.\n */\n // eslint-disable-next-line @typescript-eslint/no-namespace\n export namespace DebugLog {\n export type Entry = Update;\n export interface Update {\n kind: 'update';\n }\n }\n}\n\ninterface DebugLoggingWindow {\n // Even in dev mode, we generally don't want to emit these events, as that's\n // another level of cost, so only emit them when DEV_MODE is true _and_ when\n // window.emitLitDebugEvents is true.\n emitLitDebugLogEvents?: boolean;\n}\n\n/**\n * Useful for visualizing and logging insights into what the Lit template system is doing.\n *\n * Compiled out of prod mode builds.\n */\nconst debugLogEvent = DEV_MODE\n ? (event: ReactiveUnstable.DebugLog.Entry) => {\n const shouldEmit = (global as unknown as DebugLoggingWindow)\n .emitLitDebugLogEvents;\n if (!shouldEmit) {\n return;\n }\n global.dispatchEvent(\n new CustomEvent<ReactiveUnstable.DebugLog.Entry>('lit-debug', {\n detail: event,\n })\n );\n }\n : undefined;\n\n/*\n * When using Closure Compiler, JSCompiler_renameProperty(property, object) is\n * replaced at compile time by the munged name for object[property]. We cannot\n * alias this function, so we have to use a small shim that has the same\n * behavior when not compiling.\n */\n/*@__INLINE__*/\nconst JSCompiler_renameProperty = <P extends PropertyKey>(\n prop: P,\n _obj: unknown\n): P => prop;\n\n/**\n * Converts property values to and from attribute values.\n */\nexport interface ComplexAttributeConverter<Type = unknown, TypeHint = unknown> {\n /**\n * Called to convert an attribute value to a property\n * value.\n */\n fromAttribute?(value: string | null, type?: TypeHint): Type;\n\n /**\n * Called to convert a property value to an attribute\n * value.\n *\n * It returns unknown instead of string, to be compatible with\n * https://github.com/WICG/trusted-types (and similar efforts).\n */\n toAttribute?(value: Type, type?: TypeHint): unknown;\n}\n\ntype AttributeConverter<Type = unknown, TypeHint = unknown> =\n | ComplexAttributeConverter<Type>\n | ((value: string | null, type?: TypeHint) => Type);\n\n/**\n * Defines options for a property accessor.\n */\nexport interface PropertyDeclaration<Type = unknown, TypeHint = unknown> {\n /**\n * When set to `true`, indicates the property is internal private state. The\n * property should not be set by users. When using TypeScript, this property\n * should be marked as `private` or `protected`, and it is also a common\n * practice to use a leading `_` in the name. The property is not added to\n * `observedAttributes`.\n */\n readonly state?: boolean;\n\n /**\n * Indicates how and whether the property becomes an observed attribute.\n * If the value is `false`, the property is not added to `observedAttributes`.\n * If true or absent, the lowercased property name is observed (e.g. `fooBar`\n * becomes `foobar`). If a string, the string value is observed (e.g\n * `attribute: 'foo-bar'`).\n */\n readonly attribute?: boolean | string;\n\n /**\n * Indicates the type of the property. This is used only as a hint for the\n * `converter` to determine how to convert the attribute\n * to/from a property.\n */\n readonly type?: TypeHint;\n\n /**\n * Indicates how to convert the attribute to/from a property. If this value\n * is a function, it is used to convert the attribute value a the property\n * value. If it's an object, it can have keys for `fromAttribute` and\n * `toAttribute`. If no `toAttribute` function is provided and\n * `reflect` is set to `true`, the property value is set directly to the\n * attribute. A default `converter` is used if none is provided; it supports\n * `Boolean`, `String`, `Number`, `Object`, and `Array`. Note,\n * when a property changes and the converter is used to update the attribute,\n * the property is never updated again as a result of the attribute changing,\n * and vice versa.\n */\n readonly converter?: AttributeConverter<Type, TypeHint>;\n\n /**\n * Indicates if the property should reflect to an attribute.\n * If `true`, when the property is set, the attribute is set using the\n * attribute name determined according to the rules for the `attribute`\n * property option and the value of the property converted using the rules\n * from the `converter` property option.\n */\n readonly reflect?: boolean;\n\n /**\n * A function that indicates if a property should be considered changed when\n * it is set. The function should take the `newValue` and `oldValue` and\n * return `true` if an update should be requested.\n */\n hasChanged?(value: Type, oldValue: Type): boolean;\n\n /**\n * Indicates whether an accessor will be created for this property. By\n * default, an accessor will be generated for this property that requests an\n * update when set. If this flag is `true`, no accessor will be created, and\n * it will be the user's responsibility to call\n * `this.requestUpdate(propertyName, oldValue)` to request an update when\n * the property changes.\n */\n readonly noAccessor?: boolean;\n\n /**\n * Whether this property is wrapping accessors. This is set by `@property`\n * to control the initial value change and reflection logic.\n *\n * @internal\n */\n wrapped?: boolean;\n}\n\n/**\n * Map of properties to PropertyDeclaration options. For each property an\n * accessor is made, and the property is processed according to the\n * PropertyDeclaration options.\n */\nexport interface PropertyDeclarations {\n readonly [key: string]: PropertyDeclaration;\n}\n\ntype PropertyDeclarationMap = Map<PropertyKey, PropertyDeclaration>;\n\ntype AttributeMap = Map<string, PropertyKey>;\n\n/**\n * A Map of property keys to values.\n *\n * Takes an optional type parameter T, which when specified as a non-any,\n * non-unknown type, will make the Map more strongly-typed, associating the map\n * keys with their corresponding value type on T.\n *\n * Use `PropertyValues<this>` when overriding ReactiveElement.update() and\n * other lifecycle methods in order to get stronger type-checking on keys\n * and values.\n */\n// This type is conditional so that if the parameter T is not specified, or\n// is `any`, the type will include `Map<PropertyKey, unknown>`. Since T is not\n// given in the uses of PropertyValues in this file, all uses here fallback to\n// meaning `Map<PropertyKey, unknown>`, but if a developer uses\n// `PropertyValues<this>` (or any other value for T) they will get a\n// strongly-typed Map type.\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport type PropertyValues<T = any> = T extends object\n ? PropertyValueMap<T>\n : Map<PropertyKey, unknown>;\n\n/**\n * Do not use, instead prefer {@linkcode PropertyValues}.\n */\n// This type must be exported such that JavaScript generated by the Google\n// Closure Compiler can import a type reference.\nexport interface PropertyValueMap<T> extends Map<PropertyKey, unknown> {\n get<K extends keyof T>(k: K): T[K] | undefined;\n set<K extends keyof T>(key: K, value: T[K]): this;\n has<K extends keyof T>(k: K): boolean;\n delete<K extends keyof T>(k: K): boolean;\n}\n\nexport const defaultConverter: ComplexAttributeConverter = {\n toAttribute(value: unknown, type?: unknown): unknown {\n switch (type) {\n case Boolean:\n value = value ? emptyStringForBooleanAttribute : null;\n break;\n case Object:\n case Array:\n // if the value is `null` or `undefined` pass this through\n // to allow removing/no change behavior.\n value = value == null ? value : JSON.stringify(value);\n break;\n }\n return value;\n },\n\n fromAttribute(value: string | null, type?: unknown) {\n let fromValue: unknown = value;\n switch (type) {\n case Boolean:\n fromValue = value !== null;\n break;\n case Number:\n fromValue = value === null ? null : Number(value);\n break;\n case Object:\n case Array:\n // Do *not* generate exception when invalid JSON is set as elements\n // don't normally complain on being mis-configured.\n // TODO(sorvell): Do generate exception in *dev mode*.\n try {\n // Assert to adhere to Bazel's \"must type assert JSON parse\" rule.\n fromValue = JSON.parse(value!) as unknown;\n } catch (e) {\n fromValue = null;\n }\n break;\n }\n return fromValue;\n },\n};\n\nexport interface HasChanged {\n (value: unknown, old: unknown): boolean;\n}\n\n/**\n * Change function that returns true if `value` is different from `oldValue`.\n * This method is used as the default for a property's `hasChanged` function.\n */\nexport const notEqual: HasChanged = (value: unknown, old: unknown): boolean =>\n !is(value, old);\n\nconst defaultPropertyDeclaration: PropertyDeclaration = {\n attribute: true,\n type: String,\n converter: defaultConverter,\n reflect: false,\n hasChanged: notEqual,\n};\n\n/**\n * A string representing one of the supported dev mode warning categories.\n */\nexport type WarningKind =\n | 'change-in-update'\n | 'migration'\n | 'async-perform-update';\n\nexport type Initializer = (element: ReactiveElement) => void;\n\n// Temporary, until google3 is on TypeScript 5.2\ndeclare global {\n interface SymbolConstructor {\n readonly metadata: unique symbol;\n }\n}\n\n// Ensure metadata is enabled. TypeScript does not polyfill\n// Symbol.metadata, so we must ensure that it exists.\n(Symbol as {metadata: symbol}).metadata ??= Symbol('metadata');\n\ndeclare global {\n // This is public global API, do not change!\n // eslint-disable-next-line no-var\n var litPropertyMetadata: WeakMap<\n object,\n Map<PropertyKey, PropertyDeclaration>\n >;\n}\n\n// Map from a class's metadata object to property options\n// Note that we must use nullish-coalescing assignment so that we only use one\n// map even if we load multiple version of this module.\nglobal.litPropertyMetadata ??= new WeakMap<\n object,\n Map<PropertyKey, PropertyDeclaration>\n>();\n\n/**\n * Base element class which manages element properties and attributes. When\n * properties change, the `update` method is asynchronously called. This method\n * should be supplied by subclasses to render updates as desired.\n * @noInheritDoc\n */\nexport abstract class ReactiveElement\n // In the Node build, this `extends` clause will be substituted with\n // `(globalThis.HTMLElement ?? HTMLElement)`.\n //\n // This way, we will first prefer any global `HTMLElement` polyfill that the\n // user has assigned, and then fall back to the `HTMLElement` shim which has\n // been imported (see note at the top of this file about how this import is\n // generated by Rollup). Note that the `HTMLElement` variable has been\n // shadowed by this import, so it no longer refers to the global.\n extends HTMLElement\n implements ReactiveControllerHost\n{\n // Note: these are patched in only in DEV_MODE.\n /**\n * Read or set all the enabled warning categories for this class.\n *\n * This property is only used in development builds.\n *\n * @nocollapse\n * @category dev-mode\n */\n static enabledWarnings?: WarningKind[];\n\n /**\n * Enable the given warning category for this class.\n *\n * This method only exists in development builds, so it should be accessed\n * with a guard like:\n *\n * ```ts\n * // Enable for all ReactiveElement subclasses\n * ReactiveElement.enableWarning?.('migration');\n *\n * // Enable for only MyElement and subclasses\n * MyElement.enableWarning?.('migration');\n * ```\n *\n * @nocollapse\n * @category dev-mode\n */\n static enableWarning?: (warningKind: WarningKind) => void;\n\n /**\n * Disable the given warning category for this class.\n *\n * This method only exists in development builds, so it should be accessed\n * with a guard like:\n *\n * ```ts\n * // Disable for all ReactiveElement subclasses\n * ReactiveElement.disableWarning?.('migration');\n *\n * // Disable for only MyElement and subclasses\n * MyElement.disableWarning?.('migration');\n * ```\n *\n * @nocollapse\n * @category dev-mode\n */\n static disableWarning?: (warningKind: WarningKind) => void;\n\n /**\n * Adds an initializer function to the class that is called during instance\n * construction.\n *\n * This is useful for code that runs against a `ReactiveElement`\n * subclass, such as a decorator, that needs to do work for each\n * instance, such as setting up a `ReactiveController`.\n *\n * ```ts\n * const myDecorator = (target: typeof ReactiveElement, key: string) => {\n * target.addInitializer((instance: ReactiveElement) => {\n * // This is run during construction of the element\n * new MyController(instance);\n * });\n * }\n * ```\n *\n * Decorating a field will then cause each instance to run an initializer\n * that adds a controller:\n *\n * ```ts\n * class MyElement extends LitElement {\n * @myDecorator foo;\n * }\n * ```\n *\n * Initializers are stored per-constructor. Adding an initializer to a\n * subclass does not add it to a superclass. Since initializers are run in\n * constructors, initializers will run in order of the class hierarchy,\n * starting with superclasses and progressing to the instance's class.\n *\n * @nocollapse\n */\n static addInitializer(initializer: Initializer) {\n this.__prepare();\n (this._initializers ??= []).push(initializer);\n }\n\n static _initializers?: Initializer[];\n\n /*\n * Due to closure compiler ES6 compilation bugs, @nocollapse is required on\n * all static methods and properties with initializers. Reference:\n * - https://github.com/google/closure-compiler/issues/1776\n */\n\n /**\n * Maps attribute names to properties; for example `foobar` attribute to\n * `fooBar` property. Created lazily on user subclasses when finalizing the\n * class.\n * @nocollapse\n */\n private static __attributeToPropertyMap: AttributeMap;\n\n /**\n * Marks class as having been finalized, which includes creating properties\n * from `static properties`, but does *not* include all properties created\n * from decorators.\n * @nocollapse\n */\n protected static finalized: true | undefined;\n\n /**\n * Memoized list of all element properties, including any superclass\n * properties. Created lazily on user subclasses when finalizing the class.\n *\n * @nocollapse\n * @category properties\n */\n static elementProperties: PropertyDeclarationMap;\n\n /**\n * User-supplied object that maps property names to `PropertyDeclaration`\n * objects containing options for configuring reactive properties. When\n * a reactive property is set the element will update and render.\n *\n * By default properties are public fields, and as such, they should be\n * considered as primarily settable by element users, either via attribute or\n * the property itself.\n *\n * Generally, properties that are changed by the element should be private or\n * protected fields and should use the `state: true` option. Properties\n * marked as `state` do not reflect from the corresponding attribute\n *\n * However, sometimes element code does need to set a public property. This\n * should typically only be done in response to user interaction, and an event\n * should be fired informing the user; for example, a checkbox sets its\n * `checked` property when clicked and fires a `changed` event. Mutating\n * public properties should typically not be done for non-primitive (object or\n * array) properties. In other cases when an element needs to manage state, a\n * private property set with the `state: true` option should be used. When\n * needed, state properties can be initialized via public properties to\n * facilitate complex interactions.\n * @nocollapse\n * @category properties\n */\n static properties: PropertyDeclarations;\n\n /**\n * Memoized list of all element styles.\n * Created lazily on user subclasses when finalizing the class.\n * @nocollapse\n * @category styles\n */\n static elementStyles: Array<CSSResultOrNative> = [];\n\n /**\n * Array of styles to apply to the element. The styles should be defined\n * using the {@linkcode css} tag function, via constructible stylesheets, or\n * imported from native CSS module scripts.\n *\n * Note on Content Security Policy:\n *\n * Element styles are implemented with `<style>` tags when the browser doesn't\n * support adopted StyleSheets. To use such `<style>` tags with the style-src\n * CSP directive, the style-src value must either include 'unsafe-inline' or\n * `nonce-<base64-value>` with `<base64-value>` replaced be a server-generated\n * nonce.\n *\n * To provide a nonce to use on generated `<style>` elements, set\n * `window.litNonce` to a server-generated nonce in your page's HTML, before\n * loading application code:\n *\n * ```html\n * <script>\n * // Generated and unique per request:\n * window.litNonce = 'a1b2c3d4';\n * </script>\n * ```\n * @nocollapse\n * @category styles\n */\n static styles?: CSSResultGroup;\n\n /**\n * Returns a list of attributes corresponding to the registered properties.\n * @nocollapse\n * @category attributes\n */\n static get observedAttributes() {\n // Ensure we've created all properties\n this.finalize();\n // this.__attributeToPropertyMap is only undefined after finalize() in\n // ReactiveElement itself. ReactiveElement.observedAttributes is only\n // accessed with ReactiveElement as the receiver when a subclass or mixin\n // calls super.observedAttributes\n return (\n this.__attributeToPropertyMap && [...this.__attributeToPropertyMap.keys()]\n );\n }\n\n private __instanceProperties?: PropertyValues = undefined;\n\n /**\n * Creates a property accessor on the element prototype if one does not exist\n * and stores a {@linkcode PropertyDeclaration} for the property with the\n * given options. The property setter calls the property's `hasChanged`\n * property option or uses a strict identity check to determine whether or not\n * to request an update.\n *\n * This method may be overridden to customize properties; however,\n * when doing so, it's important to call `super.createProperty` to ensure\n * the property is setup correctly. This method calls\n * `getPropertyDescriptor` internally to get a descriptor to install.\n * To customize what properties do when they are get or set, override\n * `getPropertyDescriptor`. To customize the options for a property,\n * implement `createProperty` like this:\n *\n * ```ts\n * static createProperty(name, options) {\n * options = Object.assign(options, {myOption: true});\n * super.createProperty(name, options);\n * }\n * ```\n *\n * @nocollapse\n * @category properties\n */\n static createProperty(\n name: PropertyKey,\n options: PropertyDeclaration = defaultPropertyDeclaration\n ) {\n // If this is a state property, force the attribute to false.\n if (options.state) {\n (options as Mutable<PropertyDeclaration, 'attribute'>).attribute = false;\n }\n this.__prepare();\n this.elementProperties.set(name, options);\n if (!options.noAccessor) {\n const key = DEV_MODE\n ? // Use Symbol.for in dev mode to make it easier to maintain state\n // when doing HMR.\n Symbol.for(`${String(name)} (@property() cache)`)\n : Symbol();\n const descriptor = this.getPropertyDescriptor(name, key, options);\n if (descriptor !== undefined) {\n defineProperty(this.prototype, name, descriptor);\n }\n }\n }\n\n /**\n * Returns a property descriptor to be defined on the given named property.\n * If no descriptor is returned, the property will not become an accessor.\n * For example,\n *\n * ```ts\n * class MyElement extends LitElement {\n * static getPropertyDescriptor(name, key, options) {\n * const defaultDescriptor =\n * super.getPropertyDescriptor(name, key, options);\n * const setter = defaultDescriptor.set;\n * return {\n * get: defaultDescriptor.get,\n * set(value) {\n * setter.call(this, value);\n * // custom action.\n * },\n * configurable: true,\n * enumerable: true\n * }\n * }\n * }\n * ```\n *\n * @nocollapse\n * @category properties\n */\n protected static getPropertyDescriptor(\n name: PropertyKey,\n key: string | symbol,\n options: PropertyDeclaration\n ): PropertyDescriptor | undefined {\n const {get, set} = getOwnPropertyDescriptor(this.prototype, name) ?? {\n get(this: ReactiveElement) {\n return this[key as keyof typeof this];\n },\n set(this: ReactiveElement, v: unknown) {\n (this as unknown as Record<string | symbol, unknown>)[key] = v;\n },\n };\n if (DEV_MODE && get == null) {\n if ('value' in (getOwnPropertyDescriptor(this.prototype, name) ?? {})) {\n throw new Error(\n `Field ${JSON.stringify(String(name))} on ` +\n `${this.name} was declared as a reactive property ` +\n `but it's actually declared as a value on the prototype. ` +\n `Usually this is due to using @property or @state on a method.`\n );\n }\n issueWarning(\n 'reactive-property-without-getter',\n `Field ${JSON.stringify(String(name))} on ` +\n `${this.name} was declared as a reactive property ` +\n `but it does not have a getter. This will be an error in a ` +\n `future version of Lit.`\n );\n }\n return {\n get(this: ReactiveElement) {\n return get?.call(this);\n },\n set(this: ReactiveElement, value: unknown) {\n const oldValue = get?.call(this);\n set!.call(this, value);\n this.requestUpdate(name, oldValue, options);\n },\n configurable: true,\n enumerable: true,\n };\n }\n\n /**\n * Returns the property options associated with the given property.\n * These options are defined with a `PropertyDeclaration` via the `properties`\n * object or the `@property` decorator and are registered in\n * `createProperty(...)`.\n *\n * Note, this method should be considered \"final\" and not overridden. To\n * customize the options for a given property, override\n * {@linkcode createProperty}.\n *\n * @nocollapse\n * @final\n * @category properties\n */\n static getPropertyOptions(name: PropertyKey) {\n return this.elementProperties.get(name) ?? defaultPropertyDeclaration;\n }\n\n // Temporary, until google3 is on TypeScript 5.2\n declare static [Symbol.metadata]: object & Record<PropertyKey, unknown>;\n\n /**\n * Initializes static own properties of the class used in bookkeeping\n * for element properties, initializers, etc.\n *\n * Can be called multiple times by code that needs to ensure these\n * properties exist before using them.\n *\n * This method ensures the superclass is finalized so that inherited\n * property metadata can be copied down.\n * @nocollapse\n */\n private static __prepare() {\n if (\n this.hasOwnProperty(JSCompiler_renameProperty('elementProperties', this))\n ) {\n // Already prepared\n return;\n }\n // Finalize any superclasses\n const superCtor = getPrototypeOf(this) as typeof ReactiveElement;\n superCtor.finalize();\n\n // Create own set of initializers for this class if any exist on the\n // superclass and copy them down. Note, for a small perf boost, avoid\n // creating initializers unless needed.\n if (superCtor._initializers !== undefined) {\n this._initializers = [...superCtor._initializers];\n }\n // Initialize elementProperties from the superclass\n this.elementProperties = new Map(superCtor.elementProperties);\n }\n\n /**\n * Finishes setting up the class so that it's ready to be registered\n * as a custom element and instantiated.\n *\n * This method is called by the ReactiveElement.observedAttributes getter.\n * If you override the observedAttributes getter, you must either call\n * super.observedAttributes to trigger finalization, or call finalize()\n * yourself.\n *\n * @nocollapse\n */\n protected static finalize() {\n if (this.hasOwnProperty(JSCompiler_renameProperty('finalized', this))) {\n return;\n }\n this.finalized = true;\n this.__prepare();\n\n // Create properties from the static properties block:\n if (this.hasOwnProperty(JSCompiler_renameProperty('properties', this))) {\n const props = this.properties;\n const propKeys = [\n ...getOwnPropertyNames(props),\n ...getOwnPropertySymbols(props),\n ] as Array<keyof typeof props>;\n for (const p of propKeys) {\n this.createProperty(p, props[p]);\n }\n }\n\n // Create properties from standard decorator metadata:\n const metadata = this[Symbol.metadata];\n if (metadata !== null) {\n const properties = litPropertyMetadata.get(metadata);\n if (properties !== undefined) {\n for (const [p, options] of properties) {\n this.elementProperties.set(p, options);\n }\n }\n }\n\n // Create the attribute-to-property map\n this.__attributeToPropertyMap = new Map();\n for (const [p, options] of this.elementProperties) {\n const attr = this.__attributeNameForProperty(p, options);\n if (attr !== undefined) {\n this.__attributeToPropertyMap.set(attr, p);\n }\n }\n\n this.elementStyles = this.finalizeStyles(this.styles);\n\n if (DEV_MODE) {\n if (this.hasOwnProperty('createProperty')) {\n issueWarning(\n 'no-override-create-property',\n 'Overriding ReactiveElement.createProperty() is deprecated. ' +\n 'The override will not be called with standard decorators'\n );\n }\n if (this.hasOwnProperty('getPropertyDescriptor')) {\n issueWarning(\n 'no-override-get-property-descriptor',\n 'Overriding ReactiveElement.getPropertyDescriptor() is deprecated. ' +\n 'The override will not be called with standard decorators'\n );\n }\n }\n }\n\n /**\n * Options used when calling `attachShadow`. Set this property to customize\n * the options for the shadowRoot; for example, to create a closed\n * shadowRoot: `{mode: 'closed'}`.\n *\n * Note, these options are used in `createRenderRoot`. If this method\n * is customized, options should be respected if possible.\n * @nocollapse\n * @category rendering\n */\n static shadowRootOptions: ShadowRootInit = {mode: 'open'};\n\n /**\n * Takes the styles the user supplied via the `static styles` property and\n * returns the array of styles to apply to the element.\n * Override this method to integrate into a style management system.\n *\n * Styles are deduplicated preserving the _last_ instance in the list. This\n * is a performance optimization to avoid duplicated styles that can occur\n * especially when composing via subclassing. The last item is kept to try\n * to preserve the cascade order with the assumption that it's most important\n * that last added styles override previous styles.\n *\n * @nocollapse\n * @category styles\n */\n protected static finalizeStyles(\n styles?: CSSResultGroup\n ): Array<CSSResultOrNative> {\n const elementStyles = [];\n if (Array.isArray(styles)) {\n // Dedupe the flattened array in reverse order to preserve the last items.\n // Casting to Array<unknown> works around TS error that\n // appears to come from trying to flatten a type CSSResultArray.\n const set = new Set((styles as Array<unknown>).flat(Infinity).reverse());\n // Then preserve original order by adding the set items in reverse order.\n for (const s of set) {\n elementStyles.unshift(getCompatibleStyle(s as CSSResultOrNative));\n }\n } else if (styles !== undefined) {\n elementStyles.push(getCompatibleStyle(styles));\n }\n return elementStyles;\n }\n\n /**\n * Node or ShadowRoot into which element DOM should be rendered. Defaults\n * to an open shadowRoot.\n * @category rendering\n */\n readonly renderRoot!: HTMLElement | DocumentFragment;\n\n /**\n * Returns the property name for the given attribute `name`.\n * @nocollapse\n */\n private static __attributeNameForProperty(\n name: PropertyKey,\n options: PropertyDeclaration\n ) {\n const attribute = options.attribute;\n return attribute === false\n ? undefined\n : typeof attribute === 'string'\n ? attribute\n : typeof name === 'string'\n ? name.toLowerCase()\n : undefined;\n }\n\n // Initialize to an unresolved Promise so we can make sure the element has\n // connected before first update.\n private __updatePromise!: Promise<boolean>;\n\n /**\n * True if there is a pending update as a result of calling `requestUpdate()`.\n * Should only be read.\n * @category updates\n */\n isUpdatePending = false;\n\n /**\n * Is set to `true` after the first update. The element code cannot assume\n * that `renderRoot` exists before the element `hasUpdated`.\n * @category updates\n */\n hasUpdated = false;\n\n /**\n * Map with keys for any properties that have changed since the last\n * update cycle with previous values.\n *\n * @internal\n */\n _$changedProperties!: PropertyValues;\n\n /**\n * Properties that should be reflected when updated.\n */\n private __reflectingProperties?: Set<PropertyKey>;\n\n /**\n * Name of currently reflecting property\n */\n private __reflectingProperty: PropertyKey | null = null;\n\n /**\n * Set of controllers.\n */\n private __controllers?: Set<ReactiveController>;\n\n constructor() {\n super();\n this.__initialize();\n }\n\n /**\n * Internal only override point for customizing work done when elements\n * are constructed.\n */\n private __initialize() {\n this.__updatePromise = new Promise<boolean>(\n (res) => (this.enableUpdating = res)\n );\n this._$changedProperties = new Map();\n // This enqueues a microtask that ust run before the first update, so it\n // must be called before requestUpdate()\n this.__saveInstanceProperties();\n // ensures first update will be caught by an early access of\n // `updateComplete`\n this.requestUpdate();\n (this.constructor as typeof ReactiveElement)._initializers?.forEach((i) =>\n i(this)\n );\n }\n\n /**\n * Registers a `ReactiveController` to participate in the element's reactive\n * update cycle. The element automatically calls into any registered\n * controllers during its lifecycle callbacks.\n *\n * If the element is connected when `addController()` is called, the\n * controller's `hostConnected()` callback will be immediately called.\n * @category controllers\n */\n addController(controller: ReactiveController) {\n (this.__controllers ??= new Set()).add(controller);\n // If a controller is added after the element has been connected,\n // call hostConnected. Note, re-using existence of `renderRoot` here\n // (which is set in connectedCallback) to avoid the need to track a\n // first connected state.\n if (this.renderRoot !== undefined && this.isConnected) {\n controller.hostConnected?.();\n }\n }\n\n /**\n * Removes a `ReactiveController` from the element.\n * @category controllers\n */\n removeController(controller: ReactiveController) {\n this.__controllers?.delete(controller);\n }\n\n /**\n * Fixes any properties set on the instance before upgrade time.\n * Otherwise these would shadow the accessor and break these properties.\n * The properties are stored in a Map which is played back after the\n * constructor runs. Note, on very old versions of Safari (<=9) or Chrome\n * (<=41), properties created for native platform properties like (`id` or\n * `name`) may not have default values set in the element constructor. On\n * these browsers native properties appear on instances and therefore their\n * default value will overwrite any element default (e.g. if the element sets\n * this.id = 'id' in the constructor, the 'id' will become '' since this is\n * the native platform default).\n */\n private __saveInstanceProperties() {\n const instanceProperties = new Map<PropertyKey, unknown>();\n const elementProperties = (this.constructor as typeof ReactiveElement)\n .elementProperties;\n for (const p of elementProperties.keys() as IterableIterator<keyof this>) {\n if (this.hasOwnProperty(p)) {\n instanceProperties.set(p, this[p]);\n delete this[p];\n }\n }\n if (instanceProperties.size > 0) {\n this.__instanceProperties = instanceProperties;\n }\n }\n\n /**\n * Returns the node into which the element should render and by default\n * creates and returns an open shadowRoot. Implement to customize where the\n * element's DOM is rendered. For example, to render into the element's\n * childNodes, return `this`.\n *\n * @return Returns a node into which to render.\n * @category rendering\n */\n protected createRenderRoot(): HTMLElement | DocumentFragment {\n const renderRoot =\n this.shadowRoot ??\n this.attachShadow(\n (this.constructor as typeof ReactiveElement).shadowRootOptions\n );\n adoptStyles(\n renderRoot,\n (this.constructor as typeof ReactiveElement).elementStyles\n );\n return renderRoot;\n }\n\n /**\n * On first connection, creates the element's renderRoot, sets up\n * element styling, and enables updating.\n * @category lifecycle\n */\n connectedCallback() {\n // Create renderRoot before controllers `hostConnected`\n (this as Mutable<typeof this, 'renderRoot'>).renderRoot ??=\n this.createRenderRoot();\n this.enableUpdating(true);\n this.__controllers?.forEach((c) => c.hostConnected?.());\n }\n\n /**\n * Note, this method should be considered final and not overridden. It is\n * overridden on the element instance with a function that triggers the first\n * update.\n * @category updates\n */\n protected enableUpdating(_requestedUpdate: boolean) {}\n\n /**\n * Allows for `super.disconnectedCallback()` in extensions while\n * reserving the possibility of making non-breaking feature additions\n * when disconnecting at some point in the future.\n * @category lifecycle\n */\n disconnectedCallback() {\n this.__controllers?.forEach((c) => c.hostDisconnected?.());\n }\n\n /**\n * Synchronizes property values when attributes change.\n *\n * Specifically, when an attribute is set, the corresponding property is set.\n * You should rarely need to implement this callback. If this method is\n * overridden, `super.attributeChangedCallback(name, _old, value)` must be\n * called.\n *\n * See [using the lifecycle callbacks](https://developer.mozilla.org/en-US/docs/Web/Web_Components/Using_custom_elements#using_the_lifecycle_callbacks)\n * on MDN for more information about the `attributeChangedCallback`.\n * @category attributes\n */\n attributeChangedCallback(\n name: string,\n _old: string | null,\n value: string | null\n ) {\n this._$attributeToProperty(name, value);\n }\n\n private __propertyToAttribute(name: PropertyKey, value: unknown) {\n const elemProperties: PropertyDeclarationMap = (\n this.constructor as typeof ReactiveElement\n ).elementProperties;\n const options = elemProperties.get(name)!;\n const attr = (\n this.constructor as typeof ReactiveElement\n ).__attributeNameForProperty(name, options);\n if (attr !== undefined && options.reflect === true) {\n const converter =\n (options.converter as ComplexAttributeConverter)?.toAttribute !==\n undefined\n ? (options.converter as ComplexAttributeConverter)\n : defaultConverter;\n const attrValue = converter.toAttribute!(value, options.type);\n if (\n DEV_MODE &&\n (this.constructor as typeof ReactiveElement).enabledWarnings!.includes(\n 'migration'\n ) &&\n attrValue === undefined\n ) {\n issueWarning(\n 'undefined-attribute-value',\n `The attribute value for the ${name as string} property is ` +\n `undefined on element ${this.localName}. The attribute will be ` +\n `removed, but in the previous version of \\`ReactiveElement\\`, ` +\n `the attribute would not have changed.`\n );\n }\n // Track if the property is being reflected to avoid\n // setting the property again via `attributeChangedCallback`. Note:\n // 1. this takes advantage of the fact that the callback is synchronous.\n // 2. will behave incorrectly if multiple attributes are in the reaction\n // stack at time of calling. However, since we process attributes\n // in `update` this should not be possible (or an extreme corner case\n // that we'd like to discover).\n // mark state reflecting\n this.__reflectingProperty = name;\n if (attrValue == null) {\n this.removeAttribute(attr);\n } else {\n this.setAttribute(attr, attrValue as string);\n }\n // mark state not reflecting\n this.__reflectingProperty = null;\n }\n }\n\n /** @internal */\n _$attributeToProperty(name: string, value: string | null) {\n const ctor = this.constructor as typeof ReactiveElement;\n // Note, hint this as an `AttributeMap` so closure clearly understands\n // the type; it has issues with tracking types through statics\n const propName = (ctor.__attributeToPropertyMap as AttributeMap).get(name);\n // Use tracking info to avoid reflecting a property value to an attribute\n // if it was just set because the attribute changed.\n if (propName !== undefined && this.__reflectingProperty !== propName) {\n const options = ctor.getPropertyOptions(propName);\n const converter =\n typeof options.converter === 'function'\n ? {fromAttribute: options.converter}\n : options.converter?.fromAttribute !== undefined\n ? options.converter\n : defaultConverter;\n // mark state reflecting\n this.__reflectingProperty = propName;\n this[propName as keyof this] = converter.fromAttribute!(\n value,\n options.type\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ) as any;\n // mark state not reflecting\n this.__reflectingProperty = null;\n }\n }\n\n /**\n * Requests an update which is processed asynchronously. This should be called\n * when an element should update based on some state not triggered by setting\n * a reactive property. In this case, pass no arguments. It should also be\n * called when manually implementing a property setter. In this case, pass the\n * property `name` and `oldValue` to ensure that any configured property\n * options are honored.\n *\n * @param name name of requesting property\n * @param oldValue old value of requesting property\n * @param options property options to use instead of the previously\n * configured options\n * @category updates\n */\n requestUpdate(\n name?: PropertyKey,\n oldValue?: unknown,\n options?: PropertyDeclaration\n ): void {\n // If we have a property key, perform property update steps.\n if (name !== undefined) {\n if (DEV_MODE && (name as unknown) instanceof Event) {\n issueWarning(\n ``,\n `The requestUpdate() method was called with an Event as the property name. This is probably a mistake caused by binding this.requestUpdate as an event listener. Instead bind a function that will call it with no arguments: () => this.requestUpdate()`\n );\n }\n options ??= (\n this.constructor as typeof ReactiveElement\n ).getPropertyOptions(name);\n const hasChanged = options.hasChanged ?? notEqual;\n const newValue = this[name as keyof this];\n if (hasChanged(newValue, oldValue)) {\n this._$changeProperty(name, oldValue, options);\n } else {\n // Abort the request if the property should not be considered changed.\n return;\n }\n }\n if (this.isUpdatePending === false) {\n this.__updatePromise = this.__enqueueUpdate();\n }\n }\n\n /**\n * @internal\n */\n _$changeProperty(\n name: PropertyKey,\n oldValue: unknown,\n options: PropertyDeclaration\n ) {\n // TODO (justinfagnani): Create a benchmark of Map.has() + Map.set(\n // vs just Map.set()\n if (!this._$changedProperties.has(name)) {\n this._$changedProperties.set(name, oldValue);\n }\n // Add to reflecting properties set.\n // Note, it's important that every change has a chance to add the\n // property to `__reflectingProperties`. This ensures setting\n // attribute + property reflects correctly.\n if (options.reflect === true && this.__reflectingProperty !== name) {\n (this.__reflectingProperties ??= new Set<PropertyKey>()).add(name);\n }\n }\n\n /**\n * Sets up the element to asynchronously update.\n */\n private async __enqueueUpdate() {\n this.isUpdatePending = true;\n try {\n // Ensure any previous update has resolved before updating.\n // This `await` also ensures that property changes are batched.\n await this.__updatePromise;\n } catch (e) {\n // Refire any previous errors async so they do not disrupt the update\n // cycle. Errors are refired so developers have a chance to observe\n // them, and this can be done by implementing\n // `window.onunhandledrejection`.\n Promise.reject(e);\n }\n const result = this.scheduleUpdate();\n // If `scheduleUpdate` returns a Promise, we await it. This is done to\n // enable coordinating updates with a scheduler. Note, the result is\n // checked to avoid delaying an additional microtask unless we need to.\n if (result != null) {\n await result;\n }\n return !this.isUpdatePending;\n }\n\n /**\n * Schedules an element update. You can override this method to change the\n * timing of updates by returning a Promise. The update will await the\n * returned Promise, and you should resolve the Promise to allow the update\n * to proceed. If this method is overridden, `super.scheduleUpdate()`\n * must be called.\n *\n * For instance, to schedule updates to occur just before the next frame:\n *\n * ```ts\n * override protected async scheduleUpdate(): Promise<unknown> {\n * await new Promise((resolve) => requestAnimationFrame(() => resolve()));\n * super.scheduleUpdate();\n * }\n * ```\n * @category updates\n */\n protected scheduleUpdate(): void | Promise<unknown> {\n const result = this.performUpdate();\n if (\n DEV_MODE &&\n (this.constructor as typeof ReactiveElement).enabledWarnings!.includes(\n 'async-perform-update'\n ) &&\n typeof (result as unknown as Promise<unknown> | undefined)?.then ===\n 'function'\n ) {\n issueWarning(\n 'async-perform-update',\n `Element ${this.localName} returned a Promise from performUpdate(). ` +\n `This behavior is deprecated and will be removed in a future ` +\n `version of ReactiveElement.`\n );\n }\n return result;\n }\n\n /**\n * Performs an element update. Note, if an exception is thrown during the\n * update, `firstUpdated` and `updated` will not be called.\n *\n * Call `performUpdate()` to immediately process a pending update. This should\n * generally not be needed, but it can be done in rare cases when you need to\n * update synchronously.\n *\n * @category updates\n */\n protected performUpdate(): void {\n // Abort any update if one is not pending when this is called.\n // This can happen if `performUpdate` is called early to \"flush\"\n // the update.\n if (!this.isUpdatePending) {\n return;\n }\n debugLogEvent?.({kind: 'update'});\n if (!this.hasUpdated) {\n // Create renderRoot before first update. This occurs in `connectedCallback`\n // but is done here to support out of tree calls to `enableUpdating`/`performUpdate`.\n (this as Mutable<typeof this, 'renderRoot'>).renderRoot ??=\n this.createRenderRoot();\n if (DEV_MODE) {\n // Produce warning if any reactive properties on the prototype are\n // shadowed by class fields. Instance fields set before upgrade are\n // deleted by this point, so any own property is caused by class field\n // initialization in the constructor.\n const ctor = this.constructor as typeof ReactiveElement;\n const shadowedProperties = [...ctor.elementProperties.keys()].filter(\n (p) => this.hasOwnProperty(p) && p in getPrototypeOf(this)\n );\n if (shadowedProperties.length) {\n throw new Error(\n `The following properties on element ${this.localName} will not ` +\n `trigger updates as expected because they are set using class ` +\n `fields: ${shadowedProperties.join(', ')}. ` +\n `Native class fields and some compiled output will overwrite ` +\n `accessors used for detecting changes. See ` +\n `https://lit.dev/msg/class-field-shadowing ` +\n `for more information.`\n );\n }\n }\n // Mixin instance properties once, if they exist.\n if (this.__instanceProperties) {\n // TODO (justinfagnani): should we use the stored value? Could a new value\n // have been set since we stored the own property value?\n for (const [p, value] of this.__instanceProperties) {\n this[p as keyof this] = value as this[keyof this];\n }\n this.__instanceProperties = undefined;\n }\n // Trigger initial value reflection and populate the initial\n // changedProperties map, but only for the case of experimental\n // decorators on accessors, which will not have already populated the\n // changedProperties map. We can't know if these accessors had\n // initializers, so we just set them anyway - a difference from\n // experimental decorators on fields and standard decorators on\n // auto-accessors.\n // For context why experimentalDecorators with auto accessors are handled\n // specifically also see:\n // https://github.com/lit/lit/pull/4183#issuecomment-1711959635\n const elementProperties = (this.constructor as typeof ReactiveElement)\n .elementProperties;\n if (elementProperties.size > 0) {\n for (const [p, options] of elementProperties) {\n if (\n options.wrapped === true &&\n !this._$changedProperties.has(p) &&\n this[p as keyof this] !== undefined\n ) {\n this._$changeProperty(p, this[p as keyof this], options);\n }\n }\n }\n }\n let shouldUpdate = false;\n const changedProperties = this._$changedProperties;\n try {\n shouldUpdate = this.shouldUpdate(changedProperties);\n if (shouldUpdate) {\n this.willUpdate(changedProperties);\n this.__controllers?.forEach((c) => c.hostUpdate?.());\n this.update(changedProperties);\n } else {\n this.__markUpdated();\n }\n } catch (e) {\n // Prevent `firstUpdated` and `updated` from running when there's an\n // update exception.\n shouldUpdate = false;\n // Ensure element can accept additional updates after an exception.\n this.__markUpdated();\n throw e;\n }\n // The update is no longer considered pending and further updates are now allowed.\n if (shouldUpdate) {\n this._$didUpdate(changedProperties);\n }\n }\n\n /**\n * Invoked before `update()` to compute values needed during the update.\n *\n * Implement `willUpdate` to compute property values that depend on other\n * properties and are used in the rest of the update process.\n *\n * ```ts\n * willUpdate(changedProperties) {\n * // only need to check changed properties for an expensive computation.\n * if (changedProperties.has('firstName') || changedProperties.has('lastName')) {\n * this.sha = computeSHA(`${this.firstName} ${this.lastName}`);\n * }\n * }\n *\n * render() {\n * return html`SHA: ${this.sha}`;\n * }\n * ```\n *\n * @category updates\n */\n protected willUpdate(_changedProperties: PropertyValues): void {}\n\n // Note, this is an override point for polyfill-support.\n // @internal\n _$didUpdate(changedProperties: PropertyValues) {\n this.__controllers?.forEach((c) => c.hostUpdated?.());\n if (!this.hasUpdated) {\n this.hasUpdated = true;\n this.firstUpdated(changedProperties);\n }\n this.updated(changedProperties);\n if (\n DEV_MODE &&\n this.isUpdatePending &&\n (this.constructor as typeof ReactiveElement).enabledWarnings!.includes(\n 'change-in-update'\n )\n ) {\n issueWarning(\n 'change-in-update',\n `Element ${this.localName} scheduled an update ` +\n `(generally because a property was set) ` +\n `after an update completed, causing a new update to be scheduled. ` +\n `This is inefficient and should be avoided unless the next update ` +\n `can only be scheduled as a side effect of the previous update.`\n );\n }\n }\n\n private __markUpdated() {\n this._$changedProperties = new Map();\n this.isUpdatePending = false;\n }\n\n /**\n * Returns a Promise that resolves when the element has completed updating.\n * The Promise value is a boolean that is `true` if the element completed the\n * update without triggering another update. The Promise result is `false` if\n * a property was set inside `updated()`. If the Promise is rejected, an\n * exception was thrown during the update.\n *\n * To await additional asynchronous work, override the `getUpdateComplete`\n * method. For example, it is sometimes useful to await a rendered element\n * before fulfilling this Promise. To do this, first await\n * `super.getUpdateComplete()`, then any subsequent state.\n *\n * @return A promise of a boolean that resolves to true if the update completed\n * without triggering another update.\n * @category updates\n */\n get updateComplete(): Promise<boolean> {\n return this.getUpdateComplete();\n }\n\n /**\n * Override point for the `updateComplete` promise.\n *\n * It is not safe to override the `updateComplete` getter directly due to a\n * limitation in TypeScript which means it is not possible to call a\n * superclass getter (e.g. `super.updateComplete.then(...)`) when the target\n * language is ES5 (https://github.com/microsoft/TypeScript/issues/338).\n * This method should be overridden instead. For example:\n *\n * ```ts\n * class MyElement extends LitElement {\n * override async getUpdateComplete() {\n * const result = await super.getUpdateComplete();\n * await this._myChild.updateComplete;\n * return result;\n * }\n * }\n * ```\n *\n * @return A promise of a boolean that resolves to true if the update completed\n * without triggering another update.\n * @category updates\n */\n protected getUpdateComplete(): Promise<boolean> {\n return this.__updatePromise;\n }\n\n /**\n * Controls whether or not `update()` should be called when the element requests\n * an update. By default, this method always returns `true`, but this can be\n * customized to control when to update.\n *\n * @param _changedProperties Map of changed properties with old values\n * @category updates\n */\n protected shouldUpdate(_changedProperties: PropertyValues): boolean {\n return true;\n }\n\n /**\n * Updates the element. This method reflects property values to attributes.\n * It can be overridden to render and keep updated element DOM.\n * Setting properties inside this method will *not* trigger\n * another update.\n *\n * @param _changedProperties Map of changed properties with old values\n * @category updates\n */\n protected update(_changedProperties: PropertyValues) {\n // The forEach() expression will only run when when __reflectingProperties is\n // defined, and it returns undefined, setting __reflectingProperties to\n // undefined\n this.__reflectingProperties &&= this.__reflectingProperties.forEach((p) =>\n this.__propertyToAttribute(p, this[p as keyof this])\n ) as undefined;\n this.__markUpdated();\n }\n\n /**\n * Invoked whenever the element is updated. Implement to perform\n * post-updating tasks via DOM APIs, for example, focusing an element.\n *\n * Setting properties inside this method will trigger the element to update\n * again after this update cycle completes.\n *\n * @param _changedProperties Map of changed properties with old values\n * @category updates\n */\n protected updated(_changedProperties: PropertyValues) {}\n\n /**\n * Invoked when the element is first updated. Implement to perform one time\n * work on the element after update.\n *\n * ```ts\n * firstUpdated() {\n * this.renderRoot.getElementById('my-text-area').focus();\n * }\n * ```\n *\n * Setting properties inside this method will trigger the element to update\n * again after this update cycle completes.\n *\n * @param _changedProperties Map of changed properties with old values\n * @category updates\n */\n protected firstUpdated(_changedProperties: PropertyValues) {}\n}\n// Assigned here to work around a jscompiler bug with static fields\n// when compiling to ES5.\n// https://github.com/google/closure-compiler/issues/3177\n(ReactiveElement as unknown as Record<string, unknown>)[\n JSCompiler_renameProperty('elementProperties', ReactiveElement)\n] = new Map();\n(ReactiveElement as unknown as Record<string, unknown>)[\n JSCompiler_renameProperty('finalized', ReactiveElement)\n] = new Map();\n\n// Apply polyfills if available\npolyfillSupport?.({ReactiveElement});\n\n// Dev mode warnings...\nif (DEV_MODE) {\n // Default warning set.\n ReactiveElement.enabledWarnings = [\n 'change-in-update',\n 'async-perform-update',\n ];\n const ensureOwnWarnings = function (ctor: typeof ReactiveElement) {\n if (\n !ctor.hasOwnProperty(JSCompiler_renameProperty('enabledWarnings', ctor))\n ) {\n ctor.enabledWarnings = ctor.enabledWarnings!.slice();\n }\n };\n ReactiveElement.enableWarning = function (\n this: typeof ReactiveElement,\n warning: WarningKind\n ) {\n ensureOwnWarnings(this);\n if (!this.enabledWarnings!.includes(warning)) {\n this.enabledWarnings!.push(warning);\n }\n };\n ReactiveElement.disableWarning = function (\n this: typeof ReactiveElement,\n warning: WarningKind\n ) {\n ensureOwnWarnings(this);\n const i = this.enabledWarnings!.indexOf(warning);\n if (i >= 0) {\n this.enabledWarnings!.splice(i, 1);\n }\n };\n}\n\n// IMPORTANT: do not change the property name or the assignment expression.\n// This line will be used in regexes to search for ReactiveElement usage.\n(global.reactiveElementVersions ??= []).push('2.0.4');\nif (DEV_MODE && global.reactiveElementVersions.length > 1) {\n issueWarning!(\n 'multiple-versions',\n `Multiple versions of Lit loaded. Loading multiple versions ` +\n `is not recommended.`\n );\n}\n", "/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\n\n// IMPORTANT: these imports must be type-only\nimport type {Directive, DirectiveResult, PartInfo} from './directive.js';\nimport type {TrustedHTML, TrustedTypesWindow} from 'trusted-types/lib';\n\nconst DEV_MODE = true;\nconst ENABLE_EXTRA_SECURITY_HOOKS = true;\nconst ENABLE_SHADYDOM_NOPATCH = true;\nconst NODE_MODE = false;\n\n// Allows minifiers to rename references to globalThis\nconst global = globalThis;\n\n/**\n * Contains types that are part of the unstable debug API.\n *\n * Everything in this API is not stable and may change or be removed in the future,\n * even on patch releases.\n */\n// eslint-disable-next-line @typescript-eslint/no-namespace\nexport namespace LitUnstable {\n /**\n * When Lit is running in dev mode and `window.emitLitDebugLogEvents` is true,\n * we will emit 'lit-debug' events to window, with live details about the update and render\n * lifecycle. These can be useful for writing debug tooling and visualizations.\n *\n * Please be aware that running with window.emitLitDebugLogEvents has performance overhead,\n * making certain operations that are normally very cheap (like a no-op render) much slower,\n * because we must copy data and dispatch events.\n */\n // eslint-disable-next-line @typescript-eslint/no-namespace\n export namespace DebugLog {\n export type Entry =\n | TemplatePrep\n | TemplateInstantiated\n | TemplateInstantiatedAndUpdated\n | TemplateUpdating\n | BeginRender\n | EndRender\n | CommitPartEntry\n | SetPartValue;\n export interface TemplatePrep {\n kind: 'template prep';\n template: Template;\n strings: TemplateStringsArray;\n clonableTemplate: HTMLTemplateElement;\n parts: TemplatePart[];\n }\n export interface BeginRender {\n kind: 'begin render';\n id: number;\n value: unknown;\n container: HTMLElement | DocumentFragment;\n options: RenderOptions | undefined;\n part: ChildPart | undefined;\n }\n export interface EndRender {\n kind: 'end render';\n id: number;\n value: unknown;\n container: HTMLElement | DocumentFragment;\n options: RenderOptions | undefined;\n part: ChildPart;\n }\n export interface TemplateInstantiated {\n kind: 'template instantiated';\n template: Template | CompiledTemplate;\n instance: TemplateInstance;\n options: RenderOptions | undefined;\n fragment: Node;\n parts: Array<Part | undefined>;\n values: unknown[];\n }\n export interface TemplateInstantiatedAndUpdated {\n kind: 'template instantiated and updated';\n template: Template | CompiledTemplate;\n instance: TemplateInstance;\n options: RenderOptions | undefined;\n fragment: Node;\n parts: Array<Part | undefined>;\n values: unknown[];\n }\n export interface TemplateUpdating {\n kind: 'template updating';\n template: Template | CompiledTemplate;\n instance: TemplateInstance;\n options: RenderOptions | undefined;\n parts: Array<Part | undefined>;\n values: unknown[];\n }\n export interface SetPartValue {\n kind: 'set part';\n part: Part;\n value: unknown;\n valueIndex: number;\n values: unknown[];\n templateInstance: TemplateInstance;\n }\n\n export type CommitPartEntry =\n | CommitNothingToChildEntry\n | CommitText\n | CommitNode\n | CommitAttribute\n | CommitProperty\n | CommitBooleanAttribute\n | CommitEventListener\n | CommitToElementBinding;\n\n export interface CommitNothingToChildEntry {\n kind: 'commit nothing to child';\n start: ChildNode;\n end: ChildNode | null;\n parent: Disconnectable | undefined;\n options: RenderOptions | undefined;\n }\n\n export interface CommitText {\n kind: 'commit text';\n node: Text;\n value: unknown;\n options: RenderOptions | undefined;\n }\n\n export interface CommitNode {\n kind: 'commit node';\n start: Node;\n parent: Disconnectable | undefined;\n value: Node;\n options: RenderOptions | undefined;\n }\n\n export interface CommitAttribute {\n kind: 'commit attribute';\n element: Element;\n name: string;\n value: unknown;\n options: RenderOptions | undefined;\n }\n\n export interface CommitProperty {\n kind: 'commit property';\n element: Element;\n name: string;\n value: unknown;\n options: RenderOptions | undefined;\n }\n\n export interface CommitBooleanAttribute {\n kind: 'commit boolean attribute';\n element: Element;\n name: string;\n value: boolean;\n options: RenderOptions | undefined;\n }\n\n export interface CommitEventListener {\n kind: 'commit event listener';\n element: Element;\n name: string;\n value: unknown;\n oldListener: unknown;\n options: RenderOptions | undefined;\n // True if we're removing the old event listener (e.g. because settings changed, or value is nothing)\n removeListener: boolean;\n // True if we're adding a new event listener (e.g. because first render, or settings changed)\n addListener: boolean;\n }\n\n export interface CommitToElementBinding {\n kind: 'commit to element binding';\n element: Element;\n value: unknown;\n options: RenderOptions | undefined;\n }\n }\n}\n\ninterface DebugLoggingWindow {\n // Even in dev mode, we generally don't want to emit these events, as that's\n // another level of cost, so only emit them when DEV_MODE is true _and_ when\n // window.emitLitDebugEvents is true.\n emitLitDebugLogEvents?: boolean;\n}\n\n/**\n * Useful for visualizing and logging insights into what the Lit template system is doing.\n *\n * Compiled out of prod mode builds.\n */\nconst debugLogEvent = DEV_MODE\n ? (event: LitUnstable.DebugLog.Entry) => {\n const shouldEmit = (global as unknown as DebugLoggingWindow)\n .emitLitDebugLogEvents;\n if (!shouldEmit) {\n return;\n }\n global.dispatchEvent(\n new CustomEvent<LitUnstable.DebugLog.Entry>('lit-debug', {\n detail: event,\n }),\n );\n }\n : undefined;\n// Used for connecting beginRender and endRender events when there are nested\n// renders when errors are thrown preventing an endRender event from being\n// called.\nlet debugLogRenderId = 0;\n\nlet issueWarning: (code: string, warning: string) => void;\n\nif (DEV_MODE) {\n global.litIssuedWarnings ??= new Set();\n\n // Issue a warning, if we haven't already.\n issueWarning = (code: string, warning: string) => {\n warning += code\n ? ` See https://lit.dev/msg/${code} for more information.`\n : '';\n if (!global.litIssuedWarnings!.has(warning)) {\n console.warn(warning);\n global.litIssuedWarnings!.add(warning);\n }\n };\n\n issueWarning(\n 'dev-mode',\n `Lit is in dev mode. Not recommended for production!`,\n );\n}\n\nconst wrap =\n ENABLE_SHADYDOM_NOPATCH &&\n global.ShadyDOM?.inUse &&\n global.ShadyDOM?.noPatch === true\n ? (global.ShadyDOM!.wrap as <T extends Node>(node: T) => T)\n : <T extends Node>(node: T) => node;\n\nconst trustedTypes = (global as unknown as TrustedTypesWindow).trustedTypes;\n\n/**\n * Our TrustedTypePolicy for HTML which is declared using the html template\n * tag function.\n *\n * That HTML is a developer-authored constant, and is parsed with innerHTML\n * before any untrusted expressions have been mixed in. Therefor it is\n * considered safe by construction.\n */\nconst policy = trustedTypes\n ? trustedTypes.createPolicy('lit-html', {\n createHTML: (s) => s,\n })\n : undefined;\n\n/**\n * Used to sanitize any value before it is written into the DOM. This can be\n * used to implement a security policy of allowed and disallowed values in\n * order to prevent XSS attacks.\n *\n * One way of using this callback would be to check attributes and properties\n * against a list of high risk fields, and require that values written to such\n * fields be instances of a class which is safe by construction. Closure's Safe\n * HTML Types is one implementation of this technique (\n * https://github.com/google/safe-html-types/blob/master/doc/safehtml-types.md).\n * The TrustedTypes polyfill in API-only mode could also be used as a basis\n * for this technique (https://github.com/WICG/trusted-types).\n *\n * @param node The HTML node (usually either a #text node or an Element) that\n * is being written to. Note that this is just an exemplar node, the write\n * may take place against another instance of the same class of node.\n * @param name The name of an attribute or property (for example, 'href').\n * @param type Indicates whether the write that's about to be performed will\n * be to a property or a node.\n * @return A function that will sanitize this class of writes.\n */\nexport type SanitizerFactory = (\n node: Node,\n name: string,\n type: 'property' | 'attribute',\n) => ValueSanitizer;\n\n/**\n * A function which can sanitize values that will be written to a specific kind\n * of DOM sink.\n *\n * See SanitizerFactory.\n *\n * @param value The value to sanitize. Will be the actual value passed into\n * the lit-html template literal, so this could be of any type.\n * @return The value to write to the DOM. Usually the same as the input value,\n * unless sanitization is needed.\n */\nexport type ValueSanitizer = (value: unknown) => unknown;\n\nconst identityFunction: ValueSanitizer = (value: unknown) => value;\nconst noopSanitizer: SanitizerFactory = (\n _node: Node,\n _name: string,\n _type: 'property' | 'attribute',\n) => identityFunction;\n\n/** Sets the global sanitizer factory. */\nconst setSanitizer = (newSanitizer: SanitizerFactory) => {\n if (!ENABLE_EXTRA_SECURITY_HOOKS) {\n return;\n }\n if (sanitizerFactoryInternal !== noopSanitizer) {\n throw new Error(\n `Attempted to overwrite existing lit-html security policy.` +\n ` setSanitizeDOMValueFactory should be called at most once.`,\n );\n }\n sanitizerFactoryInternal = newSanitizer;\n};\n\n/**\n * Only used in internal tests, not a part of the public API.\n */\nconst _testOnlyClearSanitizerFactoryDoNotCallOrElse = () => {\n sanitizerFactoryInternal = noopSanitizer;\n};\n\nconst createSanitizer: SanitizerFactory = (node, name, type) => {\n return sanitizerFactoryInternal(node, name, type);\n};\n\n// Added to an attribute name to mark the attribute as bound so we can find\n// it easily.\nconst boundAttributeSuffix = '$lit$';\n\n// This marker is used in many syntactic positions in HTML, so it must be\n// a valid element name and attribute name. We don't support dynamic names (yet)\n// but this at least ensures that the parse tree is closer to the template\n// intention.\nconst marker = `lit$${Math.random().toFixed(9).slice(2)}$`;\n\n// String used to tell if a comment is a marker comment\nconst markerMatch = '?' + marker;\n\n// Text used to insert a comment marker node. We use processing instruction\n// syntax because it's slightly smaller, but parses as a comment node.\nconst nodeMarker = `<${markerMatch}>`;\n\nconst d =\n NODE_MODE && global.document === undefined\n ? ({\n createTreeWalker() {\n return {};\n },\n } as unknown as Document)\n : document;\n\n// Creates a dynamic marker. We never have to search for these in the DOM.\nconst createMarker = () => d.createComment('');\n\n// https://tc39.github.io/ecma262/#sec-typeof-operator\ntype Primitive = null | undefined | boolean | number | string | symbol | bigint;\nconst isPrimitive = (value: unknown): value is Primitive =>\n value === null || (typeof value != 'object' && typeof value != 'function');\nconst isArray = Array.isArray;\nconst isIterable = (value: unknown): value is Iterable<unknown> =>\n isArray(value) ||\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n typeof (value as any)?.[Symbol.iterator] === 'function';\n\nconst SPACE_CHAR = `[ \\t\\n\\f\\r]`;\nconst ATTR_VALUE_CHAR = `[^ \\t\\n\\f\\r\"'\\`<>=]`;\nconst NAME_CHAR = `[^\\\\s\"'>=/]`;\n\n// These regexes represent the five parsing states that we care about in the\n// Template's HTML scanner. They match the *end* of the state they're named\n// after.\n// Depending on the match, we transition to a new state. If there's no match,\n// we stay in the same state.\n// Note that the regexes are stateful. We utilize lastIndex and sync it\n// across the multiple regexes used. In addition to the five regexes below\n// we also dynamically create a regex to find the matching end tags for raw\n// text elements.\n\n/**\n * End of text is: `<` followed by:\n * (comment start) or (tag) or (dynamic tag binding)\n */\nconst textEndRegex = /<(?:(!--|\\/[^a-zA-Z])|(\\/?[a-zA-Z][^>\\s]*)|(\\/?$))/g;\nconst COMMENT_START = 1;\nconst TAG_NAME = 2;\nconst DYNAMIC_TAG_NAME = 3;\n\nconst commentEndRegex = /-->/g;\n/**\n * Comments not started with <!--, like </{, can be ended by a single `>`\n */\nconst comment2EndRegex = />/g;\n\n/**\n * The tagEnd regex matches the end of the \"inside an opening\" tag syntax\n * position. It either matches a `>`, an attribute-like sequence, or the end\n * of the string after a space (attribute-name position ending).\n *\n * See attributes in the HTML spec:\n * https://www.w3.org/TR/html5/syntax.html#elements-attributes\n *\n * \" \\t\\n\\f\\r\" are HTML space characters:\n * https://infra.spec.whatwg.org/#ascii-whitespace\n *\n * So an attribute is:\n * * The name: any character except a whitespace character, (\"), ('), \">\",\n * \"=\", or \"/\". Note: this is different from the HTML spec which also excludes control characters.\n * * Followed by zero or more space characters\n * * Followed by \"=\"\n * * Followed by zero or more space characters\n * * Followed by:\n * * Any character except space, ('), (\"), \"<\", \">\", \"=\", (`), or\n * * (\") then any non-(\"), or\n * * (') then any non-(')\n */\nconst tagEndRegex = new RegExp(\n `>|${SPACE_CHAR}(?:(${NAME_CHAR}+)(${SPACE_CHAR}*=${SPACE_CHAR}*(?:${ATTR_VALUE_CHAR}|(\"|')|))|$)`,\n 'g',\n);\nconst ENTIRE_MATCH = 0;\nconst ATTRIBUTE_NAME = 1;\nconst SPACES_AND_EQUALS = 2;\nconst QUOTE_CHAR = 3;\n\nconst singleQuoteAttrEndRegex = /'/g;\nconst doubleQuoteAttrEndRegex = /\"/g;\n/**\n * Matches the raw text elements.\n *\n * Comments are not parsed within raw text elements, so we need to search their\n * text content for marker strings.\n */\nconst rawTextElement = /^(?:script|style|textarea|title)$/i;\n\n/** TemplateResult types */\nconst HTML_RESULT = 1;\nconst SVG_RESULT = 2;\nconst MATHML_RESULT = 3;\n\ntype ResultType = typeof HTML_RESULT | typeof SVG_RESULT | typeof MATHML_RESULT;\n\n// TemplatePart types\n// IMPORTANT: these must match the values in PartType\nconst ATTRIBUTE_PART = 1;\nconst CHILD_PART = 2;\nconst PROPERTY_PART = 3;\nconst BOOLEAN_ATTRIBUTE_PART = 4;\nconst EVENT_PART = 5;\nconst ELEMENT_PART = 6;\nconst COMMENT_PART = 7;\n\n/**\n * The return type of the template tag functions, {@linkcode html} and\n * {@linkcode svg} when it hasn't been compiled by @lit-labs/compiler.\n *\n * A `TemplateResult` object holds all the information about a template\n * expression required to render it: the template strings, expression values,\n * and type of template (html or svg).\n *\n * `TemplateResult` objects do not create any DOM on their own. To create or\n * update DOM you need to render the `TemplateResult`. See\n * [Rendering](https://lit.dev/docs/components/rendering) for more information.\n *\n */\nexport type UncompiledTemplateResult<T extends ResultType = ResultType> = {\n // This property needs to remain unminified.\n ['_$litType$']: T;\n strings: TemplateStringsArray;\n values: unknown[];\n};\n\n/**\n * This is a template result that may be either uncompiled or compiled.\n *\n * In the future, TemplateResult will be this type. If you want to explicitly\n * note that a template result is potentially compiled, you can reference this\n * type and it will continue to behave the same through the next major version\n * of Lit. This can be useful for code that wants to prepare for the next\n * major version of Lit.\n */\nexport type MaybeCompiledTemplateResult<T extends ResultType = ResultType> =\n | UncompiledTemplateResult<T>\n | CompiledTemplateResult;\n\n/**\n * The return type of the template tag functions, {@linkcode html} and\n * {@linkcode svg}.\n *\n * A `TemplateResult` object holds all the information about a template\n * expression required to render it: the template strings, expression values,\n * and type of template (html or svg).\n *\n * `TemplateResult` objects do not create any DOM on their own. To create or\n * update DOM you need to render the `TemplateResult`. See\n * [Rendering](https://lit.dev/docs/components/rendering) for more information.\n *\n * In Lit 4, this type will be an alias of\n * MaybeCompiledTemplateResult, so that code will get type errors if it assumes\n * that Lit templates are not compiled. When deliberately working with only\n * one, use either {@linkcode CompiledTemplateResult} or\n * {@linkcode UncompiledTemplateResult} explicitly.\n */\nexport type TemplateResult<T extends ResultType = ResultType> =\n UncompiledTemplateResult<T>;\n\nexport type HTMLTemplateResult = TemplateResult<typeof HTML_RESULT>;\n\nexport type SVGTemplateResult = TemplateResult<typeof SVG_RESULT>;\n\nexport type MathMLTemplateResult = TemplateResult<typeof MATHML_RESULT>;\n\n/**\n * A TemplateResult that has been compiled by @lit-labs/compiler, skipping the\n * prepare step.\n */\nexport interface CompiledTemplateResult {\n // This is a factory in order to make template initialization lazy\n // and allow ShadyRenderOptions scope to be passed in.\n // This property needs to remain unminified.\n ['_$litType$']: CompiledTemplate;\n values: unknown[];\n}\n\nexport interface CompiledTemplate extends Omit<Template, 'el'> {\n // el is overridden to be optional. We initialize it on first render\n el?: HTMLTemplateElement;\n\n // The prepared HTML string to create a template element from.\n // The type is a TemplateStringsArray to guarantee that the value came from\n // source code, preventing a JSON injection attack.\n h: TemplateStringsArray;\n}\n\n/**\n * Generates a template literal tag function that returns a TemplateResult with\n * the given result type.\n */\nconst tag =\n <T extends ResultType>(type: T) =>\n (strings: TemplateStringsArray, ...values: unknown[]): TemplateResult<T> => {\n // Warn against templates octal escape sequences\n // We do this here rather than in render so that the warning is closer to the\n // template definition.\n if (DEV_MODE && strings.some((s) => s === undefined)) {\n console.warn(\n 'Some template strings are undefined.\\n' +\n 'This is probably caused by illegal octal escape sequences.',\n );\n }\n if (DEV_MODE) {\n // Import static-html.js results in a circular dependency which g3 doesn't\n // handle. Instead we know that static values must have the field\n // `_$litStatic$`.\n if (\n values.some((val) => (val as {_$litStatic$: unknown})?.['_$litStatic$'])\n ) {\n issueWarning(\n '',\n `Static values 'literal' or 'unsafeStatic' cannot be used as values to non-static templates.\\n` +\n `Please use the static 'html' tag function. See https://lit.dev/docs/templates/expressions/#static-expressions`,\n );\n }\n }\n return {\n // This property needs to remain unminified.\n ['_$litType$']: type,\n strings,\n values,\n };\n };\n\n/**\n * Interprets a template literal as an HTML template that can efficiently\n * render to and update a container.\n *\n * ```ts\n * const header = (title: string) => html`<h1>${title}</h1>`;\n * ```\n *\n * The `html` tag returns a description of the DOM to render as a value. It is\n * lazy, meaning no work is done until the template is rendered. When rendering,\n * if a template comes from the same expression as a previously rendered result,\n * it's efficiently updated instead of replaced.\n */\nexport const html = tag(HTML_RESULT);\n\n/**\n * Interprets a template literal as an SVG fragment that can efficiently render\n * to and update a container.\n *\n * ```ts\n * const rect = svg`<rect width=\"10\" height=\"10\"></rect>`;\n *\n * const myImage = html`\n * <svg viewBox=\"0 0 10 10\" xmlns=\"http://www.w3.org/2000/svg\">\n * ${rect}\n * </svg>`;\n * ```\n *\n * The `svg` *tag function* should only be used for SVG fragments, or elements\n * that would be contained **inside** an `<svg>` HTML element. A common error is\n * placing an `<svg>` *element* in a template tagged with the `svg` tag\n * function. The `<svg>` element is an HTML element and should be used within a\n * template tagged with the {@linkcode html} tag function.\n *\n * In LitElement usage, it's invalid to return an SVG fragment from the\n * `render()` method, as the SVG fragment will be contained within the element's\n * shadow root and thus not be properly contained within an `<svg>` HTML\n * element.\n */\nexport const svg = tag(SVG_RESULT);\n\n/**\n * Interprets a template literal as MathML fragment that can efficiently render\n * to and update a container.\n *\n * ```ts\n * const num = mathml`<mn>1</mn>`;\n *\n * const eq = html`\n * <math>\n * ${num}\n * </math>`;\n * ```\n *\n * The `mathml` *tag function* should only be used for MathML fragments, or\n * elements that would be contained **inside** a `<math>` HTML element. A common\n * error is placing a `<math>` *element* in a template tagged with the `mathml`\n * tag function. The `<math>` element is an HTML element and should be used\n * within a template tagged with the {@linkcode html} tag function.\n *\n * In LitElement usage, it's invalid to return an MathML fragment from the\n * `render()` method, as the MathML fragment will be contained within the\n * element's shadow root and thus not be properly contained within a `<math>`\n * HTML element.\n */\nexport const mathml = tag(MATHML_RESULT);\n\n/**\n * A sentinel value that signals that a value was handled by a directive and\n * should not be written to the DOM.\n */\nexport const noChange = Symbol.for('lit-noChange');\n\n/**\n * A sentinel value that signals a ChildPart to fully clear its content.\n *\n * ```ts\n * const button = html`${\n * user.isAdmin\n * ? html`<button>DELETE</button>`\n * : nothing\n * }`;\n * ```\n *\n * Prefer using `nothing` over other falsy values as it provides a consistent\n * behavior between various expression binding contexts.\n *\n * In child expressions, `undefined`, `null`, `''`, and `nothing` all behave the\n * same and render no nodes. In attribute expressions, `nothing` _removes_ the\n * attribute, while `undefined` and `null` will render an empty string. In\n * property expressions `nothing` becomes `undefined`.\n */\nexport const nothing = Symbol.for('lit-nothing');\n\n/**\n * The cache of prepared templates, keyed by the tagged TemplateStringsArray\n * and _not_ accounting for the specific template tag used. This means that\n * template tags cannot be dynamic - they must statically be one of html, svg,\n * or attr. This restriction simplifies the cache lookup, which is on the hot\n * path for rendering.\n */\nconst templateCache = new WeakMap<TemplateStringsArray, Template>();\n\n/**\n * Object specifying options for controlling lit-html rendering. Note that\n * while `render` may be called multiple times on the same `container` (and\n * `renderBefore` reference node) to efficiently update the rendered content,\n * only the options passed in during the first render are respected during\n * the lifetime of renders to that unique `container` + `renderBefore`\n * combination.\n */\nexport interface RenderOptions {\n /**\n * An object to use as the `this` value for event listeners. It's often\n * useful to set this to the host component rendering a template.\n */\n host?: object;\n /**\n * A DOM node before which to render content in the container.\n */\n renderBefore?: ChildNode | null;\n /**\n * Node used for cloning the template (`importNode` will be called on this\n * node). This controls the `ownerDocument` of the rendered DOM, along with\n * any inherited context. Defaults to the global `document`.\n */\n creationScope?: {importNode(node: Node, deep?: boolean): Node};\n /**\n * The initial connected state for the top-level part being rendered. If no\n * `isConnected` option is set, `AsyncDirective`s will be connected by\n * default. Set to `false` if the initial render occurs in a disconnected tree\n * and `AsyncDirective`s should see `isConnected === false` for their initial\n * render. The `part.setConnected()` method must be used subsequent to initial\n * render to change the connected state of the part.\n */\n isConnected?: boolean;\n}\n\nconst walker = d.createTreeWalker(\n d,\n 129 /* NodeFilter.SHOW_{ELEMENT|COMMENT} */,\n);\n\nlet sanitizerFactoryInternal: SanitizerFactory = noopSanitizer;\n\n//\n// Classes only below here, const variable declarations only above here...\n//\n// Keeping variable declarations and classes together improves minification.\n// Interfaces and type aliases can be interleaved freely.\n//\n\n// Type for classes that have a `_directive` or `_directives[]` field, used by\n// `resolveDirective`\nexport interface DirectiveParent {\n _$parent?: DirectiveParent;\n _$isConnected: boolean;\n __directive?: Directive;\n __directives?: Array<Directive | undefined>;\n}\n\nfunction trustFromTemplateString(\n tsa: TemplateStringsArray,\n stringFromTSA: string,\n): TrustedHTML {\n // A security check to prevent spoofing of Lit template results.\n // In the future, we may be able to replace this with Array.isTemplateObject,\n // though we might need to make that check inside of the html and svg\n // functions, because precompiled templates don't come in as\n // TemplateStringArray objects.\n if (!isArray(tsa) || !tsa.hasOwnProperty('raw')) {\n let message = 'invalid template strings array';\n if (DEV_MODE) {\n message = `\n Internal Error: expected template strings to be an array\n with a 'raw' field. Faking a template strings array by\n calling html or svg like an ordinary function is effectively\n the same as calling unsafeHtml and can lead to major security\n issues, e.g. opening your code up to XSS attacks.\n If you're using the html or svg tagged template functions normally\n and still seeing this error, please file a bug at\n https://github.com/lit/lit/issues/new?template=bug_report.md\n and include information about your build tooling, if any.\n `\n .trim()\n .replace(/\\n */g, '\\n');\n }\n throw new Error(message);\n }\n return policy !== undefined\n ? policy.createHTML(stringFromTSA)\n : (stringFromTSA as unknown as TrustedHTML);\n}\n\n/**\n * Returns an HTML string for the given TemplateStringsArray and result type\n * (HTML or SVG), along with the case-sensitive bound attribute names in\n * template order. The HTML contains comment markers denoting the `ChildPart`s\n * and suffixes on bound attributes denoting the `AttributeParts`.\n *\n * @param strings template strings array\n * @param type HTML or SVG\n * @return Array containing `[html, attrNames]` (array returned for terseness,\n * to avoid object fields since this code is shared with non-minified SSR\n * code)\n */\nconst getTemplateHtml = (\n strings: TemplateStringsArray,\n type: ResultType,\n): [TrustedHTML, Array<string>] => {\n // Insert makers into the template HTML to represent the position of\n // bindings. The following code scans the template strings to determine the\n // syntactic position of the bindings. They can be in text position, where\n // we insert an HTML comment, attribute value position, where we insert a\n // sentinel string and re-write the attribute name, or inside a tag where\n // we insert the sentinel string.\n const l = strings.length - 1;\n // Stores the case-sensitive bound attribute names in the order of their\n // parts. ElementParts are also reflected in this array as undefined\n // rather than a string, to disambiguate from attribute bindings.\n const attrNames: Array<string> = [];\n let html =\n type === SVG_RESULT ? '<svg>' : type === MATHML_RESULT ? '<math>' : '';\n\n // When we're inside a raw text tag (not it's text content), the regex\n // will still be tagRegex so we can find attributes, but will switch to\n // this regex when the tag ends.\n let rawTextEndRegex: RegExp | undefined;\n\n // The current parsing state, represented as a reference to one of the\n // regexes\n let regex = textEndRegex;\n\n for (let i = 0; i < l; i++) {\n const s = strings[i];\n // The index of the end of the last attribute name. When this is\n // positive at end of a string, it means we're in an attribute value\n // position and need to rewrite the attribute name.\n // We also use a special value of -2 to indicate that we encountered\n // the end of a string in attribute name position.\n let attrNameEndIndex = -1;\n let attrName: string | undefined;\n let lastIndex = 0;\n let match!: RegExpExecArray | null;\n\n // The conditions in this loop handle the current parse state, and the\n // assignments to the `regex` variable are the state transitions.\n while (lastIndex < s.length) {\n // Make sure we start searching from where we previously left off\n regex.lastIndex = lastIndex;\n match = regex.exec(s);\n if (match === null) {\n break;\n }\n lastIndex = regex.lastIndex;\n if (regex === textEndRegex) {\n if (match[COMMENT_START] === '!--') {\n regex = commentEndRegex;\n } else if (match[COMMENT_START] !== undefined) {\n // We started a weird comment, like </{\n regex = comment2EndRegex;\n } else if (match[TAG_NAME] !== undefined) {\n if (rawTextElement.test(match[TAG_NAME])) {\n // Record if we encounter a raw-text element. We'll switch to\n // this regex at the end of the tag.\n rawTextEndRegex = new RegExp(`</${match[TAG_NAME]}`, 'g');\n }\n regex = tagEndRegex;\n } else if (match[DYNAMIC_TAG_NAME] !== undefined) {\n if (DEV_MODE) {\n throw new Error(\n 'Bindings in tag names are not supported. Please use static templates instead. ' +\n 'See https://lit.dev/docs/templates/expressions/#static-expressions',\n );\n }\n regex = tagEndRegex;\n }\n } else if (regex === tagEndRegex) {\n if (match[ENTIRE_MATCH] === '>') {\n // End of a tag. If we had started a raw-text element, use that\n // regex\n regex = rawTextEndRegex ?? textEndRegex;\n // We may be ending an unquoted attribute value, so make sure we\n // clear any pending attrNameEndIndex\n attrNameEndIndex = -1;\n } else if (match[ATTRIBUTE_NAME] === undefined) {\n // Attribute name position\n attrNameEndIndex = -2;\n } else {\n attrNameEndIndex = regex.lastIndex - match[SPACES_AND_EQUALS].length;\n attrName = match[ATTRIBUTE_NAME];\n regex =\n match[QUOTE_CHAR] === undefined\n ? tagEndRegex\n : match[QUOTE_CHAR] === '\"'\n ? doubleQuoteAttrEndRegex\n : singleQuoteAttrEndRegex;\n }\n } else if (\n regex === doubleQuoteAttrEndRegex ||\n regex === singleQuoteAttrEndRegex\n ) {\n regex = tagEndRegex;\n } else if (regex === commentEndRegex || regex === comment2EndRegex) {\n regex = textEndRegex;\n } else {\n // Not one of the five state regexes, so it must be the dynamically\n // created raw text regex and we're at the close of that element.\n regex = tagEndRegex;\n rawTextEndRegex = undefined;\n }\n }\n\n if (DEV_MODE) {\n // If we have a attrNameEndIndex, which indicates that we should\n // rewrite the attribute name, assert that we're in a valid attribute\n // position - either in a tag, or a quoted attribute value.\n console.assert(\n attrNameEndIndex === -1 ||\n regex === tagEndRegex ||\n regex === singleQuoteAttrEndRegex ||\n regex === doubleQuoteAttrEndRegex,\n 'unexpected parse state B',\n );\n }\n\n // We have four cases:\n // 1. We're in text position, and not in a raw text element\n // (regex === textEndRegex): insert a comment marker.\n // 2. We have a non-negative attrNameEndIndex which means we need to\n // rewrite the attribute name to add a bound attribute suffix.\n // 3. We're at the non-first binding in a multi-binding attribute, use a\n // plain marker.\n // 4. We're somewhere else inside the tag. If we're in attribute name\n // position (attrNameEndIndex === -2), add a sequential suffix to\n // generate a unique attribute name.\n\n // Detect a binding next to self-closing tag end and insert a space to\n // separate the marker from the tag end:\n const end =\n regex === tagEndRegex && strings[i + 1].startsWith('/>') ? ' ' : '';\n html +=\n regex === textEndRegex\n ? s + nodeMarker\n : attrNameEndIndex >= 0\n ? (attrNames.push(attrName!),\n s.slice(0, attrNameEndIndex) +\n boundAttributeSuffix +\n s.slice(attrNameEndIndex)) +\n marker +\n end\n : s + marker + (attrNameEndIndex === -2 ? i : end);\n }\n\n const htmlResult: string | TrustedHTML =\n html +\n (strings[l] || '<?>') +\n (type === SVG_RESULT ? '</svg>' : type === MATHML_RESULT ? '</math>' : '');\n\n // Returned as an array for terseness\n return [trustFromTemplateString(strings, htmlResult), attrNames];\n};\n\n/** @internal */\nexport type {Template};\nclass Template {\n /** @internal */\n el!: HTMLTemplateElement;\n\n parts: Array<TemplatePart> = [];\n\n constructor(\n // This property needs to remain unminified.\n {strings, ['_$litType$']: type}: UncompiledTemplateResult,\n options?: RenderOptions,\n ) {\n let node: Node | null;\n let nodeIndex = 0;\n let attrNameIndex = 0;\n const partCount = strings.length - 1;\n const parts = this.parts;\n\n // Create template element\n const [html, attrNames] = getTemplateHtml(strings, type);\n this.el = Template.createElement(html, options);\n walker.currentNode = this.el.content;\n\n // Re-parent SVG or MathML nodes into template root\n if (type === SVG_RESULT || type === MATHML_RESULT) {\n const wrapper = this.el.content.firstChild!;\n wrapper.replaceWith(...wrapper.childNodes);\n }\n\n // Walk the template to find binding markers and create TemplateParts\n while ((node = walker.nextNode()) !== null && parts.length < partCount) {\n if (node.nodeType === 1) {\n if (DEV_MODE) {\n const tag = (node as Element).localName;\n // Warn if `textarea` includes an expression and throw if `template`\n // does since these are not supported. We do this by checking\n // innerHTML for anything that looks like a marker. This catches\n // cases like bindings in textarea there markers turn into text nodes.\n if (\n /^(?:textarea|template)$/i!.test(tag) &&\n (node as Element).innerHTML.includes(marker)\n ) {\n const m =\n `Expressions are not supported inside \\`${tag}\\` ` +\n `elements. See https://lit.dev/msg/expression-in-${tag} for more ` +\n `information.`;\n if (tag === 'template') {\n throw new Error(m);\n } else issueWarning('', m);\n }\n }\n // TODO (justinfagnani): for attempted dynamic tag names, we don't\n // increment the bindingIndex, and it'll be off by 1 in the element\n // and off by two after it.\n if ((node as Element).hasAttributes()) {\n for (const name of (node as Element).getAttributeNames()) {\n if (name.endsWith(boundAttributeSuffix)) {\n const realName = attrNames[attrNameIndex++];\n const value = (node as Element).getAttribute(name)!;\n const statics = value.split(marker);\n const m = /([.?@])?(.*)/.exec(realName)!;\n parts.push({\n type: ATTRIBUTE_PART,\n index: nodeIndex,\n name: m[2],\n strings: statics,\n ctor:\n m[1] === '.'\n ? PropertyPart\n : m[1] === '?'\n ? BooleanAttributePart\n : m[1] === '@'\n ? EventPart\n : AttributePart,\n });\n (node as Element).removeAttribute(name);\n } else if (name.startsWith(marker)) {\n parts.push({\n type: ELEMENT_PART,\n index: nodeIndex,\n });\n (node as Element).removeAttribute(name);\n }\n }\n }\n // TODO (justinfagnani): benchmark the regex against testing for each\n // of the 3 raw text element names.\n if (rawTextElement.test((node as Element).tagName)) {\n // For raw text elements we need to split the text content on\n // markers, create a Text node for each segment, and create\n // a TemplatePart for each marker.\n const strings = (node as Element).textContent!.split(marker);\n const lastIndex = strings.length - 1;\n if (lastIndex > 0) {\n (node as Element).textContent = trustedTypes\n ? (trustedTypes.emptyScript as unknown as '')\n : '';\n // Generate a new text node for each literal section\n // These nodes are also used as the markers for node parts\n // We can't use empty text nodes as markers because they're\n // normalized when cloning in IE (could simplify when\n // IE is no longer supported)\n for (let i = 0; i < lastIndex; i++) {\n (node as Element).append(strings[i], createMarker());\n // Walk past the marker node we just added\n walker.nextNode();\n parts.push({type: CHILD_PART, index: ++nodeIndex});\n }\n // Note because this marker is added after the walker's current\n // node, it will be walked to in the outer loop (and ignored), so\n // we don't need to adjust nodeIndex here\n (node as Element).append(strings[lastIndex], createMarker());\n }\n }\n } else if (node.nodeType === 8) {\n const data = (node as Comment).data;\n if (data === markerMatch) {\n parts.push({type: CHILD_PART, index: nodeIndex});\n } else {\n let i = -1;\n while ((i = (node as Comment).data.indexOf(marker, i + 1)) !== -1) {\n // Comment node has a binding marker inside, make an inactive part\n // The binding won't work, but subsequent bindings will\n parts.push({type: COMMENT_PART, index: nodeIndex});\n // Move to the end of the match\n i += marker.length - 1;\n }\n }\n }\n nodeIndex++;\n }\n\n if (DEV_MODE) {\n // If there was a duplicate attribute on a tag, then when the tag is\n // parsed into an element the attribute gets de-duplicated. We can detect\n // this mismatch if we haven't precisely consumed every attribute name\n // when preparing the template. This works because `attrNames` is built\n // from the template string and `attrNameIndex` comes from processing the\n // resulting DOM.\n if (attrNames.length !== attrNameIndex) {\n throw new Error(\n `Detected duplicate attribute bindings. This occurs if your template ` +\n `has duplicate attributes on an element tag. For example ` +\n `\"<input ?disabled=\\${true} ?disabled=\\${false}>\" contains a ` +\n `duplicate \"disabled\" attribute. The error was detected in ` +\n `the following template: \\n` +\n '`' +\n strings.join('${...}') +\n '`',\n );\n }\n }\n\n // We could set walker.currentNode to another node here to prevent a memory\n // leak, but every time we prepare a template, we immediately render it\n // and re-use the walker in new TemplateInstance._clone().\n debugLogEvent &&\n debugLogEvent({\n kind: 'template prep',\n template: this,\n clonableTemplate: this.el,\n parts: this.parts,\n strings,\n });\n }\n\n // Overridden via `litHtmlPolyfillSupport` to provide platform support.\n /** @nocollapse */\n static createElement(html: TrustedHTML, _options?: RenderOptions) {\n const el = d.createElement('template');\n el.innerHTML = html as unknown as string;\n return el;\n }\n}\n\nexport interface Disconnectable {\n _$parent?: Disconnectable;\n _$disconnectableChildren?: Set<Disconnectable>;\n // Rather than hold connection state on instances, Disconnectables recursively\n // fetch the connection state from the RootPart they are connected in via\n // getters up the Disconnectable tree via _$parent references. This pushes the\n // cost of tracking the isConnected state to `AsyncDirectives`, and avoids\n // needing to pass all Disconnectables (parts, template instances, and\n // directives) their connection state each time it changes, which would be\n // costly for trees that have no AsyncDirectives.\n _$isConnected: boolean;\n}\n\nfunction resolveDirective(\n part: ChildPart | AttributePart | ElementPart,\n value: unknown,\n parent: DirectiveParent = part,\n attributeIndex?: number,\n): unknown {\n // Bail early if the value is explicitly noChange. Note, this means any\n // nested directive is still attached and is not run.\n if (value === noChange) {\n return value;\n }\n let currentDirective =\n attributeIndex !== undefined\n ? (parent as AttributePart).__directives?.[attributeIndex]\n : (parent as ChildPart | ElementPart | Directive).__directive;\n const nextDirectiveConstructor = isPrimitive(value)\n ? undefined\n : // This property needs to remain unminified.\n (value as DirectiveResult)['_$litDirective$'];\n if (currentDirective?.constructor !== nextDirectiveConstructor) {\n // This property needs to remain unminified.\n currentDirective?.['_$notifyDirectiveConnectionChanged']?.(false);\n if (nextDirectiveConstructor === undefined) {\n currentDirective = undefined;\n } else {\n currentDirective = new nextDirectiveConstructor(part as PartInfo);\n currentDirective._$initialize(part, parent, attributeIndex);\n }\n if (attributeIndex !== undefined) {\n ((parent as AttributePart).__directives ??= [])[attributeIndex] =\n currentDirective;\n } else {\n (parent as ChildPart | Directive).__directive = currentDirective;\n }\n }\n if (currentDirective !== undefined) {\n value = resolveDirective(\n part,\n currentDirective._$resolve(part, (value as DirectiveResult).values),\n currentDirective,\n attributeIndex,\n );\n }\n return value;\n}\n\nexport type {TemplateInstance};\n/**\n * An updateable instance of a Template. Holds references to the Parts used to\n * update the template instance.\n */\nclass TemplateInstance implements Disconnectable {\n _$template: Template;\n _$parts: Array<Part | undefined> = [];\n\n /** @internal */\n _$parent: ChildPart;\n /** @internal */\n _$disconnectableChildren?: Set<Disconnectable> = undefined;\n\n constructor(template: Template, parent: ChildPart) {\n this._$template = template;\n this._$parent = parent;\n }\n\n // Called by ChildPart parentNode getter\n get parentNode() {\n return this._$parent.parentNode;\n }\n\n // See comment in Disconnectable interface for why this is a getter\n get _$isConnected() {\n return this._$parent._$isConnected;\n }\n\n // This method is separate from the constructor because we need to return a\n // DocumentFragment and we don't want to hold onto it with an instance field.\n _clone(options: RenderOptions | undefined) {\n const {\n el: {content},\n parts: parts,\n } = this._$template;\n const fragment = (options?.creationScope ?? d).importNode(content, true);\n walker.currentNode = fragment;\n\n let node = walker.nextNode()!;\n let nodeIndex = 0;\n let partIndex = 0;\n let templatePart = parts[0];\n\n while (templatePart !== undefined) {\n if (nodeIndex === templatePart.index) {\n let part: Part | undefined;\n if (templatePart.type === CHILD_PART) {\n part = new ChildPart(\n node as HTMLElement,\n node.nextSibling,\n this,\n options,\n );\n } else if (templatePart.type === ATTRIBUTE_PART) {\n part = new templatePart.ctor(\n node as HTMLElement,\n templatePart.name,\n templatePart.strings,\n this,\n options,\n );\n } else if (templatePart.type === ELEMENT_PART) {\n part = new ElementPart(node as HTMLElement, this, options);\n }\n this._$parts.push(part);\n templatePart = parts[++partIndex];\n }\n if (nodeIndex !== templatePart?.index) {\n node = walker.nextNode()!;\n nodeIndex++;\n }\n }\n // We need to set the currentNode away from the cloned tree so that we\n // don't hold onto the tree even if the tree is detached and should be\n // freed.\n walker.currentNode = d;\n return fragment;\n }\n\n _update(values: Array<unknown>) {\n let i = 0;\n for (const part of this._$parts) {\n if (part !== undefined) {\n debugLogEvent &&\n debugLogEvent({\n kind: 'set part',\n part,\n value: values[i],\n valueIndex: i,\n values,\n templateInstance: this,\n });\n if ((part as AttributePart).strings !== undefined) {\n (part as AttributePart)._$setValue(values, part as AttributePart, i);\n // The number of values the part consumes is part.strings.length - 1\n // since values are in between template spans. We increment i by 1\n // later in the loop, so increment it by part.strings.length - 2 here\n i += (part as AttributePart).strings!.length - 2;\n } else {\n part._$setValue(values[i]);\n }\n }\n i++;\n }\n }\n}\n\n/*\n * Parts\n */\ntype AttributeTemplatePart = {\n readonly type: typeof ATTRIBUTE_PART;\n readonly index: number;\n readonly name: string;\n readonly ctor: typeof AttributePart;\n readonly strings: ReadonlyArray<string>;\n};\ntype ChildTemplatePart = {\n readonly type: typeof CHILD_PART;\n readonly index: number;\n};\ntype ElementTemplatePart = {\n readonly type: typeof ELEMENT_PART;\n readonly index: number;\n};\ntype CommentTemplatePart = {\n readonly type: typeof COMMENT_PART;\n readonly index: number;\n};\n\n/**\n * A TemplatePart represents a dynamic part in a template, before the template\n * is instantiated. When a template is instantiated Parts are created from\n * TemplateParts.\n */\ntype TemplatePart =\n | ChildTemplatePart\n | AttributeTemplatePart\n | ElementTemplatePart\n | CommentTemplatePart;\n\nexport type Part =\n | ChildPart\n | AttributePart\n | PropertyPart\n | BooleanAttributePart\n | ElementPart\n | EventPart;\n\nexport type {ChildPart};\nclass ChildPart implements Disconnectable {\n readonly type = CHILD_PART;\n readonly options: RenderOptions | undefined;\n _$committedValue: unknown = nothing;\n /** @internal */\n __directive?: Directive;\n /** @internal */\n _$startNode: ChildNode;\n /** @internal */\n _$endNode: ChildNode | null;\n private _textSanitizer: ValueSanitizer | undefined;\n /** @internal */\n _$parent: Disconnectable | undefined;\n /**\n * Connection state for RootParts only (i.e. ChildPart without _$parent\n * returned from top-level `render`). This field is unused otherwise. The\n * intention would be clearer if we made `RootPart` a subclass of `ChildPart`\n * with this field (and a different _$isConnected getter), but the subclass\n * caused a perf regression, possibly due to making call sites polymorphic.\n * @internal\n */\n __isConnected: boolean;\n\n // See comment in Disconnectable interface for why this is a getter\n get _$isConnected() {\n // ChildParts that are not at the root should always be created with a\n // parent; only RootChildNode's won't, so they return the local isConnected\n // state\n return this._$parent?._$isConnected ?? this.__isConnected;\n }\n\n // The following fields will be patched onto ChildParts when required by\n // AsyncDirective\n /** @internal */\n _$disconnectableChildren?: Set<Disconnectable> = undefined;\n /** @internal */\n _$notifyConnectionChanged?(\n isConnected: boolean,\n removeFromParent?: boolean,\n from?: number,\n ): void;\n /** @internal */\n _$reparentDisconnectables?(parent: Disconnectable): void;\n\n constructor(\n startNode: ChildNode,\n endNode: ChildNode | null,\n parent: TemplateInstance | ChildPart | undefined,\n options: RenderOptions | undefined,\n ) {\n this._$startNode = startNode;\n this._$endNode = endNode;\n this._$parent = parent;\n this.options = options;\n // Note __isConnected is only ever accessed on RootParts (i.e. when there is\n // no _$parent); the value on a non-root-part is \"don't care\", but checking\n // for parent would be more code\n this.__isConnected = options?.isConnected ?? true;\n if (ENABLE_EXTRA_SECURITY_HOOKS) {\n // Explicitly initialize for consistent class shape.\n this._textSanitizer = undefined;\n }\n }\n\n /**\n * The parent node into which the part renders its content.\n *\n * A ChildPart's content consists of a range of adjacent child nodes of\n * `.parentNode`, possibly bordered by 'marker nodes' (`.startNode` and\n * `.endNode`).\n *\n * - If both `.startNode` and `.endNode` are non-null, then the part's content\n * consists of all siblings between `.startNode` and `.endNode`, exclusively.\n *\n * - If `.startNode` is non-null but `.endNode` is null, then the part's\n * content consists of all siblings following `.startNode`, up to and\n * including the last child of `.parentNode`. If `.endNode` is non-null, then\n * `.startNode` will always be non-null.\n *\n * - If both `.endNode` and `.startNode` are null, then the part's content\n * consists of all child nodes of `.parentNode`.\n */\n get parentNode(): Node {\n let parentNode: Node = wrap(this._$startNode).parentNode!;\n const parent = this._$parent;\n if (\n parent !== undefined &&\n parentNode?.nodeType === 11 /* Node.DOCUMENT_FRAGMENT */\n ) {\n // If the parentNode is a DocumentFragment, it may be because the DOM is\n // still in the cloned fragment during initial render; if so, get the real\n // parentNode the part will be committed into by asking the parent.\n parentNode = (parent as ChildPart | TemplateInstance).parentNode;\n }\n return parentNode;\n }\n\n /**\n * The part's leading marker node, if any. See `.parentNode` for more\n * information.\n */\n get startNode(): Node | null {\n return this._$startNode;\n }\n\n /**\n * The part's trailing marker node, if any. See `.parentNode` for more\n * information.\n */\n get endNode(): Node | null {\n return this._$endNode;\n }\n\n _$setValue(value: unknown, directiveParent: DirectiveParent = this): void {\n if (DEV_MODE && this.parentNode === null) {\n throw new Error(\n `This \\`ChildPart\\` has no \\`parentNode\\` and therefore cannot accept a value. This likely means the element containing the part was manipulated in an unsupported way outside of Lit's control such that the part's marker nodes were ejected from DOM. For example, setting the element's \\`innerHTML\\` or \\`textContent\\` can do this.`,\n );\n }\n value = resolveDirective(this, value, directiveParent);\n if (isPrimitive(value)) {\n // Non-rendering child values. It's important that these do not render\n // empty text nodes to avoid issues with preventing default <slot>\n // fallback content.\n if (value === nothing || value == null || value === '') {\n if (this._$committedValue !== nothing) {\n debugLogEvent &&\n debugLogEvent({\n kind: 'commit nothing to child',\n start: this._$startNode,\n end: this._$endNode,\n parent: this._$parent,\n options: this.options,\n });\n this._$clear();\n }\n this._$committedValue = nothing;\n } else if (value !== this._$committedValue && value !== noChange) {\n this._commitText(value);\n }\n // This property needs to remain unminified.\n } else if ((value as TemplateResult)['_$litType$'] !== undefined) {\n this._commitTemplateResult(value as TemplateResult);\n } else if ((value as Node).nodeType !== undefined) {\n if (DEV_MODE && this.options?.host === value) {\n this._commitText(\n `[probable mistake: rendered a template's host in itself ` +\n `(commonly caused by writing \\${this} in a template]`,\n );\n console.warn(\n `Attempted to render the template host`,\n value,\n `inside itself. This is almost always a mistake, and in dev mode `,\n `we render some warning text. In production however, we'll `,\n `render it, which will usually result in an error, and sometimes `,\n `in the element disappearing from the DOM.`,\n );\n return;\n }\n this._commitNode(value as Node);\n } else if (isIterable(value)) {\n this._commitIterable(value);\n } else {\n // Fallback, will render the string representation\n this._commitText(value);\n }\n }\n\n private _insert<T extends Node>(node: T) {\n return wrap(wrap(this._$startNode).parentNode!).insertBefore(\n node,\n this._$endNode,\n );\n }\n\n private _commitNode(value: Node): void {\n if (this._$committedValue !== value) {\n this._$clear();\n if (\n ENABLE_EXTRA_SECURITY_HOOKS &&\n sanitizerFactoryInternal !== noopSanitizer\n ) {\n const parentNodeName = this._$startNode.parentNode?.nodeName;\n if (parentNodeName === 'STYLE' || parentNodeName === 'SCRIPT') {\n let message = 'Forbidden';\n if (DEV_MODE) {\n if (parentNodeName === 'STYLE') {\n message =\n `Lit does not support binding inside style nodes. ` +\n `This is a security risk, as style injection attacks can ` +\n `exfiltrate data and spoof UIs. ` +\n `Consider instead using css\\`...\\` literals ` +\n `to compose styles, and do dynamic styling with ` +\n `css custom properties, ::parts, <slot>s, ` +\n `and by mutating the DOM rather than stylesheets.`;\n } else {\n message =\n `Lit does not support binding inside script nodes. ` +\n `This is a security risk, as it could allow arbitrary ` +\n `code execution.`;\n }\n }\n throw new Error(message);\n }\n }\n debugLogEvent &&\n debugLogEvent({\n kind: 'commit node',\n start: this._$startNode,\n parent: this._$parent,\n value: value,\n options: this.options,\n });\n this._$committedValue = this._insert(value);\n }\n }\n\n private _commitText(value: unknown): void {\n // If the committed value is a primitive it means we called _commitText on\n // the previous render, and we know that this._$startNode.nextSibling is a\n // Text node. We can now just replace the text content (.data) of the node.\n if (\n this._$committedValue !== nothing &&\n isPrimitive(this._$committedValue)\n ) {\n const node = wrap(this._$startNode).nextSibling as Text;\n if (ENABLE_EXTRA_SECURITY_HOOKS) {\n if (this._textSanitizer === undefined) {\n this._textSanitizer = createSanitizer(node, 'data', 'property');\n }\n value = this._textSanitizer(value);\n }\n debugLogEvent &&\n debugLogEvent({\n kind: 'commit text',\n node,\n value,\n options: this.options,\n });\n (node as Text).data = value as string;\n } else {\n if (ENABLE_EXTRA_SECURITY_HOOKS) {\n const textNode = d.createTextNode('');\n this._commitNode(textNode);\n // When setting text content, for security purposes it matters a lot\n // what the parent is. For example, <style> and <script> need to be\n // handled with care, while <span> does not. So first we need to put a\n // text node into the document, then we can sanitize its content.\n if (this._textSanitizer === undefined) {\n this._textSanitizer = createSanitizer(textNode, 'data', 'property');\n }\n value = this._textSanitizer(value);\n debugLogEvent &&\n debugLogEvent({\n kind: 'commit text',\n node: textNode,\n value,\n options: this.options,\n });\n textNode.data = value as string;\n } else {\n this._commitNode(d.createTextNode(value as string));\n debugLogEvent &&\n debugLogEvent({\n kind: 'commit text',\n node: wrap(this._$startNode).nextSibling as Text,\n value,\n options: this.options,\n });\n }\n }\n this._$committedValue = value;\n }\n\n private _commitTemplateResult(\n result: TemplateResult | CompiledTemplateResult,\n ): void {\n // This property needs to remain unminified.\n const {values, ['_$litType$']: type} = result;\n // If $litType$ is a number, result is a plain TemplateResult and we get\n // the template from the template cache. If not, result is a\n // CompiledTemplateResult and _$litType$ is a CompiledTemplate and we need\n // to create the <template> element the first time we see it.\n const template: Template | CompiledTemplate =\n typeof type === 'number'\n ? this._$getTemplate(result as UncompiledTemplateResult)\n : (type.el === undefined &&\n (type.el = Template.createElement(\n trustFromTemplateString(type.h, type.h[0]),\n this.options,\n )),\n type);\n\n if ((this._$committedValue as TemplateInstance)?._$template === template) {\n debugLogEvent &&\n debugLogEvent({\n kind: 'template updating',\n template,\n instance: this._$committedValue as TemplateInstance,\n parts: (this._$committedValue as TemplateInstance)._$parts,\n options: this.options,\n values,\n });\n (this._$committedValue as TemplateInstance)._update(values);\n } else {\n const instance = new TemplateInstance(template as Template, this);\n const fragment = instance._clone(this.options);\n debugLogEvent &&\n debugLogEvent({\n kind: 'template instantiated',\n template,\n instance,\n parts: instance._$parts,\n options: this.options,\n fragment,\n values,\n });\n instance._update(values);\n debugLogEvent &&\n debugLogEvent({\n kind: 'template instantiated and updated',\n template,\n instance,\n parts: instance._$parts,\n options: this.options,\n fragment,\n values,\n });\n this._commitNode(fragment);\n this._$committedValue = instance;\n }\n }\n\n // Overridden via `litHtmlPolyfillSupport` to provide platform support.\n /** @internal */\n _$getTemplate(result: UncompiledTemplateResult) {\n let template = templateCache.get(result.strings);\n if (template === undefined) {\n templateCache.set(result.strings, (template = new Template(result)));\n }\n return template;\n }\n\n private _commitIterable(value: Iterable<unknown>): void {\n // For an Iterable, we create a new InstancePart per item, then set its\n // value to the item. This is a little bit of overhead for every item in\n // an Iterable, but it lets us recurse easily and efficiently update Arrays\n // of TemplateResults that will be commonly returned from expressions like:\n // array.map((i) => html`${i}`), by reusing existing TemplateInstances.\n\n // If value is an array, then the previous render was of an\n // iterable and value will contain the ChildParts from the previous\n // render. If value is not an array, clear this part and make a new\n // array for ChildParts.\n if (!isArray(this._$committedValue)) {\n this._$committedValue = [];\n this._$clear();\n }\n\n // Lets us keep track of how many items we stamped so we can clear leftover\n // items from a previous render\n const itemParts = this._$committedValue as ChildPart[];\n let partIndex = 0;\n let itemPart: ChildPart | undefined;\n\n for (const item of value) {\n if (partIndex === itemParts.length) {\n // If no existing part, create a new one\n // TODO (justinfagnani): test perf impact of always creating two parts\n // instead of sharing parts between nodes\n // https://github.com/lit/lit/issues/1266\n itemParts.push(\n (itemPart = new ChildPart(\n this._insert(createMarker()),\n this._insert(createMarker()),\n this,\n this.options,\n )),\n );\n } else {\n // Reuse an existing part\n itemPart = itemParts[partIndex];\n }\n itemPart._$setValue(item);\n partIndex++;\n }\n\n if (partIndex < itemParts.length) {\n // itemParts always have end nodes\n this._$clear(\n itemPart && wrap(itemPart._$endNode!).nextSibling,\n partIndex,\n );\n // Truncate the parts array so _value reflects the current state\n itemParts.length = partIndex;\n }\n }\n\n /**\n * Removes the nodes contained within this Part from the DOM.\n *\n * @param start Start node to clear from, for clearing a subset of the part's\n * DOM (used when truncating iterables)\n * @param from When `start` is specified, the index within the iterable from\n * which ChildParts are being removed, used for disconnecting directives in\n * those Parts.\n *\n * @internal\n */\n _$clear(\n start: ChildNode | null = wrap(this._$startNode).nextSibling,\n from?: number,\n ) {\n this._$notifyConnectionChanged?.(false, true, from);\n while (start && start !== this._$endNode) {\n const n = wrap(start!).nextSibling;\n (wrap(start!) as Element).remove();\n start = n;\n }\n }\n /**\n * Implementation of RootPart's `isConnected`. Note that this method\n * should only be called on `RootPart`s (the `ChildPart` returned from a\n * top-level `render()` call). It has no effect on non-root ChildParts.\n * @param isConnected Whether to set\n * @internal\n */\n setConnected(isConnected: boolean) {\n if (this._$parent === undefined) {\n this.__isConnected = isConnected;\n this._$notifyConnectionChanged?.(isConnected);\n } else if (DEV_MODE) {\n throw new Error(\n 'part.setConnected() may only be called on a ' +\n 'RootPart returned from render().',\n );\n }\n }\n}\n\n/**\n * A top-level `ChildPart` returned from `render` that manages the connected\n * state of `AsyncDirective`s created throughout the tree below it.\n */\nexport interface RootPart extends ChildPart {\n /**\n * Sets the connection state for `AsyncDirective`s contained within this root\n * ChildPart.\n *\n * lit-html does not automatically monitor the connectedness of DOM rendered;\n * as such, it is the responsibility of the caller to `render` to ensure that\n * `part.setConnected(false)` is called before the part object is potentially\n * discarded, to ensure that `AsyncDirective`s have a chance to dispose of\n * any resources being held. If a `RootPart` that was previously\n * disconnected is subsequently re-connected (and its `AsyncDirective`s should\n * re-connect), `setConnected(true)` should be called.\n *\n * @param isConnected Whether directives within this tree should be connected\n * or not\n */\n setConnected(isConnected: boolean): void;\n}\n\nexport type {AttributePart};\nclass AttributePart implements Disconnectable {\n readonly type:\n | typeof ATTRIBUTE_PART\n | typeof PROPERTY_PART\n | typeof BOOLEAN_ATTRIBUTE_PART\n | typeof EVENT_PART = ATTRIBUTE_PART;\n readonly element: HTMLElement;\n readonly name: string;\n readonly options: RenderOptions | undefined;\n\n /**\n * If this attribute part represents an interpolation, this contains the\n * static strings of the interpolation. For single-value, complete bindings,\n * this is undefined.\n */\n readonly strings?: ReadonlyArray<string>;\n /** @internal */\n _$committedValue: unknown | Array<unknown> = nothing;\n /** @internal */\n __directives?: Array<Directive | undefined>;\n /** @internal */\n _$parent: Disconnectable;\n /** @internal */\n _$disconnectableChildren?: Set<Disconnectable> = undefined;\n\n protected _sanitizer: ValueSanitizer | undefined;\n\n get tagName() {\n return this.element.tagName;\n }\n\n // See comment in Disconnectable interface for why this is a getter\n get _$isConnected() {\n return this._$parent._$isConnected;\n }\n\n constructor(\n element: HTMLElement,\n name: string,\n strings: ReadonlyArray<string>,\n parent: Disconnectable,\n options: RenderOptions | undefined,\n ) {\n this.element = element;\n this.name = name;\n this._$parent = parent;\n this.options = options;\n if (strings.length > 2 || strings[0] !== '' || strings[1] !== '') {\n this._$committedValue = new Array(strings.length - 1).fill(new String());\n this.strings = strings;\n } else {\n this._$committedValue = nothing;\n }\n if (ENABLE_EXTRA_SECURITY_HOOKS) {\n this._sanitizer = undefined;\n }\n }\n\n /**\n * Sets the value of this part by resolving the value from possibly multiple\n * values and static strings and committing it to the DOM.\n * If this part is single-valued, `this._strings` will be undefined, and the\n * method will be called with a single value argument. If this part is\n * multi-value, `this._strings` will be defined, and the method is called\n * with the value array of the part's owning TemplateInstance, and an offset\n * into the value array from which the values should be read.\n * This method is overloaded this way to eliminate short-lived array slices\n * of the template instance values, and allow a fast-path for single-valued\n * parts.\n *\n * @param value The part value, or an array of values for multi-valued parts\n * @param valueIndex the index to start reading values from. `undefined` for\n * single-valued parts\n * @param noCommit causes the part to not commit its value to the DOM. Used\n * in hydration to prime attribute parts with their first-rendered value,\n * but not set the attribute, and in SSR to no-op the DOM operation and\n * capture the value for serialization.\n *\n * @internal\n */\n _$setValue(\n value: unknown | Array<unknown>,\n directiveParent: DirectiveParent = this,\n valueIndex?: number,\n noCommit?: boolean,\n ) {\n const strings = this.strings;\n\n // Whether any of the values has changed, for dirty-checking\n let change = false;\n\n if (strings === undefined) {\n // Single-value binding case\n value = resolveDirective(this, value, directiveParent, 0);\n change =\n !isPrimitive(value) ||\n (value !== this._$committedValue && value !== noChange);\n if (change) {\n this._$committedValue = value;\n }\n } else {\n // Interpolation case\n const values = value as Array<unknown>;\n value = strings[0];\n\n let i, v;\n for (i = 0; i < strings.length - 1; i++) {\n v = resolveDirective(this, values[valueIndex! + i], directiveParent, i);\n\n if (v === noChange) {\n // If the user-provided value is `noChange`, use the previous value\n v = (this._$committedValue as Array<unknown>)[i];\n }\n change ||=\n !isPrimitive(v) || v !== (this._$committedValue as Array<unknown>)[i];\n if (v === nothing) {\n value = nothing;\n } else if (value !== nothing) {\n value += (v ?? '') + strings[i + 1];\n }\n // We always record each value, even if one is `nothing`, for future\n // change detection.\n (this._$committedValue as Array<unknown>)[i] = v;\n }\n }\n if (change && !noCommit) {\n this._commitValue(value);\n }\n }\n\n /** @internal */\n _commitValue(value: unknown) {\n if (value === nothing) {\n (wrap(this.element) as Element).removeAttribute(this.name);\n } else {\n if (ENABLE_EXTRA_SECURITY_HOOKS) {\n if (this._sanitizer === undefined) {\n this._sanitizer = sanitizerFactoryInternal(\n this.element,\n this.name,\n 'attribute',\n );\n }\n value = this._sanitizer(value ?? '');\n }\n debugLogEvent &&\n debugLogEvent({\n kind: 'commit attribute',\n element: this.element,\n name: this.name,\n value,\n options: this.options,\n });\n (wrap(this.element) as Element).setAttribute(\n this.name,\n (value ?? '') as string,\n );\n }\n }\n}\n\nexport type {PropertyPart};\nclass PropertyPart extends AttributePart {\n override readonly type = PROPERTY_PART;\n\n /** @internal */\n override _commitValue(value: unknown) {\n if (ENABLE_EXTRA_SECURITY_HOOKS) {\n if (this._sanitizer === undefined) {\n this._sanitizer = sanitizerFactoryInternal(\n this.element,\n this.name,\n 'property',\n );\n }\n value = this._sanitizer(value);\n }\n debugLogEvent &&\n debugLogEvent({\n kind: 'commit property',\n element: this.element,\n name: this.name,\n value,\n options: this.options,\n });\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n (this.element as any)[this.name] = value === nothing ? undefined : value;\n }\n}\n\nexport type {BooleanAttributePart};\nclass BooleanAttributePart extends AttributePart {\n override readonly type = BOOLEAN_ATTRIBUTE_PART;\n\n /** @internal */\n override _commitValue(value: unknown) {\n debugLogEvent &&\n debugLogEvent({\n kind: 'commit boolean attribute',\n element: this.element,\n name: this.name,\n value: !!(value && value !== nothing),\n options: this.options,\n });\n (wrap(this.element) as Element).toggleAttribute(\n this.name,\n !!value && value !== nothing,\n );\n }\n}\n\ntype EventListenerWithOptions = EventListenerOrEventListenerObject &\n Partial<AddEventListenerOptions>;\n\n/**\n * An AttributePart that manages an event listener via add/removeEventListener.\n *\n * This part works by adding itself as the event listener on an element, then\n * delegating to the value passed to it. This reduces the number of calls to\n * add/removeEventListener if the listener changes frequently, such as when an\n * inline function is used as a listener.\n *\n * Because event options are passed when adding listeners, we must take case\n * to add and remove the part as a listener when the event options change.\n */\nexport type {EventPart};\nclass EventPart extends AttributePart {\n override readonly type = EVENT_PART;\n\n constructor(\n element: HTMLElement,\n name: string,\n strings: ReadonlyArray<string>,\n parent: Disconnectable,\n options: RenderOptions | undefined,\n ) {\n super(element, name, strings, parent, options);\n\n if (DEV_MODE && this.strings !== undefined) {\n throw new Error(\n `A \\`<${element.localName}>\\` has a \\`@${name}=...\\` listener with ` +\n 'invalid content. Event listeners in templates must have exactly ' +\n 'one expression and no surrounding text.',\n );\n }\n }\n\n // EventPart does not use the base _$setValue/_resolveValue implementation\n // since the dirty checking is more complex\n /** @internal */\n override _$setValue(\n newListener: unknown,\n directiveParent: DirectiveParent = this,\n ) {\n newListener =\n resolveDirective(this, newListener, directiveParent, 0) ?? nothing;\n if (newListener === noChange) {\n return;\n }\n const oldListener = this._$committedValue;\n\n // If the new value is nothing or any options change we have to remove the\n // part as a listener.\n const shouldRemoveListener =\n (newListener === nothing && oldListener !== nothing) ||\n (newListener as EventListenerWithOptions).capture !==\n (oldListener as EventListenerWithOptions).capture ||\n (newListener as EventListenerWithOptions).once !==\n (oldListener as EventListenerWithOptions).once ||\n (newListener as EventListenerWithOptions).passive !==\n (oldListener as EventListenerWithOptions).passive;\n\n // If the new value is not nothing and we removed the listener, we have\n // to add the part as a listener.\n const shouldAddListener =\n newListener !== nothing &&\n (oldListener === nothing || shouldRemoveListener);\n\n debugLogEvent &&\n debugLogEvent({\n kind: 'commit event listener',\n element: this.element,\n name: this.name,\n value: newListener,\n options: this.options,\n removeListener: shouldRemoveListener,\n addListener: shouldAddListener,\n oldListener,\n });\n if (shouldRemoveListener) {\n this.element.removeEventListener(\n this.name,\n this,\n oldListener as EventListenerWithOptions,\n );\n }\n if (shouldAddListener) {\n // Beware: IE11 and Chrome 41 don't like using the listener as the\n // options object. Figure out how to deal w/ this in IE11 - maybe\n // patch addEventListener?\n this.element.addEventListener(\n this.name,\n this,\n newListener as EventListenerWithOptions,\n );\n }\n this._$committedValue = newListener;\n }\n\n handleEvent(event: Event) {\n if (typeof this._$committedValue === 'function') {\n this._$committedValue.call(this.options?.host ?? this.element, event);\n } else {\n (this._$committedValue as EventListenerObject).handleEvent(event);\n }\n }\n}\n\nexport type {ElementPart};\nclass ElementPart implements Disconnectable {\n readonly type = ELEMENT_PART;\n\n /** @internal */\n __directive?: Directive;\n\n // This is to ensure that every Part has a _$committedValue\n _$committedValue: undefined;\n\n /** @internal */\n _$parent!: Disconnectable;\n\n /** @internal */\n _$disconnectableChildren?: Set<Disconnectable> = undefined;\n\n options: RenderOptions | undefined;\n\n constructor(\n public element: Element,\n parent: Disconnectable,\n options: RenderOptions | undefined,\n ) {\n this._$parent = parent;\n this.options = options;\n }\n\n // See comment in Disconnectable interface for why this is a getter\n get _$isConnected() {\n return this._$parent._$isConnected;\n }\n\n _$setValue(value: unknown): void {\n debugLogEvent &&\n debugLogEvent({\n kind: 'commit to element binding',\n element: this.element,\n value,\n options: this.options,\n });\n resolveDirective(this, value);\n }\n}\n\n/**\n * END USERS SHOULD NOT RELY ON THIS OBJECT.\n *\n * Private exports for use by other Lit packages, not intended for use by\n * external users.\n *\n * We currently do not make a mangled rollup build of the lit-ssr code. In order\n * to keep a number of (otherwise private) top-level exports mangled in the\n * client side code, we export a _$LH object containing those members (or\n * helper methods for accessing private fields of those members), and then\n * re-export them for use in lit-ssr. This keeps lit-ssr agnostic to whether the\n * client-side code is being used in `dev` mode or `prod` mode.\n *\n * This has a unique name, to disambiguate it from private exports in\n * lit-element, which re-exports all of lit-html.\n *\n * @private\n */\nexport const _$LH = {\n // Used in lit-ssr\n _boundAttributeSuffix: boundAttributeSuffix,\n _marker: marker,\n _markerMatch: markerMatch,\n _HTML_RESULT: HTML_RESULT,\n _getTemplateHtml: getTemplateHtml,\n // Used in tests and private-ssr-support\n _TemplateInstance: TemplateInstance,\n _isIterable: isIterable,\n _resolveDirective: resolveDirective,\n _ChildPart: ChildPart,\n _AttributePart: AttributePart,\n _BooleanAttributePart: BooleanAttributePart,\n _EventPart: EventPart,\n _PropertyPart: PropertyPart,\n _ElementPart: ElementPart,\n};\n\n// Apply polyfills if available\nconst polyfillSupport = DEV_MODE\n ? global.litHtmlPolyfillSupportDevMode\n : global.litHtmlPolyfillSupport;\npolyfillSupport?.(Template, ChildPart);\n\n// IMPORTANT: do not change the property name or the assignment expression.\n// This line will be used in regexes to search for lit-html usage.\n(global.litHtmlVersions ??= []).push('3.2.0');\nif (DEV_MODE && global.litHtmlVersions.length > 1) {\n issueWarning!(\n 'multiple-versions',\n `Multiple versions of Lit loaded. ` +\n `Loading multiple versions is not recommended.`,\n );\n}\n\n/**\n * Renders a value, usually a lit-html TemplateResult, to the container.\n *\n * This example renders the text \"Hello, Zoe!\" inside a paragraph tag, appending\n * it to the container `document.body`.\n *\n * ```js\n * import {html, render} from 'lit';\n *\n * const name = \"Zoe\";\n * render(html`<p>Hello, ${name}!</p>`, document.body);\n * ```\n *\n * @param value Any [renderable\n * value](https://lit.dev/docs/templates/expressions/#child-expressions),\n * typically a {@linkcode TemplateResult} created by evaluating a template tag\n * like {@linkcode html} or {@linkcode svg}.\n * @param container A DOM container to render to. The first render will append\n * the rendered value to the container, and subsequent renders will\n * efficiently update the rendered value if the same result type was\n * previously rendered there.\n * @param options See {@linkcode RenderOptions} for options documentation.\n * @see\n * {@link https://lit.dev/docs/libraries/standalone-templates/#rendering-lit-html-templates| Rendering Lit HTML Templates}\n */\nexport const render = (\n value: unknown,\n container: HTMLElement | DocumentFragment,\n options?: RenderOptions,\n): RootPart => {\n if (DEV_MODE && container == null) {\n // Give a clearer error message than\n // Uncaught TypeError: Cannot read properties of null (reading\n // '_$litPart$')\n // which reads like an internal Lit error.\n throw new TypeError(`The container to render into may not be ${container}`);\n }\n const renderId = DEV_MODE ? debugLogRenderId++ : 0;\n const partOwnerNode = options?.renderBefore ?? container;\n // This property needs to remain unminified.\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n let part: ChildPart = (partOwnerNode as any)['_$litPart$'];\n debugLogEvent &&\n debugLogEvent({\n kind: 'begin render',\n id: renderId,\n value,\n container,\n options,\n part,\n });\n if (part === undefined) {\n const endNode = options?.renderBefore ?? null;\n // This property needs to remain unminified.\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n (partOwnerNode as any)['_$litPart$'] = part = new ChildPart(\n container.insertBefore(createMarker(), endNode),\n endNode,\n undefined,\n options ?? {},\n );\n }\n part._$setValue(value);\n debugLogEvent &&\n debugLogEvent({\n kind: 'end render',\n id: renderId,\n value,\n container,\n options,\n part,\n });\n return part as RootPart;\n};\n\nif (ENABLE_EXTRA_SECURITY_HOOKS) {\n render.setSanitizer = setSanitizer;\n render.createSanitizer = createSanitizer;\n if (DEV_MODE) {\n render._testOnlyClearSanitizerFactoryDoNotCallOrElse =\n _testOnlyClearSanitizerFactoryDoNotCallOrElse;\n }\n}\n", "/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\n\n/**\n * The main LitElement module, which defines the {@linkcode LitElement} base\n * class and related APIs.\n *\n * LitElement components can define a template and a set of observed\n * properties. Changing an observed property triggers a re-render of the\n * element.\n *\n * Import {@linkcode LitElement} and {@linkcode html} from this module to\n * create a component:\n *\n * ```js\n * import {LitElement, html} from 'lit-element';\n *\n * class MyElement extends LitElement {\n *\n * // Declare observed properties\n * static get properties() {\n * return {\n * adjective: {}\n * }\n * }\n *\n * constructor() {\n * this.adjective = 'awesome';\n * }\n *\n * // Define the element's template\n * render() {\n * return html`<p>your ${adjective} template here</p>`;\n * }\n * }\n *\n * customElements.define('my-element', MyElement);\n * ```\n *\n * `LitElement` extends {@linkcode ReactiveElement} and adds lit-html\n * templating. The `ReactiveElement` class is provided for users that want to\n * build their own custom element base classes that don't use lit-html.\n *\n * @packageDocumentation\n */\nimport {PropertyValues, ReactiveElement} from '@lit/reactive-element';\nimport {render, RenderOptions, noChange, RootPart} from 'lit-html';\nexport * from '@lit/reactive-element';\nexport * from 'lit-html';\n\nimport {LitUnstable} from 'lit-html';\nimport {ReactiveUnstable} from '@lit/reactive-element';\n\n/**\n * Contains types that are part of the unstable debug API.\n *\n * Everything in this API is not stable and may change or be removed in the future,\n * even on patch releases.\n */\n// eslint-disable-next-line @typescript-eslint/no-namespace\nexport namespace Unstable {\n /**\n * When Lit is running in dev mode and `window.emitLitDebugLogEvents` is true,\n * we will emit 'lit-debug' events to window, with live details about the update and render\n * lifecycle. These can be useful for writing debug tooling and visualizations.\n *\n * Please be aware that running with window.emitLitDebugLogEvents has performance overhead,\n * making certain operations that are normally very cheap (like a no-op render) much slower,\n * because we must copy data and dispatch events.\n */\n // eslint-disable-next-line @typescript-eslint/no-namespace\n export namespace DebugLog {\n export type Entry =\n | LitUnstable.DebugLog.Entry\n | ReactiveUnstable.DebugLog.Entry;\n }\n}\n/*\n * When using Closure Compiler, JSCompiler_renameProperty(property, object) is\n * replaced at compile time by the munged name for object[property]. We cannot\n * alias this function, so we have to use a small shim that has the same\n * behavior when not compiling.\n */\n/*@__INLINE__*/\nconst JSCompiler_renameProperty = <P extends PropertyKey>(\n prop: P,\n _obj: unknown\n): P => prop;\n\nconst DEV_MODE = true;\n\nlet issueWarning: (code: string, warning: string) => void;\n\nif (DEV_MODE) {\n // Ensure warnings are issued only 1x, even if multiple versions of Lit\n // are loaded.\n const issuedWarnings: Set<string | undefined> =\n (globalThis.litIssuedWarnings ??= new Set());\n\n // Issue a warning, if we haven't already.\n issueWarning = (code: string, warning: string) => {\n warning += ` See https://lit.dev/msg/${code} for more information.`;\n if (!issuedWarnings.has(warning)) {\n console.warn(warning);\n issuedWarnings.add(warning);\n }\n };\n}\n\n/**\n * Base element class that manages element properties and attributes, and\n * renders a lit-html template.\n *\n * To define a component, subclass `LitElement` and implement a\n * `render` method to provide the component's template. Define properties\n * using the {@linkcode LitElement.properties properties} property or the\n * {@linkcode property} decorator.\n */\nexport class LitElement extends ReactiveElement {\n // This property needs to remain unminified.\n static ['_$litElement$'] = true;\n\n /**\n * @category rendering\n */\n readonly renderOptions: RenderOptions = {host: this};\n\n private __childPart: RootPart | undefined = undefined;\n\n /**\n * @category rendering\n */\n protected override createRenderRoot() {\n const renderRoot = super.createRenderRoot();\n // When adoptedStyleSheets are shimmed, they are inserted into the\n // shadowRoot by createRenderRoot. Adjust the renderBefore node so that\n // any styles in Lit content render before adoptedStyleSheets. This is\n // important so that adoptedStyleSheets have precedence over styles in\n // the shadowRoot.\n this.renderOptions.renderBefore ??= renderRoot!.firstChild as ChildNode;\n return renderRoot;\n }\n\n /**\n * Updates the element. This method reflects property values to attributes\n * and calls `render` to render DOM via lit-html. Setting properties inside\n * this method will *not* trigger another update.\n * @param changedProperties Map of changed properties with old values\n * @category updates\n */\n protected override update(changedProperties: PropertyValues) {\n // Setting properties in `render` should not trigger an update. Since\n // updates are allowed after super.update, it's important to call `render`\n // before that.\n const value = this.render();\n if (!this.hasUpdated) {\n this.renderOptions.isConnected = this.isConnected;\n }\n super.update(changedProperties);\n this.__childPart = render(value, this.renderRoot, this.renderOptions);\n }\n\n /**\n * Invoked when the component is added to the document's DOM.\n *\n * In `connectedCallback()` you should setup tasks that should only occur when\n * the element is connected to the document. The most common of these is\n * adding event listeners to nodes external to the element, like a keydown\n * event handler added to the window.\n *\n * ```ts\n * connectedCallback() {\n * super.connectedCallback();\n * addEventListener('keydown', this._handleKeydown);\n * }\n * ```\n *\n * Typically, anything done in `connectedCallback()` should be undone when the\n * element is disconnected, in `disconnectedCallback()`.\n *\n * @category lifecycle\n */\n override connectedCallback() {\n super.connectedCallback();\n this.__childPart?.setConnected(true);\n }\n\n /**\n * Invoked when the component is removed from the document's DOM.\n *\n * This callback is the main signal to the element that it may no longer be\n * used. `disconnectedCallback()` should ensure that nothing is holding a\n * reference to the element (such as event listeners added to nodes external\n * to the element), so that it is free to be garbage collected.\n *\n * ```ts\n * disconnectedCallback() {\n * super.disconnectedCallback();\n * window.removeEventListener('keydown', this._handleKeydown);\n * }\n * ```\n *\n * An element may be re-connected after being disconnected.\n *\n * @category lifecycle\n */\n override disconnectedCallback() {\n super.disconnectedCallback();\n this.__childPart?.setConnected(false);\n }\n\n /**\n * Invoked on each update to perform rendering tasks. This method may return\n * any value renderable by lit-html's `ChildPart` - typically a\n * `TemplateResult`. Setting properties inside this method will *not* trigger\n * the element to update.\n * @category rendering\n */\n protected render(): unknown {\n return noChange;\n }\n}\n\n/**\n * Ensure this class is marked as `finalized` as an optimization ensuring\n * it will not needlessly try to `finalize`.\n *\n * Note this property name is a string to prevent breaking Closure JS Compiler\n * optimizations. See @lit/reactive-element for more information.\n */\n(LitElement as unknown as Record<string, unknown>)[\n JSCompiler_renameProperty('finalized', LitElement)\n] = true;\n\n// Install hydration if available\nglobalThis.litElementHydrateSupport?.({LitElement});\n\n// Apply polyfills if available\nconst polyfillSupport = DEV_MODE\n ? globalThis.litElementPolyfillSupportDevMode\n : globalThis.litElementPolyfillSupport;\npolyfillSupport?.({LitElement});\n\n/**\n * END USERS SHOULD NOT RELY ON THIS OBJECT.\n *\n * Private exports for use by other Lit packages, not intended for use by\n * external users.\n *\n * We currently do not make a mangled rollup build of the lit-ssr code. In order\n * to keep a number of (otherwise private) top-level exports mangled in the\n * client side code, we export a _$LE object containing those members (or\n * helper methods for accessing private fields of those members), and then\n * re-export them for use in lit-ssr. This keeps lit-ssr agnostic to whether the\n * client-side code is being used in `dev` mode or `prod` mode.\n *\n * This has a unique name, to disambiguate it from private exports in\n * lit-html, since this module re-exports all of lit-html.\n *\n * @private\n */\nexport const _$LE = {\n _$attributeToProperty: (\n el: LitElement,\n name: string,\n value: string | null\n ) => {\n // eslint-disable-next-line\n (el as any)._$attributeToProperty(name, value);\n },\n // eslint-disable-next-line\n _$changedProperties: (el: LitElement) => (el as any)._$changedProperties,\n};\n\n// IMPORTANT: do not change the property name or the assignment expression.\n// This line will be used in regexes to search for LitElement usage.\n(globalThis.litElementVersions ??= []).push('4.1.0');\nif (DEV_MODE && globalThis.litElementVersions.length > 1) {\n issueWarning!(\n 'multiple-versions',\n `Multiple versions of Lit loaded. Loading multiple versions ` +\n `is not recommended.`\n );\n}\n", "/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\n\n/*\n * IMPORTANT: For compatibility with tsickle and the Closure JS compiler, all\n * property decorators (but not class decorators) in this file that have\n * an @ExportDecoratedItems annotation must be defined as a regular function,\n * not an arrow function.\n */\n\nimport {\n type PropertyDeclaration,\n type ReactiveElement,\n defaultConverter,\n notEqual,\n} from '../reactive-element.js';\nimport type {Interface} from './base.js';\n\nconst DEV_MODE = true;\n\nlet issueWarning: (code: string, warning: string) => void;\n\nif (DEV_MODE) {\n // Ensure warnings are issued only 1x, even if multiple versions of Lit\n // are loaded.\n const issuedWarnings: Set<string | undefined> =\n (globalThis.litIssuedWarnings ??= new Set());\n\n // Issue a warning, if we haven't already.\n issueWarning = (code: string, warning: string) => {\n warning += ` See https://lit.dev/msg/${code} for more information.`;\n if (!issuedWarnings.has(warning)) {\n console.warn(warning);\n issuedWarnings.add(warning);\n }\n };\n}\n\n// Overloads for property decorator so that TypeScript can infer the correct\n// return type when a decorator is used as an accessor decorator or a setter\n// decorator.\nexport type PropertyDecorator = {\n // accessor decorator signature\n <C extends Interface<ReactiveElement>, V>(\n target: ClassAccessorDecoratorTarget<C, V>,\n context: ClassAccessorDecoratorContext<C, V>\n ): ClassAccessorDecoratorResult<C, V>;\n\n // setter decorator signature\n <C extends Interface<ReactiveElement>, V>(\n target: (value: V) => void,\n context: ClassSetterDecoratorContext<C, V>\n ): (this: C, value: V) => void;\n\n // legacy decorator signature\n (\n protoOrDescriptor: Object,\n name: PropertyKey,\n descriptor?: PropertyDescriptor\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ): any;\n};\n\nconst legacyProperty = (\n options: PropertyDeclaration | undefined,\n proto: Object,\n name: PropertyKey\n) => {\n const hasOwnProperty = proto.hasOwnProperty(name);\n (proto.constructor as typeof ReactiveElement).createProperty(\n name,\n hasOwnProperty ? {...options, wrapped: true} : options\n );\n // For accessors (which have a descriptor on the prototype) we need to\n // return a descriptor, otherwise TypeScript overwrites the descriptor we\n // define in createProperty() with the original descriptor. We don't do this\n // for fields, which don't have a descriptor, because this could overwrite\n // descriptor defined by other decorators.\n return hasOwnProperty\n ? Object.getOwnPropertyDescriptor(proto, name)\n : undefined;\n};\n\n// This is duplicated from a similar variable in reactive-element.ts, but\n// actually makes sense to have this default defined with the decorator, so\n// that different decorators could have different defaults.\nconst defaultPropertyDeclaration: PropertyDeclaration = {\n attribute: true,\n type: String,\n converter: defaultConverter,\n reflect: false,\n hasChanged: notEqual,\n};\n\n// Temporary type, until google3 is on TypeScript 5.2\ntype StandardPropertyContext<C, V> = (\n | ClassAccessorDecoratorContext<C, V>\n | ClassSetterDecoratorContext<C, V>\n) & {metadata: object};\n\n/**\n * Wraps a class accessor or setter so that `requestUpdate()` is called with the\n * property name and old value when the accessor is set.\n */\nexport const standardProperty = <C extends Interface<ReactiveElement>, V>(\n options: PropertyDeclaration = defaultPropertyDeclaration,\n target: ClassAccessorDecoratorTarget<C, V> | ((value: V) => void),\n context: StandardPropertyContext<C, V>\n): ClassAccessorDecoratorResult<C, V> | ((this: C, value: V) => void) => {\n const {kind, metadata} = context;\n\n if (DEV_MODE && metadata == null) {\n issueWarning(\n 'missing-class-metadata',\n `The class ${target} is missing decorator metadata. This ` +\n `could mean that you're using a compiler that supports decorators ` +\n `but doesn't support decorator metadata, such as TypeScript 5.1. ` +\n `Please update your compiler.`\n );\n }\n\n // Store the property options\n let properties = globalThis.litPropertyMetadata.get(metadata);\n if (properties === undefined) {\n globalThis.litPropertyMetadata.set(metadata, (properties = new Map()));\n }\n properties.set(context.name, options);\n\n if (kind === 'accessor') {\n // Standard decorators cannot dynamically modify the class, so we can't\n // replace a field with accessors. The user must use the new `accessor`\n // keyword instead.\n const {name} = context;\n return {\n set(this: ReactiveElement, v: V) {\n const oldValue = (\n target as ClassAccessorDecoratorTarget<C, V>\n ).get.call(this as unknown as C);\n (target as ClassAccessorDecoratorTarget<C, V>).set.call(\n this as unknown as C,\n v\n );\n this.requestUpdate(name, oldValue, options);\n },\n init(this: ReactiveElement, v: V): V {\n if (v !== undefined) {\n this._$changeProperty(name, undefined, options);\n }\n return v;\n },\n } as unknown as ClassAccessorDecoratorResult<C, V>;\n } else if (kind === 'setter') {\n const {name} = context;\n return function (this: ReactiveElement, value: V) {\n const oldValue = this[name as keyof ReactiveElement];\n (target as (value: V) => void).call(this, value);\n this.requestUpdate(name, oldValue, options);\n } as unknown as (this: C, value: V) => void;\n }\n throw new Error(`Unsupported decorator location: ${kind}`);\n};\n\n/**\n * A class field or accessor decorator which creates a reactive property that\n * reflects a corresponding attribute value. When a decorated property is set\n * the element will update and render. A {@linkcode PropertyDeclaration} may\n * optionally be supplied to configure property features.\n *\n * This decorator should only be used for public fields. As public fields,\n * properties should be considered as primarily settable by element users,\n * either via attribute or the property itself.\n *\n * Generally, properties that are changed by the element should be private or\n * protected fields and should use the {@linkcode state} decorator.\n *\n * However, sometimes element code does need to set a public property. This\n * should typically only be done in response to user interaction, and an event\n * should be fired informing the user; for example, a checkbox sets its\n * `checked` property when clicked and fires a `changed` event. Mutating public\n * properties should typically not be done for non-primitive (object or array)\n * properties. In other cases when an element needs to manage state, a private\n * property decorated via the {@linkcode state} decorator should be used. When\n * needed, state properties can be initialized via public properties to\n * facilitate complex interactions.\n *\n * ```ts\n * class MyElement {\n * @property({ type: Boolean })\n * clicked = false;\n * }\n * ```\n * @category Decorator\n * @ExportDecoratedItems\n */\nexport function property(options?: PropertyDeclaration): PropertyDecorator {\n return <C extends Interface<ReactiveElement>, V>(\n protoOrTarget:\n | object\n | ClassAccessorDecoratorTarget<C, V>\n | ((value: V) => void),\n nameOrContext:\n | PropertyKey\n | ClassAccessorDecoratorContext<C, V>\n | ClassSetterDecoratorContext<C, V>\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ): any => {\n return (\n typeof nameOrContext === 'object'\n ? standardProperty<C, V>(\n options,\n protoOrTarget as\n | ClassAccessorDecoratorTarget<C, V>\n | ((value: V) => void),\n nameOrContext as StandardPropertyContext<C, V>\n )\n : legacyProperty(\n options,\n protoOrTarget as Object,\n nameOrContext as PropertyKey\n )\n ) as PropertyDecorator;\n };\n}\n", "/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\n\n/*\n * IMPORTANT: For compatibility with tsickle and the Closure JS compiler, all\n * property decorators (but not class decorators) in this file that have\n * an @ExportDecoratedItems annotation must be defined as a regular function,\n * not an arrow function.\n */\n\nimport {property} from './property.js';\n\nexport interface StateDeclaration<Type = unknown> {\n /**\n * A function that indicates if a property should be considered changed when\n * it is set. The function should take the `newValue` and `oldValue` and\n * return `true` if an update should be requested.\n */\n hasChanged?(value: Type, oldValue: Type): boolean;\n}\n\n/**\n * @deprecated use StateDeclaration\n */\nexport type InternalPropertyDeclaration<Type = unknown> =\n StateDeclaration<Type>;\n\n/**\n * Declares a private or protected reactive property that still triggers\n * updates to the element when it changes. It does not reflect from the\n * corresponding attribute.\n *\n * Properties declared this way must not be used from HTML or HTML templating\n * systems, they're solely for properties internal to the element. These\n * properties may be renamed by optimization tools like closure compiler.\n * @category Decorator\n */\nexport function state(options?: StateDeclaration) {\n return property({\n ...options,\n // Add both `state` and `attribute` because we found a third party\n // controller that is keying off of PropertyOptions.state to determine\n // whether a field is a private internal property or not.\n state: true,\n attribute: false,\n });\n}\n", "/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\n\n/**\n * Generates a public interface type that removes private and protected fields.\n * This allows accepting otherwise incompatible versions of the type (e.g. from\n * multiple copies of the same package in `node_modules`).\n */\nexport type Interface<T> = {\n [K in keyof T]: T[K];\n};\n\nexport type Constructor<T> = {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n new (...args: any[]): T;\n};\n\n/**\n * Wraps up a few best practices when returning a property descriptor from a\n * decorator.\n *\n * Marks the defined property as configurable, and enumerable, and handles\n * the case where we have a busted Reflect.decorate zombiefill (e.g. in Angular\n * apps).\n *\n * @internal\n */\nexport const desc = (\n obj: object,\n name: PropertyKey | ClassAccessorDecoratorContext<unknown, unknown>,\n descriptor: PropertyDescriptor\n) => {\n // For backwards compatibility, we keep them configurable and enumerable.\n descriptor.configurable = true;\n descriptor.enumerable = true;\n if (\n // We check for Reflect.decorate each time, in case the zombiefill\n // is applied via lazy loading some Angular code.\n (Reflect as typeof Reflect & {decorate?: unknown}).decorate &&\n typeof name !== 'object'\n ) {\n // If we're called as a legacy decorator, and Reflect.decorate is present\n // then we have no guarantees that the returned descriptor will be\n // defined on the class, so we must apply it directly ourselves.\n\n Object.defineProperty(obj, name, descriptor);\n }\n return descriptor;\n};\n", "/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\n\n/*\n * IMPORTANT: For compatibility with tsickle and the Closure JS compiler, all\n * property decorators (but not class decorators) in this file that have\n * an @ExportDecoratedItems annotation must be defined as a regular function,\n * not an arrow function.\n */\nimport type {ReactiveElement} from '../reactive-element.js';\nimport {desc, type Interface} from './base.js';\n\nconst DEV_MODE = true;\n\nlet issueWarning: (code: string, warning: string) => void;\n\nif (DEV_MODE) {\n // Ensure warnings are issued only 1x, even if multiple versions of Lit\n // are loaded.\n const issuedWarnings: Set<string | undefined> =\n (globalThis.litIssuedWarnings ??= new Set());\n\n // Issue a warning, if we haven't already.\n issueWarning = (code: string, warning: string) => {\n warning += code\n ? ` See https://lit.dev/msg/${code} for more information.`\n : '';\n if (!issuedWarnings.has(warning)) {\n console.warn(warning);\n issuedWarnings.add(warning);\n }\n };\n}\n\nexport type QueryDecorator = {\n // legacy\n (\n proto: Interface<ReactiveElement>,\n name: PropertyKey,\n descriptor?: PropertyDescriptor\n // Note TypeScript requires the return type to be `void|any`\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ): void | any;\n\n // standard\n <C extends Interface<ReactiveElement>, V extends Element | null>(\n value: ClassAccessorDecoratorTarget<C, V>,\n context: ClassAccessorDecoratorContext<C, V>\n ): ClassAccessorDecoratorResult<C, V>;\n};\n\n/**\n * A property decorator that converts a class property into a getter that\n * executes a querySelector on the element's renderRoot.\n *\n * @param selector A DOMString containing one or more selectors to match.\n * @param cache An optional boolean which when true performs the DOM query only\n * once and caches the result.\n *\n * See: https://developer.mozilla.org/en-US/docs/Web/API/Document/querySelector\n *\n * ```ts\n * class MyElement {\n * @query('#first')\n * first: HTMLDivElement;\n *\n * render() {\n * return html`\n * <div id=\"first\"></div>\n * <div id=\"second\"></div>\n * `;\n * }\n * }\n * ```\n * @category Decorator\n */\nexport function query(selector: string, cache?: boolean): QueryDecorator {\n return (<C extends Interface<ReactiveElement>, V extends Element | null>(\n protoOrTarget: ClassAccessorDecoratorTarget<C, V>,\n nameOrContext: PropertyKey | ClassAccessorDecoratorContext<C, V>,\n descriptor?: PropertyDescriptor\n ) => {\n const doQuery = (el: Interface<ReactiveElement>): V => {\n const result = (el.renderRoot?.querySelector(selector) ?? null) as V;\n if (DEV_MODE && result === null && cache && !el.hasUpdated) {\n const name =\n typeof nameOrContext === 'object'\n ? nameOrContext.name\n : nameOrContext;\n issueWarning(\n '',\n `@query'd field ${JSON.stringify(String(name))} with the 'cache' ` +\n `flag set for selector '${selector}' has been accessed before ` +\n `the first update and returned null. This is expected if the ` +\n `renderRoot tree has not been provided beforehand (e.g. via ` +\n `Declarative Shadow DOM). Therefore the value hasn't been cached.`\n );\n }\n // TODO: if we want to allow users to assert that the query will never\n // return null, we need a new option and to throw here if the result\n // is null.\n return result;\n };\n if (cache) {\n // Accessors to wrap from either:\n // 1. The decorator target, in the case of standard decorators\n // 2. The property descriptor, in the case of experimental decorators\n // on auto-accessors.\n // 3. Functions that access our own cache-key property on the instance,\n // in the case of experimental decorators on fields.\n const {get, set} =\n typeof nameOrContext === 'object'\n ? protoOrTarget\n : descriptor ??\n (() => {\n const key = DEV_MODE\n ? Symbol(`${String(nameOrContext)} (@query() cache)`)\n : Symbol();\n type WithCache = ReactiveElement & {\n [key: symbol]: Element | null;\n };\n return {\n get() {\n return (this as WithCache)[key];\n },\n set(v) {\n (this as WithCache)[key] = v;\n },\n };\n })();\n return desc(protoOrTarget, nameOrContext, {\n get(this: ReactiveElement): V {\n let result: V = get!.call(this);\n if (result === undefined) {\n result = doQuery(this);\n if (result !== null || this.hasUpdated) {\n set!.call(this, result);\n }\n }\n return result;\n },\n });\n } else {\n // This object works as the return type for both standard and\n // experimental decorators.\n return desc(protoOrTarget, nameOrContext, {\n get(this: ReactiveElement) {\n return doQuery(this);\n },\n });\n }\n }) as QueryDecorator;\n}\n", "/**\n * @license\n * Copyright 2021 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\n\n/*\n * IMPORTANT: For compatibility with tsickle and the Closure JS compiler, all\n * property decorators (but not class decorators) in this file that have\n * an @ExportDecoratedItems annotation must be defined as a regular function,\n * not an arrow function.\n */\n\nimport type {ReactiveElement} from '../reactive-element.js';\nimport type {QueryAssignedNodesOptions} from './query-assigned-nodes.js';\nimport {desc, type Interface} from './base.js';\n\nexport type QueryAssignedElementsDecorator = {\n // legacy\n (\n proto: Interface<ReactiveElement>,\n name: PropertyKey,\n descriptor?: PropertyDescriptor\n // Note TypeScript requires the return type to be `void|any`\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ): void | any;\n\n // standard\n <C extends Interface<ReactiveElement>, V extends Array<Element>>(\n value: ClassAccessorDecoratorTarget<C, V>,\n context: ClassAccessorDecoratorContext<C, V>\n ): ClassAccessorDecoratorResult<C, V>;\n};\n\n/**\n * Options for the {@linkcode queryAssignedElements} decorator. Extends the\n * options that can be passed into\n * [HTMLSlotElement.assignedElements](https://developer.mozilla.org/en-US/docs/Web/API/HTMLSlotElement/assignedElements).\n */\nexport interface QueryAssignedElementsOptions\n extends QueryAssignedNodesOptions {\n /**\n * CSS selector used to filter the elements returned. For example, a selector\n * of `\".item\"` will only include elements with the `item` class.\n */\n selector?: string;\n}\n\n/**\n * A property decorator that converts a class property into a getter that\n * returns the `assignedElements` of the given `slot`. Provides a declarative\n * way to use\n * [`HTMLSlotElement.assignedElements`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLSlotElement/assignedElements).\n *\n * Can be passed an optional {@linkcode QueryAssignedElementsOptions} object.\n *\n * Example usage:\n * ```ts\n * class MyElement {\n * @queryAssignedElements({ slot: 'list' })\n * listItems!: Array<HTMLElement>;\n * @queryAssignedElements()\n * unnamedSlotEls!: Array<HTMLElement>;\n *\n * render() {\n * return html`\n * <slot name=\"list\"></slot>\n * <slot></slot>\n * `;\n * }\n * }\n * ```\n *\n * Note, the type of this property should be annotated as `Array<HTMLElement>`.\n *\n * @category Decorator\n */\nexport function queryAssignedElements(\n options?: QueryAssignedElementsOptions\n): QueryAssignedElementsDecorator {\n return (<V extends Array<Element>>(\n obj: object,\n name: PropertyKey | ClassAccessorDecoratorContext<unknown, unknown>\n ) => {\n const {slot, selector} = options ?? {};\n const slotSelector = `slot${slot ? `[name=${slot}]` : ':not([name])'}`;\n return desc(obj, name, {\n get(this: ReactiveElement): V {\n const slotEl =\n this.renderRoot?.querySelector<HTMLSlotElement>(slotSelector);\n const elements = slotEl?.assignedElements(options) ?? [];\n return (\n selector === undefined\n ? elements\n : elements.filter((node) => node.matches(selector))\n ) as V;\n },\n });\n }) as QueryAssignedElementsDecorator;\n}\n", "/**\n * @license\n * Copyright 2018 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\n\nimport {nothing} from '../lit-html.js';\n\n/**\n * For AttributeParts, sets the attribute if the value is defined and removes\n * the attribute if the value is undefined.\n *\n * For other part types, this directive is a no-op.\n */\nexport const ifDefined = <T>(value: T) => value ?? nothing;\n", "import { css } from 'lit';\n\nexport default css`\n :host {\n box-sizing: border-box;\n }\n\n :host *,\n :host *::before,\n :host *::after {\n box-sizing: inherit;\n }\n`;\n", "import { CSSResult, LitElement } from 'lit';\nimport styles from './component.styles';\n\n/**\n * Core Component class to ultimately be inherited by all Web Components within\n * this package.\n *\n * LitElement defines class and style automatically to allow passing in styling\n * overrides. We are keeping those to allow for further customization.\n *\n * @public\n */\nclass Component extends LitElement {\n /**\n * Register `this` extended `Component` Class as a custom element within the\n * DOM's custom elements registry.\n *\n * @remarks\n * This method must be called in order for this component to be consumable\n * within the DOM.\n *\n * @example\n * ```ts\n * import CustomComponent from './custom-component';\n *\n * // Standard registration.\n * CustomComponent.register();\n *\n * // Custom registration.\n * CustomComponent.register({\n * name: 'custom-component',\n * prefix: 'prefix',\n * });\n *\n * export default CustomComponent;\n * ```\n *\n *\n * @returns - Void.\n */\n public static register(namespace: string): void {\n if (customElements.get(namespace)) {\n return;\n }\n\n customElements.define(namespace, this as any);\n }\n\n /**\n * Styles associated with the Base Component.\n */\n public static override styles: Array<CSSResult> = [styles];\n}\n\nexport default Component;\n", "import Component from './component.component';\n\nexport type {\n RegisterOptions as ComponentRegisterOptions,\n} from './component.types';\n\nexport default Component;\n", "/**\n * @license\n * Copyright 2021 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\n\nimport {ContextType, Context} from './create-context.js';\n\ndeclare global {\n interface HTMLElementEventMap {\n /**\n * A 'context-request' event can be emitted by any element which desires\n * a context value to be injected by an external provider.\n */\n 'context-request': ContextRequestEvent<Context<unknown, unknown>>;\n }\n}\n\n/**\n * A callback which is provided by a context requester and is called with the value satisfying the request.\n * This callback can be called multiple times by context providers as the requested value is changed.\n */\nexport type ContextCallback<ValueType> = (\n value: ValueType,\n unsubscribe?: () => void\n) => void;\n\n/**\n * Interface definition for a ContextRequest\n */\nexport interface ContextRequest<C extends Context<unknown, unknown>> {\n readonly context: C;\n readonly callback: ContextCallback<ContextType<C>>;\n readonly subscribe?: boolean;\n}\n\n/**\n * An event fired by a context requester to signal it desires a specified context with the given key.\n *\n * A provider should inspect the `context` property of the event to determine if it has a value that can\n * satisfy the request, calling the `callback` with the requested value if so.\n *\n * If the requested context event contains a truthy `subscribe` value, then a provider can call the callback\n * multiple times if the value is changed, if this is the case the provider should pass an `unsubscribe`\n * method to the callback which consumers can invoke to indicate they no longer wish to receive these updates.\n *\n * If no `subscribe` value is present in the event, then the provider can assume that this is a 'one time'\n * request for the context and can therefore not track the consumer.\n */\nexport class ContextRequestEvent<C extends Context<unknown, unknown>>\n extends Event\n implements ContextRequest<C>\n{\n readonly context: C;\n readonly callback: ContextCallback<ContextType<C>>;\n readonly subscribe?: boolean;\n\n /**\n *\n * @param context the context key to request\n * @param callback the callback that should be invoked when the context with the specified key is available\n * @param subscribe when, true indicates we want to subscribe to future updates\n */\n constructor(\n context: C,\n callback: ContextCallback<ContextType<C>>,\n subscribe?: boolean\n ) {\n super('context-request', {bubbles: true, composed: true});\n this.context = context;\n this.callback = callback;\n this.subscribe = subscribe ?? false;\n }\n}\n", "/**\n * @license\n * Copyright 2021 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\n\nimport {\n ContextCallback,\n ContextRequestEvent,\n} from '../context-request-event.js';\nimport type {Context, ContextType} from '../create-context.js';\nimport type {\n ReactiveController,\n ReactiveControllerHost,\n} from '@lit/reactive-element';\n\nexport interface Options<C extends Context<unknown, unknown>> {\n context: C;\n callback?: (value: ContextType<C>, dispose?: () => void) => void;\n subscribe?: boolean;\n}\n\n/**\n * A ReactiveController which adds context consuming behavior to a custom\n * element by dispatching `context-request` events.\n *\n * When the host element is connected to the document it will emit a\n * `context-request` event with its context key. When the context request\n * is satisfied the controller will invoke the callback, if present, and\n * trigger a host update so it can respond to the new value.\n *\n * It will also call the dispose method given by the provider when the\n * host element is disconnected.\n */\nexport class ContextConsumer<\n C extends Context<unknown, unknown>,\n HostElement extends ReactiveControllerHost & HTMLElement,\n> implements ReactiveController\n{\n protected host: HostElement;\n private context: C;\n private callback?: (value: ContextType<C>, dispose?: () => void) => void;\n private subscribe = false;\n\n private provided = false;\n\n value?: ContextType<C> = undefined;\n\n constructor(host: HostElement, options: Options<C>);\n /** @deprecated Use new ContextConsumer(host, options) */\n constructor(\n host: HostElement,\n context: C,\n callback?: (value: ContextType<C>, dispose?: () => void) => void,\n subscribe?: boolean\n );\n constructor(\n host: HostElement,\n contextOrOptions: C | Options<C>,\n callback?: (value: ContextType<C>, dispose?: () => void) => void,\n subscribe?: boolean\n ) {\n this.host = host;\n // This is a potentially fragile duck-type. It means a context object can't\n // have a property name context and be used in positional argument form.\n if ((contextOrOptions as Options<C>).context !== undefined) {\n const options = contextOrOptions as Options<C>;\n this.context = options.context;\n this.callback = options.callback;\n this.subscribe = options.subscribe ?? false;\n } else {\n this.context = contextOrOptions as C;\n this.callback = callback;\n this.subscribe = subscribe ?? false;\n }\n this.host.addController(this);\n }\n\n private unsubscribe?: () => void;\n\n hostConnected(): void {\n this.dispatchRequest();\n }\n\n hostDisconnected(): void {\n if (this.unsubscribe) {\n this.unsubscribe();\n this.unsubscribe = undefined;\n }\n }\n\n private dispatchRequest() {\n this.host.dispatchEvent(\n new ContextRequestEvent(this.context, this._callback, this.subscribe)\n );\n }\n\n // This function must have stable identity to properly dedupe in ContextRoot\n // if this element connects multiple times.\n private _callback: ContextCallback<ContextType<C>> = (value, unsubscribe) => {\n // some providers will pass an unsubscribe function indicating they may provide future values\n if (this.unsubscribe) {\n // if the unsubscribe function changes this implies we have changed provider\n if (this.unsubscribe !== unsubscribe) {\n // cleanup the old provider\n this.provided = false;\n this.unsubscribe();\n }\n // if we don't support subscription, immediately unsubscribe\n if (!this.subscribe) {\n this.unsubscribe();\n }\n }\n\n // store the value so that it can be retrieved from the controller\n this.value = value;\n // schedule an update in case this value is used in a template\n this.host.requestUpdate();\n\n // only invoke callback if we are either expecting updates or have not yet\n // been provided a value\n if (!this.provided || this.subscribe) {\n this.provided = true;\n if (this.callback) {\n this.callback(value, unsubscribe);\n }\n }\n\n this.unsubscribe = unsubscribe;\n };\n}\n", "/**\n * @license\n * Copyright 2021 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\n\nimport {ContextCallback} from './context-request-event.js';\n\n/**\n * A disposer function\n */\ntype Disposer = () => void;\n\ninterface CallbackInfo {\n disposer: Disposer;\n consumerHost: Element;\n}\n\n/**\n * A simple class which stores a value, and triggers registered callbacks when\n * the value is changed via its setter.\n *\n * An implementor might use other observable patterns such as MobX or Redux to\n * get behavior like this. But this is a pretty minimal approach that will\n * likely work for a number of use cases.\n */\nexport class ValueNotifier<T> {\n protected readonly subscriptions = new Map<\n ContextCallback<T>,\n CallbackInfo\n >();\n private _value!: T;\n get value(): T {\n return this._value;\n }\n set value(v: T) {\n this.setValue(v);\n }\n\n setValue(v: T, force = false) {\n const update = force || !Object.is(v, this._value);\n this._value = v;\n if (update) {\n this.updateObservers();\n }\n }\n\n constructor(defaultValue?: T) {\n if (defaultValue !== undefined) {\n this.value = defaultValue;\n }\n }\n\n updateObservers = (): void => {\n for (const [callback, {disposer}] of this.subscriptions) {\n callback(this._value, disposer);\n }\n };\n\n addCallback(\n callback: ContextCallback<T>,\n consumerHost: Element,\n subscribe?: boolean\n ): void {\n if (!subscribe) {\n // just call the callback once and we're done\n callback(this.value);\n return;\n }\n if (!this.subscriptions.has(callback)) {\n this.subscriptions.set(callback, {\n disposer: () => {\n this.subscriptions.delete(callback);\n },\n consumerHost,\n });\n }\n const {disposer} = this.subscriptions.get(callback)!;\n callback(this.value, disposer);\n }\n\n clearCallbacks(): void {\n this.subscriptions.clear();\n }\n}\n", "/**\n * @license\n * Copyright 2021 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\n\nimport {ContextRequestEvent} from '../context-request-event.js';\nimport {ValueNotifier} from '../value-notifier.js';\nimport type {Context, ContextType} from '../create-context.js';\nimport type {\n ReactiveController,\n ReactiveControllerHost,\n} from '@lit/reactive-element';\n\ndeclare global {\n interface HTMLElementEventMap {\n /**\n * A 'context-provider' event can be emitted by any element which hosts\n * a context provider to indicate it is available for use.\n */\n 'context-provider': ContextProviderEvent<Context<unknown, unknown>>;\n }\n}\n\nexport class ContextProviderEvent<\n C extends Context<unknown, unknown>,\n> extends Event {\n readonly context: C;\n\n /**\n *\n * @param context the context which this provider can provide\n */\n constructor(context: C) {\n super('context-provider', {bubbles: true, composed: true});\n this.context = context;\n }\n}\n\nexport interface Options<C extends Context<unknown, unknown>> {\n context: C;\n initialValue?: ContextType<C>;\n}\n\ntype ReactiveElementHost = Partial<ReactiveControllerHost> & HTMLElement;\n\n/**\n * A ReactiveController which adds context provider behavior to a\n * custom element.\n *\n * This controller simply listens to the `context-request` event when\n * the host is connected to the DOM and registers the received callbacks\n * against its observable Context implementation.\n *\n * The controller may also be attached to any HTML element in which case it's\n * up to the user to call hostConnected() when attached to the DOM. This is\n * done automatically for any custom elements implementing\n * ReactiveControllerHost.\n */\nexport class ContextProvider<\n T extends Context<unknown, unknown>,\n HostElement extends ReactiveElementHost = ReactiveElementHost,\n >\n extends ValueNotifier<ContextType<T>>\n implements ReactiveController\n{\n protected readonly host: HostElement;\n private readonly context: T;\n\n constructor(host: HostElement, options: Options<T>);\n /** @deprecated Use new ContextProvider(host, options) */\n constructor(host: HostElement, context: T, initialValue?: ContextType<T>);\n constructor(\n host: HostElement,\n contextOrOptions: T | Options<T>,\n initialValue?: ContextType<T>\n ) {\n super(\n (contextOrOptions as Options<T>).context !== undefined\n ? (contextOrOptions as Options<T>).initialValue\n : initialValue\n );\n this.host = host;\n if ((contextOrOptions as Options<T>).context !== undefined) {\n this.context = (contextOrOptions as Options<T>).context;\n } else {\n this.context = contextOrOptions as T;\n }\n this.attachListeners();\n this.host.addController?.(this);\n }\n\n onContextRequest = (\n ev: ContextRequestEvent<Context<unknown, unknown>>\n ): void => {\n // Only call the callback if the context matches.\n // Also, in case an element is a consumer AND a provider\n // of the same context, we want to avoid the element to self-register.\n // The check on composedPath (as opposed to ev.target) is to cover cases\n // where the consumer is in the shadowDom of the provider (in which case,\n // event.target === this.host because of event retargeting).\n const consumerHost = ev.composedPath()[0] as Element;\n if (ev.context !== this.context || consumerHost === this.host) {\n return;\n }\n ev.stopPropagation();\n this.addCallback(ev.callback, consumerHost, ev.subscribe);\n };\n\n /**\n * When we get a provider request event, that means a child of this element\n * has just woken up. If it's a provider of our context, then we may need to\n * re-parent our subscriptions, because is a more specific provider than us\n * for its subtree.\n */\n onProviderRequest = (\n ev: ContextProviderEvent<Context<unknown, unknown>>\n ): void => {\n // Ignore events when the context doesn't match.\n // Also, in case an element is a consumer AND a provider\n // of the same context it shouldn't provide to itself.\n // We use composedPath (as opposed to ev.target) to cover cases\n // where the consumer is in the shadowDom of the provider (in which case,\n // event.target === this.host because of event retargeting).\n const childProviderHost = ev.composedPath()[0] as Element;\n if (ev.context !== this.context || childProviderHost === this.host) {\n return;\n }\n // Re-parent all of our subscriptions in case this new child provider\n // should take them over.\n const seen = new Set<unknown>();\n for (const [callback, {consumerHost}] of this.subscriptions) {\n // Prevent infinite loops in the case where a one host element\n // is providing the same context multiple times.\n //\n // While normally it's a no-op to attempt to re-parent a subscription\n // that already has its proper parent, in the case where there's more\n // than one ValueProvider for the same context on the same hostElement,\n // they will each call the consumer, and since they will each have their\n // own dispose function, a well behaved consumer will notice the change\n // in dispose function and call their old one.\n //\n // This will cause the subscriptions to thrash, but worse, without this\n // set check here, we can end up in an infinite loop, as we add and remove\n // the same subscriptions onto the end of the map over and over.\n if (seen.has(callback)) {\n continue;\n }\n seen.add(callback);\n consumerHost.dispatchEvent(\n new ContextRequestEvent(this.context, callback, true)\n );\n }\n ev.stopPropagation();\n };\n\n private attachListeners() {\n this.host.addEventListener('context-request', this.onContextRequest);\n this.host.addEventListener('context-provider', this.onProviderRequest);\n }\n\n hostConnected(): void {\n // emit an event to signal a provider is available for this context\n this.host.dispatchEvent(new ContextProviderEvent(this.context));\n }\n}\n", "import { css } from 'lit';\n\nconst styles = css`\n :host {\n display: contents;\n }\n`;\n\nexport default styles;\n", "import { ContextProvider } from '@lit/context';\nimport { CSSResult, html } from 'lit';\n\nimport Component from '../component';\n\nimport styles from './provider.styles';\n\ntype ConstructorOptions<C> = {\n context: { __context__: C };\n initialValue?: C;\n};\n\n/**\n * Provider Component class to ultimately be inherited by all Provider-type Web\n * Components within this package.\n *\n * @public\n */\nabstract class Provider<C> extends Component {\n /**\n * Constructor of the Provider.\n *\n * Execute in the constructor of the provider implementation,\n * like so\n *\n * ```\n * constructor() {\n * super(TAG_NAME, {initialValue: new ContextClass(defaultValues)});\n * }\n * ```\n * @param host - host of where the context will be hooked onto, e.g. this\n * @param context - context (returned by createContext)\n * @param initialValue - initialValue of the ContextClass, like `new ContextClass(defaultValues)`\n */\n constructor({ context, initialValue }: ConstructorOptions<C>) {\n super();\n\n this.context = new ContextProvider(this, {\n context,\n initialValue,\n });\n }\n\n /**\n * Context associated with this provider.\n *\n * @remarks\n * Providing a Context type as a generic when creating extended Provider Class\n * definitions will help enforce the property validation.\n */\n protected context: ContextProvider<{ __context__: C }>;\n\n /**\n * Styles associated with this Provider Component.\n */\n public static override styles: Array<CSSResult> = [...Component.styles, styles];\n\n /**\n * Update the context of this Provider and trigger its consumers to update.\n *\n * @remarks\n * This method is called every time this Provider is re-rendered and should\n * be used to update the local Context based on any deltas between this\n * Provider's attributes and this Provider's context that caused the\n * re-render. If the `render()` method is overwritten, this call must be made\n * manually.\n */\n protected abstract updateContext(): void;\n\n /**\n * Render this Provider.\n *\n * @remarks\n * This method calls `updateContext()` then validates whether or not to\n * update all consumers based on the results of the `shouldUpdateConsumers`\n * getter.\n *\n * @returns - This Provider as an HTML Element.\n */\n public override render() {\n this.updateContext();\n\n return html`<slot></slot>`;\n }\n}\n\nexport default Provider;\n", "import Provider from './provider.component';\n\nexport default Provider;\n", "const NAMESPACE = {\n PREFIX: 'mdc' as const,\n SEPARATOR: '-' as const,\n};\n\nconst CONSTANTS = {\n NAMESPACE,\n};\n\nexport default CONSTANTS;\n", "/* eslint-disable implicit-arrow-linebreak */\n/* eslint-disable max-len */\nimport CONSTANTS from './constants';\n\n// make ReturnType a String Literal to make it usable in the HTMLElementTagNameMap per component\n// using Template Literal Types: https://www.typescriptlang.org/docs/handbook/2/template-literal-types.html\ntype ReturnType<ComponentName extends string> =\n `${typeof CONSTANTS.NAMESPACE.PREFIX}${typeof CONSTANTS.NAMESPACE.SEPARATOR}${ComponentName}`;\n\nconst constructTagName = <ComponentName extends string>(componentName: ComponentName): ReturnType<ComponentName> =>\n [CONSTANTS.NAMESPACE.PREFIX, componentName].join(CONSTANTS.NAMESPACE.SEPARATOR) as ReturnType<ComponentName>;\n\nexport default {\n constructTagName,\n};\n", "import utils from '../../utils/tag-name';\nimport type { IconNames } from '../icon/icon.types';\n\nconst TAG_NAME = utils.constructTagName('avatar');\n\nconst AVATAR_TYPE = {\n COUNTER: 'counter',\n ICON: 'icon',\n PHOTO: 'photo',\n TEXT: 'text',\n} as const;\n\nconst MAX_COUNTER = 99;\nconst ICON_NAME: Extract<IconNames, 'user-regular'> = 'user-regular';\n\nconst AVATAR_SIZE = {\n 24: 24,\n 32: 32,\n 48: 48,\n 64: 64,\n 72: 72,\n 88: 88,\n 124: 124,\n} as const;\n\nconst DEFAULTS = {\n TYPE: AVATAR_TYPE.PHOTO,\n SIZE: AVATAR_SIZE[32],\n ICON_NAME,\n} as const;\n\nexport {\n TAG_NAME,\n DEFAULTS,\n AVATAR_TYPE,\n MAX_COUNTER,\n AVATAR_SIZE,\n};\n", "import { property } from 'lit/decorators.js';\nimport { DEFAULTS as AVATAR_DEFAULTS } from '../../components/avatar/avatar.constants';\nimport type { AvatarSize } from '../../components/avatar/avatar.types';\nimport type { PresenceType } from '../../components/presence/presence.types';\nimport type { Component } from '../../models';\nimport type { Constructor } from './index.types';\n\nexport interface AvatarComponentMixinInterface {\n src?: string;\n initials?: string;\n presence?: PresenceType;\n size: AvatarSize;\n counter?: number;\n isTyping: boolean;\n}\n\nexport const AvatarComponentMixin = <T extends Constructor<Component>>(\n superClass: T,\n) => {\n class InnerMixinClass extends superClass {\n /**\n * The src is the url which will be used to display the avatar.\n * When the src is loading, we will display the initials as a placeholder.\n */\n @property({ type: String })\n src?: string;\n\n /**\n * The initials to be displayed for the avatar.\n */\n @property({ type: String })\n initials?: string;\n\n /**\n * The presence is the status which can be used to display the\n * activity state of a user or a space within an avatar component.\n *\n * Acceptable values include:\n * - `active`\n * - `away`\n * - `away-calling`\n * - `busy`\n * - `dnd`\n * - `meeting`\n * - `on-call`\n * - `on-device`\n * - `on-mobile`\n * - `pause`\n * - `pto`\n * - `presenting`\n * - `quiet`\n * - `scheduled`\n */\n @property({ type: String })\n presence?: PresenceType;\n\n /**\n * Acceptable values include (size in px unit):\n * - 24\n * - 32\n * - 48\n * - 64\n * - 72\n * - 88\n * - 124\n *\n * @default 32\n */\n @property({ type: Number, reflect: true, attribute: 'size' })\n size: AvatarSize = AVATAR_DEFAULTS.SIZE;\n\n /**\n * The counter is the number which can be displayed on the avatar.\n * The maximum number is 99 and if the given number is greater than 99,\n * then the avatar will be displayed as `99+`.\n * If the given number is a negative number,\n * then the avatar will be displayed as `0`.\n */\n @property({ type: Number })\n counter?: number;\n\n /**\n * Represents the typing indicator when the user is typing.\n * @default false\n */\n @property({ type: Boolean, attribute: 'is-typing' })\n isTyping = false;\n }\n // Cast return type to your mixin's interface intersected with the superClass type\n return InnerMixinClass as Constructor<AvatarComponentMixinInterface> & T;\n};\n", "import { LitElement } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport type { Constructor } from './index.types';\nimport type { IconNames } from '../../components/icon/icon.types';\n\nexport interface IconNameMixinInterface {\n iconName: IconNames;\n}\n\nexport const IconNameMixin = <T extends Constructor<LitElement>>(\n superClass: T,\n) => {\n class InnerMixinClass extends superClass {\n /**\n * Name of the icon (= filename).\n *\n * If no `icon-name` is provided, no icon will be rendered.\n */\n @property({ type: String, attribute: 'icon-name' })\n iconName?: IconNames;\n }\n // Cast return type to your mixin's interface intersected with the superClass type\n return InnerMixinClass as Constructor<IconNameMixinInterface> & T;\n};\n", "import { css } from 'lit';\n\nconst hostFitContentStyles = css`\n :host {\n align-items: center;\n display: flex;\n height: fit-content;\n justify-content: center;\n width: fit-content;\n }\n`;\n\nconst hostFocusRingStyles = (applyFocusRingOnClass = false) => {\n const baseHostStyleVariables = css`\n :host {\n --mdc-focus-ring-inner-color: var(--mds-color-theme-focus-default-0);\n --mdc-focus-ring-middle-color: var(--mds-color-theme-focus-default-1);\n --mdc-focus-ring-outer-color: var(--mds-color-theme-focus-default-2);\n\n --mdc-focus-ring-inner-width: 0.125rem;\n --mdc-focus-ring-middle-width: calc(2 * var(--mdc-focus-ring-inner-width));\n --mdc-focus-ring-outer-width: calc(0.0625rem + var(--mdc-focus-ring-middle-width));\n\n --mdc-focus-ring-middle-offset: var(--mdc-focus-ring-inner-width);\n --mdc-focus-ring-outer-offset: calc(var(--mdc-focus-ring-inner-width) + var(--mdc-focus-ring-middle-width));\n }\n `;\n const boxShadow = css`0 0 0 var(--mdc-focus-ring-inner-width) var(--mdc-focus-ring-inner-color),\n 0 0 0 var(--mdc-focus-ring-middle-width) var(--mdc-focus-ring-middle-color),\n 0 0 0 var(--mdc-focus-ring-outer-width) var(--mdc-focus-ring-outer-color)\n `;\n if (applyFocusRingOnClass) {\n return [\n baseHostStyleVariables,\n css`\n .mdc-focus-ring:focus-visible {\n outline: none;\n }\n :host([disabled]) .mdc-focus-ring:focus {\n box-shadow: none;\n }\n /* Add focus ring to parent when child is focused. The parent element must have class name mdc-focus-ring */\n .mdc-focus-ring:focus-within {\n position: relative;\n box-shadow: ${boxShadow};\n }\n /* Remove focus ring from parent when children has its own focus ring.\n The child element must have class name own-focus-ring */\n .mdc-focus-ring:has(.own-focus-ring:focus-visible){\n box-shadow: none;\n }\n\n /* High Contrast Mode */\n @media (forced-colors: active) {\n .mdc-focus-ring:focus-within {\n outline: 0.125rem solid var(--mds-color-theme-focus-default-0);\n }\n }\n `,\n ];\n }\n return [\n baseHostStyleVariables,\n css`\n :host(:focus-visible) {\n outline: none;\n }\n :host([disabled]:focus) {\n box-shadow: none;\n }\n :host(:focus) {\n position: relative;\n box-shadow: ${boxShadow};\n }\n /* High Contrast Mode */\n @media (forced-colors: active) {\n :host(:focus) {\n outline: 0.125rem solid var(--mds-color-theme-focus-default-0);\n }\n }\n `,\n ];\n};\n\nexport { hostFitContentStyles, hostFocusRingStyles };\n", "import { css } from 'lit';\nimport { hostFitContentStyles } from '../../utils/styles';\n\nconst styles = [hostFitContentStyles, css`\n :host {\n --mdc-avatar-default-background-color: var(--mds-color-theme-avatar-default);\n --mdc-avatar-default-foreground-color: var(--mds-color-theme-common-text-primary-normal);\n --mdc-avatar-loading-indicator-background-color: var(--mds-color-theme-common-text-primary-disabled);\n --mdc-avatar-loading-indicator-foreground-color: var(--mdc-avatar-default-foreground-color);\n --mdc-avatar-loading-overlay-background-color: var(--mds-color-theme-common-overlays-secondary-normal);\n }\n :host([size=\"124\"])::part(content) {\n width: 7.75rem;\n height: 7.75rem;\n }\n :host([size=\"88\"])::part(content) {\n width: 5.5rem;\n height: 5.5rem;\n }\n :host([size=\"72\"])::part(content) {\n width: 4.5rem;\n height: 4.5rem;\n }\n :host([size=\"64\"])::part(content) {\n width: 4rem;\n height: 4rem;\n }\n :host([size=\"48\"])::part(content) {\n width: 3rem;\n height: 3rem;\n }\n :host([size=\"32\"])::part(content) {\n width: 2rem;\n height: 2rem;\n }\n :host([size=\"24\"])::part(content) {\n width: 1.5rem;\n height: 1.5rem;\n }\n :host([size=\"124\"])::part(loader) {\n transform: scale(1.5);\n }\n :host([size=\"88\"])::part(loader) {\n transform: scale(1.2);\n }\n :host([size=\"72\"])::part(loader),\n :host([size=\"64\"])::part(loader) {\n transform: scale(0.8);\n }\n :host([size=\"48\"])::part(loader) {\n transform: scale(0.6);\n }\n :host([size=\"32\"])::part(loader) {\n transform: scale(0.4);\n }\n :host([size=\"24\"])::part(loader) {\n transform: scale(0.3);\n }\n :host::part(content) {\n width: 2rem;\n height: 2rem;\n background-color: var(--mdc-avatar-default-background-color);\n color: var(--mdc-avatar-default-foreground-color);\n border-radius: 100vh;\n position: relative;\n display: grid;\n place-items: center;\n }\n :host::part(photo) {\n border-radius: 100vh;\n height: 100%;\n width: 100%;\n object-fit: cover;\n overflow: hidden;\n }\n :host::part(presence) {\n position: absolute;\n bottom: 0;\n right: 0;\n }\n :host::part(loading-wrapper) {\n position: absolute;\n border-radius: 100vh;\n width: 100%;\n height: 100%;\n background-color: var(--mdc-avatar-loading-overlay-background-color);\n display: grid;\n place-items: center;\n }\n :host::part(loader) {\n position: absolute;\n width: 1rem;\n transform: scale(0.4);\n aspect-ratio: 1;\n border-radius: 100vh;\n animation: loading-key 1s infinite linear alternate;\n }\n @keyframes loading-key {\n 0% {\n box-shadow: 1.25rem 0 var(--mdc-avatar-loading-indicator-foreground-color),\n -1.25rem 0 var(--mdc-avatar-loading-indicator-background-color);\n background: var(--mdc-avatar-loading-indicator-foreground-color);\n }\n 33% {\n box-shadow: 1.25rem 0 var(--mdc-avatar-loading-indicator-foreground-color),\n -1.25rem 0 var(--mdc-avatar-loading-indicator-background-color);\n background: var(--mdc-avatar-loading-indicator-background-color);\n }\n 66% {\n box-shadow: 1.25rem 0 var(--mdc-avatar-loading-indicator-background-color),\n -1.25rem 0 var(--mdc-avatar-loading-indicator-foreground-color);\n background: var(--mdc-avatar-loading-indicator-background-color);\n }\n 100%{\n box-shadow: 1.25rem 0 var(--mdc-avatar-loading-indicator-background-color),\n -1.25rem 0 var(--mdc-avatar-loading-indicator-foreground-color);\n background: var(--mdc-avatar-loading-indicator-foreground-color);\n }\n }\n\n /* High Contrast Mode */\n @media (forced-colors: active) {\n :host::part(content) {\n outline: 0.125rem solid;\n }\n }\n`];\n\nexport default styles;\n", "import utils from '../../utils/tag-name';\n\nconst TAG_NAME = utils.constructTagName('presence');\n\nconst TYPE = {\n ACTIVE: 'active',\n AWAY: 'away',\n AWAY_CALLING: 'away-calling',\n BUSY: 'busy',\n DND: 'dnd',\n MEETING: 'meeting',\n ON_CALL: 'on-call',\n ON_DEVICE: 'on-device',\n ON_MOBILE: 'on-mobile',\n PAUSE: 'pause',\n PTO: 'pto',\n PRESENTING: 'presenting',\n QUIET: 'quiet',\n SCHEDULED: 'scheduled',\n} as const;\n\nconst SIZE = {\n XX_SMALL: 'xx_small',\n X_SMALL: 'x_small',\n SMALL: 'small',\n MIDSIZE: 'midsize',\n LARGE: 'large',\n X_LARGE: 'x_large',\n XX_LARGE: 'xx_large',\n} as const;\n\nconst DEFAULTS = {\n TYPE: TYPE.ACTIVE,\n SIZE: SIZE.SMALL,\n} as const;\n\nexport { TAG_NAME, DEFAULTS, TYPE, SIZE };\n", "import utils from '../../utils/tag-name';\n\nconst TAG_NAME = utils.constructTagName('text');\n\nconst TYPE = {\n BODY_SMALL_REGULAR: 'body-small-regular',\n BODY_SMALL_MEDIUM: 'body-small-medium',\n BODY_SMALL_BOLD: 'body-small-bold',\n BODY_MIDSIZE_REGULAR: 'body-midsize-regular',\n BODY_MIDSIZE_MEDIUM: 'body-midsize-medium',\n BODY_MIDSIZE_BOLD: 'body-midsize-bold',\n BODY_LARGE_REGULAR: 'body-large-regular',\n BODY_LARGE_MEDIUM: 'body-large-medium',\n BODY_LARGE_BOLD: 'body-large-bold',\n BODY_SMALL_REGULAR_UNDERLINE: 'body-small-regular-underline',\n BODY_SMALL_MEDIUM_UNDERLINE: 'body-small-medium-underline',\n BODY_MIDSIZE_REGULAR_UNDERLINE: 'body-midsize-regular-underline',\n BODY_MIDSIZE_MEDIUM_UNDERLINE: 'body-midsize-medium-underline',\n BODY_LARGE_REGULAR_UNDERLINE: 'body-large-regular-underline',\n BODY_LARGE_MEDIUM_UNDERLINE: 'body-large-medium-underline',\n HEADING_SMALL_REGULAR: 'heading-small-regular',\n HEADING_SMALL_MEDIUM: 'heading-small-medium',\n HEADING_SMALL_BOLD: 'heading-small-bold',\n HEADING_MIDSIZE_REGULAR: 'heading-midsize-regular',\n HEADING_MIDSIZE_MEDIUM: 'heading-midsize-medium',\n HEADING_MIDSIZE_BOLD: 'heading-midsize-bold',\n HEADING_LARGE_REGULAR: 'heading-large-regular',\n HEADING_LARGE_MEDIUM: 'heading-large-medium',\n HEADING_LARGE_BOLD: 'heading-large-bold',\n HEADING_XLARGE_REGULAR: 'heading-xlarge-regular',\n HEADING_XLARGE_MEDIUM: 'heading-xlarge-medium',\n HEADING_XLARGE_BOLD: 'heading-xlarge-bold',\n HEADLINE_SMALL_LIGHT: 'headline-small-light',\n HEADLINE_SMALL_REGULAR: 'headline-small-regular',\n} as const;\n\nconst VALID_TEXT_TAGS = {\n H1: 'h1',\n H2: 'h2',\n H3: 'h3',\n H4: 'h4',\n H5: 'h5',\n H6: 'h6',\n P: 'p',\n SMALL: 'small',\n SPAN: 'span',\n DIV: 'div',\n} as const;\n\nconst DEFAULTS = {\n TYPE: TYPE.BODY_LARGE_REGULAR,\n TEXT_ELEMENT_TAGNAME: VALID_TEXT_TAGS.P,\n CSS_PART_TEXT: 'text',\n CHILDREN: 'The quick brown fox jumps over the lazy dog',\n} as const;\n\nexport { TAG_NAME, DEFAULTS, TYPE, VALID_TEXT_TAGS };\n", "import { SIZE as PRESENCE_SIZE } from '../presence/presence.constants';\nimport type { PresenceSize } from '../presence/presence.types';\nimport { TYPE as FONT_TYPE } from '../text/text.constants';\nimport type { TextType } from '../text/text.types';\nimport { AVATAR_SIZE } from './avatar.constants';\nimport type { AvatarSize } from './avatar.types';\n\nconst getPresenceSize = (size: AvatarSize): PresenceSize => {\n const avatarPresenceSizeMap: Record<AvatarSize, PresenceSize> = {\n [AVATAR_SIZE[124]]: PRESENCE_SIZE.XX_LARGE,\n [AVATAR_SIZE[88]]: PRESENCE_SIZE.X_LARGE,\n [AVATAR_SIZE[72]]: PRESENCE_SIZE.LARGE,\n [AVATAR_SIZE[64]]: PRESENCE_SIZE.MIDSIZE,\n [AVATAR_SIZE[48]]: PRESENCE_SIZE.SMALL,\n [AVATAR_SIZE[32]]: PRESENCE_SIZE.X_SMALL,\n [AVATAR_SIZE[24]]: PRESENCE_SIZE.XX_SMALL,\n };\n return avatarPresenceSizeMap[size] || PRESENCE_SIZE.X_SMALL; // default size of presence\n};\n\nconst getAvatarIconSize = (size: AvatarSize): number => {\n const avatarIconSizeMap: Record<AvatarSize, number> = {\n [AVATAR_SIZE[124]]: 4.75,\n [AVATAR_SIZE[88]]: 3,\n [AVATAR_SIZE[72]]: 2.5,\n [AVATAR_SIZE[64]]: 2.25,\n [AVATAR_SIZE[48]]: 1.75,\n [AVATAR_SIZE[32]]: 1.25,\n [AVATAR_SIZE[24]]: 1,\n };\n return avatarIconSizeMap[size] || 1.25; // default size of icon\n};\n\nconst getAvatarTextFontSize = (size: AvatarSize): TextType => {\n const avatarTextFontSizeMap: Record<AvatarSize, TextType> = {\n [AVATAR_SIZE[124]]: FONT_TYPE.HEADING_XLARGE_MEDIUM,\n [AVATAR_SIZE[88]]: FONT_TYPE.HEADING_LARGE_MEDIUM,\n [AVATAR_SIZE[72]]: FONT_TYPE.HEADING_MIDSIZE_MEDIUM,\n [AVATAR_SIZE[64]]: FONT_TYPE.HEADING_SMALL_MEDIUM,\n [AVATAR_SIZE[48]]: FONT_TYPE.HEADING_SMALL_MEDIUM,\n [AVATAR_SIZE[32]]: FONT_TYPE.BODY_MIDSIZE_MEDIUM,\n [AVATAR_SIZE[24]]: FONT_TYPE.BODY_SMALL_MEDIUM,\n };\n return avatarTextFontSizeMap[size] || FONT_TYPE.BODY_MIDSIZE_MEDIUM; // default size of text font\n};\n\nexport {\n getAvatarIconSize,\n getAvatarTextFontSize,\n getPresenceSize,\n};\n", "import type { PropertyValues, TemplateResult } from 'lit';\nimport { CSSResult, html, nothing } from 'lit';\nimport { state } from 'lit/decorators.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport { Component } from '../../models';\nimport { AvatarComponentMixin } from '../../utils/mixins/AvatarComponentMixin';\nimport { IconNameMixin } from '../../utils/mixins/IconNameMixin';\nimport { AVATAR_TYPE, DEFAULTS, MAX_COUNTER } from './avatar.constants';\nimport styles from './avatar.styles';\nimport type { AvatarType } from './avatar.types';\nimport { getAvatarIconSize, getAvatarTextFontSize, getPresenceSize } from './avatar.utils';\n\n/**\n * The `mdc-avatar` component is used to represent a person or a space.\n * An avatar can be an icon, initials, counter and photo.\n *\n * To set the photo of an avatar,\n * you need to set \"src\" attribute.\n *\n * While the avatar image is loading, as a placeholder,\n * we will show the initials text.\n * If the initials are not specified then,\n * we will show `user-regular` icon as a placeholder.\n *\n * By default, if there are no attributes specified,\n * then the default avatar will be an icon with `user-regular` name.\n *\n * The avatar component is non clickable and non interactive/focusable component.\n * If the avatar is typing, then the loading indicator will be displayed.\n * If the counter type avatar is set to a negative number, then we will display 0.\n * The presence indicator will be hidden when the counter property is set.\n *\n * @dependency mdc-icon\n * @dependency mdc-presence\n * @dependency mdc-text\n *\n * @tagname mdc-avatar\n *\n * @cssproperty --mdc-avatar-default-background-color - Allows customization of the default background color.\n * @cssproperty --mdc-avatar-default-foreground-color - Allows customization of the default foreground color.\n * @cssproperty --mdc-avatar-loading-indicator-background-color -\n * Allows customization of the loading indicator background color.\n * @cssproperty --mdc-avatar-loading-indicator-foreground-color -\n * Allows customization of the loading indicator foreground color.\n * @cssproperty --mdc-avatar-loading-overlay-background-color -\n * Allows customization of the loading overlay background color.\n */\nclass Avatar extends AvatarComponentMixin(IconNameMixin(Component)) {\n /**\n * @internal\n */\n @state() private isPhotoLoaded = false;\n\n /**\n * @internal\n * The avatar presence will be hidden if the avatar type is COUNTER.\n * If the presence is set, it will be rendered as a child of the avatar.\n *\n * @param type - The type of the avatar.\n * @returns The presence template or an empty template.\n */\n private getPresenceTemplateBasedOnType(type: AvatarType): TemplateResult | typeof nothing {\n // avatar type of counter should not have presence\n if (type === AVATAR_TYPE.COUNTER && (this.counter || this.counter === 0)) {\n return nothing;\n }\n if (this.presence) {\n return html`\n <mdc-presence part=\"presence\" type=\"${this.presence}\" size=\"${getPresenceSize(this.size)}\"></mdc-presence>\n `;\n }\n return nothing;\n }\n\n /**\n * @internal\n * Sets `isPhotoLoaded` to `true` when the avatar photo is loaded.\n * This is used to hide the avatar photo initially and show it only when it is loaded.\n */\n private handleOnLoad(): void {\n this.isPhotoLoaded = true;\n }\n\n /**\n * @internal\n * Handles errors that occur during the image loading process.\n * Sets `isPhotoLoaded` to `false` to indicate the failure and throws an error message.\n * The error message suggests checking the `src` attribute.\n */\n private handleOnError(): void {\n this.isPhotoLoaded = false;\n if (this.onerror) {\n this.onerror('There was a problem while fetching the <img/>. Please check the src attribute and try again.');\n }\n }\n\n /**\n * @internal\n * Generates the photo template for the avatar component.\n * Utilizes the `src` attribute to display an image.\n * The photo remains hidden until it is fully loaded;\n * upon successful loading, the `handleOnLoad` method sets `isPhotoLoaded` to true.\n * In the event of a loading error, the `handleOnError` method sets `isPhotoLoaded` to false and raises an error.\n *\n * @returns The template result containing the avatar photo.\n */\n private photoTemplate(): TemplateResult {\n return html`\n <img\n part=\"photo\"\n src=\"${ifDefined(this.src)}\"\n aria-hidden=\"true\"\n ?hidden=\"${!this.isPhotoLoaded}\"\n @load=\"${this.handleOnLoad}\"\n @error=\"${this.handleOnError}\"\n />\n `;\n }\n\n /**\n * @internal\n * Generates the icon template for the photo avatar component.\n * Utilizes the `mdc-icon` component to display an icon.\n * If the `iconName` property is not provided, it defaults to the `DEFAULTS.ICON_NAME`.\n *\n * @returns The template result containing the avatar icon.\n */\n private iconTemplate(): TemplateResult {\n const name = this.iconName || DEFAULTS.ICON_NAME;\n return html`\n <mdc-icon\n name=\"${ifDefined(name)}\"\n length-unit=\"rem\"\n size=\"${getAvatarIconSize(this.size)}\"\n ></mdc-icon>\n `;\n }\n\n /**\n * @internal\n * Generates the text template for the initials/counter avatar component.\n * Utilizes the `mdc-text` component to display text.\n *\n * @param content - the text content to be displayed\n * @returns The template result containing the avatar text.\n */\n private textTemplate(content: string): TemplateResult {\n return html`\n <mdc-text\n type=\"${getAvatarTextFontSize(this.size)}\"\n tagname=\"span\"\n >\n ${content}\n </mdc-text>\n `;\n }\n\n /**\n * @internal\n * Generates the text content for counter avatar by converting the given number to a string.\n * If the counter exceeds the maximum limit of 99, it will return the maximum limit as a string\n * followed by a '+' character.\n *\n * @param counter - the number to be converted to a string\n * @returns the counter text\n */\n private generateCounterText(counter: number): string {\n // If the consumer provides a negative number, we set it to 0.\n if (counter < 0) {\n return '0';\n }\n if (counter > MAX_COUNTER) {\n return `${MAX_COUNTER}+`;\n }\n return counter.toString();\n }\n\n /**\n * @internal\n * Converts the given initials to uppercase and takes the first two characters.\n * This is used to generate the text content for the initials avatar.\n *\n * @param initials - the string containing the initials\n * @returns the first two uppercase characters of the given initials\n */\n private generateInitialsText(initials: string): string {\n return initials.toUpperCase().slice(0, 2);\n }\n\n /**\n * @internal\n * Generates the text content based on the given type.\n * If the type is TEXT, it will use the initials property and generate the first two uppercase characters.\n * If the type is COUNTER, it uses the value of counter property and\n * generate the string representation of the counter.\n * The generated content is then passed to the `textTemplate` method to generate the final template.\n *\n * @param type - the type of the avatar\n * @returns the template result containing the avatar text\n */\n private generateTextContent(type: AvatarType): TemplateResult {\n let content = '';\n if (type === AVATAR_TYPE.TEXT && this.initials) {\n content = this.generateInitialsText(this.initials);\n }\n if (type === AVATAR_TYPE.COUNTER && (this.counter || this.counter === 0)) {\n content = this.generateCounterText(this.counter);\n }\n return this.textTemplate(content);\n }\n\n /**\n * @internal\n * Returns the type of the avatar component based on the user-provided inputs.\n *\n * @returns the type of the avatar component\n */\n private getTypeBasedOnInputs(): AvatarType {\n if (this.src) {\n return AVATAR_TYPE.PHOTO;\n }\n if (this.iconName) {\n return AVATAR_TYPE.ICON;\n }\n if (this.initials) {\n return AVATAR_TYPE.TEXT;\n }\n if (this.counter || this.counter === 0) {\n return AVATAR_TYPE.COUNTER;\n }\n return AVATAR_TYPE.ICON;\n }\n\n /**\n * @internal\n * Returns the template result based on the type of the avatar component.\n * The type is determined by `getTypeBasedOnInputs` based on user's input.\n * Based on the generated type, template result is generated.\n *\n * @param type - the type of the avatar component\n * @returns the template result containing the avatar content\n */\n private getTemplateBasedOnType(type: AvatarType): TemplateResult {\n switch (type) {\n case AVATAR_TYPE.PHOTO:\n return this.photoTemplate();\n case AVATAR_TYPE.TEXT:\n case AVATAR_TYPE.COUNTER:\n return this.generateTextContent(type);\n case AVATAR_TYPE.ICON:\n default:\n return this.iconTemplate();\n }\n }\n\n /**\n * @internal\n * Represents the loading indicator for the avatar when typing.\n * If the avatar is in typing state, this method returns a loading indicator\n * comprising three small filled dots, scaled based on the avatar size.\n *\n * @returns The template result containing the loading indicator, or an empty template if not typing.\n */\n private getLoadingContent(): TemplateResult | typeof nothing {\n if (!this.isTyping) {\n return nothing;\n }\n return html`<div part=\"loading-wrapper\"><div part=\"loader\"></div></div>`;\n }\n\n /**\n * @internal\n * Generates the photo placeholder content for the avatar component.\n * If the photo is not yet loaded, and the avatar type is PHOTO with initials provided,\n * it generates and returns the initials as a placeholder text.\n * If the photo is already loaded, it returns an empty template.\n *\n * @param type - The type of the avatar.\n * @returns The template result containing the placeholder content or an empty template.\n */\n private getPhotoPlaceHolderContent(type: AvatarType): TemplateResult | typeof nothing {\n // if photo is already loaded then no need to show placeholder\n if (this.isPhotoLoaded) {\n return nothing;\n }\n if (type === AVATAR_TYPE.PHOTO) {\n if (this.initials) {\n return this.textTemplate(this.generateInitialsText(this.initials));\n }\n return this.iconTemplate();\n }\n return nothing;\n }\n\n public override update(changedProperties: PropertyValues): void {\n super.update(changedProperties);\n\n if (changedProperties.has('src') && !this.src) {\n // Reset photo loaded if src is empty\n this.isPhotoLoaded = false;\n }\n }\n\n public override render(): TemplateResult {\n const type = this.getTypeBasedOnInputs();\n return html`\n <div part=\"content\" aria-hidden=\"true\">\n ${this.getPhotoPlaceHolderContent(type)}\n ${this.getTemplateBasedOnType(type)}\n ${this.getLoadingContent()}\n ${this.getPresenceTemplateBasedOnType(type)}\n </div>\n `;\n }\n\n public static override styles: Array<CSSResult> = [...Component.styles, ...styles];\n}\n\nexport default Avatar;\n", "import { css } from 'lit';\nimport { hostFitContentStyles, hostFocusRingStyles } from '../../utils/styles';\n\nconst styles = [\n hostFitContentStyles,\n css`\n :host {\n --mdc-icon-fill-color: currentColor;\n --mdc-icon-size: var(--computed-icon-size);\n --mdc-icon-border-radius: 0.25rem;\n\n height: var(--mdc-icon-size);\n width: var(--mdc-icon-size);\n border-radius: var(--mdc-icon-border-radius);\n }\n :host::part(icon) {\n height: 100%;\n width: 100%;\n fill: var(--mdc-icon-fill-color);\n }\n `,\n ...hostFocusRingStyles(),\n];\n\nexport default styles;\n", "import { Context, ContextConsumer } from '@lit/context';\nimport { ReactiveElement } from 'lit';\n\ntype ConsumeOptions<C> = {\n host: ReactiveElement;\n context: C;\n subscribe?:boolean\n}\nconst consume = <C extends Context<unknown, unknown>>(options: ConsumeOptions<C>) => {\n const { host, context, subscribe } = options;\n\n return new ContextConsumer<C, typeof host>(host, {\n context,\n subscribe: subscribe ?? true,\n });\n};\n\nconst providerUtils = {\n consume,\n};\nexport default providerUtils;\n", "import utils from '../../utils/tag-name';\n\nconst TAG_NAME = utils.constructTagName('iconprovider');\n\nconst ALLOWED_FILE_EXTENSIONS = ['svg'];\nconst ALLOWED_LENGTH_UNITS = ['em', 'rem', 'px', '%'];\nconst LENGTH_UNIT_SIZE = {\n px: 16,\n em: 1,\n rem: 1,\n '%': 100,\n} as Record<string, number>;\n\nconst DEFAULTS = {\n FILE_EXTENSION: 'svg',\n LENGTH_UNIT: 'em',\n SIZE: LENGTH_UNIT_SIZE.em,\n SHOULD_CACHE: false,\n ICON_SET: 'momentum-icons',\n} as const;\n\nexport { TAG_NAME, DEFAULTS, ALLOWED_FILE_EXTENSIONS, ALLOWED_LENGTH_UNITS, LENGTH_UNIT_SIZE };\n", "import { createContext } from '@lit/context';\n\nimport { TAG_NAME } from './iconprovider.constants';\nimport type { IconSet, CacheStrategy } from './iconprovider.types';\n\nclass IconProviderContext {\n public iconSet?: IconSet;\n\n public fileExtension?: string;\n\n public url?: string;\n\n public lengthUnit?: string;\n\n public size?: number;\n\n public cacheName?: string;\n\n public cacheStrategy?: CacheStrategy;\n\n // create typed lit context as part of the IconProviderContext\n public static readonly context = createContext<IconProviderContext>(TAG_NAME);\n}\n\nexport default IconProviderContext;\n", "import { property } from 'lit/decorators.js';\nimport { Provider } from '../../models';\nimport IconProviderContext from './iconprovider.context';\nimport { ALLOWED_FILE_EXTENSIONS, DEFAULTS, ALLOWED_LENGTH_UNITS } from './iconprovider.constants';\nimport type { CacheStrategy, IconSet } from './iconprovider.types';\n\n/**\n * IconProvider component, which allows to be consumed from sub components\n * (see `providerUtils.consume` for how to consume)\n *\n * Attribute `iconSet` can be set to either `momentum-icons` or `custom-icons`.\n * If `momentum-icons` is selected, the icons will be fetched from the\n * Momentum Design System icon set per a dynamic JS Import (no need to provide a URL).\n * This requires the consumer to have the `@momentum-designs` package installed and the\n * build tooling needs to support dynamic imports.\n *\n * If `custom-icons` is selected, the icons will be fetched from the provided URL.\n * This requires the consumer to provide a URL from which the icons will be fetched and\n * the consumer needs to make sure to bundle the icons in the application.\n *\n * If `cacheStrategy` is provided (only works with iconSet = `custom-icons`), the\n * IconProvider will cache the icons in the selected cache (either web-api-cache or in-memory-cache),\n * to avoid fetching the same icon multiple times over the network.\n * This is useful when the same icon is used multiple times in the application.\n * To consider:\n * - The `in-memory-cache` is not persisted and will be lost when the\n * IconProvider is removed from the DOM.\n * - The `web-api-cache` is persisted, but only works in https environments\n * (https://developer.mozilla.org/en-US/docs/Web/API/Cache).\n *\n * @tagname mdc-iconprovider\n *\n * @slot - children\n */\nclass IconProvider extends Provider<IconProviderContext> {\n constructor() {\n // initialise the context by running the Provider constructor:\n super({\n context: IconProviderContext.context,\n initialValue: new IconProviderContext(),\n });\n }\n\n /**\n * Context object of the IconProvider, to be consumed by child components\n */\n public static get Context() {\n return IconProviderContext.context;\n }\n\n /**\n * Icon set to be used\n *\n * If `momentum-icons` is selected, the icons will be fetched from the\n * Momentum Design System icon set per a dynamic JS Import (no need to provide a URL).\n * This requires the consumer to have the `@momentum-designs` package installed and the\n * build tooling needs to support dynamic imports.\n *\n * If `custom-icons` is selected, the icons will be fetched from the provided URL.\n * This requires the consumer to provide a URL from which the icons will be fetched and\n * the consumer needs to make sure to bundle the icons in the application.\n *\n * @default momentum-icons\n */\n @property({ type: String, attribute: 'icon-set', reflect: true })\n iconSet?: IconSet = DEFAULTS.ICON_SET;\n\n /**\n * Url of where icons will be fetched from\n * (if Icon set is `custom-icons`, this will be the base url)\n */\n @property({ type: String })\n url?: string;\n\n /**\n * File extension of icons\n * (if Icon set is `custom-icons`, this will be the file extension for icons)\n * @default svg\n */\n @property({ type: String, attribute: 'file-extension', reflect: true })\n fileExtension?: string = DEFAULTS.FILE_EXTENSION;\n\n /**\n * Length unit used for sizing of icons\n * @default em\n */\n @property({ type: String, attribute: 'length-unit', reflect: true })\n lengthUnit: string = DEFAULTS.LENGTH_UNIT;\n\n /**\n * The default size of the icon.\n * If not set, it falls back to the size defined by the length unit.\n * @default 1\n */\n @property({ type: Number, reflect: true })\n size?: number = DEFAULTS.SIZE;\n\n /**\n * Icons Cache Strategy to use\n *\n * **Can only be used if Icon set is `custom-icons`**\n *\n * Choose `in-memory-cache` to cache icons in a JS cache (in-memory cache).\n * Choose `web-cache-api` to cache icons using the Web Cache API.\n *\n * NOTE: `cache-name` must be provided if `cache-strategy` is provided.\n *\n * If not provided or invalid value provided, the icons will not be cached.\n * @default undefined\n */\n @property({ type: String, attribute: 'cache-strategy' })\n cacheStrategy?: CacheStrategy;\n\n /**\n * Icons Cache Name to use (cache strategy must be provided)\n *\n * If provided, Icons inside the provider will be cached in the\n * cache (determined by `cache-strategy`) with the provided name.\n *\n * NOTE: `cache-name` requires `cache-strategy` to be set.\n *\n * If not provided, the icons will not be cached.\n * @default undefined\n */\n @property({ type: String, attribute: 'cache-name' })\n cacheName?: string;\n\n private updateValuesInContext() {\n // only update fileExtension on context if its an allowed fileExtension\n if (this.fileExtension && ALLOWED_FILE_EXTENSIONS.includes(this.fileExtension)) {\n this.context.value.fileExtension = this.fileExtension;\n } else {\n // Ensure both fileExtension and context are updated to the default if its not an allowed fileExtension\n this.fileExtension = DEFAULTS.FILE_EXTENSION;\n this.context.value.fileExtension = DEFAULTS.FILE_EXTENSION;\n }\n this.context.value.iconSet = this.iconSet;\n this.context.value.url = this.url;\n this.context.value.size = this.size;\n this.context.value.cacheName = this.cacheName;\n this.context.value.cacheStrategy = this.cacheStrategy;\n\n if (this.lengthUnit && ALLOWED_LENGTH_UNITS.includes(this.lengthUnit)) {\n this.context.value.lengthUnit = this.lengthUnit;\n } else {\n // Ensure both lengthUnit and context are updated to the default if its not an allowed lengthUnit\n this.lengthUnit = DEFAULTS.LENGTH_UNIT;\n this.context.value.lengthUnit = DEFAULTS.LENGTH_UNIT;\n }\n }\n\n protected updateContext(): void {\n if (\n this.context.value.fileExtension !== this.fileExtension\n || this.context.value.iconSet !== this.iconSet\n || this.context.value.url !== this.url\n || this.context.value.lengthUnit !== this.lengthUnit\n || this.context.value.size !== this.size\n || this.context.value.cacheName !== this.cacheName\n || this.context.value.cacheStrategy !== this.cacheStrategy\n ) {\n this.updateValuesInContext();\n this.context.updateObservers();\n }\n }\n}\nexport default IconProvider;\n", "type IconCache = Map<string, string>;\ntype Registry = Record<string, IconCache>;\nexport type CacheStrategy = 'in-memory-cache' | 'web-cache-api';\n\nconst registry: Registry = {};\n\n/**\n * Cache, using In-Memory Cache (Map)\n * @param name - name of the cache (used as an identifier)\n * @returns Object with set, get and delete methods\n */\nexport const inMemoryCache = async (name: string) => {\n if (registry[name] === undefined) {\n registry[name] = new Map();\n }\n\n return {\n async set(request: Request, response: Response) {\n registry[name].set(request.url, await response.text());\n },\n async get(request: Request) {\n return registry[name].get(request.url);\n },\n async delete(request: Request) {\n registry[name].delete(request.url);\n },\n };\n};\n\n/**\n * Cache, using Web API Cache\n * @param name - name of the cache (used as an identifier)\n * @returns Object with set, get and delete methods\n */\nexport const webAPIIconsCache = async (name: string) => {\n const cache = await caches.open(name);\n\n return {\n set: async (request: Request, response: Response) => {\n await cache.put(request, response);\n },\n get: async (request: Request) => {\n const response = await cache.match(request);\n return response?.text();\n },\n delete: async (request: Request) => {\n await cache.delete(request);\n },\n };\n};\n\n/**\n * Function to return the cache based on the cache strategy\n * @param cacheName - name of the cache to be used\n * @param cacheStrategy - strategy to be used for caching\n * @returns the cache based on the strategy\n */\nexport const iconsCache = async (cacheName: string, cacheStrategy: CacheStrategy) => {\n if (cacheStrategy === 'in-memory-cache') {\n return inMemoryCache(cacheName);\n }\n\n return webAPIIconsCache(cacheName);\n};\n", "import { iconsCache } from '../../utils/icon-cache';\nimport type { CacheStrategy } from '../../utils/icon-cache';\n\ninterface Args {\n url: string;\n name: string;\n fileExtension: string;\n cacheStrategy?: CacheStrategy;\n cacheName?: string;\n renewSignal: () => AbortSignal;\n}\n\n/**\n * Utility function for fetching the icon from the provided `request`.\n * It will throw an error if the response is not ok.\n * @param request - The request object to fetch the icon\n * @returns Promise<Response> - The response from the fetch\n * @throws Error if the response is not ok\n */\nconst fetchIcon = async (request: Request): Promise<Response> =>\n fetch(request).then((response) => {\n if (!response.ok) {\n throw new Error('There was a problem while fetching the icon!');\n }\n return response;\n });\n\n/**\n * Fetches a dynamic SVG icon based on the provided `url`, `name` and `fileExtension`.\n * The fetch is aborted if the signal is aborted.\n *\n * This function also includes the logic to cache the fetched icon using the In Memory Cache or Web Cache API.\n * If the `cacheStrategy` is set to `web-cache-api` or `in-memory-cache` and `cacheName` is provided,\n * the fetched icon will be cached using the respective cache.\n *\n * It will throw an error if the response is not ok.\n *\n * @param url - The base url of the icon\n * @param name - The name of the icon\n * @param fileExtension - The file extension of the icon\n * @param signal - The signal to abort the fetch.\n * It is used to cancel the fetch when the component is disconnected or updated.\n * @param cacheStrategy - The cache strategy to use.\n * @param cacheName - The cache name to use.\n *\n * @returns Response string from the fetch\n * @throws Error if the response is not ok\n */\nconst svgFetch = async ({\n url,\n name,\n fileExtension,\n cacheStrategy,\n cacheName,\n renewSignal,\n}: Args): Promise<string> => {\n // abort the previous fetch request if it is still pending\n // and create a new signal\n const signal = renewSignal();\n const request = new Request(`${url}/${name}.${fileExtension}`, {\n signal,\n });\n\n // if there is no cache defined (cacheName and cacheStrategy properly set),\n // fetch the icon and return the response\n if (!cacheName || !cacheStrategy || !['in-memory-cache', 'web-cache-api'].includes(cacheStrategy)) {\n return fetchIcon(request).then((response) => response.text());\n }\n\n return iconsCache(cacheName, cacheStrategy).then((iconsCache) =>\n iconsCache\n .get(request)\n .then((responseFromCache) => {\n // **If entry in cache, return**\n if (responseFromCache) {\n return responseFromCache;\n }\n\n // **Otherwise, fetch and cache if successful**\n // Both fetchIcon() and iconsCache.set() \"consume\" the request,\n // so we need to make a copy.\n // (see https://developer.mozilla.org/en-US/docs/Web/API/Request/clone)\n return fetchIcon(request.clone()).then((response) => {\n // This avoids caching responses that we know are errors\n // (i.e. HTTP status code of 4xx or 5xx).\n if (response.status < 400 && response.headers.has('content-type')) {\n // Call .clone() on the response to save copy to cache.\n // https://developer.mozilla.org/en-US/docs/Web/API/Request/clone\n return iconsCache.set?.(request, response.clone()).then(() => response.text());\n }\n return response.text();\n });\n })\n .catch((error) => {\n // Note that a HTTP error response (e.g. 404) will NOT trigger\n // an exception.\n // It will return a normal response object that has the appropriate\n // error code set.\n throw new Error(`Error in caching the Icon ${name}, ${error}`);\n }));\n};\n\nexport { svgFetch };\n", "import utils from '../../utils/tag-name';\n\nconst TAG_NAME = utils.constructTagName('icon');\n\nconst DEFAULTS = {\n NAME: undefined,\n SIZE: 1,\n} as const;\n\nexport { TAG_NAME, DEFAULTS };\n", "import { CSSResult, html } from 'lit';\nimport { property, state } from 'lit/decorators.js';\nimport styles from './icon.styles';\nimport { Component } from '../../models';\nimport providerUtils from '../../utils/provider';\nimport IconProvider from '../iconprovider/iconprovider.component';\nimport { svgFetch } from './icon.utils';\nimport { DEFAULTS } from './icon.constants';\nimport type { IconNames } from './icon.types';\n/**\n * Icon component that dynamically displays SVG icons based on a valid name.\n *\n * This component must be mounted within an `IconProvider` component.\n *\n * The `IconProvider` defines the source URL from which icons are consumed.\n * The `Icon` component accepts a `name` attribute, which corresponds to\n * the file name of the icon to be loaded from the specified URL.\n *\n * Once fetched, the icon will be rendered. If the fetching process is unsuccessful,\n * no icon will be displayed.\n *\n * The `size` attribute allows for dynamic sizing of the icon based on the provided\n * `length-unit` attribute. This unit can either come from the `IconProvider`\n * or can be overridden for each individual icon. For example:\n * if `size = 1` and `length-unit = 'em'`, the dimensions of the icon will be\n * `width: 1em; height: 1em`.\n *\n * Regarding accessibility, there are three types of icons: decorative, informative and informative standalone.\n *\n * ### Decorative Icons\n * - Decorative icons do not convey any essential information to the content of a page.\n * - They should be hidden from screen readers (SR) to prevent confusion for users.\n * - For decorative icons, an `aria-label` is not required, and the `role` will be set to null.\n *\n * ### Informative Icons\n * - Informative icons convey important information that is not adequately represented\n * by surrounding text or components.\n * - They provide valuable context and must be announced by assistive technologies.\n * - For informative icons, an `aria-label` is required, and the `role` will be set to \"img\" automatically.\n * - If an `aria-label` is provided, the role will be set to 'img'; if it is absent,\n * the role will be unset.\n *\n * ### Informative Standalone Icons\n * - If an icon is informative (as mentioned above) and does not belong to a button (=standalone), it must\n * have a Tooltip that describes what it means.\n * - For informative standalone icons, an `aria-label` & `tabindex=\"0\"` is required,\n * and the `role` will be set to \"img\" automatically.\n * - **Only use this when a Icon is standalone and is not part of a button or other interactive elements.**\n *\n * @tagname mdc-icon\n *\n * @cssproperty --mdc-icon-fill-color - Allows customization of the default fill color.\n * @cssproperty --mdc-icon-size - Allows customization of the icon size.\n * @cssproperty --mdc-icon-border-radius - Allows customization of the icon border radius.\n */\nclass Icon extends Component {\n @state()\n private iconData?: HTMLElement;\n\n @state()\n private lengthUnitFromContext?: string;\n\n @state()\n private sizeFromContext?: number;\n\n /**\n * Name of the icon (= filename)\n */\n @property({ type: String, reflect: true })\n name?: IconNames = DEFAULTS.NAME;\n\n /**\n * Size of the icon (works in combination with length unit)\n */\n @property({ type: Number })\n size?: number;\n\n /**\n * Length unit attribute for overriding length-unit from `IconProvider`\n */\n @property({ type: String, attribute: 'length-unit' })\n lengthUnit?: string;\n\n /**\n * Aria-label attribute to be set for accessibility\n */\n @property({ type: String, attribute: 'aria-label' })\n override ariaLabel: string | null = null;\n\n private readonly iconProviderContext = providerUtils.consume({ host: this, context: IconProvider.Context });\n\n @state() private abortController: AbortController;\n\n constructor() {\n super();\n this.abortController = new AbortController(); // Initialize AbortController\n }\n\n /**\n * Parse the icon string to an html element, set the attributes and\n * return the icon element\n *\n * @param iconData - The icon string to be parsed\n * @returns iconElement\n */\n private prepareIconElement(iconData: string) {\n const iconElement = new DOMParser().parseFromString(iconData, 'text/html').body.children[0];\n\n if (this.name) {\n iconElement.setAttribute('data-name', this.name);\n }\n iconElement.setAttribute('part', 'icon');\n // set aria-hidden=true for SVG to avoid screen readers\n iconElement.setAttribute('aria-hidden', 'true');\n\n return iconElement;\n }\n\n /**\n * Fetches the icon (currently only svg) and sets state and attributes once fetched successfully\n *\n * This method uses abortController.signal to cancel the fetch request when the component is disconnected or updated.\n * If the request is aborted after the fetch() call has been fulfilled but before the response body has been read,\n * then attempting to read the response body will reject with an AbortError exception.\n */\n private async getIconData() {\n if (this.iconProviderContext.value) {\n const { fileExtension, url, cacheName, iconSet, cacheStrategy } = this.iconProviderContext.value;\n if (iconSet === 'custom-icons' && url && fileExtension && this.name) {\n // function to abort the fetch request and create a new signal\n // (directly passing the abortcontroller to the fetch request per reference\n // will not work due to JS call-by-sharing behavior)\n const renewSignal = () => {\n this.abortController.abort();\n this.abortController = new AbortController();\n return this.abortController.signal;\n };\n\n // fetch icon data (including caching logic)\n return svgFetch({\n url,\n name: this.name,\n fileExtension,\n cacheName,\n cacheStrategy,\n renewSignal,\n })\n .then((iconData) => {\n // parse the fetched icon string to an html element and set the attributes\n const iconElement = this.prepareIconElement(iconData);\n this.handleIconLoadedSuccess(iconElement as HTMLElement);\n })\n .catch((error) => {\n this.handleIconLoadedFailure(error);\n });\n }\n\n if (iconSet === 'momentum-icons' && this.name) {\n // dynamic import of the lit template from the momentum icons package\n return import(`@momentum-design/icons/dist/ts/${this.name}.ts`)\n .then((module) => {\n this.handleIconLoadedSuccess(module.default());\n })\n .catch((error) => {\n this.handleIconLoadedFailure(error);\n });\n }\n }\n\n const noIconProviderError = new Error('IconProvider not found or not properly set up.');\n this.handleIconLoadedFailure(noIconProviderError);\n return Promise.reject(noIconProviderError);\n }\n\n /**\n * Sets the iconData state to the fetched icon.\n * Dispatches a 'load' event on the component once the icon has been successfully loaded.\n * @param iconHtml - The icon html element which has been fetched from the icon provider.\n */\n private handleIconLoadedSuccess(iconHtml: HTMLElement) {\n // update iconData state once fetched:\n this.iconData = iconHtml;\n\n // when icon is fetched successfully, trigger icon load event.\n const loadEvent = new Event('load', {\n bubbles: true,\n cancelable: true,\n });\n this.dispatchEvent(loadEvent);\n }\n\n /**\n * Dispatches an 'error' event on the component when the icon fetching has failed.\n * This event bubbles and is cancelable.\n * The error detail is set to the error object.\n */\n private handleIconLoadedFailure(error: unknown) {\n const errorEvent = new CustomEvent('error', {\n bubbles: true,\n cancelable: true,\n detail: { error },\n });\n this.dispatchEvent(errorEvent);\n }\n\n /**\n * Updates the size by setting the width and height\n */\n private updateSize() {\n if (this.computedIconSize && (this.lengthUnit || this.lengthUnitFromContext)) {\n const value = `${this.computedIconSize}${this.lengthUnit ?? this.lengthUnitFromContext}`;\n // set the computed icon size as a css variable to be used in the icon styles\n this.style.setProperty('--computed-icon-size', value);\n }\n }\n\n private get computedIconSize() {\n return this.size ?? this.sizeFromContext ?? DEFAULTS.SIZE;\n }\n\n override updated(changedProperties: Map<string, any>) {\n super.updated(changedProperties);\n\n if (changedProperties.has('name')) {\n // fetch icon data if name changes:\n this.getIconData().catch((err) => {\n if (err.name !== 'AbortError' && this.onerror) {\n this.onerror(err);\n }\n });\n }\n\n if (changedProperties.has('ariaLabel')) {\n this.role = this.ariaLabel ? 'img' : null;\n }\n\n if (changedProperties.has('size') || changedProperties.has('lengthUnit')) {\n this.updateSize();\n }\n\n if (this.lengthUnitFromContext !== this.iconProviderContext.value?.lengthUnit) {\n this.lengthUnitFromContext = this.iconProviderContext.value?.lengthUnit;\n this.updateSize();\n }\n\n if (this.sizeFromContext !== this.iconProviderContext.value?.size) {\n this.sizeFromContext = this.iconProviderContext.value?.size;\n this.updateSize();\n }\n }\n\n override render() {\n return html` ${this.iconData} `;\n }\n\n public static override styles: Array<CSSResult> = [...Component.styles, ...styles];\n}\n\nexport default Icon;\n", "import Icon from './icon.component';\nimport { TAG_NAME } from './icon.constants';\n\nIcon.register(TAG_NAME);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n ['mdc-icon']: Icon\n }\n}\n\nexport default Icon;\n", "import { css } from 'lit';\nimport { hostFitContentStyles } from '../../utils/styles';\n\nconst styles = [\n hostFitContentStyles,\n css`\n :host {\n --mdc-presence-active-background-color: var(--mds-color-theme-indicator-stable);\n --mdc-presence-away-background-color: var(--mds-color-theme-indicator-locked);\n --mdc-presence-away-calling-background-color: var(--mds-color-theme-indicator-locked);\n --mdc-presence-busy-background-color: var(--mds-color-theme-indicator-unstable);\n --mdc-presence-dnd-background-color: var(--mds-color-theme-indicator-attention);\n --mdc-presence-meeting-background-color: var(--mds-color-theme-indicator-unstable);\n --mdc-presence-on-call-background-color: var(--mds-color-theme-indicator-unstable);\n --mdc-presence-on-device-background-color: var(--mds-color-theme-indicator-locked);\n --mdc-presence-on-mobile-background-color: var(--mds-color-theme-indicator-locked);\n --mdc-presence-pause-background-color: var(--mds-color-theme-indicator-locked);\n --mdc-presence-pto-background-color: var(--mds-color-theme-indicator-locked);\n --mdc-presence-presenting-background-color: var(--mds-color-theme-indicator-attention);\n --mdc-presence-quiet-background-color: var(--mds-color-theme-indicator-locked);\n --mdc-presence-scheduled-background-color: var(--mds-color-theme-indicator-unstable);\n --mdc-presence-overlay-background-color: var(--mds-color-theme-background-solid-primary-normal);\n }\n\n .mdc-presence {\n border-radius: 50%;\n background-color: var(--mdc-presence-overlay-background-color);\n display: flex;\n justify-content: center;\n align-items: center;\n }\n .mdc-presence__xx_small,\n .mdc-presence__x_small,\n .mdc-presence__small {\n width: 1.0625rem;\n height: 1.0625rem;\n }\n .mdc-presence__midsize {\n width: 1.419375rem;\n height: 1.419375rem;\n }\n .mdc-presence__large {\n width: 1.596875rem;\n height: 1.596875rem;\n }\n .mdc-presence__x_large {\n width: 1.951875rem;\n height: 1.951875rem;\n }\n .mdc-presence__xx_large {\n width: 2.75rem;\n height: 2.75rem;\n }\n\n .mdc-presence-icon {\n border-radius: 50%;\n }\n .mdc-presence-icon__active {\n color: var(--mdc-presence-active-background-color);\n }\n .mdc-presence-icon__away {\n color: var(--mdc-presence-away-background-color);\n }\n .mdc-presence-icon__away-calling {\n color: var(--mdc-presence-away-calling-background-color);\n }\n .mdc-presence-icon__busy {\n color: var(--mdc-presence-busy-background-color);\n }\n .mdc-presence-icon__dnd {\n color: var(--mdc-presence-dnd-background-color);\n }\n .mdc-presence-icon__meeting {\n color: var(--mdc-presence-meeting-background-color);\n }\n .mdc-presence-icon__on-call {\n color: var(--mdc-presence-on-call-background-color);\n }\n .mdc-presence-icon__on-device {\n color: var(--mdc-presence-on-device-background-color);\n }\n .mdc-presence-icon__on-mobile {\n color: var(--mdc-presence-on-mobile-background-color);\n }\n .mdc-presence-icon__pause {\n color: var(--mdc-presence-pause-background-color);\n }\n .mdc-presence-icon__pto {\n color: var(--mdc-presence-pto-background-color);\n }\n .mdc-presence-icon__presenting {\n color: var(--mdc-presence-presenting-background-color);\n }\n .mdc-presence-icon__quiet {\n color: var(--mdc-presence-quiet-background-color);\n }\n .mdc-presence-icon__scheduled {\n color: var(--mdc-presence-scheduled-background-color);\n }\n `,\n];\n\nexport default styles;\n", "import { TYPE } from './presence.constants';\nimport type { PresenceType } from './presence.types';\n\nexport const getIconValue = (type: PresenceType) => {\n switch (type) {\n case TYPE.AWAY:\n return 'recents-presence-badge-filled';\n case TYPE.AWAY_CALLING:\n return 'away-calling-presence-filled';\n case TYPE.BUSY:\n return 'busy-presence-bold';\n case TYPE.DND:\n return 'dnd-presence-badge-filled';\n case TYPE.MEETING:\n return 'camera-filled';\n case TYPE.ON_CALL:\n return 'handset-filled';\n case TYPE.ON_DEVICE:\n return 'generic-device-video-badge-filled';\n case TYPE.ON_MOBILE:\n return 'phone-badge-filled';\n case TYPE.PAUSE:\n return 'pause-badge-filled';\n case TYPE.PTO:\n return 'pto-presence-filled';\n case TYPE.PRESENTING:\n return 'share-screen-badge-filled';\n case TYPE.QUIET:\n return 'quiet-hours-presence-filled';\n case TYPE.SCHEDULED:\n return 'meetings-presence-badge-filled';\n case TYPE.ACTIVE:\n default:\n return 'active-presence-small-filled';\n }\n};\n", "import { CSSResult, html } from 'lit';\nimport { property, state } from 'lit/decorators.js';\nimport { Component } from '../../models';\nimport { DEFAULTS, SIZE } from './presence.constants';\nimport styles from './presence.styles';\nimport type { PresenceType, PresenceSize } from './presence.types';\nimport { getIconValue } from './presence.utils';\n\n/**\n * The `mdc-presence` component is a versatile UI element used to\n * display the presence status of a user or entity within an avatar component.\n *\n * This component is ideal for use within avatar UIs where the presence status\n * needs to be visually represented.\n *\n * @dependency mdc-icon\n *\n * @tagname mdc-presence\n *\n * @cssproperty --mdc-presence-active-background-color - The background color of the presence type active.\n * @cssproperty --mdc-presence-away-background-color - The background color of the presence type away.\n * @cssproperty --mdc-presence-away-calling-background-color - The background color of the presence type away-calling.\n * @cssproperty --mdc-presence-busy-background-color - The background color of the presence type busy.\n * @cssproperty --mdc-presence-dnd-background-color - The background color of the presence type dnd.\n * @cssproperty --mdc-presence-meeting-background-color - The background color of the presence type meeting.\n * @cssproperty --mdc-presence-on-call-background-color - The background color of the presence type on-call.\n * @cssproperty --mdc-presence-on-device-background-color - The background color of the presence type on-device.\n * @cssproperty --mdc-presence-on-mobile-background-color - The background color of the presence type on-mobile.\n * @cssproperty --mdc-presence-pause-background-color - The background color of the presence type pause.\n * @cssproperty --mdc-presence-pto-background-color - The background color of the presence type pto.\n * @cssproperty --mdc-presence-presenting-background-color - The background color of the presence type presenting.\n * @cssproperty --mdc-presence-quiet-background-color - The background color of the presence type quiet.\n * @cssproperty --mdc-presence-scheduled-background-color - The background color of the presence type scheduled.\n * @cssproperty --mdc-presence-overlay-background-color - The background color of the presence type overlay.\n */\nclass Presence extends Component {\n /**\n * Supported presence types:\n * - `active`\n * - `away`\n * - `away-calling`\n * - `busy`\n * - `dnd`\n * - `meeting`\n * - `on-call`\n * - `on-device`\n * - `on-mobile`\n * - `pause`\n * - `pto`\n * - `presenting`\n * - `quiet`\n * - `scheduled`\n * @default active\n */\n @property({ type: String, reflect: true })\n type: PresenceType = DEFAULTS.TYPE;\n\n /**\n * Acceptable values include:\n * - XX_SMALL\n * - X_SMALL\n * - SMALL\n * - MIDSIZE\n * - LARGE\n * - X_LARGE\n * - XX_LARGE\n *\n * Presence icons are minimum 14px in size, meaning XX_Small, X_Small and Small presence\n * icons will be no smaller than 14px.\n * @default small\n */\n @property({ type: String, reflect: true })\n size: PresenceSize = DEFAULTS.SIZE;\n\n /**\n * @internal\n * State to track the current icon type (previous type until the new icon is loaded)\n */\n @state()\n private currentIconType: PresenceType = DEFAULTS.TYPE;\n\n /**\n * Get the size of the presence icon based on the given size type\n */\n private get iconSize() {\n switch (this.size) {\n case SIZE.MIDSIZE:\n return 1.16125;\n case SIZE.LARGE:\n return 1.30625;\n case SIZE.X_LARGE:\n return 1.596875;\n case SIZE.XX_LARGE:\n return 2.25;\n case SIZE.XX_SMALL:\n case SIZE.X_SMALL:\n case SIZE.SMALL:\n default:\n this.size = DEFAULTS.SIZE;\n return 0.875;\n }\n }\n\n /**\n * Get the icon name based on the presence type\n */\n private get icon() {\n const iconName = getIconValue(this.type);\n if (iconName === 'active-presence-small-filled') {\n this.type = DEFAULTS.TYPE;\n }\n return iconName;\n }\n\n /**\n * Handles the successful load of an icon.\n * Sets the `currentIconType` property to match the `type` property.\n */\n private handleOnLoad(): void {\n this.currentIconType = this.type;\n }\n\n /**\n * Handles an error that occurs when loading an icon.\n */\n private handleOnError(): void {\n if (this.onerror) {\n this.onerror('There was a problem while fetching the icon. Please check the icon name and try again.');\n }\n }\n\n public override render() {\n return html`\n <div class=\"mdc-presence mdc-presence__${this.size}\">\n <mdc-icon\n class=\"mdc-presence-icon mdc-presence-icon__${this.currentIconType}\"\n name=\"${this.icon}\"\n size=\"${this.iconSize}\"\n @load=\"${this.handleOnLoad}\"\n @error=\"${this.handleOnError}\"\n ></mdc-icon>\n </div>\n `;\n }\n\n public static override styles: Array<CSSResult> = [...Component.styles, ...styles];\n}\n\nexport default Presence;\n", "import Presence from './presence.component';\nimport { TAG_NAME } from './presence.constants';\nimport '../icon';\n\nPresence.register(TAG_NAME);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n ['mdc-presence']: Presence\n }\n}\n\nexport default Presence;\n", "import { css } from 'lit';\n\nexport const fontsStyles = css`\n :host::part(text) {\n font-size: unset;\n font-weight: unset;\n line-height: unset;\n text-decoration: unset;\n text-transform: unset;\n white-space: inherit;\n overflow: inherit;\n text-overflow: inherit;\n }\n\n :host([type=\"headline-small-regular\"]) {\n font-size: var(--mds-font-apps-headline-small-regular-font-size);\n font-weight: var(--mds-font-apps-headline-small-regular-font-weight);\n line-height: var(--mds-font-apps-headline-small-regular-line-height);\n text-decoration: var(--mds-font-apps-headline-small-regular-text-decoration);\n text-transform: var(--mds-font-apps-headline-small-regular-text-case);\n }\n\n :host([type=\"headline-small-light\"]) {\n font-size: var(--mds-font-apps-headline-small-light-font-size);\n font-weight: var(--mds-font-apps-headline-small-light-font-weight);\n line-height: var(--mds-font-apps-headline-small-light-line-height);\n text-decoration: var(--mds-font-apps-headline-small-light-text-decoration);\n text-transform: var(--mds-font-apps-headline-small-light-text-case);\n }\n\n :host([type=\"heading-xlarge-bold\"]) {\n font-size: var(--mds-font-apps-heading-xlarge-bold-font-size);\n font-weight: var(--mds-font-apps-heading-xlarge-bold-font-weight);\n line-height: var(--mds-font-apps-heading-xlarge-bold-line-height);\n text-decoration: var(--mds-font-apps-heading-xlarge-bold-text-decoration);\n text-transform: var(--mds-font-apps-heading-xlarge-bold-text-case);\n }\n \n :host([type=\"heading-xlarge-medium\"]) {\n font-size: var(--mds-font-apps-heading-xlarge-medium-font-size);\n font-weight: var(--mds-font-apps-heading-xlarge-medium-font-weight);\n line-height: var(--mds-font-apps-heading-xlarge-medium-line-height);\n text-decoration: var(--mds-font-apps-heading-xlarge-medium-text-decoration);\n text-transform: var(--mds-font-apps-heading-xlarge-medium-text-case);\n }\n \n :host([type=\"heading-xlarge-regular\"]) {\n font-size: var(--mds-font-apps-heading-xlarge-regular-font-size);\n font-weight: var(--mds-font-apps-heading-xlarge-regular-font-weight);\n line-height: var(--mds-font-apps-heading-xlarge-regular-line-height);\n text-decoration: var(--mds-font-apps-heading-xlarge-regular-text-decoration);\n text-transform: var(--mds-font-apps-heading-xlarge-regular-text-case);\n }\n\n :host([type=\"heading-large-bold\"]) {\n font-size: var(--mds-font-apps-heading-large-bold-font-size);\n font-weight: var(--mds-font-apps-heading-large-bold-font-weight);\n line-height: var(--mds-font-apps-heading-large-bold-line-height);\n text-decoration: var(--mds-font-apps-heading-large-bold-text-decoration);\n text-transform: var(--mds-font-apps-heading-large-bold-text-case);\n }\n \n :host([type=\"heading-large-medium\"]) {\n font-size: var(--mds-font-apps-heading-large-medium-font-size);\n font-weight: var(--mds-font-apps-heading-large-medium-font-weight);\n line-height: var(--mds-font-apps-heading-large-medium-line-height);\n text-decoration: var(--mds-font-apps-heading-large-medium-text-decoration);\n text-transform: var(--mds-font-apps-heading-large-medium-text-case);\n }\n \n :host([type=\"heading-large-regular\"]) {\n font-size: var(--mds-font-apps-heading-large-regular-font-size);\n font-weight: var(--mds-font-apps-heading-large-regular-font-weight);\n line-height: var(--mds-font-apps-heading-large-regular-line-height);\n text-decoration: var(--mds-font-apps-heading-large-regular-text-decoration);\n text-transform: var(--mds-font-apps-heading-large-regular-text-case);\n }\n\n :host([type=\"heading-midsize-bold\"]) {\n font-size: var(--mds-font-apps-heading-midsize-bold-font-size);\n font-weight: var(--mds-font-apps-heading-midsize-bold-font-weight);\n line-height: var(--mds-font-apps-heading-midsize-bold-line-height);\n text-decoration: var(--mds-font-apps-heading-midsize-bold-text-decoration);\n text-transform: var(--mds-font-apps-heading-midsize-bold-text-case);\n }\n \n :host([type=\"heading-midsize-medium\"]) {\n font-size: var(--mds-font-apps-heading-midsize-medium-font-size);\n font-weight: var(--mds-font-apps-heading-midsize-medium-font-weight);\n line-height: var(--mds-font-apps-heading-midsize-medium-line-height);\n text-decoration: var(--mds-font-apps-heading-midsize-medium-text-decoration);\n text-transform: var(--mds-font-apps-heading-midsize-medium-text-case);\n }\n \n :host([type=\"heading-midsize-regular\"]) {\n font-size: var(--mds-font-apps-heading-midsize-regular-font-size);\n font-weight: var(--mds-font-apps-heading-midsize-regular-font-weight);\n line-height: var(--mds-font-apps-heading-midsize-regular-line-height);\n text-decoration: var(--mds-font-apps-heading-midsize-regular-text-decoration);\n text-transform: var(--mds-font-apps-heading-midsize-regular-text-case);\n }\n\n :host([type=\"heading-small-bold\"]) {\n font-size: var(--mds-font-apps-heading-small-bold-font-size);\n font-weight: var(--mds-font-apps-heading-small-bold-font-weight);\n line-height: var(--mds-font-apps-heading-small-bold-line-height);\n text-decoration: var(--mds-font-apps-heading-small-bold-text-decoration);\n text-transform: var(--mds-font-apps-heading-small-bold-text-case);\n }\n \n :host([type=\"heading-small-medium\"]) {\n font-size: var(--mds-font-apps-heading-small-medium-font-size);\n font-weight: var(--mds-font-apps-heading-small-medium-font-weight);\n line-height: var(--mds-font-apps-heading-small-medium-line-height);\n text-decoration: var(--mds-font-apps-heading-small-medium-text-decoration);\n text-transform: var(--mds-font-apps-heading-small-medium-text-case);\n }\n \n :host([type=\"heading-small-regular\"]) {\n font-size: var(--mds-font-apps-heading-small-regular-font-size);\n font-weight: var(--mds-font-apps-heading-small-regular-font-weight);\n line-height: var(--mds-font-apps-heading-small-regular-line-height);\n text-decoration: var(--mds-font-apps-heading-small-regular-text-decoration);\n text-transform: var(--mds-font-apps-heading-small-regular-text-case);\n }\n\n :host([type=\"body-large-bold\"]) {\n font-size: var(--mds-font-apps-body-large-bold-font-size);\n font-weight: var(--mds-font-apps-body-large-bold-font-weight);\n line-height: var(--mds-font-apps-body-large-bold-line-height);\n text-decoration: var(--mds-font-apps-body-large-bold-text-decoration);\n text-transform: var(--mds-font-apps-body-large-bold-text-case);\n }\n \n :host([type=\"body-large-medium-underline\"]) {\n font-size: var(--mds-font-apps-body-large-medium-underline-font-size);\n font-weight: var(--mds-font-apps-body-large-medium-underline-font-weight);\n line-height: var(--mds-font-apps-body-large-medium-underline-line-height);\n text-decoration: var(--mds-font-apps-body-large-medium-underline-text-decoration);\n text-transform: var(--mds-font-apps-body-large-medium-underline-text-case);\n }\n \n :host([type=\"body-large-medium\"]) {\n font-size: var(--mds-font-apps-body-large-medium-font-size);\n font-weight: var(--mds-font-apps-body-large-medium-font-weight);\n line-height: var(--mds-font-apps-body-large-medium-line-height);\n text-decoration: var(--mds-font-apps-body-large-medium-text-decoration);\n text-transform: var(--mds-font-apps-body-large-medium-text-case);\n }\n \n :host([type=\"body-large-regular-underline\"]) {\n font-size: var(--mds-font-apps-body-large-regular-underline-font-size);\n font-weight: var(--mds-font-apps-body-large-regular-underline-font-weight);\n line-height: var(--mds-font-apps-body-large-regular-underline-line-height);\n text-decoration: var(--mds-font-apps-body-large-regular-underline-text-decoration);\n text-transform: var(--mds-font-apps-body-large-regular-underline-text-case);\n }\n \n :host([type=\"body-large-regular\"]) {\n font-size: var(--mds-font-apps-body-large-regular-font-size);\n font-weight: var(--mds-font-apps-body-large-regular-font-weight);\n line-height: var(--mds-font-apps-body-large-regular-line-height);\n text-decoration: var(--mds-font-apps-body-large-regular-text-decoration);\n text-transform: var(--mds-font-apps-body-large-regular-text-case);\n }\n\n :host([type=\"body-midsize-bold\"]) {\n font-size: var(--mds-font-apps-body-midsize-bold-font-size);\n font-weight: var(--mds-font-apps-body-midsize-bold-font-weight);\n line-height: var(--mds-font-apps-body-midsize-bold-line-height);\n text-decoration: var(--mds-font-apps-body-midsize-bold-text-decoration);\n text-transform: var(--mds-font-apps-body-midsize-bold-text-case);\n }\n \n :host([type=\"body-midsize-medium-underline\"]) {\n font-size: var(--mds-font-apps-body-midsize-medium-underline-font-size);\n font-weight: var(--mds-font-apps-body-midsize-medium-underline-font-weight);\n line-height: var(--mds-font-apps-body-midsize-medium-underline-line-height);\n text-decoration: var(--mds-font-apps-body-midsize-medium-underline-text-decoration);\n text-transform: var(--mds-font-apps-body-midsize-medium-underline-text-case);\n }\n \n :host([type=\"body-midsize-medium\"]) {\n font-size: var(--mds-font-apps-body-midsize-medium-font-size);\n font-weight: var(--mds-font-apps-body-midsize-medium-font-weight);\n line-height: var(--mds-font-apps-body-midsize-medium-line-height);\n text-decoration: var(--mds-font-apps-body-midsize-medium-text-decoration);\n text-transform: var(--mds-font-apps-body-midsize-medium-text-case);\n }\n \n :host([type=\"body-midsize-regular-underline\"]) {\n font-size: var(--mds-font-apps-body-midsize-regular-underline-font-size);\n font-weight: var(--mds-font-apps-body-midsize-regular-underline-font-weight);\n line-height: var(--mds-font-apps-body-midsize-regular-underline-line-height);\n text-decoration: var(--mds-font-apps-body-midsize-regular-underline-text-decoration);\n text-transform: var(--mds-font-apps-body-midsize-regular-underline-text-case);\n }\n \n :host([type=\"body-midsize-regular\"]) {\n font-size: var(--mds-font-apps-body-midsize-regular-font-size);\n font-weight: var(--mds-font-apps-body-midsize-regular-font-weight);\n line-height: var(--mds-font-apps-body-midsize-regular-line-height);\n text-decoration: var(--mds-font-apps-body-midsize-regular-text-decoration);\n text-transform: var(--mds-font-apps-body-midsize-regular-text-case);\n }\n\n :host([type=\"body-small-bold\"]) {\n font-size: var(--mds-font-apps-body-small-bold-font-size);\n font-weight: var(--mds-font-apps-body-small-bold-font-weight);\n line-height: var(--mds-font-apps-body-small-bold-line-height);\n text-decoration: var(--mds-font-apps-body-small-bold-text-decoration);\n text-transform: var(--mds-font-apps-body-small-bold-text-case);\n }\n \n :host([type=\"body-small-medium-underline\"]) {\n font-size: var(--mds-font-apps-body-small-medium-underline-font-size);\n font-weight: var(--mds-font-apps-body-small-medium-underline-font-weight);\n line-height: var(--mds-font-apps-body-small-medium-underline-line-height);\n text-decoration: var(--mds-font-apps-body-small-medium-underline-text-decoration);\n text-transform: var(--mds-font-apps-body-small-medium-underline-text-case);\n }\n \n :host([type=\"body-small-medium\"]) {\n font-size: var(--mds-font-apps-body-small-medium-font-size);\n font-weight: var(--mds-font-apps-body-small-medium-font-weight);\n line-height: var(--mds-font-apps-body-small-medium-line-height);\n text-decoration: var(--mds-font-apps-body-small-medium-text-decoration);\n text-transform: var(--mds-font-apps-body-small-medium-text-case);\n }\n \n :host([type=\"body-small-regular-underline\"]) {\n font-size: var(--mds-font-apps-body-small-regular-underline-font-size);\n font-weight: var(--mds-font-apps-body-small-regular-underline-font-weight);\n line-height: var(--mds-font-apps-body-small-regular-underline-line-height);\n text-decoration: var(--mds-font-apps-body-small-regular-underline-text-decoration);\n text-transform: var(--mds-font-apps-body-small-regular-underline-text-case);\n }\n \n :host([type=\"body-small-regular\"]) {\n font-size: var(--mds-font-apps-body-small-regular-font-size);\n font-weight: var(--mds-font-apps-body-small-regular-font-weight);\n line-height: var(--mds-font-apps-body-small-regular-line-height);\n text-decoration: var(--mds-font-apps-body-small-regular-text-decoration);\n text-transform: var(--mds-font-apps-body-small-regular-text-case);\n }\n`;\n", "import { css } from 'lit';\nimport { fontsStyles } from './fonts.styles';\n\nconst styles = [\n css`\n :host {\n --mdc-text-font-family: var(--mdc-themeprovider-font-family);\n\n display: block;\n font-family: var(--mdc-text-font-family);\n }\n `,\n // type specific font styles:\n fontsStyles,\n];\n\nexport default styles;\n", "import { CSSResult, html } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport styles from './text.styles';\nimport { Component } from '../../models';\nimport { DEFAULTS, VALID_TEXT_TAGS } from './text.constants';\nimport type { TextType, TagName } from './text.types';\n\n/**\n * Text component for creating styled text elements.\n * It has to be mounted within the ThemeProvider to access color and font tokens.\n *\n * The `type` attribute allows changing the text style.\n * The `tagname` attribute allows changing the tag name of the text element.\n * The default tag name is `p`.\n *\n * The `tagname` attribute should be a valid HTML tag name.\n * If the `tagname` attribute is not a valid HTML tag name, the default tag name will be used.\n *\n * The styling is applied based on the `type` attribute.\n *\n * @tagname mdc-text\n * @slot - Default slot for text content\n *\n * @csspart text - The text element\n */\nclass Text extends Component {\n /**\n * Specifies the text style to be applied.\n *\n * Acceptable values include:\n *\n * - 'body-small-regular'\n * - 'body-small-medium'\n * - 'body-small-bold'\n * - 'body-midsize-regular'\n * - 'body-midsize-medium'\n * - 'body-midsize-bold'\n * - 'body-large-regular'\n * - 'body-large-medium'\n * - 'body-large-bold'\n * - 'body-small-regular-underline'\n * - 'body-small-medium-underline'\n * - 'body-midsize-regular-underline'\n * - 'body-midsize-medium-underline'\n * - 'body-large-regular-underline'\n * - 'body-large-medium-underline'\n * - 'heading-small-regular'\n * - 'heading-small-medium'\n * - 'heading-small-bold'\n * - 'heading-midsize-regular'\n * - 'heading-midsize-medium'\n * - 'heading-midsize-bold'\n * - 'heading-large-regular'\n * - 'heading-large-medium'\n * - 'heading-large-bold'\n * - 'heading-xlarge-regular'\n * - 'heading-xlarge-medium'\n * - 'heading-xlarge-bold'\n * - 'headline-small-light'\n * - 'headline-small-regular'\n * @default body-large-regular\n */\n @property({ attribute: 'type', reflect: true, type: String })\n public type: TextType = DEFAULTS.TYPE;\n\n /**\n * Specifies the HTML tag name for the text element. The default tag name is `p`.\n * This attribute is optional. When set, it changes the tag name of the text element.\n *\n * Acceptable values include:\n *\n * - 'h1'\n * - 'h2'\n * - 'h3'\n * - 'h4'\n * - 'h5'\n * - 'h6'\n * - 'p'\n * - 'small'\n * - 'span'\n * - 'div'\n *\n * For instance, setting this attribute to `h2` will render the text element as an `h2` element.\n * Note that the styling is determined by the `type` attribute.\n */\n @property({ attribute: 'tagname', reflect: true, type: String })\n public tagname?: TagName = DEFAULTS.TEXT_ELEMENT_TAGNAME;\n\n public override render() {\n // Lit does not support dynamically changing values for the tag name of a custom element.\n // Read more: https://lit.dev/docs/templates/expressions/#invalid-locations\n switch (this.tagname) {\n case VALID_TEXT_TAGS.H1: return html`<h1 part=${DEFAULTS.CSS_PART_TEXT}><slot></slot></h1>`;\n case VALID_TEXT_TAGS.H2: return html`<h2 part=${DEFAULTS.CSS_PART_TEXT}><slot></slot></h2>`;\n case VALID_TEXT_TAGS.H3: return html`<h3 part=${DEFAULTS.CSS_PART_TEXT}><slot></slot></h3>`;\n case VALID_TEXT_TAGS.H4: return html`<h4 part=${DEFAULTS.CSS_PART_TEXT}><slot></slot></h4>`;\n case VALID_TEXT_TAGS.H5: return html`<h5 part=${DEFAULTS.CSS_PART_TEXT}><slot></slot></h5>`;\n case VALID_TEXT_TAGS.H6: return html`<h6 part=${DEFAULTS.CSS_PART_TEXT}><slot></slot></h6>`;\n case VALID_TEXT_TAGS.DIV: return html`<div part=${DEFAULTS.CSS_PART_TEXT}><slot></slot></div>`;\n case VALID_TEXT_TAGS.SPAN: return html`<span part=${DEFAULTS.CSS_PART_TEXT}><slot></slot></span>`;\n case VALID_TEXT_TAGS.SMALL: return html`<small part=${DEFAULTS.CSS_PART_TEXT}><slot></slot></small>`;\n case VALID_TEXT_TAGS.P:\n default: return html`<p part=${DEFAULTS.CSS_PART_TEXT}><slot></slot></p>`;\n }\n }\n\n public static override styles: Array<CSSResult> = [...Component.styles, ...styles];\n}\n\nexport default Text;\n", "import Text from './text.component';\nimport { TAG_NAME } from './text.constants';\n\nText.register(TAG_NAME);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n ['mdc-text']: Text\n }\n}\n\nexport default Text;\n", "import Avatar from './avatar.component';\nimport { TAG_NAME } from './avatar.constants';\nimport '../icon';\nimport '../presence';\nimport '../text';\n\nAvatar.register(TAG_NAME);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n ['mdc-avatar']: Avatar\n }\n}\n\nexport default Avatar;\n", "import utils from '../../utils/tag-name';\n\nconst TAG_NAME = utils.constructTagName('buttonsimple');\n\nconst BUTTON_SIZES = {\n 20: 20,\n 24: 24,\n 28: 28,\n 32: 32,\n 40: 40,\n 48: 48,\n 52: 52,\n 64: 64,\n 72: 72,\n 88: 88,\n 124: 124,\n} as const;\n\nconst BUTTON_TYPE = {\n BUTTON: 'button',\n SUBMIT: 'submit',\n RESET: 'reset',\n} as const;\n\nconst DEFAULTS = {\n SIZE: BUTTON_SIZES[32],\n TYPE: BUTTON_TYPE.BUTTON,\n ROLE: 'button',\n};\n\nexport {\n TAG_NAME,\n DEFAULTS,\n BUTTON_TYPE,\n BUTTON_SIZES,\n};\n", "import utils from '../../utils/tag-name';\nimport { BUTTON_TYPE } from '../buttonsimple/buttonsimple.constants';\n\nconst TAG_NAME = utils.constructTagName('button');\n\nconst BUTTON_VARIANTS = {\n PRIMARY: 'primary',\n SECONDARY: 'secondary',\n TERTIARY: 'tertiary',\n} as const;\n\nconst PILL_BUTTON_SIZES = {\n 40: 40,\n 32: 32,\n 28: 28,\n 24: 24,\n} as const;\n\nconst ICON_BUTTON_SIZES = {\n 64: 64,\n 52: 52,\n 20: 20,\n ...PILL_BUTTON_SIZES,\n} as const;\n\nconst BUTTON_COLORS = {\n POSITIVE: 'positive',\n NEGATIVE: 'negative',\n ACCENT: 'accent',\n PROMOTIONAL: 'promotional',\n DEFAULT: 'default',\n} as const;\n\nconst BUTTON_TYPE_INTERNAL = {\n PILL: 'pill',\n ICON: 'icon',\n PILL_WITH_ICON: 'pill-with-icon',\n} as const;\n\nconst DEFAULTS = {\n VARIANT: BUTTON_VARIANTS.PRIMARY,\n SIZE: PILL_BUTTON_SIZES[32],\n COLOR: BUTTON_COLORS.DEFAULT,\n TYPE_INTERNAL: BUTTON_TYPE_INTERNAL.ICON,\n TYPE: BUTTON_TYPE.BUTTON,\n};\n\nexport {\n TAG_NAME,\n DEFAULTS,\n BUTTON_VARIANTS,\n PILL_BUTTON_SIZES,\n ICON_BUTTON_SIZES,\n BUTTON_COLORS,\n BUTTON_TYPE_INTERNAL,\n BUTTON_TYPE,\n};\n", "import { LitElement } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport type { Constructor } from './index.types';\n\nexport interface DisabledMixinInterface {\n disabled: boolean;\n}\n\nexport const DisabledMixin = <T extends Constructor<LitElement>>(\n superClass: T,\n) => {\n class InnerMixinClass extends superClass {\n /**\n * Indicates whether the component is disabled.\n * When the component is disabled for user interaction; it is not focusable or clickable.\n * @default false\n */\n @property({ reflect: true, type: Boolean }) disabled = false;\n }\n // Cast return type to your mixin's interface intersected with the superClass type\n return InnerMixinClass as Constructor<DisabledMixinInterface> & T;\n};\n", "import { LitElement } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport type { Constructor } from './index.types';\n\nexport interface TabIndexMixinInterface {\n tabIndex: number;\n}\n\nexport const TabIndexMixin = <T extends Constructor<LitElement>>(\n superClass: T,\n) => {\n class InnerMixinClass extends superClass {\n /**\n * This property specifies the tab order of the element.\n * @default 0\n */\n @property({ reflect: true, type: Number }) override tabIndex = 0;\n }\n // Cast return type to your mixin's interface intersected with the superClass type\n return InnerMixinClass as Constructor<TabIndexMixinInterface> & T;\n};\n", "import { css } from 'lit';\nimport { hostFitContentStyles, hostFocusRingStyles } from '../../utils/styles';\n\nconst styles = [hostFitContentStyles, css`\n :host {\n border: 0.0625rem solid transparent;\n cursor: pointer;\n \n background-color: var(--mds-color-theme-text-primary-normal); \n color: var(--mds-color-theme-inverted-text-secondary-normal);\n font-size: var(--mds-font-apps-body-midsize-regular-font-size);\n outline: none;\n\n --mdc-button-height-size-124: 7.75rem;\n --mdc-button-height-size-88: 5.5rem;\n --mdc-button-height-size-72: 4.5rem;\n --mdc-button-height-size-64: 4rem;\n --mdc-button-height-size-52: 3.25rem;\n --mdc-button-height-size-40: 2.5rem;\n --mdc-button-height-size-32: 2rem;\n --mdc-button-height-size-28: 1.75rem;\n --mdc-button-height-size-24: 1.5rem;\n --mdc-button-height-size-20: 1.25rem;\n }\n \n :host([disabled]), :host([soft-disabled]){\n background-color: var(--mds-color-theme-text-primary-disabled);\n }\n :host([size=\"124\"]){\n height: var(--mdc-button-height-size-124);\n }\n :host([size=\"88\"]){\n height: var(--mdc-button-height-size-88);\n }\n :host([size=\"72\"]){\n height: var(--mdc-button-height-size-72);\n }\n :host([size=\"64\"]){\n height: var(--mdc-button-height-size-64);\n }\n :host([size=\"52\"]){\n height: var(--mdc-button-height-size-52);\n }\n :host([size=\"40\"]){\n height: var(--mdc-button-height-size-40);\n }\n :host([size=\"32\"]){\n height: var(--mdc-button-height-size-32);\n }\n :host([size=\"28\"]){\n height: var(--mdc-button-height-size-28);\n font-size: var(--mds-font-size-body-midsize);\n }\n :host([size=\"24\"]){\n height: var(--mdc-button-height-size-24);\n }\n :host([size=\"20\"]){\n height: var(--mdc-button-height-size-20);\n }\n`, ...hostFocusRingStyles()];\n\nexport default styles;\n", "import type { PropertyValues } from 'lit';\nimport { CSSResult, html } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport { Component } from '../../models';\nimport { DisabledMixin } from '../../utils/mixins/DisabledMixin';\nimport { TabIndexMixin } from '../../utils/mixins/TabIndexMixin';\nimport { BUTTON_TYPE, DEFAULTS } from './buttonsimple.constants';\nimport styles from './buttonsimple.styles';\nimport type { ButtonSize, ButtonType } from './buttonsimple.types';\n\n/**\n * `mdc-buttonsimple` is a component that can be configured in various ways to suit different use cases.\n * It is used as an internal component and is not intended to be used directly by consumers.\n * Consumers should use the `mdc-button` component instead.\n *\n * @event click - (React: onClick) This event is dispatched when the button is clicked.\n * @event keydown - (React: onKeyDown) This event is dispatched when a key is pressed down on the button.\n * @event keyup - (React: onKeyUp) This event is dispatched when a key is released on the button.\n * @event focus - (React: onFocus) This event is dispatched when the button receives focus.\n *\n * @tagname mdc-buttonsimple\n */\nclass Buttonsimple extends TabIndexMixin(DisabledMixin(Component)) {\n /**\n * The button's active state indicates whether it is currently toggled on (active) or off (inactive).\n * When the active state is true, the button is considered to be in an active state, meaning it is toggled on.\n * Conversely, when the active state is false, the button is in an inactive state, indicating it is toggled off.\n * @default false\n */\n @property({ type: Boolean, reflect: true }) active = false;\n\n /**\n * Indicates whether the button is soft disabled.\n * When set to `true`, the button appears visually disabled but still allows\n * focus, click, and keyboard actions to be passed through.\n *\n * **Important:** When using soft disabled, consumers must ensure that\n * the button behaves like a disabled button, allowing only focus and\n * preventing any interactions (clicks or keyboard actions) from triggering unintended actions.\n * @default false\n */\n @property({ type: Boolean, attribute: 'soft-disabled' }) softDisabled = false;\n\n /**\n * Simplebutton size is a super set of all the sizes supported by children components.\n * @default 32\n */\n @property({ type: Number, reflect: true }) size: ButtonSize = DEFAULTS.SIZE;\n\n /**\n * This property defines the ARIA role for the element. By default, it is set to 'button'.\n * Consumers should override this role when:\n * - The element is being used in a context where a different role is more appropriate.\n * - Custom behaviors are implemented that require a specific ARIA role for accessibility purposes.\n * @default button\n */\n @property({ type: String, reflect: true }) override role = DEFAULTS.ROLE;\n\n /**\n * This property defines the type attribute for the button element.\n * The type attribute specifies the behavior of the button when it is clicked.\n * - **submit**: The button submits the form data to the server.\n * - **reset**: The button resets the form data to its initial state.\n * - **button**: The button does nothing when clicked.\n * @default button\n */\n @property({ reflect: true })\n type: ButtonType = DEFAULTS.TYPE;\n\n /**\n * @internal\n */\n private prevTabindex = 0;\n\n /** @internal */\n static formAssociated = true;\n\n /** @internal */\n private internals: ElementInternals;\n\n /** @internal */\n get form(): HTMLFormElement | null {\n return this.internals.form;\n }\n\n constructor() {\n super();\n /** @internal */\n this.internals = this.attachInternals();\n this.addEventListener('click', this.executeAction.bind(this));\n this.addEventListener('keydown', this.handleKeyDown.bind(this));\n this.addEventListener('keyup', this.handleKeyUp.bind(this));\n this.addEventListener('blur', this.handleBlur.bind(this));\n }\n\n public override update(changedProperties: PropertyValues): void {\n super.update(changedProperties);\n\n if (changedProperties.has('disabled')) {\n this.setDisabled(this, this.disabled);\n }\n if (changedProperties.has('softDisabled')) {\n this.setSoftDisabled(this, this.softDisabled);\n }\n if (changedProperties.has('active')) {\n this.setActive(this, this.active);\n }\n }\n\n protected executeAction() {\n if (this.type === BUTTON_TYPE.SUBMIT && this.form) {\n this.form.requestSubmit();\n }\n\n if (this.type === BUTTON_TYPE.RESET && this.form) {\n this.form.reset();\n }\n }\n\n /**\n * Sets the aria-pressed attribute based on the active state of the button.\n * @param element - The button element\n * @param active - The active state of the element\n */\n protected setActive(element: HTMLElement, active: boolean) {\n if (active) {\n element.setAttribute('aria-pressed', 'true');\n } else {\n element.removeAttribute('aria-pressed');\n }\n }\n\n /**\n * Sets the soft-disabled attribute for the button.\n * When soft-disabled, the button looks to be disabled but remains focusable and clickable.\n * Also sets/removes aria-disabled attribute.\n *\n * @param element - The button element.\n * @param softDisabled - The soft-disabled state.\n */\n private setSoftDisabled(element: HTMLElement, softDisabled: boolean) {\n if (softDisabled) {\n element.setAttribute('aria-disabled', 'true');\n } else {\n element.removeAttribute('aria-disabled');\n }\n }\n\n /**\n * Sets the disabled attribute for the button.\n * When disabled, the button is not focusable or clickable, and tabindex is set to -1.\n * The previous tabindex is stored and restored when enabled.\n * Also sets/removes aria-disabled attribute.\n *\n * @param element - The button element.\n * @param disabled - The disabled state.\n */\n private setDisabled(element: HTMLElement, disabled: boolean) {\n if (disabled) {\n element.setAttribute('aria-disabled', 'true');\n this.prevTabindex = this.tabIndex;\n this.tabIndex = -1;\n } else {\n if (this.tabIndex === -1) {\n this.tabIndex = this.prevTabindex;\n }\n element.removeAttribute('aria-disabled');\n }\n }\n\n private triggerClickEvent() {\n const clickEvent = new MouseEvent('click', {\n bubbles: true,\n cancelable: true,\n view: window,\n });\n this.dispatchEvent(clickEvent);\n }\n\n /**\n * In case the button is pressed and the focus is lost while pressing,\n * the pressed class is removed.\n */\n private handleBlur() {\n if (this.classList.contains('pressed')) {\n this.classList.remove('pressed');\n }\n }\n\n /**\n * Handles the keydown event on the button.\n * If the key is 'Enter' or 'Space', the button is pressed.\n * If the key is 'Enter', the button is pressed. The native HTML button works in the same way.\n *\n * @param event - The keyboard event.\n */\n private handleKeyDown(event: KeyboardEvent) {\n if (['Enter', ' '].includes(event.key)) {\n this.classList.add('pressed');\n if (event.key === 'Enter') {\n this.triggerClickEvent();\n }\n }\n }\n\n /**\n * Handles the keyup event on the button.\n * If the key is 'Enter' or 'Space', the button is clicked.\n * If the key is 'Space', the button is pressed. The native HTML button works in the same way.\n *\n * @param event - The keyboard event.\n */\n private handleKeyUp(event: KeyboardEvent) {\n if (['Enter', ' '].includes(event.key)) {\n this.classList.remove('pressed');\n if (event.key === ' ') {\n this.triggerClickEvent();\n }\n }\n }\n\n public override render() {\n return html`\n <slot></slot>\n `;\n }\n\n public static override styles: Array<CSSResult> = [...Component.styles, ...styles];\n}\n\nexport default Buttonsimple;\n", "import { css } from 'lit';\nimport { hostFitContentStyles, hostFocusRingStyles } from '../../utils/styles';\n\nconst styles = [hostFitContentStyles, css`\n :host {\n padding: unset;\n margin: unset;\n outline: none;\n border-radius: 0.25rem;\n }\n`, ...hostFocusRingStyles()];\n\nexport default styles;\n", "import type { PropertyValues } from 'lit';\nimport { CSSResult, html } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport { AvatarComponentMixin } from '../../utils/mixins/AvatarComponentMixin';\nimport { IconNameMixin } from '../../utils/mixins/IconNameMixin';\nimport { AVATAR_SIZE, DEFAULTS } from '../avatar/avatar.constants';\nimport type { AvatarSize } from '../avatar/avatar.types';\nimport { DEFAULTS as BUTTON_DEFAULTS } from '../button/button.constants';\nimport Buttonsimple from '../buttonsimple/buttonsimple.component';\nimport styles from './avatarbutton.styles';\n\n/**\n * The `mdc-avatarbutton` component is an interactable version of the `mdc-avatar` component.\n *\n * This component is made by extending `buttonsimple` class.\n * The button component acts as a wrapper for the avatar component.\n *\n * @dependency mdc-avatar\n *\n * @event click - (React: onClick) This event is dispatched when the avatarbutton is clicked.\n * @event keydown - (React: onKeyDown) This event is dispatched when a key is pressed down on the avatarbutton.\n * @event keyup - (React: onKeyUp) This event is dispatched when a key is released on the avatarbutton.\n * @event focus - (React: onFocus) This event is dispatched when the avatarbutton receives focus.\n *\n * @tagname mdc-avatarbutton\n */\nclass AvatarButton extends AvatarComponentMixin(IconNameMixin(Buttonsimple)) {\n /**\n * Aria-label attribute to be set for accessibility\n */\n @property({ type: String, attribute: 'aria-label' })\n override ariaLabel: string | null = null;\n\n constructor() {\n super();\n\n this.active = undefined as unknown as boolean;\n this.disabled = undefined as unknown as boolean;\n this.softDisabled = undefined as unknown as boolean;\n this.role = 'button';\n this.type = BUTTON_DEFAULTS.TYPE;\n }\n\n override update(changedProperties: PropertyValues): void {\n super.update(changedProperties);\n if (changedProperties.has('size')) {\n this.setSize(this.size);\n }\n }\n\n private setSize(size: AvatarSize) {\n this.setAttribute('size', Object.values(AVATAR_SIZE).includes(size) ? `${size}` : DEFAULTS.SIZE.toString());\n }\n\n public override render() {\n return html`\n <mdc-avatar\n slot=\"prefixIcon\"\n ?is-typing=\"${this.isTyping}\"\n counter=\"${ifDefined(this.counter)}\"\n icon-name=\"${ifDefined(this.iconName)}\"\n initials=\"${ifDefined(this.initials)}\"\n presence=\"${ifDefined(this.presence)}\"\n size=\"${ifDefined(this.size)}\"\n src=\"${ifDefined(this.src)}\"\n ></mdc-avatar>\n `;\n }\n\n public static override styles: Array<CSSResult> = [...styles];\n}\n\nexport default AvatarButton;\n", "import utils from '../../utils/tag-name';\n\nconst TAG_NAME = utils.constructTagName('avatarbutton');\n\nexport { TAG_NAME };\n", "import AvatarButton from './avatarbutton.component';\nimport { TAG_NAME } from './avatarbutton.constants';\nimport '../avatar';\n\nAvatarButton.register(TAG_NAME);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n ['mdc-avatarbutton']: AvatarButton\n }\n}\n\nexport default AvatarButton;\n", "/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\n\nimport {Disconnectable, Part} from './lit-html.js';\n\nexport {\n AttributePart,\n BooleanAttributePart,\n ChildPart,\n ElementPart,\n EventPart,\n Part,\n PropertyPart,\n} from './lit-html.js';\n\nexport interface DirectiveClass {\n new (part: PartInfo): Directive;\n}\n\n/**\n * This utility type extracts the signature of a directive class's render()\n * method so we can use it for the type of the generated directive function.\n */\nexport type DirectiveParameters<C extends Directive> = Parameters<C['render']>;\n\n/**\n * A generated directive function doesn't evaluate the directive, but just\n * returns a DirectiveResult object that captures the arguments.\n */\nexport interface DirectiveResult<C extends DirectiveClass = DirectiveClass> {\n /**\n * This property needs to remain unminified.\n * @internal\n */\n ['_$litDirective$']: C;\n /** @internal */\n values: DirectiveParameters<InstanceType<C>>;\n}\n\nexport const PartType = {\n ATTRIBUTE: 1,\n CHILD: 2,\n PROPERTY: 3,\n BOOLEAN_ATTRIBUTE: 4,\n EVENT: 5,\n ELEMENT: 6,\n} as const;\n\nexport type PartType = (typeof PartType)[keyof typeof PartType];\n\nexport interface ChildPartInfo {\n readonly type: typeof PartType.CHILD;\n}\n\nexport interface AttributePartInfo {\n readonly type:\n | typeof PartType.ATTRIBUTE\n | typeof PartType.PROPERTY\n | typeof PartType.BOOLEAN_ATTRIBUTE\n | typeof PartType.EVENT;\n readonly strings?: ReadonlyArray<string>;\n readonly name: string;\n readonly tagName: string;\n}\n\nexport interface ElementPartInfo {\n readonly type: typeof PartType.ELEMENT;\n}\n\n/**\n * Information about the part a directive is bound to.\n *\n * This is useful for checking that a directive is attached to a valid part,\n * such as with directive that can only be used on attribute bindings.\n */\nexport type PartInfo = ChildPartInfo | AttributePartInfo | ElementPartInfo;\n\n/**\n * Creates a user-facing directive function from a Directive class. This\n * function has the same parameters as the directive's render() method.\n */\nexport const directive =\n <C extends DirectiveClass>(c: C) =>\n (...values: DirectiveParameters<InstanceType<C>>): DirectiveResult<C> => ({\n // This property needs to remain unminified.\n ['_$litDirective$']: c,\n values,\n });\n\n/**\n * Base class for creating custom directives. Users should extend this class,\n * implement `render` and/or `update`, and then pass their subclass to\n * `directive`.\n */\nexport abstract class Directive implements Disconnectable {\n //@internal\n __part!: Part;\n //@internal\n __attributeIndex: number | undefined;\n //@internal\n __directive?: Directive;\n\n //@internal\n _$parent!: Disconnectable;\n\n // These will only exist on the AsyncDirective subclass\n //@internal\n _$disconnectableChildren?: Set<Disconnectable>;\n // This property needs to remain unminified.\n //@internal\n ['_$notifyDirectiveConnectionChanged']?(isConnected: boolean): void;\n\n constructor(_partInfo: PartInfo) {}\n\n // See comment in Disconnectable interface for why this is a getter\n get _$isConnected() {\n return this._$parent._$isConnected;\n }\n\n /** @internal */\n _$initialize(\n part: Part,\n parent: Disconnectable,\n attributeIndex: number | undefined,\n ) {\n this.__part = part;\n this._$parent = parent;\n this.__attributeIndex = attributeIndex;\n }\n /** @internal */\n _$resolve(part: Part, props: Array<unknown>): unknown {\n return this.update(part, props);\n }\n\n abstract render(...props: Array<unknown>): unknown;\n\n update(_part: Part, props: Array<unknown>): unknown {\n return this.render(...props);\n }\n}\n", "/**\n * @license\n * Copyright 2018 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\n\nimport {AttributePart, noChange} from '../lit-html.js';\nimport {\n directive,\n Directive,\n DirectiveParameters,\n PartInfo,\n PartType,\n} from '../directive.js';\n\n/**\n * A key-value set of class names to truthy values.\n */\nexport interface ClassInfo {\n readonly [name: string]: string | boolean | number;\n}\n\nclass ClassMapDirective extends Directive {\n /**\n * Stores the ClassInfo object applied to a given AttributePart.\n * Used to unset existing values when a new ClassInfo object is applied.\n */\n private _previousClasses?: Set<string>;\n private _staticClasses?: Set<string>;\n\n constructor(partInfo: PartInfo) {\n super(partInfo);\n if (\n partInfo.type !== PartType.ATTRIBUTE ||\n partInfo.name !== 'class' ||\n (partInfo.strings?.length as number) > 2\n ) {\n throw new Error(\n '`classMap()` can only be used in the `class` attribute ' +\n 'and must be the only part in the attribute.',\n );\n }\n }\n\n render(classInfo: ClassInfo) {\n // Add spaces to ensure separation from static classes\n return (\n ' ' +\n Object.keys(classInfo)\n .filter((key) => classInfo[key])\n .join(' ') +\n ' '\n );\n }\n\n override update(part: AttributePart, [classInfo]: DirectiveParameters<this>) {\n // Remember dynamic classes on the first render\n if (this._previousClasses === undefined) {\n this._previousClasses = new Set();\n if (part.strings !== undefined) {\n this._staticClasses = new Set(\n part.strings\n .join(' ')\n .split(/\\s/)\n .filter((s) => s !== ''),\n );\n }\n for (const name in classInfo) {\n if (classInfo[name] && !this._staticClasses?.has(name)) {\n this._previousClasses.add(name);\n }\n }\n return this.render(classInfo);\n }\n\n const classList = part.element.classList;\n\n // Remove old classes that no longer apply\n for (const name of this._previousClasses) {\n if (!(name in classInfo)) {\n classList.remove(name);\n this._previousClasses!.delete(name);\n }\n }\n\n // Add or remove classes based on their classMap value\n for (const name in classInfo) {\n // We explicitly want a loose truthy check of `value` because it seems\n // more convenient that '' and 0 are skipped.\n const value = !!classInfo[name];\n if (\n value !== this._previousClasses.has(name) &&\n !this._staticClasses?.has(name)\n ) {\n if (value) {\n classList.add(name);\n this._previousClasses.add(name);\n } else {\n classList.remove(name);\n this._previousClasses.delete(name);\n }\n }\n }\n return noChange;\n }\n}\n\n/**\n * A directive that applies dynamic CSS classes.\n *\n * This must be used in the `class` attribute and must be the only part used in\n * the attribute. It takes each property in the `classInfo` argument and adds\n * the property name to the element's `classList` if the property value is\n * truthy; if the property value is falsy, the property name is removed from\n * the element's `class`.\n *\n * For example `{foo: bar}` applies the class `foo` if the value of `bar` is\n * truthy.\n *\n * @param classInfo\n */\nexport const classMap = directive(ClassMapDirective);\n\n/**\n * The type of the class that powers this directive. Necessary for naming the\n * directive's return type.\n */\nexport type {ClassMapDirective};\n", "import utils from '../../utils/tag-name';\n\nconst TAG_NAME = utils.constructTagName('badge');\n\nconst TYPE = {\n DOT: 'dot',\n ICON: 'icon',\n COUNTER: 'counter',\n SUCCESS: 'success',\n WARNING: 'warning',\n ERROR: 'error',\n} as const;\n\nconst ICON_NAMES_LIST = {\n SUCCESS_ICON_NAME: 'check-circle-badge-filled',\n WARNING_ICON_NAME: 'warning-badge-filled',\n ERROR_ICON_NAME: 'error-legacy-badge-filled',\n} as const;\n\nconst ICON_VARIANT = {\n PRIMARY: 'primary',\n SECONDARY: 'secondary',\n} as const;\n\nconst ICON_STATE = {\n SUCCESS: 'success',\n WARNING: 'warning',\n ERROR: 'error',\n} as const;\n\nconst BACKGROUND_STYLES = {\n ...ICON_VARIANT,\n ...ICON_STATE,\n} as const;\n\nconst DEFAULTS = {\n TYPE: TYPE.DOT,\n MAX_COUNTER: 99,\n MAX_COUNTER_LIMIT: 999,\n VARIANT: ICON_VARIANT.PRIMARY,\n ICON_SIZE: 1,\n} as const;\n\nexport { TAG_NAME, DEFAULTS, TYPE, ICON_STATE, ICON_VARIANT, ICON_NAMES_LIST, BACKGROUND_STYLES };\n", "import { css } from 'lit';\nimport { hostFitContentStyles } from '../../utils/styles';\n\nconst styles = [\n hostFitContentStyles,\n css`\n :host {\n --mdc-badge-primary-foreground-color: var(--mds-color-theme-common-text-primary-normal);\n --mdc-badge-primary-background-color: var(--mds-color-theme-background-accent-normal);\n\n --mdc-badge-secondary-foreground-color: var(--mds-color-theme-text-secondary-normal);\n --mdc-badge-secondary-background-color: var(--mds-color-theme-background-alert-default-normal);\n\n --mdc-badge-success-foreground-color: var(--mds-color-theme-text-success-normal);\n --mdc-badge-success-background-color: var(--mds-color-theme-background-alert-success-normal);\n \n --mdc-badge-warning-foreground-color: var(--mds-color-theme-text-warning-normal);\n --mdc-badge-warning-background-color: var(--mds-color-theme-background-alert-warning-normal);\n \n --mdc-badge-error-foreground-color: var(--mds-color-theme-text-error-normal);\n --mdc-badge-error-background-color: var(--mds-color-theme-background-alert-error-normal);\n \n --mdc-badge-overlay-background-color: var(--mds-color-theme-background-solid-primary-normal);\n \n color: var(--mdc-badge-primary-foreground-color);\n }\n .mdc-badge-overlay {\n outline: 0.0625rem solid var(--mdc-badge-overlay-background-color);\n }\n .mdc-badge-text {\n padding: 0 0.25rem;\n border-radius: 6.25rem;\n min-width: 1rem;\n display: flex;\n justify-content: center;\n background-color: var(--mdc-badge-primary-background-color);\n }\n .mdc-badge-dot {\n width: 0.75rem;\n height: 0.75rem;\n border-radius: 50%;\n background-color: var(--mdc-badge-primary-background-color);\n }\n .mdc-badge-icon {\n padding: 2px;\n border-radius: 50%;\n }\n .mdc-badge-icon__primary {\n background-color: var(--mdc-badge-primary-background-color);\n color: var(--mdc-badge-primary-foreground-color);\n }\n .mdc-badge-icon__success {\n background-color: var(--mdc-badge-success-background-color);\n color: var(--mdc-badge-success-foreground-color);\n }\n .mdc-badge-icon__warning {\n background-color: var(--mdc-badge-warning-background-color);\n color: var(--mdc-badge-warning-foreground-color);\n }\n .mdc-badge-icon__error {\n background-color: var(--mdc-badge-error-background-color);\n color: var(--mdc-badge-error-foreground-color);\n }\n .mdc-badge-icon__secondary {\n background-color: var(--mdc-badge-secondary-background-color);\n color: var(--mdc-badge-secondary-foreground-color);\n }\n\n /* High Contrast Mode */\n @media (forced-colors: active) {\n .mdc-badge-dot, .mdc-badge-icon, .mdc-badge-text {\n outline: 0.125rem solid;\n }\n }\n `,\n];\n\nexport default styles;\n", "import type { PropertyValues, TemplateResult } from 'lit';\nimport { CSSResult, html } from 'lit';\nimport { classMap } from 'lit-html/directives/class-map.js';\nimport { property } from 'lit/decorators.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport { Component } from '../../models';\nimport { IconNameMixin } from '../../utils/mixins/IconNameMixin';\nimport type { IconNames } from '../icon/icon.types';\nimport { TYPE as FONT_TYPE, VALID_TEXT_TAGS } from '../text/text.constants';\nimport { DEFAULTS, ICON_NAMES_LIST, ICON_STATE, ICON_VARIANT, TYPE as BADGE_TYPE } from './badge.constants';\nimport styles from './badge.styles';\nimport type { BadgeType, IconVariant } from './badge.types';\n\n/**\n * The `mdc-badge` component is a versatile UI element used to\n * display dot, icons, counters, success, warning and error type badge.\n *\n * Supported badge types:\n * - `dot`: Displays a dot notification badge with a blue color.\n * - `icon`: Displays a badge with a specified icon using the `icon-name` attribute.\n * - `counter`: Displays a badge with a counter value. If the counter exceeds the `max-counter`,\n * it shows `maxCounter+`. The maximum value of the counter is 999 and anything above that will be set to `999+`.\n * - `success`: Displays a success badge with a check circle icon and green color.\n * - `warning`: Displays a warning badge with a warning icon and yellow color.\n * - `error`: Displays a error badge with a error legacy icon and red color.\n *\n * For `icon`, `success`, `warning` and `error` types, the `mdc-icon` component is used to render the icon.\n *\n * For the `counter` type, the `mdc-text` component is used to render the counter value.\n *\n * @dependency mdc-icon\n * @dependency mdc-text\n *\n * @tagname mdc-badge\n *\n * @cssproperty --mdc-badge-primary-foreground-color - The foreground color of the primary badge.\n * @cssproperty --mdc-badge-primary-background-color - The background color of the primary badge.\n * @cssproperty --mdc-badge-secondary-foreground-color - The foreground color of the secondary badge.\n * @cssproperty --mdc-badge-secondary-background-color - The background color of the secondary badge.\n * @cssproperty --mdc-badge-success-foreground-color - The foreground color of the success badge.\n * @cssproperty --mdc-badge-success-background-color - The background color of the success badge.\n * @cssproperty --mdc-badge-warning-foreground-color - The foreground color of the warning badge.\n * @cssproperty --mdc-badge-warning-background-color - The background color of the warning badge.\n * @cssproperty --mdc-badge-error-foreground-color - The foreground color of the error badge.\n * @cssproperty --mdc-badge-error-background-color - The background color of the error badge.\n * @cssproperty --mdc-badge-overlay-background-color - The background color of the badge overlay.\n */\nclass Badge extends IconNameMixin(Component) {\n /**\n * Type of the badge\n * Can be `dot` (notification) , `icon`, `counter`, `success`, `warning` or `error`.\n */\n @property({ type: String, reflect: true })\n type?: BadgeType;\n\n /**\n * Type of the variant can be `primary` or `secondary`.\n * It defines the background and foreground color of the icon.\n * @default primary\n */\n @property({ type: String, reflect: true })\n variant: IconVariant = DEFAULTS.VARIANT;\n\n /**\n * Counter is the number which can be provided in the badge.\n */\n @property({ type: Number })\n counter?: number;\n\n /**\n * The maximum number can be set up to 999, anything above that will be rendered as _999+_.\n * The max counter can be `9`, `99` or `999`.\n * @default 99\n */\n @property({ type: Number, attribute: 'max-counter', reflect: true })\n maxCounter: number = DEFAULTS.MAX_COUNTER;\n\n /**\n * Overlay is to add a thin outline to the badge.\n * This will help distinguish between the badge and the button,\n * where the badge will be layered on top of a button.\n * @default false\n */\n @property({ type: Boolean })\n overlay = false;\n\n /**\n * Aria-label attribute to be set for accessibility\n * @default null\n */\n @property({ type: String, attribute: 'aria-label' })\n override ariaLabel: string | null = null;\n\n /**\n * If `type` is set to `counter` and if `counter` is greater than `maxCounter`,\n * then it will return a string the maxCounter value as string.\n * Otherwise, it will return a string representation of `counter`.\n * If `counter` is not a number, it will return an empty string.\n * @param maxCounter - the maximum limit which can be displayed on the badge\n * @param counter - the number to be displayed on the badge\n * @returns the string representation of the counter\n */\n private getCounterText(maxCounter: number, counter?: number): string {\n if (counter === undefined || typeof counter !== 'number' || maxCounter === 0) {\n return '';\n }\n if (counter > maxCounter) {\n return `${maxCounter}+`;\n }\n // At any given time, the max limit should not cross 999.\n if (maxCounter > DEFAULTS.MAX_COUNTER_LIMIT || counter > DEFAULTS.MAX_COUNTER_LIMIT) {\n return `${DEFAULTS.MAX_COUNTER_LIMIT}+`;\n }\n return counter.toString();\n }\n\n /**\n * Method to generate the badge icon.\n * @param iconName - the name of the icon from the icon set\n * @param backgroundClassPostfix - postfix for the class to style the badge icon.\n * @returns the template result of the icon.\n */\n private getBadgeIcon(iconName: string, backgroundClassPostfix: string): TemplateResult {\n return html`\n <mdc-icon\n class=\"mdc-badge-icon ${classMap({\n 'mdc-badge-overlay': this.overlay,\n [`mdc-badge-icon__${backgroundClassPostfix}`]: true,\n })}\"\n name=\"${ifDefined(iconName as IconNames)}\"\n size=\"${DEFAULTS.ICON_SIZE}\"\n ></mdc-icon>\n `;\n }\n\n /**\n * Method to generate the badge dot template.\n * @returns the template result of the dot with mdc-badge-dot class.\n */\n private getBadgeDot(): TemplateResult {\n return html`<div class=\"mdc-badge-dot ${classMap({ 'mdc-badge-overlay': this.overlay })}\"></div>`;\n }\n\n /**\n * Method to generate the badge text and counter template.\n * @returns the template result of the text.\n */\n private getBadgeCounterText(): TemplateResult {\n return html`\n <mdc-text\n type=\"${FONT_TYPE.BODY_SMALL_MEDIUM}\"\n tagname=\"${VALID_TEXT_TAGS.DIV}\"\n class=\"mdc-badge-text ${classMap({ 'mdc-badge-overlay': this.overlay })}\"\n >\n ${this.getCounterText(this.maxCounter, this.counter)}\n </mdc-text>\n `;\n }\n\n /**\n * Method to set the role based on the aria-label provided.\n * If the aria-label is provided, the role of the element will be 'img'.\n * Otherwise, the role will be null.\n */\n private setRoleByAriaLabel(): void {\n if (this.ariaLabel) {\n this.role = 'img';\n } else {\n this.role = null;\n }\n }\n\n /**\n * Generates the badge content based on the badge type.\n * Utilizes various helper methods to create the appropriate badge template based on the\n * current badge type. Supports 'dot', 'icon', 'counter', 'success', 'warning', and 'error'\n * types, returning the corresponding template result for each type.\n * @returns the TemplateResult for the current badge type.\n */\n private getBadgeContentBasedOnType(): TemplateResult {\n if (this.variant && !Object.values(ICON_VARIANT).includes(this.variant)) {\n this.variant = DEFAULTS.VARIANT;\n }\n const { iconName, type, variant } = this;\n switch (type) {\n case BADGE_TYPE.ICON:\n return this.getBadgeIcon(iconName || '', variant);\n case BADGE_TYPE.COUNTER:\n return this.getBadgeCounterText();\n case BADGE_TYPE.SUCCESS:\n return this.getBadgeIcon(ICON_NAMES_LIST.SUCCESS_ICON_NAME, ICON_STATE.SUCCESS);\n case BADGE_TYPE.WARNING:\n return this.getBadgeIcon(ICON_NAMES_LIST.WARNING_ICON_NAME, ICON_STATE.WARNING);\n case BADGE_TYPE.ERROR:\n return this.getBadgeIcon(ICON_NAMES_LIST.ERROR_ICON_NAME, ICON_STATE.ERROR);\n case BADGE_TYPE.DOT:\n default:\n this.type = BADGE_TYPE.DOT;\n return this.getBadgeDot();\n }\n }\n\n public override update(changedProperties: PropertyValues): void {\n super.update(changedProperties);\n\n if (changedProperties.has('ariaLabel')) {\n this.setRoleByAriaLabel();\n }\n }\n\n public override render() {\n return this.getBadgeContentBasedOnType();\n }\n\n public static override styles: Array<CSSResult> = [...Component.styles, ...styles];\n}\n\nexport default Badge;\n", "import Badge from './badge.component';\nimport { TAG_NAME } from './badge.constants';\nimport '../icon';\nimport '../text';\n\nBadge.register(TAG_NAME);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n ['mdc-badge']: Badge\n }\n}\n\nexport default Badge;\n", "import { css } from 'lit';\n\nconst styles = css`\n :host {\n --mdc-bullet-background-color: var(--mds-color-theme-outline-secondary-normal);\n --mdc-bullet-size-small: 0.25rem;\n --mdc-bullet-size-medium: 0.5rem;\n --mdc-bullet-size-large: 1rem;\n\n border-radius: 50%;\n display: block;\n aspect-ratio: 1;\n background-color: var(--mdc-bullet-background-color);\n }\n :host([size=\"small\"]) {\n height: var(--mdc-bullet-size-small);\n }\n :host([size=\"medium\"]) {\n height: var(--mdc-bullet-size-medium);\n }\n :host([size=\"large\"]) {\n height: var(--mdc-bullet-size-large);\n }\n`;\n\nexport default [styles];\n", "import utils from '../../utils/tag-name';\n\nconst TAG_NAME = utils.constructTagName('bullet');\n\nconst SIZE = {\n SMALL: 'small',\n MEDIUM: 'medium',\n LARGE: 'large',\n} as const;\n\nexport { TAG_NAME, SIZE };\n", "import { property } from 'lit/decorators.js';\nimport type { CSSResult } from 'lit';\nimport styles from './bullet.styles';\nimport { Component } from '../../models';\nimport { SIZE } from './bullet.constants';\nimport type { Size } from './bullet.types';\n\n/**\n * Bullet component, which is a visual marker\n * and be used to organize and present items in a list format.\n *\n * @tagname mdc-bullet\n *\n * @cssproperty --mdc-bullet-background-color - background color of the bullet\n * @cssproperty --mdc-bullet-size-small - small size value of the bullet\n * @cssproperty --mdc-bullet-size-medium - medium size value of the bullet\n * @cssproperty --mdc-bullet-size-large - large size value of the bullet\n*/\nclass Bullet extends Component {\n /**\n * Size of the bullet\n *\n * Possible values: 'small', 'medium', 'large'\n * @default small\n */\n @property({ type: String, reflect: true })\n public size: Size = SIZE.SMALL;\n\n public static override styles: Array<CSSResult> = [...Component.styles, ...styles];\n}\n\nexport default Bullet;\n", "import Bullet from './bullet.component';\nimport { TAG_NAME } from './bullet.constants';\n\nBullet.register(TAG_NAME);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n ['mdc-bullet']: Bullet\n }\n}\n\nexport default Bullet;\n", "import { css } from 'lit';\n\nconst styles = css`\n :host {\n background-color: transparent;\n border-radius: 1.25rem;\n font-weight: var(--mds-font-apps-body-large-medium-font-weight);\n outline: none;\n\n --mdc-button-primary-color: var(--mds-color-theme-inverted-text-primary-normal);\n --mdc-button-primary-background-color: var(--mds-color-theme-button-primary-normal);\n --mdc-button-primary-hover-background-color: var(--mds-color-theme-button-primary-hover);\n --mdc-button-primary-pressed-background-color: var(--mds-color-theme-button-primary-pressed);\n --mdc-button-primary-disabled-background-color: var(--mds-color-theme-button-primary-disabled);\n --mdc-button-primary-disabled-color: var(--mds-color-theme-text-primary-disabled);\n \n --mdc-button-secondary-color: var(--mds-color-theme-text-primary-normal);\n --mdc-button-secondary-border-color: var(--mds-color-theme-outline-button-normal);\n --mdc-button-secondary-hover-background-color: var(--mds-color-theme-button-secondary-hover);\n --mdc-button-secondary-pressed-background-color: var(--mds-color-theme-button-secondary-pressed);\n --mdc-button-secondary-disabled-background-color: var(--mds-color-theme-button-secondary-disabled);\n --mdc-button-secondary-disabled-color: var(--mds-color-theme-text-primary-disabled);\n --mdc-button-secondary-disabled-border-color: var(--mds-color-theme-outline-primary-disabled);\n\n --mdc-button-tertiary-color: var(--mds-color-theme-text-primary-normal);\n --mdc-button-tertiary-hover-background-color: var(--mds-color-theme-button-secondary-hover);\n --mdc-button-tertiary-pressed-background-color: var(--mds-color-theme-button-secondary-pressed);\n --mdc-button-tertiary-disabled-background-color: var(--mds-color-theme-button-secondary-disabled);\n --mdc-button-tertiary-disabled-color: var(--mds-color-theme-text-primary-disabled);\n\n --mdc-button-line-height-size-40: var(--mds-font-lineheight-body-large);\n --mdc-button-line-height-size-32: var(--mds-font-lineheight-body-large);\n --mdc-button-line-height-size-28: var(--mds-font-lineheight-body-midsize);\n --mdc-button-line-height-size-24: var(--mds-font-lineheight-body-small);\n }\n\n :host([active]){\n font-weight: var(--mds-font-apps-body-large-bold-font-weight);\n }\n\n :host([variant=\"primary\"]){\n background: var(--mdc-button-primary-background-color);\n color: var(--mdc-button-primary-color);\n }\n :host([variant=\"primary\"]:hover){\n background: var(--mdc-button-primary-hover-background-color);\n }\n :host([variant=\"primary\"]:active), :host([variant=\"primary\"].pressed){\n background: var(--mdc-button-primary-pressed-background-color);\n }\n :host([variant=\"primary\"][disabled]), :host([variant=\"primary\"][soft-disabled]){\n background: var(--mdc-button-primary-disabled-background-color);\n color: var(--mdc-button-primary-disabled-color);\n cursor: auto;\n }\n\n :host([variant=\"secondary\"]){\n color: var(--mdc-button-secondary-color);\n border-color: var(--mdc-button-secondary-border-color);\n }\n :host([variant=\"secondary\"]:hover){\n background: var(--mdc-button-secondary-hover-background-color);\n }\n :host([variant=\"secondary\"]:active), :host([variant=\"secondary\"].pressed){\n background: var(--mdc-button-secondary-pressed-background-color);\n }\n :host([variant=\"secondary\"][disabled]),\n :host([variant=\"secondary\"][soft-disabled]){\n color: var(--mdc-button-primary-disabled-color);\n border-color: var(--mdc-button-secondary-disabled-border-color);\n background: var(--mdc-button-secondary-disabled-background-color);\n cursor: auto;\n }\n\n :host([variant=\"tertiary\"]){\n border-color: transparent;\n color: var(--mdc-button-tertiary-color);\n }\n :host([variant=\"tertiary\"]:hover){\n background: var(--mdc-button-tertiary-hover-background-color);\n }\n :host([variant=\"tertiary\"]:active), :host([variant=\"tertiary\"].pressed){\n background: var(--mdc-button-tertiary-pressed-background-color);\n }\n :host([variant=\"tertiary\"][disabled]), \n :host([variant=\"tertiary\"][soft-disabled]){\n color: var(--mdc-button-tertiary-disabled-color);\n background: var(--mdc-button-tertiary-disabled-background-color);\n cursor: auto;\n }\n\n :host([size=\"64\"][data-btn-type='icon']), \n :host([size=\"52\"][data-btn-type='icon']), \n :host([size=\"40\"][data-btn-type='icon']), \n :host([size=\"32\"][data-btn-type='icon']),\n :host([size=\"28\"][data-btn-type='icon']),\n :host([size=\"24\"][data-btn-type='icon']){\n border-radius: 6.25rem;\n aspect-ratio: 1;\n padding: unset;\n }\n :host([size=\"40\"]){\n font-size: var(--mds-font-size-body-large);\n line-height: var(--mdc-button-line-height-size-40);\n padding: 0 1rem;\n gap: 0.5rem;\n }\n :host([size=\"32\"]){\n font-size: var(--mds-font-size-body-large);\n line-height: var(--mdc-button-line-height-size-32);\n padding: 0 0.75rem;\n gap: 0.375rem;\n }\n :host([size=\"28\"]){\n font-size: var(--mds-font-size-body-midsize);\n line-height: var(--mdc-button-line-height-size-28);\n padding: 0 0.75rem;\n gap: 0.375rem;\n }\n :host([size=\"24\"]){\n font-size: var(--mds-font-size-body-small);\n line-height: var(--mdc-button-line-height-size-24);\n padding: 0 0.625rem;\n gap: 0.25rem;\n }\n :host([size=\"20\"]){\n padding: 0.0625rem;\n aspect-ratio: 1;\n }\n\n :host([color=\"accent\"]){\n --mdc-button-primary-color: var(--mds-color-theme-common-text-primary-normal);\n --mdc-button-primary-background-color: var(--mds-color-theme-button-accent-normal);\n --mdc-button-primary-hover-background-color: var(--mds-color-theme-button-accent-hover);\n --mdc-button-primary-pressed-background-color: var(--mds-color-theme-button-accent-pressed);\n\n --mdc-button-secondary-color: var(--mds-color-theme-text-accent-normal);\n --mdc-button-secondary-border-color: var(--mds-color-theme-outline-theme-normal);\n --mdc-button-secondary-hover-background-color: var(--mds-color-theme-button-secondary-hover);\n --mdc-button-secondary-pressed-background-color: var(--mds-color-theme-button-secondary-pressed);\n }\n :host([color=\"positive\"]){\n --mdc-button-primary-color: var(--mds-color-theme-common-text-primary-normal);\n --mdc-button-primary-background-color: var(--mds-color-theme-button-join-normal);\n --mdc-button-primary-hover-background-color: var(--mds-color-theme-button-join-hover);\n --mdc-button-primary-pressed-background-color: var(--mds-color-theme-button-join-pressed);\n\n --mdc-button-secondary-color: var(--mds-color-theme-text-success-normal);\n --mdc-button-secondary-border-color: var(--mds-color-theme-outline-join-normal);\n --mdc-button-secondary-hover-background-color: var(--mds-color-theme-button-secondary-hover);\n --mdc-button-secondary-pressed-background-color: var(--mds-color-theme-button-secondary-pressed);\n }\n :host([color=\"negative\"]){\n --mdc-button-primary-color: var(--mds-color-theme-common-text-primary-normal);\n --mdc-button-primary-background-color: var(--mds-color-theme-button-cancel-normal);\n --mdc-button-primary-hover-background-color: var(--mds-color-theme-button-cancel-hover);\n --mdc-button-primary-pressed-background-color: var(--mds-color-theme-button-cancel-pressed);\n\n --mdc-button-secondary-color: var(--mds-color-theme-text-error-normal);\n --mdc-button-secondary-border-color: var(--mds-color-theme-outline-cancel-normal);\n --mdc-button-secondary-hover-background-color: var(--mds-color-theme-button-secondary-hover);\n --mdc-button-secondary-pressed-background-color: var(--mds-color-theme-button-secondary-pressed);\n }\n :host([color=\"promotional\"]){\n --mdc-button-primary-color: var(--mds-color-theme-common-text-primary-normal);\n --mdc-button-primary-background-color: var(--mds-color-theme-common-button-promotion-normal);\n --mdc-button-primary-hover-background-color: var(--mds-color-theme-common-button-promotion-hover);\n --mdc-button-primary-pressed-background-color: var(--mds-color-theme-common-button-promotion-active);\n\n --mdc-button-secondary-color: var(--mds-color-theme-text-primary-normal);\n --mdc-button-secondary-border-color: var(--mds-color-theme-outline-promotion-normal);\n --mdc-button-secondary-hover-background-color: var(--mds-color-theme-button-secondary-hover);\n --mdc-button-secondary-pressed-background-color: var(--mds-color-theme-button-secondary-pressed);\n }\n`;\n\nexport default [styles];\n", "import { ICON_BUTTON_SIZES } from './button.constants';\nimport { IconButtonSize } from './button.types';\n\n/**\n * Returns the icon size multiplier based on the provided button size.\n *\n * @param size - The size of the button.\n * @returns The multiplier for the icon size.\n */\nconst getIconSize = (size: IconButtonSize): number => {\n switch (size) {\n case ICON_BUTTON_SIZES[64]: return 2;\n case ICON_BUTTON_SIZES[52]: return 1.75;\n case ICON_BUTTON_SIZES[40]: return 1.25;\n default: return 1;\n }\n};\n\n/**\n * Returns the name of the icon without the style suffix.\n *\n * @param iconName - The name of the icon.\n * @returns The name of the icon without the suffix.\n */\nconst getIconNameWithoutStyle = (iconName: string): string => {\n const iconParts = iconName.split('-');\n const variants = ['bold', 'filled', 'regular', 'light'];\n return iconParts.filter((part) => !variants.includes(part)).join('-');\n};\n\nexport { getIconSize, getIconNameWithoutStyle };\n", "import type { PropertyValues } from 'lit';\nimport { CSSResult, html } from 'lit';\nimport { property, state } from 'lit/decorators.js';\nimport Buttonsimple from '../buttonsimple/buttonsimple.component';\nimport type { IconNames } from '../icon/icon.types';\nimport {\n BUTTON_COLORS,\n BUTTON_TYPE_INTERNAL,\n BUTTON_VARIANTS,\n DEFAULTS,\n ICON_BUTTON_SIZES,\n PILL_BUTTON_SIZES,\n} from './button.constants';\nimport styles from './button.styles';\nimport type { ButtonColor, ButtonTypeInternal, ButtonVariant, IconButtonSize, PillButtonSize } from './button.types';\nimport { getIconNameWithoutStyle, getIconSize } from './button.utils';\n\n/**\n * `mdc-button` is a component that can be configured in various ways to suit different use cases.\n *\n * Button Variants:\n * - **Primary**: Solid background color.\n * - **Secondary**: Transparent background with a solid border.\n * - **Tertiary**: No background or border, appears as plain text but retains all button functionalities.\n *\n * Button Colors:\n * - **Positive**: Green color.\n * - **Negative**: Red color.\n * - **Accent**: Blue color.\n * - **Promotional**: Purple color.\n * - **Default**: White color.\n *\n * Button Sizes (in REM units):\n * - **Pill button**: 40, 32, 28, 24.\n * - **Icon button**: 64, 52, 40, 32, 28, 24.\n * - **Tertiary icon button**: 20.\n *\n * Button Types:\n * - **Pill button**: A button that contains text value. Commonly used for call to action, tags, or filters.\n * - **Pill button with icons**: A button containing an icon either on the left or right side of the button.\n * - **Icon button**: A button represented by just an icon without any text.\n * The type of button is inferred based on the presence of slot and/or prefix and postfix icons.\n *\n * @dependency mdc-icon\n *\n * @event click - (React: onClick) This event is dispatched when the button is clicked.\n * @event keydown - (React: onKeyDown) This event is dispatched when a key is pressed down on the button.\n * @event keyup - (React: onKeyUp) This event is dispatched when a key is released on the button.\n * @event focus - (React: onFocus) This event is dispatched when the button receives focus.\n *\n * @tagname mdc-button\n *\n * @slot - Text label of the button.\n */\nclass Button extends Buttonsimple {\n /**\n * The name of the icon to display as a prefix.\n * The icon is displayed on the left side of the button.\n */\n @property({ type: String, attribute: 'prefix-icon', reflect: true }) prefixIcon?: string;\n\n /**\n * The name of the icon to display as a postfix.\n * The icon is displayed on the right side of the button.\n */\n @property({ type: String, attribute: 'postfix-icon', reflect: true }) postfixIcon?: string;\n\n /**\n * There are 3 variants of button: primary, secondary, tertiary. They are styled differently.\n * - **Primary**: Solid background color.\n * - **Secondary**: Transparent background with a solid border.\n * - **Tertiary**: No background or border, appears as plain text but retains all button functionalities.\n * @default primary\n */\n @property({ type: String }) variant: ButtonVariant = DEFAULTS.VARIANT;\n\n /**\n * Button sizing is based on the button type.\n * - **Pill button**: 40, 32, 28, 24.\n * - **Icon button**: 64, 52, 40, 32, 28, 24.\n * - Tertiary icon button can also be 20.\n * @default 32\n */\n @property({ type: Number }) override size: PillButtonSize | IconButtonSize = DEFAULTS.SIZE;\n\n /**\n * There are 5 colors for button: positive, negative, accent, promotional, default.\n * @default default\n */\n @property({ type: String }) color: ButtonColor = DEFAULTS.COLOR;\n\n /**\n * This property defines the ARIA role for the element. By default, it is set to 'button'.\n * Consumers should override this role when:\n * - The element is being used in a context where a different role is more appropriate.\n * - Custom behaviors are implemented that require a specific ARIA role for accessibility purposes.\n * @default button\n */\n @property({ type: String, reflect: true }) override role = 'button';\n\n /** @internal */\n @state() private typeInternal: ButtonTypeInternal = DEFAULTS.TYPE_INTERNAL;\n\n /** @internal */\n @state() private iconSize = 1;\n\n /**\n * @internal\n */\n private prevPrefixIcon?: string;\n\n /**\n * @internal\n */\n private prevPostfixIcon?: string;\n\n public override update(changedProperties: PropertyValues): void {\n super.update(changedProperties);\n\n if (changedProperties.has('active')) {\n this.modifyIconName(this.active);\n }\n if (changedProperties.has('size')) {\n this.setSize(this.size);\n }\n if (changedProperties.has('variant')) {\n this.setVariant(this.variant);\n this.setSize(this.size);\n }\n if (changedProperties.has('color')) {\n this.setColor(this.color);\n }\n if (changedProperties.has('typeInternal')) {\n this.setSize(this.size);\n }\n if (changedProperties.has('prefixIcon') || changedProperties.has('postfixIcon')) {\n this.inferButtonType();\n }\n }\n\n /**\n * Modifies the icon name based on the active state.\n * If the button is active, the icon name is suffixed with '-filled'.\n * If the button is inactive, the icon name is restored to its original value.\n * If '-filled' icon is not available, the icon name remains unchanged.\n *\n * @param active - The active state.\n */\n private modifyIconName(active: boolean) {\n if (active) {\n if (this.prefixIcon) {\n this.prevPrefixIcon = this.prefixIcon;\n this.prefixIcon = `${getIconNameWithoutStyle(this.prefixIcon)}-filled`;\n }\n if (this.postfixIcon) {\n this.prevPostfixIcon = this.postfixIcon;\n this.postfixIcon = `${getIconNameWithoutStyle(this.postfixIcon)}-filled`;\n }\n } else {\n if (this.prevPrefixIcon) {\n this.prefixIcon = this.prevPrefixIcon;\n }\n if (this.prevPostfixIcon) {\n this.postfixIcon = this.prevPostfixIcon;\n }\n }\n }\n\n /**\n * Sets the variant attribute for the button component.\n * If the provided variant is not included in the BUTTON_VARIANTS,\n * it defaults to the value specified in DEFAULTS.VARIANT.\n *\n * @param variant - The variant to set.\n */\n private setVariant(variant: ButtonVariant) {\n this.setAttribute('variant', Object.values(BUTTON_VARIANTS).includes(variant) ? variant : DEFAULTS.VARIANT);\n }\n\n /**\n * Sets the size attribute for the button component.\n * Validates the size based on the button type (icon, pill, or tertiary).\n * Defaults to DEFAULTS.SIZE if invalid.\n *\n * @param size - The size to set.\n */\n private setSize(size: PillButtonSize | IconButtonSize) {\n const isIconType = this.typeInternal === BUTTON_TYPE_INTERNAL.ICON;\n const isValidSize = isIconType\n ? Object.values(ICON_BUTTON_SIZES).includes(size)\n && !(size === ICON_BUTTON_SIZES[20] && this.variant !== BUTTON_VARIANTS.TERTIARY)\n : Object.values(PILL_BUTTON_SIZES).includes(size as PillButtonSize);\n\n this.setAttribute('size', isValidSize ? `${size}` : `${DEFAULTS.SIZE}`);\n this.iconSize = getIconSize(size);\n }\n\n /**\n * Sets the color attribute for the button.\n * Defaults to DEFAULTS.COLOR if invalid or for tertiary buttons.\n *\n * @param color - The color to set.\n */\n private setColor(color: ButtonColor) {\n if (!Object.values(BUTTON_COLORS).includes(color) || this.variant === BUTTON_VARIANTS.TERTIARY) {\n this.setAttribute('color', `${DEFAULTS.COLOR}`);\n } else {\n this.setAttribute('color', color);\n }\n }\n\n /**\n * Infers the type of button based on the presence of slot and/or prefix and postfix icons.\n * @param slot - default slot of button\n */\n private inferButtonType() {\n const slot = this.shadowRoot\n ?.querySelector('slot')\n ?.assignedNodes()\n .filter((node) => node.nodeType !== Node.TEXT_NODE || node.textContent?.trim())\n .length;\n if (slot && (this.prefixIcon || this.postfixIcon)) {\n this.typeInternal = BUTTON_TYPE_INTERNAL.PILL_WITH_ICON;\n this.setAttribute('data-btn-type', 'pill-with-icon');\n } else if (!slot && (this.prefixIcon || this.postfixIcon)) {\n this.typeInternal = BUTTON_TYPE_INTERNAL.ICON;\n this.setAttribute('data-btn-type', 'icon');\n } else {\n this.typeInternal = BUTTON_TYPE_INTERNAL.PILL;\n this.setAttribute('data-btn-type', 'pill');\n }\n }\n\n public override render() {\n return html`\n ${this.prefixIcon\n ? html` <mdc-icon\n name=\"${this.prefixIcon as IconNames}\"\n part=\"prefix-icon\"\n size=${this.iconSize}\n length-unit=\"rem\"\n >\n </mdc-icon>`\n : ''}\n <slot @slotchange=${this.inferButtonType}></slot>\n ${this.postfixIcon\n ? html` <mdc-icon\n name=\"${this.postfixIcon as IconNames}\"\n part=\"postfix-icon\"\n size=${this.iconSize}\n length-unit=\"rem\"\n >\n </mdc-icon>`\n : ''}\n `;\n }\n\n public static override styles: Array<CSSResult> = [...Buttonsimple.styles, ...styles];\n}\n\nexport default Button;\n", "import Button from './button.component';\nimport { TAG_NAME } from './button.constants';\nimport '../icon';\n\nButton.register(TAG_NAME);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n ['mdc-button']: Button\n }\n}\n\nexport default Button;\n", "import { LitElement } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport type { Constructor } from './index.types';\n\nexport interface DataAriaLabelMixinInterface {\n dataAriaLabel: string | null;\n}\n\nexport const DataAriaLabelMixin = <T extends Constructor<LitElement>>(\n superClass: T,\n) => {\n class InnerMixinClass extends superClass {\n /**\n * Defines a string value that labels the current element.\n * The Aria-Label attribute to be set for accessibility.\n * @default null\n */\n @property({ type: String, reflect: true, attribute: 'data-aria-label' }) dataAriaLabel: string | null = null;\n }\n // Cast return type to your mixin's interface intersected with the superClass type\n return InnerMixinClass as Constructor<DataAriaLabelMixinInterface> & T;\n};\n", "import validate from './validate.js';\nconst byteToHex = [];\nfor (let i = 0; i < 256; ++i) {\n byteToHex.push((i + 0x100).toString(16).slice(1));\n}\nexport function unsafeStringify(arr, offset = 0) {\n return (byteToHex[arr[offset + 0]] +\n byteToHex[arr[offset + 1]] +\n byteToHex[arr[offset + 2]] +\n byteToHex[arr[offset + 3]] +\n '-' +\n byteToHex[arr[offset + 4]] +\n byteToHex[arr[offset + 5]] +\n '-' +\n byteToHex[arr[offset + 6]] +\n byteToHex[arr[offset + 7]] +\n '-' +\n byteToHex[arr[offset + 8]] +\n byteToHex[arr[offset + 9]] +\n '-' +\n byteToHex[arr[offset + 10]] +\n byteToHex[arr[offset + 11]] +\n byteToHex[arr[offset + 12]] +\n byteToHex[arr[offset + 13]] +\n byteToHex[arr[offset + 14]] +\n byteToHex[arr[offset + 15]]).toLowerCase();\n}\nfunction stringify(arr, offset = 0) {\n const uuid = unsafeStringify(arr, offset);\n if (!validate(uuid)) {\n throw TypeError('Stringified UUID is invalid');\n }\n return uuid;\n}\nexport default stringify;\n", "let getRandomValues;\nconst rnds8 = new Uint8Array(16);\nexport default function rng() {\n if (!getRandomValues) {\n if (typeof crypto === 'undefined' || !crypto.getRandomValues) {\n throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');\n }\n getRandomValues = crypto.getRandomValues.bind(crypto);\n }\n return getRandomValues(rnds8);\n}\n", "const randomUUID = typeof crypto !== 'undefined' && crypto.randomUUID && crypto.randomUUID.bind(crypto);\nexport default { randomUUID };\n", "import native from './native.js';\nimport rng from './rng.js';\nimport { unsafeStringify } from './stringify.js';\nfunction v4(options, buf, offset) {\n if (native.randomUUID && !buf && !options) {\n return native.randomUUID();\n }\n options = options || {};\n const rnds = options.random ?? options.rng?.() ?? rng();\n if (rnds.length < 16) {\n throw new Error('Random bytes length must be >= 16');\n }\n rnds[6] = (rnds[6] & 0x0f) | 0x40;\n rnds[8] = (rnds[8] & 0x3f) | 0x80;\n if (buf) {\n offset = offset || 0;\n if (offset < 0 || offset + 16 > buf.length) {\n throw new RangeError(`UUID byte range ${offset}:${offset + 15} is out of buffer bounds`);\n }\n for (let i = 0; i < 16; ++i) {\n buf[offset + i] = rnds[i];\n }\n return buf;\n }\n return unsafeStringify(rnds);\n}\nexport default v4;\n", "import { LitElement } from 'lit';\nimport { property, query } from 'lit/decorators.js';\nimport { v4 as uuidv4 } from 'uuid';\nimport type { Constructor } from './index.types';\n\nexport interface AssociatedFormControl {\n autofocus: boolean;\n disabled: boolean;\n name: string;\n value: string | string[];\n\n pattern?: string;\n min?: number | string;\n max?: number | string;\n step?: number;\n required?: boolean;\n minLength?: number;\n maxLength?: number;\n validationMessage?: string;\n\n readonly form: HTMLFormElement | null;\n readonly validity: ValidityState;\n readonly willValidate: boolean;\n\n checkValidity(): boolean;\n reportValidity(): boolean;\n\n formDisabledCallback?(disabled: boolean): void;\n formResetCallback(): void;\n formStateRestoreCallback(\n state: string | FormData | File,\n mode: 'restore' | 'autocomplete'\n ): void;\n }\n\nexport interface FormInternalsMixinInterface {\n name: string;\n value: string;\n form: HTMLFormElement | null;\n validity: ValidityState;\n validationMessage: string;\n willValidate: boolean;\n internals: ElementInternals;\n inputElement: HTMLInputElement;\n setValidity(): void;\n checkValidity(): boolean;\n reportValidity(): boolean;\n\n}\n\nexport const FormInternalsMixin = <T extends Constructor<LitElement>>(\n superClass: T,\n) => {\n class InnerMixinClass extends superClass {\n /**\n * Indicates the name of the component group.\n * They are used to group elements in a form together.\n * @default ''\n */\n @property({ reflect: true, type: String }) name = '';\n\n /**\n * Indicates the value of the component group (ex: input, checkbox, radio, select etc...)\n * @default ''\n */\n @property({ reflect: true, type: String }) value = '';\n\n /**\n * Custom validation message that will override the default message and displayed when the input is invalid.\n */\n @property({ reflect: true, type: String, attribute: 'validation-message' }) validationMessage?: string;\n\n /** @internal */\n static formAssociated = true;\n\n /** @internal */\n internals: ElementInternals;\n\n /** @internal */\n get form(): HTMLFormElement | null {\n return this.internals.form;\n }\n\n get validity(): ValidityState {\n return this.internals.validity;\n }\n\n get willValidate() {\n return this.internals.willValidate;\n }\n\n constructor(...args: any[]) {\n super(args);\n\n /** @internal */\n this.internals = this.attachInternals();\n this.id = `mdc-input-${uuidv4()}`;\n }\n\n /**\n * Sets the validity of the input field based on the input field's validity.\n * @returns void\n */\n setValidity() {\n if (this.inputElement) {\n this.internals.setValidity(\n this.inputElement.validity,\n this.inputElement.validationMessage,\n this.inputElement,\n );\n }\n }\n\n checkValidity(): boolean {\n this.setValidity();\n return this.internals.checkValidity();\n }\n\n reportValidity() {\n this.setValidity();\n return this.internals.reportValidity();\n }\n\n /**\n * @internal\n * The input element\n */\n @query('input') inputElement!: HTMLInputElement;\n }\n // Cast return type to your mixin's interface intersected with the superClass type\n return InnerMixinClass as Constructor<FormInternalsMixinInterface> & T;\n};\n", "import utils from '../../utils/tag-name';\nimport { TYPE, VALID_TEXT_TAGS } from '../text/text.constants';\n\nconst TAG_NAME = utils.constructTagName('formfieldwrapper');\n\nconst VALIDATION = {\n DEFAULT: 'default',\n ERROR: 'error',\n PRIORITY: 'priority',\n SUCCESS: 'success',\n WARNING: 'warning',\n} as const;\n\nconst DEFAULTS = {\n VALIDATION: VALIDATION.DEFAULT,\n HELPER_TEXT_ID: 'helper-text-id',\n HEADING_ID: 'heading-id',\n} as const;\n\nconst MDC_TEXT_OPTIONS = {\n TAGNAME: VALID_TEXT_TAGS.SPAN,\n TYPE: TYPE.BODY_MIDSIZE_REGULAR,\n HEADER_TYPE: TYPE.BODY_MIDSIZE_BOLD,\n};\n\nexport { TAG_NAME, VALIDATION, DEFAULTS, MDC_TEXT_OPTIONS };\n", "import { css } from 'lit';\nimport { hostFitContentStyles } from '../../utils/styles';\n\nconst styles = [\n hostFitContentStyles,\n css`\n :host {\n flex-direction: column;\n align-items: flex-start;\n gap: 0.5rem;\n }\n :host([disabled]),\n :host([disabled]) .mdc-label,\n :host([disabled]) .mdc-help-text,\n :host([disabled][help-text-type='error']) .mdc-help-text,\n :host([disabled][help-text-type='success']) .mdc-help-text,\n :host([disabled][help-text-type='warning']) .mdc-help-text,\n :host([disabled][help-text-type='priority']) .mdc-help-text {\n color: var(--mds-color-theme-text-primary-disabled);\n }\n\n .mdc-label-text,\n .mdc-help-text {\n font-size: var(--mds-font-size-body-midsize);\n line-height: var(--mds-font-lineheight-body-midsize);\n display: flex;\n align-items: center;\n gap: 0.5rem;\n width: 100%;\n }\n\n .mdc-label {\n color: var(--mds-color-theme-text-primary-normal);\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n\n .mdc-help-text {\n color: var(--mds-color-theme-text-secondary-normal);\n }\n\n :host([help-text-type='error']) .mdc-help-text {\n color: var(--mds-color-theme-text-error-normal);\n }\n :host([help-text-type='warning']) .mdc-help-text {\n color: var(--mds-color-theme-text-warning-normal);\n }\n :host([help-text-type='success']) .mdc-help-text {\n color: var(--mds-color-theme-text-success-normal);\n }\n :host([help-text-type='priority']) .mdc-help-text {\n color: var(--mds-color-theme-text-accent-normal);\n }\n `,\n];\n\nexport default styles;\n", "import { VALIDATION } from './formfieldwrapper.constants';\nimport type { HelperIconsList, ValidationType } from './formfieldwrapper.types';\n\nconst getHelperIcon = (type: ValidationType): HelperIconsList | '' => {\n const helperIconSizeMap: Record<\n ValidationType,\n HelperIconsList\n > = {\n [VALIDATION.ERROR]: 'error-legacy-badge-filled',\n [VALIDATION.WARNING]: 'warning-badge-filled',\n [VALIDATION.SUCCESS]: 'check-circle-badge-filled',\n [VALIDATION.PRIORITY]: 'priority-badge-filled',\n [VALIDATION.DEFAULT]: '',\n };\n return helperIconSizeMap[type] || '';\n};\n\nexport { getHelperIcon };\n", "import { CSSResult, html, nothing } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport { Component } from '../../models';\nimport { DisabledMixin } from '../../utils/mixins/DisabledMixin';\nimport { DEFAULTS, MDC_TEXT_OPTIONS } from './formfieldwrapper.constants';\nimport styles from './formfieldwrapper.styles';\nimport type { ValidationType } from './formfieldwrapper.types';\nimport { getHelperIcon } from './formfieldwrapper.utils';\n\n/**\n * formfieldwrapper is a component that contains the label and helper/validation text\n * that can be configured in various ways to suit different use cases (most of the input related components).\n * It is used as an internal component and is not intended to be used directly by consumers.\n *\n * @tagname mdc-formfieldwrapper\n *\n * @slot label-info - slot to add the label info icon\n *\n */\nclass FormfieldWrapper extends DisabledMixin(Component) {\n /**\n * The label of the input field. It is linked to the input field using the `for` attribute.\n */\n @property({ reflect: true, type: String }) label?: string;\n\n /**\n * The required label of the input field.\n * When an appropriate string value is set,\n * the input field is marked as required and the label is appended with this text.\n */\n @property({ type: String, reflect: true, attribute: 'required-label' }) requiredLabel?: string;\n\n /**\n * The unique id of the input field. It is used to link the input field with the label.\n * @default `mdc-input-${uuidv4()}`\n */\n @property({ type: String }) override id = '';\n\n /**\n * The type of help text. It can be 'default', 'error', 'warning', 'success', 'priority'.\n */\n @property({ reflect: true, attribute: 'help-text-type' }) helpTextType: ValidationType = DEFAULTS.VALIDATION;\n\n /**\n * The help text that is displayed below the input field.\n */\n @property({ type: String, reflect: true, attribute: 'help-text' }) helpText?: string;\n\n /** @internal */\n protected shouldRenderLabel: Boolean = true;\n\n /**\n * creates the label element when the label property is set.\n * id is used to link the label with the input field.\n * @returns void\n */\n protected renderLabelElement() {\n if (!this.label) {\n return nothing;\n }\n\n return this.shouldRenderLabel\n ? html`<label for=\"${this.id}\" class=\"mdc-label\" part=\"label\">${this.label}</label>`\n : html` <mdc-text\n id=\"${DEFAULTS.HEADING_ID}\"\n tagname=\"${MDC_TEXT_OPTIONS.TAGNAME}\"\n type=\"${MDC_TEXT_OPTIONS.HEADER_TYPE}\"\n part=\"label\"\n >${this.label}</mdc-text\n >`;\n }\n\n protected renderRequiredLabel() {\n if (!this.requiredLabel) {\n return nothing;\n }\n\n return html`\n <mdc-text part=\"required-label\" tagname=${MDC_TEXT_OPTIONS.TAGNAME} type=${MDC_TEXT_OPTIONS.TYPE}>\n (${this.requiredLabel})\n </mdc-text>\n `;\n }\n\n /**\n * creates the helpertext icon based on the helpTextType for validation.\n * If the helpTextType is not set, it defaults to 'default' and it doesn't display any icon.\n * @returns void\n */\n protected renderHelpTextIcon() {\n if (!this.helpText) {\n return nothing;\n }\n const helperIcon = getHelperIcon(this.helpTextType || DEFAULTS.VALIDATION);\n if (helperIcon && !this.disabled) {\n return html`<mdc-icon part=\"helper-icon\" size=\"1\" length-unit=\"rem\" name=${helperIcon}></mdc-icon>`;\n }\n return nothing;\n }\n\n /**\n * creates the helper text component when the helpertext value is set.\n * It is also used to display the validation message based on the helpTextType.\n * @returns void\n */\n protected renderHelpText() {\n if (!this.helpText) {\n return nothing;\n }\n return html`\n <mdc-text\n id=\"${DEFAULTS.HELPER_TEXT_ID}\"\n part=\"help-text\"\n tagname=${MDC_TEXT_OPTIONS.TAGNAME}\n type=${MDC_TEXT_OPTIONS.TYPE}\n >\n ${this.helpText}\n </mdc-text>\n `;\n }\n\n /**\n * renders the mdc-label-text container that contains the label and labelInfoToggleTip.\n * @returns void\n */\n protected renderLabel() {\n if (!this.label) return nothing;\n return html`<div class=\"mdc-label-text\" part=\"label-text\">\n <slot name=\"label\">${this.renderLabelElement()}</slot>\n <slot name=\"required-label\">${this.renderRequiredLabel()}</slot>\n <slot name=\"label-info\"></slot>\n </div>`;\n }\n\n /**\n * renders the mdc-help-text container that contains the helpertext icon and helpertext.\n * @returns void\n */\n protected renderHelperText() {\n if (!this.helpText) {\n return nothing;\n }\n return html`<div class=\"mdc-help-text\" part=\"mdc-help-text\">\n <slot name=\"help-icon\">${this.renderHelpTextIcon()}</slot>\n <slot name=\"help-text\">${this.renderHelpText()}</slot>\n </div>`;\n }\n\n public static override styles: Array<CSSResult> = [...Component.styles, ...styles];\n}\n\nexport default FormfieldWrapper;\n", "import utils from '../../utils/tag-name';\nimport type { IconNames } from '../icon/icon.types';\n\nconst TAG_NAME = utils.constructTagName('checkbox');\n\nconst ICON_NAME = {\n CHECKED: 'check-bold' as Extract<IconNames, 'check-bold'>,\n INDETERMINATE: 'minus-bold' as Extract<IconNames, 'minus-bold'>,\n} as const;\n\nexport { TAG_NAME, ICON_NAME };\n", "import { css } from 'lit';\nimport { hostFocusRingStyles } from '../../utils/styles';\n\nconst styles = [css`\n :host {\n --mdc-checkbox-background-color-hover: var(--mds-color-theme-control-inactive-hover);\n --mdc-checkbox-border-color: var(--mds-color-theme-outline-button-normal);\n --mdc-checkbox-checked-background-color-hover: var(--mds-color-theme-control-active-hover);\n --mdc-checkbox-checked-background-color: var(--mds-color-theme-control-active-normal);\n --mdc-checkbox-checked-pressed-icon-color: var(--mds-color-theme-control-active-pressed);\n --mdc-checkbox-disabled-background-color: var(--mds-color-theme-control-inactive-disabled);\n --mdc-checkbox-disabled-border-color: var(--mds-color-theme-outline-primary-disabled);\n --mdc-checkbox-disabled-checked-icon-color: var(--mds-color-theme-control-active-disabled);\n --mdc-checkbox-disabled-icon-color: var(--mds-color-theme-text-primary-disabled);\n --mdc-checkbox-icon-background-color: var(--mds-color-theme-control-inactive-normal);\n --mdc-checkbox-icon-border-color: var(--mds-color-theme-outline-input-normal);\n --mdc-checkbox-icon-color: var(--mds-color-theme-inverted-text-primary-normal);\n --mdc-checkbox-pressed-icon-color: var(--mds-color-theme-control-inactive-pressed);\n\n flex-direction: row;\n align-items: flex-start;\n }\n .mdc-label, .input {\n cursor: pointer;\n }\n :host([checked]) .icon-container,\n :host([indeterminate]) .icon-container {\n background: var(--mdc-checkbox-checked-background-color);\n border: unset;\n }\n :host([checked]) .container:hover .icon-container,\n :host([indeterminate]) .container:hover .icon-container {\n background: var(--mdc-checkbox-checked-background-color-hover);\n }\n :host([checked]) .container:active .icon-container,\n :host([indeterminate]) .container:active .icon-container {\n background: var(--mdc-checkbox-checked-pressed-icon-color);\n }\n :host([disabled]) .mdc-label,\n :host([disabled]) .input {\n cursor: default;\n }\n :host([disabled]) .container:hover {\n background: unset;\n }\n :host([disabled]) .icon-container {\n border-color: var(--mdc-checkbox-disabled-border-color);\n background: var(--mdc-checkbox-disabled-background-color);\n }\n :host([disabled]) .icon {\n --mdc-icon-fill-color: var(--mdc-checkbox-disabled-icon-color);\n }\n :host([disabled][checked]) .icon-container,\n :host([disabled][indeterminate]) .icon-container {\n background: var(--mdc-checkbox-disabled-checked-icon-color);\n border: 0.0625rem solid var(--mdc-checkbox-disabled-border-color);\n }\n .input {\n margin: 0;\n padding: 0;\n position: absolute;\n opacity: 0.1%;\n overflow: visible;\n z-index: 1;\n }\n .icon-container {\n display: flex;\n align-items: center;\n border: 0.0625rem solid var(--mdc-checkbox-icon-border-color);\n background: var(--mdc-checkbox-icon-background-color);\n }\n .container:hover {\n background: var(--mdc-checkbox-background-color-hover);\n }\n .container:active {\n background: var(--mdc-checkbox-pressed-icon-color);\n }\n .input, .icon-container {\n width: 1rem;\n height: 1rem;\n }\n .input,\n .icon-container,\n .container {\n border-radius: 0.125rem;\n }\n .icon {\n --mdc-icon-fill-color: var(--mdc-checkbox-icon-color);\n }\n .container {\n margin: 0.125rem 0;\n }\n .text-container {\n display: flex;\n flex-direction: column;\n gap: 0.25rem;\n }\n \n /* High Contrast Mode */\n @media (forced-colors: active) {\n :host([checked]) .icon-container,\n :host([indeterminate]) .icon-container {\n border: 0.0625rem solid var(--mdc-checkbox-border-color);\n }\n }\n`, ...hostFocusRingStyles(true)];\n\nexport default styles;\n", "import { CSSResult, html, nothing, PropertyValues } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport { DataAriaLabelMixin } from '../../utils/mixins/DataAriaLabelMixin';\nimport { AssociatedFormControl, FormInternalsMixin } from '../../utils/mixins/FormInternalsMixin';\nimport FormfieldWrapper from '../formfieldwrapper/formfieldwrapper.component';\nimport { DEFAULTS as FORMFIELD_DEFAULTS } from '../formfieldwrapper/formfieldwrapper.constants';\nimport type { ValidationType } from '../formfieldwrapper/formfieldwrapper.types';\nimport { ICON_NAME } from './checkbox.constants';\nimport styles from './checkbox.styles';\n\n/**\n * Checkboxes allow users to select multiple options from a list or turn an item/feature on or off.\n * These are often used in forms, settings, and selections in lists.\n *\n * A checkbox component contains an optional label and an optional helper text.\n *\n * To create a group of checkboxes, use the FormFieldGroup component.\n *\n * @dependency mdc-icon\n *\n * @tagname mdc-checkbox\n *\n * @event change - (React: onChange) Event that gets dispatched when the checkbox state changes.\n * @event focus - (React: onFocus) Event that gets dispatched when the checkbox receives focus.\n *\n * @cssproperty --mdc-checkbox-background-color-hover - Allows customization of the background color on hover.\n * @cssproperty --mdc-checkbox-border-color - Border color in high contrast.\n * @cssproperty --mdc-checkbox-checked-background-color - Background color for a selected checkbox.\n * @cssproperty --mdc-checkbox-checked-background-color-hover - Background color for a selected checkbox when hovered.\n * @cssproperty --mdc-checkbox-checked-pressed-icon-color - Background color for a selected checkbox when pressed.\n * @cssproperty --mdc-checkbox-disabled-background-color - Background color for a disabled checkbox.\n * @cssproperty --mdc-checkbox-disabled-border-color - Border color for a disabled checkbox.\n * @cssproperty --mdc-checkbox-disabled-checked-icon-color - Background color for a disabled, selected checkbox.\n * @cssproperty --mdc-checkbox-disabled-icon-color - Icon color for a disabled checkbox.\n * @cssproperty --mdc-checkbox-icon-background-color - Background color for an unselected checkbox.\n * @cssproperty --mdc-checkbox-icon-border-color - Default background color for an unselected checkbox.\n * @cssproperty --mdc-checkbox-icon-color - Icon color for an unselected checkbox.\n * @cssproperty --mdc-checkbox-pressed-icon-color - Background color for a selected checkbox when pressed.\n */\nclass Checkbox extends FormInternalsMixin(DataAriaLabelMixin(FormfieldWrapper)) implements AssociatedFormControl {\n /**\n * Determines whether the checkbox is selected or unselected.\n *\n * @default false\n */\n @property({ type: Boolean, reflect: true }) checked = false;\n\n /**\n * This property is used to determine the parent checkbox in a nested checkbox group.\n * If any one of the children is unselected, then the parent checkbox will be indeterminate.\n * If all children are either selected or unselected, then the parent checkbox will not be indeterminate.\n *\n * @default false\n */\n @property({ type: Boolean, reflect: true }) indeterminate = false;\n\n /**\n * Automatically focus on the element when the page loads.\n * [MDN Reference](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/autofocus)\n * @default false\n */\n @property({ type: Boolean, reflect: true }) override autofocus = false;\n\n constructor() {\n super();\n // Checkbox does not contain helpTextType property.\n this.helpTextType = undefined as unknown as ValidationType;\n }\n\n /**\n * Updates the form value to reflect the current state of the checkbox.\n * If checked, the value is set to either the user-provided value or 'on' if no value is provided.\n * If unchecked, the value is set to null.\n */\n private setFormValue() {\n let actualValue: string | null = null;\n\n if (this.checked) {\n actualValue = !this.value ? 'on' : this.value;\n } else {\n actualValue = null;\n }\n\n this.manageRequired();\n this.internals.setFormValue(actualValue);\n }\n\n /**\n * Manages the required state of the checkbox.\n * If the checkbox is not checked and the requiredLabel property is set, then the checkbox is invalid.\n */\n private manageRequired() {\n if (!this.checked && this.requiredLabel) {\n if (this.validationMessage) {\n this.inputElement.setCustomValidity(this.validationMessage);\n } else {\n this.inputElement.setCustomValidity('');\n }\n this.setValidity();\n } else {\n this.internals.setValidity({});\n }\n }\n\n /** @internal\n * Resets the checkbox to its initial state.\n * The checked property is set to false.\n */\n formResetCallback(): void {\n this.checked = false;\n this.indeterminate = false;\n }\n\n /** @internal */\n formStateRestoreCallback(\n state: string,\n ): void {\n if (state) {\n this.checked = true;\n }\n }\n\n /**\n * Toggles the state of the checkbox element.\n * If the element is not disabled, then\n * the checked property is toggled and the indeterminate property is set to false.\n */\n private toggleState(): void {\n if (!this.disabled) {\n this.checked = !this.checked;\n this.indeterminate = false;\n }\n }\n\n /**\n * Handles the keydown event on the checkbox.\n * When the user presses Enter, the form is submitted.\n * @param event - The keyboard event.\n */\n private handleKeyDown(event: KeyboardEvent): void {\n if (event.key === 'Enter') {\n this.form?.requestSubmit();\n }\n }\n\n /**\n * Toggles the state of the checkbox element.\n * and dispatch the new change event.\n */\n public handleChange(event: Event): void {\n this.toggleState();\n const EventConstructor = event.constructor as typeof Event;\n this.dispatchEvent(new EventConstructor(event.type, event));\n }\n\n public override update(changedProperties: PropertyValues): void {\n super.update(changedProperties);\n\n if (changedProperties.has('checked')) {\n this.setFormValue();\n }\n }\n\n private renderLabelAndHelperText = () => {\n if (!this.label) return nothing;\n return html`<div class=\"text-container\">\n ${this.renderLabel()}\n ${this.renderHelperText()}\n </div>`;\n };\n\n public override render() {\n const checkboxIconContent = (this.checked || this.indeterminate) ? html`\n <mdc-icon\n class=\"icon\"\n name=\"${this.indeterminate ? ICON_NAME.INDETERMINATE : ICON_NAME.CHECKED}\"\n size=\"1\"\n length-unit=\"rem\"\n ></mdc-icon>\n ` : nothing;\n\n return html`\n <div class=\"container mdc-focus-ring\">\n <input\n id=\"${this.id}\"\n type=\"checkbox\"\n class=\"input\"\n ?autofocus=\"${this.autofocus}\"\n name=\"${ifDefined(this.name)}\"\n value=\"${ifDefined(this.value)}\"\n ?required=\"${!!this.requiredLabel}\"\n .checked=\"${this.checked}\"\n aria-checked=\"${this.indeterminate ? 'mixed' : this.checked}\"\n .indeterminate=\"${this.indeterminate}\"\n .disabled=\"${this.disabled}\"\n aria-label=\"${this.dataAriaLabel ?? ''}\"\n tabindex=\"${this.disabled ? -1 : 0}\"\n aria-describedby=\"${ifDefined(this.helpText ? FORMFIELD_DEFAULTS.HELPER_TEXT_ID : '')}\"\n @change=${this.handleChange}\n @keydown=${this.handleKeyDown}\n />\n <div class=\"icon-container\">${checkboxIconContent}</div>\n </div>\n ${this.renderLabelAndHelperText()}\n `;\n }\n\n public static override styles: Array<CSSResult> = [...FormfieldWrapper.styles, ...styles];\n}\n\nexport default Checkbox;\n", "import Checkbox from './checkbox.component';\nimport { TAG_NAME } from './checkbox.constants';\nimport '../icon';\n\nCheckbox.register(TAG_NAME);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n ['mdc-checkbox']: Checkbox;\n }\n}\n\nexport default Checkbox;\n", "import utils from '../../utils/tag-name';\nimport { TAG_NAME as BUTTON_TAG } from '../button/button.constants';\nimport { TAG_NAME as TEXT_TAG } from '../text/text.constants';\n\nconst TAG_NAME = utils.constructTagName('divider');\n\nconst DIVIDER_ORIENTATION = {\n HORIZONTAL: 'horizontal',\n VERTICAL: 'vertical',\n} as const;\n\nconst DIVIDER_VARIANT = {\n SOLID: 'solid',\n GRADIENT: 'gradient',\n} as const;\n\n/**\n * Direction types for both the arrow and button component.\n * These directions are dependent on the divider's orientation.\n */\nconst DIRECTIONS = {\n POSITIVE: 'positive',\n NEGATIVE: 'negative',\n} as const;\n\nconst ARROW_ICONS = {\n UP: 'arrow-up-regular',\n DOWN: 'arrow-down-regular',\n LEFT: 'arrow-left-regular',\n RIGHT: 'arrow-right-regular',\n} as const;\n\nconst DEFAULTS = {\n ORIENTATION: DIVIDER_ORIENTATION.HORIZONTAL,\n VARIANT: DIVIDER_VARIANT.SOLID,\n ARROW_DIRECTION: DIRECTIONS.NEGATIVE,\n BUTTON_DIRECTION: DIRECTIONS.NEGATIVE,\n} as const;\n\nexport {\n TAG_NAME,\n DEFAULTS,\n DIVIDER_VARIANT,\n DIVIDER_ORIENTATION,\n DIRECTIONS,\n BUTTON_TAG,\n TEXT_TAG,\n ARROW_ICONS,\n};\n", "import { css } from 'lit';\nimport { hostFitContentStyles } from '../../utils/styles';\n\n/**\n * Divider component styles\n */\nconst styles = [\n hostFitContentStyles,\n /* Host styles */\n css`\n :host {\n --mdc-divider-background-color: var(--mds-color-theme-outline-secondary-normal);\n --mdc-divider-width: 0.0625rem;\n --mdc-divider-horizontal-gradient: var(--mds-color-theme-gradientdivider-default-normal);\n --mdc-divider-vertical-gradient: var(--mds-color-theme-gradientdivider-vertical-normal);\n --mdc-divider-text-size: var(--mds-font-size-body-midsize);\n --mdc-divider-text-color: var(--mds-color-theme-text-secondary-normal);\n --mdc-divider-text-line-height: var(--mds-font-lineheight-body-midsize);\n --mdc-divider-text-margin: 1.5rem;\n --mdc-divider-grabber-button-border-radius: 0.5rem;\n --mdc-divider-grabber-button-border-color: var(--mds-color-theme-outline-secondary-normal);\n --mdc-divider-grabber-button-background-color-normal: var(--mds-color-theme-overlay-button-secondary-normal);\n --mdc-divider-grabber-button-background-color-hover: var(--mds-color-theme-overlay-button-secondary-hover);\n --mdc-divider-grabber-button-background-color-pressed: var(--mds-color-theme-overlay-button-secondary-pressed);\n\n display: flex;\n justify-content: center;\n }\n\n /* Primary and grabber divider styles */\n :host([data-type='mdc-primary-divider']),\n :host([data-type='mdc-grabber-divider']) {\n background-color: var(--mdc-divider-background-color);\n }\n\n @media (forced-colors: active) {\n /* Primary and grabber divider styles */\n :host([data-type='mdc-primary-divider'][button-position='positive']),\n :host([data-type='mdc-grabber-divider'][button-position='positive']) {\n border: 0;\n border-top: var(--mdc-divider-width) solid var(--mdc-divider-background-color);\n }\n\n :host([data-type='mdc-primary-divider'][button-position='negative']),\n :host([data-type='mdc-grabber-divider'][button-position='negative']) {\n border: 0;\n border-bottom: var(--mdc-divider-width) solid var(--mdc-divider-background-color);\n }\n\n :host([data-type='mdc-primary-divider'][orientation='vertical'][button-position='positive']),\n :host([data-type='mdc-grabber-divider'][orientation='vertical'][button-position='positive']),\n :host([data-type='mdc-primary-divider'][orientation='vertical'][button-position='negative']:dir(rtl)),\n :host([data-type='mdc-grabber-divider'][orientation='vertical'][button-position='negative']:dir(rtl)) {\n border: 0;\n border-right: var(--mdc-divider-width) solid var(--mdc-divider-background-color);\n }\n\n :host([data-type='mdc-primary-divider'][orientation='vertical'][button-position='negative']),\n :host([data-type='mdc-grabber-divider'][orientation='vertical'][button-position='negative']),\n :host([data-type='mdc-primary-divider'][orientation='vertical'][button-position='positive']:dir(rtl)),\n :host([data-type='mdc-grabber-divider'][orientation='vertical'][button-position='positive']:dir(rtl)) {\n border: 0;\n border-left: var(--mdc-divider-width) solid var(--mdc-divider-background-color);\n }\n }\n\n /* Orientation-specific styles */\n :host([orientation='horizontal']) {\n flex-direction: row;\n height: var(--mdc-divider-width);\n width: 100%;\n }\n\n :host([orientation='vertical']:not([data-type='mdc-text-divider'])) {\n flex-direction: column;\n height: 100%;\n width: var(--mdc-divider-width);\n }\n\n /* Gradient styles for primary and grabber dividers */\n :host([orientation='horizontal'][variant='gradient'][data-type='mdc-primary-divider']),\n :host([orientation='horizontal'][variant='gradient'][data-type='mdc-grabber-divider']) {\n background: var(--mdc-divider-horizontal-gradient);\n }\n\n :host([orientation='vertical'][variant='gradient'][data-type='mdc-primary-divider']),\n :host([orientation='vertical'][variant='gradient'][data-type='mdc-grabber-divider']) {\n background: var(--mdc-divider-vertical-gradient);\n }\n\n /* Hiding slotted content for primary dividers */\n :host([data-type='mdc-primary-divider']) ::slotted(*) {\n display: none;\n }\n\n /** Button divider styles */\n\n ::slotted(mdc-button) {\n background-color: var(--mdc-divider-grabber-button-background-color-normal);\n border-color: var(--mdc-divider-grabber-button-border-color);\n }\n\n ::slotted(mdc-button:hover) {\n background-color: var(--mdc-divider-grabber-button-background-color-hover);\n }\n\n ::slotted(mdc-button:active) {\n background-color: var(--mdc-divider-grabber-button-background-color-pressed);\n }\n\n :host([orientation='vertical']) ::slotted(mdc-button) {\n width: 1.25rem;\n height: 2.5rem;\n border-radius: 0\n var(--mdc-divider-grabber-button-border-radius)\n var(--mdc-divider-grabber-button-border-radius)\n 0;\n }\n\n :host([orientation='horizontal']) ::slotted(mdc-button) {\n height: 1.25rem;\n width: 2.5rem;\n border-radius: 0\n 0\n var(--mdc-divider-grabber-button-border-radius)\n var(--mdc-divider-grabber-button-border-radius);\n }\n\n :host([orientation='horizontal'][button-position='positive']),\n :host([orientation='vertical'][button-position='negative']) {\n align-items: end;\n }\n\n :host([orientation='horizontal'][button-position='negative']),\n :host([orientation='vertical'][button-position='positive']) {\n align-items: start;\n }\n\n :host([orientation='horizontal'][button-position='positive']) ::slotted(mdc-button) {\n border-radius: var(--mdc-divider-grabber-button-border-radius)\n var(--mdc-divider-grabber-button-border-radius)\n 0\n 0;\n margin: 0;\n margin-bottom: var(--mdc-divider-width);\n border-bottom: 0;\n }\n\n :host([orientation='horizontal'][button-position='negative']) ::slotted(mdc-button) {\n margin: 0;\n margin-top: var(--mdc-divider-width);\n border-top: 0;\n }\n\n :host([orientation='vertical'][button-position='negative']:dir(ltr)) ::slotted(mdc-button),\n :host([orientation='vertical'][button-position='negative']:dir(rtl)) ::slotted(mdc-button) {\n border-radius: var(--mdc-divider-grabber-button-border-radius)\n 0\n 0\n var(--mdc-divider-grabber-button-border-radius);\n margin: 0;\n margin-right: var(--mdc-divider-width);\n border-right: 0;\n }\n\n :host([orientation='vertical'][button-position='positive']:dir(ltr)) ::slotted(mdc-button),\n :host([orientation='vertical'][button-position='positive']:dir(rtl)) ::slotted(mdc-button) {\n margin: 0;\n margin-left: var(--mdc-divider-width);\n border-left: 0;\n }\n\n :host([orientation='vertical'][button-position='positive']:dir(rtl)) ::slotted(mdc-button) {\n border-radius: 0\n var(--mdc-divider-grabber-button-border-radius)\n var(--mdc-divider-grabber-button-border-radius)\n 0;\n transform: rotate(180deg);\n margin: 0;\n margin-right: var(--mdc-divider-width);\n }\n\n :host([orientation='vertical'][button-position='negative']:dir(rtl)) ::slotted(mdc-button) {\n transform: rotate(180deg);\n margin: 0;\n margin-left: var(--mdc-divider-width);\n }\n\n /** Text divider styles */\n :host([orientation='horizontal'][variant='gradient'][data-type='mdc-text-divider']),\n :host([orientation='horizontal'][variant='solid'][data-type='mdc-text-divider']) {\n align-items: center;\n }\n\n :host([data-type='mdc-text-divider']) > div {\n width: 100%;\n height: 100%;\n background-color: var(--mdc-divider-background-color);\n }\n\n @media (forced-colors: active) {\n :host([data-type='mdc-text-divider']) > div {\n border-bottom: var(--mdc-divider-width) solid var(--mdc-divider-background-color);\n }\n }\n\n :host([orientation='horizontal'][variant='gradient'][data-type='mdc-text-divider']) > div:first-of-type {\n background: linear-gradient(to right, transparent, 30%, var(--mdc-divider-background-color));\n }\n\n :host([orientation='horizontal'][variant='gradient'][data-type='mdc-text-divider']) > div:last-of-type {\n background: linear-gradient(to left, transparent, 30%, var(--mdc-divider-background-color));\n }\n\n :host([data-type='mdc-text-divider']) ::slotted(mdc-text) {\n margin: 0 var(--mdc-divider-text-margin);\n color: var(--mdc-divider-text-color);\n font-size: var(--mdc-divider-text-size);\n line-height: var(--mdc-divider-text-line-height);\n }\n `,\n];\n\nexport default styles;\n", "import type { PropertyValues } from 'lit';\nimport { CSSResult, html } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport { Component } from '../../models';\nimport {\n ARROW_ICONS,\n BUTTON_TAG,\n DEFAULTS,\n DIRECTIONS,\n DIVIDER_ORIENTATION,\n DIVIDER_VARIANT,\n TEXT_TAG,\n} from './divider.constants';\nimport styles from './divider.styles';\nimport type { Directions, DividerOrientation, DividerVariant } from './divider.types';\n\n/**\n * `mdc-divider` is a component that provides a line to separate and organize content.\n * It can also include a button or text positioned centrally, allowing users to interact with the layout.\n *\n * **Divider Orientation:**\n * - **Horizontal**: A thin, horizontal line.\n * - **Vertical**: A thin, vertical line.\n *\n * **Divider Variants:**\n * - **solid**: Solid line.\n * - **gradient**: Gradient Line.\n *\n * **Divider Types:**\n * - The type of divider is inferred based on the kind of slot present.\n * - **Primary**: A simple horizontal or vertical divider.\n * - **Text**: A horizontal divider with a text label in the center.\n * - **Grabber Button**: A horizontal or vertical divider with a styled button in the center.\n *\n * **Accessibility:**\n * - When the slot is replaced by an `mdc-button`:\n * - `aria-label` should be passed to the `mdc-button`.\n * - `aria-expanded` should be passed to the `mdc-button`.\n *\n * **Notes:**\n * - If the slot is replaced by an invalid tag name or contains multiple elements,\n * the divider defaults to the **Primary** type.\n * - To override the styles of the divider, use the provided CSS custom properties.\n *\n * @tagname mdc-divider\n *\n * @cssproperty --mdc-divider-background-color - background color of the divider\n * @cssproperty --mdc-divider-width - width of the divider\n * @cssproperty --mdc-divider-horizontal-gradient - gradient of the horizontal divider\n * @cssproperty --mdc-divider-vertical-gradient - gradient of the vertical divider\n * @cssproperty --mdc-divider-text-size - font size of label in the text divider\n * @cssproperty --mdc-divider-text-color - font color of label in the text divider\n * @cssproperty --mdc-divider-text-margin - left and right margin of label in the text divider\n * @cssproperty --mdc-divider-text-line-height - line height of label in the text divider\n * @cssproperty --mdc-divider-grabber-button-background-color-normal - background color of the grabber button\n * in rest state\n * @cssproperty --mdc-divider-grabber-button-background-color-hover - background color of the grabber button\n * in hover state\n * @cssproperty --mdc-divider-grabber-button-background-color-pressed - background color of the grabber button\n * in pressed state\n * @cssproperty --mdc-divider-grabber-button-border-color - border color of the grabber button\n * @cssproperty --mdc-divider-grabber-button-border-radius - border radius of the grabber button\n */\nclass Divider extends Component {\n /**\n * Two orientations of divider\n * - **horizontal**: A thin, horizontal line with 0.0625rem width.\n * - **vertical**: A thin, vertical line with 0.0625rem width.\n *\n * Note: We do not support \"Vertical Text Divider\" as of now.\n * @default horizontal\n */\n @property({ type: String, reflect: true })\n orientation: DividerOrientation = DEFAULTS.ORIENTATION;\n\n /**\n * Two variants of divider\n * - **solid**: Solid line.\n * - **gradient**: Gradient Line that fades on either sides of the divider.\n * @default solid\n */\n @property({ type: String, reflect: true })\n variant: DividerVariant = DEFAULTS.VARIANT;\n\n /**\n * Direction of the arrow icon, if applicable.\n * - **positive**\n * - **negative**\n *\n * Note: Positive and Negative directions are defined based on Cartesian plane.\n * @default 'negative'\n */\n @property({ type: String, attribute: 'arrow-direction', reflect: true })\n arrowDirection: Directions = DEFAULTS.ARROW_DIRECTION;\n\n /**\n * Position of the button, if applicable.\n * - **positive**\n * - **negative**\n *\n * Note: Positive and Negative directions are defined based on Cartesian plane.\n * @default 'negative'\n */\n @property({ type: String, attribute: 'button-position', reflect: true })\n buttonPosition: Directions = DEFAULTS.BUTTON_DIRECTION;\n\n /**\n * Sets the variant attribute for the divider component.\n * If the provided variant is not included in the DIVIDER_VARIANT,\n * it defaults to the value specified in DEFAULTS.VARIANT.\n *\n * @param variant - The variant to set.\n */\n private setVariant(variant: DividerVariant) {\n this.setAttribute('variant', Object.values(DIVIDER_VARIANT).includes(variant) ? variant : DEFAULTS.VARIANT);\n }\n\n /**\n * Sets the orientation attribute for the divider component.\n * If the provided orientation is not included in the DIVIDER_ORIENTATION,\n * it defaults to the value specified in DEFAULTS.ORIENTATION.\n *\n * @param orientation - The orientation to set.\n */\n private setOrientation(orientation: DividerOrientation) {\n this.setAttribute(\n 'orientation',\n Object.values(DIVIDER_ORIENTATION).includes(orientation) ? orientation : DEFAULTS.ORIENTATION,\n );\n }\n\n /**\n * Sets the buttonPosition and arrowDirection attribute for the divider component.\n * If the provided buttonPosition and arrowDirection are not included in the DIRECTIONS,\n * it defaults to the value specified in DIRECTIONS based on the ORIENTATION.\n *\n * @param buttonPosition - The buttonPosition to set.\n * @param arrowDirection - The arrowDirection to set.\n */\n private ensureValidDirections() {\n const defaultDirection = this.orientation === DIVIDER_ORIENTATION.HORIZONTAL\n ? DIRECTIONS.NEGATIVE\n : DIRECTIONS.POSITIVE;\n\n if (!Object.values(DIRECTIONS).includes(this.buttonPosition as Directions)) {\n this.buttonPosition = defaultDirection;\n }\n\n if (!Object.values(DIRECTIONS).includes(this.arrowDirection as Directions)) {\n this.arrowDirection = defaultDirection;\n }\n }\n\n /**\n * Configures the grabber button within the divider.\n *\n * - Sets the `prefix-icon` attribute for the grabber button based\n * on the `arrow-direction` and `orientation` properties.\n *\n * This method updates the DOM element dynamically if a grabber button is present.\n */\n private setGrabberButton(): void {\n this.ensureValidDirections();\n const buttonElement = this.querySelector('mdc-button');\n if (buttonElement) {\n const iconType = this.getArrowIcon();\n buttonElement.setAttribute('variant', 'secondary');\n buttonElement.setAttribute('prefix-icon', iconType);\n }\n }\n\n /**\n * Determines the arrow icon based on the consumer-defined `arrowDirection`.\n *\n * @returns The icon that represents the arrow direction.\n */\n private getArrowIcon(): string {\n const isHorizontal = this.orientation === DIVIDER_ORIENTATION.HORIZONTAL;\n const isPositive = this.arrowDirection === DIRECTIONS.POSITIVE;\n\n if (isHorizontal) {\n return isPositive ? ARROW_ICONS.UP : ARROW_ICONS.DOWN;\n }\n\n return isPositive ? ARROW_ICONS.RIGHT : ARROW_ICONS.LEFT;\n }\n\n public override update(changedProperties: PropertyValues): void {\n super.update(changedProperties);\n\n if (changedProperties.has('orientation')) {\n this.setOrientation(this.orientation);\n }\n\n if (changedProperties.has('variant')) {\n this.setVariant(this.variant);\n }\n\n if (\n changedProperties.has('orientation')\n || changedProperties.has('arrowDirection')\n || changedProperties.has('buttonPosition')\n ) {\n this.setGrabberButton();\n }\n }\n\n /**\n * Infers the type of divider based on the kind of slot present.\n * @param slot - default slot of divider\n */\n private inferDividerType() {\n const slot = this.shadowRoot?.querySelector('slot');\n const assignedElements = slot?.assignedElements({ flatten: true }) || [];\n if (assignedElements.length > 1) return;\n\n const hasTextChild = assignedElements.some((el) => el.tagName === TEXT_TAG.toUpperCase());\n const hasButtonChild = assignedElements.some((el) => el.tagName === BUTTON_TAG.toUpperCase());\n\n if (hasTextChild && !hasButtonChild) {\n this.setAttribute('data-type', 'mdc-text-divider');\n } else if (!hasTextChild && hasButtonChild) {\n this.setAttribute('data-type', 'mdc-grabber-divider');\n this.setGrabberButton();\n }\n }\n\n constructor() {\n super();\n this.setAttribute('data-type', 'mdc-primary-divider');\n }\n\n protected override render() {\n return html`\n <div></div>\n <slot @slotchange=${this.inferDividerType}></slot>\n <div></div>\n `;\n }\n\n public static override styles: Array<CSSResult> = [...Component.styles, ...styles];\n}\n\nexport default Divider;\n", "import Divider from './divider.component';\nimport { TAG_NAME } from './divider.constants';\n\nDivider.register(TAG_NAME);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n ['mdc-divider']: Divider\n }\n}\n\nexport default Divider;\n", "import utils from '../../utils/tag-name';\n\nconst TAG_NAME = utils.constructTagName('formfieldgroup');\n\nconst ROLE = {\n RADIOGROUP: 'radiogroup',\n GROUP: 'group',\n} as const;\n\nexport { ROLE, TAG_NAME };\n", "import { css } from 'lit';\n\nconst styles = css`\n\n :host::part(container) {\n display: flex;\n flex-direction: column;\n gap: 0.75rem;\n }\n\n :host::part(group-header) {\n display: flex;\n flex-direction: column;\n gap: 0.25rem;\n }\n\n :host::part(label-text){\n font-weight: bold;\n }\n`;\n\nexport default [styles];\n", "import type { CSSResult } from 'lit';\nimport { html } from 'lit';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport { DataAriaLabelMixin } from '../../utils/mixins/DataAriaLabelMixin';\nimport FormfieldWrapper from '../formfieldwrapper/formfieldwrapper.component';\nimport { ROLE } from './formfieldgroup.constants';\nimport { DEFAULTS as FORMFIELD_DEFAULTS } from '../formfieldwrapper/formfieldwrapper.constants';\nimport styles from './formfieldgroup.styles';\nimport type { ValidationType } from '../formfieldwrapper/formfieldwrapper.types';\n\n/**\n * `mdc-formfieldgroup` component, groups the form field components together.\n * All passed in children will have a gap of 12px (0.75rem) each applied.\n *\n * This component is specifically for creating a `checkbox` group and a `toggle` group component.\n * For the radiogroup use the RadioGroup component instead.\n *\n * The header text and description text are displayed above the items with accessible labels.<br/>\n * The consumer has to provide atleast the header-text or the aria-label,\n * like one of them <b>has</b> to be passed in always, otherwise its not accessible.\n *\n * The role will be set to `group`.\n * The aria-label will be set with the data-aria-label property.\n * The aria-labelledby will be set with the header id which contains the header text information.\n * The aria-describedby will be set with the description id which contains the description text information.\n *\n * @tagname mdc-formfieldgroup\n *\n * @slot default - This is a default slot for checkbox or toggle components.\n */\nclass FormfieldGroup extends DataAriaLabelMixin(FormfieldWrapper) {\n /**\n * @internal\n * This is used to set the role of the component as `radiogroup` if this is true and to 'group' if it is false.\n */\n protected isRadio = false;\n\n constructor() {\n super();\n /** @internal */\n this.shouldRenderLabel = false;\n this.id = '';\n this.helpTextType = undefined as unknown as ValidationType;\n this.disabled = undefined as unknown as boolean;\n }\n\n public override render() {\n return html`\n <div\n part=\"container\"\n role=\"${this.isRadio ? ROLE.RADIOGROUP : ROLE.GROUP}\"\n aria-labelledby=\"${FORMFIELD_DEFAULTS.HEADING_ID}\"\n aria-describedby=\"${ifDefined(this.helpText ? FORMFIELD_DEFAULTS.HELPER_TEXT_ID : '')}\"\n aria-label=\"${this.dataAriaLabel ?? ''}\"\n >\n <div part=\"group-header\">\n ${this.renderLabel()}\n ${this.renderHelperText()}\n </div>\n <slot></slot>\n </div>\n `;\n }\n\n public static override styles: Array<CSSResult> = [...FormfieldWrapper.styles, ...styles];\n}\n\nexport default FormfieldGroup;\n", "import FormfieldGroup from './formfieldgroup.component';\nimport { TAG_NAME } from './formfieldgroup.constants';\nimport '../text';\n\nFormfieldGroup.register(TAG_NAME);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n ['mdc-formfieldgroup']: FormfieldGroup\n }\n}\n\nexport default FormfieldGroup;\n", "import IconProvider from './iconprovider.component';\nimport { TAG_NAME } from './iconprovider.constants';\n\nIconProvider.register(TAG_NAME);\n\nexport default IconProvider;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n ['mdc-iconprovider']: IconProvider\n }\n}\n", "import { css } from 'lit';\nimport { hostFocusRingStyles } from '../../utils/styles';\n\nconst styles = [css`\n :host{\n --mdc-input-disabled-border-color: var(--mds-color-theme-outline-primary-disabled);\n --mdc-input-disabled-text-color: var(--mds-color-theme-text-primary-disabled);\n --mdc-input-disabled-background-color: var(--mds-color-theme-background-primary-disabled);\n --mdc-input-border-color: var(--mds-color-theme-outline-input-normal);\n --mdc-input-text-color: var(--mds-color-theme-text-primary-normal);\n --mdc-input-background-color: var(--mds-color-theme-background-primary-ghost);\n --mdc-input-selection-background-color: var(--mds-color-theme-background-accent-active);\n --mdc-input-selection-text-color: var(--mds-color-theme-inverted-text-primary-normal);\n --mdc-input-support-text-color: var(--mds-color-theme-text-secondary-normal);\n --mdc-input-hover-background-color: var(--mds-color-theme-background-primary-hover);\n --mdc-input-focused-background-color: var(--mds-color-theme-background-primary-active);\n --mdc-input-focused-border-color: var(--mds-color-theme-outline-input-active);\n --mdc-input-error-border-color: var(--mds-color-theme-text-error-normal);\n --mdc-input-warning-border-color: var(--mds-color-theme-text-warning-normal);\n --mdc-input-success-border-color: var(--mds-color-theme-text-success-normal);\n --mdc-input-primary-border-color: var(--mds-color-theme-text-accent-normal);\n }\n\n :host, .input-container, .input-section, .input{\n width: 100%;\n }\n\n :host([readonly]) .leading-icon {\n color: var(--mdc-input-support-text-color);\n }\n\n :host([disabled]) .input,\n :host([disabled]) .input::placeholder,\n :host([disabled]) .prefix-text{\n color: var(--mdc-input-disabled-text-color);\n }\n\n :host([disabled]) .input,\n :host([readonly]) .input{\n border-color: var(--mdc-input-disabled-border-color);\n background: var(--mdc-input-disabled-background-color);\n }\n\n :host([disabled][help-text-type=\"default\"]) .input-container,\n :host([disabled][help-text-type=\"success\"]) .input-container,\n :host([disabled][help-text-type=\"warning\"]) .input-container,\n :host([disabled][help-text-type=\"error\"]) .input-container,\n :host([disabled][help-text-type=\"priority\"]) .input-container{\n border-color: var(--mdc-input-disabled-border-color);\n }\n\n .leading-icon{\n aspect-ratio: 1;\n }\n\n .input-container{\n height: 2rem;\n border-radius: 0.5rem;\n border: 0.0625rem solid var(--mdc-input-border-color);\n display: flex;\n align-items: center;\n gap: 0.375rem;\n padding: 0.34375rem 0.375rem 0.34375rem 0.75rem;\n min-width: 3.25rem;\n }\n\n .input-section{\n display: flex;\n gap: 0.25rem;\n }\n\n .input {\n border: none;\n color: var(--mdc-input-text-color);\n background-color: var(--mdc-input-background-color);\n outline: none;\n }\n\n .input::selection { \n background-color: var(--mdc-input-selection-background-color);\n color: var(--mdc-input-selection-text-color);\n }\n\n .prefix-text{\n color: var(--mdc-input-support-text-color);\n white-space: nowrap; // restrict prefix text to be in one line\n }\n\n :host(:not([disabled])) .input-container:hover{\n background-color: var(--mdc-input-hover-background-color);\n }\n\n :host(:not([disabled])) .input-container:active, :host(:not([disabled])) .input-container:focus-within{\n background-color: var(--mdc-input-focused-background-color);\n border-color: var(--mdc-input-focused-border-color);\n }\n\n .input::placeholder{\n color: var(--mdc-input-support-text-color);\n }\n\n :host([help-text-type=\"error\"]) .input-container, :host([help-text-type=\"error\"]) .input-container:focus-within {\n border-color: var(--mdc-input-error-border-color);\n }\n :host([help-text-type=\"warning\"]) .input-container, :host([help-text-type=\"warning\"]) .input-container:focus-within {\n border-color: var(--mdc-input-warning-border-color);\n }\n :host([help-text-type=\"success\"]) .input-container, :host([help-text-type=\"success\"]) .input-container:focus-within {\n border-color: var(--mdc-input-success-border-color);\n }\n :host([help-text-type=\"priority\"]) .input-container, :host([help-text-type=\"priority\"]) input-container:focus-within {\n border-color: var(--mdc-input-primary-border-color);\n }\n\n .hidden{\n opacity: 0;\n pointer-events: none;\n }\n`, ...hostFocusRingStyles(true)];\n\nexport default styles;\n", "import FormfieldWrapper from './formfieldwrapper.component';\nimport { TAG_NAME } from './formfieldwrapper.constants';\nimport '../icon';\nimport '../text';\n\nFormfieldWrapper.register(TAG_NAME);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n ['mdc-formfieldwrapper']: FormfieldWrapper;\n }\n}\n\nexport default FormfieldWrapper;\n", "import utils from '../../utils/tag-name';\nimport { BUTTON_VARIANTS, ICON_BUTTON_SIZES } from '../button/button.constants';\nimport { VALIDATION } from '../formfieldwrapper/formfieldwrapper.constants';\nimport { TYPE, VALID_TEXT_TAGS } from '../text/text.constants';\n\nconst TAG_NAME = utils.constructTagName('input');\n\nconst AUTO_CAPITALIZE = {\n OFF: 'off',\n NONE: 'none',\n ON: 'on',\n SENTENCES: 'sentences',\n WORDS: 'words',\n CHARACTERS: 'characters',\n} as const;\n\nconst PREFIX_TEXT_OPTIONS = {\n MAX_LENGTH: 10,\n HELPERTEXT: 'Prefix text should not exceed 10 characters',\n VALIDATION: VALIDATION.ERROR,\n};\n\nconst DEFAULTS = {\n VALIDATION: VALIDATION.DEFAULT,\n ICON_SIZE_VALUE: 1,\n ICON_SIZE_UNIT: 'rem',\n CLEAR_BUTTON_ICON: 'cancel-bold',\n CLEAR_BUTTON_VARIANT: BUTTON_VARIANTS.TERTIARY,\n CLEAR_BUTTON_SIZE: ICON_BUTTON_SIZES[20],\n PREFIX_TEXT_TYPE: TYPE.BODY_MIDSIZE_REGULAR,\n PREFIX_TEXT_TAG: VALID_TEXT_TAGS.SPAN,\n};\n\nexport { TAG_NAME, PREFIX_TEXT_OPTIONS, AUTO_CAPITALIZE, DEFAULTS };\n", "import { CSSResult, html, nothing, PropertyValueMap } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport styles from './input.styles';\nimport FormfieldWrapper from '../formfieldwrapper';\nimport { AUTO_CAPITALIZE, DEFAULTS, PREFIX_TEXT_OPTIONS } from './input.constants';\nimport { DEFAULTS as FORMFIELD_DEFAULTS } from '../formfieldwrapper/formfieldwrapper.constants';\nimport type { IconNames } from '../icon/icon.types';\nimport type { AutoCapitalizeType } from './input.types';\nimport { DataAriaLabelMixin } from '../../utils/mixins/DataAriaLabelMixin';\nimport { FormInternalsMixin, AssociatedFormControl } from '../../utils/mixins/FormInternalsMixin';\n/**\n * mdc-input is a component that allows users to input text.\n * It contains:\n * - label field - describe the input field.\n * - input field - contains the value\n * - help text or validation message - displayed below the input field.\n * - trailing button - it displays a clear the input field.\n * - prefix text - displayed before the input field.\n * - leading icon - displayed before the input field.\n * - clear-aria-label - aria label for the trailing button.\n * - all the attributes of the input field.\n *\n * @tagname mdc-input\n *\n * @event input - (React: onInput) This event is dispatched when the value of the input field changes (every press).\n * @event change - (React: onChange) This event is dispatched when the value of the input field changes (on blur).\n * @event focus - (React: onFocus) This event is dispatched when the input receives focus.\n * @event blur - (React: onBlur) This event is dispatched when the input loses focus.\n *\n * @dependency mdc-icon\n * @dependency mdc-text\n * @dependency mdc-button\n *\n * @cssproperty --mdc-input-disabled-border-color - Border color for the input container when disabled\n * @cssproperty --mdc-input-disabled-text-color - Text color for the input field when disabled\n * @cssproperty --mdc-input-disabled-background-color - Background color for the input field when disabled\n * @cssproperty --mdc-input-border-color - Border color for the input container\n * @cssproperty --mdc-input-text-color - Text color for the input field\n * @cssproperty --mdc-input-background-color - Background color for the input field\n * @cssproperty --mdc-input-selection-background-color - Background color for the selected text\n * @cssproperty --mdc-input-selection-text-color - Text color for the selected text\n * @cssproperty --mdc-input-support-text-color - Text color for the help text\n * @cssproperty --mdc-input-hover-background-color - Background color for the input field when hovered\n * @cssproperty --mdc-input-focused-background-color - Background color for the input field when focused\n * @cssproperty --mdc-input-focused-border-color - Border color for the input container when focused\n * @cssproperty --mdc-input-error-border-color - Border color for the input container when error\n * @cssproperty --mdc-input-warning-border-color - Border color for the input container when warning\n * @cssproperty --mdc-input-success-border-color - Border color for the input container when success\n * @cssproperty --mdc-input-primary-border-color - Border color for the input container when primary\n *\n */\n\nclass Input extends FormInternalsMixin(DataAriaLabelMixin(FormfieldWrapper)) implements AssociatedFormControl {\n /**\n * The placeholder text that is displayed when the input field is empty.\n */\n @property({ type: String }) placeholder = '';\n\n /**\n * readonly attribute of the input field. If true, the input field is read-only.\n */\n @property({ type: Boolean }) readonly = false;\n\n /**\n * The prefix text that is displayed before the input field. It has a max length of 10 characters.\n * When the prefix text is set, make sure to set the 'data-aria-label'\n * attribute with the appropriate value for accessibility.\n */\n @property({ type: String, attribute: 'prefix-text' }) prefixText?: string;\n\n /**\n * The leading icon that is displayed before the input field.\n */\n @property({ type: String, attribute: 'leading-icon' }) leadingIcon?: IconNames;\n\n /**\n * The trailing button when set to true, shows a clear button that clears the input field.\n * @default false\n */\n @property({ type: Boolean, attribute: 'trailing-button' }) trailingButton = false;\n\n /**\n * The maximum number of characters that the input field can accept.\n */\n @property({ type: Number }) maxlength?: number;\n\n /**\n * The minimum number of characters that the input field can accept.\n */\n @property({ type: Number }) minlength?: number;\n\n /**\n * The autocapitalize attribute of the input field.\n * @default 'off'\n */\n @property({ type: String }) override autocapitalize: AutoCapitalizeType = AUTO_CAPITALIZE.OFF;\n\n /**\n * The autocomplete attribute of the input field.\n * @default 'off'\n */\n @property({ type: String }) autocomplete: any = 'off';\n\n /**\n * If true, the input field is focused when the component is rendered.\n * @default false\n */\n @property({ type: Boolean }) override autofocus = false;\n\n /**\n * Specifies the name of the directionality of text for submission purposes (e.g., \"rtl\" for right-to-left).\n */\n @property({ type: String }) dirname?: string;\n\n /**\n * The pattern attribute of the input field.\n * Specifies a regular expression that the input value must match for validation purposes.\n */\n @property({ type: String }) pattern?: string;\n\n /**\n * The list attribute of the input field.\n * Identifies a list of pre-defined options to suggest to the user.\n */\n @property({ type: String }) list?: string;\n\n /**\n * The size attribute of the input field.\n * Specifies the width of the input field.\n * @default undefined\n */\n @property({ type: Number }) size?: number | undefined;\n\n /**\n * Aria label for the trailing button. If trailing button is set to true, this label is used for the clear button.\n * @default ''\n */\n @property({ type: String, attribute: 'clear-aria-label' }) clearAriaLabel = '';\n\n override connectedCallback(): void {\n super.connectedCallback();\n\n this.updateComplete.then(() => {\n if (this.inputElement) {\n this.inputElement.checkValidity();\n this.setInputValidity();\n this.internals.setFormValue(this.inputElement.value);\n }\n }).catch((error) => {\n if (this.onerror) {\n this.onerror(error);\n }\n });\n }\n\n /** @internal */\n formResetCallback(): void {\n this.value = '';\n this.requestUpdate();\n }\n\n /** @internal */\n formStateRestoreCallback(\n state: string,\n ): void {\n this.value = state;\n }\n\n /**\n * Handles the value change of the input field.\n * Sets the form value and updates the validity of the input field.\n * @returns void\n */\n handleValueChange() {\n this.updateComplete.then(() => {\n this.setInputValidity();\n }).catch((error) => {\n if (this.onerror) {\n this.onerror(error);\n }\n });\n }\n\n protected override updated(changedProperties: PropertyValueMap<any> | Map<PropertyKey, unknown>): void {\n super.updated(changedProperties);\n if (changedProperties.has('value')) {\n this.handleValueChange();\n }\n }\n\n private setInputValidity() {\n if (this.validationMessage && this.value === '') {\n this.inputElement.setCustomValidity(this.validationMessage);\n } else {\n this.inputElement.setCustomValidity('');\n }\n this.setValidity();\n }\n\n /**\n * This function is called when the attribute changes.\n * It updates the validity of the input field based on the input field's validity.\n *\n * @param name - attribute name\n * @param old - old value\n * @param value - new value\n */\n override attributeChangedCallback(\n name: string,\n old: string | null,\n value: string | null,\n ): void {\n super.attributeChangedCallback(name, old, value);\n\n const validationRelatedAttributes = [\n 'maxlength',\n 'minlength',\n 'pattern',\n 'required',\n ];\n\n if (validationRelatedAttributes.includes(name)) {\n this.updateComplete.then(() => {\n this.setInputValidity();\n }).catch((error) => {\n if (this.onerror) {\n this.onerror(error);\n }\n });\n }\n }\n\n /**\n * Updates the value of the input field.\n * Sets the form value.\n * @returns void\n */\n private updateValue() {\n this.value = this.inputElement.value;\n this.internals.setFormValue(this.inputElement.value);\n }\n\n /**\n * Handles the input event of the input field.\n * Updates the value and sets the validity of the input field.\n *\n */\n private onInput() {\n this.updateValue();\n this.setInputValidity();\n }\n\n /**\n * Handles the change event of the input field.\n * Updates the value and sets the validity of the input field.\n *\n * The 'change' event does not bubble up through the shadow DOM as it was not composed.\n * Therefore, we need to re-dispatch the same event to ensure it is propagated correctly.\n * Read more: https://developer.mozilla.org/en-US/docs/Web/API/Event/composed\n *\n * @param event - Event which contains information about the value change.\n */\n private onChange(event: Event) {\n this.updateValue();\n this.setInputValidity();\n const EventConstructor = event.constructor as typeof Event;\n this.dispatchEvent(new EventConstructor(event.type, event));\n }\n\n /**\n * Handles the keydown event of the input field.\n * If the key pressed is 'Enter', it submits the form.\n * @param event - Keyboard event\n */\n private handleKeyDown(event: KeyboardEvent) {\n if (event.key === 'Enter') {\n this.form?.requestSubmit();\n }\n }\n\n /**\n * Renders the leading icon before the input field.\n * If the leading icon is not set, it will not be displayed.\n *\n * @returns void\n */\n protected renderLeadingIcon() {\n if (!this.leadingIcon) {\n return nothing;\n }\n return html`\n <mdc-icon \n class=\"leading-icon\" \n part=\"leading-icon\"\n name=${this.leadingIcon} \n size=\"${DEFAULTS.ICON_SIZE_VALUE}\" \n length-unit=\"${DEFAULTS.ICON_SIZE_UNIT}\">\n </mdc-icon>\n `;\n }\n\n /**\n * Renders the prefix text before the input field.\n * If the prefix text is more than 10 characters,\n * - it will not be displayed.\n * - the validation messsage will be displayed.\n *\n * Note: We are setting aria-hidden so that the screen reader does not read the prefix text.\n * The consumers should set the appropriate aria-label for the input field using 'data-aria-label' attribute.\n * @returns void\n */\n protected renderPrefixText() {\n if (!this.prefixText) {\n return nothing;\n }\n return html`\n <mdc-text \n class=\"prefix-text\" \n tagname=\"${DEFAULTS.PREFIX_TEXT_TAG}\" \n type=\"${DEFAULTS.PREFIX_TEXT_TYPE}\"\n aria-hidden=\"true\"\n >\n ${this.prefixText.slice(0, PREFIX_TEXT_OPTIONS.MAX_LENGTH)}\n </mdc-text>\n `;\n }\n\n /**\n * Clears the input field.\n */\n private clearInputText() {\n this.value = '';\n // focus the input field after clearing the text\n this.inputElement?.focus();\n }\n\n /**\n * Renders the trailing button to clear the input field if the trailingButton is set to true.\n * @returns void\n */\n protected renderTrailingButton() {\n if (!this.trailingButton) {\n return nothing;\n }\n return html`\n <mdc-button \n part='trailing-button'\n class='own-focus-ring ${!this.value ? 'hidden' : ''}'\n prefix-icon='${DEFAULTS.CLEAR_BUTTON_ICON}'\n variant='${DEFAULTS.CLEAR_BUTTON_VARIANT}'\n size=\"${DEFAULTS.CLEAR_BUTTON_SIZE}\"\n aria-label=\"${this.clearAriaLabel}\"\n @click=${this.clearInputText}\n ?disabled=${this.disabled || this.readonly || !this.value}\n ></mdc-button>\n `;\n }\n\n public override render() {\n return html`\n ${this.renderLabel()}\n <div class=\"input-container mdc-focus-ring\" part=\"input-container\">\n <slot name=\"input-leading-icon\">${this.renderLeadingIcon()}</slot>\n <div class=\"input-section\" part=\"input-section\">\n <slot name=\"input-prefix-text\">${this.renderPrefixText()}</slot>\n <slot name=\"input\">\n <input \n aria-label=\"${this.dataAriaLabel ?? ''}\"\n class='input'\n part='input'\n id=\"${this.id}\"\n name=\"${this.name}\"\n .value=\"${this.value}\"\n ?disabled=\"${this.disabled}\"\n ?readonly=\"${this.readonly}\"\n ?required=\"${!!this.requiredLabel}\"\n type=\"text\"\n aria-describedby=\"${ifDefined(this.helpText ? FORMFIELD_DEFAULTS.HELPER_TEXT_ID : '')}\"\n aria-invalid=\"${this.helpTextType === 'error' ? 'true' : 'false'}\"\n placeholder=${ifDefined(this.placeholder)}\n minlength=${ifDefined(this.minlength)}\n maxlength=${ifDefined(this.maxlength)}\n autocapitalize=${this.autocapitalize}\n autocomplete=${this.autocomplete}\n ?autofocus=\"${this.autofocus}\"\n dirname=${ifDefined(this.dirname)}\n pattern=${ifDefined(this.pattern)}\n list=${ifDefined(this.list)}\n size=${ifDefined(this.size)}\n @input=${this.onInput}\n @change=${this.onChange}\n @keydown=${this.handleKeyDown}\n />\n </slot>\n </div>\n <slot name=\"trailing-button\">${this.renderTrailingButton()}</slot>\n </div>\n ${this.helpText ? this.renderHelperText() : nothing}\n `;\n }\n\n public static override styles: Array<CSSResult> = [...FormfieldWrapper.styles, ...styles];\n}\n\nexport default Input;\n", "import Input from './input.component';\nimport { TAG_NAME } from './input.constants';\nimport '../button';\nimport '../icon';\nimport '../text';\n\nInput.register(TAG_NAME);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n ['mdc-input']: Input\n }\n}\n\nexport default Input;\n", "import utils from '../../utils/tag-name';\n\nconst TAG_NAME = utils.constructTagName('link');\n\nconst LINK_SIZES = {\n LARGE: 'large',\n MIDSIZE: 'midsize',\n SMALL: 'small',\n} as const;\n\nconst LINK_ICON_SIZES = {\n LARGE: 1,\n MIDSIZE: 0.875,\n SMALL: 0.75,\n} as const;\n\nconst DEFAULTS = {\n INLINE: false,\n INVERTED: false,\n LINK_SIZE: LINK_SIZES.LARGE,\n};\n\nexport {\n DEFAULTS,\n LINK_ICON_SIZES,\n LINK_SIZES,\n TAG_NAME,\n};\n", "import { css } from 'lit';\nimport { hostFitContentStyles, hostFocusRingStyles } from '../../utils/styles';\n\nconst styles = [hostFitContentStyles, css`\n\n :host {\n\n --mdc-link-border-radius: 0.25rem;\n --mdc-link-color-active: var(--mds-color-theme-text-accent-active);\n --mdc-link-color-disabled: var(--mds-color-theme-text-primary-disabled);\n --mdc-link-color-hover: var(--mds-color-theme-text-accent-hover);\n --mdc-link-color-normal: var(--mds-color-theme-text-accent-normal);\n --mdc-link-icon-margin-left: 0.25rem;\n --mdc-link-inverted-color-active: var(--mds-color-theme-inverted-text-accent-active);\n --mdc-link-inverted-color-disabled: var(--mds-color-theme-inverted-text-primary-disabled);\n --mdc-link-inverted-color-hover: var(--mds-color-theme-inverted-text-accent-hover);\n --mdc-link-inverted-color-normal: var(--mds-color-theme-inverted-text-accent-normal);\n --mdc-link-text-decoration-disabled: underline;\n }\n\n :host::part(link-container){\n border-radius: var(--mdc-link-border-radius);\n color: var(--mdc-link-color-normal);\n }\n\n ::slotted(a) {\n outline: none;\n align-items: center;\n color: inherit;\n display: flex;\n gap: var(--mdc-link-icon-margin-left);\n text-decoration: inherit;\n text-underline-offset: auto;\n text-underline-position: from-font;\n }\n\n :host(:hover)::part(link-container) {\n color: var(--mdc-link-color-hover);\n }\n\n :host(:active)::part(link-container) {\n color: var(--mdc-link-color-active);\n }\n\n :host([inline]) {\n display: inline-flex;\n }\n\n :host([inverted])::part(link-container) {\n color: var(--mdc-link-inverted-color-normal);\n }\n\n :host([inverted]:hover)::part(link-container) {\n color: var(--mdc-link-inverted-color-hover);\n }\n\n :host([inverted]:active)::part(link-container) {\n color: var(--mdc-link-inverted-color-active);\n }\n\n :host([size=\"large\"])::part(link-container) {\n font-size: var(--mds-font-apps-body-large-regular-font-size);\n font-weight: var(--mds-font-apps-body-large-regular-font-weight);\n line-height: var(--mds-font-apps-body-large-regular-line-height);\n text-decoration: var(--mds-font-apps-body-large-regular-text-decoration);\n text-transform: var(--mds-font-apps-body-large-regular-text-case);\n }\n\n :host([size=\"midsize\"])::part(link-container) {\n font-size: var(--mds-font-apps-body-midsize-regular-font-size);\n font-weight: var(--mds-font-apps-body-midsize-regular-font-weight);\n line-height: var(--mds-font-apps-body-midsize-regular-line-height);\n text-decoration: var(--mds-font-apps-body-midsize-regular-text-decoration);\n text-transform: var(--mds-font-apps-body-midsize-regular-text-case);\n }\n\n :host([size=\"small\"])::part(link-container) {\n font-size: var(--mds-font-apps-body-small-regular-font-size);\n font-weight: var(--mds-font-apps-body-small-regular-font-weight);\n line-height: var(--mds-font-apps-body-small-regular-line-height);\n text-decoration: var(--mds-font-apps-body-small-regular-text-decoration);\n text-transform: var(--mds-font-apps-body-small-regular-text-case);\n }\n\n :host([size=\"large\"]:hover)::part(link-container),\n :host([size=\"large\"]:active)::part(link-container),\n :host([size=\"large\"][inline])::part(link-container) {\n font-size: var(--mds-font-apps-body-large-regular-underline-font-size);\n font-weight: var(--mds-font-apps-body-large-regular-underline-font-weight);\n line-height: var(--mds-font-apps-body-large-regular-underline-line-height);\n text-decoration: var(--mds-font-apps-body-large-regular-underline-text-decoration);\n text-transform: var(--mds-font-apps-body-large-regular-underline-text-case);\n }\n\n :host([size=\"midsize\"]:hover)::part(link-container),\n :host([size=\"midsize\"]:active)::part(link-container),\n :host([size=\"midsize\"][inline])::part(link-container) {\n font-size: var(--mds-font-apps-body-midsize-regular-underline-font-size);\n font-weight: var(--mds-font-apps-body-midsize-regular-underline-font-weight);\n line-height: var(--mds-font-apps-body-midsize-regular-underline-line-height);\n text-decoration: var(--mds-font-apps-body-midsize-regular-underline-text-decoration);\n text-transform: var(--mds-font-apps-body-midsize-regular-underline-text-case);\n }\n\n :host([size=\"small\"]:hover)::part(link-container),\n :host([size=\"small\"]:active)::part(link-container),\n :host([size=\"small\"][inline])::part(link-container) {\n font-size: var(--mds-font-apps-body-small-regular-underline-font-size);\n font-weight: var(--mds-font-apps-body-small-regular-underline-font-weight);\n line-height: var(--mds-font-apps-body-small-regular-underline-line-height);\n text-decoration: var(--mds-font-apps-body-small-regular-underline-text-decoration);\n text-transform: var(--mds-font-apps-body-small-regular-underline-text-case);\n }\n\n :host([disabled])::part(link-container) {\n color: var(--mdc-link-color-disabled);\n pointer-events: none;\n }\n\n :host([inverted][disabled])::part(link-container) {\n color: var(--mdc-link-inverted-color-disabled);\n }\n`, ...hostFocusRingStyles(true),\ncss`\n :host(:active)::part(link-container) {\n box-shadow: none;\n }\n`];\n\nexport default styles;\n", "import type { PropertyValues } from 'lit';\nimport { CSSResult, html } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport { Component } from '../../models';\nimport { DisabledMixin } from '../../utils/mixins/DisabledMixin';\nimport { IconNameMixin } from '../../utils/mixins/IconNameMixin';\nimport { DEFAULTS, LINK_ICON_SIZES, LINK_SIZES } from './link.constants';\nimport styles from './link.styles';\nimport type { LinkSize } from './link.types';\n\n/**\n * `mdc-link` component can be used to navigate to a different page\n * within the application or to an external site. It can be used to link to\n * emails or phone numbers.\n *\n * The `children` of the link component is expected to be an anchor element\n * containing the text, href, and other attributes.\n *\n * For `icon`, the `mdc-icon` component is used to render the icon.\n *\n * @dependency mdc-icon\n *\n * @tagname mdc-link\n *\n * @cssproperty --mdc-link-border-radius - Border radius of the link\n * @cssproperty --mdc-link-color-active - Text and icon color of the link in active state\n * @cssproperty --mdc-link-color-disabled - Text and icon color of the link in disabled state\n * @cssproperty --mdc-link-color-hover - Text and icon color of the link in hover state\n * @cssproperty --mdc-link-color-normal - Text and icon color of the link in normal state\n * @cssproperty --mdc-link-icon-margin-left - Gap between the text and icon (only applicable when an icon is set)\n * @cssproperty --mdc-link-inverted-color-active - Text and icon color of the inverted link in active state\n * @cssproperty --mdc-link-inverted-color-disabled - Text and icon color of the inverted link in disabled state\n * @cssproperty --mdc-link-inverted-color-hover - Text and icon color of the inverted link in hover state\n * @cssproperty --mdc-link-inverted-color-normal - Text and icon color of the inverted link in normal state\n * @cssproperty --mdc-link-text-decoration-disabled - Text decoration of the link in disabled state for all variants\n */\nclass Link extends DisabledMixin(IconNameMixin(Component)) {\n /**\n * The link can be inline or standalone.\n * @default false\n */\n @property({ type: Boolean, reflect: true })\n inline: boolean = DEFAULTS.INLINE;\n\n /**\n * The link color can be inverted by setting the inverted attribute to true.\n * @default false\n */\n @property({ type: Boolean, reflect: true })\n inverted: boolean = DEFAULTS.INVERTED;\n\n /**\n * Size of the link.\n * Acceptable values include:\n *\n * - 'small'\n * - 'midsize'\n * - 'large'\n *\n * @default large\n */\n @property({ type: String, reflect: true })\n size: LinkSize = DEFAULTS.LINK_SIZE;\n\n /**\n * Used to store the previous tabindex value of the host element\n * null value means that the host element did not have a tabindex attribute.\n * @internal\n */\n private prevTabindex : number | null = null;\n\n /**\n * Method to get the size of the trailing icon based on the link size.\n * @returns The icon size value and units.\n */\n private getIconSize(): number {\n switch (this.size) {\n case LINK_SIZES.SMALL:\n return LINK_ICON_SIZES.SMALL;\n case LINK_SIZES.MIDSIZE:\n return LINK_ICON_SIZES.MIDSIZE;\n default:\n return LINK_ICON_SIZES.LARGE;\n }\n }\n\n /**\n * Updates the tabindex of the host element to disable or enable the link.\n * When disabled, the link is not focusable or clickable, and tabindex is set to -1\n * and aria-disabled attribute is set to true\n * When link is not disabled, the previous tabindex of the host element is restored\n * and aria-disabled attribute is removed.\n *\n * @param disabled - The disabled state of icon\n */\n private setDisabled(disabled: boolean) {\n if (disabled) {\n this.prevTabindex = this.hasAttribute('tabindex') ? this.tabIndex : null;\n this.tabIndex = -1;\n this.setAttribute('aria-disabled', 'true');\n } else if (this.prevTabindex === null) {\n this.removeAttribute('tabindex');\n this.removeAttribute('aria-disabled');\n } else {\n this.tabIndex = this.prevTabindex;\n this.removeAttribute('aria-disabled');\n }\n }\n\n /**\n * Method to create and append trailing icon to the first anchor element in the slot.\n * If no icon name is provided, no icon will be rendered.\n */\n private updateTrailingIcon() {\n const anchorElement = this.shadowRoot?.querySelector('slot')\n ?.assignedElements({ flatten: true }).find((element) => element.tagName === 'A');\n\n const iconSize = this.getIconSize();\n\n if (this.iconName && anchorElement) {\n const trailingIcon = document.createElement('mdc-icon');\n trailingIcon.setAttribute('name', this.iconName);\n trailingIcon.setAttribute('size', `${iconSize}`);\n trailingIcon.setAttribute('length-unit', 'rem');\n anchorElement.appendChild(trailingIcon);\n }\n }\n\n public override update(changedProperties: PropertyValues): void {\n super.update(changedProperties);\n if (changedProperties.has('disabled')) {\n this.setDisabled(this.disabled);\n }\n }\n\n public override render() {\n return html`\n <div part='link-container' class='mdc-focus-ring'>\n <slot @slotchange=${this.updateTrailingIcon}></slot>\n </div>\n `;\n }\n\n public static override styles: Array<CSSResult> = [...Component.styles, ...styles];\n}\n\nexport default Link;\n", "import Link from './link.component';\nimport { TAG_NAME } from './link.constants';\nimport '../icon';\n\nLink.register(TAG_NAME);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n ['mdc-link']: Link\n }\n}\n\nexport default Link;\n", "import utils from '../../utils/tag-name';\n\nconst TAG_NAME = utils.constructTagName('listitem');\n\nconst LISTITEM_VARIANTS = {\n FULL_WIDTH: 'full-width',\n INSET_PILL: 'inset-pill',\n INSET_RECTANGLE: 'inset-rectangle',\n} as const;\n\nconst DEFAULTS = {\n VARIANT: LISTITEM_VARIANTS.FULL_WIDTH,\n} as const;\n\nexport { DEFAULTS, TAG_NAME, LISTITEM_VARIANTS };\n", "import utils from '../../utils/tag-name';\n\nconst TAG_NAME = utils.constructTagName('list');\n\nconst KEYS = {\n ARROW_DOWN: 'ArrowDown',\n ARROW_UP: 'ArrowUp',\n HOME: 'Home',\n END: 'End',\n} as const;\n\nconst HEADER_ID = 'header-id';\n\nexport { TAG_NAME, KEYS, HEADER_ID };\n", "import { css } from 'lit';\n\nconst styles = css`\n :host::part(header-text) {\n padding: 0.5rem 0.75rem;\n }\n`;\n\nexport default [styles];\n", "import type { CSSResult } from 'lit';\nimport { html, nothing } from 'lit';\nimport { property, queryAssignedElements } from 'lit/decorators.js';\nimport { Component } from '../../models';\nimport { DataAriaLabelMixin } from '../../utils/mixins/DataAriaLabelMixin';\nimport { TAG_NAME as LISTITEM_TAGNAME } from '../listitem/listitem.constants';\nimport { TYPE, VALID_TEXT_TAGS } from '../text/text.constants';\nimport { HEADER_ID, KEYS } from './list.constants';\nimport styles from './list.styles';\n\n/**\n * mdc-list component is used to display a group of list items. It is used as a container to wrap other list items.\n *\n * @tagname mdc-list\n *\n * @dependency mdc-text\n *\n * @slot default - This is a default/unnamed slot\n */\nclass List extends DataAriaLabelMixin(Component) {\n @queryAssignedElements({ selector: LISTITEM_TAGNAME })\n listItems!: Array<HTMLElement>;\n\n /**\n * The header text of the list.\n */\n @property({ type: String, attribute: 'header-text', reflect: true }) headerText?: string;\n\n constructor() {\n super();\n this.addEventListener('keydown', this.handleKeyDown);\n }\n\n /**\n * Handles the keydown event on the list element.\n * If the key is 'ArrowUp' or 'ArrowDown', it focuses to the previous or next list item\n * and sets the active tabindex of the list item.\n * Prevents the default event behavior.\n * @param event - The keyboard event.\n */\n private handleKeyDown(event: KeyboardEvent): void {\n const currentIndex = this.getCurrentIndex(event.target);\n const newIndex = this.getNewIndexBasedOnKey(event.key, currentIndex, this.listItems.length);\n if (newIndex !== undefined) {\n this.listItems[newIndex]?.focus();\n this.resetTabIndexAndSetActiveTabIndex(newIndex);\n }\n }\n\n /**\n * Returns the index of the given target in the listItems array.\n * If the target is not a list item, but a child element of a list item,\n * it returns the index of the parent list item.\n * @param target - The target element to find the index of.\n * @returns The index of the target element in the listItems array.\n */\n private getCurrentIndex(target: EventTarget | null): number {\n return this.listItems.findIndex((node) => node === target || node === (target as HTMLElement).parentElement);\n }\n\n /**\n * Calculates a new index based on the pressed keyboard key.\n * Supports navigation keys for moving focus within a list.\n * @param key - The key that was pressed.\n * @param currentIndex - The current index of the focused list item.\n * @param wrappedDivsCount - The total number of list items.\n * @returns The new index to focus on, or undefined if the key is not supported.\n */\n private getNewIndexBasedOnKey(key: string, currentIndex: number, wrappedDivsCount: number): number | undefined {\n switch (key) {\n case KEYS.ARROW_DOWN:\n return (currentIndex + 1) % wrappedDivsCount;\n case KEYS.ARROW_UP:\n return (currentIndex - 1 + wrappedDivsCount) % wrappedDivsCount;\n case KEYS.HOME:\n return 0;\n case KEYS.END:\n return wrappedDivsCount - 1;\n default:\n return undefined;\n }\n }\n\n /**\n * Handles the mouse click event on the list element.\n * Finds the index of the target element in the list items array and calls\n * `resetTabIndexAndSetActiveTabIndex` with that index.\n * @param event - The mouse event.\n */\n private handleMouseClick(event: MouseEvent): void {\n const newIndex = this.getCurrentIndex(event.target);\n this.resetTabIndexAndSetActiveTabIndex(newIndex);\n }\n\n /**\n * Resets all list items tabindex to -1 and sets the tabindex of the\n * element at the given index to 0, effectively setting the active\n * element. This is used when navigating the list via keyboard.\n *\n * @param newIndex - The index of the new active element in the list.\n */\n private resetTabIndexAndSetActiveTabIndex(newIndex: number) {\n this.listItems.forEach((node, index) => {\n const newTabindex = newIndex === index ? '0' : '-1';\n node?.setAttribute('tabindex', newTabindex);\n });\n }\n\n public override firstUpdated(): void {\n // For the first, we set the first element only as active.\n this.resetTabIndexAndSetActiveTabIndex(0);\n }\n\n public override render() {\n const headerText = this.headerText ? html`\n <mdc-text\n id=\"${HEADER_ID}\"\n part=\"header-text\"\n type=\"${TYPE.BODY_MIDSIZE_BOLD}\"\n tagname=\"${VALID_TEXT_TAGS.SPAN}\"\n >${this.headerText}</mdc-text>\n ` : nothing;\n return html`\n <div\n role=\"list\"\n aria-labelledby=\"${this.headerText ? HEADER_ID : ''}\"\n aria-label=\"${this.dataAriaLabel ?? ''}\"\n >\n ${headerText}\n <slot role=\"presentation\" @click=\"${this.handleMouseClick}\"></slot>\n </div>\n `;\n }\n\n public static override styles: Array<CSSResult> = [...Component.styles, ...styles];\n}\n\nexport default List;\n", "import List from './list.component';\nimport { TAG_NAME } from './list.constants';\nimport '../text';\n\nList.register(TAG_NAME);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n ['mdc-list']: List\n }\n}\n\nexport default List;\n", "import { css } from 'lit';\nimport { hostFocusRingStyles } from '../../utils/styles';\n\nconst styles = css`\n :host {\n --mdc-listitem-default-background-color: var(--mds-color-theme-background-primary-ghost);\n --mdc-listitem-background-color-hover: var(--mds-color-theme-background-primary-hover);\n --mdc-listitem-background-color-active: var(--mds-color-theme-background-primary-active);\n --mdc-listitem-primary-label-color: var(--mds-color-theme-text-primary-normal);\n --mdc-listitem-secondary-label-color: var(--mds-color-theme-text-secondary-normal);\n --mdc-listitem-disabled-color: var(--mds-color-theme-text-primary-disabled);\n }\n :host {\n background-color: var(--mdc-listitem-default-background-color);\n column-gap: 0.75rem;\n cursor: pointer;\n display: flex;\n flex-direction: row;\n padding: 0.5rem 0.75rem;\n width: 100%;\n }\n :host([variant=\"inset-rectangle\"]) {\n border-radius: 0.5rem;\n }\n :host([variant=\"inset-pill\"]) {\n border-radius: 3.125rem;\n }\n :host([disabled]),\n :host([disabled])::part(leading-text-secondary-label),\n :host([disabled])::part(leading-text-tertiary-label),\n :host([disabled])::part(leading-text-primary-label),\n :host([disabled])::part(trailing-text-side-header),\n :host([disabled])::part(trailing-text-subline) {\n color: var(--mdc-listitem-disabled-color);\n cursor: default;\n }\n :host(:hover) {\n background-color: var(--mdc-listitem-background-color-hover);\n }\n :host(:active) {\n background-color: var(--mdc-listitem-background-color-active);\n }\n :host::part(trailing) {\n margin-left: auto;\n }\n :host::part(trailing):dir(rtl) {\n margin-left: unset;\n margin-right: auto;\n }\n :host::part(leading), :host::part(trailing) {\n align-items: center;\n column-gap: 0.75rem;\n display: flex;\n }\n :host::part(leading-text-secondary-label), :host::part(leading-text-tertiary-label) {\n color: var(--mdc-listitem-secondary-label-color);\n }\n :host::part(leading-text-primary-label), :host::part(trailing-text-side-header), :host::part(trailing-text-subline) {\n color: var(--mdc-listitem-primary-label-color);\n }\n :host::part(trailing-text) {\n text-align: right;\n }\n ::slotted([slot=\"leading-controls\"]), ::slotted([slot=\"trailing-controls\"]) {\n align-items: center;\n column-gap: 0.75rem;\n display: flex;\n flex-direction: row;\n }\n`;\nexport default [styles, ...hostFocusRingStyles()];\n", "import type { CSSResult, PropertyValues } from 'lit';\nimport { html, nothing, TemplateResult } from 'lit';\nimport { property, queryAssignedElements } from 'lit/decorators.js';\nimport { Component } from '../../models';\nimport { DataAriaLabelMixin } from '../../utils/mixins/DataAriaLabelMixin';\nimport { DisabledMixin } from '../../utils/mixins/DisabledMixin';\nimport { TabIndexMixin } from '../../utils/mixins/TabIndexMixin';\nimport { TYPE, VALID_TEXT_TAGS } from '../text/text.constants';\nimport type { TextType } from '../text/text.types';\nimport { DEFAULTS } from './listitem.constants';\nimport styles from './listitem.styles';\nimport type { ListItemVariants } from './listitem.types';\n\n/**\n * mdc-listitem component is used to display a label with different types of controls.\n * There can be three types of controls, a radio button, a checkbox on the\n * leading side and a toggle on the trailing side.\n * The list item can contain an avatar on the leading side and a badge on the trailing side.\n * Additionally, the list item can contain a side header and a subline text.\n *\n * The leading and trailing slots can be used to display controls and text. <br/>\n * Based on the leading/trailing slot, the position of the controls and text can be adjusted. <br/>\n * Please use mdc-list as a parent element even when there is only listitem for a11y purpose.\n *\n * @tagname mdc-listitem\n *\n * @dependency mdc-text\n *\n * @slot leading-controls - slot for list item controls to appear of leading end.\n * @slot leading-text-primary-label - slot for list item primary label.\n * @slot leading-text-secondary-label - slot for list item secondary label.\n * @slot leading-text-tertiary-label - slot for list item tertiary label.\n * @slot trailing-text-side-header - slot for list item side header text.\n * @slot trailing-text-subline - slot for list item subline text.\n * @slot trailing-controls - slot for list item controls to appear of trailing end.\n *\n * @cssproperty --mdc-listitem-default-background-color - Allows customization of the default background color.\n * @cssproperty --mdc-listitem-background-color-hover - Allows customization of the background color on hover.\n * @cssproperty --mdc-listitem-background-color-active - Allows customization of the background color when pressed.\n * @cssproperty --mdc-listitem-primary-label-color\n * - Allows customization of the primary label, side header and subline text slot color.\n * @cssproperty --mdc-listitem-secondary-label-color\n * - Allows customization of the secondary and teritary label text slot color.\n */\nclass ListItem extends DataAriaLabelMixin(DisabledMixin(TabIndexMixin(Component))) {\n @queryAssignedElements({ slot: 'leading-controls' })\n leadingControlsSlot!: Array<HTMLElement>;\n\n @queryAssignedElements({ slot: 'trailing-controls' })\n trailingControlsSlot!: Array<HTMLElement>;\n\n /**\n * The variant of the list item. It can be a pill, rectangle or a full-width.\n * @default 'full-width'\n */\n @property({ type: String, reflect: true }) variant: ListItemVariants = DEFAULTS.VARIANT;\n\n /**\n * The primary label of the list item.\n * This appears on the leading side of the list item.\n */\n @property({ type: String, reflect: true }) label?: string;\n\n /**\n * The secondary label of the list item.\n * This appears on the leading side of the list item.\n */\n @property({ type: String, reflect: true, attribute: 'secondary-label' }) secondaryLabel?: string;\n\n /**\n * The tertiary label of the list item.\n * This appears on the leading side of the list item.\n */\n @property({ type: String, reflect: true, attribute: 'tertiary-label' }) tertiaryLabel?: string;\n\n /**\n * The header text of the list item.\n * This appears on the trailing side of the list item.\n */\n @property({ type: String, reflect: true, attribute: 'side-header-text' }) sideHeaderText?: string;\n\n /**\n * The subline text of the list item.\n * This appears on the trailing side of the list item.\n */\n @property({ type: String, reflect: true, attribute: 'subline-text' }) sublineText?: string;\n\n constructor() {\n super();\n this.role = 'listitem';\n }\n\n /**\n * Generates a template for a text slot with the specified content.\n *\n * @param slotName - The name of the slot to be used.\n * @param type - The type of the text element.\n * @param content - The text content to be displayed within the slot.\n * @returns A TemplateResult containing a slot with an `mdc-text` element of type BODY_SMALL_REGULAR.\n */\n private getText(slotName: string, type: TextType, content?: string): TemplateResult | typeof nothing {\n if (!content) {\n return nothing;\n }\n return html`\n <slot name=\"${slotName}\">\n <mdc-text part=\"${slotName}\" type=\"${type}\" tagname=\"${VALID_TEXT_TAGS.SPAN}\">${content}</mdc-text>\n </slot>\n `;\n }\n\n /**\n * Disable or enable all slotted elements in the leading and trailing slots.\n * This is useful when the list item is disabled, to prevent the user from interacting with the controls.\n * @param disabled - Whether to disable or enable the controls.\n */\n private disableSlottedChildren(disabled: boolean): void {\n [...this.leadingControlsSlot, ...this.trailingControlsSlot].forEach((element) => {\n if (disabled) {\n element.setAttribute('disabled', '');\n } else {\n element.removeAttribute('disabled');\n }\n });\n }\n\n public override update(changedProperties: PropertyValues): void {\n super.update(changedProperties);\n\n if (changedProperties.has('disabled')) {\n this.tabIndex = this.disabled ? -1 : 0;\n this.disableSlottedChildren(this.disabled);\n }\n }\n\n public override render() {\n return html`\n <div part=\"leading\">\n <slot name=\"leading-controls\"></slot>\n <div part=\"leading-text\">\n ${this.getText('leading-text-primary-label', TYPE.BODY_MIDSIZE_REGULAR, this.label)}\n ${this.getText('leading-text-secondary-label', TYPE.BODY_SMALL_REGULAR, this.secondaryLabel)}\n ${this.getText('leading-text-tertiary-label', TYPE.BODY_SMALL_REGULAR, this.tertiaryLabel)}\n </div>\n </div>\n <div part=\"trailing\">\n <div part=\"trailing-text\">\n ${this.getText('trailing-text-side-header', TYPE.BODY_MIDSIZE_REGULAR, this.sideHeaderText)}\n ${this.getText('trailing-text-subline', TYPE.BODY_SMALL_REGULAR, this.sublineText)}\n </div>\n <slot name=\"trailing-controls\"></slot>\n </div>\n `;\n }\n\n public static override styles: Array<CSSResult> = [...Component.styles, ...styles];\n}\n\nexport default ListItem;\n", "import ListItem from './listitem.component';\nimport { TAG_NAME } from './listitem.constants';\nimport '../text';\n\nListItem.register(TAG_NAME);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n ['mdc-listitem']: ListItem\n }\n}\n\nexport default ListItem;\n", "import { css } from 'lit';\n\nconst styles = css`\n :host {\n --mdc-marker-width: 0.25rem;\n --mdc-marker-solid-background-color: var(--mds-color-theme-outline-secondary-normal);\n --mdc-marker-striped-color: var(--mds-color-theme-outline-secondary-normal);\n --mdc-marker-striped-background-color: transparent; \n\n width: var(--mdc-marker-width);\n height: 100%;\n display: block;\n }\n\n :host([variant='solid']) {\n background: var(--mdc-marker-solid-background-color);\n }\n\n :host([variant='striped']) {\n background: repeating-linear-gradient(\n 135deg,\n var(--mdc-marker-striped-color),\n var(--mdc-marker-striped-color) 0.1875rem,\n var(--mdc-marker-striped-background-color) 0.1875rem, \n var(--mdc-marker-striped-background-color) 0.375rem\n );\n }\n`;\n\nexport default [styles];\n", "import utils from '../../utils/tag-name';\n\nconst TAG_NAME = utils.constructTagName('marker');\n\nconst MARKER_VARIANTS = {\n SOLID: 'solid',\n STRIPED: 'striped',\n} as const;\n\nexport { TAG_NAME, MARKER_VARIANTS };\n", "import { CSSResult } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport styles from './marker.styles';\nimport { Component } from '../../models';\nimport type { MarkerVariants } from './marker.types';\nimport { MARKER_VARIANTS } from './marker.constants';\n\n/**\n * `mdc-marker`, which is a vertical line and\n * used to draw attention to specific parts of\n * the content or to signify important information.\n *\n * **Marker Variants**:\n * - **solid**: Solid marker.\n * - **striped**: Striped marker.\n *\n * @tagname mdc-marker\n *\n * @cssproperty --mdc-marker-solid-background-color - Allows customization of the default background color\n * in solid variant.\n * @cssproperty --mdc-marker-striped-color - Allows customization of the default stripes in striped variant.\n * @cssproperty --mdc-marker-striped-background-color - Allows customization of the default background color\n * in striped variant.\n * @cssproperty --mdc-marker-width - Allows customization of the default width.\n */\nclass Marker extends Component {\n /**\n * There are two variants of markers, each with a width of 0.25rem:\n * - **solid**: Solid marker.\n * - **striped**: Striped marker.\n * @default solid\n */\n @property({ type: String, reflect: true })\n public variant: MarkerVariants = MARKER_VARIANTS.SOLID;\n\n public static override styles: Array<CSSResult> = [...Component.styles, ...styles];\n}\n\nexport default Marker;\n", "import Marker from './marker.component';\nimport { TAG_NAME } from './marker.constants';\n\nMarker.register(TAG_NAME);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n ['mdc-marker']: Marker\n }\n}\n\nexport default Marker;\n", "/**\n * Custom positioning reference element.\n * @see https://floating-ui.com/docs/virtual-elements\n */\n\nconst sides = ['top', 'right', 'bottom', 'left'];\nconst alignments = ['start', 'end'];\nconst placements = /*#__PURE__*/sides.reduce((acc, side) => acc.concat(side, side + \"-\" + alignments[0], side + \"-\" + alignments[1]), []);\nconst min = Math.min;\nconst max = Math.max;\nconst round = Math.round;\nconst floor = Math.floor;\nconst createCoords = v => ({\n x: v,\n y: v\n});\nconst oppositeSideMap = {\n left: 'right',\n right: 'left',\n bottom: 'top',\n top: 'bottom'\n};\nconst oppositeAlignmentMap = {\n start: 'end',\n end: 'start'\n};\nfunction clamp(start, value, end) {\n return max(start, min(value, end));\n}\nfunction evaluate(value, param) {\n return typeof value === 'function' ? value(param) : value;\n}\nfunction getSide(placement) {\n return placement.split('-')[0];\n}\nfunction getAlignment(placement) {\n return placement.split('-')[1];\n}\nfunction getOppositeAxis(axis) {\n return axis === 'x' ? 'y' : 'x';\n}\nfunction getAxisLength(axis) {\n return axis === 'y' ? 'height' : 'width';\n}\nfunction getSideAxis(placement) {\n return ['top', 'bottom'].includes(getSide(placement)) ? 'y' : 'x';\n}\nfunction getAlignmentAxis(placement) {\n return getOppositeAxis(getSideAxis(placement));\n}\nfunction getAlignmentSides(placement, rects, rtl) {\n if (rtl === void 0) {\n rtl = false;\n }\n const alignment = getAlignment(placement);\n const alignmentAxis = getAlignmentAxis(placement);\n const length = getAxisLength(alignmentAxis);\n let mainAlignmentSide = alignmentAxis === 'x' ? alignment === (rtl ? 'end' : 'start') ? 'right' : 'left' : alignment === 'start' ? 'bottom' : 'top';\n if (rects.reference[length] > rects.floating[length]) {\n mainAlignmentSide = getOppositePlacement(mainAlignmentSide);\n }\n return [mainAlignmentSide, getOppositePlacement(mainAlignmentSide)];\n}\nfunction getExpandedPlacements(placement) {\n const oppositePlacement = getOppositePlacement(placement);\n return [getOppositeAlignmentPlacement(placement), oppositePlacement, getOppositeAlignmentPlacement(oppositePlacement)];\n}\nfunction getOppositeAlignmentPlacement(placement) {\n return placement.replace(/start|end/g, alignment => oppositeAlignmentMap[alignment]);\n}\nfunction getSideList(side, isStart, rtl) {\n const lr = ['left', 'right'];\n const rl = ['right', 'left'];\n const tb = ['top', 'bottom'];\n const bt = ['bottom', 'top'];\n switch (side) {\n case 'top':\n case 'bottom':\n if (rtl) return isStart ? rl : lr;\n return isStart ? lr : rl;\n case 'left':\n case 'right':\n return isStart ? tb : bt;\n default:\n return [];\n }\n}\nfunction getOppositeAxisPlacements(placement, flipAlignment, direction, rtl) {\n const alignment = getAlignment(placement);\n let list = getSideList(getSide(placement), direction === 'start', rtl);\n if (alignment) {\n list = list.map(side => side + \"-\" + alignment);\n if (flipAlignment) {\n list = list.concat(list.map(getOppositeAlignmentPlacement));\n }\n }\n return list;\n}\nfunction getOppositePlacement(placement) {\n return placement.replace(/left|right|bottom|top/g, side => oppositeSideMap[side]);\n}\nfunction expandPaddingObject(padding) {\n return {\n top: 0,\n right: 0,\n bottom: 0,\n left: 0,\n ...padding\n };\n}\nfunction getPaddingObject(padding) {\n return typeof padding !== 'number' ? expandPaddingObject(padding) : {\n top: padding,\n right: padding,\n bottom: padding,\n left: padding\n };\n}\nfunction rectToClientRect(rect) {\n const {\n x,\n y,\n width,\n height\n } = rect;\n return {\n width,\n height,\n top: y,\n left: x,\n right: x + width,\n bottom: y + height,\n x,\n y\n };\n}\n\nexport { alignments, clamp, createCoords, evaluate, expandPaddingObject, floor, getAlignment, getAlignmentAxis, getAlignmentSides, getAxisLength, getExpandedPlacements, getOppositeAlignmentPlacement, getOppositeAxis, getOppositeAxisPlacements, getOppositePlacement, getPaddingObject, getSide, getSideAxis, max, min, placements, rectToClientRect, round, sides };\n", "import { getSideAxis, getAlignmentAxis, getAxisLength, getSide, getAlignment, evaluate, getPaddingObject, rectToClientRect, min, clamp, placements, getAlignmentSides, getOppositeAlignmentPlacement, getOppositePlacement, getExpandedPlacements, getOppositeAxisPlacements, sides, max, getOppositeAxis } from '@floating-ui/utils';\nexport { rectToClientRect } from '@floating-ui/utils';\n\nfunction computeCoordsFromPlacement(_ref, placement, rtl) {\n let {\n reference,\n floating\n } = _ref;\n const sideAxis = getSideAxis(placement);\n const alignmentAxis = getAlignmentAxis(placement);\n const alignLength = getAxisLength(alignmentAxis);\n const side = getSide(placement);\n const isVertical = sideAxis === 'y';\n const commonX = reference.x + reference.width / 2 - floating.width / 2;\n const commonY = reference.y + reference.height / 2 - floating.height / 2;\n const commonAlign = reference[alignLength] / 2 - floating[alignLength] / 2;\n let coords;\n switch (side) {\n case 'top':\n coords = {\n x: commonX,\n y: reference.y - floating.height\n };\n break;\n case 'bottom':\n coords = {\n x: commonX,\n y: reference.y + reference.height\n };\n break;\n case 'right':\n coords = {\n x: reference.x + reference.width,\n y: commonY\n };\n break;\n case 'left':\n coords = {\n x: reference.x - floating.width,\n y: commonY\n };\n break;\n default:\n coords = {\n x: reference.x,\n y: reference.y\n };\n }\n switch (getAlignment(placement)) {\n case 'start':\n coords[alignmentAxis] -= commonAlign * (rtl && isVertical ? -1 : 1);\n break;\n case 'end':\n coords[alignmentAxis] += commonAlign * (rtl && isVertical ? -1 : 1);\n break;\n }\n return coords;\n}\n\n/**\n * Computes the `x` and `y` coordinates that will place the floating element\n * next to a given reference element.\n *\n * This export does not have any `platform` interface logic. You will need to\n * write one for the platform you are using Floating UI with.\n */\nconst computePosition = async (reference, floating, config) => {\n const {\n placement = 'bottom',\n strategy = 'absolute',\n middleware = [],\n platform\n } = config;\n const validMiddleware = middleware.filter(Boolean);\n const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(floating));\n let rects = await platform.getElementRects({\n reference,\n floating,\n strategy\n });\n let {\n x,\n y\n } = computeCoordsFromPlacement(rects, placement, rtl);\n let statefulPlacement = placement;\n let middlewareData = {};\n let resetCount = 0;\n for (let i = 0; i < validMiddleware.length; i++) {\n const {\n name,\n fn\n } = validMiddleware[i];\n const {\n x: nextX,\n y: nextY,\n data,\n reset\n } = await fn({\n x,\n y,\n initialPlacement: placement,\n placement: statefulPlacement,\n strategy,\n middlewareData,\n rects,\n platform,\n elements: {\n reference,\n floating\n }\n });\n x = nextX != null ? nextX : x;\n y = nextY != null ? nextY : y;\n middlewareData = {\n ...middlewareData,\n [name]: {\n ...middlewareData[name],\n ...data\n }\n };\n if (reset && resetCount <= 50) {\n resetCount++;\n if (typeof reset === 'object') {\n if (reset.placement) {\n statefulPlacement = reset.placement;\n }\n if (reset.rects) {\n rects = reset.rects === true ? await platform.getElementRects({\n reference,\n floating,\n strategy\n }) : reset.rects;\n }\n ({\n x,\n y\n } = computeCoordsFromPlacement(rects, statefulPlacement, rtl));\n }\n i = -1;\n }\n }\n return {\n x,\n y,\n placement: statefulPlacement,\n strategy,\n middlewareData\n };\n};\n\n/**\n * Resolves with an object of overflow side offsets that determine how much the\n * element is overflowing a given clipping boundary on each side.\n * - positive = overflowing the boundary by that number of pixels\n * - negative = how many pixels left before it will overflow\n * - 0 = lies flush with the boundary\n * @see https://floating-ui.com/docs/detectOverflow\n */\nasync function detectOverflow(state, options) {\n var _await$platform$isEle;\n if (options === void 0) {\n options = {};\n }\n const {\n x,\n y,\n platform,\n rects,\n elements,\n strategy\n } = state;\n const {\n boundary = 'clippingAncestors',\n rootBoundary = 'viewport',\n elementContext = 'floating',\n altBoundary = false,\n padding = 0\n } = evaluate(options, state);\n const paddingObject = getPaddingObject(padding);\n const altContext = elementContext === 'floating' ? 'reference' : 'floating';\n const element = elements[altBoundary ? altContext : elementContext];\n const clippingClientRect = rectToClientRect(await platform.getClippingRect({\n element: ((_await$platform$isEle = await (platform.isElement == null ? void 0 : platform.isElement(element))) != null ? _await$platform$isEle : true) ? element : element.contextElement || (await (platform.getDocumentElement == null ? void 0 : platform.getDocumentElement(elements.floating))),\n boundary,\n rootBoundary,\n strategy\n }));\n const rect = elementContext === 'floating' ? {\n x,\n y,\n width: rects.floating.width,\n height: rects.floating.height\n } : rects.reference;\n const offsetParent = await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(elements.floating));\n const offsetScale = (await (platform.isElement == null ? void 0 : platform.isElement(offsetParent))) ? (await (platform.getScale == null ? void 0 : platform.getScale(offsetParent))) || {\n x: 1,\n y: 1\n } : {\n x: 1,\n y: 1\n };\n const elementClientRect = rectToClientRect(platform.convertOffsetParentRelativeRectToViewportRelativeRect ? await platform.convertOffsetParentRelativeRectToViewportRelativeRect({\n elements,\n rect,\n offsetParent,\n strategy\n }) : rect);\n return {\n top: (clippingClientRect.top - elementClientRect.top + paddingObject.top) / offsetScale.y,\n bottom: (elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom) / offsetScale.y,\n left: (clippingClientRect.left - elementClientRect.left + paddingObject.left) / offsetScale.x,\n right: (elementClientRect.right - clippingClientRect.right + paddingObject.right) / offsetScale.x\n };\n}\n\n/**\n * Provides data to position an inner element of the floating element so that it\n * appears centered to the reference element.\n * @see https://floating-ui.com/docs/arrow\n */\nconst arrow = options => ({\n name: 'arrow',\n options,\n async fn(state) {\n const {\n x,\n y,\n placement,\n rects,\n platform,\n elements,\n middlewareData\n } = state;\n // Since `element` is required, we don't Partial<> the type.\n const {\n element,\n padding = 0\n } = evaluate(options, state) || {};\n if (element == null) {\n return {};\n }\n const paddingObject = getPaddingObject(padding);\n const coords = {\n x,\n y\n };\n const axis = getAlignmentAxis(placement);\n const length = getAxisLength(axis);\n const arrowDimensions = await platform.getDimensions(element);\n const isYAxis = axis === 'y';\n const minProp = isYAxis ? 'top' : 'left';\n const maxProp = isYAxis ? 'bottom' : 'right';\n const clientProp = isYAxis ? 'clientHeight' : 'clientWidth';\n const endDiff = rects.reference[length] + rects.reference[axis] - coords[axis] - rects.floating[length];\n const startDiff = coords[axis] - rects.reference[axis];\n const arrowOffsetParent = await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(element));\n let clientSize = arrowOffsetParent ? arrowOffsetParent[clientProp] : 0;\n\n // DOM platform can return `window` as the `offsetParent`.\n if (!clientSize || !(await (platform.isElement == null ? void 0 : platform.isElement(arrowOffsetParent)))) {\n clientSize = elements.floating[clientProp] || rects.floating[length];\n }\n const centerToReference = endDiff / 2 - startDiff / 2;\n\n // If the padding is large enough that it causes the arrow to no longer be\n // centered, modify the padding so that it is centered.\n const largestPossiblePadding = clientSize / 2 - arrowDimensions[length] / 2 - 1;\n const minPadding = min(paddingObject[minProp], largestPossiblePadding);\n const maxPadding = min(paddingObject[maxProp], largestPossiblePadding);\n\n // Make sure the arrow doesn't overflow the floating element if the center\n // point is outside the floating element's bounds.\n const min$1 = minPadding;\n const max = clientSize - arrowDimensions[length] - maxPadding;\n const center = clientSize / 2 - arrowDimensions[length] / 2 + centerToReference;\n const offset = clamp(min$1, center, max);\n\n // If the reference is small enough that the arrow's padding causes it to\n // to point to nothing for an aligned placement, adjust the offset of the\n // floating element itself. To ensure `shift()` continues to take action,\n // a single reset is performed when this is true.\n const shouldAddOffset = !middlewareData.arrow && getAlignment(placement) != null && center !== offset && rects.reference[length] / 2 - (center < min$1 ? minPadding : maxPadding) - arrowDimensions[length] / 2 < 0;\n const alignmentOffset = shouldAddOffset ? center < min$1 ? center - min$1 : center - max : 0;\n return {\n [axis]: coords[axis] + alignmentOffset,\n data: {\n [axis]: offset,\n centerOffset: center - offset - alignmentOffset,\n ...(shouldAddOffset && {\n alignmentOffset\n })\n },\n reset: shouldAddOffset\n };\n }\n});\n\nfunction getPlacementList(alignment, autoAlignment, allowedPlacements) {\n const allowedPlacementsSortedByAlignment = alignment ? [...allowedPlacements.filter(placement => getAlignment(placement) === alignment), ...allowedPlacements.filter(placement => getAlignment(placement) !== alignment)] : allowedPlacements.filter(placement => getSide(placement) === placement);\n return allowedPlacementsSortedByAlignment.filter(placement => {\n if (alignment) {\n return getAlignment(placement) === alignment || (autoAlignment ? getOppositeAlignmentPlacement(placement) !== placement : false);\n }\n return true;\n });\n}\n/**\n * Optimizes the visibility of the floating element by choosing the placement\n * that has the most space available automatically, without needing to specify a\n * preferred placement. Alternative to `flip`.\n * @see https://floating-ui.com/docs/autoPlacement\n */\nconst autoPlacement = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n name: 'autoPlacement',\n options,\n async fn(state) {\n var _middlewareData$autoP, _middlewareData$autoP2, _placementsThatFitOnE;\n const {\n rects,\n middlewareData,\n placement,\n platform,\n elements\n } = state;\n const {\n crossAxis = false,\n alignment,\n allowedPlacements = placements,\n autoAlignment = true,\n ...detectOverflowOptions\n } = evaluate(options, state);\n const placements$1 = alignment !== undefined || allowedPlacements === placements ? getPlacementList(alignment || null, autoAlignment, allowedPlacements) : allowedPlacements;\n const overflow = await detectOverflow(state, detectOverflowOptions);\n const currentIndex = ((_middlewareData$autoP = middlewareData.autoPlacement) == null ? void 0 : _middlewareData$autoP.index) || 0;\n const currentPlacement = placements$1[currentIndex];\n if (currentPlacement == null) {\n return {};\n }\n const alignmentSides = getAlignmentSides(currentPlacement, rects, await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating)));\n\n // Make `computeCoords` start from the right place.\n if (placement !== currentPlacement) {\n return {\n reset: {\n placement: placements$1[0]\n }\n };\n }\n const currentOverflows = [overflow[getSide(currentPlacement)], overflow[alignmentSides[0]], overflow[alignmentSides[1]]];\n const allOverflows = [...(((_middlewareData$autoP2 = middlewareData.autoPlacement) == null ? void 0 : _middlewareData$autoP2.overflows) || []), {\n placement: currentPlacement,\n overflows: currentOverflows\n }];\n const nextPlacement = placements$1[currentIndex + 1];\n\n // There are more placements to check.\n if (nextPlacement) {\n return {\n data: {\n index: currentIndex + 1,\n overflows: allOverflows\n },\n reset: {\n placement: nextPlacement\n }\n };\n }\n const placementsSortedByMostSpace = allOverflows.map(d => {\n const alignment = getAlignment(d.placement);\n return [d.placement, alignment && crossAxis ?\n // Check along the mainAxis and main crossAxis side.\n d.overflows.slice(0, 2).reduce((acc, v) => acc + v, 0) :\n // Check only the mainAxis.\n d.overflows[0], d.overflows];\n }).sort((a, b) => a[1] - b[1]);\n const placementsThatFitOnEachSide = placementsSortedByMostSpace.filter(d => d[2].slice(0,\n // Aligned placements should not check their opposite crossAxis\n // side.\n getAlignment(d[0]) ? 2 : 3).every(v => v <= 0));\n const resetPlacement = ((_placementsThatFitOnE = placementsThatFitOnEachSide[0]) == null ? void 0 : _placementsThatFitOnE[0]) || placementsSortedByMostSpace[0][0];\n if (resetPlacement !== placement) {\n return {\n data: {\n index: currentIndex + 1,\n overflows: allOverflows\n },\n reset: {\n placement: resetPlacement\n }\n };\n }\n return {};\n }\n };\n};\n\n/**\n * Optimizes the visibility of the floating element by flipping the `placement`\n * in order to keep it in view when the preferred placement(s) will overflow the\n * clipping boundary. Alternative to `autoPlacement`.\n * @see https://floating-ui.com/docs/flip\n */\nconst flip = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n name: 'flip',\n options,\n async fn(state) {\n var _middlewareData$arrow, _middlewareData$flip;\n const {\n placement,\n middlewareData,\n rects,\n initialPlacement,\n platform,\n elements\n } = state;\n const {\n mainAxis: checkMainAxis = true,\n crossAxis: checkCrossAxis = true,\n fallbackPlacements: specifiedFallbackPlacements,\n fallbackStrategy = 'bestFit',\n fallbackAxisSideDirection = 'none',\n flipAlignment = true,\n ...detectOverflowOptions\n } = evaluate(options, state);\n\n // If a reset by the arrow was caused due to an alignment offset being\n // added, we should skip any logic now since `flip()` has already done its\n // work.\n // https://github.com/floating-ui/floating-ui/issues/2549#issuecomment-1719601643\n if ((_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) {\n return {};\n }\n const side = getSide(placement);\n const initialSideAxis = getSideAxis(initialPlacement);\n const isBasePlacement = getSide(initialPlacement) === initialPlacement;\n const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating));\n const fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipAlignment ? [getOppositePlacement(initialPlacement)] : getExpandedPlacements(initialPlacement));\n const hasFallbackAxisSideDirection = fallbackAxisSideDirection !== 'none';\n if (!specifiedFallbackPlacements && hasFallbackAxisSideDirection) {\n fallbackPlacements.push(...getOppositeAxisPlacements(initialPlacement, flipAlignment, fallbackAxisSideDirection, rtl));\n }\n const placements = [initialPlacement, ...fallbackPlacements];\n const overflow = await detectOverflow(state, detectOverflowOptions);\n const overflows = [];\n let overflowsData = ((_middlewareData$flip = middlewareData.flip) == null ? void 0 : _middlewareData$flip.overflows) || [];\n if (checkMainAxis) {\n overflows.push(overflow[side]);\n }\n if (checkCrossAxis) {\n const sides = getAlignmentSides(placement, rects, rtl);\n overflows.push(overflow[sides[0]], overflow[sides[1]]);\n }\n overflowsData = [...overflowsData, {\n placement,\n overflows\n }];\n\n // One or more sides is overflowing.\n if (!overflows.every(side => side <= 0)) {\n var _middlewareData$flip2, _overflowsData$filter;\n const nextIndex = (((_middlewareData$flip2 = middlewareData.flip) == null ? void 0 : _middlewareData$flip2.index) || 0) + 1;\n const nextPlacement = placements[nextIndex];\n if (nextPlacement) {\n // Try next placement and re-run the lifecycle.\n return {\n data: {\n index: nextIndex,\n overflows: overflowsData\n },\n reset: {\n placement: nextPlacement\n }\n };\n }\n\n // First, find the candidates that fit on the mainAxis side of overflow,\n // then find the placement that fits the best on the main crossAxis side.\n let resetPlacement = (_overflowsData$filter = overflowsData.filter(d => d.overflows[0] <= 0).sort((a, b) => a.overflows[1] - b.overflows[1])[0]) == null ? void 0 : _overflowsData$filter.placement;\n\n // Otherwise fallback.\n if (!resetPlacement) {\n switch (fallbackStrategy) {\n case 'bestFit':\n {\n var _overflowsData$filter2;\n const placement = (_overflowsData$filter2 = overflowsData.filter(d => {\n if (hasFallbackAxisSideDirection) {\n const currentSideAxis = getSideAxis(d.placement);\n return currentSideAxis === initialSideAxis ||\n // Create a bias to the `y` side axis due to horizontal\n // reading directions favoring greater width.\n currentSideAxis === 'y';\n }\n return true;\n }).map(d => [d.placement, d.overflows.filter(overflow => overflow > 0).reduce((acc, overflow) => acc + overflow, 0)]).sort((a, b) => a[1] - b[1])[0]) == null ? void 0 : _overflowsData$filter2[0];\n if (placement) {\n resetPlacement = placement;\n }\n break;\n }\n case 'initialPlacement':\n resetPlacement = initialPlacement;\n break;\n }\n }\n if (placement !== resetPlacement) {\n return {\n reset: {\n placement: resetPlacement\n }\n };\n }\n }\n return {};\n }\n };\n};\n\nfunction getSideOffsets(overflow, rect) {\n return {\n top: overflow.top - rect.height,\n right: overflow.right - rect.width,\n bottom: overflow.bottom - rect.height,\n left: overflow.left - rect.width\n };\n}\nfunction isAnySideFullyClipped(overflow) {\n return sides.some(side => overflow[side] >= 0);\n}\n/**\n * Provides data to hide the floating element in applicable situations, such as\n * when it is not in the same clipping context as the reference element.\n * @see https://floating-ui.com/docs/hide\n */\nconst hide = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n name: 'hide',\n options,\n async fn(state) {\n const {\n rects\n } = state;\n const {\n strategy = 'referenceHidden',\n ...detectOverflowOptions\n } = evaluate(options, state);\n switch (strategy) {\n case 'referenceHidden':\n {\n const overflow = await detectOverflow(state, {\n ...detectOverflowOptions,\n elementContext: 'reference'\n });\n const offsets = getSideOffsets(overflow, rects.reference);\n return {\n data: {\n referenceHiddenOffsets: offsets,\n referenceHidden: isAnySideFullyClipped(offsets)\n }\n };\n }\n case 'escaped':\n {\n const overflow = await detectOverflow(state, {\n ...detectOverflowOptions,\n altBoundary: true\n });\n const offsets = getSideOffsets(overflow, rects.floating);\n return {\n data: {\n escapedOffsets: offsets,\n escaped: isAnySideFullyClipped(offsets)\n }\n };\n }\n default:\n {\n return {};\n }\n }\n }\n };\n};\n\nfunction getBoundingRect(rects) {\n const minX = min(...rects.map(rect => rect.left));\n const minY = min(...rects.map(rect => rect.top));\n const maxX = max(...rects.map(rect => rect.right));\n const maxY = max(...rects.map(rect => rect.bottom));\n return {\n x: minX,\n y: minY,\n width: maxX - minX,\n height: maxY - minY\n };\n}\nfunction getRectsByLine(rects) {\n const sortedRects = rects.slice().sort((a, b) => a.y - b.y);\n const groups = [];\n let prevRect = null;\n for (let i = 0; i < sortedRects.length; i++) {\n const rect = sortedRects[i];\n if (!prevRect || rect.y - prevRect.y > prevRect.height / 2) {\n groups.push([rect]);\n } else {\n groups[groups.length - 1].push(rect);\n }\n prevRect = rect;\n }\n return groups.map(rect => rectToClientRect(getBoundingRect(rect)));\n}\n/**\n * Provides improved positioning for inline reference elements that can span\n * over multiple lines, such as hyperlinks or range selections.\n * @see https://floating-ui.com/docs/inline\n */\nconst inline = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n name: 'inline',\n options,\n async fn(state) {\n const {\n placement,\n elements,\n rects,\n platform,\n strategy\n } = state;\n // A MouseEvent's client{X,Y} coords can be up to 2 pixels off a\n // ClientRect's bounds, despite the event listener being triggered. A\n // padding of 2 seems to handle this issue.\n const {\n padding = 2,\n x,\n y\n } = evaluate(options, state);\n const nativeClientRects = Array.from((await (platform.getClientRects == null ? void 0 : platform.getClientRects(elements.reference))) || []);\n const clientRects = getRectsByLine(nativeClientRects);\n const fallback = rectToClientRect(getBoundingRect(nativeClientRects));\n const paddingObject = getPaddingObject(padding);\n function getBoundingClientRect() {\n // There are two rects and they are disjoined.\n if (clientRects.length === 2 && clientRects[0].left > clientRects[1].right && x != null && y != null) {\n // Find the first rect in which the point is fully inside.\n return clientRects.find(rect => x > rect.left - paddingObject.left && x < rect.right + paddingObject.right && y > rect.top - paddingObject.top && y < rect.bottom + paddingObject.bottom) || fallback;\n }\n\n // There are 2 or more connected rects.\n if (clientRects.length >= 2) {\n if (getSideAxis(placement) === 'y') {\n const firstRect = clientRects[0];\n const lastRect = clientRects[clientRects.length - 1];\n const isTop = getSide(placement) === 'top';\n const top = firstRect.top;\n const bottom = lastRect.bottom;\n const left = isTop ? firstRect.left : lastRect.left;\n const right = isTop ? firstRect.right : lastRect.right;\n const width = right - left;\n const height = bottom - top;\n return {\n top,\n bottom,\n left,\n right,\n width,\n height,\n x: left,\n y: top\n };\n }\n const isLeftSide = getSide(placement) === 'left';\n const maxRight = max(...clientRects.map(rect => rect.right));\n const minLeft = min(...clientRects.map(rect => rect.left));\n const measureRects = clientRects.filter(rect => isLeftSide ? rect.left === minLeft : rect.right === maxRight);\n const top = measureRects[0].top;\n const bottom = measureRects[measureRects.length - 1].bottom;\n const left = minLeft;\n const right = maxRight;\n const width = right - left;\n const height = bottom - top;\n return {\n top,\n bottom,\n left,\n right,\n width,\n height,\n x: left,\n y: top\n };\n }\n return fallback;\n }\n const resetRects = await platform.getElementRects({\n reference: {\n getBoundingClientRect\n },\n floating: elements.floating,\n strategy\n });\n if (rects.reference.x !== resetRects.reference.x || rects.reference.y !== resetRects.reference.y || rects.reference.width !== resetRects.reference.width || rects.reference.height !== resetRects.reference.height) {\n return {\n reset: {\n rects: resetRects\n }\n };\n }\n return {};\n }\n };\n};\n\n// For type backwards-compatibility, the `OffsetOptions` type was also\n// Derivable.\n\nasync function convertValueToCoords(state, options) {\n const {\n placement,\n platform,\n elements\n } = state;\n const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating));\n const side = getSide(placement);\n const alignment = getAlignment(placement);\n const isVertical = getSideAxis(placement) === 'y';\n const mainAxisMulti = ['left', 'top'].includes(side) ? -1 : 1;\n const crossAxisMulti = rtl && isVertical ? -1 : 1;\n const rawValue = evaluate(options, state);\n\n // eslint-disable-next-line prefer-const\n let {\n mainAxis,\n crossAxis,\n alignmentAxis\n } = typeof rawValue === 'number' ? {\n mainAxis: rawValue,\n crossAxis: 0,\n alignmentAxis: null\n } : {\n mainAxis: rawValue.mainAxis || 0,\n crossAxis: rawValue.crossAxis || 0,\n alignmentAxis: rawValue.alignmentAxis\n };\n if (alignment && typeof alignmentAxis === 'number') {\n crossAxis = alignment === 'end' ? alignmentAxis * -1 : alignmentAxis;\n }\n return isVertical ? {\n x: crossAxis * crossAxisMulti,\n y: mainAxis * mainAxisMulti\n } : {\n x: mainAxis * mainAxisMulti,\n y: crossAxis * crossAxisMulti\n };\n}\n\n/**\n * Modifies the placement by translating the floating element along the\n * specified axes.\n * A number (shorthand for `mainAxis` or distance), or an axes configuration\n * object may be passed.\n * @see https://floating-ui.com/docs/offset\n */\nconst offset = function (options) {\n if (options === void 0) {\n options = 0;\n }\n return {\n name: 'offset',\n options,\n async fn(state) {\n var _middlewareData$offse, _middlewareData$arrow;\n const {\n x,\n y,\n placement,\n middlewareData\n } = state;\n const diffCoords = await convertValueToCoords(state, options);\n\n // If the placement is the same and the arrow caused an alignment offset\n // then we don't need to change the positioning coordinates.\n if (placement === ((_middlewareData$offse = middlewareData.offset) == null ? void 0 : _middlewareData$offse.placement) && (_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) {\n return {};\n }\n return {\n x: x + diffCoords.x,\n y: y + diffCoords.y,\n data: {\n ...diffCoords,\n placement\n }\n };\n }\n };\n};\n\n/**\n * Optimizes the visibility of the floating element by shifting it in order to\n * keep it in view when it will overflow the clipping boundary.\n * @see https://floating-ui.com/docs/shift\n */\nconst shift = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n name: 'shift',\n options,\n async fn(state) {\n const {\n x,\n y,\n placement\n } = state;\n const {\n mainAxis: checkMainAxis = true,\n crossAxis: checkCrossAxis = false,\n limiter = {\n fn: _ref => {\n let {\n x,\n y\n } = _ref;\n return {\n x,\n y\n };\n }\n },\n ...detectOverflowOptions\n } = evaluate(options, state);\n const coords = {\n x,\n y\n };\n const overflow = await detectOverflow(state, detectOverflowOptions);\n const crossAxis = getSideAxis(getSide(placement));\n const mainAxis = getOppositeAxis(crossAxis);\n let mainAxisCoord = coords[mainAxis];\n let crossAxisCoord = coords[crossAxis];\n if (checkMainAxis) {\n const minSide = mainAxis === 'y' ? 'top' : 'left';\n const maxSide = mainAxis === 'y' ? 'bottom' : 'right';\n const min = mainAxisCoord + overflow[minSide];\n const max = mainAxisCoord - overflow[maxSide];\n mainAxisCoord = clamp(min, mainAxisCoord, max);\n }\n if (checkCrossAxis) {\n const minSide = crossAxis === 'y' ? 'top' : 'left';\n const maxSide = crossAxis === 'y' ? 'bottom' : 'right';\n const min = crossAxisCoord + overflow[minSide];\n const max = crossAxisCoord - overflow[maxSide];\n crossAxisCoord = clamp(min, crossAxisCoord, max);\n }\n const limitedCoords = limiter.fn({\n ...state,\n [mainAxis]: mainAxisCoord,\n [crossAxis]: crossAxisCoord\n });\n return {\n ...limitedCoords,\n data: {\n x: limitedCoords.x - x,\n y: limitedCoords.y - y,\n enabled: {\n [mainAxis]: checkMainAxis,\n [crossAxis]: checkCrossAxis\n }\n }\n };\n }\n };\n};\n/**\n * Built-in `limiter` that will stop `shift()` at a certain point.\n */\nconst limitShift = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n options,\n fn(state) {\n const {\n x,\n y,\n placement,\n rects,\n middlewareData\n } = state;\n const {\n offset = 0,\n mainAxis: checkMainAxis = true,\n crossAxis: checkCrossAxis = true\n } = evaluate(options, state);\n const coords = {\n x,\n y\n };\n const crossAxis = getSideAxis(placement);\n const mainAxis = getOppositeAxis(crossAxis);\n let mainAxisCoord = coords[mainAxis];\n let crossAxisCoord = coords[crossAxis];\n const rawOffset = evaluate(offset, state);\n const computedOffset = typeof rawOffset === 'number' ? {\n mainAxis: rawOffset,\n crossAxis: 0\n } : {\n mainAxis: 0,\n crossAxis: 0,\n ...rawOffset\n };\n if (checkMainAxis) {\n const len = mainAxis === 'y' ? 'height' : 'width';\n const limitMin = rects.reference[mainAxis] - rects.floating[len] + computedOffset.mainAxis;\n const limitMax = rects.reference[mainAxis] + rects.reference[len] - computedOffset.mainAxis;\n if (mainAxisCoord < limitMin) {\n mainAxisCoord = limitMin;\n } else if (mainAxisCoord > limitMax) {\n mainAxisCoord = limitMax;\n }\n }\n if (checkCrossAxis) {\n var _middlewareData$offse, _middlewareData$offse2;\n const len = mainAxis === 'y' ? 'width' : 'height';\n const isOriginSide = ['top', 'left'].includes(getSide(placement));\n const limitMin = rects.reference[crossAxis] - rects.floating[len] + (isOriginSide ? ((_middlewareData$offse = middlewareData.offset) == null ? void 0 : _middlewareData$offse[crossAxis]) || 0 : 0) + (isOriginSide ? 0 : computedOffset.crossAxis);\n const limitMax = rects.reference[crossAxis] + rects.reference[len] + (isOriginSide ? 0 : ((_middlewareData$offse2 = middlewareData.offset) == null ? void 0 : _middlewareData$offse2[crossAxis]) || 0) - (isOriginSide ? computedOffset.crossAxis : 0);\n if (crossAxisCoord < limitMin) {\n crossAxisCoord = limitMin;\n } else if (crossAxisCoord > limitMax) {\n crossAxisCoord = limitMax;\n }\n }\n return {\n [mainAxis]: mainAxisCoord,\n [crossAxis]: crossAxisCoord\n };\n }\n };\n};\n\n/**\n * Provides data that allows you to change the size of the floating element \u2014\n * for instance, prevent it from overflowing the clipping boundary or match the\n * width of the reference element.\n * @see https://floating-ui.com/docs/size\n */\nconst size = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n name: 'size',\n options,\n async fn(state) {\n var _state$middlewareData, _state$middlewareData2;\n const {\n placement,\n rects,\n platform,\n elements\n } = state;\n const {\n apply = () => {},\n ...detectOverflowOptions\n } = evaluate(options, state);\n const overflow = await detectOverflow(state, detectOverflowOptions);\n const side = getSide(placement);\n const alignment = getAlignment(placement);\n const isYAxis = getSideAxis(placement) === 'y';\n const {\n width,\n height\n } = rects.floating;\n let heightSide;\n let widthSide;\n if (side === 'top' || side === 'bottom') {\n heightSide = side;\n widthSide = alignment === ((await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating))) ? 'start' : 'end') ? 'left' : 'right';\n } else {\n widthSide = side;\n heightSide = alignment === 'end' ? 'top' : 'bottom';\n }\n const maximumClippingHeight = height - overflow.top - overflow.bottom;\n const maximumClippingWidth = width - overflow.left - overflow.right;\n const overflowAvailableHeight = min(height - overflow[heightSide], maximumClippingHeight);\n const overflowAvailableWidth = min(width - overflow[widthSide], maximumClippingWidth);\n const noShift = !state.middlewareData.shift;\n let availableHeight = overflowAvailableHeight;\n let availableWidth = overflowAvailableWidth;\n if ((_state$middlewareData = state.middlewareData.shift) != null && _state$middlewareData.enabled.x) {\n availableWidth = maximumClippingWidth;\n }\n if ((_state$middlewareData2 = state.middlewareData.shift) != null && _state$middlewareData2.enabled.y) {\n availableHeight = maximumClippingHeight;\n }\n if (noShift && !alignment) {\n const xMin = max(overflow.left, 0);\n const xMax = max(overflow.right, 0);\n const yMin = max(overflow.top, 0);\n const yMax = max(overflow.bottom, 0);\n if (isYAxis) {\n availableWidth = width - 2 * (xMin !== 0 || xMax !== 0 ? xMin + xMax : max(overflow.left, overflow.right));\n } else {\n availableHeight = height - 2 * (yMin !== 0 || yMax !== 0 ? yMin + yMax : max(overflow.top, overflow.bottom));\n }\n }\n await apply({\n ...state,\n availableWidth,\n availableHeight\n });\n const nextDimensions = await platform.getDimensions(elements.floating);\n if (width !== nextDimensions.width || height !== nextDimensions.height) {\n return {\n reset: {\n rects: true\n }\n };\n }\n return {};\n }\n };\n};\n\nexport { arrow, autoPlacement, computePosition, detectOverflow, flip, hide, inline, limitShift, offset, shift, size };\n", "function hasWindow() {\n return typeof window !== 'undefined';\n}\nfunction getNodeName(node) {\n if (isNode(node)) {\n return (node.nodeName || '').toLowerCase();\n }\n // Mocked nodes in testing environments may not be instances of Node. By\n // returning `#document` an infinite loop won't occur.\n // https://github.com/floating-ui/floating-ui/issues/2317\n return '#document';\n}\nfunction getWindow(node) {\n var _node$ownerDocument;\n return (node == null || (_node$ownerDocument = node.ownerDocument) == null ? void 0 : _node$ownerDocument.defaultView) || window;\n}\nfunction getDocumentElement(node) {\n var _ref;\n return (_ref = (isNode(node) ? node.ownerDocument : node.document) || window.document) == null ? void 0 : _ref.documentElement;\n}\nfunction isNode(value) {\n if (!hasWindow()) {\n return false;\n }\n return value instanceof Node || value instanceof getWindow(value).Node;\n}\nfunction isElement(value) {\n if (!hasWindow()) {\n return false;\n }\n return value instanceof Element || value instanceof getWindow(value).Element;\n}\nfunction isHTMLElement(value) {\n if (!hasWindow()) {\n return false;\n }\n return value instanceof HTMLElement || value instanceof getWindow(value).HTMLElement;\n}\nfunction isShadowRoot(value) {\n if (!hasWindow() || typeof ShadowRoot === 'undefined') {\n return false;\n }\n return value instanceof ShadowRoot || value instanceof getWindow(value).ShadowRoot;\n}\nfunction isOverflowElement(element) {\n const {\n overflow,\n overflowX,\n overflowY,\n display\n } = getComputedStyle(element);\n return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && !['inline', 'contents'].includes(display);\n}\nfunction isTableElement(element) {\n return ['table', 'td', 'th'].includes(getNodeName(element));\n}\nfunction isTopLayer(element) {\n return [':popover-open', ':modal'].some(selector => {\n try {\n return element.matches(selector);\n } catch (e) {\n return false;\n }\n });\n}\nfunction isContainingBlock(elementOrCss) {\n const webkit = isWebKit();\n const css = isElement(elementOrCss) ? getComputedStyle(elementOrCss) : elementOrCss;\n\n // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block\n return css.transform !== 'none' || css.perspective !== 'none' || (css.containerType ? css.containerType !== 'normal' : false) || !webkit && (css.backdropFilter ? css.backdropFilter !== 'none' : false) || !webkit && (css.filter ? css.filter !== 'none' : false) || ['transform', 'perspective', 'filter'].some(value => (css.willChange || '').includes(value)) || ['paint', 'layout', 'strict', 'content'].some(value => (css.contain || '').includes(value));\n}\nfunction getContainingBlock(element) {\n let currentNode = getParentNode(element);\n while (isHTMLElement(currentNode) && !isLastTraversableNode(currentNode)) {\n if (isContainingBlock(currentNode)) {\n return currentNode;\n } else if (isTopLayer(currentNode)) {\n return null;\n }\n currentNode = getParentNode(currentNode);\n }\n return null;\n}\nfunction isWebKit() {\n if (typeof CSS === 'undefined' || !CSS.supports) return false;\n return CSS.supports('-webkit-backdrop-filter', 'none');\n}\nfunction isLastTraversableNode(node) {\n return ['html', 'body', '#document'].includes(getNodeName(node));\n}\nfunction getComputedStyle(element) {\n return getWindow(element).getComputedStyle(element);\n}\nfunction getNodeScroll(element) {\n if (isElement(element)) {\n return {\n scrollLeft: element.scrollLeft,\n scrollTop: element.scrollTop\n };\n }\n return {\n scrollLeft: element.scrollX,\n scrollTop: element.scrollY\n };\n}\nfunction getParentNode(node) {\n if (getNodeName(node) === 'html') {\n return node;\n }\n const result =\n // Step into the shadow DOM of the parent of a slotted node.\n node.assignedSlot ||\n // DOM Element detected.\n node.parentNode ||\n // ShadowRoot detected.\n isShadowRoot(node) && node.host ||\n // Fallback.\n getDocumentElement(node);\n return isShadowRoot(result) ? result.host : result;\n}\nfunction getNearestOverflowAncestor(node) {\n const parentNode = getParentNode(node);\n if (isLastTraversableNode(parentNode)) {\n return node.ownerDocument ? node.ownerDocument.body : node.body;\n }\n if (isHTMLElement(parentNode) && isOverflowElement(parentNode)) {\n return parentNode;\n }\n return getNearestOverflowAncestor(parentNode);\n}\nfunction getOverflowAncestors(node, list, traverseIframes) {\n var _node$ownerDocument2;\n if (list === void 0) {\n list = [];\n }\n if (traverseIframes === void 0) {\n traverseIframes = true;\n }\n const scrollableAncestor = getNearestOverflowAncestor(node);\n const isBody = scrollableAncestor === ((_node$ownerDocument2 = node.ownerDocument) == null ? void 0 : _node$ownerDocument2.body);\n const win = getWindow(scrollableAncestor);\n if (isBody) {\n const frameElement = getFrameElement(win);\n return list.concat(win, win.visualViewport || [], isOverflowElement(scrollableAncestor) ? scrollableAncestor : [], frameElement && traverseIframes ? getOverflowAncestors(frameElement) : []);\n }\n return list.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor, [], traverseIframes));\n}\nfunction getFrameElement(win) {\n return win.parent && Object.getPrototypeOf(win.parent) ? win.frameElement : null;\n}\n\nexport { getComputedStyle, getContainingBlock, getDocumentElement, getFrameElement, getNearestOverflowAncestor, getNodeName, getNodeScroll, getOverflowAncestors, getParentNode, getWindow, isContainingBlock, isElement, isHTMLElement, isLastTraversableNode, isNode, isOverflowElement, isShadowRoot, isTableElement, isTopLayer, isWebKit };\n", "import { rectToClientRect, detectOverflow as detectOverflow$1, offset as offset$1, autoPlacement as autoPlacement$1, shift as shift$1, flip as flip$1, size as size$1, hide as hide$1, arrow as arrow$1, inline as inline$1, limitShift as limitShift$1, computePosition as computePosition$1 } from '@floating-ui/core';\nimport { round, createCoords, max, min, floor } from '@floating-ui/utils';\nimport { getComputedStyle, isHTMLElement, isElement, getWindow, isWebKit, getFrameElement, getNodeScroll, getDocumentElement, isTopLayer, getNodeName, isOverflowElement, getOverflowAncestors, getParentNode, isLastTraversableNode, isContainingBlock, isTableElement, getContainingBlock } from '@floating-ui/utils/dom';\nexport { getOverflowAncestors } from '@floating-ui/utils/dom';\n\nfunction getCssDimensions(element) {\n const css = getComputedStyle(element);\n // In testing environments, the `width` and `height` properties are empty\n // strings for SVG elements, returning NaN. Fallback to `0` in this case.\n let width = parseFloat(css.width) || 0;\n let height = parseFloat(css.height) || 0;\n const hasOffset = isHTMLElement(element);\n const offsetWidth = hasOffset ? element.offsetWidth : width;\n const offsetHeight = hasOffset ? element.offsetHeight : height;\n const shouldFallback = round(width) !== offsetWidth || round(height) !== offsetHeight;\n if (shouldFallback) {\n width = offsetWidth;\n height = offsetHeight;\n }\n return {\n width,\n height,\n $: shouldFallback\n };\n}\n\nfunction unwrapElement(element) {\n return !isElement(element) ? element.contextElement : element;\n}\n\nfunction getScale(element) {\n const domElement = unwrapElement(element);\n if (!isHTMLElement(domElement)) {\n return createCoords(1);\n }\n const rect = domElement.getBoundingClientRect();\n const {\n width,\n height,\n $\n } = getCssDimensions(domElement);\n let x = ($ ? round(rect.width) : rect.width) / width;\n let y = ($ ? round(rect.height) : rect.height) / height;\n\n // 0, NaN, or Infinity should always fallback to 1.\n\n if (!x || !Number.isFinite(x)) {\n x = 1;\n }\n if (!y || !Number.isFinite(y)) {\n y = 1;\n }\n return {\n x,\n y\n };\n}\n\nconst noOffsets = /*#__PURE__*/createCoords(0);\nfunction getVisualOffsets(element) {\n const win = getWindow(element);\n if (!isWebKit() || !win.visualViewport) {\n return noOffsets;\n }\n return {\n x: win.visualViewport.offsetLeft,\n y: win.visualViewport.offsetTop\n };\n}\nfunction shouldAddVisualOffsets(element, isFixed, floatingOffsetParent) {\n if (isFixed === void 0) {\n isFixed = false;\n }\n if (!floatingOffsetParent || isFixed && floatingOffsetParent !== getWindow(element)) {\n return false;\n }\n return isFixed;\n}\n\nfunction getBoundingClientRect(element, includeScale, isFixedStrategy, offsetParent) {\n if (includeScale === void 0) {\n includeScale = false;\n }\n if (isFixedStrategy === void 0) {\n isFixedStrategy = false;\n }\n const clientRect = element.getBoundingClientRect();\n const domElement = unwrapElement(element);\n let scale = createCoords(1);\n if (includeScale) {\n if (offsetParent) {\n if (isElement(offsetParent)) {\n scale = getScale(offsetParent);\n }\n } else {\n scale = getScale(element);\n }\n }\n const visualOffsets = shouldAddVisualOffsets(domElement, isFixedStrategy, offsetParent) ? getVisualOffsets(domElement) : createCoords(0);\n let x = (clientRect.left + visualOffsets.x) / scale.x;\n let y = (clientRect.top + visualOffsets.y) / scale.y;\n let width = clientRect.width / scale.x;\n let height = clientRect.height / scale.y;\n if (domElement) {\n const win = getWindow(domElement);\n const offsetWin = offsetParent && isElement(offsetParent) ? getWindow(offsetParent) : offsetParent;\n let currentWin = win;\n let currentIFrame = getFrameElement(currentWin);\n while (currentIFrame && offsetParent && offsetWin !== currentWin) {\n const iframeScale = getScale(currentIFrame);\n const iframeRect = currentIFrame.getBoundingClientRect();\n const css = getComputedStyle(currentIFrame);\n const left = iframeRect.left + (currentIFrame.clientLeft + parseFloat(css.paddingLeft)) * iframeScale.x;\n const top = iframeRect.top + (currentIFrame.clientTop + parseFloat(css.paddingTop)) * iframeScale.y;\n x *= iframeScale.x;\n y *= iframeScale.y;\n width *= iframeScale.x;\n height *= iframeScale.y;\n x += left;\n y += top;\n currentWin = getWindow(currentIFrame);\n currentIFrame = getFrameElement(currentWin);\n }\n }\n return rectToClientRect({\n width,\n height,\n x,\n y\n });\n}\n\n// If <html> has a CSS width greater than the viewport, then this will be\n// incorrect for RTL.\nfunction getWindowScrollBarX(element, rect) {\n const leftScroll = getNodeScroll(element).scrollLeft;\n if (!rect) {\n return getBoundingClientRect(getDocumentElement(element)).left + leftScroll;\n }\n return rect.left + leftScroll;\n}\n\nfunction getHTMLOffset(documentElement, scroll, ignoreScrollbarX) {\n if (ignoreScrollbarX === void 0) {\n ignoreScrollbarX = false;\n }\n const htmlRect = documentElement.getBoundingClientRect();\n const x = htmlRect.left + scroll.scrollLeft - (ignoreScrollbarX ? 0 :\n // RTL <body> scrollbar.\n getWindowScrollBarX(documentElement, htmlRect));\n const y = htmlRect.top + scroll.scrollTop;\n return {\n x,\n y\n };\n}\n\nfunction convertOffsetParentRelativeRectToViewportRelativeRect(_ref) {\n let {\n elements,\n rect,\n offsetParent,\n strategy\n } = _ref;\n const isFixed = strategy === 'fixed';\n const documentElement = getDocumentElement(offsetParent);\n const topLayer = elements ? isTopLayer(elements.floating) : false;\n if (offsetParent === documentElement || topLayer && isFixed) {\n return rect;\n }\n let scroll = {\n scrollLeft: 0,\n scrollTop: 0\n };\n let scale = createCoords(1);\n const offsets = createCoords(0);\n const isOffsetParentAnElement = isHTMLElement(offsetParent);\n if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {\n if (getNodeName(offsetParent) !== 'body' || isOverflowElement(documentElement)) {\n scroll = getNodeScroll(offsetParent);\n }\n if (isHTMLElement(offsetParent)) {\n const offsetRect = getBoundingClientRect(offsetParent);\n scale = getScale(offsetParent);\n offsets.x = offsetRect.x + offsetParent.clientLeft;\n offsets.y = offsetRect.y + offsetParent.clientTop;\n }\n }\n const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll, true) : createCoords(0);\n return {\n width: rect.width * scale.x,\n height: rect.height * scale.y,\n x: rect.x * scale.x - scroll.scrollLeft * scale.x + offsets.x + htmlOffset.x,\n y: rect.y * scale.y - scroll.scrollTop * scale.y + offsets.y + htmlOffset.y\n };\n}\n\nfunction getClientRects(element) {\n return Array.from(element.getClientRects());\n}\n\n// Gets the entire size of the scrollable document area, even extending outside\n// of the `<html>` and `<body>` rect bounds if horizontally scrollable.\nfunction getDocumentRect(element) {\n const html = getDocumentElement(element);\n const scroll = getNodeScroll(element);\n const body = element.ownerDocument.body;\n const width = max(html.scrollWidth, html.clientWidth, body.scrollWidth, body.clientWidth);\n const height = max(html.scrollHeight, html.clientHeight, body.scrollHeight, body.clientHeight);\n let x = -scroll.scrollLeft + getWindowScrollBarX(element);\n const y = -scroll.scrollTop;\n if (getComputedStyle(body).direction === 'rtl') {\n x += max(html.clientWidth, body.clientWidth) - width;\n }\n return {\n width,\n height,\n x,\n y\n };\n}\n\nfunction getViewportRect(element, strategy) {\n const win = getWindow(element);\n const html = getDocumentElement(element);\n const visualViewport = win.visualViewport;\n let width = html.clientWidth;\n let height = html.clientHeight;\n let x = 0;\n let y = 0;\n if (visualViewport) {\n width = visualViewport.width;\n height = visualViewport.height;\n const visualViewportBased = isWebKit();\n if (!visualViewportBased || visualViewportBased && strategy === 'fixed') {\n x = visualViewport.offsetLeft;\n y = visualViewport.offsetTop;\n }\n }\n return {\n width,\n height,\n x,\n y\n };\n}\n\n// Returns the inner client rect, subtracting scrollbars if present.\nfunction getInnerBoundingClientRect(element, strategy) {\n const clientRect = getBoundingClientRect(element, true, strategy === 'fixed');\n const top = clientRect.top + element.clientTop;\n const left = clientRect.left + element.clientLeft;\n const scale = isHTMLElement(element) ? getScale(element) : createCoords(1);\n const width = element.clientWidth * scale.x;\n const height = element.clientHeight * scale.y;\n const x = left * scale.x;\n const y = top * scale.y;\n return {\n width,\n height,\n x,\n y\n };\n}\nfunction getClientRectFromClippingAncestor(element, clippingAncestor, strategy) {\n let rect;\n if (clippingAncestor === 'viewport') {\n rect = getViewportRect(element, strategy);\n } else if (clippingAncestor === 'document') {\n rect = getDocumentRect(getDocumentElement(element));\n } else if (isElement(clippingAncestor)) {\n rect = getInnerBoundingClientRect(clippingAncestor, strategy);\n } else {\n const visualOffsets = getVisualOffsets(element);\n rect = {\n x: clippingAncestor.x - visualOffsets.x,\n y: clippingAncestor.y - visualOffsets.y,\n width: clippingAncestor.width,\n height: clippingAncestor.height\n };\n }\n return rectToClientRect(rect);\n}\nfunction hasFixedPositionAncestor(element, stopNode) {\n const parentNode = getParentNode(element);\n if (parentNode === stopNode || !isElement(parentNode) || isLastTraversableNode(parentNode)) {\n return false;\n }\n return getComputedStyle(parentNode).position === 'fixed' || hasFixedPositionAncestor(parentNode, stopNode);\n}\n\n// A \"clipping ancestor\" is an `overflow` element with the characteristic of\n// clipping (or hiding) child elements. This returns all clipping ancestors\n// of the given element up the tree.\nfunction getClippingElementAncestors(element, cache) {\n const cachedResult = cache.get(element);\n if (cachedResult) {\n return cachedResult;\n }\n let result = getOverflowAncestors(element, [], false).filter(el => isElement(el) && getNodeName(el) !== 'body');\n let currentContainingBlockComputedStyle = null;\n const elementIsFixed = getComputedStyle(element).position === 'fixed';\n let currentNode = elementIsFixed ? getParentNode(element) : element;\n\n // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block\n while (isElement(currentNode) && !isLastTraversableNode(currentNode)) {\n const computedStyle = getComputedStyle(currentNode);\n const currentNodeIsContaining = isContainingBlock(currentNode);\n if (!currentNodeIsContaining && computedStyle.position === 'fixed') {\n currentContainingBlockComputedStyle = null;\n }\n const shouldDropCurrentNode = elementIsFixed ? !currentNodeIsContaining && !currentContainingBlockComputedStyle : !currentNodeIsContaining && computedStyle.position === 'static' && !!currentContainingBlockComputedStyle && ['absolute', 'fixed'].includes(currentContainingBlockComputedStyle.position) || isOverflowElement(currentNode) && !currentNodeIsContaining && hasFixedPositionAncestor(element, currentNode);\n if (shouldDropCurrentNode) {\n // Drop non-containing blocks.\n result = result.filter(ancestor => ancestor !== currentNode);\n } else {\n // Record last containing block for next iteration.\n currentContainingBlockComputedStyle = computedStyle;\n }\n currentNode = getParentNode(currentNode);\n }\n cache.set(element, result);\n return result;\n}\n\n// Gets the maximum area that the element is visible in due to any number of\n// clipping ancestors.\nfunction getClippingRect(_ref) {\n let {\n element,\n boundary,\n rootBoundary,\n strategy\n } = _ref;\n const elementClippingAncestors = boundary === 'clippingAncestors' ? isTopLayer(element) ? [] : getClippingElementAncestors(element, this._c) : [].concat(boundary);\n const clippingAncestors = [...elementClippingAncestors, rootBoundary];\n const firstClippingAncestor = clippingAncestors[0];\n const clippingRect = clippingAncestors.reduce((accRect, clippingAncestor) => {\n const rect = getClientRectFromClippingAncestor(element, clippingAncestor, strategy);\n accRect.top = max(rect.top, accRect.top);\n accRect.right = min(rect.right, accRect.right);\n accRect.bottom = min(rect.bottom, accRect.bottom);\n accRect.left = max(rect.left, accRect.left);\n return accRect;\n }, getClientRectFromClippingAncestor(element, firstClippingAncestor, strategy));\n return {\n width: clippingRect.right - clippingRect.left,\n height: clippingRect.bottom - clippingRect.top,\n x: clippingRect.left,\n y: clippingRect.top\n };\n}\n\nfunction getDimensions(element) {\n const {\n width,\n height\n } = getCssDimensions(element);\n return {\n width,\n height\n };\n}\n\nfunction getRectRelativeToOffsetParent(element, offsetParent, strategy) {\n const isOffsetParentAnElement = isHTMLElement(offsetParent);\n const documentElement = getDocumentElement(offsetParent);\n const isFixed = strategy === 'fixed';\n const rect = getBoundingClientRect(element, true, isFixed, offsetParent);\n let scroll = {\n scrollLeft: 0,\n scrollTop: 0\n };\n const offsets = createCoords(0);\n if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {\n if (getNodeName(offsetParent) !== 'body' || isOverflowElement(documentElement)) {\n scroll = getNodeScroll(offsetParent);\n }\n if (isOffsetParentAnElement) {\n const offsetRect = getBoundingClientRect(offsetParent, true, isFixed, offsetParent);\n offsets.x = offsetRect.x + offsetParent.clientLeft;\n offsets.y = offsetRect.y + offsetParent.clientTop;\n } else if (documentElement) {\n // If the <body> scrollbar appears on the left (e.g. RTL systems). Use\n // Firefox with layout.scrollbar.side = 3 in about:config to test this.\n offsets.x = getWindowScrollBarX(documentElement);\n }\n }\n const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll) : createCoords(0);\n const x = rect.left + scroll.scrollLeft - offsets.x - htmlOffset.x;\n const y = rect.top + scroll.scrollTop - offsets.y - htmlOffset.y;\n return {\n x,\n y,\n width: rect.width,\n height: rect.height\n };\n}\n\nfunction isStaticPositioned(element) {\n return getComputedStyle(element).position === 'static';\n}\n\nfunction getTrueOffsetParent(element, polyfill) {\n if (!isHTMLElement(element) || getComputedStyle(element).position === 'fixed') {\n return null;\n }\n if (polyfill) {\n return polyfill(element);\n }\n let rawOffsetParent = element.offsetParent;\n\n // Firefox returns the <html> element as the offsetParent if it's non-static,\n // while Chrome and Safari return the <body> element. The <body> element must\n // be used to perform the correct calculations even if the <html> element is\n // non-static.\n if (getDocumentElement(element) === rawOffsetParent) {\n rawOffsetParent = rawOffsetParent.ownerDocument.body;\n }\n return rawOffsetParent;\n}\n\n// Gets the closest ancestor positioned element. Handles some edge cases,\n// such as table ancestors and cross browser bugs.\nfunction getOffsetParent(element, polyfill) {\n const win = getWindow(element);\n if (isTopLayer(element)) {\n return win;\n }\n if (!isHTMLElement(element)) {\n let svgOffsetParent = getParentNode(element);\n while (svgOffsetParent && !isLastTraversableNode(svgOffsetParent)) {\n if (isElement(svgOffsetParent) && !isStaticPositioned(svgOffsetParent)) {\n return svgOffsetParent;\n }\n svgOffsetParent = getParentNode(svgOffsetParent);\n }\n return win;\n }\n let offsetParent = getTrueOffsetParent(element, polyfill);\n while (offsetParent && isTableElement(offsetParent) && isStaticPositioned(offsetParent)) {\n offsetParent = getTrueOffsetParent(offsetParent, polyfill);\n }\n if (offsetParent && isLastTraversableNode(offsetParent) && isStaticPositioned(offsetParent) && !isContainingBlock(offsetParent)) {\n return win;\n }\n return offsetParent || getContainingBlock(element) || win;\n}\n\nconst getElementRects = async function (data) {\n const getOffsetParentFn = this.getOffsetParent || getOffsetParent;\n const getDimensionsFn = this.getDimensions;\n const floatingDimensions = await getDimensionsFn(data.floating);\n return {\n reference: getRectRelativeToOffsetParent(data.reference, await getOffsetParentFn(data.floating), data.strategy),\n floating: {\n x: 0,\n y: 0,\n width: floatingDimensions.width,\n height: floatingDimensions.height\n }\n };\n};\n\nfunction isRTL(element) {\n return getComputedStyle(element).direction === 'rtl';\n}\n\nconst platform = {\n convertOffsetParentRelativeRectToViewportRelativeRect,\n getDocumentElement,\n getClippingRect,\n getOffsetParent,\n getElementRects,\n getClientRects,\n getDimensions,\n getScale,\n isElement,\n isRTL\n};\n\n// https://samthor.au/2021/observing-dom/\nfunction observeMove(element, onMove) {\n let io = null;\n let timeoutId;\n const root = getDocumentElement(element);\n function cleanup() {\n var _io;\n clearTimeout(timeoutId);\n (_io = io) == null || _io.disconnect();\n io = null;\n }\n function refresh(skip, threshold) {\n if (skip === void 0) {\n skip = false;\n }\n if (threshold === void 0) {\n threshold = 1;\n }\n cleanup();\n const {\n left,\n top,\n width,\n height\n } = element.getBoundingClientRect();\n if (!skip) {\n onMove();\n }\n if (!width || !height) {\n return;\n }\n const insetTop = floor(top);\n const insetRight = floor(root.clientWidth - (left + width));\n const insetBottom = floor(root.clientHeight - (top + height));\n const insetLeft = floor(left);\n const rootMargin = -insetTop + \"px \" + -insetRight + \"px \" + -insetBottom + \"px \" + -insetLeft + \"px\";\n const options = {\n rootMargin,\n threshold: max(0, min(1, threshold)) || 1\n };\n let isFirstUpdate = true;\n function handleObserve(entries) {\n const ratio = entries[0].intersectionRatio;\n if (ratio !== threshold) {\n if (!isFirstUpdate) {\n return refresh();\n }\n if (!ratio) {\n // If the reference is clipped, the ratio is 0. Throttle the refresh\n // to prevent an infinite loop of updates.\n timeoutId = setTimeout(() => {\n refresh(false, 1e-7);\n }, 1000);\n } else {\n refresh(false, ratio);\n }\n }\n isFirstUpdate = false;\n }\n\n // Older browsers don't support a `document` as the root and will throw an\n // error.\n try {\n io = new IntersectionObserver(handleObserve, {\n ...options,\n // Handle <iframe>s\n root: root.ownerDocument\n });\n } catch (e) {\n io = new IntersectionObserver(handleObserve, options);\n }\n io.observe(element);\n }\n refresh(true);\n return cleanup;\n}\n\n/**\n * Automatically updates the position of the floating element when necessary.\n * Should only be called when the floating element is mounted on the DOM or\n * visible on the screen.\n * @returns cleanup function that should be invoked when the floating element is\n * removed from the DOM or hidden from the screen.\n * @see https://floating-ui.com/docs/autoUpdate\n */\nfunction autoUpdate(reference, floating, update, options) {\n if (options === void 0) {\n options = {};\n }\n const {\n ancestorScroll = true,\n ancestorResize = true,\n elementResize = typeof ResizeObserver === 'function',\n layoutShift = typeof IntersectionObserver === 'function',\n animationFrame = false\n } = options;\n const referenceEl = unwrapElement(reference);\n const ancestors = ancestorScroll || ancestorResize ? [...(referenceEl ? getOverflowAncestors(referenceEl) : []), ...getOverflowAncestors(floating)] : [];\n ancestors.forEach(ancestor => {\n ancestorScroll && ancestor.addEventListener('scroll', update, {\n passive: true\n });\n ancestorResize && ancestor.addEventListener('resize', update);\n });\n const cleanupIo = referenceEl && layoutShift ? observeMove(referenceEl, update) : null;\n let reobserveFrame = -1;\n let resizeObserver = null;\n if (elementResize) {\n resizeObserver = new ResizeObserver(_ref => {\n let [firstEntry] = _ref;\n if (firstEntry && firstEntry.target === referenceEl && resizeObserver) {\n // Prevent update loops when using the `size` middleware.\n // https://github.com/floating-ui/floating-ui/issues/1740\n resizeObserver.unobserve(floating);\n cancelAnimationFrame(reobserveFrame);\n reobserveFrame = requestAnimationFrame(() => {\n var _resizeObserver;\n (_resizeObserver = resizeObserver) == null || _resizeObserver.observe(floating);\n });\n }\n update();\n });\n if (referenceEl && !animationFrame) {\n resizeObserver.observe(referenceEl);\n }\n resizeObserver.observe(floating);\n }\n let frameId;\n let prevRefRect = animationFrame ? getBoundingClientRect(reference) : null;\n if (animationFrame) {\n frameLoop();\n }\n function frameLoop() {\n const nextRefRect = getBoundingClientRect(reference);\n if (prevRefRect && (nextRefRect.x !== prevRefRect.x || nextRefRect.y !== prevRefRect.y || nextRefRect.width !== prevRefRect.width || nextRefRect.height !== prevRefRect.height)) {\n update();\n }\n prevRefRect = nextRefRect;\n frameId = requestAnimationFrame(frameLoop);\n }\n update();\n return () => {\n var _resizeObserver2;\n ancestors.forEach(ancestor => {\n ancestorScroll && ancestor.removeEventListener('scroll', update);\n ancestorResize && ancestor.removeEventListener('resize', update);\n });\n cleanupIo == null || cleanupIo();\n (_resizeObserver2 = resizeObserver) == null || _resizeObserver2.disconnect();\n resizeObserver = null;\n if (animationFrame) {\n cancelAnimationFrame(frameId);\n }\n };\n}\n\n/**\n * Resolves with an object of overflow side offsets that determine how much the\n * element is overflowing a given clipping boundary on each side.\n * - positive = overflowing the boundary by that number of pixels\n * - negative = how many pixels left before it will overflow\n * - 0 = lies flush with the boundary\n * @see https://floating-ui.com/docs/detectOverflow\n */\nconst detectOverflow = detectOverflow$1;\n\n/**\n * Modifies the placement by translating the floating element along the\n * specified axes.\n * A number (shorthand for `mainAxis` or distance), or an axes configuration\n * object may be passed.\n * @see https://floating-ui.com/docs/offset\n */\nconst offset = offset$1;\n\n/**\n * Optimizes the visibility of the floating element by choosing the placement\n * that has the most space available automatically, without needing to specify a\n * preferred placement. Alternative to `flip`.\n * @see https://floating-ui.com/docs/autoPlacement\n */\nconst autoPlacement = autoPlacement$1;\n\n/**\n * Optimizes the visibility of the floating element by shifting it in order to\n * keep it in view when it will overflow the clipping boundary.\n * @see https://floating-ui.com/docs/shift\n */\nconst shift = shift$1;\n\n/**\n * Optimizes the visibility of the floating element by flipping the `placement`\n * in order to keep it in view when the preferred placement(s) will overflow the\n * clipping boundary. Alternative to `autoPlacement`.\n * @see https://floating-ui.com/docs/flip\n */\nconst flip = flip$1;\n\n/**\n * Provides data that allows you to change the size of the floating element \u2014\n * for instance, prevent it from overflowing the clipping boundary or match the\n * width of the reference element.\n * @see https://floating-ui.com/docs/size\n */\nconst size = size$1;\n\n/**\n * Provides data to hide the floating element in applicable situations, such as\n * when it is not in the same clipping context as the reference element.\n * @see https://floating-ui.com/docs/hide\n */\nconst hide = hide$1;\n\n/**\n * Provides data to position an inner element of the floating element so that it\n * appears centered to the reference element.\n * @see https://floating-ui.com/docs/arrow\n */\nconst arrow = arrow$1;\n\n/**\n * Provides improved positioning for inline reference elements that can span\n * over multiple lines, such as hyperlinks or range selections.\n * @see https://floating-ui.com/docs/inline\n */\nconst inline = inline$1;\n\n/**\n * Built-in `limiter` that will stop `shift()` at a certain point.\n */\nconst limitShift = limitShift$1;\n\n/**\n * Computes the `x` and `y` coordinates that will place the floating element\n * next to a given reference element.\n */\nconst computePosition = (reference, floating, options) => {\n // This caches the expensive `getClippingElementAncestors` function so that\n // multiple lifecycle resets re-use the same result. It only lives for a\n // single call. If other functions become expensive, we can add them as well.\n const cache = new Map();\n const mergedOptions = {\n platform,\n ...options\n };\n const platformWithCache = {\n ...mergedOptions.platform,\n _c: cache\n };\n return computePosition$1(reference, floating, {\n ...mergedOptions,\n platform: platformWithCache\n });\n};\n\nexport { arrow, autoPlacement, autoUpdate, computePosition, detectOverflow, flip, hide, inline, limitShift, offset, platform, shift, size };\n", "import { css } from 'lit';\n\nconst styles = css`\n :host {\n --mdc-popover-arrow-border-radius: 0.1875rem;\n --mdc-popover-arrow-border: 0.0625rem solid var(--mds-color-theme-outline-secondary-normal);\n\n --mdc-popover-primary-background-color: var(--mds-color-theme-background-solid-primary-normal);\n --mdc-popover-inverted-background-color: var(--mds-color-theme-inverted-background-normal);\n --mdc-popover-inverted-border-color: var(--mds-color-theme-inverted-outline-primary-normal);\n --mdc-popover-inverted-text-color: var(--mds-color-theme-inverted-text-primary-normal);\n }\n\n :host([color='contrast']) .popover-container {\n .popover-arrow {\n background-color: var(--mdc-popover-inverted-background-color);\n border-color: var(--mdc-popover-inverted-border-color);\n }\n\n .popover-close {\n color: var(--mdc-popover-inverted-text-color);\n }\n }\n\n .popover-container {\n display: none;\n position: absolute;\n box-sizing: content-box;\n }\n\n :host([visible]) .popover-container {\n display: block;\n }\n\n .popover-container::part(container) {\n padding: 0;\n }\n\n :host::part(popover-content) {\n position: relative;\n padding: 0.75rem;\n overflow-y: auto;\n min-width: max-content;\n z-index: 9998;\n }\n\n .popover-backdrop {\n z-index: 999;\n position: fixed;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n background: transparent;\n }\n\n .popover-hover-bridge {\n position: absolute;\n transform: translateX(-50%);\n background: transparent;\n pointer-events: auto;\n }\n\n .popover-arrow {\n position: absolute;\n width: 1rem;\n height: 1rem;\n background-color: var(--mdc-popover-primary-background-color);\n transform: rotate(45deg);\n pointer-events: none;\n border: var(--mdc-popover-arrow-border);\n }\n\n .popover-close {\n position: absolute;\n right: 0.75rem;\n top: 0.75rem;\n cursor: pointer;\n z-index: 9999;\n }\n\n .popover-arrow[data-side='top'] {\n border-top: none;\n border-left: none;\n border-bottom-right-radius: var(--mdc-popover-arrow-border-radius);\n border-top-left-radius: 100%;\n }\n\n .popover-arrow[data-side='bottom'] {\n border-bottom: none;\n border-right: none;\n border-top-left-radius: var(--mdc-popover-arrow-border-radius);\n border-bottom-right-radius: 100%;\n }\n\n .popover-arrow[data-side='right'] {\n border-top: none;\n border-right: none;\n border-bottom-left-radius: var(--mdc-popover-arrow-border-radius);\n border-top-right-radius: 100%;\n }\n\n .popover-arrow[data-side='left'] {\n border-bottom: none;\n border-left: none;\n border-top-right-radius: var(--mdc-popover-arrow-border-radius);\n border-bottom-left-radius: 100%;\n }\n`;\n\nexport default [styles];\n", "import utils from '../../utils/tag-name';\n\nconst TAG_NAME = utils.constructTagName('modalcontainer');\n\nconst COLOR = {\n TONAL: 'tonal',\n CONTRAST: 'contrast',\n} as const;\n\nconst ELEVATION = {\n 0: 0,\n 1: 1,\n 2: 2,\n 3: 3,\n 4: 4,\n} as const;\n\nconst DEFAULTS = {\n COLOR: COLOR.TONAL,\n ELEVATION: ELEVATION[0],\n ROLE: 'dialog',\n ARIA_MODAL: false,\n CHILDREN: 'Lorem ipsum dolor sit amet',\n} as const;\n\nexport { TAG_NAME, COLOR, DEFAULTS, ELEVATION };\n", "import utils from '../../utils/tag-name';\nimport { COLOR } from '../modalcontainer/modalcontainer.constants';\n\nconst TAG_NAME = utils.constructTagName('popover');\n\nconst POPOVER_PLACEMENT = {\n LEFT_START: 'left-start',\n LEFT: 'left',\n LEFT_END: 'left-end',\n RIGHT_START: 'right-start',\n RIGHT: 'right',\n RIGHT_END: 'right-end',\n TOP_START: 'top-start',\n TOP: 'top',\n TOP_END: 'top-end',\n BOTTOM_START: 'bottom-start',\n BOTTOM: 'bottom',\n BOTTOM_END: 'bottom-end',\n} as const;\n\nconst TRIGGER = {\n CLICK: 'click',\n MOUSEENTER: 'mouseenter',\n FOCUSIN: 'focusin',\n MANUAL: 'manual',\n} as const;\n\nconst DEFAULTS = {\n PLACEMENT: POPOVER_PLACEMENT.BOTTOM,\n TRIGGER: TRIGGER.CLICK,\n COLOR: COLOR.TONAL,\n OFFSET: 4,\n VISIBLE: false,\n ARROW: false,\n CLOSE_BUTTON: false,\n FOCUS_TRAP: false,\n INTERACTIVE: false,\n PREVENT_SCROLL: false,\n HIDE_ON_ESCAPE: false,\n HIDE_ON_BLUR: false,\n HIDE_ON_CLICK_OUTSIDE: false,\n FOCUS_BACK: false,\n BACKDROP: false,\n FLIP: true,\n SIZE: false,\n DELAY: '0,0',\n ROLE: 'dialog',\n Z_INDEX: 1000,\n} as const;\n\nexport { TAG_NAME, POPOVER_PLACEMENT, TRIGGER, DEFAULTS };\n", "import { property } from 'lit/decorators.js';\nimport type { Constructor } from './index.types';\nimport { DEFAULTS as POPOVER_DEFAULTS } from '../../components/popover/popover.constants';\n\nexport interface FocusTrapClassInterface {\n enabledFocusTrap: boolean;\n enabledPreventScroll: boolean;\n setFocusableElements(): void;\n setInitialFocus(prefferableElement?: number): void;\n deactivateFocusTrap(): void;\n}\n\nexport const FocusTrapMixin = <T extends Constructor<HTMLElement>>(superClass: T) => {\n class FocusTrap extends superClass {\n /**\n * Determines whether the focus trap is enabled.\n * If true, focus will be restricted to the content within this component.\n * @default false\n */\n @property({ type: Boolean })\n enabledFocusTrap: boolean = POPOVER_DEFAULTS.FOCUS_TRAP;\n\n /**\n * Prevent outside scrolling when popover show.\n * @default false\n */\n @property({ type: Boolean })\n enabledPreventScroll: boolean = POPOVER_DEFAULTS.PREVENT_SCROLL;\n\n /** @internal */\n private focusTrapIndex: number = -1;\n\n /** @internal */\n private focusableElements: HTMLElement[] = [];\n\n shouldWrapFocus: () => boolean = () => true;\n\n constructor(...args: any[]) {\n super(...args);\n this.addEventListener('keydown', this.handleKeydown);\n }\n\n /**\n * Deactivate the focus trap.\n */\n deactivateFocusTrap() {\n this.enabledFocusTrap = false;\n this.enabledPreventScroll = false;\n this.focusTrapIndex = -1;\n document.body.style.overflow = '';\n }\n\n /**\n * Checks if the element has no client rectangles (not visible in the viewport).\n *\n * @param element - The element to check.\n * @returns True if the element has no client rectangles.\n */\n private hasNoClientRects(element: HTMLElement) {\n return element.getClientRects().length === 0;\n }\n\n /**\n * Checks if the element has zero dimensions (width and height are both 0).\n *\n * @param element - The element to check.\n * @returns True if the element has zero dimensions.\n */\n private hasZeroDimensions(element: HTMLElement) {\n const { width, height } = element.getBoundingClientRect();\n const { offsetWidth, offsetHeight } = element;\n\n return offsetWidth + offsetHeight + height + width === 0;\n }\n\n /**\n * Determines if the element is not visible in the DOM.\n *\n * @param element - The element to check.\n * @returns True if the element is not visible.\n */\n private isNotVisible(element: HTMLElement) {\n return this.hasZeroDimensions(element) || this.hasNoClientRects(element);\n }\n\n /**\n * Checks if the element has inline styles that make it hidden.\n *\n * @param element - The element to check.\n * @returns True if the element has inline styles that make it hidden.\n */\n private hasHiddenStyle(element: HTMLElement) {\n const { display, opacity, visibility } = element.style;\n return display === 'none' || opacity === '0' || visibility === 'hidden' || visibility === 'collapse';\n }\n\n /**\n * Checks if the element is hidden by a computed style.\n *\n * @param element - The element to check.\n * @returns True if the element is hidden by a computed style.\n */\n private hasComputedHidden(element: HTMLElement) {\n const computedStyle = getComputedStyle(element);\n return computedStyle.visibility === 'hidden' || computedStyle.height === '0' || computedStyle.display === 'none';\n }\n\n /**\n * Checks if the element is hidden from the user.\n *\n * @param element - The element to check.\n * @returns True if the element is hidden.\n */\n private isHidden(element: HTMLElement) {\n return (\n element.hasAttribute('hidden')\n || element.getAttribute('aria-hidden') === 'true'\n || this.hasHiddenStyle(element)\n || this.isNotVisible(element)\n || this.hasComputedHidden(element)\n );\n }\n\n /**\n * Checks if the element is not tabbable.\n *\n * @param element - The element to check.\n * @returns True if the element is not tabbable.\n */\n private isNotTabbable(element: HTMLElement) {\n return element.getAttribute('tabindex') === '-1';\n }\n\n /**\n * Checks if the element is interactive.\n *\n * @param element - The element to check.\n * @returns True if the element is interactive.\n */\n private isInteractiveElement(element: HTMLElement): boolean {\n const interactiveTags = new Set(['BUTTON', 'DETAILS', 'EMBED', 'IFRAME', 'SELECT', 'TEXTAREA']);\n\n if (interactiveTags.has(element.tagName)) {\n return true;\n }\n if (element instanceof HTMLAnchorElement && element.hasAttribute('href')) {\n return true;\n }\n if (element instanceof HTMLInputElement && element.type !== 'hidden') {\n return true;\n }\n if (\n (element instanceof HTMLAudioElement || element instanceof HTMLVideoElement)\n && element.hasAttribute('controls')\n ) {\n return true;\n }\n if (\n (element instanceof HTMLImageElement || element instanceof HTMLObjectElement)\n && element.hasAttribute('usemap')\n ) {\n return true;\n }\n if (element.hasAttribute('tabindex') && element.tabIndex > -1) {\n return true;\n }\n\n return false;\n }\n\n /**\n * Checks if the element is focusable.\n *\n * @param element - The element to check.\n * @returns True if the element is focusable.\n */\n private isFocusable(element: HTMLElement) {\n if (this.isHidden(element) || this.isNotTabbable(element)) {\n return false;\n }\n return this.isInteractiveElement(element);\n }\n\n /**\n * Recursively finds all focusable elements within the given root and its descendants.\n *\n * @param root - The root element to search for focusable elements.\n * @param matches - The set of focusable elements.\n * @returns The list of focusable elements.\n */\n private findFocusable(root: ShadowRoot | HTMLElement, matches: Set<HTMLElement> = new Set()): HTMLElement[] {\n if (root instanceof HTMLElement && this.isFocusable(root)) {\n matches.add(root);\n }\n const children = Array.from(root.children) as HTMLElement[];\n\n children.forEach((child: Node) => {\n const element = child as HTMLElement;\n\n if (this.isFocusable(element)) {\n matches.add(element);\n }\n\n if (element.shadowRoot) {\n this.findFocusable(element.shadowRoot, matches);\n } else if (element.tagName === 'SLOT') {\n const assignedNodes = (element as HTMLSlotElement).assignedElements({ flatten: true });\n assignedNodes.forEach((node) => {\n if (node instanceof HTMLElement) {\n this.findFocusable(node, matches);\n }\n });\n } else {\n this.findFocusable(element, matches);\n }\n });\n\n return [...matches];\n }\n\n /**\n * Updates the list of focusable elements within the component's shadow root.\n */\n public setFocusableElements() {\n if (!this.shadowRoot) return;\n\n this.focusableElements = this.findFocusable(this.shadowRoot, new Set());\n }\n\n /**\n * Sets the initial focus within the container.\n *\n * @param prefferableElement - The index of the prefferable element to focus.\n */\n public setInitialFocus(prefferableElement: number = 0) {\n if (this.focusableElements.length === 0) return;\n\n if (this.enabledPreventScroll) {\n document.body.style.overflow = 'hidden';\n }\n\n if (this.focusableElements[prefferableElement]) {\n this.focusTrapIndex = prefferableElement;\n this.focusableElements[prefferableElement].focus();\n }\n }\n\n /**\n * Calculates the next index for the focus trap.\n *\n * @param currentIndex - The current index.\n * @param step - The step to calculate the next index.\n * @returns The next index.\n */\n private calculateNextIndex(currentIndex: number, step: number) {\n const { length } = this.focusableElements;\n const wrapFocus = this.shouldWrapFocus();\n\n if (currentIndex === -1) {\n return step > 0 ? 0 : length - 1;\n }\n\n let nextIndex = currentIndex + step;\n\n if (wrapFocus) {\n if (nextIndex < 0) nextIndex = length - 1;\n if (nextIndex >= length) nextIndex = 0;\n } else {\n if (nextIndex < 0) nextIndex = 0;\n if (nextIndex >= length) nextIndex = length - 1;\n }\n\n return nextIndex;\n }\n\n /**\n * Returns the deepest active element in the shadow DOM.\n *\n * @returns The deepest active element.\n */\n private getDeepActiveElement() {\n let host: Element | null = document.activeElement || document.body;\n while (host instanceof HTMLElement && host.shadowRoot?.activeElement) {\n host = host.shadowRoot.activeElement;\n }\n\n return (host as HTMLElement) || document.body;\n }\n\n /**\n * Finds the index of the active element within the focusable elements.\n *\n * @param activeElement - The active element.\n * @returns The index of the active element.\n */\n private findElement(activeElement: HTMLElement) {\n return this.focusableElements.findIndex((element) => this.isEqualFocusNode(activeElement, element));\n }\n\n /**\n * Checks if the active element is equal to the given element.\n *\n * @param activeElement - The active element.\n * @param element - The element to compare.\n * @returns True if the active element is equal to the given element.\n */\n private isEqualFocusNode(activeElement: HTMLElement, element: HTMLElement) {\n if (activeElement.nodeType >= 0) {\n return element.isEqualNode(activeElement) && element === activeElement;\n }\n return false;\n }\n\n /**\n * Traps focus within the container.\n *\n * @param direction - The direction of the focus trap.\n * If true, the focus will be trapped in the previous element.\n */\n private trapFocus(direction: boolean) {\n if (this.focusableElements.length === 0) return;\n\n const activeElement = this.getDeepActiveElement!() as HTMLElement;\n const activeIndex = this.findElement(activeElement);\n\n if (direction) {\n this.focusTrapIndex = this.calculateNextIndex(activeIndex, -1);\n } else {\n this.focusTrapIndex = this.calculateNextIndex(activeIndex, 1);\n }\n\n const nextElement = this.focusableElements[this.focusTrapIndex];\n if (nextElement) {\n nextElement.focus();\n }\n }\n\n /**\n * Traps focus within the container.\n *\n * @param event - The keyboard event.\n */\n private handleKeydown(event: KeyboardEvent) {\n if (!this.enabledFocusTrap || !this.focusableElements.length) {\n return;\n }\n\n if (event.key === 'Tab') {\n event.preventDefault();\n this.trapFocus(event.shiftKey);\n }\n }\n }\n\n return FocusTrap as Constructor<HTMLElement & FocusTrapClassInterface> & T;\n};\n", "import type Popover from './popover.component';\n\n/**\n * Manages a stack of popovers to control their order and lifecycle.\n * This class allows adding, removing, and retrieving popovers\n * while maintaining their stacking behavior.\n *\n */\nclass PopoverStack {\n /**\n * Stack to maintain the order of popovers\n * @internal\n */\n private stack: Popover[] = [];\n\n /**\n * Adds a popover to the stack\n *\n * @param popover - Popover instance\n */\n push(popover: Popover) {\n this.stack.push(popover);\n }\n\n /**\n * Removes the last popover from the stack\n *\n * @returns The last popover in the stack\n */\n pop(): Popover | undefined {\n return this.stack.pop();\n }\n\n /**\n * Returns the last popover in the stack\n * without removing it\n *\n * @returns The last popover in the stack\n */\n peek(): Popover | undefined {\n return this.stack[this.stack.length - 1];\n }\n\n /**\n * Removes a popover from the stack\n *\n * @param popover - Popover instance\n */\n remove(popover: Popover) {\n this.stack = this.stack.filter((item) => item !== popover);\n }\n\n /**\n * Clears the stack\n */\n clear() {\n this.stack = [];\n }\n}\n\nexport const popoverStack = new PopoverStack();\n", "import { LitElement } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport type { Constructor } from './index.types';\n\nexport interface DataAriaDescribedbyMixinInterface {\n dataAriaDescribedby: string | null;\n}\n\nexport const DataAriaDescribedbyMixin = <T extends Constructor<LitElement>>(\n superClass: T,\n) => {\n class InnerMixinClass extends superClass {\n /**\n * Defines an ID reference to one or more elements that provide additional\n * descriptive information for the current element.\n * The `aria-describedby` attribute to be set for accessibility.\n * @default null\n */\n @property({ type: String, reflect: true, attribute: 'data-aria-describedby' })\n dataAriaDescribedby: string | null = null;\n }\n // Cast return type to your mixin's interface intersected with the superClass type\n return InnerMixinClass as Constructor<DataAriaDescribedbyMixinInterface> & T;\n};\n", "import { LitElement } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport type { Constructor } from './index.types';\n\nexport interface DataAriaLabelledbyMixinInterface {\n dataAriaLabelledby: string | null;\n}\n\nexport const DataAriaLabelledbyMixin = <T extends Constructor<LitElement>>(\n superClass: T,\n) => {\n class InnerMixinClass extends superClass {\n /**\n * Defines an ID reference to one or more elements that label the current element.\n * The `aria-labelledby` attribute to be set for accessibility.\n * @default null\n */\n @property({ type: String, reflect: true, attribute: 'data-aria-labelledby' })\n dataAriaLabelledby: string | null = null;\n }\n // Cast return type to your mixin's interface intersected with the superClass type\n return InnerMixinClass as Constructor<DataAriaLabelledbyMixinInterface> & T;\n};\n", "import type Popover from './popover.component';\n\nexport class PopoverEventManager {\n /**\n * Dispatches a custom event for the popover.\n *\n * @param eventName - The name of the event.\n * @param instance - The popover instance.\n */\n static dispatchPopoverEvent(eventName: string, instance: Popover) {\n instance.dispatchEvent(\n new CustomEvent(eventName, {\n detail: { show: instance.visible },\n composed: true,\n bubbles: true,\n }),\n );\n }\n\n /**\n * Custom event that is fired when the popover is shown.\n *\n * @param instance - The popover instance.\n */\n static onShowPopover(instance: Popover) {\n this.dispatchPopoverEvent('popover-on-show', instance);\n }\n\n /**\n * Custom event that is fired when the popover is hidden.\n *\n * @param instance - The popover instance.\n */\n static onHidePopover(instance: Popover) {\n this.dispatchPopoverEvent('popover-on-hide', instance);\n }\n\n /**\n * Custom event that is fired when the popover is created.\n *\n * @param instance - The popover instance.\n */\n static onCreatedPopover(instance: Popover) {\n this.dispatchPopoverEvent('popover-on-created', instance);\n }\n\n /**\n * Custom event that is fired when the popover is destroyed.\n *\n * @param instance - The popover instance.\n */\n static onDestroyedPopover(instance: Popover) {\n this.dispatchPopoverEvent('popover-on-destroyed', instance);\n }\n}\n", "import type Popover from './popover.component';\n\nexport class PopoverUtils {\n /** @internal */\n private popover: Popover;\n\n /** @internal */\n private arrowPixelChange: boolean = false;\n\n constructor(popover: Popover) {\n this.popover = popover;\n }\n\n /**\n * Parses the delay string and sets the open and close delay values.\n * If the delay string is invalid, the delay is set to 0.\n * @returns An array containing the open and close delay values.\n * @throws An error if the delay value is invalid.\n */\n setupDelay() {\n try {\n const [openDelay, closeDelay] = this.popover.delay.split(',').map((delay) => {\n const parsed = parseInt(delay, 10);\n if (Number.isNaN(parsed) || parsed < 0) {\n throw new Error(`Invalid delay value: ${delay}`);\n }\n return parsed;\n });\n\n return [openDelay, closeDelay];\n } catch (error) {\n this.popover.delay = '0,0';\n return [0, 0];\n }\n }\n\n /**\n * Sets up the hover bridge for the popover.\n * The hover bridge is used to prevent the popover from closing when the mouse is over the popover.\n *\n * @param placement - The placement of the popover.\n */\n setupHoverBridge(placement: string) {\n const hoverBridge = this.popover.renderRoot.querySelector('.popover-hover-bridge') as HTMLElement;\n Object.assign(hoverBridge.style, {\n top: '',\n left: '',\n right: '',\n bottom: '',\n });\n const bridgeSize = `calc(${this.popover.showArrow ? '0.75rem + ' : ''}${this.popover.offset}px)`;\n const modalContainer = this.popover.shadowRoot?.querySelector('mdc-modalcontainer') as HTMLElement;\n const popoverHeight = modalContainer.offsetHeight || 0;\n const popoverWidth = modalContainer.offsetWidth || 0;\n\n if (hoverBridge) {\n const side = placement.split('-')[0];\n switch (side) {\n case 'top':\n hoverBridge.style.height = bridgeSize;\n hoverBridge.style.bottom = `calc(-1 * (${bridgeSize}))`;\n hoverBridge.style.left = '50%';\n hoverBridge.style.width = `${popoverWidth}px`;\n break;\n case 'left':\n hoverBridge.style.height = `${popoverHeight}px`;\n hoverBridge.style.width = bridgeSize;\n hoverBridge.style.right = `calc(-1.5 * (${bridgeSize}))`;\n break;\n case 'right':\n hoverBridge.style.height = `${popoverHeight}px`;\n hoverBridge.style.width = bridgeSize;\n hoverBridge.style.left = `calc(-0.5 * (${bridgeSize}))`;\n break;\n case 'bottom':\n default:\n hoverBridge.style.height = bridgeSize;\n hoverBridge.style.top = `calc(-1 * (${bridgeSize}))`;\n hoverBridge.style.left = '50%';\n hoverBridge.style.width = `${popoverWidth}px`;\n break;\n }\n }\n }\n\n /**\n * If the `appendTo` property is set, finds the corresponding\n * DOM element by its ID, and appends this popover as a child of that element.\n */\n setupAppendTo() {\n if (this.popover.appendTo) {\n const appendToElement = document.getElementById(this.popover.appendTo);\n if (appendToElement) {\n appendToElement.appendChild(this.popover);\n }\n }\n }\n\n /**\n * Sets up the accessibility attributes for the popover.\n */\n setupAccessibility() {\n if (this.popover.interactive) {\n if (!this.popover.dataAriaLabel) {\n this.popover.dataAriaLabel = this.popover.triggerElement?.ariaLabel\n || this.popover.triggerElement?.textContent\n || '';\n }\n if (!this.popover.dataAriaLabelledby) {\n this.popover.dataAriaLabelledby = this.popover.triggerElement?.id || '';\n }\n }\n }\n\n /**\n * Updates the arrow style based on the arrow data and placement.\n *\n * @param arrowData - The arrow data x and y.\n * @param placement - The placement of the popover.\n */\n updateArrowStyle(arrowData: { x?: number; y?: number }, placement: string): void {\n if (!this.popover.arrowElement) return;\n\n const side = placement.split('-')[0];\n const staticSide = {\n top: 'bottom',\n right: 'left',\n bottom: 'top',\n left: 'right',\n }[side] as 'top' | 'bottom' | 'left' | 'right';\n\n const { x: arrowX, y: arrowY } = arrowData;\n const rect = this.popover.arrowElement.getBoundingClientRect();\n const parent = this.popover.arrowElement.offsetParent?.getBoundingClientRect();\n\n if (!this.arrowPixelChange) {\n const pixelDiff = parent?.[staticSide] ? 12 - Math.abs(rect[staticSide] - parent[staticSide]) : 0;\n if (Math.round(pixelDiff) === 1) {\n this.arrowPixelChange = true;\n } else {\n this.arrowPixelChange = false;\n }\n }\n\n const arrowPixelDiff = this.arrowPixelChange ? 0.5 : 0;\n this.popover.arrowElement.setAttribute('data-side', side);\n\n Object.assign(this.popover.arrowElement.style, {\n left: arrowX != null ? `${arrowX}px` : '',\n top: arrowY != null ? `${arrowY}px` : '',\n [staticSide]: `${-this.popover.arrowElement.offsetHeight / 2 - arrowPixelDiff}px`,\n });\n }\n\n /**\n * Updates the popover style based on the x and y position.\n *\n * @param x - The x position.\n * @param y - The y position.\n */\n updatePopoverStyle(x: number, y: number): void {\n if (!this.popover.containerElement) return;\n\n Object.assign(this.popover.containerElement.style, {\n left: `${x}px`,\n top: `${y}px`,\n });\n }\n}\n", "import { CSSResult, html, nothing, PropertyValues } from 'lit';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport { property } from 'lit/decorators.js';\nimport { computePosition, autoUpdate, offset, flip, shift, arrow, size } from '@floating-ui/dom';\nimport styles from './popover.styles';\nimport { Component } from '../../models';\nimport { FocusTrapMixin } from '../../utils/mixins/FocusTrapMixin';\nimport { popoverStack } from './popover.stack';\nimport type { PopoverPlacement, PopoverTrigger } from './popover.types';\nimport type { ModalContainerColor } from '../modalcontainer/modalcontainer.types';\nimport { COLOR } from '../modalcontainer/modalcontainer.constants';\nimport { DEFAULTS, POPOVER_PLACEMENT, TRIGGER } from './popover.constants';\nimport { ValueOf } from '../../utils/types';\nimport { DataAriaLabelMixin } from '../../utils/mixins/DataAriaLabelMixin';\nimport { DataAriaDescribedbyMixin } from '../../utils/mixins/DataAriaDescribedbyMixin';\nimport { DataAriaLabelledbyMixin } from '../../utils/mixins/DataAriaLabelledbyMixin';\nimport { PopoverEventManager } from './popover.events';\nimport { PopoverUtils } from './popover.utils';\n\n/**\n * Popover component is a lightweight floating UI element that displays additional content when triggered.\n * It can be used for tooltips, dropdowns, or contextual menus.\n * The popover automatically positions itself based on available space and\n * supports dynamic height adjustments with scrollable content when needed\u3002\n *\n * @dependency mdc-button\n * @dependency mdc-modalcontainer\n *\n * @tagname mdc-popover\n *\n * @cssproperty --mdc-popover-arrow-border-radius - radius of the arrow border\n * @cssproperty --mdc-popover-arrow-border - border of the arrow\n * @cssproperty --mdc-popover-primary-background-color - primary background color of the popover\n * @cssproperty --mdc-popover-inverted-background-color - inverted background color of the popover\n * @cssproperty --mdc-popover-inverted-border-color - inverted border color of the popover\n * @cssproperty --mdc-popover-inverted-text-color - inverted text color of the popover\n *\n * @slot - Default slot for modal container\n *\n */\nclass Popover extends DataAriaLabelMixin(DataAriaLabelledbyMixin(DataAriaDescribedbyMixin(FocusTrapMixin(Component)))) {\n /**\n * The unique ID of the popover.\n */\n @property({ type: String })\n override id: string = '';\n\n /**\n * The ID of the element that triggers the popover.\n * This attribute is required for the popover to work.\n */\n @property({ type: String })\n triggerID: string = '';\n\n /**\n * Determines the events that cause the Popover to show.\n * Multiple event names should be separated by spaces.\n * For example to allow both click and hover, use 'click mouseenter' as the trigger.\n * - **click**\n * - **mouseenter**\n * - **focusin**\n * - **manual**\n * @default click\n */\n @property({ type: String, reflect: true })\n trigger: PopoverTrigger = DEFAULTS.TRIGGER;\n\n /**\n * The placement of the popover.\n * - **top**\n * - **top-start**\n * - **top-end**\n * - **bottom**\n * - **bottom-start**\n * - **bottom-end**\n * - **left**\n * - **left-start**\n * - **left-end**\n * - **right**\n * - **right-start**\n * - **right-end**\n * @default bottom\n */\n @property({ type: String, reflect: true })\n placement: PopoverPlacement = DEFAULTS.PLACEMENT;\n\n /**\n * Color of the popover\n * - **tonal**\n * - **contrast**\n * @default tonal\n */\n @property({ type: String, reflect: true })\n color: ModalContainerColor = DEFAULTS.COLOR;\n\n /**\n * The visibility of the popover.\n * @default false\n */\n @property({ type: Boolean, reflect: true })\n visible: boolean = DEFAULTS.VISIBLE;\n\n /**\n * The offset of the popover.\n * @default 4\n */\n @property({ type: Number, reflect: true })\n offset: number = DEFAULTS.OFFSET;\n\n /**\n * Determines whether the focus trap is enabled.\n * If true, focus will be restricted to the content within this component.\n * @default false\n */\n @property({ type: Boolean, reflect: true, attribute: 'focus-trap' })\n focusTrap: boolean = DEFAULTS.FOCUS_TRAP;\n\n /**\n * Prevent outside scrolling when popover show.\n * @default false\n */\n @property({ type: Boolean, reflect: true, attribute: 'prevent-scroll' })\n preventScroll: boolean = DEFAULTS.PREVENT_SCROLL;\n\n /**\n * The arrow visibility of the popover.\n * @default false\n */\n @property({ type: Boolean, attribute: 'show-arrow' })\n showArrow: boolean = DEFAULTS.ARROW;\n\n /**\n * The close button visibility of the popover.\n * @default false\n */\n @property({ type: Boolean, reflect: true, attribute: 'close-button' })\n closeButton: boolean = DEFAULTS.CLOSE_BUTTON;\n\n /**\n * Determines whether the popover is interactive\u3002\n * @default false\n */\n @property({ type: Boolean, reflect: true })\n interactive: boolean = DEFAULTS.INTERACTIVE;\n\n /**\n * The delay of the show/hide popover.\n * @default 0,0\n */\n @property({ type: String, reflect: true })\n delay: string = DEFAULTS.DELAY;\n\n /**\n * Hide popover on escape key press.\n * @default false\n */\n @property({ type: Boolean, reflect: true, attribute: 'hide-on-escape' })\n hideOnEscape: boolean = DEFAULTS.HIDE_ON_ESCAPE;\n\n /**\n * Hide popover on blur.\n * @default false\n */\n @property({ type: Boolean, reflect: true, attribute: 'hide-on-blur' })\n hideOnBlur: boolean = DEFAULTS.HIDE_ON_BLUR;\n\n /**\n * Hide on outside click of the popover.\n * @default false\n */\n @property({ type: Boolean, reflect: true, attribute: 'hide-on-outside-click' })\n hideOnOutsideClick: boolean = DEFAULTS.HIDE_ON_CLICK_OUTSIDE;\n\n /**\n * The focus back to trigger after the popover hide.\n * @default false\n */\n @property({ type: Boolean, reflect: true, attribute: 'focus-back-to-trigger' })\n focusBackToTrigger: boolean = DEFAULTS.FOCUS_BACK;\n\n /**\n * Determines whether the popover with backdrop.\n * Other than popover and trigger element, the rest of the screen will be covered with a backdrop.\n * @default false\n */\n @property({ type: Boolean, reflect: true })\n backdrop: boolean = DEFAULTS.BACKDROP;\n\n /**\n * Changes the placement of popover to keep it in view when scrolling.\n * @default true\n */\n @property({ type: Boolean, reflect: true })\n flip: boolean = DEFAULTS.FLIP;\n\n /**\n * Changes the size of popover to keep it in view when scrolling.\n * @default false\n */\n @property({ type: Boolean, reflect: true })\n size: boolean = DEFAULTS.SIZE;\n\n /**\n * The z-index of the popover.\n * @default 1000\n */\n @property({ type: Number, reflect: true, attribute: 'z-index' })\n zIndex: number = DEFAULTS.Z_INDEX;\n\n /**\n * Element ID that the popover append to.\n * @default ''\n */\n @property({ type: String, reflect: true, attribute: 'append-to' })\n appendTo: string = '';\n\n /**\n * aria-label attribute to be set for close button accessibility.\n * @default null\n */\n @property({ type: String, attribute: 'close-button-aria-label' })\n closeButtonAriaLabel: string | null = null;\n\n /**\n * Role of the popover\n * @default dialog\n */\n @property({ type: String, reflect: true, attribute: 'data-role' })\n dataRole: HTMLElement['role'] = DEFAULTS.ROLE;\n\n public arrowElement: HTMLElement | null = null;\n\n /** @internal */\n public triggerElement: HTMLElement | null = null;\n\n /** @internal */\n public containerElement: HTMLElement | null = null;\n\n /** @internal */\n private hoverTimer: number | null = null;\n\n /** @internal */\n private isTriggerClicked: boolean = false;\n\n /** @internal */\n private openDelay: number = 0;\n\n /** @internal */\n private closeDelay: number = 0;\n\n /** @internal */\n private utils: PopoverUtils;\n\n constructor() {\n super();\n this.utils = new PopoverUtils(this);\n }\n\n protected override async firstUpdated(changedProperties: PropertyValues) {\n super.firstUpdated(changedProperties);\n this.containerElement = this.renderRoot.querySelector('.popover-container');\n this.utils.setupAppendTo();\n [this.openDelay, this.closeDelay] = this.utils.setupDelay();\n this.setupTriggerListener();\n this.utils.setupAccessibility();\n PopoverEventManager.onCreatedPopover(this);\n\n if (this.visible) {\n await this.positionPopover();\n await this.handleCreatePopoverFirstUpdate();\n }\n }\n\n override async disconnectedCallback() {\n super.disconnectedCallback();\n await this.removeEventListeners();\n PopoverEventManager.onDestroyedPopover(this);\n popoverStack.remove(this);\n }\n\n /**\n * Sets up the trigger event listeners based on the trigger type.\n */\n private setupTriggerListener() {\n if (!this.triggerID) return;\n\n this.triggerElement = document.getElementById(this.triggerID);\n if (!this.triggerElement) return;\n\n if (this.trigger === 'mouseenter') {\n if (this.interactive) {\n // if the popover is interactive, there is interactive content inside the popover\n // so we can't use the focusin trigger, since after closing with escape key, the\n // popover keeps opening. So we need to use the click trigger instead.\n this.trigger = 'mouseenter click';\n } else {\n // non-interactive popovers with trigger mouseenter (like a tooltip) should also open\n // when focusing to the trigger element\n this.trigger = 'mouseenter focusin';\n }\n }\n\n if (this.trigger.includes('click')) {\n this.triggerElement.addEventListener('click', this.togglePopoverVisible);\n }\n if (this.trigger.includes('mouseenter')) {\n const hoverBridge = this.renderRoot.querySelector('.popover-hover-bridge');\n this.triggerElement.addEventListener('mouseenter', this.showPopover);\n this.triggerElement.addEventListener('mouseleave', this.startCloseDelay);\n this.containerElement?.addEventListener('mouseenter', this.cancelCloseDelay);\n this.containerElement?.addEventListener('mouseleave', this.startCloseDelay);\n hoverBridge?.addEventListener('mouseenter', this.cancelCloseDelay);\n }\n if (this.trigger.includes('focusin')) {\n this.triggerElement.addEventListener('focusin', this.showPopover);\n if (!this.interactive) {\n this.triggerElement.addEventListener('focusout', this.hidePopover);\n }\n }\n this.addEventListener('focus-trap-exit', this.hidePopover);\n }\n\n /**\n * Removes the trigger event listeners.\n */\n private removeEventListeners() {\n if (!this.triggerElement) return;\n const hoverBridge = this.renderRoot.querySelector('.popover-hover-bridge');\n this.triggerElement.removeEventListener('click', this.togglePopoverVisible);\n this.triggerElement.removeEventListener('mouseenter', this.showPopover);\n this.triggerElement.removeEventListener('mouseleave', this.hidePopover);\n this.containerElement?.removeEventListener('mouseenter', this.cancelCloseDelay);\n this.containerElement?.removeEventListener('mouseleave', this.startCloseDelay);\n this.triggerElement.removeEventListener('focusin', this.showPopover);\n this.triggerElement.removeEventListener('focusout', this.hidePopover);\n hoverBridge?.removeEventListener('mouseenter', this.cancelCloseDelay);\n\n this.removeEventListener('focus-trap-exit', this.hidePopover);\n }\n\n protected override async updated(changedProperties: PropertyValues) {\n super.updated(changedProperties);\n\n if (changedProperties.has('visible')) {\n const oldValue = changedProperties.get('visible') as boolean;\n await this.isOpenUpdated(oldValue, this.visible);\n }\n if (changedProperties.has('placement')) {\n this.setAttribute(\n 'placement',\n Object.values(POPOVER_PLACEMENT).includes(this.placement) ? this.placement : DEFAULTS.PLACEMENT,\n );\n }\n if (changedProperties.has('delay')) {\n [this.openDelay, this.closeDelay] = this.utils.setupDelay();\n }\n if (changedProperties.has('trigger')) {\n const triggers = this.trigger.split(' ');\n const validTriggers = triggers.filter((trigger) =>\n Object.values(TRIGGER).includes(trigger as ValueOf<typeof TRIGGER>));\n\n this.setAttribute('trigger', validTriggers.length > 0 ? this.trigger : DEFAULTS.TRIGGER);\n this.removeEventListeners();\n this.setupTriggerListener();\n }\n if (changedProperties.has('color')) {\n this.setAttribute('color', Object.values(COLOR).includes(this.color) ? this.color : DEFAULTS.COLOR);\n }\n if (changedProperties.has('zIndex')) {\n this.setAttribute('z-index', `${this.zIndex}`);\n }\n if (changedProperties.has('append-to')) {\n this.utils.setupAppendTo();\n }\n if (\n changedProperties.has('interactive')\n || changedProperties.has('data-aria-label')\n || changedProperties.has('data-aria-labelledby')\n ) {\n this.utils.setupAccessibility();\n }\n }\n\n /**\n * Handles the outside click event to close the popover.\n *\n * @param event - The mouse event.\n */\n private onOutsidePopoverClick = (event: MouseEvent) => {\n if (popoverStack.peek() !== this) return;\n\n let insidePopoverClick = false;\n const path = event.composedPath();\n insidePopoverClick = this.contains(event.target as Node) || path.includes(this.triggerElement!);\n const backdropElement = this.renderRoot.querySelector('.popover-backdrop');\n const clickedOnBackdrop = backdropElement ? path.includes(backdropElement) : false;\n\n if (!insidePopoverClick || clickedOnBackdrop) {\n this.hidePopover();\n }\n };\n\n /**\n * Handles the escape keydown event to close the popover.\n *\n * @param event - The keyboard event.\n */\n private onEscapeKeydown = (event: KeyboardEvent) => {\n if (!this.visible || event.code !== 'Escape') {\n return;\n }\n\n event.preventDefault();\n this.hidePopover();\n };\n\n /**\n * Handles the popover focus out event.\n *\n * @param event - The focus event.\n */\n private onPopoverFocusOut = (event: FocusEvent) => {\n if (!this.contains(event.relatedTarget as Node)) {\n this.hidePopover();\n }\n };\n\n /**\n * Handles the popover visibility change and position the popover.\n * Handles the exit event to close the popover.\n *\n * @param oldValue - The old value of the visible property.\n * @param newValue - The new value of the visible property.\n */\n private async isOpenUpdated(oldValue: boolean, newValue: boolean) {\n if (oldValue === newValue || !this.triggerElement) {\n return;\n }\n\n if (newValue) {\n this.enabledFocusTrap = this.focusTrap;\n this.enabledPreventScroll = this.preventScroll;\n\n if (this.backdrop) {\n const popoverBackdrop = this.renderRoot.querySelector('.popover-backdrop') as HTMLElement;\n popoverBackdrop.style.zIndex = `${this.zIndex - 1}`;\n this.triggerElement.style.zIndex = `${this.zIndex}`;\n }\n\n this.positionPopover();\n await this.handleCreatePopoverFirstUpdate();\n\n if (this.hideOnBlur) {\n this.containerElement?.addEventListener('focusout', this.onPopoverFocusOut);\n if (this.trigger === 'click') {\n this.triggerElement.style.pointerEvents = 'none';\n }\n }\n if (this.hideOnOutsideClick) {\n document.addEventListener('click', this.onOutsidePopoverClick);\n }\n if (this.hideOnEscape) {\n document.addEventListener('keydown', this.onEscapeKeydown);\n }\n\n this.triggerElement.setAttribute('aria-expanded', 'true');\n if (this.interactive) {\n this.triggerElement.setAttribute(\n 'aria-haspopup',\n this.triggerElement.getAttribute('aria-haspopup') || 'dialog',\n );\n }\n } else {\n if (this.hideOnBlur) {\n this.containerElement?.removeEventListener('focusout', this.onPopoverFocusOut);\n if (this.trigger === 'click') {\n this.triggerElement.style.pointerEvents = '';\n }\n }\n if (this.hideOnOutsideClick) {\n document.removeEventListener('click', this.onOutsidePopoverClick);\n }\n if (this.hideOnEscape) {\n document.removeEventListener('keydown', this.onEscapeKeydown);\n }\n\n this.deactivateFocusTrap?.();\n this.triggerElement.removeAttribute('aria-expanded');\n if (this.interactive) {\n this.triggerElement.removeAttribute('aria-haspopup');\n }\n if (this.focusBackToTrigger) {\n this.triggerElement?.focus();\n }\n }\n }\n\n /**\n * Starts the close delay timer.\n * If the popover is not interactive, it will close the popover after the delay.\n */\n private startCloseDelay = () => {\n if (!this.interactive) {\n this.hidePopover();\n } else {\n if (this.isTriggerClicked) return;\n this.hoverTimer = window.setTimeout(() => {\n this.visible = false;\n }, this.closeDelay);\n }\n };\n\n /**\n * Cancels the close delay timer.\n */\n private cancelCloseDelay = () => {\n if (this.hoverTimer) {\n clearTimeout(this.hoverTimer);\n this.hoverTimer = null;\n }\n };\n\n /**\n * Shows the popover.\n */\n public showPopover = () => {\n this.cancelCloseDelay();\n setTimeout(() => {\n this.visible = true;\n PopoverEventManager.onShowPopover(this);\n }, this.openDelay);\n if (popoverStack.peek() !== this) {\n popoverStack.push(this);\n }\n };\n\n /**\n * Hides the popover.\n */\n public hidePopover = () => {\n if (popoverStack.peek() === this) {\n setTimeout(() => {\n this.visible = false;\n PopoverEventManager.onHidePopover(this);\n this.isTriggerClicked = false;\n }, this.closeDelay);\n popoverStack.pop();\n }\n };\n\n /**\n * Toggles the popover visibility.\n */\n public togglePopoverVisible = () => {\n if (this.isTriggerClicked) {\n this.hidePopover();\n } else {\n this.showPopover();\n this.isTriggerClicked = true;\n }\n };\n\n /**\n * Sets the focusable elements inside the popover.\n */\n private async handleCreatePopoverFirstUpdate() {\n if (this.visible && this.interactive) {\n this.setFocusableElements?.();\n await this.updateComplete;\n this.setInitialFocus?.();\n }\n }\n\n /**\n * Positions the popover based on the trigger element.\n * It also handles the flip, size and arrow placement.\n * It uses the floating-ui/dom library to calculate the position.\n */\n private positionPopover() {\n if (!this.triggerElement || !this.containerElement) return;\n\n const middleware = [shift()];\n let popoverOffset = this.offset;\n\n if (this.flip) {\n middleware.push(flip());\n }\n\n if (this.size) {\n const popoverContent = this.containerElement.querySelector('[part=\"popover-content\"]') as HTMLElement;\n middleware.push(\n size({\n apply({ availableHeight }) {\n if (!popoverContent) return;\n Object.assign(popoverContent.style, {\n maxHeight: `${availableHeight}px`,\n });\n },\n padding: 50,\n }),\n );\n }\n\n if (this.showArrow) {\n this.arrowElement = this.renderRoot.querySelector('.popover-arrow');\n if (this.arrowElement) {\n const arrowLen = this.arrowElement.offsetHeight;\n const arrowOffset = Math.sqrt(2 * arrowLen ** 2) / 2;\n popoverOffset = arrowOffset + this.offset;\n middleware.push(arrow({ element: this.arrowElement, padding: 12 }));\n }\n }\n\n middleware.push(offset(popoverOffset));\n\n autoUpdate(this.triggerElement, this.containerElement, async () => {\n if (!this.triggerElement || !this.containerElement) return;\n\n const { x, y, middlewareData, placement } = await computePosition(this.triggerElement, this.containerElement, {\n placement: this.placement,\n middleware,\n });\n\n this.utils.updatePopoverStyle(x, y);\n if (middlewareData.arrow && this.arrowElement) {\n this.utils.updateArrowStyle(middlewareData.arrow, placement);\n }\n if (this.trigger.includes('mouseenter')) {\n this.utils.setupHoverBridge(placement);\n }\n });\n }\n\n public override render() {\n return html`\n ${this.backdrop && this.visible ? html`<div class=\"popover-backdrop\"></div>` : nothing}\n <mdc-modalcontainer\n class=\"popover-container\"\n elevation=\"3\"\n color=${this.color}\n ?data-aria-modal=${this.interactive}\n data-role=\"${ifDefined(this.dataRole)}\"\n data-aria-label=\"${ifDefined(this.interactive ? this.dataAriaLabel : undefined)}\"\n data-aria-labelledby=\"${ifDefined(this.interactive ? this.dataAriaLabelledby : undefined)}\"\n data-aria-describedby=\"${ifDefined(this.interactive ? this.dataAriaDescribedby : undefined)}\"\n style=\"z-index: ${this.zIndex};\"\n >\n <div class=\"popover-hover-bridge\"></div>\n ${this.closeButton\n ? html` <mdc-button\n class=\"popover-close\"\n prefix-icon=\"cancel-bold\"\n variant=\"tertiary\"\n size=\"20\"\n aria-label=${ifDefined(this.closeButtonAriaLabel)}\n @click=\"${this.hidePopover}\"\n ></mdc-button>`\n : nothing}\n ${this.showArrow ? html`<div class=\"popover-arrow\"></div>` : nothing}\n <div part=\"popover-content\">\n <slot></slot>\n </div>\n </mdc-modalcontainer>\n `;\n }\n\n public static override styles: Array<CSSResult> = [...Component.styles, ...styles];\n}\n\nexport default Popover;\n", "import { css } from 'lit';\nimport { hostFitContentStyles } from '../../utils/styles';\n\nconst styles = [\n hostFitContentStyles,\n css`\n :host {\n --mdc-modalcontainer-primary-background-color: var(--mds-color-theme-background-solid-primary-normal);\n --mdc-modalcontainer-border-color: var(--mds-color-theme-outline-secondary-normal);\n --mdc-modalcontainer-inverted-background-color: var(--mds-color-theme-inverted-background-normal);\n --mdc-modalcontainer-inverted-border-color: var(--mds-color-theme-inverted-outline-primary-normal);\n --mdc-modalcontainer-inverted-text-color: var(--mds-color-theme-inverted-text-primary-normal);\n --mdc-modalcontainer-elevation-1: var(--mds-elevation-1);\n --mdc-modalcontainer-elevation-2: var(--mds-elevation-2);\n --mdc-modalcontainer-elevation-3: var(--mds-elevation-3);\n --mdc-modalcontainer-elevation-4: var(--mds-elevation-4);\n }\n\n :host::part(container) {\n padding: 0.75rem;\n background-color: var(--mdc-modalcontainer-primary-background-color);\n border-radius: 0.5rem;\n border: 0.0625rem solid var(--mdc-modalcontainer-border-color);\n }\n\n :host([color='contrast'])::part(container) {\n background-color: var(--mdc-modalcontainer-inverted-background-color);\n border: 0.0625rem solid var(--mdc-modalcontainer-inverted-border-color);\n color: var(--mdc-modalcontainer-inverted-text-color);\n }\n\n :host([elevation='1'])::part(container) {\n filter: var(--mdc-modalcontainer-elevation-1);\n }\n :host([elevation='2'])::part(container) {\n filter: var(--mdc-modalcontainer-elevation-2);\n }\n :host([elevation='3'])::part(container) {\n filter: var(--mdc-modalcontainer-elevation-3);\n }\n :host([elevation='4'])::part(container) {\n filter: var(--mdc-modalcontainer-elevation-4);\n }\n `,\n];\n\nexport default styles;\n", "import { CSSResult, html } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport styles from './modalcontainer.styles';\nimport { Component } from '../../models';\nimport { DEFAULTS } from './modalcontainer.constants';\nimport type { ModalContainerColor, ModalContainerElevation } from './modalcontainer.types';\nimport { DataAriaLabelMixin } from '../../utils/mixins/DataAriaLabelMixin';\nimport { DataAriaDescribedbyMixin } from '../../utils/mixins/DataAriaDescribedbyMixin';\nimport { DataAriaLabelledbyMixin } from '../../utils/mixins/DataAriaLabelledbyMixin';\n\n/**\n * The `mdc-modalcontainer` component is an element used to\n * display a modal container that can further be used in popover.\n *\n * @tagname mdc-modalcontainer\n *\n * @cssproperty --mdc-modalcontainer-primary-background-color - primary background color of the modalcontainer\n * @cssproperty --mdc-modalcontainer-border-color - border color of the modalcontainer\n * @cssproperty --mdc-modalcontainer-inverted-background-color - inverted background color of the modalcontainer\n * @cssproperty --mdc-modalcontainer-inverted-border-color - inverted border color of the modalcontainer\n * @cssproperty --mdc-modalcontainer-inverted-text-color - inverted text color of the modalcontainer\n *\n * @slot - Default slot for modal container\n */\nclass Modalcontainer extends DataAriaLabelMixin(DataAriaLabelledbyMixin(DataAriaDescribedbyMixin(Component))) {\n /**\n * Color of the modalcontainer\n * - **tonal**\n * - **contrast**\n * @default tonal\n */\n @property({ type: String, reflect: true })\n color: ModalContainerColor = DEFAULTS.COLOR;\n\n /**\n * Elevation of the modalcontainer where each value corresponds to a different drop shadow.\n * - **0**\n * - **1**\n * - **2**\n * - **3**\n * - **4**\n * @default 0\n */\n @property({ type: Number, reflect: true })\n elevation: ModalContainerElevation = DEFAULTS.ELEVATION;\n\n /**\n * Role of the modalcontainer\n * @default dialog\n */\n @property({ type: String, reflect: true, attribute: 'data-role' })\n dataRole: HTMLElement['role'] = DEFAULTS.ROLE;\n\n /**\n * Aria modal of the modalcontainer\n * @default false\n */\n @property({ type: Boolean, reflect: true, attribute: 'data-aria-modal' })\n dataAriaModal: boolean = DEFAULTS.ARIA_MODAL;\n\n public override render() {\n return html`\n <div\n role=\"${ifDefined(this.dataRole)}\"\n aria-modal=${ifDefined(this.dataAriaModal === true ? 'true' : undefined)}\n aria-label=\"${ifDefined(this.dataAriaLabel)}\"\n aria-labelledby=\"${ifDefined(this.dataAriaLabelledby)}\"\n aria-describedby=\"${ifDefined(this.dataAriaDescribedby)}\"\n part=\"container\"\n >\n <slot></slot>\n </div>\n `;\n }\n\n public static override styles: Array<CSSResult> = [...Component.styles, ...styles];\n}\n\nexport default Modalcontainer;\n", "import Modalcontainer from './modalcontainer.component';\nimport { TAG_NAME } from './modalcontainer.constants';\n\nModalcontainer.register(TAG_NAME);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n ['mdc-modalcontainer']: Modalcontainer\n }\n}\n\nexport default Modalcontainer;\n", "import Popover from './popover.component';\nimport { TAG_NAME } from './popover.constants';\nimport '../button';\nimport '../modalcontainer';\n\nPopover.register(TAG_NAME);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n ['mdc-popover']: Popover\n }\n}\n\nexport default Popover;\n", "import { css } from 'lit';\nimport { hostFitContentStyles, hostFocusRingStyles } from '../../utils/styles';\n\nconst styles = [hostFitContentStyles, css`\n :host{\n --mdc-radio-inner-circle-size: 0.375rem;\n --mdc-radio-text-disabled-color: var(--mds-color-theme-text-primary-disabled);\n --mdc-radio-disabled-border-color: var(--mds-color-theme-outline-primary-disabled);\n --mdc-radio-normal-border-color: var(--mds-color-theme-outline-input-normal);\n --mdc-radio-inner-circle-normal-background: var(--mds-color-theme-inverted-text-primary-normal);\n --mdc-radio-inner-circle-disabled-background: var(--mds-color-theme-inverted-text-primary-disabled);\n\n --mdc-radio-control-inactive-color: var(--mds-color-theme-control-inactive-normal);\n --mdc-radio-control-inactive-hover: var(--mds-color-theme-control-inactive-hover);\n --mdc-radio-control-inactive-pressed-color: var(--mds-color-theme-control-inactive-pressed);\n --mdc-radio-control-inactive-disabled-background: var(--mds-color-theme-control-inactive-disabled);\n\n --mdc-radio-control-active-color: var(--mds-color-theme-control-active-normal);\n --mdc-radio-control-active-hover-color: var(--mds-color-theme-control-active-hover);\n --mdc-radio-control-active-pressed-color: var(--mds-color-theme-control-active-pressed);\n --mdc-radio-control-active-disabled-background: var(--mds-color-theme-control-active-disabled);\n\n }\n :host([readonly]) .mdc-radio__input,\n :host([disabled]) .mdc-radio__input,\n :host([disabled]) .mdc-label,\n :host([readonly]) .mdc-label{\n cursor: default;\n }\n\n .mdc-label {\n cursor: pointer;\n }\n\n :host([disabled]) .mdc-radio__label-text,\n :host([disabled]) .mdc-radio__help-text {\n color: var(--mdc-radio-text-disabled-color);\n }\n\n :host([disabled]) .mdc-radio__icon,\n :host([disabled]) .mdc-radio__container:hover .mdc-radio__icon,\n :host([disabled][readonly]) .mdc-radio__icon,\n :host([disabled][readonly]) .mdc-radio__container:hover .mdc-radio__icon {\n border-color: var(--mdc-radio-disabled-border-color);\n background: var(--mdc-radio-control-inactive-disabled-background);\n }\n\n :host([disabled][checked]) .mdc-radio__icon,\n :host([disabled][checked]) .mdc-radio__container:hover .mdc-radio__icon,\n :host([disabled][readonly][checked]) .mdc-radio__icon,\n :host([disabled][readonly][checked]) .mdc-radio__container:hover .mdc-radio__icon {\n border: var(--mdc-radio-control-active-disabled-background);\n background: var(--mdc-radio-control-active-disabled-background);\n }\n\n :host([disabled][checked]) .mdc-radio__icon:after,\n :host([disabled][checked]) .mdc-radio__container:hover .mdc-radio__icon:after,\n :host([disabled][readonly][checked]) .mdc-radio__icon:after,\n :host([disabled][readonly][checked]) .mdc-radio__container:hover .mdc-radio__icon:after {\n background: var(--mdc-radio-inner-circle-disabled-background);\n }\n\n :host .mdc-radio__icon {\n position: absolute;\n top: 0;\n left: 0;\n width: 1rem;\n height: 1rem;\n border: 0.0625rem solid var(--mdc-radio-normal-border-color);\n background-color: var(--mdc-radio-control-inactive-color);\n border-radius: 50%;\n }\n\n :host([checked]) .mdc-radio__icon {\n border-color: var(--mdc-radio-control-active-color);\n background-color: var(--mdc-radio-control-active-color);\n }\n\n :host([checked]) .mdc-radio__icon:after {\n display: block;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n width: var(--mdc-radio-inner-circle-size);\n height: var(--mdc-radio-inner-circle-size);\n border-radius: 50%;\n background: var(--mdc-radio-inner-circle-normal-background);\n }\n\n :host .mdc-radio__input:hover ~ .mdc-radio__icon {\n border-color: var(--mdc-radio-normal-border-color);\n background-color: var(--mdc-radio-control-inactive-hover);\n }\n\n :host([checked]) .mdc-radio__input:hover ~ .mdc-radio__icon {\n border-color: var(--mdc-radio-control-active-hover-color);\n background-color: var(--mdc-radio-control-active-hover-color);\n }\n\n :host .mdc-radio__input:active ~ .mdc-radio__icon {\n border-color: var(--mdc-radio-normal-border-color);\n background-color: var(--mdc-radio-control-inactive-pressed-color);\n }\n\n :host([checked]) .mdc-radio__input:active ~ .mdc-radio__icon {\n border-color: var(--mdc-radio-control-active-pressed-color);\n background-color: var(--mdc-radio-control-active-pressed-color);\n }\n\n :host([readonly]) .mdc-radio__icon,\n :host([readonly]) .mdc-radio__container:hover .mdc-radio__icon {\n border-color: var(--mdc-radio-normal-border-color);\n background-color: var(--mdc-radio-control-inactive-color);\n }\n\n :host([readonly][checked]) .mdc-radio__icon {\n border-color: var(--mdc-radio-normal-border-color);\n }\n\n :host([readonly][checked]) .mdc-radio__icon:after,\n :host([readonly][checked]) .mdc-radio__container:hover .mdc-radio__icon:after,\n :host([readonly][checked]) .mdc-radio__container:active .mdc-radio__icon:after {\n background-color: var(--mdc-radio-text-disabled-color);\n }\n\n .mdc-radio__container {\n display: flex;\n align-items: start;\n gap: 0.5rem;\n }\n .mdc-radio__icon-container {\n display: block;\n position: relative;\n width: 1rem;\n height: 1rem;\n margin: 0.125rem 0;\n border-radius: 50%;\n }\n\n .mdc-radio__icon-container input{\n position: absolute;\n opacity: 0;\n margin: 0;\n width: 100%;\n height: 100%;\n cursor: pointer;\n z-index: 2;\n }\n \n .mdc-radio__icon-container .mdc-radio__icon:after {\n content: \"\";\n position: absolute;\n display: none;\n }\n\n .mdc-radio__label-container{\n display: flex;\n flex-direction: column;\n justify-content: center;\n gap: 0.25rem;\n }\n :host::part(required-label){\n display: none;\n }\n\n`, ...hostFocusRingStyles(true)];\n\nexport default styles;\n", "/* eslint-disable no-param-reassign */\nimport { CSSResult, html, nothing, PropertyValues } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport styles from './radio.styles';\nimport FormfieldWrapper from '../formfieldwrapper/formfieldwrapper.component';\nimport { DataAriaLabelMixin } from '../../utils/mixins/DataAriaLabelMixin';\nimport { AssociatedFormControl, FormInternalsMixin } from '../../utils/mixins/FormInternalsMixin';\nimport { ValidationType } from '../formfieldwrapper/formfieldwrapper.types';\nimport { DEFAULTS as FORMFIELD_DEFAULTS } from '../formfieldwrapper/formfieldwrapper.constants';\n\n/**\n * Radio allow users to select single options from a list or turn an item/feature on or off.\n * These are often used in forms, settings, and selection in lists.\n *\n * A radio component contains an optional label, optional info icon and an optional helper text.\n * @dependency mdc-formfieldwrapper\n *\n * @tagname mdc-radio\n *\n * @event change - (React: onChange) Event that gets dispatched when the radio state changes.\n * @event focus - (React: onFocus) Event that gets dispatched when the radio receives focus.\n *\n * @cssproperty --mdc-radio-inner-circle-size - size of the inner circle\n * @cssproperty --mdc-radio-text-disabled-color - color of the label when disabled\n * @cssproperty --mdc-radio-disabled-border-color - color of the radio button border when disabled\n * @cssproperty --mdc-radio-normal-border-color - color of the radio button border when normal\n * @cssproperty --mdc-radio-inner-circle-normal-background - background color of the inner circle when normal\n * @cssproperty --mdc-radio-inner-circle-disabled-background - background color of the inner circle when disabled\n * @cssproperty --mdc-radio-control-inactive-color - color of the radio button when inactive\n * @cssproperty --mdc-radio-control-inactive-hover - color of the radio button when inactive and hovered\n * @cssproperty --mdc-radio-control-inactive-pressed-color - color of the radio button when inactive and pressed\n * @cssproperty --mdc-radio-control-inactive-disabled-background - background color of the radio button when\n * inactive and disabled\n * @cssproperty --mdc-radio-control-active-color - color of the radio button when active\n * @cssproperty --mdc-radio-control-active-hover-color - color of the radio button when active and hovered\n * @cssproperty --mdc-radio-control-active-pressed-color - color of the radio button when active and pressed\n * @cssproperty --mdc-radio-control-active-disabled-background - background color of the radio button\n * when active and disabled\n *\n */\n\nclass Radio extends FormInternalsMixin(DataAriaLabelMixin(FormfieldWrapper)) implements AssociatedFormControl {\n /**\n * Determines whether the radio is selected or unselected.\n *\n * @default false\n */\n @property({ type: Boolean, reflect: true }) checked = false;\n\n /**\n * Determines whether the radio is read-only.\n *\n * @default false\n */\n @property({ type: Boolean, reflect: true }) readonly = false;\n\n /**\n * Automatically focus on the element when the page loads.\n * [MDN Reference](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/autofocus)\n * @default false\n */\n @property({ type: Boolean, reflect: true }) override autofocus = false;\n\n constructor() {\n super();\n // Radio does not contain helpTextType property.\n this.helpTextType = undefined as unknown as ValidationType;\n }\n\n override firstUpdated() {\n this.updateTabIndex();\n }\n\n /**\n * Returns all radios within the same group (name).\n */\n private getAllRadiosWithinSameGroup(): Radio[] {\n return Array.from(document.querySelectorAll(`mdc-radio[name=\"${this.name}\"]`));\n }\n\n /**\n * The 'change' event does not bubble up through the shadow DOM as it was not composed.\n * Therefore, we need to re-dispatch the same event to ensure it is propagated correctly.\n * Read more: https://developer.mozilla.org/en-US/docs/Web/API/Event/composed\n */\n private dispatchChangeEvent(event: Event): void {\n const EventConstructor = event.constructor as typeof Event;\n this.dispatchEvent(new EventConstructor(event.type, event));\n }\n\n /** @internal */\n formResetCallback(): void {\n const radios = this.getAllRadiosWithinSameGroup();\n\n radios.forEach((radio) => {\n radio.checked = false;\n });\n\n this.updateComplete.then(() => {\n this.setActualFormValue();\n }).catch((error) => {\n if (this.onerror) {\n this.onerror(error);\n }\n });\n }\n\n /** @internal */\n formStateRestoreCallback(\n state: string,\n ): void {\n if (this.value === state && state !== '') {\n this.checked = true;\n }\n }\n\n /**\n * @internal\n */\n setComponentValidity(isValid: boolean) {\n if (isValid) {\n this.internals.setValidity({});\n } else if (this.requiredLabel && !this.checked) {\n if (this.validationMessage) {\n this.inputElement.setCustomValidity(this.validationMessage);\n } else {\n this.inputElement.setCustomValidity('');\n }\n this.setValidity();\n }\n this.updateTabIndex();\n }\n\n /**\n * Sets the validity of the group of radios.\n * @param radios - Array of radios of the same group\n * @param isValid - Boolean value to set the validity of the group\n */\n private setGroupValidity(radios: Radio[], isValid: boolean) {\n this.updateComplete.then(() => {\n radios.forEach((radio) => {\n radio.setComponentValidity(isValid);\n });\n }).catch((error) => {\n if (this.onerror) {\n this.onerror(error);\n }\n });\n }\n\n /**\n * Updates the form value to reflect the current state of the radio.\n * If checked, the value is set to the user-provided value.\n * If unchecked, the value is set to null.\n */\n private setActualFormValue() {\n let actualValue: string | null = '';\n\n if (this.checked) {\n actualValue = !this.value ? 'on' : this.value;\n } else {\n actualValue = null;\n }\n\n const radios = this.getAllRadiosWithinSameGroup();\n if (this.checked) {\n this.setGroupValidity(radios, true);\n } else {\n const anyRequired = radios.some((r) => r.requiredLabel);\n const anyChecked = !!radios.find((r) => r.checked);\n const isInvalid = anyRequired && !anyChecked;\n this.setGroupValidity(radios, !isInvalid);\n }\n\n this.internals.setFormValue(actualValue);\n }\n\n /**\n * Handles the change event on the radio element.\n * This will toggle the state of the radio element.\n * Dispatches the change event.\n */\n private handleChange(event: Event): void {\n if (this.disabled || this.readonly) return;\n\n const radios = this.getAllRadiosWithinSameGroup();\n radios.forEach((radio) => {\n /**\n * Uncheck all radios in the same group (name)\n */\n const radioElement = radio.shadowRoot?.querySelector('input');\n if (radioElement) {\n radio.checked = false;\n radioElement.checked = false;\n }\n });\n this.checked = true;\n const inputElement = this.shadowRoot?.querySelector('input');\n if (inputElement) {\n inputElement.checked = true;\n }\n this.dispatchChangeEvent(event);\n }\n\n /**\n * Updates the state of the radio button at the specified index within the enabled radios.\n * Focuses the radio button and triggers the change event if the radio button is not read-only.\n *\n * @param enabledRadios - An array of enabled radio buttons within the same group.\n * @param index - The index of the radio button to be updated within the enabled radios array.\n * @param event - The event that triggered the update.\n */\n private updateRadio(enabledRadios: Radio[], index: number, event: Event) {\n enabledRadios[index].shadowRoot?.querySelector('input')?.focus();\n enabledRadios[index].handleChange(event);\n }\n\n /**\n * Handles the keydown event (Arrow Up/Down/Left/Right) on the radio element.\n */\n private handleKeyDown(event: KeyboardEvent): void {\n if (this.disabled) return;\n\n const radios = this.getAllRadiosWithinSameGroup();\n const enabledRadios = radios.filter((radio) => !radio.disabled);\n const currentIndex = enabledRadios.indexOf(this);\n\n if (['ArrowDown', 'ArrowRight'].includes(event.key)) {\n // Move focus to the next radio\n const nextIndex = (currentIndex + 1) % enabledRadios.length;\n this.updateRadio(enabledRadios, nextIndex, event);\n } else if (['ArrowUp', 'ArrowLeft'].includes(event.key)) {\n // Move focus to the previous radio\n const prevIndex = (currentIndex - 1 + enabledRadios.length) % enabledRadios.length;\n this.updateRadio(enabledRadios, prevIndex, event);\n } else if (event.key === ' ') {\n this.updateRadio(enabledRadios, currentIndex, event);\n }\n this.updateTabIndex();\n\n if (event.key === 'Enter') {\n this.form?.requestSubmit();\n }\n }\n\n /**\n * Update tab index for all radios in the same group (name)\n * If any radio group is checked, it will have a tab index of 0\n * If no radio group is checked, the first enabled radio will have a tab index of 0\n */\n private updateTabIndex(): void {\n const radios = this.getAllRadiosWithinSameGroup();\n const checked = radios.find((radio) => radio.checked);\n const firstEnabledRadio = radios.find((radio) => !radio.disabled);\n radios.forEach((radio) => {\n const inputElement = radio.shadowRoot?.querySelector('input');\n if (inputElement) {\n inputElement.tabIndex = -1;\n if (radio === checked) {\n inputElement.tabIndex = 0;\n } else if (!checked && radio === firstEnabledRadio) {\n inputElement.tabIndex = 0;\n }\n }\n });\n }\n\n public override update(changedProperties: PropertyValues): void {\n super.update(changedProperties);\n\n if (changedProperties.has('checked')) {\n this.setActualFormValue();\n }\n }\n\n private renderLabelAndHelperText = () => {\n if (!this.label) return nothing;\n return html`<div class=\"mdc-radio__label-container\">\n ${this.renderLabel()}\n ${this.renderHelperText()}\n </div>`;\n };\n\n public override render() {\n return html`\n <div class=\"mdc-radio__container\">\n <div class=\"mdc-radio__icon-container mdc-focus-ring\">\n <input\n id=\"${this.id}\"\n type=\"radio\"\n role=\"radio\"\n ?autofocus=\"${this.autofocus}\"\n name=\"${ifDefined(this.name)}\"\n value=\"${ifDefined(this.value)}\"\n ?required=\"${!!this.requiredLabel}\"\n @change=${this.handleChange}\n @keydown=${this.handleKeyDown}\n ?checked=${this.checked}\n ?readonly=${this.readonly}\n ?disabled=${this.disabled}\n class=\"mdc-radio__input\"\n aria-checked=\"${this.checked}\"\n aria-describedby=\"${ifDefined(this.helpText ? FORMFIELD_DEFAULTS.HELPER_TEXT_ID : '')}\"\n aria-label=\"${this.dataAriaLabel ?? ''}\"\n />\n <span class=\"mdc-radio__icon\"></span>\n </div>\n ${this.renderLabelAndHelperText()}\n </div>\n `;\n }\n\n public static override styles: Array<CSSResult> = [...FormfieldWrapper.styles, ...styles];\n}\n\nexport default Radio;\n", "import utils from '../../utils/tag-name';\n\nconst TAG_NAME = utils.constructTagName('radio');\n\nexport { TAG_NAME };\n", "import Radio from './radio.component';\nimport { TAG_NAME } from './radio.constants';\n\nRadio.register(TAG_NAME);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n ['mdc-radio']: Radio;\n }\n}\n\nexport default Radio;\n", "import { CSSResult } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport FormfieldGroup from '../formfieldgroup';\nimport { TAG_NAME as RADIO_TAGNAME } from '../radio/radio.constants';\n\n/**\n * `mdc-radiogroup` - This is the wrapper component for radio buttons which are grouped together.\n * It can have a header text and a description. It enables users to select a single option from a set of options.\n * It is often used in forms, settings, and selection in lists. It automatically group the radio buttons inside it.\n *\n * @tagname mdc-radiogroup\n *\n * @cssproperty --mdc-radiogroup-description-text-normal - color of the description text\n *\n */\nclass RadioGroup extends FormfieldGroup {\n /**\n * Name of the radio group.\n * They are used to group elements in a form together.\n * @default ''\n */\n @property({ type: String }) name = '';\n\n constructor() {\n super();\n // This is used to set the role of the component as `radiogroup`.\n /** @internal */\n this.isRadio = true;\n }\n\n /**\n * Using name property to group the radio buttons together.\n * If the name is not set, it will be set to the name of the radio group.\n */\n override firstUpdated() {\n Array.from(this.shadowRoot?.querySelectorAll('slot') || [])\n ?.flatMap((slot) => slot.assignedElements({ flatten: true }))\n ?.filter((el) => el.tagName.toLowerCase() === RADIO_TAGNAME)\n ?.filter((radio) => !radio.hasAttribute('name'))\n ?.forEach((radio) => {\n radio.setAttribute('name', this.name);\n if (this.requiredLabel) radio.setAttribute('required-label', this.requiredLabel);\n });\n }\n\n public static override styles: Array<CSSResult> = [...FormfieldGroup.styles];\n}\n\nexport default RadioGroup;\n", "import utils from '../../utils/tag-name';\n\nconst TAG_NAME = utils.constructTagName('radiogroup');\n\nexport { TAG_NAME };\n", "import RadioGroup from './radiogroup.component';\nimport { TAG_NAME } from './radiogroup.constants';\n\nRadioGroup.register(TAG_NAME);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n ['mdc-radiogroup']: RadioGroup\n }\n}\n\nexport default RadioGroup;\n", "import { css } from 'lit';\nimport { hostFitContentStyles } from '../../utils/styles';\n\nconst styles = [hostFitContentStyles, css`\n :host {\n --mdc-spinner-default-color: var(--mds-color-theme-control-active-normal);\n --mdc-spinner-inverted-color: var(--mds-color-theme-inverted-control-active-normal);\n --mdc-spinner-button-variant-color: currentColor;\n --mdc-spinner-color: var(--mdc-spinner-default-color);\n --mdc-spinner-size: 100%;\n }\n\n :host([inverted]) {\n --mdc-spinner-color: var(--mdc-spinner-inverted-color);\n }\n\n :host([size=\"large\"]) {\n --mdc-spinner-size: 6rem;\n }\n\n :host([size=\"midsize\"]) {\n --mdc-spinner-size: 3rem;\n }\n\n :host([size=\"small\"]) {\n --mdc-spinner-size: 1.5rem;\n }\n\n :host([variant=\"button\"]) {\n --mdc-spinner-color: var(--mdc-spinner-button-variant-color);\n }\n\n :host::part(container) {\n width: var(--mdc-spinner-size);\n height: var(--mdc-spinner-size);\n animation: rotate 1.5s linear infinite;\n }\n\n :host::part(circle) {\n fill: none;\n stroke: var(--mdc-spinner-color);\n stroke-width: 8%;\n stroke-linecap: round;\n animation: dash 1.5s ease-in-out infinite;\n transform: rotate(-90deg);\n transform-origin: center;\n }\n\n @keyframes rotate {\n 100% { transform: rotate(360deg); }\n }\n\n @keyframes dash {\n 0% {\n stroke-dasharray: 1, 470;\n }\n 50% {\n stroke-dasharray: 209, 470;\n stroke-dashoffset: -83;\n }\n 100% {\n stroke-dasharray: 209, 470;\n stroke-dashoffset: -292;\n }\n }\n`];\n\nexport default styles;\n", "import utils from '../../utils/tag-name';\n\nconst TAG_NAME = utils.constructTagName('spinner');\n\nconst SPINNER_SIZES = {\n LARGE: 'large',\n MIDSIZE: 'midsize',\n SMALL: 'small',\n} as const;\n\nconst SPINNER_VARIANT = {\n STANDALONE: 'standalone',\n BUTTON: 'button',\n} as const;\n\nconst DEFAULTS = {\n VARIANT: SPINNER_VARIANT.STANDALONE,\n SIZE: SPINNER_SIZES.MIDSIZE,\n INVERTED: false,\n};\n\nexport { TAG_NAME, SPINNER_SIZES, SPINNER_VARIANT, DEFAULTS };\n", "import { CSSResult, html } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport styles from './spinner.styles';\nimport { Component } from '../../models';\n\nimport { SpinnerSize, SpinnerVariant } from './spinner.types';\nimport { DEFAULTS } from './spinner.constants';\n\n/**\n * `mdc-spinner` is loading spinner which is an indeterminate progress indicator, meaning\n * it's best for cases where the progress or duration of a process is variable or unknown.\n *\n * Spinner Variants:\n * - **Standalone (Default)**: Track has a blue color.\n * - **Button**: To be used when placed in a button to show that the button\u2019s action is currently in progress.\n * To ensure a minimum 3:1 contrast ratio, the color is changed internally to be the same color as the button\u2019s\n * icon or label text.\n *\n * Spinner Sizes:\n * - **Large (96px)**: Use when replacing entire regions or pages that are still loading\n * - **MidSize (48px) (Default)**: Use for most use cases.\n * - **Small (24px)**: Use for inline with loading text.\n *\n * Customisation of the spinner size is allowed by setting the size to undefined and using the --mdc-spinner-size\n * CSS property.\n *\n * Spinner Colors:\n * - **Default**: Use for most use cases.\n * - **Inverted**: Only to be used within inverted components, such as coachmarks.\n *\n * Regarding accessibility, if an aria-label is provided, the role will be set to 'img'; if it is absent, the role\n * will be unset\n * and aria-hidden will be set to 'true' so the spinner will be ignored by screen readers.\n *\n * @tagname mdc-spinner\n *\n * @cssproperty --mdc-spinner-default-color - Allows customization of the default spinner color.\n * @cssproperty --mdc-spinner-inverted-color - Allows customization of the inverted spinner color.\n * @cssproperty --mdc-spinner-button-variant-color - Allows customization of the spinner Button variant color.\n * @cssproperty --mdc-spinner-size - Allows customization of the spinner size.\n *\n * @csspart container - The svg which contains the circle spinner.\n * @csspart circle - The circle of the spinner.\n */\nclass Spinner extends Component {\n /**\n * The spinner color can be inverted by setting the inverted attribute to true.\n * @default false\n */\n @property({ type: Boolean, reflect: true })\n inverted = DEFAULTS.INVERTED;\n\n /**\n * Size of the spinner.\n * Acceptable values include:\n *\n * - 'small'\n * - 'midsize'\n * - 'large'\n * - 'undefined'\n *\n * @default midsize\n */\n @property({ type: String, reflect: true })\n size?: SpinnerSize = DEFAULTS.SIZE;\n\n /**\n * Aria-label attribute to be set for accessibility\n */\n @property({ type: String, attribute: 'aria-label' })\n override ariaLabel: string | null = null;\n\n /**\n * There are 2 variants of spinner: default and button. Their coloring is different.\n * - **Standalone (Default)**: Track has a blue color.\n * - **Button**: To be used when placed in a button to show that the button\u2019s action is currently in progress.\n * To ensure a minimum 3:1 contrast ratio, change the active indicator color to be the same color as the button\u2019s\n * icon or label text.\n * @default standalone\n */\n @property({ type: String, reflect: true })\n variant: SpinnerVariant = DEFAULTS.VARIANT;\n\n override updated(changedProperties: Map<string, any>) {\n super.updated(changedProperties);\n\n if (changedProperties.has('ariaLabel')) {\n this.role = this.ariaLabel ? 'img' : null;\n this.ariaHidden = this.ariaLabel ? 'false' : 'true';\n }\n }\n\n public override render() {\n return html`\n <svg part=\"container\" viewBox=\"0 0 100 100\">\n <circle part=\"circle\" cx=\"50\" cy=\"50\" r=\"46\"></circle>\n </svg>\n `;\n }\n\n public static override styles: Array<CSSResult> = [...Component.styles, ...styles];\n}\n\nexport default Spinner;\n", "import Spinner from './spinner.component';\nimport { TAG_NAME } from './spinner.constants';\n\nSpinner.register(TAG_NAME);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n ['mdc-spinner']: Spinner\n }\n}\n\nexport default Spinner;\n", "import { css } from 'lit';\nimport { hostFitContentStyles, hostFocusRingStyles } from '../../utils/styles';\n\nconst styles = [hostFitContentStyles, css`\n\n :host {\n --mdc-tab-content-gap: 0.5rem;\n --mdc-tab-height: 2rem;\n\n --mdc-tab-glass-active-background-color-disabled: var(--mds-color-theme-button-primary-disabled);\n --mdc-tab-glass-active-background-color-hover: var(--mds-color-theme-button-primary-hover);\n --mdc-tab-glass-active-background-color-normal: var(--mds-color-theme-button-primary-normal);\n --mdc-tab-glass-active-background-color-pressed: var(--mds-color-theme-button-primary-pressed);\n\n --mdc-tab-glass-active-color: var(--mds-color-theme-inverted-text-primary-normal);\n --mdc-tab-glass-active-color-disabled: var(--mds-color-theme-inverted-text-primary-disabled);\n\n --mdc-tab-glass-border-radius: 0.5rem;\n\n --mdc-tab-glass-inactive-background-color-disabled: var(--mds-color-theme-button-secondary-disabled);\n --mdc-tab-glass-inactive-background-color-hover: var(--mds-color-theme-button-secondary-hover);\n --mdc-tab-glass-inactive-background-color-normal: var(--mds-color-theme-button-secondary-normal);\n --mdc-tab-glass-inactive-background-color-pressed: var(--mds-color-theme-button-secondary-pressed);\n\n --mdc-tab-glass-inactive-color: var(--mds-color-theme-text-secondary-normal);\n --mdc-tab-glass-inactive-color-disabled: var(--mds-color-theme-text-primary-disabled);\n\n --mdc-tab-line-active-background-color-disabled: var(--mds-color-theme-button-secondary-disabled);\n --mdc-tab-line-active-background-color-hover: var(--mds-color-theme-button-secondary-hover);\n --mdc-tab-line-active-background-color-normal: var(--mds-color-theme-button-secondary-normal);\n --mdc-tab-line-active-background-color-pressed: var(--mds-color-theme-button-secondary-pressed);\n\n --mdc-tab-line-active-color: var(--mds-color-theme-text-primary-normal);\n --mdc-tab-line-active-color-disabled: var(--mds-color-theme-text-primary-disabled);\n\n --mdc-tab-line-active-indicator-color: var(--mds-color-theme-outline-input-active);\n --mdc-tab-line-active-indicator-color-disabled: var(--mds-color-theme-outline-primary-disabled);\n --mdc-tab-line-active-indicator-height: 0.125rem;\n --mdc-tab-line-active-indicator-width: 100%;\n\n --mdc-tab-line-border-bottom-left-radius: 0;\n --mdc-tab-line-border-bottom-right-radius: 0;\n --mdc-tab-line-border-top-left-radius: 0.25rem;\n --mdc-tab-line-border-top-right-radius: 0.25rem;\n\n --mdc-tab-line-inactive-background-color-disabled: var(--mds-color-theme-button-secondary-disabled);\n --mdc-tab-line-inactive-background-color-hover: var(--mds-color-theme-button-secondary-hover);\n --mdc-tab-line-inactive-background-color-normal: var(--mds-color-theme-button-secondary-normal);\n --mdc-tab-line-inactive-background-color-pressed: var(--mds-color-theme-button-secondary-pressed);\n\n --mdc-tab-line-inactive-color: var(--mds-color-theme-text-secondary-normal);\n --mdc-tab-line-inactive-color-disabled: var(--mds-color-theme-text-primary-disabled);\n\n --mdc-tab-padding-left: 0.75rem;\n --mdc-tab-padding-right: 0.75rem;\n\n --mdc-tab-pill-active-background-color-disabled: var(--mds-color-theme-button-secondary-active-normal);\n --mdc-tab-pill-active-background-color-hover: var(--mds-color-theme-button-secondary-active-hover);\n --mdc-tab-pill-active-background-color-normal: var(--mds-color-theme-button-secondary-active-normal);\n --mdc-tab-pill-active-background-color-pressed: var(--mds-color-theme-button-secondary-active-pressed);\n\n --mdc-tab-pill-active-color: var(--mds-color-theme-text-primary-normal);\n --mdc-tab-pill-active-color-disabled: var(--mds-color-theme-text-primary-disabled);\n\n --mdc-tab-pill-border-radius: 0.5rem;\n\n --mdc-tab-pill-inactive-background-color-disabled: var(--mds-color-theme-button-secondary-disabled);\n --mdc-tab-pill-inactive-background-color-hover: var(--mds-color-theme-button-secondary-hover);\n --mdc-tab-pill-inactive-background-color-normal: var(--mds-color-theme-button-secondary-normal);\n --mdc-tab-pill-inactive-background-color-pressed: var(--mds-color-theme-button-secondary-pressed);\n\n --mdc-tab-pill-inactive-color: var(--mds-color-theme-text-secondary-normal);\n --mdc-tab-pill-inactive-color-disabled: var(--mds-color-theme-text-primary-disabled);\n\n flex-direction: column;\n height: var(--mdc-tab-height);\n padding-left: var(--mdc-tab-padding-left);\n padding-right: var(--mdc-tab-padding-right);\n position: relative;\n border: none;\n }\n\n :host::part(container) {\n align-items: center;\n display: flex;\n flex-direction: row;\n gap: var(--mdc-tab-content-gap);\n justify-content: center;\n width: fit-content;\n }\n\n :host::part(text) {\n display: flex;\n flex-direction: column;\n }\n\n :host::part(text)::after{\n content: attr(data-text);\n height: 0;\n visibility: hidden;\n overflow: hidden;\n user-select: none;\n pointer-events: none;\n /* body-midsize-bold font styling */\n font-size: var(--mds-font-apps-body-midsize-bold-font-size);\n font-weight: var(--mds-font-apps-body-midsize-bold-font-weight);\n line-height: var(--mds-font-apps-body-midsize-bold-line-height);\n text-decoration: var(--mds-font-apps-body-midsize-bold-text-decoration);\n text-transform: var(--mds-font-apps-body-midsize-bold-text-case);\n }\n\n :host::part(indicator) {\n width: var(--mdc-tab-line-active-indicator-width);\n height: var(--mdc-tab-line-active-indicator-height);\n bottom: 0;\n position: absolute;\n visibility: hidden;\n }\n\n :host([disabled]) {\n cursor: default;\n }\n\n :host([variant=\"glass\"]) {\n background-color: var(--mdc-tab-glass-inactive-background-color-normal);\n border-radius: var(--mdc-tab-glass-border-radius);\n color: var(--mdc-tab-glass-inactive-color);\n }\n\n :host([variant=\"glass\"]:hover) {\n background-color: var(--mdc-tab-glass-inactive-background-color-hover);\n }\n\n :host([variant=\"glass\"]:active) {\n background-color: var(--mdc-tab-glass-inactive-background-color-pressed);\n }\n\n :host([variant=\"glass\"][disabled]) {\n background-color: var(--mdc-tab-glass-inactive-background-color-disabled);\n color: var(--mdc-tab-glass-inactive-color-disabled);\n }\n\n :host([variant=\"glass\"][active]) {\n background-color: var(--mdc-tab-glass-active-background-color-normal);\n color: var(--mdc-tab-glass-active-color);\n }\n\n :host([variant=\"glass\"][active]:hover) {\n background-color: var(--mdc-tab-glass-active-background-color-hover);\n }\n\n :host([variant=\"glass\"][active]:active) {\n background-color: var(--mdc-tab-glass-active-background-color-pressed);\n }\n\n :host([variant=\"glass\"][active][disabled]) {\n background-color: var(--mdc-tab-glass-active-background-color-disabled);\n color: var(--mdc-tab-glass-active-color-disabled);\n }\n\n :host([variant=\"line\"]) {\n background-color: var(--mdc-tab-line-inactive-background-color-normal);\n border-top-left-radius: var(--mdc-tab-line-border-top-left-radius);\n border-top-right-radius: var(--mdc-tab-line-border-top-right-radius);\n border-bottom-left-radius: var(--mdc-tab-line-border-bottom-left-radius);\n border-bottom-right-radius: var(--mdc-tab-line-border-bottom-right-radius);\n color: var(--mdc-tab-line-inactive-color);\n }\n\n :host([variant=\"line\"]:hover) {\n background-color: var(--mdc-tab-line-inactive-background-color-hover);\n }\n\n :host([variant=\"line\"]:active) {\n background-color: var(--mdc-tab-line-inactive-background-color-pressed);\n }\n\n :host([variant=\"line\"][disabled]) {\n background-color: var(--mdc-tab-line-inactive-background-color-disabled);\n color: var(--mdc-tab-line-inactive-color-disabled);\n }\n\n :host([variant=\"line\"][active]) {\n background-color: var(--mdc-tab-line-active-background-color-normal);\n color: var(--mdc-tab-line-active-color);\n }\n\n :host([variant=\"line\"][active])::part(indicator) {\n background-color:var(--mdc-tab-line-active-indicator-color);\n visibility: visible;\n }\n\n :host([variant=\"line\"][active]:hover) {\n background-color: var(--mdc-tab-line-active-background-color-hover);\n }\n\n :host([variant=\"line\"][active]:active) {\n background-color: var(--mdc-tab-line-active-background-color-pressed);\n }\n\n :host([variant=\"line\"][active][disabled]) {\n background-color: var(--mdc-tab-line-active-background-color-disabled);\n color: var(--mdc-tab-line-active-color-disabled);\n }\n\n :host([variant=\"line\"][active][disabled])::part(indicator) {\n background-color:var(--mdc-tab-line-active-indicator-color-disabled);\n }\n\n :host([variant=\"pill\"]) {\n background-color: var(--mdc-tab-pill-inactive-background-color-normal);\n border-radius: var(--mdc-tab-pill-border-radius);\n color: var(--mdc-tab-pill-inactive-color);\n }\n\n :host([variant=\"pill\"]:hover) {\n background-color: var(--mdc-tab-pill-inactive-background-color-hover);\n }\n\n :host([variant=\"pill\"]:active) {\n background-color: var(--mdc-tab-pill-inactive-background-color-pressed);\n }\n\n :host([variant=\"pill\"][disabled]) {\n background-color: var(--mdc-tab-pill-inactive-background-color-disabled);\n color: var(--mdc-tab-pill-inactive-color-disabled);\n }\n\n :host([variant=\"pill\"][active]) {\n background-color: var(--mdc-tab-pill-active-background-color-normal);\n color: var(--mdc-tab-pill-active-color);\n }\n\n :host([variant=\"pill\"][active]:hover) {\n background-color: var(--mdc-tab-pill-active-background-color-hover);\n }\n\n :host([variant=\"pill\"][active]:active) {\n background-color: var(--mdc-tab-pill-active-background-color-pressed);\n }\n\n :host([variant=\"pill\"][active][disabled]) {\n background-color: var(--mdc-tab-pill-active-background-color-disabled);\n color: var(--mdc-tab-pill-active-color-disabled);\n }\n\n`, ...hostFocusRingStyles()];\nexport default styles;\n", "import utils from '../../utils/tag-name';\n\nconst TAG_NAME = utils.constructTagName('tab');\n\nconst TAB_VARIANTS = {\n GLASS: 'glass',\n LINE: 'line',\n PILL: 'pill',\n} as const;\n\nconst DEFAULTS = {\n VARIANT: TAB_VARIANTS.PILL,\n} as const;\n\nexport { DEFAULTS, TAG_NAME, TAB_VARIANTS };\n", "import { CSSResult, html, nothing, PropertyValues } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport styles from './tab.styles';\nimport type { IconNames } from '../icon/icon.types';\nimport { DEFAULTS, TAB_VARIANTS } from './tab.constants';\nimport type { Variant } from './tab.types';\nimport { getIconNameWithoutStyle } from '../button/button.utils';\nimport Buttonsimple from '../buttonsimple/buttonsimple.component';\nimport { ButtonSize, ButtonType } from '../buttonsimple/buttonsimple.types';\nimport { TYPE, VALID_TEXT_TAGS } from '../text/text.constants';\nimport { IconNameMixin } from '../../utils/mixins/IconNameMixin';\n\n/**\n * `mdc-tab` is Tab component to be used within the Tabgroup.\n *\n * Passing in the attribute `text` to the tab component is changing the text displayed in the tab.\n *\n * The `slot=\"badge\"` can be used to add a badge to the tab.\n *\n * The `slot=\"chip\"` can be used to add a chip to the tab.\n *\n * For `icon`, the `mdc-icon` component is used to render the icon.\n *\n * Note: Icons can be used in conjunction with badges or chips.\n * Badges and chips should not be used at the same time.\n *\n * @dependency mdc-icon\n * @dependency mdc-text\n *\n * @event click - (React: onClick) This event is dispatched when the tab is clicked.\n * @event keydown - (React: onKeyDown) This event is dispatched when a key is pressed down on the tab.\n * @event keyup - (React: onKeyUp) This event is dispatched when a key is released on the tab.\n * @event focus - (React: onFocus) This event is dispatched when the tab receives focus.\n *\n * @tagname mdc-tab\n *\n * @cssproperty --mdc-tab-content-gap - Gap between the badge(if provided), icon and text.\n * @cssproperty --mdc-tab-height - Height of the tab.\n * @cssproperty --mdc-tab-glass-active-background-color-disabled - Background color for active glass tab\n * in disabled state.\n * @cssproperty --mdc-tab-glass-active-background-color-hover - Background color for active glass tab in hover state.\n * @cssproperty --mdc-tab-glass-active-background-color-normal - Background color for active glass tab in rest state.\n * @cssproperty --mdc-tab-glass-active-background-color-pressed - Background color for active glass tab\n * in pressed state.\n * @cssproperty --mdc-tab-glass-active-color - Text and icon color for active glass tab.\n * @cssproperty --mdc-tab-glass-active-color-disabled - Text and icon color for active glass tab in disabled state.\n * @cssproperty --mdc-tab-glass-border-radius - Border radius for glass tab.\n * @cssproperty --mdc-tab-glass-inactive-background-color-disabled - Background color for inactive glass tab\n * in disabled state.\n * @cssproperty --mdc-tab-glass-inactive-background-color-hover - Background color for inactive glass tab\n * in hover state.\n * @cssproperty --mdc-tab-glass-inactive-background-color-normal - Background color for inactive glass tab\n * in rest state.\n * @cssproperty --mdc-tab-glass-inactive-background-color-pressed - Background color for inactive glass tab\n * in pressed state.\n * @cssproperty --mdc-tab-glass-inactive-color - Text and icon color for inactive glass tab.\n * @cssproperty --mdc-tab-glass-inactive-color-disabled - Text and icon color for inactive glass tab in disabled state.\n * @cssproperty --mdc-tab-line-active-background-color-pressed - Background color for active line tab in pressed state.\n * @cssproperty --mdc-tab-line-active-background-color-disabled - Background color for active line tab\n * in disabled state.\n * @cssproperty --mdc-tab-line-active-background-color-hover - Background color for active line tab in hover state.\n * @cssproperty --mdc-tab-line-active-background-color-normal - Background color for active line tab in rest state.\n * @cssproperty --mdc-tab-line-active-color - Text and icon color for active line tab.\n * @cssproperty --mdc-tab-line-active-color-disabled - Text and icon color for active line tab in disabled state.\n * @cssproperty --mdc-tab-line-active-indicator-color - color for indicator in active line tab.\n * @cssproperty --mdc-tab-line-active-indicator-color-disabled - Color for indicator in active line tab\n * in disabled state.\n * @cssproperty --mdc-tab-line-active-indicator-height - Height for indicator in active line tab.\n * @cssproperty --mdc-tab-line-active-indicator-width - Width for indicator in active line tab.\n * @cssproperty --mdc-tab-line-border-bottom-left-radius - Bottom left border radius for line tab.\n * @cssproperty --mdc-tab-line-border-bottom-right-radius - Bottom right border radius for line tab.\n * @cssproperty --mdc-tab-line-border-top-left-radius - Top left border radius for line tab.\n * @cssproperty --mdc-tab-line-border-top-right-radius - Top right border radius for line tab.\n * @cssproperty --mdc-tab-line-inactive-background-color-pressed - Background color for inactive line tab\n * in pressed state.\n * @cssproperty --mdc-tab-line-inactive-background-color-disabled - Background color for inactive line tab\n * in disabled state\n * @cssproperty --mdc-tab-line-inactive-background-color-hover - Background color for inactive line tab in hover state.\n * @cssproperty --mdc-tab-line-inactive-background-color-normal - Background color for inactive line tab\n * in rest state.\n * @cssproperty --mdc-tab-line-inactive-color - Text and icon color for inactive line tab.\n * @cssproperty --mdc-tab-line-inactive-color-disabled - Text and icon color for inactive line tab in disabled state.\n * @cssproperty --mdc-tab-padding-left - Padding left for the tab.\n * @cssproperty --mdc-tab-padding-right - Padding right for the tab.\n * @cssproperty --mdc-tab-pill-active-background-color-pressed - Background color for active pill tab in pressed state.\n * @cssproperty --mdc-tab-pill-active-background-color-disabled - Background color for active pill tab\n * in disabled state.\n * @cssproperty --mdc-tab-pill-active-background-color-hover - Background color for active pill tab in hover state.\n * @cssproperty --mdc-tab-pill-active-background-color-normal - Background color for active pill tab in rest state.\n * @cssproperty --mdc-tab-pill-active-color - Text and icon color for active pill tab.\n * @cssproperty --mdc-tab-pill-active-color-disabled - Text and icon color for active pill tab in disabled state.\n * @cssproperty --mdc-tab-pill-border-radius - Border radius for pill tab.\n * @cssproperty --mdc-tab-pill-inactive-background-color-pressed - Background color for inactive pill tab\n * in pressed state.\n * @cssproperty --mdc-tab-pill-inactive-background-color-disabled - Background color for inactive pill tab\n * in disabled state.\n * @cssproperty --mdc-tab-pill-inactive-background-color-hover - Background color for inactive pill tab in hover state.\n * @cssproperty --mdc-tab-pill-inactive-background-color-normal - Background color for inactive pill tab in rest state.\n * @cssproperty --mdc-tab-pill-inactive-color - Text and icon color for inactive pill tab.\n * @cssproperty --mdc-tab-pill-inactive-color-disabled - Text and icon color for inactive pill tab in disabled state.\n */\nclass Tab extends IconNameMixin(Buttonsimple) {\n /**\n * Text to be displayed in the tab.\n * If no `text` is provided, no text will be rendered,\n * `aria-label` should be set on the tab.\n */\n @property({ type: String, reflect: true })\n text?: string;\n\n /**\n * Tab can have three variants:\n * - `glass`\n * - `line`\n * - `pill`\n *\n * It defines the background and foreground color of the tab.\n * @default pill\n */\n @property({ type: String, reflect: true })\n variant: Variant = DEFAULTS.VARIANT;\n\n /**\n * @internal\n */\n private prevIconName?: string;\n\n constructor() {\n super();\n this.role = 'tab';\n this.softDisabled = undefined as unknown as boolean;\n this.size = undefined as unknown as ButtonSize;\n this.type = undefined as unknown as ButtonType;\n }\n\n /**\n * Modifies the icon name based on the active state.\n * If the tab is active, the icon name is suffixed with '-filled'.\n * If the tab is inactive, the icon name is restored to its original value.\n * If '-filled' icon is not available, the icon name remains unchanged.\n *\n * @param active - The active state.\n */\n\n private modifyIconName(active: boolean): void {\n if (this.iconName) {\n if (active) {\n this.prevIconName = this.iconName;\n this.iconName = `${getIconNameWithoutStyle(this.iconName)}-filled` as IconNames;\n } else if (this.prevIconName) {\n this.iconName = this.prevIconName as IconNames;\n }\n }\n }\n\n /**\n * Sets the variant attribute for the tab component.\n * If the provided variant is not included in the TAB_VARIANTS,\n * it defaults to the value specified in DEFAULTS.VARIANT.\n *\n * @param variant - The variant to set.\n */\n private setVariant(variant: Variant): void {\n this.setAttribute('variant', Object.values(TAB_VARIANTS).includes(variant) ? variant : DEFAULTS.VARIANT);\n }\n\n /**\n * Sets the aria-selected attribute based on the active state of the Tab.\n * If the tab is active, the filled version of the icon is displayed,\n * else the icon is restored to its original value.\n *\n * @param element - The tab element.\n * @param active - The active state of the tab.\n */\n protected override setActive(element: HTMLElement, active: boolean) {\n element.setAttribute('aria-selected', active ? 'true' : 'false');\n this.modifyIconName(active);\n }\n\n protected override executeAction() {\n // Toggle the active state of the tab.\n this.active = !this.active;\n }\n\n public override update(changedProperties: PropertyValues): void {\n super.update(changedProperties);\n if (changedProperties.has('variant')) {\n this.setVariant(this.variant);\n }\n }\n\n public override render() {\n return html`\n <div part=\"container\">\n ${this.iconName\n ? html` <mdc-icon name=\"${this.iconName as IconNames}\" size=\"1\" length-unit=\"rem\" part=\"icon\"></mdc-icon>`\n : nothing}\n ${this.text\n ? html` <mdc-text\n type=${this.active ? TYPE.BODY_MIDSIZE_BOLD : TYPE.BODY_MIDSIZE_MEDIUM}\n tagname=${VALID_TEXT_TAGS.SPAN}\n data-text=${this.text}\n part=\"text\"\n >${this.text}</mdc-text\n >`\n : nothing}\n <slot name=\"badge\"></slot>\n <slot name=\"chip\"></slot>\n </div>\n <div part=\"indicator\"></div>\n `;\n }\n\n public static override styles: Array<CSSResult> = [...Buttonsimple.styles, ...styles];\n}\n\nexport default Tab;\n", "import Tab from './tab.component';\nimport { TAG_NAME } from './tab.constants';\nimport '../icon';\nimport '../text';\n\nTab.register(TAG_NAME);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n ['mdc-tab']: Tab\n }\n}\n\nexport default Tab;\n", "/* eslint-disable implicit-arrow-linebreak */\nimport utils from '../../utils/tag-name';\n\nconst TAG_NAME = utils.constructTagName('themeprovider');\n\nconst DEFAULTS = {\n THEMECLASS: 'mds-theme-stable-darkWebex' as const,\n} as const;\n\nexport { DEFAULTS, TAG_NAME };\n", "import { createContext } from '@lit/context';\n\nimport { TAG_NAME } from './themeprovider.constants';\n\nclass ThemeProviderContext {\n public themeclass?: string;\n\n // create typed lit context as part of the ThemeProviderContext\n public static context = createContext<ThemeProviderContext>(TAG_NAME);\n\n // constructor to allow setting the defaultThemeClass\n constructor(defaultThemeClass?: string) {\n this.themeclass = defaultThemeClass;\n }\n}\n\nexport default ThemeProviderContext;\n", "import { css } from 'lit';\n\nconst styles = css`\n :host {\n --mdc-themeprovider-color-default: var(--mds-color-theme-text-primary-normal);\n --mdc-themeprovider-font-family: var(--mds-font-family-primary);\n --mdc-themeprovider-font-weight: 400;\n /* adjusting Inter's letter spacing to better match the old CiscoSans */\n --mdc-themeprovider-letter-spacing-adjustment: -0.25px;\n /* Adjusting font feature settings for accessibility reasons */\n --mdc-themeprovider-font-feature-settings: \"ss02\" on;\n\n /* Custom scrollbar variables */\n --mdc-themeprovider-scrollbar-track-color: var(--mds-color-theme-background-secondary-normal);\n --mdc-themeprovider-scrollbar-thumb-color: var(--mds-color-theme-scrollbar-button-normal);\n --mdc-themeprovider-scrollbar-thumb-hover-color: var(--mds-color-theme-scrollbar-button-hover);\n --mdc-themeprovider-scrollbar-thumb-active-color: var(--mds-color-theme-scrollbar-button-pressed);\n \n color: var(--mdc-themeprovider-color-default);\n font-family: var(--mdc-themeprovider-font-family);\n font-weight: var(--mdc-themeprovider-font-weight);\n letter-spacing: var(--mdc-themeprovider-letter-spacing-adjustment);\n\n font-feature-settings: var(--mdc-themeprovider-font-feature-settings);\n }\n \n/** Scrollbar Theme for Chrome, Edge, and Firefox. This has limited support on other browsers.\n https://developer.mozilla.org/en-US/docs/Web/CSS/scrollbar-color for more details */\n * {\n scrollbar-color: var(--mdc-themeprovider-scrollbar-thumb-color) var(--mdc-themeprovider-scrollbar-track-color);\n }\n`;\n\nexport default [styles];\n", "import { property, state } from 'lit/decorators.js';\nimport { CSSResult } from 'lit';\nimport { DEFAULTS } from './themeprovider.constants';\nimport { Provider } from '../../models';\nimport ThemeProviderContext from './themeprovider.context';\nimport styles from './themeprovider.styles';\n\n/**\n * ThemeProvider component, which sets the passed in themeclass as class.\n * If the themeclass switches, the existing themeclass will be removed as a class\n * and the new themeclass will be added.\n *\n * CSS variables defined in the themeclass will be used for the styling of child dom nodes.\n *\n * Available Momentum theme classes:\n *\n * `mds-theme-stable-darkWebex`, `mds-theme-stable-lightWebex`\n *\n * `mds-theme-stable-darkBronzeWebex`, `mds-theme-stable-lightBronzeWebex`\n *\n * `mds-theme-stable-darkIndigoWebex`, `mds-theme-stable-lightIndigoWebex`\n *\n * `mds-theme-stable-darkJadeWebex`, `mds-theme-stable-lightJadeWebex`\n *\n * `mds-theme-stable-darkLavenderWebex`, `mds-theme-stable-lightLavenderWebex`\n *\n * `mds-theme-stable-darkRoseWebex`, `mds-theme-stable-lightRoseWebex`\n *\n * Themeclass context can be be consumed from Lit child components\n * (see providerUtils.consume for how to consume)\n *\n * ThemeProvider also includes basic font defaults for text.\n *\n * @tagname mdc-themeprovider\n *\n * @slot - children\n *\n * @cssproperty --mdc-themeprovider-color-default - Option to override the default color,\n * default: color-theme-text-primary-normal\n * @cssproperty --mdc-themeprovider-font-family - Option to override the font family,\n * default: `Momentum` (from momentum-design/fonts)\n * @cssproperty --mdc-themeprovider-font-weight - Option to override the font weight, default: `400`\n * @cssproperty --mdc-themeprovider-letter-spacing-adjustment - Option to override the default letter-spacing,\n * default: `-0.25px` (this is to match the old CiscoSans)\n * @cssproperty --mdc-themeprovider-font-feature-settings - Option to override the font feature settings,\n * default: `\"ss02\" on`\n * @cssproperty --mdc-themeprovider-scrollbar-track-color - Option to override the color of the scrollbar track.\n * @cssproperty --mdc-themeprovider-scrollbar-thumb-color - Option to override the color of the scrollbar thumb.\n * @cssproperty --mdc-themeprovider-scrollbar-thumb-hover-color - Option to override the color of the\n * scrollbar thumb on hover. Applicable only on webkit browsers.\n * @cssproperty --mdc-themeprovider-scrollbar-thumb-active-color - Option to override the color of the\n * scrollbar thumb on press. Applicable only on webkit browsers.\n */\nclass ThemeProvider extends Provider<ThemeProviderContext> {\n constructor() {\n super({\n context: ThemeProviderContext.context,\n initialValue: new ThemeProviderContext(DEFAULTS.THEMECLASS),\n });\n }\n\n /**\n * Context object of the ThemeProvider, to be consumed by child components\n */\n public static get Context() {\n return ThemeProviderContext.context;\n }\n\n /**\n * To keep track of the current theme class\n * @internal\n */\n @state()\n private currentThemeClass?: string;\n\n /**\n * Current theme class\n *\n * Has to be fully qualified, such that\n * the theme class matches the class of the respective\n * theme stylesheet\n *\n * Default: 'mds-theme-stable-darkWebex'\n */\n @property({ type: String })\n themeclass: string = DEFAULTS.THEMECLASS;\n\n protected override updated(changedProperties: Map<string, any>) {\n super.updated(changedProperties);\n\n if (changedProperties.has('themeclass')) {\n this.setThemeInClassList();\n this.currentThemeClass = this.themeclass;\n }\n }\n\n /**\n * Update all observing components of this\n * provider to update the themeclass\n *\n * Is called on every re-render, see Provider class\n */\n protected updateContext(): void {\n if (this.context.value.themeclass !== this.themeclass) {\n this.context.value.themeclass = this.themeclass;\n\n this.context.updateObservers();\n }\n }\n\n /**\n * Function to update the active theme classnames to update the theme tokens\n * as CSS variables on the web component.\n */\n private setThemeInClassList() {\n // remove all existing theme classes from the classList:\n if (this.currentThemeClass) {\n this.classList.remove(...this.currentThemeClass.split(' '));\n }\n // add current theme class to classList:\n if (this.themeclass) {\n this.classList.add(...this.themeclass.split(' '));\n }\n }\n\n public static override styles: Array<CSSResult> = [...Provider.styles, ...styles];\n}\n\nexport default ThemeProvider;\n", "import ThemeProvider from './themeprovider.component';\nimport { TAG_NAME } from './themeprovider.constants';\n\nThemeProvider.register(TAG_NAME);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n ['mdc-themeprovider']: ThemeProvider\n }\n}\n\nexport default ThemeProvider;\n", "import { css } from 'lit';\nimport { hostFitContentStyles, hostFocusRingStyles } from '../../utils/styles';\n\nconst styles = [hostFitContentStyles, css`\n :host {\n --mdc-toggle-width: 3rem;\n --mdc-toggle-height: 1.5rem;\n --mdc-toggle-width-compact: 2rem;\n --mdc-toggle-height-compact: 1rem;\n --mdc-toggle-border-radius: 0.75rem;\n --mdc-toggle-border-radius-compact: 0.5rem;\n --mdc-toggle-border: 0.0625rem solid var(--mds-color-theme-outline-input-normal);\n\n --mdc-toggle-inactive-rest-color: var(--mds-color-theme-control-inactive-normal);\n --mdc-toggle-inactive-hover-color: var(--mds-color-theme-control-inactive-hover);\n --mdc-toggle-inactive-pressed-color: var(--mds-color-theme-control-inactive-pressed);\n --mdc-toggle-inactive-disabled-color: var(--mds-color-theme-control-inactive-disabled);\n --mdc-toggle-active-rest-color: var(--mds-color-theme-control-active-normal);\n --mdc-toggle-active-hover-color: var(--mds-color-theme-control-active-hover);\n --mdc-toggle-active-pressed-color: var(--mds-color-theme-control-active-pressed);\n --mdc-toggle-active-disabled-color: var(--mds-color-theme-control-active-disabled);\n\n --mdc-toggle-label-lineheight: var(--mds-font-lineheight-body-midsize);\n --mdc-toggle-label-fontsize: var(--mds-font-size-body-midsize);\n --mdc-toggle-label-fontweight: 400;\n --mdc-toggle-label-color-disabled: var(--mds-color-theme-text-primary-disabled);\n --mdc-toggle-help-text-color: var(--mds-color-theme-text-secondary-normal);\n\n --mdc-toggle-icon-color-normal: var(--mds-color-theme-common-inverted-text-primary-normal);\n --mdc-toggle-icon-color-disabled: var(--mds-color-theme-common-inverted-text-primary-disabled);\n --mdc-toggle-icon-background-color-normal: var(--mds-color-theme-common-text-primary-normal);\n --mdc-toggle-icon-background-color-disabled: var(--mds-color-theme-common-text-primary-disabled);\n }\n\n :host([label]), :host([help-text]){\n display: grid;\n grid-template-rows: auto auto;\n grid-template-columns: auto auto;\n column-gap: 0.75rem;\n row-gap: 0.25rem;\n }\n\n :host([help-text='']) {\n grid-template-rows: auto;\n row-gap: 0rem;\n }\n\n .mdc-toggle__container {\n position: relative;\n border-radius: var(--mdc-toggle-border-radius);\n }\n\n .mdc-toggle__input {\n opacity: 0;\n position: absolute;\n cursor: pointer;\n margin: 0;\n width: var(--mdc-toggle-width);\n height: var(--mdc-toggle-height);\n }\n\n .mdc-toggle__slider {\n width: var(--mdc-toggle-width);\n height: var(--mdc-toggle-height);\n background: var(--mdc-toggle-inactive-rest-color);\n border-radius: var(--mdc-toggle-border-radius);\n border: var(--mdc-toggle-border);\n display: flex;\n align-items: center;\n justify-content: flex-start;\n transition: background-color 0.3s ease;\n outline: none;\n padding: 0.0625rem;\n }\n\n :host([checked]) .mdc-toggle__slider {\n background-color: var(--mdc-toggle-active-rest-color);\n justify-content: flex-end;\n border-color: transparent;\n }\n\n :host([size='compact']) .mdc-toggle__slider {\n width: var(--mdc-toggle-width-compact);\n height: var(--mdc-toggle-height-compact);\n border-radius: var(--mdc-toggle-border-radius-compact);\n }\n :host([size='compact']) .mdc-toggle__input {\n width: var(--mdc-toggle-width-compact);\n height: var(--mdc-toggle-height-compact);\n }\n\n .mdc-toggle__icon {\n padding: 0.25rem;\n --mdc-icon-fill-color: var(--mdc-toggle-icon-color-normal);\n background-color: var(--mdc-toggle-icon-background-color-normal);\n border-radius: 50%;\n }\n\n :host([disabled]) .mdc-toggle__icon {\n --mdc-icon-fill-color: var(--mdc-toggle-icon-color-disabled);\n }\n\n :host([size='compact']) .mdc-toggle__icon {\n padding: 0.125rem;\n }\n\n :host(:not([disabled])) .mdc-toggle__container:hover .mdc-toggle__slider {\n background-color: var(--mdc-toggle-inactive-hover-color);\n }\n\n :host(:not([disabled])) .mdc-toggle__container:active .mdc-toggle__slider {\n background-color: var(--mdc-toggle-inactive-pressed-color);\n }\n\n :host(:not([disabled])[checked]) .mdc-toggle__container:hover .mdc-toggle__slider {\n background-color: var(--mdc-toggle-active-hover-color);\n }\n\n :host(:not([disabled])[checked]) .mdc-toggle__container:active .mdc-toggle__slider {\n background-color: var(--mdc-toggle-active-pressed-color);\n }\n\n :host([disabled]) .mdc-toggle__slider {\n background-color: var(--mdc-toggle-inactive-disabled-color);\n }\n\n :host([disabled][checked]) .mdc-toggle__slider {\n background-color: var(--mdc-toggle-active-disabled-color);\n }\n\n :host([disabled]) .mdc-toggle__icon {\n background-color: var(--mdc-toggle-icon-background-color-disabled);\n }\n\n .mdc-label-text, .mdc-help-text {\n font-size: var(--mdc-toggle-label-fontsize);\n font-weight: var(--mdc-toggle-label-fontweight);\n line-height: var(--mdc-toggle-label-lineheight);\n grid-column: 2;\n }\n\n .mdc-help-text {\n color: var(--mdc-toggle-help-text-color);\n }\n\n :host([disabled]) .mdc-label-text, :host([disabled]) .mdc-help-text {\n color: var(--mdc-toggle-label-color-disabled);\n }\n\n /* High Contrast Mode */\n @media (forced-colors: active) {\n :host([checked]) .mdc-toggle__slider, .mdc-toggle__icon {\n border: var(--mdc-toggle-border);\n }\n }\n`, ...hostFocusRingStyles(true)];\n\nexport default styles;\n", "import utils from '../../utils/tag-name';\nimport type { IconNames } from '../icon/icon.types';\n\nconst TAG_NAME = utils.constructTagName('toggle');\n\nconst TOGGLE_SIZE = {\n DEFAULT: 'default',\n COMPACT: 'compact',\n} as const;\n\nconst ICON_NAME = {\n CHECKED: 'check-bold' as Extract<IconNames, 'check-bold'>,\n UNCHECKED: 'cancel-bold' as Extract<IconNames, 'cancel-bold'>,\n} as const;\n\nconst ICON_SIZE_IN_REM = {\n compact: 0.75,\n default: 1.25,\n};\n\nconst DEFAULTS = {\n SIZE: TOGGLE_SIZE.DEFAULT,\n VALIDATION_MESSAGE: 'Please toggle this switch if you want to proceed.',\n} as const;\n\nexport { TAG_NAME, DEFAULTS, TOGGLE_SIZE, ICON_NAME, ICON_SIZE_IN_REM };\n", "import { CSSResult, html, PropertyValueMap } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport styles from './toggle.styles';\nimport FormfieldWrapper from '../formfieldwrapper';\nimport { DEFAULTS as FORMFIELD_DEFAULTS } from '../formfieldwrapper/formfieldwrapper.constants';\nimport { DEFAULTS, ICON_NAME, ICON_SIZE_IN_REM, TOGGLE_SIZE } from './toggle.constants';\nimport { ToggleSize } from './toggle.types';\nimport type { ValidationType } from '../formfieldwrapper/formfieldwrapper.types';\nimport { DataAriaLabelMixin } from '../../utils/mixins/DataAriaLabelMixin';\nimport { AssociatedFormControl, FormInternalsMixin } from '../../utils/mixins/FormInternalsMixin';\n\n/**\n * Toggle Component is an interactive control used to switch between two mutually exclusive options,\n * such as On/Off, Active/Inactive. These are commonly used in settings panels, forms, and preference selections\n * where users need to enable or disable a feature.\n * It contains an optional label and an optional helper text.\n *\n * To create a group of toggles, use the FormFieldGroup component.\n *\n * Note: It internally renders a checkbox styled as a toggle switch.\n *\n * @dependency mdc-icon\n *\n * @tagname mdc-toggle\n *\n * @event change - (React: onChange) Event that gets dispatched when the toggle state changes.\n * @event focus - (React: onFocus) Event that gets dispatched when the toggle receives focus.\n *\n * @cssproperty --mdc-toggle-width - width of the toggle\n * @cssproperty --mdc-toggle-height - height of the toggle\n * @cssproperty --mdc-toggle-width-compact - width of the toggle when it's size is compact\n * @cssproperty --mdc-toggle-height-compact - height of the toggle when it's size is compact\n * @cssproperty --mdc-toggle-border-radius - border radius of the toggle\n * @cssproperty --mdc-toggle-border-radius-compact - border radius of the toggle when it's size is compact\n * @cssproperty --mdc-toggle-border - border of the toggle\n * @cssproperty --mdc-toggle-inactive-rest-color - background color of the inactive toggle in rest state\n * @cssproperty --mdc-toggle-inactive-hover-color - background color of the inactive toggle in hover state\n * @cssproperty --mdc-toggle-inactive-pressed-color - background color of the inactive toggle in pressed state\n * @cssproperty --mdc-toggle-inactive-disabled-color - background color of the inactive toggle in disabled state\n * @cssproperty --mdc-toggle-active-rest-color - background color of the active toggle in rest state\n * @cssproperty --mdc-toggle-active-hover-color - background color of the active toggle in hover state\n * @cssproperty --mdc-toggle-active-pressed-color - background color of the active toggle in pressed state\n * @cssproperty --mdc-toggle-active-disabled-color - background color of the active toggle in disabled state\n * @cssproperty --mdc-toggle-help-text-color - color of the help text label\n * @cssproperty --mdc-toggle-label-color-disabled - color of the toggle label and help text in disabled state\n *\n */\nclass Toggle extends FormInternalsMixin(DataAriaLabelMixin(FormfieldWrapper)) implements AssociatedFormControl {\n /**\n * Determines whether the toggle is active or inactive.\n * @default false\n */\n @property({ type: Boolean, reflect: true })\n checked = false;\n\n /**\n * Determines toggle size in rem (height is specified here).\n * - **Default**: 1.5\n * - **Compact**: 1\n * @default default\n */\n @property({ type: String, reflect: true })\n size: ToggleSize = DEFAULTS.SIZE;\n\n /**\n * Automatically focus on the element when the page loads.\n * [MDN Reference](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/autofocus)\n * @default false\n */\n @property({ type: Boolean, reflect: true }) override autofocus = false;\n\n constructor() {\n super();\n // Toggle does not contain helpTextType property.\n this.helpTextType = undefined as unknown as ValidationType;\n }\n\n /** @internal\n * Resets the checkbox to its initial state.\n * The checked property is set to false.\n */\n formResetCallback(): void {\n this.checked = false;\n }\n\n /** @internal */\n formStateRestoreCallback(\n state: string,\n ): void {\n if (state) {\n this.checked = true;\n }\n }\n\n /**\n * Manages the required state of the checkbox.\n * If the checkbox is not checked and the requiredLabel property is set, then the checkbox is invalid.\n */\n private manageRequired() {\n if (!this.checked && this.requiredLabel) {\n if (this.validationMessage) {\n this.inputElement.setCustomValidity(this.validationMessage);\n } else {\n this.inputElement.setCustomValidity('');\n }\n this.setValidity();\n } else {\n this.internals.setValidity({});\n }\n }\n\n /**\n * Updates the form value to reflect the current state of the toggle.\n * If toggle is switched on, the value is set to either the user-provided value or 'isActive' if no value is provided.\n * If toggle is switched off, the value is set to null.\n */\n private setFormValue() {\n let actualValue: string | null = null;\n\n if (this.checked) {\n actualValue = !this.value ? 'isActive' : this.value;\n } else {\n actualValue = null;\n }\n\n this.manageRequired();\n\n this.internals.setFormValue(actualValue);\n }\n\n /**\n * Toggles the state of the toggle element.\n * If the element is not disabled, then the checked property is toggled.\n */\n private toggleState(): void {\n if (!this.disabled) {\n this.checked = !this.checked;\n }\n }\n\n /**\n * Handles the keydown event on the toggle element.\n * When the user presses Enter, the form is submitted.\n * @param event - The keyboard event.\n */\n private handleKeyDown(event: KeyboardEvent): void {\n if (event.key === 'Enter') {\n this.form?.requestSubmit();\n }\n }\n\n /**\n * Toggles the state of the toggle element.\n * and dispatch the new change event.\n */\n private handleChange(event: Event) {\n this.toggleState();\n const EventConstructor = event.constructor as typeof Event;\n this.dispatchEvent(new EventConstructor(event.type, event));\n }\n\n /**\n * Sets the size attribute for the toggle component.\n * If the provided size is not included in the TOGGLE_SIZE,\n * it defaults to the value specified in DEFAULTS.SIZE.\n *\n * @param size - The size to set.\n */\n private setToggleSize(size: ToggleSize) {\n this.setAttribute('size', Object.values(TOGGLE_SIZE).includes(size) ? size : DEFAULTS.SIZE);\n }\n\n public override update(changedProperties: PropertyValueMap<any> | Map<PropertyKey, unknown>): void {\n super.update(changedProperties);\n\n if (changedProperties.has('checked')) {\n this.setFormValue();\n }\n\n if (changedProperties.has('size')) {\n this.setToggleSize(this.size);\n }\n }\n\n public override render() {\n return html`\n <div class=\"mdc-toggle__container mdc-focus-ring\">\n <input\n id=\"${this.id}\"\n type=\"checkbox\"\n class=\"mdc-toggle__input\"\n role=\"switch\"\n ?autofocus=\"${this.autofocus}\"\n ?required=\"${!!this.requiredLabel}\"\n name=\"${ifDefined(this.name)}\"\n value=\"${ifDefined(this.value)}\"\n .checked=\"${this.checked}\"\n aria-checked=\"${this.checked}\"\n .disabled=\"${this.disabled}\"\n aria-describedby=\"${ifDefined(this.helpText ? FORMFIELD_DEFAULTS.HELPER_TEXT_ID : '')}\"\n aria-label=\"${this.dataAriaLabel ?? ''}\"\n tabindex=\"${this.disabled ? -1 : 0}\"\n @change=\"${this.handleChange}\"\n @keydown=\"${this.handleKeyDown}\"\n />\n <div class=\"mdc-toggle__slider\">\n <mdc-icon\n name=\"${this.checked ? ICON_NAME.CHECKED : ICON_NAME.UNCHECKED}\"\n class=\"mdc-toggle__icon\"\n length-unit=\"rem\"\n size=\"${ICON_SIZE_IN_REM[this.size]}\"\n ></mdc-icon>\n </div>\n </div>\n ${this.renderLabel()}\n ${this.renderHelperText()}\n `;\n }\n\n public static override styles: Array<CSSResult> = [...FormfieldWrapper.styles, ...styles];\n}\n\nexport default Toggle;\n", "import Toggle from './toggle.component';\nimport { TAG_NAME } from './toggle.constants';\nimport '../icon';\n\nToggle.register(TAG_NAME);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n ['mdc-toggle']: Toggle\n }\n}\n\nexport default Toggle;\n", "export type NoInfer<A extends any> = [A][A extends any ? 0 : never]\n\nexport type PartialKeys<T, K extends keyof T> = Omit<T, K> & Partial<Pick<T, K>>\n\nexport function memo<TDeps extends ReadonlyArray<any>, TResult>(\n getDeps: () => [...TDeps],\n fn: (...args: NoInfer<[...TDeps]>) => TResult,\n opts: {\n key: false | string\n debug?: () => boolean\n onChange?: (result: TResult) => void\n initialDeps?: TDeps\n },\n) {\n let deps = opts.initialDeps ?? []\n let result: TResult | undefined\n\n return (): TResult => {\n let depTime: number\n if (opts.key && opts.debug?.()) depTime = Date.now()\n\n const newDeps = getDeps()\n\n const depsChanged =\n newDeps.length !== deps.length ||\n newDeps.some((dep: any, index: number) => deps[index] !== dep)\n\n if (!depsChanged) {\n return result!\n }\n\n deps = newDeps\n\n let resultTime: number\n if (opts.key && opts.debug?.()) resultTime = Date.now()\n\n result = fn(...newDeps)\n\n if (opts.key && opts.debug?.()) {\n const depEndTime = Math.round((Date.now() - depTime!) * 100) / 100\n const resultEndTime = Math.round((Date.now() - resultTime!) * 100) / 100\n const resultFpsPercentage = resultEndTime / 16\n\n const pad = (str: number | string, num: number) => {\n str = String(str)\n while (str.length < num) {\n str = ' ' + str\n }\n return str\n }\n\n console.info(\n `%c⏱ ${pad(resultEndTime, 5)} /${pad(depEndTime, 5)} ms`,\n `\n font-size: .6rem;\n font-weight: bold;\n color: hsl(${Math.max(\n 0,\n Math.min(120 - 120 * resultFpsPercentage, 120),\n )}deg 100% 31%);`,\n opts?.key,\n )\n }\n\n opts?.onChange?.(result)\n\n return result\n }\n}\n\nexport function notUndefined<T>(value: T | undefined, msg?: string): T {\n if (value === undefined) {\n throw new Error(`Unexpected undefined${msg ? `: ${msg}` : ''}`)\n } else {\n return value\n }\n}\n\nexport const approxEqual = (a: number, b: number) => Math.abs(a - b) < 1\n\nexport const debounce = (\n targetWindow: Window & typeof globalThis,\n fn: Function,\n ms: number,\n) => {\n let timeoutId: number\n return function (this: any, ...args: Array<any>) {\n targetWindow.clearTimeout(timeoutId)\n timeoutId = targetWindow.setTimeout(() => fn.apply(this, args), ms)\n }\n}\n", "import { approxEqual, debounce, memo, notUndefined } from './utils'\n\nexport * from './utils'\n\n//\n\ntype ScrollDirection = 'forward' | 'backward'\n\ntype ScrollAlignment = 'start' | 'center' | 'end' | 'auto'\n\ntype ScrollBehavior = 'auto' | 'smooth'\n\nexport interface ScrollToOptions {\n align?: ScrollAlignment\n behavior?: ScrollBehavior\n}\n\ntype ScrollToOffsetOptions = ScrollToOptions\n\ntype ScrollToIndexOptions = ScrollToOptions\n\nexport interface Range {\n startIndex: number\n endIndex: number\n overscan: number\n count: number\n}\n\ntype Key = number | string | bigint\n\nexport interface VirtualItem {\n key: Key\n index: number\n start: number\n end: number\n size: number\n lane: number\n}\n\nexport interface Rect {\n width: number\n height: number\n}\n\n//\n\nexport const defaultKeyExtractor = (index: number) => index\n\nexport const defaultRangeExtractor = (range: Range) => {\n const start = Math.max(range.startIndex - range.overscan, 0)\n const end = Math.min(range.endIndex + range.overscan, range.count - 1)\n\n const arr = []\n\n for (let i = start; i <= end; i++) {\n arr.push(i)\n }\n\n return arr\n}\n\nexport const observeElementRect = <T extends Element>(\n instance: Virtualizer<T, any>,\n cb: (rect: Rect) => void,\n) => {\n const element = instance.scrollElement\n if (!element) {\n return\n }\n const targetWindow = instance.targetWindow\n if (!targetWindow) {\n return\n }\n\n const handler = (rect: Rect) => {\n const { width, height } = rect\n cb({ width: Math.round(width), height: Math.round(height) })\n }\n\n handler(element.getBoundingClientRect())\n\n if (!targetWindow.ResizeObserver) {\n return () => {}\n }\n\n const observer = new targetWindow.ResizeObserver((entries) => {\n const entry = entries[0]\n if (entry?.borderBoxSize) {\n const box = entry.borderBoxSize[0]\n if (box) {\n handler({ width: box.inlineSize, height: box.blockSize })\n return\n }\n }\n handler(element.getBoundingClientRect())\n })\n\n observer.observe(element, { box: 'border-box' })\n\n return () => {\n observer.unobserve(element)\n }\n}\n\nconst addEventListenerOptions = {\n passive: true,\n}\n\nexport const observeWindowRect = (\n instance: Virtualizer<Window, any>,\n cb: (rect: Rect) => void,\n) => {\n const element = instance.scrollElement\n if (!element) {\n return\n }\n\n const handler = () => {\n cb({ width: element.innerWidth, height: element.innerHeight })\n }\n handler()\n\n element.addEventListener('resize', handler, addEventListenerOptions)\n\n return () => {\n element.removeEventListener('resize', handler)\n }\n}\n\nconst supportsScrollend =\n typeof window == 'undefined' ? true : 'onscrollend' in window\n\ntype ObserveOffsetCallBack = (offset: number, isScrolling: boolean) => void\n\nexport const observeElementOffset = <T extends Element>(\n instance: Virtualizer<T, any>,\n cb: ObserveOffsetCallBack,\n) => {\n const element = instance.scrollElement\n if (!element) {\n return\n }\n const targetWindow = instance.targetWindow\n if (!targetWindow) {\n return\n }\n\n let offset = 0\n const fallback =\n instance.options.useScrollendEvent && supportsScrollend\n ? () => undefined\n : debounce(\n targetWindow,\n () => {\n cb(offset, false)\n },\n instance.options.isScrollingResetDelay,\n )\n\n const createHandler = (isScrolling: boolean) => () => {\n const { horizontal, isRtl } = instance.options\n offset = horizontal\n ? element['scrollLeft'] * ((isRtl && -1) || 1)\n : element['scrollTop']\n fallback()\n cb(offset, isScrolling)\n }\n const handler = createHandler(true)\n const endHandler = createHandler(false)\n endHandler()\n\n element.addEventListener('scroll', handler, addEventListenerOptions)\n element.addEventListener('scrollend', endHandler, addEventListenerOptions)\n\n return () => {\n element.removeEventListener('scroll', handler)\n element.removeEventListener('scrollend', endHandler)\n }\n}\n\nexport const observeWindowOffset = (\n instance: Virtualizer<Window, any>,\n cb: ObserveOffsetCallBack,\n) => {\n const element = instance.scrollElement\n if (!element) {\n return\n }\n const targetWindow = instance.targetWindow\n if (!targetWindow) {\n return\n }\n\n let offset = 0\n const fallback =\n instance.options.useScrollendEvent && supportsScrollend\n ? () => undefined\n : debounce(\n targetWindow,\n () => {\n cb(offset, false)\n },\n instance.options.isScrollingResetDelay,\n )\n\n const createHandler = (isScrolling: boolean) => () => {\n offset = element[instance.options.horizontal ? 'scrollX' : 'scrollY']\n fallback()\n cb(offset, isScrolling)\n }\n const handler = createHandler(true)\n const endHandler = createHandler(false)\n endHandler()\n\n element.addEventListener('scroll', handler, addEventListenerOptions)\n element.addEventListener('scrollend', endHandler, addEventListenerOptions)\n\n return () => {\n element.removeEventListener('scroll', handler)\n element.removeEventListener('scrollend', endHandler)\n }\n}\n\nexport const measureElement = <TItemElement extends Element>(\n element: TItemElement,\n entry: ResizeObserverEntry | undefined,\n instance: Virtualizer<any, TItemElement>,\n) => {\n if (entry?.borderBoxSize) {\n const box = entry.borderBoxSize[0]\n if (box) {\n const size = Math.round(\n box[instance.options.horizontal ? 'inlineSize' : 'blockSize'],\n )\n return size\n }\n }\n return Math.round(\n element.getBoundingClientRect()[\n instance.options.horizontal ? 'width' : 'height'\n ],\n )\n}\n\nexport const windowScroll = <T extends Window>(\n offset: number,\n {\n adjustments = 0,\n behavior,\n }: { adjustments?: number; behavior?: ScrollBehavior },\n instance: Virtualizer<T, any>,\n) => {\n const toOffset = offset + adjustments\n\n instance.scrollElement?.scrollTo?.({\n [instance.options.horizontal ? 'left' : 'top']: toOffset,\n behavior,\n })\n}\n\nexport const elementScroll = <T extends Element>(\n offset: number,\n {\n adjustments = 0,\n behavior,\n }: { adjustments?: number; behavior?: ScrollBehavior },\n instance: Virtualizer<T, any>,\n) => {\n const toOffset = offset + adjustments\n\n instance.scrollElement?.scrollTo?.({\n [instance.options.horizontal ? 'left' : 'top']: toOffset,\n behavior,\n })\n}\n\nexport interface VirtualizerOptions<\n TScrollElement extends Element | Window,\n TItemElement extends Element,\n> {\n // Required from the user\n count: number\n getScrollElement: () => TScrollElement | null\n estimateSize: (index: number) => number\n\n // Required from the framework adapter (but can be overridden)\n scrollToFn: (\n offset: number,\n options: { adjustments?: number; behavior?: ScrollBehavior },\n instance: Virtualizer<TScrollElement, TItemElement>,\n ) => void\n observeElementRect: (\n instance: Virtualizer<TScrollElement, TItemElement>,\n cb: (rect: Rect) => void,\n ) => void | (() => void)\n observeElementOffset: (\n instance: Virtualizer<TScrollElement, TItemElement>,\n cb: ObserveOffsetCallBack,\n ) => void | (() => void)\n // Optional\n debug?: boolean\n initialRect?: Rect\n onChange?: (\n instance: Virtualizer<TScrollElement, TItemElement>,\n sync: boolean,\n ) => void\n measureElement?: (\n element: TItemElement,\n entry: ResizeObserverEntry | undefined,\n instance: Virtualizer<TScrollElement, TItemElement>,\n ) => number\n overscan?: number\n horizontal?: boolean\n paddingStart?: number\n paddingEnd?: number\n scrollPaddingStart?: number\n scrollPaddingEnd?: number\n initialOffset?: number | (() => number)\n getItemKey?: (index: number) => Key\n rangeExtractor?: (range: Range) => Array<number>\n scrollMargin?: number\n gap?: number\n indexAttribute?: string\n initialMeasurementsCache?: Array<VirtualItem>\n lanes?: number\n isScrollingResetDelay?: number\n useScrollendEvent?: boolean\n enabled?: boolean\n isRtl?: boolean\n}\n\nexport class Virtualizer<\n TScrollElement extends Element | Window,\n TItemElement extends Element,\n> {\n private unsubs: Array<void | (() => void)> = []\n options!: Required<VirtualizerOptions<TScrollElement, TItemElement>>\n scrollElement: TScrollElement | null = null\n targetWindow: (Window & typeof globalThis) | null = null\n isScrolling = false\n private scrollToIndexTimeoutId: number | null = null\n measurementsCache: Array<VirtualItem> = []\n private itemSizeCache = new Map<Key, number>()\n private pendingMeasuredCacheIndexes: Array<number> = []\n scrollRect: Rect | null = null\n scrollOffset: number | null = null\n scrollDirection: ScrollDirection | null = null\n private scrollAdjustments = 0\n shouldAdjustScrollPositionOnItemSizeChange:\n | undefined\n | ((\n item: VirtualItem,\n delta: number,\n instance: Virtualizer<TScrollElement, TItemElement>,\n ) => boolean)\n elementsCache = new Map<Key, TItemElement>()\n private observer = (() => {\n let _ro: ResizeObserver | null = null\n\n const get = () => {\n if (_ro) {\n return _ro\n }\n\n if (!this.targetWindow || !this.targetWindow.ResizeObserver) {\n return null\n }\n\n return (_ro = new this.targetWindow.ResizeObserver((entries) => {\n entries.forEach((entry) => {\n this._measureElement(entry.target as TItemElement, entry)\n })\n }))\n }\n\n return {\n disconnect: () => {\n get()?.disconnect()\n _ro = null\n },\n observe: (target: Element) =>\n get()?.observe(target, { box: 'border-box' }),\n unobserve: (target: Element) => get()?.unobserve(target),\n }\n })()\n range: { startIndex: number; endIndex: number } | null = null\n\n constructor(opts: VirtualizerOptions<TScrollElement, TItemElement>) {\n this.setOptions(opts)\n }\n\n setOptions = (opts: VirtualizerOptions<TScrollElement, TItemElement>) => {\n Object.entries(opts).forEach(([key, value]) => {\n if (typeof value === 'undefined') delete (opts as any)[key]\n })\n\n this.options = {\n debug: false,\n initialOffset: 0,\n overscan: 1,\n paddingStart: 0,\n paddingEnd: 0,\n scrollPaddingStart: 0,\n scrollPaddingEnd: 0,\n horizontal: false,\n getItemKey: defaultKeyExtractor,\n rangeExtractor: defaultRangeExtractor,\n onChange: () => {},\n measureElement,\n initialRect: { width: 0, height: 0 },\n scrollMargin: 0,\n gap: 0,\n indexAttribute: 'data-index',\n initialMeasurementsCache: [],\n lanes: 1,\n isScrollingResetDelay: 150,\n enabled: true,\n isRtl: false,\n useScrollendEvent: true,\n ...opts,\n }\n }\n\n private notify = (sync: boolean) => {\n this.options.onChange?.(this, sync)\n }\n\n private maybeNotify = memo(\n () => {\n this.calculateRange()\n\n return [\n this.isScrolling,\n this.range ? this.range.startIndex : null,\n this.range ? this.range.endIndex : null,\n ]\n },\n (isScrolling) => {\n this.notify(isScrolling)\n },\n {\n key: process.env.NODE_ENV !== 'production' && 'maybeNotify',\n debug: () => this.options.debug,\n initialDeps: [\n this.isScrolling,\n this.range ? this.range.startIndex : null,\n this.range ? this.range.endIndex : null,\n ] as [boolean, number | null, number | null],\n },\n )\n\n private cleanup = () => {\n this.unsubs.filter(Boolean).forEach((d) => d!())\n this.unsubs = []\n this.observer.disconnect()\n this.scrollElement = null\n this.targetWindow = null\n }\n\n _didMount = () => {\n return () => {\n this.cleanup()\n }\n }\n\n _willUpdate = () => {\n const scrollElement = this.options.enabled\n ? this.options.getScrollElement()\n : null\n\n if (this.scrollElement !== scrollElement) {\n this.cleanup()\n\n if (!scrollElement) {\n this.maybeNotify()\n return\n }\n\n this.scrollElement = scrollElement\n\n if (this.scrollElement && 'ownerDocument' in this.scrollElement) {\n this.targetWindow = this.scrollElement.ownerDocument.defaultView\n } else {\n this.targetWindow = this.scrollElement?.window ?? null\n }\n\n this.elementsCache.forEach((cached) => {\n this.observer.observe(cached)\n })\n\n this._scrollToOffset(this.getScrollOffset(), {\n adjustments: undefined,\n behavior: undefined,\n })\n\n this.unsubs.push(\n this.options.observeElementRect(this, (rect) => {\n this.scrollRect = rect\n this.maybeNotify()\n }),\n )\n\n this.unsubs.push(\n this.options.observeElementOffset(this, (offset, isScrolling) => {\n this.scrollAdjustments = 0\n this.scrollDirection = isScrolling\n ? this.getScrollOffset() < offset\n ? 'forward'\n : 'backward'\n : null\n this.scrollOffset = offset\n this.isScrolling = isScrolling\n\n this.maybeNotify()\n }),\n )\n }\n }\n\n private getSize = () => {\n if (!this.options.enabled) {\n this.scrollRect = null\n return 0\n }\n\n this.scrollRect = this.scrollRect ?? this.options.initialRect\n\n return this.scrollRect[this.options.horizontal ? 'width' : 'height']\n }\n\n private getScrollOffset = () => {\n if (!this.options.enabled) {\n this.scrollOffset = null\n return 0\n }\n\n this.scrollOffset =\n this.scrollOffset ??\n (typeof this.options.initialOffset === 'function'\n ? this.options.initialOffset()\n : this.options.initialOffset)\n\n return this.scrollOffset\n }\n\n private getFurthestMeasurement = (\n measurements: Array<VirtualItem>,\n index: number,\n ) => {\n const furthestMeasurementsFound = new Map<number, true>()\n const furthestMeasurements = new Map<number, VirtualItem>()\n for (let m = index - 1; m >= 0; m--) {\n const measurement = measurements[m]!\n\n if (furthestMeasurementsFound.has(measurement.lane)) {\n continue\n }\n\n const previousFurthestMeasurement = furthestMeasurements.get(\n measurement.lane,\n )\n if (\n previousFurthestMeasurement == null ||\n measurement.end > previousFurthestMeasurement.end\n ) {\n furthestMeasurements.set(measurement.lane, measurement)\n } else if (measurement.end < previousFurthestMeasurement.end) {\n furthestMeasurementsFound.set(measurement.lane, true)\n }\n\n if (furthestMeasurementsFound.size === this.options.lanes) {\n break\n }\n }\n\n return furthestMeasurements.size === this.options.lanes\n ? Array.from(furthestMeasurements.values()).sort((a, b) => {\n if (a.end === b.end) {\n return a.index - b.index\n }\n\n return a.end - b.end\n })[0]\n : undefined\n }\n\n private getMeasurementOptions = memo(\n () => [\n this.options.count,\n this.options.paddingStart,\n this.options.scrollMargin,\n this.options.getItemKey,\n this.options.enabled,\n ],\n (count, paddingStart, scrollMargin, getItemKey, enabled) => {\n this.pendingMeasuredCacheIndexes = []\n return {\n count,\n paddingStart,\n scrollMargin,\n getItemKey,\n enabled,\n }\n },\n {\n key: false,\n },\n )\n\n private getMeasurements = memo(\n () => [this.getMeasurementOptions(), this.itemSizeCache],\n (\n { count, paddingStart, scrollMargin, getItemKey, enabled },\n itemSizeCache,\n ) => {\n if (!enabled) {\n this.measurementsCache = []\n this.itemSizeCache.clear()\n return []\n }\n\n if (this.measurementsCache.length === 0) {\n this.measurementsCache = this.options.initialMeasurementsCache\n this.measurementsCache.forEach((item) => {\n this.itemSizeCache.set(item.key, item.size)\n })\n }\n\n const min =\n this.pendingMeasuredCacheIndexes.length > 0\n ? Math.min(...this.pendingMeasuredCacheIndexes)\n : 0\n this.pendingMeasuredCacheIndexes = []\n\n const measurements = this.measurementsCache.slice(0, min)\n\n for (let i = min; i < count; i++) {\n const key = getItemKey(i)\n\n const furthestMeasurement =\n this.options.lanes === 1\n ? measurements[i - 1]\n : this.getFurthestMeasurement(measurements, i)\n\n const start = furthestMeasurement\n ? furthestMeasurement.end + this.options.gap\n : paddingStart + scrollMargin\n\n const measuredSize = itemSizeCache.get(key)\n const size =\n typeof measuredSize === 'number'\n ? measuredSize\n : this.options.estimateSize(i)\n\n const end = start + size\n\n const lane = furthestMeasurement\n ? furthestMeasurement.lane\n : i % this.options.lanes\n\n measurements[i] = {\n index: i,\n start,\n size,\n end,\n key,\n lane,\n }\n }\n\n this.measurementsCache = measurements\n\n return measurements\n },\n {\n key: process.env.NODE_ENV !== 'production' && 'getMeasurements',\n debug: () => this.options.debug,\n },\n )\n\n calculateRange = memo(\n () => [this.getMeasurements(), this.getSize(), this.getScrollOffset()],\n (measurements, outerSize, scrollOffset) => {\n return (this.range =\n measurements.length > 0 && outerSize > 0\n ? calculateRange({\n measurements,\n outerSize,\n scrollOffset,\n })\n : null)\n },\n {\n key: process.env.NODE_ENV !== 'production' && 'calculateRange',\n debug: () => this.options.debug,\n },\n )\n\n private getIndexes = memo(\n () => {\n let startIndex: number | null = null\n let endIndex: number | null = null\n const range = this.calculateRange()\n if (range) {\n startIndex = range.startIndex\n endIndex = range.endIndex\n }\n return [\n this.options.rangeExtractor,\n this.options.overscan,\n this.options.count,\n startIndex,\n endIndex,\n ]\n },\n (rangeExtractor, overscan, count, startIndex, endIndex) => {\n return startIndex === null || endIndex === null\n ? []\n : rangeExtractor({\n startIndex,\n endIndex,\n overscan,\n count,\n })\n },\n {\n key: process.env.NODE_ENV !== 'production' && 'getIndexes',\n debug: () => this.options.debug,\n },\n )\n\n indexFromElement = (node: TItemElement) => {\n const attributeName = this.options.indexAttribute\n const indexStr = node.getAttribute(attributeName)\n\n if (!indexStr) {\n console.warn(\n `Missing attribute name '${attributeName}={index}' on measured element.`,\n )\n return -1\n }\n\n return parseInt(indexStr, 10)\n }\n\n private _measureElement = (\n node: TItemElement,\n entry: ResizeObserverEntry | undefined,\n ) => {\n const index = this.indexFromElement(node)\n const item = this.measurementsCache[index]\n if (!item) {\n return\n }\n const key = item.key\n const prevNode = this.elementsCache.get(key)\n\n if (prevNode !== node) {\n if (prevNode) {\n this.observer.unobserve(prevNode)\n }\n this.observer.observe(node)\n this.elementsCache.set(key, node)\n }\n\n if (node.isConnected) {\n this.resizeItem(index, this.options.measureElement(node, entry, this))\n }\n }\n\n resizeItem = (index: number, size: number) => {\n const item = this.measurementsCache[index]\n if (!item) {\n return\n }\n const itemSize = this.itemSizeCache.get(item.key) ?? item.size\n const delta = size - itemSize\n\n if (delta !== 0) {\n if (\n this.shouldAdjustScrollPositionOnItemSizeChange !== undefined\n ? this.shouldAdjustScrollPositionOnItemSizeChange(item, delta, this)\n : item.start < this.getScrollOffset() + this.scrollAdjustments\n ) {\n if (process.env.NODE_ENV !== 'production' && this.options.debug) {\n console.info('correction', delta)\n }\n\n this._scrollToOffset(this.getScrollOffset(), {\n adjustments: (this.scrollAdjustments += delta),\n behavior: undefined,\n })\n }\n\n this.pendingMeasuredCacheIndexes.push(item.index)\n this.itemSizeCache = new Map(this.itemSizeCache.set(item.key, size))\n\n this.notify(false)\n }\n }\n\n measureElement = (node: TItemElement | null | undefined) => {\n if (!node) {\n this.elementsCache.forEach((cached, key) => {\n if (!cached.isConnected) {\n this.observer.unobserve(cached)\n this.elementsCache.delete(key)\n }\n })\n return\n }\n\n this._measureElement(node, undefined)\n }\n\n getVirtualItems = memo(\n () => [this.getIndexes(), this.getMeasurements()],\n (indexes, measurements) => {\n const virtualItems: Array<VirtualItem> = []\n\n for (let k = 0, len = indexes.length; k < len; k++) {\n const i = indexes[k]!\n const measurement = measurements[i]!\n\n virtualItems.push(measurement)\n }\n\n return virtualItems\n },\n {\n key: process.env.NODE_ENV !== 'production' && 'getVirtualItems',\n debug: () => this.options.debug,\n },\n )\n\n getVirtualItemForOffset = (offset: number) => {\n const measurements = this.getMeasurements()\n if (measurements.length === 0) {\n return undefined\n }\n return notUndefined(\n measurements[\n findNearestBinarySearch(\n 0,\n measurements.length - 1,\n (index: number) => notUndefined(measurements[index]).start,\n offset,\n )\n ],\n )\n }\n\n getOffsetForAlignment = (toOffset: number, align: ScrollAlignment) => {\n const size = this.getSize()\n const scrollOffset = this.getScrollOffset()\n\n if (align === 'auto') {\n if (toOffset >= scrollOffset + size) {\n align = 'end'\n }\n }\n\n if (align === 'end') {\n toOffset -= size\n }\n\n const scrollSizeProp = this.options.horizontal\n ? 'scrollWidth'\n : 'scrollHeight'\n const scrollSize = this.scrollElement\n ? 'document' in this.scrollElement\n ? this.scrollElement.document.documentElement[scrollSizeProp]\n : this.scrollElement[scrollSizeProp]\n : 0\n\n const maxOffset = scrollSize - size\n\n return Math.max(Math.min(maxOffset, toOffset), 0)\n }\n\n getOffsetForIndex = (index: number, align: ScrollAlignment = 'auto') => {\n index = Math.max(0, Math.min(index, this.options.count - 1))\n\n const item = this.measurementsCache[index]\n if (!item) {\n return undefined\n }\n\n const size = this.getSize()\n const scrollOffset = this.getScrollOffset()\n\n if (align === 'auto') {\n if (item.end >= scrollOffset + size - this.options.scrollPaddingEnd) {\n align = 'end'\n } else if (item.start <= scrollOffset + this.options.scrollPaddingStart) {\n align = 'start'\n } else {\n return [scrollOffset, align] as const\n }\n }\n\n const centerOffset =\n item.start - this.options.scrollPaddingStart + (item.size - size) / 2\n\n switch (align) {\n case 'center':\n return [this.getOffsetForAlignment(centerOffset, align), align] as const\n case 'end':\n return [\n this.getOffsetForAlignment(\n item.end + this.options.scrollPaddingEnd,\n align,\n ),\n align,\n ] as const\n default:\n return [\n this.getOffsetForAlignment(\n item.start - this.options.scrollPaddingStart,\n align,\n ),\n align,\n ] as const\n }\n }\n\n private isDynamicMode = () => this.elementsCache.size > 0\n\n private cancelScrollToIndex = () => {\n if (this.scrollToIndexTimeoutId !== null && this.targetWindow) {\n this.targetWindow.clearTimeout(this.scrollToIndexTimeoutId)\n this.scrollToIndexTimeoutId = null\n }\n }\n\n scrollToOffset = (\n toOffset: number,\n { align = 'start', behavior }: ScrollToOffsetOptions = {},\n ) => {\n this.cancelScrollToIndex()\n\n if (behavior === 'smooth' && this.isDynamicMode()) {\n console.warn(\n 'The `smooth` scroll behavior is not fully supported with dynamic size.',\n )\n }\n\n this._scrollToOffset(this.getOffsetForAlignment(toOffset, align), {\n adjustments: undefined,\n behavior,\n })\n }\n\n scrollToIndex = (\n index: number,\n { align: initialAlign = 'auto', behavior }: ScrollToIndexOptions = {},\n ) => {\n index = Math.max(0, Math.min(index, this.options.count - 1))\n\n this.cancelScrollToIndex()\n\n if (behavior === 'smooth' && this.isDynamicMode()) {\n console.warn(\n 'The `smooth` scroll behavior is not fully supported with dynamic size.',\n )\n }\n\n const offsetAndAlign = this.getOffsetForIndex(index, initialAlign)\n if (!offsetAndAlign) return\n\n const [offset, align] = offsetAndAlign\n\n this._scrollToOffset(offset, { adjustments: undefined, behavior })\n\n if (behavior !== 'smooth' && this.isDynamicMode() && this.targetWindow) {\n this.scrollToIndexTimeoutId = this.targetWindow.setTimeout(() => {\n this.scrollToIndexTimeoutId = null\n\n const elementInDOM = this.elementsCache.has(\n this.options.getItemKey(index),\n )\n\n if (elementInDOM) {\n const [latestOffset] = notUndefined(\n this.getOffsetForIndex(index, align),\n )\n\n if (!approxEqual(latestOffset, this.getScrollOffset())) {\n this.scrollToIndex(index, { align, behavior })\n }\n } else {\n this.scrollToIndex(index, { align, behavior })\n }\n })\n }\n }\n\n scrollBy = (delta: number, { behavior }: ScrollToOffsetOptions = {}) => {\n this.cancelScrollToIndex()\n\n if (behavior === 'smooth' && this.isDynamicMode()) {\n console.warn(\n 'The `smooth` scroll behavior is not fully supported with dynamic size.',\n )\n }\n\n this._scrollToOffset(this.getScrollOffset() + delta, {\n adjustments: undefined,\n behavior,\n })\n }\n\n getTotalSize = () => {\n const measurements = this.getMeasurements()\n\n let end: number\n // If there are no measurements, set the end to paddingStart\n if (measurements.length === 0) {\n end = this.options.paddingStart\n } else {\n // If lanes is 1, use the last measurement's end, otherwise find the maximum end value among all measurements\n end =\n this.options.lanes === 1\n ? (measurements[measurements.length - 1]?.end ?? 0)\n : Math.max(\n ...measurements.slice(-this.options.lanes).map((m) => m.end),\n )\n }\n\n return Math.max(\n end - this.options.scrollMargin + this.options.paddingEnd,\n 0,\n )\n }\n\n private _scrollToOffset = (\n offset: number,\n {\n adjustments,\n behavior,\n }: {\n adjustments: number | undefined\n behavior: ScrollBehavior | undefined\n },\n ) => {\n this.options.scrollToFn(offset, { behavior, adjustments }, this)\n }\n\n measure = () => {\n this.itemSizeCache = new Map()\n this.notify(false)\n }\n}\n\nconst findNearestBinarySearch = (\n low: number,\n high: number,\n getCurrentValue: (i: number) => number,\n value: number,\n) => {\n while (low <= high) {\n const middle = ((low + high) / 2) | 0\n const currentValue = getCurrentValue(middle)\n\n if (currentValue < value) {\n low = middle + 1\n } else if (currentValue > value) {\n high = middle - 1\n } else {\n return middle\n }\n }\n\n if (low > 0) {\n return low - 1\n } else {\n return 0\n }\n}\n\nfunction calculateRange({\n measurements,\n outerSize,\n scrollOffset,\n}: {\n measurements: Array<VirtualItem>\n outerSize: number\n scrollOffset: number\n}) {\n const count = measurements.length - 1\n const getOffset = (index: number) => measurements[index]!.start\n\n const startIndex = findNearestBinarySearch(0, count, getOffset, scrollOffset)\n let endIndex = startIndex\n\n while (\n endIndex < count &&\n measurements[endIndex]!.end < scrollOffset + outerSize\n ) {\n endIndex++\n }\n\n return { startIndex, endIndex }\n}\n", "import {\n Virtualizer,\n elementScroll,\n observeElementOffset,\n observeElementRect,\n observeWindowOffset,\n observeWindowRect,\n windowScroll,\n} from '@tanstack/virtual-core'\nimport type { ReactiveController, ReactiveControllerHost } from 'lit'\nimport type { PartialKeys, VirtualizerOptions } from '@tanstack/virtual-core'\n\nclass VirtualizerControllerBase<\n TScrollElement extends Element | Window,\n TItemElement extends Element,\n> implements ReactiveController\n{\n host: ReactiveControllerHost\n\n private readonly virtualizer: Virtualizer<TScrollElement, TItemElement>\n\n private cleanup: () => void = () => {}\n\n constructor(\n host: ReactiveControllerHost,\n options: VirtualizerOptions<TScrollElement, TItemElement>,\n ) {\n ;(this.host = host).addController(this)\n\n const resolvedOptions: VirtualizerOptions<TScrollElement, TItemElement> = {\n ...options,\n onChange: (instance, sync) => {\n this.host.updateComplete.then(() => this.host.requestUpdate())\n options.onChange?.(instance, sync)\n },\n }\n this.virtualizer = new Virtualizer(resolvedOptions)\n }\n\n public getVirtualizer() {\n return this.virtualizer\n }\n\n async hostConnected() {\n this.cleanup = this.virtualizer._didMount()\n }\n\n hostUpdated() {\n this.virtualizer._willUpdate()\n }\n\n hostDisconnected() {\n this.cleanup()\n }\n}\n\nexport class VirtualizerController<\n TScrollElement extends Element,\n TItemElement extends Element,\n> extends VirtualizerControllerBase<TScrollElement, TItemElement> {\n constructor(\n host: ReactiveControllerHost,\n options: PartialKeys<\n VirtualizerOptions<TScrollElement, TItemElement>,\n 'observeElementRect' | 'observeElementOffset' | 'scrollToFn'\n >,\n ) {\n super(host, {\n observeElementRect: observeElementRect,\n observeElementOffset: observeElementOffset,\n scrollToFn: elementScroll,\n ...options,\n })\n }\n}\n\nexport class WindowVirtualizerController<\n TItemElement extends Element,\n> extends VirtualizerControllerBase<Window, TItemElement> {\n constructor(\n host: ReactiveControllerHost,\n options: PartialKeys<\n VirtualizerOptions<Window, TItemElement>,\n | 'getScrollElement'\n | 'observeElementRect'\n | 'observeElementOffset'\n | 'scrollToFn'\n >,\n ) {\n super(host, {\n getScrollElement: () => (typeof document !== 'undefined' ? window : null),\n observeElementRect: observeWindowRect,\n observeElementOffset: observeWindowOffset,\n scrollToFn: windowScroll,\n initialOffset: () =>\n typeof document !== 'undefined' ? window.scrollY : 0,\n ...options,\n })\n }\n}\n", "/**\n * @license\n * Copyright 2020 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\n\nimport {\n _$LH,\n Part,\n DirectiveParent,\n CompiledTemplateResult,\n MaybeCompiledTemplateResult,\n UncompiledTemplateResult,\n} from './lit-html.js';\nimport {\n DirectiveResult,\n DirectiveClass,\n PartInfo,\n AttributePartInfo,\n} from './directive.js';\ntype Primitive = null | undefined | boolean | number | string | symbol | bigint;\n\nconst {_ChildPart: ChildPart} = _$LH;\n\ntype ChildPart = InstanceType<typeof ChildPart>;\n\nconst ENABLE_SHADYDOM_NOPATCH = true;\n\nconst wrap =\n ENABLE_SHADYDOM_NOPATCH &&\n window.ShadyDOM?.inUse &&\n window.ShadyDOM?.noPatch === true\n ? window.ShadyDOM!.wrap\n : (node: Node) => node;\n\n/**\n * Tests if a value is a primitive value.\n *\n * See https://tc39.github.io/ecma262/#sec-typeof-operator\n */\nexport const isPrimitive = (value: unknown): value is Primitive =>\n value === null || (typeof value != 'object' && typeof value != 'function');\n\nexport const TemplateResultType = {\n HTML: 1,\n SVG: 2,\n MATHML: 3,\n} as const;\n\nexport type TemplateResultType =\n (typeof TemplateResultType)[keyof typeof TemplateResultType];\n\ntype IsTemplateResult = {\n (val: unknown): val is MaybeCompiledTemplateResult;\n <T extends TemplateResultType>(\n val: unknown,\n type: T,\n ): val is UncompiledTemplateResult<T>;\n};\n\n/**\n * Tests if a value is a TemplateResult or a CompiledTemplateResult.\n */\nexport const isTemplateResult: IsTemplateResult = (\n value: unknown,\n type?: TemplateResultType,\n): value is UncompiledTemplateResult =>\n type === undefined\n ? // This property needs to remain unminified.\n (value as UncompiledTemplateResult)?.['_$litType$'] !== undefined\n : (value as UncompiledTemplateResult)?.['_$litType$'] === type;\n\n/**\n * Tests if a value is a CompiledTemplateResult.\n */\nexport const isCompiledTemplateResult = (\n value: unknown,\n): value is CompiledTemplateResult => {\n return (value as CompiledTemplateResult)?.['_$litType$']?.h != null;\n};\n\n/**\n * Tests if a value is a DirectiveResult.\n */\nexport const isDirectiveResult = (value: unknown): value is DirectiveResult =>\n // This property needs to remain unminified.\n (value as DirectiveResult)?.['_$litDirective$'] !== undefined;\n\n/**\n * Retrieves the Directive class for a DirectiveResult\n */\nexport const getDirectiveClass = (value: unknown): DirectiveClass | undefined =>\n // This property needs to remain unminified.\n (value as DirectiveResult)?.['_$litDirective$'];\n\n/**\n * Tests whether a part has only a single-expression with no strings to\n * interpolate between.\n *\n * Only AttributePart and PropertyPart can have multiple expressions.\n * Multi-expression parts have a `strings` property and single-expression\n * parts do not.\n */\nexport const isSingleExpression = (part: PartInfo) =>\n (part as AttributePartInfo).strings === undefined;\n\nconst createMarker = () => document.createComment('');\n\n/**\n * Inserts a ChildPart into the given container ChildPart's DOM, either at the\n * end of the container ChildPart, or before the optional `refPart`.\n *\n * This does not add the part to the containerPart's committed value. That must\n * be done by callers.\n *\n * @param containerPart Part within which to add the new ChildPart\n * @param refPart Part before which to add the new ChildPart; when omitted the\n * part added to the end of the `containerPart`\n * @param part Part to insert, or undefined to create a new part\n */\nexport const insertPart = (\n containerPart: ChildPart,\n refPart?: ChildPart,\n part?: ChildPart,\n): ChildPart => {\n const container = wrap(containerPart._$startNode).parentNode!;\n\n const refNode =\n refPart === undefined ? containerPart._$endNode : refPart._$startNode;\n\n if (part === undefined) {\n const startNode = wrap(container).insertBefore(createMarker(), refNode);\n const endNode = wrap(container).insertBefore(createMarker(), refNode);\n part = new ChildPart(\n startNode,\n endNode,\n containerPart,\n containerPart.options,\n );\n } else {\n const endNode = wrap(part._$endNode!).nextSibling;\n const oldParent = part._$parent;\n const parentChanged = oldParent !== containerPart;\n if (parentChanged) {\n part._$reparentDisconnectables?.(containerPart);\n // Note that although `_$reparentDisconnectables` updates the part's\n // `_$parent` reference after unlinking from its current parent, that\n // method only exists if Disconnectables are present, so we need to\n // unconditionally set it here\n part._$parent = containerPart;\n // Since the _$isConnected getter is somewhat costly, only\n // read it once we know the subtree has directives that need\n // to be notified\n let newConnectionState;\n if (\n part._$notifyConnectionChanged !== undefined &&\n (newConnectionState = containerPart._$isConnected) !==\n oldParent!._$isConnected\n ) {\n part._$notifyConnectionChanged(newConnectionState);\n }\n }\n if (endNode !== refNode || parentChanged) {\n let start: Node | null = part._$startNode;\n while (start !== endNode) {\n const n: Node | null = wrap(start!).nextSibling;\n wrap(container).insertBefore(start!, refNode);\n start = n;\n }\n }\n }\n\n return part;\n};\n\n/**\n * Sets the value of a Part.\n *\n * Note that this should only be used to set/update the value of user-created\n * parts (i.e. those created using `insertPart`); it should not be used\n * by directives to set the value of the directive's container part. Directives\n * should return a value from `update`/`render` to update their part state.\n *\n * For directives that require setting their part value asynchronously, they\n * should extend `AsyncDirective` and call `this.setValue()`.\n *\n * @param part Part to set\n * @param value Value to set\n * @param index For `AttributePart`s, the index to set\n * @param directiveParent Used internally; should not be set by user\n */\nexport const setChildPartValue = <T extends ChildPart>(\n part: T,\n value: unknown,\n directiveParent: DirectiveParent = part,\n): T => {\n part._$setValue(value, directiveParent);\n return part;\n};\n\n// A sentinel value that can never appear as a part value except when set by\n// live(). Used to force a dirty-check to fail and cause a re-render.\nconst RESET_VALUE = {};\n\n/**\n * Sets the committed value of a ChildPart directly without triggering the\n * commit stage of the part.\n *\n * This is useful in cases where a directive needs to update the part such\n * that the next update detects a value change or not. When value is omitted,\n * the next update will be guaranteed to be detected as a change.\n *\n * @param part\n * @param value\n */\nexport const setCommittedValue = (part: Part, value: unknown = RESET_VALUE) =>\n (part._$committedValue = value);\n\n/**\n * Returns the committed value of a ChildPart.\n *\n * The committed value is used for change detection and efficient updates of\n * the part. It can differ from the value set by the template or directive in\n * cases where the template value is transformed before being committed.\n *\n * - `TemplateResult`s are committed as a `TemplateInstance`\n * - Iterables are committed as `Array<ChildPart>`\n * - All other types are committed as the template value or value returned or\n * set by a directive.\n *\n * @param part\n */\nexport const getCommittedValue = (part: ChildPart) => part._$committedValue;\n\n/**\n * Removes a ChildPart from the DOM, including any of its content.\n *\n * @param part The Part to remove\n */\nexport const removePart = (part: ChildPart) => {\n part._$notifyConnectionChanged?.(false, true);\n let start: ChildNode | null = part._$startNode;\n const end: ChildNode | null = wrap(part._$endNode!).nextSibling;\n while (start !== end) {\n const n: ChildNode | null = wrap(start!).nextSibling;\n (wrap(start!) as ChildNode).remove();\n start = n;\n }\n};\n\nexport const clearPart = (part: ChildPart) => {\n part._$clear();\n};\n", "/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\n\n/**\n * Overview:\n *\n * This module is designed to add support for an async `setValue` API and\n * `disconnected` callback to directives with the least impact on the core\n * runtime or payload when that feature is not used.\n *\n * The strategy is to introduce a `AsyncDirective` subclass of\n * `Directive` that climbs the \"parent\" tree in its constructor to note which\n * branches of lit-html's \"logical tree\" of data structures contain such\n * directives and thus need to be crawled when a subtree is being cleared (or\n * manually disconnected) in order to run the `disconnected` callback.\n *\n * The \"nodes\" of the logical tree include Parts, TemplateInstances (for when a\n * TemplateResult is committed to a value of a ChildPart), and Directives; these\n * all implement a common interface called `DisconnectableChild`. Each has a\n * `_$parent` reference which is set during construction in the core code, and a\n * `_$disconnectableChildren` field which is initially undefined.\n *\n * The sparse tree created by means of the `AsyncDirective` constructor\n * crawling up the `_$parent` tree and placing a `_$disconnectableChildren` Set\n * on each parent that includes each child that contains a\n * `AsyncDirective` directly or transitively via its children. In order to\n * notify connection state changes and disconnect (or reconnect) a tree, the\n * `_$notifyConnectionChanged` API is patched onto ChildParts as a directive\n * climbs the parent tree, which is called by the core when clearing a part if\n * it exists. When called, that method iterates over the sparse tree of\n * Set<DisconnectableChildren> built up by AsyncDirectives, and calls\n * `_$notifyDirectiveConnectionChanged` on any directives that are encountered\n * in that tree, running the required callbacks.\n *\n * A given \"logical tree\" of lit-html data-structures might look like this:\n *\n * ChildPart(N1) _$dC=[D2,T3]\n * ._directive\n * AsyncDirective(D2)\n * ._value // user value was TemplateResult\n * TemplateInstance(T3) _$dC=[A4,A6,N10,N12]\n * ._$parts[]\n * AttributePart(A4) _$dC=[D5]\n * ._directives[]\n * AsyncDirective(D5)\n * AttributePart(A6) _$dC=[D7,D8]\n * ._directives[]\n * AsyncDirective(D7)\n * Directive(D8) _$dC=[D9]\n * ._directive\n * AsyncDirective(D9)\n * ChildPart(N10) _$dC=[D11]\n * ._directive\n * AsyncDirective(D11)\n * ._value\n * string\n * ChildPart(N12) _$dC=[D13,N14,N16]\n * ._directive\n * AsyncDirective(D13)\n * ._value // user value was iterable\n * Array<ChildPart>\n * ChildPart(N14) _$dC=[D15]\n * ._value\n * string\n * ChildPart(N16) _$dC=[D17,T18]\n * ._directive\n * AsyncDirective(D17)\n * ._value // user value was TemplateResult\n * TemplateInstance(T18) _$dC=[A19,A21,N25]\n * ._$parts[]\n * AttributePart(A19) _$dC=[D20]\n * ._directives[]\n * AsyncDirective(D20)\n * AttributePart(A21) _$dC=[22,23]\n * ._directives[]\n * AsyncDirective(D22)\n * Directive(D23) _$dC=[D24]\n * ._directive\n * AsyncDirective(D24)\n * ChildPart(N25) _$dC=[D26]\n * ._directive\n * AsyncDirective(D26)\n * ._value\n * string\n *\n * Example 1: The directive in ChildPart(N12) updates and returns `nothing`. The\n * ChildPart will _clear() itself, and so we need to disconnect the \"value\" of\n * the ChildPart (but not its directive). In this case, when `_clear()` calls\n * `_$notifyConnectionChanged()`, we don't iterate all of the\n * _$disconnectableChildren, rather we do a value-specific disconnection: i.e.\n * since the _value was an Array<ChildPart> (because an iterable had been\n * committed), we iterate the array of ChildParts (N14, N16) and run\n * `setConnected` on them (which does recurse down the full tree of\n * `_$disconnectableChildren` below it, and also removes N14 and N16 from N12's\n * `_$disconnectableChildren`). Once the values have been disconnected, we then\n * check whether the ChildPart(N12)'s list of `_$disconnectableChildren` is empty\n * (and would remove it from its parent TemplateInstance(T3) if so), but since\n * it would still contain its directive D13, it stays in the disconnectable\n * tree.\n *\n * Example 2: In the course of Example 1, `setConnected` will reach\n * ChildPart(N16); in this case the entire part is being disconnected, so we\n * simply iterate all of N16's `_$disconnectableChildren` (D17,T18) and\n * recursively run `setConnected` on them. Note that we only remove children\n * from `_$disconnectableChildren` for the top-level values being disconnected\n * on a clear; doing this bookkeeping lower in the tree is wasteful since it's\n * all being thrown away.\n *\n * Example 3: If the LitElement containing the entire tree above becomes\n * disconnected, it will run `childPart.setConnected()` (which calls\n * `childPart._$notifyConnectionChanged()` if it exists); in this case, we\n * recursively run `setConnected()` over the entire tree, without removing any\n * children from `_$disconnectableChildren`, since this tree is required to\n * re-connect the tree, which does the same operation, simply passing\n * `isConnected: true` down the tree, signaling which callback to run.\n */\n\nimport {AttributePart, ChildPart, Disconnectable, Part} from './lit-html.js';\nimport {isSingleExpression} from './directive-helpers.js';\nimport {Directive, PartInfo, PartType} from './directive.js';\nexport * from './directive.js';\n\nconst DEV_MODE = true;\n\n/**\n * Recursively walks down the tree of Parts/TemplateInstances/Directives to set\n * the connected state of directives and run `disconnected`/ `reconnected`\n * callbacks.\n *\n * @return True if there were children to disconnect; false otherwise\n */\nconst notifyChildrenConnectedChanged = (\n parent: Disconnectable,\n isConnected: boolean,\n): boolean => {\n const children = parent._$disconnectableChildren;\n if (children === undefined) {\n return false;\n }\n for (const obj of children) {\n // The existence of `_$notifyDirectiveConnectionChanged` is used as a \"brand\" to\n // disambiguate AsyncDirectives from other DisconnectableChildren\n // (as opposed to using an instanceof check to know when to call it); the\n // redundancy of \"Directive\" in the API name is to avoid conflicting with\n // `_$notifyConnectionChanged`, which exists `ChildParts` which are also in\n // this list\n // Disconnect Directive (and any nested directives contained within)\n // This property needs to remain unminified.\n (obj as AsyncDirective)['_$notifyDirectiveConnectionChanged']?.(\n isConnected,\n false,\n );\n // Disconnect Part/TemplateInstance\n notifyChildrenConnectedChanged(obj, isConnected);\n }\n return true;\n};\n\n/**\n * Removes the given child from its parent list of disconnectable children, and\n * if the parent list becomes empty as a result, removes the parent from its\n * parent, and so forth up the tree when that causes subsequent parent lists to\n * become empty.\n */\nconst removeDisconnectableFromParent = (obj: Disconnectable) => {\n let parent, children;\n do {\n if ((parent = obj._$parent) === undefined) {\n break;\n }\n children = parent._$disconnectableChildren!;\n children.delete(obj);\n obj = parent;\n } while (children?.size === 0);\n};\n\nconst addDisconnectableToParent = (obj: Disconnectable) => {\n // Climb the parent tree, creating a sparse tree of children needing\n // disconnection\n for (let parent; (parent = obj._$parent); obj = parent) {\n let children = parent._$disconnectableChildren;\n if (children === undefined) {\n parent._$disconnectableChildren = children = new Set();\n } else if (children.has(obj)) {\n // Once we've reached a parent that already contains this child, we\n // can short-circuit\n break;\n }\n children.add(obj);\n installDisconnectAPI(parent);\n }\n};\n\n/**\n * Changes the parent reference of the ChildPart, and updates the sparse tree of\n * Disconnectable children accordingly.\n *\n * Note, this method will be patched onto ChildPart instances and called from\n * the core code when parts are moved between different parents.\n */\nfunction reparentDisconnectables(this: ChildPart, newParent: Disconnectable) {\n if (this._$disconnectableChildren !== undefined) {\n removeDisconnectableFromParent(this);\n this._$parent = newParent;\n addDisconnectableToParent(this);\n } else {\n this._$parent = newParent;\n }\n}\n\n/**\n * Sets the connected state on any directives contained within the committed\n * value of this part (i.e. within a TemplateInstance or iterable of\n * ChildParts) and runs their `disconnected`/`reconnected`s, as well as within\n * any directives stored on the ChildPart (when `valueOnly` is false).\n *\n * `isClearingValue` should be passed as `true` on a top-level part that is\n * clearing itself, and not as a result of recursively disconnecting directives\n * as part of a `clear` operation higher up the tree. This both ensures that any\n * directive on this ChildPart that produced a value that caused the clear\n * operation is not disconnected, and also serves as a performance optimization\n * to avoid needless bookkeeping when a subtree is going away; when clearing a\n * subtree, only the top-most part need to remove itself from the parent.\n *\n * `fromPartIndex` is passed only in the case of a partial `_clear` running as a\n * result of truncating an iterable.\n *\n * Note, this method will be patched onto ChildPart instances and called from the\n * core code when parts are cleared or the connection state is changed by the\n * user.\n */\nfunction notifyChildPartConnectedChanged(\n this: ChildPart,\n isConnected: boolean,\n isClearingValue = false,\n fromPartIndex = 0,\n) {\n const value = this._$committedValue;\n const children = this._$disconnectableChildren;\n if (children === undefined || children.size === 0) {\n return;\n }\n if (isClearingValue) {\n if (Array.isArray(value)) {\n // Iterable case: Any ChildParts created by the iterable should be\n // disconnected and removed from this ChildPart's disconnectable\n // children (starting at `fromPartIndex` in the case of truncation)\n for (let i = fromPartIndex; i < value.length; i++) {\n notifyChildrenConnectedChanged(value[i], false);\n removeDisconnectableFromParent(value[i]);\n }\n } else if (value != null) {\n // TemplateInstance case: If the value has disconnectable children (will\n // only be in the case that it is a TemplateInstance), we disconnect it\n // and remove it from this ChildPart's disconnectable children\n notifyChildrenConnectedChanged(value as Disconnectable, false);\n removeDisconnectableFromParent(value as Disconnectable);\n }\n } else {\n notifyChildrenConnectedChanged(this, isConnected);\n }\n}\n\n/**\n * Patches disconnection API onto ChildParts.\n */\nconst installDisconnectAPI = (obj: Disconnectable) => {\n if ((obj as ChildPart).type == PartType.CHILD) {\n (obj as ChildPart)._$notifyConnectionChanged ??=\n notifyChildPartConnectedChanged;\n (obj as ChildPart)._$reparentDisconnectables ??= reparentDisconnectables;\n }\n};\n\n/**\n * An abstract `Directive` base class whose `disconnected` method will be\n * called when the part containing the directive is cleared as a result of\n * re-rendering, or when the user calls `part.setConnected(false)` on\n * a part that was previously rendered containing the directive (as happens\n * when e.g. a LitElement disconnects from the DOM).\n *\n * If `part.setConnected(true)` is subsequently called on a\n * containing part, the directive's `reconnected` method will be called prior\n * to its next `update`/`render` callbacks. When implementing `disconnected`,\n * `reconnected` should also be implemented to be compatible with reconnection.\n *\n * Note that updates may occur while the directive is disconnected. As such,\n * directives should generally check the `this.isConnected` flag during\n * render/update to determine whether it is safe to subscribe to resources\n * that may prevent garbage collection.\n */\nexport abstract class AsyncDirective extends Directive {\n // As opposed to other Disconnectables, AsyncDirectives always get notified\n // when the RootPart connection changes, so the public `isConnected`\n // is a locally stored variable initialized via its part's getter and synced\n // via `_$notifyDirectiveConnectionChanged`. This is cheaper than using\n // the _$isConnected getter, which has to look back up the tree each time.\n /**\n * The connection state for this Directive.\n */\n isConnected!: boolean;\n\n // @internal\n override _$disconnectableChildren?: Set<Disconnectable> = undefined;\n /**\n * Initialize the part with internal fields\n * @param part\n * @param parent\n * @param attributeIndex\n */\n override _$initialize(\n part: Part,\n parent: Disconnectable,\n attributeIndex: number | undefined,\n ) {\n super._$initialize(part, parent, attributeIndex);\n addDisconnectableToParent(this);\n this.isConnected = part._$isConnected;\n }\n // This property needs to remain unminified.\n /**\n * Called from the core code when a directive is going away from a part (in\n * which case `shouldRemoveFromParent` should be true), and from the\n * `setChildrenConnected` helper function when recursively changing the\n * connection state of a tree (in which case `shouldRemoveFromParent` should\n * be false).\n *\n * @param isConnected\n * @param isClearingDirective - True when the directive itself is being\n * removed; false when the tree is being disconnected\n * @internal\n */\n override ['_$notifyDirectiveConnectionChanged'](\n isConnected: boolean,\n isClearingDirective = true,\n ) {\n if (isConnected !== this.isConnected) {\n this.isConnected = isConnected;\n if (isConnected) {\n this.reconnected?.();\n } else {\n this.disconnected?.();\n }\n }\n if (isClearingDirective) {\n notifyChildrenConnectedChanged(this, isConnected);\n removeDisconnectableFromParent(this);\n }\n }\n\n /**\n * Sets the value of the directive's Part outside the normal `update`/`render`\n * lifecycle of a directive.\n *\n * This method should not be called synchronously from a directive's `update`\n * or `render`.\n *\n * @param directive The directive to update\n * @param value The value to set\n */\n setValue(value: unknown) {\n if (isSingleExpression(this.__part as unknown as PartInfo)) {\n this.__part._$setValue(value, this);\n } else {\n // this.__attributeIndex will be defined in this case, but\n // assert it in dev mode\n if (DEV_MODE && this.__attributeIndex === undefined) {\n throw new Error(`Expected this.__attributeIndex to be a number`);\n }\n const newValues = [...(this.__part._$committedValue as Array<unknown>)];\n newValues[this.__attributeIndex!] = value;\n (this.__part as AttributePart)._$setValue(newValues, this, 0);\n }\n }\n\n /**\n * User callbacks for implementing logic to release any resources/subscriptions\n * that may have been retained by this directive. Since directives may also be\n * re-connected, `reconnected` should also be implemented to restore the\n * working state of the directive prior to the next render.\n */\n protected disconnected() {}\n protected reconnected() {}\n}\n", "/**\n * @license\n * Copyright 2020 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nimport {nothing, ElementPart} from '../lit-html.js';\nimport {directive, AsyncDirective} from '../async-directive.js';\n\n/**\n * Creates a new Ref object, which is container for a reference to an element.\n */\nexport const createRef = <T = Element>() => new Ref<T>();\n\n/**\n * An object that holds a ref value.\n */\nclass Ref<T = Element> {\n /**\n * The current Element value of the ref, or else `undefined` if the ref is no\n * longer rendered.\n */\n readonly value?: T;\n}\n\nexport type {Ref};\n\ninterface RefInternal {\n value: Element | undefined;\n}\n\n// When callbacks are used for refs, this map tracks the last value the callback\n// was called with, for ensuring a directive doesn't clear the ref if the ref\n// has already been rendered to a new spot. It is double-keyed on both the\n// context (`options.host`) and the callback, since we auto-bind class methods\n// to `options.host`.\nconst lastElementForContextAndCallback = new WeakMap<\n object,\n WeakMap<Function, Element | undefined>\n>();\n\nexport type RefOrCallback<T = Element> = Ref<T> | ((el: T | undefined) => void);\n\nclass RefDirective extends AsyncDirective {\n private _element?: Element;\n private _ref?: RefOrCallback;\n private _context?: object;\n\n render(_ref?: RefOrCallback) {\n return nothing;\n }\n\n override update(part: ElementPart, [ref]: Parameters<this['render']>) {\n const refChanged = ref !== this._ref;\n if (refChanged && this._ref !== undefined) {\n // The ref passed to the directive has changed;\n // unset the previous ref's value\n this._updateRefValue(undefined);\n }\n if (refChanged || this._lastElementForRef !== this._element) {\n // We either got a new ref or this is the first render;\n // store the ref/element & update the ref value\n this._ref = ref;\n this._context = part.options?.host;\n this._updateRefValue((this._element = part.element));\n }\n return nothing;\n }\n\n private _updateRefValue(element: Element | undefined) {\n if (!this.isConnected) {\n element = undefined;\n }\n if (typeof this._ref === 'function') {\n // If the current ref was called with a previous value, call with\n // `undefined`; We do this to ensure callbacks are called in a consistent\n // way regardless of whether a ref might be moving up in the tree (in\n // which case it would otherwise be called with the new value before the\n // previous one unsets it) and down in the tree (where it would be unset\n // before being set). Note that element lookup is keyed by\n // both the context and the callback, since we allow passing unbound\n // functions that are called on options.host, and we want to treat\n // these as unique \"instances\" of a function.\n const context = this._context ?? globalThis;\n let lastElementForCallback =\n lastElementForContextAndCallback.get(context);\n if (lastElementForCallback === undefined) {\n lastElementForCallback = new WeakMap();\n lastElementForContextAndCallback.set(context, lastElementForCallback);\n }\n if (lastElementForCallback.get(this._ref) !== undefined) {\n this._ref.call(this._context, undefined);\n }\n lastElementForCallback.set(this._ref, element);\n // Call the ref with the new element value\n if (element !== undefined) {\n this._ref.call(this._context, element);\n }\n } else {\n (this._ref as RefInternal)!.value = element;\n }\n }\n\n private get _lastElementForRef() {\n return typeof this._ref === 'function'\n ? lastElementForContextAndCallback\n .get(this._context ?? globalThis)\n ?.get(this._ref)\n : this._ref?.value;\n }\n\n override disconnected() {\n // Only clear the box if our element is still the one in it (i.e. another\n // directive instance hasn't rendered its element to it before us); that\n // only happens in the event of the directive being cleared (not via manual\n // disconnection)\n if (this._lastElementForRef === this._element) {\n this._updateRefValue(undefined);\n }\n }\n\n override reconnected() {\n // If we were manually disconnected, we can safely put our element back in\n // the box, since no rendering could have occurred to change its state\n this._updateRefValue(this._element);\n }\n}\n\n/**\n * Sets the value of a Ref object or calls a ref callback with the element it's\n * bound to.\n *\n * A Ref object acts as a container for a reference to an element. A ref\n * callback is a function that takes an element as its only argument.\n *\n * The ref directive sets the value of the Ref object or calls the ref callback\n * during rendering, if the referenced element changed.\n *\n * Note: If a ref callback is rendered to a different element position or is\n * removed in a subsequent render, it will first be called with `undefined`,\n * followed by another call with the new element it was rendered to (if any).\n *\n * ```js\n * // Using Ref object\n * const inputRef = createRef();\n * render(html`<input ${ref(inputRef)}>`, container);\n * inputRef.value.focus();\n *\n * // Using callback\n * const callback = (inputElement) => inputElement.focus();\n * render(html`<input ${ref(callback)}>`, container);\n * ```\n */\nexport const ref = directive(RefDirective);\n\n/**\n * The type of the class that powers this directive. Necessary for naming the\n * directive's return type.\n */\nexport type {RefDirective};\n", "import { css } from 'lit';\n\nconst styles = [\n css`\n :host::part(scroll) {\n height: 100%;\n width: 100%;\n overflow-y: auto;\n }\n :host::part(container) {\n position: relative;\n width: 100%;\n }\n `,\n];\n\nexport default styles;\n", "import utils from '../../utils/tag-name';\n\nconst TAG_NAME = utils.constructTagName('virtualizedlist');\nconst VIRTUALIZED_WRAPPER_TAG_NAME = utils.constructTagName('virtualizedwrapper');\n\nconst DEFAULTS = {\n VIRTUALIZER_PROPS: {\n count: 0,\n estimateSize: () => 0,\n },\n};\n\nexport { TAG_NAME, DEFAULTS, VIRTUALIZED_WRAPPER_TAG_NAME };\n", "import { CSSResult, PropertyValues, TemplateResult, html } from 'lit';\nimport { VirtualizerController } from '@tanstack/lit-virtual';\nimport { property } from 'lit/decorators.js';\nimport { Virtualizer, VirtualItem } from '@tanstack/virtual-core';\nimport { StyleInfo } from 'lit/directives/style-map.js';\nimport { Ref, createRef, ref } from 'lit/directives/ref.js';\nimport styles from './virtualizedlist.styles';\nimport { Component } from '../../models';\nimport { DEFAULTS } from './virtualizedlist.constants';\nimport { SetListDataProps, VirtualizerProps } from './virtualizedlist.types';\n\n/**\n * `mdc-virtualizedlist` component for creating custom virtualized lists.\n * IMPORTANT: This component does not create it's own list/list items.\n * Use the setlistdata callback prop to update client state in order to\n * Pass list/listitems as a child of this component, which this will virtuailze\n * This implementation handles dynamic lists as well as fixed sized lists.\n * Please refer to [Tanstack Virtual Docs](https://tanstack.com/virtual/latest) for more in depth documentation.\n *\n * @tagname mdc-virtualizedlist\n *\n * @event onscroll - (React: onScroll) Event that gets called when user scrolls inside of list.\n *\n * @slot - Client side List with nested list items.\n */\nclass VirtualizedList extends Component {\n /**\n * Callback that gets called when user scrolls inside of list. This gives access to the scroll container element\n * as well via the event. Particularly useful for\n * handling logic related when the user scrolls to the top or bottom of a list.\n * @default undefined\n */\n @property({ type: Function, attribute: 'onscroll' })\n override onscroll: ((this: GlobalEventHandlers, ev: Event) => void) | null;\n\n /**\n * Object that sets and updates the virtualizer with any relevant props.\n * There are two required object props in order to get virtualization to work properly.\n * count - The length of your list that you are virtualizing.\n * As your list grows/shrinks, this component must be updated with the appropriate value\n * (Same with any other updated prop).\n * estimateSize - A function that returns the estimated size of your items.\n * If your list is fixed, this will just be the size of your items.\n * If your list is dynamic, try to return approximate the size of each item.\n *\n * A full list of possible props can be in\n * [Tanstack Virtualizer API Docs](https://tanstack.com/virtual/latest/docs/api/virtualizer)\n *\n */\n @property({ type: Object, attribute: 'virtualizerprops' })\n virtualizerProps: VirtualizerProps = DEFAULTS.VIRTUALIZER_PROPS;\n\n /**\n * Callback that gets envoked when updates to the virtualizer interally occur.\n * This must be implemented in such a way that this function will trigger update to parent.\n *\n * virtualItems - Array that will be what the client displays on screen. Use this to render\n * a List of your choosing with these items nested inside as your ListItems.\n * measureElement - Ref to pass to each ListItem rendered client side.\n * Each ListItem should also be be passed key and a data-index (which can be found on the virtualItem).\n * listStyle - This should be passed as the style attribute to your List.\n */\n @property({ type: Function, attribute: 'setlistdata' })\n setlistdata: (({ virtualItems, measureElement, listStyle }: SetListDataProps) => void) | null;\n\n /**\n * @internal\n */\n private virtualizerController: VirtualizerController<Element, Element> | null;\n\n public scrollElementRef: Ref<HTMLDivElement> = createRef();\n\n public virtualizer: Virtualizer<Element, Element> | null;\n\n public virtualItems: Array<VirtualItem> = [];\n\n constructor() {\n super();\n this.virtualizerController = null;\n this.virtualizer = null;\n this.setlistdata = null;\n this.onscroll = null;\n }\n\n /**\n * This override is necessary to update the virtualizer with relevant props\n * if the client updates any props (most commonly, count). Updating the options\n * this way ensures we don't initialize a new virtualizer upon very prop change.\n */\n public override update(changedProperties: PropertyValues): void {\n super.update(changedProperties);\n\n if (changedProperties.get('virtualizerProps')) {\n this.setVirtualizerOptions();\n }\n }\n\n /**\n * This is needed in order to ensure the initial render happens\n */\n public override firstUpdated(changedProperties: PropertyValues): void {\n super.firstUpdated(changedProperties);\n this.setVirtualizerOptions();\n }\n\n /**\n * @internal\n * Update virtuailzer with the union of the two virtualizer options (current, passed in).\n */\n private setVirtualizerOptions(): void {\n this.virtualizer?.setOptions({ ...this.virtualizer.options, ...this.virtualizerProps });\n this.requestUpdate();\n }\n\n public override connectedCallback(): void {\n this.virtualizerController = new VirtualizerController(this, {\n count: this.virtualizerProps.count!,\n estimateSize: this.virtualizerProps?.estimateSize!,\n getScrollElement: () => this.scrollElementRef.value || null,\n ...this.virtualizerProps,\n });\n\n super.connectedCallback();\n }\n\n /**\n * @internal\n * Renders the list wrapper and invokes the callback which eventually will render in the slot.\n * Uses getTotalSize to update the height of the wrapper. This value is equal to the total size\n * OR the total estimated size (if you haven't physically scrolled the entire list)\n * Passes the virtualItems, measureElement, and listStyle to callback for client to pass in as child\n *\n * @returns The template result containing the list wrapper.\n */\n private getVirtualizedListWrapper(virtualizerController: VirtualizerController<Element, Element>): TemplateResult {\n this.virtualizer = virtualizerController.getVirtualizer();\n\n const { getTotalSize, getVirtualItems, measureElement } = this.virtualizer;\n\n const newVirtualItems = getVirtualItems();\n\n // Only update client if there's a difference in virtual items\n if (newVirtualItems !== this.virtualItems) {\n this.virtualItems = newVirtualItems;\n\n const virtualItems = getVirtualItems();\n // this style is required to be rendered by the client side list in order to handle scrolling properly\n const listStyle: Readonly<StyleInfo> = {\n position: 'absolute',\n top: 0,\n left: 0,\n width: '100%',\n transform: `translateY(${virtualItems[0]?.start ?? 0}px)`,\n };\n\n // pass back data to client for rendering\n if (this.setlistdata) {\n this.setlistdata({ virtualItems, measureElement, listStyle });\n }\n }\n\n return html`<div\n part=\"container\"\n style=\"height: ${getTotalSize()}px;\"\n >\n <slot></slot>\n </div>`;\n }\n\n public override render() {\n return html`<div\n ${ref(this.scrollElementRef)}\n part=\"scroll\"\n @scroll=${this.onscroll && this.onscroll}\n >\n ${this.virtualizerController ? this.getVirtualizedListWrapper(this.virtualizerController) : html``}\n </div>\n `;\n }\n\n public static override styles: Array<CSSResult> = [...Component.styles, ...styles];\n}\n\nexport default VirtualizedList;\n", "import VirtualizedList from './virtualizedlist.component';\nimport { TAG_NAME } from './virtualizedlist.constants';\n\nVirtualizedList.register(TAG_NAME);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n ['mdc-virtualizedlist']: VirtualizedList\n }\n}\n\nexport default VirtualizedList;\n"],
5
+ "mappings": "+NAMA,IAGMA,GAASC,WAKFC,GACXF,GAAOG,aACNH,GAAOI,WADDD,QAC2BH,GAAOI,SAASC,eAClD,uBAAwBC,SAASC,WACjC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CAEhE,CAEA,OAAOC;AAAA;AAAA,2BAEgBN,EAAa,CAAC;AAAA;AAAA;AAAA,eAIvC,CAEgB,QAAS,CACvB,OAAOM;AAAA,QACHC,GAAI,KAAK,gBAAgB,CAAC;AAAA;AAAA,gBAElB,KAAK,UAAY,KAAK,QAAQ;AAAA;AAAA,QAEtC,KAAK,sBAAwB,KAAK,0BAA0B,KAAK,qBAAqB,EAAID,GAAM;AAAA;AAAA,GAGtG,CAGF,EA5JMf,GA2JmB,OAA2B,CAAC,GAAGC,EAAU,OAAQ,GAAGgB,EAAM,EAnJxEC,EAAA,CADRC,EAAS,CAAE,KAAM,SAAU,UAAW,UAAW,CAAC,GAP/CnB,GAQK,wBAiBTkB,EAAA,CADCC,EAAS,CAAE,KAAM,OAAQ,UAAW,kBAAmB,CAAC,GAxBrDnB,GAyBJ,gCAaAkB,EAAA,CADCC,EAAS,CAAE,KAAM,SAAU,UAAW,aAAc,CAAC,GArClDnB,GAsCJ,2BAwHF,IAAOoB,GAAQpB,GCpLfqB,GAAgB,SAASC,EAAQ,EAQjC,IAAOC,GAAQF",
6
6
  "names": ["global", "globalThis", "supportsAdoptingStyleSheets", "ShadowRoot", "ShadyCSS", "nativeShadow", "Document", "prototype", "CSSStyleSheet", "constructionToken", "Symbol", "cssTagCache", "WeakMap", "CSSResult", "cssText", "strings", "safeToken", "this", "Error", "_strings", "styleSheet", "_styleSheet", "cacheable", "length", "get", "replaceSync", "set", "toString", "unsafeCSS", "value", "String", "css", "values", "reduce", "acc", "v", "idx", "adoptStyles", "renderRoot", "styles", "adoptedStyleSheets", "map", "s", "style", "document", "createElement", "nonce", "setAttribute", "textContent", "appendChild", "getCompatibleStyle", "sheet", "rule", "cssRules", "is", "defineProperty", "getOwnPropertyDescriptor", "getOwnPropertyNames", "getOwnPropertySymbols", "getPrototypeOf", "Object", "global", "globalThis", "trustedTypes", "emptyStringForBooleanAttribute", "emptyScript", "polyfillSupport", "reactiveElementPolyfillSupport", "JSCompiler_renameProperty", "prop", "_obj", "defaultConverter", "value", "type", "Boolean", "Array", "JSON", "stringify", "fromValue", "Number", "parse", "e", "notEqual", "old", "defaultPropertyDeclaration", "attribute", "String", "converter", "reflect", "hasChanged", "Symbol", "metadata", "litPropertyMetadata", "WeakMap", "ReactiveElement", "HTMLElement", "initializer", "this", "__prepare", "_initializers", "push", "observedAttributes", "finalize", "__attributeToPropertyMap", "keys", "name", "options", "state", "elementProperties", "set", "noAccessor", "key", "descriptor", "getPropertyDescriptor", "prototype", "get", "v", "call", "oldValue", "requestUpdate", "configurable", "enumerable", "hasOwnProperty", "superCtor", "Map", "finalized", "props", "properties", "propKeys", "p", "createProperty", "attr", "__attributeNameForProperty", "elementStyles", "finalizeStyles", "styles", "isArray", "Set", "flat", "Infinity", "reverse", "s", "unshift", "getCompatibleStyle", "toLowerCase", "constructor", "super", "__instanceProperties", "isUpdatePending", "hasUpdated", "__reflectingProperty", "__initialize", "__updatePromise", "Promise", "res", "enableUpdating", "_$changedProperties", "__saveInstanceProperties", "forEach", "i", "controller", "__controllers", "add", "renderRoot", "isConnected", "hostConnected", "delete", "instanceProperties", "size", "createRenderRoot", "shadowRoot", "attachShadow", "shadowRootOptions", "adoptStyles", "connectedCallback", "c", "_requestedUpdate", "disconnectedCallback", "hostDisconnected", "_old", "_$attributeToProperty", "attrValue", "toAttribute", "removeAttribute", "setAttribute", "ctor", "propName", "getPropertyOptions", "fromAttribute", "_$changeProperty", "__enqueueUpdate", "has", "__reflectingProperties", "reject", "result", "scheduleUpdate", "performUpdate", "wrapped", "shouldUpdate", "changedProperties", "willUpdate", "hostUpdate", "update", "__markUpdated", "_$didUpdate", "_changedProperties", "hostUpdated", "firstUpdated", "updated", "updateComplete", "getUpdateComplete", "__propertyToAttribute", "mode", "reactiveElementVersions", "global", "globalThis", "trustedTypes", "policy", "createPolicy", "createHTML", "s", "boundAttributeSuffix", "marker", "Math", "random", "toFixed", "slice", "markerMatch", "nodeMarker", "d", "document", "createMarker", "createComment", "isPrimitive", "value", "isArray", "Array", "isIterable", "Symbol", "iterator", "SPACE_CHAR", "textEndRegex", "commentEndRegex", "comment2EndRegex", "tagEndRegex", "RegExp", "singleQuoteAttrEndRegex", "doubleQuoteAttrEndRegex", "rawTextElement", "tag", "type", "strings", "values", "_$litType$", "html", "svg", "mathml", "noChange", "for", "nothing", "templateCache", "WeakMap", "walker", "createTreeWalker", "trustFromTemplateString", "tsa", "stringFromTSA", "hasOwnProperty", "Error", "getTemplateHtml", "l", "length", "attrNames", "rawTextEndRegex", "regex", "i", "attrName", "match", "attrNameEndIndex", "lastIndex", "exec", "test", "end", "startsWith", "push", "Template", "constructor", "options", "node", "this", "parts", "nodeIndex", "attrNameIndex", "partCount", "el", "createElement", "currentNode", "content", "wrapper", "firstChild", "replaceWith", "childNodes", "nextNode", "nodeType", "hasAttributes", "name", "getAttributeNames", "endsWith", "realName", "statics", "getAttribute", "split", "m", "index", "ctor", "PropertyPart", "BooleanAttributePart", "EventPart", "AttributePart", "removeAttribute", "tagName", "textContent", "emptyScript", "append", "data", "indexOf", "_options", "innerHTML", "resolveDirective", "part", "parent", "attributeIndex", "currentDirective", "__directives", "__directive", "nextDirectiveConstructor", "_$initialize", "_$resolve", "TemplateInstance", "template", "_$parts", "_$disconnectableChildren", "_$template", "_$parent", "parentNode", "_$isConnected", "fragment", "creationScope", "importNode", "partIndex", "templatePart", "ChildPart", "nextSibling", "ElementPart", "_$setValue", "__isConnected", "startNode", "endNode", "_$committedValue", "_$startNode", "_$endNode", "isConnected", "directiveParent", "_$clear", "_commitText", "_commitTemplateResult", "_commitNode", "_commitIterable", "insertBefore", "_insert", "createTextNode", "result", "_$getTemplate", "h", "_update", "instance", "_clone", "get", "set", "itemParts", "itemPart", "item", "start", "from", "_$notifyConnectionChanged", "n", "remove", "element", "fill", "String", "valueIndex", "noCommit", "change", "v", "_commitValue", "setAttribute", "toggleAttribute", "super", "newListener", "oldListener", "shouldRemoveListener", "capture", "once", "passive", "shouldAddListener", "removeEventListener", "addEventListener", "event", "call", "host", "handleEvent", "_$LH", "_boundAttributeSuffix", "_marker", "_markerMatch", "_HTML_RESULT", "_getTemplateHtml", "_TemplateInstance", "_isIterable", "_resolveDirective", "_ChildPart", "_AttributePart", "_BooleanAttributePart", "_EventPart", "_PropertyPart", "_ElementPart", "polyfillSupport", "litHtmlPolyfillSupport", "litHtmlVersions", "render", "container", "partOwnerNode", "renderBefore", "LitElement", "ReactiveElement", "constructor", "this", "renderOptions", "host", "__childPart", "createRenderRoot", "renderRoot", "super", "renderBefore", "firstChild", "changedProperties", "value", "render", "hasUpdated", "isConnected", "update", "connectedCallback", "setConnected", "disconnectedCallback", "noChange", "globalThis", "litElementHydrateSupport", "polyfillSupport", "litElementPolyfillSupport", "globalThis", "litElementVersions", "push", "defaultPropertyDeclaration", "attribute", "type", "String", "converter", "defaultConverter", "reflect", "hasChanged", "notEqual", "standardProperty", "options", "target", "context", "kind", "metadata", "properties", "globalThis", "litPropertyMetadata", "get", "set", "Map", "name", "v", "oldValue", "call", "this", "requestUpdate", "_$changeProperty", "value", "Error", "property", "protoOrTarget", "nameOrContext", "proto", "hasOwnProperty", "constructor", "createProperty", "wrapped", "Object", "getOwnPropertyDescriptor", "state", "options", "property", "attribute", "desc", "obj", "name", "descriptor", "configurable", "enumerable", "Reflect", "decorate", "Object", "defineProperty", "query", "selector", "cache", "protoOrTarget", "nameOrContext", "descriptor", "doQuery", "el", "renderRoot", "querySelector", "get", "set", "key", "Symbol", "this", "v", "desc", "result", "call", "hasUpdated", "queryAssignedElements", "options", "obj", "name", "slot", "selector", "slotSelector", "desc", "get", "slotEl", "this", "renderRoot", "querySelector", "elements", "assignedElements", "filter", "node", "matches", "ifDefined", "value", "nothing", "component_styles_default", "i", "Component", "h", "namespace", "component_styles_default", "component_component_default", "component_default", "component_component_default", "ContextRequestEvent", "Event", "context", "callback", "subscribe", "super", "bubbles", "composed", "this", "ContextConsumer", "host", "contextOrOptions", "callback", "subscribe", "this", "provided", "value", "_callback", "unsubscribe", "requestUpdate", "context", "options", "addController", "hostConnected", "dispatchRequest", "hostDisconnected", "dispatchEvent", "ContextRequestEvent", "ValueNotifier", "value", "this", "_value", "v", "setValue", "force", "update", "Object", "is", "updateObservers", "defaultValue", "subscriptions", "Map", "callback", "disposer", "consumerHost", "subscribe", "has", "set", "delete", "get", "clearCallbacks", "clear", "ContextProviderEvent", "Event", "context", "super", "bubbles", "composed", "this", "ContextProvider", "ValueNotifier", "host", "contextOrOptions", "initialValue", "onContextRequest", "ev", "consumerHost", "composedPath", "stopPropagation", "addCallback", "callback", "subscribe", "onProviderRequest", "childProviderHost", "seen", "Set", "subscriptions", "has", "add", "dispatchEvent", "ContextRequestEvent", "attachListeners", "addController", "addEventListener", "hostConnected", "styles", "i", "provider_styles_default", "Provider", "component_default", "context", "initialValue", "i", "ke", "provider_styles_default", "provider_component_default", "provider_default", "provider_component_default", "NAMESPACE", "CONSTANTS", "constants_default", "constructTagName", "componentName", "constants_default", "tag_name_default", "TAG_NAME", "tag_name_default", "AVATAR_TYPE", "MAX_COUNTER", "ICON_NAME", "AVATAR_SIZE", "DEFAULTS", "AvatarComponentMixin", "superClass", "InnerMixinClass", "DEFAULTS", "__decorateClass", "n", "IconNameMixin", "superClass", "InnerMixinClass", "__decorateClass", "n", "hostFitContentStyles", "i", "hostFocusRingStyles", "applyFocusRingOnClass", "baseHostStyleVariables", "boxShadow", "styles", "hostFitContentStyles", "i", "avatar_styles_default", "TAG_NAME", "tag_name_default", "TYPE", "SIZE", "DEFAULTS", "TAG_NAME", "tag_name_default", "TYPE", "VALID_TEXT_TAGS", "DEFAULTS", "getPresenceSize", "size", "AVATAR_SIZE", "SIZE", "getAvatarIconSize", "getAvatarTextFontSize", "TYPE", "Avatar", "AvatarComponentMixin", "IconNameMixin", "component_default", "type", "AVATAR_TYPE", "D", "ke", "getPresenceSize", "to", "name", "DEFAULTS", "getAvatarIconSize", "content", "getAvatarTextFontSize", "counter", "MAX_COUNTER", "initials", "changedProperties", "avatar_styles_default", "__decorateClass", "r", "avatar_component_default", "styles", "hostFitContentStyles", "i", "hostFocusRingStyles", "icon_styles_default", "consume", "options", "host", "context", "subscribe", "s", "providerUtils", "provider_default", "TAG_NAME", "tag_name_default", "ALLOWED_FILE_EXTENSIONS", "ALLOWED_LENGTH_UNITS", "LENGTH_UNIT_SIZE", "DEFAULTS", "IconProviderContext", "TAG_NAME", "iconprovider_context_default", "IconProvider", "provider_default", "iconprovider_context_default", "DEFAULTS", "ALLOWED_FILE_EXTENSIONS", "ALLOWED_LENGTH_UNITS", "__decorateClass", "n", "iconprovider_component_default", "registry", "inMemoryCache", "name", "request", "response", "webAPIIconsCache", "cache", "iconsCache", "cacheName", "cacheStrategy", "fetchIcon", "request", "response", "svgFetch", "url", "name", "fileExtension", "cacheStrategy", "cacheName", "renewSignal", "signal", "iconsCache", "responseFromCache", "_a", "error", "TAG_NAME", "tag_name_default", "DEFAULTS", "Icon", "component_default", "DEFAULTS", "provider_default", "iconprovider_component_default", "iconData", "iconElement", "fileExtension", "url", "cacheName", "iconSet", "cacheStrategy", "renewSignal", "svgFetch", "error", "module", "noIconProviderError", "iconHtml", "loadEvent", "errorEvent", "_a", "value", "_b", "changedProperties", "_c", "_d", "err", "ke", "icon_styles_default", "__decorateClass", "r", "n", "icon_component_default", "icon_component_default", "TAG_NAME", "icon_default", "styles", "hostFitContentStyles", "i", "presence_styles_default", "getIconValue", "type", "TYPE", "Presence", "component_default", "DEFAULTS", "SIZE", "iconName", "getIconValue", "ke", "presence_styles_default", "__decorateClass", "n", "r", "presence_component_default", "presence_component_default", "TAG_NAME", "presence_default", "fontsStyles", "i", "styles", "i", "fontsStyles", "text_styles_default", "Text", "component_default", "DEFAULTS", "VALID_TEXT_TAGS", "ke", "text_styles_default", "__decorateClass", "n", "text_component_default", "text_component_default", "TAG_NAME", "text_default", "avatar_component_default", "TAG_NAME", "avatar_default", "TAG_NAME", "tag_name_default", "BUTTON_SIZES", "BUTTON_TYPE", "DEFAULTS", "TAG_NAME", "tag_name_default", "BUTTON_VARIANTS", "PILL_BUTTON_SIZES", "ICON_BUTTON_SIZES", "BUTTON_COLORS", "BUTTON_TYPE_INTERNAL", "DEFAULTS", "BUTTON_TYPE", "DisabledMixin", "superClass", "InnerMixinClass", "__decorateClass", "n", "TabIndexMixin", "superClass", "InnerMixinClass", "__decorateClass", "n", "styles", "hostFitContentStyles", "i", "hostFocusRingStyles", "buttonsimple_styles_default", "Buttonsimple", "TabIndexMixin", "DisabledMixin", "component_default", "DEFAULTS", "changedProperties", "BUTTON_TYPE", "element", "active", "softDisabled", "disabled", "clickEvent", "event", "ke", "buttonsimple_styles_default", "__decorateClass", "n", "buttonsimple_component_default", "styles", "hostFitContentStyles", "i", "hostFocusRingStyles", "avatarbutton_styles_default", "AvatarButton", "AvatarComponentMixin", "IconNameMixin", "buttonsimple_component_default", "DEFAULTS", "changedProperties", "size", "AVATAR_SIZE", "ke", "to", "avatarbutton_styles_default", "__decorateClass", "n", "avatarbutton_component_default", "TAG_NAME", "tag_name_default", "avatarbutton_component_default", "TAG_NAME", "avatarbutton_default", "PartType", "ATTRIBUTE", "CHILD", "PROPERTY", "BOOLEAN_ATTRIBUTE", "EVENT", "ELEMENT", "directive", "c", "values", "_$litDirective$", "Directive", "_partInfo", "_$isConnected", "this", "_$parent", "part", "parent", "attributeIndex", "__part", "__attributeIndex", "props", "update", "_part", "render", "classMap", "directive", "Directive", "partInfo", "super", "type", "PartType", "ATTRIBUTE", "name", "strings", "length", "Error", "classInfo", "Object", "keys", "filter", "key", "join", "part", "this", "_previousClasses", "Set", "_staticClasses", "split", "s", "has", "add", "render", "classList", "element", "remove", "delete", "value", "noChange", "TAG_NAME", "tag_name_default", "TYPE", "ICON_NAMES_LIST", "ICON_VARIANT", "ICON_STATE", "BACKGROUND_STYLES", "DEFAULTS", "styles", "hostFitContentStyles", "i", "badge_styles_default", "Badge", "IconNameMixin", "component_default", "DEFAULTS", "maxCounter", "counter", "iconName", "backgroundClassPostfix", "ke", "Rt", "to", "TYPE", "VALID_TEXT_TAGS", "ICON_VARIANT", "type", "variant", "ICON_NAMES_LIST", "ICON_STATE", "changedProperties", "badge_styles_default", "__decorateClass", "n", "badge_component_default", "badge_component_default", "TAG_NAME", "badge_default", "styles", "i", "bullet_styles_default", "TAG_NAME", "tag_name_default", "SIZE", "Bullet", "component_default", "SIZE", "bullet_styles_default", "__decorateClass", "n", "bullet_component_default", "bullet_component_default", "TAG_NAME", "bullet_default", "styles", "i", "button_styles_default", "getIconSize", "size", "ICON_BUTTON_SIZES", "getIconNameWithoutStyle", "iconName", "iconParts", "variants", "part", "Button", "buttonsimple_component_default", "DEFAULTS", "changedProperties", "active", "getIconNameWithoutStyle", "variant", "BUTTON_VARIANTS", "size", "isValidSize", "BUTTON_TYPE_INTERNAL", "ICON_BUTTON_SIZES", "PILL_BUTTON_SIZES", "getIconSize", "color", "BUTTON_COLORS", "_a", "_b", "slot", "node", "ke", "button_styles_default", "__decorateClass", "n", "r", "button_component_default", "button_component_default", "TAG_NAME", "button_default", "DataAriaLabelMixin", "superClass", "InnerMixinClass", "__decorateClass", "n", "byteToHex", "i", "unsafeStringify", "arr", "offset", "getRandomValues", "rnds8", "rng", "randomUUID", "native_default", "v4", "options", "buf", "offset", "_a", "_b", "_c", "native_default", "rnds", "rng", "i", "unsafeStringify", "v4_default", "FormInternalsMixin", "superClass", "InnerMixinClass", "args", "v4_default", "__decorateClass", "n", "e", "TAG_NAME", "tag_name_default", "VALIDATION", "DEFAULTS", "MDC_TEXT_OPTIONS", "VALID_TEXT_TAGS", "TYPE", "styles", "hostFitContentStyles", "i", "formfieldwrapper_styles_default", "getHelperIcon", "type", "VALIDATION", "FormfieldWrapper", "DisabledMixin", "component_default", "DEFAULTS", "ke", "MDC_TEXT_OPTIONS", "D", "helperIcon", "getHelperIcon", "formfieldwrapper_styles_default", "__decorateClass", "n", "formfieldwrapper_component_default", "TAG_NAME", "tag_name_default", "ICON_NAME", "styles", "i", "hostFocusRingStyles", "checkbox_styles_default", "Checkbox", "FormInternalsMixin", "DataAriaLabelMixin", "formfieldwrapper_component_default", "ke", "D", "actualValue", "state", "event", "_a", "EventConstructor", "changedProperties", "checkboxIconContent", "ICON_NAME", "to", "DEFAULTS", "checkbox_styles_default", "__decorateClass", "n", "checkbox_component_default", "checkbox_component_default", "TAG_NAME", "checkbox_default", "TAG_NAME", "tag_name_default", "DIVIDER_ORIENTATION", "DIVIDER_VARIANT", "DIRECTIONS", "ARROW_ICONS", "DEFAULTS", "styles", "hostFitContentStyles", "i", "divider_styles_default", "Divider", "component_default", "DEFAULTS", "variant", "DIVIDER_VARIANT", "orientation", "DIVIDER_ORIENTATION", "defaultDirection", "DIRECTIONS", "buttonElement", "iconType", "isHorizontal", "isPositive", "ARROW_ICONS", "changedProperties", "_a", "slot", "assignedElements", "hasTextChild", "el", "TAG_NAME", "hasButtonChild", "ke", "divider_styles_default", "__decorateClass", "n", "divider_component_default", "divider_component_default", "TAG_NAME", "divider_default", "TAG_NAME", "tag_name_default", "ROLE", "styles", "i", "formfieldgroup_styles_default", "FormfieldGroup", "DataAriaLabelMixin", "formfieldwrapper_component_default", "_a", "ke", "ROLE", "DEFAULTS", "to", "formfieldgroup_styles_default", "formfieldgroup_component_default", "formfieldgroup_component_default", "TAG_NAME", "formfieldgroup_default", "iconprovider_component_default", "TAG_NAME", "iconprovider_default", "styles", "i", "hostFocusRingStyles", "input_styles_default", "formfieldwrapper_component_default", "TAG_NAME", "formfieldwrapper_default", "TAG_NAME", "tag_name_default", "AUTO_CAPITALIZE", "PREFIX_TEXT_OPTIONS", "VALIDATION", "DEFAULTS", "BUTTON_VARIANTS", "ICON_BUTTON_SIZES", "TYPE", "VALID_TEXT_TAGS", "Input", "FormInternalsMixin", "DataAriaLabelMixin", "formfieldwrapper_default", "AUTO_CAPITALIZE", "error", "state", "changedProperties", "name", "old", "value", "event", "EventConstructor", "_a", "ke", "DEFAULTS", "D", "PREFIX_TEXT_OPTIONS", "to", "input_styles_default", "__decorateClass", "n", "input_component_default", "input_component_default", "TAG_NAME", "input_default", "TAG_NAME", "tag_name_default", "LINK_SIZES", "LINK_ICON_SIZES", "DEFAULTS", "styles", "hostFitContentStyles", "i", "hostFocusRingStyles", "link_styles_default", "Link", "DisabledMixin", "IconNameMixin", "component_default", "DEFAULTS", "LINK_SIZES", "LINK_ICON_SIZES", "disabled", "_a", "_b", "anchorElement", "element", "iconSize", "trailingIcon", "changedProperties", "ke", "link_styles_default", "__decorateClass", "n", "link_component_default", "link_component_default", "TAG_NAME", "link_default", "TAG_NAME", "tag_name_default", "LISTITEM_VARIANTS", "DEFAULTS", "TAG_NAME", "tag_name_default", "KEYS", "HEADER_ID", "styles", "i", "list_styles_default", "List", "DataAriaLabelMixin", "component_default", "event", "_a", "currentIndex", "newIndex", "target", "node", "key", "wrappedDivsCount", "KEYS", "index", "newTabindex", "headerText", "ke", "HEADER_ID", "TYPE", "VALID_TEXT_TAGS", "D", "list_styles_default", "__decorateClass", "o", "TAG_NAME", "n", "list_component_default", "list_component_default", "TAG_NAME", "list_default", "styles", "i", "listitem_styles_default", "hostFocusRingStyles", "ListItem", "DataAriaLabelMixin", "DisabledMixin", "TabIndexMixin", "component_default", "DEFAULTS", "slotName", "type", "content", "ke", "VALID_TEXT_TAGS", "D", "disabled", "element", "changedProperties", "TYPE", "listitem_styles_default", "__decorateClass", "o", "n", "listitem_component_default", "listitem_component_default", "TAG_NAME", "listitem_default", "styles", "i", "marker_styles_default", "TAG_NAME", "tag_name_default", "MARKER_VARIANTS", "Marker", "component_default", "MARKER_VARIANTS", "marker_styles_default", "__decorateClass", "n", "marker_component_default", "marker_component_default", "TAG_NAME", "marker_default", "min", "max", "round", "floor", "createCoords", "v", "oppositeSideMap", "oppositeAlignmentMap", "clamp", "start", "value", "end", "evaluate", "param", "getSide", "placement", "getAlignment", "getOppositeAxis", "axis", "getAxisLength", "getSideAxis", "getAlignmentAxis", "getAlignmentSides", "rects", "rtl", "alignment", "alignmentAxis", "length", "mainAlignmentSide", "getOppositePlacement", "getExpandedPlacements", "oppositePlacement", "getOppositeAlignmentPlacement", "getSideList", "side", "isStart", "lr", "rl", "tb", "bt", "getOppositeAxisPlacements", "flipAlignment", "direction", "list", "expandPaddingObject", "padding", "getPaddingObject", "rectToClientRect", "rect", "x", "y", "width", "height", "computeCoordsFromPlacement", "_ref", "placement", "rtl", "reference", "floating", "sideAxis", "getSideAxis", "alignmentAxis", "getAlignmentAxis", "alignLength", "getAxisLength", "side", "getSide", "isVertical", "commonX", "commonY", "commonAlign", "coords", "getAlignment", "computePosition", "config", "strategy", "middleware", "platform", "validMiddleware", "rects", "x", "y", "statefulPlacement", "middlewareData", "resetCount", "i", "name", "fn", "nextX", "nextY", "data", "reset", "detectOverflow", "state", "options", "_await$platform$isEle", "elements", "boundary", "rootBoundary", "elementContext", "altBoundary", "padding", "evaluate", "paddingObject", "getPaddingObject", "element", "clippingClientRect", "rectToClientRect", "rect", "offsetParent", "offsetScale", "elementClientRect", "arrow", "axis", "length", "arrowDimensions", "isYAxis", "minProp", "maxProp", "clientProp", "endDiff", "startDiff", "arrowOffsetParent", "clientSize", "centerToReference", "largestPossiblePadding", "minPadding", "min", "maxPadding", "min$1", "max", "center", "offset", "clamp", "shouldAddOffset", "alignmentOffset", "flip", "options", "state", "_middlewareData$arrow", "_middlewareData$flip", "placement", "middlewareData", "rects", "initialPlacement", "platform", "elements", "checkMainAxis", "checkCrossAxis", "specifiedFallbackPlacements", "fallbackStrategy", "fallbackAxisSideDirection", "flipAlignment", "detectOverflowOptions", "evaluate", "side", "getSide", "initialSideAxis", "getSideAxis", "isBasePlacement", "rtl", "fallbackPlacements", "getOppositePlacement", "getExpandedPlacements", "hasFallbackAxisSideDirection", "getOppositeAxisPlacements", "placements", "overflow", "detectOverflow", "overflows", "overflowsData", "sides", "getAlignmentSides", "_middlewareData$flip2", "_overflowsData$filter", "nextIndex", "nextPlacement", "resetPlacement", "d", "a", "b", "_overflowsData$filter2", "currentSideAxis", "acc", "convertValueToCoords", "state", "options", "placement", "platform", "elements", "rtl", "side", "getSide", "alignment", "getAlignment", "isVertical", "getSideAxis", "mainAxisMulti", "crossAxisMulti", "rawValue", "evaluate", "mainAxis", "crossAxis", "alignmentAxis", "offset", "_middlewareData$offse", "_middlewareData$arrow", "x", "y", "middlewareData", "diffCoords", "shift", "checkMainAxis", "checkCrossAxis", "limiter", "_ref", "detectOverflowOptions", "coords", "overflow", "detectOverflow", "getOppositeAxis", "mainAxisCoord", "crossAxisCoord", "minSide", "maxSide", "min", "max", "clamp", "limitedCoords", "size", "options", "state", "_state$middlewareData", "_state$middlewareData2", "placement", "rects", "platform", "elements", "apply", "detectOverflowOptions", "evaluate", "overflow", "detectOverflow", "side", "getSide", "alignment", "getAlignment", "isYAxis", "getSideAxis", "width", "height", "heightSide", "widthSide", "maximumClippingHeight", "maximumClippingWidth", "overflowAvailableHeight", "min", "overflowAvailableWidth", "noShift", "availableHeight", "availableWidth", "xMin", "max", "xMax", "yMin", "yMax", "nextDimensions", "hasWindow", "getNodeName", "node", "isNode", "getWindow", "_node$ownerDocument", "getDocumentElement", "_ref", "value", "isElement", "isHTMLElement", "isShadowRoot", "isOverflowElement", "element", "overflow", "overflowX", "overflowY", "display", "getComputedStyle", "isTableElement", "isTopLayer", "selector", "isContainingBlock", "elementOrCss", "webkit", "isWebKit", "css", "getContainingBlock", "currentNode", "getParentNode", "isLastTraversableNode", "getNodeScroll", "result", "getNearestOverflowAncestor", "parentNode", "getOverflowAncestors", "list", "traverseIframes", "_node$ownerDocument2", "scrollableAncestor", "isBody", "win", "frameElement", "getFrameElement", "getCssDimensions", "element", "css", "getComputedStyle", "width", "height", "hasOffset", "isHTMLElement", "offsetWidth", "offsetHeight", "shouldFallback", "round", "unwrapElement", "isElement", "getScale", "domElement", "createCoords", "rect", "$", "x", "y", "noOffsets", "getVisualOffsets", "win", "getWindow", "isWebKit", "shouldAddVisualOffsets", "isFixed", "floatingOffsetParent", "getBoundingClientRect", "includeScale", "isFixedStrategy", "offsetParent", "clientRect", "scale", "visualOffsets", "offsetWin", "currentWin", "currentIFrame", "getFrameElement", "iframeScale", "iframeRect", "left", "top", "rectToClientRect", "getWindowScrollBarX", "leftScroll", "getNodeScroll", "getDocumentElement", "getHTMLOffset", "documentElement", "scroll", "ignoreScrollbarX", "htmlRect", "convertOffsetParentRelativeRectToViewportRelativeRect", "_ref", "elements", "strategy", "topLayer", "isTopLayer", "offsets", "isOffsetParentAnElement", "getNodeName", "isOverflowElement", "offsetRect", "htmlOffset", "getClientRects", "getDocumentRect", "html", "body", "max", "getViewportRect", "visualViewport", "visualViewportBased", "getInnerBoundingClientRect", "getClientRectFromClippingAncestor", "clippingAncestor", "hasFixedPositionAncestor", "stopNode", "parentNode", "getParentNode", "isLastTraversableNode", "getClippingElementAncestors", "cache", "cachedResult", "result", "getOverflowAncestors", "el", "currentContainingBlockComputedStyle", "elementIsFixed", "currentNode", "computedStyle", "currentNodeIsContaining", "isContainingBlock", "ancestor", "getClippingRect", "boundary", "rootBoundary", "clippingAncestors", "firstClippingAncestor", "clippingRect", "accRect", "min", "getDimensions", "getRectRelativeToOffsetParent", "isStaticPositioned", "getTrueOffsetParent", "polyfill", "rawOffsetParent", "getOffsetParent", "svgOffsetParent", "isTableElement", "getContainingBlock", "getElementRects", "data", "getOffsetParentFn", "getDimensionsFn", "floatingDimensions", "isRTL", "platform", "observeMove", "onMove", "io", "timeoutId", "root", "cleanup", "_io", "refresh", "skip", "threshold", "insetTop", "floor", "insetRight", "insetBottom", "insetLeft", "options", "isFirstUpdate", "handleObserve", "entries", "ratio", "autoUpdate", "reference", "floating", "update", "ancestorScroll", "ancestorResize", "elementResize", "layoutShift", "animationFrame", "referenceEl", "ancestors", "cleanupIo", "reobserveFrame", "resizeObserver", "firstEntry", "_resizeObserver", "frameId", "prevRefRect", "frameLoop", "nextRefRect", "_resizeObserver2", "offset", "shift", "flip", "size", "arrow", "computePosition", "reference", "floating", "options", "cache", "mergedOptions", "platform", "platformWithCache", "styles", "i", "popover_styles_default", "TAG_NAME", "tag_name_default", "COLOR", "ELEVATION", "DEFAULTS", "TAG_NAME", "tag_name_default", "POPOVER_PLACEMENT", "TRIGGER", "DEFAULTS", "COLOR", "FocusTrapMixin", "superClass", "FocusTrap", "args", "DEFAULTS", "element", "width", "height", "offsetWidth", "offsetHeight", "display", "opacity", "visibility", "computedStyle", "root", "matches", "child", "node", "prefferableElement", "currentIndex", "step", "length", "wrapFocus", "nextIndex", "_a", "host", "activeElement", "direction", "activeIndex", "nextElement", "event", "__decorateClass", "n", "PopoverStack", "popover", "item", "popoverStack", "DataAriaDescribedbyMixin", "superClass", "InnerMixinClass", "__decorateClass", "n", "DataAriaLabelledbyMixin", "superClass", "InnerMixinClass", "__decorateClass", "n", "PopoverEventManager", "eventName", "instance", "PopoverUtils", "popover", "openDelay", "closeDelay", "delay", "parsed", "placement", "_a", "hoverBridge", "bridgeSize", "modalContainer", "popoverHeight", "popoverWidth", "appendToElement", "_b", "_c", "arrowData", "side", "staticSide", "arrowX", "arrowY", "rect", "parent", "pixelDiff", "arrowPixelDiff", "x", "y", "Popover", "DataAriaLabelMixin", "DataAriaLabelledbyMixin", "DataAriaDescribedbyMixin", "FocusTrapMixin", "component_default", "DEFAULTS", "event", "popoverStack", "insidePopoverClick", "path", "backdropElement", "clickedOnBackdrop", "PopoverEventManager", "PopoverUtils", "changedProperties", "_a", "_b", "hoverBridge", "oldValue", "POPOVER_PLACEMENT", "validTriggers", "trigger", "TRIGGER", "COLOR", "newValue", "_c", "_d", "popoverBackdrop", "middleware", "shift", "popoverOffset", "flip", "popoverContent", "size", "availableHeight", "arrowLen", "arrow", "offset", "autoUpdate", "x", "y", "middlewareData", "placement", "computePosition", "ke", "D", "to", "popover_styles_default", "__decorateClass", "n", "popover_component_default", "styles", "hostFitContentStyles", "i", "modalcontainer_styles_default", "Modalcontainer", "DataAriaLabelMixin", "DataAriaLabelledbyMixin", "DataAriaDescribedbyMixin", "component_default", "DEFAULTS", "ke", "to", "modalcontainer_styles_default", "__decorateClass", "n", "modalcontainer_component_default", "modalcontainer_component_default", "TAG_NAME", "popover_component_default", "TAG_NAME", "popover_default", "styles", "hostFitContentStyles", "i", "hostFocusRingStyles", "radio_styles_default", "Radio", "FormInternalsMixin", "DataAriaLabelMixin", "formfieldwrapper_component_default", "ke", "D", "event", "EventConstructor", "radio", "error", "state", "isValid", "radios", "actualValue", "anyRequired", "r", "anyChecked", "isInvalid", "_a", "radioElement", "inputElement", "enabledRadios", "index", "_b", "currentIndex", "nextIndex", "prevIndex", "checked", "firstEnabledRadio", "changedProperties", "to", "DEFAULTS", "radio_styles_default", "__decorateClass", "n", "radio_component_default", "TAG_NAME", "tag_name_default", "radio_component_default", "TAG_NAME", "radio_default", "RadioGroup", "formfieldgroup_default", "_a", "_b", "_c", "_d", "_e", "slot", "el", "TAG_NAME", "radio", "__decorateClass", "n", "radiogroup_component_default", "TAG_NAME", "tag_name_default", "radiogroup_component_default", "TAG_NAME", "radiogroup_default", "styles", "hostFitContentStyles", "i", "spinner_styles_default", "TAG_NAME", "tag_name_default", "SPINNER_SIZES", "SPINNER_VARIANT", "DEFAULTS", "Spinner", "component_default", "DEFAULTS", "changedProperties", "ke", "spinner_styles_default", "__decorateClass", "n", "spinner_component_default", "spinner_component_default", "TAG_NAME", "spinner_default", "styles", "hostFitContentStyles", "i", "hostFocusRingStyles", "tab_styles_default", "TAG_NAME", "tag_name_default", "TAB_VARIANTS", "DEFAULTS", "Tab", "IconNameMixin", "buttonsimple_component_default", "DEFAULTS", "active", "getIconNameWithoutStyle", "variant", "TAB_VARIANTS", "element", "changedProperties", "ke", "D", "TYPE", "VALID_TEXT_TAGS", "tab_styles_default", "__decorateClass", "n", "tab_component_default", "tab_component_default", "TAG_NAME", "tab_default", "TAG_NAME", "tag_name_default", "DEFAULTS", "ThemeProviderContext", "defaultThemeClass", "TAG_NAME", "themeprovider_context_default", "styles", "i", "themeprovider_styles_default", "ThemeProvider", "provider_default", "themeprovider_context_default", "DEFAULTS", "changedProperties", "themeprovider_styles_default", "__decorateClass", "r", "n", "themeprovider_component_default", "themeprovider_component_default", "TAG_NAME", "themeprovider_default", "styles", "hostFitContentStyles", "i", "hostFocusRingStyles", "toggle_styles_default", "TAG_NAME", "tag_name_default", "TOGGLE_SIZE", "ICON_NAME", "ICON_SIZE_IN_REM", "DEFAULTS", "Toggle", "FormInternalsMixin", "DataAriaLabelMixin", "formfieldwrapper_default", "DEFAULTS", "state", "actualValue", "event", "_a", "EventConstructor", "size", "TOGGLE_SIZE", "changedProperties", "ke", "to", "ICON_NAME", "ICON_SIZE_IN_REM", "toggle_styles_default", "__decorateClass", "n", "toggle_component_default", "toggle_component_default", "TAG_NAME", "toggle_default", "memo", "getDeps", "fn", "opts", "_a", "deps", "result", "_b", "_c", "_d", "depTime", "newDeps", "dep", "index", "resultTime", "depEndTime", "resultEndTime", "resultFpsPercentage", "pad", "str", "num", "notUndefined", "value", "msg", "approxEqual", "a", "b", "debounce", "targetWindow", "ms", "timeoutId", "args", "defaultKeyExtractor", "index", "defaultRangeExtractor", "range", "start", "end", "arr", "observeElementRect", "instance", "cb", "element", "targetWindow", "handler", "rect", "width", "height", "observer", "entries", "entry", "box", "addEventListenerOptions", "supportsScrollend", "observeElementOffset", "instance", "cb", "element", "targetWindow", "offset", "fallback", "debounce", "createHandler", "isScrolling", "horizontal", "isRtl", "handler", "endHandler", "addEventListenerOptions", "measureElement", "element", "entry", "instance", "box", "elementScroll", "offset", "adjustments", "behavior", "instance", "toOffset", "_b", "_a", "Virtualizer", "opts", "_ro", "get", "entries", "entry", "target", "key", "value", "defaultKeyExtractor", "defaultRangeExtractor", "measureElement", "sync", "memo", "isScrolling", "d", "scrollElement", "cached", "rect", "measurements", "index", "furthestMeasurementsFound", "furthestMeasurements", "m", "measurement", "previousFurthestMeasurement", "a", "b", "count", "paddingStart", "scrollMargin", "getItemKey", "enabled", "itemSizeCache", "item", "min", "i", "furthestMeasurement", "start", "measuredSize", "size", "end", "lane", "outerSize", "scrollOffset", "calculateRange", "startIndex", "endIndex", "range", "rangeExtractor", "overscan", "node", "attributeName", "indexStr", "prevNode", "itemSize", "delta", "indexes", "virtualItems", "k", "len", "notUndefined", "findNearestBinarySearch", "align", "scrollSizeProp", "maxOffset", "centerOffset", "initialAlign", "offsetAndAlign", "latestOffset", "approxEqual", "low", "high", "getCurrentValue", "middle", "currentValue", "VirtualizerControllerBase", "host", "options", "resolvedOptions", "instance", "sync", "_a", "Virtualizer", "VirtualizerController", "observeElementRect", "observeElementOffset", "elementScroll", "_ChildPart", "ChildPart", "_$LH", "isSingleExpression", "part", "strings", "notifyChildrenConnectedChanged", "parent", "isConnected", "children", "_$disconnectableChildren", "obj", "removeDisconnectableFromParent", "_$parent", "delete", "size", "addDisconnectableToParent", "Set", "has", "add", "installDisconnectAPI", "reparentDisconnectables", "newParent", "this", "notifyChildPartConnectedChanged", "isClearingValue", "fromPartIndex", "value", "_$committedValue", "Array", "isArray", "i", "length", "type", "PartType", "CHILD", "_$notifyConnectionChanged", "_$reparentDisconnectables", "AsyncDirective", "Directive", "constructor", "part", "attributeIndex", "super", "_$initialize", "_$isConnected", "isClearingDirective", "reconnected", "disconnected", "isSingleExpression", "__part", "_$setValue", "newValues", "__attributeIndex", "createRef", "Ref", "lastElementForContextAndCallback", "WeakMap", "ref", "directive", "AsyncDirective", "_ref", "nothing", "part", "refChanged", "this", "_updateRefValue", "undefined", "_lastElementForRef", "_element", "_context", "options", "host", "element", "isConnected", "context", "globalThis", "lastElementForCallback", "get", "set", "call", "value", "disconnected", "reconnected", "styles", "i", "virtualizedlist_styles_default", "TAG_NAME", "tag_name_default", "VIRTUALIZED_WRAPPER_TAG_NAME", "DEFAULTS", "VirtualizedList", "component_default", "DEFAULTS", "ii", "changedProperties", "_a", "VirtualizerController", "virtualizerController", "_b", "getTotalSize", "getVirtualItems", "measureElement", "newVirtualItems", "virtualItems", "listStyle", "ke", "Kt", "virtualizedlist_styles_default", "__decorateClass", "n", "virtualizedlist_component_default", "virtualizedlist_component_default", "TAG_NAME", "virtualizedlist_default"]
7
7
  }