@konnectio/core 4.0.3 → 4.0.5

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 (100) hide show
  1. package/dist/{ActionField-1b4171c7.mjs → ActionField-0c047379.mjs} +5 -5
  2. package/dist/ActionField-0c047379.mjs.br +0 -0
  3. package/dist/{ActionField-97c0c682.js → ActionField-3640689b.js} +2 -2
  4. package/dist/ActionField-3640689b.js.br +0 -0
  5. package/dist/Clickable-386eceb6.mjs +12390 -0
  6. package/dist/Clickable-386eceb6.mjs.br +0 -0
  7. package/dist/Clickable-77afc133.js +768 -0
  8. package/dist/Clickable-77afc133.js.br +0 -0
  9. package/dist/{HotelAvailabilityForm-bab6ef4d.mjs → HotelAvailabilityForm-29f12395.mjs} +5 -5
  10. package/dist/HotelAvailabilityForm-29f12395.mjs.br +0 -0
  11. package/dist/{HotelAvailabilityForm-5750665b.js → HotelAvailabilityForm-89ba629d.js} +2 -2
  12. package/dist/HotelAvailabilityForm-89ba629d.js.br +0 -0
  13. package/dist/NumberField.vue_vue_type_style_index_0_lang-99de44b7.mjs +4027 -0
  14. package/dist/NumberField.vue_vue_type_style_index_0_lang-99de44b7.mjs.br +0 -0
  15. package/dist/NumberField.vue_vue_type_style_index_0_lang-e8efabad.js +28 -0
  16. package/dist/NumberField.vue_vue_type_style_index_0_lang-e8efabad.js.br +0 -0
  17. package/dist/{ReCaptchaVuePlugin-36454b0f.js → ReCaptchaVuePlugin-0988d77f.js} +2 -2
  18. package/dist/ReCaptchaVuePlugin-0988d77f.js.br +0 -0
  19. package/dist/{ReCaptchaVuePlugin-e4f378b2.mjs → ReCaptchaVuePlugin-616ef9b9.mjs} +2 -2
  20. package/dist/ReCaptchaVuePlugin-616ef9b9.mjs.br +0 -0
  21. package/dist/{SelectField.vue_vue_type_style_index_0_lang-a3371159.js → SelectField.vue_vue_type_style_index_0_lang-18843626.js} +2 -2
  22. package/dist/SelectField.vue_vue_type_style_index_0_lang-18843626.js.br +0 -0
  23. package/dist/{SelectField.vue_vue_type_style_index_0_lang-d7f0bf68.mjs → SelectField.vue_vue_type_style_index_0_lang-a45312d1.mjs} +3 -3
  24. package/dist/SelectField.vue_vue_type_style_index_0_lang-a45312d1.mjs.br +0 -0
  25. package/dist/{ThankYou-23531d13.js → ThankYou-1096ca5a.js} +3 -3
  26. package/dist/ThankYou-1096ca5a.js.br +0 -0
  27. package/dist/{ThankYou-4299d606.mjs → ThankYou-f6205791.mjs} +11 -11
  28. package/dist/ThankYou-f6205791.mjs.br +0 -0
  29. package/dist/{applyGiftCard-eb7b85ee.mjs → applyGiftCard-02342491.mjs} +13 -13
  30. package/dist/applyGiftCard-02342491.mjs.br +0 -0
  31. package/dist/{applyGiftCard-9847fda1.js → applyGiftCard-e24bae0c.js} +2 -2
  32. package/dist/applyGiftCard-e24bae0c.js.br +0 -0
  33. package/dist/availability.cjs.js +1 -1
  34. package/dist/availability.cjs.js.br +0 -0
  35. package/dist/availability.es.js +46 -49
  36. package/dist/availability.es.js.br +0 -0
  37. package/dist/{event-1b888019.mjs → event-cc266121.mjs} +28 -28
  38. package/dist/event-cc266121.mjs.br +0 -0
  39. package/dist/{event-e8e0c6a2.js → event-d580e6e8.js} +2 -2
  40. package/dist/event-d580e6e8.js.br +0 -0
  41. package/dist/event.cjs.js +1 -1
  42. package/dist/event.cjs.js.br +0 -0
  43. package/dist/event.es.js +163 -166
  44. package/dist/event.es.js.br +0 -0
  45. package/dist/gift-card-validation.cjs.js +1 -1
  46. package/dist/gift-card-validation.cjs.js.br +0 -0
  47. package/dist/gift-card-validation.es.js +35 -38
  48. package/dist/gift-card-validation.es.js.br +0 -0
  49. package/dist/gift-card.cjs.js +1 -1
  50. package/dist/gift-card.cjs.js.br +0 -0
  51. package/dist/gift-card.es.js +87 -90
  52. package/dist/gift-card.es.js.br +0 -0
  53. package/dist/hotel.cjs.js +4 -4
  54. package/dist/hotel.cjs.js.br +0 -0
  55. package/dist/hotel.es.js +348 -350
  56. package/dist/hotel.es.js.br +0 -0
  57. package/dist/{index-937554a9.mjs → index-30f70976.mjs} +5 -5
  58. package/dist/index-30f70976.mjs.br +0 -0
  59. package/dist/index-4e9533a9.js +2 -0
  60. package/dist/index-4e9533a9.js.br +0 -0
  61. package/dist/navigation.cjs.js +1 -1
  62. package/dist/navigation.cjs.js.br +0 -0
  63. package/dist/navigation.es.js +1 -1
  64. package/dist/navigation.es.js.br +0 -0
  65. package/dist/{payment-b79997a8.mjs → payment-b3022c46.mjs} +3 -3
  66. package/dist/payment-b3022c46.mjs.br +0 -0
  67. package/dist/{payment-3140b25e.js → payment-bfd660a7.js} +2 -2
  68. package/dist/payment-bfd660a7.js.br +0 -0
  69. package/dist/polyfill.cjs.js +1 -1
  70. package/dist/polyfill.cjs.js.br +0 -0
  71. package/dist/polyfill.es.js +1 -1
  72. package/dist/polyfill.es.js.br +0 -0
  73. package/package.json +1 -4
  74. package/dist/ActionField-1b4171c7.mjs.br +0 -0
  75. package/dist/ActionField-97c0c682.js.br +0 -0
  76. package/dist/Clickable-eb931b15.mjs +0 -13899
  77. package/dist/Clickable-eb931b15.mjs.br +0 -0
  78. package/dist/Clickable-f57e16ad.js +0 -785
  79. package/dist/Clickable-f57e16ad.js.br +0 -0
  80. package/dist/HotelAvailabilityForm-5750665b.js.br +0 -0
  81. package/dist/HotelAvailabilityForm-bab6ef4d.mjs.br +0 -0
  82. package/dist/NumberField.vue_vue_type_style_index_0_lang-737bf674.mjs +0 -5917
  83. package/dist/NumberField.vue_vue_type_style_index_0_lang-737bf674.mjs.br +0 -0
  84. package/dist/NumberField.vue_vue_type_style_index_0_lang-e642c7f3.js +0 -56
  85. package/dist/NumberField.vue_vue_type_style_index_0_lang-e642c7f3.js.br +0 -0
  86. package/dist/ReCaptchaVuePlugin-36454b0f.js.br +0 -0
  87. package/dist/ReCaptchaVuePlugin-e4f378b2.mjs.br +0 -0
  88. package/dist/SelectField.vue_vue_type_style_index_0_lang-a3371159.js.br +0 -0
  89. package/dist/SelectField.vue_vue_type_style_index_0_lang-d7f0bf68.mjs.br +0 -0
  90. package/dist/ThankYou-23531d13.js.br +0 -0
  91. package/dist/ThankYou-4299d606.mjs.br +0 -0
  92. package/dist/applyGiftCard-9847fda1.js.br +0 -0
  93. package/dist/applyGiftCard-eb7b85ee.mjs.br +0 -0
  94. package/dist/event-1b888019.mjs.br +0 -0
  95. package/dist/event-e8e0c6a2.js.br +0 -0
  96. package/dist/index-937554a9.mjs.br +0 -0
  97. package/dist/index-aa255eba.js +0 -2
  98. package/dist/index-aa255eba.js.br +0 -0
  99. package/dist/payment-3140b25e.js.br +0 -0
  100. package/dist/payment-b79997a8.mjs.br +0 -0
