diff --git a/.changeset/strong-toys-behave.md b/.changeset/strong-toys-behave.md
new file mode 100644
index 000000000..e680214a7
--- /dev/null
+++ b/.changeset/strong-toys-behave.md
@@ -0,0 +1,5 @@
+---
+"@ebay/skin": minor
+---
+
+refactor(progress-bar-expressive): rename expressive-loader to progress-bar-expressive
diff --git a/dist/expressive-loader/expressive-loader.css b/dist/expressive-loader/expressive-loader.css
deleted file mode 100644
index 76eefa225..000000000
--- a/dist/expressive-loader/expressive-loader.css
+++ /dev/null
@@ -1,275 +0,0 @@
-:root {
- --expressive-loader-color-1: #e53238;
- --expressive-loader-color-2: #0064d2;
- --expressive-loader-color-3: #f5af02;
- --expressive-loader-color-4: #86b817;
- --expressive-loader-line-border-radius: 2px;
- --expressive-loader-line-count: 12;
- --expressive-loader-line-gap: var(--spacing-50);
- --expressive-loader-line-height: 6px;
- --expressive-loader-line-scale-duration: 3s;
- --expressive-loader-line-scroll-duration: 20s;
- /* Each line has a final width of 10% - 40% of the lines container.
- In each set of four lines, the widths add up to 100%.
- These widths are defined in CSS variables so they can more
- easily be randomized in Javascript, if desired. */
- --expressive-loader-line-width-a1: 25%;
- --expressive-loader-line-width-a2: 15%;
- --expressive-loader-line-width-a3: 40%;
- --expressive-loader-line-width-a4: 20%;
- --expressive-loader-line-width-b1: 17%;
- --expressive-loader-line-width-b2: 21%;
- --expressive-loader-line-width-b3: 30%;
- --expressive-loader-line-width-b4: 32%;
- --expressive-loader-line-width-c1: 39%;
- --expressive-loader-line-width-c2: 29%;
- --expressive-loader-line-width-c3: 20%;
- --expressive-loader-line-width-c4: 12%;
- --expressive-loader-message-animatein-duration: 833ms;
- --expressive-loader-message-animateout-duration: 400ms;
-}
-@media (prefers-color-scheme: dark) {
- :root {
- --expressive-loader-color-1: #f0343b;
- --expressive-loader-color-2: #0078fc;
- --expressive-loader-color-3: #e8a502;
- --expressive-loader-color-4: #86b817;
- }
-}
-.expressive-loader {
- align-items: stretch;
- display: grid;
- grid-template-columns: 1fr;
- justify-content: end;
- margin: 0 auto;
- max-width: 375px;
- row-gap: var(--spacing-300);
- width: 100%;
-}
-.expressive-loader--loaded {
- display: none;
-}
-.expressive-loader__messages {
- color: var(--color-foreground-primary);
- font-size: var(--font-size-large-1);
- font-weight: var(--font-weight-regular);
- line-height: calc(var(--spacing-50) + var(--spacing-300));
- margin: 0 var(--spacing-200);
- min-height: 3rem;
- position: relative;
- text-align: center;
-}
-.expressive-loader__messages--medium {
- font-size: var(--font-size-medium);
- font-weight: var(--font-weight-bold);
- line-height: var(--spacing-300);
-}
-.expressive-loader__message {
- bottom: 0;
- left: 0;
- position: absolute;
- right: 0;
-}
-.expressive-loader__message[role="status"] {
- opacity: 1;
-}
-.expressive-loader__message[aria-hidden="true"] {
- opacity: 0;
-}
-.expressive-loader__message--in {
- animation: expressive-loader-message-animatein var(--expressive-loader-message-animatein-duration) cubic-bezier(0.3, 0, 0, 1) both;
-}
-.expressive-loader__message--out {
- animation: expressive-loader-message-animateout var(--expressive-loader-message-animateout-duration) cubic-bezier(0.3, 0, 0, 1) both;
-}
-.expressive-loader__progress[role="progressbar"] {
- border-radius: var(--expressive-loader-line-border-radius);
- margin: 0 var(--spacing-200);
- overflow: hidden;
-}
-.expressive-loader__lines {
- display: flex;
- overflow: visible;
- width: calc(100% - (3 * var(--expressive-loader-line-gap)));
-}
-.expressive-loader__line {
- /* Default animation behavior: Lines scroll and resize.
- Animate line's width from 0% to its pre-defined width.
- Simultaneously cycle the line's order in its flex container
- to push its siblings forward and achieve an infinite loop.
-
- Note that Safari < 14 does not support flex order animations.
- In these browsers, the lines do not appear to infinitely
- scroll. Instead, they scale up, reset their size, and repeat. */
- animation: expressive-loader-line-reorder var(--expressive-loader-line-scale-duration) steps(var(--expressive-loader-line-count)) infinite, expressive-loader-line-scale-width var(--expressive-loader-line-scale-duration) infinite;
- border-radius: var(--expressive-loader-line-border-radius);
- display: inline-block;
- flex-shrink: 0;
- height: var(--expressive-loader-line-height);
- line-height: 0;
- order: 1;
-}
-.expressive-loader__line:nth-child(4n + 1) {
- background-color: var(--expressive-loader-color-4);
-}
-.expressive-loader__line:nth-child(4n + 2) {
- background-color: var(--expressive-loader-color-3);
-}
-.expressive-loader__line:nth-child(4n + 3) {
- background-color: var(--expressive-loader-color-2);
-}
-.expressive-loader__line:nth-child(4n + 4) {
- background-color: var(--expressive-loader-color-1);
-}
-.expressive-loader__line:nth-child(1) {
- animation-delay: calc(-1 * (var(--expressive-loader-line-scale-duration) - var(--expressive-loader-line-scale-duration) / var(--expressive-loader-line-count)));
- width: var(--expressive-loader-line-width-a1);
-}
-.expressive-loader__line:nth-child(2) {
- animation-delay: calc(-1 * (var(--expressive-loader-line-scale-duration) - ((var(--expressive-loader-line-scale-duration) / var(--expressive-loader-line-count)) * 2)));
- width: var(--expressive-loader-line-width-a2);
-}
-.expressive-loader__line:nth-child(3) {
- animation-delay: calc(-1 * (var(--expressive-loader-line-scale-duration) - ((var(--expressive-loader-line-scale-duration) / var(--expressive-loader-line-count)) * 3)));
- width: var(--expressive-loader-line-width-a3);
-}
-.expressive-loader__line:nth-child(4) {
- animation-delay: calc(-1 * (var(--expressive-loader-line-scale-duration) - ((var(--expressive-loader-line-scale-duration) / var(--expressive-loader-line-count)) * 4)));
- width: var(--expressive-loader-line-width-a4);
-}
-.expressive-loader__line:nth-child(5) {
- animation-delay: calc(-1 * (var(--expressive-loader-line-scale-duration) - ((var(--expressive-loader-line-scale-duration) / var(--expressive-loader-line-count)) * 5)));
- width: var(--expressive-loader-line-width-b1);
-}
-.expressive-loader__line:nth-child(6) {
- animation-delay: calc(-1 * (var(--expressive-loader-line-scale-duration) - ((var(--expressive-loader-line-scale-duration) / var(--expressive-loader-line-count)) * 6)));
- width: var(--expressive-loader-line-width-b2);
-}
-.expressive-loader__line:nth-child(7) {
- animation-delay: calc(-1 * (var(--expressive-loader-line-scale-duration) - ((var(--expressive-loader-line-scale-duration) / var(--expressive-loader-line-count)) * 7)));
- width: var(--expressive-loader-line-width-b3);
-}
-.expressive-loader__line:nth-child(8) {
- animation-delay: calc(-1 * (var(--expressive-loader-line-scale-duration) - ((var(--expressive-loader-line-scale-duration) / var(--expressive-loader-line-count)) * 8)));
- width: var(--expressive-loader-line-width-b4);
-}
-.expressive-loader__line:nth-child(9) {
- animation-delay: calc(-1 * (var(--expressive-loader-line-scale-duration) - ((var(--expressive-loader-line-scale-duration) / var(--expressive-loader-line-count)) * 9)));
- width: var(--expressive-loader-line-width-c1);
-}
-.expressive-loader__line:nth-child(10) {
- animation-delay: calc(-1 * (var(--expressive-loader-line-scale-duration) - ((var(--expressive-loader-line-scale-duration) / var(--expressive-loader-line-count)) * 10)));
- width: var(--expressive-loader-line-width-c2);
-}
-.expressive-loader__line:nth-child(11) {
- animation-delay: calc(-1 * (var(--expressive-loader-line-scale-duration) - ((var(--expressive-loader-line-scale-duration) / var(--expressive-loader-line-count)) * 11)));
- width: var(--expressive-loader-line-width-c3);
-}
-.expressive-loader__line:nth-child(12) {
- animation-delay: calc(-1 * (var(--expressive-loader-line-scale-duration) - ((var(--expressive-loader-line-scale-duration) / var(--expressive-loader-line-count)) * 12)));
- width: var(--expressive-loader-line-width-c4);
-}
-/* With reduced motion, there are no animated transitions
- between messages and the lines scroll but do not resize. */
-@media (prefers-reduced-motion) {
- .expressive-loader__message--in,
- .expressive-loader__message--out {
- animation: none;
- }
- .expressive-loader__message[aria-hidden="true"] {
- display: none;
- }
- .expressive-loader__messages:not(.expressive-loader__messages--medium) .expressive-loader__message--initial[role="status"] {
- animation: expressive-loader-message-fadein var(--expressive-loader-message-animatein-duration) cubic-bezier(0.3, 0, 0, 1) both;
- }
- .expressive-loader__lines {
- animation: expressive-loader-reduced-motion-line-scroll var(--expressive-loader-line-scroll-duration) linear infinite;
- overflow: visible;
- }
- .expressive-loader__line {
- animation: none;
- animation-delay: none;
- margin-right: var(--expressive-loader-line-gap);
- }
- .expressive-loader__line:nth-child(4n + 1) {
- background-color: var(--expressive-loader-color-1);
- }
- .expressive-loader__line:nth-child(4n + 2) {
- background-color: var(--expressive-loader-color-2);
- }
- .expressive-loader__line:nth-child(4n + 3) {
- background-color: var(--expressive-loader-color-3);
- }
- .expressive-loader__line:nth-child(4n + 4) {
- background-color: var(--expressive-loader-color-4);
- }
- .expressive-loader__line:nth-child(9) {
- width: var(--expressive-loader-line-width-a1);
- }
- .expressive-loader__line:nth-child(10) {
- width: var(--expressive-loader-line-width-a2);
- }
- .expressive-loader__line:nth-child(11) {
- width: var(--expressive-loader-line-width-a3);
- }
- .expressive-loader__line:nth-child(12) {
- width: var(--expressive-loader-line-width-a4);
- }
-}
-@keyframes expressive-loader-message-animateout {
- 0% {
- opacity: 1;
- transform: translateY(0);
- }
- 100% {
- opacity: 0;
- transform: translateY(calc(var(--font-size-24) * -1));
- }
-}
-@keyframes expressive-loader-message-animatein {
- 0% {
- opacity: 0;
- transform: translateY(var(--font-size-24));
- }
- 100% {
- opacity: 1;
- transform: translateY(0);
- }
-}
-@keyframes expressive-loader-message-fadein {
- 0% {
- opacity: 0;
- }
- 100% {
- opacity: 1;
- }
-}
-@keyframes expressive-loader-line-reorder {
- 0% {
- order: 0;
- }
- 100% {
- order: var(--expressive-loader-line-count);
- }
-}
-@keyframes expressive-loader-line-scale-width {
- 0% {
- margin-right: 0;
- width: 0;
- }
- 12.5% {
- margin-right: var(--expressive-loader-line-gap);
- }
- 50%,
- 100% {
- margin-right: var(--expressive-loader-line-gap);
- }
-}
-@keyframes expressive-loader-reduced-motion-line-scroll {
- 0% {
- transform: translateX(calc(-200% - 8 * var(--expressive-loader-line-gap)));
- }
- 100% {
- transform: translateX(0);
- }
-}
diff --git a/dist/progress-bar-expressive/progress-bar-expressive.css b/dist/progress-bar-expressive/progress-bar-expressive.css
new file mode 100644
index 000000000..0c910f186
--- /dev/null
+++ b/dist/progress-bar-expressive/progress-bar-expressive.css
@@ -0,0 +1,277 @@
+:root {
+ --progress-bar-expressive-color-1: #e53238;
+ --progress-bar-expressive-color-2: #0064d2;
+ --progress-bar-expressive-color-3: #f5af02;
+ --progress-bar-expressive-color-4: #86b817;
+ --progress-bar-expressive-line-border-radius: 2px;
+ --progress-bar-expressive-line-count: 12;
+ --progress-bar-expressive-line-gap: var(--spacing-50);
+ --progress-bar-expressive-line-height: 6px;
+ --progress-bar-expressive-line-scale-duration: 3s;
+ --progress-bar-expressive-line-scroll-duration: 20s;
+ /* Each line has a final width of 10% - 40% of the lines container.
+ In each set of four lines, the widths add up to 100%.
+ These widths are defined in CSS variables so they can more
+ easily be randomized in Javascript, if desired. */
+ --progress-bar-expressive-line-width-a1: 25%;
+ --progress-bar-expressive-line-width-a2: 15%;
+ --progress-bar-expressive-line-width-a3: 40%;
+ --progress-bar-expressive-line-width-a4: 20%;
+ --progress-bar-expressive-line-width-b1: 17%;
+ --progress-bar-expressive-line-width-b2: 21%;
+ --progress-bar-expressive-line-width-b3: 30%;
+ --progress-bar-expressive-line-width-b4: 32%;
+ --progress-bar-expressive-line-width-c1: 39%;
+ --progress-bar-expressive-line-width-c2: 29%;
+ --progress-bar-expressive-line-width-c3: 20%;
+ --progress-bar-expressive-line-width-c4: 12%;
+ --progress-bar-expressive-message-animatein-duration: 833ms;
+ --progress-bar-expressive-message-animateout-duration: 400ms;
+}
+@media (prefers-color-scheme: dark) {
+ :root {
+ --progress-bar-expressive-color-1: #f0343b;
+ --progress-bar-expressive-color-2: #0078fc;
+ --progress-bar-expressive-color-3: #e8a502;
+ --progress-bar-expressive-color-4: #86b817;
+ }
+}
+.progress-bar-expressive {
+ align-items: stretch;
+ display: grid;
+ grid-template-columns: 1fr;
+ justify-content: end;
+ margin: 0 auto;
+ max-width: 375px;
+ row-gap: var(--spacing-300);
+ width: 100%;
+}
+.progress-bar-expressive--loaded {
+ display: none;
+}
+.progress-bar-expressive__messages {
+ color: var(--color-foreground-primary);
+ font-size: var(--font-size-large-1);
+ font-weight: var(--font-weight-regular);
+ line-height: calc(var(--spacing-50) + var(--spacing-300));
+ margin: 0 var(--spacing-200);
+ min-height: 3rem;
+ position: relative;
+ text-align: center;
+}
+.progress-bar-expressive__messages--medium {
+ font-size: var(--font-size-medium);
+ font-weight: var(--font-weight-bold);
+ line-height: var(--spacing-300);
+}
+.progress-bar-expressive__message {
+ bottom: 0;
+ left: 0;
+ position: absolute;
+ right: 0;
+}
+.progress-bar-expressive__message[role="status"] {
+ opacity: 1;
+}
+.progress-bar-expressive__message[aria-hidden="true"] {
+ opacity: 0;
+}
+.progress-bar-expressive__message--in {
+ animation: progress-bar-expressive-message-animatein var(--progress-bar-expressive-message-animatein-duration) cubic-bezier(0.3, 0, 0, 1) both;
+}
+.progress-bar-expressive__message--out {
+ animation: progress-bar-expressive-message-animateout var(--progress-bar-expressive-message-animateout-duration) cubic-bezier(0.3, 0, 0, 1) both;
+}
+.progress-bar-expressive__progress[role="progressbar"] {
+ border-radius: var(--progress-bar-expressive-line-border-radius);
+ margin: 0 var(--spacing-200);
+ overflow: hidden;
+}
+.progress-bar-expressive__lines {
+ display: flex;
+ overflow: visible;
+ width: calc(100% - (3 * var(--progress-bar-expressive-line-gap)));
+}
+.progress-bar-expressive__line {
+ /* Default animation behavior: Lines scroll and resize.
+ Animate line's width from 0% to its pre-defined width.
+ Simultaneously cycle the line's order in its flex container
+ to push its siblings forward and achieve an infinite loop.
+
+ Note that Safari < 14 does not support flex order animations.
+ In these browsers, the lines do not appear to infinitely
+ scroll. Instead, they scale up, reset their size, and repeat. */
+ animation: progress-bar-expressive-line-reorder var(--progress-bar-expressive-line-scale-duration) steps(var(--progress-bar-expressive-line-count)) infinite, progress-bar-expressive-line-scale-width var(--progress-bar-expressive-line-scale-duration) infinite;
+ border-radius: var(--progress-bar-expressive-line-border-radius);
+ display: inline-block;
+ flex-shrink: 0;
+ height: var(--progress-bar-expressive-line-height);
+ line-height: 0;
+ order: 1;
+}
+.progress-bar-expressive__line:nth-child(4n + 1) {
+ background-color: var(--progress-bar-expressive-color-4);
+}
+.progress-bar-expressive__line:nth-child(4n + 2) {
+ background-color: var(--progress-bar-expressive-color-3);
+}
+.progress-bar-expressive__line:nth-child(4n + 3) {
+ background-color: var(--progress-bar-expressive-color-2);
+}
+.progress-bar-expressive__line:nth-child(4n + 4) {
+ background-color: var(--progress-bar-expressive-color-1);
+}
+.progress-bar-expressive__line:nth-child(1) {
+ animation-delay: calc(-1 * (var(--progress-bar-expressive-line-scale-duration) - var(--progress-bar-expressive-line-scale-duration) / var(--progress-bar-expressive-line-count)));
+ width: var(--progress-bar-expressive-line-width-a1);
+}
+.progress-bar-expressive__line:nth-child(2) {
+ animation-delay: calc(-1 * (var(--progress-bar-expressive-line-scale-duration) - ((var(--progress-bar-expressive-line-scale-duration) / var(--progress-bar-expressive-line-count)) * 2)));
+ width: var(--progress-bar-expressive-line-width-a2);
+}
+.progress-bar-expressive__line:nth-child(3) {
+ animation-delay: calc(-1 * (var(--progress-bar-expressive-line-scale-duration) - ((var(--progress-bar-expressive-line-scale-duration) / var(--progress-bar-expressive-line-count)) * 3)));
+ width: var(--progress-bar-expressive-line-width-a3);
+}
+.progress-bar-expressive__line:nth-child(4) {
+ animation-delay: calc(-1 * (var(--progress-bar-expressive-line-scale-duration) - ((var(--progress-bar-expressive-line-scale-duration) / var(--progress-bar-expressive-line-count)) * 4)));
+ width: var(--progress-bar-expressive-line-width-a4);
+}
+.progress-bar-expressive__line:nth-child(5) {
+ animation-delay: calc(-1 * (var(--progress-bar-expressive-line-scale-duration) - ((var(--progress-bar-expressive-line-scale-duration) / var(--progress-bar-expressive-line-count)) * 5)));
+ width: var(--progress-bar-expressive-line-width-b1);
+}
+.progress-bar-expressive__line:nth-child(6) {
+ animation-delay: calc(-1 * (var(--progress-bar-expressive-line-scale-duration) - ((var(--progress-bar-expressive-line-scale-duration) / var(--progress-bar-expressive-line-count)) * 6)));
+ width: var(--progress-bar-expressive-line-width-b2);
+}
+.progress-bar-expressive__line:nth-child(7) {
+ animation-delay: calc(-1 * (var(--progress-bar-expressive-line-scale-duration) - ((var(--progress-bar-expressive-line-scale-duration) / var(--progress-bar-expressive-line-count)) * 7)));
+ width: var(--progress-bar-expressive-line-width-b3);
+}
+.progress-bar-expressive__line:nth-child(8) {
+ animation-delay: calc(-1 * (var(--progress-bar-expressive-line-scale-duration) - ((var(--progress-bar-expressive-line-scale-duration) / var(--progress-bar-expressive-line-count)) * 8)));
+ width: var(--progress-bar-expressive-line-width-b4);
+}
+.progress-bar-expressive__line:nth-child(9) {
+ animation-delay: calc(-1 * (var(--progress-bar-expressive-line-scale-duration) - ((var(--progress-bar-expressive-line-scale-duration) / var(--progress-bar-expressive-line-count)) * 9)));
+ width: var(--progress-bar-expressive-line-width-c1);
+}
+.progress-bar-expressive__line:nth-child(10) {
+ animation-delay: calc(-1 * (var(--progress-bar-expressive-line-scale-duration) - ((var(--progress-bar-expressive-line-scale-duration) / var(--progress-bar-expressive-line-count)) * 10)));
+ width: var(--progress-bar-expressive-line-width-c2);
+}
+.progress-bar-expressive__line:nth-child(11) {
+ animation-delay: calc(-1 * (var(--progress-bar-expressive-line-scale-duration) - ((var(--progress-bar-expressive-line-scale-duration) / var(--progress-bar-expressive-line-count)) * 11)));
+ width: var(--progress-bar-expressive-line-width-c3);
+}
+.progress-bar-expressive__line:nth-child(12) {
+ animation-delay: calc(-1 * (var(--progress-bar-expressive-line-scale-duration) - ((var(--progress-bar-expressive-line-scale-duration) / var(--progress-bar-expressive-line-count)) * 12)));
+ width: var(--progress-bar-expressive-line-width-c4);
+}
+/* With reduced motion, there are no animated transitions
+ between messages and the lines scroll but do not resize. */
+@media (prefers-reduced-motion) {
+ .progress-bar-expressive__message--in,
+ .progress-bar-expressive__message--out {
+ animation: none;
+ }
+ .progress-bar-expressive__message[aria-hidden="true"] {
+ display: none;
+ }
+ .progress-bar-expressive__messages:not(
+ .progress-bar-expressive__messages--medium
+ ) .progress-bar-expressive__message--initial[role="status"] {
+ animation: progress-bar-expressive-message-fadein var(--progress-bar-expressive-message-animatein-duration) cubic-bezier(0.3, 0, 0, 1) both;
+ }
+ .progress-bar-expressive__lines {
+ animation: progress-bar-expressive-reduced-motion-line-scroll var(--progress-bar-expressive-line-scroll-duration) linear infinite;
+ overflow: visible;
+ }
+ .progress-bar-expressive__line {
+ animation: none;
+ animation-delay: none;
+ margin-right: var(--progress-bar-expressive-line-gap);
+ }
+ .progress-bar-expressive__line:nth-child(4n + 1) {
+ background-color: var(--progress-bar-expressive-color-1);
+ }
+ .progress-bar-expressive__line:nth-child(4n + 2) {
+ background-color: var(--progress-bar-expressive-color-2);
+ }
+ .progress-bar-expressive__line:nth-child(4n + 3) {
+ background-color: var(--progress-bar-expressive-color-3);
+ }
+ .progress-bar-expressive__line:nth-child(4n + 4) {
+ background-color: var(--progress-bar-expressive-color-4);
+ }
+ .progress-bar-expressive__line:nth-child(9) {
+ width: var(--progress-bar-expressive-line-width-a1);
+ }
+ .progress-bar-expressive__line:nth-child(10) {
+ width: var(--progress-bar-expressive-line-width-a2);
+ }
+ .progress-bar-expressive__line:nth-child(11) {
+ width: var(--progress-bar-expressive-line-width-a3);
+ }
+ .progress-bar-expressive__line:nth-child(12) {
+ width: var(--progress-bar-expressive-line-width-a4);
+ }
+}
+@keyframes progress-bar-expressive-message-animateout {
+ 0% {
+ opacity: 1;
+ transform: translateY(0);
+ }
+ 100% {
+ opacity: 0;
+ transform: translateY(calc(var(--font-size-24) * -1));
+ }
+}
+@keyframes progress-bar-expressive-message-animatein {
+ 0% {
+ opacity: 0;
+ transform: translateY(var(--font-size-24));
+ }
+ 100% {
+ opacity: 1;
+ transform: translateY(0);
+ }
+}
+@keyframes progress-bar-expressive-message-fadein {
+ 0% {
+ opacity: 0;
+ }
+ 100% {
+ opacity: 1;
+ }
+}
+@keyframes progress-bar-expressive-line-reorder {
+ 0% {
+ order: 0;
+ }
+ 100% {
+ order: var(--progress-bar-expressive-line-count);
+ }
+}
+@keyframes progress-bar-expressive-line-scale-width {
+ 0% {
+ margin-right: 0;
+ width: 0;
+ }
+ 12.5% {
+ margin-right: var(--progress-bar-expressive-line-gap);
+ }
+ 50%,
+ 100% {
+ margin-right: var(--progress-bar-expressive-line-gap);
+ }
+}
+@keyframes progress-bar-expressive-reduced-motion-line-scroll {
+ 0% {
+ transform: translateX(calc(-200% - 8 * var(--progress-bar-expressive-line-gap)));
+ }
+ 100% {
+ transform: translateX(0);
+ }
+}
diff --git a/docs/_data/modules.yaml b/docs/_data/modules.yaml
index f26b503e8..c86eaaaa8 100644
--- a/docs/_data/modules.yaml
+++ b/docs/_data/modules.yaml
@@ -18,7 +18,6 @@ list:
- education-notice
- fullscreen-dialog
- eek
- - expressive-loader
- field
- filter-button
- filter-menu
@@ -44,6 +43,7 @@ list:
- pagination
- panel-dialog
- progress-bar
+ - progress-bar-expressive
- progress-spinner
- progress-stepper
- radio
diff --git a/docs/_includes/expressive-loader.html b/docs/_includes/expressive-loader.html
deleted file mode 100644
index 1da1d5ca6..000000000
--- a/docs/_includes/expressive-loader.html
+++ /dev/null
@@ -1,328 +0,0 @@
-
- {% include section-header.html name="expressive-loader" version=page.module_metadata.expressive-loader.ds-component.version %}
-
-
- The expressive loader can replace our traditional spinner to feel faster during periods of longer loading.
- To portray responsive and quicker loads, the expressive loader's design uses visual momentum to
- indicate progression across refreshing, page loading and user actions. It consists of an animated progress bar in various colors and an optional set of messages that are cycled into view.
-
-
- The expressive loader also renders different experiences depending on the prefers-reduced-motion media query. Toggle your reduced motion settings to view examples with the default behavior and reduced motion behavior.
-
-
-
- Default Expressive Loader
-
-
-
- The base expressive loader consists of a progressbar with 12 lines of varying widths. Each line has a width of 10% - 40% of its container, with each set of four lines adding up to 100% width. You can use JavaScript to randomly generate the line widths, though it's not required.
-
-
-
- In the default behavior, lines scale up from 0% to their defined width and move horizontally across the screen.
- When the user prefers reduced motion, the lines still animate. However, instead of growing from 0% to their defined width,
- they stay a fixed size and scroll more slowly across the screen.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {% highlight html %}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {% endhighlight %}
-
-
- Expressive Loader with Single Message
-
-
- If there is only one message, add the
- expressive-loader__message--in class to its status element to animate it in.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {% highlight html %}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {% endhighlight %}
-
-
- Expressive Loader with Multiple Messages
-
-
- The following examples demonstrate cycling through messages using JavaScript. Note that JavaScript is not bundled with Skin,
- so you will need to write your own js implementation of this pattern.
- We have outlined the steps below so you can recreate them in your JavaScript framework of choice.
-
-
-
Default behavior
-
- To cycle a message into view in the default mode:
-
- Animate in the message:
-
- Put the message content in the aria-hidden element with class expressive-loader__message . This element is used just for the visual message animation; it is not read to screen readers.
- Add the expressive-loader__message--in class to animate that message into view.
-
-
-
- After the message animates in:
-
-
- Put the message content in the status element with class expressive-loader__message . This will read the message aloud to screen reader users.
-
-
- Remove the expressive-loader__message--in class from the aria-hidden element.
-
-
-
-
- After a fixed amount of time, add the expressive_loader__message--out class
- to the current message to animate it out of view. This can happen concurrently with the next message animating in.
-
-
-
-
-
- Reduced motion behavior
-
-
- When @media (prefers-reduced-motion: reduce) , there is no transition state between messages, so the aria-hidden message is not needed.
- To fade in the first message, add the expressive-loader__message--initial class to the status element. For all subsequent messages, remove the expressive-loader__message--initial class and simply update the content in the status element.
-
-
-
-
-
-
-
- We're finishing your order.
-
-
- Hang tight.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {% highlight html %}
-
-
-
- We're finishing your order.
-
-
- Hang tight.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {% endhighlight %}
-
-
-
- Medium text
-
-
- By default, the expressive loader displays with large text. For smaller text, apply
- the expressive-loader--medium class to the message container.
-
-
-
-
-
-
-
- We're finishing your order.
-
-
- Hang tight.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {% highlight html %}
-
-
-
- We're finishing your order.
-
-
- Hang tight.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {% endhighlight %}
-
-
-
\ No newline at end of file
diff --git a/docs/_includes/progress-bar-expressive.html b/docs/_includes/progress-bar-expressive.html
new file mode 100644
index 000000000..1e5664258
--- /dev/null
+++ b/docs/_includes/progress-bar-expressive.html
@@ -0,0 +1,328 @@
+
+ {% include section-header.html name="progress-bar-expressive" version=page.module_metadata.progress-bar-expressive.ds-component.version %}
+
+
+ The expressive progress bar can replace our traditional spinner to feel faster during periods of longer loading.
+ To portray responsive and quicker loads, the expressive loader's design uses visual momentum to
+ indicate progression across refreshing, page loading and user actions. It consists of an animated progress bar in various colors and an optional set of messages that are cycled into view.
+
+
+ The expressive progress bar also renders different experiences depending on the prefers-reduced-motion media query. Toggle your reduced motion settings to view examples with the default behavior and reduced motion behavior.
+
+
+
+ Default Expressive Progress Bar
+
+
+
+ The base expressive loader consists of a progressbar with 12 lines of varying widths. Each line has a width of 10% - 40% of its container, with each set of four lines adding up to 100% width. You can use JavaScript to randomly generate the line widths, though it's not required.
+
+
+
+ In the default behavior, lines scale up from 0% to their defined width and move horizontally across the screen.
+ When the user prefers reduced motion, the lines still animate. However, instead of growing from 0% to their defined width,
+ they stay a fixed size and scroll more slowly across the screen.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {% highlight html %}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {% endhighlight %}
+
+
+ Expressive Progress Bar with Single Message
+
+
+ If there is only one message, add the
+ progress-bar-expressive__message--in class to its status element to animate it in.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {% highlight html %}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {% endhighlight %}
+
+
+ Expressive Progress Bar with Multiple Messages
+
+
+ The following examples demonstrate cycling through messages using JavaScript. Note that JavaScript is not bundled with Skin,
+ so you will need to write your own js implementation of this pattern.
+ We have outlined the steps below so you can recreate them in your JavaScript framework of choice.
+
+
+
Default behavior
+
+ To cycle a message into view in the default mode:
+
+ Animate in the message:
+
+ Put the message content in the aria-hidden element with class progress-bar-expressive__message . This element is used just for the visual message animation; it is not read to screen readers.
+ Add the progress-bar-expressive__message--in class to animate that message into view.
+
+
+
+ After the message animates in:
+
+
+ Put the message content in the status element with class progress-bar-expressive__message . This will read the message aloud to screen reader users.
+
+
+ Remove the progress-bar-expressive__message--in class from the aria-hidden element.
+
+
+
+
+ After a fixed amount of time, add the expressive_loader__message--out class
+ to the current message to animate it out of view. This can happen concurrently with the next message animating in.
+
+
+
+
+
+ Reduced motion behavior
+
+
+ When @media (prefers-reduced-motion: reduce) , there is no transition state between messages, so the aria-hidden message is not needed.
+ To fade in the first message, add the progress-bar-expressive__message--initial class to the status element. For all subsequent messages, remove the progress-bar-expressive__message--initial class and simply update the content in the status element.
+
+
+
+
+
+
+
+ We're finishing your order.
+
+
+ Hang tight.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {% highlight html %}
+
+
+
+ We're finishing your order.
+
+
+ Hang tight.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {% endhighlight %}
+
+
+
+ Medium text
+
+
+ By default, the expressive progress bar displays with large text. For smaller text, apply
+ the progress-bar-expressive--medium class to the message container.
+
+
+
+
+
+
+
+ We're finishing your order.
+
+
+ Hang tight.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {% highlight html %}
+
+
+
+ We're finishing your order.
+
+
+ Hang tight.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {% endhighlight %}
+
+
+
\ No newline at end of file
diff --git a/docs/index.html b/docs/index.html
index ec99d5595..094d14db6 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -105,10 +105,6 @@
version: 1.1
submodules:
- icon
- expressive-loader:
- ds-component:
- name: expressive-loader
- version: 1.1
filter-button:
ds-component:
name: quick-filter
@@ -231,6 +227,10 @@
ds-component:
name: progress-bar
version: 3.1
+ progress-bar-expressive:
+ ds-component:
+ name: expressive-loader
+ version: 1.1
progress-spinner:
ds-component:
name: progress-spinner
diff --git a/docs/src/js/main.js b/docs/src/js/main.js
index e207db05c..55bad6ec6 100644
--- a/docs/src/js/main.js
+++ b/docs/src/js/main.js
@@ -193,11 +193,11 @@ document.querySelectorAll('.dialog-button').forEach(function (el) {
dialogWidget._el.addEventListener('dialog-cta', logEvent);
});
-// EXPRESSIVE-LOADER
-// Simple expressive loader implementation that handles rotating messages.
-class ExpressiveLoader {
+// progress-bar-expressive
+// Simple expressive progress bar implementation that handles rotating messages.
+class ProgressBarExpressive {
constructor(widgetEl, messages) {
- this.messageContainerEl = widgetEl.querySelector('.expressive-loader__messages');
+ this.messageContainerEl = widgetEl.querySelector('.progress-bar-expressive__messages');
this.messages = messages;
if (this.messageContainerEl && this.messages) {
@@ -215,29 +215,29 @@ class ExpressiveLoader {
this.message = this.messages[this.messageIndex];
this.nextMessageEl.innerText = this.messages[this.messageIndex];
- this.nextMessageEl.classList.add('expressive-loader__message--in');
- this.currentMessageEl.classList.add('expressive-loader__message--out');
+ this.nextMessageEl.classList.add('progress-bar-expressive__message--in');
+ this.currentMessageEl.classList.add('progress-bar-expressive__message--out');
- setTimeout(this.showMessage.bind(this), 833); // --expressive-loader-message-animatein-duration
+ setTimeout(this.showMessage.bind(this), 833); // --progress-bar-expressive-message-animatein-duration
}
}
showMessage() {
if (this.isInitialized) {
this.currentMessageEl.innerText = this.message;
- this.currentMessageEl.classList.remove('expressive-loader__message--out');
- this.nextMessageEl.classList.remove('expressive-loader__message--in');
+ this.currentMessageEl.classList.remove('progress-bar-expressive__message--out');
+ this.nextMessageEl.classList.remove('progress-bar-expressive__message--in');
setTimeout(this.queueNextMessage.bind(this), 2000);
}
}
}
-document.querySelectorAll('.expressive-loader-messages-example').forEach(function (widgetEl) {
- const expressiveLoader = new ExpressiveLoader(widgetEl, ['Hang tight.', "We're finishing your order.", "Just another moment."]);
+document.querySelectorAll('.progress-bar-expressive-messages-example').forEach(function (widgetEl) {
+ const expressiveProgressBar = new ProgressBarExpressive(widgetEl, ['Hang tight.', "We're finishing your order.", "Just another moment."]);
- if(expressiveLoader.isInitialized) {
- expressiveLoader.queueNextMessage()
+ if(expressiveProgressBar.isInitialized) {
+ expressiveProgressBar.queueNextMessage()
}
});
diff --git a/docs/static/docs.min.js b/docs/static/docs.min.js
index 1ab44116c..36d3bc267 100644
--- a/docs/static/docs.min.js
+++ b/docs/static/docs.min.js
@@ -1,2 +1,2 @@
-(()=>{"use strict";function t(t){!function(t,e,n){if(!t.shiftKey){const s=t.key;switch(s){case"Enter":case"Escape":case"PageUp":case"PageDown":case"End":case"Home":case"ArrowLeft":case"ArrowUp":case"ArrowRight":case"ArrowDown":e.dispatchEvent(new CustomEvent((i=`${s}Key${n}`).charAt(0).toLowerCase()+i.slice(1),{detail:t,bubbles:!0}));break;case" ":e.dispatchEvent(new CustomEvent(`spacebarKey${n}`,{detail:t,bubbles:!0}));break;default:return}}var i}(t,this,"Down")}const e={},n="nid",i=function(t){const e="abcdefghijklmnopqrstuvwxyz",n=e+"0123456789";let i=e[s(25)];for(let t=1;t<3;t++)i+=n[s(35)];return i}();function s(t){return Math.floor(Math.random()*t)}function o(t,s=n){const o=`${s}${""===s?"":"-"}${i}`;return e[o]=e[o]||0,t.id||t.setAttribute("id",`${o}-${e[o]++}`),t.id}const r={};function l(t,e,n){t.dispatchEvent(new CustomEvent("focusExit",{detail:{fromElement:e,toElement:n},bubbles:!1}))}function a(t){const e=t.target;!0===this.el.contains(e)?this.currentFocusElement=e:(window.removeEventListener("blur",this.onWindowBlurListener),document.removeEventListener("focusin",this.onDocumentFocusInListener),l(this.el,this.currentFocusElement,e),this.currentFocusElement=null)}function c(){l(this.el,this.currentFocusElement,void 0)}function u(){document.addEventListener("focusin",this.onDocumentFocusInListener),window.addEventListener("blur",this.onWindowBlurListener)}class h{constructor(t){this.el=t,this.currentFocusElement=null,this.onWidgetFocusInListener=u.bind(this),this.onDocumentFocusInListener=a.bind(this),this.onWindowBlurListener=c.bind(this),this.el.addEventListener("focusin",this.onWidgetFocusInListener)}removeEventListeners(){window.removeEventListener("blur",this.onWindowBlurListener),document.removeEventListener("focusin",this.onDocumentFocusInListener),this.el.removeEventListener("focusin",this.onWidgetFocusInListener)}}function d(t){let e=null;return o(t),r[t.id]||(e=new h(t),r[t.id]=e),e}const m={axis:"both",autoInit:"interactive",autoReset:"current",ignoreByDelegateSelector:null,wrap:!1};function b(t){return!t.hidden&&"true"!==t.getAttribute("aria-disabled")}function _(t,e){return e>=0&&eb(t)))}function p(t){return t.indexOf(function(t){return t.filter(b)}(t).reverse()[0])}function v(t,e,n){return t.findIndex((t=>b(t)&&t.getAttribute(e)===n))}function E(t){return v(t,"aria-selected","true")}function g(t,e){return null!==e.ignoreByDelegateSelector?[...t.querySelectorAll(e.ignoreByDelegateSelector)]:[]}function L(t,e,n){let i=-1;switch(t){case"none":i=null;break;case"current":i=n;break;case"interactive":i=f(e);break;case"ariaChecked":i=function(t){return v(t,"aria-checked","true")}(e);break;case"ariaSelected":i=E(e);break;case"ariaSelectedOrInteractive":i=E(e),i=-1===i?f(e):i;break;default:i="number"==typeof t||null===t?t:-1}return i}function x(t){const e=g(this._el,this.options);0!==e.length&&e.includes(t.detail.target)||(this.index=function(t,e,n){let i=-1;if(null===e);else if(function(t,e){return e===f(t)}(t,e))!0===n&&(i=p(t));else{let n=e;for(;--n>=0;)if(b(t[n])){i=n;break}}return i}(this.items,this.index,this.options.wrap))}function y(t){const e=g(this._el,this.options);0!==e.length&&e.includes(t.detail.target)||(this.index=function(t,e,n){let i=-1;if(null===e)i=f(t);else if(function(t,e){return e===p(t)}(t,e))!0===n&&(i=f(t));else{let n=e;for(;++n0&&[...o].includes(this._cachedElement)?n=f(this.items):(o.length>0||i.length>0)&&(n=this.indexOf(this._cachedElement))),this._index=n,this._el.dispatchEvent(new CustomEvent("navigationModelMutation",{bubbles:!1,detail:{fromIndex:e,toIndex:n}}))}class A{constructor(t,e,n){this.options=Object.assign({},m,n),this._el=t,this._itemSelector=e}}class O extends A{constructor(t,e,n){super(t,e,n);const i=this._index,s=L(this.options.autoInit,this.items,this.index);this._index=s,this._cachedElement=this.items[s],this._el.dispatchEvent(new CustomEvent("navigationModelInit",{bubbles:!1,detail:{firstInteractiveIndex:this.firstNavigableIndex,fromIndex:i,items:this.items,toIndex:s}}))}get currentItem(){return this.items[this.index]}get items(){return[...this._el.querySelectorAll(`${this._itemSelector}`)]}get index(){return this._index}set index(t){if(t!==this.index&&_(this.items,t)){const e=this.index;this._cachedElement=this.items[t],this._index=t,this._el.dispatchEvent(new CustomEvent("navigationModelChange",{bubbles:!1,detail:{fromIndex:e,toIndex:t}}))}}indexOf(t){return this.items.indexOf(t)}reset(){const t=this.index,e=L(this.options.autoReset,this.items,this.index);e!==t&&(this._index=e,this._el.dispatchEvent(new CustomEvent("navigationModelReset",{bubbles:!1,detail:{fromIndex:t,toIndex:e}})))}}class T{constructor(e,n){this.model=n,this.el=e,this._keyPrevListener=x.bind(n),this._keyNextListener=y.bind(n),this._keyHomeListener=k.bind(n),this._keyEndListener=C.bind(n),this._clickListener=w.bind(n),this._focusExitListener=S.bind(n),this._observer=new MutationObserver(M.bind(n)),function(e){e.addEventListener("keydown",t)}(this.el),d(this.el);const i=n.options.axis;"both"!==i&&"x"!==i||(this.el.addEventListener("arrowLeftKeyDown",this._keyPrevListener),this.el.addEventListener("arrowRightKeyDown",this._keyNextListener)),"both"!==i&&"y"!==i||(this.el.addEventListener("arrowUpKeyDown",this._keyPrevListener),this.el.addEventListener("arrowDownKeyDown",this._keyNextListener)),this.el.addEventListener("homeKeyDown",this._keyHomeListener),this.el.addEventListener("endKeyDown",this._keyEndListener),this.el.addEventListener("click",this._clickListener),this.el.addEventListener("focusExit",this._focusExitListener),this._observer.observe(this.el,{childList:!0,subtree:!0,attributeFilter:["aria-disabled","hidden"],attributes:!0,attributeOldValue:!0})}destroy(){this.el.removeEventListener("keydown",t),function(t){const e=r[t.id];e&&(e.removeEventListeners(),delete r[t.id])}(this.el),this.el.removeEventListener("arrowLeftKeyDown",this._keyPrevListener),this.el.removeEventListener("arrowRightKeyDown",this._keyNextListener),this.el.removeEventListener("arrowUpKeyDown",this._keyPrevListener),this.el.removeEventListener("arrowDownKeyDown",this._keyNextListener),this.el.removeEventListener("homeKeyDown",this._keyHomeListener),this.el.removeEventListener("endKeyDown",this._keyEndListener),this.el.removeEventListener("click",this._clickListener),this.el.removeEventListener("focusExit",this._focusExitListener),this._observer.disconnect()}}function D(t,e,n){const i=new O(t,e,n);return new T(t,i)}const I={autoInit:"interactive",autoReset:"current",wrap:!1,axis:"both"};function B(t,e){t.forEach((function(t,n){t.setAttribute("tabindex",n===e?"0":"-1")}))}function q(t){B(t.detail.items,t.detail.toIndex),this._el.dispatchEvent(new CustomEvent("rovingTabindexInit",{detail:t.detail}))}function F(t){const e=this.items,n=e[t.detail.fromIndex],i=e[t.detail.toIndex];n&&n.setAttribute("tabindex","-1"),i&&(i.setAttribute("tabindex","0"),i.focus()),this._el.dispatchEvent(new CustomEvent("rovingTabindexChange",{detail:t.detail}))}function R(t){B(this.items,t.detail.toIndex),this._el.dispatchEvent(new CustomEvent("rovingTabindexReset",{detail:t.detail}))}function N(t){B(this.items,t.detail.toIndex),this._el.dispatchEvent(new CustomEvent("rovingTabindexMutation",{detail:t.detail}))}class j{constructor(t){this._el=t,this._onMutationListener=N.bind(this),this._onChangeListener=F.bind(this),this._onInitListener=q.bind(this),this._onResetListener=R.bind(this),this._el.addEventListener("navigationModelMutation",this._onMutationListener),this._el.addEventListener("navigationModelChange",this._onChangeListener),this._el.addEventListener("navigationModelInit",this._onInitListener),this._el.addEventListener("navigationModelReset",this._onResetListener)}destroy(){this._el.removeEventListener("navigationModelMutation",this._onMutationListener),this._el.removeEventListener("navigationModelChange",this._onChangeListener),this._el.removeEventListener("navigationModelInit",this._onInitListener),this._el.removeEventListener("navigationModelReset",this._onResetListener)}}class K extends j{constructor(t,e,n){super(t),this._options=Object.assign({},I,n),this._itemSelector=e,this._navigationEmitter=D(t,e,{autoInit:void 0!==this._options.index?this._options.index:this._options.autoInit,autoReset:this._options.autoReset,wrap:this._options.wrap,axis:this._options.axis})}get index(){return this._navigationEmitter.model.index}set index(t){this._navigationEmitter.model.index=t}set wrap(t){this._navigationEmitter.model.options.wrap=t}get currentItem(){return this._navigationEmitter.model.currentItem}get items(){return this._navigationEmitter.model.items}reset(){this._navigationEmitter.model.reset()}destroy(){super.destroy(),this._navigationEmitter.destroy()}}function H(t,e,n){return new K(t,e,n)}const W=["a[href]","area[href]","button:not([disabled])","embed","iframe","input:not([disabled])","object","select:not([disabled])","textarea:not([disabled])","*[tabindex]","*[contenteditable]"].join();function P(t,e=!1,n){if(n){const i=requestAnimationFrame((()=>{n(z(t,e))}));return()=>{cancelAnimationFrame(i)}}return z(t,e)}function z(t,e=!1){let n=Array.prototype.slice.call(t.querySelectorAll(W));return n=n.filter((function(t){return"none"!==window.getComputedStyle(t).display})),!0===e&&(n=n.filter((function(t){return"-1"!==t.getAttribute("tabindex")}))),n}const $={alwaysDoFocusManagement:!1,ariaControls:!0,autoCollapse:!1,collapseOnFocusOut:!1,collapseOnMouseOut:!1,collapseOnClickOut:!1,contentSelector:".expander__content",expandedClass:null,expandOnClick:!1,expandOnFocus:!1,expandOnHover:!1,focusManagement:null,hostSelector:".expander__host",simulateSpacebarClick:!1};function V(t){13!==t.keyCode&&32!==t.keyCode||(this._keyboardClickFlag=!0),32===t.keyCode&&!0===this.options.simulateSpacebarClick&&this.hostEl.click()}function G(){this._mouseClickFlag=!0}function U(){this._expandWasKeyboardClickActivated=this._keyboardClickFlag,this._expandWasMouseClickActivated=this._mouseClickFlag,this.expanded=!this.expanded}function X(){this._expandWasFocusActivated=!0,this.expanded=!0}function Y(){clearTimeout(this._mouseLeft),this._expandWasHoverActivated=!0,this.expanded=!0}function J(){this.expanded=!1}function Q(){clearTimeout(this._mouseLeft),this._mouseLeft=setTimeout((()=>{this.expanded=!1}),300)}function Z(t){!1===this.el.contains(t.target)&&(this.expanded=!1)}function tt(){this.documentClick=!0}function et(){this.documentClick=!1}function nt(t){!0===this.documentClick&&(this.documentClick=!1,!1===this.el.contains(t.target)&&(this.expanded=!1))}class it{constructor(t,e){this.options=Object.assign({},$,e),this.el=t,this.hostEl=t.querySelector(this.options.hostSelector),this.contentEl=t.querySelector(this.options.contentSelector),d(this.el),this._hostKeyDownListener=V.bind(this),this._hostMouseDownListener=G.bind(this),this._documentClickListener=Z.bind(this),this._documentTouchStartListener=tt.bind(this),this._documentTouchMoveListener=et.bind(this),this._documentTouchEndListener=nt.bind(this),this._hostClickListener=U.bind(this),this._hostFocusListener=X.bind(this),this._hostHoverListener=Y.bind(this),this._focusExitListener=J.bind(this),this._mouseLeaveListener=Q.bind(this),null===this.hostEl.getAttribute("aria-expanded")&&this.hostEl.setAttribute("aria-expanded","false"),!0===this.options.ariaControls&&(o(this.el,"expander"),this.contentEl.id=this.contentEl.id||`${this.el.id}-content`,this.hostEl.setAttribute("aria-controls",this.contentEl.id)),this.expandOnClick=this.options.expandOnClick,this.expandOnFocus=this.options.expandOnFocus,this.expandOnHover=this.options.expandOnHover,!1===this.options.autoCollapse&&(this.collapseOnClickOut=this.options.collapseOnClickOut,this.collapseOnFocusOut=this.options.collapseOnFocusOut,this.collapseOnMouseOut=this.options.collapseOnMouseOut)}set expandOnClick(t){!0===t?(this.hostEl.addEventListener("keydown",this._hostKeyDownListener),this.hostEl.addEventListener("mousedown",this._hostMouseDownListener),this.hostEl.addEventListener("click",this._hostClickListener),!0===this.options.autoCollapse&&(this.collapseOnClickOut=!0,this.collapseOnFocusOut=!0)):(this.hostEl.removeEventListener("click",this._hostClickListener),this.hostEl.removeEventListener("mousedown",this._hostMouseDownListener),this.hostEl.removeEventListener("keydown",this._hostKeyDownListener))}set expandOnFocus(t){!0===t?(this.hostEl.addEventListener("focus",this._hostFocusListener),!0===this.options.autoCollapse&&(this.collapseOnClickOut=!0,this.collapseOnFocusOut=!0)):this.hostEl.removeEventListener("focus",this._hostFocusListener)}set expandOnHover(t){!0===t?(this.hostEl.addEventListener("mouseenter",this._hostHoverListener),this.contentEl.addEventListener("mouseenter",this._hostHoverListener),!0===this.options.autoCollapse&&(this.collapseOnMouseOut=!0)):(this.hostEl.removeEventListener("mouseenter",this._hostHoverListener),this.contentEl.removeEventListener("mouseenter",this._hostHoverListener))}set collapseOnClickOut(t){!0===t?(document.addEventListener("click",this._documentClickListener),document.addEventListener("touchstart",this._documentTouchStartListener),document.addEventListener("touchmove",this._documentTouchMoveListener),document.addEventListener("touchend",this._documentTouchEndListener)):(document.removeEventListener("click",this._documentClickListener),document.removeEventListener("touchstart",this._documentTouchStartListener),document.removeEventListener("touchmove",this._documentTouchMoveListener),document.removeEventListener("touchend",this._documentTouchEndListener))}set collapseOnFocusOut(t){!0===t?this.el.addEventListener("focusExit",this._focusExitListener):this.el.removeEventListener("focusExit",this._focusExitListener)}set collapseOnMouseOut(t){!0===t?(this.el.addEventListener("mouseleave",this._mouseLeaveListener),this.contentEl.addEventListener("mouseleave",this._mouseLeaveListener)):(this.el.removeEventListener("mouseleave",this._mouseLeaveListener),this.contentEl.removeEventListener("mouseleave",this._mouseLeaveListener))}get expanded(){return"true"===this.hostEl.getAttribute("aria-expanded")}set expanded(t){!0===t&&!1===this.expanded&&(this.hostEl.setAttribute("aria-expanded","true"),this.options.expandedClass&&this.el.classList.add(this.options.expandedClass),(this._expandWasKeyboardClickActivated||this._expandWasMouseClickActivated&&this.options.alwaysDoFocusManagement)&&function(t,e){if("content"===t)e.setAttribute("tabindex","-1"),e.focus();else if("focusable"===t)P(e)[0].focus();else if("interactive"===t)P(e,!0)[0].focus();else if(null!==t){const n=e.querySelector(`#${t}`);n&&n.focus()}}(this.options.focusManagement,this.contentEl),this.el.dispatchEvent(new CustomEvent("expander-expand",{bubbles:!0,detail:this.contentEl}))),!1===t&&!0===this.expanded&&(this.hostEl.setAttribute("aria-expanded","false"),this.options.expandedClass&&this.el.classList.remove(this.options.expandedClass),this.el.dispatchEvent(new CustomEvent("expander-collapse",{bubbles:!0,detail:this.contentEl}))),this._expandWasKeyboardClickActivated=!1,this._expandWasMouseClickActivated=!1,this._expandWasFocusActivated=!1,this._expandWasHoverActivated=!1,this._keyboardClickFlag=!1,this._mouseClickFlag=!1}sleep(){!0!==this._destroyed&&(this.expandOnClick=!1,this.expandOnFocus=!1,this.expandOnHover=!1,this.collapseOnClickOut=!1,this.collapseOnFocusOut=!1,this.collapseOnMouseOut=!1)}destroy(){this.sleep(),this._destroyed=!0,this._hostKeyDownListener=null,this._hostMouseDownListener=null,this._documentClickListener=null,this._documentTouchStartListener=null,this._documentTouchMoveListener=null,this._documentTouchEndListener=null,this._hostClickListener=null,this._hostFocusListener=null,this._hostHoverListener=null,this._focusExitListener=null,this._mouseLeaveListener=null}}const st={labelElementAnimateModifier:"floating-label__label--animate",labelElementInlineModifier:"floating-label__label--inline",labelElementFocusModifier:"floating-label__label--focus",labelElementInvalidModifier:"floating-label__label--invalid",labelElementDisabledModifier:"floating-label__label--disabled",textboxElementBackgroundRGB:["rgb(255, 255, 255)","rgb(247, 247, 247)","rgb(245, 245, 245)","rgb(230, 32, 72)","rgb(254, 245, 246)"]};function ot(t,e){if(at(t)){t.style["min-width"]="";const n=t.offsetWidth;t.querySelector("option").text=e,!e&&n>t.offsetWidth&&(t.style["min-width"]=`${n}px`)}else e?t.setAttribute("placeholder",e):t.removeAttribute("placeholder")}function rt(){const t=lt(this.formControlEl);this.placeholder=function(t){if(at(t)){const e=t.querySelector("option");return e.value?null:e.text}if(t.hasAttribute("placeholder"))return t.getAttribute("placeholder")}(this.formControlEl)||this.placeholder;const e=function(t){if(at(t)){const e=t.querySelector("option");if(e.value)return;return!!e.text}return t.hasAttribute("placeholder")}(this.formControlEl,this.placeholder);this.placeholder&&t&&!e?ot(this.formControlEl,this.placeholder):!t&&e&&ot(this.formControlEl,""),ut(this.formControlEl)?this.labelEl.classList.add(this.options.labelElementInvalidModifier):this.labelEl.classList.remove(this.options.labelElementInvalidModifier),this.formControlEl.hasAttribute("disabled")?this.labelEl.classList.add(this.options.labelElementDisabledModifier):this.labelEl.classList.remove(this.options.labelElementDisabledModifier)}function lt(t){return document.activeElement===t}function at(t){return"SELECT"===t.tagName}function ct(t){return t.value.length>0}function ut(t){return t.hasAttribute("aria-invalid")&&"true"===t.getAttribute("aria-invalid")}function ht(t,e){if(!at(t)){const n=getComputedStyle(t).backgroundColor;return Array.isArray(e)?!e.includes(n):n!==e}return!1}function dt(){ct(this.formControlEl)||this.labelEl.classList.add(this.options.labelElementInlineModifier),this.labelEl.classList.remove(this.options.labelElementFocusModifier),ut(this.formControlEl)&&this.labelEl.classList.add(this.options.labelElementInvalidModifier),ot(this.formControlEl,"")}function mt(){this.labelEl.classList.add(this.options.labelElementAnimateModifier),this.labelEl.classList.add(this.options.labelElementFocusModifier),this.labelEl.classList.remove(this.options.labelElementInlineModifier),this.labelEl.classList.remove(this.options.labelElementInvalidModifier),this.placeholder&&ot(this.formControlEl,this.placeholder)}class bt{constructor(t,e){this.options=Object.assign({},st,e),this._observer=new MutationObserver(rt.bind(this)),this.rootEl=t,this.labelEl=this.rootEl.querySelector("label"),this.formControlEl=this.rootEl.querySelector("input,textarea,select"),this._onBlurListener=dt.bind(this),this._onFocusListener=mt.bind(this),this.formControlEl.addEventListener("blur",this._onBlurListener),this.formControlEl.addEventListener("focus",this._onFocusListener),ct(this.formControlEl)||ht(this.formControlEl,this.options.textboxElementBackgroundRGB)?at(this.formControlEl)||this.labelEl.classList.remove(this.options.labelElementInlineModifier):this.labelEl.classList.add(this.options.labelElementInlineModifier),lt(this.formControlEl)&&(this.labelEl.classList.add(this.options.labelElementFocusModifier),this.labelEl.classList.remove(this.options.labelElementInlineModifier)),rt.call(this),this._observer.observe(this.formControlEl,{childList:at(this.formControlEl),subtree:at(this.formControlEl),attributeFilter:["disabled","aria-invalid","placeholder","value"],attributes:!0})}destroy(){this._observer.disconnect()}refresh(){ct(this.formControlEl)||at(this.formControlEl)||ht(this.formControlEl,this.options.textboxElementBackgroundRGB)?this.labelEl.classList.remove(this.options.labelElementInlineModifier):this.labelEl.classList.add(this.options.labelElementInlineModifier),lt(this.formControlEl)&&(this.labelEl.classList.add(this.options.labelElementFocusModifier),this.labelEl.classList.remove(this.options.labelElementInlineModifier))}}function _t(t){t.keyCode>=32&&t.keyCode<=40&&t.preventDefault()}function ft(t){t.addEventListener("keydown",_t)}const pt={activeDescendantClassName:"active-descendant",autoInit:"none",autoReset:"none",autoScroll:!1,axis:"both",wrap:!1};function vt(t){const{items:e,toIndex:n}=t.detail,i=e[n];i&&(i.classList.add(this._options.activeDescendantClassName),this._focusEl.setAttribute("aria-activedescendant",i.id)),this._el.dispatchEvent(new CustomEvent("activeDescendantInit",{detail:t.detail}))}function Et(t){const{fromIndex:e,toIndex:n}=t.detail,i=this.items[e],s=this.items[n];i&&i.classList.remove(this._options.activeDescendantClassName),s&&(s.classList.add(this._options.activeDescendantClassName),this._focusEl.setAttribute("aria-activedescendant",s.id),this._options.autoScroll&&this._containerEl&&(this._containerEl.scrollTop=s.offsetTop-this._containerEl.offsetHeight/2)),this._el.dispatchEvent(new CustomEvent("activeDescendantChange",{detail:t.detail}))}function gt(t){const e=t.detail.toIndex,n=this._options.activeDescendantClassName;if(this.items.forEach((function(t){t.classList.remove(n)})),null!==e&&-1!==e){const t=this.items[e];t.classList.add(n),this._focusEl.setAttribute("aria-activedescendant",t.id)}else this._focusEl.removeAttribute("aria-activedescendant");this._el.dispatchEvent(new CustomEvent("activeDescendantReset",{detail:t.detail}))}function Lt(t){const{toIndex:e}=t.detail,n=this._options.activeDescendantClassName;this.items.forEach((function(t,i){o(t),i!==e?t.classList.remove(n):t.classList.add(n)})),this._el.dispatchEvent(new CustomEvent("activeDescendantMutation",{detail:t.detail}))}class xt{constructor(t){this._el=t,this._onMutationListener=Lt.bind(this),this._onChangeListener=Et.bind(this),this._onResetListener=gt.bind(this),this._onInitListener=vt.bind(this),this._el.addEventListener("navigationModelMutation",this._onMutationListener),this._el.addEventListener("navigationModelChange",this._onChangeListener),this._el.addEventListener("navigationModelReset",this._onResetListener),this._el.addEventListener("navigationModelInit",this._onInitListener)}destroy(){this._el.removeEventListener("navigationModelMutation",this._onMutationListener),this._el.removeEventListener("navigationModelChange",this._onChangeListener),this._el.removeEventListener("navigationModelReset",this._onResetListener),this._el.removeEventListener("navigationModelInit",this._onInitListener)}}class yt extends xt{constructor(t,e,n,i,s){super(t),this._options=Object.assign({},pt,s),this._focusEl=e,this._itemContainerEl=n,this._itemSelector=i,o(this._itemContainerEl),this._itemContainerEl!==this._focusEl&&e.setAttribute("aria-owns",this._itemContainerEl.id),this._navigationEmitter=D(t,i,{autoInit:this._options.autoInit,autoReset:this._options.autoReset,axis:this._options.axis,ignoreByDelegateSelector:this._options.ignoreByDelegateSelector,wrap:this._options.wrap}),this.items.forEach((function(t){o(t)}))}get index(){return this._navigationEmitter.model.index}set index(t){this._navigationEmitter.model.index=t}reset(){this._navigationEmitter.model.reset()}get currentItem(){return this._navigationEmitter.model.currentItem}get items(){return this._navigationEmitter.model.items}set wrap(t){this._navigationEmitter.model.options.wrap=t}destroy(){super.destroy(),this._navigationEmitter.destroy()}}const wt={activeDescendantClassName:"listbox__option--active",autoInit:"ariaSelectedOrInteractive",autoReset:"ariaSelectedOrInteractive",autoSelect:!0,customElementMode:!1,focusableElement:null,listboxOwnerElement:null,multiSelect:!1,useAriaChecked:!0,valueSelector:".listbox__value"};class kt{constructor(t,e){this._options=Object.assign({},wt,e),this.el=t,this._activeDescendantRootEl=this._options.listboxOwnerElement||this.el,"listbox"===t.getAttribute("role")?this._listboxEl=t:this._listboxEl=this.el.querySelector("[role=listbox]"),this._options.focusableElement||null!==this._listboxEl.getAttribute("tabindex")||this._listboxEl.setAttribute("tabindex","0"),ft(this.el),this._onKeyDownListener=Ct.bind(this),this._onClickListener=St.bind(this),this._onActiveDescendantChangeListener=Mt.bind(this),this._onMutationListener=At.bind(this),this.el.classList.add("listbox--js"),this._options.customElementMode||(this._mutationObserver=new MutationObserver(this._onMutationListener),this._observeMutations(),this._observeEvents()),this._activeDescendant=function(t,e,n,i,s){return new yt(t,e,n,"[role=option]",s)}(this._activeDescendantRootEl,this._options.focusableElement||this._listboxEl,this._listboxEl,0,{activeDescendantClassName:this._options.activeDescendantClassName,autoInit:this._options.autoInit,autoReset:this._options.autoReset,axis:"y"})}_observeMutations(){this._options.customElementMode||this._mutationObserver.observe(this._listboxEl,{attributeFilter:["aria-selected"],attributes:!0,childList:!0,subtree:!0})}_unobserveMutations(){this._options.customElementMode||this._mutationObserver.disconnect()}_observeEvents(){!0!==this._destroyed&&(this._activeDescendantRootEl.addEventListener("activeDescendantChange",this._onActiveDescendantChangeListener),this._listboxEl.addEventListener("keydown",this._onKeyDownListener),this._listboxEl.addEventListener("click",this._onClickListener))}_unobserveEvents(){this._listboxEl.removeEventListener("keydown",this._onKeyDownListener),this._listboxEl.removeEventListener("click",this._onClickListener),this._activeDescendantRootEl.removeEventListener("activeDescendantChange",this._onActiveDescendantChangeListener)}get index(){return this.items.findIndex((t=>"true"===t.getAttribute("aria-selected")))}get items(){return this._activeDescendant.items}select(t){this._unobserveMutations();const e=this.items[t];if(e&&"true"!==e.getAttribute("aria-disabled")){const e=this.items[t];let n;if(e.setAttribute("aria-selected","true"),!0===this._options.useAriaChecked&&e.setAttribute("aria-checked","true"),n=e.innerText,this._options.valueSelector){const t=e.querySelector(this._options.valueSelector);t&&(n=t.innerText)}this.el.dispatchEvent(new CustomEvent("makeup-listbox-change",{detail:{el:e,optionIndex:t,optionValue:n}}))}this._observeMutations()}unselect(t){this._unobserveMutations();const e=this.items[t];if(e&&"true"!==e.getAttribute("aria-disabled")){const e=this.items[t];e.setAttribute("aria-selected","false"),!0===this._options.useAriaChecked&&e.setAttribute("aria-checked","false")}this._observeMutations()}destroy(){this._destroyed=!0,this._unobserveMutations(),this._unobserveEvents(),this._onKeyDownListener=null,this._onClickListener=null,this._onActiveDescendantChangeListener=null,this._onMutationListener=null}}function Ct(t){const e=this._activeDescendant.currentItem;var n;13!==(n=t.keyCode)&&32!==n||"true"===e?.getAttribute("aria-selected")||(this.unselect(this.index),this.select(this._activeDescendant.index))}function St(t){const e=t.target.closest("[role=option]"),n=this.items.indexOf(e),i="true"===e.getAttribute("aria-selected");"true"===e.getAttribute("aria-disabled")||!1!==this._options.autoSelect||!1!==i||(this.unselect(this.index),this.select(n))}function Mt(t){const{fromIndex:e,toIndex:n}=t.detail;if(!0===this._options.autoSelect){const t=this.items[e],i=this.items[n];t&&this.unselect(e),i&&this.select(n)}}function At(t){for(const e of t)"attributes"===e.type&&this.el.dispatchEvent(new CustomEvent("makeup-listbox-mutation",{detail:{attributeName:e.attributeName}}))}const Ot={autoSelect:!0,collapseTimeout:150,customElementMode:!1};class Tt{constructor(t,e){this._options=Object.assign({},Ot,e),this._el=t,this._inputEl=this._el.querySelector("input"),this._listboxEl=this._el.querySelector(".combobox__listbox"),this._autocompleteType=this._inputEl.getAttribute("aria-autocomplete"),this._inputEl.setAttribute("autocomplete","off"),this._inputEl.setAttribute("role","combobox"),this._listboxEl.hidden=!1,this._listboxWidget=new kt(this._listboxEl,{activeDescendantClassName:"combobox__option--active",autoReset:-1,autoSelect:this._options.autoSelect,focusableElement:this._inputEl,listboxOwnerElement:this._el}),this._expander=new it(this._el,{collapseOnClickOut:!0,collapseOnFocusOut:!0,contentSelector:".combobox__listbox",expandedClass:"combobox--expanded",expandOnFocus:!0,hostSelector:"input"}),this._destroyed=!1,this._onInputFocusListener=Dt.bind(this),this._onListboxClickListener=Ft.bind(this),this._onListboxActiveDescendantChangeListener=Rt.bind(this),this._onTextboxKeyDownListener=It.bind(this),this._onTextboxInputListener=qt.bind(this),this._onTextboxClickListener=Bt.bind(this),this._onMutationListener=Nt.bind(this),this._el.classList.add("combobox--js"),this._options.customElementMode||(this._mutationObserver=new MutationObserver(this._onMutationListener),this._observeMutations(),this._observeEvents())}resetFilter(){this._listboxWidget._activeDescendant.reset(),this._listboxWidget.items.forEach((t=>t.hidden=!1))}_observeMutations(){this._options.customElementMode||this._mutationObserver.observe(this._inputEl,{attributes:!0,childList:!0,subtree:!0})}_unobserveMutations(){this._options.customElementMode||this._mutationObserver.disconnect()}_observeEvents(){!0!==this._destroyed&&(this._listboxEl.addEventListener("click",this._onListboxClickListener),this._listboxWidget._activeDescendantRootEl.addEventListener("activeDescendantChange",this._onListboxActiveDescendantChangeListener),this._inputEl.addEventListener("focus",this._onInputFocusListener),this._inputEl.addEventListener("keydown",this._onTextboxKeyDownListener),this._inputEl.addEventListener("input",this._onTextboxInputListener),this._inputEl.addEventListener("click",this._onTextboxClickListener))}_unobserveEvents(){this._listboxEl.removeEventListener("click",this._onListboxClickListener),this._listboxWidget._activeDescendantRootEl.removeEventListener("activeDescendantChange",this._onListboxActiveDescendantChangeListener),this._inputEl.removeEventListener("focus",this._onInputFocusListener),this._inputEl.removeEventListener("keydown",this._onTextboxKeyDownListener),this._inputEl.removeEventListener("input",this._onTextboxInputListener),this._inputEl.removeEventListener("click",this._onTextboxClickListener)}destroy(){this._destroyed=!0,this._unobserveMutations(),this._unobserveEvents(),this._onInputFocusListener=null,this._onListboxClickListener=null,this._onListboxActiveDesendanctChangeListener=null,this._onTextboxKeyDownListener=null,this._onTextboxInputListener=null,this._onTextboxClickListener=null,this._onMutationListener=null}}function Dt(){this.resetFilter()}function It(t){if(38!==t.keyCode&&40!==t.keyCode||t.preventDefault(),40===t.keyCode&&!1===this._expander.expanded&&(this._expander.expanded=!0),27===t.keyCode&&!0===this._expander.expanded&&(this._expander.expanded=!1,this._listboxWidget._activeDescendant.reset()),!1===this._options.autoSelect&&13===t.keyCode&&this._inputEl.getAttribute("aria-activedescendant")){t.preventDefault();const e=this;this._inputEl.value=this._listboxWidget.items[this._listboxWidget._activeDescendant.index].innerText,Kt(this._el,this._inputEl.value),this._listboxWidget._activeDescendant.reset(),setTimeout((function(){e._expander.expanded=!1,"list"===e._autocompleteType&&(0===e._inputEl.value.length?e.resetFilter():jt(e._inputEl.value,e._listboxWidget.items))}),this._options.collapseTimeout)}}function Bt(){!1===this._expander.expanded&&(this._expander.expanded=!0)}function qt(){!1===this._expander.expanded&&(this._expander.expanded=!0),"list"===this._autocompleteType&&(this._listboxWidget._activeDescendant.reset(),0===this._inputEl.value.length?this.resetFilter():jt(this._inputEl.value,this._listboxWidget.items))}function Ft(t){const e=this,n=t.target.closest("[role=option]"),i=this._listboxWidget.items.indexOf(n);console.log(i),void 0!==i&&(this._inputEl.value=this._listboxWidget.items[i].innerText,!1===this._options.autoSelect&&Kt(this._el,this._inputEl.value),setTimeout((function(){e._expander.expanded=!1}),this._options.collapseTimeout))}function Rt(t){!0===this._options.autoSelect&&(this._inputEl.value=this._listboxWidget.items[t.detail.toIndex].innerText,Kt(this._el,this._inputEl.value))}function Nt(t){for(const e of t)"attributes"===e.type&&this._el.dispatchEvent(new CustomEvent("makeup-combobox-mutation",{detail:{attributeName:e.attributeName}}))}function jt(t,e){const n=t.length,i=t.toLowerCase(),s=e.filter((t=>t.innerText.trim().substring(0,n).toLowerCase()===i)),o=e.filter((t=>t.innerText.trim().substring(0,n).toLowerCase()!==i));s.forEach((t=>t.hidden=!1)),o.forEach((t=>t.hidden=!0))}function Kt(t,e){t.dispatchEvent(new CustomEvent("makeup-combobox-change",{detail:{value:e}}))}const Ht={customElementMode:!1};class Wt{constructor(t,e,n){this._options=Object.assign({},Ht,n),this._el=t,this._el.setAttribute("aria-haspopup","dialog"),this._dialog=e,this._onClickListener=zt.bind(this),this._onDialogCloseListener=$t.bind(this),this._onMutationListener=Pt.bind(this),this._el.classList.add("dialog-button--js"),this._options.customElementMode||(this._mutationObserver=new MutationObserver(this._onMutationListener),this._observeMutations(),this._observeEvents())}_observeMutations(){this._options.customElementMode||this._mutationObserver.observe(this._el,{attributes:!0,childList:!1,subtree:!1})}_unobserveMutations(){this._options.customElementMode||this._mutationObserver.disconnect()}_observeEvents(){!0!==this._destroyed&&(this._el.addEventListener("click",this._onClickListener),this._dialog._el.addEventListener("dialog-close",this._onDialogCloseListener))}_unobserveEvents(){this._el.removeEventListener("click"),this._dialog._el.removeEventListener("dialog-close",this._onDialogCloseListener)}destroy(){this._destroyed=!0,this._unobserveMutations(),this._unobserveEvents(),this._onClickListener=null,this._onDialogCloseListener=null,this._onMutationListener=null}}function Pt(t){for(const e of t)"attributes"===e.type&&this._el.dispatchEvent(new CustomEvent("makeup-dialog-button-mutation",{detail:{attributeName:e.attributeName}}))}function zt(){this._dialog.open()}function $t(){!0===this._dialog.modal&&this._el.focus()}const Vt={autoSelect:!0,buttonLabelSelector:".btn__text",collapseTimeout:150,customElementMode:!1,listboxSelector:".listbox-button__listbox",floatingLabelSelector:".btn__floating-label",floatingLabelInline:"btn__floating-label--inline",floatingLabelAnimate:"btn__floating-label--animate",valueSelector:".listbox-button__value",buttonValueType:"text",iconSelector:".icon"};class Gt{constructor(t,e){this._options=Object.assign({},Vt,e),this.el=t,this._buttonEl=this.el.querySelector("button"),this._buttonLabelEl=t.querySelector(this._options.buttonLabelSelector),this._buttonFloatingLabelEl=t.querySelector(this._options.floatingLabelSelector),this._buttonPrefix=this._buttonEl.dataset?.listboxButtonPrefix,this._listboxEl=this.el.querySelector(this._options.listboxSelector),this._onButtonFirstClickListener=Ut.bind(this),this._onListboxClickListener=Yt.bind(this),this._onListboxKeyDownListener=Xt.bind(this),this._onListboxInitListener=Jt.bind(this),this._onListboxChangeListener=Qt.bind(this),this._onMutationListener=Zt.bind(this),this._options.customElementMode||(this._mutationObserver=new MutationObserver(this._onMutationListener),this._observeMutations(),this._observeEvents()),this.listbox=new kt(this._listboxEl,{activeDescendantClassName:"listbox-button__option--active",autoReset:"ariaSelectedOrInteractive",autoSelect:this._options.autoSelect,valueSelector:this._options.valueSelector}),this._expander=new it(this.el,{alwaysDoFocusManagement:!0,collapseOnClick:!0,collapseOnClickOut:!0,collapseOnFocusOut:!0,contentSelector:this._options.listboxSelector,expandedClass:"listbox-button--expanded",expandOnClick:!0,focusManagement:"focusable",hostSelector:"button"}),this.el.classList.add("listbox-button--js"),this._buttonFloatingLabelEl&&(this._buttonLabelEl.innerText||this._buttonFloatingLabelEl.classList.add(this._options.floatingLabelInline))}_observeMutations(){this._options.customElementMode||this._mutationObserver.observe(this._buttonEl,{attributeFilter:["aria-expanded"],attributes:!0,childList:!1,subtree:!1})}_unobserveMutations(){this._options.customElementMode||this._mutationObserver.disconnect()}_unobserveEvents(){this._buttonEl.removeEventListener("click",this._onButtonFirstClickListener),this._listboxEl.removeEventListener("click",this._onListboxClickListener),this._listboxEl.removeEventListener("keydown",this._onListboxKeyDownListener),this._listboxEl.removeEventListener("makeup-listbox-init",this._onListboxInitListener),this._listboxEl.removeEventListener("makeup-listbox-change",this._onListboxChangeListener)}_observeEvents(){!0!==this._destroyed&&(this._buttonEl.addEventListener("click",this._onButtonFirstClickListener,{once:!0}),this._listboxEl.addEventListener("click",this._onListboxClickListener),this._listboxEl.addEventListener("keydown",this._onListboxKeyDownListener),this._listboxEl.addEventListener("makeup-listbox-init",this._onListboxInitListener),this._listboxEl.addEventListener("makeup-listbox-change",this._onListboxChangeListener))}collapse(){const t=this;setTimeout((function(){t._unobserveMutations(),t._expander.expanded=!1,t._observeMutations(),t._buttonEl.focus()}),this._options.collapseTimeout)}destroy(){this._destroyed=!0,this._unobserveEvents(),this._unobserveMutations(),this._onButtonFirstClickListener=null,this._onListboxClickListener=null,this._onListboxKeyDownListener=null,this._onListboxInitListener=null,this._onListboxChangeListener=null,this._onMutationListener=null}}function Ut(){this.listbox.el.hidden=!1}function Xt(t){13!==t.keyCode&&27!==t.keyCode&&32!==t.keyCode||this.collapse()}function Yt(){this.collapse()}function Jt(t){this.el.dispatchEvent(new CustomEvent("makeup-listbox-button-init",{detail:t.detail}))}function Qt(t){const e=t.detail.optionValue,n=t.detail.el.querySelector(this._options.iconSelector).cloneNode(!0);let i=this._buttonPrefix?`${this._buttonPrefix} ${e}`:e;if(n)switch(this._options.buttonValueType){case"both":i=`${n.outerHTML} ${i} `;break;case"icon":n.setAttribute("aria-label",i),n.removeAttribute("aria-hidden"),i=n.outerHTML}this._buttonLabelEl.innerHTML=i,this._buttonFloatingLabelEl&&(e?(this._buttonFloatingLabelEl.classList.add(this._options.floatingLabelAnimate),this._buttonFloatingLabelEl.classList.remove(this._options.floatingLabelInline)):this._buttonFloatingLabelEl.classList.add(this._options.floatingLabelInline)),this.el.dispatchEvent(new CustomEvent("makeup-listbox-button-change",{detail:t.detail}))}function Zt(t){for(const e of t)"attributes"===e.type&&this.el.dispatchEvent(new CustomEvent("makeup-listbox-button-mutation",{detail:{attributeName:e.attributeName}}))}const te={customElementMode:!1,autoInit:"interactive",autoReset:"interactive"};class ee{constructor(t,e){this._options=Object.assign({},te,e),this.el=t,this._rovingTabIndex=H(this.el,"[role^=menuitem]",{autoInit:this._options.autoInit,autoReset:this._options.autoReset}),ft(this.el),this._onKeyDownListener=ie.bind(this),this._onClickListener=se.bind(this),this._onMutationListener=ne.bind(this),this.el.classList.add("menu--js"),this._options.customElementMode||(this._mutationObserver=new MutationObserver(this._onMutationListener),this._observeMutations(),this._observeEvents())}select(t){this._unobserveMutations();const e=this.items[t];switch(e.getAttribute("role")){case"menuitemcheckbox":!function(t,e){if("true"!==e.getAttribute("aria-disabled")){const n=e.dataset.makeupGroup;e.setAttribute("aria-checked","true"===e.getAttribute("aria-checked")?"false":"true"),t.dispatchEvent(new CustomEvent("makeup-menu-change",{detail:{el:e,checked:e.getAttribute("aria-checked"),group:n,value:e.innerText}}))}}(this.el,e);break;case"menuitemradio":!function(t,e){if("true"!==e.getAttribute("aria-disabled")){const n=e.dataset.makeupGroup,i=t.querySelector(`[data-makeup-group=${n}][aria-checked=true]`);i&&i.setAttribute("aria-checked","false"),i!==e&&(e.setAttribute("aria-checked","true"),t.dispatchEvent(new CustomEvent("makeup-menu-change",{detail:{el:e,group:n,value:e.innerText}})))}}(this.el,e);break;default:n=e,this.el.dispatchEvent(new CustomEvent("makeup-menu-select",{detail:{el:n,value:n.innerText}}))}var n;this._observeMutations()}get items(){return this._rovingTabIndex.items}get radioGroupNames(){const t=[...this.el.querySelectorAll("[role=menuitemradio][data-makeup-group]")];return[...new Set(t.map((t=>t.dataset.makeupGroup)))]}get checkboxGroupNames(){const t=[...this.el.querySelectorAll("[role=menuitemcheckbox][data-makeup-group]")];return[...new Set(t.map((t=>t.dataset.makeupGroup)))]}_observeMutations(){this._options.customElementMode||this._mutationObserver.observe(this.el,{attributeFilter:["aria-checked","aria-disabled"],attributes:!0,childList:!0,subtree:!0})}_unobserveMutations(){this._options.customElementMode||this._mutationObserver.disconnect()}_observeEvents(){!0!==this._destroyed&&(this.el.addEventListener("keydown",this._onKeyDownListener),this.el.addEventListener("click",this._onClickListener))}_unobserveEvents(){this.el.removeEventListener("keydown",this._onKeyDownListener),this.el.removeEventListener("click",this._onClickListener)}destroy(){this._destroyed=!0,this._unobserveMutations(),this._unobserveEvents(),this._onKeyDownListener=null,this._onClickListener=null,this._onMutationListener=null}}function ne(t){for(const e of t)"attributes"===e.type&&this.el.dispatchEvent(new CustomEvent("makeup-menu-mutation",{detail:{attributeName:e.attributeName}}))}function ie(t){this._unobserveMutations(),13===t.keyCode&&t.preventDefault(),13!==t.keyCode&&32!==t.keyCode||this.select(Array.from(this.items).indexOf(t.target)),this._observeMutations()}function se(t){const e=t.target.closest("[role^=menuitem]"),n=this.items.indexOf(e);-1!==n&&this.select(n)}const oe={customElementMode:!1,expandedClass:"menu-button--expanded",menuSelector:".menu-button__menu",buttonTextSelector:".btn__text",buttonValueType:"text",iconSelector:".icon"};class re{constructor(t,e){this._options=Object.assign({},oe,e),this.el=t,this._buttonEl=t.querySelector("button"),this._buttonEl.setAttribute("aria-haspopup","true"),this.menu=new ee(t.querySelector(this._options.menuSelector),{autoReset:"interactive"}),this._buttonPrefix=this._buttonEl.dataset?.makeupMenuButtonPrefix,this._buttonTextEl=this._buttonEl.querySelector(this._options.buttonTextSelector),this._expander=new it(t,{alwaysDoFocusManagement:!0,collapseOnClick:!0,collapseOnClickOut:!0,collapseOnFocusOut:!0,contentSelector:this._options.menuSelector,expandedClass:this._options.expandedClass,expandOnClick:!0,focusManagement:"focusable",hostSelector:"button"}),this._onButtonFirstClickListener=ae.bind(this),this._onMenuKeyDownListener=ce.bind(this),this._onMenuItemSelectListener=ue.bind(this),this._onMutationListener=le.bind(this),this.el.classList.add("menu-button--js"),this._options.customElementMode||(this._mutationObserver=new MutationObserver(this._onMutationListener),this._observeMutations(),this._observeEvents())}_observeMutations(){this._options.customElementMode||this._mutationObserver.observe(this.el,{attributeFilter:["aria-expanded","disabled"],attributes:!0,childList:!1,subtree:!1})}_unobserveMutations(){this._options.customElementMode||this._mutationObserver.disconnect()}_observeEvents(){!0!==this._destroyed&&(this._buttonEl.addEventListener("click",this._onButtonFirstClickListener,{once:!0}),this.menu.el.addEventListener("keydown",this._onMenuKeyDownListener),this.menu.el.addEventListener("makeup-menu-select",this._onMenuItemSelectListener),this.menu.el.addEventListener("makeup-menu-change",this._onMenuItemSelectListener))}_unobserveEvents(){this._buttonEl.removeEventListener("click",this._onButtonFirstClickListener),this.menu.el.removeEventListener("keydown",this._onMenuKeyDownListener),this.menu.el.removeEventListener("makeup-menu-select",this._onMenuItemSelectListener),this.menu.el.removeEventListener("makeup-menu-change",this._onMenuItemSelectListener)}destroy(){this._destroyed=!0,this._unobserveMutations(),this._unobserveEvents(),this._onButtonFirstClickListener=null,this._onMenuKeyDownListener=null,this._onMenuItemSelectListener=null,this._onMutationListener=null}}function le(t){for(const e of t)"attributes"===e.type&&this.el.dispatchEvent(new CustomEvent("makeup-menu-button-mutation",{detail:{attributeName:e.attributeName}}))}function ae(){this.menu.el.hidden=!1}function ce(t){27===t.keyCode&&(this._expander.expanded=!1,this._buttonEl.focus())}function ue(t){const e=this;if(setTimeout((function(){e._expander.expanded=!1,e._buttonEl.focus()}),150),"menuitemradio"!==t.detail.el.getAttribute("role"))return;const n=t.detail.el.querySelector(this._options.iconSelector).cloneNode(!0),i=t.detail.el.innerText.trim();let s=this._buttonPrefix?`${this._buttonPrefix} ${i}`:i;if(n)switch(this._options.buttonValueType){case"both":s=`${n.outerHTML} ${s} `;break;case"icon":n.setAttribute("aria-label",s),n.removeAttribute("aria-hidden"),s=n.outerHTML}this._buttonTextEl.innerHTML=s}const he={bem:{control:"switch__control"},customElementMode:!1};class de{constructor(t,e){this._options=Object.assign({},he,e),this.el=t,this._onClickListener=be.bind(this),this._onKeyDownListener=me.bind(this),this._onMutationListener=_e.bind(this),this.disabled&&this._focusableElement.setAttribute("tabindex","-1"),this.el.classList.add("switch--js"),this._options.customElementMode||(this._mutationObserver=new MutationObserver(this._onMutationListener),this._observeMutations(),this._observeEvents())}_observeMutations(){this._options.customElementMode||this._mutationObserver.observe(this._focusableElement,{attributes:!0,childList:!1,subtree:!1})}_unobserveMutations(){this._options.customElementMode||this._mutationObserver.disconnect()}_observeEvents(){this._focusableElement.addEventListener("click",this._onClickListener),this._focusableElement.addEventListener("keydown",this._onKeyDownListener)}_unobserveEvents(){this._focusableElement.removeEventListener("click",this._onClickListener),this._focusableElement.removeEventListener("keydown",this._onKeyDownListener)}get _focusableElement(){return this.el.querySelector(`.${this._options.bem.control}`)}set checked(t){this._unobserveMutations(),this._focusableElement.setAttribute("aria-checked",t.toString()),this.el.dispatchEvent(new CustomEvent("makeup-switch-toggle",{composed:!0,detail:{on:this.checked}})),this._observeMutations()}get checked(){return"true"===this._focusableElement.getAttribute("aria-checked")}set disabled(t){this._unobserveMutations(),this._focusableElement.setAttribute("aria-disabled",t.toString()),this._focusableElement.setAttribute("tabindex",t?"-1":"0"),this._observeMutations()}get disabled(){return"true"===this._focusableElement.getAttribute("aria-disabled")}set labelledby(t){if(this._unobserveMutations(),this._focusableElement.setAttribute("aria-labelledby",t),this._options.customElementMode){const t=document.getElementById(this.labelledby);t&&""!==t.innerText&&(this.label=t.innerText)}this._observeMutations()}get labelledby(){return this._focusableElement.getAttribute("aria-labelledby")}get label(){return this._focusableElement.getAttribute("aria-label")}set label(t){this._unobserveMutations(),this._focusableElement.setAttribute("aria-label",t),this._observeMutations()}toggle(){this.checked=!this.checked}destroy(){this._unobserveMutations(),this._unobserveEvents(),this._onClickListener=null,this._onKeyDownListener=null,this._onMutationListener=null}}function me(t){if(!this.disabled)switch(t.keyCode){case 32:t.preventDefault(),this.toggle();break;case 37:this.checked=!1;break;case 39:this.checked=!0}}function be(){this.disabled||this.toggle()}function _e(t){for(const e of t)"attributes"===e.type&&this.el.dispatchEvent(new CustomEvent("makeup-switch-mutation",{detail:{attributeName:e.attributeName}}))}let fe,pe,ve,Ee,ge,Le,xe,ye,we;function ke(){ye.focus()}function Ce(){we.focus()}function Se(){return fe&&(pe=Me(pe),ve=Me(ve),Ee=Me(Ee),ge=Me(ge),Le=Me(Le),xe=Me(xe),fe.classList.remove("keyboard-trap--active"),fe.dispatchEvent(new CustomEvent("keyboardUntrap",{bubbles:!0})),fe=null),fe}function Me(t){const e=t.parentNode;return e?e.removeChild(t):t}const Ae=t=>1===t.nodeType&&"body"!==t.tagName.toLowerCase()&&"html"!==t.tagName.toLowerCase(),Oe=t=>1===t.nodeType&&"script"!==t.tagName.toLowerCase(),Te=(t,e)=>t.concat(e);function De(t,e=[]){const n=t.previousSibling;return n?(e.push(n),De(n,e)):e}function Ie(t,e=[]){const n=t.nextSibling;return n?(e.push(n),Ie(n,e)):e}function Be(t){return De(t).concat(Ie(t)).filter(Oe)}function qe(t,e=[]){const n=t.parentNode;return n?(e.push(n),qe(n,e)):e}function Fe(t){return qe(t).filter(Ae)}let Re,Ne,je;const Ke=t=>"svg"!==t.tagName.toLowerCase();function He(t,e){let n;return n=!1===e?Pe(t,"aria-hidden","false"):Pe(t,"hidden",!1),n}function We(t,e){let n;return n=!1===e?Pe(t,"aria-hidden","true"):Pe(t,"hidden",!0),n}function Pe(t,e,n){const i="boolean"==typeof n;return{el:t,attributeName:e,cleanValue:i?t[e]:t.getAttribute(e),dirtyValue:n,isProperty:i}}function ze(){Ne&&(je.forEach((t=>{var e;(e=t).cleanValue?!0===e.isProperty?e.el[e.attributeName]=e.cleanValue:e.el.setAttribute(e.attributeName,e.cleanValue):e.el.removeAttribute(e.attributeName)})),je=[],Re&&Re.setAttribute("role","main"),Ne.dispatchEvent(new CustomEvent("screenreaderUntrap",{bubbles:!0})),Ne=null)}const $e={useHiddenProperty:!1};const Ve={hoist:!1,useHiddenProperty:!1,wrap:!1},Ge={SCRIPT:"script",LINK:"link"};let Ue,Xe,Ye,Je=[];function Qe(t){return"body"===t.parentNode.tagName.toLowerCase()}function Ze(){return Ue&&(Se(),ze(),Ye&&([...Ye.children].forEach((t=>{if(t.tagName.toLowerCase()!==Ge.SCRIPT&&t.tagName!==Ge.LINK){const e=Je.shift();e>document.body.children.length?document.body.appendChild(t):document.body.insertBefore(t,document.body.children[e+1])}})),Ye.remove(),Ye=null,Je=[]),Xe&&(Xe.replaceWith(Ue),Xe=null),document.body.removeAttribute("data-makeup-modal"),Ue.removeAttribute("data-makeup-modal"),Ue.dispatchEvent(new CustomEvent("makeup-unmodal",{bubbles:!1})),Ue=null),Ue}function tn(t,e){const n=Object.assign({},Ve,e);return Ze(),Ue=t,n.hoist&&(Xe||Qe(Ue)||(Xe=document.createElement("div"),Xe.setAttribute("data-makeup-modal","placeholder"),Ue.parentElement.insertBefore(Xe,Ue),document.body.appendChild(Ue))),n.wrap&&!Ye&&Qe(Ue)&&(Ye=document.createElement("div"),Ye.setAttribute("data-makeup-modal","inert"),[...document.body.children].forEach(((t,e)=>{t!==Ue&&t.tagName.toLowerCase()!==Ge.SCRIPT&&t.tagName!==Ge.LINK&&(Ye.appendChild(t),Je.push(e))})),document.body.prepend(Ye)),function(t,e){ze();const n=Object.assign({},$e,e);Ne=t,Re=document.querySelector('main, [role="main"]'),Re&&Re.setAttribute("role","presentation");const i=Fe(Ne);let s=Be(Ne),o=function(t){return Fe(t).map((t=>Be(t))).reduce(Te,[])}(Ne);!0===n.useHiddenProperty&&(s=s.filter(Ke),o=o.filter(Ke)),je=[He(Ne,n.useHiddenProperty)].concat(i.map((t=>He(t,n.useHiddenProperty)))).concat(s.map((t=>We(t,n.useHiddenProperty)))).concat(o.map((t=>We(t,n.useHiddenProperty)))),je.forEach((t=>{var e;!0===(e=t).isProperty?e.el[e.attributeName]=e.dirtyValue:e.el.setAttribute(e.attributeName,e.dirtyValue)})),Ne.dispatchEvent(new CustomEvent("screenreaderTrap",{bubbles:!0}))}(Ue,e),n.useHiddenProperty||function(t){pe?Se():(pe=function(){const t=document.createElement("div");return t.setAttribute("aria-hidden","true"),t.setAttribute("tabindex","0"),t.className="keyboard-trap-boundary",t}(),ve=pe.cloneNode(),Ee=pe.cloneNode(),ge=pe.cloneNode(),Le=pe.cloneNode(),xe=pe.cloneNode(),pe.addEventListener("focus",ke),ve.addEventListener("focus",ke),Ee.addEventListener("focus",Ce),ge.addEventListener("focus",ke),Le.addEventListener("focus",Ce),xe.addEventListener("focus",Ce)),fe=t;const e="undefined"==typeof document?null:document.body,n=P(fe,!0);ye=n[0],we=n[n.length-1],e.insertBefore(pe,e.childNodes[0]),fe.parentNode.insertBefore(ve,fe),fe.insertBefore(Ee,fe.childNodes[0]),fe.appendChild(ge),fe.parentNode.insertBefore(Le,fe.nextElementSibling),e.appendChild(xe),fe.dispatchEvent(new CustomEvent("keyboardTrap",{bubbles:!0})),fe.classList.add("keyboard-trap--active")}(Ue),document.body.setAttribute("data-makeup-modal","true"),Ue.setAttribute("data-makeup-modal","widget"),Ue.dispatchEvent(new CustomEvent("makeup-modal",{bubbles:!1})),Ue}const en="transitionend",nn=/0m?s(?:, )?/g;function sn(t,e,n){let i,s,o=0;const r=t.classList,l="".concat(e,"-init");let a=function(t){let e,n;return window.requestAnimationFrame?(e=requestAnimationFrame((function(){e=requestAnimationFrame(t)})),n=cancelAnimationFrame):(e=setTimeout(t,26),n=clearTimeout),function(){e&&(n(e),e=void 0)}}((function(){t.addEventListener(en,u,!0),r.add(e),r.remove(l),s=on(t),a=void 0,0===s&&c()}));return r.add(l),c;function c(){i||(i=!0,t.removeEventListener(en,u,!0),a?(a(),r.remove(l)):r.remove(e))}function u(){++o===s&&(i=!0,t.removeEventListener(en,u,!0),r.remove(e),n&&n())}}function on(t){let e=window.getComputedStyle(t).transitionDuration.replace(nn,"")?1:0,n=t.firstElementChild;for(;n;)e+=on(n),n=n.nextElementSibling;return e}const rn={baseClass:"dialog",closeButtonSelector:".dialog__close",focusManagementIndex:0,modal:!1,quickDismiss:!0,transitionsModifier:"mask-fade"};class ln{constructor(t,e){this._options=Object.assign({},rn,e),this._el=t,!0===this._options.modal&&this._el.setAttribute("aria-modal","true"),this._windowEl=this._el.querySelector(this._options.windowSelector),this._closeButtonEl=this._el.querySelector(this._options.closeButtonSelector),this._hasTransitions=this._el.classList.contains(`${this._options.baseClass}--${this._options.transitionsModifier}`),this._onCloseButtonClickListener=dn.bind(this),this._onKeyDownListener=hn.bind(this),this._onOpenTransitionEndCallback=cn.bind(this),this._onCloseTransitionEndCallback=un.bind(this),this._el.classList.add(`${this._options.baseClass}--js`),this.hidden||(this.modal&&an(this),this._observeEvents())}get focusables(){return P(this._windowEl)}get modal(){return"true"===this._el.getAttribute("aria-modal")}get hidden(){return this._el.hidden}open(){this._show(),this._el.dispatchEvent(new CustomEvent("dialog-open"))}close(){this._hide(),this._el.dispatchEvent(new CustomEvent("dialog-close"))}_show(){this._hasTransitions?(this._cancelTransition&&this._cancelTransition(),this._cancelTransition=sn(this._el,`${this._options.baseClass}--show`,this._onOpenTransitionEndCallback)):(this.modal&&setTimeout((()=>an(this)),50),this._el.hidden=!1),this._observeEvents()}_hide(){this._hasTransitions?(this._cancelTransition&&this._cancelTransition(),this._cancelTransition=sn(this._el,`${this._options.baseClass}--hide`,this._onCloseTransitionEndCallback)):(this.modal&&Ze(),this._el.hidden=!0),this._autoDismissTimeout=null,this._unobserveEvents()}_observeEvents(){document.addEventListener("keydown",this._onKeyDownListener),this._closeButtonEl&&this._closeButtonEl.addEventListener("click",this._onCloseButtonClickListener)}_unobserveEvents(){this._el.removeEventListener("click",this._onCloseButtonClickListener),document.removeEventListener("keydown",this._onKeyDownListener),this._closeButtonEl&&this._closeButtonEl.addEventListener("click",this._onCloseButtonClickListener)}destroy(){this._destroyed=!0,this._unobserveEvents(),this._onCloseButtonClickListener=null,this._onKeyDownListener=null,this._onOpenTransitionEndCallback=null,this._onCloseTransitionEndCallback=null,this._autoDismissTimeout=null}}function an(t){const e=t._el.querySelector("[autofocus]");e?e.focus():t.focusables[t._options.focusManagementIndex].focus(),tn(t._el)}function cn(){this._el.hidden=!1,this._cancelTransition=void 0,this.modal&&an(this)}function un(){this.modal&&Ze(),this._el.hidden=!0,this._cancelTransition=void 0}function hn(t){!0===this._options.quickDismiss&&27===t.keyCode&&this.close()}function dn(){this.close()}const mn={baseClass:"lightbox-dialog",baseClassModifier:"",quickDismiss:!0,closeButtonSelector:".lightbox-dialog__close",windowSelector:".lightbox-dialog__window"};class bn extends ln{constructor(t,e={}){super(t,Object.assign({},mn,e,{modal:!0}))}_observeEvents(){super._observeEvents(),this._onClickListener=_n.bind(this),this._el.addEventListener("click",this._onClickListener)}_unobserveEvents(){super._unobserveEvents(),this._el.removeEventListener("click",this._onClickListener)}destroy(){super.destroy(),this._onClickListener=null}}function _n(t){!0===this._options.quickDismiss&&t.target===this._el&&this.close()}const fn={baseClass:"alert-dialog",baseClassModifier:"alert",quickDismiss:!1,acknowledgeButtonSelector:".alert-dialog__acknowledge",windowSelector:".alert-dialog__window"};class pn extends bn{constructor(t,e={}){super(t,Object.assign({},fn,e))}_observeEvents(){super._observeEvents(),this._acknowledgeButtonEl=this._el.querySelector(this._options.acknowledgeButtonSelector),this._onAcknowledgeButtonClickListener=vn.bind(this),this._acknowledgeButtonEl.addEventListener("click",this._onAcknowledgeButtonClickListener)}_unobserveEvents(){super._unobserveEvents(),this._acknowledgeButtonEl.removeEventListener("click",this._onAcknowledgeButtonClickListener)}acknowledge(){this._hide(),this._el.dispatchEvent(new CustomEvent("dialog-acknowledge"))}destroy(){super.destroy(),this._onAcknowledgeButtonClickListener=null}}function vn(){this.acknowledge()}const En={baseClass:"confirm-dialog",closeButtonSelector:".confirm-dialog__close",quickDismiss:!0,confirmButtonSelector:".confirm-dialog__confirm",focusManagementIndex:1,rejectButtonSelector:".confirm-dialog__reject",windowSelector:".confirm-dialog__window"};class gn extends bn{constructor(t,e={}){super(t,Object.assign({},En,e))}_observeEvents(){super._observeEvents(),this._confirmButtonEl=this._el.querySelector(this._options.confirmButtonSelector),this._rejectButtonEl=this._el.querySelector(this._options.rejectButtonSelector),this._onConfirmButtonClickListener=Ln.bind(this),this._onRejectButtonClickListener=xn.bind(this),this._confirmButtonEl.addEventListener("click",this._onConfirmButtonClickListener),this._rejectButtonEl.addEventListener("click",this._onRejectButtonClickListener)}_unobserveEvents(){super._unobserveEvents(),this._confirmButtonEl.removeEventListener("click",this._onConfirmButtonClickListener),this._rejectButtonEl.removeEventListener("click",this._onRejectButtonClickListener)}confirm(){this._hide(),this._el.dispatchEvent(new CustomEvent("dialog-confirm"))}reject(){this._hide(),this._el.dispatchEvent(new CustomEvent("dialog-reject"))}destroy(){super.destroy(),this._onConfirmButtonClickListener=null,this._onRejectButtonClickListener=null}}function Ln(){this.confirm()}function xn(){this.reject()}const yn={baseClass:"drawer-dialog",quickDismiss:!0,closeButtonSelector:".drawer-dialog__close",focusManagementIndex:1,resizeButtonSelector:".drawer-dialog__handle",windowSelector:".drawer-dialog__window"};class wn extends bn{constructor(t,e={}){super(t,Object.assign({},yn,e))}_observeEvents(){super._observeEvents(),this._resizeButtonEl=this._el.querySelector(this._options.resizeButtonSelector),this._onResizeButtonClickListener=kn.bind(this),this._resizeButtonEl.addEventListener("click",this._onResizeButtonClickListener)}_unobserveEvents(){super._unobserveEvents(),this._resizeButtonEl.removeEventListener("click",this._onResizeButtonClickListener)}resize(){this._el.querySelector(".drawer-dialog__window").classList.toggle("drawer-dialog__window--expanded"),this._el.dispatchEvent(new CustomEvent("dialog-resize"))}destroy(){super.destroy(),this._onResizeButtonClickListener=null}}function kn(){this.resize()}const Cn={baseClass:"fullscreen-dialog",quickDismiss:!1,closeButtonSelector:".fullscreen-dialog__close",transitionsModifier:"transition",windowSelector:".fullscreen-dialog__window"};class Sn extends ln{constructor(t,e={}){super(t,Object.assign({},Cn,e,{modal:!0}))}}const Mn={baseClass:"lightbox-dialog",baseClassModifier:"input",submitButtonSelector:".lightbox-dialog__submit",cancelButtonSelector:".lightbox-dialog__cancel",windowSelector:".lightbox-dialog__window"};class An extends bn{constructor(t,e={}){super(t,Object.assign({},Mn,e))}_observeEvents(){super._observeEvents(),this._submitButtonEl=this._el.querySelector(this._options.submitButtonSelector),this._cancelButtonEl=this._el.querySelector(this._options.cancelButtonSelector),this._onSubmitButtonClickListener=On.bind(this),this._onCancelButtonClickListener=Tn.bind(this),this._submitButtonEl.addEventListener("click",this._onSubmitButtonClickListener),this._cancelButtonEl.addEventListener("click",this._onCancelButtonClickListener)}_unobserveEvents(){super._unobserveEvents(),this._submitButtonEl.removeEventListener("click",this._onSubmitButtonClickListener),this._cancelButtonEl.removeEventListener("click",this._onCancelButtonClickListener)}submit(){this._hide(),this._el.dispatchEvent(new CustomEvent("dialog-submit"))}cancel(){this._hide(),this._el.dispatchEvent(new CustomEvent("dialog-cancel"))}destroy(){super.destroy(),this._onSubmitButtonClickListener=null,this._onCancelButtonClickListener=null}}function On(){this.submit()}function Tn(){this.cancel()}const Dn={baseClass:"panel-dialog",quickDismiss:!0,closeButtonSelector:".panel-dialog__close",doneButtonSelector:".panel-dialog__done",windowSelector:".panel-dialog__window",transitionsModifier:"mask-fade-slow"};class In extends bn{constructor(t,e={}){super(t,Object.assign({},Dn,e))}}const Bn={autoDismissTimer:6e3,baseClass:"snackbar-dialog",ctaButtonSelector:".snackbar-dialog__cta",transitionsModifier:"transition"};class qn extends ln{constructor(t,e={}){super(t,Object.assign({},Bn,e)),this._autoDismissTimeout=null}_show(){super._show(),this._autoDismissTimeout=setTimeout(((t=this)=>t.close()),this._options.autoDismissTimer)}_observeEvents(){super._observeEvents(),this._ctaEl=this._el.querySelector(this._options.ctaButtonSelector),this._ctaEl&&(this._onCtaClickListener=Fn.bind(this),this._ctaEl.addEventListener("click",this._onCtaClickListener))}_unobserveEvents(){super._unobserveEvents(),this._ctaEl&&this._ctaEl.removeEventListener("click",this._onCtaClickListener)}cta(){this._hide(),this._el.dispatchEvent(new CustomEvent("dialog-cta"))}destroy(){super.destroy(),this._onCtaClickListener=null}}function Fn(){this.cta()}const Rn={baseClass:"toast-dialog",closeButtonSelector:".toast-dialog__close",ctaButtonSelector:".toast-dialog__cta",transitionsModifier:"transition"};class Nn extends ln{constructor(t,e={}){super(t,Object.assign({},Rn,e))}_show(){super._show()}_observeEvents(){super._observeEvents(),this._ctaEl=this._el.querySelector(this._options.ctaButtonSelector),this._ctaEl&&(this._onCtaClickListener=jn.bind(this),this._ctaEl.addEventListener("click",this._onCtaClickListener))}_unobserveEvents(){super._unobserveEvents(),this._ctaEl&&this._ctaEl.removeEventListener("click",this._onCtaClickListener)}cta(){this._hide(),this._el.dispatchEvent(new CustomEvent("dialog-cta"))}destroy(){super.destroy(),this._onCtaClickListener=null}}function jn(){this.cta()}const Kn=Math.min,Hn=Math.max,Wn=Math.round,Pn=Math.floor,zn=t=>({x:t,y:t}),$n={left:"right",right:"left",bottom:"top",top:"bottom"},Vn={start:"end",end:"start"};function Gn(t,e,n){return Hn(t,Kn(e,n))}function Un(t,e){return"function"==typeof t?t(e):t}function Xn(t){return t.split("-")[0]}function Yn(t){return t.split("-")[1]}function Jn(t){return"x"===t?"y":"x"}function Qn(t){return"y"===t?"height":"width"}function Zn(t){return["top","bottom"].includes(Xn(t))?"y":"x"}function ti(t){return Jn(Zn(t))}function ei(t){return t.replace(/start|end/g,(t=>Vn[t]))}function ni(t){return t.replace(/left|right|bottom|top/g,(t=>$n[t]))}function ii(t){return"number"!=typeof t?function(t){return{top:0,right:0,bottom:0,left:0,...t}}(t):{top:t,right:t,bottom:t,left:t}}function si(t){return{...t,top:t.y,left:t.x,right:t.x+t.width,bottom:t.y+t.height}}function oi(t,e,n){let{reference:i,floating:s}=t;const o=Zn(e),r=ti(e),l=Qn(r),a=Xn(e),c="y"===o,u=i.x+i.width/2-s.width/2,h=i.y+i.height/2-s.height/2,d=i[l]/2-s[l]/2;let m;switch(a){case"top":m={x:u,y:i.y-s.height};break;case"bottom":m={x:u,y:i.y+i.height};break;case"right":m={x:i.x+i.width,y:h};break;case"left":m={x:i.x-s.width,y:h};break;default:m={x:i.x,y:i.y}}switch(Yn(e)){case"start":m[r]-=d*(n&&c?-1:1);break;case"end":m[r]+=d*(n&&c?-1:1)}return m}async function ri(t,e){var n;void 0===e&&(e={});const{x:i,y:s,platform:o,rects:r,elements:l,strategy:a}=t,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:h="floating",altBoundary:d=!1,padding:m=0}=Un(e,t),b=ii(m),_=l[d?"floating"===h?"reference":"floating":h],f=si(await o.getClippingRect({element:null==(n=await(null==o.isElement?void 0:o.isElement(_)))||n?_:_.contextElement||await(null==o.getDocumentElement?void 0:o.getDocumentElement(l.floating)),boundary:c,rootBoundary:u,strategy:a})),p="floating"===h?{...r.floating,x:i,y:s}:r.reference,v=await(null==o.getOffsetParent?void 0:o.getOffsetParent(l.floating)),E=await(null==o.isElement?void 0:o.isElement(v))&&await(null==o.getScale?void 0:o.getScale(v))||{x:1,y:1},g=si(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:p,offsetParent:v,strategy:a}):p);return{top:(f.top-g.top+b.top)/E.y,bottom:(g.bottom-f.bottom+b.bottom)/E.y,left:(f.left-g.left+b.left)/E.x,right:(g.right-f.right+b.right)/E.x}}function li(t){const e=Kn(...t.map((t=>t.left))),n=Kn(...t.map((t=>t.top)));return{x:e,y:n,width:Hn(...t.map((t=>t.right)))-e,height:Hn(...t.map((t=>t.bottom)))-n}}function ai(t){return hi(t)?(t.nodeName||"").toLowerCase():"#document"}function ci(t){var e;return(null==t||null==(e=t.ownerDocument)?void 0:e.defaultView)||window}function ui(t){var e;return null==(e=(hi(t)?t.ownerDocument:t.document)||window.document)?void 0:e.documentElement}function hi(t){return t instanceof Node||t instanceof ci(t).Node}function di(t){return t instanceof Element||t instanceof ci(t).Element}function mi(t){return t instanceof HTMLElement||t instanceof ci(t).HTMLElement}function bi(t){return"undefined"!=typeof ShadowRoot&&(t instanceof ShadowRoot||t instanceof ci(t).ShadowRoot)}function _i(t){const{overflow:e,overflowX:n,overflowY:i,display:s}=gi(t);return/auto|scroll|overlay|hidden|clip/.test(e+i+n)&&!["inline","contents"].includes(s)}function fi(t){return["table","td","th"].includes(ai(t))}function pi(t){const e=vi(),n=gi(t);return"none"!==n.transform||"none"!==n.perspective||!!n.containerType&&"normal"!==n.containerType||!e&&!!n.backdropFilter&&"none"!==n.backdropFilter||!e&&!!n.filter&&"none"!==n.filter||["transform","perspective","filter"].some((t=>(n.willChange||"").includes(t)))||["paint","layout","strict","content"].some((t=>(n.contain||"").includes(t)))}function vi(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function Ei(t){return["html","body","#document"].includes(ai(t))}function gi(t){return ci(t).getComputedStyle(t)}function Li(t){return di(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function xi(t){if("html"===ai(t))return t;const e=t.assignedSlot||t.parentNode||bi(t)&&t.host||ui(t);return bi(e)?e.host:e}function yi(t){const e=xi(t);return Ei(e)?t.ownerDocument?t.ownerDocument.body:t.body:mi(e)&&_i(e)?e:yi(e)}function wi(t,e,n){var i;void 0===e&&(e=[]),void 0===n&&(n=!0);const s=yi(t),o=s===(null==(i=t.ownerDocument)?void 0:i.body),r=ci(s);return o?e.concat(r,r.visualViewport||[],_i(s)?s:[],r.frameElement&&n?wi(r.frameElement):[]):e.concat(s,wi(s,[],n))}function ki(t){const e=gi(t);let n=parseFloat(e.width)||0,i=parseFloat(e.height)||0;const s=mi(t),o=s?t.offsetWidth:n,r=s?t.offsetHeight:i,l=Wn(n)!==o||Wn(i)!==r;return l&&(n=o,i=r),{width:n,height:i,$:l}}function Ci(t){return di(t)?t:t.contextElement}function Si(t){const e=Ci(t);if(!mi(e))return zn(1);const n=e.getBoundingClientRect(),{width:i,height:s,$:o}=ki(e);let r=(o?Wn(n.width):n.width)/i,l=(o?Wn(n.height):n.height)/s;return r&&Number.isFinite(r)||(r=1),l&&Number.isFinite(l)||(l=1),{x:r,y:l}}const Mi=zn(0);function Ai(t){const e=ci(t);return vi()&&e.visualViewport?{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}:Mi}function Oi(t,e,n,i){void 0===e&&(e=!1),void 0===n&&(n=!1);const s=t.getBoundingClientRect(),o=Ci(t);let r=zn(1);e&&(i?di(i)&&(r=Si(i)):r=Si(t));const l=function(t,e,n){return void 0===e&&(e=!1),!(!n||e&&n!==ci(t))&&e}(o,n,i)?Ai(o):zn(0);let a=(s.left+l.x)/r.x,c=(s.top+l.y)/r.y,u=s.width/r.x,h=s.height/r.y;if(o){const t=ci(o),e=i&&di(i)?ci(i):i;let n=t,s=n.frameElement;for(;s&&i&&e!==n;){const t=Si(s),e=s.getBoundingClientRect(),i=gi(s),o=e.left+(s.clientLeft+parseFloat(i.paddingLeft))*t.x,r=e.top+(s.clientTop+parseFloat(i.paddingTop))*t.y;a*=t.x,c*=t.y,u*=t.x,h*=t.y,a+=o,c+=r,n=ci(s),s=n.frameElement}}return si({width:u,height:h,x:a,y:c})}const Ti=[":popover-open",":modal"];function Di(t){return Ti.some((e=>{try{return t.matches(e)}catch(t){return!1}}))}function Ii(t){return Oi(ui(t)).left+Li(t).scrollLeft}function Bi(t,e,n){let i;if("viewport"===e)i=function(t,e){const n=ci(t),i=ui(t),s=n.visualViewport;let o=i.clientWidth,r=i.clientHeight,l=0,a=0;if(s){o=s.width,r=s.height;const t=vi();(!t||t&&"fixed"===e)&&(l=s.offsetLeft,a=s.offsetTop)}return{width:o,height:r,x:l,y:a}}(t,n);else if("document"===e)i=function(t){const e=ui(t),n=Li(t),i=t.ownerDocument.body,s=Hn(e.scrollWidth,e.clientWidth,i.scrollWidth,i.clientWidth),o=Hn(e.scrollHeight,e.clientHeight,i.scrollHeight,i.clientHeight);let r=-n.scrollLeft+Ii(t);const l=-n.scrollTop;return"rtl"===gi(i).direction&&(r+=Hn(e.clientWidth,i.clientWidth)-s),{width:s,height:o,x:r,y:l}}(ui(t));else if(di(e))i=function(t,e){const n=Oi(t,!0,"fixed"===e),i=n.top+t.clientTop,s=n.left+t.clientLeft,o=mi(t)?Si(t):zn(1);return{width:t.clientWidth*o.x,height:t.clientHeight*o.y,x:s*o.x,y:i*o.y}}(e,n);else{const n=Ai(t);i={...e,x:e.x-n.x,y:e.y-n.y}}return si(i)}function qi(t,e){const n=xi(t);return!(n===e||!di(n)||Ei(n))&&("fixed"===gi(n).position||qi(n,e))}function Fi(t,e,n){const i=mi(e),s=ui(e),o="fixed"===n,r=Oi(t,!0,o,e);let l={scrollLeft:0,scrollTop:0};const a=zn(0);if(i||!i&&!o)if(("body"!==ai(e)||_i(s))&&(l=Li(e)),i){const t=Oi(e,!0,o,e);a.x=t.x+e.clientLeft,a.y=t.y+e.clientTop}else s&&(a.x=Ii(s));return{x:r.left+l.scrollLeft-a.x,y:r.top+l.scrollTop-a.y,width:r.width,height:r.height}}function Ri(t,e){return mi(t)&&"fixed"!==gi(t).position?e?e(t):t.offsetParent:null}function Ni(t,e){const n=ci(t);if(!mi(t)||Di(t))return n;let i=Ri(t,e);for(;i&&fi(i)&&"static"===gi(i).position;)i=Ri(i,e);return i&&("html"===ai(i)||"body"===ai(i)&&"static"===gi(i).position&&!pi(i))?n:i||function(t){let e=xi(t);for(;mi(e)&&!Ei(e);){if(pi(e))return e;e=xi(e)}return null}(t)||n}const ji={convertOffsetParentRelativeRectToViewportRelativeRect:function(t){let{elements:e,rect:n,offsetParent:i,strategy:s}=t;const o="fixed"===s,r=ui(i),l=!!e&&Di(e.floating);if(i===r||l&&o)return n;let a={scrollLeft:0,scrollTop:0},c=zn(1);const u=zn(0),h=mi(i);if((h||!h&&!o)&&(("body"!==ai(i)||_i(r))&&(a=Li(i)),mi(i))){const t=Oi(i);c=Si(i),u.x=t.x+i.clientLeft,u.y=t.y+i.clientTop}return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-a.scrollLeft*c.x+u.x,y:n.y*c.y-a.scrollTop*c.y+u.y}},getDocumentElement:ui,getClippingRect:function(t){let{element:e,boundary:n,rootBoundary:i,strategy:s}=t;const o=[..."clippingAncestors"===n?function(t,e){const n=e.get(t);if(n)return n;let i=wi(t,[],!1).filter((t=>di(t)&&"body"!==ai(t))),s=null;const o="fixed"===gi(t).position;let r=o?xi(t):t;for(;di(r)&&!Ei(r);){const e=gi(r),n=pi(r);n||"fixed"!==e.position||(s=null),(o?!n&&!s:!n&&"static"===e.position&&s&&["absolute","fixed"].includes(s.position)||_i(r)&&!n&&qi(t,r))?i=i.filter((t=>t!==r)):s=e,r=xi(r)}return e.set(t,i),i}(e,this._c):[].concat(n),i],r=o[0],l=o.reduce(((t,n)=>{const i=Bi(e,n,s);return t.top=Hn(i.top,t.top),t.right=Kn(i.right,t.right),t.bottom=Kn(i.bottom,t.bottom),t.left=Hn(i.left,t.left),t}),Bi(e,r,s));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}},getOffsetParent:Ni,getElementRects:async function(t){const e=this.getOffsetParent||Ni,n=this.getDimensions;return{reference:Fi(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,...await n(t.floating)}}},getClientRects:function(t){return Array.from(t.getClientRects())},getDimensions:function(t){const{width:e,height:n}=ki(t);return{width:e,height:n}},getScale:Si,isElement:di,isRTL:function(t){return"rtl"===gi(t).direction}};const Ki=function(t){return void 0===t&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:i,placement:s}=e,{mainAxis:o=!0,crossAxis:r=!1,limiter:l={fn:t=>{let{x:e,y:n}=t;return{x:e,y:n}}},...a}=Un(t,e),c={x:n,y:i},u=await ri(e,a),h=Zn(Xn(s)),d=Jn(h);let m=c[d],b=c[h];if(o){const t="y"===d?"bottom":"right";m=Gn(m+u["y"===d?"top":"left"],m,m-u[t])}if(r){const t="y"===h?"bottom":"right";b=Gn(b+u["y"===h?"top":"left"],b,b-u[t])}const _=l.fn({...e,[d]:m,[h]:b});return{..._,data:{x:_.x-n,y:_.y-i}}}}},Hi=function(t){return void 0===t&&(t={}),{name:"flip",options:t,async fn(e){var n,i;const{placement:s,middlewareData:o,rects:r,initialPlacement:l,platform:a,elements:c}=e,{mainAxis:u=!0,crossAxis:h=!0,fallbackPlacements:d,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:b="none",flipAlignment:_=!0,...f}=Un(t,e);if(null!=(n=o.arrow)&&n.alignmentOffset)return{};const p=Xn(s),v=Xn(l)===l,E=await(null==a.isRTL?void 0:a.isRTL(c.floating)),g=d||(v||!_?[ni(l)]:function(t){const e=ni(t);return[ei(t),e,ei(e)]}(l));d||"none"===b||g.push(...function(t,e,n,i){const s=Yn(t);let o=function(t,e,n){const i=["left","right"],s=["right","left"],o=["top","bottom"],r=["bottom","top"];switch(t){case"top":case"bottom":return n?e?s:i:e?i:s;case"left":case"right":return e?o:r;default:return[]}}(Xn(t),"start"===n,i);return s&&(o=o.map((t=>t+"-"+s)),e&&(o=o.concat(o.map(ei)))),o}(l,_,b,E));const L=[l,...g],x=await ri(e,f),y=[];let w=(null==(i=o.flip)?void 0:i.overflows)||[];if(u&&y.push(x[p]),h){const t=function(t,e,n){void 0===n&&(n=!1);const i=Yn(t),s=ti(t),o=Qn(s);let r="x"===s?i===(n?"end":"start")?"right":"left":"start"===i?"bottom":"top";return e.reference[o]>e.floating[o]&&(r=ni(r)),[r,ni(r)]}(s,r,E);y.push(x[t[0]],x[t[1]])}if(w=[...w,{placement:s,overflows:y}],!y.every((t=>t<=0))){var k,C;const t=((null==(k=o.flip)?void 0:k.index)||0)+1,e=L[t];if(e)return{data:{index:t,overflows:w},reset:{placement:e}};let n=null==(C=w.filter((t=>t.overflows[0]<=0)).sort(((t,e)=>t.overflows[1]-e.overflows[1]))[0])?void 0:C.placement;if(!n)switch(m){case"bestFit":{var S;const t=null==(S=w.map((t=>[t.placement,t.overflows.filter((t=>t>0)).reduce(((t,e)=>t+e),0)])).sort(((t,e)=>t[1]-e[1]))[0])?void 0:S[0];t&&(n=t);break}case"initialPlacement":n=l}if(s!==n)return{reset:{placement:n}}}return{}}}},Wi=t=>({name:"arrow",options:t,async fn(e){const{x:n,y:i,placement:s,rects:o,platform:r,elements:l,middlewareData:a}=e,{element:c,padding:u=0}=Un(t,e)||{};if(null==c)return{};const h=ii(u),d={x:n,y:i},m=ti(s),b=Qn(m),_=await r.getDimensions(c),f="y"===m,p=f?"top":"left",v=f?"bottom":"right",E=f?"clientHeight":"clientWidth",g=o.reference[b]+o.reference[m]-d[m]-o.floating[b],L=d[m]-o.reference[m],x=await(null==r.getOffsetParent?void 0:r.getOffsetParent(c));let y=x?x[E]:0;y&&await(null==r.isElement?void 0:r.isElement(x))||(y=l.floating[E]||o.floating[b]);const w=g/2-L/2,k=y/2-_[b]/2-1,C=Kn(h[p],k),S=Kn(h[v],k),M=C,A=y-_[b]-S,O=y/2-_[b]/2+w,T=Gn(M,O,A),D=!a.arrow&&null!=Yn(s)&&O!==T&&o.reference[b]/2-(Ot.y-e.y)),n=[];let i=null;for(let t=0;ti.height/2?n.push([s]):n[n.length-1].push(s),i=s}return n.map((t=>si(li(t))))}(u),d=si(li(u)),m=ii(l),b=await o.getElementRects({reference:{getBoundingClientRect:function(){if(2===h.length&&h[0].left>h[1].right&&null!=a&&null!=c)return h.find((t=>a>t.left-m.left&&at.top-m.top&&c=2){if("y"===Zn(n)){const t=h[0],e=h[h.length-1],i="top"===Xn(n),s=t.top,o=e.bottom,r=i?t.left:e.left,l=i?t.right:e.right;return{top:s,bottom:o,left:r,right:l,width:l-r,height:o-s,x:r,y:s}}const t="left"===Xn(n),e=Hn(...h.map((t=>t.right))),i=Kn(...h.map((t=>t.left))),s=h.filter((n=>t?n.left===i:n.right===e)),o=s[0].top,r=s[s.length-1].bottom;return{top:o,bottom:r,left:i,right:e,width:e-i,height:r-o,x:i,y:o}}return d}},floating:i.floating,strategy:r});return s.reference.x!==b.reference.x||s.reference.y!==b.reference.y||s.reference.width!==b.reference.width||s.reference.height!==b.reference.height?{reset:{rects:b}}:{}}}};if(void 0!==window.URLSearchParams){const t=new URLSearchParams(location.search);t.has("debug")&&"1"===t.get("debug")&&document.querySelectorAll(".page-grid").forEach((t=>{t.classList.add("page-grid--debug")})),t.has("dark")&&"1"===t.get("dark")&&document.querySelector("body").classList.add("skin-experiment-dark-mode")}const zi=[];let $i;const Vi=t=>console.log(t.type,t.detail);document.getElementById("busy-button").addEventListener("click",(function(){const t=this;t.setAttribute("aria-label","Busy..."),t.innerHTML='\n \n \n \n \n \n \n \n ',window.setTimeout((function(){t.removeAttribute("aria-label"),t.innerHTML="Activate Spinner"}),2e3)})),document.querySelectorAll('.checkbox input[aria-checked="mixed"]').forEach((function(t){t.addEventListener("click",(function(){const t=!0===this.checked;this.setAttribute("aria-checked",t?"mixed":"false")}))})),document.querySelectorAll(".breadcrumbs").forEach((function(t){const e=t.offsetWidth,n=t.scrollWidth-e;n&&t.scroll(n,0)})),document.querySelectorAll(".expand-btn").forEach((function(t){t.addEventListener("click",(function(){const t="true"===this.getAttribute("aria-expanded");this.setAttribute("aria-expanded",!t)}))})),document.querySelectorAll(".filter-menu-button--form button").forEach((function(t){t.addEventListener("click",(function(){const t="true"===this.getAttribute("aria-expanded");this.setAttribute("aria-expanded",!t)}))})),document.querySelectorAll(".fake-menu-button").forEach((function(t){let e=".icon-btn";t.querySelector(".expand-btn")?e=".expand-btn":t.querySelector(".btn")&&(e=".btn"),zi.push(new it(t,{expandOnClick:!0,collapseOnFocusOut:!0,collapseOnClickOut:!0,contentSelector:".fake-menu-button__menu",focusManagement:"focusable",hostSelector:e}))})),document.querySelectorAll(".combobox").forEach((function(t){zi.push(new Tt(t)),t.addEventListener("makeup-combobox-change",Vi)})),document.querySelectorAll(".dialog-button").forEach((function(t){const e=t.dataset.makeupFor,n=document.getElementById(e),i=n.classList;let s;i.contains("confirm-dialog")?s=new gn(n):i.contains("alert-dialog")?s=new pn(n):i.contains("lightbox-dialog--input")?s=new An(n):i.contains("fullscreen-dialog")?s=new Sn(n):i.contains("snackbar-dialog")?s=new qn(n):i.contains("toast-dialog")?s=new Nn(n):i.contains("drawer-dialog")?s=new wn(n):i.contains("panel-dialog")?s=new In(n):i.contains("lightbox-dialog")&&(s=new bn(n)),zi.push(new Wt(t,s)),s._el.addEventListener("dialog-open",Vi),s._el.addEventListener("dialog-close",Vi),s._el.addEventListener("dialog-acknowledge",Vi),s._el.addEventListener("dialog-confirm",Vi),s._el.addEventListener("dialog-reject",Vi),s._el.addEventListener("dialog-cta",Vi)}));class Gi{constructor(t,e){this.messageContainerEl=t.querySelector(".expressive-loader__messages"),this.messages=e,this.messageContainerEl&&this.messages&&(this.isInitialized=!0,this.nextMessageEl=t.querySelector('[aria-hidden="true"]'),this.currentMessageEl=t.querySelector('[role="status"]'),this.messageIndex=0,this.message=this.messages[this.messageIndex])}queueNextMessage(){this.isInitialized&&this.messages.length>1&&(this.messageIndex=(this.messageIndex+1)%this.messages.length,this.message=this.messages[this.messageIndex],this.nextMessageEl.innerText=this.messages[this.messageIndex],this.nextMessageEl.classList.add("expressive-loader__message--in"),this.currentMessageEl.classList.add("expressive-loader__message--out"),setTimeout(this.showMessage.bind(this),833))}showMessage(){this.isInitialized&&(this.currentMessageEl.innerText=this.message,this.currentMessageEl.classList.remove("expressive-loader__message--out"),this.nextMessageEl.classList.remove("expressive-loader__message--in"),setTimeout(this.queueNextMessage.bind(this),2e3))}}document.querySelectorAll(".expressive-loader-messages-example").forEach((function(t){const e=new Gi(t,["Hang tight.","We're finishing your order.","Just another moment."]);e.isInitialized&&e.queueNextMessage()}));class Ui{constructor(t,e){this.host=t.querySelector(".".concat(e,"__host")),this.overlay=t.querySelector(".".concat(e,"__overlay")),this.arrowEl=t.querySelector(".".concat(e,"__pointer")),this.host&&this.overlay&&(this.isInitialized=!0)}init(){this.cleanup=function(t,e,n,i){void 0===i&&(i={});const{ancestorScroll:s=!0,ancestorResize:o=!0,elementResize:r="function"==typeof ResizeObserver,layoutShift:l="function"==typeof IntersectionObserver,animationFrame:a=!1}=i,c=Ci(t),u=s||o?[...c?wi(c):[],...wi(e)]:[];u.forEach((t=>{s&&t.addEventListener("scroll",n,{passive:!0}),o&&t.addEventListener("resize",n)}));const h=c&&l?function(t,e){let n,i=null;const s=ui(t);function o(){var t;clearTimeout(n),null==(t=i)||t.disconnect(),i=null}return function r(l,a){void 0===l&&(l=!1),void 0===a&&(a=1),o();const{left:c,top:u,width:h,height:d}=t.getBoundingClientRect();if(l||e(),!h||!d)return;const m={rootMargin:-Pn(u)+"px "+-Pn(s.clientWidth-(c+h))+"px "+-Pn(s.clientHeight-(u+d))+"px "+-Pn(c)+"px",threshold:Hn(0,Kn(1,a))||1};let b=!0;function _(t){const e=t[0].intersectionRatio;if(e!==a){if(!b)return r();e?r(!1,e):n=setTimeout((()=>{r(!1,1e-7)}),100)}b=!1}try{i=new IntersectionObserver(_,{...m,root:s.ownerDocument})}catch(t){i=new IntersectionObserver(_,m)}i.observe(t)}(!0),o}(c,n):null;let d,m=-1,b=null;r&&(b=new ResizeObserver((t=>{let[i]=t;i&&i.target===c&&b&&(b.unobserve(e),cancelAnimationFrame(m),m=requestAnimationFrame((()=>{var t;null==(t=b)||t.observe(e)}))),n()})),c&&!a&&b.observe(c),b.observe(e));let _=a?Oi(t):null;return a&&function e(){const i=Oi(t);!_||i.x===_.x&&i.y===_.y&&i.width===_.width&&i.height===_.height||n(),_=i,d=requestAnimationFrame(e)}(),n(),()=>{var t;u.forEach((t=>{s&&t.removeEventListener("scroll",n),o&&t.removeEventListener("resize",n)})),null==h||h(),null==(t=b)||t.disconnect(),b=null,a&&cancelAnimationFrame(d)}}(this.host,this.overlay,this.update.bind(this))}update(){var t;this.isInitialized&&((t,e,n)=>{const i=new Map,s={platform:ji,...n},o={...s.platform,_c:i};return(async(t,e,n)=>{const{placement:i="bottom",strategy:s="absolute",middleware:o=[],platform:r}=n,l=o.filter(Boolean),a=await(null==r.isRTL?void 0:r.isRTL(e));let c=await r.getElementRects({reference:t,floating:e,strategy:s}),{x:u,y:h}=oi(c,i,a),d=i,m={},b=0;for(let n=0;n{let{x:e,y:n,placement:i,middlewareData:s}=t;if(Object.assign(this.overlay.style,{left:"".concat(e,"px"),top:"".concat(n,"px")}),s.arrow){const{x:t,y:e}=s.arrow,n={top:"bottom",right:"left",bottom:"top",left:"right"}[i.split("-")[0]];Object.assign(this.arrowEl.style,{left:null!=t?"".concat(t,"px"):"",top:null!=e?"".concat(e,"px"):"",right:"",bottom:"",[n]:"-4px"})}}))}show(){this.host.setAttribute("aria-expanded","true"),this.init()}isExpanded(){return console.log(this.host,this.host.getAttribute("aria-expanded")),"true"===this.host.getAttribute("aria-expanded")}hide(){this.isExpanded()&&(this.host.setAttribute("aria-expanded","false"),this.cleanup&&this.cleanup())}}document.querySelectorAll(".tooltip").forEach((function(t){t.classList.contains("tooltip--js")||zi.push(new it(t,{contentSelector:".tooltip__overlay",collapseOnFocusOut:!0,collapseOnMouseOut:!0,expandOnFocus:!0,expandOnHover:!0,focusManagement:"focusable",hostSelector:".tooltip__host"}))})),document.querySelectorAll(".tooltip--js").forEach((function(t){const e=new Ui(t,"tooltip");e.isInitialized&&(["mouseenter","focus"].forEach((t=>{e.host.addEventListener(t,(()=>e.show()))})),["mouseleave","blur"].forEach((t=>{e.host.addEventListener(t,(()=>e.hide()))})))})),document.querySelectorAll(".infotip").forEach((function(t){if(t.classList.contains("infotip--js"))return;const e=t.querySelector("button"),n=".infotip__host";if(!t.querySelector(n))return;const i=new it(t,{contentSelector:".infotip__overlay",expandOnFocus:!1,expandOnClick:!0,hostSelector:n});t.querySelector(".infotip__close").addEventListener("click",(function(){i.expanded=!1,e.focus()}))})),document.querySelectorAll(".infotip--js").forEach((function(t){const e=new Ui(t,"infotip");if(!e.isInitialized)return;console.log("init",t),e.host.addEventListener("click",(()=>{e.isExpanded()?e.hide():e.show()}));const n=t.querySelector("button");t.querySelector(".infotip__close").addEventListener("click",(function(){n.focus(),e.isInitialized&&e.hide()}))})),document.querySelectorAll(".tourtip").forEach((function(t){t.classList.contains("tourtip--js")||t.querySelector(".tourtip__close").addEventListener("click",(function(){t.classList.remove("tourtip--expanded")}))})),document.querySelectorAll(".tourtip--js").forEach((function(t){const e=new Ui(t,"tourtip");e.isInitialized&&(e.init(),t.querySelector(".tourtip__close").addEventListener("click",(function(){t.classList.remove("tourtip--expanded"),e.hide()})))})),document.querySelectorAll(".floating-label").forEach((function(t){zi.push(new bt(t))})),document.querySelectorAll(".progress-bar-toggle").forEach((function(t){const e=t.dataset.progressPlayButtonFor,n=document.getElementById(e),i=function(){const t=n.value+10;let e;e=t>100?100:t,n.value=e};t.addEventListener("click",(function(){$i?(clearInterval($i),$i=null):(i(),$i=setInterval(i,1e3))}))})),document.querySelectorAll(".progress-bar-reset").forEach((function(t){const e=t.dataset.progressResetButtonFor,n=document.getElementById(e);t.addEventListener("click",(function(){$i&&(clearInterval($i),$i=null),n.value=0}))})),document.querySelectorAll(".star-rating-select").forEach((function(t){t.addEventListener("change",(function(e){const n=e.target.value-1;t.querySelectorAll("input").forEach((function(t,e){t.classList.toggle("star-rating-select__control--filled",e{let n;return function(){for(var t=arguments.length,e=new Array(t),i=0;i{n=null,function(t,e){let n="off";const i=t.value.length,s=e.innerHTML.split(/([0-9]+)( \w+ )([0-9]+)/g);if(s.length<=1)return;s[1]=i;const o=s[3];e.innerHTML=s.join(""),i>=o&&(n="polite"),t.setAttribute("aria-live",n)}(...e)}),500)}})();document.querySelectorAll(".field").forEach((function(t){const e=t.querySelector("input,textarea"),n=e&&e.dataset.fieldCount;if(n){const i=t.querySelector("#".concat(n));e.addEventListener("keydown",Xi.bind(this,e,i))}})),document.querySelectorAll(".chips-combobox").forEach((function(t){const e=t.querySelector(".chips-combobox__items"),n=t.querySelector(".chips-combobox__combobox").querySelector(".combobox__options"),i="div.combobox__option",s="button.chip__button";t.addEventListener("click",(function(t){const o=t.target;if(o.matches(i)||o.matches(s)){if(o.matches(i)){const t=o.innerText.trim();n.removeChild(o),function(t){const n='\n \n \n \n '.concat(t,'\n \n \n \n \n \n \n \n \n ');e.insertAdjacentHTML("beforeend",n)}(t)}if(o.matches(s)){const t=o.previousElementSibling.innerText.trim(),i=o.closest("li");e.removeChild(i),function(t){const e='\n \n '.concat(t," \n
\n ");n.insertAdjacentHTML("beforeend",e)}(t)}}}))}))})();
+(()=>{"use strict";function t(t){!function(t,e,n){if(!t.shiftKey){const s=t.key;switch(s){case"Enter":case"Escape":case"PageUp":case"PageDown":case"End":case"Home":case"ArrowLeft":case"ArrowUp":case"ArrowRight":case"ArrowDown":e.dispatchEvent(new CustomEvent((i=`${s}Key${n}`).charAt(0).toLowerCase()+i.slice(1),{detail:t,bubbles:!0}));break;case" ":e.dispatchEvent(new CustomEvent(`spacebarKey${n}`,{detail:t,bubbles:!0}));break;default:return}}var i}(t,this,"Down")}const e={},n="nid",i=function(t){const e="abcdefghijklmnopqrstuvwxyz",n=e+"0123456789";let i=e[s(25)];for(let t=1;t<3;t++)i+=n[s(35)];return i}();function s(t){return Math.floor(Math.random()*t)}function o(t,s=n){const o=`${s}${""===s?"":"-"}${i}`;return e[o]=e[o]||0,t.id||t.setAttribute("id",`${o}-${e[o]++}`),t.id}const r={};function l(t,e,n){t.dispatchEvent(new CustomEvent("focusExit",{detail:{fromElement:e,toElement:n},bubbles:!1}))}function a(t){const e=t.target;!0===this.el.contains(e)?this.currentFocusElement=e:(window.removeEventListener("blur",this.onWindowBlurListener),document.removeEventListener("focusin",this.onDocumentFocusInListener),l(this.el,this.currentFocusElement,e),this.currentFocusElement=null)}function c(){l(this.el,this.currentFocusElement,void 0)}function u(){document.addEventListener("focusin",this.onDocumentFocusInListener),window.addEventListener("blur",this.onWindowBlurListener)}class h{constructor(t){this.el=t,this.currentFocusElement=null,this.onWidgetFocusInListener=u.bind(this),this.onDocumentFocusInListener=a.bind(this),this.onWindowBlurListener=c.bind(this),this.el.addEventListener("focusin",this.onWidgetFocusInListener)}removeEventListeners(){window.removeEventListener("blur",this.onWindowBlurListener),document.removeEventListener("focusin",this.onDocumentFocusInListener),this.el.removeEventListener("focusin",this.onWidgetFocusInListener)}}function d(t){let e=null;return o(t),r[t.id]||(e=new h(t),r[t.id]=e),e}const m={axis:"both",autoInit:"interactive",autoReset:"current",ignoreByDelegateSelector:null,wrap:!1};function b(t){return!t.hidden&&"true"!==t.getAttribute("aria-disabled")}function _(t,e){return e>=0&&eb(t)))}function p(t){return t.indexOf(function(t){return t.filter(b)}(t).reverse()[0])}function v(t,e,n){return t.findIndex((t=>b(t)&&t.getAttribute(e)===n))}function E(t){return v(t,"aria-selected","true")}function g(t,e){return null!==e.ignoreByDelegateSelector?[...t.querySelectorAll(e.ignoreByDelegateSelector)]:[]}function L(t,e,n){let i=-1;switch(t){case"none":i=null;break;case"current":i=n;break;case"interactive":i=f(e);break;case"ariaChecked":i=function(t){return v(t,"aria-checked","true")}(e);break;case"ariaSelected":i=E(e);break;case"ariaSelectedOrInteractive":i=E(e),i=-1===i?f(e):i;break;default:i="number"==typeof t||null===t?t:-1}return i}function x(t){const e=g(this._el,this.options);0!==e.length&&e.includes(t.detail.target)||(this.index=function(t,e,n){let i=-1;if(null===e);else if(function(t,e){return e===f(t)}(t,e))!0===n&&(i=p(t));else{let n=e;for(;--n>=0;)if(b(t[n])){i=n;break}}return i}(this.items,this.index,this.options.wrap))}function y(t){const e=g(this._el,this.options);0!==e.length&&e.includes(t.detail.target)||(this.index=function(t,e,n){let i=-1;if(null===e)i=f(t);else if(function(t,e){return e===p(t)}(t,e))!0===n&&(i=f(t));else{let n=e;for(;++n0&&[...o].includes(this._cachedElement)?n=f(this.items):(o.length>0||i.length>0)&&(n=this.indexOf(this._cachedElement))),this._index=n,this._el.dispatchEvent(new CustomEvent("navigationModelMutation",{bubbles:!1,detail:{fromIndex:e,toIndex:n}}))}class A{constructor(t,e,n){this.options=Object.assign({},m,n),this._el=t,this._itemSelector=e}}class O extends A{constructor(t,e,n){super(t,e,n);const i=this._index,s=L(this.options.autoInit,this.items,this.index);this._index=s,this._cachedElement=this.items[s],this._el.dispatchEvent(new CustomEvent("navigationModelInit",{bubbles:!1,detail:{firstInteractiveIndex:this.firstNavigableIndex,fromIndex:i,items:this.items,toIndex:s}}))}get currentItem(){return this.items[this.index]}get items(){return[...this._el.querySelectorAll(`${this._itemSelector}`)]}get index(){return this._index}set index(t){if(t!==this.index&&_(this.items,t)){const e=this.index;this._cachedElement=this.items[t],this._index=t,this._el.dispatchEvent(new CustomEvent("navigationModelChange",{bubbles:!1,detail:{fromIndex:e,toIndex:t}}))}}indexOf(t){return this.items.indexOf(t)}reset(){const t=this.index,e=L(this.options.autoReset,this.items,this.index);e!==t&&(this._index=e,this._el.dispatchEvent(new CustomEvent("navigationModelReset",{bubbles:!1,detail:{fromIndex:t,toIndex:e}})))}}class T{constructor(e,n){this.model=n,this.el=e,this._keyPrevListener=x.bind(n),this._keyNextListener=y.bind(n),this._keyHomeListener=k.bind(n),this._keyEndListener=C.bind(n),this._clickListener=w.bind(n),this._focusExitListener=S.bind(n),this._observer=new MutationObserver(M.bind(n)),function(e){e.addEventListener("keydown",t)}(this.el),d(this.el);const i=n.options.axis;"both"!==i&&"x"!==i||(this.el.addEventListener("arrowLeftKeyDown",this._keyPrevListener),this.el.addEventListener("arrowRightKeyDown",this._keyNextListener)),"both"!==i&&"y"!==i||(this.el.addEventListener("arrowUpKeyDown",this._keyPrevListener),this.el.addEventListener("arrowDownKeyDown",this._keyNextListener)),this.el.addEventListener("homeKeyDown",this._keyHomeListener),this.el.addEventListener("endKeyDown",this._keyEndListener),this.el.addEventListener("click",this._clickListener),this.el.addEventListener("focusExit",this._focusExitListener),this._observer.observe(this.el,{childList:!0,subtree:!0,attributeFilter:["aria-disabled","hidden"],attributes:!0,attributeOldValue:!0})}destroy(){this.el.removeEventListener("keydown",t),function(t){const e=r[t.id];e&&(e.removeEventListeners(),delete r[t.id])}(this.el),this.el.removeEventListener("arrowLeftKeyDown",this._keyPrevListener),this.el.removeEventListener("arrowRightKeyDown",this._keyNextListener),this.el.removeEventListener("arrowUpKeyDown",this._keyPrevListener),this.el.removeEventListener("arrowDownKeyDown",this._keyNextListener),this.el.removeEventListener("homeKeyDown",this._keyHomeListener),this.el.removeEventListener("endKeyDown",this._keyEndListener),this.el.removeEventListener("click",this._clickListener),this.el.removeEventListener("focusExit",this._focusExitListener),this._observer.disconnect()}}function D(t,e,n){const i=new O(t,e,n);return new T(t,i)}const I={autoInit:"interactive",autoReset:"current",wrap:!1,axis:"both"};function B(t,e){t.forEach((function(t,n){t.setAttribute("tabindex",n===e?"0":"-1")}))}function q(t){B(t.detail.items,t.detail.toIndex),this._el.dispatchEvent(new CustomEvent("rovingTabindexInit",{detail:t.detail}))}function F(t){const e=this.items,n=e[t.detail.fromIndex],i=e[t.detail.toIndex];n&&n.setAttribute("tabindex","-1"),i&&(i.setAttribute("tabindex","0"),i.focus()),this._el.dispatchEvent(new CustomEvent("rovingTabindexChange",{detail:t.detail}))}function R(t){B(this.items,t.detail.toIndex),this._el.dispatchEvent(new CustomEvent("rovingTabindexReset",{detail:t.detail}))}function N(t){B(this.items,t.detail.toIndex),this._el.dispatchEvent(new CustomEvent("rovingTabindexMutation",{detail:t.detail}))}class j{constructor(t){this._el=t,this._onMutationListener=N.bind(this),this._onChangeListener=F.bind(this),this._onInitListener=q.bind(this),this._onResetListener=R.bind(this),this._el.addEventListener("navigationModelMutation",this._onMutationListener),this._el.addEventListener("navigationModelChange",this._onChangeListener),this._el.addEventListener("navigationModelInit",this._onInitListener),this._el.addEventListener("navigationModelReset",this._onResetListener)}destroy(){this._el.removeEventListener("navigationModelMutation",this._onMutationListener),this._el.removeEventListener("navigationModelChange",this._onChangeListener),this._el.removeEventListener("navigationModelInit",this._onInitListener),this._el.removeEventListener("navigationModelReset",this._onResetListener)}}class K extends j{constructor(t,e,n){super(t),this._options=Object.assign({},I,n),this._itemSelector=e,this._navigationEmitter=D(t,e,{autoInit:void 0!==this._options.index?this._options.index:this._options.autoInit,autoReset:this._options.autoReset,wrap:this._options.wrap,axis:this._options.axis})}get index(){return this._navigationEmitter.model.index}set index(t){this._navigationEmitter.model.index=t}set wrap(t){this._navigationEmitter.model.options.wrap=t}get currentItem(){return this._navigationEmitter.model.currentItem}get items(){return this._navigationEmitter.model.items}reset(){this._navigationEmitter.model.reset()}destroy(){super.destroy(),this._navigationEmitter.destroy()}}function H(t,e,n){return new K(t,e,n)}const W=["a[href]","area[href]","button:not([disabled])","embed","iframe","input:not([disabled])","object","select:not([disabled])","textarea:not([disabled])","*[tabindex]","*[contenteditable]"].join();function P(t,e=!1,n){if(n){const i=requestAnimationFrame((()=>{n(z(t,e))}));return()=>{cancelAnimationFrame(i)}}return z(t,e)}function z(t,e=!1){let n=Array.prototype.slice.call(t.querySelectorAll(W));return n=n.filter((function(t){return"none"!==window.getComputedStyle(t).display})),!0===e&&(n=n.filter((function(t){return"-1"!==t.getAttribute("tabindex")}))),n}const $={alwaysDoFocusManagement:!1,ariaControls:!0,autoCollapse:!1,collapseOnFocusOut:!1,collapseOnMouseOut:!1,collapseOnClickOut:!1,contentSelector:".expander__content",expandedClass:null,expandOnClick:!1,expandOnFocus:!1,expandOnHover:!1,focusManagement:null,hostSelector:".expander__host",simulateSpacebarClick:!1};function V(t){13!==t.keyCode&&32!==t.keyCode||(this._keyboardClickFlag=!0),32===t.keyCode&&!0===this.options.simulateSpacebarClick&&this.hostEl.click()}function G(){this._mouseClickFlag=!0}function U(){this._expandWasKeyboardClickActivated=this._keyboardClickFlag,this._expandWasMouseClickActivated=this._mouseClickFlag,this.expanded=!this.expanded}function X(){this._expandWasFocusActivated=!0,this.expanded=!0}function Y(){clearTimeout(this._mouseLeft),this._expandWasHoverActivated=!0,this.expanded=!0}function J(){this.expanded=!1}function Q(){clearTimeout(this._mouseLeft),this._mouseLeft=setTimeout((()=>{this.expanded=!1}),300)}function Z(t){!1===this.el.contains(t.target)&&(this.expanded=!1)}function tt(){this.documentClick=!0}function et(){this.documentClick=!1}function nt(t){!0===this.documentClick&&(this.documentClick=!1,!1===this.el.contains(t.target)&&(this.expanded=!1))}class it{constructor(t,e){this.options=Object.assign({},$,e),this.el=t,this.hostEl=t.querySelector(this.options.hostSelector),this.contentEl=t.querySelector(this.options.contentSelector),d(this.el),this._hostKeyDownListener=V.bind(this),this._hostMouseDownListener=G.bind(this),this._documentClickListener=Z.bind(this),this._documentTouchStartListener=tt.bind(this),this._documentTouchMoveListener=et.bind(this),this._documentTouchEndListener=nt.bind(this),this._hostClickListener=U.bind(this),this._hostFocusListener=X.bind(this),this._hostHoverListener=Y.bind(this),this._focusExitListener=J.bind(this),this._mouseLeaveListener=Q.bind(this),null===this.hostEl.getAttribute("aria-expanded")&&this.hostEl.setAttribute("aria-expanded","false"),!0===this.options.ariaControls&&(o(this.el,"expander"),this.contentEl.id=this.contentEl.id||`${this.el.id}-content`,this.hostEl.setAttribute("aria-controls",this.contentEl.id)),this.expandOnClick=this.options.expandOnClick,this.expandOnFocus=this.options.expandOnFocus,this.expandOnHover=this.options.expandOnHover,!1===this.options.autoCollapse&&(this.collapseOnClickOut=this.options.collapseOnClickOut,this.collapseOnFocusOut=this.options.collapseOnFocusOut,this.collapseOnMouseOut=this.options.collapseOnMouseOut)}set expandOnClick(t){!0===t?(this.hostEl.addEventListener("keydown",this._hostKeyDownListener),this.hostEl.addEventListener("mousedown",this._hostMouseDownListener),this.hostEl.addEventListener("click",this._hostClickListener),!0===this.options.autoCollapse&&(this.collapseOnClickOut=!0,this.collapseOnFocusOut=!0)):(this.hostEl.removeEventListener("click",this._hostClickListener),this.hostEl.removeEventListener("mousedown",this._hostMouseDownListener),this.hostEl.removeEventListener("keydown",this._hostKeyDownListener))}set expandOnFocus(t){!0===t?(this.hostEl.addEventListener("focus",this._hostFocusListener),!0===this.options.autoCollapse&&(this.collapseOnClickOut=!0,this.collapseOnFocusOut=!0)):this.hostEl.removeEventListener("focus",this._hostFocusListener)}set expandOnHover(t){!0===t?(this.hostEl.addEventListener("mouseenter",this._hostHoverListener),this.contentEl.addEventListener("mouseenter",this._hostHoverListener),!0===this.options.autoCollapse&&(this.collapseOnMouseOut=!0)):(this.hostEl.removeEventListener("mouseenter",this._hostHoverListener),this.contentEl.removeEventListener("mouseenter",this._hostHoverListener))}set collapseOnClickOut(t){!0===t?(document.addEventListener("click",this._documentClickListener),document.addEventListener("touchstart",this._documentTouchStartListener),document.addEventListener("touchmove",this._documentTouchMoveListener),document.addEventListener("touchend",this._documentTouchEndListener)):(document.removeEventListener("click",this._documentClickListener),document.removeEventListener("touchstart",this._documentTouchStartListener),document.removeEventListener("touchmove",this._documentTouchMoveListener),document.removeEventListener("touchend",this._documentTouchEndListener))}set collapseOnFocusOut(t){!0===t?this.el.addEventListener("focusExit",this._focusExitListener):this.el.removeEventListener("focusExit",this._focusExitListener)}set collapseOnMouseOut(t){!0===t?(this.el.addEventListener("mouseleave",this._mouseLeaveListener),this.contentEl.addEventListener("mouseleave",this._mouseLeaveListener)):(this.el.removeEventListener("mouseleave",this._mouseLeaveListener),this.contentEl.removeEventListener("mouseleave",this._mouseLeaveListener))}get expanded(){return"true"===this.hostEl.getAttribute("aria-expanded")}set expanded(t){!0===t&&!1===this.expanded&&(this.hostEl.setAttribute("aria-expanded","true"),this.options.expandedClass&&this.el.classList.add(this.options.expandedClass),(this._expandWasKeyboardClickActivated||this._expandWasMouseClickActivated&&this.options.alwaysDoFocusManagement)&&function(t,e){if("content"===t)e.setAttribute("tabindex","-1"),e.focus();else if("focusable"===t)P(e)[0].focus();else if("interactive"===t)P(e,!0)[0].focus();else if(null!==t){const n=e.querySelector(`#${t}`);n&&n.focus()}}(this.options.focusManagement,this.contentEl),this.el.dispatchEvent(new CustomEvent("expander-expand",{bubbles:!0,detail:this.contentEl}))),!1===t&&!0===this.expanded&&(this.hostEl.setAttribute("aria-expanded","false"),this.options.expandedClass&&this.el.classList.remove(this.options.expandedClass),this.el.dispatchEvent(new CustomEvent("expander-collapse",{bubbles:!0,detail:this.contentEl}))),this._expandWasKeyboardClickActivated=!1,this._expandWasMouseClickActivated=!1,this._expandWasFocusActivated=!1,this._expandWasHoverActivated=!1,this._keyboardClickFlag=!1,this._mouseClickFlag=!1}sleep(){!0!==this._destroyed&&(this.expandOnClick=!1,this.expandOnFocus=!1,this.expandOnHover=!1,this.collapseOnClickOut=!1,this.collapseOnFocusOut=!1,this.collapseOnMouseOut=!1)}destroy(){this.sleep(),this._destroyed=!0,this._hostKeyDownListener=null,this._hostMouseDownListener=null,this._documentClickListener=null,this._documentTouchStartListener=null,this._documentTouchMoveListener=null,this._documentTouchEndListener=null,this._hostClickListener=null,this._hostFocusListener=null,this._hostHoverListener=null,this._focusExitListener=null,this._mouseLeaveListener=null}}const st={labelElementAnimateModifier:"floating-label__label--animate",labelElementInlineModifier:"floating-label__label--inline",labelElementFocusModifier:"floating-label__label--focus",labelElementInvalidModifier:"floating-label__label--invalid",labelElementDisabledModifier:"floating-label__label--disabled",textboxElementBackgroundRGB:["rgb(255, 255, 255)","rgb(247, 247, 247)","rgb(245, 245, 245)","rgb(230, 32, 72)","rgb(254, 245, 246)"]};function ot(t,e){if(at(t)){t.style["min-width"]="";const n=t.offsetWidth;t.querySelector("option").text=e,!e&&n>t.offsetWidth&&(t.style["min-width"]=`${n}px`)}else e?t.setAttribute("placeholder",e):t.removeAttribute("placeholder")}function rt(){const t=lt(this.formControlEl);this.placeholder=function(t){if(at(t)){const e=t.querySelector("option");return e.value?null:e.text}if(t.hasAttribute("placeholder"))return t.getAttribute("placeholder")}(this.formControlEl)||this.placeholder;const e=function(t){if(at(t)){const e=t.querySelector("option");if(e.value)return;return!!e.text}return t.hasAttribute("placeholder")}(this.formControlEl,this.placeholder);this.placeholder&&t&&!e?ot(this.formControlEl,this.placeholder):!t&&e&&ot(this.formControlEl,""),ut(this.formControlEl)?this.labelEl.classList.add(this.options.labelElementInvalidModifier):this.labelEl.classList.remove(this.options.labelElementInvalidModifier),this.formControlEl.hasAttribute("disabled")?this.labelEl.classList.add(this.options.labelElementDisabledModifier):this.labelEl.classList.remove(this.options.labelElementDisabledModifier)}function lt(t){return document.activeElement===t}function at(t){return"SELECT"===t.tagName}function ct(t){return t.value.length>0}function ut(t){return t.hasAttribute("aria-invalid")&&"true"===t.getAttribute("aria-invalid")}function ht(t,e){if(!at(t)){const n=getComputedStyle(t).backgroundColor;return Array.isArray(e)?!e.includes(n):n!==e}return!1}function dt(){ct(this.formControlEl)||this.labelEl.classList.add(this.options.labelElementInlineModifier),this.labelEl.classList.remove(this.options.labelElementFocusModifier),ut(this.formControlEl)&&this.labelEl.classList.add(this.options.labelElementInvalidModifier),ot(this.formControlEl,"")}function mt(){this.labelEl.classList.add(this.options.labelElementAnimateModifier),this.labelEl.classList.add(this.options.labelElementFocusModifier),this.labelEl.classList.remove(this.options.labelElementInlineModifier),this.labelEl.classList.remove(this.options.labelElementInvalidModifier),this.placeholder&&ot(this.formControlEl,this.placeholder)}class bt{constructor(t,e){this.options=Object.assign({},st,e),this._observer=new MutationObserver(rt.bind(this)),this.rootEl=t,this.labelEl=this.rootEl.querySelector("label"),this.formControlEl=this.rootEl.querySelector("input,textarea,select"),this._onBlurListener=dt.bind(this),this._onFocusListener=mt.bind(this),this.formControlEl.addEventListener("blur",this._onBlurListener),this.formControlEl.addEventListener("focus",this._onFocusListener),ct(this.formControlEl)||ht(this.formControlEl,this.options.textboxElementBackgroundRGB)?at(this.formControlEl)||this.labelEl.classList.remove(this.options.labelElementInlineModifier):this.labelEl.classList.add(this.options.labelElementInlineModifier),lt(this.formControlEl)&&(this.labelEl.classList.add(this.options.labelElementFocusModifier),this.labelEl.classList.remove(this.options.labelElementInlineModifier)),rt.call(this),this._observer.observe(this.formControlEl,{childList:at(this.formControlEl),subtree:at(this.formControlEl),attributeFilter:["disabled","aria-invalid","placeholder","value"],attributes:!0})}destroy(){this._observer.disconnect()}refresh(){ct(this.formControlEl)||at(this.formControlEl)||ht(this.formControlEl,this.options.textboxElementBackgroundRGB)?this.labelEl.classList.remove(this.options.labelElementInlineModifier):this.labelEl.classList.add(this.options.labelElementInlineModifier),lt(this.formControlEl)&&(this.labelEl.classList.add(this.options.labelElementFocusModifier),this.labelEl.classList.remove(this.options.labelElementInlineModifier))}}function _t(t){t.keyCode>=32&&t.keyCode<=40&&t.preventDefault()}function ft(t){t.addEventListener("keydown",_t)}const pt={activeDescendantClassName:"active-descendant",autoInit:"none",autoReset:"none",autoScroll:!1,axis:"both",wrap:!1};function vt(t){const{items:e,toIndex:n}=t.detail,i=e[n];i&&(i.classList.add(this._options.activeDescendantClassName),this._focusEl.setAttribute("aria-activedescendant",i.id)),this._el.dispatchEvent(new CustomEvent("activeDescendantInit",{detail:t.detail}))}function Et(t){const{fromIndex:e,toIndex:n}=t.detail,i=this.items[e],s=this.items[n];i&&i.classList.remove(this._options.activeDescendantClassName),s&&(s.classList.add(this._options.activeDescendantClassName),this._focusEl.setAttribute("aria-activedescendant",s.id),this._options.autoScroll&&this._containerEl&&(this._containerEl.scrollTop=s.offsetTop-this._containerEl.offsetHeight/2)),this._el.dispatchEvent(new CustomEvent("activeDescendantChange",{detail:t.detail}))}function gt(t){const e=t.detail.toIndex,n=this._options.activeDescendantClassName;if(this.items.forEach((function(t){t.classList.remove(n)})),null!==e&&-1!==e){const t=this.items[e];t.classList.add(n),this._focusEl.setAttribute("aria-activedescendant",t.id)}else this._focusEl.removeAttribute("aria-activedescendant");this._el.dispatchEvent(new CustomEvent("activeDescendantReset",{detail:t.detail}))}function Lt(t){const{toIndex:e}=t.detail,n=this._options.activeDescendantClassName;this.items.forEach((function(t,i){o(t),i!==e?t.classList.remove(n):t.classList.add(n)})),this._el.dispatchEvent(new CustomEvent("activeDescendantMutation",{detail:t.detail}))}class xt{constructor(t){this._el=t,this._onMutationListener=Lt.bind(this),this._onChangeListener=Et.bind(this),this._onResetListener=gt.bind(this),this._onInitListener=vt.bind(this),this._el.addEventListener("navigationModelMutation",this._onMutationListener),this._el.addEventListener("navigationModelChange",this._onChangeListener),this._el.addEventListener("navigationModelReset",this._onResetListener),this._el.addEventListener("navigationModelInit",this._onInitListener)}destroy(){this._el.removeEventListener("navigationModelMutation",this._onMutationListener),this._el.removeEventListener("navigationModelChange",this._onChangeListener),this._el.removeEventListener("navigationModelReset",this._onResetListener),this._el.removeEventListener("navigationModelInit",this._onInitListener)}}class yt extends xt{constructor(t,e,n,i,s){super(t),this._options=Object.assign({},pt,s),this._focusEl=e,this._itemContainerEl=n,this._itemSelector=i,o(this._itemContainerEl),this._itemContainerEl!==this._focusEl&&e.setAttribute("aria-owns",this._itemContainerEl.id),this._navigationEmitter=D(t,i,{autoInit:this._options.autoInit,autoReset:this._options.autoReset,axis:this._options.axis,ignoreByDelegateSelector:this._options.ignoreByDelegateSelector,wrap:this._options.wrap}),this.items.forEach((function(t){o(t)}))}get index(){return this._navigationEmitter.model.index}set index(t){this._navigationEmitter.model.index=t}reset(){this._navigationEmitter.model.reset()}get currentItem(){return this._navigationEmitter.model.currentItem}get items(){return this._navigationEmitter.model.items}set wrap(t){this._navigationEmitter.model.options.wrap=t}destroy(){super.destroy(),this._navigationEmitter.destroy()}}const wt={activeDescendantClassName:"listbox__option--active",autoInit:"ariaSelectedOrInteractive",autoReset:"ariaSelectedOrInteractive",autoSelect:!0,customElementMode:!1,focusableElement:null,listboxOwnerElement:null,multiSelect:!1,useAriaChecked:!0,valueSelector:".listbox__value"};class kt{constructor(t,e){this._options=Object.assign({},wt,e),this.el=t,this._activeDescendantRootEl=this._options.listboxOwnerElement||this.el,"listbox"===t.getAttribute("role")?this._listboxEl=t:this._listboxEl=this.el.querySelector("[role=listbox]"),this._options.focusableElement||null!==this._listboxEl.getAttribute("tabindex")||this._listboxEl.setAttribute("tabindex","0"),ft(this.el),this._onKeyDownListener=Ct.bind(this),this._onClickListener=St.bind(this),this._onActiveDescendantChangeListener=Mt.bind(this),this._onMutationListener=At.bind(this),this.el.classList.add("listbox--js"),this._options.customElementMode||(this._mutationObserver=new MutationObserver(this._onMutationListener),this._observeMutations(),this._observeEvents()),this._activeDescendant=function(t,e,n,i,s){return new yt(t,e,n,"[role=option]",s)}(this._activeDescendantRootEl,this._options.focusableElement||this._listboxEl,this._listboxEl,0,{activeDescendantClassName:this._options.activeDescendantClassName,autoInit:this._options.autoInit,autoReset:this._options.autoReset,axis:"y"})}_observeMutations(){this._options.customElementMode||this._mutationObserver.observe(this._listboxEl,{attributeFilter:["aria-selected"],attributes:!0,childList:!0,subtree:!0})}_unobserveMutations(){this._options.customElementMode||this._mutationObserver.disconnect()}_observeEvents(){!0!==this._destroyed&&(this._activeDescendantRootEl.addEventListener("activeDescendantChange",this._onActiveDescendantChangeListener),this._listboxEl.addEventListener("keydown",this._onKeyDownListener),this._listboxEl.addEventListener("click",this._onClickListener))}_unobserveEvents(){this._listboxEl.removeEventListener("keydown",this._onKeyDownListener),this._listboxEl.removeEventListener("click",this._onClickListener),this._activeDescendantRootEl.removeEventListener("activeDescendantChange",this._onActiveDescendantChangeListener)}get index(){return this.items.findIndex((t=>"true"===t.getAttribute("aria-selected")))}get items(){return this._activeDescendant.items}select(t){this._unobserveMutations();const e=this.items[t];if(e&&"true"!==e.getAttribute("aria-disabled")){const e=this.items[t];let n;if(e.setAttribute("aria-selected","true"),!0===this._options.useAriaChecked&&e.setAttribute("aria-checked","true"),n=e.innerText,this._options.valueSelector){const t=e.querySelector(this._options.valueSelector);t&&(n=t.innerText)}this.el.dispatchEvent(new CustomEvent("makeup-listbox-change",{detail:{el:e,optionIndex:t,optionValue:n}}))}this._observeMutations()}unselect(t){this._unobserveMutations();const e=this.items[t];if(e&&"true"!==e.getAttribute("aria-disabled")){const e=this.items[t];e.setAttribute("aria-selected","false"),!0===this._options.useAriaChecked&&e.setAttribute("aria-checked","false")}this._observeMutations()}destroy(){this._destroyed=!0,this._unobserveMutations(),this._unobserveEvents(),this._onKeyDownListener=null,this._onClickListener=null,this._onActiveDescendantChangeListener=null,this._onMutationListener=null}}function Ct(t){const e=this._activeDescendant.currentItem;var n;13!==(n=t.keyCode)&&32!==n||"true"===e?.getAttribute("aria-selected")||(this.unselect(this.index),this.select(this._activeDescendant.index))}function St(t){const e=t.target.closest("[role=option]"),n=this.items.indexOf(e),i="true"===e.getAttribute("aria-selected");"true"===e.getAttribute("aria-disabled")||!1!==this._options.autoSelect||!1!==i||(this.unselect(this.index),this.select(n))}function Mt(t){const{fromIndex:e,toIndex:n}=t.detail;if(!0===this._options.autoSelect){const t=this.items[e],i=this.items[n];t&&this.unselect(e),i&&this.select(n)}}function At(t){for(const e of t)"attributes"===e.type&&this.el.dispatchEvent(new CustomEvent("makeup-listbox-mutation",{detail:{attributeName:e.attributeName}}))}const Ot={autoSelect:!0,collapseTimeout:150,customElementMode:!1};class Tt{constructor(t,e){this._options=Object.assign({},Ot,e),this._el=t,this._inputEl=this._el.querySelector("input"),this._listboxEl=this._el.querySelector(".combobox__listbox"),this._autocompleteType=this._inputEl.getAttribute("aria-autocomplete"),this._inputEl.setAttribute("autocomplete","off"),this._inputEl.setAttribute("role","combobox"),this._listboxEl.hidden=!1,this._listboxWidget=new kt(this._listboxEl,{activeDescendantClassName:"combobox__option--active",autoReset:-1,autoSelect:this._options.autoSelect,focusableElement:this._inputEl,listboxOwnerElement:this._el}),this._expander=new it(this._el,{collapseOnClickOut:!0,collapseOnFocusOut:!0,contentSelector:".combobox__listbox",expandedClass:"combobox--expanded",expandOnFocus:!0,hostSelector:"input"}),this._destroyed=!1,this._onInputFocusListener=Dt.bind(this),this._onListboxClickListener=Ft.bind(this),this._onListboxActiveDescendantChangeListener=Rt.bind(this),this._onTextboxKeyDownListener=It.bind(this),this._onTextboxInputListener=qt.bind(this),this._onTextboxClickListener=Bt.bind(this),this._onMutationListener=Nt.bind(this),this._el.classList.add("combobox--js"),this._options.customElementMode||(this._mutationObserver=new MutationObserver(this._onMutationListener),this._observeMutations(),this._observeEvents())}resetFilter(){this._listboxWidget._activeDescendant.reset(),this._listboxWidget.items.forEach((t=>t.hidden=!1))}_observeMutations(){this._options.customElementMode||this._mutationObserver.observe(this._inputEl,{attributes:!0,childList:!0,subtree:!0})}_unobserveMutations(){this._options.customElementMode||this._mutationObserver.disconnect()}_observeEvents(){!0!==this._destroyed&&(this._listboxEl.addEventListener("click",this._onListboxClickListener),this._listboxWidget._activeDescendantRootEl.addEventListener("activeDescendantChange",this._onListboxActiveDescendantChangeListener),this._inputEl.addEventListener("focus",this._onInputFocusListener),this._inputEl.addEventListener("keydown",this._onTextboxKeyDownListener),this._inputEl.addEventListener("input",this._onTextboxInputListener),this._inputEl.addEventListener("click",this._onTextboxClickListener))}_unobserveEvents(){this._listboxEl.removeEventListener("click",this._onListboxClickListener),this._listboxWidget._activeDescendantRootEl.removeEventListener("activeDescendantChange",this._onListboxActiveDescendantChangeListener),this._inputEl.removeEventListener("focus",this._onInputFocusListener),this._inputEl.removeEventListener("keydown",this._onTextboxKeyDownListener),this._inputEl.removeEventListener("input",this._onTextboxInputListener),this._inputEl.removeEventListener("click",this._onTextboxClickListener)}destroy(){this._destroyed=!0,this._unobserveMutations(),this._unobserveEvents(),this._onInputFocusListener=null,this._onListboxClickListener=null,this._onListboxActiveDesendanctChangeListener=null,this._onTextboxKeyDownListener=null,this._onTextboxInputListener=null,this._onTextboxClickListener=null,this._onMutationListener=null}}function Dt(){this.resetFilter()}function It(t){if(38!==t.keyCode&&40!==t.keyCode||t.preventDefault(),40===t.keyCode&&!1===this._expander.expanded&&(this._expander.expanded=!0),27===t.keyCode&&!0===this._expander.expanded&&(this._expander.expanded=!1,this._listboxWidget._activeDescendant.reset()),!1===this._options.autoSelect&&13===t.keyCode&&this._inputEl.getAttribute("aria-activedescendant")){t.preventDefault();const e=this;this._inputEl.value=this._listboxWidget.items[this._listboxWidget._activeDescendant.index].innerText,Kt(this._el,this._inputEl.value),this._listboxWidget._activeDescendant.reset(),setTimeout((function(){e._expander.expanded=!1,"list"===e._autocompleteType&&(0===e._inputEl.value.length?e.resetFilter():jt(e._inputEl.value,e._listboxWidget.items))}),this._options.collapseTimeout)}}function Bt(){!1===this._expander.expanded&&(this._expander.expanded=!0)}function qt(){!1===this._expander.expanded&&(this._expander.expanded=!0),"list"===this._autocompleteType&&(this._listboxWidget._activeDescendant.reset(),0===this._inputEl.value.length?this.resetFilter():jt(this._inputEl.value,this._listboxWidget.items))}function Ft(t){const e=this,n=t.target.closest("[role=option]"),i=this._listboxWidget.items.indexOf(n);console.log(i),void 0!==i&&(this._inputEl.value=this._listboxWidget.items[i].innerText,!1===this._options.autoSelect&&Kt(this._el,this._inputEl.value),setTimeout((function(){e._expander.expanded=!1}),this._options.collapseTimeout))}function Rt(t){!0===this._options.autoSelect&&(this._inputEl.value=this._listboxWidget.items[t.detail.toIndex].innerText,Kt(this._el,this._inputEl.value))}function Nt(t){for(const e of t)"attributes"===e.type&&this._el.dispatchEvent(new CustomEvent("makeup-combobox-mutation",{detail:{attributeName:e.attributeName}}))}function jt(t,e){const n=t.length,i=t.toLowerCase(),s=e.filter((t=>t.innerText.trim().substring(0,n).toLowerCase()===i)),o=e.filter((t=>t.innerText.trim().substring(0,n).toLowerCase()!==i));s.forEach((t=>t.hidden=!1)),o.forEach((t=>t.hidden=!0))}function Kt(t,e){t.dispatchEvent(new CustomEvent("makeup-combobox-change",{detail:{value:e}}))}const Ht={customElementMode:!1};class Wt{constructor(t,e,n){this._options=Object.assign({},Ht,n),this._el=t,this._el.setAttribute("aria-haspopup","dialog"),this._dialog=e,this._onClickListener=zt.bind(this),this._onDialogCloseListener=$t.bind(this),this._onMutationListener=Pt.bind(this),this._el.classList.add("dialog-button--js"),this._options.customElementMode||(this._mutationObserver=new MutationObserver(this._onMutationListener),this._observeMutations(),this._observeEvents())}_observeMutations(){this._options.customElementMode||this._mutationObserver.observe(this._el,{attributes:!0,childList:!1,subtree:!1})}_unobserveMutations(){this._options.customElementMode||this._mutationObserver.disconnect()}_observeEvents(){!0!==this._destroyed&&(this._el.addEventListener("click",this._onClickListener),this._dialog._el.addEventListener("dialog-close",this._onDialogCloseListener))}_unobserveEvents(){this._el.removeEventListener("click"),this._dialog._el.removeEventListener("dialog-close",this._onDialogCloseListener)}destroy(){this._destroyed=!0,this._unobserveMutations(),this._unobserveEvents(),this._onClickListener=null,this._onDialogCloseListener=null,this._onMutationListener=null}}function Pt(t){for(const e of t)"attributes"===e.type&&this._el.dispatchEvent(new CustomEvent("makeup-dialog-button-mutation",{detail:{attributeName:e.attributeName}}))}function zt(){this._dialog.open()}function $t(){!0===this._dialog.modal&&this._el.focus()}const Vt={autoSelect:!0,buttonLabelSelector:".btn__text",collapseTimeout:150,customElementMode:!1,listboxSelector:".listbox-button__listbox",floatingLabelSelector:".btn__floating-label",floatingLabelInline:"btn__floating-label--inline",floatingLabelAnimate:"btn__floating-label--animate",valueSelector:".listbox-button__value",buttonValueType:"text",iconSelector:".icon"};class Gt{constructor(t,e){this._options=Object.assign({},Vt,e),this.el=t,this._buttonEl=this.el.querySelector("button"),this._buttonLabelEl=t.querySelector(this._options.buttonLabelSelector),this._buttonFloatingLabelEl=t.querySelector(this._options.floatingLabelSelector),this._buttonPrefix=this._buttonEl.dataset?.listboxButtonPrefix,this._listboxEl=this.el.querySelector(this._options.listboxSelector),this._onButtonFirstClickListener=Ut.bind(this),this._onListboxClickListener=Yt.bind(this),this._onListboxKeyDownListener=Xt.bind(this),this._onListboxInitListener=Jt.bind(this),this._onListboxChangeListener=Qt.bind(this),this._onMutationListener=Zt.bind(this),this._options.customElementMode||(this._mutationObserver=new MutationObserver(this._onMutationListener),this._observeMutations(),this._observeEvents()),this.listbox=new kt(this._listboxEl,{activeDescendantClassName:"listbox-button__option--active",autoReset:"ariaSelectedOrInteractive",autoSelect:this._options.autoSelect,valueSelector:this._options.valueSelector}),this._expander=new it(this.el,{alwaysDoFocusManagement:!0,collapseOnClick:!0,collapseOnClickOut:!0,collapseOnFocusOut:!0,contentSelector:this._options.listboxSelector,expandedClass:"listbox-button--expanded",expandOnClick:!0,focusManagement:"focusable",hostSelector:"button"}),this.el.classList.add("listbox-button--js"),this._buttonFloatingLabelEl&&(this._buttonLabelEl.innerText||this._buttonFloatingLabelEl.classList.add(this._options.floatingLabelInline))}_observeMutations(){this._options.customElementMode||this._mutationObserver.observe(this._buttonEl,{attributeFilter:["aria-expanded"],attributes:!0,childList:!1,subtree:!1})}_unobserveMutations(){this._options.customElementMode||this._mutationObserver.disconnect()}_unobserveEvents(){this._buttonEl.removeEventListener("click",this._onButtonFirstClickListener),this._listboxEl.removeEventListener("click",this._onListboxClickListener),this._listboxEl.removeEventListener("keydown",this._onListboxKeyDownListener),this._listboxEl.removeEventListener("makeup-listbox-init",this._onListboxInitListener),this._listboxEl.removeEventListener("makeup-listbox-change",this._onListboxChangeListener)}_observeEvents(){!0!==this._destroyed&&(this._buttonEl.addEventListener("click",this._onButtonFirstClickListener,{once:!0}),this._listboxEl.addEventListener("click",this._onListboxClickListener),this._listboxEl.addEventListener("keydown",this._onListboxKeyDownListener),this._listboxEl.addEventListener("makeup-listbox-init",this._onListboxInitListener),this._listboxEl.addEventListener("makeup-listbox-change",this._onListboxChangeListener))}collapse(){const t=this;setTimeout((function(){t._unobserveMutations(),t._expander.expanded=!1,t._observeMutations(),t._buttonEl.focus()}),this._options.collapseTimeout)}destroy(){this._destroyed=!0,this._unobserveEvents(),this._unobserveMutations(),this._onButtonFirstClickListener=null,this._onListboxClickListener=null,this._onListboxKeyDownListener=null,this._onListboxInitListener=null,this._onListboxChangeListener=null,this._onMutationListener=null}}function Ut(){this.listbox.el.hidden=!1}function Xt(t){13!==t.keyCode&&27!==t.keyCode&&32!==t.keyCode||this.collapse()}function Yt(){this.collapse()}function Jt(t){this.el.dispatchEvent(new CustomEvent("makeup-listbox-button-init",{detail:t.detail}))}function Qt(t){const e=t.detail.optionValue,n=t.detail.el.querySelector(this._options.iconSelector).cloneNode(!0);let i=this._buttonPrefix?`${this._buttonPrefix} ${e}`:e;if(n)switch(this._options.buttonValueType){case"both":i=`${n.outerHTML} ${i} `;break;case"icon":n.setAttribute("aria-label",i),n.removeAttribute("aria-hidden"),i=n.outerHTML}this._buttonLabelEl.innerHTML=i,this._buttonFloatingLabelEl&&(e?(this._buttonFloatingLabelEl.classList.add(this._options.floatingLabelAnimate),this._buttonFloatingLabelEl.classList.remove(this._options.floatingLabelInline)):this._buttonFloatingLabelEl.classList.add(this._options.floatingLabelInline)),this.el.dispatchEvent(new CustomEvent("makeup-listbox-button-change",{detail:t.detail}))}function Zt(t){for(const e of t)"attributes"===e.type&&this.el.dispatchEvent(new CustomEvent("makeup-listbox-button-mutation",{detail:{attributeName:e.attributeName}}))}const te={customElementMode:!1,autoInit:"interactive",autoReset:"interactive"};class ee{constructor(t,e){this._options=Object.assign({},te,e),this.el=t,this._rovingTabIndex=H(this.el,"[role^=menuitem]",{autoInit:this._options.autoInit,autoReset:this._options.autoReset}),ft(this.el),this._onKeyDownListener=ie.bind(this),this._onClickListener=se.bind(this),this._onMutationListener=ne.bind(this),this.el.classList.add("menu--js"),this._options.customElementMode||(this._mutationObserver=new MutationObserver(this._onMutationListener),this._observeMutations(),this._observeEvents())}select(t){this._unobserveMutations();const e=this.items[t];switch(e.getAttribute("role")){case"menuitemcheckbox":!function(t,e){if("true"!==e.getAttribute("aria-disabled")){const n=e.dataset.makeupGroup;e.setAttribute("aria-checked","true"===e.getAttribute("aria-checked")?"false":"true"),t.dispatchEvent(new CustomEvent("makeup-menu-change",{detail:{el:e,checked:e.getAttribute("aria-checked"),group:n,value:e.innerText}}))}}(this.el,e);break;case"menuitemradio":!function(t,e){if("true"!==e.getAttribute("aria-disabled")){const n=e.dataset.makeupGroup,i=t.querySelector(`[data-makeup-group=${n}][aria-checked=true]`);i&&i.setAttribute("aria-checked","false"),i!==e&&(e.setAttribute("aria-checked","true"),t.dispatchEvent(new CustomEvent("makeup-menu-change",{detail:{el:e,group:n,value:e.innerText}})))}}(this.el,e);break;default:n=e,this.el.dispatchEvent(new CustomEvent("makeup-menu-select",{detail:{el:n,value:n.innerText}}))}var n;this._observeMutations()}get items(){return this._rovingTabIndex.items}get radioGroupNames(){const t=[...this.el.querySelectorAll("[role=menuitemradio][data-makeup-group]")];return[...new Set(t.map((t=>t.dataset.makeupGroup)))]}get checkboxGroupNames(){const t=[...this.el.querySelectorAll("[role=menuitemcheckbox][data-makeup-group]")];return[...new Set(t.map((t=>t.dataset.makeupGroup)))]}_observeMutations(){this._options.customElementMode||this._mutationObserver.observe(this.el,{attributeFilter:["aria-checked","aria-disabled"],attributes:!0,childList:!0,subtree:!0})}_unobserveMutations(){this._options.customElementMode||this._mutationObserver.disconnect()}_observeEvents(){!0!==this._destroyed&&(this.el.addEventListener("keydown",this._onKeyDownListener),this.el.addEventListener("click",this._onClickListener))}_unobserveEvents(){this.el.removeEventListener("keydown",this._onKeyDownListener),this.el.removeEventListener("click",this._onClickListener)}destroy(){this._destroyed=!0,this._unobserveMutations(),this._unobserveEvents(),this._onKeyDownListener=null,this._onClickListener=null,this._onMutationListener=null}}function ne(t){for(const e of t)"attributes"===e.type&&this.el.dispatchEvent(new CustomEvent("makeup-menu-mutation",{detail:{attributeName:e.attributeName}}))}function ie(t){this._unobserveMutations(),13===t.keyCode&&t.preventDefault(),13!==t.keyCode&&32!==t.keyCode||this.select(Array.from(this.items).indexOf(t.target)),this._observeMutations()}function se(t){const e=t.target.closest("[role^=menuitem]"),n=this.items.indexOf(e);-1!==n&&this.select(n)}const oe={customElementMode:!1,expandedClass:"menu-button--expanded",menuSelector:".menu-button__menu",buttonTextSelector:".btn__text",buttonValueType:"text",iconSelector:".icon"};class re{constructor(t,e){this._options=Object.assign({},oe,e),this.el=t,this._buttonEl=t.querySelector("button"),this._buttonEl.setAttribute("aria-haspopup","true"),this.menu=new ee(t.querySelector(this._options.menuSelector),{autoReset:"interactive"}),this._buttonPrefix=this._buttonEl.dataset?.makeupMenuButtonPrefix,this._buttonTextEl=this._buttonEl.querySelector(this._options.buttonTextSelector),this._expander=new it(t,{alwaysDoFocusManagement:!0,collapseOnClick:!0,collapseOnClickOut:!0,collapseOnFocusOut:!0,contentSelector:this._options.menuSelector,expandedClass:this._options.expandedClass,expandOnClick:!0,focusManagement:"focusable",hostSelector:"button"}),this._onButtonFirstClickListener=ae.bind(this),this._onMenuKeyDownListener=ce.bind(this),this._onMenuItemSelectListener=ue.bind(this),this._onMutationListener=le.bind(this),this.el.classList.add("menu-button--js"),this._options.customElementMode||(this._mutationObserver=new MutationObserver(this._onMutationListener),this._observeMutations(),this._observeEvents())}_observeMutations(){this._options.customElementMode||this._mutationObserver.observe(this.el,{attributeFilter:["aria-expanded","disabled"],attributes:!0,childList:!1,subtree:!1})}_unobserveMutations(){this._options.customElementMode||this._mutationObserver.disconnect()}_observeEvents(){!0!==this._destroyed&&(this._buttonEl.addEventListener("click",this._onButtonFirstClickListener,{once:!0}),this.menu.el.addEventListener("keydown",this._onMenuKeyDownListener),this.menu.el.addEventListener("makeup-menu-select",this._onMenuItemSelectListener),this.menu.el.addEventListener("makeup-menu-change",this._onMenuItemSelectListener))}_unobserveEvents(){this._buttonEl.removeEventListener("click",this._onButtonFirstClickListener),this.menu.el.removeEventListener("keydown",this._onMenuKeyDownListener),this.menu.el.removeEventListener("makeup-menu-select",this._onMenuItemSelectListener),this.menu.el.removeEventListener("makeup-menu-change",this._onMenuItemSelectListener)}destroy(){this._destroyed=!0,this._unobserveMutations(),this._unobserveEvents(),this._onButtonFirstClickListener=null,this._onMenuKeyDownListener=null,this._onMenuItemSelectListener=null,this._onMutationListener=null}}function le(t){for(const e of t)"attributes"===e.type&&this.el.dispatchEvent(new CustomEvent("makeup-menu-button-mutation",{detail:{attributeName:e.attributeName}}))}function ae(){this.menu.el.hidden=!1}function ce(t){27===t.keyCode&&(this._expander.expanded=!1,this._buttonEl.focus())}function ue(t){const e=this;if(setTimeout((function(){e._expander.expanded=!1,e._buttonEl.focus()}),150),"menuitemradio"!==t.detail.el.getAttribute("role"))return;const n=t.detail.el.querySelector(this._options.iconSelector).cloneNode(!0),i=t.detail.el.innerText.trim();let s=this._buttonPrefix?`${this._buttonPrefix} ${i}`:i;if(n)switch(this._options.buttonValueType){case"both":s=`${n.outerHTML} ${s} `;break;case"icon":n.setAttribute("aria-label",s),n.removeAttribute("aria-hidden"),s=n.outerHTML}this._buttonTextEl.innerHTML=s}const he={bem:{control:"switch__control"},customElementMode:!1};class de{constructor(t,e){this._options=Object.assign({},he,e),this.el=t,this._onClickListener=be.bind(this),this._onKeyDownListener=me.bind(this),this._onMutationListener=_e.bind(this),this.disabled&&this._focusableElement.setAttribute("tabindex","-1"),this.el.classList.add("switch--js"),this._options.customElementMode||(this._mutationObserver=new MutationObserver(this._onMutationListener),this._observeMutations(),this._observeEvents())}_observeMutations(){this._options.customElementMode||this._mutationObserver.observe(this._focusableElement,{attributes:!0,childList:!1,subtree:!1})}_unobserveMutations(){this._options.customElementMode||this._mutationObserver.disconnect()}_observeEvents(){this._focusableElement.addEventListener("click",this._onClickListener),this._focusableElement.addEventListener("keydown",this._onKeyDownListener)}_unobserveEvents(){this._focusableElement.removeEventListener("click",this._onClickListener),this._focusableElement.removeEventListener("keydown",this._onKeyDownListener)}get _focusableElement(){return this.el.querySelector(`.${this._options.bem.control}`)}set checked(t){this._unobserveMutations(),this._focusableElement.setAttribute("aria-checked",t.toString()),this.el.dispatchEvent(new CustomEvent("makeup-switch-toggle",{composed:!0,detail:{on:this.checked}})),this._observeMutations()}get checked(){return"true"===this._focusableElement.getAttribute("aria-checked")}set disabled(t){this._unobserveMutations(),this._focusableElement.setAttribute("aria-disabled",t.toString()),this._focusableElement.setAttribute("tabindex",t?"-1":"0"),this._observeMutations()}get disabled(){return"true"===this._focusableElement.getAttribute("aria-disabled")}set labelledby(t){if(this._unobserveMutations(),this._focusableElement.setAttribute("aria-labelledby",t),this._options.customElementMode){const t=document.getElementById(this.labelledby);t&&""!==t.innerText&&(this.label=t.innerText)}this._observeMutations()}get labelledby(){return this._focusableElement.getAttribute("aria-labelledby")}get label(){return this._focusableElement.getAttribute("aria-label")}set label(t){this._unobserveMutations(),this._focusableElement.setAttribute("aria-label",t),this._observeMutations()}toggle(){this.checked=!this.checked}destroy(){this._unobserveMutations(),this._unobserveEvents(),this._onClickListener=null,this._onKeyDownListener=null,this._onMutationListener=null}}function me(t){if(!this.disabled)switch(t.keyCode){case 32:t.preventDefault(),this.toggle();break;case 37:this.checked=!1;break;case 39:this.checked=!0}}function be(){this.disabled||this.toggle()}function _e(t){for(const e of t)"attributes"===e.type&&this.el.dispatchEvent(new CustomEvent("makeup-switch-mutation",{detail:{attributeName:e.attributeName}}))}let fe,pe,ve,Ee,ge,Le,xe,ye,we;function ke(){ye.focus()}function Ce(){we.focus()}function Se(){return fe&&(pe=Me(pe),ve=Me(ve),Ee=Me(Ee),ge=Me(ge),Le=Me(Le),xe=Me(xe),fe.classList.remove("keyboard-trap--active"),fe.dispatchEvent(new CustomEvent("keyboardUntrap",{bubbles:!0})),fe=null),fe}function Me(t){const e=t.parentNode;return e?e.removeChild(t):t}const Ae=t=>1===t.nodeType&&"body"!==t.tagName.toLowerCase()&&"html"!==t.tagName.toLowerCase(),Oe=t=>1===t.nodeType&&"script"!==t.tagName.toLowerCase(),Te=(t,e)=>t.concat(e);function De(t,e=[]){const n=t.previousSibling;return n?(e.push(n),De(n,e)):e}function Ie(t,e=[]){const n=t.nextSibling;return n?(e.push(n),Ie(n,e)):e}function Be(t){return De(t).concat(Ie(t)).filter(Oe)}function qe(t,e=[]){const n=t.parentNode;return n?(e.push(n),qe(n,e)):e}function Fe(t){return qe(t).filter(Ae)}let Re,Ne,je;const Ke=t=>"svg"!==t.tagName.toLowerCase();function He(t,e){let n;return n=!1===e?Pe(t,"aria-hidden","false"):Pe(t,"hidden",!1),n}function We(t,e){let n;return n=!1===e?Pe(t,"aria-hidden","true"):Pe(t,"hidden",!0),n}function Pe(t,e,n){const i="boolean"==typeof n;return{el:t,attributeName:e,cleanValue:i?t[e]:t.getAttribute(e),dirtyValue:n,isProperty:i}}function ze(){Ne&&(je.forEach((t=>{var e;(e=t).cleanValue?!0===e.isProperty?e.el[e.attributeName]=e.cleanValue:e.el.setAttribute(e.attributeName,e.cleanValue):e.el.removeAttribute(e.attributeName)})),je=[],Re&&Re.setAttribute("role","main"),Ne.dispatchEvent(new CustomEvent("screenreaderUntrap",{bubbles:!0})),Ne=null)}const $e={useHiddenProperty:!1};const Ve={hoist:!1,useHiddenProperty:!1,wrap:!1},Ge={SCRIPT:"script",LINK:"link"};let Ue,Xe,Ye,Je=[];function Qe(t){return"body"===t.parentNode.tagName.toLowerCase()}function Ze(){return Ue&&(Se(),ze(),Ye&&([...Ye.children].forEach((t=>{if(t.tagName.toLowerCase()!==Ge.SCRIPT&&t.tagName!==Ge.LINK){const e=Je.shift();e>document.body.children.length?document.body.appendChild(t):document.body.insertBefore(t,document.body.children[e+1])}})),Ye.remove(),Ye=null,Je=[]),Xe&&(Xe.replaceWith(Ue),Xe=null),document.body.removeAttribute("data-makeup-modal"),Ue.removeAttribute("data-makeup-modal"),Ue.dispatchEvent(new CustomEvent("makeup-unmodal",{bubbles:!1})),Ue=null),Ue}function tn(t,e){const n=Object.assign({},Ve,e);return Ze(),Ue=t,n.hoist&&(Xe||Qe(Ue)||(Xe=document.createElement("div"),Xe.setAttribute("data-makeup-modal","placeholder"),Ue.parentElement.insertBefore(Xe,Ue),document.body.appendChild(Ue))),n.wrap&&!Ye&&Qe(Ue)&&(Ye=document.createElement("div"),Ye.setAttribute("data-makeup-modal","inert"),[...document.body.children].forEach(((t,e)=>{t!==Ue&&t.tagName.toLowerCase()!==Ge.SCRIPT&&t.tagName!==Ge.LINK&&(Ye.appendChild(t),Je.push(e))})),document.body.prepend(Ye)),function(t,e){ze();const n=Object.assign({},$e,e);Ne=t,Re=document.querySelector('main, [role="main"]'),Re&&Re.setAttribute("role","presentation");const i=Fe(Ne);let s=Be(Ne),o=function(t){return Fe(t).map((t=>Be(t))).reduce(Te,[])}(Ne);!0===n.useHiddenProperty&&(s=s.filter(Ke),o=o.filter(Ke)),je=[He(Ne,n.useHiddenProperty)].concat(i.map((t=>He(t,n.useHiddenProperty)))).concat(s.map((t=>We(t,n.useHiddenProperty)))).concat(o.map((t=>We(t,n.useHiddenProperty)))),je.forEach((t=>{var e;!0===(e=t).isProperty?e.el[e.attributeName]=e.dirtyValue:e.el.setAttribute(e.attributeName,e.dirtyValue)})),Ne.dispatchEvent(new CustomEvent("screenreaderTrap",{bubbles:!0}))}(Ue,e),n.useHiddenProperty||function(t){pe?Se():(pe=function(){const t=document.createElement("div");return t.setAttribute("aria-hidden","true"),t.setAttribute("tabindex","0"),t.className="keyboard-trap-boundary",t}(),ve=pe.cloneNode(),Ee=pe.cloneNode(),ge=pe.cloneNode(),Le=pe.cloneNode(),xe=pe.cloneNode(),pe.addEventListener("focus",ke),ve.addEventListener("focus",ke),Ee.addEventListener("focus",Ce),ge.addEventListener("focus",ke),Le.addEventListener("focus",Ce),xe.addEventListener("focus",Ce)),fe=t;const e="undefined"==typeof document?null:document.body,n=P(fe,!0);ye=n[0],we=n[n.length-1],e.insertBefore(pe,e.childNodes[0]),fe.parentNode.insertBefore(ve,fe),fe.insertBefore(Ee,fe.childNodes[0]),fe.appendChild(ge),fe.parentNode.insertBefore(Le,fe.nextElementSibling),e.appendChild(xe),fe.dispatchEvent(new CustomEvent("keyboardTrap",{bubbles:!0})),fe.classList.add("keyboard-trap--active")}(Ue),document.body.setAttribute("data-makeup-modal","true"),Ue.setAttribute("data-makeup-modal","widget"),Ue.dispatchEvent(new CustomEvent("makeup-modal",{bubbles:!1})),Ue}const en="transitionend",nn=/0m?s(?:, )?/g;function sn(t,e,n){let i,s,o=0;const r=t.classList,l="".concat(e,"-init");let a=function(t){let e,n;return window.requestAnimationFrame?(e=requestAnimationFrame((function(){e=requestAnimationFrame(t)})),n=cancelAnimationFrame):(e=setTimeout(t,26),n=clearTimeout),function(){e&&(n(e),e=void 0)}}((function(){t.addEventListener(en,u,!0),r.add(e),r.remove(l),s=on(t),a=void 0,0===s&&c()}));return r.add(l),c;function c(){i||(i=!0,t.removeEventListener(en,u,!0),a?(a(),r.remove(l)):r.remove(e))}function u(){++o===s&&(i=!0,t.removeEventListener(en,u,!0),r.remove(e),n&&n())}}function on(t){let e=window.getComputedStyle(t).transitionDuration.replace(nn,"")?1:0,n=t.firstElementChild;for(;n;)e+=on(n),n=n.nextElementSibling;return e}const rn={baseClass:"dialog",closeButtonSelector:".dialog__close",focusManagementIndex:0,modal:!1,quickDismiss:!0,transitionsModifier:"mask-fade"};class ln{constructor(t,e){this._options=Object.assign({},rn,e),this._el=t,!0===this._options.modal&&this._el.setAttribute("aria-modal","true"),this._windowEl=this._el.querySelector(this._options.windowSelector),this._closeButtonEl=this._el.querySelector(this._options.closeButtonSelector),this._hasTransitions=this._el.classList.contains(`${this._options.baseClass}--${this._options.transitionsModifier}`),this._onCloseButtonClickListener=dn.bind(this),this._onKeyDownListener=hn.bind(this),this._onOpenTransitionEndCallback=cn.bind(this),this._onCloseTransitionEndCallback=un.bind(this),this._el.classList.add(`${this._options.baseClass}--js`),this.hidden||(this.modal&&an(this),this._observeEvents())}get focusables(){return P(this._windowEl)}get modal(){return"true"===this._el.getAttribute("aria-modal")}get hidden(){return this._el.hidden}open(){this._show(),this._el.dispatchEvent(new CustomEvent("dialog-open"))}close(){this._hide(),this._el.dispatchEvent(new CustomEvent("dialog-close"))}_show(){this._hasTransitions?(this._cancelTransition&&this._cancelTransition(),this._cancelTransition=sn(this._el,`${this._options.baseClass}--show`,this._onOpenTransitionEndCallback)):(this.modal&&setTimeout((()=>an(this)),50),this._el.hidden=!1),this._observeEvents()}_hide(){this._hasTransitions?(this._cancelTransition&&this._cancelTransition(),this._cancelTransition=sn(this._el,`${this._options.baseClass}--hide`,this._onCloseTransitionEndCallback)):(this.modal&&Ze(),this._el.hidden=!0),this._autoDismissTimeout=null,this._unobserveEvents()}_observeEvents(){document.addEventListener("keydown",this._onKeyDownListener),this._closeButtonEl&&this._closeButtonEl.addEventListener("click",this._onCloseButtonClickListener)}_unobserveEvents(){this._el.removeEventListener("click",this._onCloseButtonClickListener),document.removeEventListener("keydown",this._onKeyDownListener),this._closeButtonEl&&this._closeButtonEl.addEventListener("click",this._onCloseButtonClickListener)}destroy(){this._destroyed=!0,this._unobserveEvents(),this._onCloseButtonClickListener=null,this._onKeyDownListener=null,this._onOpenTransitionEndCallback=null,this._onCloseTransitionEndCallback=null,this._autoDismissTimeout=null}}function an(t){const e=t._el.querySelector("[autofocus]");e?e.focus():t.focusables[t._options.focusManagementIndex].focus(),tn(t._el)}function cn(){this._el.hidden=!1,this._cancelTransition=void 0,this.modal&&an(this)}function un(){this.modal&&Ze(),this._el.hidden=!0,this._cancelTransition=void 0}function hn(t){!0===this._options.quickDismiss&&27===t.keyCode&&this.close()}function dn(){this.close()}const mn={baseClass:"lightbox-dialog",baseClassModifier:"",quickDismiss:!0,closeButtonSelector:".lightbox-dialog__close",windowSelector:".lightbox-dialog__window"};class bn extends ln{constructor(t,e={}){super(t,Object.assign({},mn,e,{modal:!0}))}_observeEvents(){super._observeEvents(),this._onClickListener=_n.bind(this),this._el.addEventListener("click",this._onClickListener)}_unobserveEvents(){super._unobserveEvents(),this._el.removeEventListener("click",this._onClickListener)}destroy(){super.destroy(),this._onClickListener=null}}function _n(t){!0===this._options.quickDismiss&&t.target===this._el&&this.close()}const fn={baseClass:"alert-dialog",baseClassModifier:"alert",quickDismiss:!1,acknowledgeButtonSelector:".alert-dialog__acknowledge",windowSelector:".alert-dialog__window"};class pn extends bn{constructor(t,e={}){super(t,Object.assign({},fn,e))}_observeEvents(){super._observeEvents(),this._acknowledgeButtonEl=this._el.querySelector(this._options.acknowledgeButtonSelector),this._onAcknowledgeButtonClickListener=vn.bind(this),this._acknowledgeButtonEl.addEventListener("click",this._onAcknowledgeButtonClickListener)}_unobserveEvents(){super._unobserveEvents(),this._acknowledgeButtonEl.removeEventListener("click",this._onAcknowledgeButtonClickListener)}acknowledge(){this._hide(),this._el.dispatchEvent(new CustomEvent("dialog-acknowledge"))}destroy(){super.destroy(),this._onAcknowledgeButtonClickListener=null}}function vn(){this.acknowledge()}const En={baseClass:"confirm-dialog",closeButtonSelector:".confirm-dialog__close",quickDismiss:!0,confirmButtonSelector:".confirm-dialog__confirm",focusManagementIndex:1,rejectButtonSelector:".confirm-dialog__reject",windowSelector:".confirm-dialog__window"};class gn extends bn{constructor(t,e={}){super(t,Object.assign({},En,e))}_observeEvents(){super._observeEvents(),this._confirmButtonEl=this._el.querySelector(this._options.confirmButtonSelector),this._rejectButtonEl=this._el.querySelector(this._options.rejectButtonSelector),this._onConfirmButtonClickListener=Ln.bind(this),this._onRejectButtonClickListener=xn.bind(this),this._confirmButtonEl.addEventListener("click",this._onConfirmButtonClickListener),this._rejectButtonEl.addEventListener("click",this._onRejectButtonClickListener)}_unobserveEvents(){super._unobserveEvents(),this._confirmButtonEl.removeEventListener("click",this._onConfirmButtonClickListener),this._rejectButtonEl.removeEventListener("click",this._onRejectButtonClickListener)}confirm(){this._hide(),this._el.dispatchEvent(new CustomEvent("dialog-confirm"))}reject(){this._hide(),this._el.dispatchEvent(new CustomEvent("dialog-reject"))}destroy(){super.destroy(),this._onConfirmButtonClickListener=null,this._onRejectButtonClickListener=null}}function Ln(){this.confirm()}function xn(){this.reject()}const yn={baseClass:"drawer-dialog",quickDismiss:!0,closeButtonSelector:".drawer-dialog__close",focusManagementIndex:1,resizeButtonSelector:".drawer-dialog__handle",windowSelector:".drawer-dialog__window"};class wn extends bn{constructor(t,e={}){super(t,Object.assign({},yn,e))}_observeEvents(){super._observeEvents(),this._resizeButtonEl=this._el.querySelector(this._options.resizeButtonSelector),this._onResizeButtonClickListener=kn.bind(this),this._resizeButtonEl.addEventListener("click",this._onResizeButtonClickListener)}_unobserveEvents(){super._unobserveEvents(),this._resizeButtonEl.removeEventListener("click",this._onResizeButtonClickListener)}resize(){this._el.querySelector(".drawer-dialog__window").classList.toggle("drawer-dialog__window--expanded"),this._el.dispatchEvent(new CustomEvent("dialog-resize"))}destroy(){super.destroy(),this._onResizeButtonClickListener=null}}function kn(){this.resize()}const Cn={baseClass:"fullscreen-dialog",quickDismiss:!1,closeButtonSelector:".fullscreen-dialog__close",transitionsModifier:"transition",windowSelector:".fullscreen-dialog__window"};class Sn extends ln{constructor(t,e={}){super(t,Object.assign({},Cn,e,{modal:!0}))}}const Mn={baseClass:"lightbox-dialog",baseClassModifier:"input",submitButtonSelector:".lightbox-dialog__submit",cancelButtonSelector:".lightbox-dialog__cancel",windowSelector:".lightbox-dialog__window"};class An extends bn{constructor(t,e={}){super(t,Object.assign({},Mn,e))}_observeEvents(){super._observeEvents(),this._submitButtonEl=this._el.querySelector(this._options.submitButtonSelector),this._cancelButtonEl=this._el.querySelector(this._options.cancelButtonSelector),this._onSubmitButtonClickListener=On.bind(this),this._onCancelButtonClickListener=Tn.bind(this),this._submitButtonEl.addEventListener("click",this._onSubmitButtonClickListener),this._cancelButtonEl.addEventListener("click",this._onCancelButtonClickListener)}_unobserveEvents(){super._unobserveEvents(),this._submitButtonEl.removeEventListener("click",this._onSubmitButtonClickListener),this._cancelButtonEl.removeEventListener("click",this._onCancelButtonClickListener)}submit(){this._hide(),this._el.dispatchEvent(new CustomEvent("dialog-submit"))}cancel(){this._hide(),this._el.dispatchEvent(new CustomEvent("dialog-cancel"))}destroy(){super.destroy(),this._onSubmitButtonClickListener=null,this._onCancelButtonClickListener=null}}function On(){this.submit()}function Tn(){this.cancel()}const Dn={baseClass:"panel-dialog",quickDismiss:!0,closeButtonSelector:".panel-dialog__close",doneButtonSelector:".panel-dialog__done",windowSelector:".panel-dialog__window",transitionsModifier:"mask-fade-slow"};class In extends bn{constructor(t,e={}){super(t,Object.assign({},Dn,e))}}const Bn={autoDismissTimer:6e3,baseClass:"snackbar-dialog",ctaButtonSelector:".snackbar-dialog__cta",transitionsModifier:"transition"};class qn extends ln{constructor(t,e={}){super(t,Object.assign({},Bn,e)),this._autoDismissTimeout=null}_show(){super._show(),this._autoDismissTimeout=setTimeout(((t=this)=>t.close()),this._options.autoDismissTimer)}_observeEvents(){super._observeEvents(),this._ctaEl=this._el.querySelector(this._options.ctaButtonSelector),this._ctaEl&&(this._onCtaClickListener=Fn.bind(this),this._ctaEl.addEventListener("click",this._onCtaClickListener))}_unobserveEvents(){super._unobserveEvents(),this._ctaEl&&this._ctaEl.removeEventListener("click",this._onCtaClickListener)}cta(){this._hide(),this._el.dispatchEvent(new CustomEvent("dialog-cta"))}destroy(){super.destroy(),this._onCtaClickListener=null}}function Fn(){this.cta()}const Rn={baseClass:"toast-dialog",closeButtonSelector:".toast-dialog__close",ctaButtonSelector:".toast-dialog__cta",transitionsModifier:"transition"};class Nn extends ln{constructor(t,e={}){super(t,Object.assign({},Rn,e))}_show(){super._show()}_observeEvents(){super._observeEvents(),this._ctaEl=this._el.querySelector(this._options.ctaButtonSelector),this._ctaEl&&(this._onCtaClickListener=jn.bind(this),this._ctaEl.addEventListener("click",this._onCtaClickListener))}_unobserveEvents(){super._unobserveEvents(),this._ctaEl&&this._ctaEl.removeEventListener("click",this._onCtaClickListener)}cta(){this._hide(),this._el.dispatchEvent(new CustomEvent("dialog-cta"))}destroy(){super.destroy(),this._onCtaClickListener=null}}function jn(){this.cta()}const Kn=Math.min,Hn=Math.max,Wn=Math.round,Pn=Math.floor,zn=t=>({x:t,y:t}),$n={left:"right",right:"left",bottom:"top",top:"bottom"},Vn={start:"end",end:"start"};function Gn(t,e,n){return Hn(t,Kn(e,n))}function Un(t,e){return"function"==typeof t?t(e):t}function Xn(t){return t.split("-")[0]}function Yn(t){return t.split("-")[1]}function Jn(t){return"x"===t?"y":"x"}function Qn(t){return"y"===t?"height":"width"}function Zn(t){return["top","bottom"].includes(Xn(t))?"y":"x"}function ti(t){return Jn(Zn(t))}function ei(t){return t.replace(/start|end/g,(t=>Vn[t]))}function ni(t){return t.replace(/left|right|bottom|top/g,(t=>$n[t]))}function ii(t){return"number"!=typeof t?function(t){return{top:0,right:0,bottom:0,left:0,...t}}(t):{top:t,right:t,bottom:t,left:t}}function si(t){return{...t,top:t.y,left:t.x,right:t.x+t.width,bottom:t.y+t.height}}function oi(t,e,n){let{reference:i,floating:s}=t;const o=Zn(e),r=ti(e),l=Qn(r),a=Xn(e),c="y"===o,u=i.x+i.width/2-s.width/2,h=i.y+i.height/2-s.height/2,d=i[l]/2-s[l]/2;let m;switch(a){case"top":m={x:u,y:i.y-s.height};break;case"bottom":m={x:u,y:i.y+i.height};break;case"right":m={x:i.x+i.width,y:h};break;case"left":m={x:i.x-s.width,y:h};break;default:m={x:i.x,y:i.y}}switch(Yn(e)){case"start":m[r]-=d*(n&&c?-1:1);break;case"end":m[r]+=d*(n&&c?-1:1)}return m}async function ri(t,e){var n;void 0===e&&(e={});const{x:i,y:s,platform:o,rects:r,elements:l,strategy:a}=t,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:h="floating",altBoundary:d=!1,padding:m=0}=Un(e,t),b=ii(m),_=l[d?"floating"===h?"reference":"floating":h],f=si(await o.getClippingRect({element:null==(n=await(null==o.isElement?void 0:o.isElement(_)))||n?_:_.contextElement||await(null==o.getDocumentElement?void 0:o.getDocumentElement(l.floating)),boundary:c,rootBoundary:u,strategy:a})),p="floating"===h?{...r.floating,x:i,y:s}:r.reference,v=await(null==o.getOffsetParent?void 0:o.getOffsetParent(l.floating)),E=await(null==o.isElement?void 0:o.isElement(v))&&await(null==o.getScale?void 0:o.getScale(v))||{x:1,y:1},g=si(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:p,offsetParent:v,strategy:a}):p);return{top:(f.top-g.top+b.top)/E.y,bottom:(g.bottom-f.bottom+b.bottom)/E.y,left:(f.left-g.left+b.left)/E.x,right:(g.right-f.right+b.right)/E.x}}function li(t){const e=Kn(...t.map((t=>t.left))),n=Kn(...t.map((t=>t.top)));return{x:e,y:n,width:Hn(...t.map((t=>t.right)))-e,height:Hn(...t.map((t=>t.bottom)))-n}}function ai(t){return hi(t)?(t.nodeName||"").toLowerCase():"#document"}function ci(t){var e;return(null==t||null==(e=t.ownerDocument)?void 0:e.defaultView)||window}function ui(t){var e;return null==(e=(hi(t)?t.ownerDocument:t.document)||window.document)?void 0:e.documentElement}function hi(t){return t instanceof Node||t instanceof ci(t).Node}function di(t){return t instanceof Element||t instanceof ci(t).Element}function mi(t){return t instanceof HTMLElement||t instanceof ci(t).HTMLElement}function bi(t){return"undefined"!=typeof ShadowRoot&&(t instanceof ShadowRoot||t instanceof ci(t).ShadowRoot)}function _i(t){const{overflow:e,overflowX:n,overflowY:i,display:s}=gi(t);return/auto|scroll|overlay|hidden|clip/.test(e+i+n)&&!["inline","contents"].includes(s)}function fi(t){return["table","td","th"].includes(ai(t))}function pi(t){const e=vi(),n=gi(t);return"none"!==n.transform||"none"!==n.perspective||!!n.containerType&&"normal"!==n.containerType||!e&&!!n.backdropFilter&&"none"!==n.backdropFilter||!e&&!!n.filter&&"none"!==n.filter||["transform","perspective","filter"].some((t=>(n.willChange||"").includes(t)))||["paint","layout","strict","content"].some((t=>(n.contain||"").includes(t)))}function vi(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function Ei(t){return["html","body","#document"].includes(ai(t))}function gi(t){return ci(t).getComputedStyle(t)}function Li(t){return di(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function xi(t){if("html"===ai(t))return t;const e=t.assignedSlot||t.parentNode||bi(t)&&t.host||ui(t);return bi(e)?e.host:e}function yi(t){const e=xi(t);return Ei(e)?t.ownerDocument?t.ownerDocument.body:t.body:mi(e)&&_i(e)?e:yi(e)}function wi(t,e,n){var i;void 0===e&&(e=[]),void 0===n&&(n=!0);const s=yi(t),o=s===(null==(i=t.ownerDocument)?void 0:i.body),r=ci(s);return o?e.concat(r,r.visualViewport||[],_i(s)?s:[],r.frameElement&&n?wi(r.frameElement):[]):e.concat(s,wi(s,[],n))}function ki(t){const e=gi(t);let n=parseFloat(e.width)||0,i=parseFloat(e.height)||0;const s=mi(t),o=s?t.offsetWidth:n,r=s?t.offsetHeight:i,l=Wn(n)!==o||Wn(i)!==r;return l&&(n=o,i=r),{width:n,height:i,$:l}}function Ci(t){return di(t)?t:t.contextElement}function Si(t){const e=Ci(t);if(!mi(e))return zn(1);const n=e.getBoundingClientRect(),{width:i,height:s,$:o}=ki(e);let r=(o?Wn(n.width):n.width)/i,l=(o?Wn(n.height):n.height)/s;return r&&Number.isFinite(r)||(r=1),l&&Number.isFinite(l)||(l=1),{x:r,y:l}}const Mi=zn(0);function Ai(t){const e=ci(t);return vi()&&e.visualViewport?{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}:Mi}function Oi(t,e,n,i){void 0===e&&(e=!1),void 0===n&&(n=!1);const s=t.getBoundingClientRect(),o=Ci(t);let r=zn(1);e&&(i?di(i)&&(r=Si(i)):r=Si(t));const l=function(t,e,n){return void 0===e&&(e=!1),!(!n||e&&n!==ci(t))&&e}(o,n,i)?Ai(o):zn(0);let a=(s.left+l.x)/r.x,c=(s.top+l.y)/r.y,u=s.width/r.x,h=s.height/r.y;if(o){const t=ci(o),e=i&&di(i)?ci(i):i;let n=t,s=n.frameElement;for(;s&&i&&e!==n;){const t=Si(s),e=s.getBoundingClientRect(),i=gi(s),o=e.left+(s.clientLeft+parseFloat(i.paddingLeft))*t.x,r=e.top+(s.clientTop+parseFloat(i.paddingTop))*t.y;a*=t.x,c*=t.y,u*=t.x,h*=t.y,a+=o,c+=r,n=ci(s),s=n.frameElement}}return si({width:u,height:h,x:a,y:c})}const Ti=[":popover-open",":modal"];function Di(t){return Ti.some((e=>{try{return t.matches(e)}catch(t){return!1}}))}function Ii(t){return Oi(ui(t)).left+Li(t).scrollLeft}function Bi(t,e,n){let i;if("viewport"===e)i=function(t,e){const n=ci(t),i=ui(t),s=n.visualViewport;let o=i.clientWidth,r=i.clientHeight,l=0,a=0;if(s){o=s.width,r=s.height;const t=vi();(!t||t&&"fixed"===e)&&(l=s.offsetLeft,a=s.offsetTop)}return{width:o,height:r,x:l,y:a}}(t,n);else if("document"===e)i=function(t){const e=ui(t),n=Li(t),i=t.ownerDocument.body,s=Hn(e.scrollWidth,e.clientWidth,i.scrollWidth,i.clientWidth),o=Hn(e.scrollHeight,e.clientHeight,i.scrollHeight,i.clientHeight);let r=-n.scrollLeft+Ii(t);const l=-n.scrollTop;return"rtl"===gi(i).direction&&(r+=Hn(e.clientWidth,i.clientWidth)-s),{width:s,height:o,x:r,y:l}}(ui(t));else if(di(e))i=function(t,e){const n=Oi(t,!0,"fixed"===e),i=n.top+t.clientTop,s=n.left+t.clientLeft,o=mi(t)?Si(t):zn(1);return{width:t.clientWidth*o.x,height:t.clientHeight*o.y,x:s*o.x,y:i*o.y}}(e,n);else{const n=Ai(t);i={...e,x:e.x-n.x,y:e.y-n.y}}return si(i)}function qi(t,e){const n=xi(t);return!(n===e||!di(n)||Ei(n))&&("fixed"===gi(n).position||qi(n,e))}function Fi(t,e,n){const i=mi(e),s=ui(e),o="fixed"===n,r=Oi(t,!0,o,e);let l={scrollLeft:0,scrollTop:0};const a=zn(0);if(i||!i&&!o)if(("body"!==ai(e)||_i(s))&&(l=Li(e)),i){const t=Oi(e,!0,o,e);a.x=t.x+e.clientLeft,a.y=t.y+e.clientTop}else s&&(a.x=Ii(s));return{x:r.left+l.scrollLeft-a.x,y:r.top+l.scrollTop-a.y,width:r.width,height:r.height}}function Ri(t,e){return mi(t)&&"fixed"!==gi(t).position?e?e(t):t.offsetParent:null}function Ni(t,e){const n=ci(t);if(!mi(t)||Di(t))return n;let i=Ri(t,e);for(;i&&fi(i)&&"static"===gi(i).position;)i=Ri(i,e);return i&&("html"===ai(i)||"body"===ai(i)&&"static"===gi(i).position&&!pi(i))?n:i||function(t){let e=xi(t);for(;mi(e)&&!Ei(e);){if(pi(e))return e;e=xi(e)}return null}(t)||n}const ji={convertOffsetParentRelativeRectToViewportRelativeRect:function(t){let{elements:e,rect:n,offsetParent:i,strategy:s}=t;const o="fixed"===s,r=ui(i),l=!!e&&Di(e.floating);if(i===r||l&&o)return n;let a={scrollLeft:0,scrollTop:0},c=zn(1);const u=zn(0),h=mi(i);if((h||!h&&!o)&&(("body"!==ai(i)||_i(r))&&(a=Li(i)),mi(i))){const t=Oi(i);c=Si(i),u.x=t.x+i.clientLeft,u.y=t.y+i.clientTop}return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-a.scrollLeft*c.x+u.x,y:n.y*c.y-a.scrollTop*c.y+u.y}},getDocumentElement:ui,getClippingRect:function(t){let{element:e,boundary:n,rootBoundary:i,strategy:s}=t;const o=[..."clippingAncestors"===n?function(t,e){const n=e.get(t);if(n)return n;let i=wi(t,[],!1).filter((t=>di(t)&&"body"!==ai(t))),s=null;const o="fixed"===gi(t).position;let r=o?xi(t):t;for(;di(r)&&!Ei(r);){const e=gi(r),n=pi(r);n||"fixed"!==e.position||(s=null),(o?!n&&!s:!n&&"static"===e.position&&s&&["absolute","fixed"].includes(s.position)||_i(r)&&!n&&qi(t,r))?i=i.filter((t=>t!==r)):s=e,r=xi(r)}return e.set(t,i),i}(e,this._c):[].concat(n),i],r=o[0],l=o.reduce(((t,n)=>{const i=Bi(e,n,s);return t.top=Hn(i.top,t.top),t.right=Kn(i.right,t.right),t.bottom=Kn(i.bottom,t.bottom),t.left=Hn(i.left,t.left),t}),Bi(e,r,s));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}},getOffsetParent:Ni,getElementRects:async function(t){const e=this.getOffsetParent||Ni,n=this.getDimensions;return{reference:Fi(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,...await n(t.floating)}}},getClientRects:function(t){return Array.from(t.getClientRects())},getDimensions:function(t){const{width:e,height:n}=ki(t);return{width:e,height:n}},getScale:Si,isElement:di,isRTL:function(t){return"rtl"===gi(t).direction}};const Ki=function(t){return void 0===t&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:i,placement:s}=e,{mainAxis:o=!0,crossAxis:r=!1,limiter:l={fn:t=>{let{x:e,y:n}=t;return{x:e,y:n}}},...a}=Un(t,e),c={x:n,y:i},u=await ri(e,a),h=Zn(Xn(s)),d=Jn(h);let m=c[d],b=c[h];if(o){const t="y"===d?"bottom":"right";m=Gn(m+u["y"===d?"top":"left"],m,m-u[t])}if(r){const t="y"===h?"bottom":"right";b=Gn(b+u["y"===h?"top":"left"],b,b-u[t])}const _=l.fn({...e,[d]:m,[h]:b});return{..._,data:{x:_.x-n,y:_.y-i}}}}},Hi=function(t){return void 0===t&&(t={}),{name:"flip",options:t,async fn(e){var n,i;const{placement:s,middlewareData:o,rects:r,initialPlacement:l,platform:a,elements:c}=e,{mainAxis:u=!0,crossAxis:h=!0,fallbackPlacements:d,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:b="none",flipAlignment:_=!0,...f}=Un(t,e);if(null!=(n=o.arrow)&&n.alignmentOffset)return{};const p=Xn(s),v=Xn(l)===l,E=await(null==a.isRTL?void 0:a.isRTL(c.floating)),g=d||(v||!_?[ni(l)]:function(t){const e=ni(t);return[ei(t),e,ei(e)]}(l));d||"none"===b||g.push(...function(t,e,n,i){const s=Yn(t);let o=function(t,e,n){const i=["left","right"],s=["right","left"],o=["top","bottom"],r=["bottom","top"];switch(t){case"top":case"bottom":return n?e?s:i:e?i:s;case"left":case"right":return e?o:r;default:return[]}}(Xn(t),"start"===n,i);return s&&(o=o.map((t=>t+"-"+s)),e&&(o=o.concat(o.map(ei)))),o}(l,_,b,E));const L=[l,...g],x=await ri(e,f),y=[];let w=(null==(i=o.flip)?void 0:i.overflows)||[];if(u&&y.push(x[p]),h){const t=function(t,e,n){void 0===n&&(n=!1);const i=Yn(t),s=ti(t),o=Qn(s);let r="x"===s?i===(n?"end":"start")?"right":"left":"start"===i?"bottom":"top";return e.reference[o]>e.floating[o]&&(r=ni(r)),[r,ni(r)]}(s,r,E);y.push(x[t[0]],x[t[1]])}if(w=[...w,{placement:s,overflows:y}],!y.every((t=>t<=0))){var k,C;const t=((null==(k=o.flip)?void 0:k.index)||0)+1,e=L[t];if(e)return{data:{index:t,overflows:w},reset:{placement:e}};let n=null==(C=w.filter((t=>t.overflows[0]<=0)).sort(((t,e)=>t.overflows[1]-e.overflows[1]))[0])?void 0:C.placement;if(!n)switch(m){case"bestFit":{var S;const t=null==(S=w.map((t=>[t.placement,t.overflows.filter((t=>t>0)).reduce(((t,e)=>t+e),0)])).sort(((t,e)=>t[1]-e[1]))[0])?void 0:S[0];t&&(n=t);break}case"initialPlacement":n=l}if(s!==n)return{reset:{placement:n}}}return{}}}},Wi=t=>({name:"arrow",options:t,async fn(e){const{x:n,y:i,placement:s,rects:o,platform:r,elements:l,middlewareData:a}=e,{element:c,padding:u=0}=Un(t,e)||{};if(null==c)return{};const h=ii(u),d={x:n,y:i},m=ti(s),b=Qn(m),_=await r.getDimensions(c),f="y"===m,p=f?"top":"left",v=f?"bottom":"right",E=f?"clientHeight":"clientWidth",g=o.reference[b]+o.reference[m]-d[m]-o.floating[b],L=d[m]-o.reference[m],x=await(null==r.getOffsetParent?void 0:r.getOffsetParent(c));let y=x?x[E]:0;y&&await(null==r.isElement?void 0:r.isElement(x))||(y=l.floating[E]||o.floating[b]);const w=g/2-L/2,k=y/2-_[b]/2-1,C=Kn(h[p],k),S=Kn(h[v],k),M=C,A=y-_[b]-S,O=y/2-_[b]/2+w,T=Gn(M,O,A),D=!a.arrow&&null!=Yn(s)&&O!==T&&o.reference[b]/2-(Ot.y-e.y)),n=[];let i=null;for(let t=0;ti.height/2?n.push([s]):n[n.length-1].push(s),i=s}return n.map((t=>si(li(t))))}(u),d=si(li(u)),m=ii(l),b=await o.getElementRects({reference:{getBoundingClientRect:function(){if(2===h.length&&h[0].left>h[1].right&&null!=a&&null!=c)return h.find((t=>a>t.left-m.left&&at.top-m.top&&c=2){if("y"===Zn(n)){const t=h[0],e=h[h.length-1],i="top"===Xn(n),s=t.top,o=e.bottom,r=i?t.left:e.left,l=i?t.right:e.right;return{top:s,bottom:o,left:r,right:l,width:l-r,height:o-s,x:r,y:s}}const t="left"===Xn(n),e=Hn(...h.map((t=>t.right))),i=Kn(...h.map((t=>t.left))),s=h.filter((n=>t?n.left===i:n.right===e)),o=s[0].top,r=s[s.length-1].bottom;return{top:o,bottom:r,left:i,right:e,width:e-i,height:r-o,x:i,y:o}}return d}},floating:i.floating,strategy:r});return s.reference.x!==b.reference.x||s.reference.y!==b.reference.y||s.reference.width!==b.reference.width||s.reference.height!==b.reference.height?{reset:{rects:b}}:{}}}};if(void 0!==window.URLSearchParams){const t=new URLSearchParams(location.search);t.has("debug")&&"1"===t.get("debug")&&document.querySelectorAll(".page-grid").forEach((t=>{t.classList.add("page-grid--debug")})),t.has("dark")&&"1"===t.get("dark")&&document.querySelector("body").classList.add("skin-experiment-dark-mode")}const zi=[];let $i;const Vi=t=>console.log(t.type,t.detail);document.getElementById("busy-button").addEventListener("click",(function(){const t=this;t.setAttribute("aria-label","Busy..."),t.innerHTML='\n \n \n \n \n \n \n \n ',window.setTimeout((function(){t.removeAttribute("aria-label"),t.innerHTML="Activate Spinner"}),2e3)})),document.querySelectorAll('.checkbox input[aria-checked="mixed"]').forEach((function(t){t.addEventListener("click",(function(){const t=!0===this.checked;this.setAttribute("aria-checked",t?"mixed":"false")}))})),document.querySelectorAll(".breadcrumbs").forEach((function(t){const e=t.offsetWidth,n=t.scrollWidth-e;n&&t.scroll(n,0)})),document.querySelectorAll(".expand-btn").forEach((function(t){t.addEventListener("click",(function(){const t="true"===this.getAttribute("aria-expanded");this.setAttribute("aria-expanded",!t)}))})),document.querySelectorAll(".filter-menu-button--form button").forEach((function(t){t.addEventListener("click",(function(){const t="true"===this.getAttribute("aria-expanded");this.setAttribute("aria-expanded",!t)}))})),document.querySelectorAll(".fake-menu-button").forEach((function(t){let e=".icon-btn";t.querySelector(".expand-btn")?e=".expand-btn":t.querySelector(".btn")&&(e=".btn"),zi.push(new it(t,{expandOnClick:!0,collapseOnFocusOut:!0,collapseOnClickOut:!0,contentSelector:".fake-menu-button__menu",focusManagement:"focusable",hostSelector:e}))})),document.querySelectorAll(".combobox").forEach((function(t){zi.push(new Tt(t)),t.addEventListener("makeup-combobox-change",Vi)})),document.querySelectorAll(".dialog-button").forEach((function(t){const e=t.dataset.makeupFor,n=document.getElementById(e),i=n.classList;let s;i.contains("confirm-dialog")?s=new gn(n):i.contains("alert-dialog")?s=new pn(n):i.contains("lightbox-dialog--input")?s=new An(n):i.contains("fullscreen-dialog")?s=new Sn(n):i.contains("snackbar-dialog")?s=new qn(n):i.contains("toast-dialog")?s=new Nn(n):i.contains("drawer-dialog")?s=new wn(n):i.contains("panel-dialog")?s=new In(n):i.contains("lightbox-dialog")&&(s=new bn(n)),zi.push(new Wt(t,s)),s._el.addEventListener("dialog-open",Vi),s._el.addEventListener("dialog-close",Vi),s._el.addEventListener("dialog-acknowledge",Vi),s._el.addEventListener("dialog-confirm",Vi),s._el.addEventListener("dialog-reject",Vi),s._el.addEventListener("dialog-cta",Vi)}));class Gi{constructor(t,e){this.messageContainerEl=t.querySelector(".progress-bar-expressive__messages"),this.messages=e,this.messageContainerEl&&this.messages&&(this.isInitialized=!0,this.nextMessageEl=t.querySelector('[aria-hidden="true"]'),this.currentMessageEl=t.querySelector('[role="status"]'),this.messageIndex=0,this.message=this.messages[this.messageIndex])}queueNextMessage(){this.isInitialized&&this.messages.length>1&&(this.messageIndex=(this.messageIndex+1)%this.messages.length,this.message=this.messages[this.messageIndex],this.nextMessageEl.innerText=this.messages[this.messageIndex],this.nextMessageEl.classList.add("progress-bar-expressive__message--in"),this.currentMessageEl.classList.add("progress-bar-expressive__message--out"),setTimeout(this.showMessage.bind(this),833))}showMessage(){this.isInitialized&&(this.currentMessageEl.innerText=this.message,this.currentMessageEl.classList.remove("progress-bar-expressive__message--out"),this.nextMessageEl.classList.remove("progress-bar-expressive__message--in"),setTimeout(this.queueNextMessage.bind(this),2e3))}}document.querySelectorAll(".progress-bar-expressive-messages-example").forEach((function(t){const e=new Gi(t,["Hang tight.","We're finishing your order.","Just another moment."]);e.isInitialized&&e.queueNextMessage()}));class Ui{constructor(t,e){this.host=t.querySelector(".".concat(e,"__host")),this.overlay=t.querySelector(".".concat(e,"__overlay")),this.arrowEl=t.querySelector(".".concat(e,"__pointer")),this.host&&this.overlay&&(this.isInitialized=!0)}init(){this.cleanup=function(t,e,n,i){void 0===i&&(i={});const{ancestorScroll:s=!0,ancestorResize:o=!0,elementResize:r="function"==typeof ResizeObserver,layoutShift:l="function"==typeof IntersectionObserver,animationFrame:a=!1}=i,c=Ci(t),u=s||o?[...c?wi(c):[],...wi(e)]:[];u.forEach((t=>{s&&t.addEventListener("scroll",n,{passive:!0}),o&&t.addEventListener("resize",n)}));const h=c&&l?function(t,e){let n,i=null;const s=ui(t);function o(){var t;clearTimeout(n),null==(t=i)||t.disconnect(),i=null}return function r(l,a){void 0===l&&(l=!1),void 0===a&&(a=1),o();const{left:c,top:u,width:h,height:d}=t.getBoundingClientRect();if(l||e(),!h||!d)return;const m={rootMargin:-Pn(u)+"px "+-Pn(s.clientWidth-(c+h))+"px "+-Pn(s.clientHeight-(u+d))+"px "+-Pn(c)+"px",threshold:Hn(0,Kn(1,a))||1};let b=!0;function _(t){const e=t[0].intersectionRatio;if(e!==a){if(!b)return r();e?r(!1,e):n=setTimeout((()=>{r(!1,1e-7)}),100)}b=!1}try{i=new IntersectionObserver(_,{...m,root:s.ownerDocument})}catch(t){i=new IntersectionObserver(_,m)}i.observe(t)}(!0),o}(c,n):null;let d,m=-1,b=null;r&&(b=new ResizeObserver((t=>{let[i]=t;i&&i.target===c&&b&&(b.unobserve(e),cancelAnimationFrame(m),m=requestAnimationFrame((()=>{var t;null==(t=b)||t.observe(e)}))),n()})),c&&!a&&b.observe(c),b.observe(e));let _=a?Oi(t):null;return a&&function e(){const i=Oi(t);!_||i.x===_.x&&i.y===_.y&&i.width===_.width&&i.height===_.height||n(),_=i,d=requestAnimationFrame(e)}(),n(),()=>{var t;u.forEach((t=>{s&&t.removeEventListener("scroll",n),o&&t.removeEventListener("resize",n)})),null==h||h(),null==(t=b)||t.disconnect(),b=null,a&&cancelAnimationFrame(d)}}(this.host,this.overlay,this.update.bind(this))}update(){var t;this.isInitialized&&((t,e,n)=>{const i=new Map,s={platform:ji,...n},o={...s.platform,_c:i};return(async(t,e,n)=>{const{placement:i="bottom",strategy:s="absolute",middleware:o=[],platform:r}=n,l=o.filter(Boolean),a=await(null==r.isRTL?void 0:r.isRTL(e));let c=await r.getElementRects({reference:t,floating:e,strategy:s}),{x:u,y:h}=oi(c,i,a),d=i,m={},b=0;for(let n=0;n{let{x:e,y:n,placement:i,middlewareData:s}=t;if(Object.assign(this.overlay.style,{left:"".concat(e,"px"),top:"".concat(n,"px")}),s.arrow){const{x:t,y:e}=s.arrow,n={top:"bottom",right:"left",bottom:"top",left:"right"}[i.split("-")[0]];Object.assign(this.arrowEl.style,{left:null!=t?"".concat(t,"px"):"",top:null!=e?"".concat(e,"px"):"",right:"",bottom:"",[n]:"-4px"})}}))}show(){this.host.setAttribute("aria-expanded","true"),this.init()}isExpanded(){return console.log(this.host,this.host.getAttribute("aria-expanded")),"true"===this.host.getAttribute("aria-expanded")}hide(){this.isExpanded()&&(this.host.setAttribute("aria-expanded","false"),this.cleanup&&this.cleanup())}}document.querySelectorAll(".tooltip").forEach((function(t){t.classList.contains("tooltip--js")||zi.push(new it(t,{contentSelector:".tooltip__overlay",collapseOnFocusOut:!0,collapseOnMouseOut:!0,expandOnFocus:!0,expandOnHover:!0,focusManagement:"focusable",hostSelector:".tooltip__host"}))})),document.querySelectorAll(".tooltip--js").forEach((function(t){const e=new Ui(t,"tooltip");e.isInitialized&&(["mouseenter","focus"].forEach((t=>{e.host.addEventListener(t,(()=>e.show()))})),["mouseleave","blur"].forEach((t=>{e.host.addEventListener(t,(()=>e.hide()))})))})),document.querySelectorAll(".infotip").forEach((function(t){if(t.classList.contains("infotip--js"))return;const e=t.querySelector("button"),n=".infotip__host";if(!t.querySelector(n))return;const i=new it(t,{contentSelector:".infotip__overlay",expandOnFocus:!1,expandOnClick:!0,hostSelector:n});t.querySelector(".infotip__close").addEventListener("click",(function(){i.expanded=!1,e.focus()}))})),document.querySelectorAll(".infotip--js").forEach((function(t){const e=new Ui(t,"infotip");if(!e.isInitialized)return;console.log("init",t),e.host.addEventListener("click",(()=>{e.isExpanded()?e.hide():e.show()}));const n=t.querySelector("button");t.querySelector(".infotip__close").addEventListener("click",(function(){n.focus(),e.isInitialized&&e.hide()}))})),document.querySelectorAll(".tourtip").forEach((function(t){t.classList.contains("tourtip--js")||t.querySelector(".tourtip__close").addEventListener("click",(function(){t.classList.remove("tourtip--expanded")}))})),document.querySelectorAll(".tourtip--js").forEach((function(t){const e=new Ui(t,"tourtip");e.isInitialized&&(e.init(),t.querySelector(".tourtip__close").addEventListener("click",(function(){t.classList.remove("tourtip--expanded"),e.hide()})))})),document.querySelectorAll(".floating-label").forEach((function(t){zi.push(new bt(t))})),document.querySelectorAll(".progress-bar-toggle").forEach((function(t){const e=t.dataset.progressPlayButtonFor,n=document.getElementById(e),i=function(){const t=n.value+10;let e;e=t>100?100:t,n.value=e};t.addEventListener("click",(function(){$i?(clearInterval($i),$i=null):(i(),$i=setInterval(i,1e3))}))})),document.querySelectorAll(".progress-bar-reset").forEach((function(t){const e=t.dataset.progressResetButtonFor,n=document.getElementById(e);t.addEventListener("click",(function(){$i&&(clearInterval($i),$i=null),n.value=0}))})),document.querySelectorAll(".star-rating-select").forEach((function(t){t.addEventListener("change",(function(e){const n=e.target.value-1;t.querySelectorAll("input").forEach((function(t,e){t.classList.toggle("star-rating-select__control--filled",e{let n;return function(){for(var t=arguments.length,e=new Array(t),i=0;i{n=null,function(t,e){let n="off";const i=t.value.length,s=e.innerHTML.split(/([0-9]+)( \w+ )([0-9]+)/g);if(s.length<=1)return;s[1]=i;const o=s[3];e.innerHTML=s.join(""),i>=o&&(n="polite"),t.setAttribute("aria-live",n)}(...e)}),500)}})();document.querySelectorAll(".field").forEach((function(t){const e=t.querySelector("input,textarea"),n=e&&e.dataset.fieldCount;if(n){const i=t.querySelector("#".concat(n));e.addEventListener("keydown",Xi.bind(this,e,i))}})),document.querySelectorAll(".chips-combobox").forEach((function(t){const e=t.querySelector(".chips-combobox__items"),n=t.querySelector(".chips-combobox__combobox").querySelector(".combobox__options"),i="div.combobox__option",s="button.chip__button";t.addEventListener("click",(function(t){const o=t.target;if(o.matches(i)||o.matches(s)){if(o.matches(i)){const t=o.innerText.trim();n.removeChild(o),function(t){const n='\n \n \n \n '.concat(t,'\n \n \n \n \n \n \n \n \n ');e.insertAdjacentHTML("beforeend",n)}(t)}if(o.matches(s)){const t=o.previousElementSibling.innerText.trim(),i=o.closest("li");e.removeChild(i),function(t){const e='\n \n '.concat(t," \n
\n ");n.insertAdjacentHTML("beforeend",e)}(t)}}}))}))})();
//# sourceMappingURL=docs.min.js.map
\ No newline at end of file
diff --git a/docs/static/docs.min.js.map b/docs/static/docs.min.js.map
index 7cc698339..ec2e45610 100644
--- a/docs/static/docs.min.js.map
+++ b/docs/static/docs.min.js.map
@@ -1 +1 @@
-{"version":3,"file":"docs.min.js","mappings":"mBAiCA,SAASA,EAAUC,IA9BnB,SAAuBC,EAAKC,EAAIC,GAC9B,IAAKF,EAAIG,SAAU,CACjB,MAAMC,EAAMJ,EAAII,IAChB,OAAQA,GACN,IAAK,QACL,IAAK,SACL,IAAK,SACL,IAAK,WACL,IAAK,MACL,IAAK,OACL,IAAK,YAC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6CACzIX,EAAkBM,mBAAmB,YAAaM,EACpD,CAXIC,CAAgBL,EAClB,CApBkG,CAsBpG,GASF,G","sources":["webpack://@ebay/skin/./node_modules/makeup-key-emitter/dist/mjs/index.js","webpack://@ebay/skin/./node_modules/makeup-next-id/dist/mjs/index.js","webpack://@ebay/skin/./node_modules/makeup-exit-emitter/dist/mjs/index.js","webpack://@ebay/skin/./node_modules/makeup-navigation-emitter/dist/mjs/index.js","webpack://@ebay/skin/./node_modules/makeup-roving-tabindex/dist/mjs/index.js","webpack://@ebay/skin/./node_modules/makeup-focusables/dist/mjs/index.js","webpack://@ebay/skin/./node_modules/makeup-expander/dist/mjs/index.js","webpack://@ebay/skin/./node_modules/makeup-floating-label/dist/mjs/index.js","webpack://@ebay/skin/./node_modules/makeup-prevent-scroll-keys/dist/mjs/index.js","webpack://@ebay/skin/./node_modules/makeup-active-descendant/dist/mjs/index.js","webpack://@ebay/skin/./node_modules/makeup-listbox/dist/mjs/index.js","webpack://@ebay/skin/./node_modules/makeup-combobox/dist/mjs/index.js","webpack://@ebay/skin/./node_modules/makeup-dialog-button/dist/mjs/index.js","webpack://@ebay/skin/./node_modules/makeup-listbox-button/dist/mjs/index.js","webpack://@ebay/skin/./node_modules/makeup-menu/dist/mjs/index.js","webpack://@ebay/skin/./node_modules/makeup-menu-button/dist/mjs/index.js","webpack://@ebay/skin/./node_modules/makeup-switch/dist/mjs/index.js","webpack://@ebay/skin/./node_modules/makeup-keyboard-trap/dist/mjs/index.js","webpack://@ebay/skin/./node_modules/makeup-screenreader-trap/dist/mjs/util.js","webpack://@ebay/skin/./node_modules/makeup-screenreader-trap/dist/mjs/index.js","webpack://@ebay/skin/./node_modules/makeup-modal/dist/mjs/index.js","webpack://@ebay/skin/./node_modules/makeup-dialog/dist/mjs/transition.js","webpack://@ebay/skin/./node_modules/makeup-dialog/dist/mjs/index.js","webpack://@ebay/skin/./node_modules/makeup-lightbox-dialog/dist/mjs/index.js","webpack://@ebay/skin/./node_modules/makeup-alert-dialog/dist/mjs/index.js","webpack://@ebay/skin/./node_modules/makeup-confirm-dialog/dist/mjs/index.js","webpack://@ebay/skin/./node_modules/makeup-drawer-dialog/dist/mjs/index.js","webpack://@ebay/skin/./node_modules/makeup-fullscreen-dialog/dist/mjs/index.js","webpack://@ebay/skin/./node_modules/makeup-input-dialog/dist/mjs/index.js","webpack://@ebay/skin/./node_modules/makeup-panel-dialog/dist/mjs/index.js","webpack://@ebay/skin/./node_modules/makeup-snackbar-dialog/dist/mjs/index.js","webpack://@ebay/skin/./node_modules/makeup-toast-dialog/dist/mjs/index.js","webpack://@ebay/skin/./node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs","webpack://@ebay/skin/./node_modules/@floating-ui/core/dist/floating-ui.core.mjs","webpack://@ebay/skin/./node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.mjs","webpack://@ebay/skin/./node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs","webpack://@ebay/skin/./docs/_babel/main.js"],"sourcesContent":["function uncapitalizeFirstLetter(str) {\n return str.charAt(0).toLowerCase() + str.slice(1);\n}\nfunction onKeyDownOrUp(evt, el, keyEventType) {\n if (!evt.shiftKey) {\n const key = evt.key;\n switch (key) {\n case \"Enter\":\n case \"Escape\":\n case \"PageUp\":\n case \"PageDown\":\n case \"End\":\n case \"Home\":\n case \"ArrowLeft\":\n case \"ArrowUp\":\n case \"ArrowRight\":\n case \"ArrowDown\":\n el.dispatchEvent(new CustomEvent(uncapitalizeFirstLetter(`${key}Key${keyEventType}`), {\n detail: evt,\n bubbles: true\n }));\n break;\n case \" \":\n el.dispatchEvent(new CustomEvent(`spacebarKey${keyEventType}`, {\n detail: evt,\n bubbles: true\n }));\n break;\n default:\n return;\n }\n }\n}\nfunction onKeyDown(e) {\n onKeyDownOrUp(e, this, \"Down\");\n}\nfunction onKeyUp(e) {\n onKeyDownOrUp(e, this, \"Up\");\n}\nfunction addKeyDown(el) {\n el.addEventListener(\"keydown\", onKeyDown);\n}\nfunction addKeyUp(el) {\n el.addEventListener(\"keyup\", onKeyUp);\n}\nfunction removeKeyDown(el) {\n el.removeEventListener(\"keydown\", onKeyDown);\n}\nfunction removeKeyUp(el) {\n el.removeEventListener(\"keyup\", onKeyUp);\n}\nfunction add(el) {\n addKeyDown(el);\n addKeyUp(el);\n}\nfunction remove(el) {\n removeKeyDown(el);\n removeKeyUp(el);\n}\nexport {\n add,\n addKeyDown,\n addKeyUp,\n remove,\n removeKeyDown,\n removeKeyUp\n};\n","const sequenceMap = {};\nconst defaultPrefix = \"nid\";\nconst randomPortion = createRandomPortion(3);\nfunction randomNumber(max) {\n return Math.floor(Math.random() * max);\n}\nfunction createRandomPortion(size) {\n const letters = \"abcdefghijklmnopqrstuvwxyz\";\n const digits = \"0123456789\";\n const allChars = letters + digits;\n let portion = letters[randomNumber(25)];\n for (let i = 1; i < size; i++) {\n portion += allChars[randomNumber(35)];\n }\n return portion;\n}\nfunction src_default(el, prefix = defaultPrefix) {\n const separator = prefix === \"\" ? \"\" : \"-\";\n const key = `${prefix}${separator}${randomPortion}`;\n sequenceMap[key] = sequenceMap[key] || 0;\n if (!el.id) {\n el.setAttribute(\"id\", `${key}-${sequenceMap[key]++}`);\n }\n return el.id;\n}\nexport {\n src_default as default\n};\n","import nextID from \"makeup-next-id\";\nconst focusExitEmitters = {};\nfunction doFocusExit(el, fromElement, toElement) {\n el.dispatchEvent(new CustomEvent(\"focusExit\", {\n detail: { fromElement, toElement },\n bubbles: false\n }));\n}\nfunction onDocumentFocusIn(e) {\n const newFocusElement = e.target;\n const targetIsDescendant = this.el.contains(newFocusElement);\n if (targetIsDescendant === true) {\n this.currentFocusElement = newFocusElement;\n } else {\n window.removeEventListener(\"blur\", this.onWindowBlurListener);\n document.removeEventListener(\"focusin\", this.onDocumentFocusInListener);\n doFocusExit(this.el, this.currentFocusElement, newFocusElement);\n this.currentFocusElement = null;\n }\n}\nfunction onWindowBlur() {\n doFocusExit(this.el, this.currentFocusElement, void 0);\n}\nfunction onWidgetFocusIn() {\n document.addEventListener(\"focusin\", this.onDocumentFocusInListener);\n window.addEventListener(\"blur\", this.onWindowBlurListener);\n}\nclass FocusExitEmitter {\n constructor(el) {\n this.el = el;\n this.currentFocusElement = null;\n this.onWidgetFocusInListener = onWidgetFocusIn.bind(this);\n this.onDocumentFocusInListener = onDocumentFocusIn.bind(this);\n this.onWindowBlurListener = onWindowBlur.bind(this);\n this.el.addEventListener(\"focusin\", this.onWidgetFocusInListener);\n }\n removeEventListeners() {\n window.removeEventListener(\"blur\", this.onWindowBlurListener);\n document.removeEventListener(\"focusin\", this.onDocumentFocusInListener);\n this.el.removeEventListener(\"focusin\", this.onWidgetFocusInListener);\n }\n}\nfunction addFocusExit(el) {\n let exitEmitter = null;\n nextID(el);\n if (!focusExitEmitters[el.id]) {\n exitEmitter = new FocusExitEmitter(el);\n focusExitEmitters[el.id] = exitEmitter;\n }\n return exitEmitter;\n}\nfunction removeFocusExit(el) {\n const exitEmitter = focusExitEmitters[el.id];\n if (exitEmitter) {\n exitEmitter.removeEventListeners();\n delete focusExitEmitters[el.id];\n }\n}\nexport {\n addFocusExit,\n removeFocusExit\n};\n","import * as KeyEmitter from \"makeup-key-emitter\";\nimport * as ExitEmitter from \"makeup-exit-emitter\";\nconst defaultOptions = {\n axis: \"both\",\n autoInit: \"interactive\",\n autoReset: \"current\",\n ignoreByDelegateSelector: null,\n wrap: false\n};\nfunction isItemNavigable(el) {\n return !el.hidden && el.getAttribute(\"aria-disabled\") !== \"true\";\n}\nfunction isIndexNavigable(items, index) {\n return index >= 0 && index < items.length ? isItemNavigable(items[index]) : false;\n}\nfunction findNavigableItems(items) {\n return items.filter(isItemNavigable);\n}\nfunction findFirstNavigableIndex(items) {\n return items.findIndex((item) => isItemNavigable(item));\n}\nfunction findLastNavigableIndex(items) {\n return items.indexOf(findNavigableItems(items).reverse()[0]);\n}\nfunction findIndexByAttribute(items, attribute, value) {\n return items.findIndex((item) => isItemNavigable(item) && item.getAttribute(attribute) === value);\n}\nfunction findFirstNavigableAriaCheckedIndex(items) {\n return findIndexByAttribute(items, \"aria-checked\", \"true\");\n}\nfunction findFirstNavigableAriaSelectedIndex(items) {\n return findIndexByAttribute(items, \"aria-selected\", \"true\");\n}\nfunction findIgnoredByDelegateItems(el, options) {\n return options.ignoreByDelegateSelector !== null ? [...el.querySelectorAll(options.ignoreByDelegateSelector)] : [];\n}\nfunction findPreviousNavigableIndex(items, index, wrap) {\n let previousNavigableIndex = -1;\n if (index === null) {\n } else if (atStart(items, index)) {\n if (wrap === true) {\n previousNavigableIndex = findLastNavigableIndex(items);\n }\n } else {\n let i = index;\n while (--i >= 0) {\n if (isItemNavigable(items[i])) {\n previousNavigableIndex = i;\n break;\n }\n }\n }\n return previousNavigableIndex;\n}\nfunction findNextNavigableIndex(items, index, wrap) {\n let nextNavigableIndex = -1;\n if (index === null) {\n nextNavigableIndex = findFirstNavigableIndex(items);\n } else if (atEnd(items, index)) {\n if (wrap === true) {\n nextNavigableIndex = findFirstNavigableIndex(items);\n }\n } else {\n let i = index;\n while (++i < items.length) {\n if (isItemNavigable(items[i])) {\n nextNavigableIndex = i;\n break;\n }\n }\n }\n return nextNavigableIndex;\n}\nfunction findIndexPositionByType(typeOrNum, items, currentIndex) {\n let index = -1;\n switch (typeOrNum) {\n case \"none\":\n index = null;\n break;\n case \"current\":\n index = currentIndex;\n break;\n case \"interactive\":\n index = findFirstNavigableIndex(items);\n break;\n case \"ariaChecked\":\n index = findFirstNavigableAriaCheckedIndex(items);\n break;\n case \"ariaSelected\":\n index = findFirstNavigableAriaSelectedIndex(items);\n break;\n case \"ariaSelectedOrInteractive\":\n index = findFirstNavigableAriaSelectedIndex(items);\n index = index === -1 ? findFirstNavigableIndex(items) : index;\n break;\n default:\n index = typeof typeOrNum === \"number\" || typeOrNum === null ? typeOrNum : -1;\n }\n return index;\n}\nfunction atStart(items, index) {\n return index === findFirstNavigableIndex(items);\n}\nfunction atEnd(items, index) {\n return index === findLastNavigableIndex(items);\n}\nfunction onKeyPrev(e) {\n const ignoredByDelegateItems = findIgnoredByDelegateItems(this._el, this.options);\n if (ignoredByDelegateItems.length === 0 || !ignoredByDelegateItems.includes(e.detail.target)) {\n this.index = findPreviousNavigableIndex(this.items, this.index, this.options.wrap);\n }\n}\nfunction onKeyNext(e) {\n const ignoredByDelegateItems = findIgnoredByDelegateItems(this._el, this.options);\n if (ignoredByDelegateItems.length === 0 || !ignoredByDelegateItems.includes(e.detail.target)) {\n this.index = findNextNavigableIndex(this.items, this.index, this.options.wrap);\n }\n}\nfunction onClick(e) {\n const itemIndex = this.indexOf(e.target.closest(this._itemSelector));\n if (isIndexNavigable(this.items, itemIndex)) {\n this.index = itemIndex;\n }\n}\nfunction onKeyHome(e) {\n const ignoredByDelegateItems = findIgnoredByDelegateItems(this._el, this.options);\n if (ignoredByDelegateItems.length === 0 || !ignoredByDelegateItems.includes(e.detail.target)) {\n this.index = findFirstNavigableIndex(this.items);\n }\n}\nfunction onKeyEnd(e) {\n const ignoredByDelegateItems = findIgnoredByDelegateItems(this._el, this.options);\n if (ignoredByDelegateItems.length === 0 || !ignoredByDelegateItems.includes(e.detail.target)) {\n this.index = findLastNavigableIndex(this.items);\n }\n}\nfunction onFocusExit() {\n if (this.options.autoReset !== null) {\n this.reset();\n }\n}\nfunction onMutation(e) {\n const fromIndex = this.index;\n let toIndex = this.index;\n const { addedNodes, attributeName, removedNodes, target, type } = e[0];\n if (type === \"attributes\") {\n if (target === this.currentItem) {\n if (attributeName === \"aria-disabled\") {\n toIndex = this.index;\n } else if (attributeName === \"hidden\") {\n toIndex = findFirstNavigableIndex(this.items);\n }\n } else {\n toIndex = this.index;\n }\n } else if (type === \"childList\") {\n if (removedNodes.length > 0 && [...removedNodes].includes(this._cachedElement)) {\n toIndex = findFirstNavigableIndex(this.items);\n } else if (removedNodes.length > 0 || addedNodes.length > 0) {\n toIndex = this.indexOf(this._cachedElement);\n }\n }\n this._index = toIndex;\n this._el.dispatchEvent(new CustomEvent(\"navigationModelMutation\", {\n bubbles: false,\n detail: { fromIndex, toIndex }\n }));\n}\nclass NavigationModel {\n constructor(el, itemSelector, selectedOptions) {\n this.options = Object.assign({}, defaultOptions, selectedOptions);\n this._el = el;\n this._itemSelector = itemSelector;\n }\n}\nclass LinearNavigationModel extends NavigationModel {\n constructor(el, itemSelector, selectedOptions) {\n super(el, itemSelector, selectedOptions);\n const fromIndex = this._index;\n const toIndex = findIndexPositionByType(this.options.autoInit, this.items, this.index);\n this._index = toIndex;\n this._cachedElement = this.items[toIndex];\n this._el.dispatchEvent(new CustomEvent(\"navigationModelInit\", {\n bubbles: false,\n detail: {\n firstInteractiveIndex: this.firstNavigableIndex,\n fromIndex,\n items: this.items,\n toIndex\n }\n }));\n }\n get currentItem() {\n return this.items[this.index];\n }\n get items() {\n return [...this._el.querySelectorAll(`${this._itemSelector}`)];\n }\n get index() {\n return this._index;\n }\n set index(toIndex) {\n if (toIndex === this.index) {\n return;\n } else if (!isIndexNavigable(this.items, toIndex)) {\n } else {\n const fromIndex = this.index;\n this._cachedElement = this.items[toIndex];\n this._index = toIndex;\n this._el.dispatchEvent(new CustomEvent(\"navigationModelChange\", {\n bubbles: false,\n detail: { fromIndex, toIndex }\n }));\n }\n }\n indexOf(element) {\n return this.items.indexOf(element);\n }\n reset() {\n const fromIndex = this.index;\n const toIndex = findIndexPositionByType(this.options.autoReset, this.items, this.index);\n if (toIndex !== fromIndex) {\n this._index = toIndex;\n this._el.dispatchEvent(new CustomEvent(\"navigationModelReset\", {\n bubbles: false,\n detail: { fromIndex, toIndex }\n }));\n }\n }\n}\nclass NavigationEmitter {\n constructor(el, model) {\n this.model = model;\n this.el = el;\n this._keyPrevListener = onKeyPrev.bind(model);\n this._keyNextListener = onKeyNext.bind(model);\n this._keyHomeListener = onKeyHome.bind(model);\n this._keyEndListener = onKeyEnd.bind(model);\n this._clickListener = onClick.bind(model);\n this._focusExitListener = onFocusExit.bind(model);\n this._observer = new MutationObserver(onMutation.bind(model));\n KeyEmitter.addKeyDown(this.el);\n ExitEmitter.addFocusExit(this.el);\n const axis = model.options.axis;\n if (axis === \"both\" || axis === \"x\") {\n this.el.addEventListener(\"arrowLeftKeyDown\", this._keyPrevListener);\n this.el.addEventListener(\"arrowRightKeyDown\", this._keyNextListener);\n }\n if (axis === \"both\" || axis === \"y\") {\n this.el.addEventListener(\"arrowUpKeyDown\", this._keyPrevListener);\n this.el.addEventListener(\"arrowDownKeyDown\", this._keyNextListener);\n }\n this.el.addEventListener(\"homeKeyDown\", this._keyHomeListener);\n this.el.addEventListener(\"endKeyDown\", this._keyEndListener);\n this.el.addEventListener(\"click\", this._clickListener);\n this.el.addEventListener(\"focusExit\", this._focusExitListener);\n this._observer.observe(this.el, {\n childList: true,\n subtree: true,\n attributeFilter: [\"aria-disabled\", \"hidden\"],\n attributes: true,\n attributeOldValue: true\n });\n }\n destroy() {\n KeyEmitter.removeKeyDown(this.el);\n ExitEmitter.removeFocusExit(this.el);\n this.el.removeEventListener(\"arrowLeftKeyDown\", this._keyPrevListener);\n this.el.removeEventListener(\"arrowRightKeyDown\", this._keyNextListener);\n this.el.removeEventListener(\"arrowUpKeyDown\", this._keyPrevListener);\n this.el.removeEventListener(\"arrowDownKeyDown\", this._keyNextListener);\n this.el.removeEventListener(\"homeKeyDown\", this._keyHomeListener);\n this.el.removeEventListener(\"endKeyDown\", this._keyEndListener);\n this.el.removeEventListener(\"click\", this._clickListener);\n this.el.removeEventListener(\"focusExit\", this._focusExitListener);\n this._observer.disconnect();\n }\n}\nfunction createLinear(el, itemSelector, selectedOptions) {\n const model = new LinearNavigationModel(el, itemSelector, selectedOptions);\n return new NavigationEmitter(el, model);\n}\nexport {\n createLinear\n};\n","import * as NavigationEmitter from \"makeup-navigation-emitter\";\nconst defaultOptions = {\n autoInit: \"interactive\",\n autoReset: \"current\",\n wrap: false,\n axis: \"both\"\n};\nfunction refreshTabindex(items, focusIndex) {\n items.forEach(function(el, i) {\n el.setAttribute(\"tabindex\", i === focusIndex ? \"0\" : \"-1\");\n });\n}\nfunction onModelInit(e) {\n refreshTabindex(e.detail.items, e.detail.toIndex);\n this._el.dispatchEvent(new CustomEvent(\"rovingTabindexInit\", { detail: e.detail }));\n}\nfunction onModelChange(e) {\n const items = this.items;\n const fromItem = items[e.detail.fromIndex];\n const toItem = items[e.detail.toIndex];\n if (fromItem) {\n fromItem.setAttribute(\"tabindex\", \"-1\");\n }\n if (toItem) {\n toItem.setAttribute(\"tabindex\", \"0\");\n toItem.focus();\n }\n this._el.dispatchEvent(new CustomEvent(\"rovingTabindexChange\", { detail: e.detail }));\n}\nfunction onModelReset(e) {\n refreshTabindex(this.items, e.detail.toIndex);\n this._el.dispatchEvent(new CustomEvent(\"rovingTabindexReset\", { detail: e.detail }));\n}\nfunction onModelMutation(e) {\n refreshTabindex(this.items, e.detail.toIndex);\n this._el.dispatchEvent(new CustomEvent(\"rovingTabindexMutation\", { detail: e.detail }));\n}\nclass RovingTabindex {\n constructor(el) {\n this._el = el;\n this._onMutationListener = onModelMutation.bind(this);\n this._onChangeListener = onModelChange.bind(this);\n this._onInitListener = onModelInit.bind(this);\n this._onResetListener = onModelReset.bind(this);\n this._el.addEventListener(\"navigationModelMutation\", this._onMutationListener);\n this._el.addEventListener(\"navigationModelChange\", this._onChangeListener);\n this._el.addEventListener(\"navigationModelInit\", this._onInitListener);\n this._el.addEventListener(\"navigationModelReset\", this._onResetListener);\n }\n destroy() {\n this._el.removeEventListener(\"navigationModelMutation\", this._onMutationListener);\n this._el.removeEventListener(\"navigationModelChange\", this._onChangeListener);\n this._el.removeEventListener(\"navigationModelInit\", this._onInitListener);\n this._el.removeEventListener(\"navigationModelReset\", this._onResetListener);\n }\n}\nclass LinearRovingTabindex extends RovingTabindex {\n constructor(el, itemSelector, selectedOptions) {\n super(el);\n this._options = Object.assign({}, defaultOptions, selectedOptions);\n this._itemSelector = itemSelector;\n this._navigationEmitter = NavigationEmitter.createLinear(el, itemSelector, {\n autoInit: this._options.index !== void 0 ? this._options.index : this._options.autoInit,\n autoReset: this._options.autoReset,\n wrap: this._options.wrap,\n axis: this._options.axis\n });\n }\n get index() {\n return this._navigationEmitter.model.index;\n }\n set index(newIndex) {\n this._navigationEmitter.model.index = newIndex;\n }\n set wrap(newWrap) {\n this._navigationEmitter.model.options.wrap = newWrap;\n }\n get currentItem() {\n return this._navigationEmitter.model.currentItem;\n }\n get items() {\n return this._navigationEmitter.model.items;\n }\n reset() {\n this._navigationEmitter.model.reset();\n }\n destroy() {\n super.destroy();\n this._navigationEmitter.destroy();\n }\n}\nfunction createLinear(el, itemSelector, selectedOptions) {\n return new LinearRovingTabindex(el, itemSelector, selectedOptions);\n}\nexport {\n createLinear\n};\n","const focusableElList = [\n \"a[href]\",\n \"area[href]\",\n \"button:not([disabled])\",\n \"embed\",\n \"iframe\",\n \"input:not([disabled])\",\n \"object\",\n \"select:not([disabled])\",\n \"textarea:not([disabled])\",\n \"*[tabindex]\",\n \"*[contenteditable]\"\n];\nconst focusableElSelector = focusableElList.join();\nfunction src_default(el, keyboardOnly = false, callback) {\n if (callback) {\n const request = requestAnimationFrame(() => {\n callback(getFocusables(el, keyboardOnly));\n });\n return () => {\n cancelAnimationFrame(request);\n };\n }\n return getFocusables(el, keyboardOnly);\n}\nfunction getFocusables(el, keyboardOnly = false) {\n let focusableEls = Array.prototype.slice.call(el.querySelectorAll(focusableElSelector));\n focusableEls = focusableEls.filter(function(focusableEl) {\n return window.getComputedStyle(focusableEl).display !== \"none\";\n });\n if (keyboardOnly === true) {\n focusableEls = focusableEls.filter(function(focusableEl) {\n return focusableEl.getAttribute(\"tabindex\") !== \"-1\";\n });\n }\n return focusableEls;\n}\nexport {\n src_default as default\n};\n","import nextID from \"makeup-next-id\";\nimport * as ExitEmitter from \"makeup-exit-emitter\";\nimport focusables from \"makeup-focusables\";\nconst defaultOptions = {\n alwaysDoFocusManagement: false,\n ariaControls: true,\n autoCollapse: false,\n collapseOnFocusOut: false,\n collapseOnMouseOut: false,\n collapseOnClickOut: false,\n contentSelector: \".expander__content\",\n expandedClass: null,\n expandOnClick: false,\n expandOnFocus: false,\n expandOnHover: false,\n focusManagement: null,\n hostSelector: \".expander__host\",\n simulateSpacebarClick: false\n};\nfunction onHostKeyDown(e) {\n if (e.keyCode === 13 || e.keyCode === 32) {\n this._keyboardClickFlag = true;\n }\n if (e.keyCode === 32 && this.options.simulateSpacebarClick === true) {\n this.hostEl.click();\n }\n}\nfunction onHostMouseDown() {\n this._mouseClickFlag = true;\n}\nfunction onHostClick() {\n this._expandWasKeyboardClickActivated = this._keyboardClickFlag;\n this._expandWasMouseClickActivated = this._mouseClickFlag;\n this.expanded = !this.expanded;\n}\nfunction onHostFocus() {\n this._expandWasFocusActivated = true;\n this.expanded = true;\n}\nfunction onHostHover() {\n clearTimeout(this._mouseLeft);\n this._expandWasHoverActivated = true;\n this.expanded = true;\n}\nfunction onFocusExit() {\n this.expanded = false;\n}\nfunction onMouseLeave() {\n clearTimeout(this._mouseLeft);\n this._mouseLeft = setTimeout(() => {\n this.expanded = false;\n }, 300);\n}\nfunction _onDocumentClick(e) {\n if (this.el.contains(e.target) === false) {\n this.expanded = false;\n }\n}\nfunction _onDocumentTouchStart() {\n this.documentClick = true;\n}\nfunction _onDocumentTouchMove() {\n this.documentClick = false;\n}\nfunction _onDocumentTouchEnd(e) {\n if (this.documentClick === true) {\n this.documentClick = false;\n if (this.el.contains(e.target) === false) {\n this.expanded = false;\n }\n }\n}\nfunction manageFocus(focusManagement, contentEl) {\n if (focusManagement === \"content\") {\n contentEl.setAttribute(\"tabindex\", \"-1\");\n contentEl.focus();\n } else if (focusManagement === \"focusable\") {\n focusables(contentEl)[0].focus();\n } else if (focusManagement === \"interactive\") {\n focusables(contentEl, true)[0].focus();\n } else if (focusManagement !== null) {\n const el = contentEl.querySelector(`#${focusManagement}`);\n if (el) {\n el.focus();\n }\n }\n}\nclass src_default {\n constructor(el, selectedOptions) {\n this.options = Object.assign({}, defaultOptions, selectedOptions);\n this.el = el;\n this.hostEl = el.querySelector(this.options.hostSelector);\n this.contentEl = el.querySelector(this.options.contentSelector);\n ExitEmitter.addFocusExit(this.el);\n this._hostKeyDownListener = onHostKeyDown.bind(this);\n this._hostMouseDownListener = onHostMouseDown.bind(this);\n this._documentClickListener = _onDocumentClick.bind(this);\n this._documentTouchStartListener = _onDocumentTouchStart.bind(this);\n this._documentTouchMoveListener = _onDocumentTouchMove.bind(this);\n this._documentTouchEndListener = _onDocumentTouchEnd.bind(this);\n this._hostClickListener = onHostClick.bind(this);\n this._hostFocusListener = onHostFocus.bind(this);\n this._hostHoverListener = onHostHover.bind(this);\n this._focusExitListener = onFocusExit.bind(this);\n this._mouseLeaveListener = onMouseLeave.bind(this);\n if (this.hostEl.getAttribute(\"aria-expanded\") === null) {\n this.hostEl.setAttribute(\"aria-expanded\", \"false\");\n }\n if (this.options.ariaControls === true) {\n nextID(this.el, \"expander\");\n this.contentEl.id = this.contentEl.id || `${this.el.id}-content`;\n this.hostEl.setAttribute(\"aria-controls\", this.contentEl.id);\n }\n this.expandOnClick = this.options.expandOnClick;\n this.expandOnFocus = this.options.expandOnFocus;\n this.expandOnHover = this.options.expandOnHover;\n if (this.options.autoCollapse === false) {\n this.collapseOnClickOut = this.options.collapseOnClickOut;\n this.collapseOnFocusOut = this.options.collapseOnFocusOut;\n this.collapseOnMouseOut = this.options.collapseOnMouseOut;\n }\n }\n set expandOnClick(bool) {\n if (bool === true) {\n this.hostEl.addEventListener(\"keydown\", this._hostKeyDownListener);\n this.hostEl.addEventListener(\"mousedown\", this._hostMouseDownListener);\n this.hostEl.addEventListener(\"click\", this._hostClickListener);\n if (this.options.autoCollapse === true) {\n this.collapseOnClickOut = true;\n this.collapseOnFocusOut = true;\n }\n } else {\n this.hostEl.removeEventListener(\"click\", this._hostClickListener);\n this.hostEl.removeEventListener(\"mousedown\", this._hostMouseDownListener);\n this.hostEl.removeEventListener(\"keydown\", this._hostKeyDownListener);\n }\n }\n set expandOnFocus(bool) {\n if (bool === true) {\n this.hostEl.addEventListener(\"focus\", this._hostFocusListener);\n if (this.options.autoCollapse === true) {\n this.collapseOnClickOut = true;\n this.collapseOnFocusOut = true;\n }\n } else {\n this.hostEl.removeEventListener(\"focus\", this._hostFocusListener);\n }\n }\n set expandOnHover(bool) {\n if (bool === true) {\n this.hostEl.addEventListener(\"mouseenter\", this._hostHoverListener);\n this.contentEl.addEventListener(\"mouseenter\", this._hostHoverListener);\n if (this.options.autoCollapse === true) {\n this.collapseOnMouseOut = true;\n }\n } else {\n this.hostEl.removeEventListener(\"mouseenter\", this._hostHoverListener);\n this.contentEl.removeEventListener(\"mouseenter\", this._hostHoverListener);\n }\n }\n set collapseOnClickOut(bool) {\n if (bool === true) {\n document.addEventListener(\"click\", this._documentClickListener);\n document.addEventListener(\"touchstart\", this._documentTouchStartListener);\n document.addEventListener(\"touchmove\", this._documentTouchMoveListener);\n document.addEventListener(\"touchend\", this._documentTouchEndListener);\n } else {\n document.removeEventListener(\"click\", this._documentClickListener);\n document.removeEventListener(\"touchstart\", this._documentTouchStartListener);\n document.removeEventListener(\"touchmove\", this._documentTouchMoveListener);\n document.removeEventListener(\"touchend\", this._documentTouchEndListener);\n }\n }\n set collapseOnFocusOut(bool) {\n if (bool === true) {\n this.el.addEventListener(\"focusExit\", this._focusExitListener);\n } else {\n this.el.removeEventListener(\"focusExit\", this._focusExitListener);\n }\n }\n set collapseOnMouseOut(bool) {\n if (bool === true) {\n this.el.addEventListener(\"mouseleave\", this._mouseLeaveListener);\n this.contentEl.addEventListener(\"mouseleave\", this._mouseLeaveListener);\n } else {\n this.el.removeEventListener(\"mouseleave\", this._mouseLeaveListener);\n this.contentEl.removeEventListener(\"mouseleave\", this._mouseLeaveListener);\n }\n }\n get expanded() {\n return this.hostEl.getAttribute(\"aria-expanded\") === \"true\";\n }\n set expanded(bool) {\n if (bool === true && this.expanded === false) {\n this.hostEl.setAttribute(\"aria-expanded\", \"true\");\n if (this.options.expandedClass) {\n this.el.classList.add(this.options.expandedClass);\n }\n if (this._expandWasKeyboardClickActivated || this._expandWasMouseClickActivated && this.options.alwaysDoFocusManagement) {\n manageFocus(this.options.focusManagement, this.contentEl);\n }\n this.el.dispatchEvent(new CustomEvent(\"expander-expand\", { bubbles: true, detail: this.contentEl }));\n }\n if (bool === false && this.expanded === true) {\n this.hostEl.setAttribute(\"aria-expanded\", \"false\");\n if (this.options.expandedClass) {\n this.el.classList.remove(this.options.expandedClass);\n }\n this.el.dispatchEvent(new CustomEvent(\"expander-collapse\", { bubbles: true, detail: this.contentEl }));\n }\n this._expandWasKeyboardClickActivated = false;\n this._expandWasMouseClickActivated = false;\n this._expandWasFocusActivated = false;\n this._expandWasHoverActivated = false;\n this._keyboardClickFlag = false;\n this._mouseClickFlag = false;\n }\n sleep() {\n if (this._destroyed !== true) {\n this.expandOnClick = false;\n this.expandOnFocus = false;\n this.expandOnHover = false;\n this.collapseOnClickOut = false;\n this.collapseOnFocusOut = false;\n this.collapseOnMouseOut = false;\n }\n }\n destroy() {\n this.sleep();\n this._destroyed = true;\n this._hostKeyDownListener = null;\n this._hostMouseDownListener = null;\n this._documentClickListener = null;\n this._documentTouchStartListener = null;\n this._documentTouchMoveListener = null;\n this._documentTouchEndListener = null;\n this._hostClickListener = null;\n this._hostFocusListener = null;\n this._hostHoverListener = null;\n this._focusExitListener = null;\n this._mouseLeaveListener = null;\n }\n}\nexport {\n src_default as default\n};\n","const defaultOptions = {\n labelElementAnimateModifier: \"floating-label__label--animate\",\n labelElementInlineModifier: \"floating-label__label--inline\",\n labelElementFocusModifier: \"floating-label__label--focus\",\n labelElementInvalidModifier: \"floating-label__label--invalid\",\n labelElementDisabledModifier: \"floating-label__label--disabled\",\n textboxElementBackgroundRGB: [\n \"rgb(255, 255, 255)\",\n \"rgb(247, 247, 247)\",\n \"rgb(245, 245, 245)\",\n \"rgb(230, 32, 72)\",\n \"rgb(254, 245, 246)\"\n ]\n};\nfunction getPlaceHolder(formControlEl) {\n if (isSelect(formControlEl)) {\n const firstOption = formControlEl.querySelector(\"option\");\n return !firstOption.value ? firstOption.text : null;\n } else if (formControlEl.hasAttribute(\"placeholder\")) {\n return formControlEl.getAttribute(\"placeholder\");\n }\n}\nfunction setPlaceholder(formControlEl, value) {\n if (isSelect(formControlEl)) {\n formControlEl.style[\"min-width\"] = \"\";\n const beforeWidth = formControlEl.offsetWidth;\n formControlEl.querySelector(\"option\").text = value;\n if (!value && beforeWidth > formControlEl.offsetWidth) {\n formControlEl.style[\"min-width\"] = `${beforeWidth}px`;\n }\n } else if (value) {\n formControlEl.setAttribute(\"placeholder\", value);\n } else {\n formControlEl.removeAttribute(\"placeholder\");\n }\n}\nfunction checkForPlaceholder(formControlEl) {\n if (isSelect(formControlEl)) {\n const firstOption = formControlEl.querySelector(\"option\");\n if (!!firstOption.value) {\n return;\n }\n return !!firstOption.text;\n }\n return formControlEl.hasAttribute(\"placeholder\");\n}\nfunction onMutation() {\n const textboxFocus = isFocused(this.formControlEl);\n this.placeholder = getPlaceHolder(this.formControlEl) || this.placeholder;\n const placeholderCheck = checkForPlaceholder(this.formControlEl, this.placeholder);\n if (!!this.placeholder && textboxFocus && !placeholderCheck) {\n setPlaceholder(this.formControlEl, this.placeholder);\n } else if (!textboxFocus && placeholderCheck) {\n setPlaceholder(this.formControlEl, \"\");\n }\n if (isInvalid(this.formControlEl)) {\n this.labelEl.classList.add(this.options.labelElementInvalidModifier);\n } else {\n this.labelEl.classList.remove(this.options.labelElementInvalidModifier);\n }\n if (isDisabled(this.formControlEl)) {\n this.labelEl.classList.add(this.options.labelElementDisabledModifier);\n } else {\n this.labelEl.classList.remove(this.options.labelElementDisabledModifier);\n }\n}\nfunction isFocused(formControlEl) {\n return document.activeElement === formControlEl;\n}\nfunction isSelect(formControlEl) {\n return formControlEl.tagName === \"SELECT\";\n}\nfunction hasValue(input) {\n return input.value.length > 0;\n}\nfunction isDisabled(input) {\n return input.hasAttribute(\"disabled\");\n}\nfunction isInvalid(input) {\n return input.hasAttribute(\"aria-invalid\") && input.getAttribute(\"aria-invalid\") === \"true\";\n}\nfunction isAutofilled(input, color) {\n if (!isSelect(input)) {\n const bgColor = getComputedStyle(input).backgroundColor;\n return Array.isArray(color) ? !color.includes(bgColor) : bgColor !== color;\n }\n return false;\n}\nfunction _onBlur() {\n if (!hasValue(this.formControlEl)) {\n this.labelEl.classList.add(this.options.labelElementInlineModifier);\n }\n this.labelEl.classList.remove(this.options.labelElementFocusModifier);\n if (isInvalid(this.formControlEl)) {\n this.labelEl.classList.add(this.options.labelElementInvalidModifier);\n }\n setPlaceholder(this.formControlEl, \"\");\n}\nfunction _onFocus() {\n this.labelEl.classList.add(this.options.labelElementAnimateModifier);\n this.labelEl.classList.add(this.options.labelElementFocusModifier);\n this.labelEl.classList.remove(this.options.labelElementInlineModifier);\n this.labelEl.classList.remove(this.options.labelElementInvalidModifier);\n if (this.placeholder) {\n setPlaceholder(this.formControlEl, this.placeholder);\n }\n}\nclass src_default {\n constructor(el, userOptions) {\n this.options = Object.assign({}, defaultOptions, userOptions);\n this._observer = new MutationObserver(onMutation.bind(this));\n this.rootEl = el;\n this.labelEl = this.rootEl.querySelector(\"label\");\n this.formControlEl = this.rootEl.querySelector(\"input,textarea,select\");\n this._onBlurListener = _onBlur.bind(this);\n this._onFocusListener = _onFocus.bind(this);\n this.formControlEl.addEventListener(\"blur\", this._onBlurListener);\n this.formControlEl.addEventListener(\"focus\", this._onFocusListener);\n if (!hasValue(this.formControlEl) && !isAutofilled(this.formControlEl, this.options.textboxElementBackgroundRGB)) {\n this.labelEl.classList.add(this.options.labelElementInlineModifier);\n } else if (!isSelect(this.formControlEl)) {\n this.labelEl.classList.remove(this.options.labelElementInlineModifier);\n }\n if (isFocused(this.formControlEl)) {\n this.labelEl.classList.add(this.options.labelElementFocusModifier);\n this.labelEl.classList.remove(this.options.labelElementInlineModifier);\n }\n onMutation.call(this);\n this._observer.observe(this.formControlEl, {\n childList: isSelect(this.formControlEl),\n subtree: isSelect(this.formControlEl),\n attributeFilter: [\"disabled\", \"aria-invalid\", \"placeholder\", \"value\"],\n attributes: true\n });\n }\n destroy() {\n this._observer.disconnect();\n }\n refresh() {\n if (hasValue(this.formControlEl) || isSelect(this.formControlEl) || isAutofilled(this.formControlEl, this.options.textboxElementBackgroundRGB)) {\n this.labelEl.classList.remove(this.options.labelElementInlineModifier);\n } else {\n this.labelEl.classList.add(this.options.labelElementInlineModifier);\n }\n if (isFocused(this.formControlEl)) {\n this.labelEl.classList.add(this.options.labelElementFocusModifier);\n this.labelEl.classList.remove(this.options.labelElementInlineModifier);\n }\n }\n}\nexport {\n src_default as default\n};\n","function onKeyDown(e) {\n if (e.keyCode >= 32 && e.keyCode <= 40) {\n e.preventDefault();\n }\n}\nfunction add(el) {\n el.addEventListener(\"keydown\", onKeyDown);\n}\nfunction remove(el) {\n el.removeEventListener(\"keydown\", onKeyDown);\n}\nexport {\n add,\n remove\n};\n","import * as NavigationEmitter from \"makeup-navigation-emitter\";\nimport nextID from \"makeup-next-id\";\nconst defaultOptions = {\n activeDescendantClassName: \"active-descendant\",\n autoInit: \"none\",\n autoReset: \"none\",\n autoScroll: false,\n axis: \"both\",\n wrap: false\n};\nfunction onModelInit(e) {\n const { items, toIndex } = e.detail;\n const itemEl = items[toIndex];\n if (itemEl) {\n itemEl.classList.add(this._options.activeDescendantClassName);\n this._focusEl.setAttribute(\"aria-activedescendant\", itemEl.id);\n }\n this._el.dispatchEvent(new CustomEvent(\"activeDescendantInit\", { detail: e.detail }));\n}\nfunction onModelChange(e) {\n const { fromIndex, toIndex } = e.detail;\n const fromItem = this.items[fromIndex];\n const toItem = this.items[toIndex];\n if (fromItem) {\n fromItem.classList.remove(this._options.activeDescendantClassName);\n }\n if (toItem) {\n toItem.classList.add(this._options.activeDescendantClassName);\n this._focusEl.setAttribute(\"aria-activedescendant\", toItem.id);\n if (this._options.autoScroll && this._containerEl) {\n this._containerEl.scrollTop = toItem.offsetTop - this._containerEl.offsetHeight / 2;\n }\n }\n this._el.dispatchEvent(new CustomEvent(\"activeDescendantChange\", { detail: e.detail }));\n}\nfunction onModelReset(e) {\n const toIndex = e.detail.toIndex;\n const activeClassName = this._options.activeDescendantClassName;\n this.items.forEach(function(el) {\n el.classList.remove(activeClassName);\n });\n if (toIndex !== null && toIndex !== -1) {\n const itemEl = this.items[toIndex];\n itemEl.classList.add(activeClassName);\n this._focusEl.setAttribute(\"aria-activedescendant\", itemEl.id);\n } else {\n this._focusEl.removeAttribute(\"aria-activedescendant\");\n }\n this._el.dispatchEvent(new CustomEvent(\"activeDescendantReset\", { detail: e.detail }));\n}\nfunction onModelMutation(e) {\n const { toIndex } = e.detail;\n const activeDescendantClassName = this._options.activeDescendantClassName;\n this.items.forEach(function(item, index) {\n nextID(item);\n if (index !== toIndex) {\n item.classList.remove(activeDescendantClassName);\n } else {\n item.classList.add(activeDescendantClassName);\n }\n });\n this._el.dispatchEvent(new CustomEvent(\"activeDescendantMutation\", { detail: e.detail }));\n}\nclass ActiveDescendant {\n constructor(el) {\n this._el = el;\n this._onMutationListener = onModelMutation.bind(this);\n this._onChangeListener = onModelChange.bind(this);\n this._onResetListener = onModelReset.bind(this);\n this._onInitListener = onModelInit.bind(this);\n this._el.addEventListener(\"navigationModelMutation\", this._onMutationListener);\n this._el.addEventListener(\"navigationModelChange\", this._onChangeListener);\n this._el.addEventListener(\"navigationModelReset\", this._onResetListener);\n this._el.addEventListener(\"navigationModelInit\", this._onInitListener);\n }\n destroy() {\n this._el.removeEventListener(\"navigationModelMutation\", this._onMutationListener);\n this._el.removeEventListener(\"navigationModelChange\", this._onChangeListener);\n this._el.removeEventListener(\"navigationModelReset\", this._onResetListener);\n this._el.removeEventListener(\"navigationModelInit\", this._onInitListener);\n }\n}\nclass LinearActiveDescendant extends ActiveDescendant {\n constructor(el, focusEl, itemContainerEl, itemSelector, selectedOptions) {\n super(el);\n this._options = Object.assign({}, defaultOptions, selectedOptions);\n this._focusEl = focusEl;\n this._itemContainerEl = itemContainerEl;\n this._itemSelector = itemSelector;\n nextID(this._itemContainerEl);\n if (this._itemContainerEl !== this._focusEl) {\n focusEl.setAttribute(\"aria-owns\", this._itemContainerEl.id);\n }\n this._navigationEmitter = NavigationEmitter.createLinear(el, itemSelector, {\n autoInit: this._options.autoInit,\n autoReset: this._options.autoReset,\n axis: this._options.axis,\n ignoreByDelegateSelector: this._options.ignoreByDelegateSelector,\n wrap: this._options.wrap\n });\n this.items.forEach(function(itemEl) {\n nextID(itemEl);\n });\n }\n get index() {\n return this._navigationEmitter.model.index;\n }\n set index(newIndex) {\n this._navigationEmitter.model.index = newIndex;\n }\n reset() {\n this._navigationEmitter.model.reset();\n }\n get currentItem() {\n return this._navigationEmitter.model.currentItem;\n }\n get items() {\n return this._navigationEmitter.model.items;\n }\n set wrap(newWrap) {\n this._navigationEmitter.model.options.wrap = newWrap;\n }\n destroy() {\n super.destroy();\n this._navigationEmitter.destroy();\n }\n}\nfunction createLinear(el, focusEl, itemContainerEl, itemSelector, selectedOptions) {\n return new LinearActiveDescendant(el, focusEl, itemContainerEl, itemSelector, selectedOptions);\n}\nexport {\n createLinear\n};\n","import * as ActiveDescendant from \"makeup-active-descendant\";\nimport * as PreventScrollKeys from \"makeup-prevent-scroll-keys\";\nconst defaultOptions = {\n activeDescendantClassName: \"listbox__option--active\",\n // the classname applied to the current active desdcendant\n autoInit: \"ariaSelectedOrInteractive\",\n autoReset: \"ariaSelectedOrInteractive\",\n autoSelect: true,\n // when true, aria-checked state matches active-descendant\n customElementMode: false,\n focusableElement: null,\n // used in a combobox/datepicker scenario\n listboxOwnerElement: null,\n // used in a combobox/datepicker scenario\n multiSelect: false,\n // todo\n useAriaChecked: true,\n // doubles up on support for aria-selected to announce visible selected/checked state\n valueSelector: \".listbox__value\"\n // Selector to get value from\n};\nfunction isSpacebarOrEnter(keyCode) {\n return keyCode === 13 || keyCode === 32;\n}\nclass src_default {\n constructor(widgetEl, selectedOptions) {\n this._options = Object.assign({}, defaultOptions, selectedOptions);\n this.el = widgetEl;\n this._activeDescendantRootEl = this._options.listboxOwnerElement || this.el;\n if (widgetEl.getAttribute(\"role\") === \"listbox\") {\n this._listboxEl = widgetEl;\n } else {\n this._listboxEl = this.el.querySelector(\"[role=listbox]\");\n }\n if (!this._options.focusableElement && this._listboxEl.getAttribute(\"tabindex\") === null) {\n this._listboxEl.setAttribute(\"tabindex\", \"0\");\n }\n PreventScrollKeys.add(this.el);\n this._onKeyDownListener = _onKeyDown.bind(this);\n this._onClickListener = _onClick.bind(this);\n this._onActiveDescendantChangeListener = _onActiveDescendantChange.bind(this);\n this._onMutationListener = _onMutation.bind(this);\n this.el.classList.add(\"listbox--js\");\n if (!this._options.customElementMode) {\n this._mutationObserver = new MutationObserver(this._onMutationListener);\n this._observeMutations();\n this._observeEvents();\n }\n this._activeDescendant = ActiveDescendant.createLinear(\n this._activeDescendantRootEl,\n this._options.focusableElement || this._listboxEl,\n this._listboxEl,\n \"[role=option]\",\n {\n activeDescendantClassName: this._options.activeDescendantClassName,\n autoInit: this._options.autoInit,\n autoReset: this._options.autoReset,\n axis: \"y\"\n }\n );\n }\n _observeMutations() {\n if (!this._options.customElementMode) {\n this._mutationObserver.observe(this._listboxEl, {\n attributeFilter: [\"aria-selected\"],\n attributes: true,\n childList: true,\n subtree: true\n });\n }\n }\n _unobserveMutations() {\n if (!this._options.customElementMode) {\n this._mutationObserver.disconnect();\n }\n }\n _observeEvents() {\n if (this._destroyed !== true) {\n this._activeDescendantRootEl.addEventListener(\"activeDescendantChange\", this._onActiveDescendantChangeListener);\n this._listboxEl.addEventListener(\"keydown\", this._onKeyDownListener);\n this._listboxEl.addEventListener(\"click\", this._onClickListener);\n }\n }\n _unobserveEvents() {\n this._listboxEl.removeEventListener(\"keydown\", this._onKeyDownListener);\n this._listboxEl.removeEventListener(\"click\", this._onClickListener);\n this._activeDescendantRootEl.removeEventListener(\"activeDescendantChange\", this._onActiveDescendantChangeListener);\n }\n get index() {\n return this.items.findIndex((el) => el.getAttribute(\"aria-selected\") === \"true\");\n }\n get items() {\n return this._activeDescendant.items;\n }\n select(index) {\n this._unobserveMutations();\n const itemEl = this.items[index];\n if (itemEl && itemEl.getAttribute(\"aria-disabled\") !== \"true\") {\n const matchingItem = this.items[index];\n let optionValue;\n matchingItem.setAttribute(\"aria-selected\", \"true\");\n if (this._options.useAriaChecked === true) {\n matchingItem.setAttribute(\"aria-checked\", \"true\");\n }\n optionValue = matchingItem.innerText;\n if (this._options.valueSelector) {\n const valueSelector = matchingItem.querySelector(this._options.valueSelector);\n if (valueSelector) {\n optionValue = valueSelector.innerText;\n }\n }\n this.el.dispatchEvent(\n new CustomEvent(\"makeup-listbox-change\", {\n detail: {\n el: matchingItem,\n optionIndex: index,\n optionValue\n }\n })\n );\n }\n this._observeMutations();\n }\n unselect(index) {\n this._unobserveMutations();\n const itemEl = this.items[index];\n if (itemEl && itemEl.getAttribute(\"aria-disabled\") !== \"true\") {\n const matchingItem = this.items[index];\n matchingItem.setAttribute(\"aria-selected\", \"false\");\n if (this._options.useAriaChecked === true) {\n matchingItem.setAttribute(\"aria-checked\", \"false\");\n }\n }\n this._observeMutations();\n }\n destroy() {\n this._destroyed = true;\n this._unobserveMutations();\n this._unobserveEvents();\n this._onKeyDownListener = null;\n this._onClickListener = null;\n this._onActiveDescendantChangeListener = null;\n this._onMutationListener = null;\n }\n}\nfunction _onKeyDown(e) {\n const activeDescendantEl = this._activeDescendant.currentItem;\n if (isSpacebarOrEnter(e.keyCode) && activeDescendantEl?.getAttribute(\"aria-selected\") !== \"true\") {\n this.unselect(this.index);\n this.select(this._activeDescendant.index);\n }\n}\nfunction _onClick(e) {\n const toEl = e.target.closest(\"[role=option]\");\n const toElIndex = this.items.indexOf(toEl);\n const isTolElSelected = toEl.getAttribute(\"aria-selected\") === \"true\";\n const isTolElDisabled = toEl.getAttribute(\"aria-disabled\") === \"true\";\n if (!isTolElDisabled && this._options.autoSelect === false && isTolElSelected === false) {\n this.unselect(this.index);\n this.select(toElIndex);\n }\n}\nfunction _onActiveDescendantChange(e) {\n const { fromIndex, toIndex } = e.detail;\n if (this._options.autoSelect === true) {\n const fromEl = this.items[fromIndex];\n const toEl = this.items[toIndex];\n if (fromEl) {\n this.unselect(fromIndex);\n }\n if (toEl) {\n this.select(toIndex);\n }\n }\n}\nfunction _onMutation(mutationsList) {\n for (const mutation of mutationsList) {\n if (mutation.type === \"attributes\") {\n this.el.dispatchEvent(\n new CustomEvent(\"makeup-listbox-mutation\", {\n detail: {\n attributeName: mutation.attributeName\n }\n })\n );\n }\n }\n}\nexport {\n src_default as default\n};\n","import Expander from \"makeup-expander\";\nimport Listbox from \"makeup-listbox\";\nconst defaultOptions = {\n autoSelect: true,\n collapseTimeout: 150,\n customElementMode: false\n};\nclass src_default {\n constructor(widgetEl, selectedOptions) {\n this._options = Object.assign({}, defaultOptions, selectedOptions);\n this._el = widgetEl;\n this._inputEl = this._el.querySelector(\"input\");\n this._listboxEl = this._el.querySelector(\".combobox__listbox\");\n this._autocompleteType = this._inputEl.getAttribute(\"aria-autocomplete\");\n this._inputEl.setAttribute(\"autocomplete\", \"off\");\n this._inputEl.setAttribute(\"role\", \"combobox\");\n this._listboxEl.hidden = false;\n this._listboxWidget = new Listbox(this._listboxEl, {\n activeDescendantClassName: \"combobox__option--active\",\n autoReset: -1,\n autoSelect: this._options.autoSelect,\n focusableElement: this._inputEl,\n listboxOwnerElement: this._el\n });\n this._expander = new Expander(this._el, {\n collapseOnClickOut: true,\n collapseOnFocusOut: true,\n contentSelector: \".combobox__listbox\",\n expandedClass: \"combobox--expanded\",\n expandOnFocus: true,\n hostSelector: \"input\"\n });\n this._destroyed = false;\n this._onInputFocusListener = _onInputFocus.bind(this);\n this._onListboxClickListener = _onListboxClick.bind(this);\n this._onListboxActiveDescendantChangeListener = _onListboxActiveDescendantChange.bind(this);\n this._onTextboxKeyDownListener = _onTextboxKeyDown.bind(this);\n this._onTextboxInputListener = _onTextboxInput.bind(this);\n this._onTextboxClickListener = _onTextboxClick.bind(this);\n this._onMutationListener = _onMutation.bind(this);\n this._el.classList.add(\"combobox--js\");\n if (!this._options.customElementMode) {\n this._mutationObserver = new MutationObserver(this._onMutationListener);\n this._observeMutations();\n this._observeEvents();\n }\n }\n resetFilter() {\n this._listboxWidget._activeDescendant.reset();\n this._listboxWidget.items.forEach((el) => el.hidden = false);\n }\n _observeMutations() {\n if (!this._options.customElementMode) {\n this._mutationObserver.observe(this._inputEl, {\n attributes: true,\n childList: true,\n subtree: true\n });\n }\n }\n _unobserveMutations() {\n if (!this._options.customElementMode) {\n this._mutationObserver.disconnect();\n }\n }\n _observeEvents() {\n if (this._destroyed !== true) {\n this._listboxEl.addEventListener(\"click\", this._onListboxClickListener);\n this._listboxWidget._activeDescendantRootEl.addEventListener(\n \"activeDescendantChange\",\n this._onListboxActiveDescendantChangeListener\n );\n this._inputEl.addEventListener(\"focus\", this._onInputFocusListener);\n this._inputEl.addEventListener(\"keydown\", this._onTextboxKeyDownListener);\n this._inputEl.addEventListener(\"input\", this._onTextboxInputListener);\n this._inputEl.addEventListener(\"click\", this._onTextboxClickListener);\n }\n }\n _unobserveEvents() {\n this._listboxEl.removeEventListener(\"click\", this._onListboxClickListener);\n this._listboxWidget._activeDescendantRootEl.removeEventListener(\n \"activeDescendantChange\",\n this._onListboxActiveDescendantChangeListener\n );\n this._inputEl.removeEventListener(\"focus\", this._onInputFocusListener);\n this._inputEl.removeEventListener(\"keydown\", this._onTextboxKeyDownListener);\n this._inputEl.removeEventListener(\"input\", this._onTextboxInputListener);\n this._inputEl.removeEventListener(\"click\", this._onTextboxClickListener);\n }\n destroy() {\n this._destroyed = true;\n this._unobserveMutations();\n this._unobserveEvents();\n this._onInputFocusListener = null;\n this._onListboxClickListener = null;\n this._onListboxActiveDesendanctChangeListener = null;\n this._onTextboxKeyDownListener = null;\n this._onTextboxInputListener = null;\n this._onTextboxClickListener = null;\n this._onMutationListener = null;\n }\n}\nfunction _onInputFocus() {\n this.resetFilter();\n}\nfunction _onTextboxKeyDown(e) {\n if (e.keyCode === 38 || e.keyCode === 40) {\n e.preventDefault();\n }\n if (e.keyCode === 40) {\n if (this._expander.expanded === false) {\n this._expander.expanded = true;\n }\n }\n if (e.keyCode === 27) {\n if (this._expander.expanded === true) {\n this._expander.expanded = false;\n this._listboxWidget._activeDescendant.reset();\n }\n }\n if (this._options.autoSelect === false && e.keyCode === 13 && this._inputEl.getAttribute(\"aria-activedescendant\")) {\n e.preventDefault();\n const widget = this;\n this._inputEl.value = this._listboxWidget.items[this._listboxWidget._activeDescendant.index].innerText;\n _dispatchChangeEvent(this._el, this._inputEl.value);\n this._listboxWidget._activeDescendant.reset();\n setTimeout(function() {\n widget._expander.expanded = false;\n if (widget._autocompleteType === \"list\") {\n if (widget._inputEl.value.length === 0) {\n widget.resetFilter();\n } else {\n _filterSuggestions(widget._inputEl.value, widget._listboxWidget.items);\n }\n }\n }, this._options.collapseTimeout);\n }\n}\nfunction _onTextboxClick() {\n if (this._expander.expanded === false) {\n this._expander.expanded = true;\n }\n}\nfunction _onTextboxInput() {\n if (this._expander.expanded === false) {\n this._expander.expanded = true;\n }\n if (this._autocompleteType === \"list\") {\n this._listboxWidget._activeDescendant.reset();\n if (this._inputEl.value.length === 0) {\n this.resetFilter();\n } else {\n _filterSuggestions(this._inputEl.value, this._listboxWidget.items);\n }\n }\n}\nfunction _onListboxClick(e) {\n const widget = this;\n const element = e.target.closest(\"[role=option]\");\n const indexData = this._listboxWidget.items.indexOf(element);\n console.log(indexData);\n if (indexData !== void 0) {\n this._inputEl.value = this._listboxWidget.items[indexData].innerText;\n if (this._options.autoSelect === false) {\n _dispatchChangeEvent(this._el, this._inputEl.value);\n }\n setTimeout(function() {\n widget._expander.expanded = false;\n }, this._options.collapseTimeout);\n }\n}\nfunction _onListboxActiveDescendantChange(e) {\n if (this._options.autoSelect === true) {\n this._inputEl.value = this._listboxWidget.items[e.detail.toIndex].innerText;\n _dispatchChangeEvent(this._el, this._inputEl.value);\n }\n}\nfunction _onMutation(mutationsList) {\n for (const mutation of mutationsList) {\n if (mutation.type === \"attributes\") {\n this._el.dispatchEvent(new CustomEvent(\"makeup-combobox-mutation\", {\n detail: {\n attributeName: mutation.attributeName\n }\n }));\n }\n }\n}\nfunction _filterSuggestions(value, items) {\n const numChars = value.length;\n const currentValue = value.toLowerCase();\n const matchedItems = items.filter((el) => {\n return el.innerText.trim().substring(0, numChars).toLowerCase() === currentValue;\n });\n const unmatchedItems = items.filter((el) => {\n return el.innerText.trim().substring(0, numChars).toLowerCase() !== currentValue;\n });\n matchedItems.forEach((el) => el.hidden = false);\n unmatchedItems.forEach((el) => el.hidden = true);\n}\nfunction _dispatchChangeEvent(el, value) {\n el.dispatchEvent(new CustomEvent(\"makeup-combobox-change\", {\n detail: { value }\n }));\n}\nexport {\n src_default as default\n};\n","const defaultOptions = {\n customElementMode: false\n};\nclass src_default {\n constructor(widgetEl, dialog, selectedOptions) {\n this._options = Object.assign({}, defaultOptions, selectedOptions);\n this._el = widgetEl;\n this._el.setAttribute(\"aria-haspopup\", \"dialog\");\n this._dialog = dialog;\n this._onClickListener = _onClick.bind(this);\n this._onDialogCloseListener = _onDialogClose.bind(this);\n this._onMutationListener = _onMutation.bind(this);\n this._el.classList.add(\"dialog-button--js\");\n if (!this._options.customElementMode) {\n this._mutationObserver = new MutationObserver(this._onMutationListener);\n this._observeMutations();\n this._observeEvents();\n }\n }\n _observeMutations() {\n if (!this._options.customElementMode) {\n this._mutationObserver.observe(this._el, {\n attributes: true,\n childList: false,\n subtree: false\n });\n }\n }\n _unobserveMutations() {\n if (!this._options.customElementMode) {\n this._mutationObserver.disconnect();\n }\n }\n _observeEvents() {\n if (this._destroyed !== true) {\n this._el.addEventListener(\"click\", this._onClickListener);\n this._dialog._el.addEventListener(\"dialog-close\", this._onDialogCloseListener);\n }\n }\n _unobserveEvents() {\n this._el.removeEventListener(\"click\");\n this._dialog._el.removeEventListener(\"dialog-close\", this._onDialogCloseListener);\n }\n destroy() {\n this._destroyed = true;\n this._unobserveMutations();\n this._unobserveEvents();\n this._onClickListener = null;\n this._onDialogCloseListener = null;\n this._onMutationListener = null;\n }\n}\nfunction _onMutation(mutationsList) {\n for (const mutation of mutationsList) {\n if (mutation.type === \"attributes\") {\n this._el.dispatchEvent(new CustomEvent(\"makeup-dialog-button-mutation\", {\n detail: {\n attributeName: mutation.attributeName\n }\n }));\n }\n }\n}\nfunction _onClick() {\n this._dialog.open();\n}\nfunction _onDialogClose() {\n if (this._dialog.modal === true) {\n this._el.focus();\n }\n}\nexport {\n src_default as default\n};\n","import Expander from \"makeup-expander\";\nimport Listbox from \"makeup-listbox\";\nconst defaultOptions = {\n autoSelect: true,\n buttonLabelSelector: \".btn__text\",\n collapseTimeout: 150,\n customElementMode: false,\n listboxSelector: \".listbox-button__listbox\",\n floatingLabelSelector: \".btn__floating-label\",\n floatingLabelInline: \"btn__floating-label--inline\",\n floatingLabelAnimate: \"btn__floating-label--animate\",\n valueSelector: \".listbox-button__value\",\n buttonValueType: \"text\",\n // [\"text\", \"icon\", \"both\"],\n iconSelector: \".icon\"\n};\nclass src_default {\n constructor(widgetEl, selectedOptions) {\n this._options = Object.assign({}, defaultOptions, selectedOptions);\n this.el = widgetEl;\n this._buttonEl = this.el.querySelector(\"button\");\n this._buttonLabelEl = widgetEl.querySelector(this._options.buttonLabelSelector);\n this._buttonFloatingLabelEl = widgetEl.querySelector(this._options.floatingLabelSelector);\n this._buttonPrefix = this._buttonEl.dataset?.listboxButtonPrefix;\n this._listboxEl = this.el.querySelector(this._options.listboxSelector);\n this._onButtonFirstClickListener = _onButtonFirstClick.bind(this);\n this._onListboxClickListener = _onListboxClick.bind(this);\n this._onListboxKeyDownListener = _onListboxKeyDown.bind(this);\n this._onListboxInitListener = _onListboxInit.bind(this);\n this._onListboxChangeListener = _onListboxChange.bind(this);\n this._onMutationListener = _onMutation.bind(this);\n if (!this._options.customElementMode) {\n this._mutationObserver = new MutationObserver(this._onMutationListener);\n this._observeMutations();\n this._observeEvents();\n }\n this.listbox = new Listbox(this._listboxEl, {\n activeDescendantClassName: \"listbox-button__option--active\",\n autoReset: \"ariaSelectedOrInteractive\",\n autoSelect: this._options.autoSelect,\n valueSelector: this._options.valueSelector\n });\n this._expander = new Expander(this.el, {\n alwaysDoFocusManagement: true,\n collapseOnClick: true,\n collapseOnClickOut: true,\n collapseOnFocusOut: true,\n contentSelector: this._options.listboxSelector,\n expandedClass: \"listbox-button--expanded\",\n expandOnClick: true,\n focusManagement: \"focusable\",\n hostSelector: \"button\"\n });\n this.el.classList.add(\"listbox-button--js\");\n if (this._buttonFloatingLabelEl) {\n if (!this._buttonLabelEl.innerText) {\n this._buttonFloatingLabelEl.classList.add(this._options.floatingLabelInline);\n }\n }\n }\n _observeMutations() {\n if (!this._options.customElementMode) {\n this._mutationObserver.observe(this._buttonEl, {\n attributeFilter: [\"aria-expanded\"],\n attributes: true,\n childList: false,\n subtree: false\n });\n }\n }\n _unobserveMutations() {\n if (!this._options.customElementMode) {\n this._mutationObserver.disconnect();\n }\n }\n _unobserveEvents() {\n this._buttonEl.removeEventListener(\"click\", this._onButtonFirstClickListener);\n this._listboxEl.removeEventListener(\"click\", this._onListboxClickListener);\n this._listboxEl.removeEventListener(\"keydown\", this._onListboxKeyDownListener);\n this._listboxEl.removeEventListener(\"makeup-listbox-init\", this._onListboxInitListener);\n this._listboxEl.removeEventListener(\"makeup-listbox-change\", this._onListboxChangeListener);\n }\n _observeEvents() {\n if (this._destroyed !== true) {\n this._buttonEl.addEventListener(\"click\", this._onButtonFirstClickListener, { once: true });\n this._listboxEl.addEventListener(\"click\", this._onListboxClickListener);\n this._listboxEl.addEventListener(\"keydown\", this._onListboxKeyDownListener);\n this._listboxEl.addEventListener(\"makeup-listbox-init\", this._onListboxInitListener);\n this._listboxEl.addEventListener(\"makeup-listbox-change\", this._onListboxChangeListener);\n }\n }\n collapse() {\n const widget = this;\n setTimeout(function() {\n widget._unobserveMutations();\n widget._expander.expanded = false;\n widget._observeMutations();\n widget._buttonEl.focus();\n }, this._options.collapseTimeout);\n }\n destroy() {\n this._destroyed = true;\n this._unobserveEvents();\n this._unobserveMutations();\n this._onButtonFirstClickListener = null;\n this._onListboxClickListener = null;\n this._onListboxKeyDownListener = null;\n this._onListboxInitListener = null;\n this._onListboxChangeListener = null;\n this._onMutationListener = null;\n }\n}\nfunction _onButtonFirstClick() {\n this.listbox.el.hidden = false;\n}\nfunction _onListboxKeyDown(e) {\n if (e.keyCode === 13 || e.keyCode === 27 || e.keyCode === 32) {\n this.collapse();\n }\n}\nfunction _onListboxClick() {\n this.collapse();\n}\nfunction _onListboxInit(e) {\n this.el.dispatchEvent(new CustomEvent(\"makeup-listbox-button-init\", { detail: e.detail }));\n}\nfunction _onListboxChange(e) {\n const toValue = e.detail.optionValue;\n const icon = e.detail.el.querySelector(this._options.iconSelector).cloneNode(true);\n let content = this._buttonPrefix ? `${this._buttonPrefix} ${toValue}` : toValue;\n if (icon) {\n switch (this._options.buttonValueType) {\n case \"both\":\n content = `${icon.outerHTML} ${content} `;\n break;\n case \"icon\":\n icon.setAttribute(\"aria-label\", content);\n icon.removeAttribute(\"aria-hidden\");\n content = icon.outerHTML;\n break;\n default:\n break;\n }\n }\n this._buttonLabelEl.innerHTML = content;\n if (this._buttonFloatingLabelEl) {\n if (toValue) {\n this._buttonFloatingLabelEl.classList.add(this._options.floatingLabelAnimate);\n this._buttonFloatingLabelEl.classList.remove(this._options.floatingLabelInline);\n } else {\n this._buttonFloatingLabelEl.classList.add(this._options.floatingLabelInline);\n }\n }\n this.el.dispatchEvent(new CustomEvent(\"makeup-listbox-button-change\", { detail: e.detail }));\n}\nfunction _onMutation(mutationsList) {\n for (const mutation of mutationsList) {\n if (mutation.type === \"attributes\") {\n this.el.dispatchEvent(\n new CustomEvent(\"makeup-listbox-button-mutation\", {\n detail: {\n attributeName: mutation.attributeName\n }\n })\n );\n }\n }\n}\nexport {\n src_default as default\n};\n","import * as RovingTabIndex from \"makeup-roving-tabindex\";\nimport * as PreventScrollKeys from \"makeup-prevent-scroll-keys\";\nconst defaultOptions = {\n customElementMode: false,\n autoInit: \"interactive\",\n autoReset: \"interactive\"\n};\nclass src_default {\n constructor(widgetEl, selectedOptions) {\n this._options = Object.assign({}, defaultOptions, selectedOptions);\n this.el = widgetEl;\n this._rovingTabIndex = RovingTabIndex.createLinear(this.el, \"[role^=menuitem]\", {\n autoInit: this._options.autoInit,\n autoReset: this._options.autoReset\n });\n PreventScrollKeys.add(this.el);\n this._onKeyDownListener = _onKeyDown.bind(this);\n this._onClickListener = _onClick.bind(this);\n this._onMutationListener = _onMutation.bind(this);\n this.el.classList.add(\"menu--js\");\n if (!this._options.customElementMode) {\n this._mutationObserver = new MutationObserver(this._onMutationListener);\n this._observeMutations();\n this._observeEvents();\n }\n }\n select(index) {\n this._unobserveMutations();\n const el = this.items[index];\n switch (el.getAttribute(\"role\")) {\n case \"menuitemcheckbox\":\n _selectMenuItemCheckbox(this.el, el);\n break;\n case \"menuitemradio\":\n _selectMenuItemRadio(this.el, el);\n break;\n default:\n _selectMenuItem(this.el, el);\n break;\n }\n this._observeMutations();\n }\n get items() {\n return this._rovingTabIndex.items;\n }\n get radioGroupNames() {\n const els = [...this.el.querySelectorAll(\"[role=menuitemradio][data-makeup-group]\")];\n const groupNames = [...new Set(els.map((el) => el.dataset.makeupGroup))];\n return groupNames;\n }\n get checkboxGroupNames() {\n const els = [...this.el.querySelectorAll(\"[role=menuitemcheckbox][data-makeup-group]\")];\n const groupNames = [...new Set(els.map((el) => el.dataset.makeupGroup))];\n return groupNames;\n }\n _observeMutations() {\n if (!this._options.customElementMode) {\n this._mutationObserver.observe(this.el, {\n attributeFilter: [\"aria-checked\", \"aria-disabled\"],\n attributes: true,\n childList: true,\n subtree: true\n });\n }\n }\n _unobserveMutations() {\n if (!this._options.customElementMode) {\n this._mutationObserver.disconnect();\n }\n }\n _observeEvents() {\n if (this._destroyed !== true) {\n this.el.addEventListener(\"keydown\", this._onKeyDownListener);\n this.el.addEventListener(\"click\", this._onClickListener);\n }\n }\n _unobserveEvents() {\n this.el.removeEventListener(\"keydown\", this._onKeyDownListener);\n this.el.removeEventListener(\"click\", this._onClickListener);\n }\n destroy() {\n this._destroyed = true;\n this._unobserveMutations();\n this._unobserveEvents();\n this._onKeyDownListener = null;\n this._onClickListener = null;\n this._onMutationListener = null;\n }\n}\nfunction _onMutation(mutationsList) {\n for (const mutation of mutationsList) {\n if (mutation.type === \"attributes\") {\n this.el.dispatchEvent(new CustomEvent(\"makeup-menu-mutation\", {\n detail: {\n attributeName: mutation.attributeName\n }\n }));\n }\n }\n}\nfunction _onKeyDown(e) {\n this._unobserveMutations();\n if (e.keyCode === 13) {\n e.preventDefault();\n }\n if (e.keyCode === 13 || e.keyCode === 32) {\n this.select(Array.from(this.items).indexOf(e.target));\n }\n this._observeMutations();\n}\nfunction _onClick(e) {\n const menuItemEl = e.target.closest(\"[role^=menuitem]\");\n const index = this.items.indexOf(menuItemEl);\n if (index !== -1) {\n this.select(index);\n }\n}\nfunction _selectMenuItem(widgetEl, menuItemEl) {\n widgetEl.dispatchEvent(new CustomEvent(\"makeup-menu-select\", {\n detail: {\n el: menuItemEl,\n value: menuItemEl.innerText\n }\n }));\n}\nfunction _selectMenuItemCheckbox(widgetEl, menuItemEl) {\n if (menuItemEl.getAttribute(\"aria-disabled\") !== \"true\") {\n const groupName = menuItemEl.dataset.makeupGroup;\n menuItemEl.setAttribute(\n \"aria-checked\",\n menuItemEl.getAttribute(\"aria-checked\") === \"true\" ? \"false\" : \"true\"\n );\n widgetEl.dispatchEvent(new CustomEvent(\"makeup-menu-change\", {\n detail: {\n el: menuItemEl,\n checked: menuItemEl.getAttribute(\"aria-checked\"),\n group: groupName,\n value: menuItemEl.innerText\n }\n }));\n }\n}\nfunction _selectMenuItemRadio(widgetEl, menuItemEl) {\n if (menuItemEl.getAttribute(\"aria-disabled\") !== \"true\") {\n const groupName = menuItemEl.dataset.makeupGroup;\n const checkedEl = widgetEl.querySelector(`[data-makeup-group=${groupName}][aria-checked=true]`);\n if (checkedEl) {\n checkedEl.setAttribute(\"aria-checked\", \"false\");\n }\n if (checkedEl !== menuItemEl) {\n menuItemEl.setAttribute(\"aria-checked\", \"true\");\n widgetEl.dispatchEvent(new CustomEvent(\"makeup-menu-change\", {\n detail: {\n el: menuItemEl,\n group: groupName,\n value: menuItemEl.innerText\n }\n }));\n }\n }\n}\nexport {\n src_default as default\n};\n","import Expander from \"makeup-expander\";\nimport Menu from \"makeup-menu\";\nconst defaultOptions = {\n customElementMode: false,\n expandedClass: \"menu-button--expanded\",\n menuSelector: \".menu-button__menu\",\n buttonTextSelector: `.btn__text`,\n buttonValueType: \"text\",\n // [\"text\", \"icon\", \"both\"],\n iconSelector: \".icon\"\n};\nclass src_default {\n constructor(widgetEl, selectedOptions) {\n this._options = Object.assign({}, defaultOptions, selectedOptions);\n this.el = widgetEl;\n this._buttonEl = widgetEl.querySelector(\"button\");\n this._buttonEl.setAttribute(\"aria-haspopup\", \"true\");\n this.menu = new Menu(widgetEl.querySelector(this._options.menuSelector), {\n autoReset: \"interactive\"\n });\n this._buttonPrefix = this._buttonEl.dataset?.makeupMenuButtonPrefix;\n this._buttonTextEl = this._buttonEl.querySelector(this._options.buttonTextSelector);\n this._expander = new Expander(widgetEl, {\n alwaysDoFocusManagement: true,\n collapseOnClick: true,\n collapseOnClickOut: true,\n collapseOnFocusOut: true,\n contentSelector: this._options.menuSelector,\n expandedClass: this._options.expandedClass,\n expandOnClick: true,\n focusManagement: \"focusable\",\n hostSelector: \"button\"\n });\n this._onButtonFirstClickListener = _onButtonFirstClick.bind(this);\n this._onMenuKeyDownListener = _onMenuKeyDown.bind(this);\n this._onMenuItemSelectListener = _onMenuItemSelect.bind(this);\n this._onMutationListener = _onMutation.bind(this);\n this.el.classList.add(\"menu-button--js\");\n if (!this._options.customElementMode) {\n this._mutationObserver = new MutationObserver(this._onMutationListener);\n this._observeMutations();\n this._observeEvents();\n }\n }\n _observeMutations() {\n if (!this._options.customElementMode) {\n this._mutationObserver.observe(this.el, {\n attributeFilter: [\"aria-expanded\", \"disabled\"],\n attributes: true,\n childList: false,\n subtree: false\n });\n }\n }\n _unobserveMutations() {\n if (!this._options.customElementMode) {\n this._mutationObserver.disconnect();\n }\n }\n _observeEvents() {\n if (this._destroyed !== true) {\n this._buttonEl.addEventListener(\"click\", this._onButtonFirstClickListener, { once: true });\n this.menu.el.addEventListener(\"keydown\", this._onMenuKeyDownListener);\n this.menu.el.addEventListener(\"makeup-menu-select\", this._onMenuItemSelectListener);\n this.menu.el.addEventListener(\"makeup-menu-change\", this._onMenuItemSelectListener);\n }\n }\n _unobserveEvents() {\n this._buttonEl.removeEventListener(\"click\", this._onButtonFirstClickListener);\n this.menu.el.removeEventListener(\"keydown\", this._onMenuKeyDownListener);\n this.menu.el.removeEventListener(\"makeup-menu-select\", this._onMenuItemSelectListener);\n this.menu.el.removeEventListener(\"makeup-menu-change\", this._onMenuItemSelectListener);\n }\n destroy() {\n this._destroyed = true;\n this._unobserveMutations();\n this._unobserveEvents();\n this._onButtonFirstClickListener = null;\n this._onMenuKeyDownListener = null;\n this._onMenuItemSelectListener = null;\n this._onMutationListener = null;\n }\n}\nfunction _onMutation(mutationsList) {\n for (const mutation of mutationsList) {\n if (mutation.type === \"attributes\") {\n this.el.dispatchEvent(\n new CustomEvent(\"makeup-menu-button-mutation\", {\n detail: {\n attributeName: mutation.attributeName\n }\n })\n );\n }\n }\n}\nfunction _onButtonFirstClick() {\n this.menu.el.hidden = false;\n}\nfunction _onMenuKeyDown(e) {\n if (e.keyCode === 27) {\n this._expander.expanded = false;\n this._buttonEl.focus();\n }\n}\nfunction _onMenuItemSelect(e) {\n const widget = this;\n setTimeout(function() {\n widget._expander.expanded = false;\n widget._buttonEl.focus();\n }, 150);\n if (e.detail.el.getAttribute(\"role\") !== \"menuitemradio\") {\n return;\n }\n const icon = e.detail.el.querySelector(this._options.iconSelector).cloneNode(true);\n const text = e.detail.el.innerText.trim();\n let content = this._buttonPrefix ? `${this._buttonPrefix} ${text}` : text;\n if (icon) {\n switch (this._options.buttonValueType) {\n case \"both\":\n content = `${icon.outerHTML} ${content} `;\n break;\n case \"icon\":\n icon.setAttribute(\"aria-label\", content);\n icon.removeAttribute(\"aria-hidden\");\n content = icon.outerHTML;\n break;\n default:\n break;\n }\n }\n this._buttonTextEl.innerHTML = content;\n}\nexport {\n src_default as default\n};\n","const defaultOptions = {\n bem: {\n control: \"switch__control\"\n },\n customElementMode: false\n};\nclass src_default {\n constructor(el, selectedOptions) {\n this._options = Object.assign({}, defaultOptions, selectedOptions);\n this.el = el;\n this._onClickListener = _onClick.bind(this);\n this._onKeyDownListener = _onKeyDown.bind(this);\n this._onMutationListener = _onMutation.bind(this);\n if (this.disabled) {\n this._focusableElement.setAttribute(\"tabindex\", \"-1\");\n }\n this.el.classList.add(\"switch--js\");\n if (!this._options.customElementMode) {\n this._mutationObserver = new MutationObserver(this._onMutationListener);\n this._observeMutations();\n this._observeEvents();\n }\n }\n _observeMutations() {\n if (!this._options.customElementMode) {\n this._mutationObserver.observe(this._focusableElement, {\n attributes: true,\n childList: false,\n subtree: false\n });\n }\n }\n _unobserveMutations() {\n if (!this._options.customElementMode) {\n this._mutationObserver.disconnect();\n }\n }\n _observeEvents() {\n this._focusableElement.addEventListener(\"click\", this._onClickListener);\n this._focusableElement.addEventListener(\"keydown\", this._onKeyDownListener);\n }\n _unobserveEvents() {\n this._focusableElement.removeEventListener(\"click\", this._onClickListener);\n this._focusableElement.removeEventListener(\"keydown\", this._onKeyDownListener);\n }\n get _focusableElement() {\n return this.el.querySelector(`.${this._options.bem.control}`);\n }\n set checked(isChecked) {\n this._unobserveMutations();\n this._focusableElement.setAttribute(\"aria-checked\", isChecked.toString());\n this.el.dispatchEvent(new CustomEvent(\"makeup-switch-toggle\", {\n composed: true,\n detail: {\n on: this.checked\n }\n }));\n this._observeMutations();\n }\n get checked() {\n return this._focusableElement.getAttribute(\"aria-checked\") === \"true\";\n }\n set disabled(isDisabled) {\n this._unobserveMutations();\n this._focusableElement.setAttribute(\"aria-disabled\", isDisabled.toString());\n this._focusableElement.setAttribute(\"tabindex\", isDisabled ? \"-1\" : \"0\");\n this._observeMutations();\n }\n get disabled() {\n return this._focusableElement.getAttribute(\"aria-disabled\") === \"true\";\n }\n set labelledby(theId) {\n this._unobserveMutations();\n this._focusableElement.setAttribute(\"aria-labelledby\", theId);\n if (this._options.customElementMode) {\n const labellingEl = document.getElementById(this.labelledby);\n if (labellingEl && labellingEl.innerText !== \"\") {\n this.label = labellingEl.innerText;\n }\n }\n this._observeMutations();\n }\n get labelledby() {\n return this._focusableElement.getAttribute(\"aria-labelledby\");\n }\n get label() {\n return this._focusableElement.getAttribute(\"aria-label\");\n }\n set label(theLabel) {\n this._unobserveMutations();\n this._focusableElement.setAttribute(\"aria-label\", theLabel);\n this._observeMutations();\n }\n toggle() {\n this.checked = !this.checked;\n }\n destroy() {\n this._unobserveMutations();\n this._unobserveEvents();\n this._onClickListener = null;\n this._onKeyDownListener = null;\n this._onMutationListener = null;\n }\n}\nfunction _onKeyDown(e) {\n if (!this.disabled) {\n switch (e.keyCode) {\n case 32:\n e.preventDefault();\n this.toggle();\n break;\n case 37:\n this.checked = false;\n break;\n case 39:\n this.checked = true;\n break;\n default:\n break;\n }\n }\n}\nfunction _onClick() {\n if (!this.disabled) {\n this.toggle();\n }\n}\nfunction _onMutation(mutationsList) {\n for (const mutation of mutationsList) {\n if (mutation.type === \"attributes\") {\n this.el.dispatchEvent(new CustomEvent(\"makeup-switch-mutation\", {\n detail: {\n attributeName: mutation.attributeName\n }\n }));\n }\n }\n}\nexport {\n src_default as default\n};\n","import focusables from \"makeup-focusables\";\nlet trappedEl;\nlet topTrap;\nlet outerTrapBefore;\nlet innerTrapBefore;\nlet innerTrapAfter;\nlet outerTrapAfter;\nlet botTrap;\nlet firstFocusableElement;\nlet lastFocusableElement;\nfunction createTrapBoundary() {\n const trapBoundary = document.createElement(\"div\");\n trapBoundary.setAttribute(\"aria-hidden\", \"true\");\n trapBoundary.setAttribute(\"tabindex\", \"0\");\n trapBoundary.className = \"keyboard-trap-boundary\";\n return trapBoundary;\n}\nfunction setFocusToFirstFocusableElement() {\n firstFocusableElement.focus();\n}\nfunction setFocusToLastFocusableElement() {\n lastFocusableElement.focus();\n}\nfunction createTraps() {\n topTrap = createTrapBoundary();\n outerTrapBefore = topTrap.cloneNode();\n innerTrapBefore = topTrap.cloneNode();\n innerTrapAfter = topTrap.cloneNode();\n outerTrapAfter = topTrap.cloneNode();\n botTrap = topTrap.cloneNode();\n topTrap.addEventListener(\"focus\", setFocusToFirstFocusableElement);\n outerTrapBefore.addEventListener(\"focus\", setFocusToFirstFocusableElement);\n innerTrapBefore.addEventListener(\"focus\", setFocusToLastFocusableElement);\n innerTrapAfter.addEventListener(\"focus\", setFocusToFirstFocusableElement);\n outerTrapAfter.addEventListener(\"focus\", setFocusToLastFocusableElement);\n botTrap.addEventListener(\"focus\", setFocusToLastFocusableElement);\n}\nfunction untrap() {\n if (trappedEl) {\n topTrap = safeDetach(topTrap);\n outerTrapBefore = safeDetach(outerTrapBefore);\n innerTrapBefore = safeDetach(innerTrapBefore);\n innerTrapAfter = safeDetach(innerTrapAfter);\n outerTrapAfter = safeDetach(outerTrapAfter);\n botTrap = safeDetach(botTrap);\n trappedEl.classList.remove(\"keyboard-trap--active\");\n trappedEl.dispatchEvent(new CustomEvent(\"keyboardUntrap\", { bubbles: true }));\n trappedEl = null;\n }\n return trappedEl;\n}\nfunction safeDetach(el) {\n const parent = el.parentNode;\n return parent ? parent.removeChild(el) : el;\n}\nfunction trap(el) {\n if (!topTrap) {\n createTraps();\n } else {\n untrap();\n }\n trappedEl = el;\n const body = typeof document === \"undefined\" ? null : document.body;\n const focusableElements = focusables(trappedEl, true);\n firstFocusableElement = focusableElements[0];\n lastFocusableElement = focusableElements[focusableElements.length - 1];\n body.insertBefore(topTrap, body.childNodes[0]);\n trappedEl.parentNode.insertBefore(outerTrapBefore, trappedEl);\n trappedEl.insertBefore(innerTrapBefore, trappedEl.childNodes[0]);\n trappedEl.appendChild(innerTrapAfter);\n trappedEl.parentNode.insertBefore(outerTrapAfter, trappedEl.nextElementSibling);\n body.appendChild(botTrap);\n trappedEl.dispatchEvent(new CustomEvent(\"keyboardTrap\", { bubbles: true }));\n trappedEl.classList.add(\"keyboard-trap--active\");\n return trappedEl;\n}\nfunction refresh() {\n if (topTrap && trappedEl) {\n let focusableElements = focusables(trappedEl, true);\n focusableElements = focusableElements.filter(function(el) {\n return !el.classList.contains(\"keyboard-trap-boundary\");\n });\n firstFocusableElement = focusableElements[0];\n lastFocusableElement = focusableElements[focusableElements.length - 1];\n }\n}\nexport {\n refresh,\n trap,\n untrap\n};\n","const filterAncestor = (item) => item.nodeType === 1 && item.tagName.toLowerCase() !== \"body\" && item.tagName.toLowerCase() !== \"html\";\nconst filterSibling = (item) => item.nodeType === 1 && item.tagName.toLowerCase() !== \"script\";\nconst flattenArrays = (a, b) => a.concat(b);\nfunction getPreviousSiblings(el, siblings = []) {\n const previousSibling = el.previousSibling;\n if (!previousSibling) {\n return siblings;\n }\n siblings.push(previousSibling);\n return getPreviousSiblings(previousSibling, siblings);\n}\nfunction getNextSiblings(el, siblings = []) {\n const nextSibling = el.nextSibling;\n if (!nextSibling) {\n return siblings;\n }\n siblings.push(nextSibling);\n return getNextSiblings(nextSibling, siblings);\n}\nfunction getSiblings(el) {\n const allSiblings = getPreviousSiblings(el).concat(getNextSiblings(el));\n return allSiblings.filter(filterSibling);\n}\nfunction getAllAncestors(el, ancestors = []) {\n const nextAncestor = el.parentNode;\n if (!nextAncestor) {\n return ancestors;\n }\n ancestors.push(nextAncestor);\n return getAllAncestors(nextAncestor, ancestors);\n}\nfunction getAncestors(el) {\n return getAllAncestors(el).filter(filterAncestor);\n}\nfunction getSiblingsOfAncestors(el) {\n return getAncestors(el).map((item) => getSiblings(item)).reduce(flattenArrays, []);\n}\nexport {\n getAncestors,\n getSiblings,\n getSiblingsOfAncestors\n};\n","import * as util from \"./util.js\";\nlet mainEl;\nlet trappedEl;\nlet dirtyObjects;\nconst filterSvg = (item) => item.tagName.toLowerCase() !== \"svg\";\nfunction showElementPrep(el, useHiddenProperty) {\n let preparedElement;\n if (useHiddenProperty === false) {\n preparedElement = prepareElement(el, \"aria-hidden\", \"false\");\n } else {\n preparedElement = prepareElement(el, \"hidden\", false);\n }\n return preparedElement;\n}\nfunction hideElementPrep(el, useHiddenProperty) {\n let preparedElement;\n if (useHiddenProperty === false) {\n preparedElement = prepareElement(el, \"aria-hidden\", \"true\");\n } else {\n preparedElement = prepareElement(el, \"hidden\", true);\n }\n return preparedElement;\n}\nfunction prepareElement(el, attributeName, dirtyValue) {\n const isProperty = typeof dirtyValue === \"boolean\";\n return {\n el,\n attributeName,\n cleanValue: isProperty ? el[attributeName] : el.getAttribute(attributeName),\n dirtyValue,\n isProperty\n };\n}\nfunction dirtyElement(preparedObj) {\n if (preparedObj.isProperty === true) {\n preparedObj.el[preparedObj.attributeName] = preparedObj.dirtyValue;\n } else {\n preparedObj.el.setAttribute(preparedObj.attributeName, preparedObj.dirtyValue);\n }\n}\nfunction cleanElement(preparedObj) {\n if (preparedObj.cleanValue) {\n if (preparedObj.isProperty === true) {\n preparedObj.el[preparedObj.attributeName] = preparedObj.cleanValue;\n } else {\n preparedObj.el.setAttribute(preparedObj.attributeName, preparedObj.cleanValue);\n }\n } else {\n preparedObj.el.removeAttribute(preparedObj.attributeName);\n }\n}\nfunction untrap() {\n if (trappedEl) {\n dirtyObjects.forEach((item) => cleanElement(item));\n dirtyObjects = [];\n if (mainEl) {\n mainEl.setAttribute(\"role\", \"main\");\n }\n trappedEl.dispatchEvent(new CustomEvent(\"screenreaderUntrap\", { bubbles: true }));\n trappedEl = null;\n }\n}\nconst defaultOptions = {\n useHiddenProperty: false\n};\nfunction trap(el, selectedOptions) {\n untrap();\n const options = Object.assign({}, defaultOptions, selectedOptions);\n trappedEl = el;\n mainEl = document.querySelector('main, [role=\"main\"]');\n if (mainEl) {\n mainEl.setAttribute(\"role\", \"presentation\");\n }\n const ancestors = util.getAncestors(trappedEl);\n let siblings = util.getSiblings(trappedEl);\n let siblingsOfAncestors = util.getSiblingsOfAncestors(trappedEl);\n if (options.useHiddenProperty === true) {\n siblings = siblings.filter(filterSvg);\n siblingsOfAncestors = siblingsOfAncestors.filter(filterSvg);\n }\n dirtyObjects = [showElementPrep(trappedEl, options.useHiddenProperty)].concat(ancestors.map((item) => showElementPrep(item, options.useHiddenProperty))).concat(siblings.map((item) => hideElementPrep(item, options.useHiddenProperty))).concat(siblingsOfAncestors.map((item) => hideElementPrep(item, options.useHiddenProperty)));\n dirtyObjects.forEach((item) => dirtyElement(item));\n trappedEl.dispatchEvent(new CustomEvent(\"screenreaderTrap\", { bubbles: true }));\n}\nexport {\n trap,\n untrap\n};\n","import * as keyboardTrap from \"makeup-keyboard-trap\";\nimport * as screenreaderTrap from \"makeup-screenreader-trap\";\nconst defaultOptions = {\n hoist: false,\n useHiddenProperty: false,\n wrap: false\n};\nconst tags = {\n SCRIPT: \"script\",\n LINK: \"link\"\n};\nlet modalEl;\nlet hoistedPlaceholderEl;\nlet inertContentEl;\nlet originalPositionIndexes = [];\nfunction isRootLevel(el) {\n return el.parentNode.tagName.toLowerCase() === \"body\";\n}\nfunction unhoist() {\n if (hoistedPlaceholderEl) {\n hoistedPlaceholderEl.replaceWith(modalEl);\n hoistedPlaceholderEl = null;\n }\n}\nfunction hoist() {\n if (!hoistedPlaceholderEl && !isRootLevel(modalEl)) {\n hoistedPlaceholderEl = document.createElement(\"div\");\n hoistedPlaceholderEl.setAttribute(\"data-makeup-modal\", \"placeholder\");\n modalEl.parentElement.insertBefore(hoistedPlaceholderEl, modalEl);\n document.body.appendChild(modalEl);\n }\n}\nfunction wrap() {\n if (!inertContentEl && isRootLevel(modalEl)) {\n inertContentEl = document.createElement(\"div\");\n inertContentEl.setAttribute(\"data-makeup-modal\", \"inert\");\n [...document.body.children].forEach((child, index) => {\n if (!(child === modalEl || child.tagName.toLowerCase() === tags.SCRIPT || child.tagName === tags.LINK)) {\n inertContentEl.appendChild(child);\n originalPositionIndexes.push(index);\n }\n });\n document.body.prepend(inertContentEl);\n }\n}\nfunction unwrap() {\n if (inertContentEl) {\n [...inertContentEl.children].forEach((child) => {\n if (!(child.tagName.toLowerCase() === tags.SCRIPT || child.tagName === tags.LINK)) {\n const index = originalPositionIndexes.shift();\n if (index > document.body.children.length) {\n document.body.appendChild(child);\n } else {\n document.body.insertBefore(child, document.body.children[index + 1]);\n }\n }\n });\n inertContentEl.remove();\n inertContentEl = null;\n originalPositionIndexes = [];\n }\n}\nfunction unmodal() {\n if (modalEl) {\n keyboardTrap.untrap(modalEl);\n screenreaderTrap.untrap(modalEl);\n unwrap();\n unhoist();\n document.body.removeAttribute(\"data-makeup-modal\");\n modalEl.removeAttribute(\"data-makeup-modal\");\n modalEl.dispatchEvent(new CustomEvent(\"makeup-unmodal\", { bubbles: false }));\n modalEl = null;\n }\n return modalEl;\n}\nfunction modal(el, options) {\n const _options = Object.assign({}, defaultOptions, options);\n unmodal();\n modalEl = el;\n if (_options.hoist) {\n hoist();\n }\n if (_options.wrap) {\n wrap();\n }\n screenreaderTrap.trap(modalEl, options);\n if (!_options.useHiddenProperty) {\n keyboardTrap.trap(modalEl);\n }\n document.body.setAttribute(\"data-makeup-modal\", \"true\");\n modalEl.setAttribute(\"data-makeup-modal\", \"widget\");\n modalEl.dispatchEvent(new CustomEvent(\"makeup-modal\", { bubbles: false }));\n return modalEl;\n}\nexport {\n modal,\n unmodal\n};\n","const TRANSITION_END = \"transitionend\";\nconst IMMEDIATE_TRANSITION_REG = /0m?s(?:, )?/g;\nfunction transition(el, baseClass, cb) {\n let ended;\n let pending;\n let ran = 0;\n const classList = el.classList;\n const initClass = \"\".concat(baseClass, \"-init\");\n let cancelFrame = nextFrame(function() {\n el.addEventListener(TRANSITION_END, listener, true);\n classList.add(baseClass);\n classList.remove(initClass);\n pending = getTransitionCount(el);\n cancelFrame = void 0;\n if (pending === 0) {\n cancel();\n }\n });\n classList.add(initClass);\n return cancel;\n function cancel() {\n if (ended) {\n return;\n }\n ended = true;\n el.removeEventListener(TRANSITION_END, listener, true);\n if (cancelFrame) {\n cancelFrame();\n classList.remove(initClass);\n } else {\n classList.remove(baseClass);\n }\n }\n function listener() {\n if (++ran === pending) {\n ended = true;\n el.removeEventListener(TRANSITION_END, listener, true);\n classList.remove(baseClass);\n if (cb) {\n cb();\n }\n }\n }\n}\nfunction getTransitionCount(el) {\n let count = window.getComputedStyle(el).transitionDuration.replace(IMMEDIATE_TRANSITION_REG, \"\") ? 1 : 0;\n let child = el.firstElementChild;\n while (child) {\n count += getTransitionCount(child);\n child = child.nextElementSibling;\n }\n return count;\n}\nfunction nextFrame(fn) {\n let frame;\n let cancelFrame;\n if (window.requestAnimationFrame) {\n frame = requestAnimationFrame(function() {\n frame = requestAnimationFrame(fn);\n });\n cancelFrame = cancelAnimationFrame;\n } else {\n frame = setTimeout(fn, 26);\n cancelFrame = clearTimeout;\n }\n return function() {\n if (frame) {\n cancelFrame(frame);\n frame = void 0;\n }\n };\n}\nexport {\n transition as default\n};\n","import * as Modal from \"makeup-modal\";\nimport focusables from \"makeup-focusables\";\nimport transition from \"./transition.js\";\nconst defaultDialogOptions = {\n baseClass: \"dialog\",\n closeButtonSelector: \".dialog__close\",\n focusManagementIndex: 0,\n modal: false,\n quickDismiss: true,\n transitionsModifier: \"mask-fade\"\n};\nclass src_default {\n constructor(widgetEl, selectedOptions) {\n this._options = Object.assign({}, defaultDialogOptions, selectedOptions);\n this._el = widgetEl;\n if (this._options.modal === true) {\n this._el.setAttribute(\"aria-modal\", \"true\");\n }\n this._windowEl = this._el.querySelector(this._options.windowSelector);\n this._closeButtonEl = this._el.querySelector(this._options.closeButtonSelector);\n this._hasTransitions = this._el.classList.contains(`${this._options.baseClass}--${this._options.transitionsModifier}`);\n this._onCloseButtonClickListener = _onCloseButtonClick.bind(this);\n this._onKeyDownListener = _onKeyDown.bind(this);\n this._onOpenTransitionEndCallback = _onOpenTransitionEnd.bind(this);\n this._onCloseTransitionEndCallback = _onCloseTransitionEnd.bind(this);\n this._el.classList.add(`${this._options.baseClass}--js`);\n if (!this.hidden) {\n if (this.modal) {\n _doModalFocusManagement(this);\n }\n this._observeEvents();\n }\n }\n get focusables() {\n return focusables(this._windowEl);\n }\n get modal() {\n return this._el.getAttribute(\"aria-modal\") === \"true\";\n }\n get hidden() {\n return this._el.hidden;\n }\n open() {\n this._show();\n this._el.dispatchEvent(new CustomEvent(\"dialog-open\"));\n }\n close() {\n this._hide();\n this._el.dispatchEvent(new CustomEvent(\"dialog-close\"));\n }\n _show() {\n if (this._hasTransitions) {\n if (this._cancelTransition) {\n this._cancelTransition();\n }\n this._cancelTransition = transition(this._el, `${this._options.baseClass}--show`, this._onOpenTransitionEndCallback);\n } else {\n if (this.modal) {\n setTimeout(() => _doModalFocusManagement(this), 50);\n }\n this._el.hidden = false;\n }\n this._observeEvents();\n }\n _hide() {\n if (this._hasTransitions) {\n if (this._cancelTransition) {\n this._cancelTransition();\n }\n this._cancelTransition = transition(this._el, `${this._options.baseClass}--hide`, this._onCloseTransitionEndCallback);\n } else {\n if (this.modal) {\n Modal.unmodal();\n }\n this._el.hidden = true;\n }\n this._autoDismissTimeout = null;\n this._unobserveEvents();\n }\n _observeEvents() {\n document.addEventListener(\"keydown\", this._onKeyDownListener);\n if (this._closeButtonEl) {\n this._closeButtonEl.addEventListener(\"click\", this._onCloseButtonClickListener);\n }\n }\n _unobserveEvents() {\n this._el.removeEventListener(\"click\", this._onCloseButtonClickListener);\n document.removeEventListener(\"keydown\", this._onKeyDownListener);\n if (this._closeButtonEl) {\n this._closeButtonEl.addEventListener(\"click\", this._onCloseButtonClickListener);\n }\n }\n destroy() {\n this._destroyed = true;\n this._unobserveEvents();\n this._onCloseButtonClickListener = null;\n this._onKeyDownListener = null;\n this._onOpenTransitionEndCallback = null;\n this._onCloseTransitionEndCallback = null;\n this._autoDismissTimeout = null;\n }\n}\nfunction _doModalFocusManagement(dialogWidget) {\n const autoFocusEl = dialogWidget._el.querySelector(\"[autofocus]\");\n if (autoFocusEl) {\n autoFocusEl.focus();\n } else {\n dialogWidget.focusables[dialogWidget._options.focusManagementIndex].focus();\n }\n Modal.modal(dialogWidget._el);\n}\nfunction _onOpenTransitionEnd() {\n this._el.hidden = false;\n this._cancelTransition = void 0;\n if (this.modal) {\n _doModalFocusManagement(this);\n }\n}\nfunction _onCloseTransitionEnd() {\n if (this.modal) {\n Modal.unmodal();\n }\n this._el.hidden = true;\n this._cancelTransition = void 0;\n}\nfunction _onKeyDown(e) {\n if (this._options.quickDismiss === true && e.keyCode === 27) {\n this.close();\n }\n}\nfunction _onCloseButtonClick() {\n this.close();\n}\nexport {\n src_default as default\n};\n","import Dialog from \"makeup-dialog\";\nconst defaultLightboxOptions = {\n baseClass: \"lightbox-dialog\",\n baseClassModifier: \"\",\n quickDismiss: true,\n closeButtonSelector: \".lightbox-dialog__close\",\n windowSelector: \".lightbox-dialog__window\"\n};\nclass src_default extends Dialog {\n constructor(el, selectedOptions = {}) {\n super(el, Object.assign({}, defaultLightboxOptions, selectedOptions, { modal: true }));\n }\n _observeEvents() {\n super._observeEvents();\n this._onClickListener = _onClick.bind(this);\n this._el.addEventListener(\"click\", this._onClickListener);\n }\n _unobserveEvents() {\n super._unobserveEvents();\n this._el.removeEventListener(\"click\", this._onClickListener);\n }\n destroy() {\n super.destroy();\n this._onClickListener = null;\n }\n}\nfunction _onClick(e) {\n if (this._options.quickDismiss === true && e.target === this._el) {\n this.close();\n }\n}\nexport {\n src_default as default\n};\n","import Lightbox from \"makeup-lightbox-dialog\";\nconst defaultAlertOptions = {\n baseClass: \"alert-dialog\",\n baseClassModifier: \"alert\",\n quickDismiss: false,\n acknowledgeButtonSelector: \".alert-dialog__acknowledge\",\n windowSelector: \".alert-dialog__window\"\n};\nclass src_default extends Lightbox {\n constructor(el, selectedOptions = {}) {\n super(el, Object.assign({}, defaultAlertOptions, selectedOptions));\n }\n _observeEvents() {\n super._observeEvents();\n this._acknowledgeButtonEl = this._el.querySelector(this._options.acknowledgeButtonSelector);\n this._onAcknowledgeButtonClickListener = _onAcknowledgeButtonClick.bind(this);\n this._acknowledgeButtonEl.addEventListener(\"click\", this._onAcknowledgeButtonClickListener);\n }\n _unobserveEvents() {\n super._unobserveEvents();\n this._acknowledgeButtonEl.removeEventListener(\"click\", this._onAcknowledgeButtonClickListener);\n }\n acknowledge() {\n this._hide();\n this._el.dispatchEvent(new CustomEvent(\"dialog-acknowledge\"));\n }\n destroy() {\n super.destroy();\n this._onAcknowledgeButtonClickListener = null;\n }\n}\nfunction _onAcknowledgeButtonClick() {\n this.acknowledge();\n}\nexport {\n src_default as default\n};\n","import Lightbox from \"makeup-lightbox-dialog\";\nconst defaultOptions = {\n baseClass: \"confirm-dialog\",\n closeButtonSelector: \".confirm-dialog__close\",\n quickDismiss: true,\n confirmButtonSelector: \".confirm-dialog__confirm\",\n focusManagementIndex: 1,\n rejectButtonSelector: \".confirm-dialog__reject\",\n windowSelector: \".confirm-dialog__window\"\n};\nclass src_default extends Lightbox {\n constructor(el, selectedOptions = {}) {\n super(el, Object.assign({}, defaultOptions, selectedOptions));\n }\n _observeEvents() {\n super._observeEvents();\n this._confirmButtonEl = this._el.querySelector(this._options.confirmButtonSelector);\n this._rejectButtonEl = this._el.querySelector(this._options.rejectButtonSelector);\n this._onConfirmButtonClickListener = _onConfirmButtonClick.bind(this);\n this._onRejectButtonClickListener = _onRejectButtonClick.bind(this);\n this._confirmButtonEl.addEventListener(\"click\", this._onConfirmButtonClickListener);\n this._rejectButtonEl.addEventListener(\"click\", this._onRejectButtonClickListener);\n }\n _unobserveEvents() {\n super._unobserveEvents();\n this._confirmButtonEl.removeEventListener(\"click\", this._onConfirmButtonClickListener);\n this._rejectButtonEl.removeEventListener(\"click\", this._onRejectButtonClickListener);\n }\n confirm() {\n this._hide();\n this._el.dispatchEvent(new CustomEvent(\"dialog-confirm\"));\n }\n reject() {\n this._hide();\n this._el.dispatchEvent(new CustomEvent(\"dialog-reject\"));\n }\n destroy() {\n super.destroy();\n this._onConfirmButtonClickListener = null;\n this._onRejectButtonClickListener = null;\n }\n}\nfunction _onConfirmButtonClick() {\n this.confirm();\n}\nfunction _onRejectButtonClick() {\n this.reject();\n}\nexport {\n src_default as default\n};\n","import Lightbox from \"makeup-lightbox-dialog\";\nconst defaultDrawerOptions = {\n baseClass: \"drawer-dialog\",\n quickDismiss: true,\n closeButtonSelector: \".drawer-dialog__close\",\n focusManagementIndex: 1,\n resizeButtonSelector: \".drawer-dialog__handle\",\n windowSelector: \".drawer-dialog__window\"\n};\nclass src_default extends Lightbox {\n constructor(el, selectedOptions = {}) {\n super(el, Object.assign({}, defaultDrawerOptions, selectedOptions));\n }\n _observeEvents() {\n super._observeEvents();\n this._resizeButtonEl = this._el.querySelector(this._options.resizeButtonSelector);\n this._onResizeButtonClickListener = _onResizeButtonClick.bind(this);\n this._resizeButtonEl.addEventListener(\"click\", this._onResizeButtonClickListener);\n }\n _unobserveEvents() {\n super._unobserveEvents();\n this._resizeButtonEl.removeEventListener(\"click\", this._onResizeButtonClickListener);\n }\n resize() {\n this._el.querySelector(\".drawer-dialog__window\").classList.toggle(\"drawer-dialog__window--expanded\");\n this._el.dispatchEvent(new CustomEvent(\"dialog-resize\"));\n }\n destroy() {\n super.destroy();\n this._onResizeButtonClickListener = null;\n }\n}\nfunction _onResizeButtonClick() {\n this.resize();\n}\nexport {\n src_default as default\n};\n","import Dialog from \"makeup-dialog\";\nconst defaultFullscreenOptions = {\n baseClass: \"fullscreen-dialog\",\n quickDismiss: false,\n closeButtonSelector: \".fullscreen-dialog__close\",\n transitionsModifier: \"transition\",\n windowSelector: \".fullscreen-dialog__window\"\n};\nclass src_default extends Dialog {\n constructor(el, selectedOptions = {}) {\n super(el, Object.assign({}, defaultFullscreenOptions, selectedOptions, { modal: true }));\n }\n}\nexport {\n src_default as default\n};\n","import Lightbox from \"makeup-lightbox-dialog\";\nconst defaultInputOptions = {\n baseClass: \"lightbox-dialog\",\n baseClassModifier: \"input\",\n submitButtonSelector: \".lightbox-dialog__submit\",\n cancelButtonSelector: \".lightbox-dialog__cancel\",\n windowSelector: \".lightbox-dialog__window\"\n};\nclass src_default extends Lightbox {\n constructor(el, selectedOptions = {}) {\n super(el, Object.assign({}, defaultInputOptions, selectedOptions));\n }\n _observeEvents() {\n super._observeEvents();\n this._submitButtonEl = this._el.querySelector(this._options.submitButtonSelector);\n this._cancelButtonEl = this._el.querySelector(this._options.cancelButtonSelector);\n this._onSubmitButtonClickListener = _onSubmitButtonClick.bind(this);\n this._onCancelButtonClickListener = _onCancelButtonClick.bind(this);\n this._submitButtonEl.addEventListener(\"click\", this._onSubmitButtonClickListener);\n this._cancelButtonEl.addEventListener(\"click\", this._onCancelButtonClickListener);\n }\n _unobserveEvents() {\n super._unobserveEvents();\n this._submitButtonEl.removeEventListener(\"click\", this._onSubmitButtonClickListener);\n this._cancelButtonEl.removeEventListener(\"click\", this._onCancelButtonClickListener);\n }\n submit() {\n this._hide();\n this._el.dispatchEvent(new CustomEvent(\"dialog-submit\"));\n }\n cancel() {\n this._hide();\n this._el.dispatchEvent(new CustomEvent(\"dialog-cancel\"));\n }\n destroy() {\n super.destroy();\n this._onSubmitButtonClickListener = null;\n this._onCancelButtonClickListener = null;\n }\n}\nfunction _onSubmitButtonClick() {\n this.submit();\n}\nfunction _onCancelButtonClick() {\n this.cancel();\n}\nexport {\n src_default as default\n};\n","import Lightbox from \"makeup-lightbox-dialog\";\nconst defaultPanelOptions = {\n baseClass: \"panel-dialog\",\n quickDismiss: true,\n closeButtonSelector: \".panel-dialog__close\",\n doneButtonSelector: \".panel-dialog__done\",\n windowSelector: \".panel-dialog__window\",\n transitionsModifier: \"mask-fade-slow\"\n};\nclass src_default extends Lightbox {\n constructor(el, selectedOptions = {}) {\n super(el, Object.assign({}, defaultPanelOptions, selectedOptions));\n }\n}\nexport {\n src_default as default\n};\n","import Dialog from \"makeup-dialog\";\nconst defaultSnackbarOptions = {\n autoDismissTimer: 6e3,\n baseClass: \"snackbar-dialog\",\n ctaButtonSelector: \".snackbar-dialog__cta\",\n transitionsModifier: \"transition\"\n};\nclass src_default extends Dialog {\n constructor(el, selectedOptions = {}) {\n super(el, Object.assign({}, defaultSnackbarOptions, selectedOptions));\n this._autoDismissTimeout = null;\n }\n _show() {\n super._show();\n this._autoDismissTimeout = setTimeout((widget = this) => widget.close(), this._options.autoDismissTimer);\n }\n _observeEvents() {\n super._observeEvents();\n this._ctaEl = this._el.querySelector(this._options.ctaButtonSelector);\n if (this._ctaEl) {\n this._onCtaClickListener = _onCtaButtonClick.bind(this);\n this._ctaEl.addEventListener(\"click\", this._onCtaClickListener);\n }\n }\n _unobserveEvents() {\n super._unobserveEvents();\n if (this._ctaEl) {\n this._ctaEl.removeEventListener(\"click\", this._onCtaClickListener);\n }\n }\n cta() {\n this._hide();\n this._el.dispatchEvent(new CustomEvent(\"dialog-cta\"));\n }\n destroy() {\n super.destroy();\n this._onCtaClickListener = null;\n }\n}\nfunction _onCtaButtonClick() {\n this.cta();\n}\nexport {\n src_default as default\n};\n","import Dialog from \"makeup-dialog\";\nconst defaultToastOptions = {\n baseClass: \"toast-dialog\",\n closeButtonSelector: \".toast-dialog__close\",\n ctaButtonSelector: \".toast-dialog__cta\",\n transitionsModifier: \"transition\"\n};\nclass src_default extends Dialog {\n constructor(el, selectedOptions = {}) {\n super(el, Object.assign({}, defaultToastOptions, selectedOptions));\n }\n _show() {\n super._show();\n }\n _observeEvents() {\n super._observeEvents();\n this._ctaEl = this._el.querySelector(this._options.ctaButtonSelector);\n if (this._ctaEl) {\n this._onCtaClickListener = _onCtaButtonClick.bind(this);\n this._ctaEl.addEventListener(\"click\", this._onCtaClickListener);\n }\n }\n _unobserveEvents() {\n super._unobserveEvents();\n if (this._ctaEl) {\n this._ctaEl.removeEventListener(\"click\", this._onCtaClickListener);\n }\n }\n cta() {\n this._hide();\n this._el.dispatchEvent(new CustomEvent(\"dialog-cta\"));\n }\n destroy() {\n super.destroy();\n this._onCtaClickListener = null;\n }\n}\nfunction _onCtaButtonClick() {\n this.cta();\n}\nexport {\n src_default as default\n};\n","/**\n * Custom positioning reference element.\n * @see https://floating-ui.com/docs/virtual-elements\n */\n\nconst sides = ['top', 'right', 'bottom', 'left'];\nconst alignments = ['start', 'end'];\nconst placements = /*#__PURE__*/sides.reduce((acc, side) => acc.concat(side, side + \"-\" + alignments[0], side + \"-\" + alignments[1]), []);\nconst min = Math.min;\nconst max = Math.max;\nconst round = Math.round;\nconst floor = Math.floor;\nconst createCoords = v => ({\n x: v,\n y: v\n});\nconst oppositeSideMap = {\n left: 'right',\n right: 'left',\n bottom: 'top',\n top: 'bottom'\n};\nconst oppositeAlignmentMap = {\n start: 'end',\n end: 'start'\n};\nfunction clamp(start, value, end) {\n return max(start, min(value, end));\n}\nfunction evaluate(value, param) {\n return typeof value === 'function' ? value(param) : value;\n}\nfunction getSide(placement) {\n return placement.split('-')[0];\n}\nfunction getAlignment(placement) {\n return placement.split('-')[1];\n}\nfunction getOppositeAxis(axis) {\n return axis === 'x' ? 'y' : 'x';\n}\nfunction getAxisLength(axis) {\n return axis === 'y' ? 'height' : 'width';\n}\nfunction getSideAxis(placement) {\n return ['top', 'bottom'].includes(getSide(placement)) ? 'y' : 'x';\n}\nfunction getAlignmentAxis(placement) {\n return getOppositeAxis(getSideAxis(placement));\n}\nfunction getAlignmentSides(placement, rects, rtl) {\n if (rtl === void 0) {\n rtl = false;\n }\n const alignment = getAlignment(placement);\n const alignmentAxis = getAlignmentAxis(placement);\n const length = getAxisLength(alignmentAxis);\n let mainAlignmentSide = alignmentAxis === 'x' ? alignment === (rtl ? 'end' : 'start') ? 'right' : 'left' : alignment === 'start' ? 'bottom' : 'top';\n if (rects.reference[length] > rects.floating[length]) {\n mainAlignmentSide = getOppositePlacement(mainAlignmentSide);\n }\n return [mainAlignmentSide, getOppositePlacement(mainAlignmentSide)];\n}\nfunction getExpandedPlacements(placement) {\n const oppositePlacement = getOppositePlacement(placement);\n return [getOppositeAlignmentPlacement(placement), oppositePlacement, getOppositeAlignmentPlacement(oppositePlacement)];\n}\nfunction getOppositeAlignmentPlacement(placement) {\n return placement.replace(/start|end/g, alignment => oppositeAlignmentMap[alignment]);\n}\nfunction getSideList(side, isStart, rtl) {\n const lr = ['left', 'right'];\n const rl = ['right', 'left'];\n const tb = ['top', 'bottom'];\n const bt = ['bottom', 'top'];\n switch (side) {\n case 'top':\n case 'bottom':\n if (rtl) return isStart ? rl : lr;\n return isStart ? lr : rl;\n case 'left':\n case 'right':\n return isStart ? tb : bt;\n default:\n return [];\n }\n}\nfunction getOppositeAxisPlacements(placement, flipAlignment, direction, rtl) {\n const alignment = getAlignment(placement);\n let list = getSideList(getSide(placement), direction === 'start', rtl);\n if (alignment) {\n list = list.map(side => side + \"-\" + alignment);\n if (flipAlignment) {\n list = list.concat(list.map(getOppositeAlignmentPlacement));\n }\n }\n return list;\n}\nfunction getOppositePlacement(placement) {\n return placement.replace(/left|right|bottom|top/g, side => oppositeSideMap[side]);\n}\nfunction expandPaddingObject(padding) {\n return {\n top: 0,\n right: 0,\n bottom: 0,\n left: 0,\n ...padding\n };\n}\nfunction getPaddingObject(padding) {\n return typeof padding !== 'number' ? expandPaddingObject(padding) : {\n top: padding,\n right: padding,\n bottom: padding,\n left: padding\n };\n}\nfunction rectToClientRect(rect) {\n return {\n ...rect,\n top: rect.y,\n left: rect.x,\n right: rect.x + rect.width,\n bottom: rect.y + rect.height\n };\n}\n\nexport { alignments, clamp, createCoords, evaluate, expandPaddingObject, floor, getAlignment, getAlignmentAxis, getAlignmentSides, getAxisLength, getExpandedPlacements, getOppositeAlignmentPlacement, getOppositeAxis, getOppositeAxisPlacements, getOppositePlacement, getPaddingObject, getSide, getSideAxis, max, min, placements, rectToClientRect, round, sides };\n","import { getSideAxis, getAlignmentAxis, getAxisLength, getSide, getAlignment, evaluate, getPaddingObject, rectToClientRect, min, clamp, placements, getAlignmentSides, getOppositeAlignmentPlacement, getOppositePlacement, getExpandedPlacements, getOppositeAxisPlacements, sides, max, getOppositeAxis } from '@floating-ui/utils';\nexport { rectToClientRect } from '@floating-ui/utils';\n\nfunction computeCoordsFromPlacement(_ref, placement, rtl) {\n let {\n reference,\n floating\n } = _ref;\n const sideAxis = getSideAxis(placement);\n const alignmentAxis = getAlignmentAxis(placement);\n const alignLength = getAxisLength(alignmentAxis);\n const side = getSide(placement);\n const isVertical = sideAxis === 'y';\n const commonX = reference.x + reference.width / 2 - floating.width / 2;\n const commonY = reference.y + reference.height / 2 - floating.height / 2;\n const commonAlign = reference[alignLength] / 2 - floating[alignLength] / 2;\n let coords;\n switch (side) {\n case 'top':\n coords = {\n x: commonX,\n y: reference.y - floating.height\n };\n break;\n case 'bottom':\n coords = {\n x: commonX,\n y: reference.y + reference.height\n };\n break;\n case 'right':\n coords = {\n x: reference.x + reference.width,\n y: commonY\n };\n break;\n case 'left':\n coords = {\n x: reference.x - floating.width,\n y: commonY\n };\n break;\n default:\n coords = {\n x: reference.x,\n y: reference.y\n };\n }\n switch (getAlignment(placement)) {\n case 'start':\n coords[alignmentAxis] -= commonAlign * (rtl && isVertical ? -1 : 1);\n break;\n case 'end':\n coords[alignmentAxis] += commonAlign * (rtl && isVertical ? -1 : 1);\n break;\n }\n return coords;\n}\n\n/**\n * Computes the `x` and `y` coordinates that will place the floating element\n * next to a given reference element.\n *\n * This export does not have any `platform` interface logic. You will need to\n * write one for the platform you are using Floating UI with.\n */\nconst computePosition = async (reference, floating, config) => {\n const {\n placement = 'bottom',\n strategy = 'absolute',\n middleware = [],\n platform\n } = config;\n const validMiddleware = middleware.filter(Boolean);\n const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(floating));\n let rects = await platform.getElementRects({\n reference,\n floating,\n strategy\n });\n let {\n x,\n y\n } = computeCoordsFromPlacement(rects, placement, rtl);\n let statefulPlacement = placement;\n let middlewareData = {};\n let resetCount = 0;\n for (let i = 0; i < validMiddleware.length; i++) {\n const {\n name,\n fn\n } = validMiddleware[i];\n const {\n x: nextX,\n y: nextY,\n data,\n reset\n } = await fn({\n x,\n y,\n initialPlacement: placement,\n placement: statefulPlacement,\n strategy,\n middlewareData,\n rects,\n platform,\n elements: {\n reference,\n floating\n }\n });\n x = nextX != null ? nextX : x;\n y = nextY != null ? nextY : y;\n middlewareData = {\n ...middlewareData,\n [name]: {\n ...middlewareData[name],\n ...data\n }\n };\n if (reset && resetCount <= 50) {\n resetCount++;\n if (typeof reset === 'object') {\n if (reset.placement) {\n statefulPlacement = reset.placement;\n }\n if (reset.rects) {\n rects = reset.rects === true ? await platform.getElementRects({\n reference,\n floating,\n strategy\n }) : reset.rects;\n }\n ({\n x,\n y\n } = computeCoordsFromPlacement(rects, statefulPlacement, rtl));\n }\n i = -1;\n }\n }\n return {\n x,\n y,\n placement: statefulPlacement,\n strategy,\n middlewareData\n };\n};\n\n/**\n * Resolves with an object of overflow side offsets that determine how much the\n * element is overflowing a given clipping boundary on each side.\n * - positive = overflowing the boundary by that number of pixels\n * - negative = how many pixels left before it will overflow\n * - 0 = lies flush with the boundary\n * @see https://floating-ui.com/docs/detectOverflow\n */\nasync function detectOverflow(state, options) {\n var _await$platform$isEle;\n if (options === void 0) {\n options = {};\n }\n const {\n x,\n y,\n platform,\n rects,\n elements,\n strategy\n } = state;\n const {\n boundary = 'clippingAncestors',\n rootBoundary = 'viewport',\n elementContext = 'floating',\n altBoundary = false,\n padding = 0\n } = evaluate(options, state);\n const paddingObject = getPaddingObject(padding);\n const altContext = elementContext === 'floating' ? 'reference' : 'floating';\n const element = elements[altBoundary ? altContext : elementContext];\n const clippingClientRect = rectToClientRect(await platform.getClippingRect({\n element: ((_await$platform$isEle = await (platform.isElement == null ? void 0 : platform.isElement(element))) != null ? _await$platform$isEle : true) ? element : element.contextElement || (await (platform.getDocumentElement == null ? void 0 : platform.getDocumentElement(elements.floating))),\n boundary,\n rootBoundary,\n strategy\n }));\n const rect = elementContext === 'floating' ? {\n ...rects.floating,\n x,\n y\n } : rects.reference;\n const offsetParent = await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(elements.floating));\n const offsetScale = (await (platform.isElement == null ? void 0 : platform.isElement(offsetParent))) ? (await (platform.getScale == null ? void 0 : platform.getScale(offsetParent))) || {\n x: 1,\n y: 1\n } : {\n x: 1,\n y: 1\n };\n const elementClientRect = rectToClientRect(platform.convertOffsetParentRelativeRectToViewportRelativeRect ? await platform.convertOffsetParentRelativeRectToViewportRelativeRect({\n elements,\n rect,\n offsetParent,\n strategy\n }) : rect);\n return {\n top: (clippingClientRect.top - elementClientRect.top + paddingObject.top) / offsetScale.y,\n bottom: (elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom) / offsetScale.y,\n left: (clippingClientRect.left - elementClientRect.left + paddingObject.left) / offsetScale.x,\n right: (elementClientRect.right - clippingClientRect.right + paddingObject.right) / offsetScale.x\n };\n}\n\n/**\n * Provides data to position an inner element of the floating element so that it\n * appears centered to the reference element.\n * @see https://floating-ui.com/docs/arrow\n */\nconst arrow = options => ({\n name: 'arrow',\n options,\n async fn(state) {\n const {\n x,\n y,\n placement,\n rects,\n platform,\n elements,\n middlewareData\n } = state;\n // Since `element` is required, we don't Partial<> the type.\n const {\n element,\n padding = 0\n } = evaluate(options, state) || {};\n if (element == null) {\n return {};\n }\n const paddingObject = getPaddingObject(padding);\n const coords = {\n x,\n y\n };\n const axis = getAlignmentAxis(placement);\n const length = getAxisLength(axis);\n const arrowDimensions = await platform.getDimensions(element);\n const isYAxis = axis === 'y';\n const minProp = isYAxis ? 'top' : 'left';\n const maxProp = isYAxis ? 'bottom' : 'right';\n const clientProp = isYAxis ? 'clientHeight' : 'clientWidth';\n const endDiff = rects.reference[length] + rects.reference[axis] - coords[axis] - rects.floating[length];\n const startDiff = coords[axis] - rects.reference[axis];\n const arrowOffsetParent = await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(element));\n let clientSize = arrowOffsetParent ? arrowOffsetParent[clientProp] : 0;\n\n // DOM platform can return `window` as the `offsetParent`.\n if (!clientSize || !(await (platform.isElement == null ? void 0 : platform.isElement(arrowOffsetParent)))) {\n clientSize = elements.floating[clientProp] || rects.floating[length];\n }\n const centerToReference = endDiff / 2 - startDiff / 2;\n\n // If the padding is large enough that it causes the arrow to no longer be\n // centered, modify the padding so that it is centered.\n const largestPossiblePadding = clientSize / 2 - arrowDimensions[length] / 2 - 1;\n const minPadding = min(paddingObject[minProp], largestPossiblePadding);\n const maxPadding = min(paddingObject[maxProp], largestPossiblePadding);\n\n // Make sure the arrow doesn't overflow the floating element if the center\n // point is outside the floating element's bounds.\n const min$1 = minPadding;\n const max = clientSize - arrowDimensions[length] - maxPadding;\n const center = clientSize / 2 - arrowDimensions[length] / 2 + centerToReference;\n const offset = clamp(min$1, center, max);\n\n // If the reference is small enough that the arrow's padding causes it to\n // to point to nothing for an aligned placement, adjust the offset of the\n // floating element itself. To ensure `shift()` continues to take action,\n // a single reset is performed when this is true.\n const shouldAddOffset = !middlewareData.arrow && getAlignment(placement) != null && center !== offset && rects.reference[length] / 2 - (center < min$1 ? minPadding : maxPadding) - arrowDimensions[length] / 2 < 0;\n const alignmentOffset = shouldAddOffset ? center < min$1 ? center - min$1 : center - max : 0;\n return {\n [axis]: coords[axis] + alignmentOffset,\n data: {\n [axis]: offset,\n centerOffset: center - offset - alignmentOffset,\n ...(shouldAddOffset && {\n alignmentOffset\n })\n },\n reset: shouldAddOffset\n };\n }\n});\n\nfunction getPlacementList(alignment, autoAlignment, allowedPlacements) {\n const allowedPlacementsSortedByAlignment = alignment ? [...allowedPlacements.filter(placement => getAlignment(placement) === alignment), ...allowedPlacements.filter(placement => getAlignment(placement) !== alignment)] : allowedPlacements.filter(placement => getSide(placement) === placement);\n return allowedPlacementsSortedByAlignment.filter(placement => {\n if (alignment) {\n return getAlignment(placement) === alignment || (autoAlignment ? getOppositeAlignmentPlacement(placement) !== placement : false);\n }\n return true;\n });\n}\n/**\n * Optimizes the visibility of the floating element by choosing the placement\n * that has the most space available automatically, without needing to specify a\n * preferred placement. Alternative to `flip`.\n * @see https://floating-ui.com/docs/autoPlacement\n */\nconst autoPlacement = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n name: 'autoPlacement',\n options,\n async fn(state) {\n var _middlewareData$autoP, _middlewareData$autoP2, _placementsThatFitOnE;\n const {\n rects,\n middlewareData,\n placement,\n platform,\n elements\n } = state;\n const {\n crossAxis = false,\n alignment,\n allowedPlacements = placements,\n autoAlignment = true,\n ...detectOverflowOptions\n } = evaluate(options, state);\n const placements$1 = alignment !== undefined || allowedPlacements === placements ? getPlacementList(alignment || null, autoAlignment, allowedPlacements) : allowedPlacements;\n const overflow = await detectOverflow(state, detectOverflowOptions);\n const currentIndex = ((_middlewareData$autoP = middlewareData.autoPlacement) == null ? void 0 : _middlewareData$autoP.index) || 0;\n const currentPlacement = placements$1[currentIndex];\n if (currentPlacement == null) {\n return {};\n }\n const alignmentSides = getAlignmentSides(currentPlacement, rects, await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating)));\n\n // Make `computeCoords` start from the right place.\n if (placement !== currentPlacement) {\n return {\n reset: {\n placement: placements$1[0]\n }\n };\n }\n const currentOverflows = [overflow[getSide(currentPlacement)], overflow[alignmentSides[0]], overflow[alignmentSides[1]]];\n const allOverflows = [...(((_middlewareData$autoP2 = middlewareData.autoPlacement) == null ? void 0 : _middlewareData$autoP2.overflows) || []), {\n placement: currentPlacement,\n overflows: currentOverflows\n }];\n const nextPlacement = placements$1[currentIndex + 1];\n\n // There are more placements to check.\n if (nextPlacement) {\n return {\n data: {\n index: currentIndex + 1,\n overflows: allOverflows\n },\n reset: {\n placement: nextPlacement\n }\n };\n }\n const placementsSortedByMostSpace = allOverflows.map(d => {\n const alignment = getAlignment(d.placement);\n return [d.placement, alignment && crossAxis ?\n // Check along the mainAxis and main crossAxis side.\n d.overflows.slice(0, 2).reduce((acc, v) => acc + v, 0) :\n // Check only the mainAxis.\n d.overflows[0], d.overflows];\n }).sort((a, b) => a[1] - b[1]);\n const placementsThatFitOnEachSide = placementsSortedByMostSpace.filter(d => d[2].slice(0,\n // Aligned placements should not check their opposite crossAxis\n // side.\n getAlignment(d[0]) ? 2 : 3).every(v => v <= 0));\n const resetPlacement = ((_placementsThatFitOnE = placementsThatFitOnEachSide[0]) == null ? void 0 : _placementsThatFitOnE[0]) || placementsSortedByMostSpace[0][0];\n if (resetPlacement !== placement) {\n return {\n data: {\n index: currentIndex + 1,\n overflows: allOverflows\n },\n reset: {\n placement: resetPlacement\n }\n };\n }\n return {};\n }\n };\n};\n\n/**\n * Optimizes the visibility of the floating element by flipping the `placement`\n * in order to keep it in view when the preferred placement(s) will overflow the\n * clipping boundary. Alternative to `autoPlacement`.\n * @see https://floating-ui.com/docs/flip\n */\nconst flip = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n name: 'flip',\n options,\n async fn(state) {\n var _middlewareData$arrow, _middlewareData$flip;\n const {\n placement,\n middlewareData,\n rects,\n initialPlacement,\n platform,\n elements\n } = state;\n const {\n mainAxis: checkMainAxis = true,\n crossAxis: checkCrossAxis = true,\n fallbackPlacements: specifiedFallbackPlacements,\n fallbackStrategy = 'bestFit',\n fallbackAxisSideDirection = 'none',\n flipAlignment = true,\n ...detectOverflowOptions\n } = evaluate(options, state);\n\n // If a reset by the arrow was caused due to an alignment offset being\n // added, we should skip any logic now since `flip()` has already done its\n // work.\n // https://github.com/floating-ui/floating-ui/issues/2549#issuecomment-1719601643\n if ((_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) {\n return {};\n }\n const side = getSide(placement);\n const isBasePlacement = getSide(initialPlacement) === initialPlacement;\n const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating));\n const fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipAlignment ? [getOppositePlacement(initialPlacement)] : getExpandedPlacements(initialPlacement));\n if (!specifiedFallbackPlacements && fallbackAxisSideDirection !== 'none') {\n fallbackPlacements.push(...getOppositeAxisPlacements(initialPlacement, flipAlignment, fallbackAxisSideDirection, rtl));\n }\n const placements = [initialPlacement, ...fallbackPlacements];\n const overflow = await detectOverflow(state, detectOverflowOptions);\n const overflows = [];\n let overflowsData = ((_middlewareData$flip = middlewareData.flip) == null ? void 0 : _middlewareData$flip.overflows) || [];\n if (checkMainAxis) {\n overflows.push(overflow[side]);\n }\n if (checkCrossAxis) {\n const sides = getAlignmentSides(placement, rects, rtl);\n overflows.push(overflow[sides[0]], overflow[sides[1]]);\n }\n overflowsData = [...overflowsData, {\n placement,\n overflows\n }];\n\n // One or more sides is overflowing.\n if (!overflows.every(side => side <= 0)) {\n var _middlewareData$flip2, _overflowsData$filter;\n const nextIndex = (((_middlewareData$flip2 = middlewareData.flip) == null ? void 0 : _middlewareData$flip2.index) || 0) + 1;\n const nextPlacement = placements[nextIndex];\n if (nextPlacement) {\n // Try next placement and re-run the lifecycle.\n return {\n data: {\n index: nextIndex,\n overflows: overflowsData\n },\n reset: {\n placement: nextPlacement\n }\n };\n }\n\n // First, find the candidates that fit on the mainAxis side of overflow,\n // then find the placement that fits the best on the main crossAxis side.\n let resetPlacement = (_overflowsData$filter = overflowsData.filter(d => d.overflows[0] <= 0).sort((a, b) => a.overflows[1] - b.overflows[1])[0]) == null ? void 0 : _overflowsData$filter.placement;\n\n // Otherwise fallback.\n if (!resetPlacement) {\n switch (fallbackStrategy) {\n case 'bestFit':\n {\n var _overflowsData$map$so;\n const placement = (_overflowsData$map$so = overflowsData.map(d => [d.placement, d.overflows.filter(overflow => overflow > 0).reduce((acc, overflow) => acc + overflow, 0)]).sort((a, b) => a[1] - b[1])[0]) == null ? void 0 : _overflowsData$map$so[0];\n if (placement) {\n resetPlacement = placement;\n }\n break;\n }\n case 'initialPlacement':\n resetPlacement = initialPlacement;\n break;\n }\n }\n if (placement !== resetPlacement) {\n return {\n reset: {\n placement: resetPlacement\n }\n };\n }\n }\n return {};\n }\n };\n};\n\nfunction getSideOffsets(overflow, rect) {\n return {\n top: overflow.top - rect.height,\n right: overflow.right - rect.width,\n bottom: overflow.bottom - rect.height,\n left: overflow.left - rect.width\n };\n}\nfunction isAnySideFullyClipped(overflow) {\n return sides.some(side => overflow[side] >= 0);\n}\n/**\n * Provides data to hide the floating element in applicable situations, such as\n * when it is not in the same clipping context as the reference element.\n * @see https://floating-ui.com/docs/hide\n */\nconst hide = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n name: 'hide',\n options,\n async fn(state) {\n const {\n rects\n } = state;\n const {\n strategy = 'referenceHidden',\n ...detectOverflowOptions\n } = evaluate(options, state);\n switch (strategy) {\n case 'referenceHidden':\n {\n const overflow = await detectOverflow(state, {\n ...detectOverflowOptions,\n elementContext: 'reference'\n });\n const offsets = getSideOffsets(overflow, rects.reference);\n return {\n data: {\n referenceHiddenOffsets: offsets,\n referenceHidden: isAnySideFullyClipped(offsets)\n }\n };\n }\n case 'escaped':\n {\n const overflow = await detectOverflow(state, {\n ...detectOverflowOptions,\n altBoundary: true\n });\n const offsets = getSideOffsets(overflow, rects.floating);\n return {\n data: {\n escapedOffsets: offsets,\n escaped: isAnySideFullyClipped(offsets)\n }\n };\n }\n default:\n {\n return {};\n }\n }\n }\n };\n};\n\nfunction getBoundingRect(rects) {\n const minX = min(...rects.map(rect => rect.left));\n const minY = min(...rects.map(rect => rect.top));\n const maxX = max(...rects.map(rect => rect.right));\n const maxY = max(...rects.map(rect => rect.bottom));\n return {\n x: minX,\n y: minY,\n width: maxX - minX,\n height: maxY - minY\n };\n}\nfunction getRectsByLine(rects) {\n const sortedRects = rects.slice().sort((a, b) => a.y - b.y);\n const groups = [];\n let prevRect = null;\n for (let i = 0; i < sortedRects.length; i++) {\n const rect = sortedRects[i];\n if (!prevRect || rect.y - prevRect.y > prevRect.height / 2) {\n groups.push([rect]);\n } else {\n groups[groups.length - 1].push(rect);\n }\n prevRect = rect;\n }\n return groups.map(rect => rectToClientRect(getBoundingRect(rect)));\n}\n/**\n * Provides improved positioning for inline reference elements that can span\n * over multiple lines, such as hyperlinks or range selections.\n * @see https://floating-ui.com/docs/inline\n */\nconst inline = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n name: 'inline',\n options,\n async fn(state) {\n const {\n placement,\n elements,\n rects,\n platform,\n strategy\n } = state;\n // A MouseEvent's client{X,Y} coords can be up to 2 pixels off a\n // ClientRect's bounds, despite the event listener being triggered. A\n // padding of 2 seems to handle this issue.\n const {\n padding = 2,\n x,\n y\n } = evaluate(options, state);\n const nativeClientRects = Array.from((await (platform.getClientRects == null ? void 0 : platform.getClientRects(elements.reference))) || []);\n const clientRects = getRectsByLine(nativeClientRects);\n const fallback = rectToClientRect(getBoundingRect(nativeClientRects));\n const paddingObject = getPaddingObject(padding);\n function getBoundingClientRect() {\n // There are two rects and they are disjoined.\n if (clientRects.length === 2 && clientRects[0].left > clientRects[1].right && x != null && y != null) {\n // Find the first rect in which the point is fully inside.\n return clientRects.find(rect => x > rect.left - paddingObject.left && x < rect.right + paddingObject.right && y > rect.top - paddingObject.top && y < rect.bottom + paddingObject.bottom) || fallback;\n }\n\n // There are 2 or more connected rects.\n if (clientRects.length >= 2) {\n if (getSideAxis(placement) === 'y') {\n const firstRect = clientRects[0];\n const lastRect = clientRects[clientRects.length - 1];\n const isTop = getSide(placement) === 'top';\n const top = firstRect.top;\n const bottom = lastRect.bottom;\n const left = isTop ? firstRect.left : lastRect.left;\n const right = isTop ? firstRect.right : lastRect.right;\n const width = right - left;\n const height = bottom - top;\n return {\n top,\n bottom,\n left,\n right,\n width,\n height,\n x: left,\n y: top\n };\n }\n const isLeftSide = getSide(placement) === 'left';\n const maxRight = max(...clientRects.map(rect => rect.right));\n const minLeft = min(...clientRects.map(rect => rect.left));\n const measureRects = clientRects.filter(rect => isLeftSide ? rect.left === minLeft : rect.right === maxRight);\n const top = measureRects[0].top;\n const bottom = measureRects[measureRects.length - 1].bottom;\n const left = minLeft;\n const right = maxRight;\n const width = right - left;\n const height = bottom - top;\n return {\n top,\n bottom,\n left,\n right,\n width,\n height,\n x: left,\n y: top\n };\n }\n return fallback;\n }\n const resetRects = await platform.getElementRects({\n reference: {\n getBoundingClientRect\n },\n floating: elements.floating,\n strategy\n });\n if (rects.reference.x !== resetRects.reference.x || rects.reference.y !== resetRects.reference.y || rects.reference.width !== resetRects.reference.width || rects.reference.height !== resetRects.reference.height) {\n return {\n reset: {\n rects: resetRects\n }\n };\n }\n return {};\n }\n };\n};\n\n// For type backwards-compatibility, the `OffsetOptions` type was also\n// Derivable.\n\nasync function convertValueToCoords(state, options) {\n const {\n placement,\n platform,\n elements\n } = state;\n const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating));\n const side = getSide(placement);\n const alignment = getAlignment(placement);\n const isVertical = getSideAxis(placement) === 'y';\n const mainAxisMulti = ['left', 'top'].includes(side) ? -1 : 1;\n const crossAxisMulti = rtl && isVertical ? -1 : 1;\n const rawValue = evaluate(options, state);\n let {\n mainAxis,\n crossAxis,\n alignmentAxis\n } = typeof rawValue === 'number' ? {\n mainAxis: rawValue,\n crossAxis: 0,\n alignmentAxis: null\n } : {\n mainAxis: 0,\n crossAxis: 0,\n alignmentAxis: null,\n ...rawValue\n };\n if (alignment && typeof alignmentAxis === 'number') {\n crossAxis = alignment === 'end' ? alignmentAxis * -1 : alignmentAxis;\n }\n return isVertical ? {\n x: crossAxis * crossAxisMulti,\n y: mainAxis * mainAxisMulti\n } : {\n x: mainAxis * mainAxisMulti,\n y: crossAxis * crossAxisMulti\n };\n}\n\n/**\n * Modifies the placement by translating the floating element along the\n * specified axes.\n * A number (shorthand for `mainAxis` or distance), or an axes configuration\n * object may be passed.\n * @see https://floating-ui.com/docs/offset\n */\nconst offset = function (options) {\n if (options === void 0) {\n options = 0;\n }\n return {\n name: 'offset',\n options,\n async fn(state) {\n var _middlewareData$offse, _middlewareData$arrow;\n const {\n x,\n y,\n placement,\n middlewareData\n } = state;\n const diffCoords = await convertValueToCoords(state, options);\n\n // If the placement is the same and the arrow caused an alignment offset\n // then we don't need to change the positioning coordinates.\n if (placement === ((_middlewareData$offse = middlewareData.offset) == null ? void 0 : _middlewareData$offse.placement) && (_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) {\n return {};\n }\n return {\n x: x + diffCoords.x,\n y: y + diffCoords.y,\n data: {\n ...diffCoords,\n placement\n }\n };\n }\n };\n};\n\n/**\n * Optimizes the visibility of the floating element by shifting it in order to\n * keep it in view when it will overflow the clipping boundary.\n * @see https://floating-ui.com/docs/shift\n */\nconst shift = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n name: 'shift',\n options,\n async fn(state) {\n const {\n x,\n y,\n placement\n } = state;\n const {\n mainAxis: checkMainAxis = true,\n crossAxis: checkCrossAxis = false,\n limiter = {\n fn: _ref => {\n let {\n x,\n y\n } = _ref;\n return {\n x,\n y\n };\n }\n },\n ...detectOverflowOptions\n } = evaluate(options, state);\n const coords = {\n x,\n y\n };\n const overflow = await detectOverflow(state, detectOverflowOptions);\n const crossAxis = getSideAxis(getSide(placement));\n const mainAxis = getOppositeAxis(crossAxis);\n let mainAxisCoord = coords[mainAxis];\n let crossAxisCoord = coords[crossAxis];\n if (checkMainAxis) {\n const minSide = mainAxis === 'y' ? 'top' : 'left';\n const maxSide = mainAxis === 'y' ? 'bottom' : 'right';\n const min = mainAxisCoord + overflow[minSide];\n const max = mainAxisCoord - overflow[maxSide];\n mainAxisCoord = clamp(min, mainAxisCoord, max);\n }\n if (checkCrossAxis) {\n const minSide = crossAxis === 'y' ? 'top' : 'left';\n const maxSide = crossAxis === 'y' ? 'bottom' : 'right';\n const min = crossAxisCoord + overflow[minSide];\n const max = crossAxisCoord - overflow[maxSide];\n crossAxisCoord = clamp(min, crossAxisCoord, max);\n }\n const limitedCoords = limiter.fn({\n ...state,\n [mainAxis]: mainAxisCoord,\n [crossAxis]: crossAxisCoord\n });\n return {\n ...limitedCoords,\n data: {\n x: limitedCoords.x - x,\n y: limitedCoords.y - y\n }\n };\n }\n };\n};\n/**\n * Built-in `limiter` that will stop `shift()` at a certain point.\n */\nconst limitShift = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n options,\n fn(state) {\n const {\n x,\n y,\n placement,\n rects,\n middlewareData\n } = state;\n const {\n offset = 0,\n mainAxis: checkMainAxis = true,\n crossAxis: checkCrossAxis = true\n } = evaluate(options, state);\n const coords = {\n x,\n y\n };\n const crossAxis = getSideAxis(placement);\n const mainAxis = getOppositeAxis(crossAxis);\n let mainAxisCoord = coords[mainAxis];\n let crossAxisCoord = coords[crossAxis];\n const rawOffset = evaluate(offset, state);\n const computedOffset = typeof rawOffset === 'number' ? {\n mainAxis: rawOffset,\n crossAxis: 0\n } : {\n mainAxis: 0,\n crossAxis: 0,\n ...rawOffset\n };\n if (checkMainAxis) {\n const len = mainAxis === 'y' ? 'height' : 'width';\n const limitMin = rects.reference[mainAxis] - rects.floating[len] + computedOffset.mainAxis;\n const limitMax = rects.reference[mainAxis] + rects.reference[len] - computedOffset.mainAxis;\n if (mainAxisCoord < limitMin) {\n mainAxisCoord = limitMin;\n } else if (mainAxisCoord > limitMax) {\n mainAxisCoord = limitMax;\n }\n }\n if (checkCrossAxis) {\n var _middlewareData$offse, _middlewareData$offse2;\n const len = mainAxis === 'y' ? 'width' : 'height';\n const isOriginSide = ['top', 'left'].includes(getSide(placement));\n const limitMin = rects.reference[crossAxis] - rects.floating[len] + (isOriginSide ? ((_middlewareData$offse = middlewareData.offset) == null ? void 0 : _middlewareData$offse[crossAxis]) || 0 : 0) + (isOriginSide ? 0 : computedOffset.crossAxis);\n const limitMax = rects.reference[crossAxis] + rects.reference[len] + (isOriginSide ? 0 : ((_middlewareData$offse2 = middlewareData.offset) == null ? void 0 : _middlewareData$offse2[crossAxis]) || 0) - (isOriginSide ? computedOffset.crossAxis : 0);\n if (crossAxisCoord < limitMin) {\n crossAxisCoord = limitMin;\n } else if (crossAxisCoord > limitMax) {\n crossAxisCoord = limitMax;\n }\n }\n return {\n [mainAxis]: mainAxisCoord,\n [crossAxis]: crossAxisCoord\n };\n }\n };\n};\n\n/**\n * Provides data that allows you to change the size of the floating element —\n * for instance, prevent it from overflowing the clipping boundary or match the\n * width of the reference element.\n * @see https://floating-ui.com/docs/size\n */\nconst size = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n name: 'size',\n options,\n async fn(state) {\n const {\n placement,\n rects,\n platform,\n elements\n } = state;\n const {\n apply = () => {},\n ...detectOverflowOptions\n } = evaluate(options, state);\n const overflow = await detectOverflow(state, detectOverflowOptions);\n const side = getSide(placement);\n const alignment = getAlignment(placement);\n const isYAxis = getSideAxis(placement) === 'y';\n const {\n width,\n height\n } = rects.floating;\n let heightSide;\n let widthSide;\n if (side === 'top' || side === 'bottom') {\n heightSide = side;\n widthSide = alignment === ((await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating))) ? 'start' : 'end') ? 'left' : 'right';\n } else {\n widthSide = side;\n heightSide = alignment === 'end' ? 'top' : 'bottom';\n }\n const overflowAvailableHeight = height - overflow[heightSide];\n const overflowAvailableWidth = width - overflow[widthSide];\n const noShift = !state.middlewareData.shift;\n let availableHeight = overflowAvailableHeight;\n let availableWidth = overflowAvailableWidth;\n if (isYAxis) {\n const maximumClippingWidth = width - overflow.left - overflow.right;\n availableWidth = alignment || noShift ? min(overflowAvailableWidth, maximumClippingWidth) : maximumClippingWidth;\n } else {\n const maximumClippingHeight = height - overflow.top - overflow.bottom;\n availableHeight = alignment || noShift ? min(overflowAvailableHeight, maximumClippingHeight) : maximumClippingHeight;\n }\n if (noShift && !alignment) {\n const xMin = max(overflow.left, 0);\n const xMax = max(overflow.right, 0);\n const yMin = max(overflow.top, 0);\n const yMax = max(overflow.bottom, 0);\n if (isYAxis) {\n availableWidth = width - 2 * (xMin !== 0 || xMax !== 0 ? xMin + xMax : max(overflow.left, overflow.right));\n } else {\n availableHeight = height - 2 * (yMin !== 0 || yMax !== 0 ? yMin + yMax : max(overflow.top, overflow.bottom));\n }\n }\n await apply({\n ...state,\n availableWidth,\n availableHeight\n });\n const nextDimensions = await platform.getDimensions(elements.floating);\n if (width !== nextDimensions.width || height !== nextDimensions.height) {\n return {\n reset: {\n rects: true\n }\n };\n }\n return {};\n }\n };\n};\n\nexport { arrow, autoPlacement, computePosition, detectOverflow, flip, hide, inline, limitShift, offset, shift, size };\n","function getNodeName(node) {\n if (isNode(node)) {\n return (node.nodeName || '').toLowerCase();\n }\n // Mocked nodes in testing environments may not be instances of Node. By\n // returning `#document` an infinite loop won't occur.\n // https://github.com/floating-ui/floating-ui/issues/2317\n return '#document';\n}\nfunction getWindow(node) {\n var _node$ownerDocument;\n return (node == null || (_node$ownerDocument = node.ownerDocument) == null ? void 0 : _node$ownerDocument.defaultView) || window;\n}\nfunction getDocumentElement(node) {\n var _ref;\n return (_ref = (isNode(node) ? node.ownerDocument : node.document) || window.document) == null ? void 0 : _ref.documentElement;\n}\nfunction isNode(value) {\n return value instanceof Node || value instanceof getWindow(value).Node;\n}\nfunction isElement(value) {\n return value instanceof Element || value instanceof getWindow(value).Element;\n}\nfunction isHTMLElement(value) {\n return value instanceof HTMLElement || value instanceof getWindow(value).HTMLElement;\n}\nfunction isShadowRoot(value) {\n // Browsers without `ShadowRoot` support.\n if (typeof ShadowRoot === 'undefined') {\n return false;\n }\n return value instanceof ShadowRoot || value instanceof getWindow(value).ShadowRoot;\n}\nfunction isOverflowElement(element) {\n const {\n overflow,\n overflowX,\n overflowY,\n display\n } = getComputedStyle(element);\n return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && !['inline', 'contents'].includes(display);\n}\nfunction isTableElement(element) {\n return ['table', 'td', 'th'].includes(getNodeName(element));\n}\nfunction isContainingBlock(element) {\n const webkit = isWebKit();\n const css = getComputedStyle(element);\n\n // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block\n return css.transform !== 'none' || css.perspective !== 'none' || (css.containerType ? css.containerType !== 'normal' : false) || !webkit && (css.backdropFilter ? css.backdropFilter !== 'none' : false) || !webkit && (css.filter ? css.filter !== 'none' : false) || ['transform', 'perspective', 'filter'].some(value => (css.willChange || '').includes(value)) || ['paint', 'layout', 'strict', 'content'].some(value => (css.contain || '').includes(value));\n}\nfunction getContainingBlock(element) {\n let currentNode = getParentNode(element);\n while (isHTMLElement(currentNode) && !isLastTraversableNode(currentNode)) {\n if (isContainingBlock(currentNode)) {\n return currentNode;\n } else {\n currentNode = getParentNode(currentNode);\n }\n }\n return null;\n}\nfunction isWebKit() {\n if (typeof CSS === 'undefined' || !CSS.supports) return false;\n return CSS.supports('-webkit-backdrop-filter', 'none');\n}\nfunction isLastTraversableNode(node) {\n return ['html', 'body', '#document'].includes(getNodeName(node));\n}\nfunction getComputedStyle(element) {\n return getWindow(element).getComputedStyle(element);\n}\nfunction getNodeScroll(element) {\n if (isElement(element)) {\n return {\n scrollLeft: element.scrollLeft,\n scrollTop: element.scrollTop\n };\n }\n return {\n scrollLeft: element.pageXOffset,\n scrollTop: element.pageYOffset\n };\n}\nfunction getParentNode(node) {\n if (getNodeName(node) === 'html') {\n return node;\n }\n const result =\n // Step into the shadow DOM of the parent of a slotted node.\n node.assignedSlot ||\n // DOM Element detected.\n node.parentNode ||\n // ShadowRoot detected.\n isShadowRoot(node) && node.host ||\n // Fallback.\n getDocumentElement(node);\n return isShadowRoot(result) ? result.host : result;\n}\nfunction getNearestOverflowAncestor(node) {\n const parentNode = getParentNode(node);\n if (isLastTraversableNode(parentNode)) {\n return node.ownerDocument ? node.ownerDocument.body : node.body;\n }\n if (isHTMLElement(parentNode) && isOverflowElement(parentNode)) {\n return parentNode;\n }\n return getNearestOverflowAncestor(parentNode);\n}\nfunction getOverflowAncestors(node, list, traverseIframes) {\n var _node$ownerDocument2;\n if (list === void 0) {\n list = [];\n }\n if (traverseIframes === void 0) {\n traverseIframes = true;\n }\n const scrollableAncestor = getNearestOverflowAncestor(node);\n const isBody = scrollableAncestor === ((_node$ownerDocument2 = node.ownerDocument) == null ? void 0 : _node$ownerDocument2.body);\n const win = getWindow(scrollableAncestor);\n if (isBody) {\n return list.concat(win, win.visualViewport || [], isOverflowElement(scrollableAncestor) ? scrollableAncestor : [], win.frameElement && traverseIframes ? getOverflowAncestors(win.frameElement) : []);\n }\n return list.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor, [], traverseIframes));\n}\n\nexport { getComputedStyle, getContainingBlock, getDocumentElement, getNearestOverflowAncestor, getNodeName, getNodeScroll, getOverflowAncestors, getParentNode, getWindow, isContainingBlock, isElement, isHTMLElement, isLastTraversableNode, isNode, isOverflowElement, isShadowRoot, isTableElement, isWebKit };\n","import { rectToClientRect, autoPlacement as autoPlacement$1, shift as shift$1, flip as flip$1, size as size$1, hide as hide$1, arrow as arrow$1, inline as inline$1, limitShift as limitShift$1, computePosition as computePosition$1 } from '@floating-ui/core';\nexport { detectOverflow, offset } from '@floating-ui/core';\nimport { round, createCoords, max, min, floor } from '@floating-ui/utils';\nimport { getComputedStyle, isHTMLElement, isElement, getWindow, isWebKit, getDocumentElement, getNodeName, isOverflowElement, getNodeScroll, getOverflowAncestors, getParentNode, isLastTraversableNode, isContainingBlock, isTableElement, getContainingBlock } from '@floating-ui/utils/dom';\nexport { getOverflowAncestors } from '@floating-ui/utils/dom';\n\nfunction getCssDimensions(element) {\n const css = getComputedStyle(element);\n // In testing environments, the `width` and `height` properties are empty\n // strings for SVG elements, returning NaN. Fallback to `0` in this case.\n let width = parseFloat(css.width) || 0;\n let height = parseFloat(css.height) || 0;\n const hasOffset = isHTMLElement(element);\n const offsetWidth = hasOffset ? element.offsetWidth : width;\n const offsetHeight = hasOffset ? element.offsetHeight : height;\n const shouldFallback = round(width) !== offsetWidth || round(height) !== offsetHeight;\n if (shouldFallback) {\n width = offsetWidth;\n height = offsetHeight;\n }\n return {\n width,\n height,\n $: shouldFallback\n };\n}\n\nfunction unwrapElement(element) {\n return !isElement(element) ? element.contextElement : element;\n}\n\nfunction getScale(element) {\n const domElement = unwrapElement(element);\n if (!isHTMLElement(domElement)) {\n return createCoords(1);\n }\n const rect = domElement.getBoundingClientRect();\n const {\n width,\n height,\n $\n } = getCssDimensions(domElement);\n let x = ($ ? round(rect.width) : rect.width) / width;\n let y = ($ ? round(rect.height) : rect.height) / height;\n\n // 0, NaN, or Infinity should always fallback to 1.\n\n if (!x || !Number.isFinite(x)) {\n x = 1;\n }\n if (!y || !Number.isFinite(y)) {\n y = 1;\n }\n return {\n x,\n y\n };\n}\n\nconst noOffsets = /*#__PURE__*/createCoords(0);\nfunction getVisualOffsets(element) {\n const win = getWindow(element);\n if (!isWebKit() || !win.visualViewport) {\n return noOffsets;\n }\n return {\n x: win.visualViewport.offsetLeft,\n y: win.visualViewport.offsetTop\n };\n}\nfunction shouldAddVisualOffsets(element, isFixed, floatingOffsetParent) {\n if (isFixed === void 0) {\n isFixed = false;\n }\n if (!floatingOffsetParent || isFixed && floatingOffsetParent !== getWindow(element)) {\n return false;\n }\n return isFixed;\n}\n\nfunction getBoundingClientRect(element, includeScale, isFixedStrategy, offsetParent) {\n if (includeScale === void 0) {\n includeScale = false;\n }\n if (isFixedStrategy === void 0) {\n isFixedStrategy = false;\n }\n const clientRect = element.getBoundingClientRect();\n const domElement = unwrapElement(element);\n let scale = createCoords(1);\n if (includeScale) {\n if (offsetParent) {\n if (isElement(offsetParent)) {\n scale = getScale(offsetParent);\n }\n } else {\n scale = getScale(element);\n }\n }\n const visualOffsets = shouldAddVisualOffsets(domElement, isFixedStrategy, offsetParent) ? getVisualOffsets(domElement) : createCoords(0);\n let x = (clientRect.left + visualOffsets.x) / scale.x;\n let y = (clientRect.top + visualOffsets.y) / scale.y;\n let width = clientRect.width / scale.x;\n let height = clientRect.height / scale.y;\n if (domElement) {\n const win = getWindow(domElement);\n const offsetWin = offsetParent && isElement(offsetParent) ? getWindow(offsetParent) : offsetParent;\n let currentWin = win;\n let currentIFrame = currentWin.frameElement;\n while (currentIFrame && offsetParent && offsetWin !== currentWin) {\n const iframeScale = getScale(currentIFrame);\n const iframeRect = currentIFrame.getBoundingClientRect();\n const css = getComputedStyle(currentIFrame);\n const left = iframeRect.left + (currentIFrame.clientLeft + parseFloat(css.paddingLeft)) * iframeScale.x;\n const top = iframeRect.top + (currentIFrame.clientTop + parseFloat(css.paddingTop)) * iframeScale.y;\n x *= iframeScale.x;\n y *= iframeScale.y;\n width *= iframeScale.x;\n height *= iframeScale.y;\n x += left;\n y += top;\n currentWin = getWindow(currentIFrame);\n currentIFrame = currentWin.frameElement;\n }\n }\n return rectToClientRect({\n width,\n height,\n x,\n y\n });\n}\n\nconst topLayerSelectors = [':popover-open', ':modal'];\nfunction isTopLayer(floating) {\n return topLayerSelectors.some(selector => {\n try {\n return floating.matches(selector);\n } catch (e) {\n return false;\n }\n });\n}\n\nfunction convertOffsetParentRelativeRectToViewportRelativeRect(_ref) {\n let {\n elements,\n rect,\n offsetParent,\n strategy\n } = _ref;\n const isFixed = strategy === 'fixed';\n const documentElement = getDocumentElement(offsetParent);\n const topLayer = elements ? isTopLayer(elements.floating) : false;\n if (offsetParent === documentElement || topLayer && isFixed) {\n return rect;\n }\n let scroll = {\n scrollLeft: 0,\n scrollTop: 0\n };\n let scale = createCoords(1);\n const offsets = createCoords(0);\n const isOffsetParentAnElement = isHTMLElement(offsetParent);\n if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {\n if (getNodeName(offsetParent) !== 'body' || isOverflowElement(documentElement)) {\n scroll = getNodeScroll(offsetParent);\n }\n if (isHTMLElement(offsetParent)) {\n const offsetRect = getBoundingClientRect(offsetParent);\n scale = getScale(offsetParent);\n offsets.x = offsetRect.x + offsetParent.clientLeft;\n offsets.y = offsetRect.y + offsetParent.clientTop;\n }\n }\n return {\n width: rect.width * scale.x,\n height: rect.height * scale.y,\n x: rect.x * scale.x - scroll.scrollLeft * scale.x + offsets.x,\n y: rect.y * scale.y - scroll.scrollTop * scale.y + offsets.y\n };\n}\n\nfunction getClientRects(element) {\n return Array.from(element.getClientRects());\n}\n\nfunction getWindowScrollBarX(element) {\n // If has a CSS width greater than the viewport, then this will be\n // incorrect for RTL.\n return getBoundingClientRect(getDocumentElement(element)).left + getNodeScroll(element).scrollLeft;\n}\n\n// Gets the entire size of the scrollable document area, even extending outside\n// of the `` and `` rect bounds if horizontally scrollable.\nfunction getDocumentRect(element) {\n const html = getDocumentElement(element);\n const scroll = getNodeScroll(element);\n const body = element.ownerDocument.body;\n const width = max(html.scrollWidth, html.clientWidth, body.scrollWidth, body.clientWidth);\n const height = max(html.scrollHeight, html.clientHeight, body.scrollHeight, body.clientHeight);\n let x = -scroll.scrollLeft + getWindowScrollBarX(element);\n const y = -scroll.scrollTop;\n if (getComputedStyle(body).direction === 'rtl') {\n x += max(html.clientWidth, body.clientWidth) - width;\n }\n return {\n width,\n height,\n x,\n y\n };\n}\n\nfunction getViewportRect(element, strategy) {\n const win = getWindow(element);\n const html = getDocumentElement(element);\n const visualViewport = win.visualViewport;\n let width = html.clientWidth;\n let height = html.clientHeight;\n let x = 0;\n let y = 0;\n if (visualViewport) {\n width = visualViewport.width;\n height = visualViewport.height;\n const visualViewportBased = isWebKit();\n if (!visualViewportBased || visualViewportBased && strategy === 'fixed') {\n x = visualViewport.offsetLeft;\n y = visualViewport.offsetTop;\n }\n }\n return {\n width,\n height,\n x,\n y\n };\n}\n\n// Returns the inner client rect, subtracting scrollbars if present.\nfunction getInnerBoundingClientRect(element, strategy) {\n const clientRect = getBoundingClientRect(element, true, strategy === 'fixed');\n const top = clientRect.top + element.clientTop;\n const left = clientRect.left + element.clientLeft;\n const scale = isHTMLElement(element) ? getScale(element) : createCoords(1);\n const width = element.clientWidth * scale.x;\n const height = element.clientHeight * scale.y;\n const x = left * scale.x;\n const y = top * scale.y;\n return {\n width,\n height,\n x,\n y\n };\n}\nfunction getClientRectFromClippingAncestor(element, clippingAncestor, strategy) {\n let rect;\n if (clippingAncestor === 'viewport') {\n rect = getViewportRect(element, strategy);\n } else if (clippingAncestor === 'document') {\n rect = getDocumentRect(getDocumentElement(element));\n } else if (isElement(clippingAncestor)) {\n rect = getInnerBoundingClientRect(clippingAncestor, strategy);\n } else {\n const visualOffsets = getVisualOffsets(element);\n rect = {\n ...clippingAncestor,\n x: clippingAncestor.x - visualOffsets.x,\n y: clippingAncestor.y - visualOffsets.y\n };\n }\n return rectToClientRect(rect);\n}\nfunction hasFixedPositionAncestor(element, stopNode) {\n const parentNode = getParentNode(element);\n if (parentNode === stopNode || !isElement(parentNode) || isLastTraversableNode(parentNode)) {\n return false;\n }\n return getComputedStyle(parentNode).position === 'fixed' || hasFixedPositionAncestor(parentNode, stopNode);\n}\n\n// A \"clipping ancestor\" is an `overflow` element with the characteristic of\n// clipping (or hiding) child elements. This returns all clipping ancestors\n// of the given element up the tree.\nfunction getClippingElementAncestors(element, cache) {\n const cachedResult = cache.get(element);\n if (cachedResult) {\n return cachedResult;\n }\n let result = getOverflowAncestors(element, [], false).filter(el => isElement(el) && getNodeName(el) !== 'body');\n let currentContainingBlockComputedStyle = null;\n const elementIsFixed = getComputedStyle(element).position === 'fixed';\n let currentNode = elementIsFixed ? getParentNode(element) : element;\n\n // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block\n while (isElement(currentNode) && !isLastTraversableNode(currentNode)) {\n const computedStyle = getComputedStyle(currentNode);\n const currentNodeIsContaining = isContainingBlock(currentNode);\n if (!currentNodeIsContaining && computedStyle.position === 'fixed') {\n currentContainingBlockComputedStyle = null;\n }\n const shouldDropCurrentNode = elementIsFixed ? !currentNodeIsContaining && !currentContainingBlockComputedStyle : !currentNodeIsContaining && computedStyle.position === 'static' && !!currentContainingBlockComputedStyle && ['absolute', 'fixed'].includes(currentContainingBlockComputedStyle.position) || isOverflowElement(currentNode) && !currentNodeIsContaining && hasFixedPositionAncestor(element, currentNode);\n if (shouldDropCurrentNode) {\n // Drop non-containing blocks.\n result = result.filter(ancestor => ancestor !== currentNode);\n } else {\n // Record last containing block for next iteration.\n currentContainingBlockComputedStyle = computedStyle;\n }\n currentNode = getParentNode(currentNode);\n }\n cache.set(element, result);\n return result;\n}\n\n// Gets the maximum area that the element is visible in due to any number of\n// clipping ancestors.\nfunction getClippingRect(_ref) {\n let {\n element,\n boundary,\n rootBoundary,\n strategy\n } = _ref;\n const elementClippingAncestors = boundary === 'clippingAncestors' ? getClippingElementAncestors(element, this._c) : [].concat(boundary);\n const clippingAncestors = [...elementClippingAncestors, rootBoundary];\n const firstClippingAncestor = clippingAncestors[0];\n const clippingRect = clippingAncestors.reduce((accRect, clippingAncestor) => {\n const rect = getClientRectFromClippingAncestor(element, clippingAncestor, strategy);\n accRect.top = max(rect.top, accRect.top);\n accRect.right = min(rect.right, accRect.right);\n accRect.bottom = min(rect.bottom, accRect.bottom);\n accRect.left = max(rect.left, accRect.left);\n return accRect;\n }, getClientRectFromClippingAncestor(element, firstClippingAncestor, strategy));\n return {\n width: clippingRect.right - clippingRect.left,\n height: clippingRect.bottom - clippingRect.top,\n x: clippingRect.left,\n y: clippingRect.top\n };\n}\n\nfunction getDimensions(element) {\n const {\n width,\n height\n } = getCssDimensions(element);\n return {\n width,\n height\n };\n}\n\nfunction getRectRelativeToOffsetParent(element, offsetParent, strategy) {\n const isOffsetParentAnElement = isHTMLElement(offsetParent);\n const documentElement = getDocumentElement(offsetParent);\n const isFixed = strategy === 'fixed';\n const rect = getBoundingClientRect(element, true, isFixed, offsetParent);\n let scroll = {\n scrollLeft: 0,\n scrollTop: 0\n };\n const offsets = createCoords(0);\n if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {\n if (getNodeName(offsetParent) !== 'body' || isOverflowElement(documentElement)) {\n scroll = getNodeScroll(offsetParent);\n }\n if (isOffsetParentAnElement) {\n const offsetRect = getBoundingClientRect(offsetParent, true, isFixed, offsetParent);\n offsets.x = offsetRect.x + offsetParent.clientLeft;\n offsets.y = offsetRect.y + offsetParent.clientTop;\n } else if (documentElement) {\n offsets.x = getWindowScrollBarX(documentElement);\n }\n }\n const x = rect.left + scroll.scrollLeft - offsets.x;\n const y = rect.top + scroll.scrollTop - offsets.y;\n return {\n x,\n y,\n width: rect.width,\n height: rect.height\n };\n}\n\nfunction getTrueOffsetParent(element, polyfill) {\n if (!isHTMLElement(element) || getComputedStyle(element).position === 'fixed') {\n return null;\n }\n if (polyfill) {\n return polyfill(element);\n }\n return element.offsetParent;\n}\n\n// Gets the closest ancestor positioned element. Handles some edge cases,\n// such as table ancestors and cross browser bugs.\nfunction getOffsetParent(element, polyfill) {\n const window = getWindow(element);\n if (!isHTMLElement(element) || isTopLayer(element)) {\n return window;\n }\n let offsetParent = getTrueOffsetParent(element, polyfill);\n while (offsetParent && isTableElement(offsetParent) && getComputedStyle(offsetParent).position === 'static') {\n offsetParent = getTrueOffsetParent(offsetParent, polyfill);\n }\n if (offsetParent && (getNodeName(offsetParent) === 'html' || getNodeName(offsetParent) === 'body' && getComputedStyle(offsetParent).position === 'static' && !isContainingBlock(offsetParent))) {\n return window;\n }\n return offsetParent || getContainingBlock(element) || window;\n}\n\nconst getElementRects = async function (data) {\n const getOffsetParentFn = this.getOffsetParent || getOffsetParent;\n const getDimensionsFn = this.getDimensions;\n return {\n reference: getRectRelativeToOffsetParent(data.reference, await getOffsetParentFn(data.floating), data.strategy),\n floating: {\n x: 0,\n y: 0,\n ...(await getDimensionsFn(data.floating))\n }\n };\n};\n\nfunction isRTL(element) {\n return getComputedStyle(element).direction === 'rtl';\n}\n\nconst platform = {\n convertOffsetParentRelativeRectToViewportRelativeRect,\n getDocumentElement,\n getClippingRect,\n getOffsetParent,\n getElementRects,\n getClientRects,\n getDimensions,\n getScale,\n isElement,\n isRTL\n};\n\n// https://samthor.au/2021/observing-dom/\nfunction observeMove(element, onMove) {\n let io = null;\n let timeoutId;\n const root = getDocumentElement(element);\n function cleanup() {\n var _io;\n clearTimeout(timeoutId);\n (_io = io) == null || _io.disconnect();\n io = null;\n }\n function refresh(skip, threshold) {\n if (skip === void 0) {\n skip = false;\n }\n if (threshold === void 0) {\n threshold = 1;\n }\n cleanup();\n const {\n left,\n top,\n width,\n height\n } = element.getBoundingClientRect();\n if (!skip) {\n onMove();\n }\n if (!width || !height) {\n return;\n }\n const insetTop = floor(top);\n const insetRight = floor(root.clientWidth - (left + width));\n const insetBottom = floor(root.clientHeight - (top + height));\n const insetLeft = floor(left);\n const rootMargin = -insetTop + \"px \" + -insetRight + \"px \" + -insetBottom + \"px \" + -insetLeft + \"px\";\n const options = {\n rootMargin,\n threshold: max(0, min(1, threshold)) || 1\n };\n let isFirstUpdate = true;\n function handleObserve(entries) {\n const ratio = entries[0].intersectionRatio;\n if (ratio !== threshold) {\n if (!isFirstUpdate) {\n return refresh();\n }\n if (!ratio) {\n timeoutId = setTimeout(() => {\n refresh(false, 1e-7);\n }, 100);\n } else {\n refresh(false, ratio);\n }\n }\n isFirstUpdate = false;\n }\n\n // Older browsers don't support a `document` as the root and will throw an\n // error.\n try {\n io = new IntersectionObserver(handleObserve, {\n ...options,\n // Handle