@govtechsg/sgds-web-component 3.17.1-rc.0 → 3.18.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/base/card-element.d.ts +1 -0
- package/base/card-element.js +14 -0
- package/base/card-element.js.map +1 -1
- package/base/card.js +1 -1
- package/components/Breadcrumb/index.umd.min.js +10 -16
- package/components/Breadcrumb/index.umd.min.js.map +1 -1
- package/components/Card/index.umd.min.js +2 -2
- package/components/Card/index.umd.min.js.map +1 -1
- package/components/Card/sgds-card.js +3 -9
- package/components/Card/sgds-card.js.map +1 -1
- package/components/ComboBox/index.umd.min.js +1 -1
- 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/Dropdown/dropdown-menu.js +1 -1
- package/components/Dropdown/dropdown.js +1 -1
- package/components/Dropdown/index.umd.min.js +3 -9
- package/components/Dropdown/index.umd.min.js.map +1 -1
- package/components/Dropdown/sgds-dropdown.js +19 -11
- package/components/Dropdown/sgds-dropdown.js.map +1 -1
- package/components/IconCard/index.umd.min.js +3 -3
- package/components/IconCard/index.umd.min.js.map +1 -1
- package/components/IconCard/sgds-icon-card.js +3 -9
- package/components/IconCard/sgds-icon-card.js.map +1 -1
- package/components/ImageCard/index.umd.min.js +2 -2
- package/components/ImageCard/index.umd.min.js.map +1 -1
- package/components/ImageCard/sgds-image-card.js +3 -9
- package/components/ImageCard/sgds-image-card.js.map +1 -1
- package/components/Mainnav/index.umd.min.js +10 -16
- package/components/Mainnav/index.umd.min.js.map +1 -1
- package/components/OverflowMenu/index.umd.min.js +3 -9
- 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/Stepper/index.d.ts +0 -2
- package/components/Stepper/index.js +0 -2
- package/components/Stepper/index.js.map +1 -1
- package/components/Stepper/index.umd.min.js +23 -47
- package/components/Stepper/index.umd.min.js.map +1 -1
- package/components/Stepper/sgds-stepper.d.ts +2 -23
- package/components/Stepper/sgds-stepper.js +11 -79
- package/components/Stepper/sgds-stepper.js.map +1 -1
- package/components/Stepper/stepper.js +1 -1
- package/components/Stepper/types.d.ts +0 -1
- package/components/ThumbnailCard/index.umd.min.js +5 -5
- package/components/ThumbnailCard/index.umd.min.js.map +1 -1
- package/components/ThumbnailCard/sgds-thumbnail-card.js +6 -9
- package/components/ThumbnailCard/sgds-thumbnail-card.js.map +1 -1
- package/components/index.umd.min.js +9 -17
- package/components/index.umd.min.js.map +1 -1
- package/css/fouc.css +0 -1
- package/custom-elements.json +99 -201
- package/index.umd.min.js +43 -73
- package/index.umd.min.js.map +1 -1
- package/package.json +1 -1
- package/react/base/card-element.cjs.js +14 -0
- package/react/base/card-element.cjs.js.map +1 -1
- package/react/base/card-element.js +14 -0
- package/react/base/card-element.js.map +1 -1
- package/react/base/card.cjs.js +1 -1
- package/react/base/card.js +1 -1
- package/react/components/Card/sgds-card.cjs.js +3 -9
- package/react/components/Card/sgds-card.cjs.js.map +1 -1
- package/react/components/Card/sgds-card.js +3 -9
- package/react/components/Card/sgds-card.js.map +1 -1
- package/react/components/Dropdown/dropdown-menu.cjs.js +1 -1
- package/react/components/Dropdown/dropdown-menu.js +1 -1
- package/react/components/Dropdown/dropdown.cjs.js +1 -1
- package/react/components/Dropdown/dropdown.js +1 -1
- package/react/components/Dropdown/sgds-dropdown.cjs.js +19 -11
- package/react/components/Dropdown/sgds-dropdown.cjs.js.map +1 -1
- package/react/components/Dropdown/sgds-dropdown.js +19 -11
- package/react/components/Dropdown/sgds-dropdown.js.map +1 -1
- package/react/components/IconCard/sgds-icon-card.cjs.js +3 -9
- package/react/components/IconCard/sgds-icon-card.cjs.js.map +1 -1
- package/react/components/IconCard/sgds-icon-card.js +3 -9
- package/react/components/IconCard/sgds-icon-card.js.map +1 -1
- package/react/components/ImageCard/sgds-image-card.cjs.js +3 -9
- package/react/components/ImageCard/sgds-image-card.cjs.js.map +1 -1
- package/react/components/ImageCard/sgds-image-card.js +3 -9
- package/react/components/ImageCard/sgds-image-card.js.map +1 -1
- package/react/components/Stepper/sgds-stepper.cjs.js +10 -78
- package/react/components/Stepper/sgds-stepper.cjs.js.map +1 -1
- package/react/components/Stepper/sgds-stepper.js +11 -79
- package/react/components/Stepper/sgds-stepper.js.map +1 -1
- package/react/components/Stepper/stepper.cjs.js +1 -1
- package/react/components/Stepper/stepper.js +1 -1
- package/react/components/ThumbnailCard/sgds-thumbnail-card.cjs.js +6 -9
- package/react/components/ThumbnailCard/sgds-thumbnail-card.cjs.js.map +1 -1
- package/react/components/ThumbnailCard/sgds-thumbnail-card.js +6 -9
- package/react/components/ThumbnailCard/sgds-thumbnail-card.js.map +1 -1
- package/react/index.cjs.js +38 -40
- package/react/index.cjs.js.map +1 -1
- package/react/index.d.ts +0 -1
- package/react/index.js +0 -1
- package/react/index.js.map +1 -1
- package/types/react.d.ts +3 -18
- package/components/Stepper/sgds-step.d.ts +0 -42
- package/components/Stepper/sgds-step.js +0 -118
- package/components/Stepper/sgds-step.js.map +0 -1
- package/components/Stepper/step.js +0 -6
- package/components/Stepper/step.js.map +0 -1
- package/react/components/Stepper/sgds-step.cjs.js +0 -124
- package/react/components/Stepper/sgds-step.cjs.js.map +0 -1
- package/react/components/Stepper/sgds-step.js +0 -119
- package/react/components/Stepper/sgds-step.js.map +0 -1
- package/react/components/Stepper/step.cjs.js +0 -11
- package/react/components/Stepper/step.cjs.js.map +0 -1
- package/react/components/Stepper/step.js +0 -7
- package/react/components/Stepper/step.js.map +0 -1
- package/react/step/index.cjs.js +0 -40
- package/react/step/index.cjs.js.map +0 -1
- package/react/step/index.d.ts +0 -2
- package/react/step/index.js +0 -16
- package/react/step/index.js.map +0 -1
|
@@ -44,7 +44,6 @@ class SgdsImageCard extends CardElement {
|
|
|
44
44
|
return (element.querySelector("a") || element);
|
|
45
45
|
}
|
|
46
46
|
firstUpdated(changedProperties) {
|
|
47
|
-
var _a, _b;
|
|
48
47
|
super.firstUpdated(changedProperties);
|
|
49
48
|
if (this._imageNode.length === 0) {
|
|
50
49
|
const image = this.shadowRoot.querySelector(".card-image");
|
|
@@ -54,14 +53,9 @@ class SgdsImageCard extends CardElement {
|
|
|
54
53
|
body.style.padding = "0px";
|
|
55
54
|
}
|
|
56
55
|
if (this.stretchedLink) {
|
|
57
|
-
const
|
|
58
|
-
const
|
|
59
|
-
|
|
60
|
-
this.card.setAttribute("href", footerHref);
|
|
61
|
-
}
|
|
62
|
-
else if (linkHref) {
|
|
63
|
-
this.card.setAttribute("href", linkHref);
|
|
64
|
-
}
|
|
56
|
+
const footerAnchor = this.footerSlotItems;
|
|
57
|
+
const linkAnchor = this.linkSlotItems;
|
|
58
|
+
this._forwardAnchorAttributes((footerAnchor === null || footerAnchor === void 0 ? void 0 : footerAnchor.href) ? footerAnchor : linkAnchor);
|
|
65
59
|
}
|
|
66
60
|
}
|
|
67
61
|
handleImgSlotChange(e) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sgds-image-card.js","sources":["../../../src/components/ImageCard/sgds-image-card.ts"],"sourcesContent":["import { nothing, PropertyValueMap } from \"lit\";\nimport { html, literal } from \"lit/static-html.js\";\nimport { property, queryAssignedElements, queryAssignedNodes } from \"lit/decorators.js\";\nimport { classMap } from \"lit/directives/class-map.js\";\nimport { CardElement } from \"../../base/card-element\";\nimport { CardImageAdjustment, CardImagePosition } from \"../Card/types\";\nimport type SgdsLink from \"../Link/sgds-link\";\nimport imageCardStyle from \"./image-card.css\";\n\n/**\n * @summary Image cards can be used for headers and footers, a wide variety of content, contain contextual background colors and images.\n * @slot default - The content area of the card, placed directly under the title. Accepts any HTML or custom elements.\n * @slot image - Accepts an image or svg element of the card. Only a single element is allowed to be passed in.\n * @slot image-badge - Accepts an element for a badge, positioned at the top-left corner of the image.\n * @slot image-action - Accepts an element for an overflow or contextual menu, positioned at the top-right corner of the image. Typically used for action menu.\n * @slot upper - Accepts any content to be displayed at the top of the subtitle. Commonly used for badges, status indicators, or decorative elements.\n * @slot subtitle - The subtitle of the card\n * @slot title - The title of the card\n * @slot description - The paragrapher text of the card\n * @slot lower - Accepts any additional content to be displayed below the card description, such as badges, metadata, or supplementary information.\n * @slot footer - Footer area of the card. Accepts links, actions, or any custom content.\n * @slot link - (@deprecated) Deprecated since 3.3.2 in favour of `footer` slot.\n * Legacy slot for anchor elements. Use `footer` instead.\n */\nexport class SgdsImageCard extends CardElement {\n static styles = [...CardElement.styles, imageCardStyle];\n\n /** @internal */\n @queryAssignedNodes({ slot: \"image\", flatten: true })\n _imageNode!: Array<Node>;\n @queryAssignedElements({ slot: \"footer\" })\n private footerNode!: HTMLElement[];\n @queryAssignedElements({ slot: \"link\" })\n private linkNode!: HTMLAnchorElement[] | SgdsLink[];\n\n /** Removes the card's internal padding when set to true. */\n @property({ type: Boolean, reflect: true }) noPadding = false;\n\n /** Sets the image position of the card. Available options: `before`, `after` */\n @property({ type: String, reflect: true }) imagePosition: CardImagePosition = \"before\";\n\n /** Controls how the image is sized and aligned within the card. Available options: `default`, `padding around`, `aspect ratio` */\n @property({ type: String, reflect: true }) imageAdjustment: CardImageAdjustment = \"default\";\n\n private get linkSlotItems(): HTMLAnchorElement | null {\n if (!this.linkNode || this.linkNode.length === 0) return null;\n const element = this.linkNode[0] as HTMLElement;\n return (element.querySelector(\"a\") || element) as HTMLAnchorElement;\n }\n\n private get footerSlotItems(): HTMLAnchorElement | null {\n if (!this.footerNode || this.footerNode.length === 0) return null;\n const element = this.footerNode[0] as HTMLElement;\n return (element.querySelector(\"a\") || element) as HTMLAnchorElement;\n }\n\n protected firstUpdated(changedProperties: PropertyValueMap<this>) {\n super.firstUpdated(changedProperties);\n\n if (this._imageNode.length === 0) {\n const image = this.shadowRoot.querySelector(\".card-image\") as HTMLDivElement;\n const body = this.shadowRoot.querySelector(\".card-body\") as HTMLDivElement;\n image.style.display = \"none\";\n if (this.noPadding) body.style.padding = \"0px\";\n }\n\n if (this.stretchedLink) {\n const
|
|
1
|
+
{"version":3,"file":"sgds-image-card.js","sources":["../../../src/components/ImageCard/sgds-image-card.ts"],"sourcesContent":["import { nothing, PropertyValueMap } from \"lit\";\nimport { html, literal } from \"lit/static-html.js\";\nimport { property, queryAssignedElements, queryAssignedNodes } from \"lit/decorators.js\";\nimport { classMap } from \"lit/directives/class-map.js\";\nimport { CardElement } from \"../../base/card-element\";\nimport { CardImageAdjustment, CardImagePosition } from \"../Card/types\";\nimport type SgdsLink from \"../Link/sgds-link\";\nimport imageCardStyle from \"./image-card.css\";\n\n/**\n * @summary Image cards can be used for headers and footers, a wide variety of content, contain contextual background colors and images.\n * @slot default - The content area of the card, placed directly under the title. Accepts any HTML or custom elements.\n * @slot image - Accepts an image or svg element of the card. Only a single element is allowed to be passed in.\n * @slot image-badge - Accepts an element for a badge, positioned at the top-left corner of the image.\n * @slot image-action - Accepts an element for an overflow or contextual menu, positioned at the top-right corner of the image. Typically used for action menu.\n * @slot upper - Accepts any content to be displayed at the top of the subtitle. Commonly used for badges, status indicators, or decorative elements.\n * @slot subtitle - The subtitle of the card\n * @slot title - The title of the card\n * @slot description - The paragrapher text of the card\n * @slot lower - Accepts any additional content to be displayed below the card description, such as badges, metadata, or supplementary information.\n * @slot footer - Footer area of the card. Accepts links, actions, or any custom content.\n * @slot link - (@deprecated) Deprecated since 3.3.2 in favour of `footer` slot.\n * Legacy slot for anchor elements. Use `footer` instead.\n */\nexport class SgdsImageCard extends CardElement {\n static styles = [...CardElement.styles, imageCardStyle];\n\n /** @internal */\n @queryAssignedNodes({ slot: \"image\", flatten: true })\n _imageNode!: Array<Node>;\n @queryAssignedElements({ slot: \"footer\" })\n private footerNode!: HTMLElement[];\n @queryAssignedElements({ slot: \"link\" })\n private linkNode!: HTMLAnchorElement[] | SgdsLink[];\n\n /** Removes the card's internal padding when set to true. */\n @property({ type: Boolean, reflect: true }) noPadding = false;\n\n /** Sets the image position of the card. Available options: `before`, `after` */\n @property({ type: String, reflect: true }) imagePosition: CardImagePosition = \"before\";\n\n /** Controls how the image is sized and aligned within the card. Available options: `default`, `padding around`, `aspect ratio` */\n @property({ type: String, reflect: true }) imageAdjustment: CardImageAdjustment = \"default\";\n\n private get linkSlotItems(): HTMLAnchorElement | null {\n if (!this.linkNode || this.linkNode.length === 0) return null;\n const element = this.linkNode[0] as HTMLElement;\n return (element.querySelector(\"a\") || element) as HTMLAnchorElement;\n }\n\n private get footerSlotItems(): HTMLAnchorElement | null {\n if (!this.footerNode || this.footerNode.length === 0) return null;\n const element = this.footerNode[0] as HTMLElement;\n return (element.querySelector(\"a\") || element) as HTMLAnchorElement;\n }\n\n protected firstUpdated(changedProperties: PropertyValueMap<this>) {\n super.firstUpdated(changedProperties);\n\n if (this._imageNode.length === 0) {\n const image = this.shadowRoot.querySelector(\".card-image\") as HTMLDivElement;\n const body = this.shadowRoot.querySelector(\".card-body\") as HTMLDivElement;\n image.style.display = \"none\";\n if (this.noPadding) body.style.padding = \"0px\";\n }\n\n if (this.stretchedLink) {\n const footerAnchor = this.footerSlotItems;\n const linkAnchor = this.linkSlotItems;\n this._forwardAnchorAttributes(footerAnchor?.href ? footerAnchor : linkAnchor);\n }\n }\n\n handleImgSlotChange(e: Event) {\n const childNodes = (e.target as HTMLSlotElement).assignedNodes({ flatten: true }) as Array<HTMLOrSVGImageElement>;\n\n if (childNodes.length > 1) {\n return console.error(\"Multiple elements passed into SgdsCard's image slot\");\n }\n }\n\n render() {\n const tag = this.stretchedLink ? literal`a` : literal`div`;\n const cardTabIndex = !this.stretchedLink || this.disabled ? -1 : 0;\n\n return html`\n <${tag} \n class=\"card ${classMap({\n disabled: this.disabled\n })}\"\n tabindex=${cardTabIndex}\n >\n ${this.tinted && !this.noPadding ? html`<div class=\"card-tinted-bg\"></div>` : nothing}\n <div class=\"card-image\">\n\t\t\t\t\t<slot name=\"image\" @slotchange=${this.handleImgSlotChange}></slot>\n\t\t\t\t\t<slot name=\"image-badge\"></slot>\n\t\t\t\t\t<slot name=\"image-action\"></slot>\n </div>\n <div class=\"card-body\">\n\t\t\t\t\t<slot name=\"upper\"></slot>\n <div class=\"card-header-container\">\n <div class=\"card-header\">\n <slot name=\"subtitle\"></slot>\n <h3 class=\"card-title\"><slot name=\"title\" @slotchange=${this.handleTitleSlotChange}></slot></h3>\n </div>\n <slot></slot>\n </div>\n <slot name=\"description\"></slot>\n <slot name=\"lower\"></slot>\n <slot name=\"footer\">\n <slot name=\"link\" @slotchange=${this.warnLinkSlotMisused}></slot>\n </slot>\n </div>\n </${tag}>\n `;\n }\n}\n\nexport default SgdsImageCard;\n"],"names":["imageCardStyle"],"mappings":";;;;;;;;AASA;;;;;;;;;;;;;;AAcG;AACG,MAAO,aAAc,SAAQ,WAAW,CAAA;AAA9C,IAAA,WAAA,GAAA;;;QAY8C,IAAS,CAAA,SAAA,GAAG,KAAK,CAAC;;QAGnB,IAAa,CAAA,aAAA,GAAsB,QAAQ,CAAC;;QAG5C,IAAe,CAAA,eAAA,GAAwB,SAAS,CAAC;KA0E7F;AAxEC,IAAA,IAAY,aAAa,GAAA;QACvB,IAAI,CAAC,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,KAAK,CAAC;AAAE,YAAA,OAAO,IAAI,CAAC;QAC9D,MAAM,OAAO,GAAG,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAgB,CAAC;QAChD,QAAQ,OAAO,CAAC,aAAa,CAAC,GAAG,CAAC,IAAI,OAAO,EAAuB;KACrE;AAED,IAAA,IAAY,eAAe,GAAA;QACzB,IAAI,CAAC,IAAI,CAAC,UAAU,IAAI,IAAI,CAAC,UAAU,CAAC,MAAM,KAAK,CAAC;AAAE,YAAA,OAAO,IAAI,CAAC;QAClE,MAAM,OAAO,GAAG,IAAI,CAAC,UAAU,CAAC,CAAC,CAAgB,CAAC;QAClD,QAAQ,OAAO,CAAC,aAAa,CAAC,GAAG,CAAC,IAAI,OAAO,EAAuB;KACrE;AAES,IAAA,YAAY,CAAC,iBAAyC,EAAA;AAC9D,QAAA,KAAK,CAAC,YAAY,CAAC,iBAAiB,CAAC,CAAC;QAEtC,IAAI,IAAI,CAAC,UAAU,CAAC,MAAM,KAAK,CAAC,EAAE;YAChC,MAAM,KAAK,GAAG,IAAI,CAAC,UAAU,CAAC,aAAa,CAAC,aAAa,CAAmB,CAAC;YAC7E,MAAM,IAAI,GAAG,IAAI,CAAC,UAAU,CAAC,aAAa,CAAC,YAAY,CAAmB,CAAC;AAC3E,YAAA,KAAK,CAAC,KAAK,CAAC,OAAO,GAAG,MAAM,CAAC;YAC7B,IAAI,IAAI,CAAC,SAAS;AAAE,gBAAA,IAAI,CAAC,KAAK,CAAC,OAAO,GAAG,KAAK,CAAC;SAChD;AAED,QAAA,IAAI,IAAI,CAAC,aAAa,EAAE;AACtB,YAAA,MAAM,YAAY,GAAG,IAAI,CAAC,eAAe,CAAC;AAC1C,YAAA,MAAM,UAAU,GAAG,IAAI,CAAC,aAAa,CAAC;YACtC,IAAI,CAAC,wBAAwB,CAAC,CAAA,YAAY,KAAZ,IAAA,IAAA,YAAY,uBAAZ,YAAY,CAAE,IAAI,IAAG,YAAY,GAAG,UAAU,CAAC,CAAC;SAC/E;KACF;AAED,IAAA,mBAAmB,CAAC,CAAQ,EAAA;AAC1B,QAAA,MAAM,UAAU,GAAI,CAAC,CAAC,MAA0B,CAAC,aAAa,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAiC,CAAC;AAElH,QAAA,IAAI,UAAU,CAAC,MAAM,GAAG,CAAC,EAAE;AACzB,YAAA,OAAO,OAAO,CAAC,KAAK,CAAC,qDAAqD,CAAC,CAAC;SAC7E;KACF;IAED,MAAM,GAAA;AACJ,QAAA,MAAM,GAAG,GAAG,IAAI,CAAC,aAAa,GAAG,OAAO,CAAA,GAAG,GAAG,OAAO,CAAA,KAAK,CAAC;AAC3D,QAAA,MAAM,YAAY,GAAG,CAAC,IAAI,CAAC,aAAa,IAAI,IAAI,CAAC,QAAQ,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC;AAEnE,QAAA,OAAO,IAAI,CAAA,CAAA;SACN,GAAG,CAAA;AACU,oBAAA,EAAA,QAAQ,CAAC;YACrB,QAAQ,EAAE,IAAI,CAAC,QAAQ;SACxB,CAAC,CAAA;mBACS,YAAY,CAAA;;AAErB,QAAA,EAAA,IAAI,CAAC,MAAM,IAAI,CAAC,IAAI,CAAC,SAAS,GAAG,IAAI,CAAA,CAAA,kCAAA,CAAoC,GAAG,OAAO,CAAA;;AAEvD,oCAAA,EAAA,IAAI,CAAC,mBAAmB,CAAA;;;;;;;;;AASQ,oEAAA,EAAA,IAAI,CAAC,qBAAqB,CAAA;;;;;;;AAOpD,0CAAA,EAAA,IAAI,CAAC,mBAAmB,CAAA;;;UAG1D,GAAG,CAAA;KACR,CAAC;KACH;;AA1FM,aAAM,CAAA,MAAA,GAAG,CAAC,GAAG,WAAW,CAAC,MAAM,EAAEA,QAAc,CAAzC,CAA2C;AAIxD,UAAA,CAAA;IADC,kBAAkB,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;AAC5B,CAAA,EAAA,aAAA,CAAA,SAAA,EAAA,YAAA,EAAA,KAAA,CAAA,CAAA,CAAA;AAEjB,UAAA,CAAA;AADP,IAAA,qBAAqB,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC;AACP,CAAA,EAAA,aAAA,CAAA,SAAA,EAAA,YAAA,EAAA,KAAA,CAAA,CAAA,CAAA;AAE3B,UAAA,CAAA;AADP,IAAA,qBAAqB,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;AACY,CAAA,EAAA,aAAA,CAAA,SAAA,EAAA,UAAA,EAAA,KAAA,CAAA,CAAA,CAAA;AAGR,UAAA,CAAA;IAA3C,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;AAAmB,CAAA,EAAA,aAAA,CAAA,SAAA,EAAA,WAAA,EAAA,KAAA,CAAA,CAAA,CAAA;AAGnB,UAAA,CAAA;IAA1C,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;AAA6C,CAAA,EAAA,aAAA,CAAA,SAAA,EAAA,eAAA,EAAA,KAAA,CAAA,CAAA,CAAA;AAG5C,UAAA,CAAA;IAA1C,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;AAAkD,CAAA,EAAA,aAAA,CAAA,SAAA,EAAA,iBAAA,EAAA,KAAA,CAAA,CAAA;;;;"}
|
|
@@ -46,7 +46,7 @@ class a{constructor(e,t,a,i){if(this.subscribe=!1,this.provided=!1,this.value=vo
|
|
|
46
46
|
* Copyright 2017 Google LLC
|
|
47
47
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
48
48
|
*/
|
|
49
|
-
const A=globalThis,L=e=>{A.emitLitDebugLogEvents&&A.dispatchEvent(new CustomEvent("lit-debug",{detail:e}))};let E,P=0;A.litIssuedWarnings??=new Set,E=(e,t)=>{t+=e?` See https://lit.dev/msg/${e} for more information.`:"",A.litIssuedWarnings.has(t)||A.litIssuedWarnings.has(e)||(console.warn(t),A.litIssuedWarnings.add(t))},queueMicrotask(()=>{E("dev-mode","Lit is in dev mode. Not recommended for production!")});const T=A.ShadyDOM?.inUse&&!0===A.ShadyDOM?.noPatch?A.ShadyDOM.wrap:e=>e,R=A.trustedTypes,N=R?R.createPolicy("lit-html",{createHTML:e=>e}):void 0,O=e=>e,z=(e,t,a)=>O,D=e=>{if(ve!==z)throw new Error("Attempted to overwrite existing lit-html security policy. setSanitizeDOMValueFactory should be called at most once.");ve=e},I=()=>{ve=z},U=(e,t,a)=>ve(e,t,a),W="$lit$",q=`lit$${Math.random().toFixed(9).slice(2)}$`,j="?"+q,F=`<${j}>`,K=document,X=()=>K.createComment(""),J=e=>null===e||"object"!=typeof e&&"function"!=typeof e,Y=Array.isArray,G="[ \t\n\f\r]",Q=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,ee=/-->/g,te=/>/g,ae=new RegExp(`>|${G}(?:([^\\s"'>=/]+)(${G}*=${G}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),ie=/'/g,ne=/"/g,le=/^(?:script|style|textarea|title)$/i,oe=(se=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$)&&E("","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$:se,strings:e,values:t}));var se;const re=Symbol.for("lit-noChange"),ce=Symbol.for("lit-nothing"),de=new WeakMap,he=K.createTreeWalker(K,129);let ve=z;function pe(e,t){if(!Y(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!==N?N.createHTML(t):t}class ge{constructor({strings:e,_$litType$:t},a){let i;this.parts=[];let n=0,l=0;const o=e.length-1,s=this.parts,[r,c]=((e,t)=>{const a=e.length-1,i=[];let n,l=2===t?"<svg>":3===t?"<math>":"",o=Q;for(let t=0;t<a;t++){const a=e[t];let s,r,c=-1,d=0;for(;d<a.length&&(o.lastIndex=d,r=o.exec(a),null!==r);)if(d=o.lastIndex,o===Q){if("!--"===r[1])o=ee;else if(void 0!==r[1])o=te;else if(void 0!==r[2])le.test(r[2])&&(n=new RegExp(`</${r[2]}`,"g")),o=ae;else if(void 0!==r[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 o===ae?">"===r[0]?(o=n??Q,c=-1):void 0===r[1]?c=-2:(c=o.lastIndex-r[2].length,s=r[1],o=void 0===r[3]?ae:'"'===r[3]?ne:ie):o===ne||o===ie?o=ae:o===ee||o===te?o=Q:(o=ae,n=void 0);console.assert(-1===c||o===ae||o===ie||o===ne,"unexpected parse state B");const h=o===ae&&e[t+1].startsWith("/>")?" ":"";l+=o===Q?a+F:c>=0?(i.push(s),a.slice(0,c)+W+a.slice(c)+q+h):a+q+(-2===c?t:h)}return[pe(e,l+(e[a]||"<?>")+(2===t?"</svg>":3===t?"</math>":"")),i]})(e,t);if(this.el=ge.createElement(r,a),he.currentNode=this.el.content,2===t||3===t){const e=this.el.content.firstChild;e.replaceWith(...e.childNodes)}for(;null!==(i=he.nextNode())&&s.length<o;){if(1===i.nodeType){{const e=i.localName;if(/^(?:textarea|template)$/i.test(e)&&i.innerHTML.includes(q)){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);E("",t)}}if(i.hasAttributes())for(const e of i.getAttributeNames())if(e.endsWith(W)){const t=c[l++],a=i.getAttribute(e).split(q),o=/([.?@])?(.*)/.exec(t);s.push({type:1,index:n,name:o[2],strings:a,ctor:"."===o[1]?be:"?"===o[1]?xe:"@"===o[1]?ye:me}),i.removeAttribute(e)}else e.startsWith(q)&&(s.push({type:6,index:n}),i.removeAttribute(e));if(le.test(i.tagName)){const e=i.textContent.split(q),t=e.length-1;if(t>0){i.textContent=R?R.emptyScript:"";for(let a=0;a<t;a++)i.append(e[a],X()),he.nextNode(),s.push({type:2,index:++n});i.append(e[t],X())}}}else if(8===i.nodeType){if(i.data===j)s.push({type:2,index:n});else{let e=-1;for(;-1!==(e=i.data.indexOf(q,e+1));)s.push({type:7,index:n}),e+=q.length-1}}n++}if(c.length!==l)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("${...}")+"`");L&&L({kind:"template prep",template:this,clonableTemplate:this.el,parts:this.parts,strings:e})}static createElement(e,t){const a=K.createElement("template");return a.innerHTML=e,a}}function ue(e,t,a=e,i){if(t===re)return t;let n=void 0!==i?a.__directives?.[i]:a.__directive;const l=J(t)?void 0:t._$litDirective$;return n?.constructor!==l&&(n?._$notifyDirectiveConnectionChanged?.(!1),void 0===l?n=void 0:(n=new l(e),n._$initialize(e,a,i)),void 0!==i?(a.__directives??=[])[i]=n:a.__directive=n),void 0!==n&&(t=ue(e,n._$resolve(e,t.values),n,i)),t}class we{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:a}=this._$template,i=(e?.creationScope??K).importNode(t,!0);he.currentNode=i;let n=he.nextNode(),l=0,o=0,s=a[0];for(;void 0!==s;){if(l===s.index){let t;2===s.type?t=new fe(n,n.nextSibling,this,e):1===s.type?t=new s.ctor(n,s.name,s.strings,this,e):6===s.type&&(t=new Ze(n,this,e)),this._$parts.push(t),s=a[++o]}l!==s?.index&&(n=he.nextNode(),l++)}return he.currentNode=K,i}_update(e){let t=0;for(const a of this._$parts)void 0!==a&&(L&&L({kind:"set part",part:a,value:e[t],valueIndex:t,values:e,templateInstance:this}),void 0!==a.strings?(a._$setValue(e,a,t),t+=a.strings.length-2):a._$setValue(e[t])),t++}}class fe{get _$isConnected(){return this._$parent?._$isConnected??this.__isConnected}constructor(e,t,a,i){this.type=2,this._$committedValue=ce,this._$disconnectableChildren=void 0,this._$startNode=e,this._$endNode=t,this._$parent=a,this.options=i,this.__isConnected=i?.isConnected??!0,this._textSanitizer=void 0}get parentNode(){let e=T(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=ue(this,e,t),J(e))e===ce||null==e||""===e?(this._$committedValue!==ce&&(L&&L({kind:"commit nothing to child",start:this._$startNode,end:this._$endNode,parent:this._$parent,options:this.options}),this._$clear()),this._$committedValue=ce):e!==this._$committedValue&&e!==re&&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=>Y(e)||"function"==typeof e?.[Symbol.iterator])(e)?this._commitIterable(e):this._commitText(e)}_insert(e){return T(T(this._$startNode).parentNode).insertBefore(e,this._$endNode)}_commitNode(e){if(this._$committedValue!==e){if(this._$clear(),ve!==z){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)}}L&&L({kind:"commit node",start:this._$startNode,parent:this._$parent,value:e,options:this.options}),this._$committedValue=this._insert(e)}}_commitText(e){if(this._$committedValue!==ce&&J(this._$committedValue)){const t=T(this._$startNode).nextSibling;void 0===this._textSanitizer&&(this._textSanitizer=U(t,"data","property")),e=this._textSanitizer(e),L&&L({kind:"commit text",node:t,value:e,options:this.options}),t.data=e}else{const t=K.createTextNode("");this._commitNode(t),void 0===this._textSanitizer&&(this._textSanitizer=U(t,"data","property")),e=this._textSanitizer(e),L&&L({kind:"commit text",node:t,value:e,options:this.options}),t.data=e}this._$committedValue=e}_commitTemplateResult(e){const{values:t,_$litType$:a}=e,i="number"==typeof a?this._$getTemplate(e):(void 0===a.el&&(a.el=ge.createElement(pe(a.h,a.h[0]),this.options)),a);if(this._$committedValue?._$template===i)L&&L({kind:"template updating",template:i,instance:this._$committedValue,parts:this._$committedValue._$parts,options:this.options,values:t}),this._$committedValue._update(t);else{const e=new we(i,this),a=e._clone(this.options);L&&L({kind:"template instantiated",template:i,instance:e,parts:e._$parts,options:this.options,fragment:a,values:t}),e._update(t),L&&L({kind:"template instantiated and updated",template:i,instance:e,parts:e._$parts,options:this.options,fragment:a,values:t}),this._commitNode(a),this._$committedValue=e}}_$getTemplate(e){let t=de.get(e.strings);return void 0===t&&de.set(e.strings,t=new ge(e)),t}_commitIterable(e){Y(this._$committedValue)||(this._$committedValue=[],this._$clear());const t=this._$committedValue;let a,i=0;for(const n of e)i===t.length?t.push(a=new fe(this._insert(X()),this._insert(X()),this,this.options)):a=t[i],a._$setValue(n),i++;i<t.length&&(this._$clear(a&&T(a._$endNode).nextSibling,i),t.length=i)}_$clear(e=T(this._$startNode).nextSibling,t){for(this._$notifyConnectionChanged?.(!1,!0,t);e!==this._$endNode;){const t=T(e).nextSibling;T(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 me{get tagName(){return this.element.tagName}get _$isConnected(){return this._$parent._$isConnected}constructor(e,t,a,i,n){this.type=1,this._$committedValue=ce,this._$disconnectableChildren=void 0,this.element=e,this.name=t,this._$parent=i,this.options=n,a.length>2||""!==a[0]||""!==a[1]?(this._$committedValue=new Array(a.length-1).fill(new String),this.strings=a):this._$committedValue=ce,this._sanitizer=void 0}_$setValue(e,t=this,a,i){const n=this.strings;let l=!1;if(void 0===n)e=ue(this,e,t,0),l=!J(e)||e!==this._$committedValue&&e!==re,l&&(this._$committedValue=e);else{const i=e;let o,s;for(e=n[0],o=0;o<n.length-1;o++)s=ue(this,i[a+o],t,o),s===re&&(s=this._$committedValue[o]),l||=!J(s)||s!==this._$committedValue[o],s===ce?e=ce:e!==ce&&(e+=(s??"")+n[o+1]),this._$committedValue[o]=s}l&&!i&&this._commitValue(e)}_commitValue(e){e===ce?T(this.element).removeAttribute(this.name):(void 0===this._sanitizer&&(this._sanitizer=ve(this.element,this.name,"attribute")),e=this._sanitizer(e??""),L&&L({kind:"commit attribute",element:this.element,name:this.name,value:e,options:this.options}),T(this.element).setAttribute(this.name,e??""))}}class be extends me{constructor(){super(...arguments),this.type=3}_commitValue(e){void 0===this._sanitizer&&(this._sanitizer=ve(this.element,this.name,"property")),e=this._sanitizer(e),L&&L({kind:"commit property",element:this.element,name:this.name,value:e,options:this.options}),this.element[this.name]=e===ce?void 0:e}}class xe extends me{constructor(){super(...arguments),this.type=4}_commitValue(e){L&&L({kind:"commit boolean attribute",element:this.element,name:this.name,value:!(!e||e===ce),options:this.options}),T(this.element).toggleAttribute(this.name,!!e&&e!==ce)}}class ye extends me{constructor(e,t,a,i,n){if(super(e,t,a,i,n),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=ue(this,e,t,0)??ce)===re)return;const a=this._$committedValue,i=e===ce&&a!==ce||e.capture!==a.capture||e.once!==a.once||e.passive!==a.passive,n=e!==ce&&(a===ce||i);L&&L({kind:"commit event listener",element:this.element,name:this.name,value:e,options:this.options,removeListener:i,addListener:n,oldListener:a}),i&&this.element.removeEventListener(this.name,this,a),n&&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 Ze{constructor(e,t,a){this.element=e,this.type=6,this._$disconnectableChildren=void 0,this._$parent=t,this.options=a}get _$isConnected(){return this._$parent._$isConnected}_$setValue(e){L&&L({kind:"commit to element binding",element:this.element,value:e,options:this.options}),ue(this,e)}}const Ce=A.litHtmlPolyfillSupportDevMode;Ce?.(ge,fe),(A.litHtmlVersions??=[]).push("3.3.2"),A.litHtmlVersions.length>1&&queueMicrotask(()=>{E("multiple-versions","Multiple versions of Lit loaded. Loading multiple versions is not recommended.")});const Me=(e,t,a)=>{if(null==t)throw new TypeError(`The container to render into may not be ${t}`);const i=P++,n=a?.renderBefore??t;let l=n._$litPart$;if(L&&L({kind:"begin render",id:i,value:e,container:t,options:a,part:l}),void 0===l){const e=a?.renderBefore??null;n._$litPart$=l=new fe(t.insertBefore(X(),e),e,void 0,a??{})}return l._$setValue(e),L&&L({kind:"end render",id:i,value:e,container:t,options:a,part:l}),l};Me.setSanitizer=D,Me.createSanitizer=U,Me._testOnlyClearSanitizerFactoryDoNotCallOrElse=I;
|
|
49
|
+
const A=globalThis,L=e=>{A.emitLitDebugLogEvents&&A.dispatchEvent(new CustomEvent("lit-debug",{detail:e}))};let E,P=0;A.litIssuedWarnings??=new Set,E=(e,t)=>{t+=e?` See https://lit.dev/msg/${e} for more information.`:"",A.litIssuedWarnings.has(t)||A.litIssuedWarnings.has(e)||(console.warn(t),A.litIssuedWarnings.add(t))},queueMicrotask(()=>{E("dev-mode","Lit is in dev mode. Not recommended for production!")});const R=A.ShadyDOM?.inUse&&!0===A.ShadyDOM?.noPatch?A.ShadyDOM.wrap:e=>e,T=A.trustedTypes,N=T?T.createPolicy("lit-html",{createHTML:e=>e}):void 0,O=e=>e,z=(e,t,a)=>O,D=e=>{if(ve!==z)throw new Error("Attempted to overwrite existing lit-html security policy. setSanitizeDOMValueFactory should be called at most once.");ve=e},I=()=>{ve=z},U=(e,t,a)=>ve(e,t,a),W="$lit$",q=`lit$${Math.random().toFixed(9).slice(2)}$`,j="?"+q,F=`<${j}>`,K=document,X=()=>K.createComment(""),J=e=>null===e||"object"!=typeof e&&"function"!=typeof e,Y=Array.isArray,G="[ \t\n\f\r]",Q=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,ee=/-->/g,te=/>/g,ae=new RegExp(`>|${G}(?:([^\\s"'>=/]+)(${G}*=${G}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),ie=/'/g,ne=/"/g,le=/^(?:script|style|textarea|title)$/i,oe=(se=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$)&&E("","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$:se,strings:e,values:t}));var se;const re=Symbol.for("lit-noChange"),ce=Symbol.for("lit-nothing"),de=new WeakMap,he=K.createTreeWalker(K,129);let ve=z;function pe(e,t){if(!Y(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!==N?N.createHTML(t):t}class ge{constructor({strings:e,_$litType$:t},a){let i;this.parts=[];let n=0,l=0;const o=e.length-1,s=this.parts,[r,c]=((e,t)=>{const a=e.length-1,i=[];let n,l=2===t?"<svg>":3===t?"<math>":"",o=Q;for(let t=0;t<a;t++){const a=e[t];let s,r,c=-1,d=0;for(;d<a.length&&(o.lastIndex=d,r=o.exec(a),null!==r);)if(d=o.lastIndex,o===Q){if("!--"===r[1])o=ee;else if(void 0!==r[1])o=te;else if(void 0!==r[2])le.test(r[2])&&(n=new RegExp(`</${r[2]}`,"g")),o=ae;else if(void 0!==r[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 o===ae?">"===r[0]?(o=n??Q,c=-1):void 0===r[1]?c=-2:(c=o.lastIndex-r[2].length,s=r[1],o=void 0===r[3]?ae:'"'===r[3]?ne:ie):o===ne||o===ie?o=ae:o===ee||o===te?o=Q:(o=ae,n=void 0);console.assert(-1===c||o===ae||o===ie||o===ne,"unexpected parse state B");const h=o===ae&&e[t+1].startsWith("/>")?" ":"";l+=o===Q?a+F:c>=0?(i.push(s),a.slice(0,c)+W+a.slice(c)+q+h):a+q+(-2===c?t:h)}return[pe(e,l+(e[a]||"<?>")+(2===t?"</svg>":3===t?"</math>":"")),i]})(e,t);if(this.el=ge.createElement(r,a),he.currentNode=this.el.content,2===t||3===t){const e=this.el.content.firstChild;e.replaceWith(...e.childNodes)}for(;null!==(i=he.nextNode())&&s.length<o;){if(1===i.nodeType){{const e=i.localName;if(/^(?:textarea|template)$/i.test(e)&&i.innerHTML.includes(q)){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);E("",t)}}if(i.hasAttributes())for(const e of i.getAttributeNames())if(e.endsWith(W)){const t=c[l++],a=i.getAttribute(e).split(q),o=/([.?@])?(.*)/.exec(t);s.push({type:1,index:n,name:o[2],strings:a,ctor:"."===o[1]?be:"?"===o[1]?xe:"@"===o[1]?ye:me}),i.removeAttribute(e)}else e.startsWith(q)&&(s.push({type:6,index:n}),i.removeAttribute(e));if(le.test(i.tagName)){const e=i.textContent.split(q),t=e.length-1;if(t>0){i.textContent=T?T.emptyScript:"";for(let a=0;a<t;a++)i.append(e[a],X()),he.nextNode(),s.push({type:2,index:++n});i.append(e[t],X())}}}else if(8===i.nodeType){if(i.data===j)s.push({type:2,index:n});else{let e=-1;for(;-1!==(e=i.data.indexOf(q,e+1));)s.push({type:7,index:n}),e+=q.length-1}}n++}if(c.length!==l)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("${...}")+"`");L&&L({kind:"template prep",template:this,clonableTemplate:this.el,parts:this.parts,strings:e})}static createElement(e,t){const a=K.createElement("template");return a.innerHTML=e,a}}function ue(e,t,a=e,i){if(t===re)return t;let n=void 0!==i?a.__directives?.[i]:a.__directive;const l=J(t)?void 0:t._$litDirective$;return n?.constructor!==l&&(n?._$notifyDirectiveConnectionChanged?.(!1),void 0===l?n=void 0:(n=new l(e),n._$initialize(e,a,i)),void 0!==i?(a.__directives??=[])[i]=n:a.__directive=n),void 0!==n&&(t=ue(e,n._$resolve(e,t.values),n,i)),t}class we{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:a}=this._$template,i=(e?.creationScope??K).importNode(t,!0);he.currentNode=i;let n=he.nextNode(),l=0,o=0,s=a[0];for(;void 0!==s;){if(l===s.index){let t;2===s.type?t=new fe(n,n.nextSibling,this,e):1===s.type?t=new s.ctor(n,s.name,s.strings,this,e):6===s.type&&(t=new Ze(n,this,e)),this._$parts.push(t),s=a[++o]}l!==s?.index&&(n=he.nextNode(),l++)}return he.currentNode=K,i}_update(e){let t=0;for(const a of this._$parts)void 0!==a&&(L&&L({kind:"set part",part:a,value:e[t],valueIndex:t,values:e,templateInstance:this}),void 0!==a.strings?(a._$setValue(e,a,t),t+=a.strings.length-2):a._$setValue(e[t])),t++}}class fe{get _$isConnected(){return this._$parent?._$isConnected??this.__isConnected}constructor(e,t,a,i){this.type=2,this._$committedValue=ce,this._$disconnectableChildren=void 0,this._$startNode=e,this._$endNode=t,this._$parent=a,this.options=i,this.__isConnected=i?.isConnected??!0,this._textSanitizer=void 0}get parentNode(){let e=R(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=ue(this,e,t),J(e))e===ce||null==e||""===e?(this._$committedValue!==ce&&(L&&L({kind:"commit nothing to child",start:this._$startNode,end:this._$endNode,parent:this._$parent,options:this.options}),this._$clear()),this._$committedValue=ce):e!==this._$committedValue&&e!==re&&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=>Y(e)||"function"==typeof e?.[Symbol.iterator])(e)?this._commitIterable(e):this._commitText(e)}_insert(e){return R(R(this._$startNode).parentNode).insertBefore(e,this._$endNode)}_commitNode(e){if(this._$committedValue!==e){if(this._$clear(),ve!==z){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)}}L&&L({kind:"commit node",start:this._$startNode,parent:this._$parent,value:e,options:this.options}),this._$committedValue=this._insert(e)}}_commitText(e){if(this._$committedValue!==ce&&J(this._$committedValue)){const t=R(this._$startNode).nextSibling;void 0===this._textSanitizer&&(this._textSanitizer=U(t,"data","property")),e=this._textSanitizer(e),L&&L({kind:"commit text",node:t,value:e,options:this.options}),t.data=e}else{const t=K.createTextNode("");this._commitNode(t),void 0===this._textSanitizer&&(this._textSanitizer=U(t,"data","property")),e=this._textSanitizer(e),L&&L({kind:"commit text",node:t,value:e,options:this.options}),t.data=e}this._$committedValue=e}_commitTemplateResult(e){const{values:t,_$litType$:a}=e,i="number"==typeof a?this._$getTemplate(e):(void 0===a.el&&(a.el=ge.createElement(pe(a.h,a.h[0]),this.options)),a);if(this._$committedValue?._$template===i)L&&L({kind:"template updating",template:i,instance:this._$committedValue,parts:this._$committedValue._$parts,options:this.options,values:t}),this._$committedValue._update(t);else{const e=new we(i,this),a=e._clone(this.options);L&&L({kind:"template instantiated",template:i,instance:e,parts:e._$parts,options:this.options,fragment:a,values:t}),e._update(t),L&&L({kind:"template instantiated and updated",template:i,instance:e,parts:e._$parts,options:this.options,fragment:a,values:t}),this._commitNode(a),this._$committedValue=e}}_$getTemplate(e){let t=de.get(e.strings);return void 0===t&&de.set(e.strings,t=new ge(e)),t}_commitIterable(e){Y(this._$committedValue)||(this._$committedValue=[],this._$clear());const t=this._$committedValue;let a,i=0;for(const n of e)i===t.length?t.push(a=new fe(this._insert(X()),this._insert(X()),this,this.options)):a=t[i],a._$setValue(n),i++;i<t.length&&(this._$clear(a&&R(a._$endNode).nextSibling,i),t.length=i)}_$clear(e=R(this._$startNode).nextSibling,t){for(this._$notifyConnectionChanged?.(!1,!0,t);e!==this._$endNode;){const t=R(e).nextSibling;R(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 me{get tagName(){return this.element.tagName}get _$isConnected(){return this._$parent._$isConnected}constructor(e,t,a,i,n){this.type=1,this._$committedValue=ce,this._$disconnectableChildren=void 0,this.element=e,this.name=t,this._$parent=i,this.options=n,a.length>2||""!==a[0]||""!==a[1]?(this._$committedValue=new Array(a.length-1).fill(new String),this.strings=a):this._$committedValue=ce,this._sanitizer=void 0}_$setValue(e,t=this,a,i){const n=this.strings;let l=!1;if(void 0===n)e=ue(this,e,t,0),l=!J(e)||e!==this._$committedValue&&e!==re,l&&(this._$committedValue=e);else{const i=e;let o,s;for(e=n[0],o=0;o<n.length-1;o++)s=ue(this,i[a+o],t,o),s===re&&(s=this._$committedValue[o]),l||=!J(s)||s!==this._$committedValue[o],s===ce?e=ce:e!==ce&&(e+=(s??"")+n[o+1]),this._$committedValue[o]=s}l&&!i&&this._commitValue(e)}_commitValue(e){e===ce?R(this.element).removeAttribute(this.name):(void 0===this._sanitizer&&(this._sanitizer=ve(this.element,this.name,"attribute")),e=this._sanitizer(e??""),L&&L({kind:"commit attribute",element:this.element,name:this.name,value:e,options:this.options}),R(this.element).setAttribute(this.name,e??""))}}class be extends me{constructor(){super(...arguments),this.type=3}_commitValue(e){void 0===this._sanitizer&&(this._sanitizer=ve(this.element,this.name,"property")),e=this._sanitizer(e),L&&L({kind:"commit property",element:this.element,name:this.name,value:e,options:this.options}),this.element[this.name]=e===ce?void 0:e}}class xe extends me{constructor(){super(...arguments),this.type=4}_commitValue(e){L&&L({kind:"commit boolean attribute",element:this.element,name:this.name,value:!(!e||e===ce),options:this.options}),R(this.element).toggleAttribute(this.name,!!e&&e!==ce)}}class ye extends me{constructor(e,t,a,i,n){if(super(e,t,a,i,n),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=ue(this,e,t,0)??ce)===re)return;const a=this._$committedValue,i=e===ce&&a!==ce||e.capture!==a.capture||e.once!==a.once||e.passive!==a.passive,n=e!==ce&&(a===ce||i);L&&L({kind:"commit event listener",element:this.element,name:this.name,value:e,options:this.options,removeListener:i,addListener:n,oldListener:a}),i&&this.element.removeEventListener(this.name,this,a),n&&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 Ze{constructor(e,t,a){this.element=e,this.type=6,this._$disconnectableChildren=void 0,this._$parent=t,this.options=a}get _$isConnected(){return this._$parent._$isConnected}_$setValue(e){L&&L({kind:"commit to element binding",element:this.element,value:e,options:this.options}),ue(this,e)}}const Ce=A.litHtmlPolyfillSupportDevMode;Ce?.(ge,fe),(A.litHtmlVersions??=[]).push("3.3.2"),A.litHtmlVersions.length>1&&queueMicrotask(()=>{E("multiple-versions","Multiple versions of Lit loaded. Loading multiple versions is not recommended.")});const Me=(e,t,a)=>{if(null==t)throw new TypeError(`The container to render into may not be ${t}`);const i=P++,n=a?.renderBefore??t;let l=n._$litPart$;if(L&&L({kind:"begin render",id:i,value:e,container:t,options:a,part:l}),void 0===l){const e=a?.renderBefore??null;n._$litPart$=l=new fe(t.insertBefore(X(),e),e,void 0,a??{})}return l._$setValue(e),L&&L({kind:"end render",id:i,value:e,container:t,options:a,part:l}),l};Me.setSanitizer=D,Me.createSanitizer=U,Me._testOnlyClearSanitizerFactoryDoNotCallOrElse=I;
|
|
50
50
|
/**
|
|
51
51
|
* @license
|
|
52
52
|
* Copyright 2017 Google LLC
|
|
@@ -73,7 +73,7 @@ let Se;$e?.({LitElement:He}),(_e.litElementVersions??=[]).push("4.2.2"),_e.litEl
|
|
|
73
73
|
* @license
|
|
74
74
|
* Copyright 2017 Google LLC
|
|
75
75
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
76
|
-
*/let
|
|
76
|
+
*/let Re;function Te(e,t){return(a,i,n)=>{const l=a=>{const n=a.renderRoot?.querySelector(e)??null;if(null===n&&t&&!a.hasUpdated){const t="object"==typeof i?i.name:i;Re("",`@query'd field ${JSON.stringify(String(t))} with the 'cache' flag set for selector '${e}' has been accessed before the first update and returned null. This is expected if the renderRoot tree has not been provided beforehand (e.g. via Declarative Shadow DOM). Therefore the value hasn't been cached.`)}return n};if(t){const{get:e,set:t}="object"==typeof i?a:n??(()=>{const e=Symbol(`${String(i)} (@query() cache)`);return{get(){return this[e]},set(t){this[e]=t}}})();return Pe(a,i,{get(){let a=e.call(this);return void 0===a&&(a=l(this),(null!==a||this.hasUpdated)&&t.call(this,a)),a}})}return Pe(a,i,{get(){return l(this)}})}}
|
|
77
77
|
/**
|
|
78
78
|
* @license
|
|
79
79
|
* Copyright 2021 Google LLC
|
|
@@ -83,7 +83,7 @@ let Se;$e?.({LitElement:He}),(_e.litElementVersions??=[]).push("4.2.2"),_e.litEl
|
|
|
83
83
|
* @license
|
|
84
84
|
* Copyright 2017 Google LLC
|
|
85
85
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
86
|
-
*/globalThis.litIssuedWarnings??=new Set,
|
|
86
|
+
*/globalThis.litIssuedWarnings??=new Set,Re=(e,t)=>{t+=e?` See https://lit.dev/msg/${e} for more information.`:"",globalThis.litIssuedWarnings.has(t)||globalThis.litIssuedWarnings.has(e)||(console.warn(t),globalThis.litIssuedWarnings.add(t))};const Oe=1,ze=2,De=e=>(...t)=>({_$litDirective$:e,values:t});class Ie{constructor(e){}get _$isConnected(){return this._$parent._$isConnected}_$initialize(e,t,a){this.__part=e,this._$parent=t,this.__attributeIndex=a}_$resolve(e,t){return this.update(e,t)}update(e,t){return this.render(...t)}}
|
|
87
87
|
/**
|
|
88
88
|
* @license
|
|
89
89
|
* Copyright 2018 Google LLC
|
|
@@ -98,7 +98,7 @@ let Se;$e?.({LitElement:He}),(_e.litElementVersions??=[]).push("4.2.2"),_e.litEl
|
|
|
98
98
|
* @license
|
|
99
99
|
* Copyright 2020 Google LLC
|
|
100
100
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
101
|
-
*/var ct,dt=p`:host{--btn-font-weight:var(--sgds-font-weight-regular);--btn-color:var(--sgds-color-fixed-light);--btn-bg:var(--sgds-primary-surface-default);--btn-hover-bg:var(--sgds-primary-surface-emphasis);--btn-border-radius:var(--sgds-border-radius-md);--btn-opacity:var(--sgds-opacity-100,1)}:host([variant=danger]){--btn-bg:var(--sgds-danger-surface-default);--btn-hover-bg:var(--sgds-danger-surface-emphasis);--btn-color:var(--sgds-color-fixed-light)}:host([variant=primary][tone=brand]){--btn-bg:var(--sgds-primary-surface-default);--btn-color:var(--sgds-color-fixed-light)}:host([variant=outline]){--btn-border-width:var(--sgds-border-width-1)}:host([variant=outline][tone=brand]){--btn-border-color:var(--sgds-primary-border-color-default);--btn-bg:var(--sgds-bg-transparent);--btn-color:var(--sgds-primary-color-default);--btn-hover-bg:var(--sgds-primary-bg-translucent)}:host([variant=ghost][tone=brand]){--btn-bg:var(--sgds-bg-transparent);--btn-hover-bg:var(--sgds-primary-surface-translucent);--btn-color:var(--sgds-primary-color-default)}:host([variant=primary][tone=danger]){--btn-bg:var(--sgds-danger-surface-default);--btn-hover-bg:var(--sgds-danger-surface-emphasis);--btn-color:var(--sgds-color-fixed-light)}:host([variant=outline][tone=danger]){--btn-border-color:var(--sgds-danger-border-color-default);--btn-bg:var(--sgds-bg-transparent);--btn-hover-bg:var(--sgds-danger-surface-translucent);--btn-color:var(--sgds-danger-color-default)}:host([variant=ghost][tone=danger]){--btn-bg:var(--sgds-bg-transparent);--btn-hover-bg:var(--sgds-danger-surface-translucent);--btn-color:var(--sgds-danger-color-default)}:host([variant=primary][tone=fixed-light]){--btn-bg:var(--sgds-surface-fixed-light);--btn-hover-bg:linear-gradient(0deg,var(--sgds-bg-translucent-fixed-dark,hsla(0,0%,5%,.2)) 0%,var(--sgds-bg-translucent-fixed-dark,hsla(0,0%,5%,.2)) 100%),var(--sgds-surface-fixed-light,#fff);--btn-color:var(--sgds-color-fixed-dark)}:host([variant=outline][tone=fixed-light]){--btn-border-color:var(--sgds-border-color-fixed-light);--btn-bg:var(--sgds-bg-transparent);--btn-hover-bg:linear-gradient(0deg,var(--sgds-bg-translucent-fixed-dark) 0%,var(--sgds-bg-translucent-fixed-dark) 100%),var(--sgds-bg-transparent);--btn-color:var(--sgds-color-fixed-light)}:host([variant=ghost][tone=fixed-light]){--btn-bg:var(--sgds-bg-transparent);--btn-hover-bg:linear-gradient(0deg,var(--sgds-bg-translucent-fixed-dark) 0%,var(--sgds-bg-translucent-fixed-dark) 100%),var(--sgds-bg-transparent);--btn-color:var(--sgds-color-fixed-light)}:host([variant=primary][tone=neutral]){--btn-bg:var(--sgds-surface-inverse);--btn-hover-bg:linear-gradient(0deg,var(--sgds-bg-translucent-inverse) 0%,var(--sgds-bg-translucent-inverse) 100%),var(--sgds-surface-inverse);--btn-color:var(--sgds-color-inverse)}:host([variant=outline][tone=neutral]){--btn-border-color:var(--sgds-border-color-emphasis);--btn-bg:var(--sgds-bg-transparent);--btn-hover-bg:linear-gradient(0deg,var(--sgds-bg-translucent-inverse) 0%,var(--sgds-bg-translucent-inverse) 100%),var(--sgds-bg-translucent-subtle);--btn-color:var(--sgds-color-default)}:host([variant=ghost][tone=neutral]){--btn-bg:var(--sgds-bg-transparent);--btn-hover-bg:var(--sgds-bg-translucent-subtle);--btn-color:var(--sgds-color-default)}:host([variant=ghost]) .btn,:host([variant=outline]) .btn,:host([variant=primary]) .btn{color:var(--btn-color)}:host([variant=outline]) .btn{border:var(--btn-border-width) solid var(--btn-border-color)}:host([size=lg]) .btn{font-size:var(--sgds-font-size-20);height:var(--sgds-dimension-56);line-height:var(--sgds-line-height-32);min-width:var(--sgds-dimension-112);padding:var(--sgds-padding-none) var(--sgds-padding-xl)}:host([size=sm]) .btn{font-size:var(--sgds-font-size-14);height:var(--sgds-dimension-40);line-height:var(--sgds-line-height-20);min-width:var(--sgds-dimension-80);padding:var(--sgds-padding-none) var(--sgds-padding-md)}:host([size=xs]) .btn{font-size:var(--sgds-font-size-12);height:var(--sgds-dimension-32);line-height:var(--sgds-line-height-16);min-width:var(--sgds-dimension-64);padding:var(--sgds-padding-none) var(--sgds-padding-sm)}.btn{align-items:center;background-color:var(--btn-bg);border:1px solid var(--sgds-border-color-transparent);border-radius:var(--btn-border-radius);color:var(--sgds-color-fixed-light);cursor:pointer;display:inline-flex;font-size:var(--sgds-font-size-16);font-weight:var(--btn-font-weight);gap:var(--sgds-gap-2-xs);height:var(--sgds-dimension-48);justify-content:center;line-height:var(--sgds-line-height-24);min-width:var(--sgds-dimension-96);opacity:var(--btn-opacity);padding:var(--sgds-padding-none) var(--sgds-padding-lg);text-align:center;text-decoration:none;transition:color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;user-select:none;vertical-align:middle;white-space:nowrap;width:inherit}@media (prefers-reduced-motion:reduce){.btn{transition:none}}.btn.active,.btn:hover{background:var(--btn-hover-bg)}.btn:focus,.btn:focus-visible{background:var(--btn-hover-bg);border-color:transparent;outline:var(--sgds-outline-focus);outline-offset:var(--sgds-outline-offset-focus)}.btn.disabled,.btn:disabled{color:var(--btn-color);cursor:not-allowed;opacity:var(--sgds-opacity-40)}.btn.loading{cursor:default}.btn slot::slotted(*){color:var(--btn-color)}`;class ht extends qe{constructor(){super(...arguments),this.variant="primary",this.tone="brand",this.size="md",this.active=!1,this.disabled=!1,this.target="_self"}focus(e){this.button.focus(e)}click(){this.button.click()}blur(){this.button.blur()}_handleBlur(){this.emit("sgds-blur")}_handleFocus(){this.emit("sgds-focus")}_handleClick(e){if(this.disabled||this.loading)return e.preventDefault(),void e.stopPropagation()}_handleKeydown(e){if("Enter"===e.key&&this.loading)return e.preventDefault(),void e.stopPropagation()}_assignSpinnerSize(e){return"xs"===e||"sm"===e?"xs":"md"===e||"lg"===e?"sm":void 0}_assignSpinnerTone(e,t){return"fixed-light"===e&&"primary"===t?"fixed-dark":"neutral"===e&&"primary"===t?"inverse":"fixed-light"===e||"primary"===t?"fixed-light":"neutral"!==e||"outline"!==t&&"ghost"!==t?"brand":"neutral"}}ht.styles=[...qe.styles,dt],e([
|
|
101
|
+
*/var ct,dt=p`:host{--btn-font-weight:var(--sgds-font-weight-regular);--btn-color:var(--sgds-color-fixed-light);--btn-bg:var(--sgds-primary-surface-default);--btn-hover-bg:var(--sgds-primary-surface-emphasis);--btn-border-radius:var(--sgds-border-radius-md);--btn-opacity:var(--sgds-opacity-100,1)}:host([variant=danger]){--btn-bg:var(--sgds-danger-surface-default);--btn-hover-bg:var(--sgds-danger-surface-emphasis);--btn-color:var(--sgds-color-fixed-light)}:host([variant=primary][tone=brand]){--btn-bg:var(--sgds-primary-surface-default);--btn-color:var(--sgds-color-fixed-light)}:host([variant=outline]){--btn-border-width:var(--sgds-border-width-1)}:host([variant=outline][tone=brand]){--btn-border-color:var(--sgds-primary-border-color-default);--btn-bg:var(--sgds-bg-transparent);--btn-color:var(--sgds-primary-color-default);--btn-hover-bg:var(--sgds-primary-bg-translucent)}:host([variant=ghost][tone=brand]){--btn-bg:var(--sgds-bg-transparent);--btn-hover-bg:var(--sgds-primary-surface-translucent);--btn-color:var(--sgds-primary-color-default)}:host([variant=primary][tone=danger]){--btn-bg:var(--sgds-danger-surface-default);--btn-hover-bg:var(--sgds-danger-surface-emphasis);--btn-color:var(--sgds-color-fixed-light)}:host([variant=outline][tone=danger]){--btn-border-color:var(--sgds-danger-border-color-default);--btn-bg:var(--sgds-bg-transparent);--btn-hover-bg:var(--sgds-danger-surface-translucent);--btn-color:var(--sgds-danger-color-default)}:host([variant=ghost][tone=danger]){--btn-bg:var(--sgds-bg-transparent);--btn-hover-bg:var(--sgds-danger-surface-translucent);--btn-color:var(--sgds-danger-color-default)}:host([variant=primary][tone=fixed-light]){--btn-bg:var(--sgds-surface-fixed-light);--btn-hover-bg:linear-gradient(0deg,var(--sgds-bg-translucent-fixed-dark,hsla(0,0%,5%,.2)) 0%,var(--sgds-bg-translucent-fixed-dark,hsla(0,0%,5%,.2)) 100%),var(--sgds-surface-fixed-light,#fff);--btn-color:var(--sgds-color-fixed-dark)}:host([variant=outline][tone=fixed-light]){--btn-border-color:var(--sgds-border-color-fixed-light);--btn-bg:var(--sgds-bg-transparent);--btn-hover-bg:linear-gradient(0deg,var(--sgds-bg-translucent-fixed-dark) 0%,var(--sgds-bg-translucent-fixed-dark) 100%),var(--sgds-bg-transparent);--btn-color:var(--sgds-color-fixed-light)}:host([variant=ghost][tone=fixed-light]){--btn-bg:var(--sgds-bg-transparent);--btn-hover-bg:linear-gradient(0deg,var(--sgds-bg-translucent-fixed-dark) 0%,var(--sgds-bg-translucent-fixed-dark) 100%),var(--sgds-bg-transparent);--btn-color:var(--sgds-color-fixed-light)}:host([variant=primary][tone=neutral]){--btn-bg:var(--sgds-surface-inverse);--btn-hover-bg:linear-gradient(0deg,var(--sgds-bg-translucent-inverse) 0%,var(--sgds-bg-translucent-inverse) 100%),var(--sgds-surface-inverse);--btn-color:var(--sgds-color-inverse)}:host([variant=outline][tone=neutral]){--btn-border-color:var(--sgds-border-color-emphasis);--btn-bg:var(--sgds-bg-transparent);--btn-hover-bg:linear-gradient(0deg,var(--sgds-bg-translucent-inverse) 0%,var(--sgds-bg-translucent-inverse) 100%),var(--sgds-bg-translucent-subtle);--btn-color:var(--sgds-color-default)}:host([variant=ghost][tone=neutral]){--btn-bg:var(--sgds-bg-transparent);--btn-hover-bg:var(--sgds-bg-translucent-subtle);--btn-color:var(--sgds-color-default)}:host([variant=ghost]) .btn,:host([variant=outline]) .btn,:host([variant=primary]) .btn{color:var(--btn-color)}:host([variant=outline]) .btn{border:var(--btn-border-width) solid var(--btn-border-color)}:host([size=lg]) .btn{font-size:var(--sgds-font-size-20);height:var(--sgds-dimension-56);line-height:var(--sgds-line-height-32);min-width:var(--sgds-dimension-112);padding:var(--sgds-padding-none) var(--sgds-padding-xl)}:host([size=sm]) .btn{font-size:var(--sgds-font-size-14);height:var(--sgds-dimension-40);line-height:var(--sgds-line-height-20);min-width:var(--sgds-dimension-80);padding:var(--sgds-padding-none) var(--sgds-padding-md)}:host([size=xs]) .btn{font-size:var(--sgds-font-size-12);height:var(--sgds-dimension-32);line-height:var(--sgds-line-height-16);min-width:var(--sgds-dimension-64);padding:var(--sgds-padding-none) var(--sgds-padding-sm)}.btn{align-items:center;background-color:var(--btn-bg);border:1px solid var(--sgds-border-color-transparent);border-radius:var(--btn-border-radius);color:var(--sgds-color-fixed-light);cursor:pointer;display:inline-flex;font-size:var(--sgds-font-size-16);font-weight:var(--btn-font-weight);gap:var(--sgds-gap-2-xs);height:var(--sgds-dimension-48);justify-content:center;line-height:var(--sgds-line-height-24);min-width:var(--sgds-dimension-96);opacity:var(--btn-opacity);padding:var(--sgds-padding-none) var(--sgds-padding-lg);text-align:center;text-decoration:none;transition:color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;user-select:none;vertical-align:middle;white-space:nowrap;width:inherit}@media (prefers-reduced-motion:reduce){.btn{transition:none}}.btn.active,.btn:hover{background:var(--btn-hover-bg)}.btn:focus,.btn:focus-visible{background:var(--btn-hover-bg);border-color:transparent;outline:var(--sgds-outline-focus);outline-offset:var(--sgds-outline-offset-focus)}.btn.disabled,.btn:disabled{color:var(--btn-color);cursor:not-allowed;opacity:var(--sgds-opacity-40)}.btn.loading{cursor:default}.btn slot::slotted(*){color:var(--btn-color)}`;class ht extends qe{constructor(){super(...arguments),this.variant="primary",this.tone="brand",this.size="md",this.active=!1,this.disabled=!1,this.target="_self"}focus(e){this.button.focus(e)}click(){this.button.click()}blur(){this.button.blur()}_handleBlur(){this.emit("sgds-blur")}_handleFocus(){this.emit("sgds-focus")}_handleClick(e){if(this.disabled||this.loading)return e.preventDefault(),void e.stopPropagation()}_handleKeydown(e){if("Enter"===e.key&&this.loading)return e.preventDefault(),void e.stopPropagation()}_assignSpinnerSize(e){return"xs"===e||"sm"===e?"xs":"md"===e||"lg"===e?"sm":void 0}_assignSpinnerTone(e,t){return"fixed-light"===e&&"primary"===t?"fixed-dark":"neutral"===e&&"primary"===t?"inverse":"fixed-light"===e||"primary"===t?"fixed-light":"neutral"!==e||"outline"!==t&&"ghost"!==t?"brand":"neutral"}}ht.styles=[...qe.styles,dt],e([Te(".btn")],ht.prototype,"button",void 0),e([Le({reflect:!0})],ht.prototype,"variant",void 0),e([Le({reflect:!0})],ht.prototype,"tone",void 0),e([Le({reflect:!0})],ht.prototype,"size",void 0),e([Le({type:Boolean,reflect:!0})],ht.prototype,"active",void 0),e([Le({type:Boolean,reflect:!0})],ht.prototype,"disabled",void 0),e([Le({type:String,reflect:!0})],ht.prototype,"href",void 0),e([Le({type:String,reflect:!0})],ht.prototype,"target",void 0),e([Le({type:String,reflect:!0})],ht.prototype,"download",void 0),e([Le({type:String})],ht.prototype,"ariaLabel",void 0),e([Le({type:Boolean})],ht.prototype,"loading",void 0);var vt=oe`
|
|
102
102
|
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24">
|
|
103
103
|
<path
|
|
104
104
|
fill="currentColor"
|
|
@@ -2354,7 +2354,7 @@ let Se;$e?.({LitElement:He}),(_e.litElementVersions??=[]).push("4.2.2"),_e.litEl
|
|
|
2354
2354
|
size=${it(this._assignIconSize(this.size))}
|
|
2355
2355
|
></sgds-icon>`}
|
|
2356
2356
|
</${t}>
|
|
2357
|
-
`}}Et.styles=[...ht.styles,Lt],Et.dependencies={"sgds-icon":$t,"sgds-spinner":At},e([Le({type:String,reflect:!0})],Et.prototype,"name",void 0);const Pt="mainnav-context",
|
|
2357
|
+
`}}Et.styles=[...ht.styles,Lt],Et.dependencies={"sgds-icon":$t,"sgds-spinner":At},e([Le({type:String,reflect:!0})],Et.prototype,"name",void 0);const Pt="mainnav-context",Rt="mainnav-expanded-context";var Tt=p`:host{display:block}nav{background-color:var(--sgds-surface-default);box-shadow:0 2px 2px 0 hsla(0,0%,5%,.08);position:relative;z-index:var(--sgds-z-index-floating)}.navbar{align-items:stretch;display:flex;flex-wrap:wrap;gap:var(--sgds-gap-xs);justify-content:space-between;margin:auto;max-width:var(--sgds-mainnav-max-width,1440px);min-height:80px;padding:0 var(--sgds-mainnav-mobile-padding-x);width:100%}:host([fluid]) .navbar{max-width:none}.navbar-brand{align-items:center;display:flex;text-decoration:none;white-space:nowrap}.navbar-brand:focus-visible{outline:var(--sgds-outline-focus);outline-offset:var(--sgds-outline-offset-focus)}.navbar-nav{display:flex;flex-direction:column;height:100%;margin-bottom:0;margin-top:0;width:100%}nav>.navbar-body{background-color:var(--sgds-surface-default);border-top:var(--sgds-border-width-1) solid var(--sgds-border-color-translucent);box-shadow:0 2px 2px 0 hsla(0,0%,5%,.08);padding:var(--sgds-padding-md) 0;position:absolute;transition:transform .2s ease-in-out;width:100%;z-index:var(--sgds-z-index-floating)}nav>.navbar-body .navbar-nav{height:100dvh;margin:auto;max-width:var(--sgds-mainnav-max-width,1440px)}nav>.navbar-body slot::slotted(:not(sgds-mainnav-item):not(sgds-mainnav-dropdown)){padding:var(--sgds-padding-sm) var(--sgds-mainnav-mobile-padding-x)}.navbar-collapse{align-items:center;flex-basis:100%;flex-grow:1}.navbar-toggler{align-self:center}@media (prefers-reduced-motion:reduce){.navbar-toggler{transition:none}}.navbar-nav-scroll{overflow-y:auto}@media (min-width:512px){.navbar-expand-sm{flex-wrap:nowrap;gap:var(--sgds-gap-xl);justify-content:flex-start}.navbar-expand-sm .navbar-nav{flex-direction:row}.navbar-expand-sm .navbar-nav-scroll{overflow:visible}.navbar-expand-sm .navbar-collapse{display:flex!important;flex-basis:auto}.navbar-expand-sm .navbar-toggler{display:none}}@media (min-width:768px){.navbar-expand-md{flex-wrap:nowrap;gap:var(--sgds-gap-xl);justify-content:flex-start}.navbar-expand-md .navbar-nav{flex-direction:row}.navbar-expand-md .navbar-nav-scroll{overflow:visible}.navbar-expand-md .navbar-collapse{display:flex!important;flex-basis:auto}.navbar-expand-md .navbar-toggler{display:none}}@media (min-width:1024px){.navbar{padding:0 var(--sgds-mainnav-padding-x)}.navbar-expand-lg{flex-wrap:nowrap;gap:var(--sgds-gap-xl);justify-content:flex-start}.navbar-expand-lg .navbar-nav{flex-direction:row}.navbar-expand-lg .navbar-nav-scroll{overflow:visible}.navbar-expand-lg .navbar-collapse{display:flex!important;flex-basis:auto}.navbar-expand-lg .navbar-toggler{display:none}}@media (min-width:1280px){.navbar-expand-xl{flex-wrap:nowrap;gap:var(--sgds-gap-xl);justify-content:flex-start}.navbar-expand-xl .navbar-nav{flex-direction:row}.navbar-expand-xl .navbar-nav .nav-link{padding-left:var(--mainnav-nav-link-padding-x);padding-right:var(--mainnav-nav-link-padding-x)}.navbar-expand-xl .navbar-nav-scroll{overflow:visible}.navbar-expand-xl .navbar-collapse{display:flex!important;flex-basis:auto}.navbar-expand-xl .navbar-toggler{display:none}}@media (min-width:1440px){.navbar-expand-xxl{flex-wrap:nowrap;gap:var(--sgds-gap-xl);justify-content:flex-start}.navbar-expand-xxl .navbar-nav{flex-direction:row}.navbar-expand-xxl .navbar-nav-scroll{overflow:visible}.navbar-expand-xxl .navbar-collapse{display:flex!important;flex-basis:auto}.navbar-expand-xxl .navbar-toggler{display:none}}.navbar-expand{flex-wrap:nowrap;gap:var(--sgds-gap-xl);justify-content:flex-start}.navbar-expand .navbar-nav{flex-direction:row}.navbar-expand .navbar-nav-scroll{overflow:visible}.navbar-expand .navbar-collapse{display:flex!important;flex-basis:auto}.navbar-expand .navbar-toggler{display:none}slot[name=non-collapsible]{align-items:center;display:flex;gap:var(--sgds-spacer-4);margin-left:auto}slot[name=non-collapsible].non-collapsible-empty{display:none}.slot-end{align-items:stretch;display:flex;gap:var(--sgds-gap-xs);margin-left:auto}.slot-end::slotted(:not([name$=-mainnav-item]):not([name$=-mainnav-dropdown])){align-self:center}`;class Nt{constructor(e,...t){this.slotNames=[],(this.host=e).addController(this),this.slotNames=t,this.handleSlotChange=this.handleSlotChange.bind(this)}hasDefaultSlot(){return[...this.host.childNodes].some(e=>{var t;if(e.nodeType===e.TEXT_NODE&&""!==(null===(t=e.textContent)||void 0===t?void 0:t.trim()))return!0;if(e.nodeType===e.ELEMENT_NODE){const t=e;if("sl-visually-hidden"===t.tagName.toLowerCase())return!1;if(!t.hasAttribute("slot"))return!0}return!1})}hasNamedSlot(e){return null!==this.host.querySelector(`:scope > [slot="${e}"]`)}test(e){return"[default]"===e?this.hasDefaultSlot():this.hasNamedSlot(e)}hostConnected(){var e;null===(e=this.host.shadowRoot)||void 0===e||e.addEventListener("slotchange",this.handleSlotChange)}hostDisconnected(){var e;null===(e=this.host.shadowRoot)||void 0===e||e.removeEventListener("slotchange",this.handleSlotChange)}handleSlotChange(e){const t=e.target;(this.slotNames.includes("[default]")&&!t.name||t.name&&this.slotNames.includes(t.name))&&this.host.requestUpdate()}}const Ot={sm:512,md:768,lg:1024,xl:1280,xxl:1440,never:1/0,always:-1};class zt extends qe{constructor(){super(...arguments),this._breakpointReached=!1,this.expanded=!1,this.expanding=!1,this.hasNonCollapsibleSlot=!1,this.brandHref="",this.collapseId=tt("mainnav","collapse"),this.expand="lg",this.fluid=!1,this.breakpointReached=!1,this.hasSlotController=new Nt(this,"non-collapsible"),this._handleMobileNavBound=this._handleMobileNav.bind(this)}get defaultSlotItems(){return[...this.defaultNodes||[]].filter(e=>void 0!==e.tagName)}get endSlotItems(){return[...this.endNodes||[]].filter(e=>void 0!==e.tagName)}connectedCallback(){super.connectedCallback(),this._handleResize(),window.addEventListener("click",e=>this._handleClickOutOfElement(e,this.body)),window.addEventListener("resize",this._handleResize.bind(this))}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("click",e=>this._handleClickOutOfElement(e,this.body)),window.removeEventListener("resize",this._handleResize.bind(this))}firstUpdated(e){super.firstUpdated(e),this.breakpointReached&&this.body&&(this.expanded=!1,this.body.hidden=!0,this._handleMobileNav(),this._breakpointReached=!0)}updated(){this.hasNonCollapsibleSlot||(this.hasNonCollapsibleSlot=this.hasSlotController.test("non-collapsible"))}_handleClickOutOfElement(e,t){e.composedPath().includes(t)||e.composedPath().includes(this.header)||this.hide()}_handleSummaryClick(){this.expanded?this.hide():(document.body.style.overflow="hidden",this.show())}_handleResize(){const e=window.innerWidth<Ot[this.expand];e!==this.breakpointReached?this.requestUpdate():(this.body&&(this.body.hidden=!0),this.expanding=!1),e?(this._handleMobileNav(),this._breakpointReached||(this._breakpointReached=!0,window.addEventListener("scrollend",this._handleMobileNavBound))):(this._handleDesktopNav(),this._breakpointReached=!1,window.removeEventListener("scrollend",this._handleMobileNavBound))}async _handleMobileNav(){if(!this.nav)return;this.nav.appendChild(this.body),await customElements.whenDefined("sgds-masthead");const{bottom:e}=this.nav.getBoundingClientRect(),t=parseFloat(getComputedStyle(this.body).paddingTop)+parseFloat(getComputedStyle(this.body).paddingBottom);this.navScroll.style.maxHeight=`calc(100dvh - ${e}px - ${t}px)`}_handleDesktopNav(){var e;null===(e=this.navbar)||void 0===e||e.insertBefore(this.body,this.nonCollapsibleSlot)}async _animateToShow(){if(this.emit("sgds-show",{cancelable:!0}).defaultPrevented)return this.expanding=!1,void(this.expanded=!1);await Xe(this.body),this.body.hidden=!1;const{keyframes:e,options:t}=Ge(this,"mainnav.show");await je(this.body,Ke(e,this.body.scrollHeight),t),this.body.style.height="auto",this.emit("sgds-after-show")}async _animateToHide(){if(this.emit("sgds-hide",{cancelable:!0}).defaultPrevented)return this.expanding=!1,void(this.expanded=!0);await Xe(this.body);const{keyframes:e,options:t}=Ge(this,"mainnav.hide");await je(this.body,Ke(e,this.body.scrollHeight),t),this.body.hidden=!0,this.body.style.height="auto",this.emit("sgds-after-hide")}async handleOpenChange(){this.expanding?(await this._animateToShow(),this.expanded=!0):(this.header.focus(),await this._animateToHide(),this.expanded=!1)}async show(){if(!this.expanded)return this.expanding=!0,et(this,"sgds-after-show")}async hide(){if(this.expanded)return this.expanding=!1,document.body.style.removeProperty("overflow"),et(this,"sgds-after-hide")}_handleDefaultSlotChange(e){e.target.assignedElements({flatten:!0}).forEach(e=>{e.setAttribute("expand",this.expand)})}_handleSlotChange(e){e.target.assignedElements({flatten:!0}).forEach(e=>{e.setAttribute("name",e.tagName.toLowerCase()),e.setAttribute("expand",this.expand)})}render(){return this.breakpointReached=window.innerWidth<Ot[this.expand],oe`
|
|
2358
2358
|
<nav>
|
|
2359
2359
|
<div class="navbar ${this._expandClass()}">
|
|
2360
2360
|
<a class="navbar-brand" href=${this.brandHref} aria-label="brand-link">
|
|
@@ -2386,7 +2386,7 @@ let Se;$e?.({LitElement:He}),(_e.litElementVersions??=[]).push("4.2.2"),_e.litEl
|
|
|
2386
2386
|
></sgds-icon-button>
|
|
2387
2387
|
</div>
|
|
2388
2388
|
</nav>
|
|
2389
|
-
`}_expandClass(){switch(this.expand){case"always":return"navbar-expand";case"never":break;default:return`navbar-expand-${this.expand}`}}}zt.styles=[...qe.styles,Rt],zt.dependencies={"sgds-icon-button":Et},e([o({context:Pt}),Ee()],zt.prototype,"_breakpointReached",void 0),e([o({context:Tt}),Ee()],zt.prototype,"expanded",void 0),e([Ee()],zt.prototype,"expanding",void 0),e([Re("nav")],zt.prototype,"nav",void 0),e([Re(".navbar")],zt.prototype,"navbar",void 0),e([Re(".navbar-toggler")],zt.prototype,"header",void 0),e([Re(".navbar-body")],zt.prototype,"body",void 0),e([Re(".navbar-nav-scroll")],zt.prototype,"navScroll",void 0),e([Re("slot[name='non-collapsible']")],zt.prototype,"nonCollapsibleSlot",void 0),e([Le({type:Boolean})],zt.prototype,"hasNonCollapsibleSlot",void 0),e([Le({type:String})],zt.prototype,"brandHref",void 0),e([Le({type:String})],zt.prototype,"expand",void 0),e([Le({type:Boolean,reflect:!0})],zt.prototype,"fluid",void 0),e([Ee()],zt.prototype,"breakpointReached",void 0),e([Ne()],zt.prototype,"defaultNodes",void 0),e([Ne({slot:"end"})],zt.prototype,"endNodes",void 0),e([at("expanding",{waitUntilFirstUpdate:!0})],zt.prototype,"handleOpenChange",null),Qe("mainnav.show",{keyframes:[{height:"0",opacity:"0"},{height:"auto",opacity:"1"}],options:{duration:200,easing:"ease-in-out"}}),Qe("mainnav.hide",{keyframes:[{height:"auto",opacity:"1"},{height:"0",opacity:"0"}],options:{duration:200,easing:"ease-in-out"}});const Dt=Math.min,It=Math.max,Ut=Math.round,Wt=Math.floor,qt=e=>({x:e,y:e}),jt={left:"right",right:"left",bottom:"top",top:"bottom"},Ft={start:"end",end:"start"};function Kt(e,t,a){return It(e,Dt(t,a))}function Xt(e,t){return"function"==typeof e?e(t):e}function Jt(e){return e.split("-")[0]}function Yt(e){return e.split("-")[1]}function Gt(e){return"x"===e?"y":"x"}function Qt(e){return"y"===e?"height":"width"}const ea=new Set(["top","bottom"]);function ta(e){return ea.has(Jt(e))?"y":"x"}function aa(e){return Gt(ta(e))}function ia(e,t,a){void 0===a&&(a=!1);const i=Yt(e),n=aa(e),l=Qt(n);let o="x"===n?i===(a?"end":"start")?"right":"left":"start"===i?"bottom":"top";return t.reference[l]>t.floating[l]&&(o=da(o)),[o,da(o)]}function na(e){return e.replace(/start|end/g,e=>Ft[e])}const la=["left","right"],oa=["right","left"],sa=["top","bottom"],ra=["bottom","top"];function ca(e,t,a,i){const n=Yt(e);let l=function(e,t,a){switch(e){case"top":case"bottom":return a?t?oa:la:t?la:oa;case"left":case"right":return t?sa:ra;default:return[]}}(Jt(e),"start"===a,i);return n&&(l=l.map(e=>e+"-"+n),t&&(l=l.concat(l.map(na)))),l}function da(e){return e.replace(/left|right|bottom|top/g,e=>jt[e])}function ha(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 va(e){const{x:t,y:a,width:i,height:n}=e;return{width:i,height:n,top:a,left:t,right:t+i,bottom:a+n,x:t,y:a}}function pa(e,t,a){let{reference:i,floating:n}=e;const l=ta(t),o=aa(t),s=Qt(o),r=Jt(t),c="y"===l,d=i.x+i.width/2-n.width/2,h=i.y+i.height/2-n.height/2,v=i[s]/2-n[s]/2;let p;switch(r){case"top":p={x:d,y:i.y-n.height};break;case"bottom":p={x:d,y:i.y+i.height};break;case"right":p={x:i.x+i.width,y:h};break;case"left":p={x:i.x-n.width,y:h};break;default:p={x:i.x,y:i.y}}switch(Yt(t)){case"start":p[o]-=v*(a&&c?-1:1);break;case"end":p[o]+=v*(a&&c?-1:1)}return p}async function ga(e,t){var a;void 0===t&&(t={});const{x:i,y:n,platform:l,rects:o,elements:s,strategy:r}=e,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:h="floating",altBoundary:v=!1,padding:p=0}=Xt(t,e),g=ha(p),u=s[v?"floating"===h?"reference":"floating":h],w=va(await l.getClippingRect({element:null==(a=await(null==l.isElement?void 0:l.isElement(u)))||a?u:u.contextElement||await(null==l.getDocumentElement?void 0:l.getDocumentElement(s.floating)),boundary:c,rootBoundary:d,strategy:r})),f="floating"===h?{x:i,y:n,width:o.floating.width,height:o.floating.height}:o.reference,m=await(null==l.getOffsetParent?void 0:l.getOffsetParent(s.floating)),b=await(null==l.isElement?void 0:l.isElement(m))&&await(null==l.getScale?void 0:l.getScale(m))||{x:1,y:1},x=va(l.convertOffsetParentRelativeRectToViewportRelativeRect?await l.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:f,offsetParent:m,strategy:r}):f);return{top:(w.top-x.top+g.top)/b.y,bottom:(x.bottom-w.bottom+g.bottom)/b.y,left:(w.left-x.left+g.left)/b.x,right:(x.right-w.right+g.right)/b.x}}const ua=new Set(["left","top"]);function wa(){return"undefined"!=typeof window}function fa(e){return xa(e)?(e.nodeName||"").toLowerCase():"#document"}function ma(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function ba(e){var t;return null==(t=(xa(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function xa(e){return!!wa()&&(e instanceof Node||e instanceof ma(e).Node)}function ya(e){return!!wa()&&(e instanceof Element||e instanceof ma(e).Element)}function Za(e){return!!wa()&&(e instanceof HTMLElement||e instanceof ma(e).HTMLElement)}function Ca(e){return!(!wa()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof ma(e).ShadowRoot)}const Ma=new Set(["inline","contents"]);function _a(e){const{overflow:t,overflowX:a,overflowY:i,display:n}=Ra(e);return/auto|scroll|overlay|hidden|clip/.test(t+i+a)&&!Ma.has(n)}const Va=new Set(["table","td","th"]);function Ha(e){return Va.has(fa(e))}const ka=[":popover-open",":modal"];function $a(e){return ka.some(t=>{try{return e.matches(t)}catch(e){return!1}})}const Sa=["transform","translate","scale","rotate","perspective"],Ba=["transform","translate","scale","rotate","perspective","filter"],Aa=["paint","layout","strict","content"];function La(e){const t=Ea(),a=ya(e)?Ra(e):e;return Sa.some(e=>!!a[e]&&"none"!==a[e])||!!a.containerType&&"normal"!==a.containerType||!t&&!!a.backdropFilter&&"none"!==a.backdropFilter||!t&&!!a.filter&&"none"!==a.filter||Ba.some(e=>(a.willChange||"").includes(e))||Aa.some(e=>(a.contain||"").includes(e))}function Ea(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}const Pa=new Set(["html","body","#document"]);function Ta(e){return Pa.has(fa(e))}function Ra(e){return ma(e).getComputedStyle(e)}function Na(e){return ya(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Oa(e){if("html"===fa(e))return e;const t=e.assignedSlot||e.parentNode||Ca(e)&&e.host||ba(e);return Ca(t)?t.host:t}function za(e){const t=Oa(e);return Ta(t)?e.ownerDocument?e.ownerDocument.body:e.body:Za(t)&&_a(t)?t:za(t)}function Da(e,t,a){var i;void 0===t&&(t=[]),void 0===a&&(a=!0);const n=za(e),l=n===(null==(i=e.ownerDocument)?void 0:i.body),o=ma(n);if(l){const e=Ia(o);return t.concat(o,o.visualViewport||[],_a(n)?n:[],e&&a?Da(e):[])}return t.concat(n,Da(n,[],a))}function Ia(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Ua(e){const t=Ra(e);let a=parseFloat(t.width)||0,i=parseFloat(t.height)||0;const n=Za(e),l=n?e.offsetWidth:a,o=n?e.offsetHeight:i,s=Ut(a)!==l||Ut(i)!==o;return s&&(a=l,i=o),{width:a,height:i,$:s}}function Wa(e){return ya(e)?e:e.contextElement}function qa(e){const t=Wa(e);if(!Za(t))return qt(1);const a=t.getBoundingClientRect(),{width:i,height:n,$:l}=Ua(t);let o=(l?Ut(a.width):a.width)/i,s=(l?Ut(a.height):a.height)/n;return o&&Number.isFinite(o)||(o=1),s&&Number.isFinite(s)||(s=1),{x:o,y:s}}const ja=qt(0);function Fa(e){const t=ma(e);return Ea()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:ja}function Ka(e,t,a,i){void 0===t&&(t=!1),void 0===a&&(a=!1);const n=e.getBoundingClientRect(),l=Wa(e);let o=qt(1);t&&(i?ya(i)&&(o=qa(i)):o=qa(e));const s=function(e,t,a){return void 0===t&&(t=!1),!(!a||t&&a!==ma(e))&&t}(l,a,i)?Fa(l):qt(0);let r=(n.left+s.x)/o.x,c=(n.top+s.y)/o.y,d=n.width/o.x,h=n.height/o.y;if(l){const e=ma(l),t=i&&ya(i)?ma(i):i;let a=e,n=Ia(a);for(;n&&i&&t!==a;){const e=qa(n),t=n.getBoundingClientRect(),i=Ra(n),l=t.left+(n.clientLeft+parseFloat(i.paddingLeft))*e.x,o=t.top+(n.clientTop+parseFloat(i.paddingTop))*e.y;r*=e.x,c*=e.y,d*=e.x,h*=e.y,r+=l,c+=o,a=ma(n),n=Ia(a)}}return va({width:d,height:h,x:r,y:c})}function Xa(e,t){const a=Na(e).scrollLeft;return t?t.left+a:Ka(ba(e)).left+a}function Ja(e,t){const a=e.getBoundingClientRect();return{x:a.left+t.scrollLeft-Xa(e,a),y:a.top+t.scrollTop}}const Ya=new Set(["absolute","fixed"]);function Ga(e,t,a){let i;if("viewport"===t)i=function(e,t){const a=ma(e),i=ba(e),n=a.visualViewport;let l=i.clientWidth,o=i.clientHeight,s=0,r=0;if(n){l=n.width,o=n.height;const e=Ea();(!e||e&&"fixed"===t)&&(s=n.offsetLeft,r=n.offsetTop)}const c=Xa(i);if(c<=0){const e=i.ownerDocument,t=e.body,a=getComputedStyle(t),n="CSS1Compat"===e.compatMode&&parseFloat(a.marginLeft)+parseFloat(a.marginRight)||0,o=Math.abs(i.clientWidth-t.clientWidth-n);o<=25&&(l-=o)}else c<=25&&(l+=c);return{width:l,height:o,x:s,y:r}}(e,a);else if("document"===t)i=function(e){const t=ba(e),a=Na(e),i=e.ownerDocument.body,n=It(t.scrollWidth,t.clientWidth,i.scrollWidth,i.clientWidth),l=It(t.scrollHeight,t.clientHeight,i.scrollHeight,i.clientHeight);let o=-a.scrollLeft+Xa(e);const s=-a.scrollTop;return"rtl"===Ra(i).direction&&(o+=It(t.clientWidth,i.clientWidth)-n),{width:n,height:l,x:o,y:s}}(ba(e));else if(ya(t))i=function(e,t){const a=Ka(e,!0,"fixed"===t),i=a.top+e.clientTop,n=a.left+e.clientLeft,l=Za(e)?qa(e):qt(1);return{width:e.clientWidth*l.x,height:e.clientHeight*l.y,x:n*l.x,y:i*l.y}}(t,a);else{const a=Fa(e);i={x:t.x-a.x,y:t.y-a.y,width:t.width,height:t.height}}return va(i)}function Qa(e,t){const a=Oa(e);return!(a===t||!ya(a)||Ta(a))&&("fixed"===Ra(a).position||Qa(a,t))}function ei(e,t,a){const i=Za(t),n=ba(t),l="fixed"===a,o=Ka(e,!0,l,t);let s={scrollLeft:0,scrollTop:0};const r=qt(0);function c(){r.x=Xa(n)}if(i||!i&&!l)if(("body"!==fa(t)||_a(n))&&(s=Na(t)),i){const e=Ka(t,!0,l,t);r.x=e.x+t.clientLeft,r.y=e.y+t.clientTop}else n&&c();l&&!i&&n&&c();const d=!n||i||l?qt(0):Ja(n,s);return{x:o.left+s.scrollLeft-r.x-d.x,y:o.top+s.scrollTop-r.y-d.y,width:o.width,height:o.height}}function ti(e){return"static"===Ra(e).position}function ai(e,t){if(!Za(e)||"fixed"===Ra(e).position)return null;if(t)return t(e);let a=e.offsetParent;return ba(e)===a&&(a=a.ownerDocument.body),a}function ii(e,t){const a=ma(e);if($a(e))return a;if(!Za(e)){let t=Oa(e);for(;t&&!Ta(t);){if(ya(t)&&!ti(t))return t;t=Oa(t)}return a}let i=ai(e,t);for(;i&&Ha(i)&&ti(i);)i=ai(i,t);return i&&Ta(i)&&ti(i)&&!La(i)?a:i||function(e){let t=Oa(e);for(;Za(t)&&!Ta(t);){if(La(t))return t;if($a(t))return null;t=Oa(t)}return null}(e)||a}const ni={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:a,offsetParent:i,strategy:n}=e;const l="fixed"===n,o=ba(i),s=!!t&&$a(t.floating);if(i===o||s&&l)return a;let r={scrollLeft:0,scrollTop:0},c=qt(1);const d=qt(0),h=Za(i);if((h||!h&&!l)&&(("body"!==fa(i)||_a(o))&&(r=Na(i)),Za(i))){const e=Ka(i);c=qa(i),d.x=e.x+i.clientLeft,d.y=e.y+i.clientTop}const v=!o||h||l?qt(0):Ja(o,r);return{width:a.width*c.x,height:a.height*c.y,x:a.x*c.x-r.scrollLeft*c.x+d.x+v.x,y:a.y*c.y-r.scrollTop*c.y+d.y+v.y}},getDocumentElement:ba,getClippingRect:function(e){let{element:t,boundary:a,rootBoundary:i,strategy:n}=e;const l=[..."clippingAncestors"===a?$a(t)?[]:function(e,t){const a=t.get(e);if(a)return a;let i=Da(e,[],!1).filter(e=>ya(e)&&"body"!==fa(e)),n=null;const l="fixed"===Ra(e).position;let o=l?Oa(e):e;for(;ya(o)&&!Ta(o);){const t=Ra(o),a=La(o);a||"fixed"!==t.position||(n=null),(l?!a&&!n:!a&&"static"===t.position&&n&&Ya.has(n.position)||_a(o)&&!a&&Qa(e,o))?i=i.filter(e=>e!==o):n=t,o=Oa(o)}return t.set(e,i),i}(t,this._c):[].concat(a),i],o=l[0],s=l.reduce((e,a)=>{const i=Ga(t,a,n);return e.top=It(i.top,e.top),e.right=Dt(i.right,e.right),e.bottom=Dt(i.bottom,e.bottom),e.left=It(i.left,e.left),e},Ga(t,o,n));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}},getOffsetParent:ii,getElementRects:async function(e){const t=this.getOffsetParent||ii,a=this.getDimensions,i=await a(e.floating);return{reference:ei(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:a}=Ua(e);return{width:t,height:a}},getScale:qa,isElement:ya,isRTL:function(e){return"rtl"===Ra(e).direction}};function li(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function oi(e,t,a,i){void 0===i&&(i={});const{ancestorScroll:n=!0,ancestorResize:l=!0,elementResize:o="function"==typeof ResizeObserver,layoutShift:s="function"==typeof IntersectionObserver,animationFrame:r=!1}=i,c=Wa(e),d=n||l?[...c?Da(c):[],...Da(t)]:[];d.forEach(e=>{n&&e.addEventListener("scroll",a,{passive:!0}),l&&e.addEventListener("resize",a)});const h=c&&s?function(e,t){let a,i=null;const n=ba(e);function l(){var e;clearTimeout(a),null==(e=i)||e.disconnect(),i=null}return function o(s,r){void 0===s&&(s=!1),void 0===r&&(r=1),l();const c=e.getBoundingClientRect(),{left:d,top:h,width:v,height:p}=c;if(s||t(),!v||!p)return;const g={rootMargin:-Wt(h)+"px "+-Wt(n.clientWidth-(d+v))+"px "+-Wt(n.clientHeight-(h+p))+"px "+-Wt(d)+"px",threshold:It(0,Dt(1,r))||1};let u=!0;function w(t){const i=t[0].intersectionRatio;if(i!==r){if(!u)return o();i?o(!1,i):a=setTimeout(()=>{o(!1,1e-7)},1e3)}1!==i||li(c,e.getBoundingClientRect())||o(),u=!1}try{i=new IntersectionObserver(w,{...g,root:n.ownerDocument})}catch(e){i=new IntersectionObserver(w,g)}i.observe(e)}(!0),l}(c,a):null;let v,p=-1,g=null;o&&(g=new ResizeObserver(e=>{let[i]=e;i&&i.target===c&&g&&(g.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var e;null==(e=g)||e.observe(t)})),a()}),c&&!r&&g.observe(c),g.observe(t));let u=r?Ka(e):null;return r&&function t(){const i=Ka(e);u&&!li(u,i)&&a();u=i,v=requestAnimationFrame(t)}(),a(),()=>{var e;d.forEach(e=>{n&&e.removeEventListener("scroll",a),l&&e.removeEventListener("resize",a)}),null==h||h(),null==(e=g)||e.disconnect(),g=null,r&&cancelAnimationFrame(v)}}const si=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var a,i;const{x:n,y:l,placement:o,middlewareData:s}=t,r=await async function(e,t){const{placement:a,platform:i,elements:n}=e,l=await(null==i.isRTL?void 0:i.isRTL(n.floating)),o=Jt(a),s=Yt(a),r="y"===ta(a),c=ua.has(o)?-1:1,d=l&&r?-1:1,h=Xt(t,e);let{mainAxis:v,crossAxis:p,alignmentAxis:g}="number"==typeof h?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return s&&"number"==typeof g&&(p="end"===s?-1*g:g),r?{x:p*d,y:v*c}:{x:v*c,y:p*d}}(t,e);return o===(null==(a=s.offset)?void 0:a.placement)&&null!=(i=s.arrow)&&i.alignmentOffset?{}:{x:n+r.x,y:l+r.y,data:{...r,placement:o}}}}},ri=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:a,y:i,placement:n}=t,{mainAxis:l=!0,crossAxis:o=!1,limiter:s={fn:e=>{let{x:t,y:a}=e;return{x:t,y:a}}},...r}=Xt(e,t),c={x:a,y:i},d=await ga(t,r),h=ta(Jt(n)),v=Gt(h);let p=c[v],g=c[h];if(l){const e="y"===v?"bottom":"right";p=Kt(p+d["y"===v?"top":"left"],p,p-d[e])}if(o){const e="y"===h?"bottom":"right";g=Kt(g+d["y"===h?"top":"left"],g,g-d[e])}const u=s.fn({...t,[v]:p,[h]:g});return{...u,data:{x:u.x-a,y:u.y-i,enabled:{[v]:l,[h]:o}}}}}},ci=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var a,i;const{placement:n,middlewareData:l,rects:o,initialPlacement:s,platform:r,elements:c}=t,{mainAxis:d=!0,crossAxis:h=!0,fallbackPlacements:v,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:u=!0,...w}=Xt(e,t);if(null!=(a=l.arrow)&&a.alignmentOffset)return{};const f=Jt(n),m=ta(s),b=Jt(s)===s,x=await(null==r.isRTL?void 0:r.isRTL(c.floating)),y=v||(b||!u?[da(s)]:function(e){const t=da(e);return[na(e),t,na(t)]}(s)),Z="none"!==g;!v&&Z&&y.push(...ca(s,u,g,x));const C=[s,...y],M=await ga(t,w),_=[];let V=(null==(i=l.flip)?void 0:i.overflows)||[];if(d&&_.push(M[f]),h){const e=ia(n,o,x);_.push(M[e[0]],M[e[1]])}if(V=[...V,{placement:n,overflows:_}],!_.every(e=>e<=0)){var H,k;const e=((null==(H=l.flip)?void 0:H.index)||0)+1,t=C[e];if(t){if(!("alignment"===h&&m!==ta(t))||V.every(e=>ta(e.placement)!==m||e.overflows[0]>0))return{data:{index:e,overflows:V},reset:{placement:t}}}let a=null==(k=V.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])?void 0:k.placement;if(!a)switch(p){case"bestFit":{var $;const e=null==($=V.filter(e=>{if(Z){const t=ta(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:$[0];e&&(a=e);break}case"initialPlacement":a=s}if(n!==a)return{reset:{placement:a}}}return{}}}},di=(e,t,a)=>{const i=new Map,n={platform:ni,...a},l={...n.platform,_c:i};return(async(e,t,a)=>{const{placement:i="bottom",strategy:n="absolute",middleware:l=[],platform:o}=a,s=l.filter(Boolean),r=await(null==o.isRTL?void 0:o.isRTL(t));let c=await o.getElementRects({reference:e,floating:t,strategy:n}),{x:d,y:h}=pa(c,i,r),v=i,p={},g=0;for(let a=0;a<s.length;a++){const{name:l,fn:u}=s[a],{x:w,y:f,data:m,reset:b}=await u({x:d,y:h,initialPlacement:i,placement:v,strategy:n,middlewareData:p,rects:c,platform:o,elements:{reference:e,floating:t}});d=null!=w?w:d,h=null!=f?f:h,p={...p,[l]:{...p[l],...m}},b&&g<=50&&(g++,"object"==typeof b&&(b.placement&&(v=b.placement),b.rects&&(c=!0===b.rects?await o.getElementRects({reference:e,floating:t,strategy:n}):b.rects),({x:d,y:h}=pa(c,v,r))),a=-1)}return{x:d,y:h,placement:v,strategy:n,middlewareData:p}})(e,t,{...n,platform:l})};var hi=p`.dropdown{display:flex;height:inherit;position:relative}`,vi=p`:host([menuisopen]:not([disabled]):not([readonly])) .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);max-width:var(--sgds-dimension-320);min-width:var(--sgds-dimension-192);overflow-y:auto;padding:var(--sgds-padding-xs) 0;position:absolute;text-align:left;z-index:var(--sgds-z-index-floating)}.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%}`,pi=p`:host([expand=always]) .nav-link{border-bottom:var(--sgds-border-width-4) solid transparent;min-height:100%;padding:0 var(--sgds-padding-md)}@media (min-width:512px){:host([expand=sm]) .nav-link{border-bottom:var(--sgds-border-width-4) solid transparent;min-height:100%;padding:0 var(--sgds-padding-md)}}@media (min-width:768px){:host([expand=md]) .nav-link{border-bottom:var(--sgds-border-width-4) solid transparent;min-height:100%;padding:0 var(--sgds-padding-md)}}@media (min-width:1024px){:host(:not([expand])) .nav-link,:host([expand=lg]) .nav-link{border-bottom:var(--sgds-border-width-4) solid transparent;min-height:100%;padding:0 var(--sgds-padding-md)}}@media (min-width:1280px){:host([expand=xl]) .nav-link{border-bottom:var(--sgds-border-width-4) solid transparent;min-height:100%;padding:0 var(--sgds-padding-md)}}@media (min-width:1440px){:host([expand=xxl]) .nav-link{border-bottom:var(--sgds-border-width-4) solid transparent;min-height:100%;padding:0 var(--sgds-padding-md)}}.nav-link{align-items:center;box-sizing:border-box;cursor:pointer;display:flex;gap:var(--sgds-gap-xs);padding:var(--sgds-padding-sm) var(--sgds-mainnav-mobile-padding-x);text-decoration:none}.nav-link.show,.nav-link:not(.disabled).active{border-color:var(--sgds-primary-border-color-default);color:var(--sgds-primary-color-default)}.nav-link:not(.disabled):hover{color:var(--sgds-primary-color-default)}.nav-link:not(.disabled):focus-visible{color:var(--sgds-primary-color-default);outline:var(--sgds-outline-focus);outline-offset:var(--sgds-outline-offset-focus)}.nav-link.disabled{cursor:not-allowed;opacity:var(--sgds-opacity-50)}.dropdown-items{background-color:var(--sgds-surface-default);height:100%;left:100%;overflow-y:auto;padding:var(--sgds-padding-md) 0;position:absolute;top:0;width:100%}.dropdown-items a{align-items:center;color:var(--sgds-color-default);cursor:pointer;display:flex;gap:var(--sgds-gap-xs);margin:auto;max-width:var(--sgds-mainnav-max-width,1440px);padding:var(--sgds-padding-sm) var(--sgds-mainnav-mobile-padding-x);text-decoration:none}.dropdown-items a:hover{color:var(--sgds-primary-color-default)}.dropdown-items a:focus-visible{color:var(--sgds-primary-color-default);outline:var(--sgds-outline-focus);outline-offset:var(--sgds-outline-offset-focus);outline-offset:-5px}slot[name=toggler]::slotted(*){flex:1}sgds-dropdown{display:block;height:100%}@media screen and (min-width:1024px){.dropdown-items a,.nav-link{padding:var(--sgds-padding-sm) var(--sgds-mainnav-padding-x)}}`
|
|
2389
|
+
`}_expandClass(){switch(this.expand){case"always":return"navbar-expand";case"never":break;default:return`navbar-expand-${this.expand}`}}}zt.styles=[...qe.styles,Tt],zt.dependencies={"sgds-icon-button":Et},e([o({context:Pt}),Ee()],zt.prototype,"_breakpointReached",void 0),e([o({context:Rt}),Ee()],zt.prototype,"expanded",void 0),e([Ee()],zt.prototype,"expanding",void 0),e([Te("nav")],zt.prototype,"nav",void 0),e([Te(".navbar")],zt.prototype,"navbar",void 0),e([Te(".navbar-toggler")],zt.prototype,"header",void 0),e([Te(".navbar-body")],zt.prototype,"body",void 0),e([Te(".navbar-nav-scroll")],zt.prototype,"navScroll",void 0),e([Te("slot[name='non-collapsible']")],zt.prototype,"nonCollapsibleSlot",void 0),e([Le({type:Boolean})],zt.prototype,"hasNonCollapsibleSlot",void 0),e([Le({type:String})],zt.prototype,"brandHref",void 0),e([Le({type:String})],zt.prototype,"expand",void 0),e([Le({type:Boolean,reflect:!0})],zt.prototype,"fluid",void 0),e([Ee()],zt.prototype,"breakpointReached",void 0),e([Ne()],zt.prototype,"defaultNodes",void 0),e([Ne({slot:"end"})],zt.prototype,"endNodes",void 0),e([at("expanding",{waitUntilFirstUpdate:!0})],zt.prototype,"handleOpenChange",null),Qe("mainnav.show",{keyframes:[{height:"0",opacity:"0"},{height:"auto",opacity:"1"}],options:{duration:200,easing:"ease-in-out"}}),Qe("mainnav.hide",{keyframes:[{height:"auto",opacity:"1"},{height:"0",opacity:"0"}],options:{duration:200,easing:"ease-in-out"}});const Dt=Math.min,It=Math.max,Ut=Math.round,Wt=Math.floor,qt=e=>({x:e,y:e}),jt={left:"right",right:"left",bottom:"top",top:"bottom"},Ft={start:"end",end:"start"};function Kt(e,t,a){return It(e,Dt(t,a))}function Xt(e,t){return"function"==typeof e?e(t):e}function Jt(e){return e.split("-")[0]}function Yt(e){return e.split("-")[1]}function Gt(e){return"x"===e?"y":"x"}function Qt(e){return"y"===e?"height":"width"}const ea=new Set(["top","bottom"]);function ta(e){return ea.has(Jt(e))?"y":"x"}function aa(e){return Gt(ta(e))}function ia(e,t,a){void 0===a&&(a=!1);const i=Yt(e),n=aa(e),l=Qt(n);let o="x"===n?i===(a?"end":"start")?"right":"left":"start"===i?"bottom":"top";return t.reference[l]>t.floating[l]&&(o=da(o)),[o,da(o)]}function na(e){return e.replace(/start|end/g,e=>Ft[e])}const la=["left","right"],oa=["right","left"],sa=["top","bottom"],ra=["bottom","top"];function ca(e,t,a,i){const n=Yt(e);let l=function(e,t,a){switch(e){case"top":case"bottom":return a?t?oa:la:t?la:oa;case"left":case"right":return t?sa:ra;default:return[]}}(Jt(e),"start"===a,i);return n&&(l=l.map(e=>e+"-"+n),t&&(l=l.concat(l.map(na)))),l}function da(e){return e.replace(/left|right|bottom|top/g,e=>jt[e])}function ha(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 va(e){const{x:t,y:a,width:i,height:n}=e;return{width:i,height:n,top:a,left:t,right:t+i,bottom:a+n,x:t,y:a}}function pa(e,t,a){let{reference:i,floating:n}=e;const l=ta(t),o=aa(t),s=Qt(o),r=Jt(t),c="y"===l,d=i.x+i.width/2-n.width/2,h=i.y+i.height/2-n.height/2,v=i[s]/2-n[s]/2;let p;switch(r){case"top":p={x:d,y:i.y-n.height};break;case"bottom":p={x:d,y:i.y+i.height};break;case"right":p={x:i.x+i.width,y:h};break;case"left":p={x:i.x-n.width,y:h};break;default:p={x:i.x,y:i.y}}switch(Yt(t)){case"start":p[o]-=v*(a&&c?-1:1);break;case"end":p[o]+=v*(a&&c?-1:1)}return p}async function ga(e,t){var a;void 0===t&&(t={});const{x:i,y:n,platform:l,rects:o,elements:s,strategy:r}=e,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:h="floating",altBoundary:v=!1,padding:p=0}=Xt(t,e),g=ha(p),u=s[v?"floating"===h?"reference":"floating":h],w=va(await l.getClippingRect({element:null==(a=await(null==l.isElement?void 0:l.isElement(u)))||a?u:u.contextElement||await(null==l.getDocumentElement?void 0:l.getDocumentElement(s.floating)),boundary:c,rootBoundary:d,strategy:r})),f="floating"===h?{x:i,y:n,width:o.floating.width,height:o.floating.height}:o.reference,m=await(null==l.getOffsetParent?void 0:l.getOffsetParent(s.floating)),b=await(null==l.isElement?void 0:l.isElement(m))&&await(null==l.getScale?void 0:l.getScale(m))||{x:1,y:1},x=va(l.convertOffsetParentRelativeRectToViewportRelativeRect?await l.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:f,offsetParent:m,strategy:r}):f);return{top:(w.top-x.top+g.top)/b.y,bottom:(x.bottom-w.bottom+g.bottom)/b.y,left:(w.left-x.left+g.left)/b.x,right:(x.right-w.right+g.right)/b.x}}const ua=new Set(["left","top"]);function wa(){return"undefined"!=typeof window}function fa(e){return xa(e)?(e.nodeName||"").toLowerCase():"#document"}function ma(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function ba(e){var t;return null==(t=(xa(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function xa(e){return!!wa()&&(e instanceof Node||e instanceof ma(e).Node)}function ya(e){return!!wa()&&(e instanceof Element||e instanceof ma(e).Element)}function Za(e){return!!wa()&&(e instanceof HTMLElement||e instanceof ma(e).HTMLElement)}function Ca(e){return!(!wa()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof ma(e).ShadowRoot)}const Ma=new Set(["inline","contents"]);function _a(e){const{overflow:t,overflowX:a,overflowY:i,display:n}=Ta(e);return/auto|scroll|overlay|hidden|clip/.test(t+i+a)&&!Ma.has(n)}const Va=new Set(["table","td","th"]);function Ha(e){return Va.has(fa(e))}const ka=[":popover-open",":modal"];function $a(e){return ka.some(t=>{try{return e.matches(t)}catch(e){return!1}})}const Sa=["transform","translate","scale","rotate","perspective"],Ba=["transform","translate","scale","rotate","perspective","filter"],Aa=["paint","layout","strict","content"];function La(e){const t=Ea(),a=ya(e)?Ta(e):e;return Sa.some(e=>!!a[e]&&"none"!==a[e])||!!a.containerType&&"normal"!==a.containerType||!t&&!!a.backdropFilter&&"none"!==a.backdropFilter||!t&&!!a.filter&&"none"!==a.filter||Ba.some(e=>(a.willChange||"").includes(e))||Aa.some(e=>(a.contain||"").includes(e))}function Ea(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}const Pa=new Set(["html","body","#document"]);function Ra(e){return Pa.has(fa(e))}function Ta(e){return ma(e).getComputedStyle(e)}function Na(e){return ya(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Oa(e){if("html"===fa(e))return e;const t=e.assignedSlot||e.parentNode||Ca(e)&&e.host||ba(e);return Ca(t)?t.host:t}function za(e){const t=Oa(e);return Ra(t)?e.ownerDocument?e.ownerDocument.body:e.body:Za(t)&&_a(t)?t:za(t)}function Da(e,t,a){var i;void 0===t&&(t=[]),void 0===a&&(a=!0);const n=za(e),l=n===(null==(i=e.ownerDocument)?void 0:i.body),o=ma(n);if(l){const e=Ia(o);return t.concat(o,o.visualViewport||[],_a(n)?n:[],e&&a?Da(e):[])}return t.concat(n,Da(n,[],a))}function Ia(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Ua(e){const t=Ta(e);let a=parseFloat(t.width)||0,i=parseFloat(t.height)||0;const n=Za(e),l=n?e.offsetWidth:a,o=n?e.offsetHeight:i,s=Ut(a)!==l||Ut(i)!==o;return s&&(a=l,i=o),{width:a,height:i,$:s}}function Wa(e){return ya(e)?e:e.contextElement}function qa(e){const t=Wa(e);if(!Za(t))return qt(1);const a=t.getBoundingClientRect(),{width:i,height:n,$:l}=Ua(t);let o=(l?Ut(a.width):a.width)/i,s=(l?Ut(a.height):a.height)/n;return o&&Number.isFinite(o)||(o=1),s&&Number.isFinite(s)||(s=1),{x:o,y:s}}const ja=qt(0);function Fa(e){const t=ma(e);return Ea()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:ja}function Ka(e,t,a,i){void 0===t&&(t=!1),void 0===a&&(a=!1);const n=e.getBoundingClientRect(),l=Wa(e);let o=qt(1);t&&(i?ya(i)&&(o=qa(i)):o=qa(e));const s=function(e,t,a){return void 0===t&&(t=!1),!(!a||t&&a!==ma(e))&&t}(l,a,i)?Fa(l):qt(0);let r=(n.left+s.x)/o.x,c=(n.top+s.y)/o.y,d=n.width/o.x,h=n.height/o.y;if(l){const e=ma(l),t=i&&ya(i)?ma(i):i;let a=e,n=Ia(a);for(;n&&i&&t!==a;){const e=qa(n),t=n.getBoundingClientRect(),i=Ta(n),l=t.left+(n.clientLeft+parseFloat(i.paddingLeft))*e.x,o=t.top+(n.clientTop+parseFloat(i.paddingTop))*e.y;r*=e.x,c*=e.y,d*=e.x,h*=e.y,r+=l,c+=o,a=ma(n),n=Ia(a)}}return va({width:d,height:h,x:r,y:c})}function Xa(e,t){const a=Na(e).scrollLeft;return t?t.left+a:Ka(ba(e)).left+a}function Ja(e,t){const a=e.getBoundingClientRect();return{x:a.left+t.scrollLeft-Xa(e,a),y:a.top+t.scrollTop}}const Ya=new Set(["absolute","fixed"]);function Ga(e,t,a){let i;if("viewport"===t)i=function(e,t){const a=ma(e),i=ba(e),n=a.visualViewport;let l=i.clientWidth,o=i.clientHeight,s=0,r=0;if(n){l=n.width,o=n.height;const e=Ea();(!e||e&&"fixed"===t)&&(s=n.offsetLeft,r=n.offsetTop)}const c=Xa(i);if(c<=0){const e=i.ownerDocument,t=e.body,a=getComputedStyle(t),n="CSS1Compat"===e.compatMode&&parseFloat(a.marginLeft)+parseFloat(a.marginRight)||0,o=Math.abs(i.clientWidth-t.clientWidth-n);o<=25&&(l-=o)}else c<=25&&(l+=c);return{width:l,height:o,x:s,y:r}}(e,a);else if("document"===t)i=function(e){const t=ba(e),a=Na(e),i=e.ownerDocument.body,n=It(t.scrollWidth,t.clientWidth,i.scrollWidth,i.clientWidth),l=It(t.scrollHeight,t.clientHeight,i.scrollHeight,i.clientHeight);let o=-a.scrollLeft+Xa(e);const s=-a.scrollTop;return"rtl"===Ta(i).direction&&(o+=It(t.clientWidth,i.clientWidth)-n),{width:n,height:l,x:o,y:s}}(ba(e));else if(ya(t))i=function(e,t){const a=Ka(e,!0,"fixed"===t),i=a.top+e.clientTop,n=a.left+e.clientLeft,l=Za(e)?qa(e):qt(1);return{width:e.clientWidth*l.x,height:e.clientHeight*l.y,x:n*l.x,y:i*l.y}}(t,a);else{const a=Fa(e);i={x:t.x-a.x,y:t.y-a.y,width:t.width,height:t.height}}return va(i)}function Qa(e,t){const a=Oa(e);return!(a===t||!ya(a)||Ra(a))&&("fixed"===Ta(a).position||Qa(a,t))}function ei(e,t,a){const i=Za(t),n=ba(t),l="fixed"===a,o=Ka(e,!0,l,t);let s={scrollLeft:0,scrollTop:0};const r=qt(0);function c(){r.x=Xa(n)}if(i||!i&&!l)if(("body"!==fa(t)||_a(n))&&(s=Na(t)),i){const e=Ka(t,!0,l,t);r.x=e.x+t.clientLeft,r.y=e.y+t.clientTop}else n&&c();l&&!i&&n&&c();const d=!n||i||l?qt(0):Ja(n,s);return{x:o.left+s.scrollLeft-r.x-d.x,y:o.top+s.scrollTop-r.y-d.y,width:o.width,height:o.height}}function ti(e){return"static"===Ta(e).position}function ai(e,t){if(!Za(e)||"fixed"===Ta(e).position)return null;if(t)return t(e);let a=e.offsetParent;return ba(e)===a&&(a=a.ownerDocument.body),a}function ii(e,t){const a=ma(e);if($a(e))return a;if(!Za(e)){let t=Oa(e);for(;t&&!Ra(t);){if(ya(t)&&!ti(t))return t;t=Oa(t)}return a}let i=ai(e,t);for(;i&&Ha(i)&&ti(i);)i=ai(i,t);return i&&Ra(i)&&ti(i)&&!La(i)?a:i||function(e){let t=Oa(e);for(;Za(t)&&!Ra(t);){if(La(t))return t;if($a(t))return null;t=Oa(t)}return null}(e)||a}const ni={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:a,offsetParent:i,strategy:n}=e;const l="fixed"===n,o=ba(i),s=!!t&&$a(t.floating);if(i===o||s&&l)return a;let r={scrollLeft:0,scrollTop:0},c=qt(1);const d=qt(0),h=Za(i);if((h||!h&&!l)&&(("body"!==fa(i)||_a(o))&&(r=Na(i)),Za(i))){const e=Ka(i);c=qa(i),d.x=e.x+i.clientLeft,d.y=e.y+i.clientTop}const v=!o||h||l?qt(0):Ja(o,r);return{width:a.width*c.x,height:a.height*c.y,x:a.x*c.x-r.scrollLeft*c.x+d.x+v.x,y:a.y*c.y-r.scrollTop*c.y+d.y+v.y}},getDocumentElement:ba,getClippingRect:function(e){let{element:t,boundary:a,rootBoundary:i,strategy:n}=e;const l=[..."clippingAncestors"===a?$a(t)?[]:function(e,t){const a=t.get(e);if(a)return a;let i=Da(e,[],!1).filter(e=>ya(e)&&"body"!==fa(e)),n=null;const l="fixed"===Ta(e).position;let o=l?Oa(e):e;for(;ya(o)&&!Ra(o);){const t=Ta(o),a=La(o);a||"fixed"!==t.position||(n=null),(l?!a&&!n:!a&&"static"===t.position&&n&&Ya.has(n.position)||_a(o)&&!a&&Qa(e,o))?i=i.filter(e=>e!==o):n=t,o=Oa(o)}return t.set(e,i),i}(t,this._c):[].concat(a),i],o=l[0],s=l.reduce((e,a)=>{const i=Ga(t,a,n);return e.top=It(i.top,e.top),e.right=Dt(i.right,e.right),e.bottom=Dt(i.bottom,e.bottom),e.left=It(i.left,e.left),e},Ga(t,o,n));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}},getOffsetParent:ii,getElementRects:async function(e){const t=this.getOffsetParent||ii,a=this.getDimensions,i=await a(e.floating);return{reference:ei(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:a}=Ua(e);return{width:t,height:a}},getScale:qa,isElement:ya,isRTL:function(e){return"rtl"===Ta(e).direction}};function li(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function oi(e,t,a,i){void 0===i&&(i={});const{ancestorScroll:n=!0,ancestorResize:l=!0,elementResize:o="function"==typeof ResizeObserver,layoutShift:s="function"==typeof IntersectionObserver,animationFrame:r=!1}=i,c=Wa(e),d=n||l?[...c?Da(c):[],...Da(t)]:[];d.forEach(e=>{n&&e.addEventListener("scroll",a,{passive:!0}),l&&e.addEventListener("resize",a)});const h=c&&s?function(e,t){let a,i=null;const n=ba(e);function l(){var e;clearTimeout(a),null==(e=i)||e.disconnect(),i=null}return function o(s,r){void 0===s&&(s=!1),void 0===r&&(r=1),l();const c=e.getBoundingClientRect(),{left:d,top:h,width:v,height:p}=c;if(s||t(),!v||!p)return;const g={rootMargin:-Wt(h)+"px "+-Wt(n.clientWidth-(d+v))+"px "+-Wt(n.clientHeight-(h+p))+"px "+-Wt(d)+"px",threshold:It(0,Dt(1,r))||1};let u=!0;function w(t){const i=t[0].intersectionRatio;if(i!==r){if(!u)return o();i?o(!1,i):a=setTimeout(()=>{o(!1,1e-7)},1e3)}1!==i||li(c,e.getBoundingClientRect())||o(),u=!1}try{i=new IntersectionObserver(w,{...g,root:n.ownerDocument})}catch(e){i=new IntersectionObserver(w,g)}i.observe(e)}(!0),l}(c,a):null;let v,p=-1,g=null;o&&(g=new ResizeObserver(e=>{let[i]=e;i&&i.target===c&&g&&(g.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var e;null==(e=g)||e.observe(t)})),a()}),c&&!r&&g.observe(c),g.observe(t));let u=r?Ka(e):null;return r&&function t(){const i=Ka(e);u&&!li(u,i)&&a();u=i,v=requestAnimationFrame(t)}(),a(),()=>{var e;d.forEach(e=>{n&&e.removeEventListener("scroll",a),l&&e.removeEventListener("resize",a)}),null==h||h(),null==(e=g)||e.disconnect(),g=null,r&&cancelAnimationFrame(v)}}const si=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var a,i;const{x:n,y:l,placement:o,middlewareData:s}=t,r=await async function(e,t){const{placement:a,platform:i,elements:n}=e,l=await(null==i.isRTL?void 0:i.isRTL(n.floating)),o=Jt(a),s=Yt(a),r="y"===ta(a),c=ua.has(o)?-1:1,d=l&&r?-1:1,h=Xt(t,e);let{mainAxis:v,crossAxis:p,alignmentAxis:g}="number"==typeof h?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return s&&"number"==typeof g&&(p="end"===s?-1*g:g),r?{x:p*d,y:v*c}:{x:v*c,y:p*d}}(t,e);return o===(null==(a=s.offset)?void 0:a.placement)&&null!=(i=s.arrow)&&i.alignmentOffset?{}:{x:n+r.x,y:l+r.y,data:{...r,placement:o}}}}},ri=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:a,y:i,placement:n}=t,{mainAxis:l=!0,crossAxis:o=!1,limiter:s={fn:e=>{let{x:t,y:a}=e;return{x:t,y:a}}},...r}=Xt(e,t),c={x:a,y:i},d=await ga(t,r),h=ta(Jt(n)),v=Gt(h);let p=c[v],g=c[h];if(l){const e="y"===v?"bottom":"right";p=Kt(p+d["y"===v?"top":"left"],p,p-d[e])}if(o){const e="y"===h?"bottom":"right";g=Kt(g+d["y"===h?"top":"left"],g,g-d[e])}const u=s.fn({...t,[v]:p,[h]:g});return{...u,data:{x:u.x-a,y:u.y-i,enabled:{[v]:l,[h]:o}}}}}},ci=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var a,i;const{placement:n,middlewareData:l,rects:o,initialPlacement:s,platform:r,elements:c}=t,{mainAxis:d=!0,crossAxis:h=!0,fallbackPlacements:v,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:u=!0,...w}=Xt(e,t);if(null!=(a=l.arrow)&&a.alignmentOffset)return{};const f=Jt(n),m=ta(s),b=Jt(s)===s,x=await(null==r.isRTL?void 0:r.isRTL(c.floating)),y=v||(b||!u?[da(s)]:function(e){const t=da(e);return[na(e),t,na(t)]}(s)),Z="none"!==g;!v&&Z&&y.push(...ca(s,u,g,x));const C=[s,...y],M=await ga(t,w),_=[];let V=(null==(i=l.flip)?void 0:i.overflows)||[];if(d&&_.push(M[f]),h){const e=ia(n,o,x);_.push(M[e[0]],M[e[1]])}if(V=[...V,{placement:n,overflows:_}],!_.every(e=>e<=0)){var H,k;const e=((null==(H=l.flip)?void 0:H.index)||0)+1,t=C[e];if(t){if(!("alignment"===h&&m!==ta(t))||V.every(e=>ta(e.placement)!==m||e.overflows[0]>0))return{data:{index:e,overflows:V},reset:{placement:t}}}let a=null==(k=V.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])?void 0:k.placement;if(!a)switch(p){case"bestFit":{var $;const e=null==($=V.filter(e=>{if(Z){const t=ta(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:$[0];e&&(a=e);break}case"initialPlacement":a=s}if(n!==a)return{reset:{placement:a}}}return{}}}},di=(e,t,a)=>{const i=new Map,n={platform:ni,...a},l={...n.platform,_c:i};return(async(e,t,a)=>{const{placement:i="bottom",strategy:n="absolute",middleware:l=[],platform:o}=a,s=l.filter(Boolean),r=await(null==o.isRTL?void 0:o.isRTL(t));let c=await o.getElementRects({reference:e,floating:t,strategy:n}),{x:d,y:h}=pa(c,i,r),v=i,p={},g=0;for(let a=0;a<s.length;a++){const{name:l,fn:u}=s[a],{x:w,y:f,data:m,reset:b}=await u({x:d,y:h,initialPlacement:i,placement:v,strategy:n,middlewareData:p,rects:c,platform:o,elements:{reference:e,floating:t}});d=null!=w?w:d,h=null!=f?f:h,p={...p,[l]:{...p[l],...m}},b&&g<=50&&(g++,"object"==typeof b&&(b.placement&&(v=b.placement),b.rects&&(c=!0===b.rects?await o.getElementRects({reference:e,floating:t,strategy:n}):b.rects),({x:d,y:h}=pa(c,v,r))),a=-1)}return{x:d,y:h,placement:v,strategy:n,middlewareData:p}})(e,t,{...n,platform:l})};var hi=p`.dropdown{display:flex;height:inherit;position:relative}.dropdown-menu{max-width:var(--sgds-dimension-320)}.toggler-container{flex:1;pointer-events:none}.toggler-container ::slotted(*){pointer-events:auto}`,vi=p`:host([menuisopen]:not([disabled]):not([readonly])) .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-192);overflow-y:auto;padding:var(--sgds-padding-xs) 0;position:absolute;text-align:left;z-index:var(--sgds-z-index-floating)}.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%}`,pi=p`:host([expand=always]) .nav-link{border-bottom:var(--sgds-border-width-4) solid transparent;min-height:100%;padding:0 var(--sgds-padding-md)}@media (min-width:512px){:host([expand=sm]) .nav-link{border-bottom:var(--sgds-border-width-4) solid transparent;min-height:100%;padding:0 var(--sgds-padding-md)}}@media (min-width:768px){:host([expand=md]) .nav-link{border-bottom:var(--sgds-border-width-4) solid transparent;min-height:100%;padding:0 var(--sgds-padding-md)}}@media (min-width:1024px){:host(:not([expand])) .nav-link,:host([expand=lg]) .nav-link{border-bottom:var(--sgds-border-width-4) solid transparent;min-height:100%;padding:0 var(--sgds-padding-md)}}@media (min-width:1280px){:host([expand=xl]) .nav-link{border-bottom:var(--sgds-border-width-4) solid transparent;min-height:100%;padding:0 var(--sgds-padding-md)}}@media (min-width:1440px){:host([expand=xxl]) .nav-link{border-bottom:var(--sgds-border-width-4) solid transparent;min-height:100%;padding:0 var(--sgds-padding-md)}}.nav-link{align-items:center;box-sizing:border-box;cursor:pointer;display:flex;gap:var(--sgds-gap-xs);padding:var(--sgds-padding-sm) var(--sgds-mainnav-mobile-padding-x);text-decoration:none}.nav-link.show,.nav-link:not(.disabled).active{border-color:var(--sgds-primary-border-color-default);color:var(--sgds-primary-color-default)}.nav-link:not(.disabled):hover{color:var(--sgds-primary-color-default)}.nav-link:not(.disabled):focus-visible{color:var(--sgds-primary-color-default);outline:var(--sgds-outline-focus);outline-offset:var(--sgds-outline-offset-focus)}.nav-link.disabled{cursor:not-allowed;opacity:var(--sgds-opacity-50)}.dropdown-items{background-color:var(--sgds-surface-default);height:100%;left:100%;overflow-y:auto;padding:var(--sgds-padding-md) 0;position:absolute;top:0;width:100%}.dropdown-items a{align-items:center;color:var(--sgds-color-default);cursor:pointer;display:flex;gap:var(--sgds-gap-xs);margin:auto;max-width:var(--sgds-mainnav-max-width,1440px);padding:var(--sgds-padding-sm) var(--sgds-mainnav-mobile-padding-x);text-decoration:none}.dropdown-items a:hover{color:var(--sgds-primary-color-default)}.dropdown-items a:focus-visible{color:var(--sgds-primary-color-default);outline:var(--sgds-outline-focus);outline-offset:var(--sgds-outline-offset-focus);outline-offset:-5px}slot[name=toggler]::slotted(*){flex:1}sgds-dropdown{display:block;height:100%}@media screen and (min-width:1024px){.dropdown-items a,.nav-link{padding:var(--sgds-padding-sm) var(--sgds-mainnav-padding-x)}}`
|
|
2390
2390
|
/**
|
|
2391
2391
|
* @license
|
|
2392
2392
|
* Copyright 2020 Google LLC
|
|
@@ -2401,15 +2401,9 @@ let Se;$e?.({LitElement:He}),(_e.litElementVersions??=[]).push("4.2.2"),_e.litEl
|
|
|
2401
2401
|
* @license
|
|
2402
2402
|
* Copyright 2020 Google LLC
|
|
2403
2403
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
2404
|
-
*/const yi=()=>new Zi;class Zi{}const Ci=new WeakMap;const Mi=De(class extends xi{render(e){return ce}update(e,[t]){const a=t!==this._ref;return a&&void 0!==this._ref&&this._updateRefValue(void 0),(a||this._lastElementForRef!==this._element)&&(this._ref=t,this._context=e.options?.host,this._updateRefValue(this._element=e.element)),ce}_updateRefValue(e){if(this.isConnected||(e=void 0),"function"==typeof this._ref){const t=this._context??globalThis;let a=Ci.get(t);void 0===a&&(a=new WeakMap,Ci.set(t,a)),void 0!==a.get(this._ref)&&this._ref.call(this._context,void 0),a.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?Ci.get(this._context??globalThis)?.get(this._ref):this._ref?.value}disconnected(){this._lastElementForRef===this._element&&this._updateRefValue(void 0)}reconnected(){this._updateRefValue(this._element)}});class _i extends qe{constructor(){super(...arguments),this.myDropdown=yi(),this.dropdownMenuId=tt("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=yi(),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&&requestAnimationFrame(async()=>{await this.updateFloatingPosition(),this._startAutoUpdate()})}async showMenu(){this.disabled||this.menuIsOpen||(this.menuIsOpen=!0,this.emit("sgds-show"),await this.updateFloatingPosition(),this.emit("sgds-after-show"),this._startAutoUpdate())}_startAutoUpdate(){this.myDropdown.value&&this.menuRef.value&&(this._cleanupAutoUpdate=oi(this.myDropdown.value,this.menuRef.value,()=>this.updateFloatingPosition()))}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()}_handleKeyboardMenuEvent(e){if(!this.readonly)switch(e.key){case"ArrowDown":case"ArrowUp":e.preventDefault(),this.menuIsOpen||this.showMenu();break;case"Escape":this.hideMenu()}}mergeMiddleware(e,t){const a=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)},i=t.map(a),n=e.map(e=>{const n=a(e),l=i.indexOf(n);return-1!==l?t[l]:e}).concat(t.filter(t=>!e.some(e=>a(e)===a(t))));return n}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=[si(8),this.noFlip?void 0:ci(),ri()].filter(Boolean);let a=t;Array.isArray(this.floatingOpts.middleware)&&this.floatingOpts.middleware.length>0&&(a=this.mergeMiddleware(t,this.floatingOpts.middleware.filter(Boolean)));const i=Object.assign(Object.assign({strategy:"fixed",placement:e},this.floatingOpts),{middleware:a}),{x:n,y:l,strategy:o,placement:s}=await di(this.myDropdown.value,this.menuRef.value,i);this.menuRef.value.setAttribute("data-placement",s),Object.assign(this.menuRef.value.style,{position:o,left:`${n}px`,top:`${l}px`})}}e([Le({type:Boolean,state:!0})],_i.prototype,"noFlip",void 0),e([Le({type:Boolean,reflect:!0,state:!0})],_i.prototype,"menuAlignRight",void 0),e([Le({type:String,reflect:!0,state:!0})],_i.prototype,"drop",void 0),e([Le({type:Object})],_i.prototype,"floatingOpts",void 0),e([Le({type:Boolean,reflect:!0})],_i.prototype,"menuIsOpen",void 0),e([Le({type:Boolean,reflect:!0})],_i.prototype,"disabled",void 0),e([Le({type:Boolean,reflect:!0})],_i.prototype,"readonly",void 0);class Vi extends _i{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(),a=t.indexOf(e.target);this.nextDropdownItemNo=a+1,this.prevDropdownItemNo=a<=0?t.length-1:a-1;const i=e.target;i.disabled||(this.emit("sgds-select",{detail:{item:i}}),"outside"!==this.close&&this.hideMenu())}_resetMenu(){this.nextDropdownItemNo=0,this.prevDropdownItemNo=-1;this._getMenuItems().forEach(e=>{var t;const a=null===(t=null==e?void 0:e.shadowRoot)||void 0===t?void 0:t.querySelector(".dropdown-item");a&&a.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 a=(e%t.length+t.length)%t.length,i=t[a];this.emit("i-sgds-option-focus",{detail:{option:i}}),this.nextDropdownItemNo=(a+1)%t.length,this.prevDropdownItemNo=(a-1+t.length)%t.length,t.forEach(e=>{const t=e.shadowRoot.querySelector(".dropdown-item");t.setAttribute("tabindex",e===i?"0":"-1"),e===i&&t.focus()})}}Vi.styles=_i.styles,e([
|
|
2405
|
-
<div class="dropdown">
|
|
2406
|
-
<div
|
|
2407
|
-
class="toggler-container"
|
|
2408
|
-
${Mi(this.myDropdown)}
|
|
2409
|
-
@click=${this._handleClick}
|
|
2410
|
-
aria-expanded="${this.menuIsOpen}"
|
|
2411
|
-
aria-haspopup="menu"
|
|
2412
|
-
>
|
|
2404
|
+
*/const yi=()=>new Zi;class Zi{}const Ci=new WeakMap;const Mi=De(class extends xi{render(e){return ce}update(e,[t]){const a=t!==this._ref;return a&&void 0!==this._ref&&this._updateRefValue(void 0),(a||this._lastElementForRef!==this._element)&&(this._ref=t,this._context=e.options?.host,this._updateRefValue(this._element=e.element)),ce}_updateRefValue(e){if(this.isConnected||(e=void 0),"function"==typeof this._ref){const t=this._context??globalThis;let a=Ci.get(t);void 0===a&&(a=new WeakMap,Ci.set(t,a)),void 0!==a.get(this._ref)&&this._ref.call(this._context,void 0),a.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?Ci.get(this._context??globalThis)?.get(this._ref):this._ref?.value}disconnected(){this._lastElementForRef===this._element&&this._updateRefValue(void 0)}reconnected(){this._updateRefValue(this._element)}});class _i extends qe{constructor(){super(...arguments),this.myDropdown=yi(),this.dropdownMenuId=tt("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=yi(),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&&requestAnimationFrame(async()=>{await this.updateFloatingPosition(),this._startAutoUpdate()})}async showMenu(){this.disabled||this.menuIsOpen||(this.menuIsOpen=!0,this.emit("sgds-show"),await this.updateFloatingPosition(),this.emit("sgds-after-show"),this._startAutoUpdate())}_startAutoUpdate(){this.myDropdown.value&&this.menuRef.value&&(this._cleanupAutoUpdate=oi(this.myDropdown.value,this.menuRef.value,()=>this.updateFloatingPosition()))}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()}_handleKeyboardMenuEvent(e){if(!this.readonly)switch(e.key){case"ArrowDown":case"ArrowUp":e.preventDefault(),this.menuIsOpen||this.showMenu();break;case"Escape":this.hideMenu()}}mergeMiddleware(e,t){const a=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)},i=t.map(a),n=e.map(e=>{const n=a(e),l=i.indexOf(n);return-1!==l?t[l]:e}).concat(t.filter(t=>!e.some(e=>a(e)===a(t))));return n}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=[si(8),this.noFlip?void 0:ci(),ri()].filter(Boolean);let a=t;Array.isArray(this.floatingOpts.middleware)&&this.floatingOpts.middleware.length>0&&(a=this.mergeMiddleware(t,this.floatingOpts.middleware.filter(Boolean)));const i=Object.assign(Object.assign({strategy:"fixed",placement:e},this.floatingOpts),{middleware:a}),{x:n,y:l,strategy:o,placement:s}=await di(this.myDropdown.value,this.menuRef.value,i);this.menuRef.value.setAttribute("data-placement",s),Object.assign(this.menuRef.value.style,{position:o,left:`${n}px`,top:`${l}px`})}}e([Le({type:Boolean,state:!0})],_i.prototype,"noFlip",void 0),e([Le({type:Boolean,reflect:!0,state:!0})],_i.prototype,"menuAlignRight",void 0),e([Le({type:String,reflect:!0,state:!0})],_i.prototype,"drop",void 0),e([Le({type:Object})],_i.prototype,"floatingOpts",void 0),e([Le({type:Boolean,reflect:!0})],_i.prototype,"menuIsOpen",void 0),e([Le({type:Boolean,reflect:!0})],_i.prototype,"disabled",void 0),e([Le({type:Boolean,reflect:!0})],_i.prototype,"readonly",void 0);class Vi extends _i{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(),a=t.indexOf(e.target);this.nextDropdownItemNo=a+1,this.prevDropdownItemNo=a<=0?t.length-1:a-1;const i=e.target;i.disabled||(this.emit("sgds-select",{detail:{item:i}}),"outside"!==this.close&&this.hideMenu())}_resetMenu(){this.nextDropdownItemNo=0,this.prevDropdownItemNo=-1;this._getMenuItems().forEach(e=>{var t;const a=null===(t=null==e?void 0:e.shadowRoot)||void 0===t?void 0:t.querySelector(".dropdown-item");a&&a.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 a=(e%t.length+t.length)%t.length,i=t[a];this.emit("i-sgds-option-focus",{detail:{option:i}}),this.nextDropdownItemNo=(a+1)%t.length,this.prevDropdownItemNo=(a-1+t.length)%t.length,t.forEach(e=>{const t=e.shadowRoot.querySelector(".dropdown-item");t.setAttribute("tabindex",e===i?"0":"-1"),e===i&&t.focus()})}}Vi.styles=_i.styles,e([Te("ul.dropdown-menu")],Vi.prototype,"menu",void 0),e([Ee()],Vi.prototype,"nextDropdownItemNo",void 0),e([Ee()],Vi.prototype,"prevDropdownItemNo",void 0),e([Le({type:Boolean,reflect:!0})],Vi.prototype,"hidden",void 0);class Hi extends Vi{constructor(){super(),this.noFlip=!1,this.menuAlignRight=!1,this.drop="down",this.menuRef=Mi()}async _handleClick(e){if(this.disabled)return;const t=this._toggler[0];if(!t)return void this.toggleMenu();if(e.composedPath().includes(t))return void this.toggleMenu();if(!this.menuIsOpen)return;const a=this.menuRef.value;a&&e.composedPath().includes(a)||this.hideMenu()}_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.updateFloatingPosition(),this._handleDisabled()}_handleDisabled(){const e=this._toggler[0];e&&(this.disabled?e.setAttribute("disabled","true"):e.hasAttribute("disabled")&&e.removeAttribute("disabled"))}render(){return oe`
|
|
2405
|
+
<div class="dropdown" @click=${this._handleClick}>
|
|
2406
|
+
<div class="toggler-container" ${Mi(this.myDropdown)} aria-expanded="${this.menuIsOpen}" aria-haspopup="menu">
|
|
2413
2407
|
<slot name="toggler"></slot>
|
|
2414
2408
|
</div>
|
|
2415
2409
|
<div class="dropdown-menu" role="menu" ${Mi(this.menuRef)}>
|
|
@@ -2458,5 +2452,5 @@ let Se;$e?.({LitElement:He}),(_e.litElementVersions??=[]).push("4.2.2"),_e.litEl
|
|
|
2458
2452
|
<sgds-icon name="chevron-down"></sgds-icon>
|
|
2459
2453
|
</a>
|
|
2460
2454
|
<slot @slotchange=${this._handleDesktopSlotChange}></slot>
|
|
2461
|
-
</sgds-dropdown>`;return this._breakpointReached?e:t}}Bi.styles=[...qe.styles,hi,vi,pi],Bi.dependencies={"sgds-dropdown":Hi,"sgds-dropdown-item":$i,"sgds-icon":$t},e([s({context:Pt,subscribe:!0}),Ee()],Bi.prototype,"_breakpointReached",void 0),e([s({context:
|
|
2455
|
+
</sgds-dropdown>`;return this._breakpointReached?e:t}}Bi.styles=[...qe.styles,hi,vi,pi],Bi.dependencies={"sgds-dropdown":Hi,"sgds-dropdown-item":$i,"sgds-icon":$t},e([s({context:Pt,subscribe:!0}),Ee()],Bi.prototype,"_breakpointReached",void 0),e([s({context:Rt,subscribe:!0}),Ee()],Bi.prototype,"expanded",void 0),e([Te(".nav-link")],Bi.prototype,"navLink",void 0),e([Te(".dropdown-items")],Bi.prototype,"dropdownItems",void 0),e([Te(".dropdown-items a")],Bi.prototype,"menuHeaderButton",void 0),e([Te(".dropdown-items span")],Bi.prototype,"menuHeaderText",void 0),e([Le({type:Boolean})],Bi.prototype,"active",void 0),e([Le({type:Boolean,reflect:!0})],Bi.prototype,"disabled",void 0),e([Ne({slot:"toggler"})],Bi.prototype,"togglerNodes",void 0),e([Ne()],Bi.prototype,"defaultNodes",void 0);var Ai=p`:host([expand=always]) ::slotted(*){border-bottom:var(--sgds-border-width-4) solid transparent;min-height:100%;padding:0 var(--sgds-padding-md)}@media screen and (min-width:512px){:host([expand=sm]) ::slotted(*){border-bottom:var(--sgds-border-width-4) solid transparent;min-height:100%;padding:0 var(--sgds-padding-md)}:host(:not([disabled])[active][expand=sm]) ::slotted(*){border-color:var(--sgds-primary-border-color-default)}}@media screen and (min-width:768px){:host([expand=md]) ::slotted(*){border-bottom:var(--sgds-border-width-4) solid transparent;min-height:100%;padding:0 var(--sgds-padding-md)}:host(:not([disabled])[active][expand=md]) ::slotted(*){border-color:var(--sgds-primary-border-color-default)}}@media screen and (min-width:1024px){:host([expand=lg]) ::slotted(*){border-bottom:var(--sgds-border-width-4) solid transparent;min-height:100%;padding:0 var(--sgds-padding-md)}:host(:not([disabled])[active][expand=lg]) ::slotted(*){border-color:var(--sgds-primary-border-color-default)}}@media screen and (min-width:1280px){:host([expand=xl]) ::slotted(*){border-bottom:var(--sgds-border-width-4) solid transparent;min-height:100%;padding:0 var(--sgds-padding-md)}:host(:not([disabled])[active][expand=xl]) ::slotted(*){border-color:var(--sgds-primary-border-color-default)}}@media screen and (min-width:1440px){:host([expand=xxl]) ::slotted(*){border-bottom:var(--sgds-border-width-4) solid transparent;min-height:100%;padding:0 var(--sgds-padding-md)}:host(:not([disabled])[active][expand=xxl]) ::slotted(*){border-color:var(--sgds-primary-border-color-default)}}@media screen and (max-width:511px){:host(:not([disabled])[active][expand=sm]) ::slotted(*){background-color:var(--sgds-bg-translucent-subtle)}}@media screen and (max-width:767px){:host(:not([disabled])[active][expand=md]) ::slotted(*){background-color:var(--sgds-bg-translucent-subtle)}}@media screen and (max-width:1023px){:host(:not([disabled])[active][expand=lg]) ::slotted(*){background-color:var(--sgds-bg-translucent-subtle)}}@media screen and (max-width:1279px){:host(:not([disabled])[active][expand=xl]) ::slotted(*){background-color:var(--sgds-bg-translucent-subtle)}}@media screen and (max-width:1439px){:host(:not([disabled])[active][expand=xxl]) ::slotted(*){background-color:var(--sgds-bg-translucent-subtle)}}::slotted(*){--sgds-link-color-default:var(--sgds-color-default);align-items:center;box-sizing:border-box;color:var(--sgds-link-color-default,var(--sgds-color-default));cursor:pointer;display:flex;height:auto!important;padding:var(--sgds-padding-sm) var(--sgds-mainnav-mobile-padding-x);text-decoration:none!important;text-decoration:none}@media screen and (min-width:1024px){::slotted(*){padding:var(--sgds-padding-sm) var(--sgds-mainnav-padding-x)}}:host(:not([disabled])[active]) ::slotted(*){--sgds-link-color-default:var(--sgds-primary-color-default);color:var(--sgds-link-color-default,var(--sgds-primary-color-default))}:host([disabled]) ::slotted(a:hover){--sgds-link-color-emphasis:var(--sgds-color-default);color:var(--sgds-link-color-emphasis,var(--sgds-color-default))}:host(:not([disabled])) ::slotted(a:hover){--sgds-link-color-emphasis:var(--sgds-primary-color-default);color:var(--sgds-link-color-emphasis,var(--sgds-primary-color-default))}::slotted(a:focus-visible){--sgds-link-color-emphasis:var(--sgds-primary-color-default);color:var(--sgds-link-color-emphasis,var(--sgds-primary-color-default));outline:var(--sgds-outline-focus);outline-offset:var(--sgds-outline-offset-focus)}:host([disabled]) ::slotted(*){cursor:not-allowed;opacity:var(--sgds-opacity-50)}`;class Li extends qe{constructor(){super(...arguments),this.active=!1,this.disabled=!1}_handleDisabled(){this.setAttribute("aria-disabled",`${this.disabled}`)}_handleSlotChange(e){const t=e.target,a=t.assignedElements({flatten:!0}).filter(e=>"a"===e.tagName.toLowerCase()||"sgds-link"===e.tagName.toLowerCase());if(a.length>1)console.error("More than one anchor tag is added to sgds-mainnav-item");else{if(0===a.length){t.assignedNodes({flatten:!0}).forEach(e=>{if(e.nodeType===Node.TEXT_NODE){const t=document.createElement("a");t.textContent=e.textContent,e.parentNode.replaceChild(t,e)}})}if(1===a.length){const e=a[0];if(this.active&&e.setAttribute("aria-current","true"),this.disabled)return e.setAttribute("href","javascript:void(0)"),void e.setAttribute("tabindex","-1");e.addEventListener("click",e=>{e.target.closest("sgds-mainnav").hide()})}}}render(){return oe`<slot @slotchange=${this._handleSlotChange}></slot>`}}function Ei(e,t){customElements.get(e)||customElements.define(e,t)}Li.styles=[...qe.styles,Ai],e([Le({type:Boolean,reflect:!0})],Li.prototype,"active",void 0),e([Le({type:Boolean,reflect:!0})],Li.prototype,"disabled",void 0),e([at("disabled")],Li.prototype,"_handleDisabled",null),Ei("sgds-mainnav",zt),Ei("sgds-mainnav-dropdown",Bi),Ei("sgds-mainnav-item",Li)});
|
|
2462
2456
|
//# sourceMappingURL=index.umd.min.js.map
|