@konnectio/core 4.7.8 → 4.7.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (96) hide show
  1. package/dist/{ActionField-D1UVyt3P.js → ActionField-BLUufdat.js} +6 -6
  2. package/dist/ActionField-BLUufdat.js.br +0 -0
  3. package/dist/ActionField-BLUufdat.js.gz +0 -0
  4. package/dist/{AvailabilitySkeleton-CkZ3yXGl.js → AvailabilitySkeleton-DlcBMiZx.js} +113 -113
  5. package/dist/AvailabilitySkeleton-DlcBMiZx.js.br +0 -0
  6. package/dist/AvailabilitySkeleton-DlcBMiZx.js.gz +0 -0
  7. package/dist/{CheckoutWindow-roDCaJfD.js → CheckoutWindow-BcRZIzMT.js} +7 -7
  8. package/dist/CheckoutWindow-BcRZIzMT.js.br +0 -0
  9. package/dist/CheckoutWindow-BcRZIzMT.js.gz +0 -0
  10. package/dist/{ErrorMessage-BjPE4vap.js → ErrorMessage-C8zkJCJE.js} +7 -7
  11. package/dist/ErrorMessage-C8zkJCJE.js.br +0 -0
  12. package/dist/ErrorMessage-C8zkJCJE.js.gz +0 -0
  13. package/dist/{EventAvailabilityForm-BuYaRNzQ.js → EventAvailabilityForm-B4sFsGhI.js} +16 -16
  14. package/dist/EventAvailabilityForm-B4sFsGhI.js.br +0 -0
  15. package/dist/EventAvailabilityForm-B4sFsGhI.js.gz +0 -0
  16. package/dist/{Field-B1vjvlxb.js → Field-De-fvk85.js} +1 -1
  17. package/dist/Field-De-fvk85.js.br +0 -0
  18. package/dist/Field-De-fvk85.js.gz +0 -0
  19. package/dist/{HotelAvailabilityForm-9fTMo0JS.js → HotelAvailabilityForm-C8uTiy9J.js} +6 -6
  20. package/dist/HotelAvailabilityForm-C8uTiy9J.js.br +0 -0
  21. package/dist/HotelAvailabilityForm-C8uTiy9J.js.gz +0 -0
  22. package/dist/{SelectField-BUMVCl9X.js → SelectField-CDAxug6h.js} +2 -2
  23. package/dist/SelectField-CDAxug6h.js.br +0 -0
  24. package/dist/{SelectField-BUMVCl9X.js.gz → SelectField-CDAxug6h.js.gz} +0 -0
  25. package/dist/{TermsOfService-B8UYMSX-.js → TermsOfService-Dt5Q1SCK.js} +6 -6
  26. package/dist/TermsOfService-Dt5Q1SCK.js.br +0 -0
  27. package/dist/TermsOfService-Dt5Q1SCK.js.gz +0 -0
  28. package/dist/{_-BmsIYzkS.js → _-Be3oAOAc.js} +1 -1
  29. package/dist/_-Be3oAOAc.js.br +0 -0
  30. package/dist/_-Be3oAOAc.js.gz +5 -0
  31. package/dist/availability.js +7 -7
  32. package/dist/availability.js.br +0 -0
  33. package/dist/availability.js.gz +0 -0
  34. package/dist/cancel-reservation.js +11 -11
  35. package/dist/cancel-reservation.js.br +0 -0
  36. package/dist/cancel-reservation.js.gz +0 -0
  37. package/dist/{dist-X-WT7tyd.js → dist-BPlclb9p.js} +2 -2
  38. package/dist/{dist-X-WT7tyd.js.br → dist-BPlclb9p.js.br} +0 -0
  39. package/dist/dist-BPlclb9p.js.gz +0 -0
  40. package/dist/{dist-DWRyg7R_.js → dist-C_IilFmu.js} +4 -4
  41. package/dist/dist-C_IilFmu.js.br +0 -0
  42. package/dist/dist-C_IilFmu.js.gz +0 -0
  43. package/dist/event.js +62 -62
  44. package/dist/event.js.br +0 -0
  45. package/dist/event.js.gz +0 -0
  46. package/dist/gift-card-validation.js +7 -7
  47. package/dist/gift-card-validation.js.br +0 -0
  48. package/dist/gift-card-validation.js.gz +0 -0
  49. package/dist/gift-card.js +9 -9
  50. package/dist/gift-card.js.br +0 -0
  51. package/dist/gift-card.js.gz +0 -0
  52. package/dist/giftCard-CxI94mQ4.js +104 -0
  53. package/dist/giftCard-CxI94mQ4.js.br +0 -0
  54. package/dist/giftCard-CxI94mQ4.js.gz +0 -0
  55. package/dist/hotel.js +104 -104
  56. package/dist/hotel.js.br +0 -0
  57. package/dist/hotel.js.gz +0 -0
  58. package/dist/polyfill.js +1 -1
  59. package/dist/polyfill.js.br +0 -0
  60. package/dist/polyfill.js.gz +0 -0
  61. package/dist/{style-DRDBWvVm.js → style-D9WMflRR.js} +1 -1
  62. package/dist/style-D9WMflRR.js.br +0 -0
  63. package/dist/style-D9WMflRR.js.gz +0 -0
  64. package/dist-wix/availability.js +2 -2
  65. package/dist-wix/event.js +2 -2
  66. package/dist-wix/gift-card-validation.js +1 -1
  67. package/dist-wix/gift-card.js +11 -11
  68. package/dist-wix/hotel.js +2 -2
  69. package/package.json +1 -1
  70. package/dist/ActionField-D1UVyt3P.js.br +0 -0
  71. package/dist/ActionField-D1UVyt3P.js.gz +0 -0
  72. package/dist/AvailabilitySkeleton-CkZ3yXGl.js.br +0 -0
  73. package/dist/AvailabilitySkeleton-CkZ3yXGl.js.gz +0 -0
  74. package/dist/CheckoutWindow-roDCaJfD.js.br +0 -0
  75. package/dist/CheckoutWindow-roDCaJfD.js.gz +0 -0
  76. package/dist/ErrorMessage-BjPE4vap.js.br +0 -0
  77. package/dist/ErrorMessage-BjPE4vap.js.gz +0 -0
  78. package/dist/EventAvailabilityForm-BuYaRNzQ.js.br +0 -0
  79. package/dist/EventAvailabilityForm-BuYaRNzQ.js.gz +0 -0
  80. package/dist/Field-B1vjvlxb.js.br +0 -0
  81. package/dist/Field-B1vjvlxb.js.gz +0 -0
  82. package/dist/HotelAvailabilityForm-9fTMo0JS.js.br +0 -0
  83. package/dist/HotelAvailabilityForm-9fTMo0JS.js.gz +0 -0
  84. package/dist/SelectField-BUMVCl9X.js.br +0 -0
  85. package/dist/TermsOfService-B8UYMSX-.js.br +0 -0
  86. package/dist/TermsOfService-B8UYMSX-.js.gz +0 -0
  87. package/dist/_-BmsIYzkS.js.br +0 -0
  88. package/dist/_-BmsIYzkS.js.gz +0 -0
  89. package/dist/dist-DWRyg7R_.js.br +0 -0
  90. package/dist/dist-DWRyg7R_.js.gz +0 -0
  91. package/dist/dist-X-WT7tyd.js.gz +0 -0
  92. package/dist/giftCard-C0ORtpZS.js +0 -101
  93. package/dist/giftCard-C0ORtpZS.js.br +0 -0
  94. package/dist/giftCard-C0ORtpZS.js.gz +0 -0
  95. package/dist/style-DRDBWvVm.js.br +0 -0
  96. package/dist/style-DRDBWvVm.js.gz +0 -0
