UNPKG

@konnectio/core

Version:

Konnectio Core Frontend Integration.

1,320 lines 338 kB
import { r as e, t } from "./chunk-BPfpcrXh.js"; import { $ as n, A as r, At as i, C as a, D as o, Dt as s, E as c, Et as l, H as u, M as d, N as f, O as p, P as m, S as h, T as g, V as _, Y as v, _ as ee, a as te, at as ne, bt as y, c as re, dt as b, et as x, ft as S, gt as C, it as w, j as ie, k as T, kt as ae, lt as E, nt as oe, o as D, p as O, q as k, r as A, s as j, t as M, u as N, vt as P, x as F, y as se } from "./mitt-Dp_pykgV.js"; import { t as ce } from "./dist-CcS6KL-S.js"; import { B as le, C as ue, D as de, E as fe, F as pe, G as me, H as he, I as ge, J as _e, L as ve, M as ye, O as be, Q as xe, S as I, U as Se, W as Ce, Z as R, _ as we, b as Te, ct as Ee, dt as De, n as Oe, nt as ke, r as Ae, t as je, tt as Me, v as z, x as B } from "./SelectField-CfD2awPl.js"; import { n as Ne, t as Pe } from "./AvailabilitySkeleton-DVRsnt_Y.js"; import { t as Fe } from "./HotelAvailabilityForm-DxA1wrkE.js"; import { t as Ie } from "./style-Bpqv9k-3.js"; import { t as Le } from "./ActionField-DlqhtdHW.js"; import { a as Re, c as ze, i as Be, l as Ve, n as He, o as Ue, r as We, s as Ge, t as Ke, u as qe } from "./masonry.plugin-BfiSV-UY.js"; import { a as Je, i as V, r as Ye, t as Xe } from "./CheckoutWindow-Cx1MBwXg.js"; import { t as Ze } from "./TermsOfService-C6R8tC_d.js"; //#region node_modules/inner-image-zoom/src/utils/images.js function Qe(e, t) { return t ? { width: window.innerWidth, height: window.innerHeight, left: 0, top: 0 } : e.getBoundingClientRect(); } function $e(e, t) { return e && window.matchMedia && window.matchMedia(`(max-width: ${t}px)`).matches; } function et() { return { onLoadCallback: null, bounds: {}, offsets: {}, ratios: {}, eventPosition: {}, scaledDimensions: {} }; } function tt(e, t, n, r) { return { x: e - n, y: t - r }; } function nt(e, t) { return { x: (t.width - e.width) / e.width, y: (t.height - e.height) / e.height }; } function rt(e, t) { return { width: e.naturalWidth * t, height: e.naturalHeight * t }; } //#endregion //#region node_modules/inner-image-zoom/src/utils/events.js function it(e) { return { x: typeof e.pageX == "number" ? e.pageX : e.changedTouches[0].pageX, y: typeof e.pageY == "number" ? e.pageY : e.changedTouches[0].pageY }; } function at(e, t, n) { let r = (e.pageX - (window.pageXOffset + t.bounds.left)) * -t.ratios.x, i = (e.pageY - (window.pageYOffset + t.bounds.top)) * -t.ratios.y; return { pageX: r + (n ? (window.innerWidth - t.bounds.width) / 2 : 0), pageY: i + (n ? (window.innerHeight - t.bounds.height) / 2 : 0) }; } function ot(e, t) { let n = Math.abs(e.pageX - t.eventPosition.x), r = Math.abs(e.pageY - t.eventPosition.y); return n > 5 || r > 5; } function st(e, t) { let n = lt(e, t); return { left: Math.max(Math.min(n.x, t.bounds.width), 0) * -t.ratios.x, top: Math.max(Math.min(n.y, t.bounds.height), 0) * -t.ratios.y }; } function ct(e, t) { let n = lt(e, t); return { left: Math.max(Math.min(n.x, 0), (t.scaledDimensions.width - t.bounds.width) * -1), top: Math.max(Math.min(n.y, 0), (t.scaledDimensions.height - t.bounds.height) * -1) }; } function lt(e, t) { let n = it(e); return { x: n.x - t.offsets.x, y: n.y - t.offsets.y }; } //#endregion //#region node_modules/vue-inner-image-zoom/src/InnerImageZoom/InnerImageZoom.vue var ut = m({ 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 = et(), $e(this.fullscreenOnMobile, this.mobileBreakpoint) && (this.isActive = !1); }, computed: { validSources: function() { return this.sources ? this.sources.filter((e) => e.srcSet) : []; }, createSpacer: function() { return this.width && this.height && this.hasSpacer; } }, methods: { handleMouseEnter(e) { this.isActive = !0, this.zoomType === "hover" && !this.isZoomed && this.handleClick(e); }, handleTouchStart() { this.isTouch = !0, this.isFullscreen = $e(this.fullscreenOnMobile, this.mobileBreakpoint), this.currentMoveType = "drag"; }, handleClick(e) { 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(e)) : this.imgProps.onLoadCallback = this.zoomIn.bind(this, e); }, handleLoad(e) { let t = rt(e.target, this.zoomScale); this.imgProps.zoomImg = e.target, this.imgProps.zoomImg.setAttribute("width", t.width), this.imgProps.zoomImg.setAttribute("height", t.height), this.imgProps.scaledDimensions = t, this.imgProps.bounds = Qe(this.$refs.img, !1), this.imgProps.ratios = nt(this.imgProps.bounds, t), this.imgProps.onLoadCallback && (this.imgProps.onLoadCallback(), this.imgProps.onLoadCallback = null); }, handleMouseMove(e) { let t = st(e, this.imgProps); this.left = t.left, this.top = t.top; }, handleDragStart(e) { let t = it(e); this.imgProps.offsets = tt(t.x, t.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 = t); }, handleDragMove(e) { let t = ct(e, this.imgProps); this.left = t.left, this.top = t.top; }, handleDragEnd(e) { this.imgProps.zoomImg.removeEventListener(this.isTouch ? "touchmove" : "mousemove", this.handleDragMove), this.isTouch || (this.isDragging = ot(e, this.imgProps)); }, handleMouseLeave(e) { this.currentMoveType === "drag" && this.isZoomed ? this.handleDragEnd(e) : this.handleClose(); }, handleClose() { this.zoomOut(() => { setTimeout(() => { (this.zoomPreload && this.isTouch || !this.zoomPreload) && (this.isActive = !1, this.imgProps = et()), this.isTouch = !1, this.isFullscreen = !1, this.currentMoveType = this.moveType; }, this.isFullscreen ? 0 : this.fadeDuration); }); }, initialMove(e) { this.imgProps.offsets = tt(window.pageXOffset, window.pageYOffset, -this.imgProps.bounds.left, -this.imgProps.bounds.top), this.handleMouseMove(e); }, initialDragMove(e) { let t = at(e, this.imgProps, this.isFullscreen); this.imgProps.bounds = Qe(this.$refs.img, this.isFullscreen), this.imgProps.offsets = tt(0, 0, 0, 0), this.handleDragMove({ ...t, preventDefault: () => {}, stopPropagation: () => {} }); }, zoomIn(e) { this.isZoomed = !0, this.currentMoveType === "drag" ? this.initialDragMove(e) : this.initialMove(e), this.afterZoomIn && this.afterZoomIn(); }, zoomOut(e) { this.isZoomed = !1, this.afterZoomOut && this.afterZoomOut(), e && e(); } } }), dt = { key: 0 }, ft = [ "src", "width", "height" ], pt = [ "src", "width", "height" ], mt = { class: "iiz__zoom-portal" }, ht = ["src"], gt = ["src"], _t = { key: 1, class: "iiz__btn iiz__hint" }; function vt(e, t, r, i, l, u) { return v(), T("figure", _({ class: ["iiz", { ...e.className && { [e.className]: e.className }, "iiz--drag": e.currentMoveType === "drag" }], ref: "img", style: { width: `${e.width}px` } }, ne({ touchstart: e.isZoomed ? () => {} : e.handleTouchStart, click: e.handleClick, mouseenter: e.isTouch ? () => {} : e.handleMouseEnter, mousemove: e.currentMoveType === "drag" || !e.isZoomed ? () => {} : e.handleMouseMove, mouseleave: e.isTouch ? () => {} : e.handleMouseLeave }, !0)), [ c("div", { style: ae({ paddingTop: e.createSpacer ? `${(e.height || 0) / (e.width || 0) * 100}%` : void 0 }) }, [e.validSources ? (v(), T("picture", dt, [(v(!0), T(F, null, n(e.validSources, (e, t) => (v(), T("source", _({ key: t }, { ref_for: !0 }, e), null, 16))), 128)), c("img", _(e.imgAttributes, { class: ["iiz__img", [e.imgAttributes.className || "", { "iiz__img--hidden": e.isZoomed, "iiz__img--abs": e.createSpacer }]], style: { transition: `linear 0ms opacity ${e.isZoomed ? e.fadeDuration : 0}ms, linear 0ms visibility ${e.isZoomed ? e.fadeDuration : 0}ms` }, src: e.src, width: e.width, height: e.height }), null, 16, ft)])) : (v(), T("img", _({ key: 1 }, e.imgAttributes, { class: ["iiz__img", [e.imgAttributes.className || "", { "iiz__img--hidden": e.isZoomed, "iiz__img--abs": e.createSpacer }]], style: { transition: `linear 0ms opacity ${e.isZoomed ? e.fadeDuration : 0}ms, linear 0ms visibility ${e.isZoomed ? e.fadeDuration : 0}ms` }, src: e.src, width: e.width, height: e.height }), null, 16, pt))], 4), e.isActive ? (v(), T(F, { key: 0 }, [e.isFullscreen ? (v(), o(a, { key: 0, to: "body" }, [c("div", mt, [c("img", _({ class: ["iiz__zoom-img", { "iiz__zoom-img--visible": e.isZoomed }], alt: "", draggable: !1, style: { top: `${e.top}px`, left: `${e.left}px`, transition: `linear ${e.isFullscreen ? 0 : e.fadeDuration}ms opacity, linear ${e.isFullscreen ? 0 : e.fadeDuration}ms visibility` }, src: e.zoomSrc || e.src }, ne({ load: e.handleLoad, touchstart: e.handleDragStart, touchend: e.handleDragEnd, mousedown: e.handleDragStart, mouseup: e.handleDragEnd, click: e.handleClick }, !0)), null, 16, ht), !e.hideCloseButton && e.currentMoveType === "drag" ? (v(), T("button", { key: 0, type: "button", class: s(["iiz__btn iiz__close", { "iiz__close--visible": e.isZoomed }]), "aria-label": "Zoom Out", style: ae({ transition: `linear ${e.isFullscreen ? 0 : e.fadeDuration}ms opacity, linear ${e.isFullscreen ? 0 : e.fadeDuration}ms visibility` }), onClick: t[0] ||= se((...t) => e.handleClose && e.handleClose(...t), ["stop"]) }, null, 6)) : p("", !0)])])) : (v(), T(F, { key: 1 }, [c("img", _({ class: ["iiz__zoom-img", { "iiz__zoom-img--visible": e.isZoomed }], alt: "", draggable: !1, style: { top: `${e.top}px`, left: `${e.left}px`, transition: `linear ${e.isFullscreen ? 0 : e.fadeDuration}ms opacity, linear ${e.isFullscreen ? 0 : e.fadeDuration}ms visibility` }, src: e.zoomSrc || e.src }, ne({ load: e.handleLoad, touchstart: e.handleDragStart, touchend: e.handleDragEnd, mousedown: e.handleDragStart, mouseup: e.handleDragEnd }, !0)), null, 16, gt), !e.hideCloseButton && e.currentMoveType === "drag" ? (v(), T("button", { key: 0, class: s(["iiz__btn iiz__close", { "iiz__close--visible": e.isZoomed }]), type: "button", "aria-label": "Zoom Out", style: ae({ transition: `linear ${e.isFullscreen ? 0 : e.fadeDuration}ms opacity, linear ${e.isFullscreen ? 0 : e.fadeDuration}ms visibility` }), onClick: t[1] ||= se((...t) => e.handleClose && e.handleClose(...t), ["stop"]) }, null, 6)) : p("", !0)], 64))], 64)) : p("", !0), !e.isZoomed && !e.hideHint ? (v(), T("span", _t)) : p("", !0) ], 16); } //#endregion //#region node_modules/vue-inner-image-zoom/src/index.js var yt = /* @__PURE__ */ I(ut, [["render", vt], ["__scopeId", "data-v-71b2d8af"]]), H = { key: 0 }, U = { class: "konnectio-hotel-reservation-warning" }, bt = { class: "konnectio-hotel-reservation-warning" }, xt = { class: "konnectio-hotel-reservation-warning" }, St = { key: 1 }, Ct = { class: "konnectio-hotel-reservation-title" }, W = { class: "konnectio-hotel-reservation-information" }, G = { class: "konnectio-hotel-reservation-guests" }, wt = { key: 0 }, Tt = { key: 0, class: "konnectio-hotel-reservation-room-name" }, K = ["onClick"], Et = { key: 0 }, Dt = { key: 1 }, Ot = { class: "konnectio-hotel-reservation-title" }, q = { key: 0, class: "konnectio-hotel-reservation-room-name" }, kt = { class: "konnectio-hotel-reservation-information" }, At = { class: "konnectio-hotel-reservation-guests" }, jt = { key: 0 }, Mt = { key: 0 }, Nt = { class: "konnectio-reservation-actions" }, Pt = { key: 0, class: "konnectio-newsletter-signup" }, Ft = { key: 1, class: "konnectio-accept-terms" }, It = { class: "konnectio-hotel-reservation-tooltip" }, Lt = /* @__PURE__ */ I(/* @__PURE__ */ m({ __name: "HotelReservationForm", props: { forceArrivalTime: {}, forceDepartureTime: {}, showRemoveRoom: { type: Boolean, default: !1 }, showGiftCard: { type: Boolean, default: !1 }, availabilityDiscount: { type: Boolean, default: !1 }, showTermsNotice: { type: Boolean, default: !1 }, prevCallback: {} }, setup(e) { let { t } = D(), { disableNewsletterSignup: a, currency: s } = N(fe()), { hasArrivalDepartureInputs: u } = fe(), { arrivalTime: f, departureTime: m, roomDisplay: h, templateID: g, totalPrice: _, areListingsLoading: ne, getSelectedPackageRooms: re, templateRoomUnits: w, selectedPackage: ie, discountVouchers: ae, currentArrivalDate: E, currentDepartureDate: O, datesMismatch: k, currentLocation: A, locationMismatch: j, newsMails: M, termsOfService: P, discountCode: ce, hasTermOfService: le, acceptTerms: de, totalTemplateAddonPrice: he, totalRooms: ge, totalAdults: ye, totalChildren: xe, weekendFee: I, selectedMemberCardData: Ce, appliedDiscountCode: R, guestDiscountCode: we, isValidatingDiscountCode: Te } = N(be()), { hasHotelLocations: Ee } = N(ue()), { removeRoom: De, validateDiscountCode: Oe, getMandatoryRoomGroupAddons: ke, resetDiscountVoucher: Ae, setGuestDiscountCode: je, clearGuestDiscountCode: Me, fetchAvailabilityData: z } = be(), { getHotelLocationName: Ne } = ue(), Pe = y(!1); function Fe(e) { je(e), z(); } function Ie() { Me(), z(); } function Le(e) { return e.reduce((e, { totalPrice: t }) => e + t, 0); } return (y, D) => { let N = oe("tooltip"); return v(), o(Ue, { "discount-code": l(ce), "onUpdate:discountCode": D[4] ||= (e) => C(ce) ? ce.value = e : null, "validate-discount-code": l(Oe), "total-price": l(_), "weekend-fee": l(I), "show-gift-card": e.showGiftCard, "availability-discount": e.availabilityDiscount, "show-terms-notice": e.showTermsNotice, "is-sidebar-loading": l(ne), notice: l(t)("hotel.reservationNotice"), "prev-callback": e.prevCallback, "applied-discount-code": l(R), "guest-discount-code": l(we), "is-validating-discount-code": l(Te), "on-reset-discount-code": l(Ae), "on-apply-availability-discount": Fe, "on-clear-availability-discount": Ie }, r({ form: b(() => [x(y.$slots, "form", {}, void 0, !0)]), "price-summary": b(() => [isNaN(l(g)) && l(h).length > 0 ? (v(!0), T(F, { key: 0 }, n(l(h), ({ roomGroupID: r, title: a, variants: o }) => (v(), T("div", { key: r }, [c("h6", null, [c("span", null, i(l(pe)(a)), 1)]), (v(!0), T(F, null, n(o, (a, o) => (v(), T("div", { key: o }, [(v(!0), T(F, null, n(a.rooms, (n, u) => (v(), T("ul", { key: u }, [c("li", null, [ c("span", Ct, i(l(pe)(a.name)), 1), c("span", W, [c("span", G, [c("span", null, [d(B, { icon: "male", type: "fas", color: "font" }), c("span", null, i(n.adultsCount), 1)]), n.childrenCount > 0 ? (v(), T("span", wt, [d(B, { icon: "child", type: "fas", color: "font" }), c("span", null, i(n.childrenCount), 1)])) : p("", !0)]), n.roomName ? (v(), T("span", Tt, "(" + i(n.roomName) + ")", 1)) : p("", !0)]), c("b", null, [c("span", null, i(l(_e)(n.totalPrice, l(s))), 1), e.showRemoveRoom ? (v(), T("span", { key: 0, class: "konnectio-hotel-reservation-remove", onClick: se((e) => l(De)(r, o, n.configIdx), ["prevent"]) }, [d(B, { icon: "times", type: "fas", "icon-color": "#ff0000" })], 8, K)) : p("", !0)]) ]), Le(n.roomAddons) > 0 ? (v(), T("li", Et, [c("span", null, i(l(t)("general.addons")), 1), c("b", null, i(l(_e)(Le(n.roomAddons), l(s))), 1)])) : p("", !0)]))), 128))]))), 128))]))), 128)) : p("", !0), l(w).length > 0 && l(ie) ? (v(), T("div", Dt, [c("h6", null, [c("span", null, i(l(pe)(l(ie).name)), 1)]), c("div", null, [c("ul", null, [(v(!0), T(F, null, n(l(w), (e, r) => (v(), T("li", { key: r }, [ c("span", Ot, [c("span", null, i(l(pe)(l(re).find((t) => t.id === e.roomGroupId)?.title ?? "")), 1), l(w).filter((t) => t.roomGroupId === e.roomGroupId).length > 1 ? (v(), T("span", q, "(" + i(l(t)("booking.reservation.room")) + " " + i(l(w).slice(0, r + 1).filter((t) => t.roomGroupId === e.roomGroupId).length) + ")", 1)) : p("", !0)]), c("span", kt, [c("span", At, [c("span", null, [d(B, { icon: "male", type: "fas", color: "font" }), c("span", null, i(e.adults), 1)]), e.children > 0 ? (v(), T("span", jt, [d(B, { icon: "child", type: "fas", color: "font" }), c("span", null, i(e.children), 1)])) : p("", !0)])]), c("b", null, [c("span", null, i(l(_e)((l(re).find((t) => t.id === e.roomGroupId)?.extraPrice ?? 0) + l(I), l(s))), 1)]), l(ke)(e.roomGroupId) ? (v(!0), T(F, { key: 0 }, n(l(ke)(e.roomGroupId), (e) => (v(), T(F, null, [c("span", null, "- " + i(e.name), 1), c("b", null, [c("span", null, i(l(_e)(e.price, l(s))), 1)])], 64))), 256)) : p("", !0) ]))), 128)), l(he) ? (v(), T("li", Mt, [c("span", null, i(l(t)("general.addons")), 1), c("b", null, i(l(_e)(l(he), l(s))), 1)])) : p("", !0)])])])) : p("", !0)]), actions: b(() => [c("ul", Nt, [ l(a) ? p("", !0) : (v(), T("div", Pt, [d(Ye, { modelValue: l(M), "onUpdate:modelValue": D[0] ||= (e) => C(M) ? M.value = e : null, type: "checkbox", name: "newsletter", label: l(t)("booking.reservation.newsletterSignUp") }, null, 8, ["modelValue", "label"])])), l(le) ? (v(), T("div", Ft, [d(Ye, { modelValue: l(de), "onUpdate:modelValue": D[2] ||= (e) => C(de) ? de.value = e : null, type: "checkbox", name: "terms" }, { default: b(() => [d(l(te), { keypath: "general.termsAndConditionsCheckbox", tag: "span", scope: "global" }, { terms: b(() => [c("a", { class: "konnectio-accept-terms-link", onClick: D[1] ||= se((e) => Pe.value = !0, ["prevent"]) }, [c("span", null, i(l(Se)(l(t)("general.termsAndConditions"))), 1)])]), _: 1 })]), _: 1 }, 8, ["modelValue"])])) : p("", !0), x(y.$slots, "actions", {}, void 0, !0), d(Ze, { modelValue: Pe.value, "onUpdate:modelValue": D[3] ||= (e) => Pe.value = e, description: l(P) }, null, 8, ["modelValue", "description"]) ])]), navigation: b(() => [x(y.$slots, "navigation", {}, void 0, !0)]), "mobile-under-price": b(() => [ c("span", null, i(l(t)("general.for")) + ": ", 1), c("b", null, i(l(ve)(l(E), l(O))) + " " + i(l(Se)(l(ve)(l(E), l(O)) === 1 ? l(t)("booking.reservation.night") : l(t)("booking.reservation.nights"))), 1), S((v(), T("span", It, [d(B, { icon: "circle-info", type: "fas" })])), [[N, { content: `<span>(${l(me)(l(E))} - ${l(me)(l(O))})</span>`, classes: ["tooltip", "konnectio-tooltip"], html: !0 }]]) ]), "mobile-summary": b(() => [ c("span", null, i(`${l(ye)} ${l(ye) === 1 ? l(t)("general.adult") : l(t)("general.adults")}`), 1), c("span", null, i(`${l(xe)} ${l(xe) === 1 ? l(t)("general.child") : l(t)("general.children")}`), 1), c("span", null, i(`${l(ge)} ${l(ge) === 1 ? l(t)("booking.reservation.room") : l(t)("booking.reservation.rooms")}`), 1) ]), _: 2 }, [isNaN(l(A)) ? void 0 : { name: "reservation-summary", fn: b(() => [ l(Ee) ? (v(), T("li", H, [c("span", null, i(l(t)("general.location")), 1), c("b", null, [c("span", null, i(l(Ne)(l(A))), 1), S(c("span", U, [d(B, { icon: "exclamation-triangle", type: "fas" })], 512), [[ee, l(j)]])])])) : p("", !0), c("li", null, [c("span", null, i(l(t)("booking.reservation.arrival")), 1), c("b", null, [c("span", null, i(l(u)(l(A)) ? `${l(me)(l(E))}, ${l(f)}` : l(me)(l(E))), 1), S(c("span", bt, [d(B, { icon: "exclamation-triangle", type: "fas" })], 512), [[ee, l(k)]])])]), c("li", null, [c("span", null, i(l(t)("booking.reservation.departure")), 1), c("b", null, [c("span", null, i(l(u)(l(A)) ? `${l(me)(l(O))}, ${l(m)}` : l(me)(l(O))), 1), S(c("span", xt, [d(B, { icon: "exclamation-triangle", type: "fas" })], 512), [[ee, l(k)]])])]), c("li", null, [c("span", null, i(l(t)("booking.reservation.nights")), 1), c("b", null, i(l(ve)(l(E), l(O))) + " " + i(l(Se)(l(ve)(l(E), l(O)) === 1 ? l(t)("booking.reservation.night") : l(t)("booking.reservation.nights"))), 1)]), l(Ce) && l(Ce).providesDiscount ? (v(), T("li", St, [c("span", null, i(l(Ce).shortDescription), 1), c("b", null, "-" + i(l(Ce).discountPercent) + "%", 1)])) : p("", !0), l(ae) ? (v(!0), T(F, { key: 2 }, n(l(ae), (e) => (v(), T("li", { key: e.id }, [c("span", null, i(`${l(t)("general.discountCode")} (${e.value})`), 1), c("b", null, i(e.key), 1)]))), 128)) : p("", !0) ]), key: "0" }]), 1032, [ "discount-code", "validate-discount-code", "total-price", "weekend-fee", "show-gift-card", "availability-discount", "show-terms-notice", "is-sidebar-loading", "notice", "prev-callback", "applied-discount-code", "guest-discount-code", "is-validating-discount-code", "on-reset-discount-code" ]); }; } }), [["__scopeId", "data-v-d1dc9622"]]), Rt = { id: "konnectio-hotel-guest-discount" }, zt = { class: "konnectio-panel" }, Bt = { id: "konnectio-hotel-guest-discount-title" }, Vt = ["innerHTML"], Ht = /* @__PURE__ */ I(/* @__PURE__ */ m({ __name: "GuestDiscountForm", setup(e) { let { t } = D(), n = De("history"), r = be(), { display: a } = ye(), o = y(); async function s() { if (!o.value) { a({ message: t("alert.error.guestDiscountEmpty"), type: "error" }); return; } if (isNaN(o.value)) { a({ message: t("alert.error.guestDiscountNan"), type: "error" }); return; } await r.checkGuestDiscount(o.value) && (n.gid = o.value.toString()); } return (e, n) => (v(), T("form", Rt, [c("div", zt, [ c("h3", Bt, [c("span", null, i(l(t)("guestDiscount.title")), 1)]), c("p", { innerHTML: l(t)("guestDiscount.description") }, null, 8, Vt), d(Le, { modelValue: o.value, "onUpdate:modelValue": n[0] ||= (e) => o.value = e, label: l(t)("guestDiscount.guestDiscountCode"), placeholder: "XXXXXX", inputType: "number", "button-label": l(t)("guestDiscount.submitButton"), icon: "user-tag", "button-icon": "paper-plane-top", secondary: "", onAction: s }, null, 8, [ "modelValue", "label", "button-label" ]) ])])); } }), [["__scopeId", "data-v-8c6e1f7e"]]), J = { class: "konnectio-room-config-option" }, Ut = { key: 0 }, Y = { class: "konnectio-selected-room-config" }, Wt = { class: "konnectio-selected-room-config-people" }, Gt = { key: 0 }, Kt = { class: "konnectio-selected-room-config-price" }, qt = /* @__PURE__ */ I(/* @__PURE__ */ m({ __name: "RoomConfigField", props: { modelValue: {}, options: {}, required: { type: Boolean, default: !1 }, readonly: { type: Boolean, default: !1 }, label: {} }, emits: ["update:modelValue"], setup(e, { emit: t }) { let { t: n } = D(), { currency: r } = N(fe()), a = t, s = e; function u(e) { a("update:modelValue", e); } let f = g({ get: () => s.modelValue, set: (e) => u(e) }); return (t, a) => (v(), o(je, { modelValue: f.value, "onUpdate:modelValue": a[0] ||= (e) => f.value = e, label: e.label, placeholder: "Select guest configuration", labelKey: "label", valueKey: "value", "icon-placement": "label", options: e.options, readonly: e.readonly, required: e.required, searchable: !1 }, { option: b(({ data: e }) => [c("span", J, [c("div", null, [ d(B, { icon: "male", type: "fas", color: "font" }), c("span", null, i(`${e.adults}`), 1), e.children > 0 ? (v(), T("span", Ut, [d(B, { icon: "child", type: "fas", color: "font" }), c("span", null, i(`${e.children}`), 1)])) : p("", !0) ]), c("span", null, i(`(${l(_e)(e.price, l(r))})`), 1)])]), "selected-option": b(({ data: e }) => [c("div", Y, [c("div", Wt, [c("div", null, [p("", !0), c("span", null, i(`${e.adults} ${e.adults === 1 ? l(n)("general.adult") : l(n)("general.adults")}`), 1)]), e.children > 0 ? (v(), T("div", Gt, [p("", !0), c("span", null, i(`& ${e.children} ${e.children === 1 ? l(n)("general.child") : l(n)("general.children")}`), 1)])) : p("", !0)]), c("div", Kt, [a[1] ||= c("span", null, null, -1), ie(" " + i(`(${l(_e)(e.price, l(r))})`), 1)])])]), _: 1 }, 8, [ "modelValue", "label", "options", "readonly", "required" ])); } }), [["__scopeId", "data-v-c4045bfc"]]), X = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => { (function(n, r) { typeof e == "object" && t !== void 0 ? r(e) : typeof define == "function" && define.amd ? define(["exports"], r) : (n = typeof globalThis < "u" ? globalThis : n || self, r(n.leaflet = {})); })(e, (function(e) { var t = "1.9.4"; function n(e) { var t, n, r, i; for (n = 1, r = arguments.length; n < r; n++) for (t in i = arguments[n], i) e[t] = i[t]; return e; } var r = Object.create || (function() { function e() {} return function(t) { return e.prototype = t, new e(); }; })(); function i(e, t) { var n = Array.prototype.slice; if (e.bind) return e.bind.apply(e, n.call(arguments, 1)); var r = n.call(arguments, 2); return function() { return e.apply(t, r.length ? r.concat(n.call(arguments)) : arguments); }; } var a = 0; function o(e) { return "_leaflet_id" in e || (e._leaflet_id = ++a), e._leaflet_id; } function s(e, t, n) { var r, i, a, o = function() { r = !1, i &&= (a.apply(n, i), !1); }; return a = function() { r ? i = arguments : (e.apply(n, arguments), setTimeout(o, t), r = !0); }, a; } function c(e, t, n) { var r = t[1], i = t[0], a = r - i; return e === r && n ? e : ((e - i) % a + a) % a + i; } function l() { return !1; } function u(e, t) { if (t === !1) return e; var n = 10 ** (t === void 0 ? 6 : t); return Math.round(e * n) / n; } function d(e) { return e.trim ? e.trim() : e.replace(/^\s+|\s+$/g, ""); } function f(e) { return d(e).split(/\s+/); } function p(e, t) { for (var n in Object.prototype.hasOwnProperty.call(e, "options") || (e.options = e.options ? r(e.options) : {}), t) e.options[n] = t[n]; return e.options; } function m(e, t, n) { var r = []; for (var i in e) r.push(encodeURIComponent(n ? i.toUpperCase() : i) + "=" + encodeURIComponent(e[i])); return (!t || t.indexOf("?") === -1 ? "?" : "&") + r.join("&"); } var h = /\{ *([\w_ -]+) *\}/g; function g(e, t) { return e.replace(h, function(e, n) { var r = t[n]; if (r === void 0) throw Error("No value provided for variable " + e); return typeof r == "function" && (r = r(t)), r; }); } var _ = Array.isArray || function(e) { return Object.prototype.toString.call(e) === "[object Array]"; }; function v(e, t) { for (var n = 0; n < e.length; n++) if (e[n] === t) return n; return -1; } var ee = "data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs="; function te(e) { return window["webkit" + e] || window["moz" + e] || window["ms" + e]; } var ne = 0; function y(e) { var t = +/* @__PURE__ */ new Date(), n = Math.max(0, 16 - (t - ne)); return ne = t + n, window.setTimeout(e, n); } var re = window.requestAnimationFrame || te("RequestAnimationFrame") || y, b = window.cancelAnimationFrame || te("CancelAnimationFrame") || te("CancelRequestAnimationFrame") || function(e) { window.clearTimeout(e); }; function x(e, t, n) { if (n && re === y) e.call(t); else return re.call(window, i(e, t)); } function S(e) { e && b.call(window, e); } var C = { __proto__: null, extend: n, create: r, bind: i, get lastId() { return a; }, stamp: o, throttle: s, wrapNum: c, falseFn: l, formatNum: u, trim: d, splitWords: f, setOptions: p, getParamString: m, template: g, isArray: _, indexOf: v, emptyImageUrl: ee, requestFn: re, cancelFn: b, requestAnimFrame: x, cancelAnimFrame: S }; function w() {} w.extend = function(e) { var t = function() { p(this), this.initialize && this.initialize.apply(this, arguments), this.callInitHooks(); }, i = t.__super__ = this.prototype, a = r(i); for (var o in a.constructor = t, t.prototype = a, this) Object.prototype.hasOwnProperty.call(this, o) && o !== "prototype" && o !== "__super__" && (t[o] = this[o]); return e.statics && n(t, e.statics), e.includes && (ie(e.includes), n.apply(null, [a].concat(e.includes))), n(a, e), delete a.statics, delete a.includes, a.options && (a.options = i.options ? r(i.options) : {}, n(a.options, e.options)), a._initHooks = [], a.callInitHooks = function() { if (!this._initHooksCalled) { i.callInitHooks && i.callInitHooks.call(this), this._initHooksCalled = !0; for (var e = 0, t = a._initHooks.length; e < t; e++) a._initHooks[e].call(this); } }, t; }, w.include = function(e) { var t = this.prototype.options; return n(this.prototype, e), e.options && (this.prototype.options = t, this.mergeOptions(e.options)), this; }, w.mergeOptions = function(e) { return n(this.prototype.options, e), this; }, w.addInitHook = function(e) { var t = Array.prototype.slice.call(arguments, 1), n = typeof e == "function" ? e : function() { this[e].apply(this, t); }; return this.prototype._initHooks = this.prototype._initHooks || [], this.prototype._initHooks.push(n), this; }; function ie(e) { if (!(typeof L > "u" || !L || !L.Mixin)) { e = _(e) ? e : [e]; for (var t = 0; t < e.length; t++) e[t] === 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.", (/* @__PURE__ */ Error()).stack); } } var T = { on: function(e, t, n) { if (typeof e == "object") for (var r in e) this._on(r, e[r], t); else { e = f(e); for (var i = 0, a = e.length; i < a; i++) this._on(e[i], t, n); } return this; }, off: function(e, t, n) { if (!arguments.length) delete this._events; else if (typeof e == "object") for (var r in e) this._off(r, e[r], t); else { e = f(e); for (var i = arguments.length === 1, a = 0, o = e.length; a < o; a++) i ? this._off(e[a]) : this._off(e[a], t, n); } return this; }, _on: function(e, t, n, r) { if (typeof t != "function") { console.warn("wrong listener type: " + typeof t); return; } if (this._listens(e, t, n) === !1) { n === this && (n = void 0); var i = { fn: t, ctx: n }; r && (i.once = !0), this._events = this._events || {}, this._events[e] = this._events[e] || [], this._events[e].push(i); } }, _off: function(e, t, n) { var r, i, a; if (this._events && (r = this._events[e], r)) { if (arguments.length === 1) { if (this._firingCount) for (i = 0, a = r.length; i < a; i++) r[i].fn = l; delete this._events[e]; return; } if (typeof t != "function") { console.warn("wrong listener type: " + typeof t); return; } var o = this._listens(e, t, n); if (o !== !1) { var s = r[o]; this._firingCount && (s.fn = l, this._events[e] = r = r.slice()), r.splice(o, 1); } } }, fire: function(e, t, r) { if (!this.listens(e, r)) return this; var i = n({}, t, { type: e, target: this, sourceTarget: t && t.sourceTarget || this }); if (this._events) { var a = this._events[e]; if (a) { this._firingCount = this._firingCount + 1 || 1; for (var o = 0, s = a.length; o < s; o++) { var c = a[o], l = c.fn; c.once && this.off(e, l, c.ctx), l.call(c.ctx || this, i); } this._firingCount--; } } return r && this._propagateEvent(i), this; }, listens: function(e, t, n, r) { typeof e != "string" && console.warn("\"string\" type argument expected"); var i = t; typeof t != "function" && (r = !!t, i = void 0, n = void 0); var a = this._events && this._events[e]; if (a && a.length && this._listens(e, i, n) !== !1) return !0; if (r) { for (var o in this._eventParents) if (this._eventParents[o].listens(e, t, n, r)) return !0; } return !1; }, _listens: function(e, t, n) { if (!this._events) return !1; var r = this._events[e] || []; if (!t) return !!r.length; n === this && (n = void 0); for (var i = 0, a = r.length; i < a; i++) if (r[i].fn === t && r[i].ctx === n) return i; return !1; }, once: function(e, t, n) { if (typeof e == "object") for (var r in e) this._on(r, e[r], t, !0); else { e = f(e); for (var i = 0, a = e.length; i < a; i++) this._on(e[i], t, n, !0); } return this; }, addEventParent: function(e) { return this._eventParents = this._eventParents || {}, this._eventParents[o(e)] = e, this; }, removeEventParent: function(e) { return this._eventParents && delete this._eventParents[o(e)], this; }, _propagateEvent: function(e) { for (var t in this._eventParents) this._eventParents[t].fire(e.type, n({ layer: e.target, propagatedFrom: e.target }, e), !0); } }; T.addEventListener = T.on, T.removeEventListener = T.clearAllEventListeners = T.off, T.addOneTimeEventListener = T.once, T.fireEvent = T.fire, T.hasEventListeners = T.listens; var ae = w.extend(T); function E(e, t, n) { this.x = n ? Math.round(e) : e, this.y = n ? Math.round(t) : t; } var oe = Math.trunc || function(e) { return e > 0 ? Math.floor(e) : Math.ceil(e); }; E.prototype = { clone: function() { return new E(this.x, this.y); }, add: function(e) { return this.clone()._add(D(e)); }, _add: function(e) { return this.x += e.x, this.y += e.y, this; }, subtract: function(e) { return this.clone()._subtract(D(e)); }, _subtract: function(e) { return this.x -= e.x, this.y -= e.y, this; }, divideBy: function(e) { return this.clone()._divideBy(e); }, _divideBy: function(e) { return this.x /= e, this.y /= e, this; }, multiplyBy: function(e) { return this.clone()._multiplyBy(e); }, _multiplyBy: function(e) { return this.x *= e, this.y *= e, this; }, scaleBy: function(e) { return new E(this.x * e.x, this.y * e.y); }, unscaleBy: function(e) { return new E(this.x / e.x, this.y / e.y); }, round: function() { return this.clone()._round(); }, _round: function() { return this.x = Math.round(this.x), this.y = Math.round(this.y), this; }, floor: function() { return this.clone()._floor(); }, _floor: function() { return this.x = Math.floor(this.x), this.y = Math.floor(this.y), this; }, ceil: function() { return this.clone()._ceil(); }, _ceil: function() { return this.x = Math.ceil(this.x), this.y = Math.ceil(this.y), this; }, trunc: function() { return this.clone()._trunc(); }, _trunc: function() { return this.x = oe(this.x), this.y = oe(this.y), this; }, distanceTo: function(e) { e = D(e); var t = e.x - this.x, n = e.y - this.y; return Math.sqrt(t * t + n * n); }, equals: function(e) { return e = D(e), e.x === this.x && e.y === this.y; }, contains: function(e) { return e = D(e), Math.abs(e.x) <= Math.abs(this.x) && Math.abs(e.y) <= Math.abs(this.y); }, toString: function() { return "Point(" + u(this.x) + ", " + u(this.y) + ")"; } }; function D(e, t, n) { return e instanceof E ? e : _(e) ? new E(e[0], e[1]) : e == null ? e : typeof e == "object" && "x" in e && "y" in e ? new E(e.x, e.y) : new E(e, t, n); } function O(e, t) { if (e) for (var n = t ? [e, t] : e, r = 0, i = n.length; r < i; r++) this.extend(n[r]); } O.prototype = { extend: function(e) { var t, n; if (!e) return this; if (e instanceof E || typeof e[0] == "number" || "x" in e) t = n = D(e); else if (e = k(e), t = e.min, n = e.max, !t || !n) return this; return !this.min && !this.max ? (this.min = t.clone(), this.max = n.clone()) : (this.min.x = Math.min(t.x, this.min.x), this.max.x = Math.max(n.x, this.max.x), this.min.y = Math.min(t.y, this.min.y), this.max.y = Math.max(n.y, this.max.y)), this; }, getCenter: function(e) { return D((this.min.x + this.max.x) / 2, (this.min.y + this.max.y) / 2, e); }, getBottomLeft: function() { return D(this.min.x, this.max.y); }, getTopRight: function() { return D(this.max.x, this.min.y); }, getTopLeft: function() { return this.min; }, getBottomRight: function() { return this.max; }, getSize: function() { return this.max.subtract(this.min); }, contains: function(e) { var t, n; return e = typeof e[0] == "number" || e instanceof E ? D(e) : k(e), e instanceof O ? (t = e.min, n = e.max) : t = n = e, t.x >= this.min.x && n.x <= this.max.x && t.y >= this.min.y && n.y <= this.max.y; }, intersects: function(e) { e = k(e); var t = this.min, n = this.max, r = e.min, i = e.max, a = i.x >= t.x && r.x <= n.x, o = i.y >= t.y && r.y <= n.y; return a && o; }, overlaps: function(e) { e = k(e); var t = this.min, n = this.max, r = e.min, i = e.max, a = i.x > t.x && r.x < n.x, o = i.y > t.y && r.y < n.y; return a && o; }, isValid: function() { return !!(this.min && this.max); }, pad: function(e) { var t = this.min, n = this.max, r = Math.abs(t.x - n.x) * e, i = Math.abs(t.y - n.y) * e; return k(D(t.x - r, t.y - i), D(n.x + r, n.y + i)); }, equals: function(e) { return e ? (e = k(e), this.min.equals(e.getTopLeft()) && this.max.equals(e.getBottomRight())) : !1; } }; function k(e, t) { return !e || e instanceof O ? e : new O(e, t); } function A(e, t) { if (e) for (var n = t ? [e, t] : e, r = 0, i = n.length; r < i; r++) this.extend(n[r]); } A.prototype = { extend: function(e) { var t = this._southWest, n = this._northEast, r, i; if (e instanceof M) r = e, i = e; else if (e instanceof A) { if (r = e._southWest, i = e._northEast, !r || !i) return this; } else return e ? this.extend(N(e) || j(e)) : this; return !t && !n ? (this._southWest = new M(r.lat, r.lng), this._northEast = new M(i.lat, i.lng)) : (t.lat = Math.min(r.lat, t.lat), t.lng = Math.min(r.lng, t.lng), n.lat = Math.max(i.lat, n.lat), n.lng = Math.max(i.lng, n.lng)), this; }, pad: function(e) { var t = this._southWest, n = this._northEast, r = Math.abs(t.lat - n.lat) * e, i = Math.abs(t.lng - n.lng) * e; return new A(new M(t.lat - r, t.lng - i), new M(n.lat + r, n.lng + i)); }, getCenter: function() { return new M((this._southWest.lat + this._northEast.lat) / 2, (this._southWest.lng + this._northEast.lng) / 2); }, getSouthWest: function() { return this._southWest; }, getNorthEast: function() { return this._northEast; }, getNorthWest: function() { return new M(this.getNorth(), this.getWest()); }, getSouthEast: function() { return new M(this.getSouth(), this.getEast()); }, getWest: function() { return this._southWest.lng; }, getSouth: function() { return this._southWest.lat; }, getEast: function() { return this._northEast.lng; }, getNorth: function() { return this._northEast.lat; }, contains: function(e) { e = typeof e[0] == "number" || e instanceof M || "lat" in e ? N(e) : j(e); var t = this._southWest, n = this._northEast, r, i; return e instanceof A ? (r = e.getSouthWest(), i = e.getNorthEast()) : r = i = e, r.lat >= t.lat && i.lat <= n.lat && r.lng >= t.lng && i.lng <= n.lng; }, intersects: function(e) { e = j(e); var t = this._southWest, n = this._northEast, r = e.getSouthWest(), i = e.getNorthEast(), a = i.lat >= t.lat && r.lat <= n.lat, o = i.lng >= t.lng && r.lng <= n.lng; return a && o; }, overlaps: function(e) { e = j(e); var t = this._southWest, n = this._northEast, r = e.getSouthWest(), i = e.getNorthEast(), a = i.lat > t.lat && r.lat < n.lat, o = i.lng > t.lng && r.lng < n.lng; return a && o; }, toBBoxString: function() { return [ this.getWest(), this.getSouth(), this.getEast(), this.getNorth() ].join(","); }, equals: function(e, t) { return e ? (e = j(e), this._southWest.equals(e.getSouthWest(), t) && this._northEast.equals(e.getNorthEast(), t)) : !1; }, isValid: function() { return !!(this._southWest && this._northEast); } }; function j(e, t) { return e instanceof A ? e : new A(e, t); } function M(e, t, n) { if (isNaN(e) || isNaN(t)) throw Error("Invalid LatLng object: (" + e + ", " + t + ")"); this.lat = +e, this.lng = +t, n !== void 0 && (this.alt = +n); } M.prototype = { equals: function(e, t) { return e ? (e = N(e), Math.max(Math.abs(this.lat - e.lat), Math.abs(this.lng - e.lng)) <= (t === void 0 ? 1e-9 : t)) : !1; }, toString: function(e) { return "LatLng(" + u(this.lat, e) + ", " + u(this.lng, e) + ")"; }, distanceTo: function(e) { return F.distance(this, N(e)); }, wrap: function() { return F.wrapLatLng(this); }, toBounds: function(e) { var t = 180 * e / 40075017, n = t / Math.cos(Math.PI / 180 * this.lat); return j([this.lat - t, this.lng - n], [this.lat + t, this.lng + n]); }, clone: function() { return new M(this.lat, this.lng, this.alt); } }; function N(e, t, n) { return e instanceof M ? e : _(e) && typeof e[0] != "object" ? e.length === 3 ? new M(e[0], e[1], e[2]) : e.length === 2 ? new M(e[0], e[1]) : null : e == null ? e : typeof e == "object" && "lat" in e ? new M(e.lat, "lng" in e ? e.lng : e.lon, e.alt) : t === void 0 ? null : new M(e, t, n); } var P = { latLngToPoint: function(e, t) { var n = this.projection.project(e), r = this.scale(t); return this.transformation._transform(n, r); }, pointToLatLng: function(e, t) { var n = this.scale(t), r = this.transformation.untransform(e, n); return this.projection.unproject(r); }, project: function(e) { return this.projection.project(e); }, unproject: function(e) { return this.projection.unproject(e); }, scale: function(e) { return 256 * 2 ** e; }, zoom: function(e) { return Math.log(e / 256) / Math.LN2; }, getProjectedBounds: function(e) { if (this.infinite) return null; var t = this.projection.bounds, n = this.scale(e); return new O(this.transformation.transform(t.min, n), this.transformation.transform(t.max, n)); }, infinite: !1, wrapLatLng: function(e) { var t = this.wrapLng ? c(e.lng, this.wrapLng, !0) : e.lng, n = this.wrapLat ? c(e.lat, this.wrapLat, !0) : e.lat, r = e.alt; return new M(n, t, r); }, wrapLatLngBounds: function(e) { var t = e.getCenter(), n = this.wrapLatLng(t), r = t.lat - n.lat, i = t.lng - n.lng; if (r === 0 && i === 0) return e; var a = e.getSouthWest(), o = e.getNorthEast(); return new A(new M(a.lat - r, a.lng - i), new M(o.lat - r, o.lng - i)); } }, F = n({}, P, { wrapLng: [-180, 180], R: 6371e3, distance: function(e, t) { var n = Math.PI / 180, r = e.lat * n, i = t.lat * n, a = Math.sin((t.lat - e.lat) * n / 2), o = Math.sin((t.lng - e.lng) * n / 2), s = a * a + Math.cos(r) * Math.cos(i) * o * o, c = 2 * Math.atan2(Math.sqrt(s), Math.sqrt(1 - s)); return this.R * c; } }), se = 6378137, ce = { R: se, MAX_LATITUDE: 85.0511287798, project: function(e) { var t = Math.PI / 180, n = this.MAX_LATITUDE, r = Math.max(Math.min(n, e.lat), -n), i = Math.sin(r * t); return new E(this.R * e.lng * t, this.R * Math.log((1 + i) / (1 - i)) / 2); }, unproject: function(e) { var t = 180 / Math.PI; return new M((2 * Math.atan(Math.exp(e.y / this.R)) - Math.PI / 2) * t, e.x * t / this.R); }, bounds: (function() { var e = se * Math.PI; return new O([-e, -e], [e, e]); })() }; function le(e, t, n, r) { if (_(e)) { this._a = e[0], this._b = e[1], this._c = e[2], this._d = e[3]; return; } this._a = e, this._b = t, this._c = n, this._d = r; } le.prototype = { transform: function(e, t) { return this._transform(e.clone(), t); }, _transform: function(e, t) { return t ||= 1, e.x = t * (this._a * e.x + this._b), e.y = t * (this._c * e.y + this._d), e; }, untransform: function(e, t) { return t ||= 1, new E((e.x / t - this._b) / this._a, (e.y / t - this._d) / this._c); } }; function ue(e, t, n, r) { return new le(e, t, n, r); } var de = n({}, F, { code: "EPSG:3857", projection: ce, transformation: function() { var e = .5 / (Math.PI * ce.R); return ue(e, .5, -e, .5); }() }), fe = n({}, de, { code: "EPSG:900913" }); function pe(e) { return document.createElementNS("http://www.w3.org/2000/svg", e); } function me(e, t) { var n = "", r, i, a, o, s, c; for (r = 0, a = e.length; r < a; r++) { for (s = e[r], i = 0, o = s.length; i < o; i++) c = s[i], n += (i ? "L" : "M") + c.x + " " + c.y; n += t ? V.svg ? "z" : "x" : ""; } return n || "M0 0"; } var he = document.documentElement.style, ge = "ActiveXObject" in window, _e = ge && !document.addEventListener, ve = "msLaunchUri" in navigator && !("documentMode" in document), ye = Je("webkit"), be = Je("android"), xe = Je("android 2") || Je("android 3"), I = parseInt(/WebKit\/([0-9]+)|$/.exec(navigator.userAgent)[1], 10), Se = be && Je("Google") && I < 537 && !("AudioNode" in window), Ce = !!window.opera, R = !ve && Je("chrome"), we = Je("gecko") && !ye && !Ce && !ge, Te = !R && Je("safari"), Ee = Je("phantom"), De = "OTransition" in he, Oe = navigator.platform.indexOf("Win") === 0, ke = ge && "transition" in he, Ae = "WebKitCSSMatrix" in window && "m11" in new window.WebKitCSSMatrix() && !xe, je = "MozPerspective" in he, Me = !window.L_DISABLE_3D && (ke || Ae || je) && !De && !Ee, z = typeof orientation < "u" || Je("mobile"), B = z && ye, Ne = z && Ae, Pe = !window.PointerEvent && window.MSPointerEvent, Fe = !!(window.PointerEvent || Pe), Ie = "ontouchstart" in window || !!window.TouchEvent, Le = !window.L_NO_TOUCH && (Ie || Fe), Re = z && Ce, ze = z && we, Be = (window.devicePixelRatio || window.screen.deviceXDPI / window.screen.logicalXDPI) > 1, Ve = function() { var e = !1; try { var t = Object.defineProperty({}, "passive", { get: function() { e = !0; } }); window.addEventListener("testPassiveEventSupport", l, t), window.removeEventListener("testPassiveEventSupport", l, t); } catch {} return e; }(), He = function() { return !!document.createElement("canvas").getContext; }(), Ue = !!(document.createElementNS && pe("svg").createSVGRect), We = !!Ue && (function() { var e = document.createElement("div"); return e.innerHTML = "<svg/>", (e.firstChild && e.firstChild.namespaceURI) === "http://www.w3.org/2000/svg"; })(), Ge = !Ue && function() { try { var e = document.createElement("div"); e.innerHTML = "<v:shape adj=\"1\"/>"; var t = e.firstChild; return t.style.behavior = "url(#default#VML)", t && typeof t.adj == "object"; } catch { return !1; } }(), Ke = navigator.platform.indexOf("Mac") === 0, qe = navigator.platform.indexOf("Linux") === 0; function Je(e) { return navigator.userAgent.toLowerCase().indexOf(e) >= 0; } var V = { ie: ge, ielt9: _e, edge: ve, webkit: ye, android: be, android23: xe, androidStock: Se, opera: Ce, chrome: R, gecko: we, safari: Te, phantom: Ee, opera12: De, win: Oe, ie3d: ke, webkit3d: Ae, gecko3d: je, any3d: Me, mobile: z, mobileWebkit: B, mobileWebkit3d: Ne, msPointer: Pe, pointer: Fe, touch: Le, touchNative: Ie, mobileOpera: Re, mobileGecko: ze, retina: Be, passiveEvents: Ve, canvas: He, svg: Ue, vml: Ge, inlineSvg: We, mac: Ke, linux: qe }, Ye = V.msPointer ? "MSPointerDown" : "pointerdown", Xe = V.msPointer ? "MSPointerMove" : "pointermove", Ze = V.msPointer ? "MSPointerUp" : "pointerup", Qe = V.msPointer ? "MSPointerCancel" : "pointercancel", $e = { touchstart: Ye, touchmove: Xe, touchend: Ze, touchcancel: Qe }, et = { touchstart: ut, touchmove: lt, touchend: lt, touchcancel: lt }, tt = {}, nt = !1; function rt(e, t, n) { return t === "touchstart" && ct(), et[t] ? (n = et[t].bind(this, n), e.addEventListener($e[t], n, !1), n) : (console.warn("wrong event specified:", t), l); } function it(e, t, n) { if (!$e[t]) { console.warn("wrong event specified:", t); return; } e.removeEventListener($e[t], n, !1); } function at(e) { tt[e.pointerId] = e; } function ot(e) { tt[e.pointerId] && (tt[e.pointerId] = e); } function st(e) { delete tt[e.pointerId