@@ -1,54 +1,54 @@
1
- import { d as C, o as n, c as l, a as d, u as k, i as L, b as e, C as z, _ as y, e as E, r as T, f as u, g as $, h as m, w as p, n as B, j as g, k as F, T as A, S as x, p as R, l as V, m as W } from "./Clickable-eb931b15.mjs";
2
- import { s as I, u as P, _ as N, d as D, c as H, a as O, i as M } from "./NumberField.vue_vue_type_style_index_0_lang-737bf674.mjs";
3
- import { H as j } from "./HotelAvailabilityForm-bab6ef4d.mjs";
4
- import { _ as U } from "./payment-b79997a8.mjs";
5
- import { u as q } from "./event-1b888019.mjs";
6
- import "./applyGiftCard-eb7b85ee.mjs";
7
- const G = { id: "konnectio-event-search-form" }, J = { class: "konnectio-search-button" }, K = /* @__PURE__ */ C({
1
+ import { d as C, o as n, c as l, a as d, u as h, i as L, b as e, C as z, _ as m, e as T, r as A, f as u, g as $, h as k, w as p, n as B, j as g, k as F, T as R, S as W, p as x, l as E, m as I } from "./Clickable-386eceb6.mjs";
2
+ import { s as P, u as V, _ as H, c as N, i as D } from "./NumberField.vue_vue_type_style_index_0_lang-99de44b7.mjs";
3
+ import { H as M } from "./HotelAvailabilityForm-29f12395.mjs";
4
+ import { _ as O } from "./payment-b3022c46.mjs";
5
+ import { u as j } from "./event-cc266121.mjs";
6
+ import "./applyGiftCard-02342491.mjs";
7
+ const U = { id: "konnectio-event-search-form" }, q = { class: "konnectio-search-button" }, G = /* @__PURE__ */ C({
8
8
  __name: "EventAvailabilityForm",
9
9
  props: {
10
10
  link: {}
11
11
  },
12
12
  setup(o) {
13
- const t = o, { searchDate: a } = I(q()), { t: c } = P();
14
- function h() {
13
+ const t = o, { searchDate: a } = P(j()), { t: c } = V();
14
+ function f() {
15
15
  window.location.replace(t.link);
16
16
  }
17
- return (b, i) => (n(), l("div", G, [
18
- d(U, {
19
- modelValue: k(a),
17
+ return (b, i) => (n(), l("div", U, [
18
+ d(O, {
19
+ modelValue: h(a),
20
20
  "onUpdate:modelValue": i[0] || (i[0] = (r) => L(a) ? a.value = r : null),
21
- label: k(c)("event.selectDate"),
21
+ label: h(c)("event.selectDate"),
22
22
  "icon-placement": "label",
23
23
  "min-date": /* @__PURE__ */ new Date()
24
24
  }, null, 8, ["modelValue", "label", "min-date"]),
25
- e("div", J, [
25
+ e("div", q, [
26
26
  d(z, {
27
- label: k(c)("availability.buttonLabel"),
27
+ label: h(c)("availability.buttonLabel"),
28
28
  disabled: !1,
29
- onClickEvent: h
29
+ onClickEvent: f
30
30
  }, null, 8, ["label"])
31
31
  ])
32
32
  ]));
33
33
  }
34
34
  });
35
- const Q = /* @__PURE__ */ y(K, [["__scopeId", "data-v-15c74d0f"]]);
36
- const X = {}, Y = { class: "loading-container" }, Z = /* @__PURE__ */ E('<div class="loading" data-v-30283f5a><section id="test" data-v-30283f5a><section id="header" data-v-30283f5a><div data-v-30283f5a></div><div class="shape1 white" data-v-30283f5a></div><div data-v-30283f5a></div><div class="shape2 white" data-v-30283f5a></div><div class="shape2 white" data-v-30283f5a></div></section><section class="blank" data-v-30283f5a></section><section class="content" data-v-30283f5a><div class="label" data-v-30283f5a><div data-v-30283f5a></div><div class="white" data-v-30283f5a></div></div><div class="white" data-v-30283f5a></div><div class="label" data-v-30283f5a><div data-v-30283f5a></div><div class="white" data-v-30283f5a></div></div><div class="white" data-v-30283f5a></div><div class="white" data-v-30283f5a></div></section><section class="blank" data-v-30283f5a></section><section class="content" data-v-30283f5a><div data-v-30283f5a></div><div class="white" data-v-30283f5a></div><div data-v-30283f5a></div><div class="white" data-v-30283f5a></div><div data-v-30283f5a></div></section></section></div>', 1), tt = [
37
- Z
35
+ const J = /* @__PURE__ */ m(G, [["__scopeId", "data-v-15c74d0f"]]);
36
+ const K = {}, Q = { class: "loading-container" }, X = /* @__PURE__ */ T('<div class="loading" data-v-30283f5a><section id="test" data-v-30283f5a><section id="header" data-v-30283f5a><div data-v-30283f5a></div><div class="shape1 white" data-v-30283f5a></div><div data-v-30283f5a></div><div class="shape2 white" data-v-30283f5a></div><div class="shape2 white" data-v-30283f5a></div></section><section class="blank" data-v-30283f5a></section><section class="content" data-v-30283f5a><div class="label" data-v-30283f5a><div data-v-30283f5a></div><div class="white" data-v-30283f5a></div></div><div class="white" data-v-30283f5a></div><div class="label" data-v-30283f5a><div data-v-30283f5a></div><div class="white" data-v-30283f5a></div></div><div class="white" data-v-30283f5a></div><div class="white" data-v-30283f5a></div></section><section class="blank" data-v-30283f5a></section><section class="content" data-v-30283f5a><div data-v-30283f5a></div><div class="white" data-v-30283f5a></div><div data-v-30283f5a></div><div class="white" data-v-30283f5a></div><div data-v-30283f5a></div></section></section></div>', 1), Y = [
37
+ X
38
38
  ];
39
- function et(o, t) {
40
- return n(), l("div", Y, tt);
39
+ function Z(o, t) {
40
+ return n(), l("div", Q, Y);
41
41
  }
42
- const at = /* @__PURE__ */ y(X, [["render", et], ["__scopeId", "data-v-30283f5a"]]), _ = (o) => (R("data-v-55265546"), o = o(), V(), o), ot = { class: "konnectio-availability-module" }, nt = {
42
+ const tt = /* @__PURE__ */ m(K, [["render", Z], ["__scopeId", "data-v-30283f5a"]]), _ = (o) => (x("data-v-55265546"), o = o(), E(), o), et = { class: "konnectio-availability-module" }, at = {
43
43
  key: 0,
44
44
  class: "konnectio-availability-navigation"
45
- }, it = /* @__PURE__ */ _(() => /* @__PURE__ */ e("span", null, "Hotel", -1)), st = [
45
+ }, ot = /* @__PURE__ */ _(() => /* @__PURE__ */ e("span", null, "Hotel", -1)), nt = [
46
+ ot
47
+ ], it = /* @__PURE__ */ _(() => /* @__PURE__ */ e("span", null, "Events", -1)), st = [
46
48
  it
47
- ], lt = /* @__PURE__ */ _(() => /* @__PURE__ */ e("span", null, "Events", -1)), dt = [
48
- lt
49
- ], ct = /* @__PURE__ */ _(() => /* @__PURE__ */ e("div", { class: "konnectio-availability-divider" }, null, -1)), rt = { class: "konnectio-availability-search-form" }, vt = { key: 1 }, ut = /* @__PURE__ */ _(() => /* @__PURE__ */ e("span", null, "One of 'hotelLink' or 'eventLink' properties are missing. Please contact your administrator!", -1)), pt = [
50
- ut
51
- ], _t = /* @__PURE__ */ C({
49
+ ], lt = /* @__PURE__ */ _(() => /* @__PURE__ */ e("div", { class: "konnectio-availability-divider" }, null, -1)), dt = { class: "konnectio-availability-search-form" }, ct = { key: 1 }, rt = /* @__PURE__ */ _(() => /* @__PURE__ */ e("span", null, "One of 'hotelLink' or 'eventLink' properties are missing. Please contact your administrator!", -1)), vt = [
50
+ rt
51
+ ], ut = /* @__PURE__ */ C({
52
52
  __name: "Availability",
53
53
  props: {
54
54
  eventLink: {},
@@ -83,7 +83,7 @@ const at = /* @__PURE__ */ y(X, [["render", et], ["__scopeId", "data-v-30283f5a"
83
83
  panelOuterPadding: {}
84
84
  },
85
85
  setup(o) {
86
- const t = o, a = T(), c = u(() => t.hotelLink || t.eventLink), h = u(() => t.hotelLink && t.eventLink), b = u(() => a.value === "hotel"), i = u(() => a.value === "event"), r = (s) => a.value = s;
86
+ const t = o, a = A(), c = u(() => t.hotelLink || t.eventLink), f = u(() => t.hotelLink && t.eventLink), b = u(() => a.value === "hotel"), i = u(() => a.value === "event"), r = (s) => a.value = s;
87
87
  $(() => {
88
88
  !t.hotelLink && t.eventLink ? a.value = "event" : a.value = "hotel";
89
89
  });
@@ -116,43 +116,43 @@ const at = /* @__PURE__ */ y(X, [["render", et], ["__scopeId", "data-v-30283f5a"
116
116
  //'--panelOuterPadding': props.panelOuterPadding
117
117
  };
118
118
  return (s, v) => (n(), l("div", null, [
119
- c.value ? (n(), m(x, { key: 0 }, {
119
+ c.value ? (n(), k(W, { key: 0 }, {
120
120
  default: p(() => [
121
- d(N, {
121
+ d(H, {
122
122
  class: "fresh-booking-app",
123
123
  "access-token": s.accessToken,
124
124
  style: S
125
125
  }, {
126
126
  default: p(() => [
127
- e("div", ot, [
128
- h.value ? (n(), l("nav", nt, [
127
+ e("div", et, [
128
+ f.value ? (n(), l("nav", at, [
129
129
  e("ul", null, [
130
130
  e("li", null, [
131
131
  e("button", {
132
132
  class: B({ active: b.value }),
133
133
  onClick: v[0] || (v[0] = g((w) => r("hotel"), ["prevent"]))
134
- }, st, 2)
134
+ }, nt, 2)
135
135
  ]),
136
136
  e("li", null, [
137
137
  e("button", {
138
138
  class: B({ active: i.value }),
139
139
  onClick: v[1] || (v[1] = g((w) => r("event"), ["prevent"]))
140
- }, dt, 2)
140
+ }, st, 2)
141
141
  ])
142
142
  ])
143
143
  ])) : F("", !0),
144
- ct,
145
- e("div", rt, [
146
- d(A, {
144
+ lt,
145
+ e("div", dt, [
146
+ d(R, {
147
147
  name: "fade",
148
148
  mode: "out-in",
149
149
  appear: ""
150
150
  }, {
151
151
  default: p(() => [
152
- b.value ? (n(), m(j, {
152
+ b.value ? (n(), k(M, {
153
153
  key: 0,
154
154
  link: s.hotelLink
155
- }, null, 8, ["link"])) : i.value ? (n(), m(Q, {
155
+ }, null, 8, ["link"])) : i.value ? (n(), k(J, {
156
156
  key: 1,
157
157
  link: s.eventLink
158
158
  }, null, 8, ["link"])) : F("", !0)
@@ -167,19 +167,16 @@ const at = /* @__PURE__ */ y(X, [["render", et], ["__scopeId", "data-v-30283f5a"
167
167
  ]),
168
168
  fallback: p(() => [
169
169
  e("div", null, [
170
- d(at)
170
+ d(tt)
171
171
  ])
172
172
  ]),
173
173
  _: 1
174
- })) : (n(), l("div", vt, pt))
174
+ })) : (n(), l("div", ct, vt))
175
175
  ]));
176
176
  }
177
177
  });
178
- const ft = /* @__PURE__ */ y(_t, [["__scopeId", "data-v-55265546"]]);
179
- process.env.NODE_ENV === "production" && D.flare.light();
180
- const ht = H(), f = W({ components: { Availability: ft } });
181
- f.use(O.flareVue);
182
- f.use(ht);
183
- f.use(M);
184
- f.mount("#fresh-booking-availability-app");
178
+ const pt = /* @__PURE__ */ m(ut, [["__scopeId", "data-v-55265546"]]), _t = N(), y = I({ components: { Availability: pt } });
179
+ y.use(_t);
180
+ y.use(D);
181
+ y.mount("#fresh-booking-availability-app");
185
182
  //# sourceMappingURL=availability.es.js.map
Binary file
@@ -1,13 +1,13 @@
1
- import { o as Ge, s as oe, b as Ve, k as Le, E as v, p as q, O as le, S as U, q as qe, r as C, t as N, v as I } from "./NumberField.vue_vue_type_style_index_0_lang-737bf674.mjs";
2
- import { r as s, f as a } from "./Clickable-eb931b15.mjs";
3
- import { u as Ue } from "./payment-b79997a8.mjs";
4
- import { u as Ke } from "./applyGiftCard-eb7b85ee.mjs";
1
+ import { m as Ge, s as oe, a as Ve, h as Le, E as v, n as q, O as le, S as U, o as qe, p as C, q as N, r as I } from "./NumberField.vue_vue_type_style_index_0_lang-99de44b7.mjs";
2
+ import { r as s, f as a } from "./Clickable-386eceb6.mjs";
3
+ import { u as Ue } from "./payment-b3022c46.mjs";
4
+ import { u as Ke } from "./applyGiftCard-02342491.mjs";
5
5
  const He = Ge("event", () => {
6
- const se = Ue(), { voucher: re } = oe(Ke()), { display: h } = Ve(), { bearerToken: S } = oe(Le()), p = s({}), y = s({}), t = s(void 0), l = s(!0), u = s(v.InitialState), K = s(/* @__PURE__ */ new Date()), F = s(NaN), T = s(1), P = s(NaN), x = s(NaN), E = s(""), $ = q("freshBookingName", "", void 0, { serializer: U.string }), O = q("freshBookingPhone", "", void 0, { serializer: U.string }), R = q("freshBookingEmail", "", void 0, { serializer: U.string }), _ = s(""), k = s({}), m = s({}), B = s("");
6
+ const se = Ue(), { voucher: re } = oe(Ke()), { display: h } = Ve(), { bearerToken: S } = oe(Le()), p = s({}), y = s({}), t = s(void 0), l = s(!0), u = s(v.InitialState), K = s(/* @__PURE__ */ new Date()), F = s(NaN), T = s(1), P = s(NaN), x = s(NaN), E = s(""), $ = q("freshBookingName", "", void 0, { serializer: U.string }), O = q("freshBookingPhone", "", void 0, { serializer: U.string }), R = q("freshBookingEmail", "", void 0, { serializer: U.string }), _ = s(""), A = s({}), m = s({}), B = s("");
7
7
  function o(e) {
8
8
  return e.templateID !== void 0;
9
9
  }
10
- const ue = a(() => p.value.currency), ie = a(() => p.value.maxNumberPerBooking), ve = a(() => p.value.title), ce = a(() => p.value.subtitle), de = a(() => p.value.slideshow), A = a(() => K.value.toISOString()), pe = a(() => o(t.value)), z = a(() => o(t.value) ? t.value.numberOfDays : T.value), me = a(() => o(t.value) ? t.value.packageCount : 0), ge = a(() => o(t.value) ? t.value.fromDate : ""), b = a(() => y.value.events.find((e) => e.id === P.value)), fe = a(() => b.value ? b.value.length : void 0), j = a(() => o(t.value) ? t.value.templateID : 0), he = a(() => y.value.events), ye = a(() => y.value.templates), be = a(() => y.value.events.length > 0), De = a(() => y.value.templates.length > 0), Q = a(() => b.value && b.value.eventRateType ? b.value.eventRateType : le.None), M = a(() => {
10
+ const ue = a(() => p.value.currency), ie = a(() => p.value.maxNumberPerBooking), ve = a(() => p.value.title), ce = a(() => p.value.subtitle), de = a(() => p.value.slideshow), k = a(() => K.value.toISOString()), pe = a(() => o(t.value)), z = a(() => o(t.value) ? t.value.numberOfDays : T.value), me = a(() => o(t.value) ? t.value.packageCount : 0), ge = a(() => o(t.value) ? t.value.fromDate : ""), b = a(() => y.value.events.find((e) => e.id === P.value)), fe = a(() => b.value ? b.value.length : void 0), j = a(() => o(t.value) ? t.value.templateID : 0), he = a(() => y.value.events), ye = a(() => y.value.templates), be = a(() => y.value.events.length > 0), De = a(() => y.value.templates.length > 0), Q = a(() => b.value && b.value.eventRateType ? b.value.eventRateType : le.None), M = a(() => {
11
11
  if (!o(t.value))
12
12
  return t.value;
13
13
  }), H = a(() => {
@@ -26,7 +26,7 @@ const He = Ge("event", () => {
26
26
  function G(e, n, r) {
27
27
  let c = 0;
28
28
  if (o(t.value)) {
29
- const i = t.value.templateCounts[r], D = i.addons, g = k.value[`${n}.${e}.${r}`];
29
+ const i = t.value.templateCounts[r], D = i.addons, g = A.value[`${n}.${e}.${r}`];
30
30
  if (g > 0) {
31
31
  const f = D?.find((w) => w.addonID === e), d = typeof g == "boolean" ? 1 : g;
32
32
  c += qe(f?.price, f?.quantityStrategy, z.value, i.adultPerRoom) * d;
@@ -43,7 +43,7 @@ const He = Ge("event", () => {
43
43
  function V(e, n) {
44
44
  let r = 0;
45
45
  if (o(t.value))
46
- for (const c in k.value) {
46
+ for (const c in A.value) {
47
47
  const i = c.split(".");
48
48
  parseInt(i[0]) === e && parseInt(i[2]) === n && (r += G(parseInt(i[1]), e, n));
49
49
  }
@@ -62,13 +62,13 @@ const He = Ge("event", () => {
62
62
  let e = V();
63
63
  return e += H.value, e;
64
64
  }
65
- }), Pe = a(() => o(t.value) && t.value.templateCounts !== void 0 && t.value.templateCounts.flatMap((e) => e.weekendFee).reduce((e, n) => e + n, 0) || 0), ke = a(() => o(t.value) && t.value.templateCounts !== void 0 && t.value.templateCounts.flatMap((e) => e.roomUpgrade).reduce((e, n) => e + n, 0) || 0), Ae = a(() => {
65
+ }), Pe = a(() => o(t.value) && t.value.templateCounts !== void 0 && t.value.templateCounts.flatMap((e) => e.weekendFee).reduce((e, n) => e + n, 0) || 0), Ae = a(() => o(t.value) && t.value.templateCounts !== void 0 && t.value.templateCounts.flatMap((e) => e.roomUpgrade).reduce((e, n) => e + n, 0) || 0), ke = a(() => {
66
66
  const e = m.value;
67
67
  let n = 0;
68
68
  for (const r in e)
69
69
  n += Number.isNaN(e[r]) ? 0 : e[r];
70
70
  return n > 0;
71
- }), X = a(() => o(t.value) ? !1 : Object.keys(m.value).length > 0), we = a(() => !!($.value !== "" && R.value !== "" && O.value.length >= 5 && (!X.value || Ae.value) && (!(!o(t.value) && Q.value !== le.FullDayEvent) || E.value !== "")));
71
+ }), X = a(() => o(t.value) ? !1 : Object.keys(m.value).length > 0), we = a(() => !!($.value !== "" && R.value !== "" && O.value.length >= 5 && (!X.value || ke.value) && (!(!o(t.value) && Q.value !== le.FullDayEvent) || E.value !== "")));
72
72
  function Ce(e) {
73
73
  return u.value === v.ReservationState && P.value === e && l.value;
74
74
  }
@@ -81,7 +81,7 @@ const He = Ge("event", () => {
81
81
  },
82
82
  headers: {
83
83
  Authorization: S.value,
84
- "Fresh-Booking-Ver": "4.0.3"
84
+ "Fresh-Booking-Ver": "4.0.5"
85
85
  }
86
86
  })).data;
87
87
  p.value = e, Z();
@@ -98,11 +98,11 @@ const He = Ge("event", () => {
98
98
  const e = (await C.get("http://localhost:91/api/event/restaurant-events", {
99
99
  params: {
100
100
  language: N(),
101
- date: A.value
101
+ date: k.value
102
102
  },
103
103
  headers: {
104
104
  Authorization: S.value,
105
- "Fresh-Booking-Ver": "4.0.3"
105
+ "Fresh-Booking-Ver": "4.0.5"
106
106
  }
107
107
  })).data;
108
108
  y.value = e, l.value = !1;
@@ -119,13 +119,13 @@ const He = Ge("event", () => {
119
119
  const n = (await C.get("http://localhost:91/api/v3/event/get-availability", {
120
120
  params: {
121
121
  language: N(),
122
- date: A.value,
122
+ date: k.value,
123
123
  templateId: P.value,
124
124
  numberOfPeople: F.value
125
125
  },
126
126
  headers: {
127
127
  Authorization: S.value,
128
- "Fresh-Booking-Ver": "4.0.3"
128
+ "Fresh-Booking-Ver": "4.0.5"
129
129
  }
130
130
  })).data;
131
131
  n.templateCounts.length === 0 ? h({
@@ -145,14 +145,14 @@ const He = Ge("event", () => {
145
145
  const n = (await C.get("http://localhost:91/api/v3/event/get-table-availability", {
146
146
  params: {
147
147
  language: N(),
148
- date: A.value,
148
+ date: k.value,
149
149
  numberOfPeople: F.value,
150
150
  eventId: P.value,
151
151
  tableGroupId: x.value
152
152
  },
153
153
  headers: {
154
154
  Authorization: S.value,
155
- "Fresh-Booking-Ver": "4.0.3"
155
+ "Fresh-Booking-Ver": "4.0.5"
156
156
  }
157
157
  })).data;
158
158
  t.value = n, l.value = !1, e();
@@ -168,12 +168,12 @@ const He = Ge("event", () => {
168
168
  const e = (await C.get("http://localhost:91/api/v3/event/validate-discount-code", {
169
169
  params: {
170
170
  language: N(),
171
- date: A.value,
171
+ date: k.value,
172
172
  discountCode: B.value
173
173
  },
174
174
  headers: {
175
175
  Authorization: S.value,
176
- "Fresh-Booking-Ver": "4.0.3"
176
+ "Fresh-Booking-Ver": "4.0.5"
177
177
  }
178
178
  })).data;
179
179
  console.log(e);
@@ -198,8 +198,8 @@ const He = Ge("event", () => {
198
198
  J.value?.forEach((d, w) => {
199
199
  const ee = [];
200
200
  let te = 0;
201
- for (const ae in k.value) {
202
- const L = ae.split("."), ne = k.value[ae];
201
+ for (const ae in A.value) {
202
+ const L = ae.split("."), ne = A.value[ae];
203
203
  parseInt(L[0]) === d.roomGroupID && parseInt(L[2]) === w && ne > 0 && (ee.push({
204
204
  id: te,
205
205
  addonID: parseInt(L[1]),
@@ -229,7 +229,7 @@ const He = Ge("event", () => {
229
229
  }
230
230
  let g = "http://localhost:91/api/v3/event/template-book";
231
231
  const f = {
232
- date: A.value,
232
+ date: k.value,
233
233
  name: $.value,
234
234
  email: R.value,
235
235
  phone: O.value,
@@ -244,7 +244,7 @@ const He = Ge("event", () => {
244
244
  o(t.value) ? f.templateGroup = r : (f.time = i, f.eventId = P.value, f.products = c, g = "http://localhost:91/api/v3/event/event-book"), await C.post(g, f, {
245
245
  headers: {
246
246
  Authorization: S.value,
247
- "Fresh-Booking-Ver": "4.0.3"
247
+ "Fresh-Booking-Ver": "4.0.5"
248
248
  }
249
249
  }).then((d) => {
250
250
  l.value = !1, se.pay({
@@ -254,7 +254,7 @@ const He = Ge("event", () => {
254
254
  }).catch(() => n());
255
255
  }
256
256
  function ze(e) {
257
- k.value = {}, m.value = {}, E.value = "", e();
257
+ A.value = {}, m.value = {}, E.value = "", e();
258
258
  }
259
259
  function Me() {
260
260
  Y();
@@ -272,7 +272,7 @@ const He = Ge("event", () => {
272
272
  eventId: P,
273
273
  tableGroupId: x,
274
274
  arrivalTime: E,
275
- addons: k,
275
+ addons: A,
276
276
  products: m,
277
277
  discountCode: B,
278
278
  name: $,
@@ -285,7 +285,7 @@ const He = Ge("event", () => {
285
285
  title: ve,
286
286
  subtitle: ce,
287
287
  slideshow: de,
288
- date: A,
288
+ date: k,
289
289
  numberOfTotalDays: z,
290
290
  numberOfRooms: me,
291
291
  fromDate: ge,
@@ -300,7 +300,7 @@ const He = Ge("event", () => {
300
300
  totalPrice: Se,
301
301
  getTemplateData: J,
302
302
  getEventTableData: M,
303
- roomUpgrade: ke,
303
+ roomUpgrade: Ae,
304
304
  weekendFee: Pe,
305
305
  hasProducts: X,
306
306
  eventRateType: Q,
@@ -326,4 +326,4 @@ const He = Ge("event", () => {
326
326
  export {
327
327
  He as u
328
328
  };
329
- //# sourceMappingURL=event-1b888019.mjs.map
329
+ //# sourceMappingURL=event-cc266121.mjs.map
Binary file
@@ -1,2 +1,2 @@
1
- "use strict";const a=require("./NumberField.vue_vue_type_style_index_0_lang-e642c7f3.js"),t=require("./Clickable-f57e16ad.js"),Ne=require("./payment-3140b25e.js"),Te=require("./applyGiftCard-9847fda1.js"),Fe=a.defineStore("event",()=>{const Y=Ne.usePaymentStore(),{voucher:Z}=a.storeToRefs(Te.useApplyGiftCardStore()),{display:f}=a.useAlertStore(),{bearerToken:b}=a.storeToRefs(a.useUtilityStore()),d=t.ref({}),h=t.ref({}),o=t.ref(void 0),u=t.ref(!0),s=t.ref(a.EventModuleState.InitialState),B=t.ref(new Date),A=t.ref(NaN),w=t.ref(1),D=t.ref(NaN),L=t.ref(NaN),k=t.ref(""),C=a.useStorage("freshBookingName","",void 0,{serializer:a.StorageSerializers.string}),M=a.useStorage("freshBookingPhone","",void 0,{serializer:a.StorageSerializers.string}),N=a.useStorage("freshBookingEmail","",void 0,{serializer:a.StorageSerializers.string}),G=t.ref(""),I=t.ref({}),p=t.ref({}),T=t.ref("");function l(e){return e.templateID!==void 0}const ee=t.computed(()=>d.value.currency),te=t.computed(()=>d.value.maxNumberPerBooking),ae=t.computed(()=>d.value.title),oe=t.computed(()=>d.value.subtitle),ne=t.computed(()=>d.value.slideshow),E=t.computed(()=>B.value.toISOString()),le=t.computed(()=>l(o.value)),F=t.computed(()=>l(o.value)?o.value.numberOfDays:w.value),ue=t.computed(()=>l(o.value)?o.value.packageCount:0),re=t.computed(()=>l(o.value)?o.value.fromDate:""),y=t.computed(()=>h.value.events.find(e=>e.id===D.value)),se=t.computed(()=>y.value?y.value.length:void 0),U=t.computed(()=>l(o.value)?o.value.templateID:0),ie=t.computed(()=>h.value.events),ve=t.computed(()=>h.value.templates),ce=t.computed(()=>h.value.events.length>0),de=t.computed(()=>h.value.templates.length>0),_=t.computed(()=>y.value&&y.value.eventRateType?y.value.eventRateType:a.OctopusEventRateType.None),R=t.computed(()=>{if(!l(o.value))return o.value}),q=t.computed(()=>{if(R.value!==void 0){const e=R.value.find(n=>n.time===k.value);if(e&&e.price)return e.price}return 0}),V=t.computed(()=>{if(l(o.value))return o.value.templateCounts}),pe=t.computed(()=>e=>d.value.eventImages.filter(n=>n.eventID===e));function $(e,n,r){let v=0;if(l(o.value)){const i=o.value.templateCounts[r],S=i.addons,m=I.value[`${n}.${e}.${r}`];if(m>0){const g=S?.find(P=>P.addonID===e),c=typeof m=="boolean"?1:m;v+=a.getQuantityStrategyPrice(g?.price,g?.quantityStrategy,F.value,i.adultPerRoom)*c}}else{const i=p.value[e];if(i>0){const S=y.value?.products?.find(m=>m.productID===e);S&&(v+=S.price*i)}}return v}function O(e,n){let r=0;if(l(o.value))for(const v in I.value){const i=v.split(".");parseInt(i[0])===e&&parseInt(i[2])===n&&(r+=$(parseInt(i[1]),e,n))}else for(const v in p.value)r+=$(parseInt(v))*w.value;return r}const x=t.computed(()=>l(o.value)&&o.value.totalPrice||0),me=t.computed(()=>{if(l(o.value))return o.value.templateCounts===void 0?NaN:o.value.templateCounts.flatMap(e=>e.roomGroupID).reduce((e,n,r)=>e+O(n,r),x.value)||0;{let e=O();return e+=q.value,e}}),ge=t.computed(()=>l(o.value)&&o.value.templateCounts!==void 0&&o.value.templateCounts.flatMap(e=>e.weekendFee).reduce((e,n)=>e+n,0)||0),fe=t.computed(()=>l(o.value)&&o.value.templateCounts!==void 0&&o.value.templateCounts.flatMap(e=>e.roomUpgrade).reduce((e,n)=>e+n,0)||0),he=t.computed(()=>{const e=p.value;let n=0;for(const r in e)n+=Number.isNaN(e[r])?0:e[r];return n>0}),K=t.computed(()=>l(o.value)?!1:Object.keys(p.value).length>0),ye=t.computed(()=>!!(C.value!==""&&N.value!==""&&M.value.length>=5&&(!K.value||he.value)&&(!(!l(o.value)&&_.value!==a.OctopusEventRateType.FullDayEvent)||k.value!=="")));function Se(e){return s.value===a.EventModuleState.ReservationState&&D.value===e&&u.value}const be=t.computed(()=>!(s.value===a.EventModuleState.InitialState&&u.value)),De=t.computed(()=>!(s.value===a.EventModuleState.AvailabilityState&&u.value)),Ie=t.computed(()=>o.value!==void 0),Ee=t.computed(()=>s.value===a.EventModuleState.PaymentState&&u.value);async function j(){try{const e=(await a.axios.get("http://localhost:91/api/event/metadata",{params:{language:a.getUserLanguage()},headers:{Authorization:b.value,"Fresh-Booking-Ver":"4.0.3"}})).data;d.value=e,Q()}catch{f({message:a.i18n.t("alert.error.couldntFetchMetadata"),type:"warning"})}}async function Q(){s.value=a.EventModuleState.AvailabilityState,u.value=!0;try{const e=(await a.axios.get("http://localhost:91/api/event/restaurant-events",{params:{language:a.getUserLanguage(),date:E.value},headers:{Authorization:b.value,"Fresh-Booking-Ver":"4.0.3"}})).data;h.value=e,u.value=!1}catch{f({message:a.i18n.t("alert.error.couldntFetchListings"),type:"warning"})}}async function Pe(e){s.value=a.EventModuleState.ReservationState,u.value=!0;try{const n=(await a.axios.get("http://localhost:91/api/v3/event/get-availability",{params:{language:a.getUserLanguage(),date:E.value,templateId:D.value,numberOfPeople:A.value},headers:{Authorization:b.value,"Fresh-Booking-Ver":"4.0.3"}})).data;n.templateCounts.length===0?f({message:a.i18n.t("alert.error.eventNotAvailable"),type:"warning"}):(o.value=n,e()),u.value=!1}catch{u.value=!1,s.value=a.EventModuleState.AvailabilityState,f({message:a.i18n.t("alert.error.couldntFetchEvent"),type:"warning"})}}async function ke(e){s.value=a.EventModuleState.ReservationState,u.value=!0;try{const n=(await a.axios.get("http://localhost:91/api/v3/event/get-table-availability",{params:{language:a.getUserLanguage(),date:E.value,numberOfPeople:A.value,eventId:D.value,tableGroupId:L.value},headers:{Authorization:b.value,"Fresh-Booking-Ver":"4.0.3"}})).data;o.value=n,u.value=!1,e()}catch{u.value=!1,s.value=a.EventModuleState.AvailabilityState,f({message:a.i18n.t("alert.error.couldntFetchEvent"),type:"warning"})}}async function Ae(){try{const e=(await a.axios.get("http://localhost:91/api/v3/event/validate-discount-code",{params:{language:a.getUserLanguage(),date:E.value,discountCode:T.value},headers:{Authorization:b.value,"Fresh-Booking-Ver":"4.0.3"}})).data;console.log(e)}catch(e){console.log(e),f({message:a.i18n.t("alert.error.discountCodeValidation"),type:"warning"})}}async function we(e){s.value=a.EventModuleState.PaymentState,u.value=!0;const n=()=>{u.value=!1,s.value=a.EventModuleState.ReservationState,f({message:a.i18n.t("booking.other.errorMessage"),type:"warning"})};let r,v,i;const S=[];if(l(o.value))V.value?.forEach((c,P)=>{const H=[];let J=0;for(const W in I.value){const z=W.split("."),X=I.value[W];parseInt(z[0])===c.roomGroupID&&parseInt(z[2])===P&&X>0&&(H.push({id:J,addonID:parseInt(z[1]),quantity:X}),J++)}S.push({adultPerRoom:c.adultPerRoom,count:c.count,roomGroupID:c.roomGroupID,addons:H})}),r={templateID:U.value,numberOfDays:w.value,templateCounts:S};else{v=[],i=k.value;for(const c in p.value){const P=p.value[parseInt(c)];P>0&&v.push({id:parseInt(c),quantity:P})}}let m="http://localhost:91/api/v3/event/template-book";const g={date:E.value,name:C.value,email:N.value,phone:M.value,remark:G.value,numberOfPeople:A.value,days:F.value,discountCode:T.value,giftCardCode:Z.value,checkoutUrl:window.location.origin,privacyUrl:window.location.origin};l(o.value)?g.templateGroup=r:(g.time=i,g.eventId=D.value,g.products=v,m="http://localhost:91/api/v3/event/event-book"),await a.axios.post(m,g,{headers:{Authorization:b.value,"Fresh-Booking-Ver":"4.0.3"}}).then(c=>{u.value=!1,Y.pay({callback:e,response:c.data})}).catch(()=>n())}function Ce(e){I.value={},p.value={},k.value="",e()}function Me(){j()}return{metaData:d,listingData:h,tableBasePrice:q,availabilityData:o,isLoading:u,moduleState:s,searchDate:B,numberOfPeople:A,numberOfDays:w,eventId:D,tableGroupId:L,arrivalTime:k,addons:I,products:p,discountCode:T,name:C,phone:M,email:N,remark:G,isTemplateEvent:le,currency:ee,maxNumberOfPeople:te,title:ae,subtitle:oe,slideshow:ne,date:E,numberOfTotalDays:F,numberOfRooms:ue,fromDate:re,getEventData:y,length:se,templateId:U,getEvents:ie,getTemplates:ve,hasEvents:ce,hasTemplates:de,basePrice:x,totalPrice:me,getTemplateData:V,getEventTableData:R,roomUpgrade:fe,weekendFee:ge,hasProducts:K,eventRateType:_,isReservationFormFilled:ye,isMetaDataAvailable:be,areListingsAvailable:De,isAvailabilityDataAvailable:Ie,isPaymentLoading:Ee,getEventImages:pe,isEventListingLoading:Se,fetchMetaData:j,fetchListings:Q,getTemplateAvailability:Pe,getEventAvailability:ke,validateDiscountCode:Ae,localAddonPrice:$,totalAddonPrice:O,createBooking:we,reset:Ce,initialize:Me}});exports.useEventStore=Fe;
2
- //# sourceMappingURL=event-e8e0c6a2.js.map
1
+ "use strict";const a=require("./NumberField.vue_vue_type_style_index_0_lang-e8efabad.js"),t=require("./Clickable-77afc133.js"),Ne=require("./payment-bfd660a7.js"),Te=require("./applyGiftCard-e24bae0c.js"),Fe=a.defineStore("event",()=>{const Y=Ne.usePaymentStore(),{voucher:Z}=a.storeToRefs(Te.useApplyGiftCardStore()),{display:f}=a.useAlertStore(),{bearerToken:b}=a.storeToRefs(a.useUtilityStore()),d=t.ref({}),h=t.ref({}),o=t.ref(void 0),u=t.ref(!0),s=t.ref(a.EventModuleState.InitialState),B=t.ref(new Date),A=t.ref(NaN),w=t.ref(1),D=t.ref(NaN),L=t.ref(NaN),k=t.ref(""),C=a.useStorage("freshBookingName","",void 0,{serializer:a.StorageSerializers.string}),M=a.useStorage("freshBookingPhone","",void 0,{serializer:a.StorageSerializers.string}),N=a.useStorage("freshBookingEmail","",void 0,{serializer:a.StorageSerializers.string}),G=t.ref(""),I=t.ref({}),p=t.ref({}),T=t.ref("");function l(e){return e.templateID!==void 0}const ee=t.computed(()=>d.value.currency),te=t.computed(()=>d.value.maxNumberPerBooking),ae=t.computed(()=>d.value.title),oe=t.computed(()=>d.value.subtitle),ne=t.computed(()=>d.value.slideshow),E=t.computed(()=>B.value.toISOString()),le=t.computed(()=>l(o.value)),F=t.computed(()=>l(o.value)?o.value.numberOfDays:w.value),ue=t.computed(()=>l(o.value)?o.value.packageCount:0),re=t.computed(()=>l(o.value)?o.value.fromDate:""),y=t.computed(()=>h.value.events.find(e=>e.id===D.value)),se=t.computed(()=>y.value?y.value.length:void 0),U=t.computed(()=>l(o.value)?o.value.templateID:0),ie=t.computed(()=>h.value.events),ve=t.computed(()=>h.value.templates),ce=t.computed(()=>h.value.events.length>0),de=t.computed(()=>h.value.templates.length>0),_=t.computed(()=>y.value&&y.value.eventRateType?y.value.eventRateType:a.OctopusEventRateType.None),R=t.computed(()=>{if(!l(o.value))return o.value}),q=t.computed(()=>{if(R.value!==void 0){const e=R.value.find(n=>n.time===k.value);if(e&&e.price)return e.price}return 0}),V=t.computed(()=>{if(l(o.value))return o.value.templateCounts}),pe=t.computed(()=>e=>d.value.eventImages.filter(n=>n.eventID===e));function $(e,n,r){let v=0;if(l(o.value)){const i=o.value.templateCounts[r],S=i.addons,m=I.value[`${n}.${e}.${r}`];if(m>0){const g=S?.find(P=>P.addonID===e),c=typeof m=="boolean"?1:m;v+=a.getQuantityStrategyPrice(g?.price,g?.quantityStrategy,F.value,i.adultPerRoom)*c}}else{const i=p.value[e];if(i>0){const S=y.value?.products?.find(m=>m.productID===e);S&&(v+=S.price*i)}}return v}function O(e,n){let r=0;if(l(o.value))for(const v in I.value){const i=v.split(".");parseInt(i[0])===e&&parseInt(i[2])===n&&(r+=$(parseInt(i[1]),e,n))}else for(const v in p.value)r+=$(parseInt(v))*w.value;return r}const x=t.computed(()=>l(o.value)&&o.value.totalPrice||0),me=t.computed(()=>{if(l(o.value))return o.value.templateCounts===void 0?NaN:o.value.templateCounts.flatMap(e=>e.roomGroupID).reduce((e,n,r)=>e+O(n,r),x.value)||0;{let e=O();return e+=q.value,e}}),ge=t.computed(()=>l(o.value)&&o.value.templateCounts!==void 0&&o.value.templateCounts.flatMap(e=>e.weekendFee).reduce((e,n)=>e+n,0)||0),fe=t.computed(()=>l(o.value)&&o.value.templateCounts!==void 0&&o.value.templateCounts.flatMap(e=>e.roomUpgrade).reduce((e,n)=>e+n,0)||0),he=t.computed(()=>{const e=p.value;let n=0;for(const r in e)n+=Number.isNaN(e[r])?0:e[r];return n>0}),K=t.computed(()=>l(o.value)?!1:Object.keys(p.value).length>0),ye=t.computed(()=>!!(C.value!==""&&N.value!==""&&M.value.length>=5&&(!K.value||he.value)&&(!(!l(o.value)&&_.value!==a.OctopusEventRateType.FullDayEvent)||k.value!=="")));function Se(e){return s.value===a.EventModuleState.ReservationState&&D.value===e&&u.value}const be=t.computed(()=>!(s.value===a.EventModuleState.InitialState&&u.value)),De=t.computed(()=>!(s.value===a.EventModuleState.AvailabilityState&&u.value)),Ie=t.computed(()=>o.value!==void 0),Ee=t.computed(()=>s.value===a.EventModuleState.PaymentState&&u.value);async function j(){try{const e=(await a.axios.get("http://localhost:91/api/event/metadata",{params:{language:a.getUserLanguage()},headers:{Authorization:b.value,"Fresh-Booking-Ver":"4.0.5"}})).data;d.value=e,Q()}catch{f({message:a.i18n.t("alert.error.couldntFetchMetadata"),type:"warning"})}}async function Q(){s.value=a.EventModuleState.AvailabilityState,u.value=!0;try{const e=(await a.axios.get("http://localhost:91/api/event/restaurant-events",{params:{language:a.getUserLanguage(),date:E.value},headers:{Authorization:b.value,"Fresh-Booking-Ver":"4.0.5"}})).data;h.value=e,u.value=!1}catch{f({message:a.i18n.t("alert.error.couldntFetchListings"),type:"warning"})}}async function Pe(e){s.value=a.EventModuleState.ReservationState,u.value=!0;try{const n=(await a.axios.get("http://localhost:91/api/v3/event/get-availability",{params:{language:a.getUserLanguage(),date:E.value,templateId:D.value,numberOfPeople:A.value},headers:{Authorization:b.value,"Fresh-Booking-Ver":"4.0.5"}})).data;n.templateCounts.length===0?f({message:a.i18n.t("alert.error.eventNotAvailable"),type:"warning"}):(o.value=n,e()),u.value=!1}catch{u.value=!1,s.value=a.EventModuleState.AvailabilityState,f({message:a.i18n.t("alert.error.couldntFetchEvent"),type:"warning"})}}async function ke(e){s.value=a.EventModuleState.ReservationState,u.value=!0;try{const n=(await a.axios.get("http://localhost:91/api/v3/event/get-table-availability",{params:{language:a.getUserLanguage(),date:E.value,numberOfPeople:A.value,eventId:D.value,tableGroupId:L.value},headers:{Authorization:b.value,"Fresh-Booking-Ver":"4.0.5"}})).data;o.value=n,u.value=!1,e()}catch{u.value=!1,s.value=a.EventModuleState.AvailabilityState,f({message:a.i18n.t("alert.error.couldntFetchEvent"),type:"warning"})}}async function Ae(){try{const e=(await a.axios.get("http://localhost:91/api/v3/event/validate-discount-code",{params:{language:a.getUserLanguage(),date:E.value,discountCode:T.value},headers:{Authorization:b.value,"Fresh-Booking-Ver":"4.0.5"}})).data;console.log(e)}catch(e){console.log(e),f({message:a.i18n.t("alert.error.discountCodeValidation"),type:"warning"})}}async function we(e){s.value=a.EventModuleState.PaymentState,u.value=!0;const n=()=>{u.value=!1,s.value=a.EventModuleState.ReservationState,f({message:a.i18n.t("booking.other.errorMessage"),type:"warning"})};let r,v,i;const S=[];if(l(o.value))V.value?.forEach((c,P)=>{const H=[];let J=0;for(const W in I.value){const z=W.split("."),X=I.value[W];parseInt(z[0])===c.roomGroupID&&parseInt(z[2])===P&&X>0&&(H.push({id:J,addonID:parseInt(z[1]),quantity:X}),J++)}S.push({adultPerRoom:c.adultPerRoom,count:c.count,roomGroupID:c.roomGroupID,addons:H})}),r={templateID:U.value,numberOfDays:w.value,templateCounts:S};else{v=[],i=k.value;for(const c in p.value){const P=p.value[parseInt(c)];P>0&&v.push({id:parseInt(c),quantity:P})}}let m="http://localhost:91/api/v3/event/template-book";const g={date:E.value,name:C.value,email:N.value,phone:M.value,remark:G.value,numberOfPeople:A.value,days:F.value,discountCode:T.value,giftCardCode:Z.value,checkoutUrl:window.location.origin,privacyUrl:window.location.origin};l(o.value)?g.templateGroup=r:(g.time=i,g.eventId=D.value,g.products=v,m="http://localhost:91/api/v3/event/event-book"),await a.axios.post(m,g,{headers:{Authorization:b.value,"Fresh-Booking-Ver":"4.0.5"}}).then(c=>{u.value=!1,Y.pay({callback:e,response:c.data})}).catch(()=>n())}function Ce(e){I.value={},p.value={},k.value="",e()}function Me(){j()}return{metaData:d,listingData:h,tableBasePrice:q,availabilityData:o,isLoading:u,moduleState:s,searchDate:B,numberOfPeople:A,numberOfDays:w,eventId:D,tableGroupId:L,arrivalTime:k,addons:I,products:p,discountCode:T,name:C,phone:M,email:N,remark:G,isTemplateEvent:le,currency:ee,maxNumberOfPeople:te,title:ae,subtitle:oe,slideshow:ne,date:E,numberOfTotalDays:F,numberOfRooms:ue,fromDate:re,getEventData:y,length:se,templateId:U,getEvents:ie,getTemplates:ve,hasEvents:ce,hasTemplates:de,basePrice:x,totalPrice:me,getTemplateData:V,getEventTableData:R,roomUpgrade:fe,weekendFee:ge,hasProducts:K,eventRateType:_,isReservationFormFilled:ye,isMetaDataAvailable:be,areListingsAvailable:De,isAvailabilityDataAvailable:Ie,isPaymentLoading:Ee,getEventImages:pe,isEventListingLoading:Se,fetchMetaData:j,fetchListings:Q,getTemplateAvailability:Pe,getEventAvailability:ke,validateDiscountCode:Ae,localAddonPrice:$,totalAddonPrice:O,createBooking:we,reset:Ce,initialize:Me}});exports.useEventStore=Fe;
2
+ //# sourceMappingURL=event-d580e6e8.js.map
Binary file
package/dist/event.cjs.js CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";const e=require("./Clickable-f57e16ad.js"),a=require("./NumberField.vue_vue_type_style_index_0_lang-e642c7f3.js"),B=require("./ThankYou-23531d13.js"),w=require("./index-aa255eba.js"),O=require("./event-e8e0c6a2.js"),he=require("./ActionField-97c0c682.js"),K=require("./SelectField.vue_vue_type_style_index_0_lang-a3371159.js"),Ne=require("./payment-3140b25e.js"),W=require("./applyGiftCard-9847fda1.js");require("./_commonjsHelpers-6763f629.js");const Ce={class:"fresh-booking-event-listing-information"},_e={key:0},Se={key:1},De=e.defineComponent({__name:"Event",props:{name:{},type:{},description:{},fromDate:{},toDate:{},listingId:{},tableGroupId:{},days:{},timeFrom:{},timeTo:{},maxOnlineReservationLimit:{},minimumPersonCount:{},fromPrice:{},gallery:{},soldOut:{type:Boolean,default:!1},styling:{},layout:{},trackingEnabled:{type:Boolean},callback:{}},setup(y){const l=y,{t:n}=a.useI18n(),{display:b}=a.useAlertStore(),{currency:v,maxNumberOfPeople:C,numberOfPeople:h,eventId:U,tableGroupId:_}=a.storeToRefs(O.useEventStore()),{getTemplateAvailability:S,getEventAvailability:D,isEventListingLoading:E}=O.useEventStore(),u=e.ref(0),R=e.computed(()=>E(l.listingId)),q=()=>{u.value>0?(U.value=l.listingId,h.value=u.value,S(l.callback)):b({type:"error",message:n("alert.error.selectPeople")})},I=()=>{u.value>0?(U.value=l.listingId,_.value=l.tableGroupId,h.value=u.value,D(l.callback)):b({type:"error",message:n("alert.error.selectPeople")})};return(o,g)=>(e.openBlock(),e.createBlock(B.Base,{"listing-id":o.listingId,gallery:o.gallery,name:o.name,description:o.description,layout:e.unref(a.BookingLayout).Event,styling:o.styling,currency:e.unref(v)},e.createSlots({action:e.withCtx(()=>[e.createVNode(he.ActionField,{modelValue:u.value,"onUpdate:modelValue":g[0]||(g[0]=V=>u.value=V),type:"number",label:e.unref(n)("event.numberOfGuests"),buttonLabel:o.soldOut?e.unref(n)("event.soldOut"):e.unref(n)("event.bookNowButton"),buttonDisabled:o.soldOut,"min-value":o.type==="event"?1:o.minimumPersonCount,"max-value":o.type==="event"?o.maxOnlineReservationLimit||1/0:e.unref(C),"is-loading":R.value,"onUpdate:isLoading":g[1]||(g[1]=V=>R.value=V),onAction:g[2]||(g[2]=V=>o.type==="event"?I():q())},null,8,["modelValue","label","buttonLabel","buttonDisabled","min-value","max-value","is-loading"])]),_:2},[o.type==="event"?{name:"description",fn:e.withCtx(()=>[e.createBaseVNode("ul",Ce,[e.createBaseVNode("li",null,[e.createVNode(e.Icon,{icon:"calendar-range","icon-color":o.styling.headerColor},null,8,["icon-color"]),e.createBaseVNode("span",null,e.toDisplayString(e.unref(a.showDay)(o.days)),1)]),e.unref(a.daysBetweenDates)(o.fromDate,o.toDate)<180?(e.openBlock(),e.createElementBlock("li",_e,[e.createVNode(e.Icon,{icon:"calendar-days","icon-color":o.styling.headerColor},null,8,["icon-color"]),e.createBaseVNode("span",null,e.toDisplayString(e.unref(a.showDates)(o.fromDate,o.toDate)),1)])):e.createCommentVNode("",!0),e.createBaseVNode("li",null,[e.createVNode(e.Icon,{icon:"calendar-clock","icon-color":o.styling.headerColor},null,8,["icon-color"]),e.createBaseVNode("span",null,e.toDisplayString(e.unref(a.showTimes)(o.timeFrom,o.timeTo)),1)]),o.maxOnlineReservationLimit?(e.openBlock(),e.createElementBlock("li",Se,[e.createVNode(e.Icon,{icon:"user-alt","icon-color":o.styling.headerColor},null,8,["icon-color"]),e.createBaseVNode("span",null,e.toDisplayString(`1 - ${o.maxOnlineReservationLimit} ${e.unref(n)("general.people")}`),1)])):e.createCommentVNode("",!0)])]),key:"0"}:{name:"description",fn:e.withCtx(()=>[e.createBaseVNode("ul",{class:"fresh-booking-event-listing-information"},[e.unref(a.daysBetweenDates)(o.fromDate,o.toDate)<180?(e.openBlock(),e.createElementBlock("li",{key:0},[e.createVNode(e.Icon,{icon:"calendar-days","icon-color":o.styling.headerColor},null,8,["icon-color"]),e.createBaseVNode("span",null,e.toDisplayString(e.unref(a.showDates)(o.fromDate,o.toDate,!0)),1)])):e.createCommentVNode("",!0),e.createBaseVNode("li",null,[e.createVNode(e.Icon,{icon:"user-alt","icon-color":o.styling.headerColor},null,8,["icon-color"]),e.createBaseVNode("span",null,e.toDisplayString(`${o.minimumPersonCount} - ${e.unref(C)} ${e.unref(n)("general.people")}`),1)]),e.createBaseVNode("li",null,[e.createVNode(e.Icon,{icon:"money-bill","icon-color":o.styling.headerColor},null,8,["icon-color"]),e.createBaseVNode("span",null,e.toDisplayString(`${e.unref(n)("general.pricesFrom")} ${e.unref(a.showPrice)(o.fromPrice,e.unref(v))}`),1)])])]),key:"1"}]),1032,["listing-id","gallery","name","description","layout","styling","currency"]))}});const X=e._export_sfc(De,[["__scopeId","data-v-c907b452"]]),N=y=>(e.pushScopeId("data-v-7a0ec33b"),y=y(),e.popScopeId(),y),Ee={class:"fresh-booking-panel"},Fe={key:0,id:"fresh-booking-event-overview"},Pe={class:"fresh-booking-event-listings"},Te={class:"fresh-booking-event-listings"},we={key:2,id:"fresh-booking-event-addons"},Re={class:"fresh-booking-table"},$e=N(()=>e.createBaseVNode("th",{class:"fresh-booking-event-addons-input"},null,-1)),Le={class:"fresh-booking-event-addons-price"},Oe=N(()=>e.createBaseVNode("br",null,null,-1)),Ue={class:"fresh-booking-event-addons-input"},qe={class:"fresh-booking-event-addons-price"},Ie=N(()=>e.createBaseVNode("td",{colspan:"2"},null,-1)),Ae={class:"fresh-booking-event-addons-price"},ze={key:3},We={class:"fresh-booking-label required"},Me={id:"fresh-booking-event-table"},Ye={key:4},Qe={class:"fresh-booking-label required"},je={class:"fresh-booking-table"},He=N(()=>e.createBaseVNode("th",{class:"fresh-booking-event-addons-input"},null,-1)),Je={class:"fresh-booking-event-addons-price"},Ke=N(()=>e.createBaseVNode("br",null,null,-1)),Xe=N(()=>e.createBaseVNode("br",null,null,-1)),Ze={class:"fresh-booking-event-addons-input"},Ge={class:"fresh-booking-event-addons-price"},xe={key:0},eo={key:1},oo={key:2},no={key:3},to={key:4},lo={key:5},ao={key:6},ro=e.defineComponent({__name:"Event",props:{accessToken:{},accentColor:{},buttonBackground:{},buttonBorder:{},buttonBorderRadius:{},buttonColor:{},buttonFontFamily:{},buttonFontSize:{},buttonFontWeight:{},buttonIconColor:{},buttonTextTransform:{},dangerColor:{},fontColor:{},fontFamily:{},fontSize:{},grayColor:{},headerColor:{},inputBackground:{},inputBorder:{},inputBorderRadius:{},inputFontColor:{},labelFontWeight:{},labelPadding:{},linkColor:{},loadingColor:{},panelBackground:{},panelBorder:{},panelBorderRadius:{},panelPadding:{},successColor:{}},setup(y){const l=y,{t:n}=a.useI18n(),{searchDate:b,addons:v,products:C,numberOfDays:h,discountCode:U,name:_,phone:S,email:D,remark:E,arrivalTime:u,title:R,subtitle:q,slideshow:I,currency:o,numberOfPeople:g,numberOfTotalDays:V,numberOfRooms:Z,basePrice:G,totalPrice:x,isPaymentLoading:ee,hasEvents:oe,hasTemplates:ne,getEvents:te,getTemplates:le,getEventData:ae,getTemplateData:$,getEventTableData:re,length:M,roomUpgrade:ie,weekendFee:se,fromDate:Y,hasProducts:ue,eventRateType:Q,isMetaDataAvailable:ce,areListingsAvailable:de,isReservationFormFilled:pe,isAvailabilityDataAvailable:me,getEventImages:fe,isTemplateEvent:k,tableBasePrice:j}=a.storeToRefs(O.useEventStore()),{initialize:ge,validateDiscountCode:co,fetchListings:ke,createBooking:Be,localAddonPrice:H,totalAddonPrice:J,reset:ye}=O.useEventStore(),{hideEvents:be,hideEventTemplates:ve}=a.storeToRefs(a.useUtilityStore());e.onMounted(()=>ge()),e.watch(b,()=>ke());const Ve={"--accentColor":l.accentColor,"--buttonBackground":l.buttonBackground,"--buttonBorder":l.buttonBorder,"--buttonBorderRadius":l.buttonBorderRadius,"--buttonColor":l.buttonColor,"--buttonFontFamily":l.buttonFontFamily,"--buttonFontSize":l.buttonFontSize,"--buttonFontWeight":l.buttonFontWeight,"--buttonTextTransform":l.buttonTextTransform,"--dangerColor":l.dangerColor,"--fontColor":l.fontColor,"--fontFamily":l.fontFamily,"--fontSize":l.fontSize,"--grayColor":l.grayColor,"--headerColor":l.headerColor,"--inputBackground":l.inputBackground,"--inputBorder":l.inputBorder,"--inputBorderRadius":l.inputBorderRadius,"--inputFontColor":l.inputFontColor,"--labelFontWeight":l.labelFontWeight,"--labelPadding":l.labelPadding,"--linkColor":l.linkColor,"--loadingColor":l.loadingColor,"--panelBackground":l.panelBackground,"--panelBorder":l.panelBorder,"--panelBorderRadius":l.panelBorderRadius,"--panelPadding":l.panelPadding,"--successColor":l.successColor};return(r,i)=>(e.openBlock(),e.createBlock(a._sfc_main,{id:"fresh-booking-event-module",class:"fresh-booking-app",type:"event","access-token":r.accessToken,style:Ve},{default:e.withCtx(()=>[e.unref(ce)?(e.openBlock(),e.createBlock(B.MultiStepForm,{key:0,slideshow:e.unref(I),title:e.unref(R),subtitle:e.unref(q)},{availability:e.withCtx(({next:L})=>[e.createBaseVNode("div",Ee,[e.createVNode(Ne._sfc_main,{modelValue:e.unref(b),"onUpdate:modelValue":i[0]||(i[0]=p=>e.isRef(b)?b.value=p:null),label:e.unref(n)("event.selectDate"),"min-date":new Date},null,8,["modelValue","label","min-date"])]),e.unref(de)?(e.openBlock(),e.createElementBlock("div",Fe,[e.unref(oe)&&!e.unref(be)?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createBaseVNode("h2",null,[e.createVNode(e.Icon,{icon:"clock-seven",type:"fal","icon-color":r.headerColor},null,8,["icon-color"]),e.createBaseVNode("span",null,e.toDisplayString(e.unref(n)("event.eventsTitle")),1)]),e.createBaseVNode("ul",Pe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(te),({id:p,days:t,name:c,timeFrom:m,timeTo:s,fromDate:d,toDate:F,tableGroupID:P,description:A,soldOut:z,maxOnlineReservationLimit:T})=>(e.openBlock(),e.createBlock(X,{key:p,type:"event","listing-id":p,"table-group-id":P,gallery:e.unref(fe)(p),description:A,name:c,days:t,"from-date":d,"to-date":F,"max-online-reservation-limit":T,"time-from":m,"time-to":s,"sold-out":z,styling:{headerColor:r.headerColor,fontColor:r.fontColor,fontSize:r.fontSize,fontFamily:r.fontFamily,panelPadding:r.panelPadding},callback:L},null,8,["listing-id","table-group-id","gallery","description","name","days","from-date","to-date","max-online-reservation-limit","time-from","time-to","sold-out","styling","callback"]))),128))])],64)):e.createCommentVNode("",!0),e.unref(ne)&&!e.unref(ve)?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createBaseVNode("h2",null,[e.createVNode(e.Icon,{icon:"stars",type:"fal","icon-color":r.headerColor},null,8,["icon-color"]),e.createBaseVNode("span",null,e.toDisplayString(e.unref(n)("event.stayTitle")),1)]),e.createBaseVNode("ul",Te,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(le),({id:p,name:t,fromDate:c,toDate:m,minimumPersonCount:s,fromPrice:d,description:F,imageUrl:P})=>(e.openBlock(),e.createBlock(X,{key:p,type:"template","listing-id":p,gallery:P,name:t,description:F,"from-date":c,"to-date":m,"minimum-person-count":s,fromPrice:d,styling:{headerColor:r.headerColor,fontColor:r.fontColor,fontSize:r.fontSize,fontFamily:r.fontFamily,panelPadding:r.panelPadding},callback:L},null,8,["listing-id","gallery","name","description","from-date","to-date","minimum-person-count","fromPrice","styling","callback"]))),128))])],64)):e.createCommentVNode("",!0)])):(e.openBlock(),e.createBlock(e.Loading,{key:1}))]),reservation:e.withCtx(({next:L,prev:p})=>[e.unref(me)?(e.openBlock(),e.createBlock(B.ReservationForm,{key:0,remark:e.unref(E),"onUpdate:remark":i[8]||(i[8]=t=>e.isRef(E)?E.value=t:null),"is-filled":e.unref(pe),"is-loading":e.unref(ee),currency:e.unref(o),"base-price":e.unref(G),"button-icon-color":r.buttonIconColor,"total-price":e.unref(x),"weekend-fee":e.unref(se),"room-upgrade":e.unref(ie),onPrev:t=>e.unref(ye)(p),onNext:t=>e.unref(Be)(L)},{form:e.withCtx(()=>[e.unref(Q)===e.unref(a.OctopusEventRateType).FullDayEvent?(e.openBlock(),e.createBlock(W._sfc_main,{key:0,modelValue:e.unref(h),"onUpdate:modelValue":i[1]||(i[1]=t=>e.isRef(h)?h.value=t:null),label:e.unref(n)("event.numberOfDays"),"min-value":1,required:""},null,8,["modelValue","label"])):e.createCommentVNode("",!0),e.createVNode(K.TextField,{modelValue:e.unref(_),"onUpdate:modelValue":i[2]||(i[2]=t=>e.isRef(_)?_.value=t:null),type:"text",label:e.unref(n)("booking.reservation.name"),icon:"user-alt",placeholder:e.unref(n)("booking.reservation.namePlaceholder"),required:""},null,8,["modelValue","label","placeholder"]),e.createVNode(K.TextField,{modelValue:e.unref(D),"onUpdate:modelValue":i[3]||(i[3]=t=>e.isRef(D)?D.value=t:null),label:e.unref(n)("booking.reservation.email"),type:"email",name:"email",autocomplete:"email",icon:"at",placeholder:e.unref(n)("booking.reservation.emailPlaceholder"),required:""},null,8,["modelValue","label","placeholder"]),e.createVNode(w.PhoneField,{modelValue:e.unref(S),"onUpdate:modelValue":i[4]||(i[4]=t=>e.isRef(S)?S.value=t:null),label:e.unref(n)("booking.reservation.phone"),icon:"phone-office",placeholder:e.unref(n)("booking.reservation.phonePlaceholder"),required:""},null,8,["modelValue","label","placeholder"]),e.createCommentVNode("",!0),e.unref($)&&e.unref($).length>0?(e.openBlock(),e.createElementBlock("ul",we,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref($),({roomGroupID:t,addons:c,adultPerRoom:m},s)=>(e.openBlock(),e.createElementBlock("li",{key:t},[e.createBaseVNode("h5",null,[e.createBaseVNode("span",null,e.toDisplayString(e.unref(n)("booking.reservation.room"))+" #"+e.toDisplayString(s+1),1),e.createTextVNode(" ("),e.createVNode(e.Icon,{icon:"male",type:"fas","icon-color":r.headerColor},null,8,["icon-color"]),e.createTextVNode(" "+e.toDisplayString(m)+") ",1)]),e.createBaseVNode("table",Re,[e.createBaseVNode("thead",null,[e.createBaseVNode("tr",null,[e.createBaseVNode("th",null,[e.createBaseVNode("span",null,e.toDisplayString(e.unref(n)("booking.reservation.addons")),1)]),$e,e.createBaseVNode("th",Le,[e.createBaseVNode("span",null,e.toDisplayString(e.unref(n)("booking.availability.price")),1)])])]),e.createBaseVNode("tbody",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c,({addonID:d,cardinality:F,name:P,price:A,quantityStrategy:z})=>(e.openBlock(),e.createElementBlock("tr",{key:d},[e.createBaseVNode("td",null,[e.createBaseVNode("b",null,e.toDisplayString(P),1),Oe,e.createBaseVNode("span",null,e.toDisplayString(e.unref(a.showPrice)(A,e.unref(o)))+" "+e.toDisplayString(e.unref(a.getPriceQuantityLabel)(z)),1)]),e.createBaseVNode("td",Ue,[F===3?(e.openBlock(),e.createBlock(W._sfc_main,{key:0,modelValue:e.unref(v)[`${t}.${d}.${s}`],"onUpdate:modelValue":T=>e.unref(v)[`${t}.${d}.${s}`]=T,small:!0,"min-value":0},null,8,["modelValue","onUpdate:modelValue"])):(e.openBlock(),e.createBlock(w.Checkbox,{key:1,modelValue:e.unref(v)[`${t}.${d}.${s}`],"onUpdate:modelValue":T=>e.unref(v)[`${t}.${d}.${s}`]=T,numeric:!0},null,8,["modelValue","onUpdate:modelValue"]))]),e.createBaseVNode("td",qe,[e.createBaseVNode("span",null,e.toDisplayString(e.unref(a.showPrice)(e.unref(H)(d,t,s),e.unref(o))),1)])]))),128))]),e.createBaseVNode("tfoot",null,[e.createBaseVNode("tr",null,[Ie,e.createBaseVNode("td",Ae,[e.createBaseVNode("u",null,[e.createBaseVNode("span",null,e.toDisplayString(e.unref(a.showPrice)(e.unref(J)(t,s),e.unref(o))),1)])])])])])]))),128))])):e.createCommentVNode("",!0),e.unref(Q)!==e.unref(a.OctopusEventRateType).FullDayEvent&&!e.unref(k)?(e.openBlock(),e.createElementBlock("div",ze,[e.createBaseVNode("label",We,[e.createBaseVNode("span",null,e.toDisplayString(e.unref(n)("event.selectArrivalTime")),1)]),e.createBaseVNode("ul",Me,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(re),(t,c)=>(e.openBlock(),e.createElementBlock("li",{key:c},[e.createVNode(w.Checkbox,{modelValue:e.unref(u),"onUpdate:modelValue":i[7]||(i[7]=m=>e.isRef(u)?u.value=m:null),type:"radio",name:"eventTimeTable",val:t.time,label:e.unref(a.showTime)(t.time)},null,8,["modelValue","val","label"])]))),128))])])):e.createCommentVNode("",!0),e.unref(ue)?(e.openBlock(),e.createElementBlock("div",Ye,[e.createBaseVNode("label",Qe,[e.createBaseVNode("span",null,e.toDisplayString(e.unref(n)("event.selectProducts")),1)]),e.createBaseVNode("table",je,[e.createBaseVNode("thead",null,[e.createBaseVNode("tr",null,[e.createBaseVNode("th",null,[e.createBaseVNode("span",null,e.toDisplayString(e.unref(n)("booking.reservation.addons")),1)]),He,e.createBaseVNode("th",Je,[e.createBaseVNode("span",null,e.toDisplayString(e.unref(n)("booking.availability.price")),1)])])]),e.createBaseVNode("tbody",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(ae).products,({productID:t,productName:c,price:m,description:s})=>(e.openBlock(),e.createElementBlock("tr",{key:t},[e.createBaseVNode("td",null,[e.createBaseVNode("b",null,[e.createBaseVNode("span",null,e.toDisplayString(c),1)]),Ke,e.createBaseVNode("span",null,e.toDisplayString(s),1),Xe,e.createBaseVNode("span",null,e.toDisplayString(e.unref(a.showPrice)(m,e.unref(o))),1)]),e.createBaseVNode("td",Ze,[e.createVNode(W._sfc_main,{modelValue:e.unref(C)[t],"onUpdate:modelValue":d=>e.unref(C)[t]=d,small:!0,"min-value":0},null,8,["modelValue","onUpdate:modelValue"])]),e.createBaseVNode("td",Ge,[e.createBaseVNode("span",null,e.toDisplayString(e.unref(a.showPrice)(e.unref(H)(t),e.unref(o))),1)])]))),128))])])])):e.createCommentVNode("",!0)]),resume:e.withCtx(()=>[e.createBaseVNode("li",null,[e.createBaseVNode("span",null,e.toDisplayString(e.unref(n)("event.numberOfGuests")),1),e.createBaseVNode("b",null,e.toDisplayString(e.unref(g)),1)]),e.unref(k)?(e.openBlock(),e.createElementBlock("li",xe,[e.createBaseVNode("span",null,e.toDisplayString(e.unref(n)("event.numberOfRooms")),1),e.createBaseVNode("b",null,e.toDisplayString(e.unref(Z)),1)])):e.createCommentVNode("",!0),e.unref(k)?(e.openBlock(),e.createElementBlock("li",eo,[e.createBaseVNode("span",null,e.toDisplayString(e.unref(n)("event.numberOfDays")),1),e.createBaseVNode("b",null,e.toDisplayString(e.unref(V)),1)])):e.createCommentVNode("",!0),e.unref(k)?(e.openBlock(),e.createElementBlock("li",oo,[e.createBaseVNode("span",null,e.toDisplayString(e.unref(n)("booking.reservation.arrival")),1),e.createBaseVNode("b",null,e.toDisplayString(e.unref(a.showDate)(e.unref(Y))),1)])):e.createCommentVNode("",!0),e.unref(k)?(e.openBlock(),e.createElementBlock("li",no,[e.createBaseVNode("span",null,e.toDisplayString(e.unref(n)("booking.reservation.departure")),1),e.createBaseVNode("b",null,e.toDisplayString(e.unref(a.showDate)(e.unref(Y),e.unref(V))),1)])):e.createCommentVNode("",!0),!e.unref(k)&&e.unref(u)?(e.openBlock(),e.createElementBlock("li",to,[e.createBaseVNode("span",null,e.toDisplayString(e.unref(n)("event.startOfEvent")),1),e.createBaseVNode("b",null,e.toDisplayString(e.unref(a.showTime)(e.unref(u))),1)])):e.createCommentVNode("",!0),!e.unref(k)&&e.unref(M)?(e.openBlock(),e.createElementBlock("li",lo,[e.createBaseVNode("span",null,e.toDisplayString(e.unref(n)("event.lengthOfEvent")),1),e.createBaseVNode("b",null,e.toDisplayString(e.unref(a.showTime)(e.unref(M))),1)])):e.createCommentVNode("",!0),!e.unref(k)&&e.unref(j)>0?(e.openBlock(),e.createElementBlock("li",ao,[e.createBaseVNode("span",null,e.toDisplayString(e.unref(n)("booking.availability.basePrice")),1),e.createBaseVNode("b",null,e.toDisplayString(e.unref(a.showPrice)(e.unref(j),e.unref(o))),1)])):e.createCommentVNode("",!0)]),expenses:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref($),({roomGroupID:t},c)=>(e.openBlock(),e.createElementBlock("li",{key:t},[e.createBaseVNode("span",null,e.toDisplayString(e.unref(n)("booking.reservation.addons"))+" - "+e.toDisplayString(e.unref(n)("booking.reservation.room"))+" #"+e.toDisplayString(c+1),1),e.createBaseVNode("b",null,e.toDisplayString(e.unref(a.showPrice)(e.unref(J)(t,c),e.unref(o))),1)]))),128))]),_:2},1032,["remark","is-filled","is-loading","currency","base-price","button-icon-color","total-price","weekend-fee","room-upgrade","onPrev","onNext"])):e.createCommentVNode("",!0)]),payment:e.withCtx(()=>[e.createVNode(B.CheckoutWindow)]),confirmation:e.withCtx(()=>[e.createVNode(B.ThankYou,{message:e.unref(n)("event.confirmationMessage"),currency:e.unref(o)},null,8,["message","currency"])]),_:1},8,["slideshow","title","subtitle"])):(e.openBlock(),e.createBlock(e.Loading,{key:1}))]),_:1},8,["access-token"]))}});const io=e._export_sfc(ro,[["__scopeId","data-v-7a0ec33b"]]);process.env.NODE_ENV==="production"&&a.distExports.flare.light();const so=a.createPinia(),uo=B.zo(),f=e.createApp({components:{Event:io}});f.use(a.distExports$1.flareVue);f.use(so);f.use(uo);f.use(w.StickyPlugin);f.use(B.VueSnip);f.use(a.instance);f.use(B.xt);f.use(w.install,{bootstrap:!1});f.mount("#fresh-booking-event-app");
1
+ "use strict";const e=require("./Clickable-77afc133.js"),a=require("./NumberField.vue_vue_type_style_index_0_lang-e8efabad.js"),k=require("./ThankYou-1096ca5a.js"),w=require("./index-4e9533a9.js"),O=require("./event-d580e6e8.js"),he=require("./ActionField-3640689b.js"),K=require("./SelectField.vue_vue_type_style_index_0_lang-18843626.js"),Ne=require("./payment-bfd660a7.js"),W=require("./applyGiftCard-e24bae0c.js");require("./_commonjsHelpers-6763f629.js");const Ce={class:"fresh-booking-event-listing-information"},_e={key:0},Se={key:1},De=e.defineComponent({__name:"Event",props:{name:{},type:{},description:{},fromDate:{},toDate:{},listingId:{},tableGroupId:{},days:{},timeFrom:{},timeTo:{},maxOnlineReservationLimit:{},minimumPersonCount:{},fromPrice:{},gallery:{},soldOut:{type:Boolean,default:!1},styling:{},layout:{},trackingEnabled:{type:Boolean},callback:{}},setup(y){const l=y,{t:n}=a.useI18n(),{display:b}=a.useAlertStore(),{currency:v,maxNumberOfPeople:C,numberOfPeople:h,eventId:U,tableGroupId:_}=a.storeToRefs(O.useEventStore()),{getTemplateAvailability:S,getEventAvailability:D,isEventListingLoading:E}=O.useEventStore(),u=e.ref(0),R=e.computed(()=>E(l.listingId)),q=()=>{u.value>0?(U.value=l.listingId,h.value=u.value,S(l.callback)):b({type:"error",message:n("alert.error.selectPeople")})},I=()=>{u.value>0?(U.value=l.listingId,_.value=l.tableGroupId,h.value=u.value,D(l.callback)):b({type:"error",message:n("alert.error.selectPeople")})};return(o,f)=>(e.openBlock(),e.createBlock(k.Base,{"listing-id":o.listingId,gallery:o.gallery,name:o.name,description:o.description,layout:e.unref(a.BookingLayout).Event,styling:o.styling,currency:e.unref(v)},e.createSlots({action:e.withCtx(()=>[e.createVNode(he.ActionField,{modelValue:u.value,"onUpdate:modelValue":f[0]||(f[0]=V=>u.value=V),type:"number",label:e.unref(n)("event.numberOfGuests"),buttonLabel:o.soldOut?e.unref(n)("event.soldOut"):e.unref(n)("event.bookNowButton"),buttonDisabled:o.soldOut,"min-value":o.type==="event"?1:o.minimumPersonCount,"max-value":o.type==="event"?o.maxOnlineReservationLimit||1/0:e.unref(C),"is-loading":R.value,"onUpdate:isLoading":f[1]||(f[1]=V=>R.value=V),onAction:f[2]||(f[2]=V=>o.type==="event"?I():q())},null,8,["modelValue","label","buttonLabel","buttonDisabled","min-value","max-value","is-loading"])]),_:2},[o.type==="event"?{name:"description",fn:e.withCtx(()=>[e.createBaseVNode("ul",Ce,[e.createBaseVNode("li",null,[e.createVNode(e.Icon,{icon:"calendar-range","icon-color":o.styling.headerColor},null,8,["icon-color"]),e.createBaseVNode("span",null,e.toDisplayString(e.unref(a.showDay)(o.days)),1)]),e.unref(a.daysBetweenDates)(o.fromDate,o.toDate)<180?(e.openBlock(),e.createElementBlock("li",_e,[e.createVNode(e.Icon,{icon:"calendar-days","icon-color":o.styling.headerColor},null,8,["icon-color"]),e.createBaseVNode("span",null,e.toDisplayString(e.unref(a.showDates)(o.fromDate,o.toDate)),1)])):e.createCommentVNode("",!0),e.createBaseVNode("li",null,[e.createVNode(e.Icon,{icon:"calendar-clock","icon-color":o.styling.headerColor},null,8,["icon-color"]),e.createBaseVNode("span",null,e.toDisplayString(e.unref(a.showTimes)(o.timeFrom,o.timeTo)),1)]),o.maxOnlineReservationLimit?(e.openBlock(),e.createElementBlock("li",Se,[e.createVNode(e.Icon,{icon:"user-alt","icon-color":o.styling.headerColor},null,8,["icon-color"]),e.createBaseVNode("span",null,e.toDisplayString(`1 - ${o.maxOnlineReservationLimit} ${e.unref(n)("general.people")}`),1)])):e.createCommentVNode("",!0)])]),key:"0"}:{name:"description",fn:e.withCtx(()=>[e.createBaseVNode("ul",{class:"fresh-booking-event-listing-information"},[e.unref(a.daysBetweenDates)(o.fromDate,o.toDate)<180?(e.openBlock(),e.createElementBlock("li",{key:0},[e.createVNode(e.Icon,{icon:"calendar-days","icon-color":o.styling.headerColor},null,8,["icon-color"]),e.createBaseVNode("span",null,e.toDisplayString(e.unref(a.showDates)(o.fromDate,o.toDate,!0)),1)])):e.createCommentVNode("",!0),e.createBaseVNode("li",null,[e.createVNode(e.Icon,{icon:"user-alt","icon-color":o.styling.headerColor},null,8,["icon-color"]),e.createBaseVNode("span",null,e.toDisplayString(`${o.minimumPersonCount} - ${e.unref(C)} ${e.unref(n)("general.people")}`),1)]),e.createBaseVNode("li",null,[e.createVNode(e.Icon,{icon:"money-bill","icon-color":o.styling.headerColor},null,8,["icon-color"]),e.createBaseVNode("span",null,e.toDisplayString(`${e.unref(n)("general.pricesFrom")} ${e.unref(a.showPrice)(o.fromPrice,e.unref(v))}`),1)])])]),key:"1"}]),1032,["listing-id","gallery","name","description","layout","styling","currency"]))}});const X=e._export_sfc(De,[["__scopeId","data-v-c907b452"]]),N=y=>(e.pushScopeId("data-v-7a0ec33b"),y=y(),e.popScopeId(),y),Ee={class:"fresh-booking-panel"},Fe={key:0,id:"fresh-booking-event-overview"},Pe={class:"fresh-booking-event-listings"},Te={class:"fresh-booking-event-listings"},we={key:2,id:"fresh-booking-event-addons"},Re={class:"fresh-booking-table"},$e=N(()=>e.createBaseVNode("th",{class:"fresh-booking-event-addons-input"},null,-1)),Le={class:"fresh-booking-event-addons-price"},Oe=N(()=>e.createBaseVNode("br",null,null,-1)),Ue={class:"fresh-booking-event-addons-input"},qe={class:"fresh-booking-event-addons-price"},Ie=N(()=>e.createBaseVNode("td",{colspan:"2"},null,-1)),Ae={class:"fresh-booking-event-addons-price"},ze={key:3},We={class:"fresh-booking-label required"},Me={id:"fresh-booking-event-table"},Ye={key:4},Qe={class:"fresh-booking-label required"},je={class:"fresh-booking-table"},He=N(()=>e.createBaseVNode("th",{class:"fresh-booking-event-addons-input"},null,-1)),Je={class:"fresh-booking-event-addons-price"},Ke=N(()=>e.createBaseVNode("br",null,null,-1)),Xe=N(()=>e.createBaseVNode("br",null,null,-1)),Ze={class:"fresh-booking-event-addons-input"},Ge={class:"fresh-booking-event-addons-price"},xe={key:0},eo={key:1},oo={key:2},no={key:3},to={key:4},lo={key:5},ao={key:6},ro=e.defineComponent({__name:"Event",props:{accessToken:{},accentColor:{},buttonBackground:{},buttonBorder:{},buttonBorderRadius:{},buttonColor:{},buttonFontFamily:{},buttonFontSize:{},buttonFontWeight:{},buttonIconColor:{},buttonTextTransform:{},dangerColor:{},fontColor:{},fontFamily:{},fontSize:{},grayColor:{},headerColor:{},inputBackground:{},inputBorder:{},inputBorderRadius:{},inputFontColor:{},labelFontWeight:{},labelPadding:{},linkColor:{},loadingColor:{},panelBackground:{},panelBorder:{},panelBorderRadius:{},panelPadding:{},successColor:{}},setup(y){const l=y,{t:n}=a.useI18n(),{searchDate:b,addons:v,products:C,numberOfDays:h,discountCode:U,name:_,phone:S,email:D,remark:E,arrivalTime:u,title:R,subtitle:q,slideshow:I,currency:o,numberOfPeople:f,numberOfTotalDays:V,numberOfRooms:Z,basePrice:G,totalPrice:x,isPaymentLoading:ee,hasEvents:oe,hasTemplates:ne,getEvents:te,getTemplates:le,getEventData:ae,getTemplateData:$,getEventTableData:re,length:M,roomUpgrade:ie,weekendFee:se,fromDate:Y,hasProducts:ue,eventRateType:Q,isMetaDataAvailable:ce,areListingsAvailable:de,isReservationFormFilled:pe,isAvailabilityDataAvailable:me,getEventImages:fe,isTemplateEvent:g,tableBasePrice:j}=a.storeToRefs(O.useEventStore()),{initialize:ge,validateDiscountCode:co,fetchListings:ke,createBooking:Be,localAddonPrice:H,totalAddonPrice:J,reset:ye}=O.useEventStore(),{hideEvents:be,hideEventTemplates:ve}=a.storeToRefs(a.useUtilityStore());e.onMounted(()=>ge()),e.watch(b,()=>ke());const Ve={"--accentColor":l.accentColor,"--buttonBackground":l.buttonBackground,"--buttonBorder":l.buttonBorder,"--buttonBorderRadius":l.buttonBorderRadius,"--buttonColor":l.buttonColor,"--buttonFontFamily":l.buttonFontFamily,"--buttonFontSize":l.buttonFontSize,"--buttonFontWeight":l.buttonFontWeight,"--buttonTextTransform":l.buttonTextTransform,"--dangerColor":l.dangerColor,"--fontColor":l.fontColor,"--fontFamily":l.fontFamily,"--fontSize":l.fontSize,"--grayColor":l.grayColor,"--headerColor":l.headerColor,"--inputBackground":l.inputBackground,"--inputBorder":l.inputBorder,"--inputBorderRadius":l.inputBorderRadius,"--inputFontColor":l.inputFontColor,"--labelFontWeight":l.labelFontWeight,"--labelPadding":l.labelPadding,"--linkColor":l.linkColor,"--loadingColor":l.loadingColor,"--panelBackground":l.panelBackground,"--panelBorder":l.panelBorder,"--panelBorderRadius":l.panelBorderRadius,"--panelPadding":l.panelPadding,"--successColor":l.successColor};return(r,i)=>(e.openBlock(),e.createBlock(a._sfc_main,{id:"fresh-booking-event-module",class:"fresh-booking-app",type:"event","access-token":r.accessToken,style:Ve},{default:e.withCtx(()=>[e.unref(ce)?(e.openBlock(),e.createBlock(k.MultiStepForm,{key:0,slideshow:e.unref(I),title:e.unref(R),subtitle:e.unref(q)},{availability:e.withCtx(({next:L})=>[e.createBaseVNode("div",Ee,[e.createVNode(Ne._sfc_main,{modelValue:e.unref(b),"onUpdate:modelValue":i[0]||(i[0]=p=>e.isRef(b)?b.value=p:null),label:e.unref(n)("event.selectDate"),"min-date":new Date},null,8,["modelValue","label","min-date"])]),e.unref(de)?(e.openBlock(),e.createElementBlock("div",Fe,[e.unref(oe)&&!e.unref(be)?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createBaseVNode("h2",null,[e.createVNode(e.Icon,{icon:"clock-seven",type:"fal","icon-color":r.headerColor},null,8,["icon-color"]),e.createBaseVNode("span",null,e.toDisplayString(e.unref(n)("event.eventsTitle")),1)]),e.createBaseVNode("ul",Pe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(te),({id:p,days:t,name:c,timeFrom:m,timeTo:s,fromDate:d,toDate:F,tableGroupID:P,description:A,soldOut:z,maxOnlineReservationLimit:T})=>(e.openBlock(),e.createBlock(X,{key:p,type:"event","listing-id":p,"table-group-id":P,gallery:e.unref(fe)(p),description:A,name:c,days:t,"from-date":d,"to-date":F,"max-online-reservation-limit":T,"time-from":m,"time-to":s,"sold-out":z,styling:{headerColor:r.headerColor,fontColor:r.fontColor,fontSize:r.fontSize,fontFamily:r.fontFamily,panelPadding:r.panelPadding},callback:L},null,8,["listing-id","table-group-id","gallery","description","name","days","from-date","to-date","max-online-reservation-limit","time-from","time-to","sold-out","styling","callback"]))),128))])],64)):e.createCommentVNode("",!0),e.unref(ne)&&!e.unref(ve)?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createBaseVNode("h2",null,[e.createVNode(e.Icon,{icon:"stars",type:"fal","icon-color":r.headerColor},null,8,["icon-color"]),e.createBaseVNode("span",null,e.toDisplayString(e.unref(n)("event.stayTitle")),1)]),e.createBaseVNode("ul",Te,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(le),({id:p,name:t,fromDate:c,toDate:m,minimumPersonCount:s,fromPrice:d,description:F,imageUrl:P})=>(e.openBlock(),e.createBlock(X,{key:p,type:"template","listing-id":p,gallery:P,name:t,description:F,"from-date":c,"to-date":m,"minimum-person-count":s,fromPrice:d,styling:{headerColor:r.headerColor,fontColor:r.fontColor,fontSize:r.fontSize,fontFamily:r.fontFamily,panelPadding:r.panelPadding},callback:L},null,8,["listing-id","gallery","name","description","from-date","to-date","minimum-person-count","fromPrice","styling","callback"]))),128))])],64)):e.createCommentVNode("",!0)])):(e.openBlock(),e.createBlock(e.Loading,{key:1}))]),reservation:e.withCtx(({next:L,prev:p})=>[e.unref(me)?(e.openBlock(),e.createBlock(k.ReservationForm,{key:0,remark:e.unref(E),"onUpdate:remark":i[8]||(i[8]=t=>e.isRef(E)?E.value=t:null),"is-filled":e.unref(pe),"is-loading":e.unref(ee),currency:e.unref(o),"base-price":e.unref(G),"button-icon-color":r.buttonIconColor,"total-price":e.unref(x),"weekend-fee":e.unref(se),"room-upgrade":e.unref(ie),onPrev:t=>e.unref(ye)(p),onNext:t=>e.unref(Be)(L)},{form:e.withCtx(()=>[e.unref(Q)===e.unref(a.OctopusEventRateType).FullDayEvent?(e.openBlock(),e.createBlock(W._sfc_main,{key:0,modelValue:e.unref(h),"onUpdate:modelValue":i[1]||(i[1]=t=>e.isRef(h)?h.value=t:null),label:e.unref(n)("event.numberOfDays"),"min-value":1,required:""},null,8,["modelValue","label"])):e.createCommentVNode("",!0),e.createVNode(K.TextField,{modelValue:e.unref(_),"onUpdate:modelValue":i[2]||(i[2]=t=>e.isRef(_)?_.value=t:null),type:"text",label:e.unref(n)("booking.reservation.name"),icon:"user-alt",placeholder:e.unref(n)("booking.reservation.namePlaceholder"),required:""},null,8,["modelValue","label","placeholder"]),e.createVNode(K.TextField,{modelValue:e.unref(D),"onUpdate:modelValue":i[3]||(i[3]=t=>e.isRef(D)?D.value=t:null),label:e.unref(n)("booking.reservation.email"),type:"email",name:"email",autocomplete:"email",icon:"at",placeholder:e.unref(n)("booking.reservation.emailPlaceholder"),required:""},null,8,["modelValue","label","placeholder"]),e.createVNode(w.PhoneField,{modelValue:e.unref(S),"onUpdate:modelValue":i[4]||(i[4]=t=>e.isRef(S)?S.value=t:null),label:e.unref(n)("booking.reservation.phone"),icon:"phone-office",placeholder:e.unref(n)("booking.reservation.phonePlaceholder"),required:""},null,8,["modelValue","label","placeholder"]),e.createCommentVNode("",!0),e.unref($)&&e.unref($).length>0?(e.openBlock(),e.createElementBlock("ul",we,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref($),({roomGroupID:t,addons:c,adultPerRoom:m},s)=>(e.openBlock(),e.createElementBlock("li",{key:t},[e.createBaseVNode("h5",null,[e.createBaseVNode("span",null,e.toDisplayString(e.unref(n)("booking.reservation.room"))+" #"+e.toDisplayString(s+1),1),e.createTextVNode(" ("),e.createVNode(e.Icon,{icon:"male",type:"fas","icon-color":r.headerColor},null,8,["icon-color"]),e.createTextVNode(" "+e.toDisplayString(m)+") ",1)]),e.createBaseVNode("table",Re,[e.createBaseVNode("thead",null,[e.createBaseVNode("tr",null,[e.createBaseVNode("th",null,[e.createBaseVNode("span",null,e.toDisplayString(e.unref(n)("booking.reservation.addons")),1)]),$e,e.createBaseVNode("th",Le,[e.createBaseVNode("span",null,e.toDisplayString(e.unref(n)("booking.availability.price")),1)])])]),e.createBaseVNode("tbody",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c,({addonID:d,cardinality:F,name:P,price:A,quantityStrategy:z})=>(e.openBlock(),e.createElementBlock("tr",{key:d},[e.createBaseVNode("td",null,[e.createBaseVNode("b",null,e.toDisplayString(P),1),Oe,e.createBaseVNode("span",null,e.toDisplayString(e.unref(a.showPrice)(A,e.unref(o)))+" "+e.toDisplayString(e.unref(a.getPriceQuantityLabel)(z)),1)]),e.createBaseVNode("td",Ue,[F===3?(e.openBlock(),e.createBlock(W._sfc_main,{key:0,modelValue:e.unref(v)[`${t}.${d}.${s}`],"onUpdate:modelValue":T=>e.unref(v)[`${t}.${d}.${s}`]=T,small:!0,"min-value":0},null,8,["modelValue","onUpdate:modelValue"])):(e.openBlock(),e.createBlock(w.Checkbox,{key:1,modelValue:e.unref(v)[`${t}.${d}.${s}`],"onUpdate:modelValue":T=>e.unref(v)[`${t}.${d}.${s}`]=T,numeric:!0},null,8,["modelValue","onUpdate:modelValue"]))]),e.createBaseVNode("td",qe,[e.createBaseVNode("span",null,e.toDisplayString(e.unref(a.showPrice)(e.unref(H)(d,t,s),e.unref(o))),1)])]))),128))]),e.createBaseVNode("tfoot",null,[e.createBaseVNode("tr",null,[Ie,e.createBaseVNode("td",Ae,[e.createBaseVNode("u",null,[e.createBaseVNode("span",null,e.toDisplayString(e.unref(a.showPrice)(e.unref(J)(t,s),e.unref(o))),1)])])])])])]))),128))])):e.createCommentVNode("",!0),e.unref(Q)!==e.unref(a.OctopusEventRateType).FullDayEvent&&!e.unref(g)?(e.openBlock(),e.createElementBlock("div",ze,[e.createBaseVNode("label",We,[e.createBaseVNode("span",null,e.toDisplayString(e.unref(n)("event.selectArrivalTime")),1)]),e.createBaseVNode("ul",Me,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(re),(t,c)=>(e.openBlock(),e.createElementBlock("li",{key:c},[e.createVNode(w.Checkbox,{modelValue:e.unref(u),"onUpdate:modelValue":i[7]||(i[7]=m=>e.isRef(u)?u.value=m:null),type:"radio",name:"eventTimeTable",val:t.time,label:e.unref(a.showTime)(t.time)},null,8,["modelValue","val","label"])]))),128))])])):e.createCommentVNode("",!0),e.unref(ue)?(e.openBlock(),e.createElementBlock("div",Ye,[e.createBaseVNode("label",Qe,[e.createBaseVNode("span",null,e.toDisplayString(e.unref(n)("event.selectProducts")),1)]),e.createBaseVNode("table",je,[e.createBaseVNode("thead",null,[e.createBaseVNode("tr",null,[e.createBaseVNode("th",null,[e.createBaseVNode("span",null,e.toDisplayString(e.unref(n)("booking.reservation.addons")),1)]),He,e.createBaseVNode("th",Je,[e.createBaseVNode("span",null,e.toDisplayString(e.unref(n)("booking.availability.price")),1)])])]),e.createBaseVNode("tbody",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(ae).products,({productID:t,productName:c,price:m,description:s})=>(e.openBlock(),e.createElementBlock("tr",{key:t},[e.createBaseVNode("td",null,[e.createBaseVNode("b",null,[e.createBaseVNode("span",null,e.toDisplayString(c),1)]),Ke,e.createBaseVNode("span",null,e.toDisplayString(s),1),Xe,e.createBaseVNode("span",null,e.toDisplayString(e.unref(a.showPrice)(m,e.unref(o))),1)]),e.createBaseVNode("td",Ze,[e.createVNode(W._sfc_main,{modelValue:e.unref(C)[t],"onUpdate:modelValue":d=>e.unref(C)[t]=d,small:!0,"min-value":0},null,8,["modelValue","onUpdate:modelValue"])]),e.createBaseVNode("td",Ge,[e.createBaseVNode("span",null,e.toDisplayString(e.unref(a.showPrice)(e.unref(H)(t),e.unref(o))),1)])]))),128))])])])):e.createCommentVNode("",!0)]),resume:e.withCtx(()=>[e.createBaseVNode("li",null,[e.createBaseVNode("span",null,e.toDisplayString(e.unref(n)("event.numberOfGuests")),1),e.createBaseVNode("b",null,e.toDisplayString(e.unref(f)),1)]),e.unref(g)?(e.openBlock(),e.createElementBlock("li",xe,[e.createBaseVNode("span",null,e.toDisplayString(e.unref(n)("event.numberOfRooms")),1),e.createBaseVNode("b",null,e.toDisplayString(e.unref(Z)),1)])):e.createCommentVNode("",!0),e.unref(g)?(e.openBlock(),e.createElementBlock("li",eo,[e.createBaseVNode("span",null,e.toDisplayString(e.unref(n)("event.numberOfDays")),1),e.createBaseVNode("b",null,e.toDisplayString(e.unref(V)),1)])):e.createCommentVNode("",!0),e.unref(g)?(e.openBlock(),e.createElementBlock("li",oo,[e.createBaseVNode("span",null,e.toDisplayString(e.unref(n)("booking.reservation.arrival")),1),e.createBaseVNode("b",null,e.toDisplayString(e.unref(a.showDate)(e.unref(Y))),1)])):e.createCommentVNode("",!0),e.unref(g)?(e.openBlock(),e.createElementBlock("li",no,[e.createBaseVNode("span",null,e.toDisplayString(e.unref(n)("booking.reservation.departure")),1),e.createBaseVNode("b",null,e.toDisplayString(e.unref(a.showDate)(e.unref(Y),e.unref(V))),1)])):e.createCommentVNode("",!0),!e.unref(g)&&e.unref(u)?(e.openBlock(),e.createElementBlock("li",to,[e.createBaseVNode("span",null,e.toDisplayString(e.unref(n)("event.startOfEvent")),1),e.createBaseVNode("b",null,e.toDisplayString(e.unref(a.showTime)(e.unref(u))),1)])):e.createCommentVNode("",!0),!e.unref(g)&&e.unref(M)?(e.openBlock(),e.createElementBlock("li",lo,[e.createBaseVNode("span",null,e.toDisplayString(e.unref(n)("event.lengthOfEvent")),1),e.createBaseVNode("b",null,e.toDisplayString(e.unref(a.showTime)(e.unref(M))),1)])):e.createCommentVNode("",!0),!e.unref(g)&&e.unref(j)>0?(e.openBlock(),e.createElementBlock("li",ao,[e.createBaseVNode("span",null,e.toDisplayString(e.unref(n)("booking.availability.basePrice")),1),e.createBaseVNode("b",null,e.toDisplayString(e.unref(a.showPrice)(e.unref(j),e.unref(o))),1)])):e.createCommentVNode("",!0)]),expenses:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref($),({roomGroupID:t},c)=>(e.openBlock(),e.createElementBlock("li",{key:t},[e.createBaseVNode("span",null,e.toDisplayString(e.unref(n)("booking.reservation.addons"))+" - "+e.toDisplayString(e.unref(n)("booking.reservation.room"))+" #"+e.toDisplayString(c+1),1),e.createBaseVNode("b",null,e.toDisplayString(e.unref(a.showPrice)(e.unref(J)(t,c),e.unref(o))),1)]))),128))]),_:2},1032,["remark","is-filled","is-loading","currency","base-price","button-icon-color","total-price","weekend-fee","room-upgrade","onPrev","onNext"])):e.createCommentVNode("",!0)]),payment:e.withCtx(()=>[e.createVNode(k.CheckoutWindow)]),confirmation:e.withCtx(()=>[e.createVNode(k.ThankYou,{message:e.unref(n)("event.confirmationMessage"),currency:e.unref(o)},null,8,["message","currency"])]),_:1},8,["slideshow","title","subtitle"])):(e.openBlock(),e.createBlock(e.Loading,{key:1}))]),_:1},8,["access-token"]))}});const io=e._export_sfc(ro,[["__scopeId","data-v-7a0ec33b"]]),so=a.createPinia(),uo=k.zo(),B=e.createApp({components:{Event:io}});B.use(so);B.use(uo);B.use(w.StickyPlugin);B.use(k.VueSnip);B.use(a.instance);B.use(k.xt);B.use(w.install,{bootstrap:!1});B.mount("#fresh-booking-event-app");
2
2
  //# sourceMappingURL=event.cjs.js.map
Binary file