@forgebuild/sidon-booking-widget 3.0.0 → 3.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +622 -625
- package/dist/elements.d.ts +124 -124
- package/dist/sidon-booking-widget.js +536 -784
- package/package.json +1 -1
|
@@ -42,7 +42,7 @@ function D() {
|
|
|
42
42
|
reject: t
|
|
43
43
|
};
|
|
44
44
|
}
|
|
45
|
-
var O = 1024, ne = 2048, k = 4096,
|
|
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 =
|
|
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 |=
|
|
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 |=
|
|
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 |=
|
|
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 ^=
|
|
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 ^=
|
|
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 ^=
|
|
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 |=
|
|
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 &
|
|
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 ?
|
|
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
|
-
},
|
|
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 =
|
|
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 =
|
|
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(
|
|
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(
|
|
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
|
|
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
|
|
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
|
|
3222
|
+
return ae(), n.weekdayContainer;
|
|
3223
3223
|
}
|
|
3224
|
-
function
|
|
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
|
|
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
|
|
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(),
|
|
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,
|
|
3593
|
+
locale: [Ce, ae],
|
|
3594
3594
|
showMonths: [
|
|
3595
3595
|
ne,
|
|
3596
3596
|
s,
|
|
3597
|
-
|
|
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 ?
|
|
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,17 +4238,7 @@ 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),
|
|
@@ -4259,13 +4249,13 @@ function Ga(e) {
|
|
|
4259
4249
|
}))
|
|
4260
4250
|
};
|
|
4261
4251
|
}
|
|
4262
|
-
function
|
|
4263
|
-
return
|
|
4252
|
+
function Ga(e) {
|
|
4253
|
+
return e.requirements.every((e) => !e.mandatory || e.met);
|
|
4264
4254
|
}
|
|
4265
|
-
function
|
|
4255
|
+
function Ka(e, t) {
|
|
4266
4256
|
return e === 401 && t === "Sign in required" || e === 409 && t === "Required documents missing";
|
|
4267
4257
|
}
|
|
4268
|
-
function
|
|
4258
|
+
function qa(e) {
|
|
4269
4259
|
return Array.isArray(e) ? e.map((e) => ({
|
|
4270
4260
|
label: e.label,
|
|
4271
4261
|
lengthM: Ra(e.length_m),
|
|
@@ -4275,7 +4265,7 @@ function Ja(e) {
|
|
|
4275
4265
|
totalPrice: Ra(e.total_price)
|
|
4276
4266
|
})) : [];
|
|
4277
4267
|
}
|
|
4278
|
-
function
|
|
4268
|
+
function Ja(e) {
|
|
4279
4269
|
return {
|
|
4280
4270
|
id: e.id,
|
|
4281
4271
|
status: e.status,
|
|
@@ -4298,20 +4288,20 @@ function Ya(e) {
|
|
|
4298
4288
|
docCount: Number(e.doc_count) || 0
|
|
4299
4289
|
};
|
|
4300
4290
|
}
|
|
4301
|
-
function
|
|
4291
|
+
function Ya(e) {
|
|
4302
4292
|
return e?.client_secret && e?.publishable_key ? {
|
|
4303
4293
|
clientSecret: e.client_secret,
|
|
4304
4294
|
publishableKey: e.publishable_key
|
|
4305
4295
|
} : null;
|
|
4306
4296
|
}
|
|
4307
|
-
function
|
|
4297
|
+
function Xa(e) {
|
|
4308
4298
|
return {
|
|
4309
4299
|
templateId: e.template_id ?? null,
|
|
4310
4300
|
renderedBody: e.rendered_body ?? "",
|
|
4311
4301
|
agreedAt: e.agreed_at ?? null
|
|
4312
4302
|
};
|
|
4313
4303
|
}
|
|
4314
|
-
function
|
|
4304
|
+
function Za(e) {
|
|
4315
4305
|
return {
|
|
4316
4306
|
id: e.id,
|
|
4317
4307
|
requirementId: e.requirement_id ?? null,
|
|
@@ -4320,22 +4310,22 @@ function Qa(e) {
|
|
|
4320
4310
|
submittedAt: e.submitted_at
|
|
4321
4311
|
};
|
|
4322
4312
|
}
|
|
4323
|
-
function
|
|
4313
|
+
function Qa(e) {
|
|
4324
4314
|
return {
|
|
4325
|
-
booking:
|
|
4326
|
-
payment:
|
|
4327
|
-
contract: e.contract ?
|
|
4328
|
-
documents: (e.documents ?? []).map(
|
|
4315
|
+
booking: Ja(e.booking),
|
|
4316
|
+
payment: Ya(e.payment),
|
|
4317
|
+
contract: e.contract ? Xa(e.contract) : null,
|
|
4318
|
+
documents: (e.documents ?? []).map(Za)
|
|
4329
4319
|
};
|
|
4330
4320
|
}
|
|
4331
|
-
function
|
|
4321
|
+
function $a(e) {
|
|
4332
4322
|
return {
|
|
4333
|
-
booking:
|
|
4323
|
+
booking: Ja(e.booking),
|
|
4334
4324
|
token: e.booking_token,
|
|
4335
|
-
payment:
|
|
4325
|
+
payment: Ya(e.payment)
|
|
4336
4326
|
};
|
|
4337
4327
|
}
|
|
4338
|
-
function
|
|
4328
|
+
function eo(e) {
|
|
4339
4329
|
let t = {
|
|
4340
4330
|
berth_label: e.berthLabel,
|
|
4341
4331
|
arrival: e.arrival,
|
|
@@ -4350,23 +4340,23 @@ function to(e) {
|
|
|
4350
4340
|
let r = e.notes?.trim();
|
|
4351
4341
|
return r && (t.notes = r), t;
|
|
4352
4342
|
}
|
|
4353
|
-
function
|
|
4343
|
+
function to(e, t, n) {
|
|
4354
4344
|
return !(e.lengthM != null && t > e.lengthM || e.minLengthM != null && t < e.minLengthM || e.beamM != null && n != null && n > e.beamM);
|
|
4355
4345
|
}
|
|
4356
|
-
function
|
|
4357
|
-
return n || e.status === "available" &&
|
|
4346
|
+
function no(e, t, n) {
|
|
4347
|
+
return n || e.status === "available" && to(e, t);
|
|
4358
4348
|
}
|
|
4359
|
-
function
|
|
4349
|
+
function ro(e) {
|
|
4360
4350
|
let t = (e) => e ?? Infinity;
|
|
4361
4351
|
return [...e].sort((e, n) => t(e.totalPrice) - t(n.totalPrice) || t(e.lengthM) - t(n.lengthM))[0]?.label ?? null;
|
|
4362
4352
|
}
|
|
4363
|
-
function
|
|
4353
|
+
function io(e) {
|
|
4364
4354
|
return e === 409 ? "card" : e === 410 ? "lapsed" : "retry";
|
|
4365
4355
|
}
|
|
4366
|
-
function
|
|
4356
|
+
function ao(e, t) {
|
|
4367
4357
|
return e === "pending" || e === "confirmed" || e === "hold" && !t;
|
|
4368
4358
|
}
|
|
4369
|
-
function
|
|
4359
|
+
function oo(e, t, n, r) {
|
|
4370
4360
|
if (e == null) return "";
|
|
4371
4361
|
if (!n && t) try {
|
|
4372
4362
|
return new Intl.NumberFormat(r, {
|
|
@@ -4376,10 +4366,10 @@ function so(e, t, n, r) {
|
|
|
4376
4366
|
} catch {}
|
|
4377
4367
|
return `${n}${e}`;
|
|
4378
4368
|
}
|
|
4379
|
-
function
|
|
4369
|
+
function so(e) {
|
|
4380
4370
|
return e.replace(/[^\x20-\x7E]/g, "_").slice(0, 200);
|
|
4381
4371
|
}
|
|
4382
|
-
async function
|
|
4372
|
+
async function co(e, t) {
|
|
4383
4373
|
try {
|
|
4384
4374
|
let t = JSON.parse(await e.text());
|
|
4385
4375
|
if (typeof t?.error == "string" && t.error) return t.error;
|
|
@@ -4388,12 +4378,12 @@ async function lo(e, t) {
|
|
|
4388
4378
|
}
|
|
4389
4379
|
//#endregion
|
|
4390
4380
|
//#region src/lib/berth-shape.ts
|
|
4391
|
-
var
|
|
4381
|
+
var lo = [
|
|
4392
4382
|
[-.5, -.5],
|
|
4393
4383
|
[.5, -.5],
|
|
4394
4384
|
[.5, .5],
|
|
4395
4385
|
[-.5, .5]
|
|
4396
|
-
],
|
|
4386
|
+
], uo = [
|
|
4397
4387
|
[.5, 0],
|
|
4398
4388
|
[.4, -.4],
|
|
4399
4389
|
[-.3, -.45],
|
|
@@ -4403,12 +4393,12 @@ var uo = [
|
|
|
4403
4393
|
[-.3, .45],
|
|
4404
4394
|
[.4, .4]
|
|
4405
4395
|
];
|
|
4406
|
-
function
|
|
4396
|
+
function fo(e, t) {
|
|
4407
4397
|
if (e.rotation != null) return e.rotation;
|
|
4408
4398
|
let n = e.pontoonId ? t.find((t) => t.id === e.pontoonId) : void 0;
|
|
4409
4399
|
return n ? ((n.rotation ?? 0) + 90) % 360 : null;
|
|
4410
4400
|
}
|
|
4411
|
-
function
|
|
4401
|
+
function po(e, t, n, r = 1) {
|
|
4412
4402
|
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
4403
|
return n.map(([e, t]) => {
|
|
4414
4404
|
let n = e * o, r = t * s;
|
|
@@ -4420,12 +4410,12 @@ function mo(e, t, n, r = 1) {
|
|
|
4420
4410
|
}
|
|
4421
4411
|
//#endregion
|
|
4422
4412
|
//#region src/components/BerthMapView.svelte
|
|
4423
|
-
var
|
|
4413
|
+
var mo = /* @__PURE__ */ Y("<div class=\"sbm-map svelte-yb07tk\"></div>"), ho = {
|
|
4424
4414
|
hash: "svelte-yb07tk",
|
|
4425
4415
|
code: ".sbm-map.svelte-yb07tk {width:100%;height:100%;background:#eef2f5;}"
|
|
4426
4416
|
};
|
|
4427
|
-
function
|
|
4428
|
-
Xe(t, !0), ri(e,
|
|
4417
|
+
function go(e, t) {
|
|
4418
|
+
Xe(t, !0), ri(e, ho);
|
|
4429
4419
|
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
4420
|
fillColor: o(),
|
|
4431
4421
|
fillOpacity: .38,
|
|
@@ -4462,7 +4452,7 @@ function _o(e, t) {
|
|
|
4462
4452
|
strokeColor: a(),
|
|
4463
4453
|
strokeOpacity: 1,
|
|
4464
4454
|
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(
|
|
4455
|
+
})), 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
4456
|
function k(e) {
|
|
4467
4457
|
let t = e.circle, n = Symbol();
|
|
4468
4458
|
ne.set(t, n);
|
|
@@ -4478,7 +4468,7 @@ function _o(e, t) {
|
|
|
4478
4468
|
};
|
|
4479
4469
|
requestAnimationFrame(i);
|
|
4480
4470
|
}
|
|
4481
|
-
let
|
|
4471
|
+
let re = [
|
|
4482
4472
|
{
|
|
4483
4473
|
elementType: "geometry",
|
|
4484
4474
|
stylers: [{ color: "#ffffff" }]
|
|
@@ -4536,7 +4526,7 @@ function _o(e, t) {
|
|
|
4536
4526
|
elementType: "labels.text.fill",
|
|
4537
4527
|
stylers: [{ color: "#aab0b4" }]
|
|
4538
4528
|
}
|
|
4539
|
-
],
|
|
4529
|
+
], ie = /* @__PURE__ */ I(() => [
|
|
4540
4530
|
{
|
|
4541
4531
|
elementType: "geometry",
|
|
4542
4532
|
stylers: [{ color: "#f5efe4" }]
|
|
@@ -4618,7 +4608,7 @@ function _o(e, t) {
|
|
|
4618
4608
|
stylers: [{ color: a() }]
|
|
4619
4609
|
}
|
|
4620
4610
|
]);
|
|
4621
|
-
class
|
|
4611
|
+
class ae {
|
|
4622
4612
|
position;
|
|
4623
4613
|
href;
|
|
4624
4614
|
img;
|
|
@@ -4653,7 +4643,7 @@ function _o(e, t) {
|
|
|
4653
4643
|
this.overlayView.setMap(e);
|
|
4654
4644
|
}
|
|
4655
4645
|
}
|
|
4656
|
-
let
|
|
4646
|
+
let oe = {
|
|
4657
4647
|
available: {
|
|
4658
4648
|
fill: "rgba(16,185,129,0.3)",
|
|
4659
4649
|
stroke: "#10b981"
|
|
@@ -4671,7 +4661,7 @@ function _o(e, t) {
|
|
|
4671
4661
|
stroke: "rgba(136,136,136,0.4)"
|
|
4672
4662
|
}
|
|
4673
4663
|
};
|
|
4674
|
-
function
|
|
4664
|
+
function A(e) {
|
|
4675
4665
|
let t = {};
|
|
4676
4666
|
for (let e of u()) e.berthId && (t[e.berthId] = {
|
|
4677
4667
|
price: e.pricePerNight,
|
|
@@ -4684,7 +4674,7 @@ function _o(e, t) {
|
|
|
4684
4674
|
r?.price != null && e.setAttribute("data-price", String(r.price));
|
|
4685
4675
|
let i = r?.status ?? "occupied";
|
|
4686
4676
|
e.setAttribute("data-status", i), g() && r && e.setAttribute("data-pick", "1");
|
|
4687
|
-
let a =
|
|
4677
|
+
let a = oe[i] ?? oe.occupied, o = e.querySelector("rect:not([data-role]), circle");
|
|
4688
4678
|
o && (o.setAttribute("fill", a.fill), o.setAttribute("stroke", a.stroke));
|
|
4689
4679
|
let s = e.querySelector("[data-role=\"entrance\"]");
|
|
4690
4680
|
s && s.setAttribute("fill", a.stroke);
|
|
@@ -4737,7 +4727,7 @@ function _o(e, t) {
|
|
|
4737
4727
|
lat: e.neLat,
|
|
4738
4728
|
lng: e.neLng
|
|
4739
4729
|
}
|
|
4740
|
-
}, this.svgData =
|
|
4730
|
+
}, this.svgData = A(e.svgData), this.rotation = e.rotation ?? 0, this.overlayView.onAdd = () => {
|
|
4741
4731
|
this.div = document.createElement("div"), this.div.style.cssText = "position:absolute;pointer-events:none;transform-origin:center center;", this.div.innerHTML = this.svgData;
|
|
4742
4732
|
let e = this.div.querySelector("svg");
|
|
4743
4733
|
e && (e.style.width = "100%", e.style.height = "100%"), this.div.addEventListener("click", (e) => {
|
|
@@ -4766,12 +4756,12 @@ function _o(e, t) {
|
|
|
4766
4756
|
let t = new Map(u().map((e) => [e.berthId, e]));
|
|
4767
4757
|
e.querySelectorAll("[data-berth-id]").forEach((e) => {
|
|
4768
4758
|
let n = e.getAttribute("data-berth-id") ?? "", r = t.get(n);
|
|
4769
|
-
!g() && r && !
|
|
4759
|
+
!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
4760
|
});
|
|
4771
4761
|
}
|
|
4772
4762
|
function le(e, t) {
|
|
4773
4763
|
let n = e.berth.status !== "available";
|
|
4774
|
-
e.pickable =
|
|
4764
|
+
e.pickable = no(e.berth, p(), g());
|
|
4775
4765
|
let r = t === m() ? q(w) : n ? g() ? q(te) : E : e.pickable ? q(ee) : T;
|
|
4776
4766
|
e.circle.setOptions({
|
|
4777
4767
|
...r,
|
|
@@ -4787,7 +4777,7 @@ function _o(e, t) {
|
|
|
4787
4777
|
zoom: 15,
|
|
4788
4778
|
disableDefaultUI: !0,
|
|
4789
4779
|
zoomControl: !0,
|
|
4790
|
-
styles: r() === "coastal" ? q(
|
|
4780
|
+
styles: r() === "coastal" ? q(ie) : re,
|
|
4791
4781
|
backgroundColor: r() === "coastal" ? "#f5efe4" : "#ffffff"
|
|
4792
4782
|
});
|
|
4793
4783
|
t.event.addListenerOnce(n, "idle", () => {
|
|
@@ -4808,7 +4798,7 @@ function _o(e, t) {
|
|
|
4808
4798
|
let e = new window.google.maps.LatLngBounds();
|
|
4809
4799
|
for (let t of u()) {
|
|
4810
4800
|
if (t.lat == null || t.lng == null || !t.berthId) continue;
|
|
4811
|
-
let n = window.google.maps, r =
|
|
4801
|
+
let n = window.google.maps, r = fo(t, d()), i = r == null ? new n.Circle({
|
|
4812
4802
|
map: q(v),
|
|
4813
4803
|
center: {
|
|
4814
4804
|
lat: t.lat,
|
|
@@ -4818,13 +4808,13 @@ function _o(e, t) {
|
|
|
4818
4808
|
...q(ee)
|
|
4819
4809
|
}) : new n.Polygon({
|
|
4820
4810
|
map: q(v),
|
|
4821
|
-
paths:
|
|
4811
|
+
paths: po(t, r, lo),
|
|
4822
4812
|
...q(ee)
|
|
4823
4813
|
}), o = {
|
|
4824
4814
|
circle: i,
|
|
4825
4815
|
hull: r == null ? null : new n.Polygon({
|
|
4826
4816
|
map: q(v),
|
|
4827
|
-
paths:
|
|
4817
|
+
paths: po(t, r, uo, .8),
|
|
4828
4818
|
clickable: !1,
|
|
4829
4819
|
zIndex: 1,
|
|
4830
4820
|
fillColor: a(),
|
|
@@ -4855,8 +4845,8 @@ function _o(e, t) {
|
|
|
4855
4845
|
if (!q(v)) return;
|
|
4856
4846
|
for (let e of b) e.setMap(null);
|
|
4857
4847
|
let e = [];
|
|
4858
|
-
s() && e.push(new
|
|
4859
|
-
for (let t of l()) t.logoMark && e.push(new
|
|
4848
|
+
s() && e.push(new ae(i(), s(), c(), null));
|
|
4849
|
+
for (let t of l()) t.logoMark && e.push(new ae({
|
|
4860
4850
|
lat: t.lat,
|
|
4861
4851
|
lng: t.lng
|
|
4862
4852
|
}, t.logoMark, t.name, t.href));
|
|
@@ -4980,10 +4970,10 @@ function _o(e, t) {
|
|
|
4980
4970
|
set staff(e = !1) {
|
|
4981
4971
|
g(e), z();
|
|
4982
4972
|
}
|
|
4983
|
-
}, he =
|
|
4973
|
+
}, he = mo();
|
|
4984
4974
|
return Oi(he, (e) => _ = e, () => _), X(e, he), Ze(me);
|
|
4985
4975
|
}
|
|
4986
|
-
Pi(
|
|
4976
|
+
Pi(go, {
|
|
4987
4977
|
mapsApiKey: {},
|
|
4988
4978
|
mapStyle: {},
|
|
4989
4979
|
center: {},
|
|
@@ -5002,12 +4992,12 @@ Pi(_o, {
|
|
|
5002
4992
|
}, [], [], { mode: "open" });
|
|
5003
4993
|
//#endregion
|
|
5004
4994
|
//#region src/components/Stepper.svelte
|
|
5005
|
-
var
|
|
4995
|
+
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
4996
|
hash: "svelte-9crcip",
|
|
5007
4997
|
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
4998
|
};
|
|
5009
|
-
function
|
|
5010
|
-
Xe(t, !0), ri(e,
|
|
4999
|
+
function bo(e, t) {
|
|
5000
|
+
Xe(t, !0), ri(e, yo);
|
|
5011
5001
|
let n = $(t, "active", 7), r = $(t, "first", 7, 1), i = $(t, "labels", 7), a = $(t, "onStepClick", 7);
|
|
5012
5002
|
function o(e) {
|
|
5013
5003
|
return n() !== 4 && e < n();
|
|
@@ -5037,10 +5027,10 @@ function xo(e, t) {
|
|
|
5037
5027
|
set onStepClick(e) {
|
|
5038
5028
|
a(e), z();
|
|
5039
5029
|
}
|
|
5040
|
-
}, c =
|
|
5030
|
+
}, c = vo();
|
|
5041
5031
|
return Xr(c, 21, () => i().slice(r() - 1), Kr, (e, t, i) => {
|
|
5042
5032
|
let s = /* @__PURE__ */ I(() => i + r()), c = /* @__PURE__ */ I(() => q(s) < n()), l = /* @__PURE__ */ I(() => q(s) === n());
|
|
5043
|
-
var u =
|
|
5033
|
+
var u = _o();
|
|
5044
5034
|
let d;
|
|
5045
5035
|
var f = H(u);
|
|
5046
5036
|
f.textContent = i + 1;
|
|
@@ -5061,7 +5051,7 @@ function xo(e, t) {
|
|
|
5061
5051
|
}), X(e, u);
|
|
5062
5052
|
}), P(c), X(e, c), Ze(s);
|
|
5063
5053
|
}
|
|
5064
|
-
wr(["click", "keydown"]), Pi(
|
|
5054
|
+
wr(["click", "keydown"]), Pi(bo, {
|
|
5065
5055
|
active: {},
|
|
5066
5056
|
first: {},
|
|
5067
5057
|
labels: {},
|
|
@@ -5069,11 +5059,11 @@ wr(["click", "keydown"]), Pi(xo, {
|
|
|
5069
5059
|
}, [], [], { mode: "open" });
|
|
5070
5060
|
//#endregion
|
|
5071
5061
|
//#region src/lib/sidon-sign-in.ts
|
|
5072
|
-
var
|
|
5073
|
-
function
|
|
5062
|
+
var xo = "https://sidonmarine.uk", So = (e) => `sbw-sailor:${e}`, Co = 60;
|
|
5063
|
+
function wo(e, t = Date.now()) {
|
|
5074
5064
|
try {
|
|
5075
5065
|
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 -
|
|
5066
|
+
return typeof i.email != "string" || !i.email || typeof i.exp != "number" || i.exp - Co <= t / 1e3 ? null : {
|
|
5077
5067
|
token: e,
|
|
5078
5068
|
email: i.email,
|
|
5079
5069
|
name: typeof i.name == "string" ? i.name.trim() : ""
|
|
@@ -5082,29 +5072,29 @@ function To(e, t = Date.now()) {
|
|
|
5082
5072
|
return null;
|
|
5083
5073
|
}
|
|
5084
5074
|
}
|
|
5085
|
-
function
|
|
5075
|
+
function To(e) {
|
|
5086
5076
|
let t = null;
|
|
5087
5077
|
try {
|
|
5088
|
-
t = sessionStorage.getItem(
|
|
5078
|
+
t = sessionStorage.getItem(So(e));
|
|
5089
5079
|
} catch {}
|
|
5090
|
-
let n = t ?
|
|
5091
|
-
return t && !n &&
|
|
5080
|
+
let n = t ? wo(t) : null;
|
|
5081
|
+
return t && !n && Eo(e), n;
|
|
5092
5082
|
}
|
|
5093
|
-
function
|
|
5083
|
+
function Eo(e) {
|
|
5094
5084
|
try {
|
|
5095
|
-
sessionStorage.removeItem(
|
|
5085
|
+
sessionStorage.removeItem(So(e));
|
|
5096
5086
|
} catch {}
|
|
5097
5087
|
}
|
|
5098
|
-
function
|
|
5088
|
+
function Do(e) {
|
|
5099
5089
|
let t = `${e}/connect?origin=${encodeURIComponent(location.origin)}`, n = window.open(t, "sidon-sign-in", "popup,width=480,height=720");
|
|
5100
5090
|
return n ? new Promise((t) => {
|
|
5101
5091
|
let r = (e) => {
|
|
5102
5092
|
window.removeEventListener("message", i), clearInterval(a), t(e);
|
|
5103
5093
|
}, i = (t) => {
|
|
5104
5094
|
if (t.origin !== e || t.source !== n || t.data?.type !== "sidon:sailor-token") return;
|
|
5105
|
-
let i = typeof t.data.token == "string" ?
|
|
5095
|
+
let i = typeof t.data.token == "string" ? wo(t.data.token) : null;
|
|
5106
5096
|
if (i) try {
|
|
5107
|
-
sessionStorage.setItem(
|
|
5097
|
+
sessionStorage.setItem(So(e), i.token);
|
|
5108
5098
|
} catch {}
|
|
5109
5099
|
r(i);
|
|
5110
5100
|
};
|
|
@@ -5114,105 +5104,91 @@ function Oo(e) {
|
|
|
5114
5104
|
}
|
|
5115
5105
|
//#endregion
|
|
5116
5106
|
//#region src/lib/marina-api.ts
|
|
5117
|
-
var
|
|
5107
|
+
var Oo = class extends Error {
|
|
5118
5108
|
status;
|
|
5119
5109
|
constructor(e, t) {
|
|
5120
5110
|
super(e), this.status = t;
|
|
5121
5111
|
}
|
|
5122
5112
|
};
|
|
5123
|
-
async function
|
|
5113
|
+
async function ko(e, t, n, r = !1) {
|
|
5124
5114
|
let i;
|
|
5125
5115
|
try {
|
|
5126
5116
|
i = await fetch(e, n);
|
|
5127
5117
|
} catch {
|
|
5128
|
-
throw new
|
|
5118
|
+
throw new Oo(t, 0);
|
|
5129
5119
|
}
|
|
5130
|
-
if (!i.ok) throw new
|
|
5120
|
+
if (!i.ok) throw new Oo(await co(i, t), i.status);
|
|
5131
5121
|
if (r) return null;
|
|
5132
5122
|
try {
|
|
5133
5123
|
return await i.json();
|
|
5134
5124
|
} catch {
|
|
5135
|
-
throw new
|
|
5125
|
+
throw new Oo(t, i.status);
|
|
5136
5126
|
}
|
|
5137
5127
|
}
|
|
5138
|
-
var
|
|
5128
|
+
var Ao = (e, t = {}) => ({
|
|
5139
5129
|
method: "POST",
|
|
5140
5130
|
headers: {
|
|
5141
5131
|
"Content-Type": "application/json",
|
|
5142
5132
|
...t
|
|
5143
5133
|
},
|
|
5144
5134
|
body: JSON.stringify(e)
|
|
5145
|
-
}),
|
|
5146
|
-
async function
|
|
5135
|
+
}), jo = (e, t, n, r = "") => `${za(e, t)}/bookings/${encodeURIComponent(n.id)}${r}`, Mo = (e) => ({ "X-Booking-Token": e.token });
|
|
5136
|
+
async function No(e, t, n) {
|
|
5147
5137
|
let r = n && n.to > n.from ? `?${new URLSearchParams(n)}` : "";
|
|
5148
|
-
return Ua(await
|
|
5149
|
-
}
|
|
5150
|
-
async function Fo(e, t) {
|
|
5151
|
-
return Wa(await Ao(`${za(e, t)}/doc-requirements`, "Failed to load document requirements"));
|
|
5138
|
+
return Ua(await ko(`${za(e, t)}${r}`, "Failed to load marina data"));
|
|
5152
5139
|
}
|
|
5153
|
-
async function
|
|
5140
|
+
async function Po(e, t, n, r) {
|
|
5154
5141
|
let i = new URLSearchParams({
|
|
5155
5142
|
arrival: n.arrival,
|
|
5156
5143
|
departure: n.departure
|
|
5157
5144
|
});
|
|
5158
|
-
return
|
|
5145
|
+
return Wa(await ko(`${za(e, t)}/requirements-status?${i}`, "Failed to load document requirements", r ? { headers: { "X-Sailor-Token": r } } : void 0));
|
|
5159
5146
|
}
|
|
5160
|
-
async function
|
|
5147
|
+
async function Fo(e, t, n) {
|
|
5161
5148
|
let r = new URLSearchParams({
|
|
5162
5149
|
arrival: n.arrival,
|
|
5163
5150
|
departure: n.departure,
|
|
5164
5151
|
boat_length_m: String(n.boatLengthM)
|
|
5165
5152
|
});
|
|
5166
|
-
return n.boatBeamM && r.set("boat_beam_m", String(n.boatBeamM)),
|
|
5153
|
+
return n.boatBeamM && r.set("boat_beam_m", String(n.boatBeamM)), qa(await ko(`${za(e, t)}/availability?${r}`, "Failed to load availability"));
|
|
5167
5154
|
}
|
|
5168
|
-
async function
|
|
5155
|
+
async function Io(e, t, n, r) {
|
|
5169
5156
|
let i = r ? { "X-Sailor-Token": r } : {};
|
|
5170
|
-
return
|
|
5157
|
+
return $a(await ko(`${za(e, t)}/bookings`, "Booking failed", Ao(eo(n), i)));
|
|
5171
5158
|
}
|
|
5172
|
-
async function
|
|
5173
|
-
return
|
|
5174
|
-
}
|
|
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);
|
|
5159
|
+
async function Lo(e, t, n) {
|
|
5160
|
+
return Qa(await ko(jo(e, t, n), "Failed to load your booking", { headers: Mo(n) }));
|
|
5177
5161
|
}
|
|
5178
|
-
async function
|
|
5179
|
-
return
|
|
5162
|
+
async function Ro(e, t, n) {
|
|
5163
|
+
return Ja((await ko(jo(e, t, n, "/confirm-payment"), "Payment could not be confirmed", Ao({}, Mo(n)))).booking);
|
|
5180
5164
|
}
|
|
5181
|
-
async function
|
|
5182
|
-
return
|
|
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
|
-
}));
|
|
5165
|
+
async function zo(e, t, n) {
|
|
5166
|
+
return Ja((await ko(jo(e, t, n, "/cancel"), "Could not cancel the booking", Ao({}, Mo(n)))).booking);
|
|
5191
5167
|
}
|
|
5192
|
-
async function
|
|
5193
|
-
await
|
|
5168
|
+
async function Bo(e, t, n) {
|
|
5169
|
+
await ko(`${e}/api/sailor/documents?type=${encodeURIComponent(n.type)}`, "Upload failed", {
|
|
5194
5170
|
method: "POST",
|
|
5195
5171
|
headers: {
|
|
5196
5172
|
"X-Sailor-Token": t,
|
|
5197
5173
|
"Content-Type": n.contentType,
|
|
5198
|
-
"X-File-Name":
|
|
5174
|
+
"X-File-Name": so(n.fileName)
|
|
5199
5175
|
},
|
|
5200
5176
|
body: n.blob
|
|
5201
5177
|
}, !0);
|
|
5202
5178
|
}
|
|
5203
|
-
async function
|
|
5204
|
-
return
|
|
5179
|
+
async function Vo(e, t, n) {
|
|
5180
|
+
return Xa(await ko(jo(e, t, n, "/contract"), "Could not record your agreement", Ao({}, Mo(n))));
|
|
5205
5181
|
}
|
|
5206
|
-
async function
|
|
5182
|
+
async function Ho(e, t, n) {
|
|
5207
5183
|
try {
|
|
5208
|
-
return await
|
|
5184
|
+
return await ko(jo(e, t, n, "/ably-token"), "Live updates are unavailable", { headers: Mo(n) });
|
|
5209
5185
|
} catch (e) {
|
|
5210
|
-
if (e instanceof
|
|
5186
|
+
if (e instanceof Oo && e.status === 503) return null;
|
|
5211
5187
|
throw e;
|
|
5212
5188
|
}
|
|
5213
5189
|
}
|
|
5214
|
-
var
|
|
5215
|
-
async function
|
|
5190
|
+
var Uo = 2e3, Wo = "Please upload a PDF, JPEG or PNG";
|
|
5191
|
+
async function Go(e) {
|
|
5216
5192
|
if (e.type === "application/pdf" || !e.type && /\.pdf$/i.test(e.name)) {
|
|
5217
5193
|
if (e.size > 4194304) throw Error("PDF files must be 4 MB or smaller");
|
|
5218
5194
|
return {
|
|
@@ -5230,12 +5206,12 @@ async function Jo(e) {
|
|
|
5230
5206
|
try {
|
|
5231
5207
|
t = await createImageBitmap(e);
|
|
5232
5208
|
} catch {
|
|
5233
|
-
throw Error(
|
|
5209
|
+
throw Error(Wo);
|
|
5234
5210
|
}
|
|
5235
|
-
let n = Math.min(1,
|
|
5211
|
+
let n = Math.min(1, Uo / Math.max(t.width, t.height)), r = document.createElement("canvas");
|
|
5236
5212
|
r.width = Math.round(t.width * n), r.height = Math.round(t.height * n);
|
|
5237
5213
|
let i = r.getContext("2d");
|
|
5238
|
-
if (!i) throw Error(
|
|
5214
|
+
if (!i) throw Error(Wo);
|
|
5239
5215
|
i.drawImage(t, 0, 0, r.width, r.height), t.close();
|
|
5240
5216
|
let a = `${e.name.replace(/\.[^.]*$/, "")}.jpg`;
|
|
5241
5217
|
for (let e of [.85, .7]) {
|
|
@@ -5250,18 +5226,18 @@ async function Jo(e) {
|
|
|
5250
5226
|
}
|
|
5251
5227
|
//#endregion
|
|
5252
5228
|
//#region src/components/DocumentsStep.svelte
|
|
5253
|
-
var
|
|
5229
|
+
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 class=\"sbw-doc-sub svelte-1d47278\"> </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
5230
|
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),\
|
|
5231
|
+
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),\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;}\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 {\n animation: svelte-1d47278-sbw-spin 0.8s linear infinite;}\n @keyframes svelte-1d47278-sbw-spin {\n to {\n transform: rotate(360deg);\n }\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;}\n /* 'dark' variant (Fox/Pevero): flush corners and a solid-ink CTA/done\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
5232
|
};
|
|
5257
|
-
function
|
|
5258
|
-
Xe(t, !0), ri(e,
|
|
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)?.
|
|
5233
|
+
function ds(e, t) {
|
|
5234
|
+
Xe(t, !0), ri(e, us);
|
|
5235
|
+
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)?.requirements.length ?? 0) > 0), S = /* @__PURE__ */ I(() => q(m)?.requirements.some((e) => e.mandatory && !e.met) ?? !1);
|
|
5260
5236
|
Tn(() => {
|
|
5261
|
-
u(!!q(m) && !q(h) && !q(g) &&
|
|
5237
|
+
u(!!q(m) && !q(h) && !q(g) && Ga(q(m)));
|
|
5262
5238
|
});
|
|
5263
5239
|
function ee() {
|
|
5264
|
-
let e =
|
|
5240
|
+
let e = To(a());
|
|
5265
5241
|
return !e && d() && d(null), e?.token ?? null;
|
|
5266
5242
|
}
|
|
5267
5243
|
async function C() {
|
|
@@ -5271,7 +5247,7 @@ function ms(e, t) {
|
|
|
5271
5247
|
};
|
|
5272
5248
|
V(h, !0);
|
|
5273
5249
|
try {
|
|
5274
|
-
let i = await
|
|
5250
|
+
let i = await Po(n(), r(), t, ee());
|
|
5275
5251
|
if (b || e !== y) return;
|
|
5276
5252
|
V(m, i), V(g, !1);
|
|
5277
5253
|
} catch {
|
|
@@ -5281,7 +5257,7 @@ function ms(e, t) {
|
|
|
5281
5257
|
V(h, !1);
|
|
5282
5258
|
}
|
|
5283
5259
|
{
|
|
5284
|
-
let e =
|
|
5260
|
+
let e = To(a());
|
|
5285
5261
|
d(e && {
|
|
5286
5262
|
email: e.email,
|
|
5287
5263
|
name: e.name
|
|
@@ -5295,7 +5271,7 @@ function ms(e, t) {
|
|
|
5295
5271
|
async function w() {
|
|
5296
5272
|
V(p, !1), V(f, !0);
|
|
5297
5273
|
try {
|
|
5298
|
-
let e = await
|
|
5274
|
+
let e = await Do(a());
|
|
5299
5275
|
if (b || !e) return;
|
|
5300
5276
|
d({
|
|
5301
5277
|
email: e.email,
|
|
@@ -5308,7 +5284,7 @@ function ms(e, t) {
|
|
|
5308
5284
|
}
|
|
5309
5285
|
}
|
|
5310
5286
|
async function T() {
|
|
5311
|
-
|
|
5287
|
+
Eo(a()), d(null), await C();
|
|
5312
5288
|
}
|
|
5313
5289
|
function E(e, t) {
|
|
5314
5290
|
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;
|
|
@@ -5321,16 +5297,16 @@ function ms(e, t) {
|
|
|
5321
5297
|
[e.id]: r.name
|
|
5322
5298
|
}, !0);
|
|
5323
5299
|
try {
|
|
5324
|
-
let t = await
|
|
5300
|
+
let t = await Go(r).catch((e) => (V(v, E(r, e), !0), null));
|
|
5325
5301
|
if (!t) return;
|
|
5326
5302
|
let n = ee();
|
|
5327
5303
|
if (!n) throw Error("Signed out");
|
|
5328
|
-
await
|
|
5304
|
+
await Bo(i(), n, {
|
|
5329
5305
|
...t,
|
|
5330
5306
|
type: e.type
|
|
5331
5307
|
}), await C();
|
|
5332
5308
|
} catch (e) {
|
|
5333
|
-
V(v, !(e instanceof
|
|
5309
|
+
V(v, !(e instanceof Oo) || e.status < 400 ? c().uploadFailed : e.status === 401 ? c().docsStep.sessionRejected : e.status === 413 ? c().uploadTooLarge : e.status === 429 ? c().uploadLimit : e.message, !0);
|
|
5334
5310
|
} finally {
|
|
5335
5311
|
let { [e.id]: t, ...n } = q(_);
|
|
5336
5312
|
V(_, n, !0);
|
|
@@ -5398,42 +5374,42 @@ function ms(e, t) {
|
|
|
5398
5374
|
set sailor(e = null) {
|
|
5399
5375
|
d(e), z();
|
|
5400
5376
|
}
|
|
5401
|
-
}, O =
|
|
5377
|
+
}, O = ls();
|
|
5402
5378
|
let ne;
|
|
5403
|
-
var k = H(O),
|
|
5379
|
+
var k = H(O), re = H(k, !0);
|
|
5404
5380
|
P(k);
|
|
5405
|
-
var
|
|
5406
|
-
var t =
|
|
5381
|
+
var ie = U(k, 2), ae = (e) => {
|
|
5382
|
+
var t = Ko(), n = H(t), r = H(n), i = U(r), a = H(i, !0);
|
|
5407
5383
|
P(i), P(n);
|
|
5408
5384
|
var o = U(n, 2), s = H(o, !0);
|
|
5409
5385
|
P(o), P(t), W(() => {
|
|
5410
5386
|
Z(r, `${c().docsStep.signedInAs ?? ""} `), Z(a, d().email), Z(s, c().docsStep.notYou);
|
|
5411
5387
|
}), Cr("click", o, T), X(e, t);
|
|
5412
5388
|
};
|
|
5413
|
-
Q(
|
|
5414
|
-
d() && e(
|
|
5389
|
+
Q(ie, (e) => {
|
|
5390
|
+
d() && e(ae);
|
|
5415
5391
|
});
|
|
5416
|
-
var
|
|
5392
|
+
var oe = U(ie, 2), A = (e) => {
|
|
5417
5393
|
var t = Nr(), n = hn(t), r = (e) => {
|
|
5418
|
-
var t =
|
|
5394
|
+
var t = qo(), n = H(t, !0);
|
|
5419
5395
|
P(t), W(() => Z(n, c().docsStep.loading)), X(e, t);
|
|
5420
5396
|
};
|
|
5421
5397
|
Q(n, (e) => {
|
|
5422
5398
|
q(g) || e(r);
|
|
5423
5399
|
}), X(e, t);
|
|
5424
5400
|
}, se = (e) => {
|
|
5425
|
-
var t =
|
|
5401
|
+
var t = Jo(), n = hn(t), r = H(n, !0);
|
|
5426
5402
|
P(n);
|
|
5427
5403
|
var i = U(n, 2), a = (e) => {
|
|
5428
|
-
var t =
|
|
5404
|
+
var t = qo(), n = H(t, !0);
|
|
5429
5405
|
P(t), W(() => Z(n, c().docsStep.optionalSignIn)), X(e, t);
|
|
5430
5406
|
};
|
|
5431
5407
|
Q(i, (e) => {
|
|
5432
5408
|
d() || e(a);
|
|
5433
5409
|
}), W(() => Z(r, c().docsStep.noDocsNeeded)), X(e, t);
|
|
5434
5410
|
}, ce = (e) => {
|
|
5435
|
-
var t =
|
|
5436
|
-
var t =
|
|
5411
|
+
var t = os(), n = hn(t), r = (e) => {
|
|
5412
|
+
var t = qo(), n = H(t, !0);
|
|
5437
5413
|
P(t), W(() => Z(n, c().docsStep.intro)), X(e, t);
|
|
5438
5414
|
};
|
|
5439
5415
|
Q(n, (e) => {
|
|
@@ -5450,13 +5426,13 @@ function ms(e, t) {
|
|
|
5450
5426
|
"sbw-doc-busy": !!q(n),
|
|
5451
5427
|
"sbw-doc-done": !!d() && q(t).met && !q(n)
|
|
5452
5428
|
}));
|
|
5453
|
-
var o =
|
|
5454
|
-
var r =
|
|
5455
|
-
X(e,
|
|
5429
|
+
var o = rs(), s = hn(o), l = H(s), u = (e) => {
|
|
5430
|
+
var r = Qo(), i = H(r), a = (e) => {
|
|
5431
|
+
X(e, Yo());
|
|
5456
5432
|
}, o = (e) => {
|
|
5457
|
-
X(e,
|
|
5433
|
+
X(e, Xo());
|
|
5458
5434
|
}, s = (e) => {
|
|
5459
|
-
X(e,
|
|
5435
|
+
X(e, Zo());
|
|
5460
5436
|
};
|
|
5461
5437
|
Q(i, (e) => {
|
|
5462
5438
|
q(n) ? e(a) : q(t).met ? e(o, 1) : e(s, -1);
|
|
@@ -5466,27 +5442,27 @@ function ms(e, t) {
|
|
|
5466
5442
|
d() && e(u);
|
|
5467
5443
|
});
|
|
5468
5444
|
var f = U(l, 2), p = H(f), m = H(p, !0), h = U(m), g = (e) => {
|
|
5469
|
-
X(e,
|
|
5445
|
+
X(e, $o());
|
|
5470
5446
|
};
|
|
5471
5447
|
Q(h, (e) => {
|
|
5472
5448
|
q(t).mandatory && e(g);
|
|
5473
5449
|
}), P(p);
|
|
5474
5450
|
var _ = U(p, 2), v = (e) => {
|
|
5475
|
-
var i =
|
|
5451
|
+
var i = es(), a = H(i, !0);
|
|
5476
5452
|
P(i), W(() => Z(a, q(n) ? `${c().uploading} ${q(n)}` : q(t).met ? c().docsStep.inAccount : q(r) ? c().tapToUpload : "")), X(e, i);
|
|
5477
5453
|
};
|
|
5478
5454
|
Q(_, (e) => {
|
|
5479
5455
|
d() && e(v);
|
|
5480
5456
|
}), P(f), P(s);
|
|
5481
5457
|
var y = U(s, 2), b = (e) => {
|
|
5482
|
-
var t =
|
|
5458
|
+
var t = ts(), r = H(t, !0);
|
|
5483
5459
|
P(t), W(() => Z(r, q(n) ? c().uploading : c().upload)), X(e, t);
|
|
5484
5460
|
};
|
|
5485
5461
|
Q(y, (e) => {
|
|
5486
5462
|
(q(r) || q(n)) && e(b);
|
|
5487
5463
|
});
|
|
5488
5464
|
var x = U(y, 2), S = (e) => {
|
|
5489
|
-
var n =
|
|
5465
|
+
var n = ns();
|
|
5490
5466
|
Cr("change", n, (e) => te(q(t), e)), X(e, n);
|
|
5491
5467
|
};
|
|
5492
5468
|
Q(x, (e) => {
|
|
@@ -5495,25 +5471,25 @@ function ms(e, t) {
|
|
|
5495
5471
|
}), X(e, i);
|
|
5496
5472
|
});
|
|
5497
5473
|
var a = U(i, 2), o = (e) => {
|
|
5498
|
-
var t =
|
|
5474
|
+
var t = is(), n = H(t, !0);
|
|
5499
5475
|
P(t), W(() => Z(n, q(v))), X(e, t);
|
|
5500
5476
|
};
|
|
5501
5477
|
Q(a, (e) => {
|
|
5502
5478
|
q(v) && e(o);
|
|
5503
5479
|
});
|
|
5504
5480
|
var s = U(a, 2), l = (e) => {
|
|
5505
|
-
var t =
|
|
5481
|
+
var t = as(), n = H(t, !0);
|
|
5506
5482
|
P(t), W(() => Z(n, c().docsStep.uploadsUnavailable)), X(e, t);
|
|
5507
5483
|
};
|
|
5508
5484
|
Q(s, (e) => {
|
|
5509
5485
|
d() && !q(m).uploadsAvailable && q(S) && e(l);
|
|
5510
5486
|
}), X(e, t);
|
|
5511
5487
|
};
|
|
5512
|
-
Q(
|
|
5513
|
-
q(m) ? q(x) ? e(ce, -1) : e(se, 1) : e(
|
|
5488
|
+
Q(oe, (e) => {
|
|
5489
|
+
q(m) ? q(x) ? e(ce, -1) : e(se, 1) : e(A);
|
|
5514
5490
|
});
|
|
5515
|
-
var le = U(
|
|
5516
|
-
var t =
|
|
5491
|
+
var le = U(oe, 2), ue = (e) => {
|
|
5492
|
+
var t = ss(), n = hn(t), r = H(n, !0);
|
|
5517
5493
|
P(n);
|
|
5518
5494
|
var i = U(n, 2), a = H(i, !0);
|
|
5519
5495
|
P(i), W(() => {
|
|
@@ -5524,10 +5500,10 @@ function ms(e, t) {
|
|
|
5524
5500
|
q(g) && e(ue);
|
|
5525
5501
|
});
|
|
5526
5502
|
var de = U(le, 2), fe = (e) => {
|
|
5527
|
-
var t =
|
|
5503
|
+
var t = cs(), n = hn(t), r = H(n), i = H(r, !0);
|
|
5528
5504
|
P(r), P(n);
|
|
5529
5505
|
var a = U(n, 2), o = (e) => {
|
|
5530
|
-
var t =
|
|
5506
|
+
var t = as(), n = H(t, !0);
|
|
5531
5507
|
P(t), W(() => Z(n, c().docsStep.signInUnavailable)), X(e, t);
|
|
5532
5508
|
};
|
|
5533
5509
|
Q(a, (e) => {
|
|
@@ -5539,10 +5515,10 @@ function ms(e, t) {
|
|
|
5539
5515
|
return Q(de, (e) => {
|
|
5540
5516
|
q(m) && !d() && e(fe);
|
|
5541
5517
|
}), P(O), W(() => {
|
|
5542
|
-
ne = ui(O, 1, "sbw-docs svelte-1d47278", null, ne, { "sbw-variant-dark": l() === "dark" }), Z(
|
|
5518
|
+
ne = ui(O, 1, "sbw-docs svelte-1d47278", null, ne, { "sbw-variant-dark": l() === "dark" }), Z(re, c().documentsHeading);
|
|
5543
5519
|
}), X(e, O), Ze(D);
|
|
5544
5520
|
}
|
|
5545
|
-
wr(["click", "change"]), Pi(
|
|
5521
|
+
wr(["click", "change"]), Pi(ds, {
|
|
5546
5522
|
apiOrigin: {},
|
|
5547
5523
|
slug: {},
|
|
5548
5524
|
sailorApiOrigin: {},
|
|
@@ -5556,12 +5532,12 @@ wr(["click", "change"]), Pi(ms, {
|
|
|
5556
5532
|
}, [], [], { mode: "open" });
|
|
5557
5533
|
//#endregion
|
|
5558
5534
|
//#region src/components/DetailsStep.svelte
|
|
5559
|
-
var
|
|
5535
|
+
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
5536
|
hash: "svelte-xjlajk",
|
|
5561
5537
|
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
5538
|
};
|
|
5563
|
-
function
|
|
5564
|
-
Xe(t, !0), ri(e,
|
|
5539
|
+
function ms(e, t) {
|
|
5540
|
+
Xe(t, !0), ri(e, ps);
|
|
5565
5541
|
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
5542
|
var u = {
|
|
5567
5543
|
get contactName() {
|
|
@@ -5612,7 +5588,7 @@ function _s(e, t) {
|
|
|
5612
5588
|
set labels(e) {
|
|
5613
5589
|
l(e), z();
|
|
5614
5590
|
}
|
|
5615
|
-
}, d =
|
|
5591
|
+
}, d = fs(), f = H(d), p = H(f, !0);
|
|
5616
5592
|
P(f);
|
|
5617
5593
|
var m = U(f, 2), h = H(m), g = H(h), _ = H(g);
|
|
5618
5594
|
He(), P(g);
|
|
@@ -5630,18 +5606,18 @@ function _s(e, t) {
|
|
|
5630
5606
|
P(D);
|
|
5631
5607
|
var ne = U(D, 2);
|
|
5632
5608
|
_i(ne), P(te), P(ee);
|
|
5633
|
-
var k = U(ee, 2),
|
|
5634
|
-
P(
|
|
5635
|
-
var
|
|
5636
|
-
_i(
|
|
5637
|
-
var
|
|
5609
|
+
var k = U(ee, 2), re = H(k), ie = H(re), ae = H(ie, !0);
|
|
5610
|
+
P(ie);
|
|
5611
|
+
var oe = U(ie, 2);
|
|
5612
|
+
_i(oe), P(re), P(k);
|
|
5613
|
+
var A = U(k, 2), se = H(A), ce = H(se, !0);
|
|
5638
5614
|
P(se);
|
|
5639
5615
|
var le = U(se, 2);
|
|
5640
|
-
return ft(le), P(
|
|
5641
|
-
Z(p, l().yourDetails), Z(_, `${l().skipperName ?? ""} `), Z(x, `${l().boatName ?? ""} `), Z(T, `${l().email ?? ""} `), E.readOnly = c(), Z(O, l().phone), Z(
|
|
5642
|
-
}), Ci(v, n), Ci(S, a), Ci(E, r), Ci(ne, i), Ci(
|
|
5616
|
+
return ft(le), P(A), P(d), W(() => {
|
|
5617
|
+
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);
|
|
5618
|
+
}), Ci(v, n), Ci(S, a), Ci(E, r), Ci(ne, i), Ci(oe, o), Ci(le, s), X(e, d), Ze(u);
|
|
5643
5619
|
}
|
|
5644
|
-
Pi(
|
|
5620
|
+
Pi(ms, {
|
|
5645
5621
|
contactName: {},
|
|
5646
5622
|
contactEmail: {},
|
|
5647
5623
|
contactPhone: {},
|
|
@@ -5653,7 +5629,7 @@ Pi(_s, {
|
|
|
5653
5629
|
}, [], [], { mode: "open" });
|
|
5654
5630
|
//#endregion
|
|
5655
5631
|
//#region src/lib/i18n.ts
|
|
5656
|
-
var
|
|
5632
|
+
var hs = {
|
|
5657
5633
|
it: {
|
|
5658
5634
|
steps: [
|
|
5659
5635
|
"Documenti",
|
|
@@ -6207,107 +6183,107 @@ var vs = {
|
|
|
6207
6183
|
}
|
|
6208
6184
|
}
|
|
6209
6185
|
};
|
|
6210
|
-
function
|
|
6211
|
-
return
|
|
6186
|
+
function gs(e) {
|
|
6187
|
+
return hs[e] ?? hs.en;
|
|
6212
6188
|
}
|
|
6213
6189
|
//#endregion
|
|
6214
6190
|
//#region node_modules/@stripe/stripe-js/dist/index.mjs
|
|
6215
|
-
function
|
|
6191
|
+
function _s(e) {
|
|
6216
6192
|
"@babel/helpers - typeof";
|
|
6217
|
-
return
|
|
6193
|
+
return _s = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
|
|
6218
6194
|
return typeof e;
|
|
6219
6195
|
} : function(e) {
|
|
6220
6196
|
return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
|
|
6221
|
-
},
|
|
6197
|
+
}, _s(e);
|
|
6222
6198
|
}
|
|
6223
|
-
var xs, Ss, Cs, ws, Ts, Es, Ds, Os, ks, As, js, Ms, Ns, Ps, Fs, Is, Ls, Rs, zs, Bs
|
|
6224
|
-
|
|
6199
|
+
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((() => {
|
|
6200
|
+
vs = "dahlia", ys = function(e) {
|
|
6225
6201
|
return e === 3 ? "v3" : e;
|
|
6226
|
-
},
|
|
6227
|
-
return
|
|
6228
|
-
},
|
|
6229
|
-
for (var e = document.querySelectorAll(`script[src^="${
|
|
6202
|
+
}, 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) {
|
|
6203
|
+
return Ss.test(e) || Cs.test(e);
|
|
6204
|
+
}, Es = function() {
|
|
6205
|
+
for (var e = document.querySelectorAll(`script[src^="${bs}"]`), t = 0; t < e.length; t++) {
|
|
6230
6206
|
var n = e[t];
|
|
6231
|
-
if (
|
|
6207
|
+
if (Ts(n.src)) return n;
|
|
6232
6208
|
}
|
|
6233
6209
|
return null;
|
|
6234
|
-
},
|
|
6210
|
+
}, Ds = function(e) {
|
|
6235
6211
|
var t = e && !e.advancedFraudSignals ? "?advancedFraudSignals=false" : "", n = document.createElement("script");
|
|
6236
|
-
n.src = `${
|
|
6212
|
+
n.src = `${xs}${t}`;
|
|
6237
6213
|
var r = document.head || document.body;
|
|
6238
6214
|
if (!r) throw Error("Expected document.body not to be null. Stripe.js requires a <body> element.");
|
|
6239
6215
|
return r.appendChild(n), n;
|
|
6240
|
-
},
|
|
6216
|
+
}, Os = function(e, t) {
|
|
6241
6217
|
!e || !e._registerWrapper || e._registerWrapper({
|
|
6242
6218
|
name: "stripe-js",
|
|
6243
6219
|
version: "9.13.0",
|
|
6244
6220
|
startTime: t
|
|
6245
6221
|
});
|
|
6246
|
-
},
|
|
6222
|
+
}, ks = null, As = null, js = null, Ms = function(e) {
|
|
6247
6223
|
return function(t) {
|
|
6248
6224
|
e(Error("Failed to load Stripe.js", { cause: t }));
|
|
6249
6225
|
};
|
|
6250
|
-
},
|
|
6226
|
+
}, Ns = function(e, t) {
|
|
6251
6227
|
return function() {
|
|
6252
6228
|
window.Stripe ? e(window.Stripe) : t(/* @__PURE__ */ Error("Stripe.js not available"));
|
|
6253
6229
|
};
|
|
6254
|
-
},
|
|
6255
|
-
return
|
|
6230
|
+
}, Ps = function(e) {
|
|
6231
|
+
return ks === null ? (ks = new Promise(function(t, n) {
|
|
6256
6232
|
if (typeof window > "u" || typeof document > "u") {
|
|
6257
6233
|
t(null);
|
|
6258
6234
|
return;
|
|
6259
6235
|
}
|
|
6260
|
-
if (window.Stripe && e && console.warn(
|
|
6236
|
+
if (window.Stripe && e && console.warn(ws), window.Stripe) {
|
|
6261
6237
|
t(window.Stripe);
|
|
6262
6238
|
return;
|
|
6263
6239
|
}
|
|
6264
6240
|
try {
|
|
6265
|
-
var r =
|
|
6266
|
-
if (r && e) console.warn(
|
|
6267
|
-
else if (!r) r =
|
|
6268
|
-
else if (r &&
|
|
6241
|
+
var r = Es();
|
|
6242
|
+
if (r && e) console.warn(ws);
|
|
6243
|
+
else if (!r) r = Ds(e);
|
|
6244
|
+
else if (r && js !== null && As !== null) {
|
|
6269
6245
|
var i;
|
|
6270
|
-
r.removeEventListener("load",
|
|
6246
|
+
r.removeEventListener("load", js), r.removeEventListener("error", As), (i = r.parentNode) == null || i.removeChild(r), r = Ds(e);
|
|
6271
6247
|
}
|
|
6272
|
-
|
|
6248
|
+
js = Ns(t, n), As = Ms(n), r.addEventListener("load", js), r.addEventListener("error", As);
|
|
6273
6249
|
} catch (e) {
|
|
6274
6250
|
n(e);
|
|
6275
6251
|
return;
|
|
6276
6252
|
}
|
|
6277
|
-
}),
|
|
6278
|
-
return
|
|
6279
|
-
})) :
|
|
6280
|
-
},
|
|
6253
|
+
}), ks.catch(function(e) {
|
|
6254
|
+
return ks = null, Promise.reject(e);
|
|
6255
|
+
})) : ks;
|
|
6256
|
+
}, Fs = function(e, t, n) {
|
|
6281
6257
|
if (e === null) return null;
|
|
6282
6258
|
var r = t[0];
|
|
6283
|
-
if (typeof r != "string") throw Error(`Expected publishable key to be of type string, got type ${
|
|
6284
|
-
var i = r.match(/^pk_test/), a =
|
|
6259
|
+
if (typeof r != "string") throw Error(`Expected publishable key to be of type string, got type ${_s(r)} instead.`);
|
|
6260
|
+
var i = r.match(/^pk_test/), a = ys(e.version), o = vs;
|
|
6285
6261
|
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
6262
|
var s = e.apply(void 0, t);
|
|
6287
|
-
return
|
|
6288
|
-
},
|
|
6289
|
-
return
|
|
6290
|
-
return
|
|
6291
|
-
}),
|
|
6263
|
+
return Os(s, n), s;
|
|
6264
|
+
}, Ls = !1, Rs = function() {
|
|
6265
|
+
return Is || (Is = Ps(null).catch(function(e) {
|
|
6266
|
+
return Is = null, Promise.reject(e);
|
|
6267
|
+
}), Is);
|
|
6292
6268
|
}, Promise.resolve().then(function() {
|
|
6293
|
-
return
|
|
6269
|
+
return Rs();
|
|
6294
6270
|
}).catch(function(e) {
|
|
6295
|
-
|
|
6296
|
-
}),
|
|
6271
|
+
Ls || console.warn(e);
|
|
6272
|
+
}), zs = function() {
|
|
6297
6273
|
var e = [...arguments];
|
|
6298
|
-
|
|
6274
|
+
Ls = !0;
|
|
6299
6275
|
var t = Date.now();
|
|
6300
|
-
return
|
|
6301
|
-
return
|
|
6276
|
+
return Rs().then(function(n) {
|
|
6277
|
+
return Fs(n, e, t);
|
|
6302
6278
|
});
|
|
6303
6279
|
};
|
|
6304
|
-
})),
|
|
6305
|
-
|
|
6280
|
+
})), Vs = /* @__PURE__ */ c({ loadStripe: () => zs }), Hs = o((() => {
|
|
6281
|
+
Bs();
|
|
6306
6282
|
}));
|
|
6307
6283
|
//#endregion
|
|
6308
6284
|
//#region src/lib/stripe.ts
|
|
6309
|
-
async function
|
|
6310
|
-
let { loadStripe: t } = await Promise.resolve().then(() => (
|
|
6285
|
+
async function Us(e) {
|
|
6286
|
+
let { loadStripe: t } = await Promise.resolve().then(() => (Hs(), Vs)), n = await t(e.publishableKey);
|
|
6311
6287
|
if (!n) throw Error("Stripe failed to load");
|
|
6312
6288
|
let r = e.colorPrimary || "#16365b", i = n.elements({
|
|
6313
6289
|
clientSecret: e.clientSecret,
|
|
@@ -6338,13 +6314,13 @@ async function Ks(e) {
|
|
|
6338
6314
|
}
|
|
6339
6315
|
//#endregion
|
|
6340
6316
|
//#region src/components/PaymentStep.svelte
|
|
6341
|
-
var
|
|
6317
|
+
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
6318
|
hash: "svelte-1dn2f4w",
|
|
6343
6319
|
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
6320
|
};
|
|
6345
|
-
function
|
|
6346
|
-
Xe(t, !0), ri(e,
|
|
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(() =>
|
|
6321
|
+
function qs(e, t) {
|
|
6322
|
+
Xe(t, !0), ri(e, Ks);
|
|
6323
|
+
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
6324
|
Gr(() => {
|
|
6349
6325
|
let e = document.createElement("slot");
|
|
6350
6326
|
e.name = c, l.appendChild(e);
|
|
@@ -6353,7 +6329,7 @@ function Xs(e, t) {
|
|
|
6353
6329
|
let i = !1;
|
|
6354
6330
|
return (async () => {
|
|
6355
6331
|
try {
|
|
6356
|
-
let e = await
|
|
6332
|
+
let e = await Us({
|
|
6357
6333
|
publishableKey: n().publishableKey,
|
|
6358
6334
|
clientSecret: n().clientSecret,
|
|
6359
6335
|
locale: a(),
|
|
@@ -6404,7 +6380,7 @@ function Xs(e, t) {
|
|
|
6404
6380
|
set totalLabel(e) {
|
|
6405
6381
|
o(e), z();
|
|
6406
6382
|
}
|
|
6407
|
-
}, m =
|
|
6383
|
+
}, m = Gs(), h = H(m), g = H(h), _ = H(g, !0);
|
|
6408
6384
|
P(g);
|
|
6409
6385
|
var v = U(g, 2), y = H(v);
|
|
6410
6386
|
P(v), P(h);
|
|
@@ -6413,7 +6389,7 @@ function Xs(e, t) {
|
|
|
6413
6389
|
var S = U(b, 2);
|
|
6414
6390
|
Oi(S, (e) => l = e, () => l);
|
|
6415
6391
|
var ee = U(S, 2), C = (e) => {
|
|
6416
|
-
var t =
|
|
6392
|
+
var t = Ws(), n = H(t, !0);
|
|
6417
6393
|
P(t), W(() => Z(n, q(d))), X(e, t);
|
|
6418
6394
|
};
|
|
6419
6395
|
return Q(ee, (e) => {
|
|
@@ -6422,7 +6398,7 @@ function Xs(e, t) {
|
|
|
6422
6398
|
Z(_, q(s).paymentHold), Z(y, `${q(s).total ?? ""} ${o() ?? ""}`), Z(x, q(s).paymentNote);
|
|
6423
6399
|
}), X(e, m), Ze(p);
|
|
6424
6400
|
}
|
|
6425
|
-
Pi(
|
|
6401
|
+
Pi(qs, {
|
|
6426
6402
|
payment: {},
|
|
6427
6403
|
host: {},
|
|
6428
6404
|
lang: {},
|
|
@@ -6431,12 +6407,12 @@ Pi(Xs, {
|
|
|
6431
6407
|
}, [], ["confirm"], { mode: "open" });
|
|
6432
6408
|
//#endregion
|
|
6433
6409
|
//#region src/components/StepNav.svelte
|
|
6434
|
-
var
|
|
6410
|
+
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
6411
|
hash: "svelte-1q5e1i3",
|
|
6436
6412
|
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
6413
|
};
|
|
6438
|
-
function
|
|
6439
|
-
Xe(t, !0), ri(e,
|
|
6414
|
+
function $s(e, t) {
|
|
6415
|
+
Xe(t, !0), ri(e, Qs);
|
|
6440
6416
|
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
6417
|
var f = {
|
|
6442
6418
|
get step() {
|
|
@@ -6493,16 +6469,16 @@ function nc(e, t) {
|
|
|
6493
6469
|
set onNext(e) {
|
|
6494
6470
|
u(e), z();
|
|
6495
6471
|
}
|
|
6496
|
-
}, p =
|
|
6497
|
-
var t =
|
|
6472
|
+
}, p = Zs(), m = hn(p), h = (e) => {
|
|
6473
|
+
var t = Js(), n = H(t, !0);
|
|
6498
6474
|
P(t), W(() => Z(n, o())), X(e, t);
|
|
6499
6475
|
};
|
|
6500
6476
|
Q(m, (e) => {
|
|
6501
6477
|
o() && e(h);
|
|
6502
6478
|
});
|
|
6503
6479
|
var g = U(m, 2), _ = (e) => {
|
|
6504
|
-
var t =
|
|
6505
|
-
var t =
|
|
6480
|
+
var t = Xs(), o = H(t), f = (e) => {
|
|
6481
|
+
var t = Ys();
|
|
6506
6482
|
let n;
|
|
6507
6483
|
var r = H(t, !0);
|
|
6508
6484
|
P(t), W(() => {
|
|
@@ -6527,7 +6503,7 @@ function nc(e, t) {
|
|
|
6527
6503
|
n() !== 4 && e(_);
|
|
6528
6504
|
}), X(e, p), Ze(f);
|
|
6529
6505
|
}
|
|
6530
|
-
wr(["click"]), Pi(
|
|
6506
|
+
wr(["click"]), Pi($s, {
|
|
6531
6507
|
step: {},
|
|
6532
6508
|
firstStep: {},
|
|
6533
6509
|
sending: {},
|
|
@@ -6539,201 +6515,14 @@ wr(["click"]), Pi(nc, {
|
|
|
6539
6515
|
onNext: {}
|
|
6540
6516
|
}, [], [], { mode: "open" });
|
|
6541
6517
|
//#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
6518
|
//#region src/components/ContractSection.svelte
|
|
6730
|
-
var
|
|
6519
|
+
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
6520
|
hash: "svelte-1g7u6xt",
|
|
6732
6521
|
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
6522
|
};
|
|
6734
|
-
function
|
|
6735
|
-
Xe(t, !0), ri(e,
|
|
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(() =>
|
|
6523
|
+
function ac(e, t) {
|
|
6524
|
+
Xe(t, !0), ri(e, ic);
|
|
6525
|
+
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
6526
|
day: "numeric",
|
|
6738
6527
|
month: "short",
|
|
6739
6528
|
year: "numeric"
|
|
@@ -6742,9 +6531,9 @@ function Sc(e, t) {
|
|
|
6742
6531
|
if (!(!q(u) || q(d))) {
|
|
6743
6532
|
V(d, !0), V(f, null);
|
|
6744
6533
|
try {
|
|
6745
|
-
V(p, (await
|
|
6534
|
+
V(p, (await Vo(n(), r(), i())).agreedAt, !0);
|
|
6746
6535
|
} catch (e) {
|
|
6747
|
-
e instanceof
|
|
6536
|
+
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
6537
|
} finally {
|
|
6749
6538
|
V(d, !1), c()();
|
|
6750
6539
|
}
|
|
@@ -6793,15 +6582,15 @@ function Sc(e, t) {
|
|
|
6793
6582
|
set onchange(e) {
|
|
6794
6583
|
c(e), z();
|
|
6795
6584
|
}
|
|
6796
|
-
}, y =
|
|
6585
|
+
}, y = rc(), b = H(y), x = H(b, !0);
|
|
6797
6586
|
P(b);
|
|
6798
6587
|
var S = U(b, 2), ee = H(S, !0);
|
|
6799
6588
|
P(S);
|
|
6800
6589
|
var C = U(S, 2), w = (e) => {
|
|
6801
|
-
var t =
|
|
6590
|
+
var t = ec(), n = H(t, !0);
|
|
6802
6591
|
P(t), W((e) => Z(n, e), [() => q(l).contractAgreedOn(g(q(m)))]), X(e, t);
|
|
6803
6592
|
}, T = (e) => {
|
|
6804
|
-
var t =
|
|
6593
|
+
var t = tc(), n = hn(t), r = H(n);
|
|
6805
6594
|
_i(r);
|
|
6806
6595
|
var i = U(r, 2), a = H(i), o = U(a), s = H(o, !0);
|
|
6807
6596
|
P(o), He(), P(i), P(n);
|
|
@@ -6814,7 +6603,7 @@ function Sc(e, t) {
|
|
|
6814
6603
|
q(m) ? e(w) : q(h) && e(T, 1);
|
|
6815
6604
|
});
|
|
6816
6605
|
var E = U(C, 2), te = (e) => {
|
|
6817
|
-
var t =
|
|
6606
|
+
var t = nc(), n = H(t, !0);
|
|
6818
6607
|
P(t), W(() => Z(n, q(f))), X(e, t);
|
|
6819
6608
|
};
|
|
6820
6609
|
return Q(E, (e) => {
|
|
@@ -6823,7 +6612,7 @@ function Sc(e, t) {
|
|
|
6823
6612
|
Z(x, q(l).contractHeading), Z(ee, s().renderedBody);
|
|
6824
6613
|
}), X(e, y), Ze(v);
|
|
6825
6614
|
}
|
|
6826
|
-
wr(["click"]), Pi(
|
|
6615
|
+
wr(["click"]), Pi(ac, {
|
|
6827
6616
|
apiOrigin: {},
|
|
6828
6617
|
slug: {},
|
|
6829
6618
|
session: {},
|
|
@@ -6834,7 +6623,7 @@ wr(["click"]), Pi(Sc, {
|
|
|
6834
6623
|
}, [], [], { mode: "open" });
|
|
6835
6624
|
//#endregion
|
|
6836
6625
|
//#region node_modules/ably/build/ably.js
|
|
6837
|
-
var
|
|
6626
|
+
var oc = /* @__PURE__ */ s(((e, t) => {
|
|
6838
6627
|
(function(n, r) {
|
|
6839
6628
|
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
6629
|
})(e, () => {
|
|
@@ -6958,13 +6747,13 @@ var Cc = /* @__PURE__ */ s(((e, t) => {
|
|
|
6958
6747
|
arrWithoutValue: () => he,
|
|
6959
6748
|
cheapRandStr: () => ke,
|
|
6960
6749
|
containsValue: () => ue,
|
|
6961
|
-
copy: () =>
|
|
6750
|
+
copy: () => re,
|
|
6962
6751
|
createMissingPluginError: () => He,
|
|
6963
6752
|
dataSizeBytes: () => Oe,
|
|
6964
6753
|
decodeBody: () => Ne,
|
|
6965
6754
|
detectV1Callback: () => Ee,
|
|
6966
6755
|
encodeBody: () => Pe,
|
|
6967
|
-
ensureArray: () =>
|
|
6756
|
+
ensureArray: () => ie,
|
|
6968
6757
|
forInOwnNonNullProperties: () => ve,
|
|
6969
6758
|
getBackoffCoefficient: () => Le,
|
|
6970
6759
|
getGlobalObject: () => ze,
|
|
@@ -6974,10 +6763,10 @@ var Cc = /* @__PURE__ */ s(((e, t) => {
|
|
|
6974
6763
|
inspectBody: () => De,
|
|
6975
6764
|
inspectError: () => j,
|
|
6976
6765
|
intersect: () => de,
|
|
6977
|
-
isEmpty: () =>
|
|
6766
|
+
isEmpty: () => oe,
|
|
6978
6767
|
isErrorInfoOrPartialErrorInfo: () => Te,
|
|
6979
|
-
isNil: () =>
|
|
6980
|
-
isObject: () =>
|
|
6768
|
+
isNil: () => A,
|
|
6769
|
+
isObject: () => ae,
|
|
6981
6770
|
keysArray: () => ge,
|
|
6982
6771
|
listenerToAsyncIterator: () => Ge,
|
|
6983
6772
|
matchDerivedChannel: () => Be,
|
|
@@ -7006,7 +6795,7 @@ var Cc = /* @__PURE__ */ s(((e, t) => {
|
|
|
7006
6795
|
};
|
|
7007
6796
|
if (typeof t == "object") {
|
|
7008
6797
|
let n = t;
|
|
7009
|
-
if (typeof n.message != "string" || typeof n.code != "number" || typeof n.statusCode != "number" || !
|
|
6798
|
+
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
6799
|
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
6800
|
} 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
6801
|
}
|
|
@@ -7024,7 +6813,7 @@ var Cc = /* @__PURE__ */ s(((e, t) => {
|
|
|
7024
6813
|
};
|
|
7025
6814
|
if (typeof t == "object") {
|
|
7026
6815
|
let n = t;
|
|
7027
|
-
if (typeof n.message != "string" || !
|
|
6816
|
+
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
6817
|
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
6818
|
} 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
6819
|
}
|
|
@@ -7047,20 +6836,20 @@ var Cc = /* @__PURE__ */ s(((e, t) => {
|
|
|
7047
6836
|
}
|
|
7048
6837
|
return e;
|
|
7049
6838
|
}
|
|
7050
|
-
function A(e) {
|
|
7051
|
-
return k({}, e);
|
|
7052
|
-
}
|
|
7053
6839
|
function re(e) {
|
|
7054
|
-
return
|
|
6840
|
+
return k({}, e);
|
|
7055
6841
|
}
|
|
7056
6842
|
function ie(e) {
|
|
7057
|
-
return
|
|
6843
|
+
return A(e) ? [] : Array.isArray(e) ? e : [e];
|
|
7058
6844
|
}
|
|
7059
6845
|
function ae(e) {
|
|
6846
|
+
return Object.prototype.toString.call(e) == "[object Object]";
|
|
6847
|
+
}
|
|
6848
|
+
function oe(e) {
|
|
7060
6849
|
for (let t in e) return !1;
|
|
7061
6850
|
return !0;
|
|
7062
6851
|
}
|
|
7063
|
-
function
|
|
6852
|
+
function A(e) {
|
|
7064
6853
|
return e == null;
|
|
7065
6854
|
}
|
|
7066
6855
|
function se(e) {
|
|
@@ -7640,7 +7429,7 @@ var Cc = /* @__PURE__ */ s(((e, t) => {
|
|
|
7640
7429
|
return Ee(e, 0), this._requestTokenImpl(e[0], e[1]);
|
|
7641
7430
|
}
|
|
7642
7431
|
async _requestTokenImpl(e, t) {
|
|
7643
|
-
let n = t || this.authOptions, r = e ||
|
|
7432
|
+
let n = t || this.authOptions, r = e || re(this.tokenParams), i, a = this.client;
|
|
7644
7433
|
if (n.authCallback) T.logAction(this.logger, T.LOG_MINOR, "Auth.requestToken()", "using token auth with authCallback"), i = n.authCallback;
|
|
7645
7434
|
else if (n.authUrl) T.logAction(this.logger, T.LOG_MINOR, "Auth.requestToken()", "using token auth with authUrl"), i = (e, t) => {
|
|
7646
7435
|
let r = k({ accept: "application/json, text/plain" }, n.authHeaders), i = n.authMethod && n.authMethod.toLowerCase() === "post", a, o = n.authUrl.indexOf("?");
|
|
@@ -7810,7 +7599,7 @@ var Cc = /* @__PURE__ */ s(((e, t) => {
|
|
|
7810
7599
|
return Ee(e, 0), this._createTokenRequestImpl(e[0], e[1]);
|
|
7811
7600
|
}
|
|
7812
7601
|
async _createTokenRequestImpl(e, t) {
|
|
7813
|
-
t ||= this.authOptions, e ||=
|
|
7602
|
+
t ||= this.authOptions, e ||= re(this.tokenParams);
|
|
7814
7603
|
let n = t.key;
|
|
7815
7604
|
if (!n) throw new D({
|
|
7816
7605
|
message: "No key specified",
|
|
@@ -8007,7 +7796,7 @@ var Cc = /* @__PURE__ */ s(((e, t) => {
|
|
|
8007
7796
|
for (let o = 0; o < e.length; o++) if (r = e[o], n && (r = r[n]), Array.isArray(r)) {
|
|
8008
7797
|
for (; (i = r.indexOf(t)) !== -1;) r.splice(i, 1);
|
|
8009
7798
|
n && r.length === 0 && delete e[o][n];
|
|
8010
|
-
} else if (
|
|
7799
|
+
} else if (ae(r)) for (a in r) Object.prototype.hasOwnProperty.call(r, a) && Array.isArray(r[a]) && Lt([r], t, a);
|
|
8011
7800
|
}
|
|
8012
7801
|
var Rt = class {
|
|
8013
7802
|
constructor(e) {
|
|
@@ -8022,7 +7811,7 @@ var Cc = /* @__PURE__ */ s(((e, t) => {
|
|
|
8022
7811
|
if (e.length === 2) {
|
|
8023
7812
|
let [t, n] = e;
|
|
8024
7813
|
if (typeof n != "function") throw Error("EventListener.on(): Invalid arguments: " + b.Config.inspect(e));
|
|
8025
|
-
if (
|
|
7814
|
+
if (A(t)) this.any.push(n);
|
|
8026
7815
|
else if (Array.isArray(t)) t.forEach((e) => {
|
|
8027
7816
|
this.on(e, n);
|
|
8028
7817
|
});
|
|
@@ -8033,7 +7822,7 @@ var Cc = /* @__PURE__ */ s(((e, t) => {
|
|
|
8033
7822
|
}
|
|
8034
7823
|
}
|
|
8035
7824
|
off(...e) {
|
|
8036
|
-
if (e.length == 0 ||
|
|
7825
|
+
if (e.length == 0 || A(e[0]) && A(e[1])) {
|
|
8037
7826
|
this.any = [], this.events = /* @__PURE__ */ Object.create(null), this.anyOnce = [], this.eventsOnce = /* @__PURE__ */ Object.create(null);
|
|
8038
7827
|
return;
|
|
8039
7828
|
}
|
|
@@ -8043,7 +7832,7 @@ var Cc = /* @__PURE__ */ s(((e, t) => {
|
|
|
8043
7832
|
if (typeof n != "function") throw Error("EventEmitter.off(): invalid arguments:" + b.Config.inspect(e));
|
|
8044
7833
|
[i, r] = [t, n];
|
|
8045
7834
|
}
|
|
8046
|
-
if (r &&
|
|
7835
|
+
if (r && A(i)) {
|
|
8047
7836
|
Lt([
|
|
8048
7837
|
this.any,
|
|
8049
7838
|
this.events,
|
|
@@ -8088,7 +7877,7 @@ var Cc = /* @__PURE__ */ s(((e, t) => {
|
|
|
8088
7877
|
}
|
|
8089
7878
|
let [n, r] = e;
|
|
8090
7879
|
if (e.length === 1 && typeof n == "function") this.anyOnce.push(n);
|
|
8091
|
-
else if (
|
|
7880
|
+
else if (A(n)) {
|
|
8092
7881
|
if (typeof r != "function") throw Error("EventEmitter.once(): Invalid arguments:" + b.Config.inspect(e));
|
|
8093
7882
|
this.anyOnce.push(r);
|
|
8094
7883
|
} else if (Array.isArray(n)) {
|
|
@@ -8209,7 +7998,7 @@ var Cc = /* @__PURE__ */ s(((e, t) => {
|
|
|
8209
7998
|
data: e,
|
|
8210
7999
|
encoding: t
|
|
8211
8000
|
};
|
|
8212
|
-
if (
|
|
8001
|
+
if (ae(e) || Array.isArray(e)) return {
|
|
8213
8002
|
data: JSON.stringify(e),
|
|
8214
8003
|
encoding: t ? t + "/json" : "json"
|
|
8215
8004
|
};
|
|
@@ -9145,7 +8934,7 @@ var Cc = /* @__PURE__ */ s(((e, t) => {
|
|
|
9145
8934
|
name: t,
|
|
9146
8935
|
data: n
|
|
9147
8936
|
})], i = e[2];
|
|
9148
|
-
else if (
|
|
8937
|
+
else if (ae(t)) r = [Wn.fromValues(t)], i = e[1];
|
|
9149
8938
|
else if (Array.isArray(t)) r = Wn.fromValuesArray(t), i = e[1];
|
|
9150
8939
|
else throw new D({
|
|
9151
8940
|
message: "publish() expects an event name (string or null), a message object, or an array of message objects as its first argument",
|
|
@@ -9301,7 +9090,7 @@ var Cc = /* @__PURE__ */ s(((e, t) => {
|
|
|
9301
9090
|
});
|
|
9302
9091
|
typeof i != "string" && (i = o(i) ?? null), k(d, this.client.options.headers), a && k(d, a);
|
|
9303
9092
|
let f = new mn(this.client, t, d, l, async function(e, t, n) {
|
|
9304
|
-
return
|
|
9093
|
+
return ie(n ? e : s(e));
|
|
9305
9094
|
}, !0);
|
|
9306
9095
|
if (!b.Http.methods.includes(u)) throw new D({
|
|
9307
9096
|
message: "Unsupported method " + u,
|
|
@@ -9570,7 +9359,7 @@ var Cc = /* @__PURE__ */ s(((e, t) => {
|
|
|
9570
9359
|
}
|
|
9571
9360
|
};
|
|
9572
9361
|
function Sr(e) {
|
|
9573
|
-
if (e && "params" in e && !
|
|
9362
|
+
if (e && "params" in e && !ae(e.params)) return new D({
|
|
9574
9363
|
message: "options.params must be an object",
|
|
9575
9364
|
code: 4e4,
|
|
9576
9365
|
statusCode: 400,
|
|
@@ -9688,7 +9477,7 @@ var Cc = /* @__PURE__ */ s(((e, t) => {
|
|
|
9688
9477
|
name: t,
|
|
9689
9478
|
data: n
|
|
9690
9479
|
})], i = e[2];
|
|
9691
|
-
else if (
|
|
9480
|
+
else if (ae(t)) r = [Wn.fromValues(t)], i = e[1];
|
|
9692
9481
|
else if (Array.isArray(t)) r = Wn.fromValuesArray(t), i = e[1];
|
|
9693
9482
|
else throw new D({
|
|
9694
9483
|
message: "The single-argument form of publish() expects a message object or an array of message objects",
|
|
@@ -10482,7 +10271,7 @@ var Cc = /* @__PURE__ */ s(((e, t) => {
|
|
|
10482
10271
|
this.options = e, this.host = t, this.mode = n, this.connectionKey = r, this.format = e.useBinaryProtocol ? "msgpack" : "json";
|
|
10483
10272
|
}
|
|
10484
10273
|
getConnectParams(e) {
|
|
10485
|
-
let t = e ?
|
|
10274
|
+
let t = e ? re(e) : {}, n = this.options;
|
|
10486
10275
|
switch (this.mode) {
|
|
10487
10276
|
case "resume":
|
|
10488
10277
|
t.resume = this.connectionKey;
|
|
@@ -11352,7 +11141,7 @@ var Cc = /* @__PURE__ */ s(((e, t) => {
|
|
|
11352
11141
|
}
|
|
11353
11142
|
startSync() {
|
|
11354
11143
|
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 =
|
|
11144
|
+
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
11145
|
}
|
|
11357
11146
|
endSync() {
|
|
11358
11147
|
let e = this.map, t = this.syncInProgress;
|
|
@@ -12312,11 +12101,11 @@ var Cc = /* @__PURE__ */ s(((e, t) => {
|
|
|
12312
12101
|
}
|
|
12313
12102
|
var Yi = class e extends Rt {
|
|
12314
12103
|
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() :
|
|
12104
|
+
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
12105
|
}
|
|
12317
12106
|
static createRequest(t, n, r, i, a, o, s, c) {
|
|
12318
12107
|
let l = o || F.TIMEOUTS;
|
|
12319
|
-
return new e(t, n,
|
|
12108
|
+
return new e(t, n, re(r), i, a, l, s, c);
|
|
12320
12109
|
}
|
|
12321
12110
|
complete(e, t, n, r, i) {
|
|
12322
12111
|
this.requestComplete || (this.requestComplete = !0, !e && t && this.emit("data", t), this.emit("complete", e, t, n, r, i), this.dispose());
|
|
@@ -12672,7 +12461,7 @@ var Cc = /* @__PURE__ */ s(((e, t) => {
|
|
|
12672
12461
|
}), t;
|
|
12673
12462
|
}
|
|
12674
12463
|
async function ya(e, t, n, r, i, a) {
|
|
12675
|
-
let o = new Headers(r || {}), s = e ? e.toUpperCase() :
|
|
12464
|
+
let o = new Headers(r || {}), s = e ? e.toUpperCase() : A(a) ? "GET" : "POST", c = new AbortController(), l, u = new Promise((e) => {
|
|
12676
12465
|
l = setTimeout(() => {
|
|
12677
12466
|
c.abort(), e({ error: new O("Request timed out", null, 408) });
|
|
12678
12467
|
}, t ? t.options.timeouts.httpRequestTimeout : F.TIMEOUTS.httpRequestTimeout);
|
|
@@ -12736,141 +12525,133 @@ var Cc = /* @__PURE__ */ s(((e, t) => {
|
|
|
12736
12525
|
return e;
|
|
12737
12526
|
})(t.exports, e)), t.exports;
|
|
12738
12527
|
});
|
|
12739
|
-
})),
|
|
12528
|
+
})), 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
12529
|
hash: "svelte-1312f6m",
|
|
12741
12530
|
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
12531
|
};
|
|
12743
|
-
function
|
|
12744
|
-
Xe(t, !0), ri(e,
|
|
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(() =>
|
|
12532
|
+
function Cc(e, t) {
|
|
12533
|
+
Xe(t, !0), ri(e, Sc);
|
|
12534
|
+
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
12535
|
day: "numeric",
|
|
12747
12536
|
month: "short",
|
|
12748
12537
|
year: "numeric"
|
|
12749
|
-
}) ?? "",
|
|
12538
|
+
}) ?? "", ie = (e) => e ? new Date(e).toLocaleTimeString(q(m), {
|
|
12750
12539
|
hour: "2-digit",
|
|
12751
12540
|
minute: "2-digit"
|
|
12752
12541
|
}) : "";
|
|
12753
|
-
async function
|
|
12754
|
-
let e = ++
|
|
12755
|
-
D || (D = !0, Fo(n(), r()).then((e) => V(g, e, !0), () => D = !1));
|
|
12542
|
+
async function ae() {
|
|
12543
|
+
let e = ++te;
|
|
12756
12544
|
try {
|
|
12757
|
-
let t = await
|
|
12758
|
-
if (
|
|
12759
|
-
V(p, t, !0), V(
|
|
12760
|
-
let
|
|
12761
|
-
|
|
12762
|
-
|
|
12763
|
-
|
|
12764
|
-
}
|
|
12765
|
-
|
|
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();
|
|
12545
|
+
let t = await Lo(n(), r(), i());
|
|
12546
|
+
if (D || e !== te) return;
|
|
12547
|
+
V(p, t, !0), V(g, null);
|
|
12548
|
+
let a = t.booking.status;
|
|
12549
|
+
if (a !== w) {
|
|
12550
|
+
let e = w;
|
|
12551
|
+
w = a, l()(a, e);
|
|
12552
|
+
}
|
|
12553
|
+
a === "hold" ? t.payment && !T && (T = !0, oe(t.payment)) : se();
|
|
12773
12554
|
} catch (t) {
|
|
12774
|
-
if (
|
|
12775
|
-
V(
|
|
12555
|
+
if (D || e !== te || q(p)) return;
|
|
12556
|
+
V(g, t instanceof Oo && t.status === 404 ? q(h).bookingNotFound : q(h).loadFailed, !0);
|
|
12776
12557
|
}
|
|
12777
12558
|
}
|
|
12778
|
-
async function
|
|
12779
|
-
V(
|
|
12559
|
+
async function oe(e) {
|
|
12560
|
+
V(E, !1);
|
|
12780
12561
|
try {
|
|
12781
|
-
await
|
|
12562
|
+
await Ro(n(), r(), i()), await ae();
|
|
12782
12563
|
} catch (t) {
|
|
12783
|
-
let n =
|
|
12784
|
-
n === "lapsed" ? V(
|
|
12564
|
+
let n = io(t instanceof Oo ? t.status : 0);
|
|
12565
|
+
n === "lapsed" ? V(y, !0) : n === "card" ? await A(e) : (V(_, k(t), !0), V(E, !0), T = !1);
|
|
12785
12566
|
}
|
|
12786
12567
|
}
|
|
12787
|
-
async function
|
|
12788
|
-
if (
|
|
12568
|
+
async function A(e) {
|
|
12569
|
+
if (C || (V(b, !0), await hr(), D || !q(S))) return;
|
|
12789
12570
|
let t = document.createElement("slot");
|
|
12790
|
-
t.name = f, q(
|
|
12571
|
+
t.name = f, q(S).appendChild(t);
|
|
12791
12572
|
let n = document.createElement("div");
|
|
12792
|
-
n.slot = f, c().appendChild(n),
|
|
12573
|
+
n.slot = f, c().appendChild(n), C = n;
|
|
12793
12574
|
try {
|
|
12794
|
-
let t = await
|
|
12575
|
+
let t = await Us({
|
|
12795
12576
|
publishableKey: e.publishableKey,
|
|
12796
12577
|
clientSecret: e.clientSecret,
|
|
12797
12578
|
locale: q(m),
|
|
12798
12579
|
mount: n,
|
|
12799
12580
|
colorPrimary: getComputedStyle(c()).getPropertyValue("--brand-navy").trim() || "#16365b"
|
|
12800
12581
|
});
|
|
12801
|
-
if (
|
|
12802
|
-
|
|
12582
|
+
if (C !== n) return t.destroy();
|
|
12583
|
+
ee = t, V(x, !0);
|
|
12803
12584
|
} catch (e) {
|
|
12804
|
-
V(
|
|
12585
|
+
V(_, k(e), !0);
|
|
12805
12586
|
}
|
|
12806
12587
|
}
|
|
12807
|
-
function
|
|
12808
|
-
|
|
12588
|
+
function se() {
|
|
12589
|
+
ee?.destroy(), ee = null, C?.remove(), C = null, V(b, !1), V(x, !1);
|
|
12809
12590
|
}
|
|
12810
|
-
async function
|
|
12811
|
-
if (!
|
|
12812
|
-
V(
|
|
12591
|
+
async function ce() {
|
|
12592
|
+
if (!ee || q(v)) return;
|
|
12593
|
+
V(v, !0), V(_, null);
|
|
12813
12594
|
let e = null;
|
|
12814
12595
|
try {
|
|
12815
|
-
await
|
|
12596
|
+
await ee.confirm();
|
|
12816
12597
|
} catch (t) {
|
|
12817
12598
|
e = t;
|
|
12818
12599
|
}
|
|
12819
12600
|
try {
|
|
12820
|
-
await
|
|
12601
|
+
await Ro(n(), r(), i()), se();
|
|
12821
12602
|
} catch (t) {
|
|
12822
|
-
t instanceof
|
|
12603
|
+
t instanceof Oo && t.status === 410 ? (V(y, !0), se()) : V(_, k(e ?? t), !0);
|
|
12823
12604
|
} finally {
|
|
12824
|
-
V(
|
|
12605
|
+
V(v, !1);
|
|
12825
12606
|
}
|
|
12826
|
-
await
|
|
12607
|
+
await ae();
|
|
12827
12608
|
}
|
|
12828
|
-
async function
|
|
12829
|
-
if (!(q(
|
|
12830
|
-
V(
|
|
12609
|
+
async function le() {
|
|
12610
|
+
if (!(q(v) || !window.confirm(q(h).cancelConfirm))) {
|
|
12611
|
+
V(v, !0), V(_, null);
|
|
12831
12612
|
try {
|
|
12832
|
-
await
|
|
12613
|
+
await zo(n(), r(), i()), se();
|
|
12833
12614
|
} catch (e) {
|
|
12834
|
-
V(
|
|
12615
|
+
V(_, k(e), !0);
|
|
12835
12616
|
} finally {
|
|
12836
|
-
V(
|
|
12617
|
+
V(v, !1);
|
|
12837
12618
|
}
|
|
12838
|
-
await
|
|
12619
|
+
await ae();
|
|
12839
12620
|
}
|
|
12840
12621
|
}
|
|
12841
|
-
async function
|
|
12842
|
-
q(
|
|
12622
|
+
async function ue() {
|
|
12623
|
+
q(v) || (V(v, !0), q(p)?.booking.status === "hold" && await zo(n(), r(), i()).catch(() => {}), se(), V(v, !1), d()?.());
|
|
12843
12624
|
}
|
|
12844
|
-
async function
|
|
12625
|
+
async function de() {
|
|
12845
12626
|
try {
|
|
12846
|
-
let e = (await Promise.resolve().then(() => /* @__PURE__ */ u(
|
|
12847
|
-
if (
|
|
12627
|
+
let e = (await Promise.resolve().then(() => /* @__PURE__ */ u(oc()))).default;
|
|
12628
|
+
if (D) return;
|
|
12848
12629
|
let t = new e.Realtime({ authCallback: (e, t) => {
|
|
12849
|
-
|
|
12630
|
+
Ho(n(), r(), i()).then((e) => {
|
|
12850
12631
|
if (e) return t(null, e);
|
|
12851
|
-
t("Live updates are not configured", null),
|
|
12852
|
-
}, (e) => t(
|
|
12632
|
+
t("Live updates are not configured", null), fe();
|
|
12633
|
+
}, (e) => t(k(e), null));
|
|
12853
12634
|
} });
|
|
12854
|
-
|
|
12635
|
+
O = t, t.connection.on(["failed", "suspended"], () => fe()), t.channels.get(`marina-booking:${i().id}`).subscribe("updated", () => void ae()).catch(() => fe());
|
|
12855
12636
|
} catch {
|
|
12856
|
-
|
|
12637
|
+
fe();
|
|
12857
12638
|
}
|
|
12858
12639
|
}
|
|
12859
|
-
function
|
|
12860
|
-
|
|
12861
|
-
!document.hidden && q(p) &&
|
|
12640
|
+
function fe() {
|
|
12641
|
+
O?.close(), O = null, !(D || ne) && (ne = setInterval(() => {
|
|
12642
|
+
!document.hidden && q(p) && ao(q(p).booking.status, q(p).booking.cardHold) && ae();
|
|
12862
12643
|
}, 3e4));
|
|
12863
12644
|
}
|
|
12864
12645
|
Gr(() => {
|
|
12865
|
-
|
|
12646
|
+
ae(), de();
|
|
12866
12647
|
let e = () => {
|
|
12867
|
-
document.visibilityState === "visible" &&
|
|
12648
|
+
document.visibilityState === "visible" && ae();
|
|
12868
12649
|
};
|
|
12869
12650
|
return document.addEventListener("visibilitychange", e), () => {
|
|
12870
|
-
|
|
12651
|
+
D = !0, document.removeEventListener("visibilitychange", e), clearInterval(ne), O?.close(), se();
|
|
12871
12652
|
};
|
|
12872
12653
|
});
|
|
12873
|
-
var
|
|
12654
|
+
var pe = {
|
|
12874
12655
|
get apiOrigin() {
|
|
12875
12656
|
return n();
|
|
12876
12657
|
},
|
|
@@ -12925,62 +12706,62 @@ function Bc(e, t) {
|
|
|
12925
12706
|
set onstartover(e) {
|
|
12926
12707
|
d(e), z();
|
|
12927
12708
|
}
|
|
12928
|
-
},
|
|
12929
|
-
let
|
|
12930
|
-
var
|
|
12709
|
+
}, me = xc();
|
|
12710
|
+
let he;
|
|
12711
|
+
var ge = H(me), _e = (e) => {
|
|
12931
12712
|
var t = Nr(), n = hn(t), r = (e) => {
|
|
12932
|
-
var t =
|
|
12713
|
+
var t = cc(), n = hn(t), r = H(n, !0);
|
|
12933
12714
|
P(n);
|
|
12934
12715
|
var i = U(n, 2), a = H(i), o = H(a, !0);
|
|
12935
12716
|
P(a);
|
|
12936
12717
|
var s = U(a, 2), c = (e) => {
|
|
12937
|
-
var t =
|
|
12718
|
+
var t = sc(), n = H(t, !0);
|
|
12938
12719
|
P(t), W(() => {
|
|
12939
|
-
t.disabled = q(
|
|
12940
|
-
}), Cr("click", t,
|
|
12720
|
+
t.disabled = q(v), Z(n, q(h).startOver);
|
|
12721
|
+
}), Cr("click", t, ue), X(e, t);
|
|
12941
12722
|
};
|
|
12942
12723
|
Q(s, (e) => {
|
|
12943
12724
|
d() && e(c);
|
|
12944
12725
|
}), P(i), W(() => {
|
|
12945
|
-
Z(r, q(
|
|
12946
|
-
}), Cr("click", a, () =>
|
|
12726
|
+
Z(r, q(g)), Z(o, q(h).retry);
|
|
12727
|
+
}), Cr("click", a, () => ae()), X(e, t);
|
|
12947
12728
|
}, i = (e) => {
|
|
12948
|
-
var t =
|
|
12729
|
+
var t = lc(), n = H(t, !0);
|
|
12949
12730
|
P(t), W(() => Z(n, q(h).loadingBooking)), X(e, t);
|
|
12950
12731
|
};
|
|
12951
12732
|
Q(n, (e) => {
|
|
12952
|
-
q(
|
|
12733
|
+
q(g) ? e(r) : e(i, -1);
|
|
12953
12734
|
}), X(e, t);
|
|
12954
|
-
},
|
|
12955
|
-
let t = /* @__PURE__ */ I(() => q(p).booking), a = /* @__PURE__ */ I(() => q(t).expired || q(
|
|
12956
|
-
var s =
|
|
12735
|
+
}, ve = (e) => {
|
|
12736
|
+
let t = /* @__PURE__ */ I(() => q(p).booking), a = /* @__PURE__ */ I(() => q(t).expired || q(y) ? "expired" : q(t).status);
|
|
12737
|
+
var s = bc(), c = hn(s);
|
|
12957
12738
|
let l;
|
|
12958
|
-
var u = H(c), f = H(u),
|
|
12959
|
-
var t =
|
|
12739
|
+
var u = H(c), f = H(u), g = H(f), ee = (e) => {
|
|
12740
|
+
var t = uc();
|
|
12960
12741
|
He(), X(e, t);
|
|
12742
|
+
}, C = (e) => {
|
|
12743
|
+
X(e, dc());
|
|
12961
12744
|
}, w = (e) => {
|
|
12962
|
-
X(e,
|
|
12963
|
-
}, T = (e) => {
|
|
12964
|
-
X(e, kc());
|
|
12745
|
+
X(e, fc());
|
|
12965
12746
|
};
|
|
12966
|
-
Q(
|
|
12967
|
-
q(a) === "hold" ? e(
|
|
12747
|
+
Q(g, (e) => {
|
|
12748
|
+
q(a) === "hold" ? e(ee) : q(a) === "pending" || q(a) === "confirmed" ? e(C, 1) : e(w, -1);
|
|
12968
12749
|
}), P(f), P(u);
|
|
12969
|
-
var
|
|
12970
|
-
P(
|
|
12971
|
-
var
|
|
12972
|
-
P(
|
|
12973
|
-
var
|
|
12974
|
-
P(
|
|
12975
|
-
var
|
|
12976
|
-
var t =
|
|
12750
|
+
var T = U(u, 2), te = H(T, !0);
|
|
12751
|
+
P(T);
|
|
12752
|
+
var D = U(T, 2), O = H(D, !0);
|
|
12753
|
+
P(D);
|
|
12754
|
+
var ne = U(D, 2), k = H(ne, !0);
|
|
12755
|
+
P(ne);
|
|
12756
|
+
var oe = U(ne, 2), A = (e) => {
|
|
12757
|
+
var t = pc(), n = U(H(t), 1, !0);
|
|
12977
12758
|
P(t), W(() => Z(n, q(h).waitingForMarina)), X(e, t);
|
|
12978
12759
|
};
|
|
12979
|
-
Q(
|
|
12980
|
-
q(a) === "pending" && e(
|
|
12760
|
+
Q(oe, (e) => {
|
|
12761
|
+
q(a) === "pending" && e(A);
|
|
12981
12762
|
}), P(c);
|
|
12982
|
-
var
|
|
12983
|
-
var n =
|
|
12763
|
+
var se = U(c, 2), de = (e) => {
|
|
12764
|
+
var n = mc(), r = H(n), i = H(r), a = H(i, !0);
|
|
12984
12765
|
P(i);
|
|
12985
12766
|
var s = U(i, 2), c = H(s);
|
|
12986
12767
|
P(s), P(r);
|
|
@@ -12989,13 +12770,13 @@ function Bc(e, t) {
|
|
|
12989
12770
|
var d = U(l, 2), f = H(d, !0);
|
|
12990
12771
|
P(d);
|
|
12991
12772
|
var p = U(d, 2);
|
|
12992
|
-
Oi(p, (e) => V(
|
|
12773
|
+
Oi(p, (e) => V(S, e), () => q(S));
|
|
12993
12774
|
var g = U(p, 2), _ = H(g, !0);
|
|
12994
12775
|
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(
|
|
12996
|
-
}, [() =>
|
|
12997
|
-
},
|
|
12998
|
-
var n =
|
|
12776
|
+
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);
|
|
12777
|
+
}, [() => oo(q(t).totalPrice, q(t).currency, o(), q(m)), () => q(h).holdUntil(ie(q(t).holdExpiresAt))]), Cr("click", g, ce), X(e, n);
|
|
12778
|
+
}, fe = (e) => {
|
|
12779
|
+
var n = hc(), r = H(n), i = H(r), a = H(i, !0);
|
|
12999
12780
|
P(i), P(r);
|
|
13000
12781
|
var o = U(r, 2), s = H(o, !0);
|
|
13001
12782
|
P(o);
|
|
@@ -13004,82 +12785,53 @@ function Bc(e, t) {
|
|
|
13004
12785
|
var u = U(c, 2), d = H(u, !0);
|
|
13005
12786
|
P(u), P(n), W((e) => {
|
|
13006
12787
|
Z(a, q(h).paymentHold), Z(s, q(h).paymentUnavailable), Z(l, e), Z(d, q(h).retry);
|
|
13007
|
-
}, [() => q(h).holdUntil(
|
|
13008
|
-
},
|
|
13009
|
-
var n =
|
|
12788
|
+
}, [() => q(h).holdUntil(ie(q(t).holdExpiresAt))]), Cr("click", u, () => ae()), X(e, n);
|
|
12789
|
+
}, pe = (e) => {
|
|
12790
|
+
var n = gc(), r = H(n), i = H(r), a = H(i, !0);
|
|
13010
12791
|
P(i), P(r);
|
|
13011
12792
|
var o = U(r, 2), s = H(o, !0);
|
|
13012
12793
|
P(o), P(n), W((e) => {
|
|
13013
12794
|
Z(a, q(h).checkEmailTitle), Z(s, e);
|
|
13014
|
-
}, [() => q(h).checkEmailBody(
|
|
12795
|
+
}, [() => q(h).checkEmailBody(ie(q(t).holdExpiresAt))]), X(e, n);
|
|
13015
12796
|
};
|
|
13016
|
-
Q(
|
|
13017
|
-
q(a) === "hold" && q(
|
|
12797
|
+
Q(se, (e) => {
|
|
12798
|
+
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
12799
|
});
|
|
13019
|
-
var
|
|
13020
|
-
P(
|
|
13021
|
-
var
|
|
13022
|
-
P(
|
|
13023
|
-
var
|
|
13024
|
-
P(
|
|
13025
|
-
var
|
|
13026
|
-
P(
|
|
13027
|
-
var
|
|
13028
|
-
P(
|
|
13029
|
-
var
|
|
13030
|
-
P(
|
|
13031
|
-
var
|
|
13032
|
-
P(
|
|
13033
|
-
var
|
|
13034
|
-
P(
|
|
13035
|
-
var
|
|
13036
|
-
P(
|
|
13037
|
-
var
|
|
13038
|
-
var n =
|
|
12800
|
+
var me = U(se, 2), he = H(me, !0);
|
|
12801
|
+
P(me);
|
|
12802
|
+
var ge = U(me, 2), _e = H(ge), ve = H(_e), ye = H(ve, !0);
|
|
12803
|
+
P(ve);
|
|
12804
|
+
var be = U(ve), xe = H(be);
|
|
12805
|
+
P(be), P(_e);
|
|
12806
|
+
var Se = U(_e, 2), Ce = H(Se), we = H(Ce, !0);
|
|
12807
|
+
P(Ce);
|
|
12808
|
+
var Te = U(Ce), Ee = H(Te);
|
|
12809
|
+
P(Te), P(Se);
|
|
12810
|
+
var j = U(Se, 2), De = H(j), Oe = H(De, !0);
|
|
12811
|
+
P(De);
|
|
12812
|
+
var ke = U(De, 2), Ae = H(ke, !0);
|
|
12813
|
+
P(ke), P(j);
|
|
12814
|
+
var je = U(j, 2), Me = H(je), Ne = H(Me, !0);
|
|
12815
|
+
P(Me);
|
|
12816
|
+
var Pe = U(Me), Fe = H(Pe, !0);
|
|
12817
|
+
P(Pe), P(je);
|
|
12818
|
+
var Ie = U(je, 2), Le = (e) => {
|
|
12819
|
+
var n = _c(), r = H(n), i = H(r, !0);
|
|
13039
12820
|
P(r);
|
|
13040
12821
|
var a = U(r), o = H(a, !0);
|
|
13041
12822
|
P(a), P(n), W(() => {
|
|
13042
12823
|
Z(i, q(h).email), Z(o, q(t).contactEmail);
|
|
13043
12824
|
}), X(e, n);
|
|
13044
12825
|
};
|
|
13045
|
-
Q(
|
|
13046
|
-
q(t).contactEmail && e(
|
|
12826
|
+
Q(Ie, (e) => {
|
|
12827
|
+
q(t).contactEmail && e(Le);
|
|
13047
12828
|
});
|
|
13048
|
-
var
|
|
13049
|
-
P(
|
|
13050
|
-
var
|
|
13051
|
-
P(
|
|
13052
|
-
var
|
|
13053
|
-
|
|
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, {
|
|
12829
|
+
var Re = U(Ie, 2), M = H(Re), ze = H(M, !0);
|
|
12830
|
+
P(M);
|
|
12831
|
+
var N = U(M, 2), Be = H(N, !0);
|
|
12832
|
+
P(N), P(Re), P(ge);
|
|
12833
|
+
var Ve = U(ge, 2), Ue = (e) => {
|
|
12834
|
+
ac(e, {
|
|
13083
12835
|
get apiOrigin() {
|
|
13084
12836
|
return n();
|
|
13085
12837
|
},
|
|
@@ -13098,67 +12850,67 @@ function Bc(e, t) {
|
|
|
13098
12850
|
get contract() {
|
|
13099
12851
|
return q(p).contract;
|
|
13100
12852
|
},
|
|
13101
|
-
onchange:
|
|
12853
|
+
onchange: ae
|
|
13102
12854
|
});
|
|
13103
12855
|
};
|
|
13104
|
-
Q(
|
|
13105
|
-
q(p).contract && (q(a) === "pending" || q(a) === "confirmed") && e(
|
|
12856
|
+
Q(Ve, (e) => {
|
|
12857
|
+
q(p).contract && (q(a) === "pending" || q(a) === "confirmed") && e(Ue);
|
|
13106
12858
|
});
|
|
13107
|
-
var
|
|
13108
|
-
var t =
|
|
13109
|
-
P(t), W(() => Z(n, q(
|
|
12859
|
+
var We = U(Ve, 2), Ge = (e) => {
|
|
12860
|
+
var t = vc(), n = H(t, !0);
|
|
12861
|
+
P(t), W(() => Z(n, q(_))), X(e, t);
|
|
13110
12862
|
};
|
|
13111
|
-
Q(
|
|
13112
|
-
q(
|
|
12863
|
+
Q(We, (e) => {
|
|
12864
|
+
q(_) && e(Ge);
|
|
13113
12865
|
});
|
|
13114
|
-
var
|
|
13115
|
-
var t =
|
|
12866
|
+
var Ke = U(We, 2), qe = (e) => {
|
|
12867
|
+
var t = sc(), n = H(t, !0);
|
|
13116
12868
|
P(t), W(() => Z(n, q(h).retry)), Cr("click", t, () => {
|
|
13117
|
-
V(
|
|
12869
|
+
V(_, null), ae();
|
|
13118
12870
|
}), X(e, t);
|
|
13119
12871
|
};
|
|
13120
|
-
Q(
|
|
13121
|
-
q(
|
|
12872
|
+
Q(Ke, (e) => {
|
|
12873
|
+
q(E) && e(qe);
|
|
13122
12874
|
});
|
|
13123
|
-
var
|
|
13124
|
-
var t =
|
|
13125
|
-
var t =
|
|
12875
|
+
var Je = U(Ke, 2), Ye = (e) => {
|
|
12876
|
+
var t = yc(), n = H(t), r = (e) => {
|
|
12877
|
+
var t = sc(), n = H(t, !0);
|
|
13126
12878
|
P(t), W(() => {
|
|
13127
|
-
t.disabled = q(
|
|
13128
|
-
}), Cr("click", t,
|
|
12879
|
+
t.disabled = q(v), Z(n, q(h).cancelBooking);
|
|
12880
|
+
}), Cr("click", t, le), X(e, t);
|
|
13129
12881
|
};
|
|
13130
12882
|
Q(n, (e) => {
|
|
13131
12883
|
(q(a) === "hold" || q(a) === "pending") && e(r);
|
|
13132
12884
|
});
|
|
13133
12885
|
var i = U(n, 2), o = (e) => {
|
|
13134
|
-
var t =
|
|
12886
|
+
var t = sc(), n = H(t, !0);
|
|
13135
12887
|
P(t), W(() => {
|
|
13136
|
-
t.disabled = q(
|
|
13137
|
-
}), Cr("click", t,
|
|
12888
|
+
t.disabled = q(v), Z(n, q(h).startOver);
|
|
12889
|
+
}), Cr("click", t, ue), X(e, t);
|
|
13138
12890
|
};
|
|
13139
12891
|
Q(i, (e) => {
|
|
13140
12892
|
d() && e(o);
|
|
13141
12893
|
}), P(t), X(e, t);
|
|
13142
12894
|
};
|
|
13143
|
-
Q(
|
|
13144
|
-
(q(a) === "hold" || q(a) === "pending" || d()) && e(
|
|
12895
|
+
Q(Je, (e) => {
|
|
12896
|
+
(q(a) === "hold" || q(a) === "pending" || d()) && e(Ye);
|
|
13145
12897
|
}), W((e, n, r, i) => {
|
|
13146
12898
|
l = ui(c, 1, "sbw-hero svelte-1312f6m", null, l, {
|
|
13147
12899
|
"sbw-hero-ok": q(a) === "confirmed",
|
|
13148
12900
|
"sbw-hero-bad": q(a) === "declined" || q(a) === "cancelled" || q(a) === "expired"
|
|
13149
|
-
}), Z(
|
|
12901
|
+
}), 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
12902
|
}, [
|
|
13151
|
-
() =>
|
|
13152
|
-
() =>
|
|
12903
|
+
() => re(q(t).arrival),
|
|
12904
|
+
() => re(q(t).departure),
|
|
13153
12905
|
() => [q(t).boatName, q(t).boatLengthM == null ? null : `${q(t).boatLengthM} m`].filter(Boolean).join(" · "),
|
|
13154
|
-
() => q(t).totalPrice == null ? q(h).priceOnRequest :
|
|
12906
|
+
() => q(t).totalPrice == null ? q(h).priceOnRequest : oo(q(t).totalPrice, q(t).currency, o(), q(m))
|
|
13155
12907
|
]), X(e, s);
|
|
13156
12908
|
};
|
|
13157
|
-
return Q(
|
|
13158
|
-
q(p) ? e(
|
|
13159
|
-
}), P(
|
|
12909
|
+
return Q(ge, (e) => {
|
|
12910
|
+
q(p) ? e(ve, -1) : e(_e);
|
|
12911
|
+
}), P(me), W(() => he = ui(me, 1, "sbw-view svelte-1312f6m", null, he, { "sbw-variant-dark": s() === "dark" })), X(e, me), Ze(pe);
|
|
13160
12912
|
}
|
|
13161
|
-
wr(["click"]), Pi(
|
|
12913
|
+
wr(["click"]), Pi(Cc, {
|
|
13162
12914
|
apiOrigin: {},
|
|
13163
12915
|
slug: {},
|
|
13164
12916
|
session: {},
|
|
@@ -13171,10 +12923,10 @@ wr(["click"]), Pi(Bc, {
|
|
|
13171
12923
|
}, [], [], { mode: "open" });
|
|
13172
12924
|
//#endregion
|
|
13173
12925
|
//#region src/lib/booking-session.ts
|
|
13174
|
-
var
|
|
13175
|
-
function
|
|
12926
|
+
var wc = (e) => `sidon-booking:${e}`;
|
|
12927
|
+
function Tc(e) {
|
|
13176
12928
|
try {
|
|
13177
|
-
let t = JSON.parse(sessionStorage.getItem(
|
|
12929
|
+
let t = JSON.parse(sessionStorage.getItem(wc(e)) ?? "null");
|
|
13178
12930
|
return typeof t?.id == "string" && typeof t?.token == "string" ? {
|
|
13179
12931
|
id: t.id,
|
|
13180
12932
|
token: t.token
|
|
@@ -13183,20 +12935,20 @@ function Hc(e) {
|
|
|
13183
12935
|
return null;
|
|
13184
12936
|
}
|
|
13185
12937
|
}
|
|
13186
|
-
function
|
|
12938
|
+
function Ec(e, t) {
|
|
13187
12939
|
try {
|
|
13188
|
-
sessionStorage.setItem(
|
|
12940
|
+
sessionStorage.setItem(wc(e), JSON.stringify({
|
|
13189
12941
|
id: t.id,
|
|
13190
12942
|
token: t.token
|
|
13191
12943
|
}));
|
|
13192
12944
|
} catch {}
|
|
13193
12945
|
}
|
|
13194
|
-
function
|
|
12946
|
+
function Dc(e) {
|
|
13195
12947
|
try {
|
|
13196
|
-
sessionStorage.removeItem(
|
|
12948
|
+
sessionStorage.removeItem(wc(e));
|
|
13197
12949
|
} catch {}
|
|
13198
12950
|
}
|
|
13199
|
-
function
|
|
12951
|
+
function Oc() {
|
|
13200
12952
|
let e = new URL(location.href), t = e.searchParams.get("booking"), n = e.searchParams.get("token");
|
|
13201
12953
|
return n && (e.searchParams.delete("token"), history.replaceState(history.state, "", e)), t && n ? {
|
|
13202
12954
|
id: t,
|
|
@@ -13205,13 +12957,13 @@ function Gc() {
|
|
|
13205
12957
|
}
|
|
13206
12958
|
//#endregion
|
|
13207
12959
|
//#region src/BookingWidget.svelte
|
|
13208
|
-
var
|
|
12960
|
+
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
12961
|
hash: "svelte-h0br6q",
|
|
13210
12962
|
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
12963
|
};
|
|
13212
|
-
function
|
|
13213
|
-
Xe(t, !0), ri(e,
|
|
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,
|
|
12964
|
+
function Pc(e, t) {
|
|
12965
|
+
Xe(t, !0), ri(e, Nc);
|
|
12966
|
+
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
12967
|
function w(e, t) {
|
|
13216
12968
|
C.dispatchEvent(new CustomEvent(e, {
|
|
13217
12969
|
detail: t,
|
|
@@ -13219,30 +12971,30 @@ function Zc(e, t) {
|
|
|
13219
12971
|
composed: !0
|
|
13220
12972
|
}));
|
|
13221
12973
|
}
|
|
13222
|
-
let T = /* @__PURE__ */ I(() => Ba(c())), E = /* @__PURE__ */ I(() =>
|
|
12974
|
+
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
12975
|
function ne() {
|
|
13224
|
-
let e =
|
|
12976
|
+
let e = Oc();
|
|
13225
12977
|
if (e) {
|
|
13226
12978
|
let t = {
|
|
13227
12979
|
id: x() || e.id,
|
|
13228
12980
|
token: e.token
|
|
13229
12981
|
};
|
|
13230
|
-
return
|
|
12982
|
+
return Ec(n(), t), t;
|
|
13231
12983
|
}
|
|
13232
|
-
let t =
|
|
12984
|
+
let t = Tc(n());
|
|
13233
12985
|
return t && (!x() || t.id === x()) ? t : null;
|
|
13234
12986
|
}
|
|
13235
|
-
let k = /* @__PURE__ */ B(on(J(() => o() && o() > 0 ? o() : 15))),
|
|
12987
|
+
let k = /* @__PURE__ */ B(on(J(() => o() && o() > 0 ? o() : 15))), re = /* @__PURE__ */ B(on(J(() => {
|
|
13236
12988
|
let e = ka(i());
|
|
13237
12989
|
if (e) return e;
|
|
13238
12990
|
let t = /* @__PURE__ */ new Date();
|
|
13239
12991
|
return t.setHours(0, 0, 0, 0), t;
|
|
13240
|
-
}))),
|
|
12992
|
+
}))), ie = /* @__PURE__ */ B(on(J(() => {
|
|
13241
12993
|
let e = ka(a());
|
|
13242
12994
|
if (e) return e;
|
|
13243
12995
|
let t = ka(i()) ?? new Date((/* @__PURE__ */ new Date()).setHours(0, 0, 0, 0));
|
|
13244
12996
|
return new Date(t.getTime() + 2592e5);
|
|
13245
|
-
}))),
|
|
12997
|
+
}))), 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
12998
|
Gr(() => {
|
|
13247
12999
|
let e = getComputedStyle(C);
|
|
13248
13000
|
V(xe, e.getPropertyValue("--brand-navy").trim() || q(xe), !0), V(Se, e.getPropertyValue("--brand-gold").trim() || q(Se), !0);
|
|
@@ -13254,25 +13006,25 @@ function Zc(e, t) {
|
|
|
13254
13006
|
}), Gr(() => {
|
|
13255
13007
|
_() === "overlay" ? (C.style.maxWidth = "none", C.style.setProperty("--sbw-card-width", g())) : C.style.maxWidth = g();
|
|
13256
13008
|
});
|
|
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(
|
|
13009
|
+
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
13010
|
Tn(() => {
|
|
13259
13011
|
ke || !q(Te).length || (ke = !0, q(k) > q(Ee) && V(k, q(Ee), !0));
|
|
13260
13012
|
}), Tn(() => {
|
|
13261
13013
|
let e = s();
|
|
13262
13014
|
J(() => {
|
|
13263
|
-
q(O) <= 2 && V(
|
|
13015
|
+
q(O) <= 2 && V(ae, e || null, !0);
|
|
13264
13016
|
});
|
|
13265
13017
|
});
|
|
13266
13018
|
let Ae = {
|
|
13267
13019
|
arrival: "",
|
|
13268
13020
|
departure: ""
|
|
13269
|
-
}, je = /* @__PURE__ */ I(() => q(
|
|
13270
|
-
arrival: Oa(q(
|
|
13271
|
-
departure: Oa(q(
|
|
13021
|
+
}, je = /* @__PURE__ */ I(() => q(re) && q(ie) && +q(ie) > +q(re) ? Ae = {
|
|
13022
|
+
arrival: Oa(q(re)),
|
|
13023
|
+
departure: Oa(q(ie))
|
|
13272
13024
|
} : Ae), Me = /* @__PURE__ */ B(1);
|
|
13273
13025
|
Gr(() => {
|
|
13274
|
-
te ||
|
|
13275
|
-
e.
|
|
13026
|
+
te || Po(r(), n(), J(() => q(je)), null).then((e) => {
|
|
13027
|
+
e.requirements.length || (V(Me, 2), q(O) === 1 && (V(he, !0), V(O, 2)));
|
|
13276
13028
|
}, () => {});
|
|
13277
13029
|
});
|
|
13278
13030
|
let Ne = {
|
|
@@ -13283,10 +13035,10 @@ function Zc(e, t) {
|
|
|
13283
13035
|
let e = q(ge);
|
|
13284
13036
|
J(() => {
|
|
13285
13037
|
if (e) {
|
|
13286
|
-
V(
|
|
13038
|
+
V(A, Ne.email = e.email, !0), !q(oe).trim() && e.name && V(oe, Ne.name = e.name, !0);
|
|
13287
13039
|
return;
|
|
13288
13040
|
}
|
|
13289
|
-
Ne.email && q(
|
|
13041
|
+
Ne.email && q(A) === Ne.email && V(A, ""), Ne.name && q(oe) === Ne.name && V(oe, ""), Ne = {
|
|
13290
13042
|
email: "",
|
|
13291
13043
|
name: ""
|
|
13292
13044
|
};
|
|
@@ -13295,13 +13047,13 @@ function Zc(e, t) {
|
|
|
13295
13047
|
let Pe = /* @__PURE__ */ I(() => q(O) !== 4);
|
|
13296
13048
|
Tn(() => {
|
|
13297
13049
|
if (!q(Pe)) return;
|
|
13298
|
-
let e = q(
|
|
13299
|
-
from: Oa(q(
|
|
13300
|
-
to: Oa(q(
|
|
13050
|
+
let e = q(re) && q(ie) ? {
|
|
13051
|
+
from: Oa(q(re)),
|
|
13052
|
+
to: Oa(q(ie))
|
|
13301
13053
|
} : void 0;
|
|
13302
13054
|
q(me);
|
|
13303
13055
|
let t = !1, i = setTimeout(() => {
|
|
13304
|
-
|
|
13056
|
+
No(r(), n(), e).then((e) => {
|
|
13305
13057
|
t || (V(de, e, !0), V(pe, null));
|
|
13306
13058
|
}).catch(() => {
|
|
13307
13059
|
t || V(pe, q(E).wizard.errLoad, !0);
|
|
@@ -13311,16 +13063,16 @@ function Zc(e, t) {
|
|
|
13311
13063
|
t = !0, clearTimeout(i);
|
|
13312
13064
|
};
|
|
13313
13065
|
}), Tn(() => {
|
|
13314
|
-
if (q(O) > 2 || !q(
|
|
13066
|
+
if (q(O) > 2 || !q(re) || !q(ie) || +q(ie) <= +q(re) || !(q(k) > 0)) return;
|
|
13315
13067
|
let e = {
|
|
13316
|
-
arrival: Oa(q(
|
|
13317
|
-
departure: Oa(q(
|
|
13068
|
+
arrival: Oa(q(re)),
|
|
13069
|
+
departure: Oa(q(ie)),
|
|
13318
13070
|
boatLengthM: q(k),
|
|
13319
13071
|
boatBeamM: q(we)
|
|
13320
13072
|
};
|
|
13321
13073
|
q(me);
|
|
13322
13074
|
let t = !1, i = setTimeout(() => {
|
|
13323
|
-
|
|
13075
|
+
Fo(r(), n(), e).then((e) => {
|
|
13324
13076
|
t || (V(fe, e, !0), V(pe, null));
|
|
13325
13077
|
}).catch(() => {
|
|
13326
13078
|
t || V(pe, q(E).wizard.errLoad, !0);
|
|
@@ -13335,7 +13087,7 @@ function Zc(e, t) {
|
|
|
13335
13087
|
te || w("sidon-loa-change", { loa: q(k) });
|
|
13336
13088
|
});
|
|
13337
13089
|
function Fe(e) {
|
|
13338
|
-
q(O) <= 2 && V(
|
|
13090
|
+
q(O) <= 2 && V(ae, e, !0);
|
|
13339
13091
|
}
|
|
13340
13092
|
function Ie(e) {
|
|
13341
13093
|
e < q(O) && Ue();
|
|
@@ -13346,22 +13098,22 @@ function Zc(e, t) {
|
|
|
13346
13098
|
let Re = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
|
|
13347
13099
|
function M() {
|
|
13348
13100
|
let e = q(E).wizard;
|
|
13349
|
-
return !q(
|
|
13101
|
+
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
13102
|
}
|
|
13351
13103
|
function ze() {
|
|
13352
|
-
return q(ge) ?
|
|
13104
|
+
return q(ge) ? To(S())?.token ?? null : null;
|
|
13353
13105
|
}
|
|
13354
13106
|
async function N() {
|
|
13355
13107
|
let e = M();
|
|
13356
13108
|
if (e) return void V(be, e, !0);
|
|
13357
13109
|
V(ye, !0);
|
|
13358
13110
|
try {
|
|
13359
|
-
let e = await
|
|
13111
|
+
let e = await Io(r(), n(), {
|
|
13360
13112
|
berthLabel: q(j),
|
|
13361
|
-
arrival: Oa(q(
|
|
13362
|
-
departure: Oa(q(
|
|
13363
|
-
contactName: q(
|
|
13364
|
-
contactEmail: q(
|
|
13113
|
+
arrival: Oa(q(re)),
|
|
13114
|
+
departure: Oa(q(ie)),
|
|
13115
|
+
contactName: q(oe).trim(),
|
|
13116
|
+
contactEmail: q(A).trim(),
|
|
13365
13117
|
contactPhone: q(se).trim() || void 0,
|
|
13366
13118
|
boatName: q(ce).trim(),
|
|
13367
13119
|
boatLengthM: q(k),
|
|
@@ -13372,7 +13124,7 @@ function Zc(e, t) {
|
|
|
13372
13124
|
id: e.booking.id,
|
|
13373
13125
|
token: e.token
|
|
13374
13126
|
};
|
|
13375
|
-
V(D, t, !0),
|
|
13127
|
+
V(D, t, !0), Ec(n(), t), e.payment ? (V(_e, e, !0), V(O, 3)) : He(t.id);
|
|
13376
13128
|
} catch (e) {
|
|
13377
13129
|
Be(e);
|
|
13378
13130
|
} finally {
|
|
@@ -13381,8 +13133,8 @@ function Zc(e, t) {
|
|
|
13381
13133
|
}
|
|
13382
13134
|
function Be(e) {
|
|
13383
13135
|
let t = q(E).wizard;
|
|
13384
|
-
if (!(e instanceof
|
|
13385
|
-
if (
|
|
13136
|
+
if (!(e instanceof Oo) || e.status === 0) return void V(be, t.errNetwork, !0);
|
|
13137
|
+
if (Ka(e.status, e.message)) {
|
|
13386
13138
|
V(Me, 1), V(O, 1), V(be, q(E).docsStep.missingNow, !0);
|
|
13387
13139
|
return;
|
|
13388
13140
|
}
|
|
@@ -13406,7 +13158,7 @@ function Zc(e, t) {
|
|
|
13406
13158
|
V(be, e instanceof Error ? e.message : q(E).wizard.errNetwork, !0), V(ye, !1);
|
|
13407
13159
|
return;
|
|
13408
13160
|
}
|
|
13409
|
-
await
|
|
13161
|
+
await Ro(r(), n(), e).catch(() => {}), V(ye, !1), He(e.id);
|
|
13410
13162
|
}
|
|
13411
13163
|
}
|
|
13412
13164
|
function He(e) {
|
|
@@ -13424,12 +13176,12 @@ function Zc(e, t) {
|
|
|
13424
13176
|
}
|
|
13425
13177
|
if (q(O) !== 3 || !e) return;
|
|
13426
13178
|
V(be, null), V(ye, !0);
|
|
13427
|
-
let t = await
|
|
13179
|
+
let t = await zo(r(), n(), e).then(() => !0, (e) => e instanceof Oo && e.status >= 400 && e.status < 500 && e.status !== 429);
|
|
13428
13180
|
if (V(ye, !1), !t) return void V(be, q(E).wizard.errNetwork, !0);
|
|
13429
|
-
|
|
13181
|
+
Dc(n()), V(D, null), V(_e, null), V(O, 2);
|
|
13430
13182
|
}
|
|
13431
13183
|
function We() {
|
|
13432
|
-
|
|
13184
|
+
Dc(n()), V(D, null), V(be, null), V(O, q(Me), !0);
|
|
13433
13185
|
}
|
|
13434
13186
|
function Ge(e, t) {
|
|
13435
13187
|
t !== null && q(D) && w("sidon-booking-status", {
|
|
@@ -13561,7 +13313,7 @@ function Zc(e, t) {
|
|
|
13561
13313
|
get sidonOrigin() {
|
|
13562
13314
|
return S();
|
|
13563
13315
|
},
|
|
13564
|
-
set sidonOrigin(e =
|
|
13316
|
+
set sidonOrigin(e = xo) {
|
|
13565
13317
|
S(e), z();
|
|
13566
13318
|
},
|
|
13567
13319
|
get sailorApiOrigin() {
|
|
@@ -13570,8 +13322,8 @@ function Zc(e, t) {
|
|
|
13570
13322
|
set sailorApiOrigin(e = "") {
|
|
13571
13323
|
ee(e), z();
|
|
13572
13324
|
}
|
|
13573
|
-
}, qe =
|
|
13574
|
-
var t =
|
|
13325
|
+
}, qe = Mc(), Je = hn(qe), Ye = (e) => {
|
|
13326
|
+
var t = kc();
|
|
13575
13327
|
let n;
|
|
13576
13328
|
var r = H(t);
|
|
13577
13329
|
{
|
|
@@ -13579,7 +13331,7 @@ function Zc(e, t) {
|
|
|
13579
13331
|
lat: q(de)?.profile.lat ?? 0,
|
|
13580
13332
|
lng: q(de)?.profile.lng ?? 0
|
|
13581
13333
|
})), t = /* @__PURE__ */ I(() => q(de)?.berths ?? []), n = /* @__PURE__ */ I(() => q(de)?.overlays ?? []), i = /* @__PURE__ */ I(() => q(de)?.layout ?? null);
|
|
13582
|
-
|
|
13334
|
+
go(r, {
|
|
13583
13335
|
get mapsApiKey() {
|
|
13584
13336
|
return d();
|
|
13585
13337
|
},
|
|
@@ -13638,7 +13390,7 @@ function Zc(e, t) {
|
|
|
13638
13390
|
var t = Nr(), i = hn(t), a = (e) => {
|
|
13639
13391
|
{
|
|
13640
13392
|
let t = /* @__PURE__ */ I(() => c() ? q(T) : null);
|
|
13641
|
-
|
|
13393
|
+
Cc(e, {
|
|
13642
13394
|
get apiOrigin() {
|
|
13643
13395
|
return r();
|
|
13644
13396
|
},
|
|
@@ -13664,14 +13416,14 @@ function Zc(e, t) {
|
|
|
13664
13416
|
});
|
|
13665
13417
|
}
|
|
13666
13418
|
}, o = (e) => {
|
|
13667
|
-
var t =
|
|
13419
|
+
var t = Ac(), n = H(t, !0);
|
|
13668
13420
|
P(t), W(() => Z(n, q(E).wizard.linkInvalid)), X(e, t);
|
|
13669
13421
|
};
|
|
13670
13422
|
Q(i, (e) => {
|
|
13671
13423
|
q(D) ? e(a) : e(o, -1);
|
|
13672
13424
|
}), X(e, t);
|
|
13673
13425
|
}, nt = (e) => {
|
|
13674
|
-
var t =
|
|
13426
|
+
var t = jc(), i = hn(t), a = (e) => {
|
|
13675
13427
|
{
|
|
13676
13428
|
let t = /* @__PURE__ */ I(() => q(j) ?? "—"), n = /* @__PURE__ */ I(() => c() || "en"), r = /* @__PURE__ */ I(() => q(O) > 2);
|
|
13677
13429
|
Pa(e, {
|
|
@@ -13697,16 +13449,16 @@ function Zc(e, t) {
|
|
|
13697
13449
|
V(k, e, !0);
|
|
13698
13450
|
},
|
|
13699
13451
|
get from() {
|
|
13700
|
-
return q(
|
|
13452
|
+
return q(re);
|
|
13701
13453
|
},
|
|
13702
13454
|
set from(e) {
|
|
13703
|
-
V(
|
|
13455
|
+
V(re, e, !0);
|
|
13704
13456
|
},
|
|
13705
13457
|
get to() {
|
|
13706
|
-
return q(
|
|
13458
|
+
return q(ie);
|
|
13707
13459
|
},
|
|
13708
13460
|
set to(e) {
|
|
13709
|
-
V(
|
|
13461
|
+
V(ie, e, !0);
|
|
13710
13462
|
}
|
|
13711
13463
|
});
|
|
13712
13464
|
}
|
|
@@ -13715,7 +13467,7 @@ function Zc(e, t) {
|
|
|
13715
13467
|
q(O) !== 4 && e(a);
|
|
13716
13468
|
});
|
|
13717
13469
|
var o = U(i, 2);
|
|
13718
|
-
|
|
13470
|
+
bo(o, {
|
|
13719
13471
|
get active() {
|
|
13720
13472
|
return q(O);
|
|
13721
13473
|
},
|
|
@@ -13728,14 +13480,14 @@ function Zc(e, t) {
|
|
|
13728
13480
|
onStepClick: Ie
|
|
13729
13481
|
});
|
|
13730
13482
|
var s = U(o, 2), d = (e) => {
|
|
13731
|
-
var t =
|
|
13483
|
+
var t = Ac(), n = H(t, !0);
|
|
13732
13484
|
P(t), W(() => Z(n, q(pe))), X(e, t);
|
|
13733
13485
|
};
|
|
13734
13486
|
Q(s, (e) => {
|
|
13735
13487
|
q(pe) && q(O) !== 4 && e(d);
|
|
13736
13488
|
});
|
|
13737
13489
|
var f = U(s, 2), p = (e) => {
|
|
13738
|
-
|
|
13490
|
+
ds(e, {
|
|
13739
13491
|
get apiOrigin() {
|
|
13740
13492
|
return r();
|
|
13741
13493
|
},
|
|
@@ -13779,7 +13531,7 @@ function Zc(e, t) {
|
|
|
13779
13531
|
}, m = (e) => {
|
|
13780
13532
|
{
|
|
13781
13533
|
let t = /* @__PURE__ */ I(() => !!q(ge));
|
|
13782
|
-
|
|
13534
|
+
ms(e, {
|
|
13783
13535
|
get emailLocked() {
|
|
13784
13536
|
return q(t);
|
|
13785
13537
|
},
|
|
@@ -13787,16 +13539,16 @@ function Zc(e, t) {
|
|
|
13787
13539
|
return q(E);
|
|
13788
13540
|
},
|
|
13789
13541
|
get contactName() {
|
|
13790
|
-
return q(
|
|
13542
|
+
return q(oe);
|
|
13791
13543
|
},
|
|
13792
13544
|
set contactName(e) {
|
|
13793
|
-
V(
|
|
13545
|
+
V(oe, e, !0);
|
|
13794
13546
|
},
|
|
13795
13547
|
get contactEmail() {
|
|
13796
|
-
return q(
|
|
13548
|
+
return q(A);
|
|
13797
13549
|
},
|
|
13798
13550
|
set contactEmail(e) {
|
|
13799
|
-
V(
|
|
13551
|
+
V(A, e, !0);
|
|
13800
13552
|
},
|
|
13801
13553
|
get contactPhone() {
|
|
13802
13554
|
return q(se);
|
|
@@ -13826,8 +13578,8 @@ function Zc(e, t) {
|
|
|
13826
13578
|
}
|
|
13827
13579
|
}, h = (e) => {
|
|
13828
13580
|
{
|
|
13829
|
-
let t = /* @__PURE__ */ I(() =>
|
|
13830
|
-
Oi(
|
|
13581
|
+
let t = /* @__PURE__ */ I(() => oo(q(_e).booking.totalPrice, q(_e).booking.currency, l(), q(T)));
|
|
13582
|
+
Oi(qs(e, {
|
|
13831
13583
|
get payment() {
|
|
13832
13584
|
return q(_e).payment;
|
|
13833
13585
|
},
|
|
@@ -13848,7 +13600,7 @@ function Zc(e, t) {
|
|
|
13848
13600
|
}, g = (e) => {
|
|
13849
13601
|
{
|
|
13850
13602
|
let t = /* @__PURE__ */ I(() => c() ? q(T) : null);
|
|
13851
|
-
|
|
13603
|
+
Cc(e, {
|
|
13852
13604
|
get apiOrigin() {
|
|
13853
13605
|
return r();
|
|
13854
13606
|
},
|
|
@@ -13881,7 +13633,7 @@ function Zc(e, t) {
|
|
|
13881
13633
|
var _ = U(f, 2);
|
|
13882
13634
|
{
|
|
13883
13635
|
let e = /* @__PURE__ */ I(() => q(O) === 1 && !q(he));
|
|
13884
|
-
|
|
13636
|
+
$s(_, {
|
|
13885
13637
|
get step() {
|
|
13886
13638
|
return q(O);
|
|
13887
13639
|
},
|
|
@@ -13915,7 +13667,7 @@ function Zc(e, t) {
|
|
|
13915
13667
|
$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
13668
|
}), X(e, qe), Ze(Ke);
|
|
13917
13669
|
}
|
|
13918
|
-
customElements.define("sidon-booking-widget", Pi(
|
|
13670
|
+
customElements.define("sidon-booking-widget", Pi(Pc, {
|
|
13919
13671
|
marina: {
|
|
13920
13672
|
attribute: "marina",
|
|
13921
13673
|
type: "String"
|