UNPKG

@konnectio/core

Version:

Konnectio Core Frontend Integration.

1,292 lines 490 kB
import { d as Nt, h as A, b as M, e as y, i as Z, F as ut, v as xt, J as je, K as Yn, a as rt, L as Xn, j as Ye, n as Pe, M as Pr, u as Kt, s as $t, r as Xt, N as Cr, g as l, z as bt, A as xr, w as nt, t as z, E as ke, G as Ee, f as D, q as Kn, C as Tr, c as vt, x as ys, O as Jo, o as lo, D as rn, S as Mr, P as Sr, k as Ar, _ as Ir, l as Or, m as zr, p as Er } from "./mitt-CvmiLPAX.js"; import { f as Br } from "./index-DNcHdiEm.js"; import { G as Zr } from "./style-CmiPhqCb.js"; import { R as Dr, B as an, L as Nr, S as Rr, M as Hr, T as Vr, C as Qo, b as Jn, V as Fr, a as Gr } from "./masonry.plugin-DF4HmGCq.js"; import { _ as Jt, f as Be, b as he, u as ki, I as Ct, s as ue, m as yi, l as Qn, r as ve, p as oe, t as no, a as uo, d as ln, F as Ur, h as ho, e as ne, i as bi, B as bs, H as ts, x as $r, T as ie, J as Wr, M as es, q as is, K as qr, N as ns, C as jr, v as os } from "./SelectField.vue_vue_type_style_index_0_lang-C60Scz2U.js"; import { A as Yr, H as Xr } from "./AvailabilitySkeleton-B3c8a2Jy.js"; import { S as Kr } from "./TermsOfService-CdeIcy6q.js"; import { a as oo, B as Ls, C as Jr, P as Qr } from "./CheckoutWindow-nL6eFQsJ.js"; import { A as ta } from "./ActionField-BS0Mh1bE.js"; import { g as ea } from "./_commonjsHelpers-DaMA6jEr.js"; import { _ as ws } from "./AvailabilitySkeleton.vue_vue_type_style_index_0_scoped_86730e88_lang-B2WBKN5Z.js"; function ss(r, d) { return d ? { width: window.innerWidth, height: window.innerHeight, left: 0, top: 0 } : r.getBoundingClientRect(); } function rs(r, d) { return r && window.matchMedia && window.matchMedia(`(max-width: ${d}px)`).matches; } function as() { return { onLoadCallback: null, bounds: {}, offsets: {}, ratios: {}, eventPosition: {}, scaledDimensions: {} }; } function to(r, d, c, p) { return { x: r - c, y: d - p }; } function ia(r, d) { return { x: (d.width - r.width) / r.width, y: (d.height - r.height) / r.height }; } function na(r, d) { return { width: r.naturalWidth * d, height: r.naturalHeight * d }; } function ks(r) { return { x: typeof r.pageX == "number" ? r.pageX : r.changedTouches[0].pageX, y: typeof r.pageY == "number" ? r.pageY : r.changedTouches[0].pageY }; } function oa(r, d, c) { const p = (r.pageX - (window.pageXOffset + d.bounds.left)) * -d.ratios.x, k = (r.pageY - (window.pageYOffset + d.bounds.top)) * -d.ratios.y; return { pageX: p + (c ? (window.innerWidth - d.bounds.width) / 2 : 0), pageY: k + (c ? (window.innerHeight - d.bounds.height) / 2 : 0) }; } function sa(r, d) { const c = Math.abs(r.pageX - d.eventPosition.x), p = Math.abs(r.pageY - d.eventPosition.y); return c > 5 || p > 5; } function ra(r, d) { const c = Ps(r, d); return { left: Math.max(Math.min(c.x, d.bounds.width), 0) * -d.ratios.x, top: Math.max(Math.min(c.y, d.bounds.height), 0) * -d.ratios.y }; } function aa(r, d) { const c = Ps(r, d); return { left: Math.max(Math.min(c.x, 0), (d.scaledDimensions.width - d.bounds.width) * -1), top: Math.max(Math.min(c.y, 0), (d.scaledDimensions.height - d.bounds.height) * -1) }; } function Ps(r, d) { const c = ks(r); return { x: c.x - d.offsets.x, y: c.y - d.offsets.y }; } const la = Nt({ 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((r) => r.srcSet) : []; }, createSpacer: function() { return this.width && this.height && this.hasSpacer; } }, methods: { handleMouseEnter(r) { this.isActive = !0, this.zoomType === "hover" && !this.isZoomed && this.handleClick(r); }, handleTouchStart() { this.isTouch = !0, this.isFullscreen = rs(this.fullscreenOnMobile, this.mobileBreakpoint), this.currentMoveType = "drag"; }, handleClick(r) { 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(r)) : this.imgProps.onLoadCallback = this.zoomIn.bind(this, r); }, handleLoad(r) { const d = na(r.target, this.zoomScale); this.imgProps.zoomImg = r.target, this.imgProps.zoomImg.setAttribute("width", d.width), this.imgProps.zoomImg.setAttribute("height", d.height), this.imgProps.scaledDimensions = d, this.imgProps.bounds = ss(this.$refs.img, !1), this.imgProps.ratios = ia(this.imgProps.bounds, d), this.imgProps.onLoadCallback && (this.imgProps.onLoadCallback(), this.imgProps.onLoadCallback = null); }, handleMouseMove(r) { const d = ra(r, this.imgProps); this.left = d.left, this.top = d.top; }, handleDragStart(r) { const d = ks(r); this.imgProps.offsets = to( d.x, d.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 = d); }, handleDragMove(r) { const d = aa(r, this.imgProps); this.left = d.left, this.top = d.top; }, handleDragEnd(r) { this.imgProps.zoomImg.removeEventListener(this.isTouch ? "touchmove" : "mousemove", this.handleDragMove), this.isTouch || (this.isDragging = sa(r, this.imgProps)); }, handleMouseLeave(r) { this.currentMoveType === "drag" && this.isZoomed ? this.handleDragEnd(r) : 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(r) { this.imgProps.offsets = to( window.pageXOffset, window.pageYOffset, -this.imgProps.bounds.left, -this.imgProps.bounds.top ), this.handleMouseMove(r); }, initialDragMove(r) { const d = oa(r, this.imgProps, this.isFullscreen); this.imgProps.bounds = ss(this.$refs.img, this.isFullscreen), this.imgProps.offsets = to(0, 0, 0, 0), this.handleDragMove({ ...d, preventDefault: () => { }, stopPropagation: () => { } }); }, zoomIn(r) { this.isZoomed = !0, this.currentMoveType === "drag" ? this.initialDragMove(r) : this.initialMove(r), this.afterZoomIn && this.afterZoomIn(); }, zoomOut(r) { this.isZoomed = !1, this.afterZoomOut && this.afterZoomOut(), r && r(); } } }), ua = { key: 0 }, ha = ["src", "width", "height"], ca = ["src", "width", "height"], da = { class: "iiz__zoom-portal" }, fa = ["src"], ma = ["src"], pa = { key: 1, class: "iiz__btn iiz__hint" }; function _a(r, d, c, p, k, o) { return M(), A("figure", je({ class: ["iiz", { ...r.className && { [r.className]: r.className }, "iiz--drag": r.currentMoveType === "drag" }], ref: "img", style: { width: `${r.width}px` } }, Xn({ touchstart: r.isZoomed ? () => { } : r.handleTouchStart, click: r.handleClick, mouseenter: r.isTouch ? () => { } : r.handleMouseEnter, mousemove: r.currentMoveType === "drag" || !r.isZoomed ? () => { } : r.handleMouseMove, mouseleave: r.isTouch ? () => { } : r.handleMouseLeave }, !0)), [ y("div", { style: Yn({ paddingTop: r.createSpacer ? `${(r.height || 0) / (r.width || 0) * 100}%` : void 0 }) }, [ r.validSources ? (M(), A("picture", ua, [ (M(!0), A(ut, null, xt(r.validSources, (a, h) => (M(), A("source", je({ key: h }, { ref_for: !0 }, a), null, 16))), 128)), y("img", je(r.imgAttributes, { class: ["iiz__img", [r.imgAttributes.className || "", { "iiz__img--hidden": r.isZoomed, "iiz__img--abs": r.createSpacer }]], style: { transition: `linear 0ms opacity ${r.isZoomed ? r.fadeDuration : 0}ms, linear 0ms visibility ${r.isZoomed ? r.fadeDuration : 0}ms` }, src: r.src, width: r.width, height: r.height }), null, 16, ha) ])) : (M(), A("img", je({ key: 1 }, r.imgAttributes, { class: ["iiz__img", [r.imgAttributes.className || "", { "iiz__img--hidden": r.isZoomed, "iiz__img--abs": r.createSpacer }]], style: { transition: `linear 0ms opacity ${r.isZoomed ? r.fadeDuration : 0}ms, linear 0ms visibility ${r.isZoomed ? r.fadeDuration : 0}ms` }, src: r.src, width: r.width, height: r.height }), null, 16, ca)) ], 4), r.isActive ? (M(), A(ut, { key: 0 }, [ r.isFullscreen ? (M(), rt(Pr, { key: 0, to: "body" }, [ y("div", da, [ y("img", je({ class: ["iiz__zoom-img", { "iiz__zoom-img--visible": r.isZoomed }], alt: "", draggable: !1, style: { top: `${r.top}px`, left: `${r.left}px`, transition: `linear ${r.isFullscreen ? 0 : r.fadeDuration}ms opacity, linear ${r.isFullscreen ? 0 : r.fadeDuration}ms visibility` }, src: r.zoomSrc || r.src }, Xn({ load: r.handleLoad, touchstart: r.handleDragStart, touchend: r.handleDragEnd, mousedown: r.handleDragStart, mouseup: r.handleDragEnd, click: r.handleClick }, !0)), null, 16, fa), !r.hideCloseButton && r.currentMoveType === "drag" ? (M(), A("button", { key: 0, type: "button", class: Pe(["iiz__btn iiz__close", { "iiz__close--visible": r.isZoomed }]), "aria-label": "Zoom Out", style: Yn({ transition: `linear ${r.isFullscreen ? 0 : r.fadeDuration}ms opacity, linear ${r.isFullscreen ? 0 : r.fadeDuration}ms visibility` }), onClick: d[0] || (d[0] = Ye((...a) => r.handleClose && r.handleClose(...a), ["stop"])) }, null, 6)) : Z("", !0) ]) ])) : (M(), A(ut, { key: 1 }, [ y("img", je({ class: ["iiz__zoom-img", { "iiz__zoom-img--visible": r.isZoomed }], alt: "", draggable: !1, style: { top: `${r.top}px`, left: `${r.left}px`, transition: `linear ${r.isFullscreen ? 0 : r.fadeDuration}ms opacity, linear ${r.isFullscreen ? 0 : r.fadeDuration}ms visibility` }, src: r.zoomSrc || r.src }, Xn({ load: r.handleLoad, touchstart: r.handleDragStart, touchend: r.handleDragEnd, mousedown: r.handleDragStart, mouseup: r.handleDragEnd }, !0)), null, 16, ma), !r.hideCloseButton && r.currentMoveType === "drag" ? (M(), A("button", { key: 0, class: Pe(["iiz__btn iiz__close", { "iiz__close--visible": r.isZoomed }]), type: "button", "aria-label": "Zoom Out", style: Yn({ transition: `linear ${r.isFullscreen ? 0 : r.fadeDuration}ms opacity, linear ${r.isFullscreen ? 0 : r.fadeDuration}ms visibility` }), onClick: d[1] || (d[1] = Ye((...a) => r.handleClose && r.handleClose(...a), ["stop"])) }, null, 6)) : Z("", !0) ], 64)) ], 64)) : Z("", !0), !r.isZoomed && !r.hideHint ? (M(), A("span", pa)) : Z("", !0) ], 16); } const ga = /* @__PURE__ */ Jt(la, [["render", _a], ["__scopeId", "data-v-71b2d8af"]]), va = { key: 0 }, ya = { class: "konnectio-hotel-reservation-warning" }, ba = { class: "konnectio-hotel-reservation-warning" }, La = { class: "konnectio-hotel-reservation-warning" }, wa = { key: 1 }, ka = { class: "konnectio-hotel-reservation-title" }, Pa = { class: "konnectio-hotel-reservation-information" }, Ca = { class: "konnectio-hotel-reservation-guests" }, xa = { key: 0 }, Ta = { key: 0, class: "konnectio-hotel-reservation-room-name" }, Ma = ["onClick"], Sa = { key: 0 }, Aa = { key: 1 }, Ia = { key: 0 }, Oa = { class: "konnectio-reservation-actions" }, za = { key: 0, class: "konnectio-newsletter-signup" }, Ea = { key: 1, class: "konnectio-accept-terms" }, Ba = { class: "konnectio-hotel-reservation-tooltip" }, Za = /* @__PURE__ */ Nt({ __name: "HotelReservationForm", props: { forceArrivalTime: {}, forceDepartureTime: {}, showRemoveRoom: { type: Boolean, default: !1 }, showGiftCard: { type: Boolean, default: !1 }, showTermsNotice: { type: Boolean, default: !1 }, prevCallback: {} }, setup(r) { const { t: d } = Kt(), { disableNewsletterSignup: c, currency: p } = $t(Be()), { hasArrivalDepartureInputs: k } = Be(), { arrivalTime: o, departureTime: a, roomDisplay: h, templateID: f, totalPrice: g, areListingsLoading: b, getSelectedPackageRoom: v, selectedPackage: P, discountVouchers: _, currentArrivalDate: T, currentDepartureDate: C, datesMismatch: R, currentLocation: O, locationMismatch: E, newsMails: H, termsOfService: ot, discountCode: lt, hasTermOfService: Lt, acceptTerms: Tt, totalTemplateAddonPrice: Mt, totalRooms: Rt, totalAdults: et, totalChildren: j, templateRoomTotalPrice: W, weekendFee: It, selectedMemberCardData: at } = $t(he()), { hasHotelLocations: Ht } = $t(ki()), { removeRoom: ht, validateDiscountCode: Vt, getMandatoryRoomGroupAddons: F } = he(), { getHotelLocationName: Ce } = ki(), U = Xt(!1); function ct(yt) { return yt.reduce((pt, { totalPrice: G }) => pt + G, 0); } return (yt, dt) => { const pt = Cr("tooltip"); return M(), rt(Dr, { "discount-code": l(lt), "onUpdate:discountCode": dt[4] || (dt[4] = (G) => bt(lt) ? lt.value = G : null), "validate-discount-code": l(Vt), "total-price": l(g), "weekend-fee": l(It), "show-gift-card": r.showGiftCard, "show-terms-notice": r.showTermsNotice, "is-sidebar-loading": l(b), notice: l(d)("hotel.reservationNotice"), "prev-callback": r.prevCallback }, xr({ form: nt(() => [ Kn(yt.$slots, "form", {}, void 0, !0) ]), "price-summary": nt(() => [ isNaN(l(f)) && l(h).length > 0 ? (M(!0), A(ut, { key: 0 }, xt(l(h), ({ roomGroupID: G, title: J, variants: Ft }) => (M(), A("div", { key: G }, [ y("h6", null, [ y("span", null, z(l(ve)(J)), 1) ]), (M(!0), A(ut, null, xt(Ft, (Ut, xe) => (M(), A("div", { key: xe }, [ (M(!0), A(ut, null, xt(Ut.rooms, (wt, ce) => (M(), A("ul", { key: ce }, [ y("li", null, [ y("span", ka, z(l(ve)(Ut.name)), 1), y("span", Pa, [ y("span", Ca, [ y("span", null, [ D(Ct, { icon: "male", type: "fas", color: "font" }), y("span", null, z(wt.adultsCount), 1) ]), wt.childrenCount > 0 ? (M(), A("span", xa, [ D(Ct, { icon: "child", type: "fas", color: "font" }), y("span", null, z(wt.childrenCount), 1) ])) : Z("", !0) ]), wt.roomName ? (M(), A("span", Ta, "(" + z(wt.roomName) + ")", 1)) : Z("", !0) ]), y("b", null, [ y("span", null, z(l(oe)(wt.totalPrice, l(p))), 1), r.showRemoveRoom ? (M(), A("span", { key: 0, class: "konnectio-hotel-reservation-remove", onClick: Ye((se) => l(ht)(G, xe, wt.configIdx), ["prevent"]) }, [ D(Ct, { icon: "times", type: "fas", "icon-color": "#ff0000" }) ], 8, Ma)) : Z("", !0) ]) ]), ct(wt.roomAddons) > 0 ? (M(), A("li", Sa, [ y("span", null, z(l(d)("general.addons")), 1), y("b", null, z(l(oe)(ct(wt.roomAddons), l(p))), 1) ])) : Z("", !0) ]))), 128)) ]))), 128)) ]))), 128)) : Z("", !0), l(v) && l(P) ? (M(), A("div", Aa, [ y("h6", null, [ y("span", null, z(l(ve)(l(P).name)), 1) ]), y("div", null, [ y("ul", null, [ y("li", null, [ y("span", null, [ y("span", null, z(l(ve)(l(v).title)), 1) ]), y("b", null, [ y("span", null, z(l(oe)(l(W), l(p))), 1) ]), l(F)(l(v).id) ? (M(!0), A(ut, { key: 0 }, xt(l(F)(l(v).id), (G) => (M(), A(ut, null, [ y("span", null, "- " + z(G.name), 1), y("b", null, [ y("span", null, z(l(oe)(G.price, l(p))), 1) ]) ], 64))), 256)) : Z("", !0) ]), l(Mt) ? (M(), A("li", Ia, [ y("span", null, z(l(d)("general.addons")), 1), y("b", null, z(l(oe)(l(Mt), l(p))), 1) ])) : Z("", !0) ]) ]) ])) : Z("", !0) ]), actions: nt(() => [ y("ul", Oa, [ l(c) ? Z("", !0) : (M(), A("div", za, [ D(oo, { modelValue: l(H), "onUpdate:modelValue": dt[0] || (dt[0] = (G) => bt(H) ? H.value = G : null), type: "checkbox", name: "newsletter", label: l(d)("booking.reservation.newsletterSignUp") }, null, 8, ["modelValue", "label"]) ])), l(Lt) ? (M(), A("div", Ea, [ D(oo, { modelValue: l(Tt), "onUpdate:modelValue": dt[2] || (dt[2] = (G) => bt(Tt) ? Tt.value = G : null), type: "checkbox", name: "terms" }, { default: nt(() => [ D(l(Tr), { keypath: "general.termsAndConditionsCheckbox", tag: "span", scope: "global" }, { terms: nt(() => [ y("a", { class: "konnectio-accept-terms-link", onClick: dt[1] || (dt[1] = Ye((G) => U.value = !0, ["prevent"])) }, [ y("span", null, z(l(Qn)(l(d)("general.termsAndConditions"))), 1) ]) ]), _: 1 }) ]), _: 1 }, 8, ["modelValue"]) ])) : Z("", !0), Kn(yt.$slots, "actions", {}, void 0, !0), D(Kr, { modelValue: U.value, "onUpdate:modelValue": dt[3] || (dt[3] = (G) => U.value = G), description: l(ot) }, null, 8, ["modelValue", "description"]) ]) ]), navigation: nt(() => [ Kn(yt.$slots, "navigation", {}, void 0, !0) ]), "mobile-under-price": nt(() => [ y("span", null, z(l(d)("general.for")) + ": ", 1), y("b", null, z(l(yi)(l(T), l(C))) + " " + z(l(Qn)(l(yi)(l(T), l(C)) === 1 ? l(d)("booking.reservation.night") : l(d)("booking.reservation.nights"))), 1), ke((M(), A("span", Ba, [ D(Ct, { icon: "circle-info", type: "fas" }) ])), [ [pt, { content: `<span>(${l(ue)(l(T))} - ${l(ue)(l(C))})</span>`, classes: ["tooltip", "konnectio-tooltip"], html: !0 }] ]) ]), "mobile-summary": nt(() => [ y("span", null, z(`${l(et)} ${l(et) === 1 ? l(d)("general.adult") : l(d)("general.adults")}`), 1), y("span", null, z(`${l(j)} ${l(j) === 1 ? l(d)("general.child") : l(d)("general.children")}`), 1), y("span", null, z(`${l(Rt)} ${l(Rt) === 1 ? l(d)("booking.reservation.room") : l(d)("booking.reservation.rooms")}`), 1) ]), _: 2 }, [ isNaN(l(O)) ? void 0 : { name: "reservation-summary", fn: nt(() => [ l(Ht) ? (M(), A("li", va, [ y("span", null, z(l(d)("general.location")), 1), y("b", null, [ y("span", null, z(l(Ce)(l(O))), 1), ke(y("span", ya, [ D(Ct, { icon: "exclamation-triangle", type: "fas" }) ], 512), [ [Ee, l(E)] ]) ]) ])) : Z("", !0), y("li", null, [ y("span", null, z(l(d)("booking.reservation.arrival")), 1), y("b", null, [ y("span", null, z(l(k)(l(O)) ? `${l(ue)(l(T))}, ${l(o)}` : l(ue)(l(T))), 1), ke(y("span", ba, [ D(Ct, { icon: "exclamation-triangle", type: "fas" }) ], 512), [ [Ee, l(R)] ]) ]) ]), y("li", null, [ y("span", null, z(l(d)("booking.reservation.departure")), 1), y("b", null, [ y("span", null, z(l(k)(l(O)) ? `${l(ue)(l(C))}, ${l(a)}` : l(ue)(l(C))), 1), ke(y("span", La, [ D(Ct, { icon: "exclamation-triangle", type: "fas" }) ], 512), [ [Ee, l(R)] ]) ]) ]), y("li", null, [ y("span", null, z(l(d)("booking.reservation.nights")), 1), y("b", null, z(l(yi)(l(T), l(C))) + " " + z(l(Qn)(l(yi)(l(T), l(C)) === 1 ? l(d)("booking.reservation.night") : l(d)("booking.reservation.nights"))), 1) ]), l(at) && l(at).providesDiscount ? (M(), A("li", wa, [ y("span", null, z(l(at).shortDescription), 1), y("b", null, "-" + z(l(at).discountPercent) + "%", 1) ])) : Z("", !0), l(_) ? (M(!0), A(ut, { key: 2 }, xt(l(_), (G) => (M(), A("li", { key: G.id }, [ y("span", null, z(`${l(d)("general.discountCode")} (${G.value})`), 1), y("b", null, z(G.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__ */ Jt(Za, [["__scopeId", "data-v-0b85dfa9"]]), Da = { id: "konnectio-hotel-guest-discount" }, Na = { class: "konnectio-panel" }, Ra = { id: "konnectio-hotel-guest-discount-title" }, Ha = ["innerHTML"], Va = /* @__PURE__ */ Nt({ __name: "GuestDiscountForm", setup(r) { const { t: d } = Kt(), c = no("history"), p = he(), { display: k } = uo(), o = Xt(); async function a() { if (!o.value) { k({ message: d("alert.error.guestDiscountEmpty"), type: "error" }); return; } if (isNaN(o.value)) { k({ message: d("alert.error.guestDiscountNan"), type: "error" }); return; } await p.checkGuestDiscount(o.value) && (c.gid = o.value.toString()); } return (h, f) => (M(), A("form", Da, [ y("div", Na, [ y("h3", Ra, [ y("span", null, z(l(d)("guestDiscount.title")), 1) ]), y("p", { innerHTML: l(d)("guestDiscount.description") }, null, 8, Ha), D(ta, { modelValue: o.value, "onUpdate:modelValue": f[0] || (f[0] = (g) => o.value = g), label: l(d)("guestDiscount.guestDiscountCode"), placeholder: "XXXXXX", inputType: "number", "button-label": l(d)("guestDiscount.submitButton"), icon: "user-tag", "button-icon": "paper-plane-top", secondary: "", onAction: a }, null, 8, ["modelValue", "label", "button-label"]) ]) ])); } }), Fa = /* @__PURE__ */ Jt(Va, [["__scopeId", "data-v-8c6e1f7e"]]), Ga = { class: "konnectio-room-config-option" }, Ua = { key: 0 }, $a = { class: "konnectio-selected-room-config" }, Wa = { class: "konnectio-selected-room-config-people" }, qa = { key: 0 }, ja = { class: "konnectio-selected-room-config-price" }, Ya = /* @__PURE__ */ Nt({ __name: "RoomConfigField", props: { modelValue: {}, options: {}, required: { type: Boolean, default: !1 }, readonly: { type: Boolean, default: !1 }, label: {} }, emits: ["update:modelValue"], setup(r, { emit: d }) { const { t: c } = Kt(), { currency: p } = $t(Be()), k = d, o = r; function a(f) { k("update:modelValue", f); } const h = vt({ get: () => o.modelValue, set: (f) => a(f) }); return (f, g) => (M(), rt(ln, { modelValue: h.value, "onUpdate:modelValue": g[0] || (g[0] = (b) => h.value = b), label: r.label, placeholder: "Select guest configuration", labelKey: "label", valueKey: "value", "icon-placement": "label", options: r.options, readonly: r.readonly, required: r.required, searchable: !1 }, { option: nt(({ data: b }) => [ y("span", Ga, [ y("div", null, [ D(Ct, { icon: "male", type: "fas", color: "font" }), y("span", null, z(`${b.adults}`), 1), b.children > 0 ? (M(), A("span", Ua, [ D(Ct, { icon: "child", type: "fas", color: "font" }), y("span", null, z(`${b.children}`), 1) ])) : Z("", !0) ]), y("span", null, z(`(${l(oe)(b.price, l(p))})`), 1) ]) ]), "selected-option": nt(({ data: b }) => [ y("div", $a, [ y("div", Wa, [ y("div", null, [ Z("", !0), y("span", null, z(`${b.adults} ${b.adults === 1 ? l(c)("general.adult") : l(c)("general.adults")}`), 1) ]), b.children > 0 ? (M(), A("div", qa, [ Z("", !0), y("span", null, z(`& ${b.children} ${b.children === 1 ? l(c)("general.child") : l(c)("general.children")}`), 1) ])) : Z("", !0) ]), y("div", ja, [ g[1] || (g[1] = y("span", null, null, -1)), ys(" " + z(`(${l(oe)(b.price, l(p))})`), 1) ]) ]) ]), _: 1 }, 8, ["modelValue", "label", "options", "readonly", "required"])); } }), Xa = /* @__PURE__ */ Jt(Ya, [["__scopeId", "data-v-c4045bfc"]]); var Li = { exports: {} }; var Ka = Li.exports, ls; function Ja() { return ls || (ls = 1, (function(r, d) { (function(c, p) { p(d); })(Ka, (function(c) { var p = "1.9.4"; function k(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 a(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 h = 0; function f(t) { return "_leaflet_id" in t || (t._leaflet_id = ++h), t._leaflet_id; } function g(t, e, i) { var n, s, u, m; return m = function() { n = !1, s && (u.apply(i, s), s = !1); }, u = function() { n ? s = arguments : (t.apply(i, arguments), setTimeout(m, e), n = !0); }, u; } function b(t, e, i) { var n = e[1], s = e[0], u = n - s; return t === n && i ? t : ((t - s) % u + u) % u + 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 _(t) { return t.trim ? t.trim() : t.replace(/^\s+|\s+$/g, ""); } function T(t) { return _(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 R(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 O = /\{ *([\w_ -]+) *\}/g; function E(t, e) { return t.replace(O, 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 H = Array.isArray || function(t) { return Object.prototype.toString.call(t) === "[object Array]"; }; function ot(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 Lt(t) { return window["webkit" + t] || window["moz" + t] || window["ms" + t]; } var Tt = 0; function Mt(t) { var e = +/* @__PURE__ */ new Date(), i = Math.max(0, 16 - (e - Tt)); return Tt = e + i, window.setTimeout(t, i); } var Rt = window.requestAnimationFrame || Lt("RequestAnimationFrame") || Mt, et = window.cancelAnimationFrame || Lt("CancelAnimationFrame") || Lt("CancelRequestAnimationFrame") || function(t) { window.clearTimeout(t); }; function j(t, e, i) { if (i && Rt === Mt) t.call(e); else return Rt.call(window, a(t, e)); } function W(t) { t && et.call(window, t); } var It = { __proto__: null, extend: k, create: o, bind: a, get lastId() { return h; }, stamp: f, throttle: g, wrapNum: b, falseFn: v, formatNum: P, trim: _, splitWords: T, setOptions: C, getParamString: R, template: E, isArray: H, indexOf: ot, emptyImageUrl: lt, requestFn: Rt, cancelFn: et, requestAnimFrame: j, cancelAnimFrame: W }; function at() { } at.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 && k(e, t.statics), t.includes && (Ht(t.includes), k.apply(null, [n].concat(t.includes))), k(n, t), delete n.statics, delete n.includes, n.options && (n.options = i.options ? o(i.options) : {}, k(n.options, t.options)), n._initHooks = [], n.callInitHooks = function() { if (!this._initHooksCalled) { i.callInitHooks && i.callInitHooks.call(this), this._initHooksCalled = !0; for (var u = 0, m = n._initHooks.length; u < m; u++) n._initHooks[u].call(this); } }, e; }, at.include = function(t) { var e = this.prototype.options; return k(this.prototype, t), t.options && (this.prototype.options = e, this.mergeOptions(t.options)), this; }, at.mergeOptions = function(t) { return k(this.prototype.options, t), this; }, at.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 Ht(t) { if (!(typeof L > "u" || !L || !L.Mixin)) { t = H(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 ht = { /* @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 = T(t); for (var s = 0, u = t.length; s < u; 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 = T(t); for (var s = arguments.length === 1, u = 0, m = t.length; u < m; u++) s ? this._off(t[u]) : this._off(t[u], 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, u; if (this._events && (n = this._events[t], !!n)) { if (arguments.length === 1) { if (this._firingCount) for (s = 0, u = n.length; s < u; s++) n[s].fn = v; delete this._events[t]; return; } if (typeof e != "function") { console.warn("wrong listener type: " + typeof e); return; } var m = this._listens(t, e, i); if (m !== !1) { var w = n[m]; this._firingCount && (w.fn = v, this._events[t] = n = n.slice()), n.splice(m, 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 = k({}, 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 u = 0, m = s.length; u < m; u++) { var w = s[u], x = w.fn; w.once && this.off(t, x, w.ctx), x.call(w.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 u = this._events && this._events[t]; if (u && u.length && this._listens(t, s, i) !== !1) return !0; if (n) { for (var m in this._eventParents) if (this._eventParents[m].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, u = n.length; s < u; 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 = T(t); for (var s = 0, u = t.length; s < u; 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[f(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[f(t)], this; }, _propagateEvent: function(t) { for (var e in this._eventParents) this._eventParents[e].fire(t.type, k({ layer: t.target, propagatedFrom: t.target }, t), !0); } }; ht.addEventListener = ht.on, ht.removeEventListener = ht.clearAllEventListeners = ht.off, ht.addOneTimeEventListener = ht.once, ht.fireEvent = ht.fire, ht.hasEventListeners = ht.listens; var Vt = at.extend(ht); function F(t, e, i) { this.x = i ? Math.round(t) : t, this.y = i ? Math.round(e) : e; } var Ce = Math.trunc || function(t) { return t > 0 ? Math.floor(t) : Math.ceil(t); }; F.prototype = { // @method clone(): Point // Returns a copy of the current point. clone: function() { return new F(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 F(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 F(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 = Ce(this.x), this.y = Ce(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() { return "Point(" + P(this.x) + ", " + P(this.y) + ")"; } }; function U(t, e, i) { return t instanceof F ? t : H(t) ? new F(t[0], t[1]) : t == null ? t : typeof t == "object" && "x" in t && "y" in t ? new F(t.x, t.y) : new F(t, e, i); } function ct(t, e) { if (t) for (var i = e ? [t, e] : t, n = 0, s = i.length; n < s; n++) this.extend(i[n]); } ct.prototype = { // @method extend(point: Point): this // Extends the bounds to contain the given point. // @alternative // @method extend(otherBounds: Bounds): this // Extend the bounds to contain the given bounds extend: function(t) { var e, i; if (!t) return this; if (t instanceof F || typeof t[0] == "number" || "x" in t) e = i = U(t); else if (t = yt(t), e = t.min, i = t.max, !e || !i) return this; return !this.min && !this.max ? (this.min = e.clone(), this.max = i.clone()) : (this.min.x = Math.min(e.x, this.min.x), this.max.x = Math.max(i.x, this.max.x), this.min.y = Math.min(e.y, this.min.y), this.max.y = Math.max(i.y, this.max.y)), this; }, // @method getCenter(round?: Boolean): Point // Returns the center point of the bounds. getCenter: function(t) { return U( (this.min.x + this.max.x) / 2, (this.min.y + this.max.y) / 2, t ); }, // @method getBottomLeft(): Point // Returns the bottom-left point of the bounds. getBottomLeft: function() { return U(this.min.x, this.max.y); }, // @method getTopRight(): Point // Returns the top-right point of the bounds. getTopRight: function() { return U(this.max.x, this.min.y); }, // @method getTopLeft(): Point // Returns the top-left point of the bounds (i.e. [`this.min`](#bounds-min)). getTopLeft: function() { return this.min; }, // @method getBottomRight(): Point // Returns the bottom-right point of the bounds (i.e. [`this.max`](#bounds-max)). getBottomRight: function() { return this.max; }, // @method getSize(): Point // Returns the size of the given bounds getSize: function() { return this.max.subtract(this.min); }, // @method contains(otherBounds: Bounds): Boolean // Returns `true` if the rectangle contains the given one. // @alternative // @method contains(point: Point): Boolean // Returns `true` if the rectangle contains the given point. contains: function(t) { var e, i; return typeof t[0] == "number" || t instanceof F ? t = U(t) : t = yt(t), t instanceof ct ? (e = t.min, i = t.max) : e = i = t, e.x >= this.min.x && i.x <= this.max.x && e.y >= this.min.y && i.y <= this.max.y; }, // @method intersects(otherBounds: Bounds): Boolean // Returns `true` if the rectangle intersects the given bounds. Two bounds // intersect if they have at least one point in common. intersects: function(t) { t = yt(t); var e =