@konnectio/core
Version:
Konnectio Core Frontend Integration.
1,333 lines • 488 kB
JavaScript
import { d as Dt, h as A, b as x, e as y, i as Z, F as ut, v as Ct, J as Ke, K as jn, a as at, L as Yn, j as Ti, n as Se, M as wr, u as Jt, s as Ft, r as Gt, N as Pr, g as l, z as gt, A as Cr, w as it, t as O, E as xe, G as Ne, f as B, q as Xn, C as Tr, c as Tt, x as io, O as Jo, o as lo, D as rn, S as Mr, P as xr, k as Sr, _ as Ar, l as Ir, m as Or, p as zr } from "./mitt-CWSmi8M-.js";
import { f as Er } from "./index-Dp94FdK7.js";
import { G as Br } from "./style-DJF9fHLt.js";
import { R as Zr, B as an, L as Dr, S as Nr, M as Rr, T as Vr, C as Qo, b as Kn, V as Hr, a as Fr } from "./masonry.plugin-DnqS8CJ4.js";
import { _ as Qt, f as Re, b as fe, u as Mi, I as Pt, s as ce, m as ki, l as Jn, r as Pe, p as se, t as no, a as uo, d as ln, F as Gr, h as ho, e as oe, i as wi, B as ys, H as ts, x as Ur, T as ne, J as $r, M as es, q as is, K as Wr, N as ns, C as qr, v as os } from "./SelectField.vue_vue_type_style_index_0_lang-Cev1TH7y.js";
import { A as jr, H as Yr } from "./AvailabilitySkeleton-D3iv0cT1.js";
import { S as Xr } from "./TermsOfService-D_lDtdlp.js";
import { a as oo, B as bs, C as Kr, P as Jr } from "./CheckoutWindow-CF2-eaiR.js";
import { A as Qr } from "./ActionField-BsmMIhW6.js";
import { g as ta } from "./_commonjsHelpers-DaMA6jEr.js";
import { _ as Ls } from "./AvailabilitySkeleton.vue_vue_type_style_index_0_scoped_86730e88_lang-XzdmauPt.js";
function so(h, f = {}, d) {
for (const m in h) {
const w = h[m], o = d ? `${d}:${m}` : m;
typeof w == "object" && w !== null ? so(w, f, o) : typeof w == "function" && (f[o] = w);
}
return f;
}
const ea = { run: (h) => h() }, ia = () => ea, ks = typeof console.createTask < "u" ? console.createTask : ia;
function na(h, f) {
const d = f.shift(), m = ks(d);
return h.reduce(
(w, o) => w.then(() => m.run(() => o(...f))),
Promise.resolve()
);
}
function oa(h, f) {
const d = f.shift(), m = ks(d);
return Promise.all(h.map((w) => m.run(() => w(...f))));
}
function Qn(h, f) {
for (const d of [...h])
d(f);
}
class sa {
constructor() {
this._hooks = {}, this._before = void 0, this._after = void 0, this._deprecatedMessages = void 0, this._deprecatedHooks = {}, this.hook = this.hook.bind(this), this.callHook = this.callHook.bind(this), this.callHookWith = this.callHookWith.bind(this);
}
hook(f, d, m = {}) {
if (!f || typeof d != "function")
return () => {
};
const w = f;
let o;
for (; this._deprecatedHooks[f]; )
o = this._deprecatedHooks[f], f = o.to;
if (o && !m.allowDeprecated) {
let r = o.message;
r || (r = `${w} hook has been deprecated` + (o.to ? `, please use ${o.to}` : "")), this._deprecatedMessages || (this._deprecatedMessages = /* @__PURE__ */ new Set()), this._deprecatedMessages.has(r) || (console.warn(r), this._deprecatedMessages.add(r));
}
if (!d.name)
try {
Object.defineProperty(d, "name", {
get: () => "_" + f.replace(/\W+/g, "_") + "_hook_cb",
configurable: !0
});
} catch {
}
return this._hooks[f] = this._hooks[f] || [], this._hooks[f].push(d), () => {
d && (this.removeHook(f, d), d = void 0);
};
}
hookOnce(f, d) {
let m, w = (...o) => (typeof m == "function" && m(), m = void 0, w = void 0, d(...o));
return m = this.hook(f, w), m;
}
removeHook(f, d) {
if (this._hooks[f]) {
const m = this._hooks[f].indexOf(d);
m !== -1 && this._hooks[f].splice(m, 1), this._hooks[f].length === 0 && delete this._hooks[f];
}
}
deprecateHook(f, d) {
this._deprecatedHooks[f] = typeof d == "string" ? { to: d } : d;
const m = this._hooks[f] || [];
delete this._hooks[f];
for (const w of m)
this.hook(f, w);
}
deprecateHooks(f) {
Object.assign(this._deprecatedHooks, f);
for (const d in f)
this.deprecateHook(d, f[d]);
}
addHooks(f) {
const d = so(f), m = Object.keys(d).map(
(w) => this.hook(w, d[w])
);
return () => {
for (const w of m.splice(0, m.length))
w();
};
}
removeHooks(f) {
const d = so(f);
for (const m in d)
this.removeHook(m, d[m]);
}
removeAllHooks() {
for (const f in this._hooks)
delete this._hooks[f];
}
callHook(f, ...d) {
return d.unshift(f), this.callHookWith(na, f, ...d);
}
callHookParallel(f, ...d) {
return d.unshift(f), this.callHookWith(oa, f, ...d);
}
callHookWith(f, d, ...m) {
const w = this._before || this._after ? { name: d, args: m, context: {} } : void 0;
this._before && Qn(this._before, w);
const o = f(
d in this._hooks ? [...this._hooks[d]] : [],
m
);
return o instanceof Promise ? o.finally(() => {
this._after && w && Qn(this._after, w);
}) : (this._after && w && Qn(this._after, w), o);
}
beforeEach(f) {
return this._before = this._before || [], this._before.push(f), () => {
if (this._before !== void 0) {
const d = this._before.indexOf(f);
d !== -1 && this._before.splice(d, 1);
}
};
}
afterEach(f) {
return this._after = this._after || [], this._after.push(f), () => {
if (this._after !== void 0) {
const d = this._after.indexOf(f);
d !== -1 && this._after.splice(d, 1);
}
};
}
}
function ra() {
return new sa();
}
function ss(h, f) {
return f ? {
width: window.innerWidth,
height: window.innerHeight,
left: 0,
top: 0
} : h.getBoundingClientRect();
}
function rs(h, f) {
return h && window.matchMedia && window.matchMedia(`(max-width: ${f}px)`).matches;
}
function as() {
return {
onLoadCallback: null,
bounds: {},
offsets: {},
ratios: {},
eventPosition: {},
scaledDimensions: {}
};
}
function to(h, f, d, m) {
return {
x: h - d,
y: f - m
};
}
function aa(h, f) {
return {
x: (f.width - h.width) / h.width,
y: (f.height - h.height) / h.height
};
}
function la(h, f) {
return {
width: h.naturalWidth * f,
height: h.naturalHeight * f
};
}
function ws(h) {
return {
x: typeof h.pageX == "number" ? h.pageX : h.changedTouches[0].pageX,
y: typeof h.pageY == "number" ? h.pageY : h.changedTouches[0].pageY
};
}
function ua(h, f, d) {
const m = (h.pageX - (window.pageXOffset + f.bounds.left)) * -f.ratios.x, w = (h.pageY - (window.pageYOffset + f.bounds.top)) * -f.ratios.y;
return {
pageX: m + (d ? (window.innerWidth - f.bounds.width) / 2 : 0),
pageY: w + (d ? (window.innerHeight - f.bounds.height) / 2 : 0)
};
}
function ha(h, f) {
const d = Math.abs(h.pageX - f.eventPosition.x), m = Math.abs(h.pageY - f.eventPosition.y);
return d > 5 || m > 5;
}
function da(h, f) {
const d = Ps(h, f);
return {
left: Math.max(Math.min(d.x, f.bounds.width), 0) * -f.ratios.x,
top: Math.max(Math.min(d.y, f.bounds.height), 0) * -f.ratios.y
};
}
function ca(h, f) {
const d = Ps(h, f);
return {
left: Math.max(Math.min(d.x, 0), (f.scaledDimensions.width - f.bounds.width) * -1),
top: Math.max(Math.min(d.y, 0), (f.scaledDimensions.height - f.bounds.height) * -1)
};
}
function Ps(h, f) {
const d = ws(h);
return {
x: d.x - f.offsets.x,
y: d.y - f.offsets.y
};
}
const fa = Dt({
name: "InnerImageZoom",
props: {
moveType: {
type: String,
default: "pan"
},
zoomType: {
type: String,
default: "click"
},
src: {
type: String,
required: !0
},
imgAttributes: {
type: Object,
default: () => ({})
},
sources: Array,
width: Number,
height: Number,
hasSpacer: Boolean,
zoomSrc: String,
zoomScale: {
type: Number,
default: 1
},
zoomPreload: Boolean,
fadeDuration: {
type: Number,
default: 150
},
fullscreenOnMobile: Boolean,
mobileBreakpoint: {
type: Number,
default: 640
},
hideHint: Boolean,
hideCloseButton: Boolean,
className: String,
afterZoomIn: Function,
afterZoomOut: Function
},
data() {
return {
isActive: this.zoomPreload || !1,
isTouch: !1,
isZoomed: !1,
isFullscreen: !1,
isDragging: !1,
currentMoveType: this.moveType,
left: 0,
top: 0,
imgProps: {}
};
},
created() {
this.imgProps = as(), rs(this.fullscreenOnMobile, this.mobileBreakpoint) && (this.isActive = !1);
},
computed: {
validSources: function() {
return this.sources ? this.sources.filter((h) => h.srcSet) : [];
},
createSpacer: function() {
return this.width && this.height && this.hasSpacer;
}
},
methods: {
handleMouseEnter(h) {
this.isActive = !0, this.zoomType === "hover" && !this.isZoomed && this.handleClick(h);
},
handleTouchStart() {
this.isTouch = !0, this.isFullscreen = rs(this.fullscreenOnMobile, this.mobileBreakpoint), this.currentMoveType = "drag";
},
handleClick(h) {
if (this.isZoomed) {
this.isTouch ? this.hideCloseButton && this.handleClose() : !this.isDragging && this.zoomOut();
return;
}
this.isTouch && (this.isActive = !0), this.imgProps.zoomImg ? (this.handleLoad({ target: this.imgProps.zoomImg }), this.zoomIn(h)) : this.imgProps.onLoadCallback = this.zoomIn.bind(this, h);
},
handleLoad(h) {
const f = la(h.target, this.zoomScale);
this.imgProps.zoomImg = h.target, this.imgProps.zoomImg.setAttribute("width", f.width), this.imgProps.zoomImg.setAttribute("height", f.height), this.imgProps.scaledDimensions = f, this.imgProps.bounds = ss(this.$refs.img, !1), this.imgProps.ratios = aa(this.imgProps.bounds, f), this.imgProps.onLoadCallback && (this.imgProps.onLoadCallback(), this.imgProps.onLoadCallback = null);
},
handleMouseMove(h) {
const f = da(h, this.imgProps);
this.left = f.left, this.top = f.top;
},
handleDragStart(h) {
const f = ws(h);
this.imgProps.offsets = to(
f.x,
f.y,
this.imgProps.zoomImg.offsetLeft,
this.imgProps.zoomImg.offsetTop
), this.imgProps.zoomImg.addEventListener(this.isTouch ? "touchmove" : "mousemove", this.handleDragMove, {
passive: !0
}), this.isTouch || (this.imgProps.eventPosition = f);
},
handleDragMove(h) {
const f = ca(h, this.imgProps);
this.left = f.left, this.top = f.top;
},
handleDragEnd(h) {
this.imgProps.zoomImg.removeEventListener(this.isTouch ? "touchmove" : "mousemove", this.handleDragMove), this.isTouch || (this.isDragging = ha(h, this.imgProps));
},
handleMouseLeave(h) {
this.currentMoveType === "drag" && this.isZoomed ? this.handleDragEnd(h) : this.handleClose();
},
handleClose() {
this.zoomOut(() => {
setTimeout(
() => {
(this.zoomPreload && this.isTouch || !this.zoomPreload) && (this.isActive = !1, this.imgProps = as()), this.isTouch = !1, this.isFullscreen = !1, this.currentMoveType = this.moveType;
},
this.isFullscreen ? 0 : this.fadeDuration
);
});
},
initialMove(h) {
this.imgProps.offsets = to(
window.pageXOffset,
window.pageYOffset,
-this.imgProps.bounds.left,
-this.imgProps.bounds.top
), this.handleMouseMove(h);
},
initialDragMove(h) {
const f = ua(h, this.imgProps, this.isFullscreen);
this.imgProps.bounds = ss(this.$refs.img, this.isFullscreen), this.imgProps.offsets = to(0, 0, 0, 0), this.handleDragMove({
...f,
preventDefault: () => {
},
stopPropagation: () => {
}
});
},
zoomIn(h) {
this.isZoomed = !0, this.currentMoveType === "drag" ? this.initialDragMove(h) : this.initialMove(h), this.afterZoomIn && this.afterZoomIn();
},
zoomOut(h) {
this.isZoomed = !1, this.afterZoomOut && this.afterZoomOut(), h && h();
}
}
}), pa = { key: 0 }, ma = ["src", "width", "height"], _a = ["src", "width", "height"], ga = { class: "iiz__zoom-portal" }, va = ["src"], ya = ["src"], ba = {
key: 1,
class: "iiz__btn iiz__hint"
};
function La(h, f, d, m, w, o) {
return x(), A("figure", Ke({
class: ["iiz", {
...h.className && { [h.className]: h.className },
"iiz--drag": h.currentMoveType === "drag"
}],
ref: "img",
style: {
width: `${h.width}px`
}
}, Yn({
touchstart: h.isZoomed ? () => {
} : h.handleTouchStart,
click: h.handleClick,
mouseenter: h.isTouch ? () => {
} : h.handleMouseEnter,
mousemove: h.currentMoveType === "drag" || !h.isZoomed ? () => {
} : h.handleMouseMove,
mouseleave: h.isTouch ? () => {
} : h.handleMouseLeave
}, !0)), [
y("div", {
style: jn({
paddingTop: h.createSpacer ? `${(h.height || 0) / (h.width || 0) * 100}%` : void 0
})
}, [
h.validSources ? (x(), A("picture", pa, [
(x(!0), A(ut, null, Ct(h.validSources, (r, u) => (x(), A("source", Ke({ key: u }, { ref_for: !0 }, r), null, 16))), 128)),
y("img", Ke(h.imgAttributes, {
class: ["iiz__img", [h.imgAttributes.className || "", { "iiz__img--hidden": h.isZoomed, "iiz__img--abs": h.createSpacer }]],
style: {
transition: `linear 0ms opacity ${h.isZoomed ? h.fadeDuration : 0}ms, linear 0ms visibility ${h.isZoomed ? h.fadeDuration : 0}ms`
},
src: h.src,
width: h.width,
height: h.height
}), null, 16, ma)
])) : (x(), A("img", Ke({ key: 1 }, h.imgAttributes, {
class: ["iiz__img", [h.imgAttributes.className || "", { "iiz__img--hidden": h.isZoomed, "iiz__img--abs": h.createSpacer }]],
style: {
transition: `linear 0ms opacity ${h.isZoomed ? h.fadeDuration : 0}ms, linear 0ms visibility ${h.isZoomed ? h.fadeDuration : 0}ms`
},
src: h.src,
width: h.width,
height: h.height
}), null, 16, _a))
], 4),
h.isActive ? (x(), A(ut, { key: 0 }, [
h.isFullscreen ? (x(), at(wr, {
key: 0,
to: "body"
}, [
y("div", ga, [
y("img", Ke({
class: ["iiz__zoom-img", { "iiz__zoom-img--visible": h.isZoomed }],
alt: "",
draggable: !1,
style: {
top: `${h.top}px`,
left: `${h.left}px`,
transition: `linear ${h.isFullscreen ? 0 : h.fadeDuration}ms opacity, linear ${h.isFullscreen ? 0 : h.fadeDuration}ms visibility`
},
src: h.zoomSrc || h.src
}, Yn({
load: h.handleLoad,
touchstart: h.handleDragStart,
touchend: h.handleDragEnd,
mousedown: h.handleDragStart,
mouseup: h.handleDragEnd,
click: h.handleClick
}, !0)), null, 16, va),
!h.hideCloseButton && h.currentMoveType === "drag" ? (x(), A("button", {
key: 0,
type: "button",
class: Se(["iiz__btn iiz__close", { "iiz__close--visible": h.isZoomed }]),
"aria-label": "Zoom Out",
style: jn({
transition: `linear ${h.isFullscreen ? 0 : h.fadeDuration}ms opacity, linear ${h.isFullscreen ? 0 : h.fadeDuration}ms visibility`
}),
onClick: f[0] || (f[0] = Ti((...r) => h.handleClose && h.handleClose(...r), ["stop"]))
}, null, 6)) : Z("", !0)
])
])) : (x(), A(ut, { key: 1 }, [
y("img", Ke({
class: ["iiz__zoom-img", { "iiz__zoom-img--visible": h.isZoomed }],
alt: "",
draggable: !1,
style: {
top: `${h.top}px`,
left: `${h.left}px`,
transition: `linear ${h.isFullscreen ? 0 : h.fadeDuration}ms opacity, linear ${h.isFullscreen ? 0 : h.fadeDuration}ms visibility`
},
src: h.zoomSrc || h.src
}, Yn({
load: h.handleLoad,
touchstart: h.handleDragStart,
touchend: h.handleDragEnd,
mousedown: h.handleDragStart,
mouseup: h.handleDragEnd
}, !0)), null, 16, ya),
!h.hideCloseButton && h.currentMoveType === "drag" ? (x(), A("button", {
key: 0,
class: Se(["iiz__btn iiz__close", { "iiz__close--visible": h.isZoomed }]),
type: "button",
"aria-label": "Zoom Out",
style: jn({
transition: `linear ${h.isFullscreen ? 0 : h.fadeDuration}ms opacity, linear ${h.isFullscreen ? 0 : h.fadeDuration}ms visibility`
}),
onClick: f[1] || (f[1] = Ti((...r) => h.handleClose && h.handleClose(...r), ["stop"]))
}, null, 6)) : Z("", !0)
], 64))
], 64)) : Z("", !0),
!h.isZoomed && !h.hideHint ? (x(), A("span", ba)) : Z("", !0)
], 16);
}
const ka = /* @__PURE__ */ Qt(fa, [["render", La], ["__scopeId", "data-v-71b2d8af"]]), wa = { key: 0 }, Pa = { class: "konnectio-hotel-reservation-warning" }, Ca = { class: "konnectio-hotel-reservation-warning" }, Ta = { class: "konnectio-hotel-reservation-warning" }, Ma = { class: "konnectio-hotel-reservation-title" }, xa = { class: "konnectio-hotel-reservation-information" }, Sa = { class: "konnectio-hotel-reservation-guests" }, Aa = { key: 0 }, Ia = {
key: 0,
class: "konnectio-hotel-reservation-room-name"
};
const Oa = { key: 0 }, za = { key: 1 }, Ea = { key: 0 }, Ba = { class: "konnectio-reservation-actions" }, Za = {
key: 0,
class: "konnectio-newsletter-signup"
}, Da = {
key: 1,
class: "konnectio-accept-terms"
}, Na = { class: "konnectio-hotel-reservation-tooltip" }, Ra = /* @__PURE__ */ Dt({
__name: "HotelReservationForm",
props: {
forceArrivalTime: {},
forceDepartureTime: {},
showGiftCard: { type: Boolean, default: !1 },
showTermsNotice: { type: Boolean, default: !1 },
prevCallback: {}
},
setup(h) {
const { t: f } = Jt(), {
disableNewsletterSignup: d,
currency: m
} = Ft(Re()), {
hasArrivalDepartureInputs: w
} = Re(), {
arrivalTime: o,
departureTime: r,
roomDisplay: u,
templateID: c,
totalPrice: _,
areListingsLoading: b,
getSelectedPackageRoom: v,
selectedPackage: P,
discountVouchers: g,
currentArrivalDate: M,
currentDepartureDate: C,
datesMismatch: N,
currentLocation: I,
locationMismatch: z,
newsMails: R,
termsOfService: nt,
discountCode: lt,
hasTermOfService: vt,
acceptTerms: Mt,
totalTemplateAddonPrice: xt,
totalRooms: Nt,
totalAdults: W,
totalChildren: j,
templateRoomTotalPrice: q,
weekendFee: At
} = Ft(fe()), { hasHotelLocations: ht } = Ft(Mi()), { removeRoom: Vt, validateDiscountCode: dt, getMandatoryRoomGroupAddons: zt } = fe(), { getHotelLocationName: G } = Mi(), pe = Gt(!1);
function U(ot) {
return ot.reduce((bt, { totalPrice: Y }) => bt + Y, 0);
}
return (ot, ct) => {
const bt = Pr("tooltip");
return x(), at(Zr, {
"discount-code": l(lt),
"onUpdate:discountCode": ct[4] || (ct[4] = (Y) => gt(lt) ? lt.value = Y : null),
"validate-discount-code": l(dt),
"total-price": l(_),
"weekend-fee": l(At),
"show-gift-card": ot.showGiftCard,
"show-terms-notice": ot.showTermsNotice,
"is-sidebar-loading": l(b),
notice: l(f)("hotel.reservationNotice"),
"prev-callback": ot.prevCallback
}, Cr({
form: it(() => [
Xn(ot.$slots, "form", {}, void 0, !0)
]),
"price-summary": it(() => [
isNaN(l(c)) && l(u).length > 0 ? (x(!0), A(ut, { key: 0 }, Ct(l(u), ({
roomGroupID: Y,
title: st,
variants: Q
}) => (x(), A("div", { key: Y }, [
y("h6", null, [
y("span", null, O(l(Pe)(st)), 1)
]),
(x(!0), A(ut, null, Ct(Q, (Et, Ut) => (x(), A("div", { key: Ut }, [
(x(!0), A(ut, null, Ct(Et.rooms, (Ht, $t) => (x(), A("ul", { key: $t }, [
y("li", null, [
y("span", Ma, O(l(Pe)(Et.name)), 1),
y("span", xa, [
y("span", Sa, [
y("span", null, [
B(Pt, {
icon: "male",
type: "fas",
color: "font"
}),
y("span", null, O(Ht.adultsCount), 1)
]),
Ht.childrenCount > 0 ? (x(), A("span", Aa, [
B(Pt, {
icon: "child",
type: "fas",
color: "font"
}),
y("span", null, O(Ht.childrenCount), 1)
])) : Z("", !0)
]),
Ht.roomName ? (x(), A("span", Ia, "(" + O(Ht.roomName) + ")", 1)) : Z("", !0)
]),
y("b", null, [
y("span", null, O(l(se)(Ht.totalPrice, l(m))), 1),
Z("", !0)
])
]),
U(Ht.roomAddons) > 0 ? (x(), A("li", Oa, [
y("span", null, O(l(f)("general.addons")), 1),
y("b", null, O(l(se)(U(Ht.roomAddons), l(m))), 1)
])) : Z("", !0)
]))), 128))
]))), 128))
]))), 128)) : Z("", !0),
l(v) && l(P) ? (x(), A("div", za, [
y("h6", null, [
y("span", null, O(l(Pe)(l(P).name)), 1)
]),
y("div", null, [
y("ul", null, [
y("li", null, [
y("span", null, [
y("span", null, O(l(Pe)(l(v).title)), 1)
]),
y("b", null, [
y("span", null, O(l(se)(l(q), l(m))), 1)
]),
l(zt)(l(v).id) ? (x(!0), A(ut, { key: 0 }, Ct(l(zt)(l(v).id), (Y) => (x(), A(ut, null, [
y("span", null, "- " + O(Y.name), 1),
y("b", null, [
y("span", null, O(l(se)(Y.price, l(m))), 1)
])
], 64))), 256)) : Z("", !0)
]),
l(xt) ? (x(), A("li", Ea, [
y("span", null, O(l(f)("general.addons")), 1),
y("b", null, O(l(se)(l(xt), l(m))), 1)
])) : Z("", !0)
])
])
])) : Z("", !0)
]),
actions: it(() => [
y("ul", Ba, [
l(d) ? Z("", !0) : (x(), A("div", Za, [
B(oo, {
modelValue: l(R),
"onUpdate:modelValue": ct[0] || (ct[0] = (Y) => gt(R) ? R.value = Y : null),
type: "checkbox",
name: "newsletter",
label: l(f)("booking.reservation.newsletterSignUp")
}, null, 8, ["modelValue", "label"])
])),
l(vt) ? (x(), A("div", Da, [
B(oo, {
modelValue: l(Mt),
"onUpdate:modelValue": ct[2] || (ct[2] = (Y) => gt(Mt) ? Mt.value = Y : null),
type: "checkbox",
name: "terms"
}, {
default: it(() => [
B(l(Tr), {
keypath: "general.termsAndConditionsCheckbox",
tag: "span",
scope: "global"
}, {
terms: it(() => [
y("a", {
class: "konnectio-accept-terms-link",
onClick: ct[1] || (ct[1] = Ti((Y) => pe.value = !0, ["prevent"]))
}, [
y("span", null, O(l(Jn)(l(f)("general.termsAndConditions"))), 1)
])
]),
_: 1
})
]),
_: 1
}, 8, ["modelValue"])
])) : Z("", !0),
Xn(ot.$slots, "actions", {}, void 0, !0),
B(Xr, {
modelValue: pe.value,
"onUpdate:modelValue": ct[3] || (ct[3] = (Y) => pe.value = Y),
description: l(nt)
}, null, 8, ["modelValue", "description"])
])
]),
navigation: it(() => [
Xn(ot.$slots, "navigation", {}, void 0, !0)
]),
"mobile-under-price": it(() => [
y("span", null, O(l(f)("general.for")) + ": ", 1),
y("b", null, O(l(ki)(l(M), l(C))) + " " + O(l(Jn)(l(ki)(l(M), l(C)) === 1 ? l(f)("booking.reservation.night") : l(f)("booking.reservation.nights"))), 1),
xe((x(), A("span", Na, [
B(Pt, {
icon: "circle-info",
type: "fas"
})
])), [
[bt, {
content: `<span>(${l(ce)(l(M))} - ${l(ce)(l(C))})</span>`,
classes: ["tooltip", "konnectio-tooltip"],
html: !0
}]
])
]),
"mobile-summary": it(() => [
y("span", null, O(`${l(W)} ${l(W) === 1 ? l(f)("general.adult") : l(f)("general.adults")}`), 1),
y("span", null, O(`${l(j)} ${l(j) === 1 ? l(f)("general.child") : l(f)("general.children")}`), 1),
y("span", null, O(`${l(Nt)} ${l(Nt) === 1 ? l(f)("booking.reservation.room") : l(f)("booking.reservation.rooms")}`), 1)
]),
_: 2
}, [
isNaN(l(I)) ? void 0 : {
name: "reservation-summary",
fn: it(() => [
l(ht) ? (x(), A("li", wa, [
y("span", null, O(l(f)("general.location")), 1),
y("b", null, [
y("span", null, O(l(G)(l(I))), 1),
xe(y("span", Pa, [
B(Pt, {
icon: "exclamation-triangle",
type: "fas"
})
], 512), [
[Ne, l(z)]
])
])
])) : Z("", !0),
y("li", null, [
y("span", null, O(l(f)("booking.reservation.arrival")), 1),
y("b", null, [
y("span", null, O(l(w)(l(I)) ? `${l(ce)(l(M))}, ${l(o)}` : l(ce)(l(M))), 1),
xe(y("span", Ca, [
B(Pt, {
icon: "exclamation-triangle",
type: "fas"
})
], 512), [
[Ne, l(N)]
])
])
]),
y("li", null, [
y("span", null, O(l(f)("booking.reservation.departure")), 1),
y("b", null, [
y("span", null, O(l(w)(l(I)) ? `${l(ce)(l(C))}, ${l(r)}` : l(ce)(l(C))), 1),
xe(y("span", Ta, [
B(Pt, {
icon: "exclamation-triangle",
type: "fas"
})
], 512), [
[Ne, l(N)]
])
])
]),
y("li", null, [
y("span", null, O(l(f)("booking.reservation.nights")), 1),
y("b", null, O(l(ki)(l(M), l(C))) + " " + O(l(Jn)(l(ki)(l(M), l(C)) === 1 ? l(f)("booking.reservation.night") : l(f)("booking.reservation.nights"))), 1)
]),
l(g) ? (x(!0), A(ut, { key: 1 }, Ct(l(g), (Y) => (x(), A("li", {
key: Y.id
}, [
y("span", null, O(`${l(f)("general.discountCode")} (${Y.value})`), 1),
y("b", null, O(Y.key), 1)
]))), 128)) : Z("", !0)
]),
key: "0"
}
]), 1032, ["discount-code", "validate-discount-code", "total-price", "weekend-fee", "show-gift-card", "show-terms-notice", "is-sidebar-loading", "notice", "prev-callback"]);
};
}
}), eo = /* @__PURE__ */ Qt(Ra, [["__scopeId", "data-v-3b118a32"]]), Va = { id: "konnectio-hotel-guest-discount" }, Ha = { class: "konnectio-panel" }, Fa = { id: "konnectio-hotel-guest-discount-title" }, Ga = ["innerHTML"], Ua = /* @__PURE__ */ Dt({
__name: "GuestDiscountForm",
setup(h) {
const { t: f } = Jt(), d = no("history"), m = fe(), { display: w } = uo(), o = Gt();
async function r() {
if (!o.value) {
w({
message: f("alert.error.guestDiscountEmpty"),
type: "error"
});
return;
}
if (isNaN(o.value)) {
w({
message: f("alert.error.guestDiscountNan"),
type: "error"
});
return;
}
await m.checkGuestDiscount(o.value) && (d.gid = o.value.toString());
}
return (u, c) => (x(), A("form", Va, [
y("div", Ha, [
y("h3", Fa, [
y("span", null, O(l(f)("guestDiscount.title")), 1)
]),
y("p", {
innerHTML: l(f)("guestDiscount.description")
}, null, 8, Ga),
B(Qr, {
modelValue: o.value,
"onUpdate:modelValue": c[0] || (c[0] = (_) => o.value = _),
label: l(f)("guestDiscount.guestDiscountCode"),
placeholder: "XXXXXX",
inputType: "number",
"button-label": l(f)("guestDiscount.submitButton"),
icon: "user-tag",
"button-icon": "paper-plane-top",
secondary: "",
onAction: r
}, null, 8, ["modelValue", "label", "button-label"])
])
]));
}
}), $a = /* @__PURE__ */ Qt(Ua, [["__scopeId", "data-v-8c6e1f7e"]]), Wa = { class: "konnectio-room-config-option" }, qa = { key: 0 }, ja = { class: "konnectio-selected-room-config" }, Ya = { class: "konnectio-selected-room-config-people" }, Xa = { key: 0 }, Ka = { class: "konnectio-selected-room-config-price" }, Ja = /* @__PURE__ */ Dt({
__name: "RoomConfigField",
props: {
modelValue: {},
options: {},
required: { type: Boolean, default: !1 },
readonly: { type: Boolean, default: !1 },
label: {}
},
emits: ["update:modelValue"],
setup(h, { emit: f }) {
const { t: d } = Jt(), { currency: m } = Ft(Re()), w = f, o = h;
function r(c) {
w("update:modelValue", c);
}
const u = Tt({
get: () => o.modelValue,
set: (c) => r(c)
});
return (c, _) => (x(), at(ln, {
modelValue: u.value,
"onUpdate:modelValue": _[0] || (_[0] = (b) => u.value = b),
label: c.label,
placeholder: "Select guest configuration",
labelKey: "label",
valueKey: "value",
"icon-placement": "label",
options: c.options,
readonly: c.readonly,
required: c.required,
searchable: !1
}, {
option: it(({ data: b }) => [
y("span", Wa, [
y("div", null, [
B(Pt, {
icon: "male",
type: "fas",
color: "font"
}),
y("span", null, O(`${b.adults}`), 1),
b.children > 0 ? (x(), A("span", qa, [
B(Pt, {
icon: "child",
type: "fas",
color: "font"
}),
y("span", null, O(`${b.children}`), 1)
])) : Z("", !0)
]),
y("span", null, O(`(${l(se)(b.price, l(m))})`), 1)
])
]),
"selected-option": it(({ data: b }) => [
y("div", ja, [
y("div", Ya, [
y("div", null, [
Z("", !0),
y("span", null, O(`${b.adults} ${b.adults === 1 ? l(d)("general.adult") : l(d)("general.adults")}`), 1)
]),
b.children > 0 ? (x(), A("div", Xa, [
Z("", !0),
y("span", null, O(`& ${b.children} ${b.children === 1 ? l(d)("general.child") : l(d)("general.children")}`), 1)
])) : Z("", !0)
]),
y("div", Ka, [
_[1] || (_[1] = y("span", null, null, -1)),
io(" " + O(`(${l(se)(b.price, l(m))})`), 1)
])
])
]),
_: 1
}, 8, ["modelValue", "label", "options", "readonly", "required"]));
}
}), Qa = /* @__PURE__ */ Qt(Ja, [["__scopeId", "data-v-c4045bfc"]]);
var Pi = { exports: {} };
/* @preserve
* Leaflet 1.9.4, a JS library for interactive maps. https://leafletjs.com
* (c) 2010-2023 Vladimir Agafonkin, (c) 2010-2011 CloudMade
*/
var tl = Pi.exports, ls;
function el() {
return ls || (ls = 1, function(h, f) {
(function(d, m) {
m(f);
})(tl, function(d) {
var m = "1.9.4";
function w(t) {
var e, i, n, s;
for (i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (e in s)
t[e] = s[e];
}
return t;
}
var o = Object.create || /* @__PURE__ */ function() {
function t() {
}
return function(e) {
return t.prototype = e, new t();
};
}();
function r(t, e) {
var i = Array.prototype.slice;
if (t.bind)
return t.bind.apply(t, i.call(arguments, 1));
var n = i.call(arguments, 2);
return function() {
return t.apply(e, n.length ? n.concat(i.call(arguments)) : arguments);
};
}
var u = 0;
function c(t) {
return "_leaflet_id" in t || (t._leaflet_id = ++u), t._leaflet_id;
}
function _(t, e, i) {
var n, s, a, p;
return p = function() {
n = !1, s && (a.apply(i, s), s = !1);
}, a = function() {
n ? s = arguments : (t.apply(i, arguments), setTimeout(p, e), n = !0);
}, a;
}
function b(t, e, i) {
var n = e[1], s = e[0], a = n - s;
return t === n && i ? t : ((t - s) % a + a) % a + s;
}
function v() {
return !1;
}
function P(t, e) {
if (e === !1)
return t;
var i = Math.pow(10, e === void 0 ? 6 : e);
return Math.round(t * i) / i;
}
function g(t) {
return t.trim ? t.trim() : t.replace(/^\s+|\s+$/g, "");
}
function M(t) {
return g(t).split(/\s+/);
}
function C(t, e) {
Object.prototype.hasOwnProperty.call(t, "options") || (t.options = t.options ? o(t.options) : {});
for (var i in e)
t.options[i] = e[i];
return t.options;
}
function N(t, e, i) {
var n = [];
for (var s in t)
n.push(encodeURIComponent(i ? s.toUpperCase() : s) + "=" + encodeURIComponent(t[s]));
return (!e || e.indexOf("?") === -1 ? "?" : "&") + n.join("&");
}
var I = /\{ *([\w_ -]+) *\}/g;
function z(t, e) {
return t.replace(I, function(i, n) {
var s = e[n];
if (s === void 0)
throw new Error("No value provided for variable " + i);
return typeof s == "function" && (s = s(e)), s;
});
}
var R = Array.isArray || function(t) {
return Object.prototype.toString.call(t) === "[object Array]";
};
function nt(t, e) {
for (var i = 0; i < t.length; i++)
if (t[i] === e)
return i;
return -1;
}
var lt = "data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=";
function vt(t) {
return window["webkit" + t] || window["moz" + t] || window["ms" + t];
}
var Mt = 0;
function xt(t) {
var e = +/* @__PURE__ */ new Date(), i = Math.max(0, 16 - (e - Mt));
return Mt = e + i, window.setTimeout(t, i);
}
var Nt = window.requestAnimationFrame || vt("RequestAnimationFrame") || xt, W = window.cancelAnimationFrame || vt("CancelAnimationFrame") || vt("CancelRequestAnimationFrame") || function(t) {
window.clearTimeout(t);
};
function j(t, e, i) {
if (i && Nt === xt)
t.call(e);
else
return Nt.call(window, r(t, e));
}
function q(t) {
t && W.call(window, t);
}
var At = {
__proto__: null,
extend: w,
create: o,
bind: r,
get lastId() {
return u;
},
stamp: c,
throttle: _,
wrapNum: b,
falseFn: v,
formatNum: P,
trim: g,
splitWords: M,
setOptions: C,
getParamString: N,
template: z,
isArray: R,
indexOf: nt,
emptyImageUrl: lt,
requestFn: Nt,
cancelFn: W,
requestAnimFrame: j,
cancelAnimFrame: q
};
function ht() {
}
ht.extend = function(t) {
var e = function() {
C(this), this.initialize && this.initialize.apply(this, arguments), this.callInitHooks();
}, i = e.__super__ = this.prototype, n = o(i);
n.constructor = e, e.prototype = n;
for (var s in this)
Object.prototype.hasOwnProperty.call(this, s) && s !== "prototype" && s !== "__super__" && (e[s] = this[s]);
return t.statics && w(e, t.statics), t.includes && (Vt(t.includes), w.apply(null, [n].concat(t.includes))), w(n, t), delete n.statics, delete n.includes, n.options && (n.options = i.options ? o(i.options) : {}, w(n.options, t.options)), n._initHooks = [], n.callInitHooks = function() {
if (!this._initHooksCalled) {
i.callInitHooks && i.callInitHooks.call(this), this._initHooksCalled = !0;
for (var a = 0, p = n._initHooks.length; a < p; a++)
n._initHooks[a].call(this);
}
}, e;
}, ht.include = function(t) {
var e = this.prototype.options;
return w(this.prototype, t), t.options && (this.prototype.options = e, this.mergeOptions(t.options)), this;
}, ht.mergeOptions = function(t) {
return w(this.prototype.options, t), this;
}, ht.addInitHook = function(t) {
var e = Array.prototype.slice.call(arguments, 1), i = typeof t == "function" ? t : function() {
this[t].apply(this, e);
};
return this.prototype._initHooks = this.prototype._initHooks || [], this.prototype._initHooks.push(i), this;
};
function Vt(t) {
if (!(typeof L > "u" || !L || !L.Mixin)) {
t = R(t) ? t : [t];
for (var e = 0; e < t.length; e++)
t[e] === L.Mixin.Events && console.warn("Deprecated include of L.Mixin.Events: this property will be removed in future releases, please inherit from L.Evented instead.", new Error().stack);
}
}
var dt = {
/* @method on(type: String, fn: Function, context?: Object): this
* Adds a listener function (`fn`) to a particular event type of the object. You can optionally specify the context of the listener (object the this keyword will point to). You can also pass several space-separated types (e.g. `'click dblclick'`).
*
* @alternative
* @method on(eventMap: Object): this
* Adds a set of type/listener pairs, e.g. `{click: onClick, mousemove: onMouseMove}`
*/
on: function(t, e, i) {
if (typeof t == "object")
for (var n in t)
this._on(n, t[n], e);
else {
t = M(t);
for (var s = 0, a = t.length; s < a; s++)
this._on(t[s], e, i);
}
return this;
},
/* @method off(type: String, fn?: Function, context?: Object): this
* Removes a previously added listener function. If no function is specified, it will remove all the listeners of that particular event from the object. Note that if you passed a custom context to `on`, you must pass the same context to `off` in order to remove the listener.
*
* @alternative
* @method off(eventMap: Object): this
* Removes a set of type/listener pairs.
*
* @alternative
* @method off: this
* Removes all listeners to all events on the object. This includes implicitly attached events.
*/
off: function(t, e, i) {
if (!arguments.length)
delete this._events;
else if (typeof t == "object")
for (var n in t)
this._off(n, t[n], e);
else {
t = M(t);
for (var s = arguments.length === 1, a = 0, p = t.length; a < p; a++)
s ? this._off(t[a]) : this._off(t[a], e, i);
}
return this;
},
// attach listener (without syntactic sugar now)
_on: function(t, e, i, n) {
if (typeof e != "function") {
console.warn("wrong listener type: " + typeof e);
return;
}
if (this._listens(t, e, i) === !1) {
i === this && (i = void 0);
var s = { fn: e, ctx: i };
n && (s.once = !0), this._events = this._events || {}, this._events[t] = this._events[t] || [], this._events[t].push(s);
}
},
_off: function(t, e, i) {
var n, s, a;
if (this._events && (n = this._events[t], !!n)) {
if (arguments.length === 1) {
if (this._firingCount)
for (s = 0, a = n.length; s < a; s++)
n[s].fn = v;
delete this._events[t];
return;
}
if (typeof e != "function") {
console.warn("wrong listener type: " + typeof e);
return;
}
var p = this._listens(t, e, i);
if (p !== !1) {
var k = n[p];
this._firingCount && (k.fn = v, this._events[t] = n = n.slice()), n.splice(p, 1);
}
}
},
// @method fire(type: String, data?: Object, propagate?: Boolean): this
// Fires an event of the specified type. You can optionally provide a data
// object — the first argument of the listener function will contain its
// properties. The event can optionally be propagated to event parents.
fire: function(t, e, i) {
if (!this.listens(t, i))
return this;
var n = w({}, e, {
type: t,
target: this,
sourceTarget: e && e.sourceTarget || this
});
if (this._events) {
var s = this._events[t];
if (s) {
this._firingCount = this._firingCount + 1 || 1;
for (var a = 0, p = s.length; a < p; a++) {
var k = s[a], T = k.fn;
k.once && this.off(t, T, k.ctx), T.call(k.ctx || this, n);
}
this._firingCount--;
}
}
return i && this._propagateEvent(n), this;
},
// @method listens(type: String, propagate?: Boolean): Boolean
// @method listens(type: String, fn: Function, context?: Object, propagate?: Boolean): Boolean
// Returns `true` if a particular event type has any listeners attached to it.
// The verification can optionally be propagated, it will return `true` if parents have the listener attached to it.
listens: function(t, e, i, n) {
typeof t != "string" && console.warn('"string" type argument expected');
var s = e;
typeof e != "function" && (n = !!e, s = void 0, i = void 0);
var a = this._events && this._events[t];
if (a && a.length && this._listens(t, s, i) !== !1)
return !0;
if (n) {
for (var p in this._eventParents)
if (this._eventParents[p].listens(t, e, i, n))
return !0;
}
return !1;
},
// returns the index (number) or false
_listens: function(t, e, i) {
if (!this._events)
return !1;
var n = this._events[t] || [];
if (!e)
return !!n.length;
i === this && (i = void 0);
for (var s = 0, a = n.length; s < a; s++)
if (n[s].fn === e && n[s].ctx === i)
return s;
return !1;
},
// @method once(…): this
// Behaves as [`on(…)`](#evented-on), except the listener will only get fired once and then removed.
once: function(t, e, i) {
if (typeof t == "object")
for (var n in t)
this._on(n, t[n], e, !0);
else {
t = M(t);
for (var s = 0, a = t.length; s < a; s++)
this._on(t[s], e, i, !0);
}
return this;
},
// @method addEventParent(obj: Evented): this
// Adds an event parent - an `Evented` that will receive propagated events
addEventParent: function(t) {
return this._eventParents = this._eventParents || {}, this._eventParents[c(t)] = t, this;
},
// @method removeEventParent(obj: Evented): this
// Removes an event parent, so it will stop receiving propagated events
removeEventParent: function(t) {
return this._eventParents && delete this._eventParents[c(t)], this;
},
_propagateEvent: function(t) {
for (var e in this._eventParents)
this._eventParents[e].fire(t.type, w({
layer: t.target,
propagatedFrom: t.target
}, t), !0);
}
};
dt.addEventListener = dt.on, dt.removeEventListener = dt.clearAllEventListeners = dt.off, dt.addOneTimeEventListener = dt.once, dt.fireEvent = dt.fire, dt.hasEventListeners = dt.listens;
var zt = ht.extend(dt);
function G(t, e, i) {
this.x = i ? Math.round(t) : t, this.y = i ? Math.round(e) : e;
}
var pe = Math.trunc || function(t) {
return t > 0 ? Math.floor(t) : Math.ceil(t);
};
G.prototype = {
// @method clone(): Point
// Returns a copy of the current point.
clone: function() {
return new G(this.x, this.y);
},
// @method add(otherPoint: Point): Point
// Returns the result of addition of the current and the given points.
add: function(t) {
return this.clone()._add(U(t));
},
_add: function(t) {
return this.x += t.x, this.y += t.y, this;
},
// @method subtract(otherPoint: Point): Point
// Returns the result of subtraction of the given point from the current.
subtract: function(t) {
return this.clone()._subtract(U(t));
},
_subtract: function(t) {
return this.x -= t.x, this.y -= t.y, this;
},
// @method divideBy(num: Number): Point
// Returns the result of division of the current point by the given number.
divideBy: function(t) {
return this.clone()._divideBy(t);
},
_divideBy: function(t) {
return this.x /= t, this.y /= t, this;
},
// @method multiplyBy(num: Number): Point
// Returns the result of multiplication of the current point by the given number.
multiplyBy: function(t) {
return this.clone()._multiplyBy(t);
},
_multiplyBy: function(t) {
return this.x *= t, this.y *= t, this;
},
// @method scaleBy(scale: Point): Point
// Multiply each coordinate of the current point by each coordinate of
// `scale`. In linear algebra terms, multiply the point by the
// [scaling matrix](https://en.wikipedia.org/wiki/Scaling_%28geometry%29#Matrix_representation)
// defined by `scale`.
scaleBy: function(t) {
return new G(this.x * t.x, this.y * t.y);
},
// @method unscaleBy(scale: Point): Point
// Inverse of `scaleBy`. Divide each coordinate of the current point by
// each coordinate of `scale`.
unscaleBy: function(t) {
return new G(this.x / t.x, this.y / t.y);
},
// @method round(): Point
// Returns a copy of the current point with rounded coordinates.
round: function() {
return this.clone()._round();
},
_round: function() {
return this.x = Math.round(this.x), this.y = Math.round(this.y), this;
},
// @method floor(): Point
// Returns a copy of the current point with floored coordinates (rounded down).
floor: function() {
return this.clone()._floor();
},
_floor: function() {
return this.x = Math.floor(this.x), this.y = Math.floor(this.y), this;
},
// @method ceil(): Point
// Returns a copy of the current point with ceiled coordinates (rounded up).
ceil: function() {
return this.clone()._ceil();
},
_ceil: function() {
return this.x = Math.ceil(this.x), this.y = Math.ceil(this.y), this;
},
// @method trunc(): Point
// Returns a copy of the current point with truncated coordinates (rounded towards zero).
trunc: function() {
return this.clone()._trunc();
},
_trunc: function() {
return this.x = pe(this.x), this.y = pe(this.y), this;
},
// @method distanceTo(otherPoint: Point): Number
// Returns the cartesian distance between the current and the given points.
distanceTo: function(t) {
t = U(t);
var e = t.x - this.x, i = t.y - this.y;
return Math.sqrt(e * e + i * i);
},
// @method equals(otherPoint: Point): Boolean
// Returns `true` if the given point has the same coordinates.
equals: function(t) {
return t = U(t), t.x === this.x && t.y === this.y;
},
// @method contains(otherPoint: Point): Boolean
// Returns `true` if both coordinates of the given point are less than the corresponding current point coordinates (in absolute values).
contains: function(t) {
return t = U(t), Math.abs(t.x) <= Math.abs(this.x) && Math.abs(t.y) <= Math.abs(this.y);
},
// @method toString(): String
// Returns a string representation of the point for debugging purposes.
toString: function(