@govtechsg/sgds-web-component 3.15.1-rc.0 → 3.15.1-rc.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/components/Accordion/index.umd.min.js +3 -3
- package/components/Accordion/index.umd.min.js.map +1 -1
- package/components/Accordion/sgds-accordion-item.d.ts +3 -0
- package/components/Accordion/sgds-accordion-item.js +6 -1
- package/components/Accordion/sgds-accordion-item.js.map +1 -1
- package/components/Badge/index.umd.min.js +1 -1
- package/components/Badge/index.umd.min.js.map +1 -1
- package/components/Breadcrumb/index.umd.min.js +6 -6
- package/components/Breadcrumb/index.umd.min.js.map +1 -1
- package/components/ComboBox/index.umd.min.js +2 -2
- package/components/ComboBox/index.umd.min.js.map +1 -1
- package/components/Datepicker/index.umd.min.js +1 -1
- package/components/Datepicker/index.umd.min.js.map +1 -1
- package/components/Drawer/drawer.js +1 -1
- package/components/Drawer/index.umd.min.js +1 -1
- package/components/Drawer/index.umd.min.js.map +1 -1
- package/components/Dropdown/dropdown-menu.js +1 -1
- package/components/Dropdown/index.umd.min.js +1 -1
- package/components/Dropdown/index.umd.min.js.map +1 -1
- package/components/Mainnav/index.umd.min.js +9 -9
- package/components/Mainnav/index.umd.min.js.map +1 -1
- package/components/Mainnav/mainnav.js +1 -1
- package/components/Modal/index.umd.min.js +12 -12
- package/components/Modal/index.umd.min.js.map +1 -1
- package/components/Modal/modal.js +1 -1
- package/components/Modal/sgds-modal.d.ts +2 -0
- package/components/Modal/sgds-modal.js +13 -6
- package/components/Modal/sgds-modal.js.map +1 -1
- package/components/OverflowMenu/index.umd.min.js +6 -6
- package/components/OverflowMenu/index.umd.min.js.map +1 -1
- package/components/Select/index.umd.min.js +1 -1
- package/components/Select/index.umd.min.js.map +1 -1
- package/components/Subnav/index.umd.min.js +1 -1
- package/components/Subnav/index.umd.min.js.map +1 -1
- package/components/Subnav/subnav.js +1 -1
- package/components/Table/index.umd.min.js +2 -2
- package/components/Table/index.umd.min.js.map +1 -1
- package/components/Table/table-head.js +1 -1
- package/components/Table/table.js +1 -1
- package/components/Toast/index.umd.min.js +1 -1
- package/components/Toast/index.umd.min.js.map +1 -1
- package/components/Toast/toast-container.js +1 -1
- package/components/Tooltip/index.umd.min.js +1 -1
- package/components/Tooltip/index.umd.min.js.map +1 -1
- package/components/Tooltip/tooltip.js +1 -1
- package/components/index.umd.min.js +18 -18
- package/components/index.umd.min.js.map +1 -1
- package/css/utility.css +26 -4
- package/index.umd.min.js +18 -18
- package/index.umd.min.js.map +1 -1
- package/package.json +1 -1
- package/react/components/Accordion/sgds-accordion-item.cjs.js +6 -1
- package/react/components/Accordion/sgds-accordion-item.cjs.js.map +1 -1
- package/react/components/Accordion/sgds-accordion-item.js +6 -1
- package/react/components/Accordion/sgds-accordion-item.js.map +1 -1
- package/react/components/Drawer/drawer.cjs.js +1 -1
- package/react/components/Drawer/drawer.js +1 -1
- package/react/components/Dropdown/dropdown-menu.cjs.js +1 -1
- package/react/components/Dropdown/dropdown-menu.js +1 -1
- package/react/components/Mainnav/mainnav.cjs.js +1 -1
- package/react/components/Mainnav/mainnav.js +1 -1
- package/react/components/Modal/modal.cjs.js +1 -1
- package/react/components/Modal/modal.js +1 -1
- package/react/components/Modal/sgds-modal.cjs.js +12 -5
- package/react/components/Modal/sgds-modal.cjs.js.map +1 -1
- package/react/components/Modal/sgds-modal.js +13 -6
- package/react/components/Modal/sgds-modal.js.map +1 -1
- package/react/components/Subnav/subnav.cjs.js +1 -1
- package/react/components/Subnav/subnav.js +1 -1
- package/react/components/Table/table-head.cjs.js +1 -1
- package/react/components/Table/table-head.js +1 -1
- package/react/components/Table/table.cjs.js +1 -1
- package/react/components/Table/table.js +1 -1
- package/react/components/Toast/toast-container.cjs.js +1 -1
- package/react/components/Toast/toast-container.js +1 -1
- package/react/components/Tooltip/tooltip.cjs.js +1 -1
- package/react/components/Tooltip/tooltip.js +1 -1
- package/themes/blue.css +11 -0
- package/themes/cyan.css +11 -0
- package/themes/gt/blue.css +11 -0
- package/themes/gt/cyan.css +11 -0
- package/themes/gt/magenta.css +11 -0
- package/themes/gt/pink.css +11 -0
- package/themes/gt/purple.css +11 -0
- package/themes/gt/red.css +11 -0
- package/themes/magenta.css +11 -0
- package/themes/pink.css +11 -0
- package/themes/purple.css +11 -0
- package/themes/red.css +11 -0
- package/themes/root.css +25 -3
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import SgdsElement from "../../base/sgds-element";
|
|
2
|
+
import { AccordionDensity } from "./sgds-accordion";
|
|
2
3
|
/**
|
|
3
4
|
*
|
|
4
5
|
* @event sgds-show - Emitted on show.
|
|
@@ -23,6 +24,8 @@ export declare class SgdsAccordionItem extends SgdsElement {
|
|
|
23
24
|
open: boolean;
|
|
24
25
|
/** Disables the accordion item */
|
|
25
26
|
disabled: boolean;
|
|
27
|
+
/** Controls the density of the individual accordion item. This value is controlled by sgds-accordion */
|
|
28
|
+
density: AccordionDensity;
|
|
26
29
|
private handleSummaryClick;
|
|
27
30
|
private handleSummaryKeyDown;
|
|
28
31
|
handleOpenChange(): Promise<void>;
|
|
@@ -28,6 +28,8 @@ class SgdsAccordionItem extends SgdsElement {
|
|
|
28
28
|
this.open = false;
|
|
29
29
|
/** Disables the accordion item */
|
|
30
30
|
this.disabled = false;
|
|
31
|
+
/** Controls the density of the individual accordion item. This value is controlled by sgds-accordion */
|
|
32
|
+
this.density = "default";
|
|
31
33
|
}
|
|
32
34
|
handleSummaryClick() {
|
|
33
35
|
if (this.open) {
|
|
@@ -127,7 +129,7 @@ class SgdsAccordionItem extends SgdsElement {
|
|
|
127
129
|
>
|
|
128
130
|
<slot name="header"></slot>
|
|
129
131
|
<slot name="caret">
|
|
130
|
-
<sgds-icon name="chevron-down" size=${this.
|
|
132
|
+
<sgds-icon name="chevron-down" size=${this.density === "compact" ? "md" : "lg"}></sgds-icon>
|
|
131
133
|
</slot>
|
|
132
134
|
</button>
|
|
133
135
|
<div
|
|
@@ -158,6 +160,9 @@ __decorate([
|
|
|
158
160
|
__decorate([
|
|
159
161
|
property({ type: Boolean, reflect: true })
|
|
160
162
|
], SgdsAccordionItem.prototype, "disabled", void 0);
|
|
163
|
+
__decorate([
|
|
164
|
+
property({ type: String, reflect: true })
|
|
165
|
+
], SgdsAccordionItem.prototype, "density", void 0);
|
|
161
166
|
__decorate([
|
|
162
167
|
watch("open", { waitUntilFirstUpdate: true })
|
|
163
168
|
], SgdsAccordionItem.prototype, "handleOpenChange", null);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sgds-accordion-item.js","sources":["../../../src/components/Accordion/sgds-accordion-item.ts"],"sourcesContent":["import { html } from \"lit\";\nimport { property, query } from \"lit/decorators.js\";\nimport { classMap } from \"lit/directives/class-map.js\";\nimport SgdsElement from \"../../base/sgds-element\";\nimport { animateTo, shimKeyframesHeightAuto, stopAnimations } from \"../../utils/animate\";\nimport { getAnimation, setDefaultAnimation } from \"../../utils/animation-registry\";\nimport { waitForEvent } from \"../../utils/event\";\nimport { watch } from \"../../utils/watch\";\nimport accordionItemStyle from \"./accordion-item.css\";\n\n/**\n *\n * @event sgds-show - Emitted on show.\n * @event sgds-after-show - Emitted on show after animation has completed.\n * @event sgds-hide - Emitted on hide.\n * @event sgds-after-hide - Emitted on hide after animation has completed.\n *\n * @slot header - The accordion-item button header slot.\n * @slot content - The accordion-item content slot.\n * @slot caret - The caret icon of accordion-item.\n *\n */\nexport class SgdsAccordionItem extends SgdsElement {\n static styles = [...SgdsElement.styles, accordionItemStyle];\n /** @internal */\n @query(\".accordion-item\") accordion: HTMLElement;\n /** @internal */\n @query(\".accordion-btn\") header: HTMLElement;\n /** @internal */\n @query(\".accordion-body\") body: HTMLElement;\n\n /** Controls whether accordion-item is open or close */\n @property({ type: Boolean, reflect: true }) open = false;\n\n /** Disables the accordion item */\n @property({ type: Boolean, reflect: true }) disabled = false;\n\n private handleSummaryClick() {\n if (this.open) {\n this.hide();\n } else {\n this.show();\n }\n\n this.header.focus();\n }\n\n private handleSummaryKeyDown(event: KeyboardEvent) {\n if (event.key === \"Enter\" || event.key === \" \") {\n event.preventDefault();\n\n if (this.open) {\n this.hide();\n } else {\n this.show();\n }\n }\n\n if (event.key === \"ArrowUp\" || event.key === \"ArrowLeft\") {\n event.preventDefault();\n this.hide();\n }\n\n if (event.key === \"ArrowDown\" || event.key === \"ArrowRight\") {\n event.preventDefault();\n this.show();\n }\n }\n\n @watch(\"open\", { waitUntilFirstUpdate: true })\n async handleOpenChange() {\n if (this.open) {\n // Show\n const sgdsShow = this.emit(\"sgds-show\", { cancelable: true });\n if (sgdsShow.defaultPrevented) {\n this.open = false;\n return;\n }\n\n await stopAnimations(this.body);\n this.body.classList.remove(\"hidden\");\n\n const { keyframes, options } = getAnimation(this, \"accordion.show\");\n await animateTo(this.body, shimKeyframesHeightAuto(keyframes, this.body.scrollHeight), options);\n this.emit(\"sgds-after-show\");\n } else {\n // Hide\n const slHide = this.emit(\"sgds-hide\", { cancelable: true });\n if (slHide.defaultPrevented) {\n this.open = true;\n return;\n }\n\n await stopAnimations(this.body);\n\n const { keyframes, options } = getAnimation(this, \"accordion.hide\");\n const animationDuration = options.duration as number;\n // Workaround to fix GSIB delay after animateTo.\n //Setting a timeout of duration slightly less than animation's duraton to prevent case where animation runs faster than .hidden class is added\n setTimeout(() => {\n this.body.classList.add(\"hidden\");\n }, animationDuration - 20);\n\n await animateTo(this.body, shimKeyframesHeightAuto(keyframes, this.body.scrollHeight), options);\n this.emit(\"sgds-after-hide\");\n }\n }\n\n /** Shows the accordion. */\n public async show() {\n if (this.open) {\n return;\n }\n\n this.open = true;\n return waitForEvent(this, \"sgds-after-show\");\n }\n\n /** Hide the accordion */\n public async hide() {\n if (!this.open) {\n return;\n }\n this.open = false;\n return waitForEvent(this, \"sgds-after-hide\");\n }\n render() {\n const isHydrated = this.hasUpdated;\n\n return html`\n <div class=\"accordion-item\">\n <button\n class=${classMap({\n \"accordion-btn\": true,\n disabled: this.disabled,\n collapsed: !this.open\n })}\n ?disabled=${this.disabled}\n role=\"button\"\n aria-expanded=${this.open ? \"true\" : \"false\"}\n aria-disabled=${this.disabled ? \"true\" : \"false\"}\n aria-controls=\"content\"\n tabindex=${this.disabled ? \"-1\" : \"0\"}\n @click=${this.handleSummaryClick}\n @keydown=${this.handleSummaryKeyDown}\n >\n <slot name=\"header\"></slot>\n <slot name=\"caret\">\n <sgds-icon name=\"chevron-down\" size=${this.getAttribute(\"density\") === \"compact\" ? \"md\" : \"lg\"}></sgds-icon>\n </slot>\n </button>\n <div\n class=${classMap({\n \"accordion-body\": true,\n hidden: !this.open && !isHydrated\n })}\n >\n <slot id=\"content\" name=\"content\" class=\"content\" role=\"region\" aria-labelledby=\"header\"></slot>\n </div>\n </div>\n `;\n }\n}\n\nsetDefaultAnimation(\"accordion.show\", {\n keyframes: [\n { height: \"0\", opacity: \"0\" },\n { height: \"auto\", opacity: \"1\" }\n ],\n options: { duration: 350, easing: \"ease-in-out\" }\n});\n\nsetDefaultAnimation(\"accordion.hide\", {\n keyframes: [\n { height: \"auto\", opacity: \"1\" },\n { height: \"0\", opacity: \"0\" }\n ],\n options: { duration: 350, easing: \"ease-in-out\" }\n});\n\nexport default SgdsAccordionItem;\n"],"names":["accordionItemStyle"],"mappings":";;;;;;;;;;;AAUA;;;;;;;;;;;AAWG;AACG,MAAO,iBAAkB,SAAQ,WAAW,CAAA;AAAlD,IAAA,WAAA,GAAA;;;QAU8C,IAAI,CAAA,IAAA,GAAG,KAAK,CAAC;;QAGb,IAAQ,CAAA,QAAA,GAAG,KAAK,CAAC;KA+H9D;IA7HS,kBAAkB,GAAA;AACxB,QAAA,IAAI,IAAI,CAAC,IAAI,EAAE;YACb,IAAI,CAAC,IAAI,EAAE,CAAC;SACb;aAAM;YACL,IAAI,CAAC,IAAI,EAAE,CAAC;SACb;AAED,QAAA,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC;KACrB;AAEO,IAAA,oBAAoB,CAAC,KAAoB,EAAA;AAC/C,QAA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AAO,EAAE,EAAE,QAAQ,EAAE,GAAG,EAAE,MAAM,EAAE,aAAa,EAAE;AAClD,CAAA,CAAC;;;;"}
|
|
1
|
+
{"version":3,"file":"sgds-accordion-item.js","sources":["../../../src/components/Accordion/sgds-accordion-item.ts"],"sourcesContent":["import { html } from \"lit\";\nimport { property, query, state } from \"lit/decorators.js\";\nimport { classMap } from \"lit/directives/class-map.js\";\nimport SgdsElement from \"../../base/sgds-element\";\nimport { animateTo, shimKeyframesHeightAuto, stopAnimations } from \"../../utils/animate\";\nimport { getAnimation, setDefaultAnimation } from \"../../utils/animation-registry\";\nimport { waitForEvent } from \"../../utils/event\";\nimport { watch } from \"../../utils/watch\";\nimport accordionItemStyle from \"./accordion-item.css\";\nimport { AccordionDensity } from \"./sgds-accordion\";\n\n/**\n *\n * @event sgds-show - Emitted on show.\n * @event sgds-after-show - Emitted on show after animation has completed.\n * @event sgds-hide - Emitted on hide.\n * @event sgds-after-hide - Emitted on hide after animation has completed.\n *\n * @slot header - The accordion-item button header slot.\n * @slot content - The accordion-item content slot.\n * @slot caret - The caret icon of accordion-item.\n *\n */\nexport class SgdsAccordionItem extends SgdsElement {\n static styles = [...SgdsElement.styles, accordionItemStyle];\n /** @internal */\n @query(\".accordion-item\") accordion: HTMLElement;\n /** @internal */\n @query(\".accordion-btn\") header: HTMLElement;\n /** @internal */\n @query(\".accordion-body\") body: HTMLElement;\n\n /** Controls whether accordion-item is open or close */\n @property({ type: Boolean, reflect: true }) open = false;\n\n /** Disables the accordion item */\n @property({ type: Boolean, reflect: true }) disabled = false;\n\n /** Controls the density of the individual accordion item. This value is controlled by sgds-accordion */\n @property({ type: String, reflect: true }) density: AccordionDensity = \"default\";\n\n private handleSummaryClick() {\n if (this.open) {\n this.hide();\n } else {\n this.show();\n }\n\n this.header.focus();\n }\n\n private handleSummaryKeyDown(event: KeyboardEvent) {\n if (event.key === \"Enter\" || event.key === \" \") {\n event.preventDefault();\n\n if (this.open) {\n this.hide();\n } else {\n this.show();\n }\n }\n\n if (event.key === \"ArrowUp\" || event.key === \"ArrowLeft\") {\n event.preventDefault();\n this.hide();\n }\n\n if (event.key === \"ArrowDown\" || event.key === \"ArrowRight\") {\n event.preventDefault();\n this.show();\n }\n }\n\n @watch(\"open\", { waitUntilFirstUpdate: true })\n async handleOpenChange() {\n if (this.open) {\n // Show\n const sgdsShow = this.emit(\"sgds-show\", { cancelable: true });\n if (sgdsShow.defaultPrevented) {\n this.open = false;\n return;\n }\n\n await stopAnimations(this.body);\n this.body.classList.remove(\"hidden\");\n\n const { keyframes, options } = getAnimation(this, \"accordion.show\");\n await animateTo(this.body, shimKeyframesHeightAuto(keyframes, this.body.scrollHeight), options);\n this.emit(\"sgds-after-show\");\n } else {\n // Hide\n const slHide = this.emit(\"sgds-hide\", { cancelable: true });\n if (slHide.defaultPrevented) {\n this.open = true;\n return;\n }\n\n await stopAnimations(this.body);\n\n const { keyframes, options } = getAnimation(this, \"accordion.hide\");\n const animationDuration = options.duration as number;\n // Workaround to fix GSIB delay after animateTo.\n //Setting a timeout of duration slightly less than animation's duraton to prevent case where animation runs faster than .hidden class is added\n setTimeout(() => {\n this.body.classList.add(\"hidden\");\n }, animationDuration - 20);\n\n await animateTo(this.body, shimKeyframesHeightAuto(keyframes, this.body.scrollHeight), options);\n this.emit(\"sgds-after-hide\");\n }\n }\n\n /** Shows the accordion. */\n public async show() {\n if (this.open) {\n return;\n }\n\n this.open = true;\n return waitForEvent(this, \"sgds-after-show\");\n }\n\n /** Hide the accordion */\n public async hide() {\n if (!this.open) {\n return;\n }\n this.open = false;\n return waitForEvent(this, \"sgds-after-hide\");\n }\n render() {\n const isHydrated = this.hasUpdated;\n\n return html`\n <div class=\"accordion-item\">\n <button\n class=${classMap({\n \"accordion-btn\": true,\n disabled: this.disabled,\n collapsed: !this.open\n })}\n ?disabled=${this.disabled}\n role=\"button\"\n aria-expanded=${this.open ? \"true\" : \"false\"}\n aria-disabled=${this.disabled ? \"true\" : \"false\"}\n aria-controls=\"content\"\n tabindex=${this.disabled ? \"-1\" : \"0\"}\n @click=${this.handleSummaryClick}\n @keydown=${this.handleSummaryKeyDown}\n >\n <slot name=\"header\"></slot>\n <slot name=\"caret\">\n <sgds-icon name=\"chevron-down\" size=${this.density === \"compact\" ? \"md\" : \"lg\"}></sgds-icon>\n </slot>\n </button>\n <div\n class=${classMap({\n \"accordion-body\": true,\n hidden: !this.open && !isHydrated\n })}\n >\n <slot id=\"content\" name=\"content\" class=\"content\" role=\"region\" aria-labelledby=\"header\"></slot>\n </div>\n </div>\n `;\n }\n}\n\nsetDefaultAnimation(\"accordion.show\", {\n keyframes: [\n { height: \"0\", opacity: \"0\" },\n { height: \"auto\", opacity: \"1\" }\n ],\n options: { duration: 350, easing: \"ease-in-out\" }\n});\n\nsetDefaultAnimation(\"accordion.hide\", {\n keyframes: [\n { height: \"auto\", opacity: \"1\" },\n { height: \"0\", opacity: \"0\" }\n ],\n options: { duration: 350, easing: \"ease-in-out\" }\n});\n\nexport default SgdsAccordionItem;\n"],"names":["accordionItemStyle"],"mappings":";;;;;;;;;;;AAWA;;;;;;;;;;;AAWG;AACG,MAAO,iBAAkB,SAAQ,WAAW,CAAA;AAAlD,IAAA,WAAA,GAAA;;;QAU8C,IAAI,CAAA,IAAA,GAAG,KAAK,CAAC;;QAGb,IAAQ,CAAA,QAAA,GAAG,KAAK,CAAC;;QAGlB,IAAO,CAAA,OAAA,GAAqB,SAAS,CAAC;KA+HlF;IA7HS,kBAAkB,GAAA;AACxB,QAAA,IAAI,IAAI,CAAC,IAAI,EAAE;YACb,IAAI,CAAC,IAAI,EAAE,CAAC;SACb;aAAM;YACL,IAAI,CAAC,IAAI,EAAE,CAAC;SACb;AAED,QAAA,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC;KACrB;AAEO,IAAA,oBAAoB,CAAC,KAAoB,EAAA;AAC/C,QAAA,IAAI,KAAK,CAAC,GAAG,KAAK,OAAO,IAAI,KAAK,CAAC,GAAG,KAAK,GAAG,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A,EAAE,MAAM,EAAE,GAAG,EAAE,OAAO,EAAE,GAAG,EAAE;AAC9B,KAAA;IACD,OAAO,EAAE,EAAE,QAAQ,EAAE,GAAG,EAAE,MAAM,EAAE,aAAa,EAAE;AAClD,CAAA,CAAC;;;;"}
|
|
@@ -59,7 +59,7 @@ window.ShadyDOM?.inUse&&!0===window.ShadyDOM?.noPatch&&window.ShadyDOM.wrap;cons
|
|
|
59
59
|
* @license
|
|
60
60
|
* Copyright 2020 Google LLC
|
|
61
61
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
62
|
-
*/const Ht=()=>new jt;class jt{}const qt=new WeakMap;const Zt=Rt(class extends Ft{render(t){return it}update(t,[e]){const i=e!==this._ref;return i&&void 0!==this._ref&&this._updateRefValue(void 0),(i||this._lastElementForRef!==this._element)&&(this._ref=e,this._context=t.options?.host,this._updateRefValue(this._element=t.element)),it}_updateRefValue(t){if(this.isConnected||(t=void 0),"function"==typeof this._ref){const e=this._context??globalThis;let i=qt.get(e);void 0===i&&(i=new WeakMap,qt.set(e,i)),void 0!==i.get(this._ref)&&this._ref.call(this._context,void 0),i.set(this._ref,t),void 0!==t&&this._ref.call(this._context,t)}else this._ref.value=t}get _lastElementForRef(){return"function"==typeof this._ref?qt.get(this._context??globalThis)?.get(this._ref):this._ref?.value}disconnected(){this._lastElementForRef===this._element&&this._updateRefValue(void 0)}reconnected(){this._updateRefValue(this._element)}}),Jt=["top","right","bottom","left"],Xt=Math.min,Yt=Math.max,Gt=Math.round,Kt=Math.floor,Qt=t=>({x:t,y:t}),te={left:"right",right:"left",bottom:"top",top:"bottom"},ee={start:"end",end:"start"};function ie(t,e,i){return Yt(t,Xt(e,i))}function se(t,e){return"function"==typeof t?t(e):t}function ne(t){return t.split("-")[0]}function oe(t){return t.split("-")[1]}function re(t){return"x"===t?"y":"x"}function ae(t){return"y"===t?"height":"width"}const le=new Set(["top","bottom"]);function de(t){return le.has(ne(t))?"y":"x"}function ce(t){return re(de(t))}function he(t,e,i){void 0===i&&(i=!1);const s=oe(t),n=ce(t),o=ae(n);let r="x"===n?s===(i?"end":"start")?"right":"left":"start"===s?"bottom":"top";return e.reference[o]>e.floating[o]&&(r=be(r)),[r,be(r)]}function ue(t){return t.replace(/start|end/g,t=>ee[t])}const pe=["left","right"],fe=["right","left"],ge=["top","bottom"],me=["bottom","top"];function ve(t,e,i,s){const n=oe(t);let o=function(t,e,i){switch(t){case"top":case"bottom":return i?e?fe:pe:e?pe:fe;case"left":case"right":return e?ge:me;default:return[]}}(ne(t),"start"===i,s);return n&&(o=o.map(t=>t+"-"+n),e&&(o=o.concat(o.map(ue)))),o}function be(t){return t.replace(/left|right|bottom|top/g,t=>te[t])}function ye(t){return"number"!=typeof t?function(t){return{top:0,right:0,bottom:0,left:0,...t}}(t):{top:t,right:t,bottom:t,left:t}}function _e(t){const{x:e,y:i,width:s,height:n}=t;return{width:s,height:n,top:i,left:e,right:e+s,bottom:i+n,x:e,y:i}}function we(t,e,i){let{reference:s,floating:n}=t;const o=de(e),r=ce(e),a=ae(r),l=ne(e),d="y"===o,c=s.x+s.width/2-n.width/2,h=s.y+s.height/2-n.height/2,u=s[a]/2-n[a]/2;let p;switch(l){case"top":p={x:c,y:s.y-n.height};break;case"bottom":p={x:c,y:s.y+s.height};break;case"right":p={x:s.x+s.width,y:h};break;case"left":p={x:s.x-n.width,y:h};break;default:p={x:s.x,y:s.y}}switch(oe(e)){case"start":p[r]-=u*(i&&d?-1:1);break;case"end":p[r]+=u*(i&&d?-1:1)}return p}async function xe(t,e){var i;void 0===e&&(e={});const{x:s,y:n,platform:o,rects:r,elements:a,strategy:l}=t,{boundary:d="clippingAncestors",rootBoundary:c="viewport",elementContext:h="floating",altBoundary:u=!1,padding:p=0}=se(e,t),f=ye(p),g=a[u?"floating"===h?"reference":"floating":h],m=_e(await o.getClippingRect({element:null==(i=await(null==o.isElement?void 0:o.isElement(g)))||i?g:g.contextElement||await(null==o.getDocumentElement?void 0:o.getDocumentElement(a.floating)),boundary:d,rootBoundary:c,strategy:l})),v="floating"===h?{x:s,y:n,width:r.floating.width,height:r.floating.height}:r.reference,b=await(null==o.getOffsetParent?void 0:o.getOffsetParent(a.floating)),y=await(null==o.isElement?void 0:o.isElement(b))&&await(null==o.getScale?void 0:o.getScale(b))||{x:1,y:1},_=_e(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:v,offsetParent:b,strategy:l}):v);return{top:(m.top-_.top+f.top)/y.y,bottom:(_.bottom-m.bottom+f.bottom)/y.y,left:(m.left-_.left+f.left)/y.x,right:(_.right-m.right+f.right)/y.x}}function $e(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function Se(t){return Jt.some(e=>t[e]>=0)}const ke=new Set(["left","top"]);function Ce(){return"undefined"!=typeof window}function Ee(t){return Re(t)?(t.nodeName||"").toLowerCase():"#document"}function Pe(t){var e;return(null==t||null==(e=t.ownerDocument)?void 0:e.defaultView)||window}function Te(t){var e;return null==(e=(Re(t)?t.ownerDocument:t.document)||window.document)?void 0:e.documentElement}function Re(t){return!!Ce()&&(t instanceof Node||t instanceof Pe(t).Node)}function Oe(t){return!!Ce()&&(t instanceof Element||t instanceof Pe(t).Element)}function Le(t){return!!Ce()&&(t instanceof HTMLElement||t instanceof Pe(t).HTMLElement)}function Ve(t){return!(!Ce()||"undefined"==typeof ShadowRoot)&&(t instanceof ShadowRoot||t instanceof Pe(t).ShadowRoot)}const Ne=new Set(["inline","contents"]);function Ae(t){const{overflow:e,overflowX:i,overflowY:s,display:n}=Ze(t);return/auto|scroll|overlay|hidden|clip/.test(e+s+i)&&!Ne.has(n)}const ze=new Set(["table","td","th"]);function Ue(t){return ze.has(Ee(t))}const Me=[":popover-open",":modal"];function De(t){return Me.some(e=>{try{return t.matches(e)}catch(t){return!1}})}const We=["transform","translate","scale","rotate","perspective"],Be=["transform","translate","scale","rotate","perspective","filter"],Ie=["paint","layout","strict","content"];function Fe(t){const e=He(),i=Oe(t)?Ze(t):t;return We.some(t=>!!i[t]&&"none"!==i[t])||!!i.containerType&&"normal"!==i.containerType||!e&&!!i.backdropFilter&&"none"!==i.backdropFilter||!e&&!!i.filter&&"none"!==i.filter||Be.some(t=>(i.willChange||"").includes(t))||Ie.some(t=>(i.contain||"").includes(t))}function He(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}const je=new Set(["html","body","#document"]);function qe(t){return je.has(Ee(t))}function Ze(t){return Pe(t).getComputedStyle(t)}function Je(t){return Oe(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function Xe(t){if("html"===Ee(t))return t;const e=t.assignedSlot||t.parentNode||Ve(t)&&t.host||Te(t);return Ve(e)?e.host:e}function Ye(t){const e=Xe(t);return qe(e)?t.ownerDocument?t.ownerDocument.body:t.body:Le(e)&&Ae(e)?e:Ye(e)}function Ge(t,e,i){var s;void 0===e&&(e=[]),void 0===i&&(i=!0);const n=Ye(t),o=n===(null==(s=t.ownerDocument)?void 0:s.body),r=Pe(n);if(o){const t=Ke(r);return e.concat(r,r.visualViewport||[],Ae(n)?n:[],t&&i?Ge(t):[])}return e.concat(n,Ge(n,[],i))}function Ke(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function Qe(t){const e=Ze(t);let i=parseFloat(e.width)||0,s=parseFloat(e.height)||0;const n=Le(t),o=n?t.offsetWidth:i,r=n?t.offsetHeight:s,a=Gt(i)!==o||Gt(s)!==r;return a&&(i=o,s=r),{width:i,height:s,$:a}}function ti(t){return Oe(t)?t:t.contextElement}function ei(t){const e=ti(t);if(!Le(e))return Qt(1);const i=e.getBoundingClientRect(),{width:s,height:n,$:o}=Qe(e);let r=(o?Gt(i.width):i.width)/s,a=(o?Gt(i.height):i.height)/n;return r&&Number.isFinite(r)||(r=1),a&&Number.isFinite(a)||(a=1),{x:r,y:a}}const ii=Qt(0);function si(t){const e=Pe(t);return He()&&e.visualViewport?{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}:ii}function ni(t,e,i,s){void 0===e&&(e=!1),void 0===i&&(i=!1);const n=t.getBoundingClientRect(),o=ti(t);let r=Qt(1);e&&(s?Oe(s)&&(r=ei(s)):r=ei(t));const a=function(t,e,i){return void 0===e&&(e=!1),!(!i||e&&i!==Pe(t))&&e}(o,i,s)?si(o):Qt(0);let l=(n.left+a.x)/r.x,d=(n.top+a.y)/r.y,c=n.width/r.x,h=n.height/r.y;if(o){const t=Pe(o),e=s&&Oe(s)?Pe(s):s;let i=t,n=Ke(i);for(;n&&s&&e!==i;){const t=ei(n),e=n.getBoundingClientRect(),s=Ze(n),o=e.left+(n.clientLeft+parseFloat(s.paddingLeft))*t.x,r=e.top+(n.clientTop+parseFloat(s.paddingTop))*t.y;l*=t.x,d*=t.y,c*=t.x,h*=t.y,l+=o,d+=r,i=Pe(n),n=Ke(i)}}return _e({width:c,height:h,x:l,y:d})}function oi(t,e){const i=Je(t).scrollLeft;return e?e.left+i:ni(Te(t)).left+i}function ri(t,e){const i=t.getBoundingClientRect();return{x:i.left+e.scrollLeft-oi(t,i),y:i.top+e.scrollTop}}const ai=new Set(["absolute","fixed"]);function li(t,e,i){let s;if("viewport"===e)s=function(t,e){const i=Pe(t),s=Te(t),n=i.visualViewport;let o=s.clientWidth,r=s.clientHeight,a=0,l=0;if(n){o=n.width,r=n.height;const t=He();(!t||t&&"fixed"===e)&&(a=n.offsetLeft,l=n.offsetTop)}const d=oi(s);if(d<=0){const t=s.ownerDocument,e=t.body,i=getComputedStyle(e),n="CSS1Compat"===t.compatMode&&parseFloat(i.marginLeft)+parseFloat(i.marginRight)||0,r=Math.abs(s.clientWidth-e.clientWidth-n);r<=25&&(o-=r)}else d<=25&&(o+=d);return{width:o,height:r,x:a,y:l}}(t,i);else if("document"===e)s=function(t){const e=Te(t),i=Je(t),s=t.ownerDocument.body,n=Yt(e.scrollWidth,e.clientWidth,s.scrollWidth,s.clientWidth),o=Yt(e.scrollHeight,e.clientHeight,s.scrollHeight,s.clientHeight);let r=-i.scrollLeft+oi(t);const a=-i.scrollTop;return"rtl"===Ze(s).direction&&(r+=Yt(e.clientWidth,s.clientWidth)-n),{width:n,height:o,x:r,y:a}}(Te(t));else if(Oe(e))s=function(t,e){const i=ni(t,!0,"fixed"===e),s=i.top+t.clientTop,n=i.left+t.clientLeft,o=Le(t)?ei(t):Qt(1);return{width:t.clientWidth*o.x,height:t.clientHeight*o.y,x:n*o.x,y:s*o.y}}(e,i);else{const i=si(t);s={x:e.x-i.x,y:e.y-i.y,width:e.width,height:e.height}}return _e(s)}function di(t,e){const i=Xe(t);return!(i===e||!Oe(i)||qe(i))&&("fixed"===Ze(i).position||di(i,e))}function ci(t,e,i){const s=Le(e),n=Te(e),o="fixed"===i,r=ni(t,!0,o,e);let a={scrollLeft:0,scrollTop:0};const l=Qt(0);function d(){l.x=oi(n)}if(s||!s&&!o)if(("body"!==Ee(e)||Ae(n))&&(a=Je(e)),s){const t=ni(e,!0,o,e);l.x=t.x+e.clientLeft,l.y=t.y+e.clientTop}else n&&d();o&&!s&&n&&d();const c=!n||s||o?Qt(0):ri(n,a);return{x:r.left+a.scrollLeft-l.x-c.x,y:r.top+a.scrollTop-l.y-c.y,width:r.width,height:r.height}}function hi(t){return"static"===Ze(t).position}function ui(t,e){if(!Le(t)||"fixed"===Ze(t).position)return null;if(e)return e(t);let i=t.offsetParent;return Te(t)===i&&(i=i.ownerDocument.body),i}function pi(t,e){const i=Pe(t);if(De(t))return i;if(!Le(t)){let e=Xe(t);for(;e&&!qe(e);){if(Oe(e)&&!hi(e))return e;e=Xe(e)}return i}let s=ui(t,e);for(;s&&Ue(s)&&hi(s);)s=ui(s,e);return s&&qe(s)&&hi(s)&&!Fe(s)?i:s||function(t){let e=Xe(t);for(;Le(e)&&!qe(e);){if(Fe(e))return e;if(De(e))return null;e=Xe(e)}return null}(t)||i}const fi={convertOffsetParentRelativeRectToViewportRelativeRect:function(t){let{elements:e,rect:i,offsetParent:s,strategy:n}=t;const o="fixed"===n,r=Te(s),a=!!e&&De(e.floating);if(s===r||a&&o)return i;let l={scrollLeft:0,scrollTop:0},d=Qt(1);const c=Qt(0),h=Le(s);if((h||!h&&!o)&&(("body"!==Ee(s)||Ae(r))&&(l=Je(s)),Le(s))){const t=ni(s);d=ei(s),c.x=t.x+s.clientLeft,c.y=t.y+s.clientTop}const u=!r||h||o?Qt(0):ri(r,l);return{width:i.width*d.x,height:i.height*d.y,x:i.x*d.x-l.scrollLeft*d.x+c.x+u.x,y:i.y*d.y-l.scrollTop*d.y+c.y+u.y}},getDocumentElement:Te,getClippingRect:function(t){let{element:e,boundary:i,rootBoundary:s,strategy:n}=t;const o=[..."clippingAncestors"===i?De(e)?[]:function(t,e){const i=e.get(t);if(i)return i;let s=Ge(t,[],!1).filter(t=>Oe(t)&&"body"!==Ee(t)),n=null;const o="fixed"===Ze(t).position;let r=o?Xe(t):t;for(;Oe(r)&&!qe(r);){const e=Ze(r),i=Fe(r);i||"fixed"!==e.position||(n=null),(o?!i&&!n:!i&&"static"===e.position&&n&&ai.has(n.position)||Ae(r)&&!i&&di(t,r))?s=s.filter(t=>t!==r):n=e,r=Xe(r)}return e.set(t,s),s}(e,this._c):[].concat(i),s],r=o[0],a=o.reduce((t,i)=>{const s=li(e,i,n);return t.top=Yt(s.top,t.top),t.right=Xt(s.right,t.right),t.bottom=Xt(s.bottom,t.bottom),t.left=Yt(s.left,t.left),t},li(e,r,n));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}},getOffsetParent:pi,getElementRects:async function(t){const e=this.getOffsetParent||pi,i=this.getDimensions,s=await i(t.floating);return{reference:ci(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:s.width,height:s.height}}},getClientRects:function(t){return Array.from(t.getClientRects())},getDimensions:function(t){const{width:e,height:i}=Qe(t);return{width:e,height:i}},getScale:ei,isElement:Oe,isRTL:function(t){return"rtl"===Ze(t).direction}};function gi(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function mi(t,e,i,s){void 0===s&&(s={});const{ancestorScroll:n=!0,ancestorResize:o=!0,elementResize:r="function"==typeof ResizeObserver,layoutShift:a="function"==typeof IntersectionObserver,animationFrame:l=!1}=s,d=ti(t),c=n||o?[...d?Ge(d):[],...Ge(e)]:[];c.forEach(t=>{n&&t.addEventListener("scroll",i,{passive:!0}),o&&t.addEventListener("resize",i)});const h=d&&a?function(t,e){let i,s=null;const n=Te(t);function o(){var t;clearTimeout(i),null==(t=s)||t.disconnect(),s=null}return function r(a,l){void 0===a&&(a=!1),void 0===l&&(l=1),o();const d=t.getBoundingClientRect(),{left:c,top:h,width:u,height:p}=d;if(a||e(),!u||!p)return;const f={rootMargin:-Kt(h)+"px "+-Kt(n.clientWidth-(c+u))+"px "+-Kt(n.clientHeight-(h+p))+"px "+-Kt(c)+"px",threshold:Yt(0,Xt(1,l))||1};let g=!0;function m(e){const s=e[0].intersectionRatio;if(s!==l){if(!g)return r();s?r(!1,s):i=setTimeout(()=>{r(!1,1e-7)},1e3)}1!==s||gi(d,t.getBoundingClientRect())||r(),g=!1}try{s=new IntersectionObserver(m,{...f,root:n.ownerDocument})}catch(t){s=new IntersectionObserver(m,f)}s.observe(t)}(!0),o}(d,i):null;let u,p=-1,f=null;r&&(f=new ResizeObserver(t=>{let[s]=t;s&&s.target===d&&f&&(f.unobserve(e),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var t;null==(t=f)||t.observe(e)})),i()}),d&&!l&&f.observe(d),f.observe(e));let g=l?ni(t):null;return l&&function e(){const s=ni(t);g&&!gi(g,s)&&i();g=s,u=requestAnimationFrame(e)}(),i(),()=>{var t;c.forEach(t=>{n&&t.removeEventListener("scroll",i),o&&t.removeEventListener("resize",i)}),null==h||h(),null==(t=f)||t.disconnect(),f=null,l&&cancelAnimationFrame(u)}}const vi=function(t){return void 0===t&&(t=0),{name:"offset",options:t,async fn(e){var i,s;const{x:n,y:o,placement:r,middlewareData:a}=e,l=await async function(t,e){const{placement:i,platform:s,elements:n}=t,o=await(null==s.isRTL?void 0:s.isRTL(n.floating)),r=ne(i),a=oe(i),l="y"===de(i),d=ke.has(r)?-1:1,c=o&&l?-1:1,h=se(e,t);let{mainAxis:u,crossAxis:p,alignmentAxis:f}="number"==typeof h?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return a&&"number"==typeof f&&(p="end"===a?-1*f:f),l?{x:p*c,y:u*d}:{x:u*d,y:p*c}}(e,t);return r===(null==(i=a.offset)?void 0:i.placement)&&null!=(s=a.arrow)&&s.alignmentOffset?{}:{x:n+l.x,y:o+l.y,data:{...l,placement:r}}}}},bi=function(t){return void 0===t&&(t={}),{name:"shift",options:t,async fn(e){const{x:i,y:s,placement:n}=e,{mainAxis:o=!0,crossAxis:r=!1,limiter:a={fn:t=>{let{x:e,y:i}=t;return{x:e,y:i}}},...l}=se(t,e),d={x:i,y:s},c=await xe(e,l),h=de(ne(n)),u=re(h);let p=d[u],f=d[h];if(o){const t="y"===u?"bottom":"right";p=ie(p+c["y"===u?"top":"left"],p,p-c[t])}if(r){const t="y"===h?"bottom":"right";f=ie(f+c["y"===h?"top":"left"],f,f-c[t])}const g=a.fn({...e,[u]:p,[h]:f});return{...g,data:{x:g.x-i,y:g.y-s,enabled:{[u]:o,[h]:r}}}}}},yi=function(t){return void 0===t&&(t={}),{name:"flip",options:t,async fn(e){var i,s;const{placement:n,middlewareData:o,rects:r,initialPlacement:a,platform:l,elements:d}=e,{mainAxis:c=!0,crossAxis:h=!0,fallbackPlacements:u,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:f="none",flipAlignment:g=!0,...m}=se(t,e);if(null!=(i=o.arrow)&&i.alignmentOffset)return{};const v=ne(n),b=de(a),y=ne(a)===a,_=await(null==l.isRTL?void 0:l.isRTL(d.floating)),w=u||(y||!g?[be(a)]:function(t){const e=be(t);return[ue(t),e,ue(e)]}(a)),x="none"!==f;!u&&x&&w.push(...ve(a,g,f,_));const $=[a,...w],S=await xe(e,m),k=[];let C=(null==(s=o.flip)?void 0:s.overflows)||[];if(c&&k.push(S[v]),h){const t=he(n,r,_);k.push(S[t[0]],S[t[1]])}if(C=[...C,{placement:n,overflows:k}],!k.every(t=>t<=0)){var E,P;const t=((null==(E=o.flip)?void 0:E.index)||0)+1,e=$[t];if(e){if(!("alignment"===h&&b!==de(e))||C.every(t=>de(t.placement)!==b||t.overflows[0]>0))return{data:{index:t,overflows:C},reset:{placement:e}}}let i=null==(P=C.filter(t=>t.overflows[0]<=0).sort((t,e)=>t.overflows[1]-e.overflows[1])[0])?void 0:P.placement;if(!i)switch(p){case"bestFit":{var T;const t=null==(T=C.filter(t=>{if(x){const e=de(t.placement);return e===b||"y"===e}return!0}).map(t=>[t.placement,t.overflows.filter(t=>t>0).reduce((t,e)=>t+e,0)]).sort((t,e)=>t[1]-e[1])[0])?void 0:T[0];t&&(i=t);break}case"initialPlacement":i=a}if(n!==i)return{reset:{placement:i}}}return{}}}},_i=function(t){return void 0===t&&(t={}),{name:"hide",options:t,async fn(e){const{rects:i}=e,{strategy:s="referenceHidden",...n}=se(t,e);switch(s){case"referenceHidden":{const t=$e(await xe(e,{...n,elementContext:"reference"}),i.reference);return{data:{referenceHiddenOffsets:t,referenceHidden:Se(t)}}}case"escaped":{const t=$e(await xe(e,{...n,altBoundary:!0}),i.floating);return{data:{escapedOffsets:t,escaped:Se(t)}}}default:return{}}}}},wi=(t,e,i)=>{const s=new Map,n={platform:fi,...i},o={...n.platform,_c:s};return(async(t,e,i)=>{const{placement:s="bottom",strategy:n="absolute",middleware:o=[],platform:r}=i,a=o.filter(Boolean),l=await(null==r.isRTL?void 0:r.isRTL(e));let d=await r.getElementRects({reference:t,floating:e,strategy:n}),{x:c,y:h}=we(d,s,l),u=s,p={},f=0;for(let i=0;i<a.length;i++){const{name:o,fn:g}=a[i],{x:m,y:v,data:b,reset:y}=await g({x:c,y:h,initialPlacement:s,placement:u,strategy:n,middlewareData:p,rects:d,platform:r,elements:{reference:t,floating:e}});c=null!=m?m:c,h=null!=v?v:h,p={...p,[o]:{...p[o],...b}},y&&f<=50&&(f++,"object"==typeof y&&(y.placement&&(u=y.placement),y.rects&&(d=!0===y.rects?await r.getElementRects({reference:t,floating:e,strategy:n}):y.rects),({x:c,y:h}=we(d,u,l))),i=-1)}return{x:c,y:h,placement:u,strategy:n,middlewareData:p}})(t,e,{...n,platform:o})};var xi,$i=r`:host{display:contents}.tooltip-placeholder{display:inline-block;max-width:100%}.tooltip{word-wrap:break-word;background-color:var(--sgds-surface-fixed-dark);border-radius:var(--sgds-border-radius-md);box-shadow:0 0 2px 0 rgba(0,0,0,.12),0 8px 16px 0 rgba(0,0,0,.14);color:var(--sgds-color-fixed-light);display:block;font-size:var(--sgds-font-size-14);line-break:auto;max-width:var(--sgds-dimension-320);padding:var(--sgds-padding-xs) var(--sgds-padding-sm);text-align:left;text-decoration:none;text-shadow:none;text-transform:none;white-space:normal;word-break:normal;word-spacing:normal;z-index:900}div{max-width:fit-content}`;class Si extends zt{constructor(){super(...arguments),this._myTooltip=Ht(),this._tooltipBubble=Ht(),this.content="",this.placement="top",this.trigger="hover focus",this.open=!1,this._handleClickOutOfElement=t=>{this.open&&(t.composedPath().includes(this)||this.hide())}}connectedCallback(){super.connectedCallback(),this.trigger.includes("click")&&document.addEventListener("click",this._handleClickOutOfElement)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("click",this._handleClickOutOfElement),this._cleanupAutoUpdate&&(this._cleanupAutoUpdate(),this._cleanupAutoUpdate=void 0)}firstUpdated(t){super.firstUpdated(t),this._tooltipTargetElements.forEach(t=>{t.setAttribute("data-sgds-tooltip",this.content),this.trigger.includes("hover")&&(t.addEventListener("mouseenter",()=>this.show()),t.addEventListener("mouseleave",()=>this.hide())),this.trigger.includes("focus")&&(t.addEventListener("focus",()=>this.show()),t.addEventListener("blur",()=>this.hide())),"click"===this.trigger&&t.addEventListener("click",()=>this.toggle())})}_handleSlotChange(){this._tooltipTargetElements.forEach(t=>t.setAttribute("data-sgds-tooltip",this.content))}async updateFloatingPosition(){if(!this._myTooltip.value||!this._tooltipBubble.value)return;const{x:t,y:e,placement:i,strategy:s,middlewareData:n}=await wi(this._tooltipTargetElements[0],this._tooltipBubble.value,{strategy:"fixed",placement:this.placement,middleware:[vi(8),yi(),bi(),_i()]});this._tooltipBubble.value.setAttribute("data-placement",i),Object.assign(this._tooltipBubble.value.style,{position:s,left:`${t}px`,top:`${e}px`});const{referenceHidden:o,escaped:r}=n.hide||{};this._tooltipBubble.value.style.visibility=o||r?"hidden":"visible"}async show(){this.open||(this.open=!0,this.emit("sgds-show"),await this.updateComplete,await this.updateFloatingPosition(),this._myTooltip.value&&this._tooltipBubble.value&&(this._cleanupAutoUpdate=mi(this._tooltipTargetElements[0],this._tooltipBubble.value,()=>this.updateFloatingPosition())),this.emit("sgds-after-show"))}hide(){this.open&&(this.emit("sgds-hide"),this.open=!1,this._cleanupAutoUpdate&&(this._cleanupAutoUpdate(),this._cleanupAutoUpdate=void 0),setTimeout(()=>this.emit("sgds-after-hide"),0))}toggle(){this.open?this.hide():this.show()}render(){return Q`
|
|
62
|
+
*/const Ht=()=>new jt;class jt{}const qt=new WeakMap;const Zt=Rt(class extends Ft{render(t){return it}update(t,[e]){const i=e!==this._ref;return i&&void 0!==this._ref&&this._updateRefValue(void 0),(i||this._lastElementForRef!==this._element)&&(this._ref=e,this._context=t.options?.host,this._updateRefValue(this._element=t.element)),it}_updateRefValue(t){if(this.isConnected||(t=void 0),"function"==typeof this._ref){const e=this._context??globalThis;let i=qt.get(e);void 0===i&&(i=new WeakMap,qt.set(e,i)),void 0!==i.get(this._ref)&&this._ref.call(this._context,void 0),i.set(this._ref,t),void 0!==t&&this._ref.call(this._context,t)}else this._ref.value=t}get _lastElementForRef(){return"function"==typeof this._ref?qt.get(this._context??globalThis)?.get(this._ref):this._ref?.value}disconnected(){this._lastElementForRef===this._element&&this._updateRefValue(void 0)}reconnected(){this._updateRefValue(this._element)}}),Jt=["top","right","bottom","left"],Xt=Math.min,Yt=Math.max,Gt=Math.round,Kt=Math.floor,Qt=t=>({x:t,y:t}),te={left:"right",right:"left",bottom:"top",top:"bottom"},ee={start:"end",end:"start"};function ie(t,e,i){return Yt(t,Xt(e,i))}function se(t,e){return"function"==typeof t?t(e):t}function ne(t){return t.split("-")[0]}function oe(t){return t.split("-")[1]}function re(t){return"x"===t?"y":"x"}function ae(t){return"y"===t?"height":"width"}const le=new Set(["top","bottom"]);function de(t){return le.has(ne(t))?"y":"x"}function ce(t){return re(de(t))}function he(t,e,i){void 0===i&&(i=!1);const s=oe(t),n=ce(t),o=ae(n);let r="x"===n?s===(i?"end":"start")?"right":"left":"start"===s?"bottom":"top";return e.reference[o]>e.floating[o]&&(r=be(r)),[r,be(r)]}function ue(t){return t.replace(/start|end/g,t=>ee[t])}const pe=["left","right"],fe=["right","left"],ge=["top","bottom"],me=["bottom","top"];function ve(t,e,i,s){const n=oe(t);let o=function(t,e,i){switch(t){case"top":case"bottom":return i?e?fe:pe:e?pe:fe;case"left":case"right":return e?ge:me;default:return[]}}(ne(t),"start"===i,s);return n&&(o=o.map(t=>t+"-"+n),e&&(o=o.concat(o.map(ue)))),o}function be(t){return t.replace(/left|right|bottom|top/g,t=>te[t])}function ye(t){return"number"!=typeof t?function(t){return{top:0,right:0,bottom:0,left:0,...t}}(t):{top:t,right:t,bottom:t,left:t}}function _e(t){const{x:e,y:i,width:s,height:n}=t;return{width:s,height:n,top:i,left:e,right:e+s,bottom:i+n,x:e,y:i}}function we(t,e,i){let{reference:s,floating:n}=t;const o=de(e),r=ce(e),a=ae(r),l=ne(e),d="y"===o,c=s.x+s.width/2-n.width/2,h=s.y+s.height/2-n.height/2,u=s[a]/2-n[a]/2;let p;switch(l){case"top":p={x:c,y:s.y-n.height};break;case"bottom":p={x:c,y:s.y+s.height};break;case"right":p={x:s.x+s.width,y:h};break;case"left":p={x:s.x-n.width,y:h};break;default:p={x:s.x,y:s.y}}switch(oe(e)){case"start":p[r]-=u*(i&&d?-1:1);break;case"end":p[r]+=u*(i&&d?-1:1)}return p}async function xe(t,e){var i;void 0===e&&(e={});const{x:s,y:n,platform:o,rects:r,elements:a,strategy:l}=t,{boundary:d="clippingAncestors",rootBoundary:c="viewport",elementContext:h="floating",altBoundary:u=!1,padding:p=0}=se(e,t),f=ye(p),g=a[u?"floating"===h?"reference":"floating":h],m=_e(await o.getClippingRect({element:null==(i=await(null==o.isElement?void 0:o.isElement(g)))||i?g:g.contextElement||await(null==o.getDocumentElement?void 0:o.getDocumentElement(a.floating)),boundary:d,rootBoundary:c,strategy:l})),v="floating"===h?{x:s,y:n,width:r.floating.width,height:r.floating.height}:r.reference,b=await(null==o.getOffsetParent?void 0:o.getOffsetParent(a.floating)),y=await(null==o.isElement?void 0:o.isElement(b))&&await(null==o.getScale?void 0:o.getScale(b))||{x:1,y:1},_=_e(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:v,offsetParent:b,strategy:l}):v);return{top:(m.top-_.top+f.top)/y.y,bottom:(_.bottom-m.bottom+f.bottom)/y.y,left:(m.left-_.left+f.left)/y.x,right:(_.right-m.right+f.right)/y.x}}function $e(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function Se(t){return Jt.some(e=>t[e]>=0)}const ke=new Set(["left","top"]);function Ce(){return"undefined"!=typeof window}function Ee(t){return Re(t)?(t.nodeName||"").toLowerCase():"#document"}function Pe(t){var e;return(null==t||null==(e=t.ownerDocument)?void 0:e.defaultView)||window}function Te(t){var e;return null==(e=(Re(t)?t.ownerDocument:t.document)||window.document)?void 0:e.documentElement}function Re(t){return!!Ce()&&(t instanceof Node||t instanceof Pe(t).Node)}function Oe(t){return!!Ce()&&(t instanceof Element||t instanceof Pe(t).Element)}function Le(t){return!!Ce()&&(t instanceof HTMLElement||t instanceof Pe(t).HTMLElement)}function Ve(t){return!(!Ce()||"undefined"==typeof ShadowRoot)&&(t instanceof ShadowRoot||t instanceof Pe(t).ShadowRoot)}const Ne=new Set(["inline","contents"]);function Ae(t){const{overflow:e,overflowX:i,overflowY:s,display:n}=Ze(t);return/auto|scroll|overlay|hidden|clip/.test(e+s+i)&&!Ne.has(n)}const ze=new Set(["table","td","th"]);function Ue(t){return ze.has(Ee(t))}const Me=[":popover-open",":modal"];function De(t){return Me.some(e=>{try{return t.matches(e)}catch(t){return!1}})}const We=["transform","translate","scale","rotate","perspective"],Be=["transform","translate","scale","rotate","perspective","filter"],Ie=["paint","layout","strict","content"];function Fe(t){const e=He(),i=Oe(t)?Ze(t):t;return We.some(t=>!!i[t]&&"none"!==i[t])||!!i.containerType&&"normal"!==i.containerType||!e&&!!i.backdropFilter&&"none"!==i.backdropFilter||!e&&!!i.filter&&"none"!==i.filter||Be.some(t=>(i.willChange||"").includes(t))||Ie.some(t=>(i.contain||"").includes(t))}function He(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}const je=new Set(["html","body","#document"]);function qe(t){return je.has(Ee(t))}function Ze(t){return Pe(t).getComputedStyle(t)}function Je(t){return Oe(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function Xe(t){if("html"===Ee(t))return t;const e=t.assignedSlot||t.parentNode||Ve(t)&&t.host||Te(t);return Ve(e)?e.host:e}function Ye(t){const e=Xe(t);return qe(e)?t.ownerDocument?t.ownerDocument.body:t.body:Le(e)&&Ae(e)?e:Ye(e)}function Ge(t,e,i){var s;void 0===e&&(e=[]),void 0===i&&(i=!0);const n=Ye(t),o=n===(null==(s=t.ownerDocument)?void 0:s.body),r=Pe(n);if(o){const t=Ke(r);return e.concat(r,r.visualViewport||[],Ae(n)?n:[],t&&i?Ge(t):[])}return e.concat(n,Ge(n,[],i))}function Ke(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function Qe(t){const e=Ze(t);let i=parseFloat(e.width)||0,s=parseFloat(e.height)||0;const n=Le(t),o=n?t.offsetWidth:i,r=n?t.offsetHeight:s,a=Gt(i)!==o||Gt(s)!==r;return a&&(i=o,s=r),{width:i,height:s,$:a}}function ti(t){return Oe(t)?t:t.contextElement}function ei(t){const e=ti(t);if(!Le(e))return Qt(1);const i=e.getBoundingClientRect(),{width:s,height:n,$:o}=Qe(e);let r=(o?Gt(i.width):i.width)/s,a=(o?Gt(i.height):i.height)/n;return r&&Number.isFinite(r)||(r=1),a&&Number.isFinite(a)||(a=1),{x:r,y:a}}const ii=Qt(0);function si(t){const e=Pe(t);return He()&&e.visualViewport?{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}:ii}function ni(t,e,i,s){void 0===e&&(e=!1),void 0===i&&(i=!1);const n=t.getBoundingClientRect(),o=ti(t);let r=Qt(1);e&&(s?Oe(s)&&(r=ei(s)):r=ei(t));const a=function(t,e,i){return void 0===e&&(e=!1),!(!i||e&&i!==Pe(t))&&e}(o,i,s)?si(o):Qt(0);let l=(n.left+a.x)/r.x,d=(n.top+a.y)/r.y,c=n.width/r.x,h=n.height/r.y;if(o){const t=Pe(o),e=s&&Oe(s)?Pe(s):s;let i=t,n=Ke(i);for(;n&&s&&e!==i;){const t=ei(n),e=n.getBoundingClientRect(),s=Ze(n),o=e.left+(n.clientLeft+parseFloat(s.paddingLeft))*t.x,r=e.top+(n.clientTop+parseFloat(s.paddingTop))*t.y;l*=t.x,d*=t.y,c*=t.x,h*=t.y,l+=o,d+=r,i=Pe(n),n=Ke(i)}}return _e({width:c,height:h,x:l,y:d})}function oi(t,e){const i=Je(t).scrollLeft;return e?e.left+i:ni(Te(t)).left+i}function ri(t,e){const i=t.getBoundingClientRect();return{x:i.left+e.scrollLeft-oi(t,i),y:i.top+e.scrollTop}}const ai=new Set(["absolute","fixed"]);function li(t,e,i){let s;if("viewport"===e)s=function(t,e){const i=Pe(t),s=Te(t),n=i.visualViewport;let o=s.clientWidth,r=s.clientHeight,a=0,l=0;if(n){o=n.width,r=n.height;const t=He();(!t||t&&"fixed"===e)&&(a=n.offsetLeft,l=n.offsetTop)}const d=oi(s);if(d<=0){const t=s.ownerDocument,e=t.body,i=getComputedStyle(e),n="CSS1Compat"===t.compatMode&&parseFloat(i.marginLeft)+parseFloat(i.marginRight)||0,r=Math.abs(s.clientWidth-e.clientWidth-n);r<=25&&(o-=r)}else d<=25&&(o+=d);return{width:o,height:r,x:a,y:l}}(t,i);else if("document"===e)s=function(t){const e=Te(t),i=Je(t),s=t.ownerDocument.body,n=Yt(e.scrollWidth,e.clientWidth,s.scrollWidth,s.clientWidth),o=Yt(e.scrollHeight,e.clientHeight,s.scrollHeight,s.clientHeight);let r=-i.scrollLeft+oi(t);const a=-i.scrollTop;return"rtl"===Ze(s).direction&&(r+=Yt(e.clientWidth,s.clientWidth)-n),{width:n,height:o,x:r,y:a}}(Te(t));else if(Oe(e))s=function(t,e){const i=ni(t,!0,"fixed"===e),s=i.top+t.clientTop,n=i.left+t.clientLeft,o=Le(t)?ei(t):Qt(1);return{width:t.clientWidth*o.x,height:t.clientHeight*o.y,x:n*o.x,y:s*o.y}}(e,i);else{const i=si(t);s={x:e.x-i.x,y:e.y-i.y,width:e.width,height:e.height}}return _e(s)}function di(t,e){const i=Xe(t);return!(i===e||!Oe(i)||qe(i))&&("fixed"===Ze(i).position||di(i,e))}function ci(t,e,i){const s=Le(e),n=Te(e),o="fixed"===i,r=ni(t,!0,o,e);let a={scrollLeft:0,scrollTop:0};const l=Qt(0);function d(){l.x=oi(n)}if(s||!s&&!o)if(("body"!==Ee(e)||Ae(n))&&(a=Je(e)),s){const t=ni(e,!0,o,e);l.x=t.x+e.clientLeft,l.y=t.y+e.clientTop}else n&&d();o&&!s&&n&&d();const c=!n||s||o?Qt(0):ri(n,a);return{x:r.left+a.scrollLeft-l.x-c.x,y:r.top+a.scrollTop-l.y-c.y,width:r.width,height:r.height}}function hi(t){return"static"===Ze(t).position}function ui(t,e){if(!Le(t)||"fixed"===Ze(t).position)return null;if(e)return e(t);let i=t.offsetParent;return Te(t)===i&&(i=i.ownerDocument.body),i}function pi(t,e){const i=Pe(t);if(De(t))return i;if(!Le(t)){let e=Xe(t);for(;e&&!qe(e);){if(Oe(e)&&!hi(e))return e;e=Xe(e)}return i}let s=ui(t,e);for(;s&&Ue(s)&&hi(s);)s=ui(s,e);return s&&qe(s)&&hi(s)&&!Fe(s)?i:s||function(t){let e=Xe(t);for(;Le(e)&&!qe(e);){if(Fe(e))return e;if(De(e))return null;e=Xe(e)}return null}(t)||i}const fi={convertOffsetParentRelativeRectToViewportRelativeRect:function(t){let{elements:e,rect:i,offsetParent:s,strategy:n}=t;const o="fixed"===n,r=Te(s),a=!!e&&De(e.floating);if(s===r||a&&o)return i;let l={scrollLeft:0,scrollTop:0},d=Qt(1);const c=Qt(0),h=Le(s);if((h||!h&&!o)&&(("body"!==Ee(s)||Ae(r))&&(l=Je(s)),Le(s))){const t=ni(s);d=ei(s),c.x=t.x+s.clientLeft,c.y=t.y+s.clientTop}const u=!r||h||o?Qt(0):ri(r,l);return{width:i.width*d.x,height:i.height*d.y,x:i.x*d.x-l.scrollLeft*d.x+c.x+u.x,y:i.y*d.y-l.scrollTop*d.y+c.y+u.y}},getDocumentElement:Te,getClippingRect:function(t){let{element:e,boundary:i,rootBoundary:s,strategy:n}=t;const o=[..."clippingAncestors"===i?De(e)?[]:function(t,e){const i=e.get(t);if(i)return i;let s=Ge(t,[],!1).filter(t=>Oe(t)&&"body"!==Ee(t)),n=null;const o="fixed"===Ze(t).position;let r=o?Xe(t):t;for(;Oe(r)&&!qe(r);){const e=Ze(r),i=Fe(r);i||"fixed"!==e.position||(n=null),(o?!i&&!n:!i&&"static"===e.position&&n&&ai.has(n.position)||Ae(r)&&!i&&di(t,r))?s=s.filter(t=>t!==r):n=e,r=Xe(r)}return e.set(t,s),s}(e,this._c):[].concat(i),s],r=o[0],a=o.reduce((t,i)=>{const s=li(e,i,n);return t.top=Yt(s.top,t.top),t.right=Xt(s.right,t.right),t.bottom=Xt(s.bottom,t.bottom),t.left=Yt(s.left,t.left),t},li(e,r,n));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}},getOffsetParent:pi,getElementRects:async function(t){const e=this.getOffsetParent||pi,i=this.getDimensions,s=await i(t.floating);return{reference:ci(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:s.width,height:s.height}}},getClientRects:function(t){return Array.from(t.getClientRects())},getDimensions:function(t){const{width:e,height:i}=Qe(t);return{width:e,height:i}},getScale:ei,isElement:Oe,isRTL:function(t){return"rtl"===Ze(t).direction}};function gi(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function mi(t,e,i,s){void 0===s&&(s={});const{ancestorScroll:n=!0,ancestorResize:o=!0,elementResize:r="function"==typeof ResizeObserver,layoutShift:a="function"==typeof IntersectionObserver,animationFrame:l=!1}=s,d=ti(t),c=n||o?[...d?Ge(d):[],...Ge(e)]:[];c.forEach(t=>{n&&t.addEventListener("scroll",i,{passive:!0}),o&&t.addEventListener("resize",i)});const h=d&&a?function(t,e){let i,s=null;const n=Te(t);function o(){var t;clearTimeout(i),null==(t=s)||t.disconnect(),s=null}return function r(a,l){void 0===a&&(a=!1),void 0===l&&(l=1),o();const d=t.getBoundingClientRect(),{left:c,top:h,width:u,height:p}=d;if(a||e(),!u||!p)return;const f={rootMargin:-Kt(h)+"px "+-Kt(n.clientWidth-(c+u))+"px "+-Kt(n.clientHeight-(h+p))+"px "+-Kt(c)+"px",threshold:Yt(0,Xt(1,l))||1};let g=!0;function m(e){const s=e[0].intersectionRatio;if(s!==l){if(!g)return r();s?r(!1,s):i=setTimeout(()=>{r(!1,1e-7)},1e3)}1!==s||gi(d,t.getBoundingClientRect())||r(),g=!1}try{s=new IntersectionObserver(m,{...f,root:n.ownerDocument})}catch(t){s=new IntersectionObserver(m,f)}s.observe(t)}(!0),o}(d,i):null;let u,p=-1,f=null;r&&(f=new ResizeObserver(t=>{let[s]=t;s&&s.target===d&&f&&(f.unobserve(e),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var t;null==(t=f)||t.observe(e)})),i()}),d&&!l&&f.observe(d),f.observe(e));let g=l?ni(t):null;return l&&function e(){const s=ni(t);g&&!gi(g,s)&&i();g=s,u=requestAnimationFrame(e)}(),i(),()=>{var t;c.forEach(t=>{n&&t.removeEventListener("scroll",i),o&&t.removeEventListener("resize",i)}),null==h||h(),null==(t=f)||t.disconnect(),f=null,l&&cancelAnimationFrame(u)}}const vi=function(t){return void 0===t&&(t=0),{name:"offset",options:t,async fn(e){var i,s;const{x:n,y:o,placement:r,middlewareData:a}=e,l=await async function(t,e){const{placement:i,platform:s,elements:n}=t,o=await(null==s.isRTL?void 0:s.isRTL(n.floating)),r=ne(i),a=oe(i),l="y"===de(i),d=ke.has(r)?-1:1,c=o&&l?-1:1,h=se(e,t);let{mainAxis:u,crossAxis:p,alignmentAxis:f}="number"==typeof h?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return a&&"number"==typeof f&&(p="end"===a?-1*f:f),l?{x:p*c,y:u*d}:{x:u*d,y:p*c}}(e,t);return r===(null==(i=a.offset)?void 0:i.placement)&&null!=(s=a.arrow)&&s.alignmentOffset?{}:{x:n+l.x,y:o+l.y,data:{...l,placement:r}}}}},bi=function(t){return void 0===t&&(t={}),{name:"shift",options:t,async fn(e){const{x:i,y:s,placement:n}=e,{mainAxis:o=!0,crossAxis:r=!1,limiter:a={fn:t=>{let{x:e,y:i}=t;return{x:e,y:i}}},...l}=se(t,e),d={x:i,y:s},c=await xe(e,l),h=de(ne(n)),u=re(h);let p=d[u],f=d[h];if(o){const t="y"===u?"bottom":"right";p=ie(p+c["y"===u?"top":"left"],p,p-c[t])}if(r){const t="y"===h?"bottom":"right";f=ie(f+c["y"===h?"top":"left"],f,f-c[t])}const g=a.fn({...e,[u]:p,[h]:f});return{...g,data:{x:g.x-i,y:g.y-s,enabled:{[u]:o,[h]:r}}}}}},yi=function(t){return void 0===t&&(t={}),{name:"flip",options:t,async fn(e){var i,s;const{placement:n,middlewareData:o,rects:r,initialPlacement:a,platform:l,elements:d}=e,{mainAxis:c=!0,crossAxis:h=!0,fallbackPlacements:u,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:f="none",flipAlignment:g=!0,...m}=se(t,e);if(null!=(i=o.arrow)&&i.alignmentOffset)return{};const v=ne(n),b=de(a),y=ne(a)===a,_=await(null==l.isRTL?void 0:l.isRTL(d.floating)),w=u||(y||!g?[be(a)]:function(t){const e=be(t);return[ue(t),e,ue(e)]}(a)),x="none"!==f;!u&&x&&w.push(...ve(a,g,f,_));const $=[a,...w],S=await xe(e,m),k=[];let C=(null==(s=o.flip)?void 0:s.overflows)||[];if(c&&k.push(S[v]),h){const t=he(n,r,_);k.push(S[t[0]],S[t[1]])}if(C=[...C,{placement:n,overflows:k}],!k.every(t=>t<=0)){var E,P;const t=((null==(E=o.flip)?void 0:E.index)||0)+1,e=$[t];if(e){if(!("alignment"===h&&b!==de(e))||C.every(t=>de(t.placement)!==b||t.overflows[0]>0))return{data:{index:t,overflows:C},reset:{placement:e}}}let i=null==(P=C.filter(t=>t.overflows[0]<=0).sort((t,e)=>t.overflows[1]-e.overflows[1])[0])?void 0:P.placement;if(!i)switch(p){case"bestFit":{var T;const t=null==(T=C.filter(t=>{if(x){const e=de(t.placement);return e===b||"y"===e}return!0}).map(t=>[t.placement,t.overflows.filter(t=>t>0).reduce((t,e)=>t+e,0)]).sort((t,e)=>t[1]-e[1])[0])?void 0:T[0];t&&(i=t);break}case"initialPlacement":i=a}if(n!==i)return{reset:{placement:i}}}return{}}}},_i=function(t){return void 0===t&&(t={}),{name:"hide",options:t,async fn(e){const{rects:i}=e,{strategy:s="referenceHidden",...n}=se(t,e);switch(s){case"referenceHidden":{const t=$e(await xe(e,{...n,elementContext:"reference"}),i.reference);return{data:{referenceHiddenOffsets:t,referenceHidden:Se(t)}}}case"escaped":{const t=$e(await xe(e,{...n,altBoundary:!0}),i.floating);return{data:{escapedOffsets:t,escaped:Se(t)}}}default:return{}}}}},wi=(t,e,i)=>{const s=new Map,n={platform:fi,...i},o={...n.platform,_c:s};return(async(t,e,i)=>{const{placement:s="bottom",strategy:n="absolute",middleware:o=[],platform:r}=i,a=o.filter(Boolean),l=await(null==r.isRTL?void 0:r.isRTL(e));let d=await r.getElementRects({reference:t,floating:e,strategy:n}),{x:c,y:h}=we(d,s,l),u=s,p={},f=0;for(let i=0;i<a.length;i++){const{name:o,fn:g}=a[i],{x:m,y:v,data:b,reset:y}=await g({x:c,y:h,initialPlacement:s,placement:u,strategy:n,middlewareData:p,rects:d,platform:r,elements:{reference:t,floating:e}});c=null!=m?m:c,h=null!=v?v:h,p={...p,[o]:{...p[o],...b}},y&&f<=50&&(f++,"object"==typeof y&&(y.placement&&(u=y.placement),y.rects&&(d=!0===y.rects?await r.getElementRects({reference:t,floating:e,strategy:n}):y.rects),({x:c,y:h}=we(d,u,l))),i=-1)}return{x:c,y:h,placement:u,strategy:n,middlewareData:p}})(t,e,{...n,platform:o})};var xi,$i=r`:host{display:contents}.tooltip-placeholder{display:inline-block;max-width:100%}.tooltip{word-wrap:break-word;background-color:var(--sgds-surface-fixed-dark);border-radius:var(--sgds-border-radius-md);box-shadow:0 0 2px 0 rgba(0,0,0,.12),0 8px 16px 0 rgba(0,0,0,.14);color:var(--sgds-color-fixed-light);display:block;font-size:var(--sgds-font-size-14);line-break:auto;max-width:var(--sgds-dimension-320);padding:var(--sgds-padding-xs) var(--sgds-padding-sm);text-align:left;text-decoration:none;text-shadow:none;text-transform:none;white-space:normal;word-break:normal;word-spacing:normal;z-index:var(--sgds-z-index-overlay)}div{max-width:fit-content}`;class Si extends zt{constructor(){super(...arguments),this._myTooltip=Ht(),this._tooltipBubble=Ht(),this.content="",this.placement="top",this.trigger="hover focus",this.open=!1,this._handleClickOutOfElement=t=>{this.open&&(t.composedPath().includes(this)||this.hide())}}connectedCallback(){super.connectedCallback(),this.trigger.includes("click")&&document.addEventListener("click",this._handleClickOutOfElement)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("click",this._handleClickOutOfElement),this._cleanupAutoUpdate&&(this._cleanupAutoUpdate(),this._cleanupAutoUpdate=void 0)}firstUpdated(t){super.firstUpdated(t),this._tooltipTargetElements.forEach(t=>{t.setAttribute("data-sgds-tooltip",this.content),this.trigger.includes("hover")&&(t.addEventListener("mouseenter",()=>this.show()),t.addEventListener("mouseleave",()=>this.hide())),this.trigger.includes("focus")&&(t.addEventListener("focus",()=>this.show()),t.addEventListener("blur",()=>this.hide())),"click"===this.trigger&&t.addEventListener("click",()=>this.toggle())})}_handleSlotChange(){this._tooltipTargetElements.forEach(t=>t.setAttribute("data-sgds-tooltip",this.content))}async updateFloatingPosition(){if(!this._myTooltip.value||!this._tooltipBubble.value)return;const{x:t,y:e,placement:i,strategy:s,middlewareData:n}=await wi(this._tooltipTargetElements[0],this._tooltipBubble.value,{strategy:"fixed",placement:this.placement,middleware:[vi(8),yi(),bi(),_i()]});this._tooltipBubble.value.setAttribute("data-placement",i),Object.assign(this._tooltipBubble.value.style,{position:s,left:`${t}px`,top:`${e}px`});const{referenceHidden:o,escaped:r}=n.hide||{};this._tooltipBubble.value.style.visibility=o||r?"hidden":"visible"}async show(){this.open||(this.open=!0,this.emit("sgds-show"),await this.updateComplete,await this.updateFloatingPosition(),this._myTooltip.value&&this._tooltipBubble.value&&(this._cleanupAutoUpdate=mi(this._tooltipTargetElements[0],this._tooltipBubble.value,()=>this.updateFloatingPosition())),this.emit("sgds-after-show"))}hide(){this.open&&(this.emit("sgds-hide"),this.open=!1,this._cleanupAutoUpdate&&(this._cleanupAutoUpdate(),this._cleanupAutoUpdate=void 0),setTimeout(()=>this.emit("sgds-after-hide"),0))}toggle(){this.open?this.hide():this.show()}render(){return Q`
|
|
63
63
|
<div ${Zt(this._myTooltip)} class="tooltip-placeholder">
|
|
64
64
|
<slot @slotchange=${()=>this._handleSlotChange()}></slot>
|
|
65
65
|
${this.open?Q`<div ${Zt(this._tooltipBubble)} class="tooltip" role="tooltip">${this.content}</div>`:null}
|