@konnectio/core 4.0.56-rc34 → 4.0.56-rc36

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 (53) hide show
  1. package/dist/{ActionField-BFxssAUy.js → ActionField-Ct6NhfWq.js} +43 -34
  2. package/dist/ActionField-Ct6NhfWq.js.br +0 -0
  3. package/dist/AvailabilitySkeleton-DOhrMVl4.js +286 -0
  4. package/dist/AvailabilitySkeleton-DOhrMVl4.js.br +0 -0
  5. package/dist/{AvailabilitySkeleton.vue_vue_type_style_index_0_scoped_17762b9b_lang-k67k8bxv.js → AvailabilitySkeleton.vue_vue_type_style_index_0_scoped_17762b9b_lang-0yAgK-cr.js} +519 -510
  6. package/dist/AvailabilitySkeleton.vue_vue_type_style_index_0_scoped_17762b9b_lang-0yAgK-cr.js.br +0 -0
  7. package/dist/{CheckoutWindow-bfxMw5rH.js → CheckoutWindow-BVIOQbbL.js} +143 -134
  8. package/dist/CheckoutWindow-BVIOQbbL.js.br +0 -0
  9. package/dist/{ErrorMessage-C2hQu_fk.js → ErrorMessage-DTSuSB8R.js} +27 -18
  10. package/dist/ErrorMessage-DTSuSB8R.js.br +0 -0
  11. package/dist/EventAvailabilityForm-DVcDsdr8.js +432 -0
  12. package/dist/EventAvailabilityForm-DVcDsdr8.js.br +0 -0
  13. package/dist/Field-IsLH1tNU.js +50 -0
  14. package/dist/Field-IsLH1tNU.js.br +0 -0
  15. package/dist/Field.vue_vue_type_style_index_0_scoped_992f78a1_lang-BKo1p702.js +21280 -0
  16. package/dist/Field.vue_vue_type_style_index_0_scoped_992f78a1_lang-BKo1p702.js.br +0 -0
  17. package/dist/TermsOfService-BORqI07-.js +35 -0
  18. package/dist/TermsOfService-BORqI07-.js.br +0 -0
  19. package/dist/_commonjsHelpers-UWZO_9XV.js +11796 -0
  20. package/dist/_commonjsHelpers-UWZO_9XV.js.br +0 -0
  21. package/dist/availability.js +60 -50
  22. package/dist/availability.js.br +0 -0
  23. package/dist/event.js +347 -336
  24. package/dist/event.js.br +0 -0
  25. package/dist/gift-card-validation.js +75 -65
  26. package/dist/gift-card-validation.js.br +0 -0
  27. package/dist/gift-card.js +246 -235
  28. package/dist/gift-card.js.br +0 -0
  29. package/dist/hotel.js +802 -837
  30. package/dist/hotel.js.br +0 -0
  31. package/dist/{masonry.plugin-CPNQhcHy.js → masonry.plugin-gY-oSFpV.js} +659 -610
  32. package/dist/masonry.plugin-gY-oSFpV.js.br +0 -0
  33. package/dist/navigation.js +10 -1
  34. package/dist/polyfill.js +14745 -4715
  35. package/dist/polyfill.js.br +0 -0
  36. package/dist/style.css +1 -1
  37. package/dist/style.css.br +0 -0
  38. package/package.json +10 -8
  39. package/dist/ActionField-BFxssAUy.js.br +0 -0
  40. package/dist/AvailabilitySkeleton-eib112dI.js +0 -277
  41. package/dist/AvailabilitySkeleton-eib112dI.js.br +0 -0
  42. package/dist/AvailabilitySkeleton.vue_vue_type_style_index_0_scoped_17762b9b_lang-k67k8bxv.js.br +0 -0
  43. package/dist/CheckoutWindow-bfxMw5rH.js.br +0 -0
  44. package/dist/ErrorMessage-C2hQu_fk.js.br +0 -0
  45. package/dist/EventAvailabilityForm-BCnO0hic.js +0 -422
  46. package/dist/EventAvailabilityForm-BCnO0hic.js.br +0 -0
  47. package/dist/Field-C9EFQ68f.js +0 -41
  48. package/dist/Field-C9EFQ68f.js.br +0 -0
  49. package/dist/Field.vue_vue_type_style_index_0_scoped_992f78a1_lang-CBts3caI.js +0 -30755
  50. package/dist/Field.vue_vue_type_style_index_0_scoped_992f78a1_lang-CBts3caI.js.br +0 -0
  51. package/dist/TermsOfService-Daoe7BlB.js +0 -26
  52. package/dist/_commonjsHelpers-DaMA6jEr.js +0 -8
  53. package/dist/masonry.plugin-CPNQhcHy.js.br +0 -0
