@konnectio/core 4.0.56-rc31 → 4.0.56-rc33
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{ActionField-qP-3ktN4.js → ActionField-tze5AH3K.js} +10 -10
- package/dist/ActionField-tze5AH3K.js.br +0 -0
- package/dist/AvailabilitySkeleton-BO4Erg_O.js +277 -0
- package/dist/AvailabilitySkeleton-BO4Erg_O.js.br +0 -0
- package/dist/AvailabilitySkeleton.vue_vue_type_style_index_0_scoped_17762b9b_lang-_E-GDGw7.js +7681 -0
- package/dist/AvailabilitySkeleton.vue_vue_type_style_index_0_scoped_17762b9b_lang-_E-GDGw7.js.br +0 -0
- package/dist/{CheckoutWindow-RWkSWvbk.js → CheckoutWindow-CIZWV-gI.js} +55 -55
- package/dist/CheckoutWindow-CIZWV-gI.js.br +0 -0
- package/dist/{ErrorMessage-z0JJ8Q3W.js → ErrorMessage-BzZDhDkX.js} +1 -1
- package/dist/ErrorMessage-BzZDhDkX.js.br +0 -0
- package/dist/EventAvailabilityForm-D73TXrag.js +422 -0
- package/dist/EventAvailabilityForm-D73TXrag.js.br +0 -0
- package/dist/Field-oZiblvji.js +41 -0
- package/dist/Field-oZiblvji.js.br +0 -0
- package/dist/{Field-C9r1d8IB.js → Field.vue_vue_type_style_index_0_scoped_992f78a1_lang-Bsv17X7r.js} +11521 -11751
- package/dist/Field.vue_vue_type_style_index_0_scoped_992f78a1_lang-Bsv17X7r.js.br +0 -0
- package/dist/{TermsOfService-oZz-B-KI.js → TermsOfService-yJlRLBDk.js} +2 -2
- package/dist/availability.js +45 -46
- package/dist/availability.js.br +0 -0
- package/dist/event.js +622 -491
- package/dist/event.js.br +0 -0
- package/dist/gift-card-validation.js +87 -77
- package/dist/gift-card-validation.js.br +0 -0
- package/dist/gift-card.js +261 -260
- package/dist/gift-card.js.br +0 -0
- package/dist/hotel.js +1016 -1027
- package/dist/hotel.js.br +0 -0
- package/dist/{masonry.plugin-fa0tia29.js → masonry.plugin-B71LqMrD.js} +1263 -1271
- package/dist/masonry.plugin-B71LqMrD.js.br +0 -0
- package/dist/polyfill.js +2507 -2503
- package/dist/polyfill.js.br +0 -0
- package/dist/style.css +1 -1
- package/dist/style.css.br +0 -0
- package/package.json +25 -24
- package/dist/ActionField-qP-3ktN4.js.br +0 -0
- package/dist/AvailabilitySkeleton-uaCnfwHM.js +0 -7665
- package/dist/AvailabilitySkeleton-uaCnfwHM.js.br +0 -0
- package/dist/CheckoutWindow-RWkSWvbk.js.br +0 -0
- package/dist/ErrorMessage-z0JJ8Q3W.js.br +0 -0
- package/dist/EventAvailabilityForm-LIgUj1t3.js +0 -325
- package/dist/EventAvailabilityForm-LIgUj1t3.js.br +0 -0
- package/dist/Field-C9r1d8IB.js.br +0 -0
- package/dist/HotelAvailabilityForm-AQ4VA15t.js +0 -212
- package/dist/HotelAvailabilityForm-AQ4VA15t.js.br +0 -0
- package/dist/masonry.plugin-fa0tia29.js.br +0 -0
- /package/dist/{_commonjsHelpers-f3sTPFkQ.js → _commonjsHelpers-DaMA6jEr.js} +0 -0
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,325 +0,0 @@
|
|
|
1
|
-
import { N as ze, O as Be, s as B, P as xe, Q as Ue, c as ee, r as s, e as t, R as c, U as $, V as H, W as V, t as P, X as A, Y as _, d as te, f as ae, g as Ge, Z as Me, q as ne, u as je, k as qe, x as Ke, m as J, j as z, $ as Qe, h as We, C as Xe, v as Ye } from "./Field-C9r1d8IB.js";
|
|
2
|
-
import { _ as Ze } from "./AvailabilitySkeleton-uaCnfwHM.js";
|
|
3
|
-
const He = ze("event", () => {
|
|
4
|
-
const E = Be(), { voucher: v } = B(xe()), { display: i } = Ue(), { bearerToken: d, metaData: y } = B(ee()), r = s({}), b = t(() => Object.keys(r.value).length > 0), a = s(void 0), n = s(!0), u = s(c.InitialState), x = s(/* @__PURE__ */ new Date()), T = s(NaN), C = s(1), k = s(NaN), U = s(NaN), D = s(""), L = $("konnectio_name", "", void 0, { serializer: V.string }), N = $("konnectio_phone", "", void 0, { serializer: V.string }), F = $("konnectio_email", "", void 0, { serializer: V.string }), G = s(""), M = s({}), m = s({}), O = s("");
|
|
5
|
-
function o(e) {
|
|
6
|
-
return !1;
|
|
7
|
-
}
|
|
8
|
-
const oe = "DKK", le = 10, se = "Test", ie = "Test 2", re = [], j = s(252), S = t(() => x.value.toISOString()), ue = t(() => o(a.value)), q = t(() => o(a.value) ? a.value.numberOfDays : C.value), ce = t(() => o(a.value) ? a.value.packageCount : 0), ve = t(() => o(a.value) ? a.value.fromDate : ""), f = t(() => r.value.events.find((e) => e.id === k.value)), de = t(() => f.value ? f.value.length : void 0), pe = t(() => o(a.value) ? a.value.templateID : 0), me = t(() => r.value.events), fe = t(() => r.value.templates), ge = t(() => r.value.events.length > 0), he = t(() => r.value.templates.length > 0), K = t(() => f.value && f.value.eventRateType ? f.value.eventRateType : H.None), R = t(() => {
|
|
9
|
-
if (!o(a.value))
|
|
10
|
-
return a.value;
|
|
11
|
-
}), Q = t(() => {
|
|
12
|
-
if (R.value !== void 0) {
|
|
13
|
-
const e = R.value.find(
|
|
14
|
-
(l) => l.time === D.value
|
|
15
|
-
);
|
|
16
|
-
if (e && e.price)
|
|
17
|
-
return e.price;
|
|
18
|
-
}
|
|
19
|
-
return 0;
|
|
20
|
-
}), ye = t(() => {
|
|
21
|
-
o(a.value);
|
|
22
|
-
}), be = t(() => (e) => y.value.eventImages.filter((l) => l.eventID === e));
|
|
23
|
-
function W(e, l, p) {
|
|
24
|
-
let g = 0;
|
|
25
|
-
if (!o(a.value)) {
|
|
26
|
-
const I = m.value[e] || 0;
|
|
27
|
-
if (I > 0) {
|
|
28
|
-
const h = f.value?.products?.find((w) => w.productID === e);
|
|
29
|
-
h && (g += h.price * I);
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
return g;
|
|
33
|
-
}
|
|
34
|
-
function X(e, l) {
|
|
35
|
-
let p = 0;
|
|
36
|
-
if (!o(a.value))
|
|
37
|
-
for (const g in m.value)
|
|
38
|
-
p += W(parseInt(g)) * C.value;
|
|
39
|
-
return p;
|
|
40
|
-
}
|
|
41
|
-
const ke = t(() => (o(a.value), 0)), Se = t(() => {
|
|
42
|
-
if (!o(a.value)) {
|
|
43
|
-
let e = X();
|
|
44
|
-
return e += Q.value, e;
|
|
45
|
-
}
|
|
46
|
-
}), we = t(() => (o(a.value), 0)), _e = t(() => (o(a.value), 0)), De = t(() => {
|
|
47
|
-
const e = m.value;
|
|
48
|
-
let l = 0;
|
|
49
|
-
for (const p in e)
|
|
50
|
-
l += Number.isNaN(e[p]) ? 0 : e[p];
|
|
51
|
-
return l > 0;
|
|
52
|
-
}), Y = t(() => o(a.value) ? !1 : Object.keys(m.value).length > 0), Ie = t(() => !!(L.value !== "" && F.value !== "" && N.value.length >= 5 && (!Y.value || De.value) && (!(!o(a.value) && K.value !== H.FullDayEvent) || D.value !== "")));
|
|
53
|
-
function Ae(e) {
|
|
54
|
-
return u.value === c.ReservationState && k.value === e && n.value;
|
|
55
|
-
}
|
|
56
|
-
const Pe = t(() => !(u.value === c.InitialState && n.value)), Ee = t(() => !(u.value === c.AvailabilityState && n.value)), Te = t(() => a.value !== void 0), Ce = t(() => u.value === c.PaymentState && n.value);
|
|
57
|
-
async function Le() {
|
|
58
|
-
u.value = c.AvailabilityState, n.value = !0;
|
|
59
|
-
try {
|
|
60
|
-
const e = (await A.get("https://production.hotel-service.konnectio.dk/api/event/get", {
|
|
61
|
-
params: {
|
|
62
|
-
language: P(),
|
|
63
|
-
restaurantId: j.value,
|
|
64
|
-
date: S.value
|
|
65
|
-
},
|
|
66
|
-
headers: {
|
|
67
|
-
Authorization: d.value,
|
|
68
|
-
"Fresh-Booking-Ver": "4.0.56-rc31"
|
|
69
|
-
}
|
|
70
|
-
})).data;
|
|
71
|
-
r.value = e, n.value = !1;
|
|
72
|
-
} catch {
|
|
73
|
-
i({
|
|
74
|
-
message: _.t("alert.error.couldntFetchListings"),
|
|
75
|
-
type: "warning"
|
|
76
|
-
});
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
async function Ne(e) {
|
|
80
|
-
u.value = c.ReservationState, n.value = !0;
|
|
81
|
-
try {
|
|
82
|
-
const l = (await A.get("https://production.hotel-service.konnectio.dk/api/event/get-availability", {
|
|
83
|
-
params: {
|
|
84
|
-
language: P(),
|
|
85
|
-
date: S.value,
|
|
86
|
-
templateId: k.value,
|
|
87
|
-
numberOfPeople: T.value
|
|
88
|
-
},
|
|
89
|
-
headers: {
|
|
90
|
-
Authorization: d.value,
|
|
91
|
-
"Fresh-Booking-Ver": "4.0.56-rc31"
|
|
92
|
-
}
|
|
93
|
-
})).data;
|
|
94
|
-
l.templateCounts.length === 0 ? i({
|
|
95
|
-
message: _.t("alert.error.eventNotAvailable"),
|
|
96
|
-
type: "warning"
|
|
97
|
-
}) : (a.value = l, e()), n.value = !1;
|
|
98
|
-
} catch {
|
|
99
|
-
n.value = !1, u.value = c.AvailabilityState, i({
|
|
100
|
-
message: _.t("alert.error.couldntFetchEvent"),
|
|
101
|
-
type: "warning"
|
|
102
|
-
});
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
async function Fe(e) {
|
|
106
|
-
u.value = c.ReservationState, n.value = !0;
|
|
107
|
-
try {
|
|
108
|
-
const l = (await A.get("https://production.hotel-service.konnectio.dk/api/event/vacant-times", {
|
|
109
|
-
params: {
|
|
110
|
-
language: P(),
|
|
111
|
-
date: S.value,
|
|
112
|
-
numberOfPeople: T.value,
|
|
113
|
-
eventId: k.value,
|
|
114
|
-
tableGroupId: U.value,
|
|
115
|
-
restaurantId: j.value
|
|
116
|
-
},
|
|
117
|
-
headers: {
|
|
118
|
-
Authorization: d.value,
|
|
119
|
-
"Fresh-Booking-Ver": "4.0.56-rc31"
|
|
120
|
-
}
|
|
121
|
-
})).data;
|
|
122
|
-
a.value = l, n.value = !1, e();
|
|
123
|
-
} catch {
|
|
124
|
-
n.value = !1, u.value = c.AvailabilityState, i({
|
|
125
|
-
message: _.t("alert.error.couldntFetchEvent"),
|
|
126
|
-
type: "warning"
|
|
127
|
-
});
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
async function Oe() {
|
|
131
|
-
try {
|
|
132
|
-
const e = (await A.get("https://production.hotel-service.konnectio.dk/api/v3/event/validate-discount-code", {
|
|
133
|
-
params: {
|
|
134
|
-
language: P(),
|
|
135
|
-
date: S.value,
|
|
136
|
-
discountCode: O.value
|
|
137
|
-
},
|
|
138
|
-
headers: {
|
|
139
|
-
Authorization: d.value,
|
|
140
|
-
"Fresh-Booking-Ver": "4.0.56-rc31"
|
|
141
|
-
}
|
|
142
|
-
})).data;
|
|
143
|
-
console.log(e);
|
|
144
|
-
} catch (e) {
|
|
145
|
-
console.log(e), i({
|
|
146
|
-
message: _.t("alert.error.discountCodeValidation"),
|
|
147
|
-
type: "warning"
|
|
148
|
-
});
|
|
149
|
-
}
|
|
150
|
-
}
|
|
151
|
-
async function Re(e) {
|
|
152
|
-
u.value = c.PaymentState, n.value = !0;
|
|
153
|
-
const l = () => {
|
|
154
|
-
n.value = !1, u.value = c.ReservationState, i({
|
|
155
|
-
message: _.t("booking.other.errorMessage"),
|
|
156
|
-
type: "warning"
|
|
157
|
-
});
|
|
158
|
-
};
|
|
159
|
-
let p, g;
|
|
160
|
-
if (!o(a.value)) {
|
|
161
|
-
p = [], g = D.value;
|
|
162
|
-
for (const w in m.value) {
|
|
163
|
-
const Z = m.value[parseInt(w)];
|
|
164
|
-
Z > 0 && p.push({
|
|
165
|
-
id: parseInt(w),
|
|
166
|
-
quantity: Z
|
|
167
|
-
});
|
|
168
|
-
}
|
|
169
|
-
}
|
|
170
|
-
let I = "https://production.hotel-service.konnectio.dk/api/v3/event/template-book";
|
|
171
|
-
const h = {
|
|
172
|
-
date: S.value,
|
|
173
|
-
name: L.value,
|
|
174
|
-
email: F.value,
|
|
175
|
-
phone: N.value,
|
|
176
|
-
remark: G.value,
|
|
177
|
-
numberOfPeople: T.value,
|
|
178
|
-
days: q.value,
|
|
179
|
-
discountCode: O.value,
|
|
180
|
-
giftCardCode: v.value,
|
|
181
|
-
checkoutUrl: window.location.origin,
|
|
182
|
-
privacyUrl: window.location.origin
|
|
183
|
-
};
|
|
184
|
-
o(a.value) || (h.time = g, h.eventId = k.value, h.products = p, I = "https://production.hotel-service.konnectio.dk/api/v3/event/event-book"), await A.post(I, h, {
|
|
185
|
-
headers: {
|
|
186
|
-
Authorization: d.value,
|
|
187
|
-
"Fresh-Booking-Ver": "4.0.56-rc31"
|
|
188
|
-
}
|
|
189
|
-
}).then((w) => {
|
|
190
|
-
n.value = !1, E.pay({
|
|
191
|
-
callback: e,
|
|
192
|
-
response: w.data
|
|
193
|
-
});
|
|
194
|
-
}).catch(() => l());
|
|
195
|
-
}
|
|
196
|
-
function $e(e) {
|
|
197
|
-
M.value = {}, m.value = {}, D.value = "", e();
|
|
198
|
-
}
|
|
199
|
-
function Ve() {
|
|
200
|
-
}
|
|
201
|
-
return {
|
|
202
|
-
metaData: y,
|
|
203
|
-
listingData: r,
|
|
204
|
-
tableBasePrice: Q,
|
|
205
|
-
availabilityData: a,
|
|
206
|
-
isLoading: n,
|
|
207
|
-
moduleState: u,
|
|
208
|
-
searchDate: x,
|
|
209
|
-
numberOfPeople: T,
|
|
210
|
-
numberOfDays: C,
|
|
211
|
-
eventId: k,
|
|
212
|
-
tableGroupId: U,
|
|
213
|
-
arrivalTime: D,
|
|
214
|
-
addons: M,
|
|
215
|
-
products: m,
|
|
216
|
-
discountCode: O,
|
|
217
|
-
name: L,
|
|
218
|
-
phone: N,
|
|
219
|
-
email: F,
|
|
220
|
-
remark: G,
|
|
221
|
-
isTemplateEvent: ue,
|
|
222
|
-
currency: oe,
|
|
223
|
-
maxNumberOfPeople: le,
|
|
224
|
-
title: se,
|
|
225
|
-
subtitle: ie,
|
|
226
|
-
slideshow: re,
|
|
227
|
-
date: S,
|
|
228
|
-
numberOfTotalDays: q,
|
|
229
|
-
numberOfRooms: ce,
|
|
230
|
-
fromDate: ve,
|
|
231
|
-
getEventData: f,
|
|
232
|
-
length: de,
|
|
233
|
-
templateId: pe,
|
|
234
|
-
getEvents: me,
|
|
235
|
-
getTemplates: fe,
|
|
236
|
-
hasEvents: ge,
|
|
237
|
-
hasTemplates: he,
|
|
238
|
-
basePrice: ke,
|
|
239
|
-
totalPrice: Se,
|
|
240
|
-
getTemplateData: ye,
|
|
241
|
-
getEventTableData: R,
|
|
242
|
-
roomUpgrade: _e,
|
|
243
|
-
weekendFee: we,
|
|
244
|
-
hasProducts: Y,
|
|
245
|
-
eventRateType: K,
|
|
246
|
-
isReservationFormFilled: Ie,
|
|
247
|
-
isMetaDataAvailable: Pe,
|
|
248
|
-
areListingsAvailable: Ee,
|
|
249
|
-
isAvailabilityDataAvailable: Te,
|
|
250
|
-
isPaymentLoading: Ce,
|
|
251
|
-
getEventImages: be,
|
|
252
|
-
isEventListingLoading: Ae,
|
|
253
|
-
// fetchMetaData,
|
|
254
|
-
fetchListings: Le,
|
|
255
|
-
getTemplateAvailability: Ne,
|
|
256
|
-
getEventAvailability: Fe,
|
|
257
|
-
validateDiscountCode: Oe,
|
|
258
|
-
localAddonPrice: W,
|
|
259
|
-
totalAddonPrice: X,
|
|
260
|
-
createBooking: Re,
|
|
261
|
-
reset: $e,
|
|
262
|
-
initialize: Ve,
|
|
263
|
-
hasListingData: b
|
|
264
|
-
};
|
|
265
|
-
}), Je = /* @__PURE__ */ te({
|
|
266
|
-
__name: "_",
|
|
267
|
-
props: {
|
|
268
|
-
type: { default: "submit" }
|
|
269
|
-
},
|
|
270
|
-
emits: ["submit"],
|
|
271
|
-
setup(E, { emit: v }) {
|
|
272
|
-
const i = s(!1), d = v;
|
|
273
|
-
ee();
|
|
274
|
-
function y() {
|
|
275
|
-
d("submit");
|
|
276
|
-
}
|
|
277
|
-
return (r, b) => (ae(), Ge("form", {
|
|
278
|
-
onSubmit: ne(y, ["prevent"])
|
|
279
|
-
}, [
|
|
280
|
-
Me(r.$slots, "default", { isLoading: i.value })
|
|
281
|
-
], 32));
|
|
282
|
-
}
|
|
283
|
-
}), et = { class: "konnectio-search-button" }, tt = /* @__PURE__ */ te({
|
|
284
|
-
__name: "EventAvailabilityForm",
|
|
285
|
-
props: {
|
|
286
|
-
link: {}
|
|
287
|
-
},
|
|
288
|
-
setup(E) {
|
|
289
|
-
const v = E, { searchDate: i } = B(He()), { t: d } = je(), y = t(() => typeof v.link != "string");
|
|
290
|
-
function r() {
|
|
291
|
-
if (y.value) {
|
|
292
|
-
const b = P();
|
|
293
|
-
v.link[b] ? window.location.replace(v.link[b]) : v.link.en && window.location.replace(v.link.en);
|
|
294
|
-
} else
|
|
295
|
-
window.location.replace(v.link);
|
|
296
|
-
}
|
|
297
|
-
return (b, a) => (ae(), qe(Je, {
|
|
298
|
-
id: "konnectio-event-search-form",
|
|
299
|
-
type: "availability",
|
|
300
|
-
onSubmit: ne(r, ["prevent"])
|
|
301
|
-
}, {
|
|
302
|
-
default: Ke(() => [
|
|
303
|
-
J(Ze, {
|
|
304
|
-
modelValue: z(i),
|
|
305
|
-
"onUpdate:modelValue": a[0] || (a[0] = (n) => Qe(i) ? i.value = n : null),
|
|
306
|
-
label: z(d)("event.selectDate"),
|
|
307
|
-
"icon-type": "fas",
|
|
308
|
-
"icon-placement": "label",
|
|
309
|
-
"min-date": /* @__PURE__ */ new Date()
|
|
310
|
-
}, null, 8, ["modelValue", "label", "min-date"]),
|
|
311
|
-
We("div", et, [
|
|
312
|
-
J(Xe, {
|
|
313
|
-
type: "submit",
|
|
314
|
-
label: z(d)("availability.buttonLabel")
|
|
315
|
-
}, null, 8, ["label"])
|
|
316
|
-
])
|
|
317
|
-
]),
|
|
318
|
-
_: 1
|
|
319
|
-
}));
|
|
320
|
-
}
|
|
321
|
-
}), ot = /* @__PURE__ */ Ye(tt, [["__scopeId", "data-v-0a3de19e"]]);
|
|
322
|
-
export {
|
|
323
|
-
ot as E,
|
|
324
|
-
He as u
|
|
325
|
-
};
|
|
Binary file
|
|
Binary file
|
|
@@ -1,212 +0,0 @@
|
|
|
1
|
-
import { d as se, u as ue, i as ce, s as V, a as q, b as z, c as re, r as v, e as i, w as E, o as de, f as s, g as D, h, j as e, k as m, T as L, _ as be, l as f, m as A, F as M, n as G, C as J, p as K, q as ve, t as me, v as ge } from "./Field-C9r1d8IB.js";
|
|
2
|
-
import { _ as pe } from "./AvailabilitySkeleton-uaCnfwHM.js";
|
|
3
|
-
const De = {
|
|
4
|
-
key: 0,
|
|
5
|
-
class: "konnectio-availability-location"
|
|
6
|
-
}, fe = { id: "konnectio-availability-date-selection" }, ke = {
|
|
7
|
-
key: 1,
|
|
8
|
-
id: "konnectio-availability-guest-selection"
|
|
9
|
-
}, ye = { id: "konnectio-availability-confirmation" }, we = /* @__PURE__ */ se({
|
|
10
|
-
__name: "HotelAvailabilityForm",
|
|
11
|
-
props: {
|
|
12
|
-
booking: { type: Boolean, default: !1 },
|
|
13
|
-
link: {},
|
|
14
|
-
selectedLocation: { default: NaN }
|
|
15
|
-
},
|
|
16
|
-
setup(P) {
|
|
17
|
-
const { t: n } = ue(), Q = ce("emitter"), l = P, {
|
|
18
|
-
adults: N,
|
|
19
|
-
children: C,
|
|
20
|
-
arrivalDate: S,
|
|
21
|
-
departureDate: U,
|
|
22
|
-
location: _,
|
|
23
|
-
isExpired: W
|
|
24
|
-
} = V(q()), { reset: X, update: Y } = q(), { fetchAvailabilityData: Z } = z(), { areListingsLoading: H, hotelList: R, hasHotelList: k } = V(z()), {
|
|
25
|
-
firstSelectableDateOffset: x,
|
|
26
|
-
lastSelectableDateOffset: B,
|
|
27
|
-
disableChildSelection: r,
|
|
28
|
-
disableAdultSelection: u,
|
|
29
|
-
controlLocation: ee
|
|
30
|
-
} = V(re()), ae = () => new Date(new Date((/* @__PURE__ */ new Date()).setDate((/* @__PURE__ */ new Date()).getDate() + 1)).setHours(12, 0, 0, 0)), le = () => new Date(new Date((/* @__PURE__ */ new Date()).setDate((/* @__PURE__ */ new Date()).getDate() + 2)).setHours(12, 0, 0, 0)), F = v(2), I = v(0), O = v(ae()), T = v(le()), $ = v(ee.value), d = i({
|
|
31
|
-
get: () => l.booking ? N.value : F.value,
|
|
32
|
-
set: (a) => {
|
|
33
|
-
l.booking ? N.value = Number(a) : F.value = Number(a);
|
|
34
|
-
}
|
|
35
|
-
}), g = i({
|
|
36
|
-
get: () => l.booking ? C.value : I.value,
|
|
37
|
-
set: (a) => {
|
|
38
|
-
l.booking ? C.value = Number(a) : I.value = Number(a);
|
|
39
|
-
}
|
|
40
|
-
}), c = i({
|
|
41
|
-
get: () => l.booking ? S.value : O.value,
|
|
42
|
-
set: (a) => {
|
|
43
|
-
l.booking ? S.value = a : O.value = a;
|
|
44
|
-
}
|
|
45
|
-
}), b = i({
|
|
46
|
-
get: () => l.booking ? U.value : T.value,
|
|
47
|
-
set: (a) => {
|
|
48
|
-
l.booking ? U.value = a : T.value = a;
|
|
49
|
-
}
|
|
50
|
-
}), y = i({
|
|
51
|
-
get: () => isNaN(l.selectedLocation) ? l.booking ? _.value : $.value : l.selectedLocation,
|
|
52
|
-
set: (a) => {
|
|
53
|
-
l.booking ? _.value = a : $.value = a;
|
|
54
|
-
}
|
|
55
|
-
}), j = i(() => {
|
|
56
|
-
const a = R.value.find(({ value: t }) => t === l.selectedLocation);
|
|
57
|
-
return a ? a.label : "";
|
|
58
|
-
}), p = v([]), te = i(() => new Date((/* @__PURE__ */ new Date()).setDate((/* @__PURE__ */ new Date()).getDate() + (x.value - 1))));
|
|
59
|
-
i(() => new Date((/* @__PURE__ */ new Date()).setDate((/* @__PURE__ */ new Date()).getDate() + B.value))), i(() => new Date((/* @__PURE__ */ new Date()).setDate(c.value.getDate() + x.value)));
|
|
60
|
-
const oe = i(() => new Date((/* @__PURE__ */ new Date()).setDate(c.value.getDate() + (B.value + 1)))), w = i(() => !(!u && d.value === 0)), ne = i(() => typeof l.link != "string");
|
|
61
|
-
function ie() {
|
|
62
|
-
if (l.booking === !1)
|
|
63
|
-
if (Y({
|
|
64
|
-
adults: d.value,
|
|
65
|
-
children: g.value,
|
|
66
|
-
arrivalDate: c.value,
|
|
67
|
-
departureDate: b.value,
|
|
68
|
-
location: y.value
|
|
69
|
-
}), ne.value) {
|
|
70
|
-
const a = me();
|
|
71
|
-
l.link[a] ? window.location.replace(l.link[a]) : l.link.en ? window.location.replace(l.link.en) : console.log("Sprog understøttes ikke");
|
|
72
|
-
} else
|
|
73
|
-
window.location.replace(l.link);
|
|
74
|
-
else
|
|
75
|
-
w.value && Z();
|
|
76
|
-
}
|
|
77
|
-
return E(c, (a) => {
|
|
78
|
-
const t = new Date(new Date(a).setDate(new Date(a).getDate() + 1));
|
|
79
|
-
new Date(b.value) < t && (b.value = t);
|
|
80
|
-
}), Q.on("forcedDateChange", () => {
|
|
81
|
-
p.value = [c.value, b.value];
|
|
82
|
-
}), E(p, (a) => {
|
|
83
|
-
c.value = a[0], b.value = a[1];
|
|
84
|
-
}), de(() => {
|
|
85
|
-
W.value && X(), p.value = [c.value, b.value];
|
|
86
|
-
}), (a, t) => (s(), D("form", {
|
|
87
|
-
id: "konnectio-availability-form",
|
|
88
|
-
class: K({ reservation: a.booking }),
|
|
89
|
-
type: "availability",
|
|
90
|
-
onSubmit: ve(ie, ["prevent"])
|
|
91
|
-
}, [
|
|
92
|
-
h("ul", {
|
|
93
|
-
id: "konnectio-availability-form-content",
|
|
94
|
-
class: K([
|
|
95
|
-
{ "is-booking-page": a.booking },
|
|
96
|
-
{ "only-adult-guests": !e(u) && e(r) },
|
|
97
|
-
{ "only-child-guests": !e(r) && e(u) },
|
|
98
|
-
{ "no-guests": e(u) && e(r) },
|
|
99
|
-
{ "all-guests": !e(u) && !e(r) },
|
|
100
|
-
{ "has-location": e(k) }
|
|
101
|
-
])
|
|
102
|
-
}, [
|
|
103
|
-
e(k) ? (s(), D("li", De, [
|
|
104
|
-
isNaN(a.selectedLocation) ? (s(), m(be, {
|
|
105
|
-
key: 1,
|
|
106
|
-
modelValue: y.value,
|
|
107
|
-
"onUpdate:modelValue": t[1] || (t[1] = (o) => y.value = o),
|
|
108
|
-
label: e(n)("general.location"),
|
|
109
|
-
icon: "location-dot",
|
|
110
|
-
"icon-type": "fas",
|
|
111
|
-
"icon-placement": "label",
|
|
112
|
-
options: e(R),
|
|
113
|
-
searchable: !1
|
|
114
|
-
}, null, 8, ["modelValue", "label", "options"])) : (s(), m(L, {
|
|
115
|
-
key: 0,
|
|
116
|
-
modelValue: j.value,
|
|
117
|
-
"onUpdate:modelValue": t[0] || (t[0] = (o) => j.value = o),
|
|
118
|
-
label: e(n)("general.location"),
|
|
119
|
-
icon: "location-dot",
|
|
120
|
-
"icon-type": "fas",
|
|
121
|
-
"icon-placement": "label",
|
|
122
|
-
readonly: ""
|
|
123
|
-
}, null, 8, ["modelValue", "label"]))
|
|
124
|
-
])) : f("", !0),
|
|
125
|
-
h("li", fe, [
|
|
126
|
-
A(pe, {
|
|
127
|
-
modelValue: p.value,
|
|
128
|
-
"onUpdate:modelValue": t[2] || (t[2] = (o) => p.value = o),
|
|
129
|
-
label: e(n)("availability.checkInOut"),
|
|
130
|
-
"icon-type": "fas",
|
|
131
|
-
"icon-placement": "label",
|
|
132
|
-
"min-range": 1,
|
|
133
|
-
"min-date": te.value,
|
|
134
|
-
"max-date": oe.value,
|
|
135
|
-
range: ""
|
|
136
|
-
}, null, 8, ["modelValue", "label", "min-date", "max-date"]),
|
|
137
|
-
f("", !0)
|
|
138
|
-
]),
|
|
139
|
-
!e(u) || !e(r) ? (s(), D("li", ke, [
|
|
140
|
-
e(u) ? f("", !0) : (s(), D(M, { key: 0 }, [
|
|
141
|
-
e(k) ? (s(), m(L, {
|
|
142
|
-
key: 0,
|
|
143
|
-
modelValue: d.value,
|
|
144
|
-
"onUpdate:modelValue": t[5] || (t[5] = (o) => d.value = o),
|
|
145
|
-
type: "number",
|
|
146
|
-
label: e(n)("availability.adults"),
|
|
147
|
-
description: e(n)("general.adultAgeRange"),
|
|
148
|
-
"icon-type": "fas",
|
|
149
|
-
"icon-placement": "label",
|
|
150
|
-
name: "adults",
|
|
151
|
-
icon: "male"
|
|
152
|
-
}, null, 8, ["modelValue", "label", "description"])) : (s(), m(G, {
|
|
153
|
-
key: 1,
|
|
154
|
-
modelValue: d.value,
|
|
155
|
-
"onUpdate:modelValue": t[6] || (t[6] = (o) => d.value = o),
|
|
156
|
-
label: e(n)("availability.adults"),
|
|
157
|
-
description: e(n)("general.adultAgeRange"),
|
|
158
|
-
"icon-type": "fas",
|
|
159
|
-
"icon-placement": "label",
|
|
160
|
-
name: "adults",
|
|
161
|
-
icon: "male"
|
|
162
|
-
}, null, 8, ["modelValue", "label", "description"]))
|
|
163
|
-
], 64)),
|
|
164
|
-
e(r) ? f("", !0) : (s(), D(M, { key: 1 }, [
|
|
165
|
-
e(k) ? (s(), m(L, {
|
|
166
|
-
key: 0,
|
|
167
|
-
modelValue: g.value,
|
|
168
|
-
"onUpdate:modelValue": t[7] || (t[7] = (o) => g.value = o),
|
|
169
|
-
type: "number",
|
|
170
|
-
label: e(n)("availability.children"),
|
|
171
|
-
description: e(n)("general.childAgeRange"),
|
|
172
|
-
"icon-type": "fas",
|
|
173
|
-
"icon-placement": "label",
|
|
174
|
-
name: "children",
|
|
175
|
-
icon: "child"
|
|
176
|
-
}, null, 8, ["modelValue", "label", "description"])) : (s(), m(G, {
|
|
177
|
-
key: 1,
|
|
178
|
-
modelValue: g.value,
|
|
179
|
-
"onUpdate:modelValue": t[8] || (t[8] = (o) => g.value = o),
|
|
180
|
-
label: e(n)("availability.children"),
|
|
181
|
-
description: e(n)("general.childAgeRange"),
|
|
182
|
-
"icon-type": "fas",
|
|
183
|
-
"icon-placement": "label",
|
|
184
|
-
name: "children",
|
|
185
|
-
icon: "child"
|
|
186
|
-
}, null, 8, ["modelValue", "label", "description"]))
|
|
187
|
-
], 64))
|
|
188
|
-
])) : f("", !0),
|
|
189
|
-
h("li", ye, [
|
|
190
|
-
A(J, {
|
|
191
|
-
class: "konnectio-availability-submit-small",
|
|
192
|
-
type: "submit",
|
|
193
|
-
icon: "search",
|
|
194
|
-
"icon-type": "fas",
|
|
195
|
-
disabled: !w.value,
|
|
196
|
-
"is-loading": e(H)
|
|
197
|
-
}, null, 8, ["disabled", "is-loading"]),
|
|
198
|
-
A(J, {
|
|
199
|
-
class: "konnectio-availability-submit-large",
|
|
200
|
-
type: "submit",
|
|
201
|
-
label: e(n)("availability.buttonLabel"),
|
|
202
|
-
disabled: !w.value,
|
|
203
|
-
"is-loading": e(H)
|
|
204
|
-
}, null, 8, ["label", "disabled", "is-loading"])
|
|
205
|
-
])
|
|
206
|
-
], 2)
|
|
207
|
-
], 34));
|
|
208
|
-
}
|
|
209
|
-
}), Le = /* @__PURE__ */ ge(we, [["__scopeId", "data-v-c0f38352"]]);
|
|
210
|
-
export {
|
|
211
|
-
Le as H
|
|
212
|
-
};
|
|
Binary file
|
|
Binary file
|
|
File without changes
|