package/dist/event.js CHANGED
@@ -1,12 +1,12 @@
1
1
  import { $ as e, A as t, D as n, E as r, Et as i, J as a, K as o, N as s, O as c, Q as l, T as u, Tt as d, a as f, b as p, ht as m, j as h, k as g, kt as _, l as v, n as y, o as b, ot as x, s as S, ut as C, v as w, w as T, x as E, yt as D } from "./i18n-DwFTw_rF.js";
2
- import { t as O } from "./dist-X-WT7tyd.js";
3
- import { $ as k, B as A, C as j, D as ee, E as M, I as N, K as P, N as F, R as I, S as L, U as te, V as R, W as ne, X as z, Y as B, Z as V, b as re, it as H, mt as ie, n as U, q as W, r as G, v as K, w as q, x as J } from "./SelectField-BUMVCl9X.js";
4
- import { t as ae } from "./_-BmsIYzkS.js";
5
- import { a as oe, c as se, d as ce, f as le, i as ue, l as de, n as fe, o as pe, r as me, s as he, u as Y } from "./AvailabilitySkeleton-CkZ3yXGl.js";
6
- import { t as ge } from "./EventAvailabilityForm-BuYaRNzQ.js";
7
- import { t as _e } from "./style-DRDBWvVm.js";
8
- import { a as ve, c as ye, i as be, l as xe, n as Se, o as Ce, s as we, t as X, u as Z } from "./dist-DWRyg7R_.js";
9
- import { i as Te, r as Ee, t as De } from "./CheckoutWindow-roDCaJfD.js";
2
+ import { t as O } from "./dist-BPlclb9p.js";
3
+ import { $ as k, B as A, C as j, D as ee, E as M, F as N, G as P, H as F, J as I, K as L, Q as R, R as te, S as z, U as ne, Y as B, Z as V, b as re, gt as H, n as U, ot as ie, r as W, tt as G, v as K, w as q, x as J } from "./SelectField-CDAxug6h.js";
4
+ import { t as ae } from "./_-Be3oAOAc.js";
5
+ import { a as oe, c as se, d as ce, f as le, i as ue, l as de, n as fe, o as pe, r as me, s as he, u as Y } from "./AvailabilitySkeleton-DlcBMiZx.js";
6
+ import { t as ge } from "./EventAvailabilityForm-B4sFsGhI.js";
7
+ import { t as _e } from "./style-D9WMflRR.js";
8
+ import { a as ve, c as ye, i as be, l as xe, n as Se, o as Ce, s as we, t as X, u as Z } from "./dist-C_IilFmu.js";
9
+ import { i as Te, r as Ee, t as De } from "./CheckoutWindow-BcRZIzMT.js";
10
10
  //#region node_modules/date-fns/formatDistanceStrict.js
