@getspot/spot-widget 4.4.2 → 4.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -0
- package/dist/index.es.js +11 -15
- package/dist/index.umd.js +3 -7
- package/dist/ui.d.ts.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
# [4.5.0](https://gitlab.com/getspot/spot-widget/compare/@getspot/spot-widget@4.4.2...@getspot/spot-widget@4.5.0) (2026-08-05)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* **core:** improve "Powered by Spot" logo fit and placement [ST-5035] ([cc064eb](https://gitlab.com/getspot/spot-widget/commit/cc064ebc26439b029560bc942bae315e42ca3913))
|
|
7
|
+
|
|
1
8
|
## [4.4.2](https://gitlab.com/getspot/spot-widget/compare/@getspot/spot-widget@4.4.1...@getspot/spot-widget@4.4.2) (2026-08-05)
|
|
2
9
|
|
|
3
10
|
|
package/dist/index.es.js
CHANGED
|
@@ -540,7 +540,7 @@ function j(d, t) {
|
|
|
540
540
|
parent: r
|
|
541
541
|
}), s;
|
|
542
542
|
}
|
|
543
|
-
function
|
|
543
|
+
function W(d, t, r, s = !1) {
|
|
544
544
|
const i = n("div", {
|
|
545
545
|
className: `spot-selection__options${s ? " spot-selection__options--disabled" : ""}`,
|
|
546
546
|
parent: d
|
|
@@ -562,7 +562,7 @@ function F(d, t, r, s = !1) {
|
|
|
562
562
|
}), p = n("input", { parent: o });
|
|
563
563
|
return p.type = "radio", p.name = "selection", p.value = _.NO, t === _.NO && (p.checked = !0), s && (p.disabled = !0), n("span", { text: r.noOptionText, parent: o }), i;
|
|
564
564
|
}
|
|
565
|
-
function
|
|
565
|
+
function R(d, t) {
|
|
566
566
|
var s;
|
|
567
567
|
const r = (s = t.communication) == null ? void 0 : s.paymentTerms;
|
|
568
568
|
if (r) {
|
|
@@ -581,7 +581,7 @@ function H(d, t) {
|
|
|
581
581
|
}), i;
|
|
582
582
|
}
|
|
583
583
|
}
|
|
584
|
-
function
|
|
584
|
+
function F(d, t, r = "top-right") {
|
|
585
585
|
if (r === "top-right") {
|
|
586
586
|
const o = n("div", {
|
|
587
587
|
className: "spot-logo__top-right",
|
|
@@ -589,11 +589,7 @@ function W(d, t, r = "bottom-right") {
|
|
|
589
589
|
});
|
|
590
590
|
o.innerHTML = `
|
|
591
591
|
<svg width="145" height="28" viewBox="0 0 145 28" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
592
|
-
<rect width="145" height="28"/>
|
|
593
|
-
<rect x="-655" y="-270" width="819" height="325" rx="10"/>
|
|
594
|
-
<path d="M0 10C0 4.47715 4.47715 0 10 0H134.161C139.684 0 144.161 4.47715 144.161 10V18C144.161 23.5228 139.684 28 134.161 28H10C4.47716 28 0 23.5228 0 18V10Z" fill="#F3FD00"/>
|
|
595
592
|
<path d="M11.98 19V9.2H14.878C16.754 9.2 18.154 10.474 18.154 12.364C18.154 14.254 16.754 15.528 14.878 15.528H13.828V19H11.98ZM13.828 13.806H14.878C15.746 13.806 16.236 13.176 16.236 12.364C16.236 11.552 15.746 10.936 14.878 10.936H13.828V13.806ZM22.0258 19.196C20.0938 19.196 18.2178 17.894 18.2178 15.43C18.2178 12.952 20.0938 11.65 22.0258 11.65C23.9438 11.65 25.8198 12.952 25.8198 15.43C25.8198 17.894 23.9438 19.196 22.0258 19.196ZM20.0518 15.43C20.0518 16.774 20.8778 17.544 22.0258 17.544C23.1598 17.544 23.9858 16.774 23.9858 15.43C23.9858 14.072 23.1598 13.302 22.0258 13.302C20.8778 13.302 20.0518 14.072 20.0518 15.43ZM27.7226 19L25.2446 11.846H27.0926L28.7026 16.732L29.9486 11.846H31.7266L33.0146 16.746L34.5966 11.846H36.4026L33.9946 19H32.1186L30.8446 14.198L29.6266 19H27.7226ZM39.531 19.196C37.683 19.196 35.849 17.894 35.849 15.43C35.849 12.952 37.641 11.65 39.461 11.65C41.253 11.65 43.073 12.924 43.073 15.416V15.962H37.599C37.795 17.096 38.607 17.614 39.531 17.614C40.161 17.614 40.609 17.418 40.889 17.054H42.933C42.317 18.496 40.889 19.196 39.531 19.196ZM37.627 14.702H41.211C41.043 13.526 40.217 13.092 39.461 13.092C38.607 13.092 37.851 13.624 37.627 14.702ZM44.0159 19V11.846H45.7799V12.798C46.3539 12.028 47.2219 11.65 48.0759 11.65V13.47C46.5919 13.19 45.7799 13.834 45.7799 15.024V19H44.0159ZM51.967 19.196C50.119 19.196 48.285 17.894 48.285 15.43C48.285 12.952 50.077 11.65 51.897 11.65C53.689 11.65 55.509 12.924 55.509 15.416V15.962H50.035C50.231 17.096 51.043 17.614 51.967 17.614C52.597 17.614 53.045 17.418 53.325 17.054H55.369C54.753 18.496 53.325 19.196 51.967 19.196ZM50.063 14.702H53.647C53.479 13.526 52.653 13.092 51.897 13.092C51.043 13.092 50.287 13.624 50.063 14.702ZM59.4762 19.196C57.7542 19.196 56.1022 17.894 56.1022 15.43C56.1022 12.952 57.7542 11.65 59.4762 11.65C60.4842 11.65 61.3102 12.014 61.8562 12.714V9.2H63.6202V19H61.8562V18.146C61.3102 18.832 60.4842 19.196 59.4762 19.196ZM57.9362 15.43C57.9362 16.774 58.7622 17.544 59.8962 17.544C61.0442 17.544 61.8562 16.774 61.8562 15.43C61.8562 14.072 61.0442 13.302 59.8962 13.302C58.7622 13.302 57.9362 14.072 57.9362 15.43ZM72.526 19.196C71.518 19.196 70.692 18.832 70.146 18.146V19H68.382V9.2H70.146V12.714C70.692 12.014 71.518 11.65 72.526 11.65C74.248 11.65 75.9 12.952 75.9 15.43C75.9 17.894 74.248 19.196 72.526 19.196ZM70.146 15.43C70.146 16.774 70.958 17.544 72.106 17.544C73.254 17.544 74.066 16.774 74.066 15.43C74.066 14.072 73.254 13.302 72.106 13.302C70.958 13.302 70.146 14.072 70.146 15.43ZM76.9259 21.66L78.2699 18.342L75.4559 11.846H77.3879L79.2079 16.158L80.9299 11.846H82.7639L78.7599 21.66H76.9259Z" fill="#111820"/>
|
|
596
|
-
<path d="M87 15.5385C87 11.3751 90.3751 8 94.5385 8H124.867C129.03 8 132.405 11.3751 132.405 15.5385C132.405 19.7018 129.03 23.0769 124.867 23.0769H94.5385C90.3751 23.0769 87 19.7018 87 15.5385Z" fill="#F3FD00"/>
|
|
597
593
|
<g clip-path="url(#clip0_295_2094)">
|
|
598
594
|
<path d="M117.826 19.7575C116.253 19.7575 115.064 18.7369 115.064 17.2054V13.1218H113.674V11.2615H115.064V9.21918H117.172V11.2615H119.164V13.1218H117.172V17.2054C117.172 17.6501 117.373 17.8972 117.825 17.8972H119.164V19.7586H117.825M113.846 15.5591C113.846 18.4577 111.603 19.9892 109.309 19.9892C107.016 19.9892 104.757 18.4577 104.757 15.5591C104.757 12.6606 107 11.1126 109.309 11.1126C111.619 11.1126 113.846 12.6441 113.846 15.5591ZM111.653 15.5591C111.653 13.9615 110.665 13.0556 109.31 13.0556C107.956 13.0556 106.951 13.9615 106.951 15.5591C106.951 17.1568 107.939 18.0461 109.31 18.0461C110.682 18.0461 111.653 17.1403 111.653 15.5591ZM104.339 15.5591C104.339 18.4577 102.364 19.9892 100.305 19.9892C99.0996 19.9892 98.1127 19.561 97.46 18.7545V22.8877H95.3516V11.2605H97.46V12.3638C98.1127 11.5407 99.1006 11.1126 100.305 11.1126C102.364 11.1126 104.339 12.6441 104.339 15.5591ZM102.147 15.5591C102.147 13.9615 101.175 13.0556 99.8038 13.0556C98.4322 13.0556 97.461 13.9615 97.461 15.5591C97.461 17.1568 98.4322 18.0461 99.8038 18.0461C101.175 18.0461 102.147 17.1403 102.147 15.5591ZM91.0833 19.9892C93.0078 19.9892 94.8155 18.5404 94.8155 16.465C94.8155 12.0184 89.5099 13.6823 89.5099 11.3101C89.5099 10.6183 90.0123 10.1075 90.8153 10.1075C91.6183 10.1075 92.1039 10.5025 92.3214 11.2605H94.681C94.2637 9.05373 92.7744 8 90.8163 8C88.9749 8 87.2176 9.28433 87.2176 11.3597C87.2176 15.7732 92.5232 14.0773 92.5232 16.5146C92.5232 17.2395 91.9872 17.8817 91.0833 17.8817C90.1794 17.8817 89.5603 17.3874 89.3596 16.5643H87C87.3847 18.7379 88.8908 19.9892 91.0843 19.9892M126.313 19.9892C129.678 19.9892 132.406 17.3057 132.406 13.9946C132.406 10.6834 129.678 8 126.312 8C122.947 8 120.219 10.6834 120.219 13.9946C120.219 17.3057 122.947 19.9892 126.312 19.9892" fill="#111820"/>
|
|
599
595
|
</g>
|
|
@@ -641,13 +637,13 @@ function W(d, t, r = "bottom-right") {
|
|
|
641
637
|
}
|
|
642
638
|
return s;
|
|
643
639
|
}
|
|
644
|
-
const Y = ":root{--spot-font-family: Arial;--spot-padding: 1.25rem;--spot-background-color: #ffffff;--spot-font-color: #000000;--spot-border-radius: .5rem;--spot-border-line-width: .0625rem;--spot-border-color: #e0e0e0;--spot-max-width: 51rem;--spot-margin: 1rem;--spot-title-font-size: 1.25rem;--spot-title-font-weight: 700;--spot-title-padding: 0 0 1.25rem 0;--spot-description-font-size: .875rem;--spot-description-font-weight: 400;--spot-description-padding: 0 0 .5rem 0;--spot-bullets-font-size: .875rem;--spot-bullets-font-weight: 400;--spot-bullets-padding: .3125rem;--spot-bullets-checkmark-color: #2e2e2e;--spot-table-border-radius: .625rem;--spot-table-header-font-size: .875rem;--spot-table-header-font-weight: 700;--spot-table-header-padding: 0 .5rem .625rem;--spot-table-cell-font-size: .815rem;--spot-table-cell-font-weight: 400;--spot-table-cell-padding: 0 .625rem;--spot-radio-border: #000000;--spot-radio-border-radius: .625rem;--spot-radio-checked-background: #000000;--spot-radio-text-font-size: .875rem;--spot-radio-text-font-weight: 400;--spot-radio-text-padding: .625rem;--spot-radio-selection-background: #f4f4f4;--spot-radio-selection-border-radius: .625rem;--spot-radio-selection-padding: .625rem;--spot-recommended-tag-background: #000000;--spot-recommended-tag-font-color: #ffffff;--spot-recommended-tag-font-size: .875rem;--spot-recommended-tag-font-weight: 700;--spot-recommended-tag-padding: .25rem .5rem;--spot-recommended-tag-border-radius: .5rem;--spot-state-dropdown-label-font-size: .875rem;--spot-state-dropdown-label-font-weight: 600;--spot-state-dropdown-label-margin-bottom: .25rem;--spot-state-dropdown-select-border: .0625rem solid #e0e0e0;--spot-state-dropdown-select-border-radius: .375rem;--spot-state-dropdown-select-padding: .5rem .75rem;--spot-state-dropdown-select-font-size: .875rem;--spot-state-dropdown-select-background: #ffffff;--spot-state-dropdown-wrapper-margin-bottom: .75rem;--spot-state-dropdown-error-color: var(--spot-selection-error-font-color);--spot-state-dropdown-error-font-size: .8125rem;--spot-state-dropdown-error-margin-top: .25rem;--spot-selection-error-font-color: #ff0000;--spot-selection-error-font-size: .875rem;--spot-qualifying-reasons-margin: .75rem 0;--spot-qualifying-reasons-padding: 0 .3125rem;--spot-qualifying-reasons-column-gap: 3rem;--spot-qualifying-reasons-row-gap: .25rem;--spot-qualifying-reasons-grid-padding-left: 1rem;--spot-qualifying-reasons-icon-wrapper-size: 1.125rem;--spot-qualifying-reasons-icon-size: .75rem;--spot-qualifying-reasons-icon-border-color: #2e2e2e;--spot-qualifying-reasons-icon-border-width: 1px;--spot-qualifying-reasons-icon-background: #ffffff;--spot-qualifying-reasons-item-gap: .625rem;--spot-qualifying-reasons-label-font-size: .8rem;--spot-qualifying-reasons-label-font-weight: 400;--spot-qualifying-reasons-label-font-color: #000000;--spot-qualifying-reasons-label-font-family: Arial;--spot-selection-error-padding: .5rem;--spot-payment-terms-background: #f4f4f4;--spot-payment-terms-border-radius: .625rem;--spot-payment-terms-padding: 1rem;--spot-payment-terms-font-color: #636569;--spot-payment-terms-font-size: .75rem;--spot-payment-terms-header-font-weight: 700;--spot-payment-terms-header-font-size: .875rem;--spot-payment-terms-header-margin-bottom: .5rem;--spot-payment-terms-header-border-color: #c2c2c2;--spot-payment-terms-header-padding: 0 0 .5rem 0;--spot-terms-font-size: .75rem;--spot-terms-font-weight: 400;--spot-terms-font-color: #636569;--spot-terms-padding: 0;--spot-terms-link-text-decoration: underline;--spot-terms-link-font-size: .75rem;--spot-terms-link-font-weight: 400;--spot-terms-link-font-color: #636569;--spot-terms-link-padding: 0;--spot-covered-items-background: #f1f3f5;--spot-covered-items-hover-background: #e9ecef;--spot-covered-items-border-radius: .5rem;--spot-covered-items-padding: .75rem 1rem;--spot-covered-items-font-size: .875rem;--spot-covered-items-font-weight: 400;--spot-covered-items-font-color: #000000;--spot-covered-items-font-family: Arial;--spot-covered-items-arrow-font-size: .6rem;--spot-covered-items-arrow-color: #636569;--spot-covered-items-view-all-color: #636569;--spot-covered-items-view-all-font-size: .875rem;--spot-covered-items-view-all-font-weight: 400;--spot-covered-items-content-background: #f8f9fa;--spot-covered-items-content-border: 1px solid #e0e0e0;--spot-covered-items-content-border-radius: .5rem;--spot-covered-items-content-padding: .75rem 1rem;--spot-desktop-radio-margin-top: -1.5rem;--spot-benefits-margin-bottom: 0rem;--spot-covered-items-margin-bottom: 1.5rem;--spot-footer-gap: 1rem;--spot-footer-terms-margin-right: 7rem;--spot-payment-terms-margin-top: .5rem;--spot-logo-top-right-margin: 1rem}.spot-refund-guarantee{font-family:var(--spot-font-family);padding:var(--spot-padding);background-color:var(--spot-background-color);color:var(--spot-font-color);border:var(--spot-border-line-width) solid var(--spot-border-color);border-radius:var(--spot-border-radius);max-width:var(--spot-max-width);margin:var(--spot-margin);container-type:inline-size;position:relative;word-wrap:normal;overflow-wrap:normal;-webkit-hyphens:none;hyphens:none}.spot-refund-guarantee *{color:inherit}.spot-header__title{font-size:var(--spot-title-font-size);font-weight:var(--spot-title-font-weight);padding:var(--spot-title-padding);color:var(--spot-title-font-color);font-family:var(--spot-title-font-family);line-height:120%;letter-spacing:-.03125rem}.spot-header__description{font-size:var(--spot-description-font-size);font-weight:var(--spot-description-font-weight);color:var(--spot-description-font-color);font-family:var(--spot-description-font-family);padding:var(--spot-description-padding);line-height:125%;letter-spacing:-.025rem}.spot-content__wrapper{display:flex;flex-direction:column}.spot-content__wrapper.desktop-layout{display:grid;grid-template-columns:1fr auto;align-items:start;gap:1rem}.desktop-layout .spot-benefits__list,.desktop-layout .spot-qualifying-reasons__container,.desktop-layout .spot-covered-items__container,.desktop-layout .spot-selection__wrapper{min-width:0;word-wrap:normal}.desktop-layout .spot-benefits__list,.desktop-layout .spot-qualifying-reasons__container{grid-row:1;margin-bottom:var(--spot-benefits-margin-bottom)}.desktop-layout .spot-covered-items__container{grid-row:2;grid-column:1;margin-bottom:var(--spot-covered-items-margin-bottom)}.desktop-layout .spot-selection__wrapper{grid-row:3;grid-column:1;margin-top:var(--spot-desktop-radio-margin-top)}.desktop-layout .spot-payment-terms__wrapper{grid-row:4;grid-column:1;margin-top:var(--spot-payment-terms-margin-top)}.desktop-layout .spot-table__container{grid-row:1 / span 4;grid-column:2;width:auto;min-width:20.3125rem}.spot-content__wrapper:not(.desktop-layout) .spot-table__container{display:flex;justify-content:flex-start;margin-top:1rem;margin-bottom:1rem;box-sizing:border-box;padding:0 .3125rem}.spot-content__wrapper:not(.desktop-layout) .spot-refund__table{width:100%;max-width:22rem;table-layout:auto}@media (max-width: 850px){.spot-selection__recommended-tag{display:inline-block;margin-left:0}}@media (max-width: 500px){.spot-selection__recommended-tag{margin-top:.5rem}}@media (max-width: 600px){.spot-refund__table th{padding:0rem}}.spot-benefits__list{list-style-type:none;line-height:125%;gap:.5625rem;font-size:var(--spot-bullets-font-size);font-weight:var(--spot-bullets-font-weight);color:var(--spot-bullets-font-color);font-family:var(--spot-bullets-font-family);padding:var(--spot-bullets-padding);margin-block-start:0rem;margin-block-end:0rem}.spot-benefits__list li{margin-bottom:.375rem;display:flex;align-items:flex-start;gap:.5rem}.spot-benefits__list li svg{flex-shrink:0;position:relative;top:.125rem}.spot-bullets__checkmark path{stroke:var(--spot-bullets-checkmark-color)}.spot-qualifying-reasons__container{margin:var(--spot-qualifying-reasons-margin);padding:var(--spot-qualifying-reasons-padding)}.spot-qualifying-reasons__grid{display:grid;grid-template-columns:repeat(2,minmax(0,max-content));column-gap:var(--spot-qualifying-reasons-column-gap);row-gap:var(--spot-qualifying-reasons-row-gap);max-width:100%;padding-left:var(--spot-qualifying-reasons-grid-padding-left)}.spot-qualifying-reasons__item{display:flex;align-items:center;gap:var(--spot-qualifying-reasons-item-gap)}.spot-qualifying-reasons__icon-wrapper{width:var(--spot-qualifying-reasons-icon-wrapper-size);height:var(--spot-qualifying-reasons-icon-wrapper-size);border-radius:50%;border:var(--spot-qualifying-reasons-icon-border-width) solid var(--spot-qualifying-reasons-icon-border-color);background-color:var(--spot-qualifying-reasons-icon-background);display:flex;align-items:center;justify-content:center;flex-shrink:0}.spot-qualifying-reasons__icon{width:var(--spot-qualifying-reasons-icon-size);height:var(--spot-qualifying-reasons-icon-size)}.spot-qualifying-reasons__label{font-size:var(--spot-qualifying-reasons-label-font-size);font-weight:var(--spot-qualifying-reasons-label-font-weight);color:var(--spot-qualifying-reasons-label-font-color);font-family:var(--spot-qualifying-reasons-label-font-family);line-height:1.2}@media (max-width: 480px){.spot-qualifying-reasons__grid{grid-template-columns:1fr}}.spot-covered-items__container{margin-top:.85rem;margin-bottom:.5rem;max-width:26rem}.spot-content__wrapper.desktop-layout:has(.spot-table__container) .spot-covered-items__container{margin-top:0rem;margin-bottom:1rem}.spot-covered-items__title{font-size:var(--spot-covered-items-font-size);font-weight:var(--spot-covered-items-font-weight);color:var(--spot-covered-items-font-color);font-family:var(--spot-covered-items-font-family);padding:0 .3125rem .25rem;line-height:125%;margin:0}.spot-covered-items__list{list-style-type:disc;list-style-position:inside;line-height:125%;gap:.5625rem;font-size:var(--spot-bullets-font-size);font-weight:var(--spot-bullets-font-weight);color:var(--spot-bullets-font-color);font-family:var(--spot-bullets-font-family);padding:var(--spot-bullets-padding);margin-block-start:0rem;margin-block-end:0rem}.spot-covered-items__list li{margin-bottom:.3rem;text-align:left}.spot-covered-items__list li:last-child{margin-bottom:0}.spot-covered-items__header{margin-bottom:.5rem}.spot-covered-items__toggle{background:var(--spot-covered-items-background);border:none;border-radius:var(--spot-covered-items-border-radius);padding:var(--spot-covered-items-padding);cursor:pointer;display:flex;align-items:center;justify-content:space-between;width:100%;font-size:var(--spot-covered-items-font-size);font-weight:var(--spot-covered-items-font-weight);color:var(--spot-covered-items-font-color);font-family:var(--spot-covered-items-font-family);line-height:125%;transition:all .2s ease}.spot-covered-items__toggle:hover{background-color:var(--spot-covered-items-hover-background)}.spot-covered-items__toggle:focus{outline:none;box-shadow:0 0 0 2px #0000001a}.spot-covered-items__title{font-size:var(--spot-covered-items-font-size);font-weight:var(--spot-covered-items-font-weight);color:var(--spot-covered-items-font-color);font-family:var(--spot-covered-items-font-family);line-height:125%;margin:0;padding:0}.spot-covered-items__right-section{display:flex;align-items:center;gap:.5rem;margin-left:auto}.spot-covered-items__view-all{font-size:var(--spot-covered-items-view-all-font-size);font-weight:var(--spot-covered-items-view-all-font-weight);color:var(--spot-covered-items-view-all-color);font-family:var(--spot-covered-items-font-family);line-height:125%}.spot-covered-items__arrow{font-size:var(--spot-covered-items-arrow-font-size);transition:transform .2s ease;color:var(--spot-covered-items-arrow-color);flex-shrink:0;transform:scaleX(1.5)}.spot-covered-items__content{margin-top:.5rem;transition:all .2s ease;overflow:hidden}.spot-covered-items__list{background-color:var(--spot-covered-items-content-background);border:var(--spot-covered-items-content-border);border-radius:var(--spot-covered-items-content-border-radius);margin:0;padding:var(--spot-covered-items-content-padding)}.spot-table__container{width:100%}.spot-refund__table{max-width:22rem;border-radius:var(--spot-table-border-radius);overflow:hidden;border:.09375rem solid #636569;table-layout:fixed;margin-bottom:.5rem;margin-top:.25rem;padding:.625rem}.spot-refund__table--dynamic{height:auto!important;min-height:7.5rem}.spot-refund__table td,.spot-refund__table th{padding:.375rem .625rem;text-align:left}.spot-refund__table th{text-align:left;font-size:var(--spot-table-header-font-size);font-weight:var(--spot-table-header-font-weight);color:var(--spot-table-header-font-color);font-family:var(--spot-table-header-font-family);padding:var(--spot-table-header-padding)}.spot-refund__table td{text-align:left;font-size:var(--spot-table-cell-font-size);font-weight:var(--spot-table-cell-font-weight);color:var(--spot-table-cell-font-color);font-family:var(--spot-table-cell-font-family);padding:var(--spot-table-cell-padding)}.spot-state-dropdown__wrapper{display:flex;flex-direction:column;margin-bottom:var(--spot-state-dropdown-wrapper-margin-bottom)}.spot-state-dropdown__label{font-size:var(--spot-state-dropdown-label-font-size);font-weight:var(--spot-state-dropdown-label-font-weight);font-family:var(--spot-font-family);color:var(--spot-font-color);margin-bottom:var(--spot-state-dropdown-label-margin-bottom)}.spot-state-dropdown__select{width:100%;box-sizing:border-box;border:var(--spot-state-dropdown-select-border);border-radius:var(--spot-state-dropdown-select-border-radius);padding:var(--spot-state-dropdown-select-padding);font-size:var(--spot-state-dropdown-select-font-size);font-family:var(--spot-font-family);color:var(--spot-font-color);background-color:var(--spot-state-dropdown-select-background);cursor:pointer;-webkit-appearance:auto;-moz-appearance:auto;appearance:auto}.spot-state-dropdown__select:focus{outline:none;box-shadow:0 0 0 2px #00000026}.spot-state-dropdown__select--error{border-color:var(--spot-state-dropdown-error-color)}.spot-state-dropdown__select--error:focus{box-shadow:0 0 0 2px #ff000026}.spot-state-dropdown__error{display:none;color:var(--spot-state-dropdown-error-color);font-size:var(--spot-state-dropdown-error-font-size);font-family:var(--spot-font-family);margin-top:var(--spot-state-dropdown-error-margin-top)}.spot-state-dropdown__error--visible{display:block}input[type=radio]{-webkit-appearance:none;-moz-appearance:none;appearance:none;width:.75rem;height:.75rem;min-width:.75rem;border:.0625rem solid var(--spot-radio-border);border-radius:var(--spot-radio-border-radius);margin-right:.5rem;position:relative;vertical-align:middle;top:-.0625rem;cursor:pointer;flex-shrink:0}input[type=radio]:checked{background:var(--spot-radio-checked-background);box-shadow:inset 0 0 0 .0625rem #fff}.spot-selection__options{display:flex;flex-direction:column;gap:.5rem}.spot-selection__option{display:flex;align-items:center;flex-wrap:nowrap;position:relative;transition:background .2s;cursor:pointer;font-size:var(--spot-radio-text-font-size);font-weight:var(--spot-radio-text-font-weight);color:var(--spot-radio-text-font-color);font-family:var(--spot-radio-text-font-family);padding:var(--spot-radio-text-padding);margin-right:.5rem}.spot-selection__option.selected{background:var(--spot-radio-selection-background);border-radius:var(--spot-radio-selection-border-radius);padding:var(--spot-radio-selection-padding)}.spot-selection__recommended-tag{background:var(--spot-recommended-tag-background);color:var(--spot-recommended-tag-font-color);font-size:var(--spot-recommended-tag-font-size);font-weight:var(--spot-recommended-tag-font-weight);padding:var(--spot-recommended-tag-padding);border-radius:var(--spot-recommended-tag-border-radius);margin-left:.75rem;white-space:nowrap;flex-shrink:0}@media (max-width: 850px){.spot-selection__recommended-tag{margin-left:.5rem}}@media (max-width: 600px){.spot-selection__recommended-tag{margin-left:.5rem;font-size:.75rem;padding:.1875rem .4375rem}}.spot-selection__error{color:var(--spot-selection-error-font-color);font-size:var(--spot-selection-error-font-size);padding:var(--spot-selection-error-padding);display:none}.spot-selection__options--disabled .spot-selection__option{opacity:.4;cursor:not-allowed;pointer-events:none}.spot-selection__options--disabled input[type=radio]{cursor:not-allowed}.spot-payment-terms__wrapper{margin-top:1rem}.spot-payment-terms__header{font-weight:var(--spot-payment-terms-header-font-weight);margin-bottom:.5rem;padding:var(--spot-payment-terms-header-padding);font-size:var(--spot-payment-terms-header-font-size);border-bottom:1px solid var(--spot-payment-terms-header-border-color)}.spot-payment-terms{background-color:var(--spot-payment-terms-background);border-radius:var(--spot-payment-terms-border-radius);padding:var(--spot-payment-terms-padding);color:var(--spot-payment-terms-font-color);font-size:var(--spot-payment-terms-font-size)}.spot-footer__terms{margin-top:.625rem;margin-right:.25rem;font-size:var(--spot-terms-font-size);font-weight:var(--spot-terms-font-weight);color:var(--spot-terms-font-color);font-family:var(--spot-terms-font-family);padding:var(--spot-terms-padding);line-height:1.4;word-wrap:normal;-webkit-hyphens:none;hyphens:none;flex:1;min-width:0;overflow-wrap:normal}.spot-footer__terms-link{text-decoration:var(--spot-terms-link-text-decoration);font-size:var(--spot-terms-link-font-size);font-weight:var(--spot-terms-link-font-weight);color:var(--spot-terms-link-font-color);font-family:var(--spot-terms-link-font-family);padding:var(--spot-terms-link-padding)}.spot-footer__container{display:flex;flex-direction:row;justify-content:space-between;align-items:flex-start;flex-wrap:nowrap;gap:var(--spot-footer-gap)}@container (max-width: 650px){.spot-footer__container{flex-direction:column!important;align-items:flex-start!important;flex-wrap:wrap!important}.spot-footer__terms{margin-right:0!important;margin-bottom:.5rem!important;flex:none!important;width:100%!important;max-width:none!important}}@media (max-width: 650px){.spot-footer__container{flex-direction:column!important;align-items:flex-start!important;flex-wrap:wrap!important}.spot-footer__terms{margin-right:0!important;margin-bottom:.5rem!important;flex:none!important;width:100%!important;max-width:none!important}}.spot-footer__powered-by{margin-top:0;flex-shrink:0}.spot-logo__top-right{position:absolute;top:-14px;right:40px;z-index:10;background:linear-gradient(to bottom,transparent 50%,inherit 50%);padding:0 .25rem}.spot-logo__top-right svg{border-radius:1.25rem;border:var(--spot-border-line-width) solid var(--spot-border-color);display:block;background:var(--spot-background-color)}@container (min-width: 651px){.spot-footer__powered-by{margin-top:0;align-self:center}.spot-footer__terms{margin-right:var(--spot-footer-terms-margin-right)}}@media (min-width: 651px){.spot-footer__powered-by{margin-top:0;align-self:center}.spot-footer__terms{margin-right:var(--spot-footer-terms-margin-right)}}";
|
|
640
|
+
const Y = ":root{--spot-font-family: Arial;--spot-padding: 1.25rem;--spot-background-color: #ffffff;--spot-font-color: #000000;--spot-border-radius: .5rem;--spot-border-line-width: .0625rem;--spot-border-color: #e0e0e0;--spot-logo-background-color: #f3fd00;--spot-max-width: 51rem;--spot-margin: 1rem;--spot-title-font-size: 1.25rem;--spot-title-font-weight: 700;--spot-title-padding: 0 0 1.25rem 0;--spot-description-font-size: .875rem;--spot-description-font-weight: 400;--spot-description-padding: 0 0 .5rem 0;--spot-bullets-font-size: .875rem;--spot-bullets-font-weight: 400;--spot-bullets-padding: .3125rem;--spot-bullets-checkmark-color: #2e2e2e;--spot-table-border-radius: .625rem;--spot-table-header-font-size: .875rem;--spot-table-header-font-weight: 700;--spot-table-header-padding: 0 .5rem .625rem;--spot-table-cell-font-size: .815rem;--spot-table-cell-font-weight: 400;--spot-table-cell-padding: 0 .625rem;--spot-radio-border: #000000;--spot-radio-border-radius: .625rem;--spot-radio-checked-background: #000000;--spot-radio-text-font-size: .875rem;--spot-radio-text-font-weight: 400;--spot-radio-text-padding: .625rem;--spot-radio-selection-background: #f4f4f4;--spot-radio-selection-border-radius: .625rem;--spot-radio-selection-padding: .625rem;--spot-recommended-tag-background: #000000;--spot-recommended-tag-font-color: #ffffff;--spot-recommended-tag-font-size: .875rem;--spot-recommended-tag-font-weight: 700;--spot-recommended-tag-padding: .25rem .5rem;--spot-recommended-tag-border-radius: .5rem;--spot-state-dropdown-label-font-size: .875rem;--spot-state-dropdown-label-font-weight: 600;--spot-state-dropdown-label-margin-bottom: .25rem;--spot-state-dropdown-select-border: .0625rem solid #e0e0e0;--spot-state-dropdown-select-border-radius: .375rem;--spot-state-dropdown-select-padding: .5rem .75rem;--spot-state-dropdown-select-font-size: .875rem;--spot-state-dropdown-select-background: #ffffff;--spot-state-dropdown-wrapper-margin-bottom: .75rem;--spot-state-dropdown-error-color: var(--spot-selection-error-font-color);--spot-state-dropdown-error-font-size: .8125rem;--spot-state-dropdown-error-margin-top: .25rem;--spot-selection-error-font-color: #ff0000;--spot-selection-error-font-size: .875rem;--spot-qualifying-reasons-margin: .75rem 0;--spot-qualifying-reasons-padding: 0 .3125rem;--spot-qualifying-reasons-column-gap: 3rem;--spot-qualifying-reasons-row-gap: .25rem;--spot-qualifying-reasons-grid-padding-left: 1rem;--spot-qualifying-reasons-icon-wrapper-size: 1.125rem;--spot-qualifying-reasons-icon-size: .75rem;--spot-qualifying-reasons-icon-border-color: #2e2e2e;--spot-qualifying-reasons-icon-border-width: 1px;--spot-qualifying-reasons-icon-background: #ffffff;--spot-qualifying-reasons-item-gap: .625rem;--spot-qualifying-reasons-label-font-size: .8rem;--spot-qualifying-reasons-label-font-weight: 400;--spot-qualifying-reasons-label-font-color: #000000;--spot-qualifying-reasons-label-font-family: Arial;--spot-selection-error-padding: .5rem;--spot-payment-terms-background: #f4f4f4;--spot-payment-terms-border-radius: .625rem;--spot-payment-terms-padding: 1rem;--spot-payment-terms-font-color: #636569;--spot-payment-terms-font-size: .75rem;--spot-payment-terms-header-font-weight: 700;--spot-payment-terms-header-font-size: .875rem;--spot-payment-terms-header-margin-bottom: .5rem;--spot-payment-terms-header-border-color: #c2c2c2;--spot-payment-terms-header-padding: 0 0 .5rem 0;--spot-terms-font-size: .75rem;--spot-terms-font-weight: 400;--spot-terms-font-color: #636569;--spot-terms-padding: 0;--spot-terms-link-text-decoration: underline;--spot-terms-link-font-size: .75rem;--spot-terms-link-font-weight: 400;--spot-terms-link-font-color: #636569;--spot-terms-link-padding: 0;--spot-covered-items-background: #f1f3f5;--spot-covered-items-hover-background: #e9ecef;--spot-covered-items-border-radius: .5rem;--spot-covered-items-padding: .75rem 1rem;--spot-covered-items-font-size: .875rem;--spot-covered-items-font-weight: 400;--spot-covered-items-font-color: #000000;--spot-covered-items-font-family: Arial;--spot-covered-items-arrow-font-size: .6rem;--spot-covered-items-arrow-color: #636569;--spot-covered-items-view-all-color: #636569;--spot-covered-items-view-all-font-size: .875rem;--spot-covered-items-view-all-font-weight: 400;--spot-covered-items-content-background: #f8f9fa;--spot-covered-items-content-border: 1px solid #e0e0e0;--spot-covered-items-content-border-radius: .5rem;--spot-covered-items-content-padding: .75rem 1rem;--spot-desktop-radio-margin-top: -1.5rem;--spot-benefits-margin-bottom: 0rem;--spot-covered-items-margin-bottom: 1.5rem;--spot-footer-gap: 1rem;--spot-footer-terms-margin-right: 7rem;--spot-payment-terms-margin-top: .5rem;--spot-logo-top-right-margin: 1rem}.spot-refund-guarantee{font-family:var(--spot-font-family);padding:var(--spot-padding);background-color:var(--spot-background-color);color:var(--spot-font-color);border:var(--spot-border-line-width) solid var(--spot-border-color);border-radius:var(--spot-border-radius);max-width:var(--spot-max-width);margin:var(--spot-margin);container-type:inline-size;position:relative;word-wrap:normal;overflow-wrap:normal;-webkit-hyphens:none;hyphens:none}.spot-refund-guarantee *{color:inherit}.spot-header__title{font-size:var(--spot-title-font-size);font-weight:var(--spot-title-font-weight);padding:var(--spot-title-padding);color:var(--spot-title-font-color);font-family:var(--spot-title-font-family);line-height:120%;letter-spacing:-.03125rem}.spot-header__description{font-size:var(--spot-description-font-size);font-weight:var(--spot-description-font-weight);color:var(--spot-description-font-color);font-family:var(--spot-description-font-family);padding:var(--spot-description-padding);line-height:125%;letter-spacing:-.025rem}.spot-content__wrapper{display:flex;flex-direction:column}.spot-content__wrapper.desktop-layout{display:grid;grid-template-columns:1fr auto;align-items:start;gap:1rem}.desktop-layout .spot-benefits__list,.desktop-layout .spot-qualifying-reasons__container,.desktop-layout .spot-covered-items__container,.desktop-layout .spot-selection__wrapper{min-width:0;word-wrap:normal}.desktop-layout .spot-benefits__list,.desktop-layout .spot-qualifying-reasons__container{grid-row:1;margin-bottom:var(--spot-benefits-margin-bottom)}.desktop-layout .spot-covered-items__container{grid-row:2;grid-column:1;margin-bottom:var(--spot-covered-items-margin-bottom)}.desktop-layout .spot-selection__wrapper{grid-row:3;grid-column:1;margin-top:var(--spot-desktop-radio-margin-top)}.desktop-layout .spot-payment-terms__wrapper{grid-row:4;grid-column:1;margin-top:var(--spot-payment-terms-margin-top)}.desktop-layout .spot-table__container{grid-row:1 / span 4;grid-column:2;width:auto;min-width:20.3125rem}.spot-content__wrapper:not(.desktop-layout) .spot-table__container{display:flex;justify-content:flex-start;margin-top:1rem;margin-bottom:1rem;box-sizing:border-box;padding:0 .3125rem}.spot-content__wrapper:not(.desktop-layout) .spot-refund__table{width:100%;max-width:22rem;table-layout:auto}@media (max-width: 850px){.spot-selection__recommended-tag{display:inline-block;margin-left:0}}@media (max-width: 500px){.spot-selection__recommended-tag{margin-top:.5rem}}@media (max-width: 600px){.spot-refund__table th{padding:0rem}}.spot-benefits__list{list-style-type:none;line-height:125%;gap:.5625rem;font-size:var(--spot-bullets-font-size);font-weight:var(--spot-bullets-font-weight);color:var(--spot-bullets-font-color);font-family:var(--spot-bullets-font-family);padding:var(--spot-bullets-padding);margin-block-start:0rem;margin-block-end:0rem}.spot-benefits__list li{margin-bottom:.375rem;display:flex;align-items:flex-start;gap:.5rem}.spot-benefits__list li svg{flex-shrink:0;position:relative;top:.125rem}.spot-bullets__checkmark path{stroke:var(--spot-bullets-checkmark-color)}.spot-qualifying-reasons__container{margin:var(--spot-qualifying-reasons-margin);padding:var(--spot-qualifying-reasons-padding)}.spot-qualifying-reasons__grid{display:grid;grid-template-columns:repeat(2,minmax(0,max-content));column-gap:var(--spot-qualifying-reasons-column-gap);row-gap:var(--spot-qualifying-reasons-row-gap);max-width:100%;padding-left:var(--spot-qualifying-reasons-grid-padding-left)}.spot-qualifying-reasons__item{display:flex;align-items:center;gap:var(--spot-qualifying-reasons-item-gap)}.spot-qualifying-reasons__icon-wrapper{width:var(--spot-qualifying-reasons-icon-wrapper-size);height:var(--spot-qualifying-reasons-icon-wrapper-size);border-radius:50%;border:var(--spot-qualifying-reasons-icon-border-width) solid var(--spot-qualifying-reasons-icon-border-color);background-color:var(--spot-qualifying-reasons-icon-background);display:flex;align-items:center;justify-content:center;flex-shrink:0}.spot-qualifying-reasons__icon{width:var(--spot-qualifying-reasons-icon-size);height:var(--spot-qualifying-reasons-icon-size)}.spot-qualifying-reasons__label{font-size:var(--spot-qualifying-reasons-label-font-size);font-weight:var(--spot-qualifying-reasons-label-font-weight);color:var(--spot-qualifying-reasons-label-font-color);font-family:var(--spot-qualifying-reasons-label-font-family);line-height:1.2}@media (max-width: 480px){.spot-qualifying-reasons__grid{grid-template-columns:1fr}}.spot-covered-items__container{margin-top:.85rem;margin-bottom:.5rem;max-width:26rem}.spot-content__wrapper.desktop-layout:has(.spot-table__container) .spot-covered-items__container{margin-top:0rem;margin-bottom:1rem}.spot-covered-items__title{font-size:var(--spot-covered-items-font-size);font-weight:var(--spot-covered-items-font-weight);color:var(--spot-covered-items-font-color);font-family:var(--spot-covered-items-font-family);padding:0 .3125rem .25rem;line-height:125%;margin:0}.spot-covered-items__list{list-style-type:disc;list-style-position:inside;line-height:125%;gap:.5625rem;font-size:var(--spot-bullets-font-size);font-weight:var(--spot-bullets-font-weight);color:var(--spot-bullets-font-color);font-family:var(--spot-bullets-font-family);padding:var(--spot-bullets-padding);margin-block-start:0rem;margin-block-end:0rem}.spot-covered-items__list li{margin-bottom:.3rem;text-align:left}.spot-covered-items__list li:last-child{margin-bottom:0}.spot-covered-items__header{margin-bottom:.5rem}.spot-covered-items__toggle{background:var(--spot-covered-items-background);border:none;border-radius:var(--spot-covered-items-border-radius);padding:var(--spot-covered-items-padding);cursor:pointer;display:flex;align-items:center;justify-content:space-between;width:100%;font-size:var(--spot-covered-items-font-size);font-weight:var(--spot-covered-items-font-weight);color:var(--spot-covered-items-font-color);font-family:var(--spot-covered-items-font-family);line-height:125%;transition:all .2s ease}.spot-covered-items__toggle:hover{background-color:var(--spot-covered-items-hover-background)}.spot-covered-items__toggle:focus{outline:none;box-shadow:0 0 0 2px #0000001a}.spot-covered-items__title{font-size:var(--spot-covered-items-font-size);font-weight:var(--spot-covered-items-font-weight);color:var(--spot-covered-items-font-color);font-family:var(--spot-covered-items-font-family);line-height:125%;margin:0;padding:0}.spot-covered-items__right-section{display:flex;align-items:center;gap:.5rem;margin-left:auto}.spot-covered-items__view-all{font-size:var(--spot-covered-items-view-all-font-size);font-weight:var(--spot-covered-items-view-all-font-weight);color:var(--spot-covered-items-view-all-color);font-family:var(--spot-covered-items-font-family);line-height:125%}.spot-covered-items__arrow{font-size:var(--spot-covered-items-arrow-font-size);transition:transform .2s ease;color:var(--spot-covered-items-arrow-color);flex-shrink:0;transform:scaleX(1.5)}.spot-covered-items__content{margin-top:.5rem;transition:all .2s ease;overflow:hidden}.spot-covered-items__list{background-color:var(--spot-covered-items-content-background);border:var(--spot-covered-items-content-border);border-radius:var(--spot-covered-items-content-border-radius);margin:0;padding:var(--spot-covered-items-content-padding)}.spot-table__container{width:100%}.spot-refund__table{max-width:22rem;border-radius:var(--spot-table-border-radius);overflow:hidden;border:.09375rem solid #636569;table-layout:fixed;margin-bottom:.5rem;margin-top:.25rem;padding:.625rem}.spot-refund__table--dynamic{height:auto!important;min-height:7.5rem}.spot-refund__table td,.spot-refund__table th{padding:.375rem .625rem;text-align:left}.spot-refund__table th{text-align:left;font-size:var(--spot-table-header-font-size);font-weight:var(--spot-table-header-font-weight);color:var(--spot-table-header-font-color);font-family:var(--spot-table-header-font-family);padding:var(--spot-table-header-padding)}.spot-refund__table td{text-align:left;font-size:var(--spot-table-cell-font-size);font-weight:var(--spot-table-cell-font-weight);color:var(--spot-table-cell-font-color);font-family:var(--spot-table-cell-font-family);padding:var(--spot-table-cell-padding)}.spot-state-dropdown__wrapper{display:flex;flex-direction:column;margin-bottom:var(--spot-state-dropdown-wrapper-margin-bottom)}.spot-state-dropdown__label{font-size:var(--spot-state-dropdown-label-font-size);font-weight:var(--spot-state-dropdown-label-font-weight);font-family:var(--spot-font-family);color:var(--spot-font-color);margin-bottom:var(--spot-state-dropdown-label-margin-bottom)}.spot-state-dropdown__select{width:100%;box-sizing:border-box;border:var(--spot-state-dropdown-select-border);border-radius:var(--spot-state-dropdown-select-border-radius);padding:var(--spot-state-dropdown-select-padding);font-size:var(--spot-state-dropdown-select-font-size);font-family:var(--spot-font-family);color:var(--spot-font-color);background-color:var(--spot-state-dropdown-select-background);cursor:pointer;-webkit-appearance:auto;-moz-appearance:auto;appearance:auto}.spot-state-dropdown__select:focus{outline:none;box-shadow:0 0 0 2px #00000026}.spot-state-dropdown__select--error{border-color:var(--spot-state-dropdown-error-color)}.spot-state-dropdown__select--error:focus{box-shadow:0 0 0 2px #ff000026}.spot-state-dropdown__error{display:none;color:var(--spot-state-dropdown-error-color);font-size:var(--spot-state-dropdown-error-font-size);font-family:var(--spot-font-family);margin-top:var(--spot-state-dropdown-error-margin-top)}.spot-state-dropdown__error--visible{display:block}input[type=radio]{-webkit-appearance:none;-moz-appearance:none;appearance:none;width:.75rem;height:.75rem;min-width:.75rem;border:.0625rem solid var(--spot-radio-border);border-radius:var(--spot-radio-border-radius);margin-right:.5rem;position:relative;vertical-align:middle;top:-.0625rem;cursor:pointer;flex-shrink:0}input[type=radio]:checked{background:var(--spot-radio-checked-background);box-shadow:inset 0 0 0 .0625rem #fff}.spot-selection__options{display:flex;flex-direction:column;gap:.5rem}.spot-selection__option{display:flex;align-items:center;flex-wrap:nowrap;position:relative;transition:background .2s;cursor:pointer;font-size:var(--spot-radio-text-font-size);font-weight:var(--spot-radio-text-font-weight);color:var(--spot-radio-text-font-color);font-family:var(--spot-radio-text-font-family);padding:var(--spot-radio-text-padding);margin-right:.5rem}.spot-selection__option.selected{background:var(--spot-radio-selection-background);border-radius:var(--spot-radio-selection-border-radius);padding:var(--spot-radio-selection-padding)}.spot-selection__recommended-tag{background:var(--spot-recommended-tag-background);color:var(--spot-recommended-tag-font-color);font-size:var(--spot-recommended-tag-font-size);font-weight:var(--spot-recommended-tag-font-weight);padding:var(--spot-recommended-tag-padding);border-radius:var(--spot-recommended-tag-border-radius);margin-left:.75rem;white-space:nowrap;flex-shrink:0}@media (max-width: 850px){.spot-selection__recommended-tag{margin-left:.5rem}}@media (max-width: 600px){.spot-selection__recommended-tag{margin-left:.5rem;font-size:.75rem;padding:.1875rem .4375rem}}.spot-selection__error{color:var(--spot-selection-error-font-color);font-size:var(--spot-selection-error-font-size);padding:var(--spot-selection-error-padding);display:none}.spot-selection__options--disabled .spot-selection__option{opacity:.4;cursor:not-allowed;pointer-events:none}.spot-selection__options--disabled input[type=radio]{cursor:not-allowed}.spot-payment-terms__wrapper{margin-top:1rem}.spot-payment-terms__header{font-weight:var(--spot-payment-terms-header-font-weight);margin-bottom:.5rem;padding:var(--spot-payment-terms-header-padding);font-size:var(--spot-payment-terms-header-font-size);border-bottom:1px solid var(--spot-payment-terms-header-border-color)}.spot-payment-terms{background-color:var(--spot-payment-terms-background);border-radius:var(--spot-payment-terms-border-radius);padding:var(--spot-payment-terms-padding);color:var(--spot-payment-terms-font-color);font-size:var(--spot-payment-terms-font-size)}.spot-footer__terms{margin-top:.625rem;margin-right:.25rem;font-size:var(--spot-terms-font-size);font-weight:var(--spot-terms-font-weight);color:var(--spot-terms-font-color);font-family:var(--spot-terms-font-family);padding:var(--spot-terms-padding);line-height:1.4;word-wrap:normal;-webkit-hyphens:none;hyphens:none;flex:1;min-width:0;overflow-wrap:normal}.spot-footer__terms-link{text-decoration:var(--spot-terms-link-text-decoration);font-size:var(--spot-terms-link-font-size);font-weight:var(--spot-terms-link-font-weight);color:var(--spot-terms-link-font-color);font-family:var(--spot-terms-link-font-family);padding:var(--spot-terms-link-padding)}.spot-footer__container{display:flex;flex-direction:row;justify-content:space-between;align-items:flex-start;flex-wrap:nowrap;gap:var(--spot-footer-gap)}@container (max-width: 650px){.spot-footer__container{flex-direction:column!important;align-items:flex-start!important;flex-wrap:wrap!important}.spot-footer__terms{margin-right:0!important;margin-bottom:.5rem!important;flex:none!important;width:100%!important;max-width:none!important}}@media (max-width: 650px){.spot-footer__container{flex-direction:column!important;align-items:flex-start!important;flex-wrap:wrap!important}.spot-footer__terms{margin-right:0!important;margin-bottom:.5rem!important;flex:none!important;width:100%!important;max-width:none!important}}.spot-footer__powered-by{margin-top:0;flex-shrink:0}.spot-logo__top-right{position:absolute;top:-14px;right:5%;z-index:10;background:linear-gradient(to bottom,transparent 50%,inherit 50%);padding:0 .25rem}.spot-logo__top-right svg{border-radius:9999px;overflow:hidden;border:var(--spot-border-line-width) solid var(--spot-border-color);display:block;background:var(--spot-logo-background-color)}@container (min-width: 651px){.spot-footer__powered-by{margin-top:0;align-self:center}.spot-footer__terms{margin-right:var(--spot-footer-terms-margin-right)}}@media (min-width: 651px){.spot-footer__powered-by{margin-top:0;align-self:center}.spot-footer__terms{margin-right:var(--spot-footer-terms-margin-right)}}";
|
|
645
641
|
function G(d) {
|
|
646
642
|
const t = document.createElement("style");
|
|
647
643
|
t.textContent = d, document.head.appendChild(t);
|
|
648
644
|
}
|
|
649
645
|
G(Y);
|
|
650
|
-
const
|
|
646
|
+
const H = {
|
|
651
647
|
sandbox: "https://api.sandbox.getspot.com/api/v1/quote",
|
|
652
648
|
production: "https://api.getspot.com/api/v1/quote",
|
|
653
649
|
local: "http://localhost:3999/api/v1/quote"
|
|
@@ -657,7 +653,7 @@ class K {
|
|
|
657
653
|
this._destroyed = !1, this.options = {
|
|
658
654
|
location: "body",
|
|
659
655
|
showTable: !0,
|
|
660
|
-
logoPosition: "
|
|
656
|
+
logoPosition: "top-right",
|
|
661
657
|
apiConfig: { environment: "production", partnerId: "" },
|
|
662
658
|
quoteRequestData: {},
|
|
663
659
|
callbacks: {},
|
|
@@ -674,7 +670,7 @@ class K {
|
|
|
674
670
|
if (this.options.useMockData && this.options.mockData)
|
|
675
671
|
e = this.options.mockData;
|
|
676
672
|
else {
|
|
677
|
-
const { environment: o, partnerId: p } = this.options.apiConfig, f = this.options.apiConfig.customEndpoint ||
|
|
673
|
+
const { environment: o, partnerId: p } = this.options.apiConfig, f = this.options.apiConfig.customEndpoint || H[o];
|
|
678
674
|
e = "items" in this.options.quoteRequestData ? await N(
|
|
679
675
|
f,
|
|
680
676
|
p,
|
|
@@ -753,7 +749,7 @@ class K {
|
|
|
753
749
|
parent: t
|
|
754
750
|
});
|
|
755
751
|
this._isPassOrTrip() && !this.options.state && (this._stateSelectEl = j(r, this.currentState), this._setNonUsResidentError(this.currentState === E));
|
|
756
|
-
const i = !this._isQuotingAvailable(), a =
|
|
752
|
+
const i = !this._isQuotingAvailable(), a = W(
|
|
757
753
|
r,
|
|
758
754
|
this.currentSelection,
|
|
759
755
|
this.quote.communication,
|
|
@@ -762,7 +758,7 @@ class K {
|
|
|
762
758
|
this.paymentTermsEl = n("div", {
|
|
763
759
|
className: "spot-payment-terms__wrapper",
|
|
764
760
|
parent: t
|
|
765
|
-
}), this.currentSelection === _.YES &&
|
|
761
|
+
}), this.currentSelection === _.YES && R(this.paymentTermsEl, this.quote), F(this.container, this.quote, this.options.logoPosition), window.addEventListener("resize", this._onResize), this._setupResizeObserver(), this._updateLayout(), this._setupOptionListeners(a), this._setupStateDropdownListener();
|
|
766
762
|
}
|
|
767
763
|
_updateLayout() {
|
|
768
764
|
if (!this.container || !this.quote) return;
|
|
@@ -860,7 +856,7 @@ class K {
|
|
|
860
856
|
i.addEventListener("change", (a) => {
|
|
861
857
|
var p, m, f, v;
|
|
862
858
|
const e = a.target, o = e.value;
|
|
863
|
-
if (this.hideSelectionError(), this.currentSelection = o, s.forEach((h) => h.classList.remove("selected")), (p = e.closest(".spot-selection__option")) == null || p.classList.add("selected"), this.paymentTermsEl && (this.paymentTermsEl.innerHTML = ""), o === _.YES && ((m = this.quote) != null && m.communication.paymentTerms &&
|
|
859
|
+
if (this.hideSelectionError(), this.currentSelection = o, s.forEach((h) => h.classList.remove("selected")), (p = e.closest(".spot-selection__option")) == null || p.classList.add("selected"), this.paymentTermsEl && (this.paymentTermsEl.innerHTML = ""), o === _.YES && ((m = this.quote) != null && m.communication.paymentTerms && R(this.paymentTermsEl, this.quote), (f = this.options.callbacks) != null && f.onOptIn)) {
|
|
864
860
|
const h = {
|
|
865
861
|
status: "QUOTE_ACCEPTED",
|
|
866
862
|
spotPrice: this.quote.spotPrice,
|
|
@@ -942,7 +938,7 @@ class K {
|
|
|
942
938
|
quoteRequestData: t
|
|
943
939
|
};
|
|
944
940
|
M(e);
|
|
945
|
-
const { environment: o, partnerId: p, customEndpoint: m } = this.options.apiConfig, f = m ||
|
|
941
|
+
const { environment: o, partnerId: p, customEndpoint: m } = this.options.apiConfig, f = m || H[o], h = "items" in e.quoteRequestData ? await N(
|
|
946
942
|
f,
|
|
947
943
|
p,
|
|
948
944
|
e.quoteRequestData,
|
package/dist/index.umd.js
CHANGED
|
@@ -1,14 +1,10 @@
|
|
|
1
|
-
(function(C,k){typeof exports=="object"&&typeof module<"u"?k(exports):typeof define=="function"&&define.amd?define(["exports"],k):(C=typeof globalThis<"u"?globalThis:C||self,k(C.SpotWidget={}))})(this,function(C){"use strict";async function k(d,t,r,s){try{const i=s?{...r,state:s}:r,n=await fetch(d,{method:"POST",headers:{"Content-Type":"application/json","X-Spot-Partner-Id":t},body:JSON.stringify(i)}),e=await n.json();if(!n.ok){const o=new Error((e==null?void 0:e.message)||"Failed to fetch quote");throw o.status=n.status,o.responseBody=e,o}return e}catch(i){throw i instanceof Error?i:new Error("Unknown error occurred while fetching quote")}}async function z(d,t,r){try{const s=d.replace("/quote","/quote/batch"),i=await fetch(s,{method:"POST",headers:{"Content-Type":"application/json","X-Spot-Partner-Id":t},body:JSON.stringify(r)}),n=await i.json();if(!i.ok){const e=new Error((n==null?void 0:n.message)||"Failed to fetch batch quote");throw e.status=i.status,e.responseBody=n,e}return n}catch(s){throw s instanceof Error?s:new Error("Unknown error occurred while fetching batch quote")}}async function D(d,t,r,s){var i;try{const n={...r,...s?{state:s}:{},isPartialPayment:r.isPartialPayment||!1,roundTo:r.roundTo||void 0,items:r.items.map((m,f)=>({...m,cartItemId:m.cartItemId||`item-${f+1}`}))},e=await z(d,t,n);if(e.status!=="QUOTES_AVAILABLE"&&e.status!=="QUOTE_AVAILABLE")return{status:"NO_MATCHING_QUOTE"};const o=e.quotes.map(m=>{const f=r.items.find((v,h)=>(v.cartItemId||`item-${h+1}`)===m.cartItemId);return f?f.participantDescription?`${f.productName} - ${f.participantDescription}`:f.productName:`Item ${m.id}`}),p=Math.round((e.totalSpotPrice||e.spotPrice||0)*100)/100;return{status:"QUOTE_AVAILABLE",data:{id:e.quotes?e.quotes.map(m=>m.id).join(","):((i=e.data)==null?void 0:i.id)||"",spotPrice:p,currencyCode:e.currencyCode||"",communication:{...e.communication,yesOptionText:e.communication.yesOptionText.replace(String(e.totalSpotPrice),String(p))},payoutSchedule:e.payoutSchedule.map(m=>({...m,amount:m.amount!==void 0?m.amount:0})),coveredItems:o,originalQuotes:e.quotes||(e.data?[e.data]:[])},spotPrice:p,coveredItems:o}}catch(n){throw n instanceof Error?n:new Error("Unknown error occurred while fetching multiple quotes")}}const E="non-us-resident",A="Unfortunately, we are currently unable to offer coverage or process claims for non-US residents.",S=[{value:"AL",label:"Alabama"},{value:"AK",label:"Alaska"},{value:"AS",label:"American Samoa"},{value:"AZ",label:"Arizona"},{value:"AR",label:"Arkansas"},{value:"CA",label:"California"},{value:"CO",label:"Colorado"},{value:"CT",label:"Connecticut"},{value:"DE",label:"Delaware"},{value:"DC",label:"District of Columbia"},{value:"FL",label:"Florida"},{value:"GA",label:"Georgia"},{value:"GU",label:"Guam"},{value:"HI",label:"Hawaii"},{value:"ID",label:"Idaho"},{value:"IL",label:"Illinois"},{value:"IN",label:"Indiana"},{value:"IA",label:"Iowa"},{value:"KS",label:"Kansas"},{value:"KY",label:"Kentucky"},{value:"LA",label:"Louisiana"},{value:"ME",label:"Maine"},{value:"MD",label:"Maryland"},{value:"MA",label:"Massachusetts"},{value:"MI",label:"Michigan"},{value:"MN",label:"Minnesota"},{value:"MS",label:"Mississippi"},{value:"MO",label:"Missouri"},{value:"MT",label:"Montana"},{value:"NE",label:"Nebraska"},{value:"NV",label:"Nevada"},{value:"NH",label:"New Hampshire"},{value:"NJ",label:"New Jersey"},{value:"NM",label:"New Mexico"},{value:"NY",label:"New York"},{value:"NC",label:"North Carolina"},{value:"ND",label:"North Dakota"},{value:"MP",label:"Northern Mariana Islands"},{value:"OH",label:"Ohio"},{value:"OK",label:"Oklahoma"},{value:"OR",label:"Oregon"},{value:"PA",label:"Pennsylvania"},{value:"PR",label:"Puerto Rico"},{value:"RI",label:"Rhode Island"},{value:"SC",label:"South Carolina"},{value:"SD",label:"South Dakota"},{value:"TN",label:"Tennessee"},{value:"TX",label:"Texas"},{value:"VI",label:"U.S. Virgin Islands"},{value:"UT",label:"Utah"},{value:"VT",label:"Vermont"},{value:"VA",label:"Virginia"},{value:"WA",label:"Washington"},{value:"WV",label:"West Virginia"},{value:"WI",label:"Wisconsin"},{value:"WY",label:"Wyoming"}],P=new Set(S.map(d=>d.value)),T=["USD","CAD","AUD","NZD","EUR","MXN","AED","GBP","MAD","SAR","BGN","BRL","CHF","DKK","INR","JPY","MYR","NOK","PLN","SEK","SGD","THB","ZAR"],$={sandbox:"https://api.sandbox.getspot.com/v1/quote",production:"https://api.getspot.com/v1/quote",local:"http://localhost:3999/api/v1/quote"};function N(d){const{apiConfig:t={},quoteRequestData:r,callbacks:s={},location:i,theme:n}=d,{environment:e="sandbox",partnerId:o,customEndpoint:p}=t;if(!o||typeof o!="string")throw new Error("Invalid or missing partnerId in apiConfig");if(!(p||$[e]))throw new Error(`Invalid environment in apiConfig: ${e}`);if(!r||typeof r!="object"&&!Array.isArray(r))throw new Error("quoteRequestData must be a non-null object or array");const f=["startDate","endDate","currencyCode","eventType","productType","productDuration","productPrice","productId","cartId","productName"];function v(l,u=null){const c=u!==null?`quoteRequestData[${u}]`:"quoteRequestData";f.forEach(g=>{if(!Object.prototype.hasOwnProperty.call(l,g)||l[g]===void 0||l[g]===null)throw new Error(`Missing required ${c} field: '${g}'`)});const _=/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d+)?Z$/;if(!_.test(l.startDate))throw new Error(`${c}.startDate must be a valid ISO8601 string`);if(!_.test(l.endDate))throw new Error(`${c}.endDate must be a valid ISO8601 string`);if(typeof l.currencyCode!="string")throw new Error(`${c}.currencyCode must be a string`);if(!T.includes(l.currencyCode))throw new Error(`Invalid ${c}.currencyCode: ${l.currencyCode}`);if(typeof l.eventType!="string")throw new Error(`${c}.eventType must be a string`);if(typeof l.productType!="string")throw new Error(`${c}.productType must be a string`);const w=["Pass","Trip","Registration"];if(!w.includes(l.productType))throw new Error(`${c}.productType must be one of ${w.join(", ")}`);if(typeof l.productDuration!="string")throw new Error(`${c}.productDuration must be a string`);const q=["Daily","Seasonal","Trip","Event"];if(!q.includes(l.productDuration))throw new Error(`${c}.productDuration must be one of ${q.join(", ")}`);if(typeof l.productPrice!="number"||isNaN(l.productPrice))throw new Error(`${c}.productPrice must be a valid number`);if(typeof l.productId!="string")throw new Error(`${c}.productId must be a string`);if(typeof l.cartId!="string")throw new Error(`${c}.cartId must be a string`);if(typeof l.productName!="string")throw new Error(`${c}.productName must be a string`)}if("items"in r){const l=r,{cartId:u,cartName:c,currencyCode:_,items:w}=l;if(!u||typeof u!="string")throw new Error("quoteRequestData.cartId must be a string");if(!c||typeof c!="string")throw new Error("quoteRequestData.cartName must be a string");if(!_||typeof _!="string")throw new Error("quoteRequestData.currencyCode must be a string");if(!T.includes(_))throw new Error(`Invalid quoteRequestData.currencyCode: ${_}`);if(!Array.isArray(w)||w.length===0)throw new Error("quoteRequestData.items must be a non-empty array");const q=["startDate","endDate","eventType","productType","productDuration","productPrice","productId","productName"];w.forEach((g,
|
|
1
|
+
(function(C,k){typeof exports=="object"&&typeof module<"u"?k(exports):typeof define=="function"&&define.amd?define(["exports"],k):(C=typeof globalThis<"u"?globalThis:C||self,k(C.SpotWidget={}))})(this,function(C){"use strict";async function k(d,t,r,s){try{const i=s?{...r,state:s}:r,n=await fetch(d,{method:"POST",headers:{"Content-Type":"application/json","X-Spot-Partner-Id":t},body:JSON.stringify(i)}),e=await n.json();if(!n.ok){const o=new Error((e==null?void 0:e.message)||"Failed to fetch quote");throw o.status=n.status,o.responseBody=e,o}return e}catch(i){throw i instanceof Error?i:new Error("Unknown error occurred while fetching quote")}}async function z(d,t,r){try{const s=d.replace("/quote","/quote/batch"),i=await fetch(s,{method:"POST",headers:{"Content-Type":"application/json","X-Spot-Partner-Id":t},body:JSON.stringify(r)}),n=await i.json();if(!i.ok){const e=new Error((n==null?void 0:n.message)||"Failed to fetch batch quote");throw e.status=i.status,e.responseBody=n,e}return n}catch(s){throw s instanceof Error?s:new Error("Unknown error occurred while fetching batch quote")}}async function D(d,t,r,s){var i;try{const n={...r,...s?{state:s}:{},isPartialPayment:r.isPartialPayment||!1,roundTo:r.roundTo||void 0,items:r.items.map((m,f)=>({...m,cartItemId:m.cartItemId||`item-${f+1}`}))},e=await z(d,t,n);if(e.status!=="QUOTES_AVAILABLE"&&e.status!=="QUOTE_AVAILABLE")return{status:"NO_MATCHING_QUOTE"};const o=e.quotes.map(m=>{const f=r.items.find((v,h)=>(v.cartItemId||`item-${h+1}`)===m.cartItemId);return f?f.participantDescription?`${f.productName} - ${f.participantDescription}`:f.productName:`Item ${m.id}`}),p=Math.round((e.totalSpotPrice||e.spotPrice||0)*100)/100;return{status:"QUOTE_AVAILABLE",data:{id:e.quotes?e.quotes.map(m=>m.id).join(","):((i=e.data)==null?void 0:i.id)||"",spotPrice:p,currencyCode:e.currencyCode||"",communication:{...e.communication,yesOptionText:e.communication.yesOptionText.replace(String(e.totalSpotPrice),String(p))},payoutSchedule:e.payoutSchedule.map(m=>({...m,amount:m.amount!==void 0?m.amount:0})),coveredItems:o,originalQuotes:e.quotes||(e.data?[e.data]:[])},spotPrice:p,coveredItems:o}}catch(n){throw n instanceof Error?n:new Error("Unknown error occurred while fetching multiple quotes")}}const E="non-us-resident",A="Unfortunately, we are currently unable to offer coverage or process claims for non-US residents.",S=[{value:"AL",label:"Alabama"},{value:"AK",label:"Alaska"},{value:"AS",label:"American Samoa"},{value:"AZ",label:"Arizona"},{value:"AR",label:"Arkansas"},{value:"CA",label:"California"},{value:"CO",label:"Colorado"},{value:"CT",label:"Connecticut"},{value:"DE",label:"Delaware"},{value:"DC",label:"District of Columbia"},{value:"FL",label:"Florida"},{value:"GA",label:"Georgia"},{value:"GU",label:"Guam"},{value:"HI",label:"Hawaii"},{value:"ID",label:"Idaho"},{value:"IL",label:"Illinois"},{value:"IN",label:"Indiana"},{value:"IA",label:"Iowa"},{value:"KS",label:"Kansas"},{value:"KY",label:"Kentucky"},{value:"LA",label:"Louisiana"},{value:"ME",label:"Maine"},{value:"MD",label:"Maryland"},{value:"MA",label:"Massachusetts"},{value:"MI",label:"Michigan"},{value:"MN",label:"Minnesota"},{value:"MS",label:"Mississippi"},{value:"MO",label:"Missouri"},{value:"MT",label:"Montana"},{value:"NE",label:"Nebraska"},{value:"NV",label:"Nevada"},{value:"NH",label:"New Hampshire"},{value:"NJ",label:"New Jersey"},{value:"NM",label:"New Mexico"},{value:"NY",label:"New York"},{value:"NC",label:"North Carolina"},{value:"ND",label:"North Dakota"},{value:"MP",label:"Northern Mariana Islands"},{value:"OH",label:"Ohio"},{value:"OK",label:"Oklahoma"},{value:"OR",label:"Oregon"},{value:"PA",label:"Pennsylvania"},{value:"PR",label:"Puerto Rico"},{value:"RI",label:"Rhode Island"},{value:"SC",label:"South Carolina"},{value:"SD",label:"South Dakota"},{value:"TN",label:"Tennessee"},{value:"TX",label:"Texas"},{value:"VI",label:"U.S. Virgin Islands"},{value:"UT",label:"Utah"},{value:"VT",label:"Vermont"},{value:"VA",label:"Virginia"},{value:"WA",label:"Washington"},{value:"WV",label:"West Virginia"},{value:"WI",label:"Wisconsin"},{value:"WY",label:"Wyoming"}],P=new Set(S.map(d=>d.value)),T=["USD","CAD","AUD","NZD","EUR","MXN","AED","GBP","MAD","SAR","BGN","BRL","CHF","DKK","INR","JPY","MYR","NOK","PLN","SEK","SGD","THB","ZAR"],$={sandbox:"https://api.sandbox.getspot.com/v1/quote",production:"https://api.getspot.com/v1/quote",local:"http://localhost:3999/api/v1/quote"};function N(d){const{apiConfig:t={},quoteRequestData:r,callbacks:s={},location:i,theme:n}=d,{environment:e="sandbox",partnerId:o,customEndpoint:p}=t;if(!o||typeof o!="string")throw new Error("Invalid or missing partnerId in apiConfig");if(!(p||$[e]))throw new Error(`Invalid environment in apiConfig: ${e}`);if(!r||typeof r!="object"&&!Array.isArray(r))throw new Error("quoteRequestData must be a non-null object or array");const f=["startDate","endDate","currencyCode","eventType","productType","productDuration","productPrice","productId","cartId","productName"];function v(l,u=null){const c=u!==null?`quoteRequestData[${u}]`:"quoteRequestData";f.forEach(g=>{if(!Object.prototype.hasOwnProperty.call(l,g)||l[g]===void 0||l[g]===null)throw new Error(`Missing required ${c} field: '${g}'`)});const _=/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d+)?Z$/;if(!_.test(l.startDate))throw new Error(`${c}.startDate must be a valid ISO8601 string`);if(!_.test(l.endDate))throw new Error(`${c}.endDate must be a valid ISO8601 string`);if(typeof l.currencyCode!="string")throw new Error(`${c}.currencyCode must be a string`);if(!T.includes(l.currencyCode))throw new Error(`Invalid ${c}.currencyCode: ${l.currencyCode}`);if(typeof l.eventType!="string")throw new Error(`${c}.eventType must be a string`);if(typeof l.productType!="string")throw new Error(`${c}.productType must be a string`);const w=["Pass","Trip","Registration"];if(!w.includes(l.productType))throw new Error(`${c}.productType must be one of ${w.join(", ")}`);if(typeof l.productDuration!="string")throw new Error(`${c}.productDuration must be a string`);const q=["Daily","Seasonal","Trip","Event"];if(!q.includes(l.productDuration))throw new Error(`${c}.productDuration must be one of ${q.join(", ")}`);if(typeof l.productPrice!="number"||isNaN(l.productPrice))throw new Error(`${c}.productPrice must be a valid number`);if(typeof l.productId!="string")throw new Error(`${c}.productId must be a string`);if(typeof l.cartId!="string")throw new Error(`${c}.cartId must be a string`);if(typeof l.productName!="string")throw new Error(`${c}.productName must be a string`)}if("items"in r){const l=r,{cartId:u,cartName:c,currencyCode:_,items:w}=l;if(!u||typeof u!="string")throw new Error("quoteRequestData.cartId must be a string");if(!c||typeof c!="string")throw new Error("quoteRequestData.cartName must be a string");if(!_||typeof _!="string")throw new Error("quoteRequestData.currencyCode must be a string");if(!T.includes(_))throw new Error(`Invalid quoteRequestData.currencyCode: ${_}`);if(!Array.isArray(w)||w.length===0)throw new Error("quoteRequestData.items must be a non-empty array");const q=["startDate","endDate","eventType","productType","productDuration","productPrice","productId","productName"];w.forEach((g,R)=>{if(!g||typeof g!="object")throw new Error(`quoteRequestData.items[${R}] must be a non-null object`);const y=`quoteRequestData.items[${R}]`;q.forEach(x=>{if(!Object.prototype.hasOwnProperty.call(g,x)||g[x]===void 0||g[x]===null)throw new Error(`Missing required ${y} field: '${x}'`)});const H=/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d+)?Z$/;if(!H.test(g.startDate))throw new Error(`${y}.startDate must be a valid ISO8601 string`);if(!H.test(g.endDate))throw new Error(`${y}.endDate must be a valid ISO8601 string`);if(typeof g.eventType!="string")throw new Error(`${y}.eventType must be a string`);if(typeof g.productType!="string")throw new Error(`${y}.productType must be a string`);const L=["Pass","Trip","Registration"];if(!L.includes(g.productType))throw new Error(`${y}.productType must be one of ${L.join(", ")}`);if(typeof g.productDuration!="string")throw new Error(`${y}.productDuration must be a string`);const O=["Daily","Seasonal","Trip","Event"];if(!O.includes(g.productDuration))throw new Error(`${y}.productDuration must be one of ${O.join(", ")}`);if(typeof g.productPrice!="number"||isNaN(g.productPrice))throw new Error(`${y}.productPrice must be a valid number`);if(typeof g.productId!="string")throw new Error(`${y}.productId must be a string`);if(typeof g.productName!="string")throw new Error(`${y}.productName must be a string`)})}else if(Array.isArray(r)){if(r.length===0)throw new Error("quoteRequestData array cannot be empty");r.forEach((l,u)=>{if(!l||typeof l!="object")throw new Error(`quoteRequestData[${u}] must be a non-null object`);v(l,u)})}else v(r);if(["onOptIn","onOptOut","onQuoteRetrieved","onError","noMatchingQuote"].forEach(l=>{const u=s[l];if(u&&typeof u!="function")throw new Error(`Callback '${l}' must be a function.`)}),typeof i=="string"&&!document.querySelector(i))throw new Error(`Invalid location selector: '${i}'`);if(n&&typeof n!="object")throw new Error("Theme must be an object with CSS variables, do not include the '--' prefix");if(d.state&&!P.has(d.state))throw new Error(`Invalid state: '${d.state}'. Must be a 2-character US state or territory code.`)}var b=(d=>(d.YES="yes",d.NO="no",d.UNSELECTED="unselected",d))(b||{});function a(d,{text:t,className:r,parent:s,innerHTML:i,href:n,target:e}={}){const o=document.createElement(d);return r&&(o.className=r),t!=null&&(o.textContent=t),i!=null&&(o.innerHTML=i),n&&"href"in o&&(o.href=n),e&&"target"in o&&(o.target=e),s&&s.appendChild(o),o}function V(d,{name:t,description:r}){a("div",{className:"spot-header__title",text:t,parent:d}),a("div",{className:"spot-header__description",text:r,parent:d})}function U(d,t=[]){const r=a("ul",{className:"spot-benefits__list",parent:d});t.forEach(s=>{const i=a("li",{parent:r});i.innerHTML=`
|
|
2
2
|
<svg width="14" height="14" viewBox="0 0 14 14" fill="none" class="spot-bullets__checkmark">
|
|
3
3
|
<path d="M11.6666 3.5L5.24998 9.91667L2.33331 7"
|
|
4
4
|
stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
|
5
|
-
</svg>`,a("span",{text:s,parent:i})})}function Q(d,t=[]){if(!t||t.length===0)return;const r=a("div",{className:"spot-qualifying-reasons__container",parent:d}),s=[...t].sort((o,p)=>o.rank-p.rank),i=a("div",{className:"spot-qualifying-reasons__grid",parent:r}),n={"Accident & Illness":"cross.svg","Family Emergencies":"users.svg",Layoffs:"building.svg","Jury Duty":"scale.svg","Work Travel Conflict":"briefcase.svg","Severe Weather":"umbrella.svg","Travel Interruption":"plane.svg","Military Duty":"medal.svg"};let e;try{const o=document.currentScript;if(o!=null&&o.src){const p=new URL(o.src);e=p.origin+p.pathname.replace(/\/[^/]*$/,"/")}else e=window.location.origin+window.location.pathname.replace(/\/[^/]*$/,"/");e+="assets/"}catch{e="./assets/"}s.forEach(o=>{var v,h,l;const p=a("div",{className:"spot-qualifying-reasons__item",parent:i}),m=a("div",{className:"spot-qualifying-reasons__icon-wrapper",parent:p}),f=n[((v=o.benefitType)==null?void 0:v.name)||""]||n[o.name||""];if(f){const u=a("img",{parent:m});u.src=e+f,u.alt=((h=o.benefitType)==null?void 0:h.name)||o.name||"",u.className="spot-qualifying-reasons__icon"}a("span",{className:"spot-qualifying-reasons__label",text:((l=o.benefitType)==null?void 0:l.name)||o.name||"",parent:p})})}function Z(d,t=[],r){if(t.length===0||!r||r<=1)return;const s=new Map;t.forEach(u=>{s.set(u,(s.get(u)||0)+1)});const n=Array.from(s.entries()).map(([u,c])=>({item:u,count:c,displayText:c>1?`${c} x ${u}`:u})).sort((u,c)=>{const _=u.item.charAt(0),w=c.item.charAt(0),q=/[a-zA-Z]/.test(_),g=/[a-zA-Z]/.test(w);return!q&&g?-1:q&&!g?1:u.item.localeCompare(c.item,void 0,{sensitivity:"base"})}),e=a("div",{className:"spot-covered-items__container",parent:d}),o=a("div",{className:"spot-covered-items__header",parent:e}),p=a("button",{className:"spot-covered-items__toggle",parent:o});p.type="button",a("span",{className:"spot-covered-items__title",text:`Items Covered in Your Cart (${t.length})`,parent:p});const m=a("div",{className:"spot-covered-items__right-section",parent:p});a("span",{className:"spot-covered-items__view-all",text:"View All",parent:m});const f=a("span",{className:"spot-covered-items__arrow",innerHTML:"▼",parent:m}),v=a("div",{className:"spot-covered-items__content",parent:e}),h=a("ul",{className:"spot-covered-items__list",parent:v});n.forEach(({displayText:u})=>{const c=a("li",{parent:h});a("span",{text:u,parent:c})});let l=!1;v.style.display="none",p.addEventListener("click",u=>{u.stopPropagation(),u.preventDefault(),l=!l,v.style.display=l?"block":"none",f.innerHTML=l?"▲":"▼",p.setAttribute("aria-expanded",l.toString())}),p.setAttribute("aria-expanded","false"),p.setAttribute("aria-controls","covered-items-list"),v.setAttribute("id","covered-items-list")}const B={USD:"$",CAD:"CAD $",AUD:"AUD $",NZD:"NZD $",MXN:"MXN $",EUR:"EUR €",GBP:"GBP £",AED:"AED ",MAD:"MAD ",SAR:"SAR ",BGN:"BGN лв",BRL:"BRL R$",CHF:"CHF ",DKK:"DKK kr",INR:"INR ₹",JPY:"JPY ¥",MYR:"MYR RM",NOK:"NOK kr",PLN:"PLN zł",SEK:"SEK kr",SGD:"SGD $",THB:"THB ฿",ZAR:"ZAR R"};function j(d,t=[],r="USD"){const s=B[r]??`${r} `,i=a("div",{className:"spot-table__container",parent:d}),n=a("table",{className:"spot-refund__table spot-table--dynamic",parent:i}),e=a("thead",{parent:n}),o=a("tr",{parent:e});a("th",{text:"When you cancel",parent:o}),a("th",{text:"You will receive",parent:o});const p=a("tbody",{parent:n});t.forEach(({text:m,percent:f,amount:v})=>{const h=a("tr",{parent:p});a("td",{text:m,parent:h});const l=f==="Not eligible for refund"?"Not eligible for a refund":`${s}${v} refund`;a("td",{text:l,parent:h})})}function
|
|
5
|
+
</svg>`,a("span",{text:s,parent:i})})}function Q(d,t=[]){if(!t||t.length===0)return;const r=a("div",{className:"spot-qualifying-reasons__container",parent:d}),s=[...t].sort((o,p)=>o.rank-p.rank),i=a("div",{className:"spot-qualifying-reasons__grid",parent:r}),n={"Accident & Illness":"cross.svg","Family Emergencies":"users.svg",Layoffs:"building.svg","Jury Duty":"scale.svg","Work Travel Conflict":"briefcase.svg","Severe Weather":"umbrella.svg","Travel Interruption":"plane.svg","Military Duty":"medal.svg"};let e;try{const o=document.currentScript;if(o!=null&&o.src){const p=new URL(o.src);e=p.origin+p.pathname.replace(/\/[^/]*$/,"/")}else e=window.location.origin+window.location.pathname.replace(/\/[^/]*$/,"/");e+="assets/"}catch{e="./assets/"}s.forEach(o=>{var v,h,l;const p=a("div",{className:"spot-qualifying-reasons__item",parent:i}),m=a("div",{className:"spot-qualifying-reasons__icon-wrapper",parent:p}),f=n[((v=o.benefitType)==null?void 0:v.name)||""]||n[o.name||""];if(f){const u=a("img",{parent:m});u.src=e+f,u.alt=((h=o.benefitType)==null?void 0:h.name)||o.name||"",u.className="spot-qualifying-reasons__icon"}a("span",{className:"spot-qualifying-reasons__label",text:((l=o.benefitType)==null?void 0:l.name)||o.name||"",parent:p})})}function Z(d,t=[],r){if(t.length===0||!r||r<=1)return;const s=new Map;t.forEach(u=>{s.set(u,(s.get(u)||0)+1)});const n=Array.from(s.entries()).map(([u,c])=>({item:u,count:c,displayText:c>1?`${c} x ${u}`:u})).sort((u,c)=>{const _=u.item.charAt(0),w=c.item.charAt(0),q=/[a-zA-Z]/.test(_),g=/[a-zA-Z]/.test(w);return!q&&g?-1:q&&!g?1:u.item.localeCompare(c.item,void 0,{sensitivity:"base"})}),e=a("div",{className:"spot-covered-items__container",parent:d}),o=a("div",{className:"spot-covered-items__header",parent:e}),p=a("button",{className:"spot-covered-items__toggle",parent:o});p.type="button",a("span",{className:"spot-covered-items__title",text:`Items Covered in Your Cart (${t.length})`,parent:p});const m=a("div",{className:"spot-covered-items__right-section",parent:p});a("span",{className:"spot-covered-items__view-all",text:"View All",parent:m});const f=a("span",{className:"spot-covered-items__arrow",innerHTML:"▼",parent:m}),v=a("div",{className:"spot-covered-items__content",parent:e}),h=a("ul",{className:"spot-covered-items__list",parent:v});n.forEach(({displayText:u})=>{const c=a("li",{parent:h});a("span",{text:u,parent:c})});let l=!1;v.style.display="none",p.addEventListener("click",u=>{u.stopPropagation(),u.preventDefault(),l=!l,v.style.display=l?"block":"none",f.innerHTML=l?"▲":"▼",p.setAttribute("aria-expanded",l.toString())}),p.setAttribute("aria-expanded","false"),p.setAttribute("aria-controls","covered-items-list"),v.setAttribute("id","covered-items-list")}const B={USD:"$",CAD:"CAD $",AUD:"AUD $",NZD:"NZD $",MXN:"MXN $",EUR:"EUR €",GBP:"GBP £",AED:"AED ",MAD:"MAD ",SAR:"SAR ",BGN:"BGN лв",BRL:"BRL R$",CHF:"CHF ",DKK:"DKK kr",INR:"INR ₹",JPY:"JPY ¥",MYR:"MYR RM",NOK:"NOK kr",PLN:"PLN zł",SEK:"SEK kr",SGD:"SGD $",THB:"THB ฿",ZAR:"ZAR R"};function j(d,t=[],r="USD"){const s=B[r]??`${r} `,i=a("div",{className:"spot-table__container",parent:d}),n=a("table",{className:"spot-refund__table spot-table--dynamic",parent:i}),e=a("thead",{parent:n}),o=a("tr",{parent:e});a("th",{text:"When you cancel",parent:o}),a("th",{text:"You will receive",parent:o});const p=a("tbody",{parent:n});t.forEach(({text:m,percent:f,amount:v})=>{const h=a("tr",{parent:p});a("td",{text:m,parent:h});const l=f==="Not eligible for refund"?"Not eligible for a refund":`${s}${v} refund`;a("td",{text:l,parent:h})})}function W(d,t){const r=a("div",{className:"spot-state-dropdown__wrapper",parent:d});a("label",{className:"spot-state-dropdown__label",text:"State of Residence",parent:r});const s=a("select",{className:"spot-state-dropdown__select",parent:r});s.setAttribute("aria-label","State of Residence");const i=a("option",{text:"Select a state...",parent:s});i.value="",i.selected=!t,S.forEach(({value:e,label:o})=>{const p=a("option",{text:o,parent:s});p.value=e,e===t&&(p.selected=!0)});const n=a("option",{text:"Not a US Resident",parent:s});return n.value=E,t===E&&(n.selected=!0),a("div",{className:"spot-state-dropdown__error",text:A,parent:r}),s}function F(d,t,r,s=!1){const i=a("div",{className:`spot-selection__options${s?" spot-selection__options--disabled":""}`,parent:d}),n=a("label",{className:`spot-selection__option ${t===b.YES?"selected":""}`,parent:i}),e=a("input",{parent:n});e.type="radio",e.name="selection",e.value=b.YES,t===b.YES&&(e.checked=!0),s&&(e.disabled=!0),a("strong",{text:r.yesOptionText,parent:n}),a("span",{className:"spot-selection__recommended-tag",text:"Recommended",parent:n});const o=a("label",{className:`spot-selection__option ${t===b.NO?"selected":""}`,parent:i}),p=a("input",{parent:o});return p.type="radio",p.name="selection",p.value=b.NO,t===b.NO&&(p.checked=!0),s&&(p.disabled=!0),a("span",{text:r.noOptionText,parent:o}),i}function I(d,t){var s;const r=(s=t.communication)==null?void 0:s.paymentTerms;if(r){const i=a("div",{className:"spot-payment-terms",parent:d});return a("div",{className:"spot-payment-terms__header",text:"PAYMENT TERMS",parent:i}),a("div",{className:"spot-payment-terms__body",text:r||"",parent:i}),i}}function Y(d,t,r="top-right"){if(r==="top-right"){const o=a("div",{className:"spot-logo__top-right",parent:d});o.innerHTML=`
|
|
6
6
|
<svg width="145" height="28" viewBox="0 0 145 28" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
7
|
-
<rect width="145" height="28"/>
|
|
8
|
-
<rect x="-655" y="-270" width="819" height="325" rx="10"/>
|
|
9
|
-
<path d="M0 10C0 4.47715 4.47715 0 10 0H134.161C139.684 0 144.161 4.47715 144.161 10V18C144.161 23.5228 139.684 28 134.161 28H10C4.47716 28 0 23.5228 0 18V10Z" fill="#F3FD00"/>
|
|
10
7
|
<path d="M11.98 19V9.2H14.878C16.754 9.2 18.154 10.474 18.154 12.364C18.154 14.254 16.754 15.528 14.878 15.528H13.828V19H11.98ZM13.828 13.806H14.878C15.746 13.806 16.236 13.176 16.236 12.364C16.236 11.552 15.746 10.936 14.878 10.936H13.828V13.806ZM22.0258 19.196C20.0938 19.196 18.2178 17.894 18.2178 15.43C18.2178 12.952 20.0938 11.65 22.0258 11.65C23.9438 11.65 25.8198 12.952 25.8198 15.43C25.8198 17.894 23.9438 19.196 22.0258 19.196ZM20.0518 15.43C20.0518 16.774 20.8778 17.544 22.0258 17.544C23.1598 17.544 23.9858 16.774 23.9858 15.43C23.9858 14.072 23.1598 13.302 22.0258 13.302C20.8778 13.302 20.0518 14.072 20.0518 15.43ZM27.7226 19L25.2446 11.846H27.0926L28.7026 16.732L29.9486 11.846H31.7266L33.0146 16.746L34.5966 11.846H36.4026L33.9946 19H32.1186L30.8446 14.198L29.6266 19H27.7226ZM39.531 19.196C37.683 19.196 35.849 17.894 35.849 15.43C35.849 12.952 37.641 11.65 39.461 11.65C41.253 11.65 43.073 12.924 43.073 15.416V15.962H37.599C37.795 17.096 38.607 17.614 39.531 17.614C40.161 17.614 40.609 17.418 40.889 17.054H42.933C42.317 18.496 40.889 19.196 39.531 19.196ZM37.627 14.702H41.211C41.043 13.526 40.217 13.092 39.461 13.092C38.607 13.092 37.851 13.624 37.627 14.702ZM44.0159 19V11.846H45.7799V12.798C46.3539 12.028 47.2219 11.65 48.0759 11.65V13.47C46.5919 13.19 45.7799 13.834 45.7799 15.024V19H44.0159ZM51.967 19.196C50.119 19.196 48.285 17.894 48.285 15.43C48.285 12.952 50.077 11.65 51.897 11.65C53.689 11.65 55.509 12.924 55.509 15.416V15.962H50.035C50.231 17.096 51.043 17.614 51.967 17.614C52.597 17.614 53.045 17.418 53.325 17.054H55.369C54.753 18.496 53.325 19.196 51.967 19.196ZM50.063 14.702H53.647C53.479 13.526 52.653 13.092 51.897 13.092C51.043 13.092 50.287 13.624 50.063 14.702ZM59.4762 19.196C57.7542 19.196 56.1022 17.894 56.1022 15.43C56.1022 12.952 57.7542 11.65 59.4762 11.65C60.4842 11.65 61.3102 12.014 61.8562 12.714V9.2H63.6202V19H61.8562V18.146C61.3102 18.832 60.4842 19.196 59.4762 19.196ZM57.9362 15.43C57.9362 16.774 58.7622 17.544 59.8962 17.544C61.0442 17.544 61.8562 16.774 61.8562 15.43C61.8562 14.072 61.0442 13.302 59.8962 13.302C58.7622 13.302 57.9362 14.072 57.9362 15.43ZM72.526 19.196C71.518 19.196 70.692 18.832 70.146 18.146V19H68.382V9.2H70.146V12.714C70.692 12.014 71.518 11.65 72.526 11.65C74.248 11.65 75.9 12.952 75.9 15.43C75.9 17.894 74.248 19.196 72.526 19.196ZM70.146 15.43C70.146 16.774 70.958 17.544 72.106 17.544C73.254 17.544 74.066 16.774 74.066 15.43C74.066 14.072 73.254 13.302 72.106 13.302C70.958 13.302 70.146 14.072 70.146 15.43ZM76.9259 21.66L78.2699 18.342L75.4559 11.846H77.3879L79.2079 16.158L80.9299 11.846H82.7639L78.7599 21.66H76.9259Z" fill="#111820"/>
|
|
11
|
-
<path d="M87 15.5385C87 11.3751 90.3751 8 94.5385 8H124.867C129.03 8 132.405 11.3751 132.405 15.5385C132.405 19.7018 129.03 23.0769 124.867 23.0769H94.5385C90.3751 23.0769 87 19.7018 87 15.5385Z" fill="#F3FD00"/>
|
|
12
8
|
<g clip-path="url(#clip0_295_2094)">
|
|
13
9
|
<path d="M117.826 19.7575C116.253 19.7575 115.064 18.7369 115.064 17.2054V13.1218H113.674V11.2615H115.064V9.21918H117.172V11.2615H119.164V13.1218H117.172V17.2054C117.172 17.6501 117.373 17.8972 117.825 17.8972H119.164V19.7586H117.825M113.846 15.5591C113.846 18.4577 111.603 19.9892 109.309 19.9892C107.016 19.9892 104.757 18.4577 104.757 15.5591C104.757 12.6606 107 11.1126 109.309 11.1126C111.619 11.1126 113.846 12.6441 113.846 15.5591ZM111.653 15.5591C111.653 13.9615 110.665 13.0556 109.31 13.0556C107.956 13.0556 106.951 13.9615 106.951 15.5591C106.951 17.1568 107.939 18.0461 109.31 18.0461C110.682 18.0461 111.653 17.1403 111.653 15.5591ZM104.339 15.5591C104.339 18.4577 102.364 19.9892 100.305 19.9892C99.0996 19.9892 98.1127 19.561 97.46 18.7545V22.8877H95.3516V11.2605H97.46V12.3638C98.1127 11.5407 99.1006 11.1126 100.305 11.1126C102.364 11.1126 104.339 12.6441 104.339 15.5591ZM102.147 15.5591C102.147 13.9615 101.175 13.0556 99.8038 13.0556C98.4322 13.0556 97.461 13.9615 97.461 15.5591C97.461 17.1568 98.4322 18.0461 99.8038 18.0461C101.175 18.0461 102.147 17.1403 102.147 15.5591ZM91.0833 19.9892C93.0078 19.9892 94.8155 18.5404 94.8155 16.465C94.8155 12.0184 89.5099 13.6823 89.5099 11.3101C89.5099 10.6183 90.0123 10.1075 90.8153 10.1075C91.6183 10.1075 92.1039 10.5025 92.3214 11.2605H94.681C94.2637 9.05373 92.7744 8 90.8163 8C88.9749 8 87.2176 9.28433 87.2176 11.3597C87.2176 15.7732 92.5232 14.0773 92.5232 16.5146C92.5232 17.2395 91.9872 17.8817 91.0833 17.8817C90.1794 17.8817 89.5603 17.3874 89.3596 16.5643H87C87.3847 18.7379 88.8908 19.9892 91.0843 19.9892M126.313 19.9892C129.678 19.9892 132.406 17.3057 132.406 13.9946C132.406 10.6834 129.678 8 126.312 8C122.947 8 120.219 10.6834 120.219 13.9946C120.219 17.3057 122.947 19.9892 126.312 19.9892" fill="#111820"/>
|
|
14
10
|
</g>
|
|
@@ -32,4 +28,4 @@
|
|
|
32
28
|
<rect width="45.405" height="14.8867" fill="white" transform="translate(87 8)"/>
|
|
33
29
|
</clipPath>
|
|
34
30
|
</defs>
|
|
35
|
-
</svg>`}return s}const G=":root{--spot-font-family: Arial;--spot-padding: 1.25rem;--spot-background-color: #ffffff;--spot-font-color: #000000;--spot-border-radius: .5rem;--spot-border-line-width: .0625rem;--spot-border-color: #e0e0e0;--spot-max-width: 51rem;--spot-margin: 1rem;--spot-title-font-size: 1.25rem;--spot-title-font-weight: 700;--spot-title-padding: 0 0 1.25rem 0;--spot-description-font-size: .875rem;--spot-description-font-weight: 400;--spot-description-padding: 0 0 .5rem 0;--spot-bullets-font-size: .875rem;--spot-bullets-font-weight: 400;--spot-bullets-padding: .3125rem;--spot-bullets-checkmark-color: #2e2e2e;--spot-table-border-radius: .625rem;--spot-table-header-font-size: .875rem;--spot-table-header-font-weight: 700;--spot-table-header-padding: 0 .5rem .625rem;--spot-table-cell-font-size: .815rem;--spot-table-cell-font-weight: 400;--spot-table-cell-padding: 0 .625rem;--spot-radio-border: #000000;--spot-radio-border-radius: .625rem;--spot-radio-checked-background: #000000;--spot-radio-text-font-size: .875rem;--spot-radio-text-font-weight: 400;--spot-radio-text-padding: .625rem;--spot-radio-selection-background: #f4f4f4;--spot-radio-selection-border-radius: .625rem;--spot-radio-selection-padding: .625rem;--spot-recommended-tag-background: #000000;--spot-recommended-tag-font-color: #ffffff;--spot-recommended-tag-font-size: .875rem;--spot-recommended-tag-font-weight: 700;--spot-recommended-tag-padding: .25rem .5rem;--spot-recommended-tag-border-radius: .5rem;--spot-state-dropdown-label-font-size: .875rem;--spot-state-dropdown-label-font-weight: 600;--spot-state-dropdown-label-margin-bottom: .25rem;--spot-state-dropdown-select-border: .0625rem solid #e0e0e0;--spot-state-dropdown-select-border-radius: .375rem;--spot-state-dropdown-select-padding: .5rem .75rem;--spot-state-dropdown-select-font-size: .875rem;--spot-state-dropdown-select-background: #ffffff;--spot-state-dropdown-wrapper-margin-bottom: .75rem;--spot-state-dropdown-error-color: var(--spot-selection-error-font-color);--spot-state-dropdown-error-font-size: .8125rem;--spot-state-dropdown-error-margin-top: .25rem;--spot-selection-error-font-color: #ff0000;--spot-selection-error-font-size: .875rem;--spot-qualifying-reasons-margin: .75rem 0;--spot-qualifying-reasons-padding: 0 .3125rem;--spot-qualifying-reasons-column-gap: 3rem;--spot-qualifying-reasons-row-gap: .25rem;--spot-qualifying-reasons-grid-padding-left: 1rem;--spot-qualifying-reasons-icon-wrapper-size: 1.125rem;--spot-qualifying-reasons-icon-size: .75rem;--spot-qualifying-reasons-icon-border-color: #2e2e2e;--spot-qualifying-reasons-icon-border-width: 1px;--spot-qualifying-reasons-icon-background: #ffffff;--spot-qualifying-reasons-item-gap: .625rem;--spot-qualifying-reasons-label-font-size: .8rem;--spot-qualifying-reasons-label-font-weight: 400;--spot-qualifying-reasons-label-font-color: #000000;--spot-qualifying-reasons-label-font-family: Arial;--spot-selection-error-padding: .5rem;--spot-payment-terms-background: #f4f4f4;--spot-payment-terms-border-radius: .625rem;--spot-payment-terms-padding: 1rem;--spot-payment-terms-font-color: #636569;--spot-payment-terms-font-size: .75rem;--spot-payment-terms-header-font-weight: 700;--spot-payment-terms-header-font-size: .875rem;--spot-payment-terms-header-margin-bottom: .5rem;--spot-payment-terms-header-border-color: #c2c2c2;--spot-payment-terms-header-padding: 0 0 .5rem 0;--spot-terms-font-size: .75rem;--spot-terms-font-weight: 400;--spot-terms-font-color: #636569;--spot-terms-padding: 0;--spot-terms-link-text-decoration: underline;--spot-terms-link-font-size: .75rem;--spot-terms-link-font-weight: 400;--spot-terms-link-font-color: #636569;--spot-terms-link-padding: 0;--spot-covered-items-background: #f1f3f5;--spot-covered-items-hover-background: #e9ecef;--spot-covered-items-border-radius: .5rem;--spot-covered-items-padding: .75rem 1rem;--spot-covered-items-font-size: .875rem;--spot-covered-items-font-weight: 400;--spot-covered-items-font-color: #000000;--spot-covered-items-font-family: Arial;--spot-covered-items-arrow-font-size: .6rem;--spot-covered-items-arrow-color: #636569;--spot-covered-items-view-all-color: #636569;--spot-covered-items-view-all-font-size: .875rem;--spot-covered-items-view-all-font-weight: 400;--spot-covered-items-content-background: #f8f9fa;--spot-covered-items-content-border: 1px solid #e0e0e0;--spot-covered-items-content-border-radius: .5rem;--spot-covered-items-content-padding: .75rem 1rem;--spot-desktop-radio-margin-top: -1.5rem;--spot-benefits-margin-bottom: 0rem;--spot-covered-items-margin-bottom: 1.5rem;--spot-footer-gap: 1rem;--spot-footer-terms-margin-right: 7rem;--spot-payment-terms-margin-top: .5rem;--spot-logo-top-right-margin: 1rem}.spot-refund-guarantee{font-family:var(--spot-font-family);padding:var(--spot-padding);background-color:var(--spot-background-color);color:var(--spot-font-color);border:var(--spot-border-line-width) solid var(--spot-border-color);border-radius:var(--spot-border-radius);max-width:var(--spot-max-width);margin:var(--spot-margin);container-type:inline-size;position:relative;word-wrap:normal;overflow-wrap:normal;-webkit-hyphens:none;hyphens:none}.spot-refund-guarantee *{color:inherit}.spot-header__title{font-size:var(--spot-title-font-size);font-weight:var(--spot-title-font-weight);padding:var(--spot-title-padding);color:var(--spot-title-font-color);font-family:var(--spot-title-font-family);line-height:120%;letter-spacing:-.03125rem}.spot-header__description{font-size:var(--spot-description-font-size);font-weight:var(--spot-description-font-weight);color:var(--spot-description-font-color);font-family:var(--spot-description-font-family);padding:var(--spot-description-padding);line-height:125%;letter-spacing:-.025rem}.spot-content__wrapper{display:flex;flex-direction:column}.spot-content__wrapper.desktop-layout{display:grid;grid-template-columns:1fr auto;align-items:start;gap:1rem}.desktop-layout .spot-benefits__list,.desktop-layout .spot-qualifying-reasons__container,.desktop-layout .spot-covered-items__container,.desktop-layout .spot-selection__wrapper{min-width:0;word-wrap:normal}.desktop-layout .spot-benefits__list,.desktop-layout .spot-qualifying-reasons__container{grid-row:1;margin-bottom:var(--spot-benefits-margin-bottom)}.desktop-layout .spot-covered-items__container{grid-row:2;grid-column:1;margin-bottom:var(--spot-covered-items-margin-bottom)}.desktop-layout .spot-selection__wrapper{grid-row:3;grid-column:1;margin-top:var(--spot-desktop-radio-margin-top)}.desktop-layout .spot-payment-terms__wrapper{grid-row:4;grid-column:1;margin-top:var(--spot-payment-terms-margin-top)}.desktop-layout .spot-table__container{grid-row:1 / span 4;grid-column:2;width:auto;min-width:20.3125rem}.spot-content__wrapper:not(.desktop-layout) .spot-table__container{display:flex;justify-content:flex-start;margin-top:1rem;margin-bottom:1rem;box-sizing:border-box;padding:0 .3125rem}.spot-content__wrapper:not(.desktop-layout) .spot-refund__table{width:100%;max-width:22rem;table-layout:auto}@media (max-width: 850px){.spot-selection__recommended-tag{display:inline-block;margin-left:0}}@media (max-width: 500px){.spot-selection__recommended-tag{margin-top:.5rem}}@media (max-width: 600px){.spot-refund__table th{padding:0rem}}.spot-benefits__list{list-style-type:none;line-height:125%;gap:.5625rem;font-size:var(--spot-bullets-font-size);font-weight:var(--spot-bullets-font-weight);color:var(--spot-bullets-font-color);font-family:var(--spot-bullets-font-family);padding:var(--spot-bullets-padding);margin-block-start:0rem;margin-block-end:0rem}.spot-benefits__list li{margin-bottom:.375rem;display:flex;align-items:flex-start;gap:.5rem}.spot-benefits__list li svg{flex-shrink:0;position:relative;top:.125rem}.spot-bullets__checkmark path{stroke:var(--spot-bullets-checkmark-color)}.spot-qualifying-reasons__container{margin:var(--spot-qualifying-reasons-margin);padding:var(--spot-qualifying-reasons-padding)}.spot-qualifying-reasons__grid{display:grid;grid-template-columns:repeat(2,minmax(0,max-content));column-gap:var(--spot-qualifying-reasons-column-gap);row-gap:var(--spot-qualifying-reasons-row-gap);max-width:100%;padding-left:var(--spot-qualifying-reasons-grid-padding-left)}.spot-qualifying-reasons__item{display:flex;align-items:center;gap:var(--spot-qualifying-reasons-item-gap)}.spot-qualifying-reasons__icon-wrapper{width:var(--spot-qualifying-reasons-icon-wrapper-size);height:var(--spot-qualifying-reasons-icon-wrapper-size);border-radius:50%;border:var(--spot-qualifying-reasons-icon-border-width) solid var(--spot-qualifying-reasons-icon-border-color);background-color:var(--spot-qualifying-reasons-icon-background);display:flex;align-items:center;justify-content:center;flex-shrink:0}.spot-qualifying-reasons__icon{width:var(--spot-qualifying-reasons-icon-size);height:var(--spot-qualifying-reasons-icon-size)}.spot-qualifying-reasons__label{font-size:var(--spot-qualifying-reasons-label-font-size);font-weight:var(--spot-qualifying-reasons-label-font-weight);color:var(--spot-qualifying-reasons-label-font-color);font-family:var(--spot-qualifying-reasons-label-font-family);line-height:1.2}@media (max-width: 480px){.spot-qualifying-reasons__grid{grid-template-columns:1fr}}.spot-covered-items__container{margin-top:.85rem;margin-bottom:.5rem;max-width:26rem}.spot-content__wrapper.desktop-layout:has(.spot-table__container) .spot-covered-items__container{margin-top:0rem;margin-bottom:1rem}.spot-covered-items__title{font-size:var(--spot-covered-items-font-size);font-weight:var(--spot-covered-items-font-weight);color:var(--spot-covered-items-font-color);font-family:var(--spot-covered-items-font-family);padding:0 .3125rem .25rem;line-height:125%;margin:0}.spot-covered-items__list{list-style-type:disc;list-style-position:inside;line-height:125%;gap:.5625rem;font-size:var(--spot-bullets-font-size);font-weight:var(--spot-bullets-font-weight);color:var(--spot-bullets-font-color);font-family:var(--spot-bullets-font-family);padding:var(--spot-bullets-padding);margin-block-start:0rem;margin-block-end:0rem}.spot-covered-items__list li{margin-bottom:.3rem;text-align:left}.spot-covered-items__list li:last-child{margin-bottom:0}.spot-covered-items__header{margin-bottom:.5rem}.spot-covered-items__toggle{background:var(--spot-covered-items-background);border:none;border-radius:var(--spot-covered-items-border-radius);padding:var(--spot-covered-items-padding);cursor:pointer;display:flex;align-items:center;justify-content:space-between;width:100%;font-size:var(--spot-covered-items-font-size);font-weight:var(--spot-covered-items-font-weight);color:var(--spot-covered-items-font-color);font-family:var(--spot-covered-items-font-family);line-height:125%;transition:all .2s ease}.spot-covered-items__toggle:hover{background-color:var(--spot-covered-items-hover-background)}.spot-covered-items__toggle:focus{outline:none;box-shadow:0 0 0 2px #0000001a}.spot-covered-items__title{font-size:var(--spot-covered-items-font-size);font-weight:var(--spot-covered-items-font-weight);color:var(--spot-covered-items-font-color);font-family:var(--spot-covered-items-font-family);line-height:125%;margin:0;padding:0}.spot-covered-items__right-section{display:flex;align-items:center;gap:.5rem;margin-left:auto}.spot-covered-items__view-all{font-size:var(--spot-covered-items-view-all-font-size);font-weight:var(--spot-covered-items-view-all-font-weight);color:var(--spot-covered-items-view-all-color);font-family:var(--spot-covered-items-font-family);line-height:125%}.spot-covered-items__arrow{font-size:var(--spot-covered-items-arrow-font-size);transition:transform .2s ease;color:var(--spot-covered-items-arrow-color);flex-shrink:0;transform:scaleX(1.5)}.spot-covered-items__content{margin-top:.5rem;transition:all .2s ease;overflow:hidden}.spot-covered-items__list{background-color:var(--spot-covered-items-content-background);border:var(--spot-covered-items-content-border);border-radius:var(--spot-covered-items-content-border-radius);margin:0;padding:var(--spot-covered-items-content-padding)}.spot-table__container{width:100%}.spot-refund__table{max-width:22rem;border-radius:var(--spot-table-border-radius);overflow:hidden;border:.09375rem solid #636569;table-layout:fixed;margin-bottom:.5rem;margin-top:.25rem;padding:.625rem}.spot-refund__table--dynamic{height:auto!important;min-height:7.5rem}.spot-refund__table td,.spot-refund__table th{padding:.375rem .625rem;text-align:left}.spot-refund__table th{text-align:left;font-size:var(--spot-table-header-font-size);font-weight:var(--spot-table-header-font-weight);color:var(--spot-table-header-font-color);font-family:var(--spot-table-header-font-family);padding:var(--spot-table-header-padding)}.spot-refund__table td{text-align:left;font-size:var(--spot-table-cell-font-size);font-weight:var(--spot-table-cell-font-weight);color:var(--spot-table-cell-font-color);font-family:var(--spot-table-cell-font-family);padding:var(--spot-table-cell-padding)}.spot-state-dropdown__wrapper{display:flex;flex-direction:column;margin-bottom:var(--spot-state-dropdown-wrapper-margin-bottom)}.spot-state-dropdown__label{font-size:var(--spot-state-dropdown-label-font-size);font-weight:var(--spot-state-dropdown-label-font-weight);font-family:var(--spot-font-family);color:var(--spot-font-color);margin-bottom:var(--spot-state-dropdown-label-margin-bottom)}.spot-state-dropdown__select{width:100%;box-sizing:border-box;border:var(--spot-state-dropdown-select-border);border-radius:var(--spot-state-dropdown-select-border-radius);padding:var(--spot-state-dropdown-select-padding);font-size:var(--spot-state-dropdown-select-font-size);font-family:var(--spot-font-family);color:var(--spot-font-color);background-color:var(--spot-state-dropdown-select-background);cursor:pointer;-webkit-appearance:auto;-moz-appearance:auto;appearance:auto}.spot-state-dropdown__select:focus{outline:none;box-shadow:0 0 0 2px #00000026}.spot-state-dropdown__select--error{border-color:var(--spot-state-dropdown-error-color)}.spot-state-dropdown__select--error:focus{box-shadow:0 0 0 2px #ff000026}.spot-state-dropdown__error{display:none;color:var(--spot-state-dropdown-error-color);font-size:var(--spot-state-dropdown-error-font-size);font-family:var(--spot-font-family);margin-top:var(--spot-state-dropdown-error-margin-top)}.spot-state-dropdown__error--visible{display:block}input[type=radio]{-webkit-appearance:none;-moz-appearance:none;appearance:none;width:.75rem;height:.75rem;min-width:.75rem;border:.0625rem solid var(--spot-radio-border);border-radius:var(--spot-radio-border-radius);margin-right:.5rem;position:relative;vertical-align:middle;top:-.0625rem;cursor:pointer;flex-shrink:0}input[type=radio]:checked{background:var(--spot-radio-checked-background);box-shadow:inset 0 0 0 .0625rem #fff}.spot-selection__options{display:flex;flex-direction:column;gap:.5rem}.spot-selection__option{display:flex;align-items:center;flex-wrap:nowrap;position:relative;transition:background .2s;cursor:pointer;font-size:var(--spot-radio-text-font-size);font-weight:var(--spot-radio-text-font-weight);color:var(--spot-radio-text-font-color);font-family:var(--spot-radio-text-font-family);padding:var(--spot-radio-text-padding);margin-right:.5rem}.spot-selection__option.selected{background:var(--spot-radio-selection-background);border-radius:var(--spot-radio-selection-border-radius);padding:var(--spot-radio-selection-padding)}.spot-selection__recommended-tag{background:var(--spot-recommended-tag-background);color:var(--spot-recommended-tag-font-color);font-size:var(--spot-recommended-tag-font-size);font-weight:var(--spot-recommended-tag-font-weight);padding:var(--spot-recommended-tag-padding);border-radius:var(--spot-recommended-tag-border-radius);margin-left:.75rem;white-space:nowrap;flex-shrink:0}@media (max-width: 850px){.spot-selection__recommended-tag{margin-left:.5rem}}@media (max-width: 600px){.spot-selection__recommended-tag{margin-left:.5rem;font-size:.75rem;padding:.1875rem .4375rem}}.spot-selection__error{color:var(--spot-selection-error-font-color);font-size:var(--spot-selection-error-font-size);padding:var(--spot-selection-error-padding);display:none}.spot-selection__options--disabled .spot-selection__option{opacity:.4;cursor:not-allowed;pointer-events:none}.spot-selection__options--disabled input[type=radio]{cursor:not-allowed}.spot-payment-terms__wrapper{margin-top:1rem}.spot-payment-terms__header{font-weight:var(--spot-payment-terms-header-font-weight);margin-bottom:.5rem;padding:var(--spot-payment-terms-header-padding);font-size:var(--spot-payment-terms-header-font-size);border-bottom:1px solid var(--spot-payment-terms-header-border-color)}.spot-payment-terms{background-color:var(--spot-payment-terms-background);border-radius:var(--spot-payment-terms-border-radius);padding:var(--spot-payment-terms-padding);color:var(--spot-payment-terms-font-color);font-size:var(--spot-payment-terms-font-size)}.spot-footer__terms{margin-top:.625rem;margin-right:.25rem;font-size:var(--spot-terms-font-size);font-weight:var(--spot-terms-font-weight);color:var(--spot-terms-font-color);font-family:var(--spot-terms-font-family);padding:var(--spot-terms-padding);line-height:1.4;word-wrap:normal;-webkit-hyphens:none;hyphens:none;flex:1;min-width:0;overflow-wrap:normal}.spot-footer__terms-link{text-decoration:var(--spot-terms-link-text-decoration);font-size:var(--spot-terms-link-font-size);font-weight:var(--spot-terms-link-font-weight);color:var(--spot-terms-link-font-color);font-family:var(--spot-terms-link-font-family);padding:var(--spot-terms-link-padding)}.spot-footer__container{display:flex;flex-direction:row;justify-content:space-between;align-items:flex-start;flex-wrap:nowrap;gap:var(--spot-footer-gap)}@container (max-width: 650px){.spot-footer__container{flex-direction:column!important;align-items:flex-start!important;flex-wrap:wrap!important}.spot-footer__terms{margin-right:0!important;margin-bottom:.5rem!important;flex:none!important;width:100%!important;max-width:none!important}}@media (max-width: 650px){.spot-footer__container{flex-direction:column!important;align-items:flex-start!important;flex-wrap:wrap!important}.spot-footer__terms{margin-right:0!important;margin-bottom:.5rem!important;flex:none!important;width:100%!important;max-width:none!important}}.spot-footer__powered-by{margin-top:0;flex-shrink:0}.spot-logo__top-right{position:absolute;top:-14px;right:40px;z-index:10;background:linear-gradient(to bottom,transparent 50%,inherit 50%);padding:0 .25rem}.spot-logo__top-right svg{border-radius:1.25rem;border:var(--spot-border-line-width) solid var(--spot-border-color);display:block;background:var(--spot-background-color)}@container (min-width: 651px){.spot-footer__powered-by{margin-top:0;align-self:center}.spot-footer__terms{margin-right:var(--spot-footer-terms-margin-right)}}@media (min-width: 651px){.spot-footer__powered-by{margin-top:0;align-self:center}.spot-footer__terms{margin-right:var(--spot-footer-terms-margin-right)}}";function K(d){const t=document.createElement("style");t.textContent=d,document.head.appendChild(t)}K(G);const M={sandbox:"https://api.sandbox.getspot.com/api/v1/quote",production:"https://api.getspot.com/api/v1/quote",local:"http://localhost:3999/api/v1/quote"};class X{constructor(t={}){this._destroyed=!1,this.options={location:"body",showTable:!0,logoPosition:"bottom-right",apiConfig:{environment:"production",partnerId:""},quoteRequestData:{},callbacks:{},useMockData:!1,...t,selection:t.selection??b.UNSELECTED},this._onResize=this._updateLayout.bind(this),this.root=typeof this.options.location=="string"?document.querySelector(this.options.location):this.options.location,this.currentSelection=this.options.selection,this._init()}async _init(){var t,r,s,i,n;try{N(this.options),this.currentState=this.options.state;let e;if(this.options.useMockData&&this.options.mockData)e=this.options.mockData;else{const{environment:o,partnerId:p}=this.options.apiConfig,f=this.options.apiConfig.customEndpoint||M[o];e="items"in this.options.quoteRequestData?await D(f,p,this.options.quoteRequestData,this._validState()):await k(f,p,this.options.quoteRequestData,this._validState())}if(this._destroyed)return;if(e.status!=="QUOTE_AVAILABLE"){e.status==="NO_MATCHING_QUOTE"&&((t=this.options.callbacks)!=null&&t.noMatchingQuote)&&this.options.callbacks.noMatchingQuote({status:"NO_MATCHING_QUOTE",data:this.options.quoteRequestData});return}if(this.quote=e.data,!this.quote)throw new Error("No quote data in response");if(this._renderWidget(),this.options.selection===b.YES&&((r=this.options.callbacks)!=null&&r.onOptIn)){const o={status:"QUOTE_ACCEPTED",spotPrice:this.quote.spotPrice,quoteId:this.quote.id,state:this._validState()};if(this.quote.originalQuotes&&this.quote.originalQuotes.length>0){const p=this.options.quoteRequestData;o.batchQuoteDetails=this.quote.originalQuotes.map(m=>{var v;const f=(v=p.items)==null?void 0:v.find(h=>(h.cartItemId||`item-${p.items.indexOf(h)+1}`)===m.cartItemId);return{quoteId:m.id,productPrice:(f==null?void 0:f.productPrice)||m.spotPrice,cartItemId:(f==null?void 0:f.cartItemId)||""}})}this.options.callbacks.onOptIn(o)}if((s=this.options.callbacks)!=null&&s.onQuoteRetrieved){const o=this.options.callbacks.onQuoteRetrieved(this.quote);o&&this._applyQuoteUpdates(o)}}catch(e){if(this._destroyed)return;if((i=this.options.callbacks)!=null&&i.onError){const o=e;(n=this.options.callbacks)==null||n.onError({message:o.message,status:o.status,responseBody:o.responseBody})}}}_renderWidget(){if(!this.quote)return;this.container=document.createElement("div"),this.container.className="spot-refund-guarantee",this.root.appendChild(this.container),Object.entries(this.options.theme||{}).forEach(([e,o])=>{const p=`--${e}`;this.container.style.setProperty(p,o)}),V(this.container,this.quote.communication);const t=document.createElement("div");if(t.className="spot-content__wrapper",this.container.appendChild(t),this.quote.qualifyingReasons?Q(t,this.quote.qualifyingReasons):U(t,this.quote.communication.bulletPoints),this.quote.coveredItems){const e=this._getTotalItemsInRequest();Z(t,this.quote.coveredItems,e)}this.options.showTable&&!this.quote.qualifyingReasons&&j(t,this.quote.payoutSchedule,this.quote.currencyCode);const r=a("div",{className:"spot-selection__wrapper",parent:t});this._isPassOrTrip()&&!this.options.state&&(this._stateSelectEl=F(r,this.currentState),this._setNonUsResidentError(this.currentState===E));const i=!this._isQuotingAvailable(),n=W(r,this.currentSelection,this.quote.communication,i);this.paymentTermsEl=a("div",{className:"spot-payment-terms__wrapper",parent:t}),this.currentSelection===b.YES&&I(this.paymentTermsEl,this.quote),Y(this.container,this.quote,this.options.logoPosition),window.addEventListener("resize",this._onResize),this._setupResizeObserver(),this._updateLayout(),this._setupOptionListeners(n),this._setupStateDropdownListener()}_updateLayout(){if(!this.container||!this.quote)return;const t=this.container.querySelector(".spot-content__wrapper"),r=this.options.showTable&&!this.quote.qualifyingReasons;if(!t||!r){t==null||t.classList.remove("desktop-layout");return}const s=this._shouldUseDesktopLayout(t);t.classList.toggle("desktop-layout",s)}_shouldUseDesktopLayout(t){const r=this.container.offsetWidth-40,s=325,i=16;if(r>=900)return!0;if(r>=650){const n=t.classList.contains("desktop-layout");t.classList.remove("desktop-layout"),t.offsetHeight;const e=t.querySelector(".spot-benefits__list, .spot-qualifying-reasons__container");if(!e)return n&&t.classList.add("desktop-layout"),n;const p=Math.min(e.scrollWidth,400)+s+i;return n&&t.classList.add("desktop-layout"),r>=p}return!1}_setupResizeObserver(){!this.container||!window.ResizeObserver||(this._resizeObserver=new ResizeObserver(()=>{this._resizeTimeout&&clearTimeout(this._resizeTimeout),this._resizeTimeout=window.setTimeout(()=>{this._updateLayout()},100)}),this._resizeObserver.observe(this.container))}_getTotalItemsInRequest(){return"items"in this.options.quoteRequestData?this.options.quoteRequestData.items.length:1}_applyQuoteUpdates(t){!this.quote||!this.container||(t.spotPriceWithFees!==void 0&&(this.quote.communication.yesOptionText=this.quote.communication.yesOptionText.replace(`$${this.quote.spotPrice.toFixed(2)}`,`$${t.spotPriceWithFees.toFixed(2)}`)),this._teardownDom(),this._renderWidget())}_isPassOrTrip(){const t=this.options.quoteRequestData;if(Array.isArray(t))return t.some(s=>s.productType==="Pass"||s.productType==="Trip");if("items"in t)return t.items.some(s=>s.productType==="Pass"||s.productType==="Trip");const r=t;return r.productType==="Pass"||r.productType==="Trip"}_validState(){if(this._isPassOrTrip()&&!(!this.currentState||this.currentState===E))return this.currentState}_isQuotingAvailable(){return!this._isPassOrTrip()||this.options.state?!0:!!this.currentState&&this.currentState!==E}_setRadiosDisabled(t){var i,n,e;const r=(i=this.container)==null?void 0:i.querySelectorAll('input[name="selection"]'),s=(n=this.container)==null?void 0:n.querySelector(".spot-selection__options");r==null||r.forEach(o=>{o.disabled=t}),s==null||s.classList.toggle("spot-selection__options--disabled",t),t&&(r==null||r.forEach(o=>{o.checked=!1}),(e=this.container)==null||e.querySelectorAll(".spot-selection__option").forEach(o=>{o.classList.remove("selected")}),this.currentSelection=b.UNSELECTED,this.paymentTermsEl&&(this.paymentTermsEl.innerHTML=""))}_setNonUsResidentError(t){var s;if(!this._stateSelectEl)return;this._stateSelectEl.classList.toggle("spot-state-dropdown__select--error",t);const r=(s=this._stateSelectEl.parentElement)==null?void 0:s.querySelector(".spot-state-dropdown__error");r==null||r.classList.toggle("spot-state-dropdown__error--visible",t)}_setupStateDropdownListener(){this._stateSelectEl&&this._stateSelectEl.addEventListener("change",()=>{this.currentState=this._stateSelectEl.value,this._setRadiosDisabled(!this._isQuotingAvailable()),this._setNonUsResidentError(this.currentState===E)})}_setupOptionListeners(t){const r=t.querySelectorAll('input[type="radio"]'),s=t.querySelectorAll(".spot-selection__option");r.forEach(i=>{i.addEventListener("change",n=>{var p,m,f,v;const e=n.target,o=e.value;if(this.hideSelectionError(),this.currentSelection=o,s.forEach(h=>h.classList.remove("selected")),(p=e.closest(".spot-selection__option"))==null||p.classList.add("selected"),this.paymentTermsEl&&(this.paymentTermsEl.innerHTML=""),o===b.YES&&((m=this.quote)!=null&&m.communication.paymentTerms&&I(this.paymentTermsEl,this.quote),(f=this.options.callbacks)!=null&&f.onOptIn)){const h={status:"QUOTE_ACCEPTED",spotPrice:this.quote.spotPrice,quoteId:this.quote.id,state:this._validState()};if(this.quote.originalQuotes&&this.quote.originalQuotes.length>0){const l=this.options.quoteRequestData;h.batchQuoteDetails=this.quote.originalQuotes.map(u=>{var _;const c=(_=l.items)==null?void 0:_.find(w=>(w.cartItemId||`item-${l.items.indexOf(w)+1}`)===u.cartItemId);return{quoteId:u.id,productPrice:(c==null?void 0:c.productPrice)||u.spotPrice,cartItemId:(c==null?void 0:c.cartItemId)||""}})}this.options.callbacks.onOptIn(h)}if(o===b.NO&&((v=this.options.callbacks)!=null&&v.onOptOut)){const h={status:"QUOTE_DECLINED",quoteId:this.quote.id,state:this._validState()};if(this.quote.originalQuotes&&this.quote.originalQuotes.length>0){const l=this.options.quoteRequestData;h.batchQuoteDetails=this.quote.originalQuotes.map(u=>{var _;const c=(_=l.items)==null?void 0:_.find(w=>(w.cartItemId||`item-${l.items.indexOf(w)+1}`)===u.cartItemId);return{quoteId:u.id,productPrice:(c==null?void 0:c.productPrice)||u.spotPrice,cartItemId:(c==null?void 0:c.cartItemId)||""}})}this.options.callbacks.onOptOut(h)}})})}showSelectionError(){var t;if(!this.errorEl){this.errorEl=document.createElement("div"),this.errorEl.className="spot-selection__error",this.errorEl.textContent="Please make a selection";const r=(t=this.container)==null?void 0:t.querySelector(".spot-selection__options");r&&r.insertAdjacentElement("afterend",this.errorEl)}this.errorEl.style.display="block"}hideSelectionError(){this.errorEl&&(this.errorEl.style.display="none")}validateSelection(){if(!this.container)return!1;const t=!!this.container.querySelector('input[name="selection"]:checked');return t?this.hideSelectionError():this.showSelectionError(),t}async updateQuote(t){var r,s,i,n;if(this._destroyed)return!1;try{const e={...this.options,quoteRequestData:t};N(e);const{environment:o,partnerId:p,customEndpoint:m}=this.options.apiConfig,f=m||M[o],h="items"in e.quoteRequestData?await D(f,p,e.quoteRequestData,this._validState()):await k(f,p,e.quoteRequestData,this._validState());if(this._destroyed)return!1;if(h.status!=="QUOTE_AVAILABLE")return this._teardownDom(),h.status==="NO_MATCHING_QUOTE"&&((r=this.options.callbacks)!=null&&r.noMatchingQuote)&&this.options.callbacks.noMatchingQuote({status:"NO_MATCHING_QUOTE",data:e.quoteRequestData}),!1;if(this.options.quoteRequestData=e.quoteRequestData,this.quote=h.data,this._teardownDom(),this._renderWidget(),(s=this.options.callbacks)!=null&&s.onQuoteRetrieved){const l=this.options.callbacks.onQuoteRetrieved(this.quote);l&&this._applyQuoteUpdates(l)}return!0}catch(e){if(this._destroyed)return!1;const o=e;return(n=(i=this.options.callbacks)==null?void 0:i.onError)==null||n.call(i,{message:o.message,status:o.status,responseBody:o.responseBody}),!1}}getSelection(){var r,s,i;if(this.currentSelection==null||this.currentSelection==b.UNSELECTED)return null;const t={selection:this.currentSelection,quoteId:(r=this.quote)==null?void 0:r.id,spotPrice:(s=this.quote)==null?void 0:s.spotPrice,status:this.currentSelection===b.YES?"QUOTE_ACCEPTED":"QUOTE_DECLINED",state:this.currentState};if((i=this.quote)!=null&&i.originalQuotes&&this.quote.originalQuotes.length>0){const n=this.options.quoteRequestData;t.batchQuoteDetails=this.quote.originalQuotes.map(e=>{var p;const o=(p=n.items)==null?void 0:p.find(m=>(m.cartItemId||`item-${n.items.indexOf(m)+1}`)===e.cartItemId);return{quoteId:e.id,productPrice:(o==null?void 0:o.productPrice)||e.spotPrice,cartItemId:(o==null?void 0:o.cartItemId)||""}})}return t}destroy(){this._destroyed=!0,this._teardownDom()}_teardownDom(){window.removeEventListener("resize",this._onResize),this._resizeObserver&&(this._resizeObserver.disconnect(),this._resizeObserver=void 0),this._resizeTimeout&&window.clearTimeout(this._resizeTimeout),this.container&&this.container.parentNode&&this.container.parentNode.removeChild(this.container)}}C.NON_US_RESIDENT_VALUE=E,C.SelectionEnum=b,C.default=X,Object.defineProperties(C,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
31
|
+
</svg>`}return s}const G=":root{--spot-font-family: Arial;--spot-padding: 1.25rem;--spot-background-color: #ffffff;--spot-font-color: #000000;--spot-border-radius: .5rem;--spot-border-line-width: .0625rem;--spot-border-color: #e0e0e0;--spot-logo-background-color: #f3fd00;--spot-max-width: 51rem;--spot-margin: 1rem;--spot-title-font-size: 1.25rem;--spot-title-font-weight: 700;--spot-title-padding: 0 0 1.25rem 0;--spot-description-font-size: .875rem;--spot-description-font-weight: 400;--spot-description-padding: 0 0 .5rem 0;--spot-bullets-font-size: .875rem;--spot-bullets-font-weight: 400;--spot-bullets-padding: .3125rem;--spot-bullets-checkmark-color: #2e2e2e;--spot-table-border-radius: .625rem;--spot-table-header-font-size: .875rem;--spot-table-header-font-weight: 700;--spot-table-header-padding: 0 .5rem .625rem;--spot-table-cell-font-size: .815rem;--spot-table-cell-font-weight: 400;--spot-table-cell-padding: 0 .625rem;--spot-radio-border: #000000;--spot-radio-border-radius: .625rem;--spot-radio-checked-background: #000000;--spot-radio-text-font-size: .875rem;--spot-radio-text-font-weight: 400;--spot-radio-text-padding: .625rem;--spot-radio-selection-background: #f4f4f4;--spot-radio-selection-border-radius: .625rem;--spot-radio-selection-padding: .625rem;--spot-recommended-tag-background: #000000;--spot-recommended-tag-font-color: #ffffff;--spot-recommended-tag-font-size: .875rem;--spot-recommended-tag-font-weight: 700;--spot-recommended-tag-padding: .25rem .5rem;--spot-recommended-tag-border-radius: .5rem;--spot-state-dropdown-label-font-size: .875rem;--spot-state-dropdown-label-font-weight: 600;--spot-state-dropdown-label-margin-bottom: .25rem;--spot-state-dropdown-select-border: .0625rem solid #e0e0e0;--spot-state-dropdown-select-border-radius: .375rem;--spot-state-dropdown-select-padding: .5rem .75rem;--spot-state-dropdown-select-font-size: .875rem;--spot-state-dropdown-select-background: #ffffff;--spot-state-dropdown-wrapper-margin-bottom: .75rem;--spot-state-dropdown-error-color: var(--spot-selection-error-font-color);--spot-state-dropdown-error-font-size: .8125rem;--spot-state-dropdown-error-margin-top: .25rem;--spot-selection-error-font-color: #ff0000;--spot-selection-error-font-size: .875rem;--spot-qualifying-reasons-margin: .75rem 0;--spot-qualifying-reasons-padding: 0 .3125rem;--spot-qualifying-reasons-column-gap: 3rem;--spot-qualifying-reasons-row-gap: .25rem;--spot-qualifying-reasons-grid-padding-left: 1rem;--spot-qualifying-reasons-icon-wrapper-size: 1.125rem;--spot-qualifying-reasons-icon-size: .75rem;--spot-qualifying-reasons-icon-border-color: #2e2e2e;--spot-qualifying-reasons-icon-border-width: 1px;--spot-qualifying-reasons-icon-background: #ffffff;--spot-qualifying-reasons-item-gap: .625rem;--spot-qualifying-reasons-label-font-size: .8rem;--spot-qualifying-reasons-label-font-weight: 400;--spot-qualifying-reasons-label-font-color: #000000;--spot-qualifying-reasons-label-font-family: Arial;--spot-selection-error-padding: .5rem;--spot-payment-terms-background: #f4f4f4;--spot-payment-terms-border-radius: .625rem;--spot-payment-terms-padding: 1rem;--spot-payment-terms-font-color: #636569;--spot-payment-terms-font-size: .75rem;--spot-payment-terms-header-font-weight: 700;--spot-payment-terms-header-font-size: .875rem;--spot-payment-terms-header-margin-bottom: .5rem;--spot-payment-terms-header-border-color: #c2c2c2;--spot-payment-terms-header-padding: 0 0 .5rem 0;--spot-terms-font-size: .75rem;--spot-terms-font-weight: 400;--spot-terms-font-color: #636569;--spot-terms-padding: 0;--spot-terms-link-text-decoration: underline;--spot-terms-link-font-size: .75rem;--spot-terms-link-font-weight: 400;--spot-terms-link-font-color: #636569;--spot-terms-link-padding: 0;--spot-covered-items-background: #f1f3f5;--spot-covered-items-hover-background: #e9ecef;--spot-covered-items-border-radius: .5rem;--spot-covered-items-padding: .75rem 1rem;--spot-covered-items-font-size: .875rem;--spot-covered-items-font-weight: 400;--spot-covered-items-font-color: #000000;--spot-covered-items-font-family: Arial;--spot-covered-items-arrow-font-size: .6rem;--spot-covered-items-arrow-color: #636569;--spot-covered-items-view-all-color: #636569;--spot-covered-items-view-all-font-size: .875rem;--spot-covered-items-view-all-font-weight: 400;--spot-covered-items-content-background: #f8f9fa;--spot-covered-items-content-border: 1px solid #e0e0e0;--spot-covered-items-content-border-radius: .5rem;--spot-covered-items-content-padding: .75rem 1rem;--spot-desktop-radio-margin-top: -1.5rem;--spot-benefits-margin-bottom: 0rem;--spot-covered-items-margin-bottom: 1.5rem;--spot-footer-gap: 1rem;--spot-footer-terms-margin-right: 7rem;--spot-payment-terms-margin-top: .5rem;--spot-logo-top-right-margin: 1rem}.spot-refund-guarantee{font-family:var(--spot-font-family);padding:var(--spot-padding);background-color:var(--spot-background-color);color:var(--spot-font-color);border:var(--spot-border-line-width) solid var(--spot-border-color);border-radius:var(--spot-border-radius);max-width:var(--spot-max-width);margin:var(--spot-margin);container-type:inline-size;position:relative;word-wrap:normal;overflow-wrap:normal;-webkit-hyphens:none;hyphens:none}.spot-refund-guarantee *{color:inherit}.spot-header__title{font-size:var(--spot-title-font-size);font-weight:var(--spot-title-font-weight);padding:var(--spot-title-padding);color:var(--spot-title-font-color);font-family:var(--spot-title-font-family);line-height:120%;letter-spacing:-.03125rem}.spot-header__description{font-size:var(--spot-description-font-size);font-weight:var(--spot-description-font-weight);color:var(--spot-description-font-color);font-family:var(--spot-description-font-family);padding:var(--spot-description-padding);line-height:125%;letter-spacing:-.025rem}.spot-content__wrapper{display:flex;flex-direction:column}.spot-content__wrapper.desktop-layout{display:grid;grid-template-columns:1fr auto;align-items:start;gap:1rem}.desktop-layout .spot-benefits__list,.desktop-layout .spot-qualifying-reasons__container,.desktop-layout .spot-covered-items__container,.desktop-layout .spot-selection__wrapper{min-width:0;word-wrap:normal}.desktop-layout .spot-benefits__list,.desktop-layout .spot-qualifying-reasons__container{grid-row:1;margin-bottom:var(--spot-benefits-margin-bottom)}.desktop-layout .spot-covered-items__container{grid-row:2;grid-column:1;margin-bottom:var(--spot-covered-items-margin-bottom)}.desktop-layout .spot-selection__wrapper{grid-row:3;grid-column:1;margin-top:var(--spot-desktop-radio-margin-top)}.desktop-layout .spot-payment-terms__wrapper{grid-row:4;grid-column:1;margin-top:var(--spot-payment-terms-margin-top)}.desktop-layout .spot-table__container{grid-row:1 / span 4;grid-column:2;width:auto;min-width:20.3125rem}.spot-content__wrapper:not(.desktop-layout) .spot-table__container{display:flex;justify-content:flex-start;margin-top:1rem;margin-bottom:1rem;box-sizing:border-box;padding:0 .3125rem}.spot-content__wrapper:not(.desktop-layout) .spot-refund__table{width:100%;max-width:22rem;table-layout:auto}@media (max-width: 850px){.spot-selection__recommended-tag{display:inline-block;margin-left:0}}@media (max-width: 500px){.spot-selection__recommended-tag{margin-top:.5rem}}@media (max-width: 600px){.spot-refund__table th{padding:0rem}}.spot-benefits__list{list-style-type:none;line-height:125%;gap:.5625rem;font-size:var(--spot-bullets-font-size);font-weight:var(--spot-bullets-font-weight);color:var(--spot-bullets-font-color);font-family:var(--spot-bullets-font-family);padding:var(--spot-bullets-padding);margin-block-start:0rem;margin-block-end:0rem}.spot-benefits__list li{margin-bottom:.375rem;display:flex;align-items:flex-start;gap:.5rem}.spot-benefits__list li svg{flex-shrink:0;position:relative;top:.125rem}.spot-bullets__checkmark path{stroke:var(--spot-bullets-checkmark-color)}.spot-qualifying-reasons__container{margin:var(--spot-qualifying-reasons-margin);padding:var(--spot-qualifying-reasons-padding)}.spot-qualifying-reasons__grid{display:grid;grid-template-columns:repeat(2,minmax(0,max-content));column-gap:var(--spot-qualifying-reasons-column-gap);row-gap:var(--spot-qualifying-reasons-row-gap);max-width:100%;padding-left:var(--spot-qualifying-reasons-grid-padding-left)}.spot-qualifying-reasons__item{display:flex;align-items:center;gap:var(--spot-qualifying-reasons-item-gap)}.spot-qualifying-reasons__icon-wrapper{width:var(--spot-qualifying-reasons-icon-wrapper-size);height:var(--spot-qualifying-reasons-icon-wrapper-size);border-radius:50%;border:var(--spot-qualifying-reasons-icon-border-width) solid var(--spot-qualifying-reasons-icon-border-color);background-color:var(--spot-qualifying-reasons-icon-background);display:flex;align-items:center;justify-content:center;flex-shrink:0}.spot-qualifying-reasons__icon{width:var(--spot-qualifying-reasons-icon-size);height:var(--spot-qualifying-reasons-icon-size)}.spot-qualifying-reasons__label{font-size:var(--spot-qualifying-reasons-label-font-size);font-weight:var(--spot-qualifying-reasons-label-font-weight);color:var(--spot-qualifying-reasons-label-font-color);font-family:var(--spot-qualifying-reasons-label-font-family);line-height:1.2}@media (max-width: 480px){.spot-qualifying-reasons__grid{grid-template-columns:1fr}}.spot-covered-items__container{margin-top:.85rem;margin-bottom:.5rem;max-width:26rem}.spot-content__wrapper.desktop-layout:has(.spot-table__container) .spot-covered-items__container{margin-top:0rem;margin-bottom:1rem}.spot-covered-items__title{font-size:var(--spot-covered-items-font-size);font-weight:var(--spot-covered-items-font-weight);color:var(--spot-covered-items-font-color);font-family:var(--spot-covered-items-font-family);padding:0 .3125rem .25rem;line-height:125%;margin:0}.spot-covered-items__list{list-style-type:disc;list-style-position:inside;line-height:125%;gap:.5625rem;font-size:var(--spot-bullets-font-size);font-weight:var(--spot-bullets-font-weight);color:var(--spot-bullets-font-color);font-family:var(--spot-bullets-font-family);padding:var(--spot-bullets-padding);margin-block-start:0rem;margin-block-end:0rem}.spot-covered-items__list li{margin-bottom:.3rem;text-align:left}.spot-covered-items__list li:last-child{margin-bottom:0}.spot-covered-items__header{margin-bottom:.5rem}.spot-covered-items__toggle{background:var(--spot-covered-items-background);border:none;border-radius:var(--spot-covered-items-border-radius);padding:var(--spot-covered-items-padding);cursor:pointer;display:flex;align-items:center;justify-content:space-between;width:100%;font-size:var(--spot-covered-items-font-size);font-weight:var(--spot-covered-items-font-weight);color:var(--spot-covered-items-font-color);font-family:var(--spot-covered-items-font-family);line-height:125%;transition:all .2s ease}.spot-covered-items__toggle:hover{background-color:var(--spot-covered-items-hover-background)}.spot-covered-items__toggle:focus{outline:none;box-shadow:0 0 0 2px #0000001a}.spot-covered-items__title{font-size:var(--spot-covered-items-font-size);font-weight:var(--spot-covered-items-font-weight);color:var(--spot-covered-items-font-color);font-family:var(--spot-covered-items-font-family);line-height:125%;margin:0;padding:0}.spot-covered-items__right-section{display:flex;align-items:center;gap:.5rem;margin-left:auto}.spot-covered-items__view-all{font-size:var(--spot-covered-items-view-all-font-size);font-weight:var(--spot-covered-items-view-all-font-weight);color:var(--spot-covered-items-view-all-color);font-family:var(--spot-covered-items-font-family);line-height:125%}.spot-covered-items__arrow{font-size:var(--spot-covered-items-arrow-font-size);transition:transform .2s ease;color:var(--spot-covered-items-arrow-color);flex-shrink:0;transform:scaleX(1.5)}.spot-covered-items__content{margin-top:.5rem;transition:all .2s ease;overflow:hidden}.spot-covered-items__list{background-color:var(--spot-covered-items-content-background);border:var(--spot-covered-items-content-border);border-radius:var(--spot-covered-items-content-border-radius);margin:0;padding:var(--spot-covered-items-content-padding)}.spot-table__container{width:100%}.spot-refund__table{max-width:22rem;border-radius:var(--spot-table-border-radius);overflow:hidden;border:.09375rem solid #636569;table-layout:fixed;margin-bottom:.5rem;margin-top:.25rem;padding:.625rem}.spot-refund__table--dynamic{height:auto!important;min-height:7.5rem}.spot-refund__table td,.spot-refund__table th{padding:.375rem .625rem;text-align:left}.spot-refund__table th{text-align:left;font-size:var(--spot-table-header-font-size);font-weight:var(--spot-table-header-font-weight);color:var(--spot-table-header-font-color);font-family:var(--spot-table-header-font-family);padding:var(--spot-table-header-padding)}.spot-refund__table td{text-align:left;font-size:var(--spot-table-cell-font-size);font-weight:var(--spot-table-cell-font-weight);color:var(--spot-table-cell-font-color);font-family:var(--spot-table-cell-font-family);padding:var(--spot-table-cell-padding)}.spot-state-dropdown__wrapper{display:flex;flex-direction:column;margin-bottom:var(--spot-state-dropdown-wrapper-margin-bottom)}.spot-state-dropdown__label{font-size:var(--spot-state-dropdown-label-font-size);font-weight:var(--spot-state-dropdown-label-font-weight);font-family:var(--spot-font-family);color:var(--spot-font-color);margin-bottom:var(--spot-state-dropdown-label-margin-bottom)}.spot-state-dropdown__select{width:100%;box-sizing:border-box;border:var(--spot-state-dropdown-select-border);border-radius:var(--spot-state-dropdown-select-border-radius);padding:var(--spot-state-dropdown-select-padding);font-size:var(--spot-state-dropdown-select-font-size);font-family:var(--spot-font-family);color:var(--spot-font-color);background-color:var(--spot-state-dropdown-select-background);cursor:pointer;-webkit-appearance:auto;-moz-appearance:auto;appearance:auto}.spot-state-dropdown__select:focus{outline:none;box-shadow:0 0 0 2px #00000026}.spot-state-dropdown__select--error{border-color:var(--spot-state-dropdown-error-color)}.spot-state-dropdown__select--error:focus{box-shadow:0 0 0 2px #ff000026}.spot-state-dropdown__error{display:none;color:var(--spot-state-dropdown-error-color);font-size:var(--spot-state-dropdown-error-font-size);font-family:var(--spot-font-family);margin-top:var(--spot-state-dropdown-error-margin-top)}.spot-state-dropdown__error--visible{display:block}input[type=radio]{-webkit-appearance:none;-moz-appearance:none;appearance:none;width:.75rem;height:.75rem;min-width:.75rem;border:.0625rem solid var(--spot-radio-border);border-radius:var(--spot-radio-border-radius);margin-right:.5rem;position:relative;vertical-align:middle;top:-.0625rem;cursor:pointer;flex-shrink:0}input[type=radio]:checked{background:var(--spot-radio-checked-background);box-shadow:inset 0 0 0 .0625rem #fff}.spot-selection__options{display:flex;flex-direction:column;gap:.5rem}.spot-selection__option{display:flex;align-items:center;flex-wrap:nowrap;position:relative;transition:background .2s;cursor:pointer;font-size:var(--spot-radio-text-font-size);font-weight:var(--spot-radio-text-font-weight);color:var(--spot-radio-text-font-color);font-family:var(--spot-radio-text-font-family);padding:var(--spot-radio-text-padding);margin-right:.5rem}.spot-selection__option.selected{background:var(--spot-radio-selection-background);border-radius:var(--spot-radio-selection-border-radius);padding:var(--spot-radio-selection-padding)}.spot-selection__recommended-tag{background:var(--spot-recommended-tag-background);color:var(--spot-recommended-tag-font-color);font-size:var(--spot-recommended-tag-font-size);font-weight:var(--spot-recommended-tag-font-weight);padding:var(--spot-recommended-tag-padding);border-radius:var(--spot-recommended-tag-border-radius);margin-left:.75rem;white-space:nowrap;flex-shrink:0}@media (max-width: 850px){.spot-selection__recommended-tag{margin-left:.5rem}}@media (max-width: 600px){.spot-selection__recommended-tag{margin-left:.5rem;font-size:.75rem;padding:.1875rem .4375rem}}.spot-selection__error{color:var(--spot-selection-error-font-color);font-size:var(--spot-selection-error-font-size);padding:var(--spot-selection-error-padding);display:none}.spot-selection__options--disabled .spot-selection__option{opacity:.4;cursor:not-allowed;pointer-events:none}.spot-selection__options--disabled input[type=radio]{cursor:not-allowed}.spot-payment-terms__wrapper{margin-top:1rem}.spot-payment-terms__header{font-weight:var(--spot-payment-terms-header-font-weight);margin-bottom:.5rem;padding:var(--spot-payment-terms-header-padding);font-size:var(--spot-payment-terms-header-font-size);border-bottom:1px solid var(--spot-payment-terms-header-border-color)}.spot-payment-terms{background-color:var(--spot-payment-terms-background);border-radius:var(--spot-payment-terms-border-radius);padding:var(--spot-payment-terms-padding);color:var(--spot-payment-terms-font-color);font-size:var(--spot-payment-terms-font-size)}.spot-footer__terms{margin-top:.625rem;margin-right:.25rem;font-size:var(--spot-terms-font-size);font-weight:var(--spot-terms-font-weight);color:var(--spot-terms-font-color);font-family:var(--spot-terms-font-family);padding:var(--spot-terms-padding);line-height:1.4;word-wrap:normal;-webkit-hyphens:none;hyphens:none;flex:1;min-width:0;overflow-wrap:normal}.spot-footer__terms-link{text-decoration:var(--spot-terms-link-text-decoration);font-size:var(--spot-terms-link-font-size);font-weight:var(--spot-terms-link-font-weight);color:var(--spot-terms-link-font-color);font-family:var(--spot-terms-link-font-family);padding:var(--spot-terms-link-padding)}.spot-footer__container{display:flex;flex-direction:row;justify-content:space-between;align-items:flex-start;flex-wrap:nowrap;gap:var(--spot-footer-gap)}@container (max-width: 650px){.spot-footer__container{flex-direction:column!important;align-items:flex-start!important;flex-wrap:wrap!important}.spot-footer__terms{margin-right:0!important;margin-bottom:.5rem!important;flex:none!important;width:100%!important;max-width:none!important}}@media (max-width: 650px){.spot-footer__container{flex-direction:column!important;align-items:flex-start!important;flex-wrap:wrap!important}.spot-footer__terms{margin-right:0!important;margin-bottom:.5rem!important;flex:none!important;width:100%!important;max-width:none!important}}.spot-footer__powered-by{margin-top:0;flex-shrink:0}.spot-logo__top-right{position:absolute;top:-14px;right:5%;z-index:10;background:linear-gradient(to bottom,transparent 50%,inherit 50%);padding:0 .25rem}.spot-logo__top-right svg{border-radius:9999px;overflow:hidden;border:var(--spot-border-line-width) solid var(--spot-border-color);display:block;background:var(--spot-logo-background-color)}@container (min-width: 651px){.spot-footer__powered-by{margin-top:0;align-self:center}.spot-footer__terms{margin-right:var(--spot-footer-terms-margin-right)}}@media (min-width: 651px){.spot-footer__powered-by{margin-top:0;align-self:center}.spot-footer__terms{margin-right:var(--spot-footer-terms-margin-right)}}";function K(d){const t=document.createElement("style");t.textContent=d,document.head.appendChild(t)}K(G);const M={sandbox:"https://api.sandbox.getspot.com/api/v1/quote",production:"https://api.getspot.com/api/v1/quote",local:"http://localhost:3999/api/v1/quote"};class X{constructor(t={}){this._destroyed=!1,this.options={location:"body",showTable:!0,logoPosition:"top-right",apiConfig:{environment:"production",partnerId:""},quoteRequestData:{},callbacks:{},useMockData:!1,...t,selection:t.selection??b.UNSELECTED},this._onResize=this._updateLayout.bind(this),this.root=typeof this.options.location=="string"?document.querySelector(this.options.location):this.options.location,this.currentSelection=this.options.selection,this._init()}async _init(){var t,r,s,i,n;try{N(this.options),this.currentState=this.options.state;let e;if(this.options.useMockData&&this.options.mockData)e=this.options.mockData;else{const{environment:o,partnerId:p}=this.options.apiConfig,f=this.options.apiConfig.customEndpoint||M[o];e="items"in this.options.quoteRequestData?await D(f,p,this.options.quoteRequestData,this._validState()):await k(f,p,this.options.quoteRequestData,this._validState())}if(this._destroyed)return;if(e.status!=="QUOTE_AVAILABLE"){e.status==="NO_MATCHING_QUOTE"&&((t=this.options.callbacks)!=null&&t.noMatchingQuote)&&this.options.callbacks.noMatchingQuote({status:"NO_MATCHING_QUOTE",data:this.options.quoteRequestData});return}if(this.quote=e.data,!this.quote)throw new Error("No quote data in response");if(this._renderWidget(),this.options.selection===b.YES&&((r=this.options.callbacks)!=null&&r.onOptIn)){const o={status:"QUOTE_ACCEPTED",spotPrice:this.quote.spotPrice,quoteId:this.quote.id,state:this._validState()};if(this.quote.originalQuotes&&this.quote.originalQuotes.length>0){const p=this.options.quoteRequestData;o.batchQuoteDetails=this.quote.originalQuotes.map(m=>{var v;const f=(v=p.items)==null?void 0:v.find(h=>(h.cartItemId||`item-${p.items.indexOf(h)+1}`)===m.cartItemId);return{quoteId:m.id,productPrice:(f==null?void 0:f.productPrice)||m.spotPrice,cartItemId:(f==null?void 0:f.cartItemId)||""}})}this.options.callbacks.onOptIn(o)}if((s=this.options.callbacks)!=null&&s.onQuoteRetrieved){const o=this.options.callbacks.onQuoteRetrieved(this.quote);o&&this._applyQuoteUpdates(o)}}catch(e){if(this._destroyed)return;if((i=this.options.callbacks)!=null&&i.onError){const o=e;(n=this.options.callbacks)==null||n.onError({message:o.message,status:o.status,responseBody:o.responseBody})}}}_renderWidget(){if(!this.quote)return;this.container=document.createElement("div"),this.container.className="spot-refund-guarantee",this.root.appendChild(this.container),Object.entries(this.options.theme||{}).forEach(([e,o])=>{const p=`--${e}`;this.container.style.setProperty(p,o)}),V(this.container,this.quote.communication);const t=document.createElement("div");if(t.className="spot-content__wrapper",this.container.appendChild(t),this.quote.qualifyingReasons?Q(t,this.quote.qualifyingReasons):U(t,this.quote.communication.bulletPoints),this.quote.coveredItems){const e=this._getTotalItemsInRequest();Z(t,this.quote.coveredItems,e)}this.options.showTable&&!this.quote.qualifyingReasons&&j(t,this.quote.payoutSchedule,this.quote.currencyCode);const r=a("div",{className:"spot-selection__wrapper",parent:t});this._isPassOrTrip()&&!this.options.state&&(this._stateSelectEl=W(r,this.currentState),this._setNonUsResidentError(this.currentState===E));const i=!this._isQuotingAvailable(),n=F(r,this.currentSelection,this.quote.communication,i);this.paymentTermsEl=a("div",{className:"spot-payment-terms__wrapper",parent:t}),this.currentSelection===b.YES&&I(this.paymentTermsEl,this.quote),Y(this.container,this.quote,this.options.logoPosition),window.addEventListener("resize",this._onResize),this._setupResizeObserver(),this._updateLayout(),this._setupOptionListeners(n),this._setupStateDropdownListener()}_updateLayout(){if(!this.container||!this.quote)return;const t=this.container.querySelector(".spot-content__wrapper"),r=this.options.showTable&&!this.quote.qualifyingReasons;if(!t||!r){t==null||t.classList.remove("desktop-layout");return}const s=this._shouldUseDesktopLayout(t);t.classList.toggle("desktop-layout",s)}_shouldUseDesktopLayout(t){const r=this.container.offsetWidth-40,s=325,i=16;if(r>=900)return!0;if(r>=650){const n=t.classList.contains("desktop-layout");t.classList.remove("desktop-layout"),t.offsetHeight;const e=t.querySelector(".spot-benefits__list, .spot-qualifying-reasons__container");if(!e)return n&&t.classList.add("desktop-layout"),n;const p=Math.min(e.scrollWidth,400)+s+i;return n&&t.classList.add("desktop-layout"),r>=p}return!1}_setupResizeObserver(){!this.container||!window.ResizeObserver||(this._resizeObserver=new ResizeObserver(()=>{this._resizeTimeout&&clearTimeout(this._resizeTimeout),this._resizeTimeout=window.setTimeout(()=>{this._updateLayout()},100)}),this._resizeObserver.observe(this.container))}_getTotalItemsInRequest(){return"items"in this.options.quoteRequestData?this.options.quoteRequestData.items.length:1}_applyQuoteUpdates(t){!this.quote||!this.container||(t.spotPriceWithFees!==void 0&&(this.quote.communication.yesOptionText=this.quote.communication.yesOptionText.replace(`$${this.quote.spotPrice.toFixed(2)}`,`$${t.spotPriceWithFees.toFixed(2)}`)),this._teardownDom(),this._renderWidget())}_isPassOrTrip(){const t=this.options.quoteRequestData;if(Array.isArray(t))return t.some(s=>s.productType==="Pass"||s.productType==="Trip");if("items"in t)return t.items.some(s=>s.productType==="Pass"||s.productType==="Trip");const r=t;return r.productType==="Pass"||r.productType==="Trip"}_validState(){if(this._isPassOrTrip()&&!(!this.currentState||this.currentState===E))return this.currentState}_isQuotingAvailable(){return!this._isPassOrTrip()||this.options.state?!0:!!this.currentState&&this.currentState!==E}_setRadiosDisabled(t){var i,n,e;const r=(i=this.container)==null?void 0:i.querySelectorAll('input[name="selection"]'),s=(n=this.container)==null?void 0:n.querySelector(".spot-selection__options");r==null||r.forEach(o=>{o.disabled=t}),s==null||s.classList.toggle("spot-selection__options--disabled",t),t&&(r==null||r.forEach(o=>{o.checked=!1}),(e=this.container)==null||e.querySelectorAll(".spot-selection__option").forEach(o=>{o.classList.remove("selected")}),this.currentSelection=b.UNSELECTED,this.paymentTermsEl&&(this.paymentTermsEl.innerHTML=""))}_setNonUsResidentError(t){var s;if(!this._stateSelectEl)return;this._stateSelectEl.classList.toggle("spot-state-dropdown__select--error",t);const r=(s=this._stateSelectEl.parentElement)==null?void 0:s.querySelector(".spot-state-dropdown__error");r==null||r.classList.toggle("spot-state-dropdown__error--visible",t)}_setupStateDropdownListener(){this._stateSelectEl&&this._stateSelectEl.addEventListener("change",()=>{this.currentState=this._stateSelectEl.value,this._setRadiosDisabled(!this._isQuotingAvailable()),this._setNonUsResidentError(this.currentState===E)})}_setupOptionListeners(t){const r=t.querySelectorAll('input[type="radio"]'),s=t.querySelectorAll(".spot-selection__option");r.forEach(i=>{i.addEventListener("change",n=>{var p,m,f,v;const e=n.target,o=e.value;if(this.hideSelectionError(),this.currentSelection=o,s.forEach(h=>h.classList.remove("selected")),(p=e.closest(".spot-selection__option"))==null||p.classList.add("selected"),this.paymentTermsEl&&(this.paymentTermsEl.innerHTML=""),o===b.YES&&((m=this.quote)!=null&&m.communication.paymentTerms&&I(this.paymentTermsEl,this.quote),(f=this.options.callbacks)!=null&&f.onOptIn)){const h={status:"QUOTE_ACCEPTED",spotPrice:this.quote.spotPrice,quoteId:this.quote.id,state:this._validState()};if(this.quote.originalQuotes&&this.quote.originalQuotes.length>0){const l=this.options.quoteRequestData;h.batchQuoteDetails=this.quote.originalQuotes.map(u=>{var _;const c=(_=l.items)==null?void 0:_.find(w=>(w.cartItemId||`item-${l.items.indexOf(w)+1}`)===u.cartItemId);return{quoteId:u.id,productPrice:(c==null?void 0:c.productPrice)||u.spotPrice,cartItemId:(c==null?void 0:c.cartItemId)||""}})}this.options.callbacks.onOptIn(h)}if(o===b.NO&&((v=this.options.callbacks)!=null&&v.onOptOut)){const h={status:"QUOTE_DECLINED",quoteId:this.quote.id,state:this._validState()};if(this.quote.originalQuotes&&this.quote.originalQuotes.length>0){const l=this.options.quoteRequestData;h.batchQuoteDetails=this.quote.originalQuotes.map(u=>{var _;const c=(_=l.items)==null?void 0:_.find(w=>(w.cartItemId||`item-${l.items.indexOf(w)+1}`)===u.cartItemId);return{quoteId:u.id,productPrice:(c==null?void 0:c.productPrice)||u.spotPrice,cartItemId:(c==null?void 0:c.cartItemId)||""}})}this.options.callbacks.onOptOut(h)}})})}showSelectionError(){var t;if(!this.errorEl){this.errorEl=document.createElement("div"),this.errorEl.className="spot-selection__error",this.errorEl.textContent="Please make a selection";const r=(t=this.container)==null?void 0:t.querySelector(".spot-selection__options");r&&r.insertAdjacentElement("afterend",this.errorEl)}this.errorEl.style.display="block"}hideSelectionError(){this.errorEl&&(this.errorEl.style.display="none")}validateSelection(){if(!this.container)return!1;const t=!!this.container.querySelector('input[name="selection"]:checked');return t?this.hideSelectionError():this.showSelectionError(),t}async updateQuote(t){var r,s,i,n;if(this._destroyed)return!1;try{const e={...this.options,quoteRequestData:t};N(e);const{environment:o,partnerId:p,customEndpoint:m}=this.options.apiConfig,f=m||M[o],h="items"in e.quoteRequestData?await D(f,p,e.quoteRequestData,this._validState()):await k(f,p,e.quoteRequestData,this._validState());if(this._destroyed)return!1;if(h.status!=="QUOTE_AVAILABLE")return this._teardownDom(),h.status==="NO_MATCHING_QUOTE"&&((r=this.options.callbacks)!=null&&r.noMatchingQuote)&&this.options.callbacks.noMatchingQuote({status:"NO_MATCHING_QUOTE",data:e.quoteRequestData}),!1;if(this.options.quoteRequestData=e.quoteRequestData,this.quote=h.data,this._teardownDom(),this._renderWidget(),(s=this.options.callbacks)!=null&&s.onQuoteRetrieved){const l=this.options.callbacks.onQuoteRetrieved(this.quote);l&&this._applyQuoteUpdates(l)}return!0}catch(e){if(this._destroyed)return!1;const o=e;return(n=(i=this.options.callbacks)==null?void 0:i.onError)==null||n.call(i,{message:o.message,status:o.status,responseBody:o.responseBody}),!1}}getSelection(){var r,s,i;if(this.currentSelection==null||this.currentSelection==b.UNSELECTED)return null;const t={selection:this.currentSelection,quoteId:(r=this.quote)==null?void 0:r.id,spotPrice:(s=this.quote)==null?void 0:s.spotPrice,status:this.currentSelection===b.YES?"QUOTE_ACCEPTED":"QUOTE_DECLINED",state:this.currentState};if((i=this.quote)!=null&&i.originalQuotes&&this.quote.originalQuotes.length>0){const n=this.options.quoteRequestData;t.batchQuoteDetails=this.quote.originalQuotes.map(e=>{var p;const o=(p=n.items)==null?void 0:p.find(m=>(m.cartItemId||`item-${n.items.indexOf(m)+1}`)===e.cartItemId);return{quoteId:e.id,productPrice:(o==null?void 0:o.productPrice)||e.spotPrice,cartItemId:(o==null?void 0:o.cartItemId)||""}})}return t}destroy(){this._destroyed=!0,this._teardownDom()}_teardownDom(){window.removeEventListener("resize",this._onResize),this._resizeObserver&&(this._resizeObserver.disconnect(),this._resizeObserver=void 0),this._resizeTimeout&&window.clearTimeout(this._resizeTimeout),this.container&&this.container.parentNode&&this.container.parentNode.removeChild(this.container)}}C.NON_US_RESIDENT_VALUE=E,C.SelectionEnum=b,C.default=X,Object.defineProperties(C,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
package/dist/ui.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ui.d.ts","sourceRoot":"","sources":["../src/ui.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EACd,aAAa,EACb,gBAAgB,EAChB,kBAAkB,EAClB,KAAK,EACL,aAAa,EACd,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,0BAA0B,EAAE,qBAAqB,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC9F,OAAO,EAAE,0BAA0B,EAAE,qBAAqB,EAAE,SAAS,EAAE,CAAC;AAExE,wBAAgB,MAAM,CAAC,CAAC,SAAS,MAAM,qBAAqB,EAC1D,GAAG,EAAE,CAAC,EACN,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,EAAE,GAAE,cAAmB,GACxE,qBAAqB,CAAC,CAAC,CAAC,CAS1B;AAGD,wBAAgB,YAAY,CAC1B,SAAS,EAAE,WAAW,EACtB,EAAE,IAAI,EAAE,WAAW,EAAE,EAAE,IAAI,CAAC,aAAa,EAAE,MAAM,GAAG,aAAa,CAAC,GACjE,IAAI,CAWN;AAGD,wBAAgB,cAAc,CAC5B,SAAS,EAAE,WAAW,EACtB,OAAO,GAAE,MAAM,EAAO,GACrB,IAAI,CAcN;AAGD,wBAAgB,uBAAuB,CACrC,SAAS,EAAE,WAAW,EACtB,iBAAiB,GAAE,gBAAgB,EAAO,GACzC,IAAI,CA0EN;AAGD,wBAAgB,kBAAkB,CAChC,SAAS,EAAE,WAAW,EACtB,YAAY,GAAE,MAAM,EAAO,EAC3B,mBAAmB,CAAC,EAAE,MAAM,GAC3B,IAAI,CAuHN;AA6BD,wBAAgB,WAAW,CACzB,SAAS,EAAE,WAAW,EACtB,QAAQ,GAAE,kBAAkB,EAAO,EACnC,YAAY,GAAE,MAAc,GAC3B,IAAI,CA2BN;AAED,wBAAgB,mBAAmB,CACjC,SAAS,EAAE,WAAW,EACtB,YAAY,CAAC,EAAE,MAAM,GACpB,iBAAiB,CA6CnB;AAGD,wBAAgB,aAAa,CAC3B,SAAS,EAAE,WAAW,EACtB,SAAS,EAAE,aAAa,EACxB,aAAa,EAAE,aAAa,EAC5B,QAAQ,UAAQ,GACf,WAAW,CA4Cb;AAGD,wBAAgB,kBAAkB,CAChC,SAAS,EAAE,WAAW,EACtB,KAAK,EAAE,KAAK,GACX,WAAW,GAAG,IAAI,CAuBpB;AAGD,wBAAgB,YAAY,CAC1B,SAAS,EAAE,WAAW,EACtB,KAAK,EAAE,KAAK,EACZ,YAAY,GAAE,cAAc,GAAG,
|
|
1
|
+
{"version":3,"file":"ui.d.ts","sourceRoot":"","sources":["../src/ui.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EACd,aAAa,EACb,gBAAgB,EAChB,kBAAkB,EAClB,KAAK,EACL,aAAa,EACd,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,0BAA0B,EAAE,qBAAqB,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC9F,OAAO,EAAE,0BAA0B,EAAE,qBAAqB,EAAE,SAAS,EAAE,CAAC;AAExE,wBAAgB,MAAM,CAAC,CAAC,SAAS,MAAM,qBAAqB,EAC1D,GAAG,EAAE,CAAC,EACN,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,EAAE,GAAE,cAAmB,GACxE,qBAAqB,CAAC,CAAC,CAAC,CAS1B;AAGD,wBAAgB,YAAY,CAC1B,SAAS,EAAE,WAAW,EACtB,EAAE,IAAI,EAAE,WAAW,EAAE,EAAE,IAAI,CAAC,aAAa,EAAE,MAAM,GAAG,aAAa,CAAC,GACjE,IAAI,CAWN;AAGD,wBAAgB,cAAc,CAC5B,SAAS,EAAE,WAAW,EACtB,OAAO,GAAE,MAAM,EAAO,GACrB,IAAI,CAcN;AAGD,wBAAgB,uBAAuB,CACrC,SAAS,EAAE,WAAW,EACtB,iBAAiB,GAAE,gBAAgB,EAAO,GACzC,IAAI,CA0EN;AAGD,wBAAgB,kBAAkB,CAChC,SAAS,EAAE,WAAW,EACtB,YAAY,GAAE,MAAM,EAAO,EAC3B,mBAAmB,CAAC,EAAE,MAAM,GAC3B,IAAI,CAuHN;AA6BD,wBAAgB,WAAW,CACzB,SAAS,EAAE,WAAW,EACtB,QAAQ,GAAE,kBAAkB,EAAO,EACnC,YAAY,GAAE,MAAc,GAC3B,IAAI,CA2BN;AAED,wBAAgB,mBAAmB,CACjC,SAAS,EAAE,WAAW,EACtB,YAAY,CAAC,EAAE,MAAM,GACpB,iBAAiB,CA6CnB;AAGD,wBAAgB,aAAa,CAC3B,SAAS,EAAE,WAAW,EACtB,SAAS,EAAE,aAAa,EACxB,aAAa,EAAE,aAAa,EAC5B,QAAQ,UAAQ,GACf,WAAW,CA4Cb;AAGD,wBAAgB,kBAAkB,CAChC,SAAS,EAAE,WAAW,EACtB,KAAK,EAAE,KAAK,GACX,WAAW,GAAG,IAAI,CAuBpB;AAGD,wBAAgB,YAAY,CAC1B,SAAS,EAAE,WAAW,EACtB,KAAK,EAAE,KAAK,EACZ,YAAY,GAAE,cAAc,GAAG,WAAyB,GACvD,WAAW,CAuEb"}
|