@getspot/spot-widget 4.5.0 → 4.7.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/dist/index.es.js CHANGED
@@ -1,90 +1,90 @@
1
- async function T(d, t, r, s) {
1
+ async function S(c, t, r, s) {
2
2
  try {
3
- const i = s ? { ...r, state: s } : r, a = await fetch(d, {
3
+ const a = s ? { ...r, state: s } : r, n = await fetch(c, {
4
4
  method: "POST",
5
5
  headers: {
6
6
  "Content-Type": "application/json",
7
7
  "X-Spot-Partner-Id": t
8
8
  },
9
- body: JSON.stringify(i)
10
- }), e = await a.json();
11
- if (!a.ok) {
12
- const o = new Error((e == null ? void 0 : e.message) || "Failed to fetch quote");
13
- throw o.status = a.status, o.responseBody = e, o;
9
+ body: JSON.stringify(a)
10
+ }), o = await n.json();
11
+ if (!n.ok) {
12
+ const e = new Error((o == null ? void 0 : o.message) || "Failed to fetch quote");
13
+ throw e.status = n.status, e.responseBody = o, e;
14
14
  }
15
- return e;
16
- } catch (i) {
17
- throw i instanceof Error ? i : new Error("Unknown error occurred while fetching quote");
15
+ return o;
16
+ } catch (a) {
17
+ throw a instanceof Error ? a : new Error("Unknown error occurred while fetching quote");
18
18
  }
19
19
  }
20
- async function z(d, t, r) {
20
+ async function z(c, t, r) {
21
21
  try {
22
- const s = d.replace("/quote", "/quote/batch"), i = await fetch(s, {
22
+ const s = c.replace("/quote", "/quote/batch"), a = await fetch(s, {
23
23
  method: "POST",
24
24
  headers: {
25
25
  "Content-Type": "application/json",
26
26
  "X-Spot-Partner-Id": t
27
27
  },
28
28
  body: JSON.stringify(r)
29
- }), a = await i.json();
30
- if (!i.ok) {
31
- const e = new Error((a == null ? void 0 : a.message) || "Failed to fetch batch quote");
32
- throw e.status = i.status, e.responseBody = a, e;
29
+ }), n = await a.json();
30
+ if (!a.ok) {
31
+ const o = new Error((n == null ? void 0 : n.message) || "Failed to fetch batch quote");
32
+ throw o.status = a.status, o.responseBody = n, o;
33
33
  }
34
- return a;
34
+ return n;
35
35
  } catch (s) {
36
36
  throw s instanceof Error ? s : new Error("Unknown error occurred while fetching batch quote");
37
37
  }
38
38
  }
39
- async function N(d, t, r, s) {
40
- var i;
39
+ async function T(c, t, r, s) {
40
+ var a;
41
41
  try {
42
- const a = {
42
+ const n = {
43
43
  ...r,
44
44
  ...s ? { state: s } : {},
45
45
  isPartialPayment: r.isPartialPayment || !1,
46
46
  roundTo: r.roundTo || void 0,
47
- items: r.items.map((m, f) => ({
48
- ...m,
49
- cartItemId: m.cartItemId || `item-${f + 1}`
47
+ items: r.items.map((u, f) => ({
48
+ ...u,
49
+ cartItemId: u.cartItemId || `item-${f + 1}`
50
50
  }))
51
- }, e = await z(d, t, a);
52
- if (e.status !== "QUOTES_AVAILABLE" && e.status !== "QUOTE_AVAILABLE")
51
+ }, o = await z(c, t, n);
52
+ if (o.status !== "QUOTES_AVAILABLE" && o.status !== "QUOTE_AVAILABLE")
53
53
  return { status: "NO_MATCHING_QUOTE" };
54
- const o = e.quotes.map((m) => {
54
+ const e = o.quotes.map((u) => {
55
55
  const f = r.items.find(
56
- (v, h) => (v.cartItemId || `item-${h + 1}`) === m.cartItemId
56
+ (h, g) => (h.cartItemId || `item-${g + 1}`) === u.cartItemId
57
57
  );
58
- return f ? f.participantDescription ? `${f.productName} - ${f.participantDescription}` : f.productName : `Item ${m.id}`;
59
- }), p = Math.round((e.totalSpotPrice || e.spotPrice || 0) * 100) / 100;
58
+ return f ? f.participantDescription ? `${f.productName} - ${f.participantDescription}` : f.productName : `Item ${u.id}`;
59
+ }), l = Math.round((o.totalSpotPrice || o.spotPrice || 0) * 100) / 100;
60
60
  return {
61
61
  status: "QUOTE_AVAILABLE",
62
62
  data: {
63
- id: e.quotes ? e.quotes.map((m) => m.id).join(",") : ((i = e.data) == null ? void 0 : i.id) || "",
64
- spotPrice: p,
65
- currencyCode: e.currencyCode || "",
63
+ id: o.quotes ? o.quotes.map((u) => u.id).join(",") : ((a = o.data) == null ? void 0 : a.id) || "",
64
+ spotPrice: l,
65
+ currencyCode: o.currencyCode || "",
66
66
  communication: {
67
- ...e.communication,
68
- yesOptionText: e.communication.yesOptionText.replace(
69
- String(e.totalSpotPrice),
70
- String(p)
67
+ ...o.communication,
68
+ yesOptionText: o.communication.yesOptionText.replace(
69
+ String(o.totalSpotPrice),
70
+ String(l)
71
71
  )
72
72
  },
73
- payoutSchedule: e.payoutSchedule.map((m) => ({
74
- ...m,
75
- amount: m.amount !== void 0 ? m.amount : 0
73
+ payoutSchedule: o.payoutSchedule.map((u) => ({
74
+ ...u,
75
+ amount: u.amount !== void 0 ? u.amount : 0
76
76
  })),
77
- coveredItems: o,
78
- originalQuotes: e.quotes || (e.data ? [e.data] : [])
77
+ coveredItems: e,
78
+ originalQuotes: o.quotes || (o.data ? [o.data] : [])
79
79
  },
80
- spotPrice: p,
81
- coveredItems: o
80
+ spotPrice: l,
81
+ coveredItems: e
82
82
  };
83
- } catch (a) {
84
- throw a instanceof Error ? a : new Error("Unknown error occurred while fetching multiple quotes");
83
+ } catch (n) {
84
+ throw n instanceof Error ? n : new Error("Unknown error occurred while fetching multiple quotes");
85
85
  }
86
86
  }
87
- const E = "non-us-resident", A = "Unfortunately, we are currently unable to offer coverage or process claims for non-US residents.", L = [
87
+ const E = "non-us-resident", O = "Unfortunately, we are currently unable to offer coverage or process claims for non-US residents.", A = [
88
88
  { value: "AL", label: "Alabama" },
89
89
  { value: "AK", label: "Alaska" },
90
90
  { value: "AS", label: "American Samoa" },
@@ -141,7 +141,7 @@ const E = "non-us-resident", A = "Unfortunately, we are currently unable to offe
141
141
  { value: "WV", label: "West Virginia" },
142
142
  { value: "WI", label: "Wisconsin" },
143
143
  { value: "WY", label: "Wyoming" }
144
- ], O = new Set(L.map((d) => d.value)), I = [
144
+ ], L = new Set(A.map((c) => c.value)), I = [
145
145
  "USD",
146
146
  "CAD",
147
147
  "AUD",
@@ -170,22 +170,22 @@ const E = "non-us-resident", A = "Unfortunately, we are currently unable to offe
170
170
  production: "https://api.getspot.com/v1/quote",
171
171
  local: "http://localhost:3999/api/v1/quote"
172
172
  };
173
- function M(d) {
173
+ function M(c) {
174
174
  const {
175
175
  apiConfig: t = {},
176
176
  quoteRequestData: r,
177
177
  callbacks: s = {},
178
- location: i,
179
- theme: a
180
- } = d, {
181
- environment: e = "sandbox",
182
- partnerId: o,
183
- customEndpoint: p
178
+ location: a,
179
+ theme: n
180
+ } = c, {
181
+ environment: o = "sandbox",
182
+ partnerId: e,
183
+ customEndpoint: l
184
184
  } = t;
185
- if (!o || typeof o != "string")
185
+ if (!e || typeof e != "string")
186
186
  throw new Error("Invalid or missing partnerId in apiConfig");
187
- if (!(p || P[e]))
188
- throw new Error(`Invalid environment in apiConfig: ${e}`);
187
+ if (!(l || P[o]))
188
+ throw new Error(`Invalid environment in apiConfig: ${o}`);
189
189
  if (!r || typeof r != "object" && !Array.isArray(r))
190
190
  throw new Error("quoteRequestData must be a non-null object or array");
191
191
  const f = [
@@ -200,57 +200,57 @@ function M(d) {
200
200
  "cartId",
201
201
  "productName"
202
202
  ];
203
- function v(l, u = null) {
204
- const c = u !== null ? `quoteRequestData[${u}]` : "quoteRequestData";
205
- f.forEach((g) => {
206
- if (!Object.prototype.hasOwnProperty.call(l, g) || l[g] === void 0 || l[g] === null)
207
- throw new Error(`Missing required ${c} field: '${g}'`);
203
+ function h(p, m = null) {
204
+ const d = m !== null ? `quoteRequestData[${m}]` : "quoteRequestData";
205
+ f.forEach((v) => {
206
+ if (!Object.prototype.hasOwnProperty.call(p, v) || p[v] === void 0 || p[v] === null)
207
+ throw new Error(`Missing required ${d} field: '${v}'`);
208
208
  });
209
209
  const b = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d+)?Z$/;
210
- if (!b.test(l.startDate))
211
- throw new Error(`${c}.startDate must be a valid ISO8601 string`);
212
- if (!b.test(l.endDate))
213
- throw new Error(`${c}.endDate must be a valid ISO8601 string`);
214
- if (typeof l.currencyCode != "string")
215
- throw new Error(`${c}.currencyCode must be a string`);
216
- if (!I.includes(l.currencyCode))
217
- throw new Error(`Invalid ${c}.currencyCode: ${l.currencyCode}`);
218
- if (typeof l.eventType != "string")
219
- throw new Error(`${c}.eventType must be a string`);
220
- if (typeof l.productType != "string")
221
- throw new Error(`${c}.productType must be a string`);
222
- const w = ["Pass", "Trip", "Registration"];
223
- if (!w.includes(l.productType))
210
+ if (!b.test(p.startDate))
211
+ throw new Error(`${d}.startDate must be a valid ISO8601 string`);
212
+ if (!b.test(p.endDate))
213
+ throw new Error(`${d}.endDate must be a valid ISO8601 string`);
214
+ if (typeof p.currencyCode != "string")
215
+ throw new Error(`${d}.currencyCode must be a string`);
216
+ if (!I.includes(p.currencyCode))
217
+ throw new Error(`Invalid ${d}.currencyCode: ${p.currencyCode}`);
218
+ if (typeof p.eventType != "string")
219
+ throw new Error(`${d}.eventType must be a string`);
220
+ if (typeof p.productType != "string")
221
+ throw new Error(`${d}.productType must be a string`);
222
+ const _ = ["Pass", "Trip", "Registration"];
223
+ if (!_.includes(p.productType))
224
224
  throw new Error(
225
- `${c}.productType must be one of ${w.join(", ")}`
225
+ `${d}.productType must be one of ${_.join(", ")}`
226
226
  );
227
- if (typeof l.productDuration != "string")
228
- throw new Error(`${c}.productDuration must be a string`);
227
+ if (typeof p.productDuration != "string")
228
+ throw new Error(`${d}.productDuration must be a string`);
229
229
  const C = ["Daily", "Seasonal", "Trip", "Event"];
230
- if (!C.includes(l.productDuration))
230
+ if (!C.includes(p.productDuration))
231
231
  throw new Error(
232
- `${c}.productDuration must be one of ${C.join(", ")}`
232
+ `${d}.productDuration must be one of ${C.join(", ")}`
233
233
  );
234
- if (typeof l.productPrice != "number" || isNaN(l.productPrice))
235
- throw new Error(`${c}.productPrice must be a valid number`);
236
- if (typeof l.productId != "string")
237
- throw new Error(`${c}.productId must be a string`);
238
- if (typeof l.cartId != "string")
239
- throw new Error(`${c}.cartId must be a string`);
240
- if (typeof l.productName != "string")
241
- throw new Error(`${c}.productName must be a string`);
234
+ if (typeof p.productPrice != "number" || isNaN(p.productPrice))
235
+ throw new Error(`${d}.productPrice must be a valid number`);
236
+ if (typeof p.productId != "string")
237
+ throw new Error(`${d}.productId must be a string`);
238
+ if (typeof p.cartId != "string")
239
+ throw new Error(`${d}.cartId must be a string`);
240
+ if (typeof p.productName != "string")
241
+ throw new Error(`${d}.productName must be a string`);
242
242
  }
243
243
  if ("items" in r) {
244
- const l = r, { cartId: u, cartName: c, currencyCode: b, items: w } = l;
245
- if (!u || typeof u != "string")
244
+ const p = r, { cartId: m, cartName: d, currencyCode: b, items: _ } = p;
245
+ if (!m || typeof m != "string")
246
246
  throw new Error("quoteRequestData.cartId must be a string");
247
- if (!c || typeof c != "string")
247
+ if (!d || typeof d != "string")
248
248
  throw new Error("quoteRequestData.cartName must be a string");
249
249
  if (!b || typeof b != "string")
250
250
  throw new Error("quoteRequestData.currencyCode must be a string");
251
251
  if (!I.includes(b))
252
252
  throw new Error(`Invalid quoteRequestData.currencyCode: ${b}`);
253
- if (!Array.isArray(w) || w.length === 0)
253
+ if (!Array.isArray(_) || _.length === 0)
254
254
  throw new Error("quoteRequestData.items must be a non-empty array");
255
255
  const C = [
256
256
  "startDate",
@@ -262,106 +262,106 @@ function M(d) {
262
262
  "productId",
263
263
  "productName"
264
264
  ];
265
- w.forEach((g, k) => {
266
- if (!g || typeof g != "object")
267
- throw new Error(`quoteRequestData.items[${k}] must be a non-null object`);
268
- const y = `quoteRequestData.items[${k}]`;
265
+ _.forEach((v, x) => {
266
+ if (!v || typeof v != "object")
267
+ throw new Error(`quoteRequestData.items[${x}] must be a non-null object`);
268
+ const y = `quoteRequestData.items[${x}]`;
269
269
  C.forEach((q) => {
270
- if (!Object.prototype.hasOwnProperty.call(g, q) || g[q] === void 0 || g[q] === null)
270
+ if (!Object.prototype.hasOwnProperty.call(v, q) || v[q] === void 0 || v[q] === null)
271
271
  throw new Error(`Missing required ${y} field: '${q}'`);
272
272
  });
273
- const x = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d+)?Z$/;
274
- if (!x.test(g.startDate))
273
+ const k = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d+)?Z$/;
274
+ if (!k.test(v.startDate))
275
275
  throw new Error(`${y}.startDate must be a valid ISO8601 string`);
276
- if (!x.test(g.endDate))
276
+ if (!k.test(v.endDate))
277
277
  throw new Error(`${y}.endDate must be a valid ISO8601 string`);
278
- if (typeof g.eventType != "string")
278
+ if (typeof v.eventType != "string")
279
279
  throw new Error(`${y}.eventType must be a string`);
280
- if (typeof g.productType != "string")
280
+ if (typeof v.productType != "string")
281
281
  throw new Error(`${y}.productType must be a string`);
282
- const D = ["Pass", "Trip", "Registration"];
283
- if (!D.includes(g.productType))
284
- throw new Error(`${y}.productType must be one of ${D.join(", ")}`);
285
- if (typeof g.productDuration != "string")
282
+ const N = ["Pass", "Trip", "Registration"];
283
+ if (!N.includes(v.productType))
284
+ throw new Error(`${y}.productType must be one of ${N.join(", ")}`);
285
+ if (typeof v.productDuration != "string")
286
286
  throw new Error(`${y}.productDuration must be a string`);
287
- const S = ["Daily", "Seasonal", "Trip", "Event"];
288
- if (!S.includes(g.productDuration))
289
- throw new Error(`${y}.productDuration must be one of ${S.join(", ")}`);
290
- if (typeof g.productPrice != "number" || isNaN(g.productPrice))
287
+ const D = ["Daily", "Seasonal", "Trip", "Event"];
288
+ if (!D.includes(v.productDuration))
289
+ throw new Error(`${y}.productDuration must be one of ${D.join(", ")}`);
290
+ if (typeof v.productPrice != "number" || isNaN(v.productPrice))
291
291
  throw new Error(`${y}.productPrice must be a valid number`);
292
- if (typeof g.productId != "string")
292
+ if (typeof v.productId != "string")
293
293
  throw new Error(`${y}.productId must be a string`);
294
- if (typeof g.productName != "string")
294
+ if (typeof v.productName != "string")
295
295
  throw new Error(`${y}.productName must be a string`);
296
296
  });
297
297
  } else if (Array.isArray(r)) {
298
298
  if (r.length === 0)
299
299
  throw new Error("quoteRequestData array cannot be empty");
300
- r.forEach((l, u) => {
301
- if (!l || typeof l != "object")
302
- throw new Error(`quoteRequestData[${u}] must be a non-null object`);
303
- v(l, u);
300
+ r.forEach((p, m) => {
301
+ if (!p || typeof p != "object")
302
+ throw new Error(`quoteRequestData[${m}] must be a non-null object`);
303
+ h(p, m);
304
304
  });
305
305
  } else
306
- v(r);
306
+ h(r);
307
307
  if ([
308
308
  "onOptIn",
309
309
  "onOptOut",
310
310
  "onQuoteRetrieved",
311
311
  "onError",
312
312
  "noMatchingQuote"
313
- ].forEach((l) => {
314
- const u = s[l];
315
- if (u && typeof u != "function")
316
- throw new Error(`Callback '${l}' must be a function.`);
317
- }), typeof i == "string" && !document.querySelector(i))
318
- throw new Error(`Invalid location selector: '${i}'`);
319
- if (a && typeof a != "object")
313
+ ].forEach((p) => {
314
+ const m = s[p];
315
+ if (m && typeof m != "function")
316
+ throw new Error(`Callback '${p}' must be a function.`);
317
+ }), typeof a == "string" && !document.querySelector(a))
318
+ throw new Error(`Invalid location selector: '${a}'`);
319
+ if (n && typeof n != "object")
320
320
  throw new Error(
321
321
  "Theme must be an object with CSS variables, do not include the '--' prefix"
322
322
  );
323
- if (d.state && !O.has(d.state))
324
- throw new Error(`Invalid state: '${d.state}'. Must be a 2-character US state or territory code.`);
323
+ if (c.state && !L.has(c.state))
324
+ throw new Error(`Invalid state: '${c.state}'. Must be a 2-character US state or territory code.`);
325
325
  }
326
- var _ = /* @__PURE__ */ ((d) => (d.YES = "yes", d.NO = "no", d.UNSELECTED = "unselected", d))(_ || {});
327
- function n(d, { text: t, className: r, parent: s, innerHTML: i, href: a, target: e } = {}) {
328
- const o = document.createElement(d);
329
- return r && (o.className = r), t != null && (o.textContent = t), i != null && (o.innerHTML = i), a && "href" in o && (o.href = a), e && "target" in o && (o.target = e), s && s.appendChild(o), o;
326
+ var w = /* @__PURE__ */ ((c) => (c.YES = "yes", c.NO = "no", c.UNSELECTED = "unselected", c))(w || {});
327
+ function i(c, { text: t, className: r, parent: s, innerHTML: a, href: n, target: o } = {}) {
328
+ const e = document.createElement(c);
329
+ return r && (e.className = r), t != null && (e.textContent = t), a != null && (e.innerHTML = a), n && "href" in e && (e.href = n), o && "target" in e && (e.target = o), s && s.appendChild(e), e;
330
330
  }
331
- function $(d, { name: t, description: r }) {
332
- n("div", {
331
+ function $(c, { name: t, description: r }) {
332
+ i("div", {
333
333
  className: "spot-header__title",
334
334
  text: t,
335
- parent: d
336
- }), n("div", {
335
+ parent: c
336
+ }), i("div", {
337
337
  className: "spot-header__description",
338
338
  text: r,
339
- parent: d
339
+ parent: c
340
340
  });
341
341
  }
342
- function V(d, t = []) {
343
- const r = n("ul", {
342
+ function V(c, t = []) {
343
+ const r = i("ul", {
344
344
  className: "spot-benefits__list",
345
- parent: d
345
+ parent: c
346
346
  });
347
347
  t.forEach((s) => {
348
- const i = n("li", { parent: r });
349
- i.innerHTML = `
348
+ const a = i("li", { parent: r });
349
+ a.innerHTML = `
350
350
  <svg width="14" height="14" viewBox="0 0 14 14" fill="none" class="spot-bullets__checkmark">
351
351
  <path d="M11.6666 3.5L5.24998 9.91667L2.33331 7"
352
352
  stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
353
- </svg>`, n("span", { text: s, parent: i });
353
+ </svg>`, i("span", { text: s, parent: a });
354
354
  });
355
355
  }
356
- function Q(d, t = []) {
356
+ function Q(c, t = []) {
357
357
  if (!t || t.length === 0) return;
358
- const r = n("div", {
358
+ const r = i("div", {
359
359
  className: "spot-qualifying-reasons__container",
360
- parent: d
361
- }), s = [...t].sort((o, p) => o.rank - p.rank), i = n("div", {
360
+ parent: c
361
+ }), s = [...t].sort((e, l) => e.rank - l.rank), a = i("div", {
362
362
  className: "spot-qualifying-reasons__grid",
363
363
  parent: r
364
- }), a = {
364
+ }), n = {
365
365
  "Accident & Illness": "cross.svg",
366
366
  "Family Emergencies": "users.svg",
367
367
  Layoffs: "building.svg",
@@ -371,99 +371,99 @@ function Q(d, t = []) {
371
371
  "Travel Interruption": "plane.svg",
372
372
  "Military Duty": "medal.svg"
373
373
  };
374
- let e;
374
+ let o;
375
375
  try {
376
- const o = document.currentScript;
377
- if (o != null && o.src) {
378
- const p = new URL(o.src);
379
- e = p.origin + p.pathname.replace(/\/[^/]*$/, "/");
376
+ const e = document.currentScript;
377
+ if (e != null && e.src) {
378
+ const l = new URL(e.src);
379
+ o = l.origin + l.pathname.replace(/\/[^/]*$/, "/");
380
380
  } else
381
- e = window.location.origin + window.location.pathname.replace(/\/[^/]*$/, "/");
382
- e += "assets/";
381
+ o = window.location.origin + window.location.pathname.replace(/\/[^/]*$/, "/");
382
+ o += "assets/";
383
383
  } catch {
384
- e = "./assets/";
384
+ o = "./assets/";
385
385
  }
386
- s.forEach((o) => {
387
- var v, h, l;
388
- const p = n("div", {
386
+ s.forEach((e) => {
387
+ var h, g, p;
388
+ const l = i("div", {
389
389
  className: "spot-qualifying-reasons__item",
390
- parent: i
391
- }), m = n("div", {
390
+ parent: a
391
+ }), u = i("div", {
392
392
  className: "spot-qualifying-reasons__icon-wrapper",
393
- parent: p
394
- }), f = a[((v = o.benefitType) == null ? void 0 : v.name) || ""] || a[o.name || ""];
393
+ parent: l
394
+ }), f = n[((h = e.benefitType) == null ? void 0 : h.name) || ""] || n[e.name || ""];
395
395
  if (f) {
396
- const u = n("img", {
397
- parent: m
396
+ const m = i("img", {
397
+ parent: u
398
398
  });
399
- u.src = e + f, u.alt = ((h = o.benefitType) == null ? void 0 : h.name) || o.name || "", u.className = "spot-qualifying-reasons__icon";
399
+ m.src = o + f, m.alt = ((g = e.benefitType) == null ? void 0 : g.name) || e.name || "", m.className = "spot-qualifying-reasons__icon";
400
400
  }
401
- n("span", {
401
+ i("span", {
402
402
  className: "spot-qualifying-reasons__label",
403
- text: ((l = o.benefitType) == null ? void 0 : l.name) || o.name || "",
404
- parent: p
403
+ text: ((p = e.benefitType) == null ? void 0 : p.name) || e.name || "",
404
+ parent: l
405
405
  });
406
406
  });
407
407
  }
408
- function U(d, t = [], r) {
408
+ function U(c, t = [], r) {
409
409
  if (t.length === 0 || !r || r <= 1)
410
410
  return;
411
411
  const s = /* @__PURE__ */ new Map();
412
- t.forEach((u) => {
413
- s.set(u, (s.get(u) || 0) + 1);
412
+ t.forEach((m) => {
413
+ s.set(m, (s.get(m) || 0) + 1);
414
414
  });
415
- const a = Array.from(s.entries()).map(
416
- ([u, c]) => ({
417
- item: u,
418
- count: c,
419
- displayText: c > 1 ? `${c} x ${u}` : u
415
+ const n = Array.from(s.entries()).map(
416
+ ([m, d]) => ({
417
+ item: m,
418
+ count: d,
419
+ displayText: d > 1 ? `${d} x ${m}` : m
420
420
  })
421
- ).sort((u, c) => {
422
- const b = u.item.charAt(0), w = c.item.charAt(0), C = /[a-zA-Z]/.test(b), g = /[a-zA-Z]/.test(w);
423
- return !C && g ? -1 : C && !g ? 1 : u.item.localeCompare(c.item, void 0, { sensitivity: "base" });
424
- }), e = n("div", {
421
+ ).sort((m, d) => {
422
+ const b = m.item.charAt(0), _ = d.item.charAt(0), C = /[a-zA-Z]/.test(b), v = /[a-zA-Z]/.test(_);
423
+ return !C && v ? -1 : C && !v ? 1 : m.item.localeCompare(d.item, void 0, { sensitivity: "base" });
424
+ }), o = i("div", {
425
425
  className: "spot-covered-items__container",
426
- parent: d
427
- }), o = n("div", {
426
+ parent: c
427
+ }), e = i("div", {
428
428
  className: "spot-covered-items__header",
429
- parent: e
430
- }), p = n("button", {
431
- className: "spot-covered-items__toggle",
432
429
  parent: o
430
+ }), l = i("button", {
431
+ className: "spot-covered-items__toggle",
432
+ parent: e
433
433
  });
434
- p.type = "button", n("span", {
434
+ l.type = "button", i("span", {
435
435
  className: "spot-covered-items__title",
436
436
  text: `Items Covered in Your Cart (${t.length})`,
437
- parent: p
437
+ parent: l
438
438
  });
439
- const m = n("div", {
439
+ const u = i("div", {
440
440
  className: "spot-covered-items__right-section",
441
- parent: p
441
+ parent: l
442
442
  });
443
- n("span", {
443
+ i("span", {
444
444
  className: "spot-covered-items__view-all",
445
445
  text: "View All",
446
- parent: m
446
+ parent: u
447
447
  });
448
- const f = n("span", {
448
+ const f = i("span", {
449
449
  className: "spot-covered-items__arrow",
450
450
  innerHTML: "▼",
451
- parent: m
452
- }), v = n("div", {
451
+ parent: u
452
+ }), h = i("div", {
453
453
  className: "spot-covered-items__content",
454
- parent: e
455
- }), h = n("ul", {
454
+ parent: o
455
+ }), g = i("ul", {
456
456
  className: "spot-covered-items__list",
457
- parent: v
457
+ parent: h
458
458
  });
459
- a.forEach(({ displayText: u }) => {
460
- const c = n("li", { parent: h });
461
- n("span", { text: u, parent: c });
459
+ n.forEach(({ displayText: m }) => {
460
+ const d = i("li", { parent: g });
461
+ i("span", { text: m, parent: d });
462
462
  });
463
- let l = !1;
464
- v.style.display = "none", p.addEventListener("click", (u) => {
465
- u.stopPropagation(), u.preventDefault(), l = !l, v.style.display = l ? "block" : "none", f.innerHTML = l ? "▲" : "▼", p.setAttribute("aria-expanded", l.toString());
466
- }), p.setAttribute("aria-expanded", "false"), p.setAttribute("aria-controls", "covered-items-list"), v.setAttribute("id", "covered-items-list");
463
+ let p = !1;
464
+ h.style.display = "none", l.addEventListener("click", (m) => {
465
+ m.stopPropagation(), m.preventDefault(), p = !p, h.style.display = p ? "block" : "none", f.innerHTML = p ? "▲" : "▼", l.setAttribute("aria-expanded", p.toString());
466
+ }), l.setAttribute("aria-expanded", "false"), l.setAttribute("aria-controls", "covered-items-list"), h.setAttribute("id", "covered-items-list");
467
467
  }
468
468
  const Z = {
469
469
  USD: "$",
@@ -490,104 +490,133 @@ const Z = {
490
490
  THB: "THB ฿",
491
491
  ZAR: "ZAR R"
492
492
  };
493
- function B(d, t = [], r = "USD") {
494
- const s = Z[r] ?? `${r} `, i = n("div", {
495
- className: "spot-table__container",
496
- parent: d
497
- }), a = n("table", {
498
- className: "spot-refund__table spot-table--dynamic",
499
- parent: i
500
- }), e = n("thead", { parent: a }), o = n("tr", { parent: e });
501
- n("th", { text: "When you cancel", parent: o }), n("th", { text: "You will receive", parent: o });
502
- const p = n("tbody", { parent: a });
503
- t.forEach(({ text: m, percent: f, amount: v }) => {
504
- const h = n("tr", { parent: p });
505
- n("td", { text: m, parent: h });
506
- const l = f === "Not eligible for refund" ? "Not eligible for a refund" : `${s}${v} refund`;
507
- n("td", { text: l, parent: h });
493
+ let B = 0;
494
+ function j(c, t = [], r = "USD") {
495
+ const s = Z[r] ?? `${r} `, a = `refund-schedule-content-${++B}`, n = i("div", {
496
+ className: "spot-covered-items__container spot-refund-schedule",
497
+ parent: c
498
+ }), o = i("div", {
499
+ className: "spot-covered-items__header",
500
+ parent: n
501
+ }), e = i("button", {
502
+ className: "spot-covered-items__toggle",
503
+ parent: o
504
+ });
505
+ i("span", {
506
+ className: "spot-covered-items__title",
507
+ text: "Refund Schedule",
508
+ parent: e
509
+ });
510
+ const l = i("div", {
511
+ className: "spot-covered-items__right-section",
512
+ parent: e
513
+ }), u = i("span", {
514
+ className: "spot-covered-items__view-all",
515
+ text: "View",
516
+ parent: l
517
+ }), f = i("span", {
518
+ className: "spot-covered-items__arrow",
519
+ innerHTML: "▼",
520
+ parent: l
521
+ }), h = i("div", {
522
+ className: "spot-covered-items__content",
523
+ parent: n
524
+ }), g = i("ul", {
525
+ className: "spot-covered-items__list",
526
+ parent: h
527
+ });
528
+ t.forEach(({ text: m, percent: d, amount: b }) => {
529
+ const _ = i("li", { parent: g });
530
+ i("span", { text: m, parent: _ });
531
+ const C = d === "Not eligible for refund" ? "Not eligible for a refund" : `${d} (${s}${b.toFixed(2)})`;
532
+ i("span", { text: C, parent: _ });
508
533
  });
534
+ let p = !1;
535
+ h.style.display = "none", e.addEventListener("click", (m) => {
536
+ m.stopPropagation(), p = !p, h.style.display = p ? "block" : "none", u.textContent = p ? "Close" : "View", f.innerHTML = p ? "▲" : "▼", e.setAttribute("aria-expanded", p.toString());
537
+ }), e.setAttribute("aria-expanded", "false"), e.setAttribute("aria-controls", a), h.setAttribute("id", a);
509
538
  }
510
- function j(d, t) {
511
- const r = n("div", {
539
+ function F(c, t) {
540
+ const r = i("div", {
512
541
  className: "spot-state-dropdown__wrapper",
513
- parent: d
542
+ parent: c
514
543
  });
515
- n("label", {
544
+ i("label", {
516
545
  className: "spot-state-dropdown__label",
517
546
  text: "State of Residence",
518
547
  parent: r
519
548
  });
520
- const s = n("select", {
549
+ const s = i("select", {
521
550
  className: "spot-state-dropdown__select",
522
551
  parent: r
523
552
  });
524
553
  s.setAttribute("aria-label", "State of Residence");
525
- const i = n("option", {
554
+ const a = i("option", {
526
555
  text: "Select a state...",
527
556
  parent: s
528
557
  });
529
- i.value = "", i.selected = !t, L.forEach(({ value: e, label: o }) => {
530
- const p = n("option", { text: o, parent: s });
531
- p.value = e, e === t && (p.selected = !0);
558
+ a.value = "", a.selected = !t, A.forEach(({ value: o, label: e }) => {
559
+ const l = i("option", { text: e, parent: s });
560
+ l.value = o, o === t && (l.selected = !0);
532
561
  });
533
- const a = n("option", {
562
+ const n = i("option", {
534
563
  text: "Not a US Resident",
535
564
  parent: s
536
565
  });
537
- return a.value = E, t === E && (a.selected = !0), n("div", {
566
+ return n.value = E, t === E && (n.selected = !0), i("div", {
538
567
  className: "spot-state-dropdown__error",
539
- text: A,
568
+ text: O,
540
569
  parent: r
541
570
  }), s;
542
571
  }
543
- function W(d, t, r, s = !1) {
544
- const i = n("div", {
572
+ function W(c, t, r, s = !1) {
573
+ const a = i("div", {
545
574
  className: `spot-selection__options${s ? " spot-selection__options--disabled" : ""}`,
546
- parent: d
547
- }), a = n("label", {
548
- className: `spot-selection__option ${t === _.YES ? "selected" : ""}`,
549
- parent: i
550
- }), e = n("input", { parent: a });
551
- e.type = "radio", e.name = "selection", e.value = _.YES, t === _.YES && (e.checked = !0), s && (e.disabled = !0), n("strong", {
552
- text: r.yesOptionText,
575
+ parent: c
576
+ }), n = i("label", {
577
+ className: `spot-selection__option ${t === w.YES ? "selected" : ""}`,
553
578
  parent: a
554
- }), n("span", {
579
+ }), o = i("input", { parent: n });
580
+ o.type = "radio", o.name = "selection", o.value = w.YES, t === w.YES && (o.checked = !0), s && (o.disabled = !0), i("strong", {
581
+ text: r.yesOptionText,
582
+ parent: n
583
+ }), i("span", {
555
584
  className: "spot-selection__recommended-tag",
556
585
  text: "Recommended",
557
- parent: a
586
+ parent: n
558
587
  });
559
- const o = n("label", {
560
- className: `spot-selection__option ${t === _.NO ? "selected" : ""}`,
561
- parent: i
562
- }), p = n("input", { parent: o });
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;
588
+ const e = i("label", {
589
+ className: `spot-selection__option ${t === w.NO ? "selected" : ""}`,
590
+ parent: a
591
+ }), l = i("input", { parent: e });
592
+ return l.type = "radio", l.name = "selection", l.value = w.NO, t === w.NO && (l.checked = !0), s && (l.disabled = !0), i("span", { text: r.noOptionText, parent: e }), a;
564
593
  }
565
- function R(d, t) {
594
+ function H(c, t) {
566
595
  var s;
567
596
  const r = (s = t.communication) == null ? void 0 : s.paymentTerms;
568
597
  if (r) {
569
- const i = n("div", {
598
+ const a = i("div", {
570
599
  className: "spot-payment-terms",
571
- parent: d
600
+ parent: c
572
601
  });
573
- return n("div", {
602
+ return i("div", {
574
603
  className: "spot-payment-terms__header",
575
604
  text: "PAYMENT TERMS",
576
- parent: i
577
- }), n("div", {
605
+ parent: a
606
+ }), i("div", {
578
607
  className: "spot-payment-terms__body",
579
608
  text: r || "",
580
- parent: i
581
- }), i;
609
+ parent: a
610
+ }), a;
582
611
  }
583
612
  }
584
- function F(d, t, r = "top-right") {
613
+ function Y(c, t, r = "top-right") {
585
614
  if (r === "top-right") {
586
- const o = n("div", {
615
+ const e = i("div", {
587
616
  className: "spot-logo__top-right",
588
- parent: d
617
+ parent: c
589
618
  });
590
- o.innerHTML = `
619
+ e.innerHTML = `
591
620
  <svg width="145" height="28" viewBox="0 0 145 28" fill="none" xmlns="http://www.w3.org/2000/svg">
592
621
  <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"/>
593
622
  <g clip-path="url(#clip0_295_2094)">
@@ -600,25 +629,25 @@ function F(d, t, r = "top-right") {
600
629
  </defs>
601
630
  </svg>`;
602
631
  }
603
- const s = n("div", {
632
+ const s = i("div", {
604
633
  className: "spot-footer__container",
605
- parent: d
606
- }), i = n("div", {
634
+ parent: c
635
+ }), a = i("div", {
607
636
  className: "spot-footer__terms",
608
637
  parent: s
609
- }), a = `<a href="${t.communication.termsAndConditionsUrl}" target="_blank" class="spot-footer__terms-link">Terms & Conditions</a>`, e = t.communication.legalDisclaimer.replace(
638
+ }), n = `<a href="${t.communication.termsAndConditionsUrl}" target="_blank" class="spot-footer__terms-link">Terms & Conditions</a>`, o = t.communication.legalDisclaimer.replace(
610
639
  /terms (and|&) conditions/gi,
611
- a
640
+ n
612
641
  );
613
- if (n("span", {
614
- innerHTML: e,
615
- parent: i
642
+ if (i("span", {
643
+ innerHTML: o,
644
+ parent: a
616
645
  }), r === "bottom-right") {
617
- const o = n("p", {
646
+ const e = i("p", {
618
647
  className: "spot-footer__powered-by",
619
648
  parent: s
620
649
  });
621
- o.innerHTML = `
650
+ e.innerHTML = `
622
651
  <svg width="145" height="28" viewBox="0 0 145 28" fill="none" xmlns="http://www.w3.org/2000/svg">
623
652
  <rect width="145" height="28"/>
624
653
  <rect x="-655" y="-270" width="819" height="325" rx="10"/>
@@ -637,18 +666,18 @@ function F(d, t, r = "top-right") {
637
666
  }
638
667
  return s;
639
668
  }
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)}}";
641
- function G(d) {
669
+ 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-footer-gap: 1rem;--spot-footer-terms-margin-right: 7rem;--spot-payment-terms-margin-top: .5rem;--spot-selection-options-gap: .5rem;--spot-refund-schedule-margin-top: 0rem;--spot-refund-schedule-margin-bottom: 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-top:var(--spot-covered-items-margin-top, .85rem);margin-bottom:var(--spot-covered-items-margin-bottom, 1.5rem)}.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:var(--spot-covered-items-margin-top, .85rem);margin-bottom:var(--spot-covered-items-margin-bottom, .5rem);max-width:26rem}.spot-content__wrapper.desktop-layout:has(.spot-table__container) .spot-covered-items__container{margin-top:var(--spot-covered-items-margin-top, 0rem);margin-bottom:var(--spot-covered-items-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-refund-schedule{border:var(--spot-covered-items-content-border);border-radius:var(--spot-covered-items-border-radius);overflow:hidden;margin-top:var(--spot-refund-schedule-margin-top);margin-bottom:var(--spot-refund-schedule-margin-bottom)}.spot-refund-schedule .spot-covered-items__header{margin-bottom:0}.spot-refund-schedule .spot-covered-items__toggle{border-radius:0}.spot-refund-schedule .spot-covered-items__content{margin-top:0}.spot-refund-schedule .spot-covered-items__list{border:none;border-radius:0;background:transparent;padding:.5rem 1rem;list-style:none}.spot-refund-schedule .spot-covered-items__list li{display:flex;justify-content:space-between;padding:.375rem 0;margin:0;gap:.75rem}.spot-refund-schedule .spot-covered-items__list li>span:first-child{min-width:0}.spot-refund-schedule .spot-covered-items__list li>span:last-child{text-align:right;white-space:nowrap}.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__wrapper{max-width:26rem}.spot-selection__options{display:flex;flex-direction:column;gap:var(--spot-selection-options-gap)}.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;max-width:26rem}.spot-payment-terms__header{font-weight:var(--spot-payment-terms-header-font-weight);margin-bottom:var(--spot-payment-terms-header-margin-bottom);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)}}";
670
+ function K(c) {
642
671
  const t = document.createElement("style");
643
- t.textContent = d, document.head.appendChild(t);
672
+ t.textContent = c, document.head.appendChild(t);
644
673
  }
645
- G(Y);
646
- const H = {
674
+ K(G);
675
+ const R = {
647
676
  sandbox: "https://api.sandbox.getspot.com/api/v1/quote",
648
677
  production: "https://api.getspot.com/api/v1/quote",
649
678
  local: "http://localhost:3999/api/v1/quote"
650
679
  };
651
- class K {
680
+ class X {
652
681
  constructor(t = {}) {
653
682
  this._destroyed = !1, this.options = {
654
683
  location: "body",
@@ -659,135 +688,113 @@ class K {
659
688
  callbacks: {},
660
689
  useMockData: !1,
661
690
  ...t,
662
- selection: t.selection ?? _.UNSELECTED
691
+ selection: t.selection ?? w.UNSELECTED
663
692
  }, 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();
664
693
  }
665
694
  async _init() {
666
- var t, r, s, i, a;
695
+ var t, r, s, a, n;
667
696
  try {
668
697
  M(this.options), this.currentState = this.options.state;
669
- let e;
698
+ let o;
670
699
  if (this.options.useMockData && this.options.mockData)
671
- e = this.options.mockData;
700
+ o = this.options.mockData;
672
701
  else {
673
- const { environment: o, partnerId: p } = this.options.apiConfig, f = this.options.apiConfig.customEndpoint || H[o];
674
- e = "items" in this.options.quoteRequestData ? await N(
702
+ const { environment: e, partnerId: l } = this.options.apiConfig, f = this.options.apiConfig.customEndpoint || R[e];
703
+ o = "items" in this.options.quoteRequestData ? await T(
675
704
  f,
676
- p,
705
+ l,
677
706
  this.options.quoteRequestData,
678
707
  this._validState()
679
- ) : await T(
708
+ ) : await S(
680
709
  f,
681
- p,
710
+ l,
682
711
  this.options.quoteRequestData,
683
712
  this._validState()
684
713
  );
685
714
  }
686
715
  if (this._destroyed) return;
687
- if (e.status !== "QUOTE_AVAILABLE") {
688
- e.status === "NO_MATCHING_QUOTE" && ((t = this.options.callbacks) != null && t.noMatchingQuote) && this.options.callbacks.noMatchingQuote({
716
+ if (o.status !== "QUOTE_AVAILABLE") {
717
+ o.status === "NO_MATCHING_QUOTE" && ((t = this.options.callbacks) != null && t.noMatchingQuote) && this.options.callbacks.noMatchingQuote({
689
718
  status: "NO_MATCHING_QUOTE",
690
719
  data: this.options.quoteRequestData
691
720
  });
692
721
  return;
693
722
  }
694
- if (this.quote = e.data, !this.quote)
723
+ if (this.quote = o.data, !this.quote)
695
724
  throw new Error("No quote data in response");
696
- if (this._renderWidget(), this.options.selection === _.YES && ((r = this.options.callbacks) != null && r.onOptIn)) {
697
- const o = {
725
+ if (this._renderWidget(), this.options.selection === w.YES && ((r = this.options.callbacks) != null && r.onOptIn)) {
726
+ const e = {
698
727
  status: "QUOTE_ACCEPTED",
699
728
  spotPrice: this.quote.spotPrice,
700
729
  quoteId: this.quote.id,
701
730
  state: this._validState()
702
731
  };
703
732
  if (this.quote.originalQuotes && this.quote.originalQuotes.length > 0) {
704
- const p = this.options.quoteRequestData;
705
- o.batchQuoteDetails = this.quote.originalQuotes.map((m) => {
706
- var v;
707
- const f = (v = p.items) == null ? void 0 : v.find(
708
- (h) => (h.cartItemId || `item-${p.items.indexOf(h) + 1}`) === m.cartItemId
733
+ const l = this.options.quoteRequestData;
734
+ e.batchQuoteDetails = this.quote.originalQuotes.map((u) => {
735
+ var h;
736
+ const f = (h = l.items) == null ? void 0 : h.find(
737
+ (g) => (g.cartItemId || `item-${l.items.indexOf(g) + 1}`) === u.cartItemId
709
738
  );
710
739
  return {
711
- quoteId: m.id,
712
- productPrice: (f == null ? void 0 : f.productPrice) || m.spotPrice,
740
+ quoteId: u.id,
741
+ productPrice: (f == null ? void 0 : f.productPrice) || u.spotPrice,
713
742
  cartItemId: (f == null ? void 0 : f.cartItemId) || ""
714
743
  };
715
744
  });
716
745
  }
717
- this.options.callbacks.onOptIn(o);
746
+ this.options.callbacks.onOptIn(e);
718
747
  }
719
748
  if ((s = this.options.callbacks) != null && s.onQuoteRetrieved) {
720
- const o = this.options.callbacks.onQuoteRetrieved(this.quote);
721
- o && this._applyQuoteUpdates(o);
749
+ const e = this.options.callbacks.onQuoteRetrieved(this.quote);
750
+ e && this._applyQuoteUpdates(e);
722
751
  }
723
- } catch (e) {
752
+ } catch (o) {
724
753
  if (this._destroyed) return;
725
- if ((i = this.options.callbacks) != null && i.onError) {
726
- const o = e;
727
- (a = this.options.callbacks) == null || a.onError({
728
- message: o.message,
729
- status: o.status,
730
- responseBody: o.responseBody
754
+ if ((a = this.options.callbacks) != null && a.onError) {
755
+ const e = o;
756
+ (n = this.options.callbacks) == null || n.onError({
757
+ message: e.message,
758
+ status: e.status,
759
+ responseBody: e.responseBody
731
760
  });
732
761
  }
733
762
  }
734
763
  }
735
764
  _renderWidget() {
736
765
  if (!this.quote) return;
737
- this.container = document.createElement("div"), this.container.className = "spot-refund-guarantee", this.root.appendChild(this.container), Object.entries(this.options.theme || {}).forEach(([e, o]) => {
738
- const p = `--${e}`;
739
- this.container.style.setProperty(p, o);
766
+ this.container = document.createElement("div"), this.container.className = "spot-refund-guarantee", this.root.appendChild(this.container), Object.entries(this.options.theme || {}).forEach(([o, e]) => {
767
+ const l = `--${o}`;
768
+ this.container.style.setProperty(l, e);
740
769
  }), $(this.container, this.quote.communication);
741
770
  const t = document.createElement("div");
742
771
  if (t.className = "spot-content__wrapper", this.container.appendChild(t), this.quote.qualifyingReasons ? Q(t, this.quote.qualifyingReasons) : V(t, this.quote.communication.bulletPoints), this.quote.coveredItems) {
743
- const e = this._getTotalItemsInRequest();
744
- U(t, this.quote.coveredItems, e);
772
+ const o = this._getTotalItemsInRequest();
773
+ U(t, this.quote.coveredItems, o);
745
774
  }
746
- this.options.showTable && !this.quote.qualifyingReasons && B(t, this.quote.payoutSchedule, this.quote.currencyCode);
747
- const r = n("div", {
775
+ this.options.showTable && !this.quote.qualifyingReasons && j(t, this.quote.payoutSchedule, this.quote.currencyCode);
776
+ const r = i("div", {
748
777
  className: "spot-selection__wrapper",
749
778
  parent: t
750
779
  });
751
- this._isPassOrTrip() && !this.options.state && (this._stateSelectEl = j(r, this.currentState), this._setNonUsResidentError(this.currentState === E));
752
- const i = !this._isQuotingAvailable(), a = W(
780
+ this._isPassOrTrip() && !this.options.state && (this._stateSelectEl = F(r, this.currentState), this._setNonUsResidentError(this.currentState === E));
781
+ const a = !this._isQuotingAvailable(), n = W(
753
782
  r,
754
783
  this.currentSelection,
755
784
  this.quote.communication,
756
- i
785
+ a
757
786
  );
758
- this.paymentTermsEl = n("div", {
787
+ this.paymentTermsEl = i("div", {
759
788
  className: "spot-payment-terms__wrapper",
760
789
  parent: t
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();
790
+ }), this.currentSelection === w.YES && H(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();
762
791
  }
763
792
  _updateLayout() {
764
793
  if (!this.container || !this.quote) return;
765
794
  const t = this.container.querySelector(
766
795
  ".spot-content__wrapper"
767
- ), r = this.options.showTable && !this.quote.qualifyingReasons;
768
- if (!t || !r) {
769
- t == null || t.classList.remove("desktop-layout");
770
- return;
771
- }
772
- const s = this._shouldUseDesktopLayout(t);
773
- t.classList.toggle("desktop-layout", s);
774
- }
775
- _shouldUseDesktopLayout(t) {
776
- const r = this.container.offsetWidth - 40, s = 325, i = 16;
777
- if (r >= 900)
778
- return !0;
779
- if (r >= 650) {
780
- const a = t.classList.contains("desktop-layout");
781
- t.classList.remove("desktop-layout"), t.offsetHeight;
782
- const e = t.querySelector(
783
- ".spot-benefits__list, .spot-qualifying-reasons__container"
784
- );
785
- if (!e)
786
- return a && t.classList.add("desktop-layout"), a;
787
- const p = Math.min(e.scrollWidth, 400) + s + i;
788
- return a && t.classList.add("desktop-layout"), r >= p;
789
- }
790
- return !1;
796
+ );
797
+ t == null || t.classList.remove("desktop-layout");
791
798
  }
792
799
  _setupResizeObserver() {
793
800
  !this.container || !window.ResizeObserver || (this._resizeObserver = new ResizeObserver(() => {
@@ -824,15 +831,15 @@ class K {
824
831
  return !this._isPassOrTrip() || this.options.state ? !0 : !!this.currentState && this.currentState !== E;
825
832
  }
826
833
  _setRadiosDisabled(t) {
827
- var i, a, e;
828
- const r = (i = this.container) == null ? void 0 : i.querySelectorAll('input[name="selection"]'), s = (a = this.container) == null ? void 0 : a.querySelector(".spot-selection__options");
829
- r == null || r.forEach((o) => {
830
- o.disabled = t;
831
- }), s == null || s.classList.toggle("spot-selection__options--disabled", t), t && (r == null || r.forEach((o) => {
832
- o.checked = !1;
833
- }), (e = this.container) == null || e.querySelectorAll(".spot-selection__option").forEach((o) => {
834
- o.classList.remove("selected");
835
- }), this.currentSelection = _.UNSELECTED, this.paymentTermsEl && (this.paymentTermsEl.innerHTML = ""));
834
+ var a, n, o;
835
+ const r = (a = this.container) == null ? void 0 : a.querySelectorAll('input[name="selection"]'), s = (n = this.container) == null ? void 0 : n.querySelector(".spot-selection__options");
836
+ r == null || r.forEach((e) => {
837
+ e.disabled = t;
838
+ }), s == null || s.classList.toggle("spot-selection__options--disabled", t), t && (r == null || r.forEach((e) => {
839
+ e.checked = !1;
840
+ }), (o = this.container) == null || o.querySelectorAll(".spot-selection__option").forEach((e) => {
841
+ e.classList.remove("selected");
842
+ }), this.currentSelection = w.UNSELECTED, this.paymentTermsEl && (this.paymentTermsEl.innerHTML = ""));
836
843
  }
837
844
  _setNonUsResidentError(t) {
838
845
  var s;
@@ -852,58 +859,58 @@ class K {
852
859
  const r = t.querySelectorAll(
853
860
  'input[type="radio"]'
854
861
  ), s = t.querySelectorAll(".spot-selection__option");
855
- r.forEach((i) => {
856
- i.addEventListener("change", (a) => {
857
- var p, m, f, v;
858
- const e = a.target, o = e.value;
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)) {
860
- const h = {
862
+ r.forEach((a) => {
863
+ a.addEventListener("change", (n) => {
864
+ var l, u, f, h;
865
+ const o = n.target, e = o.value;
866
+ if (this.hideSelectionError(), this.currentSelection = e, s.forEach((g) => g.classList.remove("selected")), (l = o.closest(".spot-selection__option")) == null || l.classList.add("selected"), this.paymentTermsEl && (this.paymentTermsEl.innerHTML = ""), e === w.YES && ((u = this.quote) != null && u.communication.paymentTerms && H(this.paymentTermsEl, this.quote), (f = this.options.callbacks) != null && f.onOptIn)) {
867
+ const g = {
861
868
  status: "QUOTE_ACCEPTED",
862
869
  spotPrice: this.quote.spotPrice,
863
870
  quoteId: this.quote.id,
864
871
  state: this._validState()
865
872
  };
866
873
  if (this.quote.originalQuotes && this.quote.originalQuotes.length > 0) {
867
- const l = this.options.quoteRequestData;
868
- h.batchQuoteDetails = this.quote.originalQuotes.map(
869
- (u) => {
874
+ const p = this.options.quoteRequestData;
875
+ g.batchQuoteDetails = this.quote.originalQuotes.map(
876
+ (m) => {
870
877
  var b;
871
- const c = (b = l.items) == null ? void 0 : b.find(
872
- (w) => (w.cartItemId || `item-${l.items.indexOf(w) + 1}`) === u.cartItemId
878
+ const d = (b = p.items) == null ? void 0 : b.find(
879
+ (_) => (_.cartItemId || `item-${p.items.indexOf(_) + 1}`) === m.cartItemId
873
880
  );
874
881
  return {
875
- quoteId: u.id,
876
- productPrice: (c == null ? void 0 : c.productPrice) || u.spotPrice,
877
- cartItemId: (c == null ? void 0 : c.cartItemId) || ""
882
+ quoteId: m.id,
883
+ productPrice: (d == null ? void 0 : d.productPrice) || m.spotPrice,
884
+ cartItemId: (d == null ? void 0 : d.cartItemId) || ""
878
885
  };
879
886
  }
880
887
  );
881
888
  }
882
- this.options.callbacks.onOptIn(h);
889
+ this.options.callbacks.onOptIn(g);
883
890
  }
884
- if (o === _.NO && ((v = this.options.callbacks) != null && v.onOptOut)) {
885
- const h = {
891
+ if (e === w.NO && ((h = this.options.callbacks) != null && h.onOptOut)) {
892
+ const g = {
886
893
  status: "QUOTE_DECLINED",
887
894
  quoteId: this.quote.id,
888
895
  state: this._validState()
889
896
  };
890
897
  if (this.quote.originalQuotes && this.quote.originalQuotes.length > 0) {
891
- const l = this.options.quoteRequestData;
892
- h.batchQuoteDetails = this.quote.originalQuotes.map(
893
- (u) => {
898
+ const p = this.options.quoteRequestData;
899
+ g.batchQuoteDetails = this.quote.originalQuotes.map(
900
+ (m) => {
894
901
  var b;
895
- const c = (b = l.items) == null ? void 0 : b.find(
896
- (w) => (w.cartItemId || `item-${l.items.indexOf(w) + 1}`) === u.cartItemId
902
+ const d = (b = p.items) == null ? void 0 : b.find(
903
+ (_) => (_.cartItemId || `item-${p.items.indexOf(_) + 1}`) === m.cartItemId
897
904
  );
898
905
  return {
899
- quoteId: u.id,
900
- productPrice: (c == null ? void 0 : c.productPrice) || u.spotPrice,
901
- cartItemId: (c == null ? void 0 : c.cartItemId) || ""
906
+ quoteId: m.id,
907
+ productPrice: (d == null ? void 0 : d.productPrice) || m.spotPrice,
908
+ cartItemId: (d == null ? void 0 : d.cartItemId) || ""
902
909
  };
903
910
  }
904
911
  );
905
912
  }
906
- this.options.callbacks.onOptOut(h);
913
+ this.options.callbacks.onOptOut(g);
907
914
  }
908
915
  });
909
916
  });
@@ -930,67 +937,67 @@ class K {
930
937
  return t ? this.hideSelectionError() : this.showSelectionError(), t;
931
938
  }
932
939
  async updateQuote(t) {
933
- var r, s, i, a;
940
+ var r, s, a, n;
934
941
  if (this._destroyed) return !1;
935
942
  try {
936
- const e = {
943
+ const o = {
937
944
  ...this.options,
938
945
  quoteRequestData: t
939
946
  };
940
- M(e);
941
- const { environment: o, partnerId: p, customEndpoint: m } = this.options.apiConfig, f = m || H[o], h = "items" in e.quoteRequestData ? await N(
947
+ M(o);
948
+ const { environment: e, partnerId: l, customEndpoint: u } = this.options.apiConfig, f = u || R[e], g = "items" in o.quoteRequestData ? await T(
942
949
  f,
943
- p,
944
- e.quoteRequestData,
950
+ l,
951
+ o.quoteRequestData,
945
952
  this._validState()
946
- ) : await T(
953
+ ) : await S(
947
954
  f,
948
- p,
949
- e.quoteRequestData,
955
+ l,
956
+ o.quoteRequestData,
950
957
  this._validState()
951
958
  );
952
959
  if (this._destroyed) return !1;
953
- if (h.status !== "QUOTE_AVAILABLE")
954
- return this._teardownDom(), h.status === "NO_MATCHING_QUOTE" && ((r = this.options.callbacks) != null && r.noMatchingQuote) && this.options.callbacks.noMatchingQuote({
960
+ if (g.status !== "QUOTE_AVAILABLE")
961
+ return this._teardownDom(), g.status === "NO_MATCHING_QUOTE" && ((r = this.options.callbacks) != null && r.noMatchingQuote) && this.options.callbacks.noMatchingQuote({
955
962
  status: "NO_MATCHING_QUOTE",
956
- data: e.quoteRequestData
963
+ data: o.quoteRequestData
957
964
  }), !1;
958
- if (this.options.quoteRequestData = e.quoteRequestData, this.quote = h.data, this._teardownDom(), this._renderWidget(), (s = this.options.callbacks) != null && s.onQuoteRetrieved) {
959
- const l = this.options.callbacks.onQuoteRetrieved(this.quote);
960
- l && this._applyQuoteUpdates(l);
965
+ if (this.options.quoteRequestData = o.quoteRequestData, this.quote = g.data, this._teardownDom(), this._renderWidget(), (s = this.options.callbacks) != null && s.onQuoteRetrieved) {
966
+ const p = this.options.callbacks.onQuoteRetrieved(this.quote);
967
+ p && this._applyQuoteUpdates(p);
961
968
  }
962
969
  return !0;
963
- } catch (e) {
970
+ } catch (o) {
964
971
  if (this._destroyed) return !1;
965
- const o = e;
966
- return (a = (i = this.options.callbacks) == null ? void 0 : i.onError) == null || a.call(i, {
967
- message: o.message,
968
- status: o.status,
969
- responseBody: o.responseBody
972
+ const e = o;
973
+ return (n = (a = this.options.callbacks) == null ? void 0 : a.onError) == null || n.call(a, {
974
+ message: e.message,
975
+ status: e.status,
976
+ responseBody: e.responseBody
970
977
  }), !1;
971
978
  }
972
979
  }
973
980
  getSelection() {
974
- var r, s, i;
975
- if (this.currentSelection == null || this.currentSelection == _.UNSELECTED) return null;
981
+ var r, s, a;
982
+ if (this.currentSelection == null || this.currentSelection == w.UNSELECTED) return null;
976
983
  const t = {
977
984
  selection: this.currentSelection,
978
985
  quoteId: (r = this.quote) == null ? void 0 : r.id,
979
986
  spotPrice: (s = this.quote) == null ? void 0 : s.spotPrice,
980
- status: this.currentSelection === _.YES ? "QUOTE_ACCEPTED" : "QUOTE_DECLINED",
987
+ status: this.currentSelection === w.YES ? "QUOTE_ACCEPTED" : "QUOTE_DECLINED",
981
988
  state: this.currentState
982
989
  };
983
- if ((i = this.quote) != null && i.originalQuotes && this.quote.originalQuotes.length > 0) {
984
- const a = this.options.quoteRequestData;
985
- t.batchQuoteDetails = this.quote.originalQuotes.map((e) => {
986
- var p;
987
- const o = (p = a.items) == null ? void 0 : p.find(
988
- (m) => (m.cartItemId || `item-${a.items.indexOf(m) + 1}`) === e.cartItemId
990
+ if ((a = this.quote) != null && a.originalQuotes && this.quote.originalQuotes.length > 0) {
991
+ const n = this.options.quoteRequestData;
992
+ t.batchQuoteDetails = this.quote.originalQuotes.map((o) => {
993
+ var l;
994
+ const e = (l = n.items) == null ? void 0 : l.find(
995
+ (u) => (u.cartItemId || `item-${n.items.indexOf(u) + 1}`) === o.cartItemId
989
996
  );
990
997
  return {
991
- quoteId: e.id,
992
- productPrice: (o == null ? void 0 : o.productPrice) || e.spotPrice,
993
- cartItemId: (o == null ? void 0 : o.cartItemId) || ""
998
+ quoteId: o.id,
999
+ productPrice: (e == null ? void 0 : e.productPrice) || o.spotPrice,
1000
+ cartItemId: (e == null ? void 0 : e.cartItemId) || ""
994
1001
  };
995
1002
  });
996
1003
  }
@@ -1008,6 +1015,6 @@ class K {
1008
1015
  }
1009
1016
  export {
1010
1017
  E as NON_US_RESIDENT_VALUE,
1011
- _ as SelectionEnum,
1012
- K as default
1018
+ w as SelectionEnum,
1019
+ X as default
1013
1020
  };