11
11
  function Oe(e, t, n) {
12
12
  let r = se(), i = n?.locale ?? r.locale ?? me, a = oe(e, t);
@@ -37,7 +37,7 @@ function Oe(e, t, n) {
37
37
  }
38
38
  //#endregion
39
39
  //#region src/components/listings/event/_.vue?vue&type=script&setup=true&lang.ts
40
- var ke = { class: "konnectio-event-listing-action-button" }, Ae = /*#__PURE__*/ L(/* @__PURE__ */ s({
40
+ var ke = { class: "konnectio-event-listing-action-button" }, Ae = /*#__PURE__*/ z(/* @__PURE__ */ s({
41
41
  __name: "_",
42
42
  props: {
43
43
  name: {},
@@ -68,7 +68,7 @@ var ke = { class: "konnectio-event-listing-action-button" }, Ae = /*#__PURE__*/
68
68
  callback: {}
69
69
  },
70
70
  setup(t) {
71
- let { t: o } = f(), s = t, { display: c } = F(), { hideEventGuestAmount: l } = v(M()), { maxNumberOfPeople: p, numberOfPeople: m, eventId: g, currentEventDate: _, tableGroupId: y } = v(q()), { getTemplateAvailability: b, getEventAvailability: x, isEventListingLoading: S } = q(), { addToCart: w } = ee(), E = T(() => s.maxGuests || s.maxOnlineReservationLimit || p.value || Infinity), O = D(0), A = T(() => S(s.listingId)), j = () => {
71
+ let { t: o } = f(), s = t, { display: c } = N(), { hideEventGuestAmount: l } = v(M()), { maxNumberOfPeople: p, numberOfPeople: m, eventId: g, currentEventDate: _, tableGroupId: y } = v(q()), { getTemplateAvailability: b, getEventAvailability: x, isEventListingLoading: S } = q(), { addToCart: w } = ee(), E = T(() => s.maxGuests || s.maxOnlineReservationLimit || p.value || Infinity), O = D(0), k = T(() => S(s.listingId)), A = () => {
72
72
  if (!s.useNumberOfProductsForPersons && (O.value === 0 || isNaN(O.value))) {
73
73
  c({
74
74
  type: "error",
@@ -81,7 +81,7 @@ var ke = { class: "konnectio-event-listing-action-button" }, Ae = /*#__PURE__*/
81
81
  name: s.name,
82
82
  value: s.fromPrice || 0
83
83
  }), g.value = s.listingId, m.value = s.useNumberOfProductsForPersons ? NaN : O.value, b(s.callback);
84
- }, N = () => {
84
+ }, j = () => {
85
85
  if (!s.useNumberOfProductsForPersons && (O.value === 0 || isNaN(O.value))) {
86
86
  c({
87
87
  type: "error",
@@ -103,11 +103,11 @@ var ke = { class: "konnectio-event-listing-action-button" }, Ae = /*#__PURE__*/
103
103
  description: t.description,
104
104
  "prices-from": t.fromPrice,
105
105
  "to-date": t.toDate,
106
- layout: d(k).Event,
106
+ layout: d(G).Event,
107
107
  "disable-deep-link": t.disableDeepLink
108
108
  }, {
109
109
  description: C(() => [e(s.$slots, "description", { maxNumberOfPeople: d(p) }, void 0, !0)]),
110
- action: C(() => [e(s.$slots, "action", {}, () => [u("div", { class: i(["konnectio-event-listing-action", { "no-selectable-people": t.useNumberOfProductsForPersons }]) }, [t.useNumberOfProductsForPersons ? n("", !0) : (a(), r(G, {
110
+ action: C(() => [e(s.$slots, "action", {}, () => [u("div", { class: i(["konnectio-event-listing-action", { "no-selectable-people": t.useNumberOfProductsForPersons }]) }, [t.useNumberOfProductsForPersons ? n("", !0) : (a(), r(W, {
111
111
  key: 0,
112
112
  modelValue: O.value,
113
113
  "onUpdate:modelValue": c[0] ||= (e) => O.value = e,
@@ -115,7 +115,7 @@ var ke = { class: "konnectio-event-listing-action-button" }, Ae = /*#__PURE__*/
115
115
  icon: "users",
116
116
  "icon-type": "fas",
117
117
  "icon-placement": "label",
118
- description: E.value <= 20 && !d(l) ? `${d(o)("general.availableFor")}: 1 - ${E.value} ${d(ne)(d(o)("general.guests"))}` : void 0,
118
+ description: E.value <= 20 && !d(l) ? `${d(o)("general.availableFor")}: 1 - ${E.value} ${d(L)(d(o)("general.guests"))}` : void 0,
119
119
  "min-value": 0,
120
120
  "max-value": E.value
121
121
  }, null, 8, [
@@ -126,10 +126,10 @@ var ke = { class: "konnectio-event-listing-action-button" }, Ae = /*#__PURE__*/
126
126
  ])), u("div", ke, [h(K, {
127
127
  label: t.soldOut ? d(o)("event.soldOut") : d(o)("event.bookNowButton"),
128
128
  disabled: t.soldOut,
129
- "is-loading": A.value,
129
+ "is-loading": k.value,
130
130
  "full-width": "",
131
- "sub-label": d(P)(d(_)),
132
- onClickEvent: c[1] ||= (e) => t.type === "event" ? N() : j()
131
+ "sub-label": d(I)(d(_)),
132
+ onClickEvent: c[1] ||= (e) => t.type === "event" ? j() : A()
133
133
  }, null, 8, [
134
134
  "label",
135
135
  "disabled",
@@ -154,7 +154,7 @@ var ke = { class: "konnectio-event-listing-action-button" }, Ae = /*#__PURE__*/
154
154
  }, Ne = {
155
155
  key: 2,
156
156
  class: "konnectio-pill-button"
157
- }, Pe = { key: 0 }, Fe = { key: 1 }, Q = /*#__PURE__*/ L(/* @__PURE__ */ s({
157
+ }, Pe = { key: 0 }, Fe = { key: 1 }, Q = /*#__PURE__*/ z(/* @__PURE__ */ s({
158
158
  __name: "Event",
159
159
  props: {
160
160
  name: {},
@@ -209,7 +209,7 @@ var ke = { class: "konnectio-event-listing-action-button" }, Ae = /*#__PURE__*/
209
209
  t.timeFrom ? (a(), c("li", Ne, [u("div", null, [h(J, {
210
210
  icon: "calendar-clock",
211
211
  color: "header"
212
- }), u("span", null, _(d(o)("event.startAndEndTime")), 1)]), d(l) ? (a(), c("span", Fe, _(d(z)(t.timeFrom)), 1)) : (a(), c("span", Pe, _(d(V)(t.timeFrom, t.timeTo)), 1))])) : n("", !0)
212
+ }), u("span", null, _(d(o)("event.startAndEndTime")), 1)]), d(l) ? (a(), c("span", Fe, _(d(R)(t.timeFrom)), 1)) : (a(), c("span", Pe, _(d(k)(t.timeFrom, t.timeTo)), 1))])) : n("", !0)
213
213
  ])]),
214
214
  action: C(() => [e(i.$slots, "action", {}, void 0, !0)]),
215
215
  _: 3
@@ -231,7 +231,7 @@ var ke = { class: "konnectio-event-listing-action-button" }, Ae = /*#__PURE__*/
231
231
  }), [["__scopeId", "data-v-2ecac268"]]), Ie = {
232
232
  key: 0,
233
233
  class: "konnectio-event-grouped-listings-container"
234
- }, Le = { class: "konnectio-event-grouped-listings" }, Re = /*#__PURE__*/ L(/* @__PURE__ */ s({
234
+ }, Le = { class: "konnectio-event-grouped-listings" }, Re = /*#__PURE__*/ z(/* @__PURE__ */ s({
235
235
  __name: "Event",
236
236
  props: {
237
237
  name: {},
@@ -310,7 +310,7 @@ var ke = { class: "konnectio-event-listing-action-button" }, Ae = /*#__PURE__*/
310
310
  "callback"
311
311
  ])) : n("", !0);
312
312
  }
313
- }), [["__scopeId", "data-v-3584070d"]]), ze = { class: "konnectio-special-offer-availability" }, $ = { class: "konnectio-special-offer-availability-button" }, Be = { class: "konnectio-warning-notice" }, Ve = { key: 0 }, He = { key: 1 }, Ue = /*#__PURE__*/ L(/* @__PURE__ */ s({
313
+ }), [["__scopeId", "data-v-3584070d"]]), ze = { class: "konnectio-special-offer-availability" }, $ = { class: "konnectio-special-offer-availability-button" }, Be = { class: "konnectio-warning-notice" }, Ve = { key: 0 }, He = { key: 1 }, Ue = /*#__PURE__*/ z(/* @__PURE__ */ s({
314
314
  __name: "NextEvent",
315
315
  props: {
316
316
  name: {},
@@ -332,14 +332,14 @@ var ke = { class: "konnectio-event-listing-action-button" }, Ae = /*#__PURE__*/
332
332
  callback: { type: Function }
333
333
  },
334
334
  setup(e) {
335
- let { t: n } = f(), { updateEventDate: i } = j(), { display: s } = F(), l = D(), p = e;
335
+ let { t: n } = f(), { updateEventDate: i } = j(), { display: s } = N(), l = D(), p = e;
336
336
  function m() {
337
337
  l.value ? i(l.value) : s({
338
338
  message: n("alert.error.selectDate"),
339
339
  type: "error"
340
340
  });
341
341
  }
342
- let g = T(() => I(p.fromDate, p.toDate) <= 1), v = T(() => [
342
+ let g = T(() => A(p.fromDate, p.toDate) <= 1), v = T(() => [
343
343
  0,
344
344
  1,
345
345
  2,
@@ -347,7 +347,7 @@ var ke = { class: "konnectio-event-listing-action-button" }, Ae = /*#__PURE__*/
347
347
  4,
348
348
  5,
349
349
  6
350
- ].filter((e) => !A(p.days).includes(e)));
350
+ ].filter((e) => !F(p.days).includes(e)));
351
351
  return o(() => {
352
352
  g.value && (l.value = new Date(p.fromDate));
353
353
  }), (i, o) => (a(), r(Q, {
@@ -394,7 +394,7 @@ var ke = { class: "konnectio-event-listing-action-button" }, Ae = /*#__PURE__*/
394
394
  ]), u("div", $, [h(K, {
395
395
  label: d(n)("availability.buttonLabel"),
396
396
  onClick: w(m, ["prevent"])
397
- }, null, 8, ["label"])])]), u("div", Be, [g.value ? (a(), c("span", Ve, [t("*" + _(d(n)("event.canBeBooked")) + " ", 1), u("u", null, _(d(P)(e.fromDate)), 1)])) : (a(), c("span", He, [t("*" + _(d(n)("event.canBeBooked")) + " ", 1), u("u", null, _(d(W)(e.days)), 1)]))])])]),
397
+ }, null, 8, ["label"])])]), u("div", Be, [g.value ? (a(), c("span", Ve, [t("*" + _(d(n)("event.canBeBooked")) + " ", 1), u("u", null, _(d(I)(e.fromDate)), 1)])) : (a(), c("span", He, [t("*" + _(d(n)("event.canBeBooked")) + " ", 1), u("u", null, _(d(B)(e.days)), 1)]))])])]),
398
398
  _: 1
399
399
  }, 8, [
400
400
  "name",
@@ -419,7 +419,7 @@ var ke = { class: "konnectio-event-listing-action-button" }, Ae = /*#__PURE__*/
419
419
  }), [["__scopeId", "data-v-91ea584c"]]), We = {
420
420
  key: 0,
421
421
  class: "konnectio-event-grouped-listings-container"
422
- }, Ge = { class: "konnectio-event-grouped-listings" }, Ke = /*#__PURE__*/ L(/* @__PURE__ */ s({
422
+ }, Ge = { class: "konnectio-event-grouped-listings" }, Ke = /*#__PURE__*/ z(/* @__PURE__ */ s({
423
423
  __name: "NextEvent",
424
424
  props: {
425
425
  name: {},
@@ -502,7 +502,7 @@ var ke = { class: "konnectio-event-listing-action-button" }, Ae = /*#__PURE__*/
502
502
  "callback"
503
503
  ])) : n("", !0);
504
504
  }
505
- }), [["__scopeId", "data-v-138f6cac"]]), qe = ["innerHTML"], Je = /*#__PURE__*/ L(/* @__PURE__ */ s({
505
+ }), [["__scopeId", "data-v-138f6cac"]]), qe = ["innerHTML"], Je = /*#__PURE__*/ z(/* @__PURE__ */ s({
506
506
  __name: "FallbackEvent",
507
507
  props: {
508
508
  name: {},
@@ -587,7 +587,7 @@ var ke = { class: "konnectio-event-listing-action-button" }, Ae = /*#__PURE__*/
587
587
  }, Ze = ["innerHTML"], Qe = { key: 0 }, $e = { key: 1 }, et = { key: 2 }, tt = { key: 0 }, nt = { key: 4 }, rt = { key: 5 }, it = { key: 6 }, at = { key: 0 }, ot = { key: 0 }, st = { key: 1 }, ct = {
588
588
  key: 0,
589
589
  class: "konnectio-capitalize"
590
- }, lt = /*#__PURE__*/ L(/* @__PURE__ */ s({
590
+ }, lt = /*#__PURE__*/ z(/* @__PURE__ */ s({
591
591
  __name: "EventReservationForm",
592
592
  props: {
593
593
  showGiftCard: {
@@ -601,10 +601,10 @@ var ke = { class: "konnectio-event-listing-action-button" }, Ae = /*#__PURE__*/
601
601
  prevCallback: {}
602
602
  },
603
603
  setup(t) {
604
- let { t: i } = f(), o = x(), { areListingsAvailable: s, arrivalTime: h, numberOfPeople: y, numberOfRooms: b, numberOfTotalDays: S, isTemplateEvent: w, currentEventDate: T, length: E, fromDate: D, tableBasePrice: O, getTemplateData: k, basePrice: A, totalPrice: j, weekendFee: ee, roomUpgrade: N, discountCode: F, totalSelectedProducts: I, discountValue: L, appliedDiscountCode: te } = v(q()), { totalAddonPrice: R, validateDiscountCode: ne } = q(), { currency: V, hideEventLength: re } = v(M()), H = i("event.reservationNotice");
604
+ let { t: i } = f(), o = x(), { areListingsAvailable: s, arrivalTime: h, numberOfPeople: y, numberOfRooms: b, numberOfTotalDays: S, isTemplateEvent: w, currentEventDate: T, length: E, fromDate: D, tableBasePrice: O, getTemplateData: k, basePrice: A, totalPrice: j, weekendFee: ee, roomUpgrade: N, discountCode: P, totalSelectedProducts: F, discountValue: L, appliedDiscountCode: te } = v(q()), { totalAddonPrice: z, validateDiscountCode: ne } = q(), { currency: B, hideEventLength: re } = v(M()), H = i("event.reservationNotice");
605
605
  return (f, v) => (a(), r(ve, {
606
- "discount-code": d(F),
607
- "onUpdate:discountCode": v[0] ||= (e) => m(F) ? F.value = e : null,
606
+ "discount-code": d(P),
607
+ "onUpdate:discountCode": v[0] ||= (e) => m(P) ? P.value = e : null,
608
608
  "validate-discount-code": d(ne),
609
609
  "show-gift-card": t.showGiftCard,
610
610
  "show-terms-notice": t.showTermsNotice,
@@ -621,23 +621,23 @@ var ke = { class: "konnectio-event-listing-action-button" }, Ae = /*#__PURE__*/
621
621
  class: "konnectio-wysiwyg"
622
622
  }, null, 8, Ze)])) : n("", !0)]),
623
623
  "reservation-summary": C(() => [
624
- d(w) ? n("", !0) : (a(), c("li", Qe, [u("span", null, _(d(i)("general.date")), 1), u("b", null, _(d(P)(d(T))), 1)])),
624
+ d(w) ? n("", !0) : (a(), c("li", Qe, [u("span", null, _(d(i)("general.date")), 1), u("b", null, _(d(I)(d(T))), 1)])),
625
625
  d(y) > 0 ? (a(), c("li", $e, [u("span", null, _(d(i)("event.numberOfGuests")), 1), u("b", null, _(d(y)), 1)])) : n("", !0),
626
- !d(w) && d(I) > 0 ? (a(), c("li", et, [u("span", null, _(d(i)("event.numberOfProducts")), 1), u("b", null, _(d(I)), 1)])) : n("", !0),
626
+ !d(w) && d(F) > 0 ? (a(), c("li", et, [u("span", null, _(d(i)("event.numberOfProducts")), 1), u("b", null, _(d(F)), 1)])) : n("", !0),
627
627
  d(w) ? (a(), c(p, { key: 3 }, [
628
- u("li", null, [u("span", null, _(d(i)("booking.reservation.arrival")), 1), u("b", null, _(d(P)(d(D))), 1)]),
629
- u("li", null, [u("span", null, _(d(i)("booking.reservation.departure")), 1), u("b", null, _(d(P)(d(D), d(S))), 1)]),
628
+ u("li", null, [u("span", null, _(d(i)("booking.reservation.arrival")), 1), u("b", null, _(d(I)(d(D))), 1)]),
629
+ u("li", null, [u("span", null, _(d(i)("booking.reservation.departure")), 1), u("b", null, _(d(I)(d(D), d(S))), 1)]),
630
630
  u("li", null, [u("span", null, _(d(i)("event.numberOfRooms")), 1), u("b", null, _(d(b)), 1)]),
631
631
  d(S) > 0 ? (a(), c("li", tt, [u("span", null, _(d(i)("event.numberOfDays")), 1), u("b", null, _(d(S)), 1)])) : n("", !0)
632
632
  ], 64)) : n("", !0),
633
- !d(w) && d(h) ? (a(), c("li", nt, [u("span", null, _(d(i)("event.startOfEvent")), 1), u("b", null, _(d(z)(d(h))), 1)])) : n("", !0),
634
- !d(w) && d(E) && !d(re) ? (a(), c("li", rt, [u("span", null, _(d(i)("event.lengthOfEvent")), 1), u("b", null, _(d(z)(d(E))), 1)])) : n("", !0),
633
+ !d(w) && d(h) ? (a(), c("li", nt, [u("span", null, _(d(i)("event.startOfEvent")), 1), u("b", null, _(d(R)(d(h))), 1)])) : n("", !0),
634
+ !d(w) && d(E) && !d(re) ? (a(), c("li", rt, [u("span", null, _(d(i)("event.lengthOfEvent")), 1), u("b", null, _(d(R)(d(E))), 1)])) : n("", !0),
635
635
  d(L) ? (a(), c("li", it, [u("span", null, _(d(i)("general.discountCode")), 1), u("b", null, _(d(te)), 1)])) : n("", !0)
636
636
  ]),
637
- "price-summary": C(() => [!d(w) && d(O) > 0 ? (a(), c("li", at, [u("span", null, _(d(i)("booking.availability.basePrice")), 1), u("b", null, _(d(B)(d(O), d(V))), 1)])) : n("", !0), d(k) ? (a(!0), c(p, { key: 1 }, l(d(k), ({ roomGroupId: e }, t) => (a(), c(p, null, [d(R)(e, t) > 0 ? (a(), c("li", { key: e }, [u("span", null, _(d(i)("booking.reservation.addons")) + " - " + _(d(i)("booking.reservation.room")) + " #" + _(t + 1), 1), u("b", null, _(d(B)(d(R)(e, t), d(V))), 1)])) : n("", !0)], 64))), 256)) : n("", !0)]),
637
+ "price-summary": C(() => [!d(w) && d(O) > 0 ? (a(), c("li", at, [u("span", null, _(d(i)("booking.availability.basePrice")), 1), u("b", null, _(d(V)(d(O), d(B))), 1)])) : n("", !0), d(k) ? (a(!0), c(p, { key: 1 }, l(d(k), ({ roomGroupId: e }, t) => (a(), c(p, null, [d(z)(e, t) > 0 ? (a(), c("li", { key: e }, [u("span", null, _(d(i)("booking.reservation.addons")) + " - " + _(d(i)("booking.reservation.room")) + " #" + _(t + 1), 1), u("b", null, _(d(V)(d(z)(e, t), d(B))), 1)])) : n("", !0)], 64))), 256)) : n("", !0)]),
638
638
  navigation: C(() => [e(f.$slots, "navigation", {}, void 0, !0)]),
639
- "mobile-under-price": C(() => [d(w) && d(S) > 0 ? (a(), c("div", ot, [u("span", null, _(d(P)(d(D))) + " - " + _(d(P)(d(D), d(S))), 1)])) : (a(), c("div", st, [u("span", null, _(d(P)(d(T))), 1)]))]),
640
- "mobile-summary": C(() => [!d(w) && d(I) > 0 ? (a(), c("span", ct, _(d(i)("event.numberOfProducts")) + ": " + _(d(I)), 1)) : n("", !0)]),
639
+ "mobile-under-price": C(() => [d(w) && d(S) > 0 ? (a(), c("div", ot, [u("span", null, _(d(I)(d(D))) + " - " + _(d(I)(d(D), d(S))), 1)])) : (a(), c("div", st, [u("span", null, _(d(I)(d(T))), 1)]))]),
640
+ "mobile-summary": C(() => [!d(w) && d(F) > 0 ? (a(), c("span", ct, _(d(i)("event.numberOfProducts")) + ": " + _(d(F)), 1)) : n("", !0)]),
641
641
  _: 2
642
642
  }, [d(o).sidebar ? {
643
643
  name: "sidebar",
@@ -657,7 +657,7 @@ var ke = { class: "konnectio-event-listing-action-button" }, Ae = /*#__PURE__*/
657
657
  "prev-callback"
658
658
  ]));
659
659
  }
660
- }), [["__scopeId", "data-v-c1e1c642"]]), ut = { class: "event-skeleton" }, dt = { class: "event-skeleton-content" }, ft = { class: "event-skeleton-sidebar" }, pt = /*#__PURE__*/ L(/* @__PURE__ */ s({
660
+ }), [["__scopeId", "data-v-c1e1c642"]]), ut = { class: "event-skeleton" }, dt = { class: "event-skeleton-content" }, ft = { class: "event-skeleton-sidebar" }, pt = /*#__PURE__*/ z(/* @__PURE__ */ s({
661
661
  __name: "EventSkeleton",
662
662
  setup(e) {
663
663
  return (e, t) => (a(), c("div", ut, [u("div", dt, [h(Se)]), u("div", ft, [n("", !0), h(Ce)])]));
@@ -677,7 +677,7 @@ var ke = { class: "konnectio-event-listing-action-button" }, Ae = /*#__PURE__*/
677
677
  }, Ct = { class: "konnectio-table with-lines" }, wt = { class: "konnectio-event-addons-price" }, Tt = { class: "konnectio-event-addons-input" }, Et = { class: "konnectio-event-addons-price" }, Dt = { class: "konnectio-event-addons-price" }, Ot = {
678
678
  key: 1,
679
679
  class: "konnectio-table with-lines without-header"
680
- }, kt = { class: "konnectio-table-addons-information" }, At = { key: 0 }, jt = { class: "konnectio-table-addons-option" }, Mt = { class: "konnectio-panel" }, Nt = /*#__PURE__*/ L(/* @__PURE__ */ s({
680
+ }, kt = { class: "konnectio-table-addons-information" }, At = { key: 0 }, jt = { class: "konnectio-table-addons-option" }, Mt = { class: "konnectio-panel" }, Nt = /*#__PURE__*/ z(/* @__PURE__ */ s({
681
681
  name: "EventLayout",
682
682
  __name: "Event",
683
683
  props: {
@@ -695,7 +695,7 @@ var ke = { class: "konnectio-event-listing-action-button" }, Ae = /*#__PURE__*/
695
695
  styling: {}
696
696
  },
697
697
  setup(e) {
698
- let i = e, { t: o } = f(), s = q(), { addons: g, products: y, numberOfDays: b, flagOnTable: x, numberOfHighChairs: S, name: w, phone: D, email: O, remark: k, allergies: A, arrivalTime: P, hasEvents: I, hasTemplates: L, getTemplates: ne, getEventData: V, getTemplateData: W, getEventTableData: oe, hasProducts: se, eventRateType: ce, areListingsAvailable: le, isAvailabilityDataAvailable: ue, hasListingData: de, isPaymentLoading: fe, isReservationFormFilled: pe, requiresArrivalTime: me, hasSelectedRequiredProducts: he, getUnavailableEvents: Y, hasFallbackEvents: _e, getFallbackEvents: ve, excludeEventIds: xe } = v(s), Ce = T(() => s.getSortedEvents(i.sortOrder)), { currency: X, enableTracking: Z } = v(M()), { setActiveIdFilter: Oe } = M(), { eventDate: ke, eventLocation: Ae } = v(j()), { isValidRestaurantId: je } = j(), { initialize: Me, fetchListings: Ne, createBooking: Pe, localAddonPrice: Fe, totalAddonPrice: Q, reset: Ie, goBack: Le } = q(), { beginEventCheckout: ze } = ee(), { display: $ } = F(), Be = T(() => [
698
+ let i = e, { t: o } = f(), s = q(), { addons: g, products: y, numberOfDays: b, flagOnTable: x, numberOfHighChairs: S, name: w, phone: D, email: O, remark: k, allergies: A, arrivalTime: F, hasEvents: I, hasTemplates: L, getTemplates: z, getEventData: B, getTemplateData: G, getEventTableData: oe, hasProducts: se, eventRateType: ce, areListingsAvailable: le, isAvailabilityDataAvailable: ue, hasListingData: de, isPaymentLoading: fe, isReservationFormFilled: pe, requiresArrivalTime: me, hasSelectedRequiredProducts: he, getUnavailableEvents: Y, hasFallbackEvents: _e, getFallbackEvents: ve, excludeEventIds: xe } = v(s), Ce = T(() => s.getSortedEvents(i.sortOrder)), { currency: X, enableTracking: Z } = v(M()), { setActiveIdFilter: Oe } = M(), { eventDate: ke, eventLocation: Ae } = v(j()), { isValidRestaurantId: je } = j(), { initialize: Me, fetchListings: Ne, createBooking: Pe, localAddonPrice: Fe, totalAddonPrice: Q, reset: Ie, goBack: Le } = q(), { beginEventCheckout: ze } = ee(), { display: $ } = N(), Be = T(() => [
699
699
  {
700
700
  id: "availability",
701
701
  label: o("booking.availability.title"),
@@ -725,7 +725,7 @@ var ke = { class: "konnectio-event-listing-action-button" }, Ae = /*#__PURE__*/
725
725
  let e = [];
726
726
  return oe.value && oe.value.forEach((t) => {
727
727
  e.find((e) => e.value === t.time) || e.push({
728
- label: z(t.time),
728
+ label: R(t.time),
729
729
  value: t.time
730
730
  });
731
731
  }), e;
@@ -737,8 +737,8 @@ var ke = { class: "konnectio-event-listing-action-button" }, Ae = /*#__PURE__*/
737
737
  Z.value && ze(), Pe(e);
738
738
  }
739
739
  function We() {
740
- let e = ie("history", { removeNullishValues: !0 }), t = parseInt(e.rid), n = e.d, r = parseInt(e.eid);
741
- if (n) if (te(n)) {
740
+ let e = H("history", { removeNullishValues: !0 }), t = parseInt(e.rid), n = e.d, r = parseInt(e.eid);
741
+ if (n) if (P(n)) {
742
742
  let t = new Date(n);
743
743
  t.setHours(12, 0, 0, 0) >= (/* @__PURE__ */ new Date()).setHours(12, 0, 0, 0) ? ke.value = t : ($({
744
744
  message: o("alert.error.invalidDateRange"),
@@ -803,7 +803,7 @@ var ke = { class: "konnectio-event-listing-action-button" }, Ae = /*#__PURE__*/
803
803
  "events",
804
804
  "tracking-enabled",
805
805
  "callback"
806
- ]))), 256)) : n("", !0), d(L) && e.onlyShow !== "events" ? (a(!0), c(p, { key: 1 }, l(d(ne), ({ id: e, name: n, fromDate: i, toDate: o, minimumPersonCount: s, fromPrice: c, description: l, images: u }) => (a(), r(Ye, {
806
+ ]))), 256)) : n("", !0), d(L) && e.onlyShow !== "events" ? (a(!0), c(p, { key: 1 }, l(d(z), ({ id: e, name: n, fromDate: i, toDate: o, minimumPersonCount: s, fromPrice: c, description: l, images: u }) => (a(), r(Ye, {
807
807
  key: e,
808
808
  "listing-id": e,
809
809
  name: n,
@@ -856,7 +856,7 @@ var ke = { class: "konnectio-event-listing-action-button" }, Ae = /*#__PURE__*/
856
856
  }, {
857
857
  form: C(() => [u("form", xt, [
858
858
  u("h2", null, [u("span", null, _(d(o)("event.selectProducts")), 1)]),
859
- d(W) && d(W).length > 0 ? (a(), c("ul", St, [(a(!0), c(p, null, l(d(W), ({ roomGroupId: e, addons: n, adultPerRoom: i }, f) => (a(), c("li", { key: e }, [u("h5", null, [
859
+ d(G) && d(G).length > 0 ? (a(), c("ul", St, [(a(!0), c(p, null, l(d(G), ({ roomGroupId: e, addons: n, adultPerRoom: i }, f) => (a(), c("li", { key: e }, [u("h5", null, [
860
860
  u("span", null, _(d(o)("booking.reservation.room")) + " #" + _(f + 1), 1),
861
861
  s[9] ||= t(" (", -1),
862
862
  h(J, {
@@ -875,9 +875,9 @@ var ke = { class: "konnectio-event-listing-action-button" }, Ae = /*#__PURE__*/
875
875
  u("td", null, [
876
876
  u("b", null, _(i), 1),
877
877
  s[11] ||= u("br", null, null, -1),
878
- u("span", null, _(d(B)(o, d(X))) + " " + _(d(R)(l)), 1)
878
+ u("span", null, _(d(V)(o, d(X))) + " " + _(d(ne)(l)), 1)
879
879
  ]),
880
- u("td", Tt, [n === 3 ? (a(), r(G, {
880
+ u("td", Tt, [n === 3 ? (a(), r(W, {
881
881
  key: 0,
882
882
  modelValue: d(g)[`${e}.${t}.${f}`],
883
883
  "onUpdate:modelValue": (n) => d(g)[`${e}.${t}.${f}`] = n,
@@ -889,19 +889,19 @@ var ke = { class: "konnectio-event-listing-action-button" }, Ae = /*#__PURE__*/
889
889
  "onUpdate:modelValue": (n) => d(g)[`${e}.${t}.${f}`] = n,
890
890
  numeric: !0
891
891
  }, null, 8, ["modelValue", "onUpdate:modelValue"]))]),
892
- u("td", Et, [u("span", null, _(d(B)(d(Fe)(t, e, f), d(X))), 1)])
892
+ u("td", Et, [u("span", null, _(d(V)(d(Fe)(t, e, f), d(X))), 1)])
893
893
  ]))), 128))]),
894
894
  u("tfoot", null, [u("tr", null, [
895
895
  s[12] ||= u("td", null, null, -1),
896
896
  s[13] ||= u("td", null, null, -1),
897
- u("td", Dt, [u("u", null, [u("span", null, _(d(B)(d(Q)(e, f), d(X))), 1)])])
897
+ u("td", Dt, [u("u", null, [u("span", null, _(d(V)(d(Q)(e, f), d(X))), 1)])])
898
898
  ])])
899
899
  ])]))), 128))])) : n("", !0),
900
- d(se) ? (a(), c("table", Ot, [u("tbody", null, [(a(!0), c(p, null, l(d(V).products, ({ id: e, name: t, price: r, description: i }) => (a(), c("tr", { key: e }, [u("td", kt, [
901
- u("b", null, [u("span", null, _(d(N)(t)), 1)]),
902
- i && i !== t ? (a(), c("span", At, _(d(N)(i)), 1)) : n("", !0),
903
- u("u", null, _(d(B)(r, d(X))), 1)
904
- ]), u("td", jt, [h(G, {
900
+ d(se) ? (a(), c("table", Ot, [u("tbody", null, [(a(!0), c(p, null, l(d(B).products, ({ id: e, name: t, price: r, description: i }) => (a(), c("tr", { key: e }, [u("td", kt, [
901
+ u("b", null, [u("span", null, _(d(te)(t)), 1)]),
902
+ i && i !== t ? (a(), c("span", At, _(d(te)(i)), 1)) : n("", !0),
903
+ u("u", null, _(d(V)(r, d(X))), 1)
904
+ ]), u("td", jt, [h(W, {
905
905
  modelValue: d(y)[e],
906
906
  "onUpdate:modelValue": (t) => d(y)[e] = t,
907
907
  small: !0,
@@ -969,8 +969,8 @@ var ke = { class: "konnectio-event-listing-action-button" }, Ae = /*#__PURE__*/
969
969
  ]),
970
970
  d(me) ? (a(), r(ye, {
971
971
  key: 0,
972
- modelValue: d(P),
973
- "onUpdate:modelValue": s[3] ||= (e) => m(P) ? P.value = e : null,
972
+ modelValue: d(F),
973
+ "onUpdate:modelValue": s[3] ||= (e) => m(F) ? F.value = e : null,
974
974
  label: d(o)("event.selectArrivalTime"),
975
975
  name: "eventTimeTable",
976
976
  checkboxes: Ve.value,
@@ -980,7 +980,7 @@ var ke = { class: "konnectio-event-listing-action-button" }, Ae = /*#__PURE__*/
980
980
  "label",
981
981
  "checkboxes"
982
982
  ])) : n("", !0),
983
- d(ce) === d(H).FullDayEvent ? (a(), r(G, {
983
+ d(ce) === d(ie).FullDayEvent ? (a(), r(W, {
984
984
  key: 1,
985
985
  modelValue: d(b),
986
986
  "onUpdate:modelValue": s[4] ||= (e) => m(b) ? b.value = e : null,
@@ -988,7 +988,7 @@ var ke = { class: "konnectio-event-listing-action-button" }, Ae = /*#__PURE__*/
988
988
  "min-value": 1,
989
989
  required: ""
990
990
  }, null, 8, ["modelValue", "label"])) : n("", !0),
991
- e.showHighChairs === "yes" ? (a(), r(G, {
991
+ e.showHighChairs === "yes" ? (a(), r(W, {
992
992
  key: 2,
993
993
  modelValue: d(S),
994
994
  "onUpdate:modelValue": s[5] ||= (e) => m(S) ? S.value = e : null,
@@ -1015,7 +1015,7 @@ var ke = { class: "konnectio-event-listing-action-button" }, Ae = /*#__PURE__*/
1015
1015
  "label",
1016
1016
  "placeholder"
1017
1017
  ])),
1018
- e.hideAllergies !== "yes" && d(V)?.showAllergyFoodFieldOnline ? (a(), r(U, {
1018
+ e.hideAllergies !== "yes" && d(B)?.showAllergyFoodFieldOnline ? (a(), r(U, {
1019
1019
  key: 5,
1020
1020
  modelValue: d(A),
1021
1021
  "onUpdate:modelValue": s[8] ||= (e) => m(A) ? A.value = e : null,
package/dist/event.js.br CHANGED
Binary file
package/dist/event.js.gz CHANGED
Binary file
@@ -1,11 +1,11 @@
1
1
  import { D as e, E as t, J as n, N as r, O as i, T as a, Tt as o, a as s, ht as c, j as l, kt as u, l as d, n as f, o as p, s as m, ut as h, v as g, w as _, x as v } from "./i18n-DwFTw_rF.js";
2
- import { E as y, K as b, M as x, S, Y as C, b as w, x as T } from "./SelectField-BUMVCl9X.js";
3
- import { t as E } from "./_-BmsIYzkS.js";
4
- import { t as D } from "./ErrorMessage-BjPE4vap.js";
5
- import { n as O, t as k } from "./Field-B1vjvlxb.js";
6
- import { t as A } from "./style-DRDBWvVm.js";
7
- import { t as j } from "./ActionField-D1UVyt3P.js";
8
- import { t as M } from "./giftCard-C0ORtpZS.js";
2
+ import { E as y, J as b, P as x, S, Z as C, b as w, x as T } from "./SelectField-CDAxug6h.js";
3
+ import { t as E } from "./_-Be3oAOAc.js";
4
+ import { t as D } from "./ErrorMessage-C8zkJCJE.js";
5
+ import { n as O, t as k } from "./Field-De-fvk85.js";
6
+ import { t as A } from "./style-D9WMflRR.js";
7
+ import { t as j } from "./ActionField-BLUufdat.js";
8
+ import { t as M } from "./giftCard-CxI94mQ4.js";
9
9
  //#region src/components/skeletons/GiftCardValidationSkeleton.vue?vue&type=script&setup=true&lang.ts
10
10
  var N = { class: "gift-card-validation-skeleton" }, P = { class: "gift-card-validation-skeleton-form" }, F = { class: "gift-card-validation-skeleton-text" }, I = { class: "gift-card-validation-skeleton-input" }, L = /*#__PURE__*/ S(/* @__PURE__ */ r({
11
11
  __name: "GiftCardValidationSkeleton",
Binary file
Binary file
package/dist/gift-card.js CHANGED
@@ -1,13 +1,13 @@
1
1
  import { D as e, E as t, Et as n, J as r, K as i, N as a, O as o, Q as s, T as c, Tt as l, a as u, b as d, ct as f, dt as p, g as m, ht as h, i as g, j as _, kt as v, l as y, n as b, o as x, s as S, ut as C, v as w, w as T, x as ee, yt as E } from "./i18n-DwFTw_rF.js";
2
- import { t as D } from "./dist-X-WT7tyd.js";
3
- import { E as te, N as O, S as k, _ as ne, b as re, n as A, r as j, t as M, v as N, y as P } from "./SelectField-BUMVCl9X.js";
4
- import { t as F } from "./_-BmsIYzkS.js";
5
- import { t as I } from "./ErrorMessage-BjPE4vap.js";
6
- import { n as L, t as R } from "./Field-B1vjvlxb.js";
7
- import { t as z } from "./style-DRDBWvVm.js";
8
- import { i as ie, n as ae, r as oe, t as se } from "./CheckoutWindow-roDCaJfD.js";
9
- import { t as B } from "./giftCard-C0ORtpZS.js";
10
- import { t as V } from "./TermsOfService-B8UYMSX-.js";
2
+ import { t as D } from "./dist-BPlclb9p.js";
3
+ import { E as te, F as O, S as k, _ as ne, b as re, n as A, r as j, t as M, v as N, y as P } from "./SelectField-CDAxug6h.js";
4
+ import { t as F } from "./_-Be3oAOAc.js";
5
+ import { t as I } from "./ErrorMessage-C8zkJCJE.js";
6
+ import { n as L, t as R } from "./Field-De-fvk85.js";
7
+ import { t as z } from "./style-D9WMflRR.js";
8
+ import { i as ie, n as ae, r as oe, t as se } from "./CheckoutWindow-BcRZIzMT.js";
9
+ import { t as B } from "./giftCard-CxI94mQ4.js";
10
+ import { t as V } from "./TermsOfService-Dt5Q1SCK.js";
11
11
  //#region src/components/inputs/MediaSelector.vue?vue&type=script&setup=true&lang.ts
12
12
  var H = { class: "media-selector" }, U = ["accept"], W = { class: "media-selector-wrapper" }, G = { class: "media-selector-tools" }, K = { key: 0 }, q = { key: 1 }, J = { key: 2 }, Y = ["src"], X = /*@__PURE__*/ a({
13
13
  __name: "MediaSelector",
Binary file
Binary file
@@ -0,0 +1,104 @@
1
+ import { c as e, l as t, t as n, w as r, yt as i } from "./i18n-DwFTw_rF.js";
2
+ import { E as a, F as o, L as s, M as c, N as l, T as u, W as d, ct as f, j as p, pt as m, rt as h, st as g } from "./SelectField-CDAxug6h.js";
3
+ //#region src/store/giftCard.ts
4
+ var _ = e("giftCard", () => {
5
+ let { pay: e, restoreOffer: _, confirmPayment: v } = l(), { display: y } = o(), { metaData: b, currencyId: x, hasError: S, paymentGatewayId: C } = t(a()), w = a(), T = i(h.InitialState), E = p();
6
+ E && c("konnectio_return") === "reepay" && c("handle") !== null && (_(E.offer, E.confirmationId), v(), T.value = h.PaymentSuccess);
7
+ let D = m("konnectio_name", "", void 0, { serializer: f.string }), O = m("konnectio_email", "", void 0, { serializer: f.string }), k = m("konnectio_phone", "", void 0, { serializer: f.string }), A = i(""), j = i(1), M = i(!0), N = i(""), P = i({
8
+ base64: "",
9
+ type: "",
10
+ name: ""
11
+ }), F = i(void 0), I = i(0), L = i(!1), R = i(0), z = r(() => w.metaData.hotels[0]), B = r(() => z.value.termsOfService ? z.value.termsOfService : ""), V = r(() => T.value === h.InitialState || T.value === h.WaitingForResponse), H = r(() => T.value === h.ReadyToPay), U = r(() => T.value === h.PaymentSuccess), W = r(() => {
12
+ let e = {
13
+ 1: {
14
+ label: n.t("giftCard.hotelType"),
15
+ data: []
16
+ },
17
+ 2: {
18
+ label: n.t("giftCard.restaurantType"),
19
+ data: []
20
+ }
21
+ }, t = b.value.hotels[0].places;
22
+ return t && t.forEach((t) => {
23
+ e[t.placeType].data.push(t);
24
+ }), Object.fromEntries(Object.entries(e).filter(([, e]) => e.data.length > 0));
25
+ }), G = r(() => R.value !== 0), K = r(() => {
26
+ let e;
27
+ if (G.value) e = W.value[R.value].data[0];
28
+ else if (I.value !== 0) {
29
+ let t = F.value, n = W.value[I.value].data;
30
+ n.length === 1 ? e = n[0] : t !== void 0 && n.forEach((n) => {
31
+ String(n.id) === String(t) && (e = n);
32
+ });
33
+ }
34
+ return e;
35
+ }), q = r(() => !(!D.value || !O.value || !(k.value.length >= 5) || !A.value || K.value === void 0)), J = r(() => !(T.value === h.InitialState && L.value)), Y = r(() => !!(T.value === h.WaitingForResponse && L.value));
36
+ async function X() {
37
+ try {
38
+ let e = (await u().get("/gift-card/metadata", { params: { language: d() } })).data;
39
+ e.success === void 0 ? S.value = !1 : S.value = !e.success, b.value = e;
40
+ } catch {
41
+ y({
42
+ message: n.t("alert.error.couldntFetchMetadata"),
43
+ type: "warning"
44
+ });
45
+ }
46
+ }
47
+ async function Z() {
48
+ T.value = h.WaitingForResponse, L.value = !0, await u().post("/gift-card/create", {
49
+ termsOfserviceURL: window.location.origin,
50
+ checkoutUrl: C.value === g.ReePay ? `${window.location.href}${window.location.search ? "&" : "?"}konnectio_return=reepay` : window.location.origin,
51
+ currencyID: x.value,
52
+ language: d(),
53
+ amount: A.value,
54
+ quantity: j.value,
55
+ freeText: N.value,
56
+ showPrice: M.value,
57
+ contactName: D.value,
58
+ contactEmail: O.value,
59
+ contactPhone: k.value,
60
+ imageBase64: s(P.value.base64),
61
+ imageName: P.value.name,
62
+ imageFormat: P.value.type,
63
+ placeType: K.value ? K.value.placeType : void 0,
64
+ placeID: K.value ? K.value.id : void 0
65
+ }).then((t) => {
66
+ T.value = h.ReadyToPay, L.value = !1, e({
67
+ callback: () => console.log("Callback!"),
68
+ response: t.data,
69
+ enableHostedRedirect: !0
70
+ });
71
+ });
72
+ }
73
+ function Q(e) {
74
+ e && (R.value = e);
75
+ }
76
+ return {
77
+ selectedPlace: K,
78
+ moduleState: T,
79
+ name: D,
80
+ email: O,
81
+ phone: k,
82
+ value: A,
83
+ remark: N,
84
+ showValue: M,
85
+ quantity: j,
86
+ media: P,
87
+ placeId: F,
88
+ placeType: I,
89
+ showFormPage: V,
90
+ showPaymentPage: H,
91
+ showConfirmationPage: U,
92
+ places: W,
93
+ hasFilledForm: q,
94
+ hasForcedPlaceType: G,
95
+ isWaitingForResponse: Y,
96
+ isMetadataAvailable: J,
97
+ termsOfService: B,
98
+ fetchMetadata: X,
99
+ orderGiftCard: Z,
100
+ initialize: Q
101
+ };
102
+ });
103
+ //#endregion
104
+ export { _ as t };
Binary file
Binary file