package/dist/gift-card.js CHANGED
@@ -1,14 +1,23 @@
1
- import { H as ue, J as pe, K as le, N as oe, m as V, a6 as T, P as ae, i as k, X as re, R as te, V as me, W as fe, a7 as ve, d as O, u as Y, M as ge, o as d, a as G, w as L, f as l, c as y, e as o, g as e, C as D, b as F, n as ce, I as he, E as be, _ as ie, t as X, q as ye, a8 as ke, a1 as _e, p as Ce, S as Ve, a9 as H, aa as K, F as we, ab as Fe, a2 as P, j as Pe, ac as Se, T as Z, k as Te, v as $e, x as Ee, y as Ue, z as Ae, A as Ie, B as Re, D as Ge, ad as Le, G as Me } from "./Field.vue_vue_type_style_index_0_scoped_992f78a1_lang-CBts3caI.js";
2
- import { C as qe, a as Be, P as xe, _ as ze } from "./CheckoutWindow-bfxMw5rH.js";
3
- import { F as z } from "./Field-C9EFQ68f.js";
4
- import { E as De } from "./ErrorMessage-C2hQu_fk.js";
5
- import { S as Oe } from "./TermsOfService-Daoe7BlB.js";
6
- const ne = ue("giftCard", () => {
7
- const { pay: g } = pe(), { bearerToken: c, metaData: v, currencyId: t } = le(oe()), p = oe(), r = V(T.InitialState), u = ae("konnectio_name", "", void 0, { serializer: te.string }), h = ae("konnectio_email", "", void 0, { serializer: te.string }), i = ae("konnectio_phone", "", void 0, { serializer: te.string }), b = V(""), f = V(1), q = V(!0), S = V(""), a = V({
1
+ import { r as V, g as k, d as O, o as u, a as G, w as R, f as l, c as y, e as o, u as e, b as F, n as ue, t as Y, i as ce, q as pe, h as me, S as fe, v as H, x as K, F as ve, y as ge, s as S, p as be, j as he, k as ye } from "./_commonjsHelpers-UWZO_9XV.js";
2
+ import { j as ke, k as _e, s as le, o as oe, G as T, q as ae, x as re, S as te, v as Ce, w as Ve, F as we, u as Q, n as Fe, C as z, I as Se, E as Pe, _ as ie, H as Te, a as $e, L as Ee, T as Z, b as Ie, e as Ue, f as Ae, g as Le, h as Ge, i as Re, J as qe, m as Me } from "./Field.vue_vue_type_style_index_0_scoped_992f78a1_lang-BKo1p702.js";
3
+ import "./navigation.js";
4
+ import { C as De, a as xe, P as Be, _ as ze } from "./CheckoutWindow-BVIOQbbL.js";
5
+ import { F as B } from "./Field-IsLH1tNU.js";
6
+ import { E as Oe } from "./ErrorMessage-DTSuSB8R.js";
7
+ import { S as je } from "./TermsOfService-BORqI07-.js";
8
+ (function() {
9
+ try {
10
+ var c = typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, n = new Error().stack;
11
+ n && (c._sentryDebugIds = c._sentryDebugIds || {}, c._sentryDebugIds[n] = "db9ff53d-80b7-4a77-92e9-cbdb657dcdcd", c._sentryDebugIdIdentifier = "sentry-dbid-db9ff53d-80b7-4a77-92e9-cbdb657dcdcd");
12
+ } catch {
13
+ }
14
+ })();
15
+ const ne = ke("giftCard", () => {
16
+ const { pay: c } = _e(), { bearerToken: n, metaData: v, currencyId: t } = le(oe()), m = oe(), d = V(T.InitialState), p = ae("konnectio_name", "", void 0, { serializer: te.string }), b = ae("konnectio_email", "", void 0, { serializer: te.string }), s = ae("konnectio_phone", "", void 0, { serializer: te.string }), h = V(""), g = V(1), M = V(!0), P = V(""), a = V({
8
17
  base64: "",
9
18
  type: "",
10
19
  name: ""
11
- }), m = V(void 0), w = V(0), $ = V(!1), _ = V(0), E = k(() => p.metaData.hotels[0]), B = k(() => E.value.termsOfService ? E.value.termsOfService : ""), U = k(() => r.value === T.InitialState || r.value === T.WaitingForResponse), Q = k(() => r.value === T.ReadyToPay), N = k(() => r.value === T.PaymentSuccess), x = k(() => {
20
+ }), f = V(void 0), w = V(0), $ = V(!1), _ = V(0), E = k(() => m.metaData.hotels[0]), D = k(() => E.value.termsOfService ? E.value.termsOfService : ""), I = k(() => d.value === T.InitialState || d.value === T.WaitingForResponse), X = k(() => d.value === T.ReadyToPay), j = k(() => d.value === T.PaymentSuccess), x = k(() => {
12
21
  const C = {
13
22
  1: {
14
23
  label: re.t("giftCard.hotelType"),
@@ -18,50 +27,50 @@ const ne = ue("giftCard", () => {
18
27
  label: re.t("giftCard.restaurantType"),
19
28
  data: []
20
29
  }
21
- }, M = v.value.hotels[0].places;
22
- return M && M.forEach((I) => {
23
- C[I.placeType].data.push(I);
30
+ }, q = v.value.hotels[0].places;
31
+ return q && q.forEach((L) => {
32
+ C[L.placeType].data.push(L);
24
33
  }), Object.fromEntries(
25
- Object.entries(C).filter(([, I]) => I.data.length > 0)
34
+ Object.entries(C).filter(([, L]) => L.data.length > 0)
26
35
  );
27
- }), W = k(() => _.value !== 0), A = k(() => {
36
+ }), N = k(() => _.value !== 0), U = k(() => {
28
37
  let C;
29
- if (W.value)
38
+ if (N.value)
30
39
  C = x.value[_.value].data[0];
31
40
  else if (w.value !== 0) {
32
- const M = m.value, I = x.value[w.value].data;
33
- I.length === 1 ? C = I[0] : M !== void 0 && I.forEach((se) => {
34
- String(se.id) === String(M) && (C = se);
41
+ const q = f.value, L = x.value[w.value].data;
42
+ L.length === 1 ? C = L[0] : q !== void 0 && L.forEach((se) => {
43
+ String(se.id) === String(q) && (C = se);
35
44
  });
36
45
  }
37
46
  return C;
38
- }), R = k(() => !(!u.value || !h.value || !(i.value.length >= 5) || !b.value || A.value === void 0)), s = k(() => !(r.value === T.InitialState && $.value)), n = k(() => !!(r.value === T.WaitingForResponse && $.value));
39
- async function j() {
40
- r.value = T.WaitingForResponse, $.value = !0, await me.post("https://production.hotel-service.konnectio.dk/api/gift-card/create", {
47
+ }), A = k(() => !(!p.value || !b.value || !(s.value.length >= 5) || !h.value || U.value === void 0)), r = k(() => !(d.value === T.InitialState && $.value)), i = k(() => !!(d.value === T.WaitingForResponse && $.value));
48
+ async function W() {
49
+ d.value = T.WaitingForResponse, $.value = !0, await Ce.post("https://production.hotel-service.konnectio.dk/api/gift-card/create", {
41
50
  termsOfserviceURL: window.location.origin,
42
51
  checkoutUrl: window.location.origin,
43
52
  currencyID: t.value,
44
- language: fe(),
45
- amount: b.value,
46
- quantity: f.value,
47
- freeText: S.value,
48
- showPrice: q.value,
49
- contactName: u.value,
50
- contactEmail: h.value,
51
- contactPhone: i.value,
52
- imageBase64: ve(a.value.base64),
53
+ language: Ve(),
54
+ amount: h.value,
55
+ quantity: g.value,
56
+ freeText: P.value,
57
+ showPrice: M.value,
58
+ contactName: p.value,
59
+ contactEmail: b.value,
60
+ contactPhone: s.value,
61
+ imageBase64: we(a.value.base64),
53
62
  imageName: a.value.name,
54
63
  imageFormat: a.value.type,
55
- placeType: A.value ? A.value.placeType : void 0,
56
- placeID: A.value ? A.value.id : void 0
64
+ placeType: U.value ? U.value.placeType : void 0,
65
+ placeID: U.value ? U.value.id : void 0
57
66
  }, {
58
67
  headers: {
59
- Authorization: c.value,
68
+ Authorization: n.value,
60
69
  Accept: "application/json",
61
- "Fresh-Booking-Ver": "4.0.56-rc34"
70
+ "Fresh-Booking-Ver": "4.0.56-rc36"
62
71
  }
63
72
  }).then((C) => {
64
- r.value = T.ReadyToPay, $.value = !1, g({
73
+ d.value = T.ReadyToPay, $.value = !1, c({
65
74
  callback: () => console.log("Callback!"),
66
75
  response: C.data
67
76
  });
@@ -71,31 +80,31 @@ const ne = ue("giftCard", () => {
71
80
  C && (_.value = C);
72
81
  }
73
82
  return {
74
- selectedPlace: A,
75
- moduleState: r,
76
- name: u,
77
- email: h,
78
- phone: i,
79
- value: b,
80
- remark: S,
81
- showValue: q,
82
- quantity: f,
83
+ selectedPlace: U,
84
+ moduleState: d,
85
+ name: p,
86
+ email: b,
87
+ phone: s,
88
+ value: h,
89
+ remark: P,
90
+ showValue: M,
91
+ quantity: g,
83
92
  media: a,
84
- placeId: m,
93
+ placeId: f,
85
94
  placeType: w,
86
- showFormPage: U,
87
- showPaymentPage: Q,
88
- showConfirmationPage: N,
95
+ showFormPage: I,
96
+ showPaymentPage: X,
97
+ showConfirmationPage: j,
89
98
  places: x,
90
- hasFilledForm: R,
91
- hasForcedPlaceType: W,
92
- isWaitingForResponse: n,
93
- isMetaDataAvailable: s,
94
- termsOfService: B,
95
- orderGiftCard: j,
99
+ hasFilledForm: A,
100
+ hasForcedPlaceType: N,
101
+ isWaitingForResponse: i,
102
+ isMetaDataAvailable: r,
103
+ termsOfService: D,
104
+ orderGiftCard: W,
96
105
  initialize: ee
97
106
  };
98
- }), Ne = { class: "media-selector" }, We = ["accept"], je = { class: "media-selector-wrapper" }, He = { class: "media-selector-tools" }, Ke = { key: 0 }, Ze = { key: 1 }, Je = { key: 2 }, Xe = ["src"], Ye = /* @__PURE__ */ O({
107
+ }), Ne = { class: "media-selector" }, We = ["accept"], He = { class: "media-selector-wrapper" }, Ke = { class: "media-selector-tools" }, Ze = { key: 0 }, Je = { key: 1 }, Ye = { key: 2 }, Qe = ["src"], Xe = /* @__PURE__ */ O({
99
108
  __name: "MediaSelector",
100
109
  props: {
101
110
  modelValue: {},
@@ -105,94 +114,94 @@ const ne = ue("giftCard", () => {
105
114
  required: { type: Boolean, default: !1 }
106
115
  },
107
116
  emits: ["update:modelValue"],
108
- setup(g, { emit: c }) {
109
- const v = c, t = g, { t: p } = Y(), { display: r } = ge(), u = V(), h = k(() => t.modelValue.base64 !== "");
110
- function i(a) {
117
+ setup(c, { emit: n }) {
118
+ const v = n, t = c, { t: m } = Q(), { display: d } = Fe(), p = V(), b = k(() => t.modelValue.base64 !== "");
119
+ function s(a) {
111
120
  v("update:modelValue", a);
112
121
  }
113
- function b() {
114
- i({
122
+ function h() {
123
+ s({
115
124
  base64: "",
116
125
  name: "",
117
126
  type: ""
118
- }), u.value && (u.value.value = "");
127
+ }), p.value && (p.value.value = "");
119
128
  }
120
- function f() {
121
- u.value && u.value.click();
129
+ function g() {
130
+ p.value && p.value.click();
122
131
  }
123
- function q(a, m) {
132
+ function M(a, f) {
124
133
  const [w, $] = [a.name, a.type], _ = new FileReader();
125
134
  _.onload = function(E) {
126
135
  if (E.target) {
127
- const B = E.target.result;
128
- m({ base64: B, name: w, type: $ });
136
+ const D = E.target.result;
137
+ f({ base64: D, name: w, type: $ });
129
138
  } else
130
- r({
131
- message: p("imageUploadError"),
139
+ d({
140
+ message: m("imageUploadError"),
132
141
  type: "error"
133
142
  });
134
143
  }, _.readAsDataURL(a);
135
144
  }
136
- async function S() {
145
+ async function P() {
137
146
  let a;
138
- (a = u.value.files) instanceof FileList && q(a[0], i);
147
+ (a = p.value.files) instanceof FileList && M(a[0], s);
139
148
  }
140
- return (a, m) => (d(), G(he, {
149
+ return (a, f) => (u(), G(Se, {
141
150
  label: a.label,
142
151
  required: a.required,
143
152
  type: "media"
144
153
  }, {
145
- default: L(() => [
154
+ default: R(() => [
146
155
  l("div", Ne, [
147
156
  l("input", {
148
157
  ref_key: "fileInput",
149
- ref: u,
158
+ ref: p,
150
159
  type: "file",
151
160
  class: "hidden",
152
161
  accept: a.validation,
153
162
  single: "",
154
- onChange: m[0] || (m[0] = (w) => S())
163
+ onChange: f[0] || (f[0] = (w) => P())
155
164
  }, null, 40, We),
156
- l("div", je, [
157
- l("ul", He, [
158
- h.value ? F("", !0) : (d(), y("li", Ke, [
159
- o(D, {
160
- label: e(p)("uploadFile"),
165
+ l("div", He, [
166
+ l("ul", Ke, [
167
+ b.value ? F("", !0) : (u(), y("li", Ze, [
168
+ o(z, {
169
+ label: e(m)("uploadFile"),
161
170
  type: "button",
162
171
  icon: "upload",
163
172
  "icon-color": a.iconColor,
164
- onClickEvent: m[1] || (m[1] = (w) => f())
173
+ onClickEvent: f[1] || (f[1] = (w) => g())
165
174
  }, null, 8, ["label", "icon-color"])
166
175
  ])),
167
- h.value ? (d(), y("li", Ze, [
168
- o(D, {
169
- label: e(p)("replaceFile"),
176
+ b.value ? (u(), y("li", Je, [
177
+ o(z, {
178
+ label: e(m)("replaceFile"),
170
179
  type: "button",
171
180
  icon: "repeat-alt",
172
181
  "icon-color": a.iconColor,
173
- onClickEvent: m[2] || (m[2] = (w) => f())
182
+ onClickEvent: f[2] || (f[2] = (w) => g())
174
183
  }, null, 8, ["label", "icon-color"])
175
184
  ])) : F("", !0),
176
- h.value ? (d(), y("li", Je, [
177
- o(D, {
178
- label: e(p)("removeFile"),
185
+ b.value ? (u(), y("li", Ye, [
186
+ o(z, {
187
+ label: e(m)("removeFile"),
179
188
  type: "button",
180
189
  icon: "trash-alt",
181
190
  "icon-color": a.iconColor,
182
- onClickEvent: m[3] || (m[3] = (w) => b())
191
+ onClickEvent: f[3] || (f[3] = (w) => h())
183
192
  }, null, 8, ["label", "icon-color"])
184
193
  ])) : F("", !0)
185
194
  ]),
186
195
  l("div", {
187
- class: ce([
196
+ class: ue([
188
197
  "media-selector-previewer",
189
- { opened: h.value }
198
+ { opened: b.value }
190
199
  ])
191
200
  }, [
192
- a.modelValue ? (d(), y("img", {
201
+ a.modelValue ? (u(), y("img", {
193
202
  key: 0,
194
203
  src: a.modelValue.base64
195
- }, null, 8, Xe)) : F("", !0)
204
+ }, null, 8, Qe)) : F("", !0)
196
205
  ], 2)
197
206
  ])
198
207
  ])
@@ -201,9 +210,9 @@ const ne = ue("giftCard", () => {
201
210
  }, 8, ["label", "required"]));
202
211
  }
203
212
  });
204
- function de(g) {
205
- const c = g;
206
- c.__i18n = c.__i18n || [], c.__i18n.push({
213
+ function de(c) {
214
+ const n = c;
215
+ n.__i18n = n.__i18n || [], n.__i18n.push({
207
216
  locale: "",
208
217
  resource: {
209
218
  da: {
@@ -221,83 +230,80 @@ function de(g) {
221
230
  }
222
231
  });
223
232
  }
224
- typeof de == "function" && de(Ye);
225
- const Qe = { class: "gift-card-skeleton" }, ea = { class: "gift-card-skeleton-form" }, aa = /* @__PURE__ */ O({
233
+ typeof de == "function" && de(Xe);
234
+ const ea = { class: "gift-card-skeleton" }, aa = { class: "gift-card-skeleton-form" }, ta = /* @__PURE__ */ O({
226
235
  __name: "GiftCardSkeleton",
227
- setup(g) {
228
- return (c, v) => (d(), y("div", Qe, [
229
- l("div", ea, [
230
- o(z),
231
- o(z),
232
- o(z),
233
- o(z),
234
- o(z, { "is-text-area": "" }),
235
- o(be, { height: "44px" })
236
+ setup(c) {
237
+ return (n, v) => (u(), y("div", ea, [
238
+ l("div", aa, [
239
+ o(B),
240
+ o(B),
241
+ o(B),
242
+ o(B),
243
+ o(B, { "is-text-area": "" }),
244
+ o(Pe, { height: "44px" })
236
245
  ])
237
246
  ]));
238
247
  }
239
- }), ta = /* @__PURE__ */ ie(aa, [["__scopeId", "data-v-ba3efaa1"]]), la = { class: "konnectio-accept-terms" }, oa = /* @__PURE__ */ O({
248
+ }), la = /* @__PURE__ */ ie(ta, [["__scopeId", "data-v-ba3efaa1"]]), oa = { class: "konnectio-accept-terms" }, na = /* @__PURE__ */ O({
240
249
  __name: "_",
241
250
  props: {
242
251
  content: {},
243
252
  buttonLabel: {}
244
253
  },
245
- setup(g) {
246
- const { t: c } = Y(), v = V(!1);
247
- return (t, p) => (d(), y("div", la, [
248
- o(e(ke), {
254
+ setup(c) {
255
+ const { t: n } = Q(), v = V(!1);
256
+ return (t, m) => (u(), y("div", oa, [
257
+ o(e(Te), {
249
258
  keypath: "general.termsAndConditionsNotice",
250
259
  tag: "span",
251
260
  scope: "global"
252
261
  }, {
253
- button: L(() => [
254
- l("i", null, '"' + X(t.buttonLabel) + '"', 1)
262
+ button: R(() => [
263
+ l("i", null, '"' + Y(t.buttonLabel) + '"', 1)
255
264
  ]),
256
- terms: L(() => [
265
+ terms: R(() => [
257
266
  l("a", {
258
267
  class: "konnectio-accept-terms-link",
259
268
  target: "_blank",
260
- onClick: p[0] || (p[0] = ye((r) => v.value = !0, ["prevent"]))
269
+ onClick: m[0] || (m[0] = ce((d) => v.value = !0, ["prevent"]))
261
270
  }, [
262
- l("span", null, X(e(c)("general.termsAndConditions")), 1)
271
+ l("span", null, Y(e(n)("general.termsAndConditions")), 1)
263
272
  ])
264
273
  ]),
265
274
  _: 1
266
275
  }),
267
- o(Oe, {
276
+ o(je, {
268
277
  modelValue: v.value,
269
- "onUpdate:modelValue": p[1] || (p[1] = (r) => v.value = r),
278
+ "onUpdate:modelValue": m[1] || (m[1] = (d) => v.value = d),
270
279
  description: t.content
271
280
  }, null, 8, ["modelValue", "description"])
272
281
  ]));
273
282
  }
274
- }), na = /* @__PURE__ */ ie(oa, [["__scopeId", "data-v-c9c826cf"]]), ia = /* @__PURE__ */ O({
283
+ }), ia = /* @__PURE__ */ ie(na, [["__scopeId", "data-v-c9c826cf"]]), sa = /* @__PURE__ */ O({
275
284
  __name: "GiftCard",
276
- setup(g) {
277
- const { t: c } = Y(), v = ne();
278
- return (t, p) => (d(), G(na, {
285
+ setup(c) {
286
+ const { t: n } = Q(), v = ne();
287
+ return (t, m) => (u(), G(ia, {
279
288
  content: e(v).termsOfService,
280
- "button-label": e(c)("giftCard.orderGiftCard")
289
+ "button-label": e(n)("giftCard.orderGiftCard")
281
290
  }, null, 8, ["content", "button-label"]));
282
291
  }
283
- }), sa = (g) => (Ue("data-v-1dbfbbf9"), g = g(), Ae(), g), ra = {
284
- key: 0,
285
- id: "konnectio-gift-card-module"
286
- }, da = { id: "konnectio-gift-card-wrapper" }, ca = { id: "konnectio-gift-card-title" }, ua = { id: "konnectio-gift-card-content" }, pa = { id: "konnectio-gift-card-payment" }, ma = ["innerHTML"], fa = { key: 0 }, va = {
292
+ }), ra = (c) => (be("data-v-e576b856"), c = c(), he(), c), da = ["data-layout"], ua = { id: "konnectio-gift-card-wrapper" }, ca = { id: "konnectio-gift-card-title" }, pa = { id: "konnectio-gift-card-content" }, ma = { id: "konnectio-gift-card-payment" }, fa = ["innerHTML"], va = { key: 0 }, ga = {
287
293
  key: 0,
288
294
  id: "fresh-booking-select-place-type"
289
- }, ga = {
290
- class: /* @__PURE__ */ ce(["fresh-booking-label", "required"])
291
- }, ha = { id: "fresh-booking-select-place-type-input" }, ba = ["innerHTML"], ya = {
295
+ }, ba = {
296
+ class: /* @__PURE__ */ ue(["fresh-booking-label", "required"])
297
+ }, ha = { id: "fresh-booking-select-place-type-input" }, ya = ["innerHTML"], ka = {
292
298
  key: 0,
293
299
  id: "konnectio-gift-card-order"
294
- }, ka = { class: "fresh-booking-panel" }, _a = {
300
+ }, _a = { class: "fresh-booking-panel" }, Ca = {
295
301
  key: 1,
296
302
  id: "konnectio-gift-card-remarks"
297
- }, Ca = {
303
+ }, Va = {
298
304
  key: 2,
299
305
  id: "konnectio-gift-card-order-minimal"
300
- }, Va = /* @__PURE__ */ sa(() => /* @__PURE__ */ l("div", { class: "konnectio-divider" }, null, -1)), wa = { id: "konnectio-gift-card-recaptcha" }, Fa = /* @__PURE__ */ O({
306
+ }, wa = /* @__PURE__ */ ra(() => /* @__PURE__ */ l("div", { class: "konnectio-divider" }, null, -1)), Fa = { id: "konnectio-gift-card-recaptcha" }, Sa = /* @__PURE__ */ O({
301
307
  name: "GiftCardLayout",
302
308
  __name: "GiftCard",
303
309
  props: {
@@ -306,56 +312,60 @@ const Qe = { class: "gift-card-skeleton" }, ea = { class: "gift-card-skeleton-fo
306
312
  placeType: {},
307
313
  styling: {}
308
314
  },
309
- setup(g) {
310
- const c = g, v = k(() => ({
315
+ setup(c) {
316
+ const n = c, v = k(() => ({
311
317
  panelMaxWidth: "800px",
312
- ...c.styling
313
- })), { t } = Y(), {
314
- name: p,
315
- email: r,
316
- phone: u,
317
- value: h,
318
- remark: i,
319
- showValue: b,
320
- quantity: f,
321
- media: q,
322
- placeId: S,
318
+ ...n.styling
319
+ })), { t } = Q(), {
320
+ name: m,
321
+ email: d,
322
+ phone: p,
323
+ value: b,
324
+ remark: s,
325
+ showValue: h,
326
+ quantity: g,
327
+ media: M,
328
+ placeId: P,
323
329
  placeType: a,
324
- showFormPage: m,
330
+ showFormPage: f,
325
331
  showPaymentPage: w,
326
332
  showConfirmationPage: $,
327
333
  places: _,
328
334
  hasFilledForm: E,
329
- hasForcedPlaceType: B,
330
- isWaitingForResponse: U
331
- } = le(ne()), { initialize: Q, orderGiftCard: N } = ne(), { isRecaptchaEnabled: x, currency: W, hasError: A } = le(oe());
332
- return _e(a, () => {
333
- S.value = void 0;
334
- }), Ce(() => {
335
- const R = c.placeType ? parseInt(c.placeType) : void 0;
336
- Q(R);
337
- }), (R, s) => (d(), G(Ee, { styling: v.value }, {
338
- default: L(() => [
339
- (d(), G(Ve, null, {
340
- default: L(() => [
341
- o($e, {
335
+ hasForcedPlaceType: D,
336
+ isWaitingForResponse: I
337
+ } = le(ne()), { initialize: X, orderGiftCard: j } = ne(), { isRecaptchaEnabled: x, currency: N, hasError: U } = le(oe());
338
+ return pe(a, () => {
339
+ P.value = void 0;
340
+ }), me(() => {
341
+ const A = n.placeType ? parseInt(n.placeType) : void 0;
342
+ X(A);
343
+ }), (A, r) => (u(), G(Ae, { styling: v.value }, {
344
+ default: R(() => [
345
+ (u(), G(fe, null, {
346
+ default: R(() => [
347
+ o(Ue, {
342
348
  type: "gift-card",
343
- "access-token": R.accessToken,
344
- "data-layout": R.layout
349
+ "access-token": A.accessToken,
350
+ "data-layout": A.layout
345
351
  }, {
346
- default: L(() => [
347
- e(A) ? (d(), G(De, {
352
+ default: R(() => [
353
+ e(U) ? (u(), G(Oe, {
348
354
  key: 1,
349
355
  title: "Unable to render Gift card module",
350
356
  description: "Gift card functionality hasn't been setup for this account. Please contact Octopus PMS for support."
351
- })) : (d(), y("div", ra, [
352
- l("div", da, [
357
+ })) : (u(), y("div", {
358
+ key: 0,
359
+ id: "konnectio-gift-card-module",
360
+ "data-layout": A.layout
361
+ }, [
362
+ l("div", ua, [
353
363
  l("h2", ca, [
354
- l("span", null, X(e(t)("giftCard.title")), 1)
364
+ l("span", null, Y(e(t)("giftCard.title")), 1)
355
365
  ]),
356
- l("div", ua, [
357
- H(l("div", pa, [
358
- o(qe)
366
+ l("div", pa, [
367
+ H(l("div", ma, [
368
+ o(De)
359
369
  ], 512), [
360
370
  [K, e(w)]
361
371
  ]),
@@ -363,30 +373,30 @@ const Qe = { class: "gift-card-skeleton" }, ea = { class: "gift-card-skeleton-fo
363
373
  l("p", {
364
374
  id: "konnectio-gift-card-description",
365
375
  innerHTML: e(t)("giftCard.description")
366
- }, null, 8, ma),
376
+ }, null, 8, fa),
367
377
  l("form", null, [
368
- e(B) ? F("", !0) : (d(), y("div", fa, [
369
- e(_) ? (d(), y("div", va, [
370
- l("label", ga, [
371
- l("span", null, X(e(t)("giftCard.selectType")), 1)
378
+ e(D) ? F("", !0) : (u(), y("div", va, [
379
+ e(_) ? (u(), y("div", ga, [
380
+ l("label", ba, [
381
+ l("span", null, Y(e(t)("giftCard.selectType")), 1)
372
382
  ]),
373
383
  l("div", ha, [
374
384
  l("ul", null, [
375
- (d(!0), y(we, null, Fe(e(_), (n, j) => (d(), y("li", { key: j }, [
376
- o(Be, {
385
+ (u(!0), y(ve, null, ge(e(_), (i, W) => (u(), y("li", { key: W }, [
386
+ o(xe, {
377
387
  modelValue: e(a),
378
- "onUpdate:modelValue": s[0] || (s[0] = (ee) => P(a) ? a.value = ee : null),
388
+ "onUpdate:modelValue": r[0] || (r[0] = (ee) => S(a) ? a.value = ee : null),
379
389
  type: "radio",
380
390
  name: "placeType",
381
- val: j,
382
- label: n.label
391
+ val: W,
392
+ label: i.label
383
393
  }, null, 8, ["modelValue", "val", "label"])
384
394
  ]))), 128))
385
395
  ]),
386
- e(_)[e(a)] && e(_)[e(a)].data.length > 1 ? (d(), G(Pe, {
396
+ e(_)[e(a)] && e(_)[e(a)].data.length > 1 ? (u(), G($e, {
387
397
  key: 0,
388
- modelValue: e(S),
389
- "onUpdate:modelValue": s[1] || (s[1] = (n) => P(S) ? S.value = n : null),
398
+ modelValue: e(P),
399
+ "onUpdate:modelValue": r[1] || (r[1] = (i) => S(P) ? P.value = i : null),
390
400
  placeholder: e(t)("giftCard.selectPlacePlaceholder"),
391
401
  options: e(_)[e(a)].data,
392
402
  labelKey: "name",
@@ -394,11 +404,11 @@ const Qe = { class: "gift-card-skeleton" }, ea = { class: "gift-card-skeleton-fo
394
404
  required: ""
395
405
  }, null, 8, ["modelValue", "placeholder", "options"])) : F("", !0)
396
406
  ])
397
- ])) : (d(), G(Se, { key: 1 }))
407
+ ])) : (u(), G(Ee, { key: 1 }))
398
408
  ])),
399
409
  o(Z, {
400
- modelValue: e(p),
401
- "onUpdate:modelValue": s[2] || (s[2] = (n) => P(p) ? p.value = n : null),
410
+ modelValue: e(m),
411
+ "onUpdate:modelValue": r[2] || (r[2] = (i) => S(m) ? m.value = i : null),
402
412
  type: "text",
403
413
  name: "name",
404
414
  autocomplete: "name",
@@ -408,8 +418,8 @@ const Qe = { class: "gift-card-skeleton" }, ea = { class: "gift-card-skeleton-fo
408
418
  required: ""
409
419
  }, null, 8, ["modelValue", "label", "placeholder"]),
410
420
  o(Z, {
411
- modelValue: e(r),
412
- "onUpdate:modelValue": s[3] || (s[3] = (n) => P(r) ? r.value = n : null),
421
+ modelValue: e(d),
422
+ "onUpdate:modelValue": r[3] || (r[3] = (i) => S(d) ? d.value = i : null),
413
423
  type: "email",
414
424
  name: "email",
415
425
  autocomplete: "email",
@@ -418,62 +428,62 @@ const Qe = { class: "gift-card-skeleton" }, ea = { class: "gift-card-skeleton-fo
418
428
  placeholder: e(t)("giftCard.emailPlaceholder"),
419
429
  required: ""
420
430
  }, null, 8, ["modelValue", "label", "placeholder"]),
421
- o(xe, {
422
- modelValue: e(u),
423
- "onUpdate:modelValue": s[4] || (s[4] = (n) => P(u) ? u.value = n : null),
431
+ o(Be, {
432
+ modelValue: e(p),
433
+ "onUpdate:modelValue": r[4] || (r[4] = (i) => S(p) ? p.value = i : null),
424
434
  icon: "phone-office",
425
435
  label: e(t)("giftCard.phone"),
426
436
  placeholder: e(t)("giftCard.phonePlaceholder"),
427
437
  required: ""
428
438
  }, null, 8, ["modelValue", "label", "placeholder"]),
429
439
  o(Z, {
430
- modelValue: e(h),
431
- "onUpdate:modelValue": s[5] || (s[5] = (n) => P(h) ? h.value = n : null),
440
+ modelValue: e(b),
441
+ "onUpdate:modelValue": r[5] || (r[5] = (i) => S(b) ? b.value = i : null),
432
442
  type: "number",
433
443
  name: "value",
434
444
  label: e(t)("giftCard.value"),
435
445
  icon: "money-bill",
436
446
  placeholder: e(t)("giftCard.valuePlaceholder"),
437
- suffix: e(W),
447
+ suffix: e(N),
438
448
  required: ""
439
449
  }, null, 8, ["modelValue", "label", "placeholder", "suffix"]),
440
450
  F("", !0),
441
451
  F("", !0),
442
- o(Te, {
443
- modelValue: e(f),
444
- "onUpdate:modelValue": s[8] || (s[8] = (n) => P(f) ? f.value = n : null),
452
+ o(Ie, {
453
+ modelValue: e(g),
454
+ "onUpdate:modelValue": r[8] || (r[8] = (i) => S(g) ? g.value = i : null),
445
455
  label: e(t)("giftCard.quantity"),
446
456
  icon: "gift-card",
447
457
  required: ""
448
458
  }, null, 8, ["modelValue", "label"])
449
459
  ])
450
460
  ], 512), [
451
- [K, e(m)]
461
+ [K, e(f)]
452
462
  ]),
453
463
  H(l("div", null, [
454
464
  l("div", {
455
465
  innerHTML: e(t)("giftCard.thankYou")
456
- }, null, 8, ba)
466
+ }, null, 8, ya)
457
467
  ], 512), [
458
468
  [K, e($)]
459
469
  ])
460
470
  ]),
461
- R.layout !== "minimal" && e(m) ? (d(), y("div", ya, [
462
- l("div", ka, [
463
- o(D, {
471
+ A.layout !== "minimal" && e(f) ? (u(), y("div", ka, [
472
+ l("div", _a, [
473
+ o(z, {
464
474
  label: e(t)("giftCard.orderGiftCard"),
465
475
  "full-width": !0,
466
476
  disabled: !e(E),
467
- "is-loading": e(U),
468
- "onUpdate:isLoading": s[9] || (s[9] = (n) => P(U) ? U.value = n : null),
469
- onClickEvent: e(N)
477
+ "is-loading": e(I),
478
+ "onUpdate:isLoading": r[9] || (r[9] = (i) => S(I) ? I.value = i : null),
479
+ onClickEvent: e(j)
470
480
  }, null, 8, ["label", "disabled", "is-loading", "onClickEvent"])
471
481
  ])
472
482
  ])) : F("", !0),
473
- e(m) ? (d(), y("div", _a, [
483
+ e(f) ? (u(), y("div", Ca, [
474
484
  o(Z, {
475
- modelValue: e(i),
476
- "onUpdate:modelValue": s[10] || (s[10] = (n) => P(i) ? i.value = n : null),
485
+ modelValue: e(s),
486
+ "onUpdate:modelValue": r[10] || (r[10] = (i) => S(s) ? s.value = i : null),
477
487
  type: "textarea",
478
488
  name: "remark",
479
489
  label: e(t)("giftCard.remark"),
@@ -481,34 +491,34 @@ const Qe = { class: "gift-card-skeleton" }, ea = { class: "gift-card-skeleton-fo
481
491
  placeholder: e(t)("giftCard.remarkPlaceholder")
482
492
  }, null, 8, ["modelValue", "label", "placeholder"])
483
493
  ])) : F("", !0),
484
- e(m) ? (d(), y("div", Ca, [
485
- o(D, {
494
+ e(f) ? (u(), y("div", Va, [
495
+ o(z, {
486
496
  label: e(t)("giftCard.orderGiftCard"),
487
497
  "full-width": !0,
488
498
  disabled: !e(E),
489
499
  "data-test": "orderGiftCard",
490
- "is-loading": e(U),
491
- "onUpdate:isLoading": s[11] || (s[11] = (n) => P(U) ? U.value = n : null),
492
- onClickEvent: e(N)
500
+ "is-loading": e(I),
501
+ "onUpdate:isLoading": r[11] || (r[11] = (i) => S(I) ? I.value = i : null),
502
+ onClickEvent: e(j)
493
503
  }, null, 8, ["label", "disabled", "is-loading", "onClickEvent"]),
494
504
  l("div", null, [
495
- Va,
496
- o(ia)
505
+ wa,
506
+ o(sa)
497
507
  ]),
498
- H(l("div", wa, [
508
+ H(l("div", Fa, [
499
509
  o(ze)
500
510
  ], 512), [
501
511
  [K, e(x)]
502
512
  ])
503
513
  ])) : F("", !0)
504
514
  ])
505
- ]))
515
+ ], 8, da))
506
516
  ]),
507
517
  _: 1
508
518
  }, 8, ["access-token", "data-layout"])
509
519
  ]),
510
- fallback: L(() => [
511
- o(ta)
520
+ fallback: R(() => [
521
+ o(la)
512
522
  ]),
513
523
  _: 1
514
524
  }))
@@ -516,8 +526,8 @@ const Qe = { class: "gift-card-skeleton" }, ea = { class: "gift-card-skeleton-fo
516
526
  _: 1
517
527
  }, 8, ["styling"]));
518
528
  }
519
- }), J = /* @__PURE__ */ ie(Fa, [["__scopeId", "data-v-1dbfbbf9"]]), Pa = Ie(), Sa = Me();
520
- class Ta extends HTMLElement {
529
+ }), J = /* @__PURE__ */ ie(Sa, [["__scopeId", "data-v-e576b856"]]), Pa = Le(), Ta = Me();
530
+ class $a extends HTMLElement {
521
531
  vueApp;
522
532
  constructor() {
523
533
  super();
@@ -526,25 +536,26 @@ class Ta extends HTMLElement {
526
536
  this.vueApp.unmount();
527
537
  }
528
538
  connectedCallback() {
529
- const c = typeof J == "function" ? J.options : J;
530
- let v = Array.isArray(c.props) ? c.props : Object.keys(c.props || {});
531
- const t = (i) => i.replace(/[A-Z]+(?![a-z])|[A-Z]/g, (b, f) => (f ? "-" : "") + b.toLowerCase()), p = (i) => i.replace(/-./g, (b) => b[1].toUpperCase()), r = {};
539
+ const n = typeof J == "function" ? J.options : J;
540
+ let v = Array.isArray(n.props) ? n.props : Object.keys(n.props || {});
541
+ const t = (s) => s.replace(/[A-Z]+(?![a-z])|[A-Z]/g, (h, g) => (g ? "-" : "") + h.toLowerCase()), m = (s) => s.replace(/-./g, (h) => h[1].toUpperCase()), d = {};
532
542
  v = v.map(t);
533
- const u = {};
534
- for (const i of this.attributes) {
535
- const f = i.name.split(".");
536
- f.length > 1 && (u[f[0]] || (u[f[0]] = {}), u[f[0]][p(f[1])] = i.value);
543
+ const p = {};
544
+ for (const s of this.attributes) {
545
+ const g = s.name.split(".");
546
+ g.length > 1 && (p[g[0]] || (p[g[0]] = {}), p[g[0]][m(g[1])] = s.value);
537
547
  }
538
- for (const i of v) {
539
- let b = this.attributes.getNamedItem(i)?.value;
540
- u.hasOwnProperty(i) && (b = u[i]), r[i] = b;
548
+ for (const s of v) {
549
+ let h = this.attributes.getNamedItem(s)?.value;
550
+ p.hasOwnProperty(s) && (h = p[s]), d[s] = h;
541
551
  }
542
- this.vueApp = Re(J, r), this.vueApp.provide("emitter", Sa), this.vueApp.use(Pa), this.vueApp.use(Ge), this.vueApp.use(Le, { bootstrap: !0 });
543
- const h = document.createElement("div");
544
- this.vueApp.mount(h), this.appendChild(h.children[0]);
552
+ this.vueApp = ye(J, d), Ge(this.vueApp), this.vueApp.provide("emitter", Ta), this.vueApp.use(Pa), this.vueApp.use(Re), this.vueApp.use(qe, { bootstrap: !0 });
553
+ const b = document.createElement("div");
554
+ this.vueApp.mount(b), this.appendChild(b.children[0]);
545
555
  }
546
556
  }
547
- window.customElements.define("konnectio-gift-card", Ta);
557
+ window.customElements.define("konnectio-gift-card", $a);
548
558
  export {
549
- Ta as default
559
+ $a as default
550
560
  };
561
+ //# sourceMappingURL=gift-card.js.map