@forgebuild/sidon-booking-widget 3.0.0 → 4.0.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.
@@ -42,7 +42,7 @@ function D() {
42
42
  reject: t
43
43
  };
44
44
  }
45
- var O = 1024, ne = 2048, k = 4096, A = 8192, re = 16384, ie = 32768, ae = 1 << 25, oe = 65536, se = 1 << 19, ce = 1 << 20, le = 1 << 25, ue = 65536, de = 1 << 21, fe = 1 << 22, pe = 1 << 23, me = Symbol("$state"), he = Symbol("legacy props"), ge = Symbol(""), _e = Symbol("attributes"), ve = Symbol("class"), ye = Symbol("style"), be = Symbol("text"), xe = Symbol("form reset"), Se = new class extends Error {
45
+ var O = 1024, ne = 2048, k = 4096, re = 8192, ie = 16384, ae = 32768, oe = 1 << 25, A = 65536, se = 1 << 19, ce = 1 << 20, le = 1 << 25, ue = 65536, de = 1 << 21, fe = 1 << 22, pe = 1 << 23, me = Symbol("$state"), he = Symbol("legacy props"), ge = Symbol(""), _e = Symbol("attributes"), ve = Symbol("class"), ye = Symbol("style"), be = Symbol("text"), xe = Symbol("form reset"), Se = new class extends Error {
46
46
  name = "StaleReactionError";
47
47
  message = "The reaction that called `getAbortSignal()` was re-run or destroyed";
48
48
  }(), Ce = !!globalThis.document?.contentType && /* @__PURE__ */ globalThis.document.contentType.includes("xml");
@@ -294,7 +294,7 @@ function gt(e) {
294
294
  }
295
295
  //#endregion
296
296
  //#region node_modules/svelte/src/internal/client/dom/blocks/boundary.js
297
- var _t = oe | se;
297
+ var _t = A | se;
298
298
  function vt(e, t, n, r) {
299
299
  new yt(e, t, n, r);
300
300
  }
@@ -1164,7 +1164,7 @@ function xn(e, t) {
1164
1164
  }
1165
1165
  function Sn(e, t) {
1166
1166
  var n = K;
1167
- n !== null && n.f & 8192 && (e |= A);
1167
+ n !== null && n.f & 8192 && (e |= re);
1168
1168
  var r = {
1169
1169
  ctx: Je,
1170
1170
  deps: null,
@@ -1190,7 +1190,7 @@ function Sn(e, t) {
1190
1190
  } catch (e) {
1191
1191
  throw Ln(r), e;
1192
1192
  }
1193
- i.deps === null && i.teardown === null && i.nodes === null && i.first === i.last && !(i.f & 524288) && (i = i.first, e & 16 && e & 65536 && i !== null && (i.f |= oe));
1193
+ i.deps === null && i.teardown === null && i.nodes === null && i.first === i.last && !(i.f & 524288) && (i = i.first, e & 16 && e & 65536 && i !== null && (i.f |= A));
1194
1194
  }
1195
1195
  if (i !== null && (i.parent = n, n !== null && xn(i, n), G !== null && G.f & 2 && !(e & 64))) {
1196
1196
  var a = G;
@@ -1285,10 +1285,10 @@ function In(e) {
1285
1285
  }
1286
1286
  function Ln(e, t = !0) {
1287
1287
  var n = !1;
1288
- (t || e.f & 262144) && e.nodes !== null && e.nodes.end !== null && (Rn(e.nodes.start, e.nodes.end), n = !0), e.f |= ae, Fn(e, t && !n), pr(e, 0);
1288
+ (t || e.f & 262144) && e.nodes !== null && e.nodes.end !== null && (Rn(e.nodes.start, e.nodes.end), n = !0), e.f |= oe, Fn(e, t && !n), pr(e, 0);
1289
1289
  var r = e.nodes && e.nodes.t;
1290
1290
  if (r !== null) for (let e of r) e.stop();
1291
- Pn(e), e.f ^= ae, e.f |= re;
1291
+ Pn(e), e.f ^= oe, e.f |= ie;
1292
1292
  var i = e.parent;
1293
1293
  i !== null && i.first !== null && zn(e), e.next = e.prev = e.teardown = e.ctx = e.deps = e.fn = e.nodes = e.ac = e.b = null;
1294
1294
  }
@@ -1315,7 +1315,7 @@ function Bn(e, t, n = !0) {
1315
1315
  }
1316
1316
  function Vn(e, t, n) {
1317
1317
  if (!(e.f & 8192)) {
1318
- e.f ^= A;
1318
+ e.f ^= re;
1319
1319
  var r = e.nodes && e.nodes.t;
1320
1320
  if (r !== null) for (let e of r) (e.is_global || n) && t.push(e);
1321
1321
  for (var i = e.first; i !== null;) {
@@ -1333,7 +1333,7 @@ function Hn(e) {
1333
1333
  }
1334
1334
  function Un(e, t) {
1335
1335
  if (e.f & 8192) {
1336
- e.f ^= A, e.f & 1024 || (ot(e, ne), Ht.ensure().schedule(e));
1336
+ e.f ^= re, e.f & 1024 || (ot(e, ne), Ht.ensure().schedule(e));
1337
1337
  for (var n = e.first; n !== null;) {
1338
1338
  var r = n.next, i = !!(n.f & 65536) || !!(n.f & 32);
1339
1339
  Un(n, i ? t : !1), n = r;
@@ -1404,7 +1404,7 @@ function dr(e) {
1404
1404
  try {
1405
1405
  e.f |= de;
1406
1406
  var u = e.fn, d = u();
1407
- e.f |= ie;
1407
+ e.f |= ae;
1408
1408
  var f = e.deps, p = L?.is_fork;
1409
1409
  if (er !== null) {
1410
1410
  var m;
@@ -1481,7 +1481,7 @@ function q(e) {
1481
1481
  var a = i.v;
1482
1482
  return (!(i.f & 1024) && i.reactions !== null || _r(i)) && (a = kt(i)), Xt.set(i, a), a;
1483
1483
  }
1484
- var o = !(i.f & 512) && !Yn && G !== null && (Kn || !!(G.f & 512)), s = (i.f & ie) === 0;
1484
+ var o = !(i.f & 512) && !Yn && G !== null && (Kn || !!(G.f & 512)), s = (i.f & ae) === 0;
1485
1485
  lr(i) && (o && (i.f |= 512), At(i)), o && !s && (Mt(i), gr(i));
1486
1486
  }
1487
1487
  if (Ft?.has(e)) return Ft.get(e);
@@ -1812,7 +1812,7 @@ function Gr(e) {
1812
1812
  function Q(e, t, n = !1) {
1813
1813
  var r;
1814
1814
  M && (r = N, Ve());
1815
- var i = new Wr(e), a = n ? oe : 0;
1815
+ var i = new Wr(e), a = n ? A : 0;
1816
1816
  function o(e, t) {
1817
1817
  if (M) {
1818
1818
  var n = We(r);
@@ -2017,7 +2017,7 @@ function ni(e, t, n, r, i, a) {
2017
2017
  }
2018
2018
  M && Be(t);
2019
2019
  }), () => {};
2020
- }, oe), wn(() => {}), o && (ze(!0), Be(c));
2020
+ }, A), wn(() => {}), o && (ze(!0), Be(c));
2021
2021
  }
2022
2022
  //#endregion
2023
2023
  //#region node_modules/svelte/src/internal/client/dom/css.js
@@ -2953,7 +2953,7 @@ function ha(e, t) {
2953
2953
  n.parseDate = sa({
2954
2954
  config: n.config,
2955
2955
  l10n: n.l10n
2956
- }), n._handlers = [], n.pluginElements = [], n.loadedPlugins = [], n._bind = h, n._setHoursFromDate = f, n._positionCalendar = we, n.changeMonth = oe, n.changeYear = fe, n.clear = se, n.close = ce, n.onMouseOver = _e, n._createElement = Ki, n.createDay = S, n.destroy = le, n.isEnabled = pe, n.jumpToDate = v, n.updateValue = He, n.open = ye, n.redraw = j, n.set = Ae, n.setDate = Me, n.toggle = Re;
2956
+ }), n._handlers = [], n.pluginElements = [], n.loadedPlugins = [], n._bind = h, n._setHoursFromDate = f, n._positionCalendar = we, n.changeMonth = A, n.changeYear = fe, n.clear = se, n.close = ce, n.onMouseOver = _e, n._createElement = Ki, n.createDay = S, n.destroy = le, n.isEnabled = pe, n.jumpToDate = v, n.updateValue = He, n.open = ye, n.redraw = j, n.set = Ae, n.setDate = Me, n.toggle = Re;
2957
2957
  function r() {
2958
2958
  n.utils = { getDaysInMonth: function(e, t) {
2959
2959
  return e === void 0 && (e = n.currentMonth), t === void 0 && (t = n.currentYear), e === 1 && (t % 4 == 0 && t % 100 != 0 || t % 400 == 0) ? 29 : n.l10n.daysInMonth[e];
@@ -3093,12 +3093,12 @@ function ha(e, t) {
3093
3093
  var e = window.document.createDocumentFragment();
3094
3094
  if (n.calendarContainer = Ki("div", "flatpickr-calendar"), n.calendarContainer.tabIndex = -1, !n.config.noCalendar) {
3095
3095
  if (e.appendChild(k()), n.innerContainer = Ki("div", "flatpickr-innerContainer"), n.config.weekNumbers) {
3096
- var t = ae(), r = t.weekWrapper, i = t.weekNumbers;
3096
+ var t = oe(), r = t.weekWrapper, i = t.weekNumbers;
3097
3097
  n.innerContainer.appendChild(r), n.weekNumbers = i, n.weekWrapper = r;
3098
3098
  }
3099
- n.rContainer = Ki("div", "flatpickr-rContainer"), n.rContainer.appendChild(re()), n.daysContainer || (n.daysContainer = Ki("div", "flatpickr-days"), n.daysContainer.tabIndex = -1), te(), n.rContainer.appendChild(n.daysContainer), n.innerContainer.appendChild(n.rContainer), e.appendChild(n.innerContainer);
3099
+ n.rContainer = Ki("div", "flatpickr-rContainer"), n.rContainer.appendChild(ie()), n.daysContainer || (n.daysContainer = Ki("div", "flatpickr-days"), n.daysContainer.tabIndex = -1), te(), n.rContainer.appendChild(n.daysContainer), n.innerContainer.appendChild(n.rContainer), e.appendChild(n.innerContainer);
3100
3100
  }
3101
- n.config.enableTime && e.appendChild(A()), Gi(n.calendarContainer, "rangeMode", n.config.mode === "range"), Gi(n.calendarContainer, "animate", n.config.animate === !0), Gi(n.calendarContainer, "multiMonth", n.config.showMonths > 1), n.calendarContainer.appendChild(e);
3101
+ n.config.enableTime && e.appendChild(re()), Gi(n.calendarContainer, "rangeMode", n.config.mode === "range"), Gi(n.calendarContainer, "animate", n.config.animate === !0), Gi(n.calendarContainer, "multiMonth", n.config.showMonths > 1), n.calendarContainer.appendChild(e);
3102
3102
  var a = n.config.appendTo !== void 0 && n.config.appendTo.nodeType !== void 0;
3103
3103
  if ((n.config.inline || n.config.static) && (n.calendarContainer.classList.add(n.config.inline ? "inline" : "static"), n.config.inline && (!a && n.element.parentNode ? n.element.parentNode.insertBefore(n.calendarContainer, n._input.nextSibling) : n.config.appendTo !== void 0 && n.config.appendTo.appendChild(n.calendarContainer)), n.config.static)) {
3104
3104
  var o = Ki("div", "flatpickr-wrapper");
@@ -3199,7 +3199,7 @@ function ha(e, t) {
3199
3199
  }
3200
3200
  }), n.currentYearElement = n.yearElements[0], Ve(), n.monthNav;
3201
3201
  }
3202
- function A() {
3202
+ function re() {
3203
3203
  n.calendarContainer.classList.add("hasTime"), n.config.noCalendar && n.calendarContainer.classList.add("noCalendar");
3204
3204
  var e = aa(n.config);
3205
3205
  n.timeContainer = Ki("div", "flatpickr-time"), n.timeContainer.tabIndex = -1;
@@ -3213,22 +3213,22 @@ function ha(e, t) {
3213
3213
  }
3214
3214
  return n.config.time_24hr || (n.amPM = Ki("span", "flatpickr-am-pm", n.l10n.amPM[Hi((n.latestSelectedDateObj ? n.hourElement.value : n.config.defaultHour) > 11)]), n.amPM.title = n.l10n.toggleTitle, n.amPM.tabIndex = -1, n.timeContainer.appendChild(n.amPM)), n.timeContainer;
3215
3215
  }
3216
- function re() {
3216
+ function ie() {
3217
3217
  n.weekdayContainer ? qi(n.weekdayContainer) : n.weekdayContainer = Ki("div", "flatpickr-weekdays");
3218
3218
  for (var e = n.config.showMonths; e--;) {
3219
3219
  var t = Ki("div", "flatpickr-weekdaycontainer");
3220
3220
  n.weekdayContainer.appendChild(t);
3221
3221
  }
3222
- return ie(), n.weekdayContainer;
3222
+ return ae(), n.weekdayContainer;
3223
3223
  }
3224
- function ie() {
3224
+ function ae() {
3225
3225
  if (n.weekdayContainer) {
3226
3226
  var e = n.l10n.firstDayOfWeek, t = va(n.l10n.weekdays.shorthand);
3227
3227
  e > 0 && e < t.length && (t = va(t.splice(e, t.length), t.splice(0, e)));
3228
3228
  for (var r = n.config.showMonths; r--;) n.weekdayContainer.children[r].innerHTML = "\n <span class='flatpickr-weekday'>\n " + t.join("</span><span class='flatpickr-weekday'>") + "\n </span>\n ";
3229
3229
  }
3230
3230
  }
3231
- function ae() {
3231
+ function oe() {
3232
3232
  n.calendarContainer.classList.add("hasWeeks");
3233
3233
  var e = Ki("div", "flatpickr-weekwrapper");
3234
3234
  e.appendChild(Ki("span", "flatpickr-weekday", n.l10n.weekAbbreviation));
@@ -3238,7 +3238,7 @@ function ha(e, t) {
3238
3238
  weekNumbers: t
3239
3239
  };
3240
3240
  }
3241
- function oe(e, t) {
3241
+ function A(e, t) {
3242
3242
  t === void 0 && (t = !0);
3243
3243
  var r = t ? e : e - n.currentMonth;
3244
3244
  r < 0 && n._hidePrevMonthArrow === !0 || r > 0 && n._hideNextMonthArrow === !0 || (n.currentMonth += r, (n.currentMonth < 0 || n.currentMonth > 11) && (n.currentYear += n.currentMonth > 11 ? 1 : -1, n.currentMonth = (n.currentMonth + 12) % 12, M("onYearChange"), D()), te(), M("onMonthChange"), Ve());
@@ -3335,7 +3335,7 @@ function ha(e, t) {
3335
3335
  var f = a();
3336
3336
  if (n.daysContainer !== void 0 && (o === !1 || f && me(f))) {
3337
3337
  var p = t.keyCode === 39 ? 1 : -1;
3338
- t.ctrlKey ? (t.stopPropagation(), oe(p), T(C(1), 0)) : T(void 0, p);
3338
+ t.ctrlKey ? (t.stopPropagation(), A(p), T(C(1), 0)) : T(void 0, p);
3339
3339
  }
3340
3340
  } else n.hourElement && n.hourElement.focus();
3341
3341
  break;
@@ -3590,11 +3590,11 @@ function ha(e, t) {
3590
3590
  }
3591
3591
  }
3592
3592
  var ke = {
3593
- locale: [Ce, ie],
3593
+ locale: [Ce, ae],
3594
3594
  showMonths: [
3595
3595
  ne,
3596
3596
  s,
3597
- re
3597
+ ie
3598
3598
  ],
3599
3599
  minDate: [v],
3600
3600
  maxDate: [v],
@@ -3722,7 +3722,7 @@ function ha(e, t) {
3722
3722
  }
3723
3723
  function Ue(e) {
3724
3724
  var t = Xi(e), r = n.prevMonthNav.contains(t), i = n.nextMonthNav.contains(t);
3725
- r || i ? oe(r ? -1 : 1) : n.yearElements.indexOf(t) >= 0 ? t.select() : t.classList.contains("arrowUp") ? n.changeYear(n.currentYear + 1) : t.classList.contains("arrowDown") && n.changeYear(n.currentYear - 1);
3725
+ r || i ? A(r ? -1 : 1) : n.yearElements.indexOf(t) >= 0 ? t.select() : t.classList.contains("arrowUp") ? n.changeYear(n.currentYear + 1) : t.classList.contains("arrowDown") && n.changeYear(n.currentYear - 1);
3726
3726
  }
3727
3727
  function We(e) {
3728
3728
  e.preventDefault();
@@ -4238,34 +4238,28 @@ function Ua(e) {
4238
4238
  };
4239
4239
  }
4240
4240
  function Wa(e) {
4241
- return Array.isArray(e) ? e.map((e) => ({
4242
- id: String(e.id),
4243
- type: e.type ?? "",
4244
- name: e.name ?? "",
4245
- description: e.description ?? "",
4246
- mandatory: e.mandatory !== !1
4247
- })) : [];
4248
- }
4249
- function Ga(e) {
4250
4241
  return {
4251
- signInRequired: e?.sign_in_required === !0,
4252
4242
  uploadsAvailable: e?.document_uploads === !0,
4253
4243
  requirements: (Array.isArray(e?.requirements) ? e.requirements : []).map((e) => ({
4254
4244
  id: String(e.id),
4255
4245
  type: e.type ?? "",
4256
4246
  name: e.name ?? "",
4257
4247
  mandatory: e.mandatory !== !1,
4258
- met: e.met === !0
4248
+ met: e.met === !0,
4249
+ latest: e.latest?.id ? {
4250
+ id: String(e.latest.id),
4251
+ expiryDate: typeof e.latest.expiry_date == "string" ? e.latest.expiry_date.slice(0, 10) : null
4252
+ } : null
4259
4253
  }))
4260
4254
  };
4261
4255
  }
4262
- function Ka(e) {
4263
- return !e.signInRequired || e.requirements.every((e) => !e.mandatory || e.met);
4256
+ function Ga(e) {
4257
+ return e.requirements.every((e) => !e.mandatory || e.met);
4264
4258
  }
4265
- function qa(e, t) {
4259
+ function Ka(e, t) {
4266
4260
  return e === 401 && t === "Sign in required" || e === 409 && t === "Required documents missing";
4267
4261
  }
4268
- function Ja(e) {
4262
+ function qa(e) {
4269
4263
  return Array.isArray(e) ? e.map((e) => ({
4270
4264
  label: e.label,
4271
4265
  lengthM: Ra(e.length_m),
@@ -4275,7 +4269,7 @@ function Ja(e) {
4275
4269
  totalPrice: Ra(e.total_price)
4276
4270
  })) : [];
4277
4271
  }
4278
- function Ya(e) {
4272
+ function Ja(e) {
4279
4273
  return {
4280
4274
  id: e.id,
4281
4275
  status: e.status,
@@ -4298,20 +4292,20 @@ function Ya(e) {
4298
4292
  docCount: Number(e.doc_count) || 0
4299
4293
  };
4300
4294
  }
4301
- function Xa(e) {
4295
+ function Ya(e) {
4302
4296
  return e?.client_secret && e?.publishable_key ? {
4303
4297
  clientSecret: e.client_secret,
4304
4298
  publishableKey: e.publishable_key
4305
4299
  } : null;
4306
4300
  }
4307
- function Za(e) {
4301
+ function Xa(e) {
4308
4302
  return {
4309
4303
  templateId: e.template_id ?? null,
4310
4304
  renderedBody: e.rendered_body ?? "",
4311
4305
  agreedAt: e.agreed_at ?? null
4312
4306
  };
4313
4307
  }
4314
- function Qa(e) {
4308
+ function Za(e) {
4315
4309
  return {
4316
4310
  id: e.id,
4317
4311
  requirementId: e.requirement_id ?? null,
@@ -4320,22 +4314,22 @@ function Qa(e) {
4320
4314
  submittedAt: e.submitted_at
4321
4315
  };
4322
4316
  }
4323
- function $a(e) {
4317
+ function Qa(e) {
4324
4318
  return {
4325
- booking: Ya(e.booking),
4326
- payment: Xa(e.payment),
4327
- contract: e.contract ? Za(e.contract) : null,
4328
- documents: (e.documents ?? []).map(Qa)
4319
+ booking: Ja(e.booking),
4320
+ payment: Ya(e.payment),
4321
+ contract: e.contract ? Xa(e.contract) : null,
4322
+ documents: (e.documents ?? []).map(Za)
4329
4323
  };
4330
4324
  }
4331
- function eo(e) {
4325
+ function $a(e) {
4332
4326
  return {
4333
- booking: Ya(e.booking),
4327
+ booking: Ja(e.booking),
4334
4328
  token: e.booking_token,
4335
- payment: Xa(e.payment)
4329
+ payment: Ya(e.payment)
4336
4330
  };
4337
4331
  }
4338
- function to(e) {
4332
+ function eo(e) {
4339
4333
  let t = {
4340
4334
  berth_label: e.berthLabel,
4341
4335
  arrival: e.arrival,
@@ -4350,23 +4344,23 @@ function to(e) {
4350
4344
  let r = e.notes?.trim();
4351
4345
  return r && (t.notes = r), t;
4352
4346
  }
4353
- function no(e, t, n) {
4347
+ function to(e, t, n) {
4354
4348
  return !(e.lengthM != null && t > e.lengthM || e.minLengthM != null && t < e.minLengthM || e.beamM != null && n != null && n > e.beamM);
4355
4349
  }
4356
- function ro(e, t, n) {
4357
- return n || e.status === "available" && no(e, t);
4350
+ function no(e, t, n) {
4351
+ return n || e.status === "available" && to(e, t);
4358
4352
  }
4359
- function io(e) {
4353
+ function ro(e) {
4360
4354
  let t = (e) => e ?? Infinity;
4361
4355
  return [...e].sort((e, n) => t(e.totalPrice) - t(n.totalPrice) || t(e.lengthM) - t(n.lengthM))[0]?.label ?? null;
4362
4356
  }
4363
- function ao(e) {
4357
+ function io(e) {
4364
4358
  return e === 409 ? "card" : e === 410 ? "lapsed" : "retry";
4365
4359
  }
4366
- function oo(e, t) {
4360
+ function ao(e, t) {
4367
4361
  return e === "pending" || e === "confirmed" || e === "hold" && !t;
4368
4362
  }
4369
- function so(e, t, n, r) {
4363
+ function oo(e, t, n, r) {
4370
4364
  if (e == null) return "";
4371
4365
  if (!n && t) try {
4372
4366
  return new Intl.NumberFormat(r, {
@@ -4376,10 +4370,10 @@ function so(e, t, n, r) {
4376
4370
  } catch {}
4377
4371
  return `${n}${e}`;
4378
4372
  }
4379
- function co(e) {
4373
+ function so(e) {
4380
4374
  return e.replace(/[^\x20-\x7E]/g, "_").slice(0, 200);
4381
4375
  }
4382
- async function lo(e, t) {
4376
+ async function co(e, t) {
4383
4377
  try {
4384
4378
  let t = JSON.parse(await e.text());
4385
4379
  if (typeof t?.error == "string" && t.error) return t.error;
@@ -4388,12 +4382,12 @@ async function lo(e, t) {
4388
4382
  }
4389
4383
  //#endregion
4390
4384
  //#region src/lib/berth-shape.ts
4391
- var uo = [
4385
+ var lo = [
4392
4386
  [-.5, -.5],
4393
4387
  [.5, -.5],
4394
4388
  [.5, .5],
4395
4389
  [-.5, .5]
4396
- ], fo = [
4390
+ ], uo = [
4397
4391
  [.5, 0],
4398
4392
  [.4, -.4],
4399
4393
  [-.3, -.45],
@@ -4403,12 +4397,12 @@ var uo = [
4403
4397
  [-.3, .45],
4404
4398
  [.4, .4]
4405
4399
  ];
4406
- function po(e, t) {
4400
+ function fo(e, t) {
4407
4401
  if (e.rotation != null) return e.rotation;
4408
4402
  let n = e.pontoonId ? t.find((t) => t.id === e.pontoonId) : void 0;
4409
4403
  return n ? ((n.rotation ?? 0) + 90) % 360 : null;
4410
4404
  }
4411
- function mo(e, t, n, r = 1) {
4405
+ function po(e, t, n, r = 1) {
4412
4406
  let i = e.lat, a = e.lng, o = Math.max(5, e.lengthM || 15) * r, s = Math.max(2, e.beamM || 4) * r, c = 111320 * Math.cos(i * Math.PI / 180), l = -t * Math.PI / 180, u = Math.cos(l), d = Math.sin(l);
4413
4407
  return n.map(([e, t]) => {
4414
4408
  let n = e * o, r = t * s;
@@ -4420,12 +4414,12 @@ function mo(e, t, n, r = 1) {
4420
4414
  }
4421
4415
  //#endregion
4422
4416
  //#region src/components/BerthMapView.svelte
4423
- var ho = /* @__PURE__ */ Y("<div class=\"sbm-map svelte-yb07tk\"></div>"), go = {
4417
+ var mo = /* @__PURE__ */ Y("<div class=\"sbm-map svelte-yb07tk\"></div>"), ho = {
4424
4418
  hash: "svelte-yb07tk",
4425
4419
  code: ".sbm-map.svelte-yb07tk {width:100%;height:100%;background:#eef2f5;}"
4426
4420
  };
4427
- function _o(e, t) {
4428
- Xe(t, !0), ri(e, go);
4421
+ function go(e, t) {
4422
+ Xe(t, !0), ri(e, ho);
4429
4423
  let n = $(t, "mapsApiKey", 7), r = $(t, "mapStyle", 7), i = $(t, "center", 7), a = $(t, "navy", 7), o = $(t, "gold", 7), s = $(t, "logoMark", 7, null), c = $(t, "marinaName", 7, ""), l = $(t, "otherMarinas", 7), u = $(t, "berths", 7), d = $(t, "overlays", 7), f = $(t, "layout", 7), p = $(t, "loa", 7), m = $(t, "selectedBerth", 7), h = $(t, "onBerthClick", 7), g = $(t, "staff", 7, !1), _, v = /* @__PURE__ */ B(null), y = /* @__PURE__ */ new Map(), b = [], x = [], S = !1, ee = /* @__PURE__ */ I(() => ({
4430
4424
  fillColor: o(),
4431
4425
  fillOpacity: .38,
@@ -4462,7 +4456,7 @@ function _o(e, t) {
4462
4456
  strokeColor: a(),
4463
4457
  strokeOpacity: 1,
4464
4458
  strokeWeight: 1.6
4465
- })), D = (e) => Math.max(5, e.lengthM || 15), O = (e, t) => e.angle == null ? e.circle.setRadius(D(e.berth) * t) : e.circle.setPaths(mo(e.berth, e.angle, uo, t)), ne = /* @__PURE__ */ new WeakMap();
4459
+ })), D = (e) => Math.max(5, e.lengthM || 15), O = (e, t) => e.angle == null ? e.circle.setRadius(D(e.berth) * t) : e.circle.setPaths(po(e.berth, e.angle, lo, t)), ne = /* @__PURE__ */ new WeakMap();
4466
4460
  function k(e) {
4467
4461
  let t = e.circle, n = Symbol();
4468
4462
  ne.set(t, n);
@@ -4478,7 +4472,7 @@ function _o(e, t) {
4478
4472
  };
4479
4473
  requestAnimationFrame(i);
4480
4474
  }
4481
- let A = [
4475
+ let re = [
4482
4476
  {
4483
4477
  elementType: "geometry",
4484
4478
  stylers: [{ color: "#ffffff" }]
@@ -4536,7 +4530,7 @@ function _o(e, t) {
4536
4530
  elementType: "labels.text.fill",
4537
4531
  stylers: [{ color: "#aab0b4" }]
4538
4532
  }
4539
- ], re = /* @__PURE__ */ I(() => [
4533
+ ], ie = /* @__PURE__ */ I(() => [
4540
4534
  {
4541
4535
  elementType: "geometry",
4542
4536
  stylers: [{ color: "#f5efe4" }]
@@ -4618,7 +4612,7 @@ function _o(e, t) {
4618
4612
  stylers: [{ color: a() }]
4619
4613
  }
4620
4614
  ]);
4621
- class ie {
4615
+ class ae {
4622
4616
  position;
4623
4617
  href;
4624
4618
  img;
@@ -4653,7 +4647,7 @@ function _o(e, t) {
4653
4647
  this.overlayView.setMap(e);
4654
4648
  }
4655
4649
  }
4656
- let ae = {
4650
+ let oe = {
4657
4651
  available: {
4658
4652
  fill: "rgba(16,185,129,0.3)",
4659
4653
  stroke: "#10b981"
@@ -4671,7 +4665,7 @@ function _o(e, t) {
4671
4665
  stroke: "rgba(136,136,136,0.4)"
4672
4666
  }
4673
4667
  };
4674
- function oe(e) {
4668
+ function A(e) {
4675
4669
  let t = {};
4676
4670
  for (let e of u()) e.berthId && (t[e.berthId] = {
4677
4671
  price: e.pricePerNight,
@@ -4684,7 +4678,7 @@ function _o(e, t) {
4684
4678
  r?.price != null && e.setAttribute("data-price", String(r.price));
4685
4679
  let i = r?.status ?? "occupied";
4686
4680
  e.setAttribute("data-status", i), g() && r && e.setAttribute("data-pick", "1");
4687
- let a = ae[i] ?? ae.occupied, o = e.querySelector("rect:not([data-role]), circle");
4681
+ let a = oe[i] ?? oe.occupied, o = e.querySelector("rect:not([data-role]), circle");
4688
4682
  o && (o.setAttribute("fill", a.fill), o.setAttribute("stroke", a.stroke));
4689
4683
  let s = e.querySelector("[data-role=\"entrance\"]");
4690
4684
  s && s.setAttribute("fill", a.stroke);
@@ -4737,7 +4731,7 @@ function _o(e, t) {
4737
4731
  lat: e.neLat,
4738
4732
  lng: e.neLng
4739
4733
  }
4740
- }, this.svgData = oe(e.svgData), this.rotation = e.rotation ?? 0, this.overlayView.onAdd = () => {
4734
+ }, this.svgData = A(e.svgData), this.rotation = e.rotation ?? 0, this.overlayView.onAdd = () => {
4741
4735
  this.div = document.createElement("div"), this.div.style.cssText = "position:absolute;pointer-events:none;transform-origin:center center;", this.div.innerHTML = this.svgData;
4742
4736
  let e = this.div.querySelector("svg");
4743
4737
  e && (e.style.width = "100%", e.style.height = "100%"), this.div.addEventListener("click", (e) => {
@@ -4766,12 +4760,12 @@ function _o(e, t) {
4766
4760
  let t = new Map(u().map((e) => [e.berthId, e]));
4767
4761
  e.querySelectorAll("[data-berth-id]").forEach((e) => {
4768
4762
  let n = e.getAttribute("data-berth-id") ?? "", r = t.get(n);
4769
- !g() && r && !no(r, p()) ? e.setAttribute("data-fit", "small") : e.removeAttribute("data-fit"), n === m() ? e.setAttribute("data-selected", "1") : e.removeAttribute("data-selected");
4763
+ !g() && r && !to(r, p()) ? e.setAttribute("data-fit", "small") : e.removeAttribute("data-fit"), n === m() ? e.setAttribute("data-selected", "1") : e.removeAttribute("data-selected");
4770
4764
  });
4771
4765
  }
4772
4766
  function le(e, t) {
4773
4767
  let n = e.berth.status !== "available";
4774
- e.pickable = ro(e.berth, p(), g());
4768
+ e.pickable = no(e.berth, p(), g());
4775
4769
  let r = t === m() ? q(w) : n ? g() ? q(te) : E : e.pickable ? q(ee) : T;
4776
4770
  e.circle.setOptions({
4777
4771
  ...r,
@@ -4787,7 +4781,7 @@ function _o(e, t) {
4787
4781
  zoom: 15,
4788
4782
  disableDefaultUI: !0,
4789
4783
  zoomControl: !0,
4790
- styles: r() === "coastal" ? q(re) : A,
4784
+ styles: r() === "coastal" ? q(ie) : re,
4791
4785
  backgroundColor: r() === "coastal" ? "#f5efe4" : "#ffffff"
4792
4786
  });
4793
4787
  t.event.addListenerOnce(n, "idle", () => {
@@ -4808,7 +4802,7 @@ function _o(e, t) {
4808
4802
  let e = new window.google.maps.LatLngBounds();
4809
4803
  for (let t of u()) {
4810
4804
  if (t.lat == null || t.lng == null || !t.berthId) continue;
4811
- let n = window.google.maps, r = po(t, d()), i = r == null ? new n.Circle({
4805
+ let n = window.google.maps, r = fo(t, d()), i = r == null ? new n.Circle({
4812
4806
  map: q(v),
4813
4807
  center: {
4814
4808
  lat: t.lat,
@@ -4818,13 +4812,13 @@ function _o(e, t) {
4818
4812
  ...q(ee)
4819
4813
  }) : new n.Polygon({
4820
4814
  map: q(v),
4821
- paths: mo(t, r, uo),
4815
+ paths: po(t, r, lo),
4822
4816
  ...q(ee)
4823
4817
  }), o = {
4824
4818
  circle: i,
4825
4819
  hull: r == null ? null : new n.Polygon({
4826
4820
  map: q(v),
4827
- paths: mo(t, r, fo, .8),
4821
+ paths: po(t, r, uo, .8),
4828
4822
  clickable: !1,
4829
4823
  zIndex: 1,
4830
4824
  fillColor: a(),
@@ -4855,8 +4849,8 @@ function _o(e, t) {
4855
4849
  if (!q(v)) return;
4856
4850
  for (let e of b) e.setMap(null);
4857
4851
  let e = [];
4858
- s() && e.push(new ie(i(), s(), c(), null));
4859
- for (let t of l()) t.logoMark && e.push(new ie({
4852
+ s() && e.push(new ae(i(), s(), c(), null));
4853
+ for (let t of l()) t.logoMark && e.push(new ae({
4860
4854
  lat: t.lat,
4861
4855
  lng: t.lng
4862
4856
  }, t.logoMark, t.name, t.href));
@@ -4980,10 +4974,10 @@ function _o(e, t) {
4980
4974
  set staff(e = !1) {
4981
4975
  g(e), z();
4982
4976
  }
4983
- }, he = ho();
4977
+ }, he = mo();
4984
4978
  return Oi(he, (e) => _ = e, () => _), X(e, he), Ze(me);
4985
4979
  }
4986
- Pi(_o, {
4980
+ Pi(go, {
4987
4981
  mapsApiKey: {},
4988
4982
  mapStyle: {},
4989
4983
  center: {},
@@ -5002,12 +4996,12 @@ Pi(_o, {
5002
4996
  }, [], [], { mode: "open" });
5003
4997
  //#endregion
5004
4998
  //#region src/components/Stepper.svelte
5005
- var vo = /* @__PURE__ */ Y("<div><span class=\"sbw-step-dot svelte-9crcip\"></span> <span class=\"sbw-step-label svelte-9crcip\"> </span></div>"), yo = /* @__PURE__ */ Y("<div class=\"sbw-stepper svelte-9crcip\" role=\"tablist\"></div>"), bo = {
4999
+ var _o = /* @__PURE__ */ Y("<div><span class=\"sbw-step-dot svelte-9crcip\"></span> <span class=\"sbw-step-label svelte-9crcip\"> </span></div>"), vo = /* @__PURE__ */ Y("<div class=\"sbw-stepper svelte-9crcip\" role=\"tablist\"></div>"), yo = {
5006
5000
  hash: "svelte-9crcip",
5007
5001
  code: ".sbw-stepper.svelte-9crcip {display:flex;align-items:stretch;}.sbw-step-item.svelte-9crcip {flex:1;display:flex;flex-direction:column;align-items:center;gap:4px;padding:18px 8px;min-width:0;background:#fff;border-left:1px solid rgba(0, 0, 0, 0.08);border-radius:0 0 16px 16px;}.sbw-step-item.svelte-9crcip:first-child {border-left:none;}.sbw-step-dot.svelte-9crcip {font-size:32px;font-weight:300;line-height:1;color:var(--brand-gold, #c9a86b);}.sbw-step-label.svelte-9crcip {font-size:11px;font-weight:600;letter-spacing:1.5px;text-transform:uppercase;color:var(--brand-navy, #16365b);}.sbw-step-filled.svelte-9crcip {background:var(--brand-navy, #16365b);}.sbw-step-filled.svelte-9crcip .sbw-step-label:where(.svelte-9crcip) {color:#fff;}.sbw-step-active.svelte-9crcip .sbw-step-dot:where(.svelte-9crcip) {color:#fff;}.sbw-step-selectable.svelte-9crcip {cursor:pointer;}.sbw-step-selectable.svelte-9crcip:hover .sbw-step-dot:where(.svelte-9crcip),\r\n .sbw-step-selectable.svelte-9crcip:hover .sbw-step-label:where(.svelte-9crcip) {color:var(--brand-gold, #c9a86b);}"
5008
5002
  };
5009
- function xo(e, t) {
5010
- Xe(t, !0), ri(e, bo);
5003
+ function bo(e, t) {
5004
+ Xe(t, !0), ri(e, yo);
5011
5005
  let n = $(t, "active", 7), r = $(t, "first", 7, 1), i = $(t, "labels", 7), a = $(t, "onStepClick", 7);
5012
5006
  function o(e) {
5013
5007
  return n() !== 4 && e < n();
@@ -5037,10 +5031,10 @@ function xo(e, t) {
5037
5031
  set onStepClick(e) {
5038
5032
  a(e), z();
5039
5033
  }
5040
- }, c = yo();
5034
+ }, c = vo();
5041
5035
  return Xr(c, 21, () => i().slice(r() - 1), Kr, (e, t, i) => {
5042
5036
  let s = /* @__PURE__ */ I(() => i + r()), c = /* @__PURE__ */ I(() => q(s) < n()), l = /* @__PURE__ */ I(() => q(s) === n());
5043
- var u = vo();
5037
+ var u = _o();
5044
5038
  let d;
5045
5039
  var f = H(u);
5046
5040
  f.textContent = i + 1;
@@ -5061,7 +5055,7 @@ function xo(e, t) {
5061
5055
  }), X(e, u);
5062
5056
  }), P(c), X(e, c), Ze(s);
5063
5057
  }
5064
- wr(["click", "keydown"]), Pi(xo, {
5058
+ wr(["click", "keydown"]), Pi(bo, {
5065
5059
  active: {},
5066
5060
  first: {},
5067
5061
  labels: {},
@@ -5069,11 +5063,11 @@ wr(["click", "keydown"]), Pi(xo, {
5069
5063
  }, [], [], { mode: "open" });
5070
5064
  //#endregion
5071
5065
  //#region src/lib/sidon-sign-in.ts
5072
- var So = "https://marina.sidonmarine.uk", Co = (e) => `sbw-sailor:${e}`, wo = 60;
5073
- function To(e, t = Date.now()) {
5066
+ var xo = "https://sidonmarine.uk", So = (e) => `sbw-sailor:${e}`, Co = 60;
5067
+ function wo(e, t = Date.now()) {
5074
5068
  try {
5075
5069
  let n = e.split(".")[1], r = atob(n.replace(/-/g, "+").replace(/_/g, "/").padEnd(Math.ceil(n.length / 4) * 4, "=")), i = JSON.parse(new TextDecoder().decode(Uint8Array.from(r, (e) => e.charCodeAt(0))));
5076
- return typeof i.email != "string" || !i.email || typeof i.exp != "number" || i.exp - wo <= t / 1e3 ? null : {
5070
+ return typeof i.email != "string" || !i.email || typeof i.exp != "number" || i.exp - Co <= t / 1e3 ? null : {
5077
5071
  token: e,
5078
5072
  email: i.email,
5079
5073
  name: typeof i.name == "string" ? i.name.trim() : ""
@@ -5082,29 +5076,29 @@ function To(e, t = Date.now()) {
5082
5076
  return null;
5083
5077
  }
5084
5078
  }
5085
- function Eo(e) {
5079
+ function To(e) {
5086
5080
  let t = null;
5087
5081
  try {
5088
- t = sessionStorage.getItem(Co(e));
5082
+ t = sessionStorage.getItem(So(e));
5089
5083
  } catch {}
5090
- let n = t ? To(t) : null;
5091
- return t && !n && Do(e), n;
5084
+ let n = t ? wo(t) : null;
5085
+ return t && !n && Eo(e), n;
5092
5086
  }
5093
- function Do(e) {
5087
+ function Eo(e) {
5094
5088
  try {
5095
- sessionStorage.removeItem(Co(e));
5089
+ sessionStorage.removeItem(So(e));
5096
5090
  } catch {}
5097
5091
  }
5098
- function Oo(e) {
5092
+ function Do(e) {
5099
5093
  let t = `${e}/connect?origin=${encodeURIComponent(location.origin)}`, n = window.open(t, "sidon-sign-in", "popup,width=480,height=720");
5100
5094
  return n ? new Promise((t) => {
5101
5095
  let r = (e) => {
5102
5096
  window.removeEventListener("message", i), clearInterval(a), t(e);
5103
5097
  }, i = (t) => {
5104
5098
  if (t.origin !== e || t.source !== n || t.data?.type !== "sidon:sailor-token") return;
5105
- let i = typeof t.data.token == "string" ? To(t.data.token) : null;
5099
+ let i = typeof t.data.token == "string" ? wo(t.data.token) : null;
5106
5100
  if (i) try {
5107
- sessionStorage.setItem(Co(e), i.token);
5101
+ sessionStorage.setItem(So(e), i.token);
5108
5102
  } catch {}
5109
5103
  r(i);
5110
5104
  };
@@ -5114,105 +5108,91 @@ function Oo(e) {
5114
5108
  }
5115
5109
  //#endregion
5116
5110
  //#region src/lib/marina-api.ts
5117
- var ko = class extends Error {
5111
+ var Oo = class extends Error {
5118
5112
  status;
5119
5113
  constructor(e, t) {
5120
5114
  super(e), this.status = t;
5121
5115
  }
5122
5116
  };
5123
- async function Ao(e, t, n, r = !1) {
5117
+ async function ko(e, t, n, r = !1) {
5124
5118
  let i;
5125
5119
  try {
5126
5120
  i = await fetch(e, n);
5127
5121
  } catch {
5128
- throw new ko(t, 0);
5122
+ throw new Oo(t, 0);
5129
5123
  }
5130
- if (!i.ok) throw new ko(await lo(i, t), i.status);
5124
+ if (!i.ok) throw new Oo(await co(i, t), i.status);
5131
5125
  if (r) return null;
5132
5126
  try {
5133
5127
  return await i.json();
5134
5128
  } catch {
5135
- throw new ko(t, i.status);
5129
+ throw new Oo(t, i.status);
5136
5130
  }
5137
5131
  }
5138
- var jo = (e, t = {}) => ({
5132
+ var Ao = (e, t = {}) => ({
5139
5133
  method: "POST",
5140
5134
  headers: {
5141
5135
  "Content-Type": "application/json",
5142
5136
  ...t
5143
5137
  },
5144
5138
  body: JSON.stringify(e)
5145
- }), Mo = (e, t, n, r = "") => `${za(e, t)}/bookings/${encodeURIComponent(n.id)}${r}`, No = (e) => ({ "X-Booking-Token": e.token });
5146
- async function Po(e, t, n) {
5139
+ }), jo = (e, t, n, r = "") => `${za(e, t)}/bookings/${encodeURIComponent(n.id)}${r}`, Mo = (e) => ({ "X-Booking-Token": e.token });
5140
+ async function No(e, t, n) {
5147
5141
  let r = n && n.to > n.from ? `?${new URLSearchParams(n)}` : "";
5148
- return Ua(await Ao(`${za(e, t)}${r}`, "Failed to load marina data"));
5142
+ return Ua(await ko(`${za(e, t)}${r}`, "Failed to load marina data"));
5149
5143
  }
5150
- async function Fo(e, t) {
5151
- return Wa(await Ao(`${za(e, t)}/doc-requirements`, "Failed to load document requirements"));
5152
- }
5153
- async function Io(e, t, n, r) {
5144
+ async function Po(e, t, n, r) {
5154
5145
  let i = new URLSearchParams({
5155
5146
  arrival: n.arrival,
5156
5147
  departure: n.departure
5157
5148
  });
5158
- return Ga(await Ao(`${za(e, t)}/requirements-status?${i}`, "Failed to load document requirements", r ? { headers: { "X-Sailor-Token": r } } : void 0));
5149
+ return Wa(await ko(`${za(e, t)}/requirements-status?${i}`, "Failed to load document requirements", r ? { headers: { "X-Sailor-Token": r } } : void 0));
5159
5150
  }
5160
- async function Lo(e, t, n) {
5151
+ async function Fo(e, t, n) {
5161
5152
  let r = new URLSearchParams({
5162
5153
  arrival: n.arrival,
5163
5154
  departure: n.departure,
5164
5155
  boat_length_m: String(n.boatLengthM)
5165
5156
  });
5166
- return n.boatBeamM && r.set("boat_beam_m", String(n.boatBeamM)), Ja(await Ao(`${za(e, t)}/availability?${r}`, "Failed to load availability"));
5157
+ return n.boatBeamM && r.set("boat_beam_m", String(n.boatBeamM)), qa(await ko(`${za(e, t)}/availability?${r}`, "Failed to load availability"));
5167
5158
  }
5168
- async function Ro(e, t, n, r) {
5159
+ async function Io(e, t, n, r) {
5169
5160
  let i = r ? { "X-Sailor-Token": r } : {};
5170
- return eo(await Ao(`${za(e, t)}/bookings`, "Booking failed", jo(to(n), i)));
5161
+ return $a(await ko(`${za(e, t)}/bookings`, "Booking failed", Ao(eo(n), i)));
5171
5162
  }
5172
- async function zo(e, t, n) {
5173
- return $a(await Ao(Mo(e, t, n), "Failed to load your booking", { headers: No(n) }));
5163
+ async function Lo(e, t, n) {
5164
+ return Qa(await ko(jo(e, t, n), "Failed to load your booking", { headers: Mo(n) }));
5174
5165
  }
5175
- async function Bo(e, t, n) {
5176
- return Ya((await Ao(Mo(e, t, n, "/confirm-payment"), "Payment could not be confirmed", jo({}, No(n)))).booking);
5166
+ async function Ro(e, t, n) {
5167
+ return Ja((await ko(jo(e, t, n, "/confirm-payment"), "Payment could not be confirmed", Ao({}, Mo(n)))).booking);
5177
5168
  }
5178
- async function Vo(e, t, n) {
5179
- return Ya((await Ao(Mo(e, t, n, "/cancel"), "Could not cancel the booking", jo({}, No(n)))).booking);
5180
- }
5181
- async function Ho(e, t, n, r) {
5182
- return Qa(await Ao(Mo(e, t, n, `/documents?requirement_id=${encodeURIComponent(r.requirementId)}`), "Upload failed", {
5183
- method: "POST",
5184
- headers: {
5185
- ...No(n),
5186
- "Content-Type": r.contentType,
5187
- "X-File-Name": co(r.fileName)
5188
- },
5189
- body: r.blob
5190
- }));
5169
+ async function zo(e, t, n) {
5170
+ return Ja((await ko(jo(e, t, n, "/cancel"), "Could not cancel the booking", Ao({}, Mo(n)))).booking);
5191
5171
  }
5192
- async function Uo(e, t, n) {
5193
- await Ao(`${e}/api/sailor/documents?type=${encodeURIComponent(n.type)}`, "Upload failed", {
5172
+ async function Bo(e, t, n) {
5173
+ await ko(`${e}/api/sailor/documents?${n.documentId ? `document_id=${encodeURIComponent(n.documentId)}` : `type=${encodeURIComponent(n.type)}`}`, "Upload failed", {
5194
5174
  method: "POST",
5195
5175
  headers: {
5196
5176
  "X-Sailor-Token": t,
5197
5177
  "Content-Type": n.contentType,
5198
- "X-File-Name": co(n.fileName)
5178
+ "X-File-Name": so(n.fileName)
5199
5179
  },
5200
5180
  body: n.blob
5201
5181
  }, !0);
5202
5182
  }
5203
- async function Wo(e, t, n) {
5204
- return Za(await Ao(Mo(e, t, n, "/contract"), "Could not record your agreement", jo({}, No(n))));
5183
+ async function Vo(e, t, n) {
5184
+ return Xa(await ko(jo(e, t, n, "/contract"), "Could not record your agreement", Ao({}, Mo(n))));
5205
5185
  }
5206
- async function Go(e, t, n) {
5186
+ async function Ho(e, t, n) {
5207
5187
  try {
5208
- return await Ao(Mo(e, t, n, "/ably-token"), "Live updates are unavailable", { headers: No(n) });
5188
+ return await ko(jo(e, t, n, "/ably-token"), "Live updates are unavailable", { headers: Mo(n) });
5209
5189
  } catch (e) {
5210
- if (e instanceof ko && e.status === 503) return null;
5190
+ if (e instanceof Oo && e.status === 503) return null;
5211
5191
  throw e;
5212
5192
  }
5213
5193
  }
5214
- var Ko = 2e3, qo = "Please upload a PDF, JPEG or PNG";
5215
- async function Jo(e) {
5194
+ var Uo = 2e3, Wo = "Please upload a PDF, JPEG or PNG";
5195
+ async function Go(e) {
5216
5196
  if (e.type === "application/pdf" || !e.type && /\.pdf$/i.test(e.name)) {
5217
5197
  if (e.size > 4194304) throw Error("PDF files must be 4 MB or smaller");
5218
5198
  return {
@@ -5230,12 +5210,12 @@ async function Jo(e) {
5230
5210
  try {
5231
5211
  t = await createImageBitmap(e);
5232
5212
  } catch {
5233
- throw Error(qo);
5213
+ throw Error(Wo);
5234
5214
  }
5235
- let n = Math.min(1, Ko / Math.max(t.width, t.height)), r = document.createElement("canvas");
5215
+ let n = Math.min(1, Uo / Math.max(t.width, t.height)), r = document.createElement("canvas");
5236
5216
  r.width = Math.round(t.width * n), r.height = Math.round(t.height * n);
5237
5217
  let i = r.getContext("2d");
5238
- if (!i) throw Error(qo);
5218
+ if (!i) throw Error(Wo);
5239
5219
  i.drawImage(t, 0, 0, r.width, r.height), t.close();
5240
5220
  let a = `${e.name.replace(/\.[^.]*$/, "")}.jpg`;
5241
5221
  for (let e of [.85, .7]) {
@@ -5250,94 +5230,105 @@ async function Jo(e) {
5250
5230
  }
5251
5231
  //#endregion
5252
5232
  //#region src/components/DocumentsStep.svelte
5253
- var Yo = /* @__PURE__ */ Y("<div class=\"sbw-sailor svelte-1d47278\"><span class=\"sbw-sailor-email svelte-1d47278\"> <strong> </strong></span> <button type=\"button\" class=\"sbw-link svelte-1d47278\"> </button></div>"), Xo = /* @__PURE__ */ Y("<p class=\"sbw-docs-note svelte-1d47278\"> </p>"), Zo = /* @__PURE__ */ Y("<p class=\"sbw-docs-note svelte-1d47278\"> </p> <!>", 1), Qo = /* @__PURE__ */ Mr("<svg class=\"sbw-spin svelte-1d47278\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2.4\" stroke-linecap=\"round\"><path d=\"M21 12a9 9 0 1 1-6.219-8.56\"></path></svg>"), $o = /* @__PURE__ */ Mr("<svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"3\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M5 12.5l4.5 4.5L19 7.5\"></path></svg>"), es = /* @__PURE__ */ Mr("<svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2.6\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4M17 8l-5-5-5 5M12 3v12\"></path></svg>"), ts = /* @__PURE__ */ Y("<div class=\"sbw-doc-icon svelte-1d47278\" aria-hidden=\"true\"><!></div>"), ns = /* @__PURE__ */ Y("<span class=\"sbw-required svelte-1d47278\">*</span>"), rs = /* @__PURE__ */ Y("<div class=\"sbw-doc-sub svelte-1d47278\"> </div>"), is = /* @__PURE__ */ Y("<span class=\"sbw-doc-cta svelte-1d47278\"> </span>"), as = /* @__PURE__ */ Y("<input type=\"file\" accept=\"image/*,application/pdf\" class=\"sbw-visually-hidden svelte-1d47278\"/>"), os = /* @__PURE__ */ Y("<div class=\"sbw-doc-main svelte-1d47278\"><!> <div class=\"sbw-doc-text svelte-1d47278\"><div class=\"sbw-doc-name svelte-1d47278\"> <!></div> <!></div></div> <!> <!>", 1), ss = /* @__PURE__ */ Y("<div class=\"sbw-docs-error svelte-1d47278\" role=\"alert\"> </div>"), cs = /* @__PURE__ */ Y("<p class=\"sbw-docs-error svelte-1d47278\" role=\"alert\"> </p>"), ls = /* @__PURE__ */ Y("<!> <!> <!> <!>", 1), us = /* @__PURE__ */ Y("<p class=\"sbw-docs-error svelte-1d47278\" role=\"alert\"> </p> <button type=\"button\" class=\"sbw-auth-btn svelte-1d47278\"> </button>", 1), ds = /* @__PURE__ */ Y("<div class=\"sbw-auth-actions svelte-1d47278\"><button type=\"button\" class=\"sbw-auth-btn sbw-auth-primary svelte-1d47278\"> </button></div> <!>", 1), fs = /* @__PURE__ */ Y("<div><div class=\"sbw-docs-heading svelte-1d47278\"> </div> <!> <!> <!> <!></div>"), ps = {
5233
+ var Ko = /* @__PURE__ */ Y("<div class=\"sbw-sailor svelte-1d47278\"><span class=\"sbw-sailor-email svelte-1d47278\"> <strong> </strong></span> <button type=\"button\" class=\"sbw-link svelte-1d47278\"> </button></div>"), qo = /* @__PURE__ */ Y("<p class=\"sbw-docs-note svelte-1d47278\"> </p>"), Jo = /* @__PURE__ */ Y("<p class=\"sbw-docs-note svelte-1d47278\"> </p> <!>", 1), Yo = /* @__PURE__ */ Mr("<svg class=\"sbw-spin svelte-1d47278\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2.4\" stroke-linecap=\"round\"><path d=\"M21 12a9 9 0 1 1-6.219-8.56\"></path></svg>"), Xo = /* @__PURE__ */ Mr("<svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"3\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M5 12.5l4.5 4.5L19 7.5\"></path></svg>"), Zo = /* @__PURE__ */ Mr("<svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2.6\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4M17 8l-5-5-5 5M12 3v12\"></path></svg>"), Qo = /* @__PURE__ */ Y("<div class=\"sbw-doc-icon svelte-1d47278\" aria-hidden=\"true\"><!></div>"), $o = /* @__PURE__ */ Y("<span class=\"sbw-required svelte-1d47278\">*</span>"), es = /* @__PURE__ */ Y("<div> </div>"), ts = /* @__PURE__ */ Y("<span class=\"sbw-doc-cta svelte-1d47278\"> </span>"), ns = /* @__PURE__ */ Y("<input type=\"file\" accept=\"image/*,application/pdf\" class=\"sbw-visually-hidden svelte-1d47278\"/>"), rs = /* @__PURE__ */ Y("<div class=\"sbw-doc-main svelte-1d47278\"><!> <div class=\"sbw-doc-text svelte-1d47278\"><div class=\"sbw-doc-name svelte-1d47278\"> <!></div> <!></div></div> <!> <!>", 1), is = /* @__PURE__ */ Y("<div class=\"sbw-docs-error svelte-1d47278\" role=\"alert\"> </div>"), as = /* @__PURE__ */ Y("<p class=\"sbw-docs-error svelte-1d47278\" role=\"alert\"> </p>"), os = /* @__PURE__ */ Y("<!> <!> <!> <!>", 1), ss = /* @__PURE__ */ Y("<p class=\"sbw-docs-error svelte-1d47278\" role=\"alert\"> </p> <button type=\"button\" class=\"sbw-auth-btn svelte-1d47278\"> </button>", 1), cs = /* @__PURE__ */ Y("<div class=\"sbw-auth-actions svelte-1d47278\"><button type=\"button\" class=\"sbw-auth-btn sbw-auth-primary svelte-1d47278\"> </button></div> <!>", 1), ls = /* @__PURE__ */ Y("<div><div class=\"sbw-docs-heading svelte-1d47278\"> </div> <!> <!> <!> <!></div>"), us = {
5254
5234
  hash: "svelte-1d47278",
5255
- code: ".sbw-docs.svelte-1d47278 {display:flex;flex-direction:column;gap:12px;padding:20px;color:var(--brand-ink, #252525);}.sbw-docs-heading.svelte-1d47278 {font-size:11px;font-weight:600;letter-spacing:2px;text-transform:uppercase;color:#252525;}.sbw-docs-note.svelte-1d47278 {margin:0;font-size:13px;color:#666;line-height:1.6;}.sbw-docs-error.svelte-1d47278 {margin:0;font-size:14px;color:#cc4949;}.sbw-sailor.svelte-1d47278 {display:flex;align-items:baseline;justify-content:space-between;gap:12px;padding:12px 16px;border:1px solid #e4e7ec;border-radius:var(--sbw-radius, 10px);font-size:13px;}.sbw-sailor-email.svelte-1d47278 {min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}.sbw-link.svelte-1d47278 {flex-shrink:0;padding:0;border:none;background:none;font:inherit;color:var(--brand-navy, #16365b);text-decoration:underline;cursor:pointer;}.sbw-auth-actions.svelte-1d47278 {display:flex;flex-wrap:wrap;gap:10px;}.sbw-auth-btn.svelte-1d47278 {height:48px;padding:0 24px;border-radius:var(--sbw-radius, 10px);border:1px solid rgba(37, 37, 37, 0.15);background:transparent;color:var(--brand-navy, #16365b);font-size:12px;font-weight:600;letter-spacing:2px;text-transform:uppercase;cursor:pointer;}.sbw-auth-btn.sbw-auth-primary.svelte-1d47278 {border:none;background:var(--brand-gold, #c9a86b);}.sbw-auth-btn.svelte-1d47278:hover {background:var(--brand-navy, #16365b);color:#fff;}.sbw-variant-dark.svelte-1d47278 .sbw-sailor:where(.svelte-1d47278),\r\n .sbw-variant-dark.svelte-1d47278 .sbw-auth-btn:where(.svelte-1d47278) {border-radius:0;}.sbw-variant-dark.svelte-1d47278 .sbw-auth-btn:where(.svelte-1d47278) {color:var(--brand-ink, #252525);}.sbw-variant-dark.svelte-1d47278 .sbw-auth-btn.sbw-auth-primary:where(.svelte-1d47278) {background:var(--brand-ink, #252525);color:#fff;}.sbw-variant-dark.svelte-1d47278 .sbw-auth-btn:where(.svelte-1d47278):hover {background:var(--brand-gold, #c9a86b);color:var(--brand-ink, #252525);}\r\n\r\n /* Row styling copied from DocumentsSection. */.sbw-doc-row.svelte-1d47278 {display:flex;align-items:stretch;border:1px solid #e4e7ec;border-radius:var(--sbw-radius, 10px);overflow:hidden;background:#fff;}.sbw-doc-row.sbw-doc-can.svelte-1d47278 {cursor:pointer;}\r\n /* The file input is visually hidden, so show keyboard focus on the row. */.sbw-doc-row.svelte-1d47278:focus-within {outline:2px solid var(--brand-navy, #16365b);outline-offset:2px;}.sbw-doc-row.sbw-doc-done.svelte-1d47278 {border-color:var(--brand-navy, #16365b);background:var(--brand-navy, #16365b);color:#fff;}.sbw-doc-row.sbw-doc-busy.svelte-1d47278 {cursor:not-allowed;}.sbw-doc-main.svelte-1d47278 {display:flex;align-items:center;gap:16px;flex:1;min-width:0;padding:16px;}.sbw-doc-icon.svelte-1d47278 {width:32px;height:32px;display:flex;align-items:center;justify-content:center;flex-shrink:0;}.sbw-doc-busy.svelte-1d47278 .sbw-doc-icon:where(.svelte-1d47278) {color:var(--brand-navy, #16365b);}.sbw-spin.svelte-1d47278 {\r\n animation: svelte-1d47278-sbw-spin 0.8s linear infinite;}\r\n @keyframes svelte-1d47278-sbw-spin {\r\n to {\r\n transform: rotate(360deg);\r\n }\r\n }.sbw-doc-text.svelte-1d47278 {min-width:0;flex:1;}.sbw-doc-name.svelte-1d47278 {font-size:16px;font-weight:600;}.sbw-doc-sub.svelte-1d47278 {font-size:13px;opacity:0.8;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}.sbw-required.svelte-1d47278 {color:#cc4949;}.sbw-doc-cta.svelte-1d47278 {display:inline-flex;align-items:center;justify-content:center;padding:0 20px;border-left:1px solid #e4e7ec;font-size:11px;font-weight:600;letter-spacing:1.5px;text-transform:uppercase;color:var(--brand-navy, #16365b);}.sbw-doc-row.sbw-doc-can.svelte-1d47278:hover .sbw-doc-cta:where(.svelte-1d47278) {background:var(--brand-navy, #16365b);color:#fff;}\r\n /* 'dark' variant (Fox/Pevero): flush corners and a solid-ink CTA/done\r\n fill instead of navy. */.sbw-variant-dark.svelte-1d47278 .sbw-doc-row:where(.svelte-1d47278) {border-radius:0;}.sbw-variant-dark.svelte-1d47278 .sbw-doc-row.sbw-doc-done:where(.svelte-1d47278) {border-color:var(--brand-ink, #252525);background:var(--brand-ink, #252525);}.sbw-variant-dark.svelte-1d47278 .sbw-doc-row.sbw-doc-can:where(.svelte-1d47278) .sbw-doc-cta:where(.svelte-1d47278) {background:var(--brand-ink, #252525);color:#fff;}.sbw-variant-dark.svelte-1d47278 .sbw-doc-row.sbw-doc-can:where(.svelte-1d47278):hover .sbw-doc-cta:where(.svelte-1d47278) {background:var(--brand-gold, #c9a86b);color:var(--brand-ink, #252525);}.sbw-visually-hidden.svelte-1d47278 {position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);}"
5235
+ code: ".sbw-docs.svelte-1d47278 {display:flex;flex-direction:column;gap:12px;padding:20px;color:var(--brand-ink, #252525);}.sbw-docs-heading.svelte-1d47278 {font-size:11px;font-weight:600;letter-spacing:2px;text-transform:uppercase;color:#252525;}.sbw-docs-note.svelte-1d47278 {margin:0;font-size:13px;color:#666;line-height:1.6;}.sbw-docs-error.svelte-1d47278 {margin:0;font-size:14px;color:#cc4949;}.sbw-sailor.svelte-1d47278 {display:flex;align-items:baseline;justify-content:space-between;gap:12px;padding:12px 16px;border:1px solid #e4e7ec;border-radius:var(--sbw-radius, 10px);font-size:13px;}.sbw-sailor-email.svelte-1d47278 {min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}.sbw-link.svelte-1d47278 {flex-shrink:0;padding:0;border:none;background:none;font:inherit;color:var(--brand-navy, #16365b);text-decoration:underline;cursor:pointer;}.sbw-auth-actions.svelte-1d47278 {display:flex;flex-wrap:wrap;gap:10px;}.sbw-auth-btn.svelte-1d47278 {height:48px;padding:0 24px;border-radius:var(--sbw-radius, 10px);border:1px solid rgba(37, 37, 37, 0.15);background:transparent;color:var(--brand-navy, #16365b);font-size:12px;font-weight:600;letter-spacing:2px;text-transform:uppercase;cursor:pointer;}.sbw-auth-btn.sbw-auth-primary.svelte-1d47278 {border:none;background:var(--brand-gold, #c9a86b);}.sbw-auth-btn.svelte-1d47278:hover {background:var(--brand-navy, #16365b);color:#fff;}.sbw-variant-dark.svelte-1d47278 .sbw-sailor:where(.svelte-1d47278),\r\n .sbw-variant-dark.svelte-1d47278 .sbw-auth-btn:where(.svelte-1d47278) {border-radius:0;}.sbw-variant-dark.svelte-1d47278 .sbw-auth-btn:where(.svelte-1d47278) {color:var(--brand-ink, #252525);}.sbw-variant-dark.svelte-1d47278 .sbw-auth-btn.sbw-auth-primary:where(.svelte-1d47278) {background:var(--brand-ink, #252525);color:#fff;}.sbw-variant-dark.svelte-1d47278 .sbw-auth-btn:where(.svelte-1d47278):hover {background:var(--brand-gold, #c9a86b);color:var(--brand-ink, #252525);}.sbw-doc-row.svelte-1d47278 {display:flex;align-items:stretch;border:1px solid #e4e7ec;border-radius:var(--sbw-radius, 10px);overflow:hidden;background:#fff;}.sbw-doc-row.sbw-doc-can.svelte-1d47278 {cursor:pointer;}\r\n /* The file input is visually hidden, so show keyboard focus on the row. */.sbw-doc-row.svelte-1d47278:focus-within {outline:2px solid var(--brand-navy, #16365b);outline-offset:2px;}.sbw-doc-row.sbw-doc-done.svelte-1d47278 {border-color:var(--brand-navy, #16365b);background:var(--brand-navy, #16365b);color:#fff;}.sbw-doc-row.sbw-doc-busy.svelte-1d47278 {cursor:not-allowed;}.sbw-doc-main.svelte-1d47278 {display:flex;align-items:center;gap:16px;flex:1;min-width:0;padding:16px;}.sbw-doc-icon.svelte-1d47278 {width:32px;height:32px;display:flex;align-items:center;justify-content:center;flex-shrink:0;}.sbw-doc-busy.svelte-1d47278 .sbw-doc-icon:where(.svelte-1d47278) {color:var(--brand-navy, #16365b);}.sbw-spin.svelte-1d47278 {\r\n animation: svelte-1d47278-sbw-spin 0.8s linear infinite;}\r\n @keyframes svelte-1d47278-sbw-spin {\r\n to {\r\n transform: rotate(360deg);\r\n }\r\n }.sbw-doc-text.svelte-1d47278 {min-width:0;flex:1;}.sbw-doc-name.svelte-1d47278 {font-size:16px;font-weight:600;}.sbw-doc-sub.svelte-1d47278 {font-size:13px;opacity:0.8;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}.sbw-doc-sub.sbw-doc-why.svelte-1d47278 {color:#cc4949;opacity:1;white-space:normal;}.sbw-required.svelte-1d47278 {color:#cc4949;}.sbw-doc-cta.svelte-1d47278 {display:inline-flex;align-items:center;justify-content:center;padding:0 20px;border-left:1px solid #e4e7ec;font-size:11px;font-weight:600;letter-spacing:1.5px;text-transform:uppercase;color:var(--brand-navy, #16365b);}.sbw-doc-row.sbw-doc-can.svelte-1d47278:hover .sbw-doc-cta:where(.svelte-1d47278) {background:var(--brand-navy, #16365b);color:#fff;}\r\n /* 'dark' variant (Fox/Pevero): flush corners and a solid-ink CTA/done\r\n fill instead of navy. */.sbw-variant-dark.svelte-1d47278 .sbw-doc-row:where(.svelte-1d47278) {border-radius:0;}.sbw-variant-dark.svelte-1d47278 .sbw-doc-row.sbw-doc-done:where(.svelte-1d47278) {border-color:var(--brand-ink, #252525);background:var(--brand-ink, #252525);}.sbw-variant-dark.svelte-1d47278 .sbw-doc-row.sbw-doc-can:where(.svelte-1d47278) .sbw-doc-cta:where(.svelte-1d47278) {background:var(--brand-ink, #252525);color:#fff;}.sbw-variant-dark.svelte-1d47278 .sbw-doc-row.sbw-doc-can:where(.svelte-1d47278):hover .sbw-doc-cta:where(.svelte-1d47278) {background:var(--brand-gold, #c9a86b);color:var(--brand-ink, #252525);}.sbw-visually-hidden.svelte-1d47278 {position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);}"
5256
5236
  };
5257
- function ms(e, t) {
5258
- Xe(t, !0), ri(e, ps);
5259
- let n = $(t, "apiOrigin", 7), r = $(t, "slug", 7), i = $(t, "sailorApiOrigin", 7), a = $(t, "sidonOrigin", 7), o = $(t, "arrival", 7), s = $(t, "departure", 7), c = $(t, "labels", 7), l = $(t, "variant", 7), u = $(t, "complete", 15, !1), d = $(t, "sailor", 15, null), f = /* @__PURE__ */ B(!1), p = /* @__PURE__ */ B(!1), m = /* @__PURE__ */ B(null), h = /* @__PURE__ */ B(!0), g = /* @__PURE__ */ B(!1), _ = /* @__PURE__ */ B(on({})), v = /* @__PURE__ */ B(null), y = 0, b = !1, x = /* @__PURE__ */ I(() => q(m)?.signInRequired ?? !1), S = /* @__PURE__ */ I(() => q(m)?.requirements.some((e) => e.mandatory && !e.met) ?? !1);
5237
+ function ds(e, t) {
5238
+ Xe(t, !0), ri(e, us);
5239
+ let n = $(t, "apiOrigin", 7), r = $(t, "slug", 7), i = $(t, "sailorApiOrigin", 7), a = $(t, "sidonOrigin", 7), o = $(t, "arrival", 7), s = $(t, "departure", 7), c = $(t, "lang", 7), l = $(t, "labels", 7), u = $(t, "variant", 7), d = $(t, "complete", 15, !1), f = $(t, "sailor", 15, null), p = /* @__PURE__ */ B(!1), m = /* @__PURE__ */ B(!1), h = /* @__PURE__ */ B(null), g = /* @__PURE__ */ B(!0), _ = /* @__PURE__ */ B(!1), v = /* @__PURE__ */ B(on({})), y = /* @__PURE__ */ B(null), b = 0, x = !1, S = /* @__PURE__ */ I(() => (q(h)?.requirements.length ?? 0) > 0), ee = /* @__PURE__ */ I(() => q(h)?.requirements.some((e) => e.mandatory && !e.met) ?? !1);
5260
5240
  Tn(() => {
5261
- u(!!q(m) && !q(h) && !q(g) && Ka(q(m)) && (!q(m).signInRequired || !!d()));
5241
+ d(!!q(h) && !q(g) && !q(_) && Ga(q(h)));
5262
5242
  });
5263
- function ee() {
5264
- let e = Eo(a());
5265
- return !e && d() && d(null), e?.token ?? null;
5243
+ function C() {
5244
+ let e = To(a());
5245
+ return !e && f() && f(null), e?.token ?? null;
5266
5246
  }
5267
- async function C() {
5268
- let e = ++y, t = {
5247
+ async function w() {
5248
+ let e = ++b, t = {
5269
5249
  arrival: o(),
5270
5250
  departure: s()
5271
5251
  };
5272
- V(h, !0);
5252
+ V(g, !0);
5273
5253
  try {
5274
- let i = await Io(n(), r(), t, ee());
5275
- if (b || e !== y) return;
5276
- V(m, i), V(g, !1);
5254
+ let i = await Po(n(), r(), t, C());
5255
+ if (x || e !== b) return;
5256
+ V(h, i), V(_, !1);
5277
5257
  } catch {
5278
- if (b || e !== y) return;
5279
- V(g, !0);
5258
+ if (x || e !== b) return;
5259
+ V(_, !0);
5280
5260
  }
5281
- V(h, !1);
5261
+ V(g, !1);
5282
5262
  }
5283
5263
  {
5284
- let e = Eo(a());
5285
- d(e && {
5264
+ let e = To(a());
5265
+ f(e && {
5286
5266
  email: e.email,
5287
5267
  name: e.name
5288
5268
  });
5289
5269
  }
5290
5270
  Tn(() => {
5291
- o(), s(), J(() => void C());
5271
+ o(), s(), J(() => void w());
5292
5272
  }), Gr(() => () => {
5293
- b = !0;
5273
+ x = !0;
5294
5274
  });
5295
- async function w() {
5296
- V(p, !1), V(f, !0);
5275
+ async function T() {
5276
+ V(m, !1), V(p, !0);
5297
5277
  try {
5298
- let e = await Oo(a());
5299
- if (b || !e) return;
5300
- d({
5278
+ let e = await Do(a());
5279
+ if (x || !e) return;
5280
+ f({
5301
5281
  email: e.email,
5302
5282
  name: e.name
5303
- }), await C();
5283
+ }), await w();
5304
5284
  } catch {
5305
- V(p, !0);
5285
+ V(m, !0);
5306
5286
  } finally {
5307
- V(f, !1);
5287
+ V(p, !1);
5308
5288
  }
5309
5289
  }
5310
- async function T() {
5311
- Do(a()), d(null), await C();
5290
+ async function E() {
5291
+ Eo(a()), f(null), await w();
5312
5292
  }
5313
- function E(e, t) {
5314
- return e.type === "application/pdf" || !e.type && /\.pdf$/i.test(e.name) || t instanceof Error && /too large/i.test(t.message) ? c().uploadTooLarge : c().uploadBadType;
5293
+ function te(e) {
5294
+ if (e.met || !e.latest) return "";
5295
+ if (!e.latest.expiryDate) return l().docsStep.unreadable;
5296
+ let t = /* @__PURE__ */ new Date(`${e.latest.expiryDate}T00:00:00`);
5297
+ return l().docsStep.expiredOn(t.toLocaleDateString(c(), {
5298
+ day: "numeric",
5299
+ month: "short",
5300
+ year: "numeric"
5301
+ }));
5315
5302
  }
5316
- async function te(e, t) {
5303
+ function D(e, t) {
5304
+ return e.type === "application/pdf" || !e.type && /\.pdf$/i.test(e.name) || t instanceof Error && /too large/i.test(t.message) ? l().uploadTooLarge : l().uploadBadType;
5305
+ }
5306
+ async function O(e, t) {
5317
5307
  let n = t.currentTarget, r = n.files?.[0];
5318
5308
  if (n.value = "", r) {
5319
- V(v, null), V(_, {
5320
- ...q(_),
5309
+ V(y, null), V(v, {
5310
+ ...q(v),
5321
5311
  [e.id]: r.name
5322
5312
  }, !0);
5323
5313
  try {
5324
- let t = await Jo(r).catch((e) => (V(v, E(r, e), !0), null));
5314
+ let t = await Go(r).catch((e) => (V(y, D(r, e), !0), null));
5325
5315
  if (!t) return;
5326
- let n = ee();
5316
+ let n = C();
5327
5317
  if (!n) throw Error("Signed out");
5328
- await Uo(i(), n, {
5318
+ await Bo(i(), n, {
5329
5319
  ...t,
5330
- type: e.type
5331
- }), await C();
5320
+ type: e.type,
5321
+ documentId: e.latest?.id
5322
+ }), await w();
5332
5323
  } catch (e) {
5333
- V(v, !(e instanceof ko) || e.status < 400 ? c().uploadFailed : e.status === 401 ? c().docsStep.sessionRejected : e.status === 413 ? c().uploadTooLarge : e.status === 429 ? c().uploadLimit : e.message, !0);
5324
+ V(y, !(e instanceof Oo) || e.status < 400 ? l().uploadFailed : e.status === 401 ? l().docsStep.sessionRejected : e.status === 413 ? l().uploadTooLarge : e.status === 429 ? l().uploadLimit : e.message, !0);
5334
5325
  } finally {
5335
- let { [e.id]: t, ...n } = q(_);
5336
- V(_, n, !0);
5326
+ let { [e.id]: t, ...n } = q(v);
5327
+ V(v, n, !0);
5337
5328
  }
5338
5329
  }
5339
5330
  }
5340
- var D = {
5331
+ var ne = {
5341
5332
  get apiOrigin() {
5342
5333
  return n();
5343
5334
  },
@@ -5374,181 +5365,192 @@ function ms(e, t) {
5374
5365
  set departure(e) {
5375
5366
  s(e), z();
5376
5367
  },
5377
- get labels() {
5368
+ get lang() {
5378
5369
  return c();
5379
5370
  },
5380
- set labels(e) {
5371
+ set lang(e) {
5381
5372
  c(e), z();
5382
5373
  },
5383
- get variant() {
5374
+ get labels() {
5384
5375
  return l();
5385
5376
  },
5386
- set variant(e) {
5377
+ set labels(e) {
5387
5378
  l(e), z();
5388
5379
  },
5389
- get complete() {
5380
+ get variant() {
5390
5381
  return u();
5391
5382
  },
5392
- set complete(e = !1) {
5383
+ set variant(e) {
5393
5384
  u(e), z();
5394
5385
  },
5395
- get sailor() {
5386
+ get complete() {
5396
5387
  return d();
5397
5388
  },
5398
- set sailor(e = null) {
5389
+ set complete(e = !1) {
5399
5390
  d(e), z();
5391
+ },
5392
+ get sailor() {
5393
+ return f();
5394
+ },
5395
+ set sailor(e = null) {
5396
+ f(e), z();
5400
5397
  }
5401
- }, O = fs();
5402
- let ne;
5403
- var k = H(O), A = H(k, !0);
5404
- P(k);
5405
- var re = U(k, 2), ie = (e) => {
5406
- var t = Yo(), n = H(t), r = H(n), i = U(r), a = H(i, !0);
5398
+ }, k = ls();
5399
+ let re;
5400
+ var ie = H(k), ae = H(ie, !0);
5401
+ P(ie);
5402
+ var oe = U(ie, 2), A = (e) => {
5403
+ var t = Ko(), n = H(t), r = H(n), i = U(r), a = H(i, !0);
5407
5404
  P(i), P(n);
5408
5405
  var o = U(n, 2), s = H(o, !0);
5409
5406
  P(o), P(t), W(() => {
5410
- Z(r, `${c().docsStep.signedInAs ?? ""} `), Z(a, d().email), Z(s, c().docsStep.notYou);
5411
- }), Cr("click", o, T), X(e, t);
5407
+ Z(r, `${l().docsStep.signedInAs ?? ""} `), Z(a, f().email), Z(s, l().docsStep.notYou);
5408
+ }), Cr("click", o, E), X(e, t);
5412
5409
  };
5413
- Q(re, (e) => {
5414
- d() && e(ie);
5410
+ Q(oe, (e) => {
5411
+ f() && e(A);
5415
5412
  });
5416
- var ae = U(re, 2), oe = (e) => {
5413
+ var se = U(oe, 2), ce = (e) => {
5417
5414
  var t = Nr(), n = hn(t), r = (e) => {
5418
- var t = Xo(), n = H(t, !0);
5419
- P(t), W(() => Z(n, c().docsStep.loading)), X(e, t);
5415
+ var t = qo(), n = H(t, !0);
5416
+ P(t), W(() => Z(n, l().docsStep.loading)), X(e, t);
5420
5417
  };
5421
5418
  Q(n, (e) => {
5422
- q(g) || e(r);
5419
+ q(_) || e(r);
5423
5420
  }), X(e, t);
5424
- }, se = (e) => {
5425
- var t = Zo(), n = hn(t), r = H(n, !0);
5421
+ }, le = (e) => {
5422
+ var t = Jo(), n = hn(t), r = H(n, !0);
5426
5423
  P(n);
5427
5424
  var i = U(n, 2), a = (e) => {
5428
- var t = Xo(), n = H(t, !0);
5429
- P(t), W(() => Z(n, c().docsStep.optionalSignIn)), X(e, t);
5425
+ var t = qo(), n = H(t, !0);
5426
+ P(t), W(() => Z(n, l().docsStep.optionalSignIn)), X(e, t);
5430
5427
  };
5431
5428
  Q(i, (e) => {
5432
- d() || e(a);
5433
- }), W(() => Z(r, c().docsStep.noDocsNeeded)), X(e, t);
5434
- }, ce = (e) => {
5435
- var t = ls(), n = hn(t), r = (e) => {
5436
- var t = Xo(), n = H(t, !0);
5437
- P(t), W(() => Z(n, c().docsStep.intro)), X(e, t);
5429
+ f() || e(a);
5430
+ }), W(() => Z(r, l().docsStep.noDocsNeeded)), X(e, t);
5431
+ }, ue = (e) => {
5432
+ var t = os(), n = hn(t), r = (e) => {
5433
+ var t = qo(), n = H(t, !0);
5434
+ P(t), W(() => Z(n, l().docsStep.intro)), X(e, t);
5438
5435
  };
5439
5436
  Q(n, (e) => {
5440
- d() || e(r);
5437
+ f() || e(r);
5441
5438
  });
5442
5439
  var i = U(n, 2);
5443
- Xr(i, 17, () => q(m).requirements, (e) => e.id, (e, t) => {
5444
- let n = /* @__PURE__ */ I(() => q(_)[q(t).id]), r = /* @__PURE__ */ I(() => !!d() && q(m).uploadsAvailable && !q(t).met && !q(n));
5445
- var i = Nr();
5446
- ni(hn(i), () => q(r) ? "label" : "div", !1, (e, i) => {
5447
- let a;
5448
- W(() => a = ui(e, 0, "sbw-doc-row svelte-1d47278", null, a, {
5440
+ Xr(i, 17, () => q(h).requirements, (e) => e.id, (e, t) => {
5441
+ let n = /* @__PURE__ */ I(() => q(v)[q(t).id]), r = /* @__PURE__ */ I(() => !!f() && q(h).uploadsAvailable && !q(t).met && !q(n)), i = /* @__PURE__ */ I(() => f() && !q(n) ? te(q(t)) : "");
5442
+ var a = Nr();
5443
+ ni(hn(a), () => q(r) ? "label" : "div", !1, (e, a) => {
5444
+ let o;
5445
+ W(() => o = ui(e, 0, "sbw-doc-row svelte-1d47278", null, o, {
5449
5446
  "sbw-doc-can": q(r),
5450
5447
  "sbw-doc-busy": !!q(n),
5451
- "sbw-doc-done": !!d() && q(t).met && !q(n)
5448
+ "sbw-doc-done": !!f() && q(t).met && !q(n)
5452
5449
  }));
5453
- var o = os(), s = hn(o), l = H(s), u = (e) => {
5454
- var r = ts(), i = H(r), a = (e) => {
5455
- X(e, Qo());
5450
+ var s = rs(), c = hn(s), u = H(c), d = (e) => {
5451
+ var r = Qo(), i = H(r), a = (e) => {
5452
+ X(e, Yo());
5456
5453
  }, o = (e) => {
5457
- X(e, $o());
5454
+ X(e, Xo());
5458
5455
  }, s = (e) => {
5459
- X(e, es());
5456
+ X(e, Zo());
5460
5457
  };
5461
5458
  Q(i, (e) => {
5462
5459
  q(n) ? e(a) : q(t).met ? e(o, 1) : e(s, -1);
5463
5460
  }), P(r), X(e, r);
5464
5461
  };
5465
- Q(l, (e) => {
5466
- d() && e(u);
5462
+ Q(u, (e) => {
5463
+ f() && e(d);
5467
5464
  });
5468
- var f = U(l, 2), p = H(f), m = H(p, !0), h = U(m), g = (e) => {
5469
- X(e, ns());
5465
+ var p = U(u, 2), m = H(p), h = H(m, !0), g = U(h), _ = (e) => {
5466
+ X(e, $o());
5470
5467
  };
5471
- Q(h, (e) => {
5472
- q(t).mandatory && e(g);
5473
- }), P(p);
5474
- var _ = U(p, 2), v = (e) => {
5475
- var i = rs(), a = H(i, !0);
5476
- P(i), W(() => Z(a, q(n) ? `${c().uploading} ${q(n)}` : q(t).met ? c().docsStep.inAccount : q(r) ? c().tapToUpload : "")), X(e, i);
5468
+ Q(g, (e) => {
5469
+ q(t).mandatory && e(_);
5470
+ }), P(m);
5471
+ var v = U(m, 2), y = (e) => {
5472
+ var a = es();
5473
+ let o;
5474
+ var s = H(a, !0);
5475
+ P(a), W(() => {
5476
+ o = ui(a, 1, "sbw-doc-sub svelte-1d47278", null, o, { "sbw-doc-why": !!q(i) }), Z(s, q(n) ? `${l().uploading} ${q(n)}` : q(t).met ? l().docsStep.inAccount : q(i) || (q(r) ? l().tapToUpload : ""));
5477
+ }), X(e, a);
5477
5478
  };
5478
- Q(_, (e) => {
5479
- d() && e(v);
5480
- }), P(f), P(s);
5481
- var y = U(s, 2), b = (e) => {
5482
- var t = is(), r = H(t, !0);
5483
- P(t), W(() => Z(r, q(n) ? c().uploading : c().upload)), X(e, t);
5479
+ Q(v, (e) => {
5480
+ f() && e(y);
5481
+ }), P(p), P(c);
5482
+ var b = U(c, 2), x = (e) => {
5483
+ var t = ts(), r = H(t, !0);
5484
+ P(t), W(() => Z(r, q(n) ? l().uploading : l().upload)), X(e, t);
5484
5485
  };
5485
- Q(y, (e) => {
5486
- (q(r) || q(n)) && e(b);
5486
+ Q(b, (e) => {
5487
+ (q(r) || q(n)) && e(x);
5487
5488
  });
5488
- var x = U(y, 2), S = (e) => {
5489
- var n = as();
5490
- Cr("change", n, (e) => te(q(t), e)), X(e, n);
5489
+ var S = U(b, 2), ee = (e) => {
5490
+ var n = ns();
5491
+ Cr("change", n, (e) => O(q(t), e)), X(e, n);
5491
5492
  };
5492
- Q(x, (e) => {
5493
- q(r) && e(S);
5494
- }), W(() => Z(m, q(t).name)), X(i, o);
5495
- }), X(e, i);
5493
+ Q(S, (e) => {
5494
+ q(r) && e(ee);
5495
+ }), W(() => Z(h, q(t).name)), X(a, s);
5496
+ }), X(e, a);
5496
5497
  });
5497
5498
  var a = U(i, 2), o = (e) => {
5498
- var t = ss(), n = H(t, !0);
5499
- P(t), W(() => Z(n, q(v))), X(e, t);
5499
+ var t = is(), n = H(t, !0);
5500
+ P(t), W(() => Z(n, q(y))), X(e, t);
5500
5501
  };
5501
5502
  Q(a, (e) => {
5502
- q(v) && e(o);
5503
+ q(y) && e(o);
5503
5504
  });
5504
- var s = U(a, 2), l = (e) => {
5505
- var t = cs(), n = H(t, !0);
5506
- P(t), W(() => Z(n, c().docsStep.uploadsUnavailable)), X(e, t);
5505
+ var s = U(a, 2), c = (e) => {
5506
+ var t = as(), n = H(t, !0);
5507
+ P(t), W(() => Z(n, l().docsStep.uploadsUnavailable)), X(e, t);
5507
5508
  };
5508
5509
  Q(s, (e) => {
5509
- d() && !q(m).uploadsAvailable && q(S) && e(l);
5510
+ f() && !q(h).uploadsAvailable && q(ee) && e(c);
5510
5511
  }), X(e, t);
5511
5512
  };
5512
- Q(ae, (e) => {
5513
- q(m) ? q(x) ? e(ce, -1) : e(se, 1) : e(oe);
5513
+ Q(se, (e) => {
5514
+ q(h) ? q(S) ? e(ue, -1) : e(le, 1) : e(ce);
5514
5515
  });
5515
- var le = U(ae, 2), ue = (e) => {
5516
- var t = us(), n = hn(t), r = H(n, !0);
5516
+ var de = U(se, 2), fe = (e) => {
5517
+ var t = ss(), n = hn(t), r = H(n, !0);
5517
5518
  P(n);
5518
5519
  var i = U(n, 2), a = H(i, !0);
5519
5520
  P(i), W(() => {
5520
- Z(r, c().docsStep.statusFailed), Z(a, c().retry);
5521
- }), Cr("click", i, () => C()), X(e, t);
5521
+ Z(r, l().docsStep.statusFailed), Z(a, l().retry);
5522
+ }), Cr("click", i, () => w()), X(e, t);
5522
5523
  };
5523
- Q(le, (e) => {
5524
- q(g) && e(ue);
5524
+ Q(de, (e) => {
5525
+ q(_) && e(fe);
5525
5526
  });
5526
- var de = U(le, 2), fe = (e) => {
5527
- var t = ds(), n = hn(t), r = H(n), i = H(r, !0);
5527
+ var pe = U(de, 2), me = (e) => {
5528
+ var t = cs(), n = hn(t), r = H(n), i = H(r, !0);
5528
5529
  P(r), P(n);
5529
5530
  var a = U(n, 2), o = (e) => {
5530
- var t = cs(), n = H(t, !0);
5531
- P(t), W(() => Z(n, c().docsStep.signInUnavailable)), X(e, t);
5531
+ var t = as(), n = H(t, !0);
5532
+ P(t), W(() => Z(n, l().docsStep.signInUnavailable)), X(e, t);
5532
5533
  };
5533
5534
  Q(a, (e) => {
5534
- q(p) && e(o);
5535
+ q(m) && e(o);
5535
5536
  }), W(() => {
5536
- r.disabled = q(f), Z(i, c().docsStep.signIn);
5537
- }), Cr("click", r, w), X(e, t);
5537
+ r.disabled = q(p), Z(i, l().docsStep.signIn);
5538
+ }), Cr("click", r, T), X(e, t);
5538
5539
  };
5539
- return Q(de, (e) => {
5540
- q(m) && !d() && e(fe);
5541
- }), P(O), W(() => {
5542
- ne = ui(O, 1, "sbw-docs svelte-1d47278", null, ne, { "sbw-variant-dark": l() === "dark" }), Z(A, c().documentsHeading);
5543
- }), X(e, O), Ze(D);
5540
+ return Q(pe, (e) => {
5541
+ q(h) && !f() && e(me);
5542
+ }), P(k), W(() => {
5543
+ re = ui(k, 1, "sbw-docs svelte-1d47278", null, re, { "sbw-variant-dark": u() === "dark" }), Z(ae, l().documentsHeading);
5544
+ }), X(e, k), Ze(ne);
5544
5545
  }
5545
- wr(["click", "change"]), Pi(ms, {
5546
+ wr(["click", "change"]), Pi(ds, {
5546
5547
  apiOrigin: {},
5547
5548
  slug: {},
5548
5549
  sailorApiOrigin: {},
5549
5550
  sidonOrigin: {},
5550
5551
  arrival: {},
5551
5552
  departure: {},
5553
+ lang: {},
5552
5554
  labels: {},
5553
5555
  variant: {},
5554
5556
  complete: {},
@@ -5556,12 +5558,12 @@ wr(["click", "change"]), Pi(ms, {
5556
5558
  }, [], [], { mode: "open" });
5557
5559
  //#endregion
5558
5560
  //#region src/components/DetailsStep.svelte
5559
- var hs = /* @__PURE__ */ Y("<div class=\"sbw-details svelte-xjlajk\"><div class=\"sbw-details-heading svelte-xjlajk\"> </div> <div class=\"sbw-field-grid svelte-xjlajk\"><div class=\"sbw-field svelte-xjlajk\"><label for=\"sbw-contact-name\" class=\"svelte-xjlajk\"> <span class=\"sbw-required\">*</span></label> <input id=\"sbw-contact-name\" type=\"text\" required=\"\" maxlength=\"100\" autocomplete=\"name\" class=\"svelte-xjlajk\"/></div> <div class=\"sbw-field svelte-xjlajk\"><label for=\"sbw-boat-name\" class=\"svelte-xjlajk\"> <span class=\"sbw-required\">*</span></label> <input id=\"sbw-boat-name\" type=\"text\" required=\"\" maxlength=\"100\" class=\"svelte-xjlajk\"/></div></div> <div class=\"sbw-field-grid svelte-xjlajk\"><div class=\"sbw-field svelte-xjlajk\"><label for=\"sbw-email\" class=\"svelte-xjlajk\"> <span class=\"sbw-required\">*</span></label> <input id=\"sbw-email\" type=\"email\" required=\"\" maxlength=\"255\" autocomplete=\"email\" class=\"svelte-xjlajk\"/></div> <div class=\"sbw-field svelte-xjlajk\"><label for=\"sbw-phone\" class=\"svelte-xjlajk\"> </label> <input id=\"sbw-phone\" type=\"tel\" maxlength=\"30\" autocomplete=\"tel\" class=\"svelte-xjlajk\"/></div></div> <div class=\"sbw-field-grid svelte-xjlajk\"><div class=\"sbw-field svelte-xjlajk\"><label for=\"sbw-beam\" class=\"svelte-xjlajk\"> </label> <input id=\"sbw-beam\" type=\"number\" min=\"0.1\" step=\"0.1\" inputmode=\"decimal\" class=\"svelte-xjlajk\"/></div></div> <div class=\"sbw-field svelte-xjlajk\"><label for=\"sbw-notes\" class=\"svelte-xjlajk\"> </label> <textarea id=\"sbw-notes\" rows=\"3\" maxlength=\"2000\" class=\"svelte-xjlajk\"></textarea></div></div>"), gs = {
5561
+ var fs = /* @__PURE__ */ Y("<div class=\"sbw-details svelte-xjlajk\"><div class=\"sbw-details-heading svelte-xjlajk\"> </div> <div class=\"sbw-field-grid svelte-xjlajk\"><div class=\"sbw-field svelte-xjlajk\"><label for=\"sbw-contact-name\" class=\"svelte-xjlajk\"> <span class=\"sbw-required\">*</span></label> <input id=\"sbw-contact-name\" type=\"text\" required=\"\" maxlength=\"100\" autocomplete=\"name\" class=\"svelte-xjlajk\"/></div> <div class=\"sbw-field svelte-xjlajk\"><label for=\"sbw-boat-name\" class=\"svelte-xjlajk\"> <span class=\"sbw-required\">*</span></label> <input id=\"sbw-boat-name\" type=\"text\" required=\"\" maxlength=\"100\" class=\"svelte-xjlajk\"/></div></div> <div class=\"sbw-field-grid svelte-xjlajk\"><div class=\"sbw-field svelte-xjlajk\"><label for=\"sbw-email\" class=\"svelte-xjlajk\"> <span class=\"sbw-required\">*</span></label> <input id=\"sbw-email\" type=\"email\" required=\"\" maxlength=\"255\" autocomplete=\"email\" class=\"svelte-xjlajk\"/></div> <div class=\"sbw-field svelte-xjlajk\"><label for=\"sbw-phone\" class=\"svelte-xjlajk\"> </label> <input id=\"sbw-phone\" type=\"tel\" maxlength=\"30\" autocomplete=\"tel\" class=\"svelte-xjlajk\"/></div></div> <div class=\"sbw-field-grid svelte-xjlajk\"><div class=\"sbw-field svelte-xjlajk\"><label for=\"sbw-beam\" class=\"svelte-xjlajk\"> </label> <input id=\"sbw-beam\" type=\"number\" min=\"0.1\" step=\"0.1\" inputmode=\"decimal\" class=\"svelte-xjlajk\"/></div></div> <div class=\"sbw-field svelte-xjlajk\"><label for=\"sbw-notes\" class=\"svelte-xjlajk\"> </label> <textarea id=\"sbw-notes\" rows=\"3\" maxlength=\"2000\" class=\"svelte-xjlajk\"></textarea></div></div>"), ps = {
5560
5562
  hash: "svelte-xjlajk",
5561
5563
  code: ".sbw-details.svelte-xjlajk {display:flex;flex-direction:column;gap:20px;padding:20px;}.sbw-details-heading.svelte-xjlajk {font-size:11px;font-weight:600;letter-spacing:2px;text-transform:uppercase;color:#252525;}.sbw-field-grid.svelte-xjlajk {display:grid;grid-template-columns:1fr 1fr;gap:16px;}.sbw-field.svelte-xjlajk {display:flex;flex-direction:column;gap:6px;}.sbw-field.svelte-xjlajk label:where(.svelte-xjlajk) {font-size:11px;font-weight:600;letter-spacing:1.5px;text-transform:uppercase;color:#252525;}.sbw-field.svelte-xjlajk input:where(.svelte-xjlajk),\r\n .sbw-field.svelte-xjlajk textarea:where(.svelte-xjlajk) {height:48px;padding:0 14px;border:1px solid #e4e7ec;border-radius:var(--sbw-radius, 10px);font-size:15px;color:var(--brand-navy, #16365b);background:#fff;outline:none;font-family:inherit;}.sbw-field.svelte-xjlajk textarea:where(.svelte-xjlajk) {height:auto;padding:10px 14px;resize:vertical;}.sbw-field.svelte-xjlajk input:where(.svelte-xjlajk):focus,\r\n .sbw-field.svelte-xjlajk textarea:where(.svelte-xjlajk):focus {border-color:var(--brand-navy, #16365b);}"
5562
5564
  };
5563
- function _s(e, t) {
5564
- Xe(t, !0), ri(e, gs);
5565
+ function ms(e, t) {
5566
+ Xe(t, !0), ri(e, ps);
5565
5567
  let n = $(t, "contactName", 15, ""), r = $(t, "contactEmail", 15, ""), i = $(t, "contactPhone", 15, ""), a = $(t, "boatName", 15, ""), o = $(t, "boatBeamM", 15, null), s = $(t, "notes", 15, ""), c = $(t, "emailLocked", 7, !1), l = $(t, "labels", 7);
5566
5568
  var u = {
5567
5569
  get contactName() {
@@ -5612,7 +5614,7 @@ function _s(e, t) {
5612
5614
  set labels(e) {
5613
5615
  l(e), z();
5614
5616
  }
5615
- }, d = hs(), f = H(d), p = H(f, !0);
5617
+ }, d = fs(), f = H(d), p = H(f, !0);
5616
5618
  P(f);
5617
5619
  var m = U(f, 2), h = H(m), g = H(h), _ = H(g);
5618
5620
  He(), P(g);
@@ -5630,18 +5632,18 @@ function _s(e, t) {
5630
5632
  P(D);
5631
5633
  var ne = U(D, 2);
5632
5634
  _i(ne), P(te), P(ee);
5633
- var k = U(ee, 2), A = H(k), re = H(A), ie = H(re, !0);
5634
- P(re);
5635
- var ae = U(re, 2);
5636
- _i(ae), P(A), P(k);
5637
- var oe = U(k, 2), se = H(oe), ce = H(se, !0);
5635
+ var k = U(ee, 2), re = H(k), ie = H(re), ae = H(ie, !0);
5636
+ P(ie);
5637
+ var oe = U(ie, 2);
5638
+ _i(oe), P(re), P(k);
5639
+ var A = U(k, 2), se = H(A), ce = H(se, !0);
5638
5640
  P(se);
5639
5641
  var le = U(se, 2);
5640
- return ft(le), P(oe), P(d), W(() => {
5641
- Z(p, l().yourDetails), Z(_, `${l().skipperName ?? ""} `), Z(x, `${l().boatName ?? ""} `), Z(T, `${l().email ?? ""} `), E.readOnly = c(), Z(O, l().phone), Z(ie, l().wizard.boatBeam), Z(ce, l().notes);
5642
- }), Ci(v, n), Ci(S, a), Ci(E, r), Ci(ne, i), Ci(ae, o), Ci(le, s), X(e, d), Ze(u);
5642
+ return ft(le), P(A), P(d), W(() => {
5643
+ Z(p, l().yourDetails), Z(_, `${l().skipperName ?? ""} `), Z(x, `${l().boatName ?? ""} `), Z(T, `${l().email ?? ""} `), E.readOnly = c(), Z(O, l().phone), Z(ae, l().wizard.boatBeam), Z(ce, l().notes);
5644
+ }), Ci(v, n), Ci(S, a), Ci(E, r), Ci(ne, i), Ci(oe, o), Ci(le, s), X(e, d), Ze(u);
5643
5645
  }
5644
- Pi(_s, {
5646
+ Pi(ms, {
5645
5647
  contactName: {},
5646
5648
  contactEmail: {},
5647
5649
  contactPhone: {},
@@ -5653,7 +5655,7 @@ Pi(_s, {
5653
5655
  }, [], [], { mode: "open" });
5654
5656
  //#endregion
5655
5657
  //#region src/lib/i18n.ts
5656
- var vs = {
5658
+ var hs = {
5657
5659
  it: {
5658
5660
  steps: [
5659
5661
  "Documenti",
@@ -5784,6 +5786,8 @@ var vs = {
5784
5786
  signedInAs: "Accesso come",
5785
5787
  notYou: "Non sei tu?",
5786
5788
  inAccount: "Nel tuo account Sidon",
5789
+ expiredOn: (e) => `Scaduto il ${e}: carica un documento valido per il soggiorno`,
5790
+ unreadable: "Non riusciamo a leggere la data di scadenza: carica una copia più nitida",
5787
5791
  loading: "Verifica dei documenti…",
5788
5792
  statusFailed: "Impossibile verificare i tuoi documenti. Riprova.",
5789
5793
  uploadsUnavailable: "Il caricamento dei documenti non è disponibile al momento, quindi non è possibile proseguire. Riprova più tardi.",
@@ -5922,6 +5926,8 @@ var vs = {
5922
5926
  signedInAs: "Signed in as",
5923
5927
  notYou: "Not you?",
5924
5928
  inAccount: "In your Sidon account",
5929
+ expiredOn: (e) => `Expired ${e}: upload one valid for your stay`,
5930
+ unreadable: "We couldn't read an expiry date: upload a clearer copy",
5925
5931
  loading: "Checking your documents…",
5926
5932
  statusFailed: "Could not check your documents. Please try again.",
5927
5933
  uploadsUnavailable: "Document uploads are unavailable right now, so this booking can't continue. Please try again later.",
@@ -6060,6 +6066,8 @@ var vs = {
6060
6066
  signedInAs: "Connecté en tant que",
6061
6067
  notYou: "Ce n'est pas vous ?",
6062
6068
  inAccount: "Dans votre compte Sidon",
6069
+ expiredOn: (e) => `Expiré le ${e} : envoyez un document valide pour le séjour`,
6070
+ unreadable: "Nous n'arrivons pas à lire la date d'expiration : envoyez une copie plus nette",
6063
6071
  loading: "Vérification de vos documents…",
6064
6072
  statusFailed: "Impossible de vérifier vos documents. Réessayez.",
6065
6073
  uploadsUnavailable: "L'envoi de documents est indisponible pour le moment : impossible de continuer. Réessayez plus tard.",
@@ -6198,6 +6206,8 @@ var vs = {
6198
6206
  signedInAs: "Sesión iniciada como",
6199
6207
  notYou: "¿No eres tú?",
6200
6208
  inAccount: "En tu cuenta Sidon",
6209
+ expiredOn: (e) => `Caducado el ${e}: sube uno válido para tu estancia`,
6210
+ unreadable: "No podemos leer la fecha de caducidad: sube una copia más nítida",
6201
6211
  loading: "Comprobando tus documentos…",
6202
6212
  statusFailed: "No se han podido comprobar tus documentos. Inténtalo de nuevo.",
6203
6213
  uploadsUnavailable: "La subida de documentos no está disponible ahora mismo, así que no se puede continuar. Inténtalo más tarde.",
@@ -6207,107 +6217,107 @@ var vs = {
6207
6217
  }
6208
6218
  }
6209
6219
  };
6210
- function ys(e) {
6211
- return vs[e] ?? vs.en;
6220
+ function gs(e) {
6221
+ return hs[e] ?? hs.en;
6212
6222
  }
6213
6223
  //#endregion
6214
6224
  //#region node_modules/@stripe/stripe-js/dist/index.mjs
6215
- function bs(e) {
6225
+ function _s(e) {
6216
6226
  "@babel/helpers - typeof";
6217
- return bs = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
6227
+ return _s = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
6218
6228
  return typeof e;
6219
6229
  } : function(e) {
6220
6230
  return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
6221
- }, bs(e);
6231
+ }, _s(e);
6222
6232
  }
6223
- var xs, Ss, Cs, ws, Ts, Es, Ds, Os, ks, As, js, Ms, Ns, Ps, Fs, Is, Ls, Rs, zs, Bs, Vs, Hs, Us = o((() => {
6224
- xs = "dahlia", Ss = function(e) {
6233
+ var vs, ys, bs, xs, Ss, Cs, ws, Ts, Es, Ds, Os, ks, As, js, Ms, Ns, Ps, Fs, Is, Ls, Rs, zs, Bs = o((() => {
6234
+ vs = "dahlia", ys = function(e) {
6225
6235
  return e === 3 ? "v3" : e;
6226
- }, Cs = "https://js.stripe.com", ws = `${Cs}/${xs}/stripe.js`, Ts = /^https:\/\/js\.stripe\.com\/v3\/?(\?.*)?$/, Es = /^https:\/\/js\.stripe\.com\/(v3|[a-z]+)\/stripe\.js(\?.*)?$/, Ds = "loadStripe.setLoadParameters was called but an existing Stripe.js script already exists in the document; existing script parameters will be used", Os = function(e) {
6227
- return Ts.test(e) || Es.test(e);
6228
- }, ks = function() {
6229
- for (var e = document.querySelectorAll(`script[src^="${Cs}"]`), t = 0; t < e.length; t++) {
6236
+ }, bs = "https://js.stripe.com", xs = `${bs}/${vs}/stripe.js`, Ss = /^https:\/\/js\.stripe\.com\/v3\/?(\?.*)?$/, Cs = /^https:\/\/js\.stripe\.com\/(v3|[a-z]+)\/stripe\.js(\?.*)?$/, ws = "loadStripe.setLoadParameters was called but an existing Stripe.js script already exists in the document; existing script parameters will be used", Ts = function(e) {
6237
+ return Ss.test(e) || Cs.test(e);
6238
+ }, Es = function() {
6239
+ for (var e = document.querySelectorAll(`script[src^="${bs}"]`), t = 0; t < e.length; t++) {
6230
6240
  var n = e[t];
6231
- if (Os(n.src)) return n;
6241
+ if (Ts(n.src)) return n;
6232
6242
  }
6233
6243
  return null;
6234
- }, As = function(e) {
6244
+ }, Ds = function(e) {
6235
6245
  var t = e && !e.advancedFraudSignals ? "?advancedFraudSignals=false" : "", n = document.createElement("script");
6236
- n.src = `${ws}${t}`;
6246
+ n.src = `${xs}${t}`;
6237
6247
  var r = document.head || document.body;
6238
6248
  if (!r) throw Error("Expected document.body not to be null. Stripe.js requires a <body> element.");
6239
6249
  return r.appendChild(n), n;
6240
- }, js = function(e, t) {
6250
+ }, Os = function(e, t) {
6241
6251
  !e || !e._registerWrapper || e._registerWrapper({
6242
6252
  name: "stripe-js",
6243
6253
  version: "9.13.0",
6244
6254
  startTime: t
6245
6255
  });
6246
- }, Ms = null, Ns = null, Ps = null, Fs = function(e) {
6256
+ }, ks = null, As = null, js = null, Ms = function(e) {
6247
6257
  return function(t) {
6248
6258
  e(Error("Failed to load Stripe.js", { cause: t }));
6249
6259
  };
6250
- }, Is = function(e, t) {
6260
+ }, Ns = function(e, t) {
6251
6261
  return function() {
6252
6262
  window.Stripe ? e(window.Stripe) : t(/* @__PURE__ */ Error("Stripe.js not available"));
6253
6263
  };
6254
- }, Ls = function(e) {
6255
- return Ms === null ? (Ms = new Promise(function(t, n) {
6264
+ }, Ps = function(e) {
6265
+ return ks === null ? (ks = new Promise(function(t, n) {
6256
6266
  if (typeof window > "u" || typeof document > "u") {
6257
6267
  t(null);
6258
6268
  return;
6259
6269
  }
6260
- if (window.Stripe && e && console.warn(Ds), window.Stripe) {
6270
+ if (window.Stripe && e && console.warn(ws), window.Stripe) {
6261
6271
  t(window.Stripe);
6262
6272
  return;
6263
6273
  }
6264
6274
  try {
6265
- var r = ks();
6266
- if (r && e) console.warn(Ds);
6267
- else if (!r) r = As(e);
6268
- else if (r && Ps !== null && Ns !== null) {
6275
+ var r = Es();
6276
+ if (r && e) console.warn(ws);
6277
+ else if (!r) r = Ds(e);
6278
+ else if (r && js !== null && As !== null) {
6269
6279
  var i;
6270
- r.removeEventListener("load", Ps), r.removeEventListener("error", Ns), (i = r.parentNode) == null || i.removeChild(r), r = As(e);
6280
+ r.removeEventListener("load", js), r.removeEventListener("error", As), (i = r.parentNode) == null || i.removeChild(r), r = Ds(e);
6271
6281
  }
6272
- Ps = Is(t, n), Ns = Fs(n), r.addEventListener("load", Ps), r.addEventListener("error", Ns);
6282
+ js = Ns(t, n), As = Ms(n), r.addEventListener("load", js), r.addEventListener("error", As);
6273
6283
  } catch (e) {
6274
6284
  n(e);
6275
6285
  return;
6276
6286
  }
6277
- }), Ms.catch(function(e) {
6278
- return Ms = null, Promise.reject(e);
6279
- })) : Ms;
6280
- }, Rs = function(e, t, n) {
6287
+ }), ks.catch(function(e) {
6288
+ return ks = null, Promise.reject(e);
6289
+ })) : ks;
6290
+ }, Fs = function(e, t, n) {
6281
6291
  if (e === null) return null;
6282
6292
  var r = t[0];
6283
- if (typeof r != "string") throw Error(`Expected publishable key to be of type string, got type ${bs(r)} instead.`);
6284
- var i = r.match(/^pk_test/), a = Ss(e.version), o = xs;
6293
+ if (typeof r != "string") throw Error(`Expected publishable key to be of type string, got type ${_s(r)} instead.`);
6294
+ var i = r.match(/^pk_test/), a = ys(e.version), o = vs;
6285
6295
  i && a !== o && console.warn(`Stripe.js@${a} was loaded on the page, but @stripe/stripe-js@9.13.0 expected Stripe.js@${o}. This may result in unexpected behavior. For more information, see https://docs.stripe.com/sdks/stripejs-versioning`);
6286
6296
  var s = e.apply(void 0, t);
6287
- return js(s, n), s;
6288
- }, Bs = !1, Vs = function() {
6289
- return zs || (zs = Ls(null).catch(function(e) {
6290
- return zs = null, Promise.reject(e);
6291
- }), zs);
6297
+ return Os(s, n), s;
6298
+ }, Ls = !1, Rs = function() {
6299
+ return Is || (Is = Ps(null).catch(function(e) {
6300
+ return Is = null, Promise.reject(e);
6301
+ }), Is);
6292
6302
  }, Promise.resolve().then(function() {
6293
- return Vs();
6303
+ return Rs();
6294
6304
  }).catch(function(e) {
6295
- Bs || console.warn(e);
6296
- }), Hs = function() {
6305
+ Ls || console.warn(e);
6306
+ }), zs = function() {
6297
6307
  var e = [...arguments];
6298
- Bs = !0;
6308
+ Ls = !0;
6299
6309
  var t = Date.now();
6300
- return Vs().then(function(n) {
6301
- return Rs(n, e, t);
6310
+ return Rs().then(function(n) {
6311
+ return Fs(n, e, t);
6302
6312
  });
6303
6313
  };
6304
- })), Ws = /* @__PURE__ */ c({ loadStripe: () => Hs }), Gs = o((() => {
6305
- Us();
6314
+ })), Vs = /* @__PURE__ */ c({ loadStripe: () => zs }), Hs = o((() => {
6315
+ Bs();
6306
6316
  }));
6307
6317
  //#endregion
6308
6318
  //#region src/lib/stripe.ts
6309
- async function Ks(e) {
6310
- let { loadStripe: t } = await Promise.resolve().then(() => (Gs(), Ws)), n = await t(e.publishableKey);
6319
+ async function Us(e) {
6320
+ let { loadStripe: t } = await Promise.resolve().then(() => (Hs(), Vs)), n = await t(e.publishableKey);
6311
6321
  if (!n) throw Error("Stripe failed to load");
6312
6322
  let r = e.colorPrimary || "#16365b", i = n.elements({
6313
6323
  clientSecret: e.clientSecret,
@@ -6338,13 +6348,13 @@ async function Ks(e) {
6338
6348
  }
6339
6349
  //#endregion
6340
6350
  //#region src/components/PaymentStep.svelte
6341
- var qs = /* @__PURE__ */ Y("<div class=\"sbw-payment-error svelte-1dn2f4w\" role=\"alert\"> </div>"), Js = /* @__PURE__ */ Y("<div class=\"sbw-payment svelte-1dn2f4w\"><div class=\"sbw-payment-heading svelte-1dn2f4w\"><span> </span> <span class=\"sbw-payment-amount svelte-1dn2f4w\"> </span></div> <p class=\"sbw-payment-note svelte-1dn2f4w\"> </p> <div class=\"sbw-payment-element svelte-1dn2f4w\"></div> <!></div>"), Ys = {
6351
+ var Ws = /* @__PURE__ */ Y("<div class=\"sbw-payment-error svelte-1dn2f4w\" role=\"alert\"> </div>"), Gs = /* @__PURE__ */ Y("<div class=\"sbw-payment svelte-1dn2f4w\"><div class=\"sbw-payment-heading svelte-1dn2f4w\"><span> </span> <span class=\"sbw-payment-amount svelte-1dn2f4w\"> </span></div> <p class=\"sbw-payment-note svelte-1dn2f4w\"> </p> <div class=\"sbw-payment-element svelte-1dn2f4w\"></div> <!></div>"), Ks = {
6342
6352
  hash: "svelte-1dn2f4w",
6343
6353
  code: ".sbw-payment.svelte-1dn2f4w {display:flex;flex-direction:column;gap:10px;padding:20px;}.sbw-payment-heading.svelte-1dn2f4w {display:flex;align-items:baseline;justify-content:space-between;font-size:11px;font-weight:600;letter-spacing:2px;text-transform:uppercase;color:#252525;}.sbw-payment-amount.svelte-1dn2f4w {font-size:22px;font-weight:500;color:var(--brand-navy, #16365b);}.sbw-payment-note.svelte-1dn2f4w {font-size:12px;color:#252525;line-height:1.6;margin:0;}.sbw-payment-element.svelte-1dn2f4w {padding:14px;border-radius:12px;border:1px solid #e4e7ec;background:#fff;}.sbw-payment-error.svelte-1dn2f4w {font-size:13px;color:#cc4949;}"
6344
6354
  };
6345
- function Xs(e, t) {
6346
- Xe(t, !0), ri(e, Ys);
6347
- let n = $(t, "payment", 7), r = $(t, "host", 7), i = $(t, "lang", 7), a = $(t, "locale", 7), o = $(t, "totalLabel", 7), s = /* @__PURE__ */ I(() => ys(i())), c = "sbw-payment-step", l, u = null, d = /* @__PURE__ */ B(null);
6355
+ function qs(e, t) {
6356
+ Xe(t, !0), ri(e, Ks);
6357
+ let n = $(t, "payment", 7), r = $(t, "host", 7), i = $(t, "lang", 7), a = $(t, "locale", 7), o = $(t, "totalLabel", 7), s = /* @__PURE__ */ I(() => gs(i())), c = "sbw-payment-step", l, u = null, d = /* @__PURE__ */ B(null);
6348
6358
  Gr(() => {
6349
6359
  let e = document.createElement("slot");
6350
6360
  e.name = c, l.appendChild(e);
@@ -6353,7 +6363,7 @@ function Xs(e, t) {
6353
6363
  let i = !1;
6354
6364
  return (async () => {
6355
6365
  try {
6356
- let e = await Ks({
6366
+ let e = await Us({
6357
6367
  publishableKey: n().publishableKey,
6358
6368
  clientSecret: n().clientSecret,
6359
6369
  locale: a(),
@@ -6404,7 +6414,7 @@ function Xs(e, t) {
6404
6414
  set totalLabel(e) {
6405
6415
  o(e), z();
6406
6416
  }
6407
- }, m = Js(), h = H(m), g = H(h), _ = H(g, !0);
6417
+ }, m = Gs(), h = H(m), g = H(h), _ = H(g, !0);
6408
6418
  P(g);
6409
6419
  var v = U(g, 2), y = H(v);
6410
6420
  P(v), P(h);
@@ -6413,7 +6423,7 @@ function Xs(e, t) {
6413
6423
  var S = U(b, 2);
6414
6424
  Oi(S, (e) => l = e, () => l);
6415
6425
  var ee = U(S, 2), C = (e) => {
6416
- var t = qs(), n = H(t, !0);
6426
+ var t = Ws(), n = H(t, !0);
6417
6427
  P(t), W(() => Z(n, q(d))), X(e, t);
6418
6428
  };
6419
6429
  return Q(ee, (e) => {
@@ -6422,7 +6432,7 @@ function Xs(e, t) {
6422
6432
  Z(_, q(s).paymentHold), Z(y, `${q(s).total ?? ""} ${o() ?? ""}`), Z(x, q(s).paymentNote);
6423
6433
  }), X(e, m), Ze(p);
6424
6434
  }
6425
- Pi(Xs, {
6435
+ Pi(qs, {
6426
6436
  payment: {},
6427
6437
  host: {},
6428
6438
  lang: {},
@@ -6431,12 +6441,12 @@ Pi(Xs, {
6431
6441
  }, [], ["confirm"], { mode: "open" });
6432
6442
  //#endregion
6433
6443
  //#region src/components/StepNav.svelte
6434
- var Zs = /* @__PURE__ */ Y("<div class=\"sbw-error svelte-1q5e1i3\" role=\"alert\"> </div>"), Qs = /* @__PURE__ */ Y("<button type=\"button\"> </button>"), $s = /* @__PURE__ */ Y("<div class=\"sbw-nav svelte-1q5e1i3\"><!> <button type=\"button\"> </button></div>"), ec = /* @__PURE__ */ Y("<!> <!>", 1), tc = {
6444
+ var Js = /* @__PURE__ */ Y("<div class=\"sbw-error svelte-1q5e1i3\" role=\"alert\"> </div>"), Ys = /* @__PURE__ */ Y("<button type=\"button\"> </button>"), Xs = /* @__PURE__ */ Y("<div class=\"sbw-nav svelte-1q5e1i3\"><!> <button type=\"button\"> </button></div>"), Zs = /* @__PURE__ */ Y("<!> <!>", 1), Qs = {
6435
6445
  hash: "svelte-1q5e1i3",
6436
6446
  code: ".sbw-error.svelte-1q5e1i3 {margin:0 20px 16px;font-size:14px;color:#cc4949;}.sbw-nav.svelte-1q5e1i3 {display:flex;align-items:center;gap:12px;padding:0 20px 20px;}.sbw-btn-back.svelte-1q5e1i3 {height:52px;padding:0 24px;border-radius:var(--sbw-radius, 10px);border:1px solid rgba(37, 37, 37, 0.15);background:transparent;color:var(--brand-navy, #16365b);font-size:12px;font-weight:600;letter-spacing:2px;text-transform:uppercase;cursor:pointer;}.sbw-btn-back.svelte-1q5e1i3:hover:not(:disabled) {background:#fafafa;}.sbw-btn-next.svelte-1q5e1i3 {flex:1;height:56px;border-radius:var(--sbw-radius, 10px);border:none;background:var(--brand-gold, #c9a86b);color:var(--brand-navy, #16365b);font-size:13px;font-weight:600;letter-spacing:2px;text-transform:uppercase;cursor:pointer;}.sbw-btn-next.svelte-1q5e1i3:hover:not(:disabled) {background:var(--brand-navy, #16365b);color:#fff;}.sbw-btn-next.svelte-1q5e1i3:disabled,\r\n .sbw-btn-back.svelte-1q5e1i3:disabled {opacity:0.4;cursor:not-allowed;}\r\n /* 'dark' variant (Fox/Pevero): solid ink button, gold-on-hover, flush\r\n corners — opposite convention from the default gold-pill 'navy'\r\n variant (Positano). Mirrors sidon-ai's BookStepNav variant prop. */.sbw-btn-back.sbw-variant-dark.svelte-1q5e1i3 {border-radius:0;color:var(--brand-ink, #252525);}.sbw-btn-next.sbw-variant-dark.svelte-1q5e1i3 {border-radius:0;background:var(--brand-ink, #252525);color:#fff;}.sbw-btn-next.sbw-variant-dark.svelte-1q5e1i3:hover:not(:disabled) {background:var(--brand-gold, #c9a86b);color:var(--brand-ink, #252525);}"
6437
6447
  };
6438
- function nc(e, t) {
6439
- Xe(t, !0), ri(e, tc);
6448
+ function $s(e, t) {
6449
+ Xe(t, !0), ri(e, Qs);
6440
6450
  let n = $(t, "step", 7), r = $(t, "firstStep", 7, 1), i = $(t, "sending", 7), a = $(t, "nextDisabled", 7, !1), o = $(t, "error", 7), s = $(t, "labels", 7), c = $(t, "variant", 7), l = $(t, "onBack", 7), u = $(t, "onNext", 7), d = /* @__PURE__ */ I(() => i() ? s().sending : n() === 3 ? s().payAndSend : s().next);
6441
6451
  var f = {
6442
6452
  get step() {
@@ -6493,16 +6503,16 @@ function nc(e, t) {
6493
6503
  set onNext(e) {
6494
6504
  u(e), z();
6495
6505
  }
6496
- }, p = ec(), m = hn(p), h = (e) => {
6497
- var t = Zs(), n = H(t, !0);
6506
+ }, p = Zs(), m = hn(p), h = (e) => {
6507
+ var t = Js(), n = H(t, !0);
6498
6508
  P(t), W(() => Z(n, o())), X(e, t);
6499
6509
  };
6500
6510
  Q(m, (e) => {
6501
6511
  o() && e(h);
6502
6512
  });
6503
6513
  var g = U(m, 2), _ = (e) => {
6504
- var t = $s(), o = H(t), f = (e) => {
6505
- var t = Qs();
6514
+ var t = Xs(), o = H(t), f = (e) => {
6515
+ var t = Ys();
6506
6516
  let n;
6507
6517
  var r = H(t, !0);
6508
6518
  P(t), W(() => {
@@ -6527,7 +6537,7 @@ function nc(e, t) {
6527
6537
  n() !== 4 && e(_);
6528
6538
  }), X(e, p), Ze(f);
6529
6539
  }
6530
- wr(["click"]), Pi(nc, {
6540
+ wr(["click"]), Pi($s, {
6531
6541
  step: {},
6532
6542
  firstStep: {},
6533
6543
  sending: {},
@@ -6539,201 +6549,14 @@ wr(["click"]), Pi(nc, {
6539
6549
  onNext: {}
6540
6550
  }, [], [], { mode: "open" });
6541
6551
  //#endregion
6542
- //#region src/components/DocumentsSection.svelte
6543
- var rc = /* @__PURE__ */ Y("<p class=\"sbw-docs-note svelte-eyniz7\"> </p>"), ic = /* @__PURE__ */ Mr("<svg class=\"sbw-spin svelte-eyniz7\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2.4\" stroke-linecap=\"round\"><path d=\"M21 12a9 9 0 1 1-6.219-8.56\"></path></svg>"), ac = /* @__PURE__ */ Mr("<svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"3\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M5 12.5l4.5 4.5L19 7.5\"></path></svg>"), oc = /* @__PURE__ */ Mr("<svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2.6\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><circle cx=\"12\" cy=\"12\" r=\"9\"></circle><path d=\"M12 7v5l3 2\"></path></svg>"), sc = /* @__PURE__ */ Mr("<svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2.6\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4M17 8l-5-5-5 5M12 3v12\"></path></svg>"), cc = /* @__PURE__ */ Y("<span class=\"sbw-required svelte-eyniz7\">*</span>"), lc = /* @__PURE__ */ Y("<span class=\"sbw-doc-time svelte-eyniz7\"> </span>"), uc = /* @__PURE__ */ Y("<span class=\"sbw-doc-cta svelte-eyniz7\"> </span>"), dc = /* @__PURE__ */ Y("<input type=\"file\" accept=\"image/*,application/pdf\" class=\"sbw-visually-hidden svelte-eyniz7\"/>"), fc = /* @__PURE__ */ Y("<div class=\"sbw-doc-main svelte-eyniz7\"><div class=\"sbw-doc-icon svelte-eyniz7\" aria-hidden=\"true\"><!></div> <div class=\"sbw-doc-text svelte-eyniz7\"><div class=\"sbw-doc-name svelte-eyniz7\"> <!> <!></div> <div class=\"sbw-doc-sub svelte-eyniz7\"> </div></div></div> <!> <!>", 1), pc = /* @__PURE__ */ Y("<div class=\"sbw-docs-error svelte-eyniz7\" role=\"alert\"> </div>"), mc = /* @__PURE__ */ Y("<div class=\"sbw-docs svelte-eyniz7\"><div class=\"sbw-docs-heading svelte-eyniz7\"> </div> <!> <!> <!></div>"), hc = {
6544
- hash: "svelte-eyniz7",
6545
- code: "\n /* Row styling carried over from the 0.4 DocumentsStep. */.sbw-docs.svelte-eyniz7 {display:flex;flex-direction:column;gap:12px;padding:0 20px 20px;color:var(--brand-ink, #252525);}.sbw-docs-heading.svelte-eyniz7 {font-size:11px;font-weight:600;letter-spacing:2px;text-transform:uppercase;color:#252525;}.sbw-docs-note.svelte-eyniz7 {margin:0;font-size:13px;color:#666;}.sbw-docs-error.svelte-eyniz7 {font-size:14px;color:#cc4949;}.sbw-doc-row.svelte-eyniz7 {display:flex;align-items:stretch;border:1px solid #e4e7ec;border-radius:var(--sbw-radius, 10px);overflow:hidden;background:#fff;}.sbw-doc-row.sbw-doc-can.svelte-eyniz7 {cursor:pointer;}\n /* The file input is visually hidden, so show keyboard focus on the row. */.sbw-doc-row.svelte-eyniz7:focus-within {outline:2px solid var(--brand-navy, #16365b);outline-offset:2px;}.sbw-doc-row.sbw-doc-done.svelte-eyniz7 {border-color:var(--brand-navy, #16365b);background:var(--brand-navy, #16365b);color:#fff;}.sbw-doc-row.sbw-doc-pending.svelte-eyniz7 {border-color:var(--brand-navy, #16365b);}.sbw-doc-row.sbw-doc-rejected.svelte-eyniz7 {border-color:#cc4949;}.sbw-doc-rejected.svelte-eyniz7 .sbw-doc-sub:where(.svelte-eyniz7) {color:#cc4949;opacity:1;}.sbw-doc-row.sbw-doc-locked.svelte-eyniz7 {opacity:0.6;}.sbw-doc-row.sbw-doc-busy.svelte-eyniz7 {cursor:not-allowed;}.sbw-doc-main.svelte-eyniz7 {display:flex;align-items:center;gap:16px;flex:1;min-width:0;padding:16px;}.sbw-doc-icon.svelte-eyniz7 {width:32px;height:32px;display:flex;align-items:center;justify-content:center;flex-shrink:0;}.sbw-doc-busy.svelte-eyniz7 .sbw-doc-icon:where(.svelte-eyniz7),\n .sbw-doc-pending.svelte-eyniz7 .sbw-doc-icon:where(.svelte-eyniz7) {color:var(--brand-navy, #16365b);}.sbw-spin.svelte-eyniz7 {\n animation: svelte-eyniz7-sbw-spin 0.8s linear infinite;}\n @keyframes svelte-eyniz7-sbw-spin {\n to {\n transform: rotate(360deg);\n }\n }.sbw-doc-text.svelte-eyniz7 {min-width:0;flex:1;}.sbw-doc-name.svelte-eyniz7 {font-size:16px;font-weight:600;display:flex;align-items:baseline;gap:10px;}.sbw-doc-time.svelte-eyniz7 {font-size:11px;font-weight:600;letter-spacing:1px;text-transform:uppercase;opacity:0.8;}.sbw-doc-sub.svelte-eyniz7 {font-size:13px;opacity:0.8;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}.sbw-required.svelte-eyniz7 {color:#cc4949;}.sbw-doc-cta.svelte-eyniz7 {display:inline-flex;align-items:center;justify-content:center;padding:0 20px;border-left:1px solid #e4e7ec;font-size:11px;font-weight:600;letter-spacing:1.5px;text-transform:uppercase;color:var(--brand-navy, #16365b);}.sbw-doc-row.sbw-doc-can.svelte-eyniz7:hover .sbw-doc-cta:where(.svelte-eyniz7) {background:var(--brand-navy, #16365b);color:#fff;}\n /* 'dark' variant (Fox/Pevero), set on BookingView's root: flush corners\n and a solid-ink CTA/verified fill instead of navy. */.sbw-variant-dark .sbw-doc-row.svelte-eyniz7 {border-radius:0;}.sbw-variant-dark .sbw-doc-row.sbw-doc-done.svelte-eyniz7 {border-color:var(--brand-ink, #252525);background:var(--brand-ink, #252525);}.sbw-variant-dark .sbw-doc-row.sbw-doc-can.svelte-eyniz7 .sbw-doc-cta:where(.svelte-eyniz7) {background:var(--brand-ink, #252525);color:#fff;}.sbw-variant-dark .sbw-doc-row.sbw-doc-can.svelte-eyniz7:hover .sbw-doc-cta:where(.svelte-eyniz7) {background:var(--brand-gold, #c9a86b);color:var(--brand-ink, #252525);}.sbw-visually-hidden.svelte-eyniz7 {position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);}"
6546
- };
6547
- function gc(e, t) {
6548
- Xe(t, !0), ri(e, hc);
6549
- let n = $(t, "apiOrigin", 7), r = $(t, "slug", 7), i = $(t, "session", 7), a = $(t, "lang", 7), o = $(t, "booking", 7), s = $(t, "requirements", 7), c = $(t, "documents", 7), l = $(t, "onchange", 7), u = /* @__PURE__ */ I(() => ys(a())), d = /* @__PURE__ */ I(() => o().status === "pending" || o().status === "confirmed"), f = /* @__PURE__ */ B(on([])), p = /* @__PURE__ */ B(on({})), m = /* @__PURE__ */ B(null), h = /* @__PURE__ */ I(() => [...c(), ...q(f).filter((e) => !c().some((t) => t.id === e.id))]);
6550
- function g(e) {
6551
- let t = null;
6552
- for (let n of q(h)) n.requirementId === e && (!t || Date.parse(n.submittedAt) > Date.parse(t.submittedAt)) && (t = n);
6553
- return t;
6554
- }
6555
- function _(e) {
6556
- let t = new Date(e);
6557
- if (isNaN(+t)) return "";
6558
- let n = t.toLocaleTimeString(a(), {
6559
- hour: "2-digit",
6560
- minute: "2-digit"
6561
- });
6562
- return t.toDateString() === (/* @__PURE__ */ new Date()).toDateString() ? q(u).uploadedToday(n) : q(u).uploadedOn(t.toLocaleDateString(a(), {
6563
- day: "numeric",
6564
- month: "short"
6565
- }), n);
6566
- }
6567
- function v(e, t) {
6568
- return e.type === "application/pdf" || !e.type && /\.pdf$/i.test(e.name) || t instanceof Error && /too large/i.test(t.message) ? q(u).uploadTooLarge : q(u).uploadBadType;
6569
- }
6570
- async function y(e, t) {
6571
- let a = t.currentTarget, o = a.files?.[0];
6572
- if (a.value = "", o) {
6573
- V(m, null), V(p, {
6574
- ...q(p),
6575
- [e.id]: o.name
6576
- }, !0);
6577
- try {
6578
- let t = await Jo(o).catch((e) => (V(m, v(o, e), !0), null));
6579
- if (!t) return;
6580
- let a = await Ho(n(), r(), i(), {
6581
- ...t,
6582
- requirementId: e.id
6583
- });
6584
- V(f, [...q(f), a], !0), l()();
6585
- } catch (e) {
6586
- V(m, !(e instanceof ko) || e.status < 400 ? q(u).uploadFailed : e.status === 413 ? q(u).uploadTooLarge : e.status === 429 ? q(u).uploadLimit : e.message, !0);
6587
- } finally {
6588
- let { [e.id]: t, ...n } = q(p);
6589
- V(p, n, !0);
6590
- }
6591
- }
6592
- }
6593
- var b = {
6594
- get apiOrigin() {
6595
- return n();
6596
- },
6597
- set apiOrigin(e) {
6598
- n(e), z();
6599
- },
6600
- get slug() {
6601
- return r();
6602
- },
6603
- set slug(e) {
6604
- r(e), z();
6605
- },
6606
- get session() {
6607
- return i();
6608
- },
6609
- set session(e) {
6610
- i(e), z();
6611
- },
6612
- get lang() {
6613
- return a();
6614
- },
6615
- set lang(e) {
6616
- a(e), z();
6617
- },
6618
- get booking() {
6619
- return o();
6620
- },
6621
- set booking(e) {
6622
- o(e), z();
6623
- },
6624
- get requirements() {
6625
- return s();
6626
- },
6627
- set requirements(e) {
6628
- s(e), z();
6629
- },
6630
- get documents() {
6631
- return c();
6632
- },
6633
- set documents(e) {
6634
- c(e), z();
6635
- },
6636
- get onchange() {
6637
- return l();
6638
- },
6639
- set onchange(e) {
6640
- l(e), z();
6641
- }
6642
- }, x = mc(), S = H(x), ee = H(S, !0);
6643
- P(S);
6644
- var C = U(S, 2), w = (e) => {
6645
- var t = rc(), n = H(t, !0);
6646
- P(t), W(() => Z(n, q(u).docsAfterSend)), X(e, t);
6647
- };
6648
- Q(C, (e) => {
6649
- q(d) || e(w);
6650
- });
6651
- var T = U(C, 2);
6652
- Xr(T, 17, s, (e) => e.id, (e, t) => {
6653
- let n = /* @__PURE__ */ I(() => g(q(t).id)), r = /* @__PURE__ */ I(() => q(p)[q(t).id]), i = /* @__PURE__ */ I(() => q(d) && !q(r) && (!q(n) || q(n).status === "rejected"));
6654
- var a = Nr();
6655
- ni(hn(a), () => q(i) ? "label" : "div", !1, (e, a) => {
6656
- let o;
6657
- W(() => o = ui(e, 0, "sbw-doc-row svelte-eyniz7", null, o, {
6658
- "sbw-doc-can": q(i),
6659
- "sbw-doc-busy": !!q(r),
6660
- "sbw-doc-done": !q(r) && q(n)?.status === "verified",
6661
- "sbw-doc-pending": !q(r) && q(n)?.status === "pending",
6662
- "sbw-doc-rejected": !q(r) && q(n)?.status === "rejected",
6663
- "sbw-doc-locked": !q(d)
6664
- }));
6665
- var s = fc(), c = hn(s), l = H(c), f = H(l), p = (e) => {
6666
- X(e, ic());
6667
- }, m = (e) => {
6668
- X(e, ac());
6669
- }, h = (e) => {
6670
- X(e, oc());
6671
- }, g = (e) => {
6672
- X(e, sc());
6673
- };
6674
- Q(f, (e) => {
6675
- q(r) ? e(p) : q(n)?.status === "verified" ? e(m, 1) : q(n)?.status === "pending" ? e(h, 2) : e(g, -1);
6676
- }), P(l);
6677
- var v = U(l, 2), b = H(v), x = H(b, !0), S = U(x), ee = (e) => {
6678
- X(e, cc());
6679
- };
6680
- Q(S, (e) => {
6681
- q(t).mandatory && e(ee);
6682
- });
6683
- var C = U(S, 2), w = (e) => {
6684
- var t = lc(), r = H(t, !0);
6685
- P(t), W((e) => Z(r, e), [() => _(q(n).submittedAt)]), X(e, t);
6686
- };
6687
- Q(C, (e) => {
6688
- q(n) && !q(r) && e(w);
6689
- }), P(b);
6690
- var T = U(b, 2), E = H(T, !0);
6691
- P(T), P(v), P(c);
6692
- var te = U(c, 2), D = (e) => {
6693
- var t = uc(), i = H(t, !0);
6694
- P(t), W(() => Z(i, q(r) ? q(u).uploading : q(n) ? q(u).replace : q(u).upload)), X(e, t);
6695
- };
6696
- Q(te, (e) => {
6697
- (q(i) || q(r)) && e(D);
6698
- });
6699
- var O = U(te, 2), ne = (e) => {
6700
- var n = dc();
6701
- Cr("change", n, (e) => y(q(t), e)), X(e, n);
6702
- };
6703
- Q(O, (e) => {
6704
- q(i) && e(ne);
6705
- }), W(() => {
6706
- Z(x, q(t).name), Z(E, q(r) ? `${q(u).uploading} ${q(r)}` : q(n) ? q(u).docState[q(n).status] : q(t).description || (q(d) ? q(u).tapToUpload : ""));
6707
- }), X(a, s);
6708
- }), X(e, a);
6709
- });
6710
- var E = U(T, 2), te = (e) => {
6711
- var t = pc(), n = H(t, !0);
6712
- P(t), W(() => Z(n, q(m))), X(e, t);
6713
- };
6714
- return Q(E, (e) => {
6715
- q(m) && e(te);
6716
- }), P(x), W(() => Z(ee, q(u).documentsHeading)), X(e, x), Ze(b);
6717
- }
6718
- wr(["change"]), Pi(gc, {
6719
- apiOrigin: {},
6720
- slug: {},
6721
- session: {},
6722
- lang: {},
6723
- booking: {},
6724
- requirements: {},
6725
- documents: {},
6726
- onchange: {}
6727
- }, [], [], { mode: "open" });
6728
- //#endregion
6729
6552
  //#region src/components/ContractSection.svelte
6730
- var _c = /* @__PURE__ */ Y("<p class=\"sbw-contract-agreed svelte-1g7u6xt\"> </p>"), vc = /* @__PURE__ */ Y("<label class=\"sbw-agree-row svelte-1g7u6xt\"><input type=\"checkbox\"/> <span> <strong> </strong>.</span></label> <button type=\"button\" class=\"sbw-btn-primary\"> </button>", 1), yc = /* @__PURE__ */ Y("<div class=\"sbw-contract-error svelte-1g7u6xt\" role=\"alert\"> </div>"), bc = /* @__PURE__ */ Y("<div class=\"sbw-contract svelte-1g7u6xt\"><div class=\"sbw-contract-heading svelte-1g7u6xt\"> </div> <div class=\"sbw-contract-body svelte-1g7u6xt\"> </div> <!> <!></div>"), xc = {
6553
+ var ec = /* @__PURE__ */ Y("<p class=\"sbw-contract-agreed svelte-1g7u6xt\"> </p>"), tc = /* @__PURE__ */ Y("<label class=\"sbw-agree-row svelte-1g7u6xt\"><input type=\"checkbox\"/> <span> <strong> </strong>.</span></label> <button type=\"button\" class=\"sbw-btn-primary\"> </button>", 1), nc = /* @__PURE__ */ Y("<div class=\"sbw-contract-error svelte-1g7u6xt\" role=\"alert\"> </div>"), rc = /* @__PURE__ */ Y("<div class=\"sbw-contract svelte-1g7u6xt\"><div class=\"sbw-contract-heading svelte-1g7u6xt\"> </div> <div class=\"sbw-contract-body svelte-1g7u6xt\"> </div> <!> <!></div>"), ic = {
6731
6554
  hash: "svelte-1g7u6xt",
6732
6555
  code: "\n /* Carried over from the 0.4 DetailsStep contract block. */.sbw-contract.svelte-1g7u6xt {display:flex;flex-direction:column;gap:10px;padding:0 20px 20px;}.sbw-contract-heading.svelte-1g7u6xt {font-size:11px;font-weight:600;letter-spacing:2px;text-transform:uppercase;color:#252525;}.sbw-contract-body.svelte-1g7u6xt {max-height:280px;overflow-y:auto;padding:16px;border-radius:14px;border:1px solid rgba(37, 37, 37, 0.08);background:#fafafa;font-size:13px;line-height:1.7;white-space:pre-wrap;color:var(--brand-navy, #16365b);}.sbw-agree-row.svelte-1g7u6xt {display:flex;align-items:flex-start;gap:10px;font-size:13px;line-height:1.5;color:var(--brand-navy, #16365b);cursor:pointer;}.sbw-contract-agreed.svelte-1g7u6xt {margin:0;font-size:13px;font-weight:600;color:#1f9d55;}.sbw-contract-error.svelte-1g7u6xt {font-size:14px;color:#cc4949;}"
6733
6556
  };
6734
- function Sc(e, t) {
6735
- Xe(t, !0), ri(e, xc);
6736
- let n = $(t, "apiOrigin", 7), r = $(t, "slug", 7), i = $(t, "session", 7), a = $(t, "lang", 7), o = $(t, "booking", 7), s = $(t, "contract", 7), c = $(t, "onchange", 7), l = /* @__PURE__ */ I(() => ys(a())), u = /* @__PURE__ */ B(!1), d = /* @__PURE__ */ B(!1), f = /* @__PURE__ */ B(null), p = /* @__PURE__ */ B(null), m = /* @__PURE__ */ I(() => s().agreedAt ?? q(p)), h = /* @__PURE__ */ I(() => !q(m) && (o().status === "pending" || o().status === "confirmed")), g = (e) => new Date(e).toLocaleDateString(a(), {
6557
+ function ac(e, t) {
6558
+ Xe(t, !0), ri(e, ic);
6559
+ let n = $(t, "apiOrigin", 7), r = $(t, "slug", 7), i = $(t, "session", 7), a = $(t, "lang", 7), o = $(t, "booking", 7), s = $(t, "contract", 7), c = $(t, "onchange", 7), l = /* @__PURE__ */ I(() => gs(a())), u = /* @__PURE__ */ B(!1), d = /* @__PURE__ */ B(!1), f = /* @__PURE__ */ B(null), p = /* @__PURE__ */ B(null), m = /* @__PURE__ */ I(() => s().agreedAt ?? q(p)), h = /* @__PURE__ */ I(() => !q(m) && (o().status === "pending" || o().status === "confirmed")), g = (e) => new Date(e).toLocaleDateString(a(), {
6737
6560
  day: "numeric",
6738
6561
  month: "short",
6739
6562
  year: "numeric"
@@ -6742,9 +6565,9 @@ function Sc(e, t) {
6742
6565
  if (!(!q(u) || q(d))) {
6743
6566
  V(d, !0), V(f, null);
6744
6567
  try {
6745
- V(p, (await Wo(n(), r(), i())).agreedAt, !0);
6568
+ V(p, (await Vo(n(), r(), i())).agreedAt, !0);
6746
6569
  } catch (e) {
6747
- e instanceof ko ? e.status < 400 ? V(f, q(l).networkError, !0) : e.status !== 409 && V(f, e.message, !0) : V(f, e instanceof Error ? e.message : String(e), !0);
6570
+ e instanceof Oo ? e.status < 400 ? V(f, q(l).networkError, !0) : e.status !== 409 && V(f, e.message, !0) : V(f, e instanceof Error ? e.message : String(e), !0);
6748
6571
  } finally {
6749
6572
  V(d, !1), c()();
6750
6573
  }
@@ -6793,15 +6616,15 @@ function Sc(e, t) {
6793
6616
  set onchange(e) {
6794
6617
  c(e), z();
6795
6618
  }
6796
- }, y = bc(), b = H(y), x = H(b, !0);
6619
+ }, y = rc(), b = H(y), x = H(b, !0);
6797
6620
  P(b);
6798
6621
  var S = U(b, 2), ee = H(S, !0);
6799
6622
  P(S);
6800
6623
  var C = U(S, 2), w = (e) => {
6801
- var t = _c(), n = H(t, !0);
6624
+ var t = ec(), n = H(t, !0);
6802
6625
  P(t), W((e) => Z(n, e), [() => q(l).contractAgreedOn(g(q(m)))]), X(e, t);
6803
6626
  }, T = (e) => {
6804
- var t = vc(), n = hn(t), r = H(n);
6627
+ var t = tc(), n = hn(t), r = H(n);
6805
6628
  _i(r);
6806
6629
  var i = U(r, 2), a = H(i), o = U(a), s = H(o, !0);
6807
6630
  P(o), He(), P(i), P(n);
@@ -6814,7 +6637,7 @@ function Sc(e, t) {
6814
6637
  q(m) ? e(w) : q(h) && e(T, 1);
6815
6638
  });
6816
6639
  var E = U(C, 2), te = (e) => {
6817
- var t = yc(), n = H(t, !0);
6640
+ var t = nc(), n = H(t, !0);
6818
6641
  P(t), W(() => Z(n, q(f))), X(e, t);
6819
6642
  };
6820
6643
  return Q(E, (e) => {
@@ -6823,7 +6646,7 @@ function Sc(e, t) {
6823
6646
  Z(x, q(l).contractHeading), Z(ee, s().renderedBody);
6824
6647
  }), X(e, y), Ze(v);
6825
6648
  }
6826
- wr(["click"]), Pi(Sc, {
6649
+ wr(["click"]), Pi(ac, {
6827
6650
  apiOrigin: {},
6828
6651
  slug: {},
6829
6652
  session: {},
@@ -6834,7 +6657,7 @@ wr(["click"]), Pi(Sc, {
6834
6657
  }, [], [], { mode: "open" });
6835
6658
  //#endregion
6836
6659
  //#region node_modules/ably/build/ably.js
6837
- var Cc = /* @__PURE__ */ s(((e, t) => {
6660
+ var oc = /* @__PURE__ */ s(((e, t) => {
6838
6661
  (function(n, r) {
6839
6662
  typeof e == "object" && typeof t == "object" ? t.exports = r() : typeof define == "function" && define.amd ? define([], r) : typeof e == "object" ? e.Ably = r() : n.Ably = r();
6840
6663
  })(e, () => {
@@ -6958,13 +6781,13 @@ var Cc = /* @__PURE__ */ s(((e, t) => {
6958
6781
  arrWithoutValue: () => he,
6959
6782
  cheapRandStr: () => ke,
6960
6783
  containsValue: () => ue,
6961
- copy: () => A,
6784
+ copy: () => re,
6962
6785
  createMissingPluginError: () => He,
6963
6786
  dataSizeBytes: () => Oe,
6964
6787
  decodeBody: () => Ne,
6965
6788
  detectV1Callback: () => Ee,
6966
6789
  encodeBody: () => Pe,
6967
- ensureArray: () => re,
6790
+ ensureArray: () => ie,
6968
6791
  forInOwnNonNullProperties: () => ve,
6969
6792
  getBackoffCoefficient: () => Le,
6970
6793
  getGlobalObject: () => ze,
@@ -6974,10 +6797,10 @@ var Cc = /* @__PURE__ */ s(((e, t) => {
6974
6797
  inspectBody: () => De,
6975
6798
  inspectError: () => j,
6976
6799
  intersect: () => de,
6977
- isEmpty: () => ae,
6800
+ isEmpty: () => oe,
6978
6801
  isErrorInfoOrPartialErrorInfo: () => Te,
6979
- isNil: () => oe,
6980
- isObject: () => ie,
6802
+ isNil: () => A,
6803
+ isObject: () => ae,
6981
6804
  keysArray: () => ge,
6982
6805
  listenerToAsyncIterator: () => Ge,
6983
6806
  matchDerivedChannel: () => Be,
@@ -7006,7 +6829,7 @@ var Cc = /* @__PURE__ */ s(((e, t) => {
7006
6829
  };
7007
6830
  if (typeof t == "object") {
7008
6831
  let n = t;
7009
- if (typeof n.message != "string" || typeof n.code != "number" || typeof n.statusCode != "number" || !oe(n.detail) && (typeof n.detail != "object" || Array.isArray(n.detail))) throw Error("ErrorInfo: invalid values: " + b.Config.inspect(n));
6832
+ if (typeof n.message != "string" || typeof n.code != "number" || typeof n.statusCode != "number" || !A(n.detail) && (typeof n.detail != "object" || Array.isArray(n.detail))) throw Error("ErrorInfo: invalid values: " + b.Config.inspect(n));
7010
6833
  o(n.message), Object.setPrototypeOf !== void 0 && Object.setPrototypeOf(this, e.prototype), this.code = n.code, this.statusCode = n.statusCode, this.detail = n.detail, Object.assign(this, n);
7011
6834
  } else o(t), Object.setPrototypeOf !== void 0 && Object.setPrototypeOf(this, e.prototype), this.code = n, this.statusCode = r, this.cause = i, this.detail = a;
7012
6835
  }
@@ -7024,7 +6847,7 @@ var Cc = /* @__PURE__ */ s(((e, t) => {
7024
6847
  };
7025
6848
  if (typeof t == "object") {
7026
6849
  let n = t;
7027
- if (typeof n.message != "string" || !oe(n.code) && typeof n.code != "number" || !oe(n.statusCode) && typeof n.statusCode != "number" || !oe(n.detail) && (typeof n.detail != "object" || Array.isArray(n.detail))) throw Error("PartialErrorInfo: invalid values: " + b.Config.inspect(n));
6850
+ if (typeof n.message != "string" || !A(n.code) && typeof n.code != "number" || !A(n.statusCode) && typeof n.statusCode != "number" || !A(n.detail) && (typeof n.detail != "object" || Array.isArray(n.detail))) throw Error("PartialErrorInfo: invalid values: " + b.Config.inspect(n));
7028
6851
  o(n.message), Object.setPrototypeOf !== void 0 && Object.setPrototypeOf(this, e.prototype), this.code = n.code, this.statusCode = n.statusCode, this.detail = n.detail, Object.assign(this, n);
7029
6852
  } else o(t), Object.setPrototypeOf !== void 0 && Object.setPrototypeOf(this, e.prototype), this.code = n, this.statusCode = r, this.cause = i, this.detail = a;
7030
6853
  }
@@ -7047,20 +6870,20 @@ var Cc = /* @__PURE__ */ s(((e, t) => {
7047
6870
  }
7048
6871
  return e;
7049
6872
  }
7050
- function A(e) {
7051
- return k({}, e);
7052
- }
7053
6873
  function re(e) {
7054
- return oe(e) ? [] : Array.isArray(e) ? e : [e];
6874
+ return k({}, e);
7055
6875
  }
7056
6876
  function ie(e) {
7057
- return Object.prototype.toString.call(e) == "[object Object]";
6877
+ return A(e) ? [] : Array.isArray(e) ? e : [e];
7058
6878
  }
7059
6879
  function ae(e) {
6880
+ return Object.prototype.toString.call(e) == "[object Object]";
6881
+ }
6882
+ function oe(e) {
7060
6883
  for (let t in e) return !1;
7061
6884
  return !0;
7062
6885
  }
7063
- function oe(e) {
6886
+ function A(e) {
7064
6887
  return e == null;
7065
6888
  }
7066
6889
  function se(e) {
@@ -7640,7 +7463,7 @@ var Cc = /* @__PURE__ */ s(((e, t) => {
7640
7463
  return Ee(e, 0), this._requestTokenImpl(e[0], e[1]);
7641
7464
  }
7642
7465
  async _requestTokenImpl(e, t) {
7643
- let n = t || this.authOptions, r = e || A(this.tokenParams), i, a = this.client;
7466
+ let n = t || this.authOptions, r = e || re(this.tokenParams), i, a = this.client;
7644
7467
  if (n.authCallback) T.logAction(this.logger, T.LOG_MINOR, "Auth.requestToken()", "using token auth with authCallback"), i = n.authCallback;
7645
7468
  else if (n.authUrl) T.logAction(this.logger, T.LOG_MINOR, "Auth.requestToken()", "using token auth with authUrl"), i = (e, t) => {
7646
7469
  let r = k({ accept: "application/json, text/plain" }, n.authHeaders), i = n.authMethod && n.authMethod.toLowerCase() === "post", a, o = n.authUrl.indexOf("?");
@@ -7810,7 +7633,7 @@ var Cc = /* @__PURE__ */ s(((e, t) => {
7810
7633
  return Ee(e, 0), this._createTokenRequestImpl(e[0], e[1]);
7811
7634
  }
7812
7635
  async _createTokenRequestImpl(e, t) {
7813
- t ||= this.authOptions, e ||= A(this.tokenParams);
7636
+ t ||= this.authOptions, e ||= re(this.tokenParams);
7814
7637
  let n = t.key;
7815
7638
  if (!n) throw new D({
7816
7639
  message: "No key specified",
@@ -8007,7 +7830,7 @@ var Cc = /* @__PURE__ */ s(((e, t) => {
8007
7830
  for (let o = 0; o < e.length; o++) if (r = e[o], n && (r = r[n]), Array.isArray(r)) {
8008
7831
  for (; (i = r.indexOf(t)) !== -1;) r.splice(i, 1);
8009
7832
  n && r.length === 0 && delete e[o][n];
8010
- } else if (ie(r)) for (a in r) Object.prototype.hasOwnProperty.call(r, a) && Array.isArray(r[a]) && Lt([r], t, a);
7833
+ } else if (ae(r)) for (a in r) Object.prototype.hasOwnProperty.call(r, a) && Array.isArray(r[a]) && Lt([r], t, a);
8011
7834
  }
8012
7835
  var Rt = class {
8013
7836
  constructor(e) {
@@ -8022,7 +7845,7 @@ var Cc = /* @__PURE__ */ s(((e, t) => {
8022
7845
  if (e.length === 2) {
8023
7846
  let [t, n] = e;
8024
7847
  if (typeof n != "function") throw Error("EventListener.on(): Invalid arguments: " + b.Config.inspect(e));
8025
- if (oe(t)) this.any.push(n);
7848
+ if (A(t)) this.any.push(n);
8026
7849
  else if (Array.isArray(t)) t.forEach((e) => {
8027
7850
  this.on(e, n);
8028
7851
  });
@@ -8033,7 +7856,7 @@ var Cc = /* @__PURE__ */ s(((e, t) => {
8033
7856
  }
8034
7857
  }
8035
7858
  off(...e) {
8036
- if (e.length == 0 || oe(e[0]) && oe(e[1])) {
7859
+ if (e.length == 0 || A(e[0]) && A(e[1])) {
8037
7860
  this.any = [], this.events = /* @__PURE__ */ Object.create(null), this.anyOnce = [], this.eventsOnce = /* @__PURE__ */ Object.create(null);
8038
7861
  return;
8039
7862
  }
@@ -8043,7 +7866,7 @@ var Cc = /* @__PURE__ */ s(((e, t) => {
8043
7866
  if (typeof n != "function") throw Error("EventEmitter.off(): invalid arguments:" + b.Config.inspect(e));
8044
7867
  [i, r] = [t, n];
8045
7868
  }
8046
- if (r && oe(i)) {
7869
+ if (r && A(i)) {
8047
7870
  Lt([
8048
7871
  this.any,
8049
7872
  this.events,
@@ -8088,7 +7911,7 @@ var Cc = /* @__PURE__ */ s(((e, t) => {
8088
7911
  }
8089
7912
  let [n, r] = e;
8090
7913
  if (e.length === 1 && typeof n == "function") this.anyOnce.push(n);
8091
- else if (oe(n)) {
7914
+ else if (A(n)) {
8092
7915
  if (typeof r != "function") throw Error("EventEmitter.once(): Invalid arguments:" + b.Config.inspect(e));
8093
7916
  this.anyOnce.push(r);
8094
7917
  } else if (Array.isArray(n)) {
@@ -8209,7 +8032,7 @@ var Cc = /* @__PURE__ */ s(((e, t) => {
8209
8032
  data: e,
8210
8033
  encoding: t
8211
8034
  };
8212
- if (ie(e) || Array.isArray(e)) return {
8035
+ if (ae(e) || Array.isArray(e)) return {
8213
8036
  data: JSON.stringify(e),
8214
8037
  encoding: t ? t + "/json" : "json"
8215
8038
  };
@@ -9145,7 +8968,7 @@ var Cc = /* @__PURE__ */ s(((e, t) => {
9145
8968
  name: t,
9146
8969
  data: n
9147
8970
  })], i = e[2];
9148
- else if (ie(t)) r = [Wn.fromValues(t)], i = e[1];
8971
+ else if (ae(t)) r = [Wn.fromValues(t)], i = e[1];
9149
8972
  else if (Array.isArray(t)) r = Wn.fromValuesArray(t), i = e[1];
9150
8973
  else throw new D({
9151
8974
  message: "publish() expects an event name (string or null), a message object, or an array of message objects as its first argument",
@@ -9301,7 +9124,7 @@ var Cc = /* @__PURE__ */ s(((e, t) => {
9301
9124
  });
9302
9125
  typeof i != "string" && (i = o(i) ?? null), k(d, this.client.options.headers), a && k(d, a);
9303
9126
  let f = new mn(this.client, t, d, l, async function(e, t, n) {
9304
- return re(n ? e : s(e));
9127
+ return ie(n ? e : s(e));
9305
9128
  }, !0);
9306
9129
  if (!b.Http.methods.includes(u)) throw new D({
9307
9130
  message: "Unsupported method " + u,
@@ -9570,7 +9393,7 @@ var Cc = /* @__PURE__ */ s(((e, t) => {
9570
9393
  }
9571
9394
  };
9572
9395
  function Sr(e) {
9573
- if (e && "params" in e && !ie(e.params)) return new D({
9396
+ if (e && "params" in e && !ae(e.params)) return new D({
9574
9397
  message: "options.params must be an object",
9575
9398
  code: 4e4,
9576
9399
  statusCode: 400,
@@ -9688,7 +9511,7 @@ var Cc = /* @__PURE__ */ s(((e, t) => {
9688
9511
  name: t,
9689
9512
  data: n
9690
9513
  })], i = e[2];
9691
- else if (ie(t)) r = [Wn.fromValues(t)], i = e[1];
9514
+ else if (ae(t)) r = [Wn.fromValues(t)], i = e[1];
9692
9515
  else if (Array.isArray(t)) r = Wn.fromValuesArray(t), i = e[1];
9693
9516
  else throw new D({
9694
9517
  message: "The single-argument form of publish() expects a message object or an array of message objects",
@@ -10482,7 +10305,7 @@ var Cc = /* @__PURE__ */ s(((e, t) => {
10482
10305
  this.options = e, this.host = t, this.mode = n, this.connectionKey = r, this.format = e.useBinaryProtocol ? "msgpack" : "json";
10483
10306
  }
10484
10307
  getConnectParams(e) {
10485
- let t = e ? A(e) : {}, n = this.options;
10308
+ let t = e ? re(e) : {}, n = this.options;
10486
10309
  switch (this.mode) {
10487
10310
  case "resume":
10488
10311
  t.resume = this.connectionKey;
@@ -11352,7 +11175,7 @@ var Cc = /* @__PURE__ */ s(((e, t) => {
11352
11175
  }
11353
11176
  startSync() {
11354
11177
  let e = this.map, t = this.syncInProgress;
11355
- T.logAction(this.logger, T.LOG_MINOR, "PresenceMap.startSync()", "channel = " + this.presence.channel.name + "; syncInProgress = " + t), this.syncInProgress || (this.residualMembers = A(e), this.setInProgress(!0));
11178
+ T.logAction(this.logger, T.LOG_MINOR, "PresenceMap.startSync()", "channel = " + this.presence.channel.name + "; syncInProgress = " + t), this.syncInProgress || (this.residualMembers = re(e), this.setInProgress(!0));
11356
11179
  }
11357
11180
  endSync() {
11358
11181
  let e = this.map, t = this.syncInProgress;
@@ -12312,11 +12135,11 @@ var Cc = /* @__PURE__ */ s(((e, t) => {
12312
12135
  }
12313
12136
  var Yi = class e extends Rt {
12314
12137
  constructor(e, t, n, r, i, a, o, s) {
12315
- super(o), n ||= {}, n.rnd = ke(), this.uri = e + Se(n), this.headers = t || {}, this.body = r, this.method = s ? s.toUpperCase() : oe(r) ? "GET" : "POST", this.requestMode = i, this.timeouts = a, this.timedOut = !1, this.requestComplete = !1, this.id = String(++Wi), Gi[this.id] = this;
12138
+ super(o), n ||= {}, n.rnd = ke(), this.uri = e + Se(n), this.headers = t || {}, this.body = r, this.method = s ? s.toUpperCase() : A(r) ? "GET" : "POST", this.requestMode = i, this.timeouts = a, this.timedOut = !1, this.requestComplete = !1, this.id = String(++Wi), Gi[this.id] = this;
12316
12139
  }
12317
12140
  static createRequest(t, n, r, i, a, o, s, c) {
12318
12141
  let l = o || F.TIMEOUTS;
12319
- return new e(t, n, A(r), i, a, l, s, c);
12142
+ return new e(t, n, re(r), i, a, l, s, c);
12320
12143
  }
12321
12144
  complete(e, t, n, r, i) {
12322
12145
  this.requestComplete || (this.requestComplete = !0, !e && t && this.emit("data", t), this.emit("complete", e, t, n, r, i), this.dispose());
@@ -12672,7 +12495,7 @@ var Cc = /* @__PURE__ */ s(((e, t) => {
12672
12495
  }), t;
12673
12496
  }
12674
12497
  async function ya(e, t, n, r, i, a) {
12675
- let o = new Headers(r || {}), s = e ? e.toUpperCase() : oe(a) ? "GET" : "POST", c = new AbortController(), l, u = new Promise((e) => {
12498
+ let o = new Headers(r || {}), s = e ? e.toUpperCase() : A(a) ? "GET" : "POST", c = new AbortController(), l, u = new Promise((e) => {
12676
12499
  l = setTimeout(() => {
12677
12500
  c.abort(), e({ error: new O("Request timed out", null, 408) });
12678
12501
  }, t ? t.options.timeouts.httpRequestTimeout : F.TIMEOUTS.httpRequestTimeout);
@@ -12736,141 +12559,133 @@ var Cc = /* @__PURE__ */ s(((e, t) => {
12736
12559
  return e;
12737
12560
  })(t.exports, e)), t.exports;
12738
12561
  });
12739
- })), wc = /* @__PURE__ */ Y("<button type=\"button\" class=\"sbw-btn-secondary svelte-1312f6m\"> </button>"), Tc = /* @__PURE__ */ Y("<div class=\"sbw-view-error sbw-view-error-first svelte-1312f6m\" role=\"alert\"> </div> <div class=\"sbw-view-actions svelte-1312f6m\"><button type=\"button\" class=\"sbw-btn-secondary svelte-1312f6m\"> </button> <!></div>", 1), Ec = /* @__PURE__ */ Y("<div class=\"sbw-view-loading svelte-1312f6m\"> </div>"), Dc = /* @__PURE__ */ Mr("<circle cx=\"12\" cy=\"12\" r=\"8.5\" class=\"svelte-1312f6m\"></circle><path d=\"M12 7.5V12l3 2\" class=\"svelte-1312f6m\"></path>", 1), Oc = /* @__PURE__ */ Mr("<path d=\"M5 12.5l4.5 4.5L19 7.5\" class=\"svelte-1312f6m\"></path>"), kc = /* @__PURE__ */ Mr("<path d=\"M6.5 6.5l11 11M17.5 6.5l-11 11\" class=\"svelte-1312f6m\"></path>"), Ac = /* @__PURE__ */ Y("<p class=\"sbw-hero-live svelte-1312f6m\"><span class=\"sbw-live-dot svelte-1312f6m\"></span> </p>"), jc = /* @__PURE__ */ Y("<div class=\"sbw-panel svelte-1312f6m\"><div class=\"sbw-panel-heading svelte-1312f6m\"><span class=\"svelte-1312f6m\"> </span> <span class=\"sbw-panel-amount svelte-1312f6m\"> </span></div> <p class=\"sbw-panel-note svelte-1312f6m\"> </p> <p class=\"sbw-panel-note svelte-1312f6m\"> </p> <div class=\"sbw-card svelte-1312f6m\"></div> <button type=\"button\" class=\"sbw-btn-primary svelte-1312f6m\"> </button></div>"), Mc = /* @__PURE__ */ Y("<div class=\"sbw-panel svelte-1312f6m\"><div class=\"sbw-panel-heading svelte-1312f6m\"><span class=\"svelte-1312f6m\"> </span></div> <p class=\"sbw-panel-note svelte-1312f6m\"> </p> <p class=\"sbw-panel-note svelte-1312f6m\"> </p> <button type=\"button\" class=\"sbw-btn-secondary svelte-1312f6m\"> </button></div>"), Nc = /* @__PURE__ */ Y("<div class=\"sbw-panel svelte-1312f6m\"><div class=\"sbw-panel-heading svelte-1312f6m\"><span class=\"svelte-1312f6m\"> </span></div> <p class=\"sbw-panel-note svelte-1312f6m\"> </p></div>"), Pc = /* @__PURE__ */ Y("<div class=\"svelte-1312f6m\"><dt class=\"svelte-1312f6m\"> </dt><dd class=\"svelte-1312f6m\"> </dd></div>"), Fc = /* @__PURE__ */ Y("<div class=\"sbw-view-error svelte-1312f6m\" role=\"alert\"> </div>"), Ic = /* @__PURE__ */ Y("<div class=\"sbw-view-actions svelte-1312f6m\"><!> <!></div>"), Lc = /* @__PURE__ */ Y("<div role=\"status\"><div class=\"sbw-hero-icon svelte-1312f6m\" aria-hidden=\"true\"><svg width=\"26\" height=\"26\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"3\" stroke-linecap=\"round\" stroke-linejoin=\"round\" class=\"svelte-1312f6m\"><!></svg></div> <div class=\"sbw-hero-eyebrow svelte-1312f6m\"> </div> <h3 class=\"sbw-hero-title svelte-1312f6m\"> </h3> <p class=\"sbw-hero-body svelte-1312f6m\"> </p> <!></div> <!> <div class=\"sbw-facts-heading svelte-1312f6m\"> </div> <dl class=\"sbw-facts svelte-1312f6m\"><div class=\"svelte-1312f6m\"><dt class=\"svelte-1312f6m\"> </dt><dd class=\"svelte-1312f6m\"> </dd></div> <div class=\"svelte-1312f6m\"><dt class=\"svelte-1312f6m\"> </dt><dd class=\"svelte-1312f6m\"> </dd></div> <div class=\"svelte-1312f6m\"><dt class=\"svelte-1312f6m\"> </dt> <dd class=\"svelte-1312f6m\"> </dd></div> <div class=\"svelte-1312f6m\"><dt class=\"svelte-1312f6m\"> </dt><dd class=\"svelte-1312f6m\"> </dd></div> <!> <div class=\"svelte-1312f6m\"><dt class=\"svelte-1312f6m\"> </dt> <dd class=\"svelte-1312f6m\"> </dd></div></dl> <!> <!> <!> <!> <!>", 1), Rc = /* @__PURE__ */ Y("<div><!></div>"), zc = {
12562
+ })), sc = /* @__PURE__ */ Y("<button type=\"button\" class=\"sbw-btn-secondary svelte-1312f6m\"> </button>"), cc = /* @__PURE__ */ Y("<div class=\"sbw-view-error sbw-view-error-first svelte-1312f6m\" role=\"alert\"> </div> <div class=\"sbw-view-actions svelte-1312f6m\"><button type=\"button\" class=\"sbw-btn-secondary svelte-1312f6m\"> </button> <!></div>", 1), lc = /* @__PURE__ */ Y("<div class=\"sbw-view-loading svelte-1312f6m\"> </div>"), uc = /* @__PURE__ */ Mr("<circle cx=\"12\" cy=\"12\" r=\"8.5\" class=\"svelte-1312f6m\"></circle><path d=\"M12 7.5V12l3 2\" class=\"svelte-1312f6m\"></path>", 1), dc = /* @__PURE__ */ Mr("<path d=\"M5 12.5l4.5 4.5L19 7.5\" class=\"svelte-1312f6m\"></path>"), fc = /* @__PURE__ */ Mr("<path d=\"M6.5 6.5l11 11M17.5 6.5l-11 11\" class=\"svelte-1312f6m\"></path>"), pc = /* @__PURE__ */ Y("<p class=\"sbw-hero-live svelte-1312f6m\"><span class=\"sbw-live-dot svelte-1312f6m\"></span> </p>"), mc = /* @__PURE__ */ Y("<div class=\"sbw-panel svelte-1312f6m\"><div class=\"sbw-panel-heading svelte-1312f6m\"><span class=\"svelte-1312f6m\"> </span> <span class=\"sbw-panel-amount svelte-1312f6m\"> </span></div> <p class=\"sbw-panel-note svelte-1312f6m\"> </p> <p class=\"sbw-panel-note svelte-1312f6m\"> </p> <div class=\"sbw-card svelte-1312f6m\"></div> <button type=\"button\" class=\"sbw-btn-primary svelte-1312f6m\"> </button></div>"), hc = /* @__PURE__ */ Y("<div class=\"sbw-panel svelte-1312f6m\"><div class=\"sbw-panel-heading svelte-1312f6m\"><span class=\"svelte-1312f6m\"> </span></div> <p class=\"sbw-panel-note svelte-1312f6m\"> </p> <p class=\"sbw-panel-note svelte-1312f6m\"> </p> <button type=\"button\" class=\"sbw-btn-secondary svelte-1312f6m\"> </button></div>"), gc = /* @__PURE__ */ Y("<div class=\"sbw-panel svelte-1312f6m\"><div class=\"sbw-panel-heading svelte-1312f6m\"><span class=\"svelte-1312f6m\"> </span></div> <p class=\"sbw-panel-note svelte-1312f6m\"> </p></div>"), _c = /* @__PURE__ */ Y("<div class=\"svelte-1312f6m\"><dt class=\"svelte-1312f6m\"> </dt><dd class=\"svelte-1312f6m\"> </dd></div>"), vc = /* @__PURE__ */ Y("<div class=\"sbw-view-error svelte-1312f6m\" role=\"alert\"> </div>"), yc = /* @__PURE__ */ Y("<div class=\"sbw-view-actions svelte-1312f6m\"><!> <!></div>"), bc = /* @__PURE__ */ Y("<div role=\"status\"><div class=\"sbw-hero-icon svelte-1312f6m\" aria-hidden=\"true\"><svg width=\"26\" height=\"26\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"3\" stroke-linecap=\"round\" stroke-linejoin=\"round\" class=\"svelte-1312f6m\"><!></svg></div> <div class=\"sbw-hero-eyebrow svelte-1312f6m\"> </div> <h3 class=\"sbw-hero-title svelte-1312f6m\"> </h3> <p class=\"sbw-hero-body svelte-1312f6m\"> </p> <!></div> <!> <div class=\"sbw-facts-heading svelte-1312f6m\"> </div> <dl class=\"sbw-facts svelte-1312f6m\"><div class=\"svelte-1312f6m\"><dt class=\"svelte-1312f6m\"> </dt><dd class=\"svelte-1312f6m\"> </dd></div> <div class=\"svelte-1312f6m\"><dt class=\"svelte-1312f6m\"> </dt><dd class=\"svelte-1312f6m\"> </dd></div> <div class=\"svelte-1312f6m\"><dt class=\"svelte-1312f6m\"> </dt> <dd class=\"svelte-1312f6m\"> </dd></div> <div class=\"svelte-1312f6m\"><dt class=\"svelte-1312f6m\"> </dt><dd class=\"svelte-1312f6m\"> </dd></div> <!> <div class=\"svelte-1312f6m\"><dt class=\"svelte-1312f6m\"> </dt> <dd class=\"svelte-1312f6m\"> </dd></div></dl> <!> <!> <!> <!>", 1), xc = /* @__PURE__ */ Y("<div><!></div>"), Sc = {
12740
12563
  hash: "svelte-1312f6m",
12741
12564
  code: ".sbw-view.svelte-1312f6m {display:flex;flex-direction:column;color:var(--brand-ink, #252525);}.sbw-view-loading.svelte-1312f6m {padding:32px 20px;font-size:14px;text-align:center;color:#666;}.sbw-view-error.svelte-1312f6m {margin:0 20px 16px;font-size:14px;color:#cc4949;}.sbw-view-error-first.svelte-1312f6m {margin-top:24px;}\r\n /* Hero: the 0.4 SentStep panel, one state per OTA status (+ expired). */.sbw-hero.svelte-1312f6m {display:flex;flex-direction:column;align-items:center;text-align:center;gap:12px;padding:32px 20px;}.sbw-hero-icon.svelte-1312f6m {width:56px;height:56px;border-radius:999px;background:var(--brand-gold, #c9a86b);color:var(--brand-navy, #16365b);display:flex;align-items:center;justify-content:center;}.sbw-hero-ok.svelte-1312f6m .sbw-hero-icon:where(.svelte-1312f6m) {background:#1f9d55;color:#fff;}.sbw-hero-bad.svelte-1312f6m .sbw-hero-icon:where(.svelte-1312f6m) {background:#cc4949;color:#fff;}.sbw-hero-eyebrow.svelte-1312f6m {font-size:11px;font-weight:600;letter-spacing:2.5px;text-transform:uppercase;color:var(--brand-gold, #c9a86b);}.sbw-hero-ok.svelte-1312f6m .sbw-hero-eyebrow:where(.svelte-1312f6m) {color:#1f9d55;}.sbw-hero-bad.svelte-1312f6m .sbw-hero-eyebrow:where(.svelte-1312f6m) {color:#cc4949;}.sbw-hero-title.svelte-1312f6m {font-size:32px;font-weight:400;text-transform:uppercase;color:var(--brand-navy, #16365b);margin:0;}.sbw-hero-body.svelte-1312f6m {font-size:14px;color:#252525;max-width:420px;line-height:1.7;margin:0;}.sbw-hero-live.svelte-1312f6m {display:inline-flex;align-items:center;gap:8px;margin:0;font-size:12px;color:#666;}.sbw-live-dot.svelte-1312f6m {width:8px;height:8px;border-radius:999px;background:var(--brand-gold, #c9a86b);\r\n animation: svelte-1312f6m-sbw-pulse 1.6s ease-in-out infinite;}\r\n @keyframes svelte-1312f6m-sbw-pulse {\r\n 50% {\r\n opacity: 0.3;\r\n }\r\n }\r\n @media (prefers-reduced-motion: reduce) {.sbw-live-dot.svelte-1312f6m {\r\n animation: none;}\r\n }.sbw-panel.svelte-1312f6m {display:flex;flex-direction:column;gap:10px;margin:0 20px 20px;padding:16px;border:1px solid #e4e7ec;border-radius:var(--sbw-radius, 10px);}.sbw-panel-heading.svelte-1312f6m {display:flex;align-items:baseline;justify-content:space-between;gap:12px;font-size:11px;font-weight:600;letter-spacing:2px;text-transform:uppercase;color:#252525;}.sbw-panel-amount.svelte-1312f6m {font-size:22px;font-weight:500;color:var(--brand-navy, #16365b);}.sbw-panel-note.svelte-1312f6m {font-size:12px;color:#252525;line-height:1.6;margin:0;}.sbw-card.svelte-1312f6m {padding:14px;border-radius:12px;border:1px solid #e4e7ec;background:#fff;}.sbw-facts-heading.svelte-1312f6m {padding:0 20px;font-size:11px;font-weight:600;letter-spacing:2px;text-transform:uppercase;color:#252525;}.sbw-facts.svelte-1312f6m {display:grid;grid-template-columns:1fr 1fr;gap:12px 16px;margin:10px 0 0;padding:0 20px 20px;}.sbw-facts.svelte-1312f6m dt:where(.svelte-1312f6m) {font-size:11px;font-weight:600;letter-spacing:1.5px;text-transform:uppercase;color:#666;}.sbw-facts.svelte-1312f6m dd:where(.svelte-1312f6m) {margin:2px 0 0;font-size:15px;color:var(--brand-navy, #16365b);overflow-wrap:anywhere;}.sbw-view-actions.svelte-1312f6m {display:flex;flex-wrap:wrap;gap:12px;padding:0 20px 20px;}\r\n /* Buttons mirror StepNav's Back/Next. The primary one is :global so\r\n ContractSection's Agree button picks up the same variant styling. */.sbw-btn-secondary.svelte-1312f6m {height:52px;padding:0 24px;border-radius:var(--sbw-radius, 10px);border:1px solid rgba(37, 37, 37, 0.15);background:transparent;color:var(--brand-navy, #16365b);font-size:12px;font-weight:600;letter-spacing:2px;text-transform:uppercase;cursor:pointer;}.sbw-btn-secondary.svelte-1312f6m:hover:not(:disabled) {background:#fafafa;}.sbw-view.svelte-1312f6m .sbw-btn-primary {height:56px;border-radius:var(--sbw-radius, 10px);border:none;background:var(--brand-gold, #c9a86b);color:var(--brand-navy, #16365b);font-size:13px;font-weight:600;letter-spacing:2px;text-transform:uppercase;cursor:pointer;}.sbw-view.svelte-1312f6m .sbw-btn-primary:hover:not(:disabled) {background:var(--brand-navy, #16365b);color:#fff;}.sbw-btn-secondary.svelte-1312f6m:disabled,\r\n .sbw-view.svelte-1312f6m .sbw-btn-primary:disabled {opacity:0.4;cursor:not-allowed;}\r\n /* 'dark' variant (Fox/Pevero): flush corners, solid ink, gold on hover. */.sbw-variant-dark.svelte-1312f6m .sbw-btn-secondary:where(.svelte-1312f6m) {border-radius:0;color:var(--brand-ink, #252525);}.sbw-view.sbw-variant-dark.svelte-1312f6m .sbw-btn-primary {border-radius:0;background:var(--brand-ink, #252525);color:#fff;}.sbw-view.sbw-variant-dark.svelte-1312f6m .sbw-btn-primary:hover:not(:disabled) {background:var(--brand-gold, #c9a86b);color:var(--brand-ink, #252525);}"
12742
12565
  };
12743
- function Bc(e, t) {
12744
- Xe(t, !0), ri(e, zc);
12745
- let n = $(t, "apiOrigin", 7), r = $(t, "slug", 7), i = $(t, "session", 7), a = $(t, "lang", 7), o = $(t, "currencySymbol", 7), s = $(t, "variant", 7), c = $(t, "host", 7), l = $(t, "onstatus", 7), d = $(t, "onstartover", 7), f = "sidon-booking-payment", p = /* @__PURE__ */ B(null), m = /* @__PURE__ */ I(() => Va(a(), q(p)?.booking.locale)), h = /* @__PURE__ */ I(() => ys(q(m))), g = /* @__PURE__ */ B(on([])), _ = /* @__PURE__ */ B(null), v = /* @__PURE__ */ B(null), y = /* @__PURE__ */ B(!1), b = /* @__PURE__ */ B(!1), x = /* @__PURE__ */ B(!1), S = /* @__PURE__ */ B(!1), ee = /* @__PURE__ */ B(null), C = null, w = null, T = null, E = !1, te = /* @__PURE__ */ B(!1), D = !1, O = !1, ne = /* @__PURE__ */ B(null), k = 0, A = !1, re = null, ie, ae = (e) => e instanceof ko && e.status < 400 ? q(h).networkError : e instanceof Error ? e.message : String(e), oe = (e) => ka(e)?.toLocaleDateString(q(m), {
12566
+ function Cc(e, t) {
12567
+ Xe(t, !0), ri(e, Sc);
12568
+ let n = $(t, "apiOrigin", 7), r = $(t, "slug", 7), i = $(t, "session", 7), a = $(t, "lang", 7), o = $(t, "currencySymbol", 7), s = $(t, "variant", 7), c = $(t, "host", 7), l = $(t, "onstatus", 7), d = $(t, "onstartover", 7), f = "sidon-booking-payment", p = /* @__PURE__ */ B(null), m = /* @__PURE__ */ I(() => Va(a(), q(p)?.booking.locale)), h = /* @__PURE__ */ I(() => gs(q(m))), g = /* @__PURE__ */ B(null), _ = /* @__PURE__ */ B(null), v = /* @__PURE__ */ B(!1), y = /* @__PURE__ */ B(!1), b = /* @__PURE__ */ B(!1), x = /* @__PURE__ */ B(!1), S = /* @__PURE__ */ B(null), ee = null, C = null, w = null, T = !1, E = /* @__PURE__ */ B(!1), te = 0, D = !1, O = null, ne, k = (e) => e instanceof Oo && e.status < 400 ? q(h).networkError : e instanceof Error ? e.message : String(e), re = (e) => ka(e)?.toLocaleDateString(q(m), {
12746
12569
  day: "numeric",
12747
12570
  month: "short",
12748
12571
  year: "numeric"
12749
- }) ?? "", se = (e) => e ? new Date(e).toLocaleTimeString(q(m), {
12572
+ }) ?? "", ie = (e) => e ? new Date(e).toLocaleTimeString(q(m), {
12750
12573
  hour: "2-digit",
12751
12574
  minute: "2-digit"
12752
12575
  }) : "";
12753
- async function ce() {
12754
- let e = ++k;
12755
- D || (D = !0, Fo(n(), r()).then((e) => V(g, e, !0), () => D = !1));
12576
+ async function ae() {
12577
+ let e = ++te;
12756
12578
  try {
12757
- let t = await zo(n(), r(), i());
12758
- if (A || e !== k) return;
12759
- V(p, t, !0), V(_, null);
12760
- let { arrival: a, departure: o } = t.booking;
12761
- !O && a && o && (O = !0, Io(n(), r(), {
12762
- arrival: a,
12763
- departure: o
12764
- }, null).then((e) => V(ne, e.signInRequired, !0), () => {
12765
- O = !1, V(ne, !1);
12766
- }));
12767
- let s = t.booking.status;
12768
- if (s !== T) {
12769
- let e = T;
12770
- T = s, l()(s, e);
12771
- }
12772
- s === "hold" ? t.payment && !E && (E = !0, le(t.payment)) : de();
12579
+ let t = await Lo(n(), r(), i());
12580
+ if (D || e !== te) return;
12581
+ V(p, t, !0), V(g, null);
12582
+ let a = t.booking.status;
12583
+ if (a !== w) {
12584
+ let e = w;
12585
+ w = a, l()(a, e);
12586
+ }
12587
+ a === "hold" ? t.payment && !T && (T = !0, oe(t.payment)) : se();
12773
12588
  } catch (t) {
12774
- if (A || e !== k || q(p)) return;
12775
- V(_, t instanceof ko && t.status === 404 ? q(h).bookingNotFound : q(h).loadFailed, !0);
12589
+ if (D || e !== te || q(p)) return;
12590
+ V(g, t instanceof Oo && t.status === 404 ? q(h).bookingNotFound : q(h).loadFailed, !0);
12776
12591
  }
12777
12592
  }
12778
- async function le(e) {
12779
- V(te, !1);
12593
+ async function oe(e) {
12594
+ V(E, !1);
12780
12595
  try {
12781
- await Bo(n(), r(), i()), await ce();
12596
+ await Ro(n(), r(), i()), await ae();
12782
12597
  } catch (t) {
12783
- let n = ao(t instanceof ko ? t.status : 0);
12784
- n === "lapsed" ? V(b, !0) : n === "card" ? await ue(e) : (V(v, ae(t), !0), V(te, !0), E = !1);
12598
+ let n = io(t instanceof Oo ? t.status : 0);
12599
+ n === "lapsed" ? V(y, !0) : n === "card" ? await A(e) : (V(_, k(t), !0), V(E, !0), T = !1);
12785
12600
  }
12786
12601
  }
12787
- async function ue(e) {
12788
- if (w || (V(x, !0), await hr(), A || !q(ee))) return;
12602
+ async function A(e) {
12603
+ if (C || (V(b, !0), await hr(), D || !q(S))) return;
12789
12604
  let t = document.createElement("slot");
12790
- t.name = f, q(ee).appendChild(t);
12605
+ t.name = f, q(S).appendChild(t);
12791
12606
  let n = document.createElement("div");
12792
- n.slot = f, c().appendChild(n), w = n;
12607
+ n.slot = f, c().appendChild(n), C = n;
12793
12608
  try {
12794
- let t = await Ks({
12609
+ let t = await Us({
12795
12610
  publishableKey: e.publishableKey,
12796
12611
  clientSecret: e.clientSecret,
12797
12612
  locale: q(m),
12798
12613
  mount: n,
12799
12614
  colorPrimary: getComputedStyle(c()).getPropertyValue("--brand-navy").trim() || "#16365b"
12800
12615
  });
12801
- if (w !== n) return t.destroy();
12802
- C = t, V(S, !0);
12616
+ if (C !== n) return t.destroy();
12617
+ ee = t, V(x, !0);
12803
12618
  } catch (e) {
12804
- V(v, ae(e), !0);
12619
+ V(_, k(e), !0);
12805
12620
  }
12806
12621
  }
12807
- function de() {
12808
- C?.destroy(), C = null, w?.remove(), w = null, V(x, !1), V(S, !1);
12622
+ function se() {
12623
+ ee?.destroy(), ee = null, C?.remove(), C = null, V(b, !1), V(x, !1);
12809
12624
  }
12810
- async function fe() {
12811
- if (!C || q(y)) return;
12812
- V(y, !0), V(v, null);
12625
+ async function ce() {
12626
+ if (!ee || q(v)) return;
12627
+ V(v, !0), V(_, null);
12813
12628
  let e = null;
12814
12629
  try {
12815
- await C.confirm();
12630
+ await ee.confirm();
12816
12631
  } catch (t) {
12817
12632
  e = t;
12818
12633
  }
12819
12634
  try {
12820
- await Bo(n(), r(), i()), de();
12635
+ await Ro(n(), r(), i()), se();
12821
12636
  } catch (t) {
12822
- t instanceof ko && t.status === 410 ? (V(b, !0), de()) : V(v, ae(e ?? t), !0);
12637
+ t instanceof Oo && t.status === 410 ? (V(y, !0), se()) : V(_, k(e ?? t), !0);
12823
12638
  } finally {
12824
- V(y, !1);
12639
+ V(v, !1);
12825
12640
  }
12826
- await ce();
12641
+ await ae();
12827
12642
  }
12828
- async function pe() {
12829
- if (!(q(y) || !window.confirm(q(h).cancelConfirm))) {
12830
- V(y, !0), V(v, null);
12643
+ async function le() {
12644
+ if (!(q(v) || !window.confirm(q(h).cancelConfirm))) {
12645
+ V(v, !0), V(_, null);
12831
12646
  try {
12832
- await Vo(n(), r(), i()), de();
12647
+ await zo(n(), r(), i()), se();
12833
12648
  } catch (e) {
12834
- V(v, ae(e), !0);
12649
+ V(_, k(e), !0);
12835
12650
  } finally {
12836
- V(y, !1);
12651
+ V(v, !1);
12837
12652
  }
12838
- await ce();
12653
+ await ae();
12839
12654
  }
12840
12655
  }
12841
- async function me() {
12842
- q(y) || (V(y, !0), q(p)?.booking.status === "hold" && await Vo(n(), r(), i()).catch(() => {}), de(), V(y, !1), d()?.());
12656
+ async function ue() {
12657
+ q(v) || (V(v, !0), q(p)?.booking.status === "hold" && await zo(n(), r(), i()).catch(() => {}), se(), V(v, !1), d()?.());
12843
12658
  }
12844
- async function he() {
12659
+ async function de() {
12845
12660
  try {
12846
- let e = (await Promise.resolve().then(() => /* @__PURE__ */ u(Cc()))).default;
12847
- if (A) return;
12661
+ let e = (await Promise.resolve().then(() => /* @__PURE__ */ u(oc()))).default;
12662
+ if (D) return;
12848
12663
  let t = new e.Realtime({ authCallback: (e, t) => {
12849
- Go(n(), r(), i()).then((e) => {
12664
+ Ho(n(), r(), i()).then((e) => {
12850
12665
  if (e) return t(null, e);
12851
- t("Live updates are not configured", null), ge();
12852
- }, (e) => t(ae(e), null));
12666
+ t("Live updates are not configured", null), fe();
12667
+ }, (e) => t(k(e), null));
12853
12668
  } });
12854
- re = t, t.connection.on(["failed", "suspended"], () => ge()), t.channels.get(`marina-booking:${i().id}`).subscribe("updated", () => void ce()).catch(() => ge());
12669
+ O = t, t.connection.on(["failed", "suspended"], () => fe()), t.channels.get(`marina-booking:${i().id}`).subscribe("updated", () => void ae()).catch(() => fe());
12855
12670
  } catch {
12856
- ge();
12671
+ fe();
12857
12672
  }
12858
12673
  }
12859
- function ge() {
12860
- re?.close(), re = null, !(A || ie) && (ie = setInterval(() => {
12861
- !document.hidden && q(p) && oo(q(p).booking.status, q(p).booking.cardHold) && ce();
12674
+ function fe() {
12675
+ O?.close(), O = null, !(D || ne) && (ne = setInterval(() => {
12676
+ !document.hidden && q(p) && ao(q(p).booking.status, q(p).booking.cardHold) && ae();
12862
12677
  }, 3e4));
12863
12678
  }
12864
12679
  Gr(() => {
12865
- ce(), he();
12680
+ ae(), de();
12866
12681
  let e = () => {
12867
- document.visibilityState === "visible" && ce();
12682
+ document.visibilityState === "visible" && ae();
12868
12683
  };
12869
12684
  return document.addEventListener("visibilitychange", e), () => {
12870
- A = !0, document.removeEventListener("visibilitychange", e), clearInterval(ie), re?.close(), de();
12685
+ D = !0, document.removeEventListener("visibilitychange", e), clearInterval(ne), O?.close(), se();
12871
12686
  };
12872
12687
  });
12873
- var _e = {
12688
+ var pe = {
12874
12689
  get apiOrigin() {
12875
12690
  return n();
12876
12691
  },
@@ -12925,62 +12740,62 @@ function Bc(e, t) {
12925
12740
  set onstartover(e) {
12926
12741
  d(e), z();
12927
12742
  }
12928
- }, ve = Rc();
12929
- let ye;
12930
- var be = H(ve), xe = (e) => {
12743
+ }, me = xc();
12744
+ let he;
12745
+ var ge = H(me), _e = (e) => {
12931
12746
  var t = Nr(), n = hn(t), r = (e) => {
12932
- var t = Tc(), n = hn(t), r = H(n, !0);
12747
+ var t = cc(), n = hn(t), r = H(n, !0);
12933
12748
  P(n);
12934
12749
  var i = U(n, 2), a = H(i), o = H(a, !0);
12935
12750
  P(a);
12936
12751
  var s = U(a, 2), c = (e) => {
12937
- var t = wc(), n = H(t, !0);
12752
+ var t = sc(), n = H(t, !0);
12938
12753
  P(t), W(() => {
12939
- t.disabled = q(y), Z(n, q(h).startOver);
12940
- }), Cr("click", t, me), X(e, t);
12754
+ t.disabled = q(v), Z(n, q(h).startOver);
12755
+ }), Cr("click", t, ue), X(e, t);
12941
12756
  };
12942
12757
  Q(s, (e) => {
12943
12758
  d() && e(c);
12944
12759
  }), P(i), W(() => {
12945
- Z(r, q(_)), Z(o, q(h).retry);
12946
- }), Cr("click", a, () => ce()), X(e, t);
12760
+ Z(r, q(g)), Z(o, q(h).retry);
12761
+ }), Cr("click", a, () => ae()), X(e, t);
12947
12762
  }, i = (e) => {
12948
- var t = Ec(), n = H(t, !0);
12763
+ var t = lc(), n = H(t, !0);
12949
12764
  P(t), W(() => Z(n, q(h).loadingBooking)), X(e, t);
12950
12765
  };
12951
12766
  Q(n, (e) => {
12952
- q(_) ? e(r) : e(i, -1);
12767
+ q(g) ? e(r) : e(i, -1);
12953
12768
  }), X(e, t);
12954
- }, Se = (e) => {
12955
- let t = /* @__PURE__ */ I(() => q(p).booking), a = /* @__PURE__ */ I(() => q(t).expired || q(b) ? "expired" : q(t).status);
12956
- var s = Lc(), c = hn(s);
12769
+ }, ve = (e) => {
12770
+ let t = /* @__PURE__ */ I(() => q(p).booking), a = /* @__PURE__ */ I(() => q(t).expired || q(y) ? "expired" : q(t).status);
12771
+ var s = bc(), c = hn(s);
12957
12772
  let l;
12958
- var u = H(c), f = H(u), _ = H(f), C = (e) => {
12959
- var t = Dc();
12773
+ var u = H(c), f = H(u), g = H(f), ee = (e) => {
12774
+ var t = uc();
12960
12775
  He(), X(e, t);
12776
+ }, C = (e) => {
12777
+ X(e, dc());
12961
12778
  }, w = (e) => {
12962
- X(e, Oc());
12963
- }, T = (e) => {
12964
- X(e, kc());
12779
+ X(e, fc());
12965
12780
  };
12966
- Q(_, (e) => {
12967
- q(a) === "hold" ? e(C) : q(a) === "pending" || q(a) === "confirmed" ? e(w, 1) : e(T, -1);
12781
+ Q(g, (e) => {
12782
+ q(a) === "hold" ? e(ee) : q(a) === "pending" || q(a) === "confirmed" ? e(C, 1) : e(w, -1);
12968
12783
  }), P(f), P(u);
12969
- var E = U(u, 2), D = H(E, !0);
12970
- P(E);
12971
- var O = U(E, 2), k = H(O, !0);
12972
- P(O);
12973
- var A = U(O, 2), re = H(A, !0);
12974
- P(A);
12975
- var ie = U(A, 2), ae = (e) => {
12976
- var t = Ac(), n = U(H(t), 1, !0);
12784
+ var T = U(u, 2), te = H(T, !0);
12785
+ P(T);
12786
+ var D = U(T, 2), O = H(D, !0);
12787
+ P(D);
12788
+ var ne = U(D, 2), k = H(ne, !0);
12789
+ P(ne);
12790
+ var oe = U(ne, 2), A = (e) => {
12791
+ var t = pc(), n = U(H(t), 1, !0);
12977
12792
  P(t), W(() => Z(n, q(h).waitingForMarina)), X(e, t);
12978
12793
  };
12979
- Q(ie, (e) => {
12980
- q(a) === "pending" && e(ae);
12794
+ Q(oe, (e) => {
12795
+ q(a) === "pending" && e(A);
12981
12796
  }), P(c);
12982
- var le = U(c, 2), ue = (e) => {
12983
- var n = jc(), r = H(n), i = H(r), a = H(i, !0);
12797
+ var se = U(c, 2), de = (e) => {
12798
+ var n = mc(), r = H(n), i = H(r), a = H(i, !0);
12984
12799
  P(i);
12985
12800
  var s = U(i, 2), c = H(s);
12986
12801
  P(s), P(r);
@@ -12989,13 +12804,13 @@ function Bc(e, t) {
12989
12804
  var d = U(l, 2), f = H(d, !0);
12990
12805
  P(d);
12991
12806
  var p = U(d, 2);
12992
- Oi(p, (e) => V(ee, e), () => q(ee));
12807
+ Oi(p, (e) => V(S, e), () => q(S));
12993
12808
  var g = U(p, 2), _ = H(g, !0);
12994
12809
  P(g), P(n), W((e, t) => {
12995
- Z(a, q(h).paymentHold), Z(c, `${q(h).total ?? ""} ${e ?? ""}`), Z(u, q(h).paymentNote), Z(f, t), g.disabled = q(y) || !q(S), Z(_, q(y) ? q(h).sending : q(h).payAndSend);
12996
- }, [() => so(q(t).totalPrice, q(t).currency, o(), q(m)), () => q(h).holdUntil(se(q(t).holdExpiresAt))]), Cr("click", g, fe), X(e, n);
12997
- }, de = (e) => {
12998
- var n = Mc(), r = H(n), i = H(r), a = H(i, !0);
12810
+ Z(a, q(h).paymentHold), Z(c, `${q(h).total ?? ""} ${e ?? ""}`), Z(u, q(h).paymentNote), Z(f, t), g.disabled = q(v) || !q(x), Z(_, q(v) ? q(h).sending : q(h).payAndSend);
12811
+ }, [() => oo(q(t).totalPrice, q(t).currency, o(), q(m)), () => q(h).holdUntil(ie(q(t).holdExpiresAt))]), Cr("click", g, ce), X(e, n);
12812
+ }, fe = (e) => {
12813
+ var n = hc(), r = H(n), i = H(r), a = H(i, !0);
12999
12814
  P(i), P(r);
13000
12815
  var o = U(r, 2), s = H(o, !0);
13001
12816
  P(o);
@@ -13004,82 +12819,53 @@ function Bc(e, t) {
13004
12819
  var u = U(c, 2), d = H(u, !0);
13005
12820
  P(u), P(n), W((e) => {
13006
12821
  Z(a, q(h).paymentHold), Z(s, q(h).paymentUnavailable), Z(l, e), Z(d, q(h).retry);
13007
- }, [() => q(h).holdUntil(se(q(t).holdExpiresAt))]), Cr("click", u, () => ce()), X(e, n);
13008
- }, he = (e) => {
13009
- var n = Nc(), r = H(n), i = H(r), a = H(i, !0);
12822
+ }, [() => q(h).holdUntil(ie(q(t).holdExpiresAt))]), Cr("click", u, () => ae()), X(e, n);
12823
+ }, pe = (e) => {
12824
+ var n = gc(), r = H(n), i = H(r), a = H(i, !0);
13010
12825
  P(i), P(r);
13011
12826
  var o = U(r, 2), s = H(o, !0);
13012
12827
  P(o), P(n), W((e) => {
13013
12828
  Z(a, q(h).checkEmailTitle), Z(s, e);
13014
- }, [() => q(h).checkEmailBody(se(q(t).holdExpiresAt))]), X(e, n);
12829
+ }, [() => q(h).checkEmailBody(ie(q(t).holdExpiresAt))]), X(e, n);
13015
12830
  };
13016
- Q(le, (e) => {
13017
- q(a) === "hold" && q(x) ? e(ue) : q(a) === "hold" && !q(p).payment && q(t).cardHold ? e(de, 1) : q(a) === "hold" && !q(p).payment && e(he, 2);
12831
+ Q(se, (e) => {
12832
+ q(a) === "hold" && q(b) ? e(de) : q(a) === "hold" && !q(p).payment && q(t).cardHold ? e(fe, 1) : q(a) === "hold" && !q(p).payment && e(pe, 2);
13018
12833
  });
13019
- var ge = U(le, 2), _e = H(ge, !0);
13020
- P(ge);
13021
- var ve = U(ge, 2), ye = H(ve), be = H(ye), xe = H(be, !0);
13022
- P(be);
13023
- var Se = U(be), Ce = H(Se);
13024
- P(Se), P(ye);
13025
- var we = U(ye, 2), Te = H(we), Ee = H(Te, !0);
13026
- P(Te);
13027
- var j = U(Te), De = H(j);
13028
- P(j), P(we);
13029
- var Oe = U(we, 2), ke = H(Oe), Ae = H(ke, !0);
13030
- P(ke);
13031
- var je = U(ke, 2), Me = H(je, !0);
13032
- P(je), P(Oe);
13033
- var Ne = U(Oe, 2), Pe = H(Ne), Fe = H(Pe, !0);
13034
- P(Pe);
13035
- var Ie = U(Pe), Le = H(Ie, !0);
13036
- P(Ie), P(Ne);
13037
- var Re = U(Ne, 2), M = (e) => {
13038
- var n = Pc(), r = H(n), i = H(r, !0);
12834
+ var me = U(se, 2), he = H(me, !0);
12835
+ P(me);
12836
+ var ge = U(me, 2), _e = H(ge), ve = H(_e), ye = H(ve, !0);
12837
+ P(ve);
12838
+ var be = U(ve), xe = H(be);
12839
+ P(be), P(_e);
12840
+ var Se = U(_e, 2), Ce = H(Se), we = H(Ce, !0);
12841
+ P(Ce);
12842
+ var Te = U(Ce), Ee = H(Te);
12843
+ P(Te), P(Se);
12844
+ var j = U(Se, 2), De = H(j), Oe = H(De, !0);
12845
+ P(De);
12846
+ var ke = U(De, 2), Ae = H(ke, !0);
12847
+ P(ke), P(j);
12848
+ var je = U(j, 2), Me = H(je), Ne = H(Me, !0);
12849
+ P(Me);
12850
+ var Pe = U(Me), Fe = H(Pe, !0);
12851
+ P(Pe), P(je);
12852
+ var Ie = U(je, 2), Le = (e) => {
12853
+ var n = _c(), r = H(n), i = H(r, !0);
13039
12854
  P(r);
13040
12855
  var a = U(r), o = H(a, !0);
13041
12856
  P(a), P(n), W(() => {
13042
12857
  Z(i, q(h).email), Z(o, q(t).contactEmail);
13043
12858
  }), X(e, n);
13044
12859
  };
13045
- Q(Re, (e) => {
13046
- q(t).contactEmail && e(M);
12860
+ Q(Ie, (e) => {
12861
+ q(t).contactEmail && e(Le);
13047
12862
  });
13048
- var ze = U(Re, 2), N = H(ze), Be = H(N, !0);
13049
- P(N);
13050
- var Ve = U(N, 2), Ue = H(Ve, !0);
13051
- P(Ve), P(ze), P(ve);
13052
- var We = U(ve, 2), Ge = (e) => {
13053
- gc(e, {
13054
- get apiOrigin() {
13055
- return n();
13056
- },
13057
- get slug() {
13058
- return r();
13059
- },
13060
- get session() {
13061
- return i();
13062
- },
13063
- get lang() {
13064
- return q(m);
13065
- },
13066
- get booking() {
13067
- return q(t);
13068
- },
13069
- get requirements() {
13070
- return q(g);
13071
- },
13072
- get documents() {
13073
- return q(p).documents;
13074
- },
13075
- onchange: ce
13076
- });
13077
- };
13078
- Q(We, (e) => {
13079
- q(g).length && q(ne) === !1 && (q(a) === "hold" || q(a) === "pending" || q(a) === "confirmed") && e(Ge);
13080
- });
13081
- var Ke = U(We, 2), qe = (e) => {
13082
- Sc(e, {
12863
+ var Re = U(Ie, 2), M = H(Re), ze = H(M, !0);
12864
+ P(M);
12865
+ var N = U(M, 2), Be = H(N, !0);
12866
+ P(N), P(Re), P(ge);
12867
+ var Ve = U(ge, 2), Ue = (e) => {
12868
+ ac(e, {
13083
12869
  get apiOrigin() {
13084
12870
  return n();
13085
12871
  },
@@ -13098,67 +12884,67 @@ function Bc(e, t) {
13098
12884
  get contract() {
13099
12885
  return q(p).contract;
13100
12886
  },
13101
- onchange: ce
12887
+ onchange: ae
13102
12888
  });
13103
12889
  };
13104
- Q(Ke, (e) => {
13105
- q(p).contract && (q(a) === "pending" || q(a) === "confirmed") && e(qe);
12890
+ Q(Ve, (e) => {
12891
+ q(p).contract && (q(a) === "pending" || q(a) === "confirmed") && e(Ue);
13106
12892
  });
13107
- var Je = U(Ke, 2), Ye = (e) => {
13108
- var t = Fc(), n = H(t, !0);
13109
- P(t), W(() => Z(n, q(v))), X(e, t);
12893
+ var We = U(Ve, 2), Ge = (e) => {
12894
+ var t = vc(), n = H(t, !0);
12895
+ P(t), W(() => Z(n, q(_))), X(e, t);
13110
12896
  };
13111
- Q(Je, (e) => {
13112
- q(v) && e(Ye);
12897
+ Q(We, (e) => {
12898
+ q(_) && e(Ge);
13113
12899
  });
13114
- var Xe = U(Je, 2), Ze = (e) => {
13115
- var t = wc(), n = H(t, !0);
12900
+ var Ke = U(We, 2), qe = (e) => {
12901
+ var t = sc(), n = H(t, !0);
13116
12902
  P(t), W(() => Z(n, q(h).retry)), Cr("click", t, () => {
13117
- V(v, null), ce();
12903
+ V(_, null), ae();
13118
12904
  }), X(e, t);
13119
12905
  };
13120
- Q(Xe, (e) => {
13121
- q(te) && e(Ze);
12906
+ Q(Ke, (e) => {
12907
+ q(E) && e(qe);
13122
12908
  });
13123
- var Qe = U(Xe, 2), $e = (e) => {
13124
- var t = Ic(), n = H(t), r = (e) => {
13125
- var t = wc(), n = H(t, !0);
12909
+ var Je = U(Ke, 2), Ye = (e) => {
12910
+ var t = yc(), n = H(t), r = (e) => {
12911
+ var t = sc(), n = H(t, !0);
13126
12912
  P(t), W(() => {
13127
- t.disabled = q(y), Z(n, q(h).cancelBooking);
13128
- }), Cr("click", t, pe), X(e, t);
12913
+ t.disabled = q(v), Z(n, q(h).cancelBooking);
12914
+ }), Cr("click", t, le), X(e, t);
13129
12915
  };
13130
12916
  Q(n, (e) => {
13131
12917
  (q(a) === "hold" || q(a) === "pending") && e(r);
13132
12918
  });
13133
12919
  var i = U(n, 2), o = (e) => {
13134
- var t = wc(), n = H(t, !0);
12920
+ var t = sc(), n = H(t, !0);
13135
12921
  P(t), W(() => {
13136
- t.disabled = q(y), Z(n, q(h).startOver);
13137
- }), Cr("click", t, me), X(e, t);
12922
+ t.disabled = q(v), Z(n, q(h).startOver);
12923
+ }), Cr("click", t, ue), X(e, t);
13138
12924
  };
13139
12925
  Q(i, (e) => {
13140
12926
  d() && e(o);
13141
12927
  }), P(t), X(e, t);
13142
12928
  };
13143
- Q(Qe, (e) => {
13144
- (q(a) === "hold" || q(a) === "pending" || d()) && e($e);
12929
+ Q(Je, (e) => {
12930
+ (q(a) === "hold" || q(a) === "pending" || d()) && e(Ye);
13145
12931
  }), W((e, n, r, i) => {
13146
12932
  l = ui(c, 1, "sbw-hero svelte-1312f6m", null, l, {
13147
12933
  "sbw-hero-ok": q(a) === "confirmed",
13148
12934
  "sbw-hero-bad": q(a) === "declined" || q(a) === "cancelled" || q(a) === "expired"
13149
- }), Z(D, q(h).hero[q(a)].eyebrow), Z(k, q(h).hero[q(a)].title), Z(re, q(h).hero[q(a)].body), Z(_e, q(h).detailsHeading), Z(xe, q(h).berth), Z(Ce, `${q(t).berthLabel ?? ""} · ${q(t).marinaName ?? ""}`), Z(Ee, q(h).dates), Z(De, `${e ?? ""} – ${n ?? ""}`), Z(Ae, q(h).boat), Z(Me, r), Z(Fe, q(h).skipperName), Z(Le, q(t).contactName), Z(Be, q(h).total), Z(Ue, i);
12935
+ }), Z(te, q(h).hero[q(a)].eyebrow), Z(O, q(h).hero[q(a)].title), Z(k, q(h).hero[q(a)].body), Z(he, q(h).detailsHeading), Z(ye, q(h).berth), Z(xe, `${q(t).berthLabel ?? ""} · ${q(t).marinaName ?? ""}`), Z(we, q(h).dates), Z(Ee, `${e ?? ""} – ${n ?? ""}`), Z(Oe, q(h).boat), Z(Ae, r), Z(Ne, q(h).skipperName), Z(Fe, q(t).contactName), Z(ze, q(h).total), Z(Be, i);
13150
12936
  }, [
13151
- () => oe(q(t).arrival),
13152
- () => oe(q(t).departure),
12937
+ () => re(q(t).arrival),
12938
+ () => re(q(t).departure),
13153
12939
  () => [q(t).boatName, q(t).boatLengthM == null ? null : `${q(t).boatLengthM} m`].filter(Boolean).join(" · "),
13154
- () => q(t).totalPrice == null ? q(h).priceOnRequest : so(q(t).totalPrice, q(t).currency, o(), q(m))
12940
+ () => q(t).totalPrice == null ? q(h).priceOnRequest : oo(q(t).totalPrice, q(t).currency, o(), q(m))
13155
12941
  ]), X(e, s);
13156
12942
  };
13157
- return Q(be, (e) => {
13158
- q(p) ? e(Se, -1) : e(xe);
13159
- }), P(ve), W(() => ye = ui(ve, 1, "sbw-view svelte-1312f6m", null, ye, { "sbw-variant-dark": s() === "dark" })), X(e, ve), Ze(_e);
12943
+ return Q(ge, (e) => {
12944
+ q(p) ? e(ve, -1) : e(_e);
12945
+ }), P(me), W(() => he = ui(me, 1, "sbw-view svelte-1312f6m", null, he, { "sbw-variant-dark": s() === "dark" })), X(e, me), Ze(pe);
13160
12946
  }
13161
- wr(["click"]), Pi(Bc, {
12947
+ wr(["click"]), Pi(Cc, {
13162
12948
  apiOrigin: {},
13163
12949
  slug: {},
13164
12950
  session: {},
@@ -13171,10 +12957,10 @@ wr(["click"]), Pi(Bc, {
13171
12957
  }, [], [], { mode: "open" });
13172
12958
  //#endregion
13173
12959
  //#region src/lib/booking-session.ts
13174
- var Vc = (e) => `sidon-booking:${e}`;
13175
- function Hc(e) {
12960
+ var wc = (e) => `sidon-booking:${e}`;
12961
+ function Tc(e) {
13176
12962
  try {
13177
- let t = JSON.parse(sessionStorage.getItem(Vc(e)) ?? "null");
12963
+ let t = JSON.parse(sessionStorage.getItem(wc(e)) ?? "null");
13178
12964
  return typeof t?.id == "string" && typeof t?.token == "string" ? {
13179
12965
  id: t.id,
13180
12966
  token: t.token
@@ -13183,20 +12969,20 @@ function Hc(e) {
13183
12969
  return null;
13184
12970
  }
13185
12971
  }
13186
- function Uc(e, t) {
12972
+ function Ec(e, t) {
13187
12973
  try {
13188
- sessionStorage.setItem(Vc(e), JSON.stringify({
12974
+ sessionStorage.setItem(wc(e), JSON.stringify({
13189
12975
  id: t.id,
13190
12976
  token: t.token
13191
12977
  }));
13192
12978
  } catch {}
13193
12979
  }
13194
- function Wc(e) {
12980
+ function Dc(e) {
13195
12981
  try {
13196
- sessionStorage.removeItem(Vc(e));
12982
+ sessionStorage.removeItem(wc(e));
13197
12983
  } catch {}
13198
12984
  }
13199
- function Gc() {
12985
+ function Oc() {
13200
12986
  let e = new URL(location.href), t = e.searchParams.get("booking"), n = e.searchParams.get("token");
13201
12987
  return n && (e.searchParams.delete("token"), history.replaceState(history.state, "", e)), t && n ? {
13202
12988
  id: t,
@@ -13205,13 +12991,13 @@ function Gc() {
13205
12991
  }
13206
12992
  //#endregion
13207
12993
  //#region src/BookingWidget.svelte
13208
- var Kc = /* @__PURE__ */ Y("<div><!></div>"), qc = /* @__PURE__ */ Y("<div class=\"sbw-load-error svelte-h0br6q\" role=\"alert\"> </div>"), Jc = /* @__PURE__ */ Y("<!> <!> <!> <!> <!>", 1), Yc = /* @__PURE__ */ Y("<!> <div><!></div>", 1), Xc = {
12994
+ var kc = /* @__PURE__ */ Y("<div><!></div>"), Ac = /* @__PURE__ */ Y("<div class=\"sbw-load-error svelte-h0br6q\" role=\"alert\"> </div>"), jc = /* @__PURE__ */ Y("<!> <!> <!> <!> <!>", 1), Mc = /* @__PURE__ */ Y("<!> <div><!></div>", 1), Nc = {
13209
12995
  hash: "svelte-h0br6q",
13210
12996
  code: ":host {--sbw-radius: 10px;display:block;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Inter, sans-serif;box-sizing:border-box;max-width:560px; /* fallback until the width prop's effect runs; see script */margin:0 auto;}:host .svelte-h0br6q {box-sizing:border-box;}.sbw-root.svelte-h0br6q {border-radius:var(--sbw-radius);overflow:hidden;box-shadow:0 8px 32px rgba(0, 0, 0, 0.16);}\r\n /* Inline, not a replacement for the card: the guest can still change\r\n dates or length, and the next successful load clears it. */.sbw-load-error.svelte-h0br6q {padding:16px 20px;font-size:14px;color:#cc4949;background:#fff;}\r\n /* Sits outside .sbw-root (not a child of it) specifically so map-width\r\n can be set to 100vw and actually break out full-bleed - .sbw-root's\r\n own overflow:hidden (for its rounded corners) would otherwise clip\r\n anything wider than the card right back down to the card's width,\r\n no matter what width/margin the child itself asks for. */.sbw-map-slot.svelte-h0br6q {border-radius:var(--sbw-radius) var(--sbw-radius) 0 0;overflow:hidden;}.sbw-map-slot--full-bleed.svelte-h0br6q {\r\n /* Standard full-bleed trick: escapes a centered ancestor of any width\r\n by sizing to the viewport and pulling back by the half-difference.\r\n Only correct when width is actually 100vw (see class:sbw-map-slot--\r\n full-bleed above) - applying this margin at any other width would\r\n misposition it instead of centering it. */margin-left:calc(50% - 50vw);margin-right:calc(50% - 50vw);border-radius:0;}\r\n /* Overlay: the card's negative-margin pull-up does the overlap, and its\r\n position/z-index paints it over the map's own positioned layers. */\r\n /* Below 768px overlay stacks; map-height/map-gap are sized for the\r\n overlay, so fall back to a half-screen map and a small gap. */\r\n @media (max-width: 767px) {.sbw-map-slot--overlay.svelte-h0br6q {height:50vh !important;margin-bottom:24px !important;}\r\n }\r\n @media (min-width: 768px) {.sbw-map-slot--overlay.svelte-h0br6q {margin-bottom:0 !important; /* beats the stacked inline margin */border-radius:0;}.sbw-root--overlay.svelte-h0br6q {position:relative;z-index:1;max-width:var(--sbw-card-width, 560px);margin-top:calc(var(--sbw-map-gap, 24px) - var(--sbw-map-h, 280px));margin-left:var(--sbw-card-inset, 24px);}\r\n }"
13211
12997
  };
13212
- function Zc(e, t) {
13213
- Xe(t, !0), ri(e, Xc);
13214
- let n = $(t, "marina", 7), r = $(t, "apiOrigin", 7, ""), i = $(t, "from", 7, ""), a = $(t, "to", 7, ""), o = $(t, "length", 7, 15), s = $(t, "berth", 7, ""), c = $(t, "locale", 7, ""), l = $(t, "currencySymbol", 7, ""), u = $(t, "variant", 7, "navy"), d = $(t, "mapsApiKey", 7, ""), f = $(t, "mapStyle", 7, "chart"), p = $(t, "mapHeight", 7, "280px"), m = $(t, "mapWidth", 7, "100%"), h = $(t, "mapGap", 7, "0px"), g = $(t, "width", 7, "560px"), _ = $(t, "layout", 7, "stacked"), v = $(t, "logoMark", 7, null), y = $(t, "marinaName", 7, ""), b = $(t, "otherMarinas", 23, () => []), x = $(t, "bookingId", 7), S = $(t, "sidonOrigin", 7, So), ee = $(t, "sailorApiOrigin", 7, ""), C = t.$$host;
12998
+ function Pc(e, t) {
12999
+ Xe(t, !0), ri(e, Nc);
13000
+ let n = $(t, "marina", 7), r = $(t, "apiOrigin", 7, ""), i = $(t, "from", 7, ""), a = $(t, "to", 7, ""), o = $(t, "length", 7, 15), s = $(t, "berth", 7, ""), c = $(t, "locale", 7, ""), l = $(t, "currencySymbol", 7, ""), u = $(t, "variant", 7, "navy"), d = $(t, "mapsApiKey", 7, ""), f = $(t, "mapStyle", 7, "chart"), p = $(t, "mapHeight", 7, "280px"), m = $(t, "mapWidth", 7, "100%"), h = $(t, "mapGap", 7, "0px"), g = $(t, "width", 7, "560px"), _ = $(t, "layout", 7, "stacked"), v = $(t, "logoMark", 7, null), y = $(t, "marinaName", 7, ""), b = $(t, "otherMarinas", 23, () => []), x = $(t, "bookingId", 7), S = $(t, "sidonOrigin", 7, xo), ee = $(t, "sailorApiOrigin", 7, ""), C = t.$$host;
13215
13001
  function w(e, t) {
13216
13002
  C.dispatchEvent(new CustomEvent(e, {
13217
13003
  detail: t,
@@ -13219,30 +13005,30 @@ function Zc(e, t) {
13219
13005
  composed: !0
13220
13006
  }));
13221
13007
  }
13222
- let T = /* @__PURE__ */ I(() => Ba(c())), E = /* @__PURE__ */ I(() => ys(q(T))), te = J(() => x() != null), D = /* @__PURE__ */ B(on(J(() => te ? ne() : Hc(n())))), O = /* @__PURE__ */ B(on(J(() => te || q(D) ? 4 : 1)));
13008
+ let T = /* @__PURE__ */ I(() => Ba(c())), E = /* @__PURE__ */ I(() => gs(q(T))), te = J(() => x() != null), D = /* @__PURE__ */ B(on(J(() => te ? ne() : Tc(n())))), O = /* @__PURE__ */ B(on(J(() => te || q(D) ? 4 : 1)));
13223
13009
  function ne() {
13224
- let e = Gc();
13010
+ let e = Oc();
13225
13011
  if (e) {
13226
13012
  let t = {
13227
13013
  id: x() || e.id,
13228
13014
  token: e.token
13229
13015
  };
13230
- return Uc(n(), t), t;
13016
+ return Ec(n(), t), t;
13231
13017
  }
13232
- let t = Hc(n());
13018
+ let t = Tc(n());
13233
13019
  return t && (!x() || t.id === x()) ? t : null;
13234
13020
  }
13235
- let k = /* @__PURE__ */ B(on(J(() => o() && o() > 0 ? o() : 15))), A = /* @__PURE__ */ B(on(J(() => {
13021
+ let k = /* @__PURE__ */ B(on(J(() => o() && o() > 0 ? o() : 15))), re = /* @__PURE__ */ B(on(J(() => {
13236
13022
  let e = ka(i());
13237
13023
  if (e) return e;
13238
13024
  let t = /* @__PURE__ */ new Date();
13239
13025
  return t.setHours(0, 0, 0, 0), t;
13240
- }))), re = /* @__PURE__ */ B(on(J(() => {
13026
+ }))), ie = /* @__PURE__ */ B(on(J(() => {
13241
13027
  let e = ka(a());
13242
13028
  if (e) return e;
13243
13029
  let t = ka(i()) ?? new Date((/* @__PURE__ */ new Date()).setHours(0, 0, 0, 0));
13244
13030
  return new Date(t.getTime() + 2592e5);
13245
- }))), ie = /* @__PURE__ */ B(null), ae = /* @__PURE__ */ B(""), oe = /* @__PURE__ */ B(""), se = /* @__PURE__ */ B(""), ce = /* @__PURE__ */ B(""), le = /* @__PURE__ */ B(null), ue = /* @__PURE__ */ B(""), de = /* @__PURE__ */ B(null), fe = /* @__PURE__ */ B(on([])), pe = /* @__PURE__ */ B(null), me = /* @__PURE__ */ B(0), he = /* @__PURE__ */ B(!1), ge = /* @__PURE__ */ B(null), _e = /* @__PURE__ */ B(null), ve = /* @__PURE__ */ B(void 0), ye = /* @__PURE__ */ B(!1), be = /* @__PURE__ */ B(null), xe = /* @__PURE__ */ B("#16365b"), Se = /* @__PURE__ */ B("#c9a86b");
13031
+ }))), ae = /* @__PURE__ */ B(null), oe = /* @__PURE__ */ B(""), A = /* @__PURE__ */ B(""), se = /* @__PURE__ */ B(""), ce = /* @__PURE__ */ B(""), le = /* @__PURE__ */ B(null), ue = /* @__PURE__ */ B(""), de = /* @__PURE__ */ B(null), fe = /* @__PURE__ */ B(on([])), pe = /* @__PURE__ */ B(null), me = /* @__PURE__ */ B(0), he = /* @__PURE__ */ B(!1), ge = /* @__PURE__ */ B(null), _e = /* @__PURE__ */ B(null), ve = /* @__PURE__ */ B(void 0), ye = /* @__PURE__ */ B(!1), be = /* @__PURE__ */ B(null), xe = /* @__PURE__ */ B("#16365b"), Se = /* @__PURE__ */ B("#c9a86b");
13246
13032
  Gr(() => {
13247
13033
  let e = getComputedStyle(C);
13248
13034
  V(xe, e.getPropertyValue("--brand-navy").trim() || q(xe), !0), V(Se, e.getPropertyValue("--brand-gold").trim() || q(Se), !0);
@@ -13254,25 +13040,25 @@ function Zc(e, t) {
13254
13040
  }), Gr(() => {
13255
13041
  _() === "overlay" ? (C.style.maxWidth = "none", C.style.setProperty("--sbw-card-width", g())) : C.style.maxWidth = g();
13256
13042
  });
13257
- let Ce = /* @__PURE__ */ I(() => !!d() && q(O) !== 4 && !q(pe)), we = /* @__PURE__ */ I(() => q(le) != null && q(le) > 0 ? q(le) : null), Te = /* @__PURE__ */ I(() => (q(de)?.berths ?? []).filter((e) => e.status === "available")), Ee = /* @__PURE__ */ I(() => !q(Te).length || q(Te).some((e) => e.lengthM == null) ? 200 : Math.max(...q(Te).map((e) => e.lengthM ?? 0))), j = /* @__PURE__ */ I(() => q(ie) && q(fe).some((e) => e.label === q(ie)) ? q(ie) : io(q(fe))), De = /* @__PURE__ */ I(() => q(fe).find((e) => e.label === q(j)) ?? null), Oe = /* @__PURE__ */ I(() => q(De)?.totalPrice == null ? null : so(q(De).totalPrice, q(de)?.currency ?? null, l(), q(T))), ke = !1;
13043
+ let Ce = /* @__PURE__ */ I(() => !!d() && q(O) !== 4 && !q(pe)), we = /* @__PURE__ */ I(() => q(le) != null && q(le) > 0 ? q(le) : null), Te = /* @__PURE__ */ I(() => (q(de)?.berths ?? []).filter((e) => e.status === "available")), Ee = /* @__PURE__ */ I(() => !q(Te).length || q(Te).some((e) => e.lengthM == null) ? 200 : Math.max(...q(Te).map((e) => e.lengthM ?? 0))), j = /* @__PURE__ */ I(() => q(ae) && q(fe).some((e) => e.label === q(ae)) ? q(ae) : ro(q(fe))), De = /* @__PURE__ */ I(() => q(fe).find((e) => e.label === q(j)) ?? null), Oe = /* @__PURE__ */ I(() => q(De)?.totalPrice == null ? null : oo(q(De).totalPrice, q(de)?.currency ?? null, l(), q(T))), ke = !1;
13258
13044
  Tn(() => {
13259
13045
  ke || !q(Te).length || (ke = !0, q(k) > q(Ee) && V(k, q(Ee), !0));
13260
13046
  }), Tn(() => {
13261
13047
  let e = s();
13262
13048
  J(() => {
13263
- q(O) <= 2 && V(ie, e || null, !0);
13049
+ q(O) <= 2 && V(ae, e || null, !0);
13264
13050
  });
13265
13051
  });
13266
13052
  let Ae = {
13267
13053
  arrival: "",
13268
13054
  departure: ""
13269
- }, je = /* @__PURE__ */ I(() => q(A) && q(re) && +q(re) > +q(A) ? Ae = {
13270
- arrival: Oa(q(A)),
13271
- departure: Oa(q(re))
13055
+ }, je = /* @__PURE__ */ I(() => q(re) && q(ie) && +q(ie) > +q(re) ? Ae = {
13056
+ arrival: Oa(q(re)),
13057
+ departure: Oa(q(ie))
13272
13058
  } : Ae), Me = /* @__PURE__ */ B(1);
13273
13059
  Gr(() => {
13274
- te || Io(r(), n(), J(() => q(je)), null).then((e) => {
13275
- e.signInRequired || (V(Me, 2), q(O) === 1 && (V(he, !0), V(O, 2)));
13060
+ te || Po(r(), n(), J(() => q(je)), null).then((e) => {
13061
+ e.requirements.length || (V(Me, 2), q(O) === 1 && (V(he, !0), V(O, 2)));
13276
13062
  }, () => {});
13277
13063
  });
13278
13064
  let Ne = {
@@ -13283,10 +13069,10 @@ function Zc(e, t) {
13283
13069
  let e = q(ge);
13284
13070
  J(() => {
13285
13071
  if (e) {
13286
- V(oe, Ne.email = e.email, !0), !q(ae).trim() && e.name && V(ae, Ne.name = e.name, !0);
13072
+ V(A, Ne.email = e.email, !0), !q(oe).trim() && e.name && V(oe, Ne.name = e.name, !0);
13287
13073
  return;
13288
13074
  }
13289
- Ne.email && q(oe) === Ne.email && V(oe, ""), Ne.name && q(ae) === Ne.name && V(ae, ""), Ne = {
13075
+ Ne.email && q(A) === Ne.email && V(A, ""), Ne.name && q(oe) === Ne.name && V(oe, ""), Ne = {
13290
13076
  email: "",
13291
13077
  name: ""
13292
13078
  };
@@ -13295,13 +13081,13 @@ function Zc(e, t) {
13295
13081
  let Pe = /* @__PURE__ */ I(() => q(O) !== 4);
13296
13082
  Tn(() => {
13297
13083
  if (!q(Pe)) return;
13298
- let e = q(A) && q(re) ? {
13299
- from: Oa(q(A)),
13300
- to: Oa(q(re))
13084
+ let e = q(re) && q(ie) ? {
13085
+ from: Oa(q(re)),
13086
+ to: Oa(q(ie))
13301
13087
  } : void 0;
13302
13088
  q(me);
13303
13089
  let t = !1, i = setTimeout(() => {
13304
- Po(r(), n(), e).then((e) => {
13090
+ No(r(), n(), e).then((e) => {
13305
13091
  t || (V(de, e, !0), V(pe, null));
13306
13092
  }).catch(() => {
13307
13093
  t || V(pe, q(E).wizard.errLoad, !0);
@@ -13311,16 +13097,16 @@ function Zc(e, t) {
13311
13097
  t = !0, clearTimeout(i);
13312
13098
  };
13313
13099
  }), Tn(() => {
13314
- if (q(O) > 2 || !q(A) || !q(re) || +q(re) <= +q(A) || !(q(k) > 0)) return;
13100
+ if (q(O) > 2 || !q(re) || !q(ie) || +q(ie) <= +q(re) || !(q(k) > 0)) return;
13315
13101
  let e = {
13316
- arrival: Oa(q(A)),
13317
- departure: Oa(q(re)),
13102
+ arrival: Oa(q(re)),
13103
+ departure: Oa(q(ie)),
13318
13104
  boatLengthM: q(k),
13319
13105
  boatBeamM: q(we)
13320
13106
  };
13321
13107
  q(me);
13322
13108
  let t = !1, i = setTimeout(() => {
13323
- Lo(r(), n(), e).then((e) => {
13109
+ Fo(r(), n(), e).then((e) => {
13324
13110
  t || (V(fe, e, !0), V(pe, null));
13325
13111
  }).catch(() => {
13326
13112
  t || V(pe, q(E).wizard.errLoad, !0);
@@ -13335,7 +13121,7 @@ function Zc(e, t) {
13335
13121
  te || w("sidon-loa-change", { loa: q(k) });
13336
13122
  });
13337
13123
  function Fe(e) {
13338
- q(O) <= 2 && V(ie, e, !0);
13124
+ q(O) <= 2 && V(ae, e, !0);
13339
13125
  }
13340
13126
  function Ie(e) {
13341
13127
  e < q(O) && Ue();
@@ -13346,22 +13132,22 @@ function Zc(e, t) {
13346
13132
  let Re = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
13347
13133
  function M() {
13348
13134
  let e = q(E).wizard;
13349
- return !q(A) || !q(re) || +q(re) <= +q(A) ? e.errDates : q(k) > 0 ? q(j) ? q(ae).trim() ? q(ce).trim() ? Re.test(q(oe).trim()) ? null : e.errEmail : e.errBoatName : e.errName : e.errNoBerth : e.errLength;
13135
+ return !q(re) || !q(ie) || +q(ie) <= +q(re) ? e.errDates : q(k) > 0 ? q(j) ? q(oe).trim() ? q(ce).trim() ? Re.test(q(A).trim()) ? null : e.errEmail : e.errBoatName : e.errName : e.errNoBerth : e.errLength;
13350
13136
  }
13351
13137
  function ze() {
13352
- return q(ge) ? Eo(S())?.token ?? null : null;
13138
+ return q(ge) ? To(S())?.token ?? null : null;
13353
13139
  }
13354
13140
  async function N() {
13355
13141
  let e = M();
13356
13142
  if (e) return void V(be, e, !0);
13357
13143
  V(ye, !0);
13358
13144
  try {
13359
- let e = await Ro(r(), n(), {
13145
+ let e = await Io(r(), n(), {
13360
13146
  berthLabel: q(j),
13361
- arrival: Oa(q(A)),
13362
- departure: Oa(q(re)),
13363
- contactName: q(ae).trim(),
13364
- contactEmail: q(oe).trim(),
13147
+ arrival: Oa(q(re)),
13148
+ departure: Oa(q(ie)),
13149
+ contactName: q(oe).trim(),
13150
+ contactEmail: q(A).trim(),
13365
13151
  contactPhone: q(se).trim() || void 0,
13366
13152
  boatName: q(ce).trim(),
13367
13153
  boatLengthM: q(k),
@@ -13372,7 +13158,7 @@ function Zc(e, t) {
13372
13158
  id: e.booking.id,
13373
13159
  token: e.token
13374
13160
  };
13375
- V(D, t, !0), Uc(n(), t), e.payment ? (V(_e, e, !0), V(O, 3)) : He(t.id);
13161
+ V(D, t, !0), Ec(n(), t), e.payment ? (V(_e, e, !0), V(O, 3)) : He(t.id);
13376
13162
  } catch (e) {
13377
13163
  Be(e);
13378
13164
  } finally {
@@ -13381,8 +13167,8 @@ function Zc(e, t) {
13381
13167
  }
13382
13168
  function Be(e) {
13383
13169
  let t = q(E).wizard;
13384
- if (!(e instanceof ko) || e.status === 0) return void V(be, t.errNetwork, !0);
13385
- if (qa(e.status, e.message)) {
13170
+ if (!(e instanceof Oo) || e.status === 0) return void V(be, t.errNetwork, !0);
13171
+ if (Ka(e.status, e.message)) {
13386
13172
  V(Me, 1), V(O, 1), V(be, q(E).docsStep.missingNow, !0);
13387
13173
  return;
13388
13174
  }
@@ -13406,7 +13192,7 @@ function Zc(e, t) {
13406
13192
  V(be, e instanceof Error ? e.message : q(E).wizard.errNetwork, !0), V(ye, !1);
13407
13193
  return;
13408
13194
  }
13409
- await Bo(r(), n(), e).catch(() => {}), V(ye, !1), He(e.id);
13195
+ await Ro(r(), n(), e).catch(() => {}), V(ye, !1), He(e.id);
13410
13196
  }
13411
13197
  }
13412
13198
  function He(e) {
@@ -13424,12 +13210,12 @@ function Zc(e, t) {
13424
13210
  }
13425
13211
  if (q(O) !== 3 || !e) return;
13426
13212
  V(be, null), V(ye, !0);
13427
- let t = await Vo(r(), n(), e).then(() => !0, (e) => e instanceof ko && e.status >= 400 && e.status < 500 && e.status !== 429);
13213
+ let t = await zo(r(), n(), e).then(() => !0, (e) => e instanceof Oo && e.status >= 400 && e.status < 500 && e.status !== 429);
13428
13214
  if (V(ye, !1), !t) return void V(be, q(E).wizard.errNetwork, !0);
13429
- Wc(n()), V(D, null), V(_e, null), V(O, 2);
13215
+ Dc(n()), V(D, null), V(_e, null), V(O, 2);
13430
13216
  }
13431
13217
  function We() {
13432
- Wc(n()), V(D, null), V(be, null), V(O, q(Me), !0);
13218
+ Dc(n()), V(D, null), V(be, null), V(O, q(Me), !0);
13433
13219
  }
13434
13220
  function Ge(e, t) {
13435
13221
  t !== null && q(D) && w("sidon-booking-status", {
@@ -13561,7 +13347,7 @@ function Zc(e, t) {
13561
13347
  get sidonOrigin() {
13562
13348
  return S();
13563
13349
  },
13564
- set sidonOrigin(e = So) {
13350
+ set sidonOrigin(e = xo) {
13565
13351
  S(e), z();
13566
13352
  },
13567
13353
  get sailorApiOrigin() {
@@ -13570,8 +13356,8 @@ function Zc(e, t) {
13570
13356
  set sailorApiOrigin(e = "") {
13571
13357
  ee(e), z();
13572
13358
  }
13573
- }, qe = Yc(), Je = hn(qe), Ye = (e) => {
13574
- var t = Kc();
13359
+ }, qe = Mc(), Je = hn(qe), Ye = (e) => {
13360
+ var t = kc();
13575
13361
  let n;
13576
13362
  var r = H(t);
13577
13363
  {
@@ -13579,7 +13365,7 @@ function Zc(e, t) {
13579
13365
  lat: q(de)?.profile.lat ?? 0,
13580
13366
  lng: q(de)?.profile.lng ?? 0
13581
13367
  })), t = /* @__PURE__ */ I(() => q(de)?.berths ?? []), n = /* @__PURE__ */ I(() => q(de)?.overlays ?? []), i = /* @__PURE__ */ I(() => q(de)?.layout ?? null);
13582
- _o(r, {
13368
+ go(r, {
13583
13369
  get mapsApiKey() {
13584
13370
  return d();
13585
13371
  },
@@ -13638,7 +13424,7 @@ function Zc(e, t) {
13638
13424
  var t = Nr(), i = hn(t), a = (e) => {
13639
13425
  {
13640
13426
  let t = /* @__PURE__ */ I(() => c() ? q(T) : null);
13641
- Bc(e, {
13427
+ Cc(e, {
13642
13428
  get apiOrigin() {
13643
13429
  return r();
13644
13430
  },
@@ -13664,14 +13450,14 @@ function Zc(e, t) {
13664
13450
  });
13665
13451
  }
13666
13452
  }, o = (e) => {
13667
- var t = qc(), n = H(t, !0);
13453
+ var t = Ac(), n = H(t, !0);
13668
13454
  P(t), W(() => Z(n, q(E).wizard.linkInvalid)), X(e, t);
13669
13455
  };
13670
13456
  Q(i, (e) => {
13671
13457
  q(D) ? e(a) : e(o, -1);
13672
13458
  }), X(e, t);
13673
13459
  }, nt = (e) => {
13674
- var t = Jc(), i = hn(t), a = (e) => {
13460
+ var t = jc(), i = hn(t), a = (e) => {
13675
13461
  {
13676
13462
  let t = /* @__PURE__ */ I(() => q(j) ?? "—"), n = /* @__PURE__ */ I(() => c() || "en"), r = /* @__PURE__ */ I(() => q(O) > 2);
13677
13463
  Pa(e, {
@@ -13697,16 +13483,16 @@ function Zc(e, t) {
13697
13483
  V(k, e, !0);
13698
13484
  },
13699
13485
  get from() {
13700
- return q(A);
13486
+ return q(re);
13701
13487
  },
13702
13488
  set from(e) {
13703
- V(A, e, !0);
13489
+ V(re, e, !0);
13704
13490
  },
13705
13491
  get to() {
13706
- return q(re);
13492
+ return q(ie);
13707
13493
  },
13708
13494
  set to(e) {
13709
- V(re, e, !0);
13495
+ V(ie, e, !0);
13710
13496
  }
13711
13497
  });
13712
13498
  }
@@ -13715,7 +13501,7 @@ function Zc(e, t) {
13715
13501
  q(O) !== 4 && e(a);
13716
13502
  });
13717
13503
  var o = U(i, 2);
13718
- xo(o, {
13504
+ bo(o, {
13719
13505
  get active() {
13720
13506
  return q(O);
13721
13507
  },
@@ -13728,14 +13514,14 @@ function Zc(e, t) {
13728
13514
  onStepClick: Ie
13729
13515
  });
13730
13516
  var s = U(o, 2), d = (e) => {
13731
- var t = qc(), n = H(t, !0);
13517
+ var t = Ac(), n = H(t, !0);
13732
13518
  P(t), W(() => Z(n, q(pe))), X(e, t);
13733
13519
  };
13734
13520
  Q(s, (e) => {
13735
13521
  q(pe) && q(O) !== 4 && e(d);
13736
13522
  });
13737
13523
  var f = U(s, 2), p = (e) => {
13738
- ms(e, {
13524
+ ds(e, {
13739
13525
  get apiOrigin() {
13740
13526
  return r();
13741
13527
  },
@@ -13779,7 +13565,7 @@ function Zc(e, t) {
13779
13565
  }, m = (e) => {
13780
13566
  {
13781
13567
  let t = /* @__PURE__ */ I(() => !!q(ge));
13782
- _s(e, {
13568
+ ms(e, {
13783
13569
  get emailLocked() {
13784
13570
  return q(t);
13785
13571
  },
@@ -13787,16 +13573,16 @@ function Zc(e, t) {
13787
13573
  return q(E);
13788
13574
  },
13789
13575
  get contactName() {
13790
- return q(ae);
13576
+ return q(oe);
13791
13577
  },
13792
13578
  set contactName(e) {
13793
- V(ae, e, !0);
13579
+ V(oe, e, !0);
13794
13580
  },
13795
13581
  get contactEmail() {
13796
- return q(oe);
13582
+ return q(A);
13797
13583
  },
13798
13584
  set contactEmail(e) {
13799
- V(oe, e, !0);
13585
+ V(A, e, !0);
13800
13586
  },
13801
13587
  get contactPhone() {
13802
13588
  return q(se);
@@ -13826,8 +13612,8 @@ function Zc(e, t) {
13826
13612
  }
13827
13613
  }, h = (e) => {
13828
13614
  {
13829
- let t = /* @__PURE__ */ I(() => so(q(_e).booking.totalPrice, q(_e).booking.currency, l(), q(T)));
13830
- Oi(Xs(e, {
13615
+ let t = /* @__PURE__ */ I(() => oo(q(_e).booking.totalPrice, q(_e).booking.currency, l(), q(T)));
13616
+ Oi(qs(e, {
13831
13617
  get payment() {
13832
13618
  return q(_e).payment;
13833
13619
  },
@@ -13848,7 +13634,7 @@ function Zc(e, t) {
13848
13634
  }, g = (e) => {
13849
13635
  {
13850
13636
  let t = /* @__PURE__ */ I(() => c() ? q(T) : null);
13851
- Bc(e, {
13637
+ Cc(e, {
13852
13638
  get apiOrigin() {
13853
13639
  return r();
13854
13640
  },
@@ -13881,7 +13667,7 @@ function Zc(e, t) {
13881
13667
  var _ = U(f, 2);
13882
13668
  {
13883
13669
  let e = /* @__PURE__ */ I(() => q(O) === 1 && !q(he));
13884
- nc(_, {
13670
+ $s(_, {
13885
13671
  get step() {
13886
13672
  return q(O);
13887
13673
  },
@@ -13915,7 +13701,7 @@ function Zc(e, t) {
13915
13701
  $e = ui(Qe, 1, "sbw-root svelte-h0br6q", null, $e, { "sbw-root--overlay": _() === "overlay" }), fi(Qe, `--sbw-map-h: ${(q(Ce) ? p() : "0px") ?? ""}; --sbw-map-gap: ${(q(Ce) ? h() : "0px") ?? ""};`);
13916
13702
  }), X(e, qe), Ze(Ke);
13917
13703
  }
13918
- customElements.define("sidon-booking-widget", Pi(Zc, {
13704
+ customElements.define("sidon-booking-widget", Pi(Pc, {
13919
13705
  marina: {
13920
13706
  attribute: "marina",
13921
13707
  type: "String"