@govtechsg/sgds-web-component 3.6.0 → 3.6.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/base/dropdown-element.d.ts +1 -1
- package/base/dropdown-element.js +3 -3
- package/base/dropdown-element.js.map +1 -1
- package/components/Breadcrumb/index.umd.min.js +7 -7
- package/components/Breadcrumb/index.umd.min.js.map +1 -1
- package/components/Checkbox/checkbox.js +1 -1
- package/components/Checkbox/index.umd.min.js +6 -6
- package/components/Checkbox/index.umd.min.js.map +1 -1
- package/components/Checkbox/sgds-checkbox.js +1 -1
- package/components/Checkbox/sgds-checkbox.js.map +1 -1
- package/components/ComboBox/index.umd.min.js +274 -260
- package/components/ComboBox/index.umd.min.js.map +1 -1
- package/components/ComboBox/sgds-combo-box-option.d.ts +0 -3
- package/components/ComboBox/sgds-combo-box-option.js +2 -20
- package/components/ComboBox/sgds-combo-box-option.js.map +1 -1
- package/components/ComboBox/sgds-combo-box.d.ts +4 -0
- package/components/ComboBox/sgds-combo-box.js +79 -24
- package/components/ComboBox/sgds-combo-box.js.map +1 -1
- package/components/Datepicker/index.umd.min.js +2 -2
- package/components/Datepicker/index.umd.min.js.map +1 -1
- package/components/Dropdown/index.umd.min.js +1 -1
- package/components/Dropdown/index.umd.min.js.map +1 -1
- package/components/Footer/index.umd.min.js +1 -1
- package/components/Footer/index.umd.min.js.map +1 -1
- package/components/Input/index.umd.min.js +1 -1
- package/components/Input/index.umd.min.js.map +1 -1
- package/components/Link/index.umd.min.js +9 -9
- package/components/Link/index.umd.min.js.map +1 -1
- package/components/Link/link.js +1 -1
- package/components/Mainnav/index.umd.min.js +1 -1
- package/components/Mainnav/index.umd.min.js.map +1 -1
- package/components/OverflowMenu/index.umd.min.js +1 -1
- package/components/OverflowMenu/index.umd.min.js.map +1 -1
- package/components/QuantityToggle/index.umd.min.js +1 -1
- package/components/QuantityToggle/index.umd.min.js.map +1 -1
- package/components/Radio/index.umd.min.js +6 -6
- package/components/Radio/index.umd.min.js.map +1 -1
- package/components/Radio/radio.js +1 -1
- package/components/Select/index.umd.min.js +1 -1
- package/components/Select/index.umd.min.js.map +1 -1
- package/components/Switch/index.umd.min.js +1 -1
- package/components/Switch/index.umd.min.js.map +1 -1
- package/components/Switch/switch.js +1 -1
- package/components/SystemBanner/index.umd.min.js +5 -1
- package/components/SystemBanner/index.umd.min.js.map +1 -1
- package/components/SystemBanner/sgds-system-banner.js +5 -1
- package/components/SystemBanner/sgds-system-banner.js.map +1 -1
- package/components/Textarea/index.umd.min.js +1 -1
- package/components/Textarea/index.umd.min.js.map +1 -1
- package/components/index.umd.min.js +33 -14
- package/components/index.umd.min.js.map +1 -1
- package/index.umd.min.js +33 -14
- package/index.umd.min.js.map +1 -1
- package/package.json +1 -1
- package/react/base/dropdown-element.cjs.js +3 -3
- package/react/base/dropdown-element.cjs.js.map +1 -1
- package/react/base/dropdown-element.js +3 -3
- package/react/base/dropdown-element.js.map +1 -1
- package/react/components/Checkbox/checkbox.cjs.js +1 -1
- package/react/components/Checkbox/checkbox.js +1 -1
- package/react/components/Checkbox/sgds-checkbox.cjs.js +1 -1
- package/react/components/Checkbox/sgds-checkbox.cjs.js.map +1 -1
- package/react/components/Checkbox/sgds-checkbox.js +1 -1
- package/react/components/Checkbox/sgds-checkbox.js.map +1 -1
- package/react/components/ComboBox/sgds-combo-box-option.cjs.js +2 -20
- package/react/components/ComboBox/sgds-combo-box-option.cjs.js.map +1 -1
- package/react/components/ComboBox/sgds-combo-box-option.js +2 -20
- package/react/components/ComboBox/sgds-combo-box-option.js.map +1 -1
- package/react/components/ComboBox/sgds-combo-box.cjs.js +79 -24
- package/react/components/ComboBox/sgds-combo-box.cjs.js.map +1 -1
- package/react/components/ComboBox/sgds-combo-box.js +79 -24
- package/react/components/ComboBox/sgds-combo-box.js.map +1 -1
- package/react/components/Link/link.cjs.js +1 -1
- package/react/components/Link/link.js +1 -1
- package/react/components/Radio/radio.cjs.js +1 -1
- package/react/components/Radio/radio.js +1 -1
- package/react/components/Switch/switch.cjs.js +1 -1
- package/react/components/Switch/switch.js +1 -1
- package/react/components/SystemBanner/sgds-system-banner.cjs.js +5 -1
- package/react/components/SystemBanner/sgds-system-banner.cjs.js.map +1 -1
- package/react/components/SystemBanner/sgds-system-banner.js +5 -1
- package/react/components/SystemBanner/sgds-system-banner.js.map +1 -1
- package/react/styles/form-check.cjs.js +1 -1
- package/react/styles/form-check.js +1 -1
- package/react/styles/form-text-control.cjs.js +1 -1
- package/react/styles/form-text-control.js +1 -1
- package/styles/form-check.js +1 -1
- package/styles/form-text-control.js +1 -1
|
@@ -42,7 +42,7 @@ export declare class DropdownElement extends SgdsElement {
|
|
|
42
42
|
/** When invoked, opens the dropdown menu */
|
|
43
43
|
showMenu(): Promise<void>;
|
|
44
44
|
/** When invoked, hides the dropdown menu */
|
|
45
|
-
hideMenu(): Promise<void>;
|
|
45
|
+
hideMenu(isOutside?: boolean): Promise<void>;
|
|
46
46
|
toggleMenu(): void;
|
|
47
47
|
protected _handleKeyboardMenuEvent: (e: KeyboardEvent) => void;
|
|
48
48
|
private _handleClickOutOfElement;
|
package/base/dropdown-element.js
CHANGED
|
@@ -59,7 +59,7 @@ class DropdownElement extends SgdsElement {
|
|
|
59
59
|
if (!this.menuIsOpen)
|
|
60
60
|
return;
|
|
61
61
|
if (!e.composedPath().includes(this)) {
|
|
62
|
-
this.hideMenu();
|
|
62
|
+
this.hideMenu(true);
|
|
63
63
|
}
|
|
64
64
|
};
|
|
65
65
|
}
|
|
@@ -99,10 +99,10 @@ class DropdownElement extends SgdsElement {
|
|
|
99
99
|
}
|
|
100
100
|
}
|
|
101
101
|
/** When invoked, hides the dropdown menu */
|
|
102
|
-
async hideMenu() {
|
|
102
|
+
async hideMenu(isOutside) {
|
|
103
103
|
if (!this.menuIsOpen)
|
|
104
104
|
return;
|
|
105
|
-
this.emit("sgds-hide");
|
|
105
|
+
this.emit("sgds-hide", { detail: { isOutside } });
|
|
106
106
|
this.menuIsOpen = false;
|
|
107
107
|
setTimeout(() => this.emit("sgds-after-hide"), 0);
|
|
108
108
|
if (this._cleanupAutoUpdate) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dropdown-element.js","sources":["../../src/base/dropdown-element.ts"],"sourcesContent":["import { property } from \"lit/decorators.js\";\nimport { Ref, createRef } from \"lit/directives/ref.js\";\nimport { computePosition, flip, shift, offset, Placement, Middleware, autoUpdate, Strategy } from \"@floating-ui/dom\";\nimport SgdsElement from \"./sgds-element\";\nimport generateId from \"../utils/generateId\";\nimport { PropertyValueMap } from \"lit\";\n\nconst ARROW_DOWN = \"ArrowDown\";\nconst ARROW_UP = \"ArrowUp\";\nconst ESC = \"Escape\";\n\nexport type DropDirection = \"left\" | \"right\" | \"up\" | \"down\";\n\n/**\n * @event sgds-show - Emitted event when show instance is called\n * @event sgds-after-show - Emitted event when dropdown has been made visible to the user and CSS transitions have completed\n * @event sgds-hide - Emitted event when hide instance is called\n * @event sgds-after-hide - Emitted event when dropdown has hidden to the user and CSS transitions have completed\n */\n\nexport class DropdownElement extends SgdsElement {\n // static styles = SgdsElement.styles;\n\n /** @internal */\n protected myDropdown: Ref<HTMLElement> = createRef();\n\n /** @internal Unique id generated for the dropdown menu */\n protected dropdownMenuId: string = generateId(\"dropdown-menu\", \"div\");\n\n /** @internal Controls auto-flipping of menu */\n @property({ type: Boolean, state: true })\n protected noFlip = false;\n\n /** @internal When true, aligns right edge of menu with right edge of button */\n @property({ type: Boolean, reflect: true, state: true })\n protected menuAlignRight = false;\n\n /** @internal The drop position of menu relative to the toggle button */\n @property({ type: String, reflect: true, state: true })\n protected drop: DropDirection = \"down\";\n\n /** Additional configuration to pass to Floating UI. */\n @property({ type: Object })\n floatingOpts: { placement?: Placement; middleware?: Array<Middleware> } = {};\n\n /** When true, dropdown menu shows on first load */\n @property({ type: Boolean, reflect: true })\n menuIsOpen = false;\n\n /** Controls the close behaviour of dropdown menu. By default menu auto-closes when SgdsDropdownItem or area outside dropdown is clicked */\n protected close: \"outside\" | \"default\" | \"inside\" = \"default\";\n\n /** Disables the dropdown toggle */\n @property({ type: Boolean, reflect: true })\n disabled = false;\n\n /** Makes the input readonly. */\n @property({ type: Boolean, reflect: true }) readonly = false;\n\n private _cleanupAutoUpdate?: () => void;\n\n /** @internal Reference to the floating menu element */\n protected menuRef: Ref<HTMLElement> = createRef();\n\n connectedCallback() {\n super.connectedCallback();\n\n if (this.close !== \"inside\") {\n document.addEventListener(\"click\", this._handleClickOutOfElement);\n }\n this.addEventListener(\"keydown\", this._handleKeyboardMenuEvent);\n }\n\n disconnectedCallback() {\n super.disconnectedCallback();\n document.removeEventListener(\"click\", this._handleClickOutOfElement);\n this.removeEventListener(\"keydown\", this._handleKeyboardMenuEvent);\n if (this._cleanupAutoUpdate) {\n this._cleanupAutoUpdate();\n this._cleanupAutoUpdate = undefined;\n }\n }\n\n firstUpdated(changedProperties: PropertyValueMap<this>) {\n super.firstUpdated(changedProperties);\n // Optionally open menu on first load\n if (this.menuIsOpen) {\n this.updateFloatingPosition();\n }\n }\n\n /** When invoked, opens the dropdown menu */\n public async showMenu() {\n if (this.disabled || this.menuIsOpen) return;\n this.menuIsOpen = true;\n this.emit(\"sgds-show\");\n await this.updateFloatingPosition();\n this.emit(\"sgds-after-show\");\n\n if (this.myDropdown.value && this.menuRef.value) {\n this._cleanupAutoUpdate = autoUpdate(this.myDropdown.value, this.menuRef.value, () =>\n this.updateFloatingPosition()\n );\n }\n }\n\n /** When invoked, hides the dropdown menu */\n public async hideMenu() {\n if (!this.menuIsOpen) return;\n this.emit(\"sgds-hide\");\n this.menuIsOpen = false;\n setTimeout(() => this.emit(\"sgds-after-hide\"), 0);\n\n if (this._cleanupAutoUpdate) {\n this._cleanupAutoUpdate();\n this._cleanupAutoUpdate = undefined;\n }\n }\n\n toggleMenu() {\n if (this.menuIsOpen) {\n this.hideMenu();\n } else {\n this.showMenu();\n }\n }\n\n protected _handleKeyboardMenuEvent = (e: KeyboardEvent) => {\n if (this.readonly) return;\n switch (e.key) {\n case ARROW_DOWN:\n case ARROW_UP:\n e.preventDefault();\n if (!this.menuIsOpen) this.showMenu();\n break;\n case ESC:\n this.hideMenu();\n break;\n default:\n break;\n }\n };\n\n private _handleClickOutOfElement = (e: MouseEvent) => {\n if (!this.menuIsOpen) return;\n if (!e.composedPath().includes(this)) {\n this.hideMenu();\n }\n };\n\n protected mergeMiddleware(defaults: Middleware[], custom: Middleware[]): Middleware[] {\n const getType = (mw: Middleware) => mw?.name || mw?.constructor?.name;\n const customTypes = custom.map(getType);\n\n const merged = defaults\n .map(def => {\n const type = getType(def);\n const customIdx = customTypes.indexOf(type);\n return customIdx !== -1 ? custom[customIdx] : def;\n })\n\n .concat(custom.filter(c => !defaults.some(def => getType(def) === getType(c))));\n return merged;\n }\n\n protected async updateFloatingPosition() {\n if (!this.myDropdown.value || !this.menuRef.value) return;\n\n let placement: Placement = \"bottom-start\";\n switch (this.drop) {\n case \"up\":\n placement = this.menuAlignRight ? \"top-end\" : \"top-start\";\n break;\n case \"right\":\n placement = \"right-start\";\n break;\n case \"left\":\n placement = \"left-start\";\n break;\n case \"down\":\n placement = this.menuAlignRight ? \"bottom-end\" : \"bottom-start\";\n break;\n default:\n placement = \"bottom-start\";\n break;\n }\n\n const defaultMiddleware = [offset(8), !this.noFlip ? flip() : undefined, shift()].filter(Boolean);\n\n let middleware = defaultMiddleware;\n if (Array.isArray(this.floatingOpts.middleware) && this.floatingOpts.middleware.length > 0) {\n middleware = this.mergeMiddleware(defaultMiddleware, this.floatingOpts.middleware.filter(Boolean));\n }\n\n const opts = {\n strategy: \"fixed\" as Strategy,\n placement,\n ...this.floatingOpts,\n middleware\n };\n\n const {\n x,\n y,\n strategy,\n placement: computedPlacement\n } = await computePosition(this.myDropdown.value, this.menuRef.value, opts);\n\n this.menuRef.value.setAttribute(\"data-placement\", computedPlacement);\n\n Object.assign(this.menuRef.value.style, {\n position: strategy,\n left: `${x}px`,\n top: `${y}px`\n });\n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2B,UAAA,CAAA;IAA3C,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;AAAkB,CAAA,EAAA,eAAA,CAAA,SAAA,EAAA,UAAA,EAAA,KAAA,CAAA,CAAA;;;;"}
|
|
1
|
+
{"version":3,"file":"dropdown-element.js","sources":["../../src/base/dropdown-element.ts"],"sourcesContent":["import { property } from \"lit/decorators.js\";\nimport { Ref, createRef } from \"lit/directives/ref.js\";\nimport { computePosition, flip, shift, offset, Placement, Middleware, autoUpdate, Strategy } from \"@floating-ui/dom\";\nimport SgdsElement from \"./sgds-element\";\nimport generateId from \"../utils/generateId\";\nimport { PropertyValueMap } from \"lit\";\n\nconst ARROW_DOWN = \"ArrowDown\";\nconst ARROW_UP = \"ArrowUp\";\nconst ESC = \"Escape\";\n\nexport type DropDirection = \"left\" | \"right\" | \"up\" | \"down\";\n\n/**\n * @event sgds-show - Emitted event when show instance is called\n * @event sgds-after-show - Emitted event when dropdown has been made visible to the user and CSS transitions have completed\n * @event sgds-hide - Emitted event when hide instance is called\n * @event sgds-after-hide - Emitted event when dropdown has hidden to the user and CSS transitions have completed\n */\n\nexport class DropdownElement extends SgdsElement {\n // static styles = SgdsElement.styles;\n\n /** @internal */\n protected myDropdown: Ref<HTMLElement> = createRef();\n\n /** @internal Unique id generated for the dropdown menu */\n protected dropdownMenuId: string = generateId(\"dropdown-menu\", \"div\");\n\n /** @internal Controls auto-flipping of menu */\n @property({ type: Boolean, state: true })\n protected noFlip = false;\n\n /** @internal When true, aligns right edge of menu with right edge of button */\n @property({ type: Boolean, reflect: true, state: true })\n protected menuAlignRight = false;\n\n /** @internal The drop position of menu relative to the toggle button */\n @property({ type: String, reflect: true, state: true })\n protected drop: DropDirection = \"down\";\n\n /** Additional configuration to pass to Floating UI. */\n @property({ type: Object })\n floatingOpts: { placement?: Placement; middleware?: Array<Middleware> } = {};\n\n /** When true, dropdown menu shows on first load */\n @property({ type: Boolean, reflect: true })\n menuIsOpen = false;\n\n /** Controls the close behaviour of dropdown menu. By default menu auto-closes when SgdsDropdownItem or area outside dropdown is clicked */\n protected close: \"outside\" | \"default\" | \"inside\" = \"default\";\n\n /** Disables the dropdown toggle */\n @property({ type: Boolean, reflect: true })\n disabled = false;\n\n /** Makes the input readonly. */\n @property({ type: Boolean, reflect: true }) readonly = false;\n\n private _cleanupAutoUpdate?: () => void;\n\n /** @internal Reference to the floating menu element */\n protected menuRef: Ref<HTMLElement> = createRef();\n\n connectedCallback() {\n super.connectedCallback();\n\n if (this.close !== \"inside\") {\n document.addEventListener(\"click\", this._handleClickOutOfElement);\n }\n this.addEventListener(\"keydown\", this._handleKeyboardMenuEvent);\n }\n\n disconnectedCallback() {\n super.disconnectedCallback();\n document.removeEventListener(\"click\", this._handleClickOutOfElement);\n this.removeEventListener(\"keydown\", this._handleKeyboardMenuEvent);\n if (this._cleanupAutoUpdate) {\n this._cleanupAutoUpdate();\n this._cleanupAutoUpdate = undefined;\n }\n }\n\n firstUpdated(changedProperties: PropertyValueMap<this>) {\n super.firstUpdated(changedProperties);\n // Optionally open menu on first load\n if (this.menuIsOpen) {\n this.updateFloatingPosition();\n }\n }\n\n /** When invoked, opens the dropdown menu */\n public async showMenu() {\n if (this.disabled || this.menuIsOpen) return;\n this.menuIsOpen = true;\n this.emit(\"sgds-show\");\n await this.updateFloatingPosition();\n this.emit(\"sgds-after-show\");\n\n if (this.myDropdown.value && this.menuRef.value) {\n this._cleanupAutoUpdate = autoUpdate(this.myDropdown.value, this.menuRef.value, () =>\n this.updateFloatingPosition()\n );\n }\n }\n\n /** When invoked, hides the dropdown menu */\n public async hideMenu(isOutside?: boolean) {\n if (!this.menuIsOpen) return;\n this.emit(\"sgds-hide\", { detail: { isOutside } });\n\n this.menuIsOpen = false;\n setTimeout(() => this.emit(\"sgds-after-hide\"), 0);\n\n if (this._cleanupAutoUpdate) {\n this._cleanupAutoUpdate();\n this._cleanupAutoUpdate = undefined;\n }\n }\n\n toggleMenu() {\n if (this.menuIsOpen) {\n this.hideMenu();\n } else {\n this.showMenu();\n }\n }\n\n protected _handleKeyboardMenuEvent = (e: KeyboardEvent) => {\n if (this.readonly) return;\n switch (e.key) {\n case ARROW_DOWN:\n case ARROW_UP:\n e.preventDefault();\n if (!this.menuIsOpen) this.showMenu();\n break;\n case ESC:\n this.hideMenu();\n break;\n default:\n break;\n }\n };\n\n private _handleClickOutOfElement = (e: MouseEvent) => {\n if (!this.menuIsOpen) return;\n if (!e.composedPath().includes(this)) {\n this.hideMenu(true);\n }\n };\n\n protected mergeMiddleware(defaults: Middleware[], custom: Middleware[]): Middleware[] {\n const getType = (mw: Middleware) => mw?.name || mw?.constructor?.name;\n const customTypes = custom.map(getType);\n\n const merged = defaults\n .map(def => {\n const type = getType(def);\n const customIdx = customTypes.indexOf(type);\n return customIdx !== -1 ? custom[customIdx] : def;\n })\n\n .concat(custom.filter(c => !defaults.some(def => getType(def) === getType(c))));\n return merged;\n }\n\n protected async updateFloatingPosition() {\n if (!this.myDropdown.value || !this.menuRef.value) return;\n\n let placement: Placement = \"bottom-start\";\n switch (this.drop) {\n case \"up\":\n placement = this.menuAlignRight ? \"top-end\" : \"top-start\";\n break;\n case \"right\":\n placement = \"right-start\";\n break;\n case \"left\":\n placement = \"left-start\";\n break;\n case \"down\":\n placement = this.menuAlignRight ? \"bottom-end\" : \"bottom-start\";\n break;\n default:\n placement = \"bottom-start\";\n break;\n }\n\n const defaultMiddleware = [offset(8), !this.noFlip ? flip() : undefined, shift()].filter(Boolean);\n\n let middleware = defaultMiddleware;\n if (Array.isArray(this.floatingOpts.middleware) && this.floatingOpts.middleware.length > 0) {\n middleware = this.mergeMiddleware(defaultMiddleware, this.floatingOpts.middleware.filter(Boolean));\n }\n\n const opts = {\n strategy: \"fixed\" as Strategy,\n placement,\n ...this.floatingOpts,\n middleware\n };\n\n const {\n x,\n y,\n strategy,\n placement: computedPlacement\n } = await computePosition(this.myDropdown.value, this.menuRef.value, opts);\n\n this.menuRef.value.setAttribute(\"data-placement\", computedPlacement);\n\n Object.assign(this.menuRef.value.style, {\n position: strategy,\n left: `${x}px`,\n top: `${y}px`\n });\n }\n}\n"],"names":["generateId"],"mappings":";;;;;;;AAOA,MAAM,UAAU,GAAG,WAAW,CAAC;AAC/B,MAAM,QAAQ,GAAG,SAAS,CAAC;AAC3B,MAAM,GAAG,GAAG,QAAQ,CAAC;AAIrB;;;;;AAKG;AAEG,MAAO,eAAgB,SAAQ,WAAW,CAAA;AAAhD,IAAA,WAAA,GAAA;;;;QAIY,IAAU,CAAA,UAAA,GAAqB,SAAS,EAAE,CAAC;;AAG3C,QAAA,IAAA,CAAA,cAAc,GAAWA,KAAU,CAAC,eAAe,EAAE,KAAK,CAAC,CAAC;;QAI5D,IAAM,CAAA,MAAA,GAAG,KAAK,CAAC;;QAIf,IAAc,CAAA,cAAA,GAAG,KAAK,CAAC;;QAIvB,IAAI,CAAA,IAAA,GAAkB,MAAM,CAAC;;QAIvC,IAAY,CAAA,YAAA,GAA8D,EAAE,CAAC;;QAI7E,IAAU,CAAA,UAAA,GAAG,KAAK,CAAC;;QAGT,IAAK,CAAA,KAAA,GAAqC,SAAS,CAAC;;QAI9D,IAAQ,CAAA,QAAA,GAAG,KAAK,CAAC;;QAG2B,IAAQ,CAAA,QAAA,GAAG,KAAK,CAAC;;QAKnD,IAAO,CAAA,OAAA,GAAqB,SAAS,EAAE,CAAC;AAkExC,QAAA,IAAA,CAAA,wBAAwB,GAAG,CAAC,CAAgB,KAAI;YACxD,IAAI,IAAI,CAAC,QAAQ;gBAAE,OAAO;AAC1B,YAAA,QAAQ,CAAC,CAAC,GAAG;AACX,gBAAA,KAAK,UAAU,CAAC;AAChB,gBAAA,KAAK,QAAQ;oBACX,CAAC,CAAC,cAAc,EAAE,CAAC;oBACnB,IAAI,CAAC,IAAI,CAAC,UAAU;wBAAE,IAAI,CAAC,QAAQ,EAAE,CAAC;oBACtC,MAAM;AACR,gBAAA,KAAK,GAAG;oBACN,IAAI,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A,CAAA;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;AAC1B,CAAA,EAAA,eAAA,CAAA,SAAA,EAAA,UAAA,EAAA,KAAA,CAAA,CAAA,CAAA;AAG2B,UAAA,CAAA;IAA3C,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;AAAkB,CAAA,EAAA,eAAA,CAAA,SAAA,EAAA,UAAA,EAAA,KAAA,CAAA,CAAA;;;;"}
|
|
@@ -40,7 +40,7 @@ let _;(u.reactiveElementVersions??=[]).push("2.0.4"),u.reactiveElementVersions.l
|
|
|
40
40
|
* @license
|
|
41
41
|
* Copyright 2017 Google LLC
|
|
42
42
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
43
|
-
*/const L=globalThis,E=e=>{L.emitLitDebugLogEvents&&L.dispatchEvent(new CustomEvent("lit-debug",{detail:e}))};let T,z=0;L.litIssuedWarnings??=new Set,T=(e,t)=>{t+=e?` See https://lit.dev/msg/${e} for more information.`:"",L.litIssuedWarnings.has(t)||(console.warn(t),L.litIssuedWarnings.add(t))},T("dev-mode","Lit is in dev mode. Not recommended for production!");const O=L.ShadyDOM?.inUse&&!0===L.ShadyDOM?.noPatch?L.ShadyDOM.wrap:e=>e,R=L.trustedTypes,U=R?R.createPolicy("lit-html",{createHTML:e=>e}):void 0,N=e=>e,D=(e,t,i)=>N,I=e=>{if(ue!==D)throw new Error("Attempted to overwrite existing lit-html security policy. setSanitizeDOMValueFactory should be called at most once.");ue=e},W=()=>{ue=D},F=(e,t,i)=>ue(e,t,i),q="$lit$",j=`lit$${Math.random().toFixed(9).slice(2)}$`,J="?"+j,K=`<${J}>`,Y=document,X=()=>Y.createComment(""),G=e=>null===e||"object"!=typeof e&&"function"!=typeof e,Q=Array.isArray,ee="[ \t\n\f\r]",te=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,ie=/-->/g,le=/>/g,oe=new RegExp(`>|${ee}(?:([^\\s"'>=/]+)(${ee}*=${ee}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),ae=/'/g,ne=/"/g,re=/^(?:script|style|textarea|title)$/i,se=(ce=1,(e,...t)=>(e.some((e=>void 0===e))&&console.warn("Some template strings are undefined.\nThis is probably caused by illegal octal escape sequences."),t.some((e=>e?._$litStatic$))&&T("","Static values 'literal' or 'unsafeStatic' cannot be used as values to non-static templates.\nPlease use the static 'html' tag function. See https://lit.dev/docs/templates/expressions/#static-expressions"),{_$litType$:ce,strings:e,values:t}));var ce;const de=Symbol.for("lit-noChange"),he=Symbol.for("lit-nothing"),ve=new WeakMap,pe=Y.createTreeWalker(Y,129);let ue=D;function ge(e,t){if(!Q(e)||!e.hasOwnProperty("raw")){let e="invalid template strings array";throw e="\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 ".trim().replace(/\n */g,"\n"),new Error(e)}return void 0!==U?U.createHTML(t):t}class fe{constructor({strings:e,_$litType$:t},i){let l;this.parts=[];let o=0,a=0;const n=e.length-1,r=this.parts,[s,c]=((e,t)=>{const i=e.length-1,l=[];let o,a=2===t?"<svg>":3===t?"<math>":"",n=te;for(let t=0;t<i;t++){const i=e[t];let r,s,c=-1,d=0;for(;d<i.length&&(n.lastIndex=d,s=n.exec(i),null!==s);)if(d=n.lastIndex,n===te){if("!--"===s[1])n=ie;else if(void 0!==s[1])n=le;else if(void 0!==s[2])re.test(s[2])&&(o=new RegExp(`</${s[2]}`,"g")),n=oe;else if(void 0!==s[3])throw new Error("Bindings in tag names are not supported. Please use static templates instead. See https://lit.dev/docs/templates/expressions/#static-expressions")}else n===oe?">"===s[0]?(n=o??te,c=-1):void 0===s[1]?c=-2:(c=n.lastIndex-s[2].length,r=s[1],n=void 0===s[3]?oe:'"'===s[3]?ne:ae):n===ne||n===ae?n=oe:n===ie||n===le?n=te:(n=oe,o=void 0);console.assert(-1===c||n===oe||n===ae||n===ne,"unexpected parse state B");const h=n===oe&&e[t+1].startsWith("/>")?" ":"";a+=n===te?i+K:c>=0?(l.push(r),i.slice(0,c)+q+i.slice(c)+j+h):i+j+(-2===c?t:h)}return[ge(e,a+(e[i]||"<?>")+(2===t?"</svg>":3===t?"</math>":"")),l]})(e,t);if(this.el=fe.createElement(s,i),pe.currentNode=this.el.content,2===t||3===t){const e=this.el.content.firstChild;e.replaceWith(...e.childNodes)}for(;null!==(l=pe.nextNode())&&r.length<n;){if(1===l.nodeType){{const e=l.localName;if(/^(?:textarea|template)$/i.test(e)&&l.innerHTML.includes(j)){const t=`Expressions are not supported inside \`${e}\` elements. See https://lit.dev/msg/expression-in-${e} for more information.`;if("template"===e)throw new Error(t);T("",t)}}if(l.hasAttributes())for(const e of l.getAttributeNames())if(e.endsWith(q)){const t=c[a++],i=l.getAttribute(e).split(j),n=/([.?@])?(.*)/.exec(t);r.push({type:1,index:o,name:n[2],strings:i,ctor:"."===n[1]?Ce:"?"===n[1]?be:"@"===n[1]?Ze:ye}),l.removeAttribute(e)}else e.startsWith(j)&&(r.push({type:6,index:o}),l.removeAttribute(e));if(re.test(l.tagName)){const e=l.textContent.split(j),t=e.length-1;if(t>0){l.textContent=R?R.emptyScript:"";for(let i=0;i<t;i++)l.append(e[i],X()),pe.nextNode(),r.push({type:2,index:++o});l.append(e[t],X())}}}else if(8===l.nodeType){if(l.data===J)r.push({type:2,index:o});else{let e=-1;for(;-1!==(e=l.data.indexOf(j,e+1));)r.push({type:7,index:o}),e+=j.length-1}}o++}if(c.length!==a)throw new Error('Detected duplicate attribute bindings. This occurs if your template has duplicate attributes on an element tag. For example "<input ?disabled=${true} ?disabled=${false}>" contains a duplicate "disabled" attribute. The error was detected in the following template: \n`'+e.join("${...}")+"`");E&&E({kind:"template prep",template:this,clonableTemplate:this.el,parts:this.parts,strings:e})}static createElement(e,t){const i=Y.createElement("template");return i.innerHTML=e,i}}function we(e,t,i=e,l){if(t===de)return t;let o=void 0!==l?i.__directives?.[l]:i.__directive;const a=G(t)?void 0:t._$litDirective$;return o?.constructor!==a&&(o?._$notifyDirectiveConnectionChanged?.(!1),void 0===a?o=void 0:(o=new a(e),o._$initialize(e,i,l)),void 0!==l?(i.__directives??=[])[l]=o:i.__directive=o),void 0!==o&&(t=we(e,o._$resolve(e,t.values),o,l)),t}class me{constructor(e,t){this._$parts=[],this._$disconnectableChildren=void 0,this._$template=e,this._$parent=t}get parentNode(){return this._$parent.parentNode}get _$isConnected(){return this._$parent._$isConnected}_clone(e){const{el:{content:t},parts:i}=this._$template,l=(e?.creationScope??Y).importNode(t,!0);pe.currentNode=l;let o=pe.nextNode(),a=0,n=0,r=i[0];for(;void 0!==r;){if(a===r.index){let t;2===r.type?t=new xe(o,o.nextSibling,this,e):1===r.type?t=new r.ctor(o,r.name,r.strings,this,e):6===r.type&&(t=new _e(o,this,e)),this._$parts.push(t),r=i[++n]}a!==r?.index&&(o=pe.nextNode(),a++)}return pe.currentNode=Y,l}_update(e){let t=0;for(const i of this._$parts)void 0!==i&&(E&&E({kind:"set part",part:i,value:e[t],valueIndex:t,values:e,templateInstance:this}),void 0!==i.strings?(i._$setValue(e,i,t),t+=i.strings.length-2):i._$setValue(e[t])),t++}}class xe{get _$isConnected(){return this._$parent?._$isConnected??this.__isConnected}constructor(e,t,i,l){this.type=2,this._$committedValue=he,this._$disconnectableChildren=void 0,this._$startNode=e,this._$endNode=t,this._$parent=i,this.options=l,this.__isConnected=l?.isConnected??!0,this._textSanitizer=void 0}get parentNode(){let e=O(this._$startNode).parentNode;const t=this._$parent;return void 0!==t&&11===e?.nodeType&&(e=t.parentNode),e}get startNode(){return this._$startNode}get endNode(){return this._$endNode}_$setValue(e,t=this){if(null===this.parentNode)throw new Error("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.");if(e=we(this,e,t),G(e))e===he||null==e||""===e?(this._$committedValue!==he&&(E&&E({kind:"commit nothing to child",start:this._$startNode,end:this._$endNode,parent:this._$parent,options:this.options}),this._$clear()),this._$committedValue=he):e!==this._$committedValue&&e!==de&&this._commitText(e);else if(void 0!==e._$litType$)this._commitTemplateResult(e);else if(void 0!==e.nodeType){if(this.options?.host===e)return this._commitText("[probable mistake: rendered a template's host in itself (commonly caused by writing ${this} in a template]"),void console.warn("Attempted to render the template host",e,"inside itself. This is almost always a mistake, and in dev mode ","we render some warning text. In production however, we'll ","render it, which will usually result in an error, and sometimes ","in the element disappearing from the DOM.");this._commitNode(e)}else(e=>Q(e)||"function"==typeof e?.[Symbol.iterator])(e)?this._commitIterable(e):this._commitText(e)}_insert(e){return O(O(this._$startNode).parentNode).insertBefore(e,this._$endNode)}_commitNode(e){if(this._$committedValue!==e){if(this._$clear(),ue!==D){const e=this._$startNode.parentNode?.nodeName;if("STYLE"===e||"SCRIPT"===e){let t="Forbidden";throw t="STYLE"===e?"Lit does not support binding inside style nodes. This is a security risk, as style injection attacks can exfiltrate data and spoof UIs. Consider instead using css`...` literals to compose styles, and do dynamic styling with css custom properties, ::parts, <slot>s, and by mutating the DOM rather than stylesheets.":"Lit does not support binding inside script nodes. This is a security risk, as it could allow arbitrary code execution.",new Error(t)}}E&&E({kind:"commit node",start:this._$startNode,parent:this._$parent,value:e,options:this.options}),this._$committedValue=this._insert(e)}}_commitText(e){if(this._$committedValue!==he&&G(this._$committedValue)){const t=O(this._$startNode).nextSibling;void 0===this._textSanitizer&&(this._textSanitizer=F(t,"data","property")),e=this._textSanitizer(e),E&&E({kind:"commit text",node:t,value:e,options:this.options}),t.data=e}else{const t=Y.createTextNode("");this._commitNode(t),void 0===this._textSanitizer&&(this._textSanitizer=F(t,"data","property")),e=this._textSanitizer(e),E&&E({kind:"commit text",node:t,value:e,options:this.options}),t.data=e}this._$committedValue=e}_commitTemplateResult(e){const{values:t,_$litType$:i}=e,l="number"==typeof i?this._$getTemplate(e):(void 0===i.el&&(i.el=fe.createElement(ge(i.h,i.h[0]),this.options)),i);if(this._$committedValue?._$template===l)E&&E({kind:"template updating",template:l,instance:this._$committedValue,parts:this._$committedValue._$parts,options:this.options,values:t}),this._$committedValue._update(t);else{const e=new me(l,this),i=e._clone(this.options);E&&E({kind:"template instantiated",template:l,instance:e,parts:e._$parts,options:this.options,fragment:i,values:t}),e._update(t),E&&E({kind:"template instantiated and updated",template:l,instance:e,parts:e._$parts,options:this.options,fragment:i,values:t}),this._commitNode(i),this._$committedValue=e}}_$getTemplate(e){let t=ve.get(e.strings);return void 0===t&&ve.set(e.strings,t=new fe(e)),t}_commitIterable(e){Q(this._$committedValue)||(this._$committedValue=[],this._$clear());const t=this._$committedValue;let i,l=0;for(const o of e)l===t.length?t.push(i=new xe(this._insert(X()),this._insert(X()),this,this.options)):i=t[l],i._$setValue(o),l++;l<t.length&&(this._$clear(i&&O(i._$endNode).nextSibling,l),t.length=l)}_$clear(e=O(this._$startNode).nextSibling,t){for(this._$notifyConnectionChanged?.(!1,!0,t);e&&e!==this._$endNode;){const t=O(e).nextSibling;O(e).remove(),e=t}}setConnected(e){if(void 0!==this._$parent)throw new Error("part.setConnected() may only be called on a RootPart returned from render().");this.__isConnected=e,this._$notifyConnectionChanged?.(e)}}class ye{get tagName(){return this.element.tagName}get _$isConnected(){return this._$parent._$isConnected}constructor(e,t,i,l,o){this.type=1,this._$committedValue=he,this._$disconnectableChildren=void 0,this.element=e,this.name=t,this._$parent=l,this.options=o,i.length>2||""!==i[0]||""!==i[1]?(this._$committedValue=new Array(i.length-1).fill(new String),this.strings=i):this._$committedValue=he,this._sanitizer=void 0}_$setValue(e,t=this,i,l){const o=this.strings;let a=!1;if(void 0===o)e=we(this,e,t,0),a=!G(e)||e!==this._$committedValue&&e!==de,a&&(this._$committedValue=e);else{const l=e;let n,r;for(e=o[0],n=0;n<o.length-1;n++)r=we(this,l[i+n],t,n),r===de&&(r=this._$committedValue[n]),a||=!G(r)||r!==this._$committedValue[n],r===he?e=he:e!==he&&(e+=(r??"")+o[n+1]),this._$committedValue[n]=r}a&&!l&&this._commitValue(e)}_commitValue(e){e===he?O(this.element).removeAttribute(this.name):(void 0===this._sanitizer&&(this._sanitizer=ue(this.element,this.name,"attribute")),e=this._sanitizer(e??""),E&&E({kind:"commit attribute",element:this.element,name:this.name,value:e,options:this.options}),O(this.element).setAttribute(this.name,e??""))}}class Ce extends ye{constructor(){super(...arguments),this.type=3}_commitValue(e){void 0===this._sanitizer&&(this._sanitizer=ue(this.element,this.name,"property")),e=this._sanitizer(e),E&&E({kind:"commit property",element:this.element,name:this.name,value:e,options:this.options}),this.element[this.name]=e===he?void 0:e}}class be extends ye{constructor(){super(...arguments),this.type=4}_commitValue(e){E&&E({kind:"commit boolean attribute",element:this.element,name:this.name,value:!(!e||e===he),options:this.options}),O(this.element).toggleAttribute(this.name,!!e&&e!==he)}}class Ze extends ye{constructor(e,t,i,l,o){if(super(e,t,i,l,o),this.type=5,void 0!==this.strings)throw new Error(`A \`<${e.localName}>\` has a \`@${t}=...\` listener with invalid content. Event listeners in templates must have exactly one expression and no surrounding text.`)}_$setValue(e,t=this){if((e=we(this,e,t,0)??he)===de)return;const i=this._$committedValue,l=e===he&&i!==he||e.capture!==i.capture||e.once!==i.once||e.passive!==i.passive,o=e!==he&&(i===he||l);E&&E({kind:"commit event listener",element:this.element,name:this.name,value:e,options:this.options,removeListener:l,addListener:o,oldListener:i}),l&&this.element.removeEventListener(this.name,this,i),o&&this.element.addEventListener(this.name,this,e),this._$committedValue=e}handleEvent(e){"function"==typeof this._$committedValue?this._$committedValue.call(this.options?.host??this.element,e):this._$committedValue.handleEvent(e)}}class _e{constructor(e,t,i){this.element=e,this.type=6,this._$disconnectableChildren=void 0,this._$parent=t,this.options=i}get _$isConnected(){return this._$parent._$isConnected}_$setValue(e){E&&E({kind:"commit to element binding",element:this.element,value:e,options:this.options}),we(this,e)}}const Me=L.litHtmlPolyfillSupportDevMode;Me?.(fe,xe),(L.litHtmlVersions??=[]).push("3.2.0"),L.litHtmlVersions.length>1&&T("multiple-versions","Multiple versions of Lit loaded. Loading multiple versions is not recommended.");const Ve=(e,t,i)=>{if(null==t)throw new TypeError(`The container to render into may not be ${t}`);const l=z++,o=i?.renderBefore??t;let a=o._$litPart$;if(E&&E({kind:"begin render",id:l,value:e,container:t,options:i,part:a}),void 0===a){const e=i?.renderBefore??null;o._$litPart$=a=new xe(t.insertBefore(X(),e),e,void 0,i??{})}return a._$setValue(e),E&&E({kind:"end render",id:l,value:e,container:t,options:i,part:a}),a};Ve.setSanitizer=I,Ve.createSanitizer=F,Ve._testOnlyClearSanitizerFactoryDoNotCallOrElse=W;
|
|
43
|
+
*/const L=globalThis,E=e=>{L.emitLitDebugLogEvents&&L.dispatchEvent(new CustomEvent("lit-debug",{detail:e}))};let T,O=0;L.litIssuedWarnings??=new Set,T=(e,t)=>{t+=e?` See https://lit.dev/msg/${e} for more information.`:"",L.litIssuedWarnings.has(t)||(console.warn(t),L.litIssuedWarnings.add(t))},T("dev-mode","Lit is in dev mode. Not recommended for production!");const z=L.ShadyDOM?.inUse&&!0===L.ShadyDOM?.noPatch?L.ShadyDOM.wrap:e=>e,R=L.trustedTypes,U=R?R.createPolicy("lit-html",{createHTML:e=>e}):void 0,N=e=>e,D=(e,t,i)=>N,I=e=>{if(ue!==D)throw new Error("Attempted to overwrite existing lit-html security policy. setSanitizeDOMValueFactory should be called at most once.");ue=e},W=()=>{ue=D},F=(e,t,i)=>ue(e,t,i),q="$lit$",j=`lit$${Math.random().toFixed(9).slice(2)}$`,J="?"+j,K=`<${J}>`,Y=document,X=()=>Y.createComment(""),G=e=>null===e||"object"!=typeof e&&"function"!=typeof e,Q=Array.isArray,ee="[ \t\n\f\r]",te=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,ie=/-->/g,le=/>/g,oe=new RegExp(`>|${ee}(?:([^\\s"'>=/]+)(${ee}*=${ee}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),ae=/'/g,ne=/"/g,re=/^(?:script|style|textarea|title)$/i,se=(ce=1,(e,...t)=>(e.some((e=>void 0===e))&&console.warn("Some template strings are undefined.\nThis is probably caused by illegal octal escape sequences."),t.some((e=>e?._$litStatic$))&&T("","Static values 'literal' or 'unsafeStatic' cannot be used as values to non-static templates.\nPlease use the static 'html' tag function. See https://lit.dev/docs/templates/expressions/#static-expressions"),{_$litType$:ce,strings:e,values:t}));var ce;const de=Symbol.for("lit-noChange"),he=Symbol.for("lit-nothing"),ve=new WeakMap,pe=Y.createTreeWalker(Y,129);let ue=D;function ge(e,t){if(!Q(e)||!e.hasOwnProperty("raw")){let e="invalid template strings array";throw e="\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 ".trim().replace(/\n */g,"\n"),new Error(e)}return void 0!==U?U.createHTML(t):t}class fe{constructor({strings:e,_$litType$:t},i){let l;this.parts=[];let o=0,a=0;const n=e.length-1,r=this.parts,[s,c]=((e,t)=>{const i=e.length-1,l=[];let o,a=2===t?"<svg>":3===t?"<math>":"",n=te;for(let t=0;t<i;t++){const i=e[t];let r,s,c=-1,d=0;for(;d<i.length&&(n.lastIndex=d,s=n.exec(i),null!==s);)if(d=n.lastIndex,n===te){if("!--"===s[1])n=ie;else if(void 0!==s[1])n=le;else if(void 0!==s[2])re.test(s[2])&&(o=new RegExp(`</${s[2]}`,"g")),n=oe;else if(void 0!==s[3])throw new Error("Bindings in tag names are not supported. Please use static templates instead. See https://lit.dev/docs/templates/expressions/#static-expressions")}else n===oe?">"===s[0]?(n=o??te,c=-1):void 0===s[1]?c=-2:(c=n.lastIndex-s[2].length,r=s[1],n=void 0===s[3]?oe:'"'===s[3]?ne:ae):n===ne||n===ae?n=oe:n===ie||n===le?n=te:(n=oe,o=void 0);console.assert(-1===c||n===oe||n===ae||n===ne,"unexpected parse state B");const h=n===oe&&e[t+1].startsWith("/>")?" ":"";a+=n===te?i+K:c>=0?(l.push(r),i.slice(0,c)+q+i.slice(c)+j+h):i+j+(-2===c?t:h)}return[ge(e,a+(e[i]||"<?>")+(2===t?"</svg>":3===t?"</math>":"")),l]})(e,t);if(this.el=fe.createElement(s,i),pe.currentNode=this.el.content,2===t||3===t){const e=this.el.content.firstChild;e.replaceWith(...e.childNodes)}for(;null!==(l=pe.nextNode())&&r.length<n;){if(1===l.nodeType){{const e=l.localName;if(/^(?:textarea|template)$/i.test(e)&&l.innerHTML.includes(j)){const t=`Expressions are not supported inside \`${e}\` elements. See https://lit.dev/msg/expression-in-${e} for more information.`;if("template"===e)throw new Error(t);T("",t)}}if(l.hasAttributes())for(const e of l.getAttributeNames())if(e.endsWith(q)){const t=c[a++],i=l.getAttribute(e).split(j),n=/([.?@])?(.*)/.exec(t);r.push({type:1,index:o,name:n[2],strings:i,ctor:"."===n[1]?Ce:"?"===n[1]?be:"@"===n[1]?Ze:ye}),l.removeAttribute(e)}else e.startsWith(j)&&(r.push({type:6,index:o}),l.removeAttribute(e));if(re.test(l.tagName)){const e=l.textContent.split(j),t=e.length-1;if(t>0){l.textContent=R?R.emptyScript:"";for(let i=0;i<t;i++)l.append(e[i],X()),pe.nextNode(),r.push({type:2,index:++o});l.append(e[t],X())}}}else if(8===l.nodeType){if(l.data===J)r.push({type:2,index:o});else{let e=-1;for(;-1!==(e=l.data.indexOf(j,e+1));)r.push({type:7,index:o}),e+=j.length-1}}o++}if(c.length!==a)throw new Error('Detected duplicate attribute bindings. This occurs if your template has duplicate attributes on an element tag. For example "<input ?disabled=${true} ?disabled=${false}>" contains a duplicate "disabled" attribute. The error was detected in the following template: \n`'+e.join("${...}")+"`");E&&E({kind:"template prep",template:this,clonableTemplate:this.el,parts:this.parts,strings:e})}static createElement(e,t){const i=Y.createElement("template");return i.innerHTML=e,i}}function we(e,t,i=e,l){if(t===de)return t;let o=void 0!==l?i.__directives?.[l]:i.__directive;const a=G(t)?void 0:t._$litDirective$;return o?.constructor!==a&&(o?._$notifyDirectiveConnectionChanged?.(!1),void 0===a?o=void 0:(o=new a(e),o._$initialize(e,i,l)),void 0!==l?(i.__directives??=[])[l]=o:i.__directive=o),void 0!==o&&(t=we(e,o._$resolve(e,t.values),o,l)),t}class me{constructor(e,t){this._$parts=[],this._$disconnectableChildren=void 0,this._$template=e,this._$parent=t}get parentNode(){return this._$parent.parentNode}get _$isConnected(){return this._$parent._$isConnected}_clone(e){const{el:{content:t},parts:i}=this._$template,l=(e?.creationScope??Y).importNode(t,!0);pe.currentNode=l;let o=pe.nextNode(),a=0,n=0,r=i[0];for(;void 0!==r;){if(a===r.index){let t;2===r.type?t=new xe(o,o.nextSibling,this,e):1===r.type?t=new r.ctor(o,r.name,r.strings,this,e):6===r.type&&(t=new _e(o,this,e)),this._$parts.push(t),r=i[++n]}a!==r?.index&&(o=pe.nextNode(),a++)}return pe.currentNode=Y,l}_update(e){let t=0;for(const i of this._$parts)void 0!==i&&(E&&E({kind:"set part",part:i,value:e[t],valueIndex:t,values:e,templateInstance:this}),void 0!==i.strings?(i._$setValue(e,i,t),t+=i.strings.length-2):i._$setValue(e[t])),t++}}class xe{get _$isConnected(){return this._$parent?._$isConnected??this.__isConnected}constructor(e,t,i,l){this.type=2,this._$committedValue=he,this._$disconnectableChildren=void 0,this._$startNode=e,this._$endNode=t,this._$parent=i,this.options=l,this.__isConnected=l?.isConnected??!0,this._textSanitizer=void 0}get parentNode(){let e=z(this._$startNode).parentNode;const t=this._$parent;return void 0!==t&&11===e?.nodeType&&(e=t.parentNode),e}get startNode(){return this._$startNode}get endNode(){return this._$endNode}_$setValue(e,t=this){if(null===this.parentNode)throw new Error("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.");if(e=we(this,e,t),G(e))e===he||null==e||""===e?(this._$committedValue!==he&&(E&&E({kind:"commit nothing to child",start:this._$startNode,end:this._$endNode,parent:this._$parent,options:this.options}),this._$clear()),this._$committedValue=he):e!==this._$committedValue&&e!==de&&this._commitText(e);else if(void 0!==e._$litType$)this._commitTemplateResult(e);else if(void 0!==e.nodeType){if(this.options?.host===e)return this._commitText("[probable mistake: rendered a template's host in itself (commonly caused by writing ${this} in a template]"),void console.warn("Attempted to render the template host",e,"inside itself. This is almost always a mistake, and in dev mode ","we render some warning text. In production however, we'll ","render it, which will usually result in an error, and sometimes ","in the element disappearing from the DOM.");this._commitNode(e)}else(e=>Q(e)||"function"==typeof e?.[Symbol.iterator])(e)?this._commitIterable(e):this._commitText(e)}_insert(e){return z(z(this._$startNode).parentNode).insertBefore(e,this._$endNode)}_commitNode(e){if(this._$committedValue!==e){if(this._$clear(),ue!==D){const e=this._$startNode.parentNode?.nodeName;if("STYLE"===e||"SCRIPT"===e){let t="Forbidden";throw t="STYLE"===e?"Lit does not support binding inside style nodes. This is a security risk, as style injection attacks can exfiltrate data and spoof UIs. Consider instead using css`...` literals to compose styles, and do dynamic styling with css custom properties, ::parts, <slot>s, and by mutating the DOM rather than stylesheets.":"Lit does not support binding inside script nodes. This is a security risk, as it could allow arbitrary code execution.",new Error(t)}}E&&E({kind:"commit node",start:this._$startNode,parent:this._$parent,value:e,options:this.options}),this._$committedValue=this._insert(e)}}_commitText(e){if(this._$committedValue!==he&&G(this._$committedValue)){const t=z(this._$startNode).nextSibling;void 0===this._textSanitizer&&(this._textSanitizer=F(t,"data","property")),e=this._textSanitizer(e),E&&E({kind:"commit text",node:t,value:e,options:this.options}),t.data=e}else{const t=Y.createTextNode("");this._commitNode(t),void 0===this._textSanitizer&&(this._textSanitizer=F(t,"data","property")),e=this._textSanitizer(e),E&&E({kind:"commit text",node:t,value:e,options:this.options}),t.data=e}this._$committedValue=e}_commitTemplateResult(e){const{values:t,_$litType$:i}=e,l="number"==typeof i?this._$getTemplate(e):(void 0===i.el&&(i.el=fe.createElement(ge(i.h,i.h[0]),this.options)),i);if(this._$committedValue?._$template===l)E&&E({kind:"template updating",template:l,instance:this._$committedValue,parts:this._$committedValue._$parts,options:this.options,values:t}),this._$committedValue._update(t);else{const e=new me(l,this),i=e._clone(this.options);E&&E({kind:"template instantiated",template:l,instance:e,parts:e._$parts,options:this.options,fragment:i,values:t}),e._update(t),E&&E({kind:"template instantiated and updated",template:l,instance:e,parts:e._$parts,options:this.options,fragment:i,values:t}),this._commitNode(i),this._$committedValue=e}}_$getTemplate(e){let t=ve.get(e.strings);return void 0===t&&ve.set(e.strings,t=new fe(e)),t}_commitIterable(e){Q(this._$committedValue)||(this._$committedValue=[],this._$clear());const t=this._$committedValue;let i,l=0;for(const o of e)l===t.length?t.push(i=new xe(this._insert(X()),this._insert(X()),this,this.options)):i=t[l],i._$setValue(o),l++;l<t.length&&(this._$clear(i&&z(i._$endNode).nextSibling,l),t.length=l)}_$clear(e=z(this._$startNode).nextSibling,t){for(this._$notifyConnectionChanged?.(!1,!0,t);e&&e!==this._$endNode;){const t=z(e).nextSibling;z(e).remove(),e=t}}setConnected(e){if(void 0!==this._$parent)throw new Error("part.setConnected() may only be called on a RootPart returned from render().");this.__isConnected=e,this._$notifyConnectionChanged?.(e)}}class ye{get tagName(){return this.element.tagName}get _$isConnected(){return this._$parent._$isConnected}constructor(e,t,i,l,o){this.type=1,this._$committedValue=he,this._$disconnectableChildren=void 0,this.element=e,this.name=t,this._$parent=l,this.options=o,i.length>2||""!==i[0]||""!==i[1]?(this._$committedValue=new Array(i.length-1).fill(new String),this.strings=i):this._$committedValue=he,this._sanitizer=void 0}_$setValue(e,t=this,i,l){const o=this.strings;let a=!1;if(void 0===o)e=we(this,e,t,0),a=!G(e)||e!==this._$committedValue&&e!==de,a&&(this._$committedValue=e);else{const l=e;let n,r;for(e=o[0],n=0;n<o.length-1;n++)r=we(this,l[i+n],t,n),r===de&&(r=this._$committedValue[n]),a||=!G(r)||r!==this._$committedValue[n],r===he?e=he:e!==he&&(e+=(r??"")+o[n+1]),this._$committedValue[n]=r}a&&!l&&this._commitValue(e)}_commitValue(e){e===he?z(this.element).removeAttribute(this.name):(void 0===this._sanitizer&&(this._sanitizer=ue(this.element,this.name,"attribute")),e=this._sanitizer(e??""),E&&E({kind:"commit attribute",element:this.element,name:this.name,value:e,options:this.options}),z(this.element).setAttribute(this.name,e??""))}}class Ce extends ye{constructor(){super(...arguments),this.type=3}_commitValue(e){void 0===this._sanitizer&&(this._sanitizer=ue(this.element,this.name,"property")),e=this._sanitizer(e),E&&E({kind:"commit property",element:this.element,name:this.name,value:e,options:this.options}),this.element[this.name]=e===he?void 0:e}}class be extends ye{constructor(){super(...arguments),this.type=4}_commitValue(e){E&&E({kind:"commit boolean attribute",element:this.element,name:this.name,value:!(!e||e===he),options:this.options}),z(this.element).toggleAttribute(this.name,!!e&&e!==he)}}class Ze extends ye{constructor(e,t,i,l,o){if(super(e,t,i,l,o),this.type=5,void 0!==this.strings)throw new Error(`A \`<${e.localName}>\` has a \`@${t}=...\` listener with invalid content. Event listeners in templates must have exactly one expression and no surrounding text.`)}_$setValue(e,t=this){if((e=we(this,e,t,0)??he)===de)return;const i=this._$committedValue,l=e===he&&i!==he||e.capture!==i.capture||e.once!==i.once||e.passive!==i.passive,o=e!==he&&(i===he||l);E&&E({kind:"commit event listener",element:this.element,name:this.name,value:e,options:this.options,removeListener:l,addListener:o,oldListener:i}),l&&this.element.removeEventListener(this.name,this,i),o&&this.element.addEventListener(this.name,this,e),this._$committedValue=e}handleEvent(e){"function"==typeof this._$committedValue?this._$committedValue.call(this.options?.host??this.element,e):this._$committedValue.handleEvent(e)}}class _e{constructor(e,t,i){this.element=e,this.type=6,this._$disconnectableChildren=void 0,this._$parent=t,this.options=i}get _$isConnected(){return this._$parent._$isConnected}_$setValue(e){E&&E({kind:"commit to element binding",element:this.element,value:e,options:this.options}),we(this,e)}}const Me=L.litHtmlPolyfillSupportDevMode;Me?.(fe,xe),(L.litHtmlVersions??=[]).push("3.2.0"),L.litHtmlVersions.length>1&&T("multiple-versions","Multiple versions of Lit loaded. Loading multiple versions is not recommended.");const Ve=(e,t,i)=>{if(null==t)throw new TypeError(`The container to render into may not be ${t}`);const l=O++,o=i?.renderBefore??t;let a=o._$litPart$;if(E&&E({kind:"begin render",id:l,value:e,container:t,options:i,part:a}),void 0===a){const e=i?.renderBefore??null;o._$litPart$=a=new xe(t.insertBefore(X(),e),e,void 0,i??{})}return a._$setValue(e),E&&E({kind:"end render",id:l,value:e,container:t,options:i,part:a}),a};Ve.setSanitizer=I,Ve.createSanitizer=F,Ve._testOnlyClearSanitizerFactoryDoNotCallOrElse=W;
|
|
44
44
|
/**
|
|
45
45
|
* @license
|
|
46
46
|
* Copyright 2018 Google LLC
|
|
@@ -57,7 +57,7 @@ const He=Symbol.for(""),Se=e=>{if(e?.r===He)return e?._$litStatic$},ke=new Map,$
|
|
|
57
57
|
* Copyright 2019 Google LLC
|
|
58
58
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
59
59
|
*/
|
|
60
|
-
const Ae=globalThis,Pe=Ae.ShadowRoot&&(void 0===Ae.ShadyCSS||Ae.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Le=Symbol(),Ee=new WeakMap;class Te{constructor(e,t,i){if(this._$cssResult$=!0,i!==Le)throw new Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this._strings=t}get styleSheet(){let e=this._styleSheet;const t=this._strings;if(Pe&&void 0===e){const i=void 0!==t&&1===t.length;i&&(e=Ee.get(t)),void 0===e&&((this._styleSheet=e=new CSSStyleSheet).replaceSync(this.cssText),i&&Ee.set(t,e))}return e}toString(){return this.cssText}}const
|
|
60
|
+
const Ae=globalThis,Pe=Ae.ShadowRoot&&(void 0===Ae.ShadyCSS||Ae.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Le=Symbol(),Ee=new WeakMap;class Te{constructor(e,t,i){if(this._$cssResult$=!0,i!==Le)throw new Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this._strings=t}get styleSheet(){let e=this._styleSheet;const t=this._strings;if(Pe&&void 0===e){const i=void 0!==t&&1===t.length;i&&(e=Ee.get(t)),void 0===e&&((this._styleSheet=e=new CSSStyleSheet).replaceSync(this.cssText),i&&Ee.set(t,e))}return e}toString(){return this.cssText}}const Oe=(e,...t)=>{const i=1===e.length?e[0]:t.reduce(((t,i,l)=>t+(e=>{if(!0===e._$cssResult$)return e.cssText;if("number"==typeof e)return e;throw new Error(`Value passed to 'css' function must be a 'css' function result: ${e}. Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.`)})(i)+e[l+1]),e[0]);return new Te(i,e,Le)},ze=e=>{let t="";for(const i of e.cssRules)t+=i.cssText;return new Te("string"==typeof(i=t)?i:String(i),void 0,Le);var i},Re=Pe?e=>e:e=>e instanceof CSSStyleSheet?ze(e):e
|
|
61
61
|
/**
|
|
62
62
|
* @license
|
|
63
63
|
* Copyright 2017 Google LLC
|
|
@@ -67,7 +67,7 @@ const Ae=globalThis,Pe=Ae.ShadowRoot&&(void 0===Ae.ShadyCSS||Ae.ShadyCSS.nativeS
|
|
|
67
67
|
* @license
|
|
68
68
|
* Copyright 2017 Google LLC
|
|
69
69
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
70
|
-
*/;let it;{const e=globalThis.litIssuedWarnings??=new Set;it=(t,i)=>{i+=` See https://lit.dev/msg/${t} for more information.`,e.has(i)||(console.warn(i),e.add(i))}}class lt extends tt{constructor(){super(...arguments),this.renderOptions={host:this},this.__childPart=void 0}createRenderRoot(){const e=super.createRenderRoot();return this.renderOptions.renderBefore??=e.firstChild,e}update(e){const t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this.__childPart=Ve(t,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this.__childPart?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this.__childPart?.setConnected(!1)}render(){return de}}var ot;lt._$litElement$=!0,lt[(ot="finalized",ot)]=!0,globalThis.litElementHydrateSupport?.({LitElement:lt});const at=globalThis.litElementPolyfillSupportDevMode;at?.({LitElement:lt}),(globalThis.litElementVersions??=[]).push("4.1.0"),globalThis.litElementVersions.length>1&&it("multiple-versions","Multiple versions of Lit loaded. Loading multiple versions is not recommended.");var nt=
|
|
70
|
+
*/;let it;{const e=globalThis.litIssuedWarnings??=new Set;it=(t,i)=>{i+=` See https://lit.dev/msg/${t} for more information.`,e.has(i)||(console.warn(i),e.add(i))}}class lt extends tt{constructor(){super(...arguments),this.renderOptions={host:this},this.__childPart=void 0}createRenderRoot(){const e=super.createRenderRoot();return this.renderOptions.renderBefore??=e.firstChild,e}update(e){const t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this.__childPart=Ve(t,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this.__childPart?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this.__childPart?.setConnected(!1)}render(){return de}}var ot;lt._$litElement$=!0,lt[(ot="finalized",ot)]=!0,globalThis.litElementHydrateSupport?.({LitElement:lt});const at=globalThis.litElementPolyfillSupportDevMode;at?.({LitElement:lt}),(globalThis.litElementVersions??=[]).push("4.1.0"),globalThis.litElementVersions.length>1&&it("multiple-versions","Multiple versions of Lit loaded. Loading multiple versions is not recommended.");var nt=Oe`:host{-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:rgba(0,0,0,0);color:var(--sgds-body-color-default);font-family:var(--sgds-font-family-brand);font-size:var(--sgds-font-size-2);font-weight:var(--sgds-font-weight-regular);line-height:var(--sgds-line-height-24);margin:0;*,:after,:before{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}:disabled{cursor:not-allowed}@media (prefers-reduced-motion:no-preference){:root{scroll-behavior:smooth}}::slotted(a[target=_blank]):after,a[target=_blank]:after{background-color:currentColor;content:"/";display:inline-block;height:var(--sgds-icon-size-lg);margin-left:.25rem;-webkit-mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M9.774 4.4H9.8a.6.6 0 1 1 0 1.2c-.85 0-1.451 0-1.922.039-.463.038-.745.11-.968.223A2.4 2.4 0 0 0 5.861 6.91c-.113.223-.184.505-.222.968-.039.47-.04 1.072-.04 1.922v4.4c0 .85.001 1.451.04 1.922.038.463.11.745.222.968a2.4 2.4 0 0 0 1.05 1.048c.222.114.504.185.967.223.47.038 1.072.039 1.922.039h4.4c.85 0 1.451 0 1.921-.039.464-.038.746-.11.969-.223a2.4 2.4 0 0 0 1.048-1.048c.113-.223.185-.505.223-.968.038-.47.039-1.072.039-1.922a.6.6 0 1 1 1.2 0v.026c0 .818 0 1.468-.043 1.993-.044.538-.136.996-.35 1.415a3.6 3.6 0 0 1-1.573 1.574c-.42.213-.878.305-1.415.35-.525.042-1.175.042-1.993.042H9.774c-.818 0-1.469 0-1.993-.043-.538-.044-.996-.136-1.415-.35a3.6 3.6 0 0 1-1.574-1.573c-.213-.42-.305-.877-.35-1.415-.042-.525-.042-1.175-.042-1.993V9.774c0-.818 0-1.468.043-1.993.044-.538.136-.996.35-1.415a3.6 3.6 0 0 1 1.573-1.574c.42-.213.877-.305 1.415-.35C8.305 4.4 8.956 4.4 9.774 4.4ZM12.4 5a.6.6 0 0 1 .6-.6h6a.6.6 0 0 1 .6.6v6a.6.6 0 1 1-1.2 0V6.449l-5.976 5.975a.6.6 0 0 1-.848-.848L17.55 5.6H13a.6.6 0 0 1-.6-.6Z' fill='%230E0E0E'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M9.774 4.4H9.8a.6.6 0 1 1 0 1.2c-.85 0-1.451 0-1.922.039-.463.038-.745.11-.968.223A2.4 2.4 0 0 0 5.861 6.91c-.113.223-.184.505-.222.968-.039.47-.04 1.072-.04 1.922v4.4c0 .85.001 1.451.04 1.922.038.463.11.745.222.968a2.4 2.4 0 0 0 1.05 1.048c.222.114.504.185.967.223.47.038 1.072.039 1.922.039h4.4c.85 0 1.451 0 1.921-.039.464-.038.746-.11.969-.223a2.4 2.4 0 0 0 1.048-1.048c.113-.223.185-.505.223-.968.038-.47.039-1.072.039-1.922a.6.6 0 1 1 1.2 0v.026c0 .818 0 1.468-.043 1.993-.044.538-.136.996-.35 1.415a3.6 3.6 0 0 1-1.573 1.574c-.42.213-.878.305-1.415.35-.525.042-1.175.042-1.993.042H9.774c-.818 0-1.469 0-1.993-.043-.538-.044-.996-.136-1.415-.35a3.6 3.6 0 0 1-1.574-1.573c-.213-.42-.305-.877-.35-1.415-.042-.525-.042-1.175-.042-1.993V9.774c0-.818 0-1.468.043-1.993.044-.538.136-.996.35-1.415a3.6 3.6 0 0 1 1.573-1.574c.42-.213.877-.305 1.415-.35C8.305 4.4 8.956 4.4 9.774 4.4ZM12.4 5a.6.6 0 0 1 .6-.6h6a.6.6 0 0 1 .6.6v6a.6.6 0 1 1-1.2 0V6.449l-5.976 5.975a.6.6 0 0 1-.848-.848L17.55 5.6H13a.6.6 0 0 1-.6-.6Z' fill='%230E0E0E'/%3E%3C/svg%3E");-webkit-mask-position:center;mask-position:center;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;vertical-align:bottom;width:var(--sgds-icon-size-lg)}::slotted(svg){vertical-align:middle}}`;class rt extends lt{emit(e,t){const i=new CustomEvent(e,Object.assign({bubbles:!0,cancelable:!1,composed:!0,detail:{}},t));return this.dispatchEvent(i),i}static define(e,t=this,i={}){if(customElements.get(e));else try{customElements.define(e,t,i)}catch(l){customElements.define(e,class extends t{},i)}}constructor(){super(),this.ssr=Boolean(this.shadowRoot),Object.entries(this.constructor.dependencies).forEach((([e,t])=>{this.constructor.define(e,t)}))}firstUpdated(e){var t;super.firstUpdated(e),this.ssr&&(null===(t=this.shadowRoot)||void 0===t||t.querySelectorAll("slot").forEach((e=>{e.dispatchEvent(new Event("slotchange",{bubbles:!0,composed:!1,cancelable:!1}))})))}}rt.styles=[nt],rt.dependencies={},e([S({type:Boolean,reflect:!0})],rt.prototype,"ssr",void 0);var st=Oe`:host([size=sm]) .overflow-btn{height:var(--sgds-dimension-24);width:var(--sgds-dimension-24)}.overflow-btn{align-items:center;background-color:var(--sgds-bg-transparent);border:0;border-radius:var(--sgds-border-radius-sm);cursor:pointer;display:flex;height:var(--sgds-dimension-32);justify-content:center;padding:0;position:relative;width:var(--sgds-dimension-32)}.overflow-btn:hover{background-color:var(--sgds-bg-translucent-subtle)}.overflow-btn:focus-visible{background-color:var(--sgds-bg-translucent-subtle);outline:var(--sgds-outline-focus);outline-offset:var(--sgds-outline-offset-focus)}`
|
|
71
71
|
/**
|
|
72
72
|
* @license
|
|
73
73
|
* Copyright 2020 Google LLC
|
|
@@ -87,7 +87,7 @@ const Ae=globalThis,Pe=Ae.ShadowRoot&&(void 0===Ae.ShadyCSS||Ae.ShadyCSS.nativeS
|
|
|
87
87
|
* @license
|
|
88
88
|
* Copyright 2020 Google LLC
|
|
89
89
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
90
|
-
*/const yt=()=>new Ct;class Ct{}const bt=new WeakMap;const Zt=ht(class extends xt{render(e){return he}update(e,[t]){const i=t!==this._ref;return i&&void 0!==this._ref&&this._updateRefValue(void 0),(i||this._lastElementForRef!==this._element)&&(this._ref=t,this._context=e.options?.host,this._updateRefValue(this._element=e.element)),he}_updateRefValue(e){if(this.isConnected||(e=void 0),"function"==typeof this._ref){const t=this._context??globalThis;let i=bt.get(t);void 0===i&&(i=new WeakMap,bt.set(t,i)),void 0!==i.get(this._ref)&&this._ref.call(this._context,void 0),i.set(this._ref,e),void 0!==e&&this._ref.call(this._context,e)}else this._ref.value=e}get _lastElementForRef(){return"function"==typeof this._ref?bt.get(this._context??globalThis)?.get(this._ref):this._ref?.value}disconnected(){this._lastElementForRef===this._element&&this._updateRefValue(void 0)}reconnected(){this._updateRefValue(this._element)}}),_t=Math.min,Mt=Math.max,Vt=Math.round,Ht=Math.floor,St=e=>({x:e,y:e}),kt={left:"right",right:"left",bottom:"top",top:"bottom"},$t={start:"end",end:"start"};function Bt(e,t,i){return Mt(e,_t(t,i))}function At(e,t){return"function"==typeof e?e(t):e}function Pt(e){return e.split("-")[0]}function Lt(e){return e.split("-")[1]}function Et(e){return"x"===e?"y":"x"}function Tt(e){return"y"===e?"height":"width"}const zt=new Set(["top","bottom"]);function Ot(e){return zt.has(Pt(e))?"y":"x"}function Rt(e){return Et(Ot(e))}function Ut(e,t,i){void 0===i&&(i=!1);const l=Lt(e),o=Rt(e),a=Tt(o);let n="x"===o?l===(i?"end":"start")?"right":"left":"start"===l?"bottom":"top";return t.reference[a]>t.floating[a]&&(n=jt(n)),[n,jt(n)]}function Nt(e){return e.replace(/start|end/g,(e=>$t[e]))}const Dt=["left","right"],It=["right","left"],Wt=["top","bottom"],Ft=["bottom","top"];function qt(e,t,i,l){const o=Lt(e);let a=function(e,t,i){switch(e){case"top":case"bottom":return i?t?It:Dt:t?Dt:It;case"left":case"right":return t?Wt:Ft;default:return[]}}(Pt(e),"start"===i,l);return o&&(a=a.map((e=>e+"-"+o)),t&&(a=a.concat(a.map(Nt)))),a}function jt(e){return e.replace(/left|right|bottom|top/g,(e=>kt[e]))}function Jt(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function Kt(e){const{x:t,y:i,width:l,height:o}=e;return{width:l,height:o,top:i,left:t,right:t+l,bottom:i+o,x:t,y:i}}function Yt(e,t,i){let{reference:l,floating:o}=e;const a=Ot(t),n=Rt(t),r=Tt(n),s=Pt(t),c="y"===a,d=l.x+l.width/2-o.width/2,h=l.y+l.height/2-o.height/2,v=l[r]/2-o[r]/2;let p;switch(s){case"top":p={x:d,y:l.y-o.height};break;case"bottom":p={x:d,y:l.y+l.height};break;case"right":p={x:l.x+l.width,y:h};break;case"left":p={x:l.x-o.width,y:h};break;default:p={x:l.x,y:l.y}}switch(Lt(t)){case"start":p[n]-=v*(i&&c?-1:1);break;case"end":p[n]+=v*(i&&c?-1:1)}return p}async function Xt(e,t){var i;void 0===t&&(t={});const{x:l,y:o,platform:a,rects:n,elements:r,strategy:s}=e,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:h="floating",altBoundary:v=!1,padding:p=0}=At(t,e),u=Jt(p),g=r[v?"floating"===h?"reference":"floating":h],f=Kt(await a.getClippingRect({element:null==(i=await(null==a.isElement?void 0:a.isElement(g)))||i?g:g.contextElement||await(null==a.getDocumentElement?void 0:a.getDocumentElement(r.floating)),boundary:c,rootBoundary:d,strategy:s})),w="floating"===h?{x:l,y:o,width:n.floating.width,height:n.floating.height}:n.reference,m=await(null==a.getOffsetParent?void 0:a.getOffsetParent(r.floating)),x=await(null==a.isElement?void 0:a.isElement(m))&&await(null==a.getScale?void 0:a.getScale(m))||{x:1,y:1},y=Kt(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:r,rect:w,offsetParent:m,strategy:s}):w);return{top:(f.top-y.top+u.top)/x.y,bottom:(y.bottom-f.bottom+u.bottom)/x.y,left:(f.left-y.left+u.left)/x.x,right:(y.right-f.right+u.right)/x.x}}const Gt=new Set(["left","top"]);function Qt(){return"undefined"!=typeof window}function ei(e){return li(e)?(e.nodeName||"").toLowerCase():"#document"}function ti(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function ii(e){var t;return null==(t=(li(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function li(e){return!!Qt()&&(e instanceof Node||e instanceof ti(e).Node)}function oi(e){return!!Qt()&&(e instanceof Element||e instanceof ti(e).Element)}function ai(e){return!!Qt()&&(e instanceof HTMLElement||e instanceof ti(e).HTMLElement)}function ni(e){return!(!Qt()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof ti(e).ShadowRoot)}const ri=new Set(["inline","contents"]);function si(e){const{overflow:t,overflowX:i,overflowY:l,display:o}=yi(e);return/auto|scroll|overlay|hidden|clip/.test(t+l+i)&&!ri.has(o)}const ci=new Set(["table","td","th"]);function di(e){return ci.has(ei(e))}const hi=[":popover-open",":modal"];function vi(e){return hi.some((t=>{try{return e.matches(t)}catch(e){return!1}}))}const pi=["transform","translate","scale","rotate","perspective"],ui=["transform","translate","scale","rotate","perspective","filter"],gi=["paint","layout","strict","content"];function fi(e){const t=wi(),i=oi(e)?yi(e):e;return pi.some((e=>!!i[e]&&"none"!==i[e]))||!!i.containerType&&"normal"!==i.containerType||!t&&!!i.backdropFilter&&"none"!==i.backdropFilter||!t&&!!i.filter&&"none"!==i.filter||ui.some((e=>(i.willChange||"").includes(e)))||gi.some((e=>(i.contain||"").includes(e)))}function wi(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}const mi=new Set(["html","body","#document"]);function xi(e){return mi.has(ei(e))}function yi(e){return ti(e).getComputedStyle(e)}function Ci(e){return oi(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function bi(e){if("html"===ei(e))return e;const t=e.assignedSlot||e.parentNode||ni(e)&&e.host||ii(e);return ni(t)?t.host:t}function Zi(e){const t=bi(e);return xi(t)?e.ownerDocument?e.ownerDocument.body:e.body:ai(t)&&si(t)?t:Zi(t)}function _i(e,t,i){var l;void 0===t&&(t=[]),void 0===i&&(i=!0);const o=Zi(e),a=o===(null==(l=e.ownerDocument)?void 0:l.body),n=ti(o);if(a){const e=Mi(n);return t.concat(n,n.visualViewport||[],si(o)?o:[],e&&i?_i(e):[])}return t.concat(o,_i(o,[],i))}function Mi(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Vi(e){const t=yi(e);let i=parseFloat(t.width)||0,l=parseFloat(t.height)||0;const o=ai(e),a=o?e.offsetWidth:i,n=o?e.offsetHeight:l,r=Vt(i)!==a||Vt(l)!==n;return r&&(i=a,l=n),{width:i,height:l,$:r}}function Hi(e){return oi(e)?e:e.contextElement}function Si(e){const t=Hi(e);if(!ai(t))return St(1);const i=t.getBoundingClientRect(),{width:l,height:o,$:a}=Vi(t);let n=(a?Vt(i.width):i.width)/l,r=(a?Vt(i.height):i.height)/o;return n&&Number.isFinite(n)||(n=1),r&&Number.isFinite(r)||(r=1),{x:n,y:r}}const ki=St(0);function $i(e){const t=ti(e);return wi()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:ki}function Bi(e,t,i,l){void 0===t&&(t=!1),void 0===i&&(i=!1);const o=e.getBoundingClientRect(),a=Hi(e);let n=St(1);t&&(l?oi(l)&&(n=Si(l)):n=Si(e));const r=function(e,t,i){return void 0===t&&(t=!1),!(!i||t&&i!==ti(e))&&t}(a,i,l)?$i(a):St(0);let s=(o.left+r.x)/n.x,c=(o.top+r.y)/n.y,d=o.width/n.x,h=o.height/n.y;if(a){const e=ti(a),t=l&&oi(l)?ti(l):l;let i=e,o=Mi(i);for(;o&&l&&t!==i;){const e=Si(o),t=o.getBoundingClientRect(),l=yi(o),a=t.left+(o.clientLeft+parseFloat(l.paddingLeft))*e.x,n=t.top+(o.clientTop+parseFloat(l.paddingTop))*e.y;s*=e.x,c*=e.y,d*=e.x,h*=e.y,s+=a,c+=n,i=ti(o),o=Mi(i)}}return Kt({width:d,height:h,x:s,y:c})}function Ai(e,t){const i=Ci(e).scrollLeft;return t?t.left+i:Bi(ii(e)).left+i}function Pi(e,t){const i=e.getBoundingClientRect();return{x:i.left+t.scrollLeft-Ai(e,i),y:i.top+t.scrollTop}}const Li=25;const Ei=new Set(["absolute","fixed"]);function Ti(e,t,i){let l;if("viewport"===t)l=function(e,t){const i=ti(e),l=ii(e),o=i.visualViewport;let a=l.clientWidth,n=l.clientHeight,r=0,s=0;if(o){a=o.width,n=o.height;const e=wi();(!e||e&&"fixed"===t)&&(r=o.offsetLeft,s=o.offsetTop)}const c=Ai(l);if(c<=0){const e=l.ownerDocument,t=e.body,i=getComputedStyle(t),o="CSS1Compat"===e.compatMode&&parseFloat(i.marginLeft)+parseFloat(i.marginRight)||0,n=Math.abs(l.clientWidth-t.clientWidth-o);n<=Li&&(a-=n)}else c<=Li&&(a+=c);return{width:a,height:n,x:r,y:s}}(e,i);else if("document"===t)l=function(e){const t=ii(e),i=Ci(e),l=e.ownerDocument.body,o=Mt(t.scrollWidth,t.clientWidth,l.scrollWidth,l.clientWidth),a=Mt(t.scrollHeight,t.clientHeight,l.scrollHeight,l.clientHeight);let n=-i.scrollLeft+Ai(e);const r=-i.scrollTop;return"rtl"===yi(l).direction&&(n+=Mt(t.clientWidth,l.clientWidth)-o),{width:o,height:a,x:n,y:r}}(ii(e));else if(oi(t))l=function(e,t){const i=Bi(e,!0,"fixed"===t),l=i.top+e.clientTop,o=i.left+e.clientLeft,a=ai(e)?Si(e):St(1);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:o*a.x,y:l*a.y}}(t,i);else{const i=$i(e);l={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return Kt(l)}function zi(e,t){const i=bi(e);return!(i===t||!oi(i)||xi(i))&&("fixed"===yi(i).position||zi(i,t))}function Oi(e,t,i){const l=ai(t),o=ii(t),a="fixed"===i,n=Bi(e,!0,a,t);let r={scrollLeft:0,scrollTop:0};const s=St(0);function c(){s.x=Ai(o)}if(l||!l&&!a)if(("body"!==ei(t)||si(o))&&(r=Ci(t)),l){const e=Bi(t,!0,a,t);s.x=e.x+t.clientLeft,s.y=e.y+t.clientTop}else o&&c();a&&!l&&o&&c();const d=!o||l||a?St(0):Pi(o,r);return{x:n.left+r.scrollLeft-s.x-d.x,y:n.top+r.scrollTop-s.y-d.y,width:n.width,height:n.height}}function Ri(e){return"static"===yi(e).position}function Ui(e,t){if(!ai(e)||"fixed"===yi(e).position)return null;if(t)return t(e);let i=e.offsetParent;return ii(e)===i&&(i=i.ownerDocument.body),i}function Ni(e,t){const i=ti(e);if(vi(e))return i;if(!ai(e)){let t=bi(e);for(;t&&!xi(t);){if(oi(t)&&!Ri(t))return t;t=bi(t)}return i}let l=Ui(e,t);for(;l&&di(l)&&Ri(l);)l=Ui(l,t);return l&&xi(l)&&Ri(l)&&!fi(l)?i:l||function(e){let t=bi(e);for(;ai(t)&&!xi(t);){if(fi(t))return t;if(vi(t))return null;t=bi(t)}return null}(e)||i}const Di={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:i,offsetParent:l,strategy:o}=e;const a="fixed"===o,n=ii(l),r=!!t&&vi(t.floating);if(l===n||r&&a)return i;let s={scrollLeft:0,scrollTop:0},c=St(1);const d=St(0),h=ai(l);if((h||!h&&!a)&&(("body"!==ei(l)||si(n))&&(s=Ci(l)),ai(l))){const e=Bi(l);c=Si(l),d.x=e.x+l.clientLeft,d.y=e.y+l.clientTop}const v=!n||h||a?St(0):Pi(n,s);return{width:i.width*c.x,height:i.height*c.y,x:i.x*c.x-s.scrollLeft*c.x+d.x+v.x,y:i.y*c.y-s.scrollTop*c.y+d.y+v.y}},getDocumentElement:ii,getClippingRect:function(e){let{element:t,boundary:i,rootBoundary:l,strategy:o}=e;const a=[..."clippingAncestors"===i?vi(t)?[]:function(e,t){const i=t.get(e);if(i)return i;let l=_i(e,[],!1).filter((e=>oi(e)&&"body"!==ei(e))),o=null;const a="fixed"===yi(e).position;let n=a?bi(e):e;for(;oi(n)&&!xi(n);){const t=yi(n),i=fi(n);i||"fixed"!==t.position||(o=null),(a?!i&&!o:!i&&"static"===t.position&&o&&Ei.has(o.position)||si(n)&&!i&&zi(e,n))?l=l.filter((e=>e!==n)):o=t,n=bi(n)}return t.set(e,l),l}(t,this._c):[].concat(i),l],n=a[0],r=a.reduce(((e,i)=>{const l=Ti(t,i,o);return e.top=Mt(l.top,e.top),e.right=_t(l.right,e.right),e.bottom=_t(l.bottom,e.bottom),e.left=Mt(l.left,e.left),e}),Ti(t,n,o));return{width:r.right-r.left,height:r.bottom-r.top,x:r.left,y:r.top}},getOffsetParent:Ni,getElementRects:async function(e){const t=this.getOffsetParent||Ni,i=this.getDimensions,l=await i(e.floating);return{reference:Oi(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:l.width,height:l.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:i}=Vi(e);return{width:t,height:i}},getScale:Si,isElement:oi,isRTL:function(e){return"rtl"===yi(e).direction}};function Ii(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Wi(e,t,i,l){void 0===l&&(l={});const{ancestorScroll:o=!0,ancestorResize:a=!0,elementResize:n="function"==typeof ResizeObserver,layoutShift:r="function"==typeof IntersectionObserver,animationFrame:s=!1}=l,c=Hi(e),d=o||a?[...c?_i(c):[],..._i(t)]:[];d.forEach((e=>{o&&e.addEventListener("scroll",i,{passive:!0}),a&&e.addEventListener("resize",i)}));const h=c&&r?function(e,t){let i,l=null;const o=ii(e);function a(){var e;clearTimeout(i),null==(e=l)||e.disconnect(),l=null}return function n(r,s){void 0===r&&(r=!1),void 0===s&&(s=1),a();const c=e.getBoundingClientRect(),{left:d,top:h,width:v,height:p}=c;if(r||t(),!v||!p)return;const u={rootMargin:-Ht(h)+"px "+-Ht(o.clientWidth-(d+v))+"px "+-Ht(o.clientHeight-(h+p))+"px "+-Ht(d)+"px",threshold:Mt(0,_t(1,s))||1};let g=!0;function f(t){const l=t[0].intersectionRatio;if(l!==s){if(!g)return n();l?n(!1,l):i=setTimeout((()=>{n(!1,1e-7)}),1e3)}1!==l||Ii(c,e.getBoundingClientRect())||n(),g=!1}try{l=new IntersectionObserver(f,{...u,root:o.ownerDocument})}catch(e){l=new IntersectionObserver(f,u)}l.observe(e)}(!0),a}(c,i):null;let v,p=-1,u=null;n&&(u=new ResizeObserver((e=>{let[l]=e;l&&l.target===c&&u&&(u.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame((()=>{var e;null==(e=u)||e.observe(t)}))),i()})),c&&!s&&u.observe(c),u.observe(t));let g=s?Bi(e):null;return s&&function t(){const l=Bi(e);g&&!Ii(g,l)&&i();g=l,v=requestAnimationFrame(t)}(),i(),()=>{var e;d.forEach((e=>{o&&e.removeEventListener("scroll",i),a&&e.removeEventListener("resize",i)})),null==h||h(),null==(e=u)||e.disconnect(),u=null,s&&cancelAnimationFrame(v)}}const Fi=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var i,l;const{x:o,y:a,placement:n,middlewareData:r}=t,s=await async function(e,t){const{placement:i,platform:l,elements:o}=e,a=await(null==l.isRTL?void 0:l.isRTL(o.floating)),n=Pt(i),r=Lt(i),s="y"===Ot(i),c=Gt.has(n)?-1:1,d=a&&s?-1:1,h=At(t,e);let{mainAxis:v,crossAxis:p,alignmentAxis:u}="number"==typeof h?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return r&&"number"==typeof u&&(p="end"===r?-1*u:u),s?{x:p*d,y:v*c}:{x:v*c,y:p*d}}(t,e);return n===(null==(i=r.offset)?void 0:i.placement)&&null!=(l=r.arrow)&&l.alignmentOffset?{}:{x:o+s.x,y:a+s.y,data:{...s,placement:n}}}}},qi=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:i,y:l,placement:o}=t,{mainAxis:a=!0,crossAxis:n=!1,limiter:r={fn:e=>{let{x:t,y:i}=e;return{x:t,y:i}}},...s}=At(e,t),c={x:i,y:l},d=await Xt(t,s),h=Ot(Pt(o)),v=Et(h);let p=c[v],u=c[h];if(a){const e="y"===v?"bottom":"right";p=Bt(p+d["y"===v?"top":"left"],p,p-d[e])}if(n){const e="y"===h?"bottom":"right";u=Bt(u+d["y"===h?"top":"left"],u,u-d[e])}const g=r.fn({...t,[v]:p,[h]:u});return{...g,data:{x:g.x-i,y:g.y-l,enabled:{[v]:a,[h]:n}}}}}},ji=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var i,l;const{placement:o,middlewareData:a,rects:n,initialPlacement:r,platform:s,elements:c}=t,{mainAxis:d=!0,crossAxis:h=!0,fallbackPlacements:v,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:u="none",flipAlignment:g=!0,...f}=At(e,t);if(null!=(i=a.arrow)&&i.alignmentOffset)return{};const w=Pt(o),m=Ot(r),x=Pt(r)===r,y=await(null==s.isRTL?void 0:s.isRTL(c.floating)),C=v||(x||!g?[jt(r)]:function(e){const t=jt(e);return[Nt(e),t,Nt(t)]}(r)),b="none"!==u;!v&&b&&C.push(...qt(r,g,u,y));const Z=[r,...C],_=await Xt(t,f),M=[];let V=(null==(l=a.flip)?void 0:l.overflows)||[];if(d&&M.push(_[w]),h){const e=Ut(o,n,y);M.push(_[e[0]],_[e[1]])}if(V=[...V,{placement:o,overflows:M}],!M.every((e=>e<=0))){var H,S;const e=((null==(H=a.flip)?void 0:H.index)||0)+1,t=Z[e];if(t){if(!("alignment"===h&&m!==Ot(t))||V.every((e=>Ot(e.placement)!==m||e.overflows[0]>0)))return{data:{index:e,overflows:V},reset:{placement:t}}}let i=null==(S=V.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:S.placement;if(!i)switch(p){case"bestFit":{var k;const e=null==(k=V.filter((e=>{if(b){const t=Ot(e.placement);return t===m||"y"===t}return!0})).map((e=>[e.placement,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:k[0];e&&(i=e);break}case"initialPlacement":i=r}if(o!==i)return{reset:{placement:i}}}return{}}}},Ji=(e,t,i)=>{const l=new Map,o={platform:Di,...i},a={...o.platform,_c:l};return(async(e,t,i)=>{const{placement:l="bottom",strategy:o="absolute",middleware:a=[],platform:n}=i,r=a.filter(Boolean),s=await(null==n.isRTL?void 0:n.isRTL(t));let c=await n.getElementRects({reference:e,floating:t,strategy:o}),{x:d,y:h}=Yt(c,l,s),v=l,p={},u=0;for(let i=0;i<r.length;i++){const{name:a,fn:g}=r[i],{x:f,y:w,data:m,reset:x}=await g({x:d,y:h,initialPlacement:l,placement:v,strategy:o,middlewareData:p,rects:c,platform:n,elements:{reference:e,floating:t}});d=null!=f?f:d,h=null!=w?w:h,p={...p,[a]:{...p[a],...m}},x&&u<=50&&(u++,"object"==typeof x&&(x.placement&&(v=x.placement),x.rects&&(c=!0===x.rects?await n.getElementRects({reference:e,floating:t,strategy:o}):x.rects),({x:d,y:h}=Yt(c,v,s))),i=-1)}return{x:d,y:h,placement:v,strategy:o,middlewareData:p}})(e,t,{...o,platform:a})};class Ki extends rt{constructor(){super(...arguments),this.myDropdown=yt(),this.dropdownMenuId=function(e="",t=""){return`id-${Math.random().toString().substring(2,6)}-sgds-${e}-${t}`}("dropdown-menu","div"),this.noFlip=!1,this.menuAlignRight=!1,this.drop="down",this.floatingOpts={},this.menuIsOpen=!1,this.close="default",this.disabled=!1,this.readonly=!1,this.menuRef=yt(),this._handleKeyboardMenuEvent=e=>{if(!this.readonly)switch(e.key){case"ArrowDown":case"ArrowUp":e.preventDefault(),this.menuIsOpen||this.showMenu();break;case"Escape":this.hideMenu()}},this._handleClickOutOfElement=e=>{this.menuIsOpen&&(e.composedPath().includes(this)||this.hideMenu())}}connectedCallback(){super.connectedCallback(),"inside"!==this.close&&document.addEventListener("click",this._handleClickOutOfElement),this.addEventListener("keydown",this._handleKeyboardMenuEvent)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("click",this._handleClickOutOfElement),this.removeEventListener("keydown",this._handleKeyboardMenuEvent),this._cleanupAutoUpdate&&(this._cleanupAutoUpdate(),this._cleanupAutoUpdate=void 0)}firstUpdated(e){super.firstUpdated(e),this.menuIsOpen&&this.updateFloatingPosition()}async showMenu(){this.disabled||this.menuIsOpen||(this.menuIsOpen=!0,this.emit("sgds-show"),await this.updateFloatingPosition(),this.emit("sgds-after-show"),this.myDropdown.value&&this.menuRef.value&&(this._cleanupAutoUpdate=Wi(this.myDropdown.value,this.menuRef.value,(()=>this.updateFloatingPosition()))))}async hideMenu(){this.menuIsOpen&&(this.emit("sgds-hide"),this.menuIsOpen=!1,setTimeout((()=>this.emit("sgds-after-hide")),0),this._cleanupAutoUpdate&&(this._cleanupAutoUpdate(),this._cleanupAutoUpdate=void 0))}toggleMenu(){this.menuIsOpen?this.hideMenu():this.showMenu()}mergeMiddleware(e,t){const i=e=>{var t;return(null==e?void 0:e.name)||(null===(t=null==e?void 0:e.constructor)||void 0===t?void 0:t.name)},l=t.map(i),o=e.map((e=>{const o=i(e),a=l.indexOf(o);return-1!==a?t[a]:e})).concat(t.filter((t=>!e.some((e=>i(e)===i(t))))));return o}async updateFloatingPosition(){if(!this.myDropdown.value||!this.menuRef.value)return;let e="bottom-start";switch(this.drop){case"up":e=this.menuAlignRight?"top-end":"top-start";break;case"right":e="right-start";break;case"left":e="left-start";break;case"down":e=this.menuAlignRight?"bottom-end":"bottom-start";break;default:e="bottom-start"}const t=[Fi(8),this.noFlip?void 0:ji(),qi()].filter(Boolean);let i=t;Array.isArray(this.floatingOpts.middleware)&&this.floatingOpts.middleware.length>0&&(i=this.mergeMiddleware(t,this.floatingOpts.middleware.filter(Boolean)));const l=Object.assign(Object.assign({strategy:"fixed",placement:e},this.floatingOpts),{middleware:i}),{x:o,y:a,strategy:n,placement:r}=await Ji(this.myDropdown.value,this.menuRef.value,l);this.menuRef.value.setAttribute("data-placement",r),Object.assign(this.menuRef.value.style,{position:n,left:`${o}px`,top:`${a}px`})}}e([S({type:Boolean,state:!0})],Ki.prototype,"noFlip",void 0),e([S({type:Boolean,reflect:!0,state:!0})],Ki.prototype,"menuAlignRight",void 0),e([S({type:String,reflect:!0,state:!0})],Ki.prototype,"drop",void 0),e([S({type:Object})],Ki.prototype,"floatingOpts",void 0),e([S({type:Boolean,reflect:!0})],Ki.prototype,"menuIsOpen",void 0),e([S({type:Boolean,reflect:!0})],Ki.prototype,"disabled",void 0),e([S({type:Boolean,reflect:!0})],Ki.prototype,"readonly",void 0);class Yi extends Ki{constructor(){super(...arguments),this.nextDropdownItemNo=0,this.prevDropdownItemNo=-1,this.hidden=!1}connectedCallback(){super.connectedCallback(),this.addEventListener("sgds-hide",this._resetMenu)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("sgds-hide",this._resetMenu)}firstUpdated(e){super.firstUpdated(e),this.addEventListener("keydown",this._handleKeyboardMenuItemsEvent)}handleSelectSlot(e){const t=this._getActiveMenuItems(),i=t.indexOf(e.target);this.nextDropdownItemNo=i+1,this.prevDropdownItemNo=i<=0?t.length-1:i-1;e.target.disabled||(this.emit("sgds-select"),"outside"!==this.close&&this.hideMenu())}_resetMenu(){this.nextDropdownItemNo=0,this.prevDropdownItemNo=-1;this._getMenuItems().forEach((e=>{var t;const i=null===(t=null==e?void 0:e.shadowRoot)||void 0===t?void 0:t.querySelector(".dropdown-item");i&&i.removeAttribute("tabindex")}))}_handleKeyboardMenuItemsEvent(e){if(this.readonly)return;const t=this._getActiveMenuItems();if(0!==t.length)switch(e.key){case"ArrowDown":e.preventDefault(),this._setMenuItem(this.nextDropdownItemNo);break;case"ArrowUp":e.preventDefault(),this._setMenuItem(this.prevDropdownItemNo);break;case"Tab":if(!this.menuIsOpen)return;e.preventDefault(),e.shiftKey?this._setMenuItem(this.prevDropdownItemNo):this._setMenuItem(this.nextDropdownItemNo);break;case"Enter":t.includes(e.target)&&this.handleSelectSlot(e)}}_getMenuItems(){var e,t;if(this.shadowRoot.querySelector("slot#default")){return null===(e=this.shadowRoot.querySelector("slot#default"))||void 0===e?void 0:e.assignedElements({flatten:!0}).filter((e=>!e.classList.contains("empty-menu")&&!e.hasAttribute("hidden")))}if(null===(t=this.menu)||void 0===t?void 0:t.hasChildNodes()){return[...Array.from(this.menu.children)]}return[]}_getActiveMenuItems(){return this._getMenuItems().filter((e=>!e.disabled&&!e.hidden))}_setMenuItem(e){const t=this._getActiveMenuItems();if(0===t.length)return;const i=(e%t.length+t.length)%t.length,l=t[i];this.emit("i-sgds-option-focus",{detail:{option:l}}),this.nextDropdownItemNo=(i+1)%t.length,this.prevDropdownItemNo=(i-1+t.length)%t.length,t.forEach((e=>{const t=e.shadowRoot.querySelector(".dropdown-item");t.setAttribute("tabindex",e===l?"0":"-1"),e===l&&t.focus()}))}}Yi.styles=Ki.styles,e([A("ul.dropdown-menu")],Yi.prototype,"menu",void 0),e([k()],Yi.prototype,"nextDropdownItemNo",void 0),e([k()],Yi.prototype,"prevDropdownItemNo",void 0),e([S({type:Boolean,reflect:!0})],Yi.prototype,"hidden",void 0);var Xi=ze`:host([menuisopen]) .dropdown-menu{display:block}.dropdown-menu{background-clip:padding-box;background-color:var(--sgds-surface-default);border-radius:var(--sgds-border-radius-md);box-shadow:0 0 1px 0 hsla(0,0%,5%,.12),0 4px 8px 0 hsla(0,0%,5%,.12);color:var(--sgds-color-default);display:none;list-style:none;margin:0;max-height:var(--sgds-dimension-480);min-width:var(--sgds-dimension-280);overflow-y:auto;padding:var(--sgds-padding-xs) 0;position:absolute;text-align:left;z-index:1050}.nav-tabs .dropdown-menu{border-top-left-radius:0;border-top-right-radius:0;margin-top:calc(var(--sgds-nav-tabs-border-width)*-1)}@media (min-width:512px){.navbar-expand-sm .navbar-nav .dropdown-menu{position:absolute}}@media (min-width:768px){.navbar-expand-md .navbar-nav .dropdown-menu{position:absolute}}@media (min-width:1024px){.navbar-expand-lg .navbar-nav .dropdown-menu{position:absolute}}@media (min-width:1280px){.navbar-expand-xl .navbar-nav .dropdown-menu{position:absolute}}@media (min-width:1440px){.navbar-expand-xxl .navbar-nav .dropdown-menu{position:absolute}}.navbar-expand .navbar-nav .dropdown-menu{position:absolute}.sgds.navbar .dropdown-menu.megamenu{left:0;right:0;width:100%}.sgds.combobox>.dropdown-menu{min-width:100%}`,Gi=ze`.dropdown{display:flex;height:inherit;position:relative}`;class Qi extends Yi{constructor(){super(),this.noFlip=!1,this.menuAlignRight=!1,this.drop="down",this.menuRef=Zt()}async _handleClick(){this.disabled||this.toggleMenu()}_handleCloseMenu(){const e=this._toggler[0];null==e||e.focus()}async connectedCallback(){super.connectedCallback(),this.addEventListener("sgds-hide",this._handleCloseMenu)}async disconnectedCallback(){this.removeEventListener("sgds-hide",this._handleCloseMenu)}async firstUpdated(e){super.firstUpdated(e),this.menuIsOpen&&await this.showMenu(),this._handleDisabled()}_handleDisabled(){const e=this._toggler[0];e&&(this.disabled?e.setAttribute("disabled","true"):e.hasAttribute("disabled")&&e.removeAttribute("disabled"))}render(){return se`
|
|
90
|
+
*/const yt=()=>new Ct;class Ct{}const bt=new WeakMap;const Zt=ht(class extends xt{render(e){return he}update(e,[t]){const i=t!==this._ref;return i&&void 0!==this._ref&&this._updateRefValue(void 0),(i||this._lastElementForRef!==this._element)&&(this._ref=t,this._context=e.options?.host,this._updateRefValue(this._element=e.element)),he}_updateRefValue(e){if(this.isConnected||(e=void 0),"function"==typeof this._ref){const t=this._context??globalThis;let i=bt.get(t);void 0===i&&(i=new WeakMap,bt.set(t,i)),void 0!==i.get(this._ref)&&this._ref.call(this._context,void 0),i.set(this._ref,e),void 0!==e&&this._ref.call(this._context,e)}else this._ref.value=e}get _lastElementForRef(){return"function"==typeof this._ref?bt.get(this._context??globalThis)?.get(this._ref):this._ref?.value}disconnected(){this._lastElementForRef===this._element&&this._updateRefValue(void 0)}reconnected(){this._updateRefValue(this._element)}}),_t=Math.min,Mt=Math.max,Vt=Math.round,Ht=Math.floor,St=e=>({x:e,y:e}),kt={left:"right",right:"left",bottom:"top",top:"bottom"},$t={start:"end",end:"start"};function Bt(e,t,i){return Mt(e,_t(t,i))}function At(e,t){return"function"==typeof e?e(t):e}function Pt(e){return e.split("-")[0]}function Lt(e){return e.split("-")[1]}function Et(e){return"x"===e?"y":"x"}function Tt(e){return"y"===e?"height":"width"}const Ot=new Set(["top","bottom"]);function zt(e){return Ot.has(Pt(e))?"y":"x"}function Rt(e){return Et(zt(e))}function Ut(e,t,i){void 0===i&&(i=!1);const l=Lt(e),o=Rt(e),a=Tt(o);let n="x"===o?l===(i?"end":"start")?"right":"left":"start"===l?"bottom":"top";return t.reference[a]>t.floating[a]&&(n=jt(n)),[n,jt(n)]}function Nt(e){return e.replace(/start|end/g,(e=>$t[e]))}const Dt=["left","right"],It=["right","left"],Wt=["top","bottom"],Ft=["bottom","top"];function qt(e,t,i,l){const o=Lt(e);let a=function(e,t,i){switch(e){case"top":case"bottom":return i?t?It:Dt:t?Dt:It;case"left":case"right":return t?Wt:Ft;default:return[]}}(Pt(e),"start"===i,l);return o&&(a=a.map((e=>e+"-"+o)),t&&(a=a.concat(a.map(Nt)))),a}function jt(e){return e.replace(/left|right|bottom|top/g,(e=>kt[e]))}function Jt(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function Kt(e){const{x:t,y:i,width:l,height:o}=e;return{width:l,height:o,top:i,left:t,right:t+l,bottom:i+o,x:t,y:i}}function Yt(e,t,i){let{reference:l,floating:o}=e;const a=zt(t),n=Rt(t),r=Tt(n),s=Pt(t),c="y"===a,d=l.x+l.width/2-o.width/2,h=l.y+l.height/2-o.height/2,v=l[r]/2-o[r]/2;let p;switch(s){case"top":p={x:d,y:l.y-o.height};break;case"bottom":p={x:d,y:l.y+l.height};break;case"right":p={x:l.x+l.width,y:h};break;case"left":p={x:l.x-o.width,y:h};break;default:p={x:l.x,y:l.y}}switch(Lt(t)){case"start":p[n]-=v*(i&&c?-1:1);break;case"end":p[n]+=v*(i&&c?-1:1)}return p}async function Xt(e,t){var i;void 0===t&&(t={});const{x:l,y:o,platform:a,rects:n,elements:r,strategy:s}=e,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:h="floating",altBoundary:v=!1,padding:p=0}=At(t,e),u=Jt(p),g=r[v?"floating"===h?"reference":"floating":h],f=Kt(await a.getClippingRect({element:null==(i=await(null==a.isElement?void 0:a.isElement(g)))||i?g:g.contextElement||await(null==a.getDocumentElement?void 0:a.getDocumentElement(r.floating)),boundary:c,rootBoundary:d,strategy:s})),w="floating"===h?{x:l,y:o,width:n.floating.width,height:n.floating.height}:n.reference,m=await(null==a.getOffsetParent?void 0:a.getOffsetParent(r.floating)),x=await(null==a.isElement?void 0:a.isElement(m))&&await(null==a.getScale?void 0:a.getScale(m))||{x:1,y:1},y=Kt(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:r,rect:w,offsetParent:m,strategy:s}):w);return{top:(f.top-y.top+u.top)/x.y,bottom:(y.bottom-f.bottom+u.bottom)/x.y,left:(f.left-y.left+u.left)/x.x,right:(y.right-f.right+u.right)/x.x}}const Gt=new Set(["left","top"]);function Qt(){return"undefined"!=typeof window}function ei(e){return li(e)?(e.nodeName||"").toLowerCase():"#document"}function ti(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function ii(e){var t;return null==(t=(li(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function li(e){return!!Qt()&&(e instanceof Node||e instanceof ti(e).Node)}function oi(e){return!!Qt()&&(e instanceof Element||e instanceof ti(e).Element)}function ai(e){return!!Qt()&&(e instanceof HTMLElement||e instanceof ti(e).HTMLElement)}function ni(e){return!(!Qt()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof ti(e).ShadowRoot)}const ri=new Set(["inline","contents"]);function si(e){const{overflow:t,overflowX:i,overflowY:l,display:o}=yi(e);return/auto|scroll|overlay|hidden|clip/.test(t+l+i)&&!ri.has(o)}const ci=new Set(["table","td","th"]);function di(e){return ci.has(ei(e))}const hi=[":popover-open",":modal"];function vi(e){return hi.some((t=>{try{return e.matches(t)}catch(e){return!1}}))}const pi=["transform","translate","scale","rotate","perspective"],ui=["transform","translate","scale","rotate","perspective","filter"],gi=["paint","layout","strict","content"];function fi(e){const t=wi(),i=oi(e)?yi(e):e;return pi.some((e=>!!i[e]&&"none"!==i[e]))||!!i.containerType&&"normal"!==i.containerType||!t&&!!i.backdropFilter&&"none"!==i.backdropFilter||!t&&!!i.filter&&"none"!==i.filter||ui.some((e=>(i.willChange||"").includes(e)))||gi.some((e=>(i.contain||"").includes(e)))}function wi(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}const mi=new Set(["html","body","#document"]);function xi(e){return mi.has(ei(e))}function yi(e){return ti(e).getComputedStyle(e)}function Ci(e){return oi(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function bi(e){if("html"===ei(e))return e;const t=e.assignedSlot||e.parentNode||ni(e)&&e.host||ii(e);return ni(t)?t.host:t}function Zi(e){const t=bi(e);return xi(t)?e.ownerDocument?e.ownerDocument.body:e.body:ai(t)&&si(t)?t:Zi(t)}function _i(e,t,i){var l;void 0===t&&(t=[]),void 0===i&&(i=!0);const o=Zi(e),a=o===(null==(l=e.ownerDocument)?void 0:l.body),n=ti(o);if(a){const e=Mi(n);return t.concat(n,n.visualViewport||[],si(o)?o:[],e&&i?_i(e):[])}return t.concat(o,_i(o,[],i))}function Mi(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Vi(e){const t=yi(e);let i=parseFloat(t.width)||0,l=parseFloat(t.height)||0;const o=ai(e),a=o?e.offsetWidth:i,n=o?e.offsetHeight:l,r=Vt(i)!==a||Vt(l)!==n;return r&&(i=a,l=n),{width:i,height:l,$:r}}function Hi(e){return oi(e)?e:e.contextElement}function Si(e){const t=Hi(e);if(!ai(t))return St(1);const i=t.getBoundingClientRect(),{width:l,height:o,$:a}=Vi(t);let n=(a?Vt(i.width):i.width)/l,r=(a?Vt(i.height):i.height)/o;return n&&Number.isFinite(n)||(n=1),r&&Number.isFinite(r)||(r=1),{x:n,y:r}}const ki=St(0);function $i(e){const t=ti(e);return wi()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:ki}function Bi(e,t,i,l){void 0===t&&(t=!1),void 0===i&&(i=!1);const o=e.getBoundingClientRect(),a=Hi(e);let n=St(1);t&&(l?oi(l)&&(n=Si(l)):n=Si(e));const r=function(e,t,i){return void 0===t&&(t=!1),!(!i||t&&i!==ti(e))&&t}(a,i,l)?$i(a):St(0);let s=(o.left+r.x)/n.x,c=(o.top+r.y)/n.y,d=o.width/n.x,h=o.height/n.y;if(a){const e=ti(a),t=l&&oi(l)?ti(l):l;let i=e,o=Mi(i);for(;o&&l&&t!==i;){const e=Si(o),t=o.getBoundingClientRect(),l=yi(o),a=t.left+(o.clientLeft+parseFloat(l.paddingLeft))*e.x,n=t.top+(o.clientTop+parseFloat(l.paddingTop))*e.y;s*=e.x,c*=e.y,d*=e.x,h*=e.y,s+=a,c+=n,i=ti(o),o=Mi(i)}}return Kt({width:d,height:h,x:s,y:c})}function Ai(e,t){const i=Ci(e).scrollLeft;return t?t.left+i:Bi(ii(e)).left+i}function Pi(e,t){const i=e.getBoundingClientRect();return{x:i.left+t.scrollLeft-Ai(e,i),y:i.top+t.scrollTop}}const Li=25;const Ei=new Set(["absolute","fixed"]);function Ti(e,t,i){let l;if("viewport"===t)l=function(e,t){const i=ti(e),l=ii(e),o=i.visualViewport;let a=l.clientWidth,n=l.clientHeight,r=0,s=0;if(o){a=o.width,n=o.height;const e=wi();(!e||e&&"fixed"===t)&&(r=o.offsetLeft,s=o.offsetTop)}const c=Ai(l);if(c<=0){const e=l.ownerDocument,t=e.body,i=getComputedStyle(t),o="CSS1Compat"===e.compatMode&&parseFloat(i.marginLeft)+parseFloat(i.marginRight)||0,n=Math.abs(l.clientWidth-t.clientWidth-o);n<=Li&&(a-=n)}else c<=Li&&(a+=c);return{width:a,height:n,x:r,y:s}}(e,i);else if("document"===t)l=function(e){const t=ii(e),i=Ci(e),l=e.ownerDocument.body,o=Mt(t.scrollWidth,t.clientWidth,l.scrollWidth,l.clientWidth),a=Mt(t.scrollHeight,t.clientHeight,l.scrollHeight,l.clientHeight);let n=-i.scrollLeft+Ai(e);const r=-i.scrollTop;return"rtl"===yi(l).direction&&(n+=Mt(t.clientWidth,l.clientWidth)-o),{width:o,height:a,x:n,y:r}}(ii(e));else if(oi(t))l=function(e,t){const i=Bi(e,!0,"fixed"===t),l=i.top+e.clientTop,o=i.left+e.clientLeft,a=ai(e)?Si(e):St(1);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:o*a.x,y:l*a.y}}(t,i);else{const i=$i(e);l={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return Kt(l)}function Oi(e,t){const i=bi(e);return!(i===t||!oi(i)||xi(i))&&("fixed"===yi(i).position||Oi(i,t))}function zi(e,t,i){const l=ai(t),o=ii(t),a="fixed"===i,n=Bi(e,!0,a,t);let r={scrollLeft:0,scrollTop:0};const s=St(0);function c(){s.x=Ai(o)}if(l||!l&&!a)if(("body"!==ei(t)||si(o))&&(r=Ci(t)),l){const e=Bi(t,!0,a,t);s.x=e.x+t.clientLeft,s.y=e.y+t.clientTop}else o&&c();a&&!l&&o&&c();const d=!o||l||a?St(0):Pi(o,r);return{x:n.left+r.scrollLeft-s.x-d.x,y:n.top+r.scrollTop-s.y-d.y,width:n.width,height:n.height}}function Ri(e){return"static"===yi(e).position}function Ui(e,t){if(!ai(e)||"fixed"===yi(e).position)return null;if(t)return t(e);let i=e.offsetParent;return ii(e)===i&&(i=i.ownerDocument.body),i}function Ni(e,t){const i=ti(e);if(vi(e))return i;if(!ai(e)){let t=bi(e);for(;t&&!xi(t);){if(oi(t)&&!Ri(t))return t;t=bi(t)}return i}let l=Ui(e,t);for(;l&&di(l)&&Ri(l);)l=Ui(l,t);return l&&xi(l)&&Ri(l)&&!fi(l)?i:l||function(e){let t=bi(e);for(;ai(t)&&!xi(t);){if(fi(t))return t;if(vi(t))return null;t=bi(t)}return null}(e)||i}const Di={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:i,offsetParent:l,strategy:o}=e;const a="fixed"===o,n=ii(l),r=!!t&&vi(t.floating);if(l===n||r&&a)return i;let s={scrollLeft:0,scrollTop:0},c=St(1);const d=St(0),h=ai(l);if((h||!h&&!a)&&(("body"!==ei(l)||si(n))&&(s=Ci(l)),ai(l))){const e=Bi(l);c=Si(l),d.x=e.x+l.clientLeft,d.y=e.y+l.clientTop}const v=!n||h||a?St(0):Pi(n,s);return{width:i.width*c.x,height:i.height*c.y,x:i.x*c.x-s.scrollLeft*c.x+d.x+v.x,y:i.y*c.y-s.scrollTop*c.y+d.y+v.y}},getDocumentElement:ii,getClippingRect:function(e){let{element:t,boundary:i,rootBoundary:l,strategy:o}=e;const a=[..."clippingAncestors"===i?vi(t)?[]:function(e,t){const i=t.get(e);if(i)return i;let l=_i(e,[],!1).filter((e=>oi(e)&&"body"!==ei(e))),o=null;const a="fixed"===yi(e).position;let n=a?bi(e):e;for(;oi(n)&&!xi(n);){const t=yi(n),i=fi(n);i||"fixed"!==t.position||(o=null),(a?!i&&!o:!i&&"static"===t.position&&o&&Ei.has(o.position)||si(n)&&!i&&Oi(e,n))?l=l.filter((e=>e!==n)):o=t,n=bi(n)}return t.set(e,l),l}(t,this._c):[].concat(i),l],n=a[0],r=a.reduce(((e,i)=>{const l=Ti(t,i,o);return e.top=Mt(l.top,e.top),e.right=_t(l.right,e.right),e.bottom=_t(l.bottom,e.bottom),e.left=Mt(l.left,e.left),e}),Ti(t,n,o));return{width:r.right-r.left,height:r.bottom-r.top,x:r.left,y:r.top}},getOffsetParent:Ni,getElementRects:async function(e){const t=this.getOffsetParent||Ni,i=this.getDimensions,l=await i(e.floating);return{reference:zi(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:l.width,height:l.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:i}=Vi(e);return{width:t,height:i}},getScale:Si,isElement:oi,isRTL:function(e){return"rtl"===yi(e).direction}};function Ii(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Wi(e,t,i,l){void 0===l&&(l={});const{ancestorScroll:o=!0,ancestorResize:a=!0,elementResize:n="function"==typeof ResizeObserver,layoutShift:r="function"==typeof IntersectionObserver,animationFrame:s=!1}=l,c=Hi(e),d=o||a?[...c?_i(c):[],..._i(t)]:[];d.forEach((e=>{o&&e.addEventListener("scroll",i,{passive:!0}),a&&e.addEventListener("resize",i)}));const h=c&&r?function(e,t){let i,l=null;const o=ii(e);function a(){var e;clearTimeout(i),null==(e=l)||e.disconnect(),l=null}return function n(r,s){void 0===r&&(r=!1),void 0===s&&(s=1),a();const c=e.getBoundingClientRect(),{left:d,top:h,width:v,height:p}=c;if(r||t(),!v||!p)return;const u={rootMargin:-Ht(h)+"px "+-Ht(o.clientWidth-(d+v))+"px "+-Ht(o.clientHeight-(h+p))+"px "+-Ht(d)+"px",threshold:Mt(0,_t(1,s))||1};let g=!0;function f(t){const l=t[0].intersectionRatio;if(l!==s){if(!g)return n();l?n(!1,l):i=setTimeout((()=>{n(!1,1e-7)}),1e3)}1!==l||Ii(c,e.getBoundingClientRect())||n(),g=!1}try{l=new IntersectionObserver(f,{...u,root:o.ownerDocument})}catch(e){l=new IntersectionObserver(f,u)}l.observe(e)}(!0),a}(c,i):null;let v,p=-1,u=null;n&&(u=new ResizeObserver((e=>{let[l]=e;l&&l.target===c&&u&&(u.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame((()=>{var e;null==(e=u)||e.observe(t)}))),i()})),c&&!s&&u.observe(c),u.observe(t));let g=s?Bi(e):null;return s&&function t(){const l=Bi(e);g&&!Ii(g,l)&&i();g=l,v=requestAnimationFrame(t)}(),i(),()=>{var e;d.forEach((e=>{o&&e.removeEventListener("scroll",i),a&&e.removeEventListener("resize",i)})),null==h||h(),null==(e=u)||e.disconnect(),u=null,s&&cancelAnimationFrame(v)}}const Fi=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var i,l;const{x:o,y:a,placement:n,middlewareData:r}=t,s=await async function(e,t){const{placement:i,platform:l,elements:o}=e,a=await(null==l.isRTL?void 0:l.isRTL(o.floating)),n=Pt(i),r=Lt(i),s="y"===zt(i),c=Gt.has(n)?-1:1,d=a&&s?-1:1,h=At(t,e);let{mainAxis:v,crossAxis:p,alignmentAxis:u}="number"==typeof h?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return r&&"number"==typeof u&&(p="end"===r?-1*u:u),s?{x:p*d,y:v*c}:{x:v*c,y:p*d}}(t,e);return n===(null==(i=r.offset)?void 0:i.placement)&&null!=(l=r.arrow)&&l.alignmentOffset?{}:{x:o+s.x,y:a+s.y,data:{...s,placement:n}}}}},qi=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:i,y:l,placement:o}=t,{mainAxis:a=!0,crossAxis:n=!1,limiter:r={fn:e=>{let{x:t,y:i}=e;return{x:t,y:i}}},...s}=At(e,t),c={x:i,y:l},d=await Xt(t,s),h=zt(Pt(o)),v=Et(h);let p=c[v],u=c[h];if(a){const e="y"===v?"bottom":"right";p=Bt(p+d["y"===v?"top":"left"],p,p-d[e])}if(n){const e="y"===h?"bottom":"right";u=Bt(u+d["y"===h?"top":"left"],u,u-d[e])}const g=r.fn({...t,[v]:p,[h]:u});return{...g,data:{x:g.x-i,y:g.y-l,enabled:{[v]:a,[h]:n}}}}}},ji=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var i,l;const{placement:o,middlewareData:a,rects:n,initialPlacement:r,platform:s,elements:c}=t,{mainAxis:d=!0,crossAxis:h=!0,fallbackPlacements:v,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:u="none",flipAlignment:g=!0,...f}=At(e,t);if(null!=(i=a.arrow)&&i.alignmentOffset)return{};const w=Pt(o),m=zt(r),x=Pt(r)===r,y=await(null==s.isRTL?void 0:s.isRTL(c.floating)),C=v||(x||!g?[jt(r)]:function(e){const t=jt(e);return[Nt(e),t,Nt(t)]}(r)),b="none"!==u;!v&&b&&C.push(...qt(r,g,u,y));const Z=[r,...C],_=await Xt(t,f),M=[];let V=(null==(l=a.flip)?void 0:l.overflows)||[];if(d&&M.push(_[w]),h){const e=Ut(o,n,y);M.push(_[e[0]],_[e[1]])}if(V=[...V,{placement:o,overflows:M}],!M.every((e=>e<=0))){var H,S;const e=((null==(H=a.flip)?void 0:H.index)||0)+1,t=Z[e];if(t){if(!("alignment"===h&&m!==zt(t))||V.every((e=>zt(e.placement)!==m||e.overflows[0]>0)))return{data:{index:e,overflows:V},reset:{placement:t}}}let i=null==(S=V.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:S.placement;if(!i)switch(p){case"bestFit":{var k;const e=null==(k=V.filter((e=>{if(b){const t=zt(e.placement);return t===m||"y"===t}return!0})).map((e=>[e.placement,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:k[0];e&&(i=e);break}case"initialPlacement":i=r}if(o!==i)return{reset:{placement:i}}}return{}}}},Ji=(e,t,i)=>{const l=new Map,o={platform:Di,...i},a={...o.platform,_c:l};return(async(e,t,i)=>{const{placement:l="bottom",strategy:o="absolute",middleware:a=[],platform:n}=i,r=a.filter(Boolean),s=await(null==n.isRTL?void 0:n.isRTL(t));let c=await n.getElementRects({reference:e,floating:t,strategy:o}),{x:d,y:h}=Yt(c,l,s),v=l,p={},u=0;for(let i=0;i<r.length;i++){const{name:a,fn:g}=r[i],{x:f,y:w,data:m,reset:x}=await g({x:d,y:h,initialPlacement:l,placement:v,strategy:o,middlewareData:p,rects:c,platform:n,elements:{reference:e,floating:t}});d=null!=f?f:d,h=null!=w?w:h,p={...p,[a]:{...p[a],...m}},x&&u<=50&&(u++,"object"==typeof x&&(x.placement&&(v=x.placement),x.rects&&(c=!0===x.rects?await n.getElementRects({reference:e,floating:t,strategy:o}):x.rects),({x:d,y:h}=Yt(c,v,s))),i=-1)}return{x:d,y:h,placement:v,strategy:o,middlewareData:p}})(e,t,{...o,platform:a})};class Ki extends rt{constructor(){super(...arguments),this.myDropdown=yt(),this.dropdownMenuId=function(e="",t=""){return`id-${Math.random().toString().substring(2,6)}-sgds-${e}-${t}`}("dropdown-menu","div"),this.noFlip=!1,this.menuAlignRight=!1,this.drop="down",this.floatingOpts={},this.menuIsOpen=!1,this.close="default",this.disabled=!1,this.readonly=!1,this.menuRef=yt(),this._handleKeyboardMenuEvent=e=>{if(!this.readonly)switch(e.key){case"ArrowDown":case"ArrowUp":e.preventDefault(),this.menuIsOpen||this.showMenu();break;case"Escape":this.hideMenu()}},this._handleClickOutOfElement=e=>{this.menuIsOpen&&(e.composedPath().includes(this)||this.hideMenu(!0))}}connectedCallback(){super.connectedCallback(),"inside"!==this.close&&document.addEventListener("click",this._handleClickOutOfElement),this.addEventListener("keydown",this._handleKeyboardMenuEvent)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("click",this._handleClickOutOfElement),this.removeEventListener("keydown",this._handleKeyboardMenuEvent),this._cleanupAutoUpdate&&(this._cleanupAutoUpdate(),this._cleanupAutoUpdate=void 0)}firstUpdated(e){super.firstUpdated(e),this.menuIsOpen&&this.updateFloatingPosition()}async showMenu(){this.disabled||this.menuIsOpen||(this.menuIsOpen=!0,this.emit("sgds-show"),await this.updateFloatingPosition(),this.emit("sgds-after-show"),this.myDropdown.value&&this.menuRef.value&&(this._cleanupAutoUpdate=Wi(this.myDropdown.value,this.menuRef.value,(()=>this.updateFloatingPosition()))))}async hideMenu(e){this.menuIsOpen&&(this.emit("sgds-hide",{detail:{isOutside:e}}),this.menuIsOpen=!1,setTimeout((()=>this.emit("sgds-after-hide")),0),this._cleanupAutoUpdate&&(this._cleanupAutoUpdate(),this._cleanupAutoUpdate=void 0))}toggleMenu(){this.menuIsOpen?this.hideMenu():this.showMenu()}mergeMiddleware(e,t){const i=e=>{var t;return(null==e?void 0:e.name)||(null===(t=null==e?void 0:e.constructor)||void 0===t?void 0:t.name)},l=t.map(i),o=e.map((e=>{const o=i(e),a=l.indexOf(o);return-1!==a?t[a]:e})).concat(t.filter((t=>!e.some((e=>i(e)===i(t))))));return o}async updateFloatingPosition(){if(!this.myDropdown.value||!this.menuRef.value)return;let e="bottom-start";switch(this.drop){case"up":e=this.menuAlignRight?"top-end":"top-start";break;case"right":e="right-start";break;case"left":e="left-start";break;case"down":e=this.menuAlignRight?"bottom-end":"bottom-start";break;default:e="bottom-start"}const t=[Fi(8),this.noFlip?void 0:ji(),qi()].filter(Boolean);let i=t;Array.isArray(this.floatingOpts.middleware)&&this.floatingOpts.middleware.length>0&&(i=this.mergeMiddleware(t,this.floatingOpts.middleware.filter(Boolean)));const l=Object.assign(Object.assign({strategy:"fixed",placement:e},this.floatingOpts),{middleware:i}),{x:o,y:a,strategy:n,placement:r}=await Ji(this.myDropdown.value,this.menuRef.value,l);this.menuRef.value.setAttribute("data-placement",r),Object.assign(this.menuRef.value.style,{position:n,left:`${o}px`,top:`${a}px`})}}e([S({type:Boolean,state:!0})],Ki.prototype,"noFlip",void 0),e([S({type:Boolean,reflect:!0,state:!0})],Ki.prototype,"menuAlignRight",void 0),e([S({type:String,reflect:!0,state:!0})],Ki.prototype,"drop",void 0),e([S({type:Object})],Ki.prototype,"floatingOpts",void 0),e([S({type:Boolean,reflect:!0})],Ki.prototype,"menuIsOpen",void 0),e([S({type:Boolean,reflect:!0})],Ki.prototype,"disabled",void 0),e([S({type:Boolean,reflect:!0})],Ki.prototype,"readonly",void 0);class Yi extends Ki{constructor(){super(...arguments),this.nextDropdownItemNo=0,this.prevDropdownItemNo=-1,this.hidden=!1}connectedCallback(){super.connectedCallback(),this.addEventListener("sgds-hide",this._resetMenu)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("sgds-hide",this._resetMenu)}firstUpdated(e){super.firstUpdated(e),this.addEventListener("keydown",this._handleKeyboardMenuItemsEvent)}handleSelectSlot(e){const t=this._getActiveMenuItems(),i=t.indexOf(e.target);this.nextDropdownItemNo=i+1,this.prevDropdownItemNo=i<=0?t.length-1:i-1;e.target.disabled||(this.emit("sgds-select"),"outside"!==this.close&&this.hideMenu())}_resetMenu(){this.nextDropdownItemNo=0,this.prevDropdownItemNo=-1;this._getMenuItems().forEach((e=>{var t;const i=null===(t=null==e?void 0:e.shadowRoot)||void 0===t?void 0:t.querySelector(".dropdown-item");i&&i.removeAttribute("tabindex")}))}_handleKeyboardMenuItemsEvent(e){if(this.readonly)return;const t=this._getActiveMenuItems();if(0!==t.length)switch(e.key){case"ArrowDown":e.preventDefault(),this._setMenuItem(this.nextDropdownItemNo);break;case"ArrowUp":e.preventDefault(),this._setMenuItem(this.prevDropdownItemNo);break;case"Tab":if(!this.menuIsOpen)return;e.preventDefault(),e.shiftKey?this._setMenuItem(this.prevDropdownItemNo):this._setMenuItem(this.nextDropdownItemNo);break;case"Enter":t.includes(e.target)&&this.handleSelectSlot(e)}}_getMenuItems(){var e,t;if(this.shadowRoot.querySelector("slot#default")){return null===(e=this.shadowRoot.querySelector("slot#default"))||void 0===e?void 0:e.assignedElements({flatten:!0}).filter((e=>!e.classList.contains("empty-menu")&&!e.hasAttribute("hidden")))}if(null===(t=this.menu)||void 0===t?void 0:t.hasChildNodes()){return[...Array.from(this.menu.children)]}return[]}_getActiveMenuItems(){return this._getMenuItems().filter((e=>!e.disabled&&!e.hidden))}_setMenuItem(e){const t=this._getActiveMenuItems();if(0===t.length)return;const i=(e%t.length+t.length)%t.length,l=t[i];this.emit("i-sgds-option-focus",{detail:{option:l}}),this.nextDropdownItemNo=(i+1)%t.length,this.prevDropdownItemNo=(i-1+t.length)%t.length,t.forEach((e=>{const t=e.shadowRoot.querySelector(".dropdown-item");t.setAttribute("tabindex",e===l?"0":"-1"),e===l&&t.focus()}))}}Yi.styles=Ki.styles,e([A("ul.dropdown-menu")],Yi.prototype,"menu",void 0),e([k()],Yi.prototype,"nextDropdownItemNo",void 0),e([k()],Yi.prototype,"prevDropdownItemNo",void 0),e([S({type:Boolean,reflect:!0})],Yi.prototype,"hidden",void 0);var Xi=Oe`:host([menuisopen]) .dropdown-menu{display:block}.dropdown-menu{background-clip:padding-box;background-color:var(--sgds-surface-default);border-radius:var(--sgds-border-radius-md);box-shadow:0 0 1px 0 hsla(0,0%,5%,.12),0 4px 8px 0 hsla(0,0%,5%,.12);color:var(--sgds-color-default);display:none;list-style:none;margin:0;max-height:var(--sgds-dimension-480);min-width:var(--sgds-dimension-280);overflow-y:auto;padding:var(--sgds-padding-xs) 0;position:absolute;text-align:left;z-index:1050}.nav-tabs .dropdown-menu{border-top-left-radius:0;border-top-right-radius:0;margin-top:calc(var(--sgds-nav-tabs-border-width)*-1)}@media (min-width:512px){.navbar-expand-sm .navbar-nav .dropdown-menu{position:absolute}}@media (min-width:768px){.navbar-expand-md .navbar-nav .dropdown-menu{position:absolute}}@media (min-width:1024px){.navbar-expand-lg .navbar-nav .dropdown-menu{position:absolute}}@media (min-width:1280px){.navbar-expand-xl .navbar-nav .dropdown-menu{position:absolute}}@media (min-width:1440px){.navbar-expand-xxl .navbar-nav .dropdown-menu{position:absolute}}.navbar-expand .navbar-nav .dropdown-menu{position:absolute}.sgds.navbar .dropdown-menu.megamenu{left:0;right:0;width:100%}.sgds.combobox>.dropdown-menu{min-width:100%}`,Gi=Oe`.dropdown{display:flex;height:inherit;position:relative}`;class Qi extends Yi{constructor(){super(),this.noFlip=!1,this.menuAlignRight=!1,this.drop="down",this.menuRef=Zt()}async _handleClick(){this.disabled||this.toggleMenu()}_handleCloseMenu(){const e=this._toggler[0];null==e||e.focus()}async connectedCallback(){super.connectedCallback(),this.addEventListener("sgds-hide",this._handleCloseMenu)}async disconnectedCallback(){this.removeEventListener("sgds-hide",this._handleCloseMenu)}async firstUpdated(e){super.firstUpdated(e),this.menuIsOpen&&await this.showMenu(),this._handleDisabled()}_handleDisabled(){const e=this._toggler[0];e&&(this.disabled?e.setAttribute("disabled","true"):e.hasAttribute("disabled")&&e.removeAttribute("disabled"))}render(){return se`
|
|
91
91
|
<div class="dropdown">
|
|
92
92
|
<div
|
|
93
93
|
class="toggler-container"
|
|
@@ -1997,7 +1997,7 @@ class extends vt{constructor(e){if(super(e),e.type!==ct||"class"!==e.name||e.str
|
|
|
1997
1997
|
clip-rule="evenodd"
|
|
1998
1998
|
/>
|
|
1999
1999
|
</svg>
|
|
2000
|
-
`};var il=
|
|
2000
|
+
`};var il=Oe`:host{color:inherit;display:inline-flex;vertical-align:bottom}:host(.icon-left){margin-right:.25rem}:host(.icon-right){margin-left:.25rem}:host([size=xs]) svg{height:var(--sgds-icon-size-xs);width:var(--sgds-icon-size-xs)}:host([size=sm]) svg{height:var(--sgds-icon-size-sm);width:var(--sgds-icon-size-sm)}:host([size=md]) svg{height:var(--sgds-icon-size-md);width:var(--sgds-icon-size-md)}:host([size=xl]) svg{height:var(--sgds-icon-size-xl);width:var(--sgds-icon-size-xl)}:host([size="2-xl"]) svg{height:var(--sgds-icon-size-2-xl);width:var(--sgds-icon-size-2-xl)}:host([size="3-xl"]) svg{height:var(--sgds-icon-size-3-xl);width:var(--sgds-icon-size-3-xl)}svg{display:inline-block;height:var(--sgds-icon-size-lg);width:var(--sgds-icon-size-lg)}`;class ll extends rt{constructor(){super(...arguments),this.size="lg"}_getIconByName(e){if(!e)return;const t=tl[e];if(t)return t;console.warn(`Icon not found: ${e}`)}render(){const e=this._getIconByName(this.name);return e||he}}ll.styles=[...rt.styles,il],e([S({type:String,reflect:!0})],ll.prototype,"name",void 0),e([S({type:String,reflect:!0})],ll.prototype,"size",void 0);var ol=Oe`:host([disabled]){cursor:not-allowed}.dropdown-item{align-items:center;background-color:var(--sgds-bg-transparent);clear:both;color:var(--sgds-color-default);cursor:pointer;display:flex;gap:var(--sgds-gap-sm);padding:var(--sgds-padding-sm) var(--sgds-padding-lg);text-align:inherit}.dropdown-item:hover{background-color:var(--sgds-bg-translucent-subtle)}.dropdown-item:focus,.dropdown-item:focus-visible{background-color:var(--sgds-bg-translucent-subtle)}.dropdown-item:focus-visible{outline:var(--sgds-outline-focus);outline-offset:var(--sgds-outline-offset-focus)}.dropdown-item.active{background-color:var(--sgds-bg-translucent-subtle);color:var(--sgds-primary-color-default);text-decoration:none}.dropdown-item.disabled,.dropdown-item:disabled{opacity:var(--sgds-opacity-50);pointer-events:none}::slotted(*){color:inherit!important;display:flex;gap:var(--sgds-gap-sm);text-decoration:none!important}`;class al extends rt{constructor(){super(...arguments),this.active=!1,this.disabled=!1}connectedCallback(){super.connectedCallback(),this.addEventListener("keydown",(e=>{"Enter"===e.key&&this.anchor[0].click()})),this.addEventListener("click",(()=>{this.anchor.length>0&&this.anchor[0].click()})),this.setAttribute("role","menuitem"),this.setAttribute("aria-disabled",`${this.disabled}`)}render(){return se`
|
|
2001
2001
|
<div
|
|
2002
2002
|
class="dropdown-item ${el({disabled:this.disabled,active:this.active})}"
|
|
2003
2003
|
tabindex=${this.disabled?"-1":"0"}
|
|
@@ -2011,13 +2011,13 @@ class extends vt{constructor(e){if(super(e),e.type!==ct||"class"!==e.name||e.str
|
|
|
2011
2011
|
</button>
|
|
2012
2012
|
<slot></slot>
|
|
2013
2013
|
</sgds-dropdown>
|
|
2014
|
-
`}}nl.styles=[...rt.styles,st],nl.dependencies={"sgds-dropdown":Qi,"sgds-dropdown-item":al,"sgds-icon":ll},e([S({type:String,reflect:!0})],nl.prototype,"size",void 0);var rl=
|
|
2014
|
+
`}}nl.styles=[...rt.styles,st],nl.dependencies={"sgds-dropdown":Qi,"sgds-dropdown-item":al,"sgds-icon":ll},e([S({type:String,reflect:!0})],nl.prototype,"size",void 0);var rl=Oe`.breadcrumb{display:flex;gap:var(--sgds-gap-xs)}`;class sl extends rt{constructor(){super(...arguments),this.ariaLabel="breadcrumb"}_replaceExcessItemsWithDropdown(e){const t=document.createElement("sgds-breadcrumb-item"),i=document.createElement("sgds-overflow-menu");i.setAttribute("aria-haspopup","menu"),i.setAttribute("size","sm");const l=e.filter(((t,l)=>{if(l>0&&l<e.length-2){const e=t.querySelector("a").cloneNode(!0),l=document.createElement("sgds-dropdown-item");return l.appendChild(e),void i.appendChild(l)}return t}));t.appendChild(i),l.splice(1,0,t),this.defaultSlot.replaceWith(...l)}_handleSlotChange(e){const t=e.target.assignedElements({flatten:!0}).filter((e=>"sgds-breadcrumb-item"===e.tagName.toLowerCase()));t.forEach(((e,i)=>{i===t.length-1?(e.setAttribute("aria-current","page"),e.active=!0):e.removeAttribute("aria-current")})),t.length>=5&&this._replaceExcessItemsWithDropdown(t)}render(){return $e`
|
|
2015
2015
|
<div aria-label=${e=this.ariaLabel,e??he}>
|
|
2016
2016
|
<div class="breadcrumb">
|
|
2017
2017
|
<slot @slotchange=${this._handleSlotChange}></slot>
|
|
2018
2018
|
</div>
|
|
2019
2019
|
</div>
|
|
2020
|
-
`;var e}}sl.styles=[...rt.styles,rl],sl.dependencies={"sgds-overflow-menu":nl},e([S({type:String})],sl.prototype,"ariaLabel",void 0),e([A("slot")],sl.prototype,"defaultSlot",void 0);var cl=ze`:host{--color-emphasis:var(--sgds-link-color-emphasis);display:inline-flex;vertical-align:middle}:host([tone=danger]),:host([variant=danger]){--color-emphasis:var(--sgds-danger-color-emphasis)}:host([tone=neutral]),:host([variant=neutral]){--color-emphasis:var(--sgds-color-default)}:host([tone=fixed-light]),:host([variant=light]){--color-emphasis:var(--sgds-color-fixed-light)}:host([variant=dark]) :host([tone=fixed-dark]){--color-emphasis:var(--sgds-color-fixed-dark)}:host([tone=danger]) .nav-link::slotted(a),:host([variant=danger]) .nav-link::slotted(a){--sgds-link-color-default:var(--sgds-danger-color-default);color:var(--sgds-link-color-default,--sgds-danger-color-default)}:host([tone=danger]) .nav-link::slotted(a:focus),:host([tone=danger]) .nav-link::slotted(a:focus-visible),:host([tone=danger]) .nav-link::slotted(a:hover),:host([variant=danger]) .nav-link::slotted(a:focus),:host([variant=danger]) .nav-link::slotted(a:focus-visible),:host([variant=danger]) .nav-link::slotted(a:hover){--color-emphasis:var(--sgds-danger-color-emphasis);color:var(--color-emphasis,--sgds-danger-color-emphasis)}:host([tone=neutral]) .nav-link::slotted(a),:host([variant=neutral]) .nav-link::slotted(a){--sgds-link-color-default:var(--sgds-color-default);color:var(--sgds-link-color-default,--sgds-color-default)}:host([tone=neutral]) .nav-link::slotted(a:focus),:host([tone=neutral]) .nav-link::slotted(a:focus-visible),:host([tone=neutral]) .nav-link::slotted(a:hover),:host([variant=neutral]) .nav-link::slotted(a:focus),:host([variant=neutral]) .nav-link::slotted(a:focus-visible),:host([variant=neutral]) .nav-link::slotted(a:hover){--color-emphasis:var(--sgds-color-default);color:var(--color-emphasis,--sgds-color-default)}:host([tone=fixed-light]) .nav-link::slotted(a),:host([variant=light]) .nav-link::slotted(a){--sgds-link-color-default:var(--sgds-color-fixed-light);color:var(--sgds-link-color-default,--sgds-color-fixed-light)}:host([tone=fixed-light]) .nav-link::slotted(a:focus),:host([tone=fixed-light]) .nav-link::slotted(a:focus-visible),:host([tone=fixed-light]) .nav-link::slotted(a:hover),:host([variant=light]) .nav-link::slotted(a:focus),:host([variant=light]) .nav-link::slotted(a:focus-visible),:host([variant=light]) .nav-link::slotted(a:hover){--color-emphasis:var(--sgds-color-fixed-light);color:var(--color-emphasis,--sgds-color-fixed-light)}:host([tone=fixed-dark]) .nav-link::slotted(a),:host([variant=dark]) .nav-link::slotted(a){--sgds-link-color-default:var(--sgds-color-fixed-dark);color:var(--sgds-link-color-default,--sgds-color-fixed-dark)}:host([tone=fixed-dark]) .nav-link::slotted(a:focus),:host([tone=fixed-dark]) .nav-link::slotted(a:focus-visible),:host([tone=fixed-dark]) .nav-link::slotted(a:hover),:host([variant=dark]) .nav-link::slotted(a:focus),:host([variant=dark]) .nav-link::slotted(a:focus-visible),:host([variant=dark]) .nav-link::slotted(a:hover){--color-emphasis:var(--sgds-color-fixed-dark);color:var(--color-emphasis,--sgds-color-fixed-dark)}:host([size=md]) .nav-link::slotted(a){--text-underline-offset:3px;font-size:var(--sgds-font-size-2)!important;line-height:var(--sgds-line-height-24)!important}:host([size=lg]) .nav-link::slotted(a){--text-underline-offset:4px;font-size:var(--sgds-font-size-3)!important;line-height:var(--sgds-line-height-32)!important}:host([size=sm]) .nav-link::slotted(a){--text-underline-offset:2.8px;font-size:var(--sgds-font-size-1)!important;line-height:var(--sgds-line-height-20)!important}:host([size=xs]) .nav-link::slotted(a){--text-underline-offset:2.2px;font-size:var(--sgds-font-size-0)!important;line-height:var(--sgds-line-height-16)!important}.nav-link::slotted(a):after{-webkit-mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M8.145 3.667h.021a.5.5 0 1 1 0 1c-.708 0-1.209 0-1.6.032-.387.032-.622.091-.807.186a2 2 0 0 0-.875.874c-.094.185-.154.42-.185.806-.032.392-.032.893-.032 1.602v3.666c0 .709 0 1.21.032 1.602.031.386.091.621.185.806a2 2 0 0 0 .875.874c.185.095.42.154.806.186.392.032.893.032 1.601.032h3.667c.708 0 1.21 0 1.601-.032.386-.032.622-.091.807-.186a2 2 0 0 0 .874-.874c.095-.185.154-.42.186-.806.032-.392.032-.893.032-1.602a.5.5 0 1 1 1 0v.022c0 .682 0 1.224-.036 1.661-.036.448-.113.83-.29 1.18a3 3 0 0 1-1.312 1.31c-.35.178-.731.255-1.18.292-.436.035-.978.035-1.66.035h-3.71c-.682 0-1.224 0-1.661-.035-.448-.037-.83-.113-1.18-.292a3 3 0 0 1-1.31-1.31c-.179-.35-.255-.732-.292-1.18-.035-.437-.035-.98-.035-1.66V8.144c0-.682 0-1.224.035-1.661.037-.448.113-.83.291-1.18a3 3 0 0 1 1.312-1.31c.35-.178.731-.255 1.179-.292.437-.035.98-.035 1.66-.035Zm2.188.5a.5.5 0 0 1 .5-.5h5a.5.5 0 0 1 .5.5v5a.5.5 0 0 1-1 0V5.374l-4.98 4.98a.5.5 0 0 1-.707-.708l4.98-4.98h-3.793a.5.5 0 0 1-.5-.5Z' fill='%230E0E0E'/%3E%3C/svg%3E")!important;mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M8.145 3.667h.021a.5.5 0 1 1 0 1c-.708 0-1.209 0-1.6.032-.387.032-.622.091-.807.186a2 2 0 0 0-.875.874c-.094.185-.154.42-.185.806-.032.392-.032.893-.032 1.602v3.666c0 .709 0 1.21.032 1.602.031.386.091.621.185.806a2 2 0 0 0 .875.874c.185.095.42.154.806.186.392.032.893.032 1.601.032h3.667c.708 0 1.21 0 1.601-.032.386-.032.622-.091.807-.186a2 2 0 0 0 .874-.874c.095-.185.154-.42.186-.806.032-.392.032-.893.032-1.602a.5.5 0 1 1 1 0v.022c0 .682 0 1.224-.036 1.661-.036.448-.113.83-.29 1.18a3 3 0 0 1-1.312 1.31c-.35.178-.731.255-1.18.292-.436.035-.978.035-1.66.035h-3.71c-.682 0-1.224 0-1.661-.035-.448-.037-.83-.113-1.18-.292a3 3 0 0 1-1.31-1.31c-.179-.35-.255-.732-.292-1.18-.035-.437-.035-.98-.035-1.66V8.144c0-.682 0-1.224.035-1.661.037-.448.113-.83.291-1.18a3 3 0 0 1 1.312-1.31c.35-.178.731-.255 1.179-.292.437-.035.98-.035 1.66-.035Zm2.188.5a.5.5 0 0 1 .5-.5h5a.5.5 0 0 1 .5.5v5a.5.5 0 0 1-1 0V5.374l-4.98 4.98a.5.5 0 0 1-.707-.708l4.98-4.98h-3.793a.5.5 0 0 1-.5-.5Z' fill='%230E0E0E'/%3E%3C/svg%3E")!important}:host([size=xs]) .nav-link::slotted(a):after{height:var(--sgds-icon-size-sm)!important;width:var(--sgds-icon-size-sm)!important}:host([size=sm]) .nav-link::slotted(a):after{height:var(--sgds-icon-size-md)!important;width:var(--sgds-icon-size-md)!important}:host([size=md]) .nav-link::slotted(a):after{height:var(--sgds-icon-size-lg)!important;width:var(--sgds-icon-size-lg)!important}:host([size=lg]) .nav-link::slotted(a):after{height:var(--sgds-icon-size-xl)!important;width:var(--sgds-icon-size-xl)!important}::slotted(*){align-items:center;display:flex}.nav-link::slotted(a:focus-visible:not([disabled])){outline:var(--sgds-outline-focus);outline-offset:var(--sgds-outline-offset-focus)}.nav-link::slotted(a[disabled]){cursor:not-allowed;opacity:var(--sgds-opacity-50)}.nav-link::slotted(a){color:var(--sgds-link-color-default);cursor:pointer}:host(:not([active])) .nav-link::slotted(a:not(:hover)){text-decoration:underline solid transparent!important;text-underline-offset:0;transition:text-underline-offset var(--sgds-motion-duration-standard) var(--sgds-motion-easing-enter),text-decoration-color var(--sgds-motion-duration-standard) var(--sgds-motion-easing-enter)}.nav-link::slotted(a:focus),.nav-link::slotted(a:focus-visible),.nav-link::slotted(a:hover),:host([active]) .nav-link::slotted(a){color:var(--color-emphasis)!important}.nav-link::slotted(a:hover),:host([active]) .nav-link::slotted(a){text-decoration-color:var(--color-emphasis)!important;text-underline-offset:var(--text-underline-offset);transition:text-underline-offset var(--sgds-motion-duration-standard) var(--sgds-motion-easing-enter),text-decoration-color var(--sgds-motion-duration-standard) var(--sgds-motion-easing-enter)}.nav-link::slotted(a[disabled]),:host([disabled]) .nav-link::slotted(a){text-decoration:none!important}@media (prefers-reduced-motion:reduce){.nav-link::slotted(a:hover),:host(:not([active])) .nav-link::slotted(a:not(:hover)),:host([active]) .nav-link::slotted(a){transition:none}}`;class dl extends rt{constructor(){super(...arguments),this.size="md",this.variant="primary",this.tone="primary",this.active=!1,this.disabled=!1}_processAnchor(e){this.disabled&&e.setAttribute("disabled","true"),e.hasAttribute("disabled")?(e.setAttribute("href","javascript:void(0)"),e.setAttribute("tabindex","-1")):e.setAttribute("tabindex","0")}_processIcon(e){const t={xs:"sm",sm:"md",md:"lg",lg:"xl"};e.querySelectorAll("sgds-icon").forEach((e=>{e.setAttribute("size",t[this.size]),e.classList.remove("icon-left","icon-right"),e.previousElementSibling||e.previousSibling||e.classList.add("icon-left"),e.nextElementSibling||e.nextSibling||e.classList.add("icon-right")}))}_handleSlotChange(e){const t=e.target.assignedElements().find((e=>"a"===e.tagName.toLowerCase()));t&&(this._processAnchor(t),this._processIcon(t))}firstUpdated(e){super.firstUpdated(e);const t=this.querySelector("a");t&&(this._processAnchor(t),this._processIcon(t))}render(){return se`<slot class="nav-link " @slotchange=${this._handleSlotChange}></slot> `}}dl.styles=[...rt.styles,cl],e([S({type:String,reflect:!0})],dl.prototype,"size",void 0),e([S({type:String,reflect:!0})],dl.prototype,"variant",void 0),e([S({type:String,reflect:!0})],dl.prototype,"tone",void 0),e([S({type:Boolean,reflect:!0})],dl.prototype,"active",void 0),e([S({type:Boolean,reflect:!0})],dl.prototype,"disabled",void 0);var hl=ze`:host{align-items:center;display:flex;gap:var(--sgds-gap-xs)}:host([active]) .nav-link::slotted(*){--sgds-link-color-default:var(--sgds-color-default);color:var(--sgds-link-color-default,--sgds-color-default);pointer-events:none}:host([active]) .nav-link::slotted(:focus),:host([active]) .nav-link::slotted(:focus-visible),:host([active]) .nav-link::slotted(:hover){--sgds-link-color-emphasis:var(--sgds-color-default);color:var(--sgds-link-color-emphasis,--sgds-color-default)}.separator svg{display:block}:host(:last-of-type) .separator{display:none}`;class vl extends rt{constructor(){super(...arguments),this.active=!1}render(){return se`
|
|
2020
|
+
`;var e}}sl.styles=[...rt.styles,rl],sl.dependencies={"sgds-overflow-menu":nl},e([S({type:String})],sl.prototype,"ariaLabel",void 0),e([A("slot")],sl.prototype,"defaultSlot",void 0);var cl=Oe`:host{--color-emphasis:var(--sgds-link-color-emphasis);display:inline-flex;vertical-align:middle}:host([tone=danger]),:host([variant=danger]){--color-emphasis:var(--sgds-danger-color-emphasis)}:host([tone=neutral]),:host([variant=neutral]){--color-emphasis:var(--sgds-color-default)}:host([tone=fixed-light]),:host([variant=light]){--color-emphasis:var(--sgds-color-fixed-light)}:host([variant=dark]) :host([tone=fixed-dark]){--color-emphasis:var(--sgds-color-fixed-dark)}:host([tone=danger]) .nav-link::slotted(a),:host([variant=danger]) .nav-link::slotted(a){--sgds-link-color-default:var(--sgds-danger-color-default);color:var(--sgds-link-color-default,--sgds-danger-color-default)}:host([tone=danger]) .nav-link::slotted(a:focus),:host([tone=danger]) .nav-link::slotted(a:focus-visible),:host([tone=danger]) .nav-link::slotted(a:hover),:host([variant=danger]) .nav-link::slotted(a:focus),:host([variant=danger]) .nav-link::slotted(a:focus-visible),:host([variant=danger]) .nav-link::slotted(a:hover){--color-emphasis:var(--sgds-danger-color-emphasis);color:var(--color-emphasis,--sgds-danger-color-emphasis)}:host([tone=neutral]) .nav-link::slotted(a),:host([variant=neutral]) .nav-link::slotted(a){--sgds-link-color-default:var(--sgds-color-default);color:var(--sgds-link-color-default,--sgds-color-default)}:host([tone=neutral]) .nav-link::slotted(a:focus),:host([tone=neutral]) .nav-link::slotted(a:focus-visible),:host([tone=neutral]) .nav-link::slotted(a:hover),:host([variant=neutral]) .nav-link::slotted(a:focus),:host([variant=neutral]) .nav-link::slotted(a:focus-visible),:host([variant=neutral]) .nav-link::slotted(a:hover){--color-emphasis:var(--sgds-color-default);color:var(--color-emphasis,--sgds-color-default)}:host([tone=fixed-light]) .nav-link::slotted(a),:host([variant=light]) .nav-link::slotted(a){--sgds-link-color-default:var(--sgds-color-fixed-light);color:var(--sgds-link-color-default,--sgds-color-fixed-light)}:host([tone=fixed-light]) .nav-link::slotted(a:focus),:host([tone=fixed-light]) .nav-link::slotted(a:focus-visible),:host([tone=fixed-light]) .nav-link::slotted(a:hover),:host([variant=light]) .nav-link::slotted(a:focus),:host([variant=light]) .nav-link::slotted(a:focus-visible),:host([variant=light]) .nav-link::slotted(a:hover){--color-emphasis:var(--sgds-color-fixed-light);color:var(--color-emphasis,--sgds-color-fixed-light)}:host([tone=fixed-dark]) .nav-link::slotted(a),:host([variant=dark]) .nav-link::slotted(a){--sgds-link-color-default:var(--sgds-color-fixed-dark);color:var(--sgds-link-color-default,--sgds-color-fixed-dark)}:host([tone=fixed-dark]) .nav-link::slotted(a:focus),:host([tone=fixed-dark]) .nav-link::slotted(a:focus-visible),:host([tone=fixed-dark]) .nav-link::slotted(a:hover),:host([variant=dark]) .nav-link::slotted(a:focus),:host([variant=dark]) .nav-link::slotted(a:focus-visible),:host([variant=dark]) .nav-link::slotted(a:hover){--color-emphasis:var(--sgds-color-fixed-dark);color:var(--color-emphasis,--sgds-color-fixed-dark)}:host([size=md]) .nav-link::slotted(a){--text-underline-offset:3px;font-size:var(--sgds-font-size-2)!important;line-height:var(--sgds-line-height-24)!important}:host([size=lg]) .nav-link::slotted(a){--text-underline-offset:4px;font-size:var(--sgds-font-size-3)!important;line-height:var(--sgds-line-height-32)!important}:host([size=sm]) .nav-link::slotted(a){--text-underline-offset:2.8px;font-size:var(--sgds-font-size-1)!important;line-height:var(--sgds-line-height-20)!important}:host([size=xs]) .nav-link::slotted(a){--text-underline-offset:2.2px;font-size:var(--sgds-font-size-0)!important;line-height:var(--sgds-line-height-16)!important}.nav-link::slotted(a):after{-webkit-mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M8.145 3.667h.021a.5.5 0 1 1 0 1c-.708 0-1.209 0-1.6.032-.387.032-.622.091-.807.186a2 2 0 0 0-.875.874c-.094.185-.154.42-.185.806-.032.392-.032.893-.032 1.602v3.666c0 .709 0 1.21.032 1.602.031.386.091.621.185.806a2 2 0 0 0 .875.874c.185.095.42.154.806.186.392.032.893.032 1.601.032h3.667c.708 0 1.21 0 1.601-.032.386-.032.622-.091.807-.186a2 2 0 0 0 .874-.874c.095-.185.154-.42.186-.806.032-.392.032-.893.032-1.602a.5.5 0 1 1 1 0v.022c0 .682 0 1.224-.036 1.661-.036.448-.113.83-.29 1.18a3 3 0 0 1-1.312 1.31c-.35.178-.731.255-1.18.292-.436.035-.978.035-1.66.035h-3.71c-.682 0-1.224 0-1.661-.035-.448-.037-.83-.113-1.18-.292a3 3 0 0 1-1.31-1.31c-.179-.35-.255-.732-.292-1.18-.035-.437-.035-.98-.035-1.66V8.144c0-.682 0-1.224.035-1.661.037-.448.113-.83.291-1.18a3 3 0 0 1 1.312-1.31c.35-.178.731-.255 1.179-.292.437-.035.98-.035 1.66-.035Zm2.188.5a.5.5 0 0 1 .5-.5h5a.5.5 0 0 1 .5.5v5a.5.5 0 0 1-1 0V5.374l-4.98 4.98a.5.5 0 0 1-.707-.708l4.98-4.98h-3.793a.5.5 0 0 1-.5-.5Z' fill='%230E0E0E'/%3E%3C/svg%3E")!important;mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M8.145 3.667h.021a.5.5 0 1 1 0 1c-.708 0-1.209 0-1.6.032-.387.032-.622.091-.807.186a2 2 0 0 0-.875.874c-.094.185-.154.42-.185.806-.032.392-.032.893-.032 1.602v3.666c0 .709 0 1.21.032 1.602.031.386.091.621.185.806a2 2 0 0 0 .875.874c.185.095.42.154.806.186.392.032.893.032 1.601.032h3.667c.708 0 1.21 0 1.601-.032.386-.032.622-.091.807-.186a2 2 0 0 0 .874-.874c.095-.185.154-.42.186-.806.032-.392.032-.893.032-1.602a.5.5 0 1 1 1 0v.022c0 .682 0 1.224-.036 1.661-.036.448-.113.83-.29 1.18a3 3 0 0 1-1.312 1.31c-.35.178-.731.255-1.18.292-.436.035-.978.035-1.66.035h-3.71c-.682 0-1.224 0-1.661-.035-.448-.037-.83-.113-1.18-.292a3 3 0 0 1-1.31-1.31c-.179-.35-.255-.732-.292-1.18-.035-.437-.035-.98-.035-1.66V8.144c0-.682 0-1.224.035-1.661.037-.448.113-.83.291-1.18a3 3 0 0 1 1.312-1.31c.35-.178.731-.255 1.179-.292.437-.035.98-.035 1.66-.035Zm2.188.5a.5.5 0 0 1 .5-.5h5a.5.5 0 0 1 .5.5v5a.5.5 0 0 1-1 0V5.374l-4.98 4.98a.5.5 0 0 1-.707-.708l4.98-4.98h-3.793a.5.5 0 0 1-.5-.5Z' fill='%230E0E0E'/%3E%3C/svg%3E")!important}:host([size=xs]) .nav-link::slotted(a):after{height:var(--sgds-icon-size-sm)!important;width:var(--sgds-icon-size-sm)!important}:host([size=sm]) .nav-link::slotted(a):after{height:var(--sgds-icon-size-md)!important;width:var(--sgds-icon-size-md)!important}:host([size=md]) .nav-link::slotted(a):after{height:var(--sgds-icon-size-lg)!important;width:var(--sgds-icon-size-lg)!important}:host([size=lg]) .nav-link::slotted(a):after{height:var(--sgds-icon-size-xl)!important;width:var(--sgds-icon-size-xl)!important}::slotted(*){align-items:center;display:flex}.nav-link::slotted(a:focus-visible:not([disabled])){outline:var(--sgds-outline-focus);outline-offset:var(--sgds-outline-offset-focus)}.nav-link::slotted(a[disabled]){cursor:not-allowed;opacity:var(--sgds-opacity-50)}.nav-link::slotted(a){color:var(--sgds-link-color-default)!important;cursor:pointer}:host(:not([active])) .nav-link::slotted(a:not(:hover)){text-decoration:underline solid transparent!important;text-underline-offset:0;transition:text-underline-offset var(--sgds-motion-duration-standard) var(--sgds-motion-easing-enter),text-decoration-color var(--sgds-motion-duration-standard) var(--sgds-motion-easing-enter)}.nav-link::slotted(a:focus),.nav-link::slotted(a:focus-visible),.nav-link::slotted(a:hover),:host([active]) .nav-link::slotted(a){color:var(--color-emphasis)!important}.nav-link::slotted(a:hover),:host([active]) .nav-link::slotted(a){text-decoration-color:var(--color-emphasis)!important;text-underline-offset:var(--text-underline-offset);transition:text-underline-offset var(--sgds-motion-duration-standard) var(--sgds-motion-easing-enter),text-decoration-color var(--sgds-motion-duration-standard) var(--sgds-motion-easing-enter)}.nav-link::slotted(a[disabled]),:host([disabled]) .nav-link::slotted(a){text-decoration:none!important}@media (prefers-reduced-motion:reduce){.nav-link::slotted(a:hover),:host(:not([active])) .nav-link::slotted(a:not(:hover)),:host([active]) .nav-link::slotted(a){transition:none}}`;class dl extends rt{constructor(){super(...arguments),this.size="md",this.variant="primary",this.tone="primary",this.active=!1,this.disabled=!1}_processAnchor(e){this.disabled&&e.setAttribute("disabled","true"),e.hasAttribute("disabled")?(e.setAttribute("href","javascript:void(0)"),e.setAttribute("tabindex","-1")):e.setAttribute("tabindex","0")}_processIcon(e){const t={xs:"sm",sm:"md",md:"lg",lg:"xl"};e.querySelectorAll("sgds-icon").forEach((e=>{e.setAttribute("size",t[this.size]),e.classList.remove("icon-left","icon-right"),e.previousElementSibling||e.previousSibling||e.classList.add("icon-left"),e.nextElementSibling||e.nextSibling||e.classList.add("icon-right")}))}_handleSlotChange(e){const t=e.target.assignedElements().find((e=>"a"===e.tagName.toLowerCase()));t&&(this._processAnchor(t),this._processIcon(t))}firstUpdated(e){super.firstUpdated(e);const t=this.querySelector("a");t&&(this._processAnchor(t),this._processIcon(t))}render(){return se`<slot class="nav-link " @slotchange=${this._handleSlotChange}></slot> `}}dl.styles=[...rt.styles,cl],e([S({type:String,reflect:!0})],dl.prototype,"size",void 0),e([S({type:String,reflect:!0})],dl.prototype,"variant",void 0),e([S({type:String,reflect:!0})],dl.prototype,"tone",void 0),e([S({type:Boolean,reflect:!0})],dl.prototype,"active",void 0),e([S({type:Boolean,reflect:!0})],dl.prototype,"disabled",void 0);var hl=Oe`:host{align-items:center;display:flex;gap:var(--sgds-gap-xs)}:host([active]) .nav-link::slotted(*){--sgds-link-color-default:var(--sgds-color-default);color:var(--sgds-link-color-default,--sgds-color-default);pointer-events:none}:host([active]) .nav-link::slotted(:focus),:host([active]) .nav-link::slotted(:focus-visible),:host([active]) .nav-link::slotted(:hover){--sgds-link-color-emphasis:var(--sgds-color-default);color:var(--sgds-link-color-emphasis,--sgds-color-default)}.separator svg{display:block}:host(:last-of-type) .separator{display:none}`;class vl extends rt{constructor(){super(...arguments),this.active=!1}render(){return se`
|
|
2021
2021
|
<sgds-link><slot class="nav-link"></slot></sgds-link>
|
|
2022
2022
|
<div class="separator">
|
|
2023
2023
|
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="none">
|