@konnectio/core 4.0.56-rc35 → 4.0.56-rc37

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-Bruv7ZZW.js → ActionField-BhYhC0aQ.js} +43 -34
  2. package/dist/ActionField-BhYhC0aQ.js.br +0 -0
  3. package/dist/AvailabilitySkeleton-CXRs2yLp.js +286 -0
  4. package/dist/AvailabilitySkeleton-CXRs2yLp.js.br +0 -0
  5. package/dist/{AvailabilitySkeleton.vue_vue_type_style_index_0_scoped_17762b9b_lang-Z4h6wyqj.js → AvailabilitySkeleton.vue_vue_type_style_index_0_scoped_17762b9b_lang-BZN97s2s.js} +2687 -2676
  6. package/dist/AvailabilitySkeleton.vue_vue_type_style_index_0_scoped_17762b9b_lang-BZN97s2s.js.br +0 -0
  7. package/dist/{CheckoutWindow-Dn3fiFuv.js → CheckoutWindow-DPJ2GFqg.js} +143 -134
  8. package/dist/CheckoutWindow-DPJ2GFqg.js.br +0 -0
  9. package/dist/{ErrorMessage-VK8egk99.js → ErrorMessage-4DJnsYbI.js} +27 -18
  10. package/dist/ErrorMessage-4DJnsYbI.js.br +0 -0
  11. package/dist/EventAvailabilityForm-rUB2CJ24.js +432 -0
  12. package/dist/EventAvailabilityForm-rUB2CJ24.js.br +0 -0
  13. package/dist/Field-Dr6RF4JV.js +50 -0
  14. package/dist/Field-Dr6RF4JV.js.br +0 -0
  15. package/dist/Field.vue_vue_type_style_index_0_scoped_992f78a1_lang-C8tvgzaO.js +21280 -0
  16. package/dist/Field.vue_vue_type_style_index_0_scoped_992f78a1_lang-C8tvgzaO.js.br +0 -0
  17. package/dist/TermsOfService-B94i1jM5.js +35 -0
  18. package/dist/TermsOfService-B94i1jM5.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 +279 -269
  24. package/dist/event.js.br +0 -0
  25. package/dist/gift-card-validation.js +80 -70
  26. package/dist/gift-card-validation.js.br +0 -0
  27. package/dist/gift-card.js +234 -224
  28. package/dist/gift-card.js.br +0 -0
  29. package/dist/hotel.js +696 -692
  30. package/dist/hotel.js.br +0 -0
  31. package/dist/{masonry.plugin-WFnnzw7L.js → masonry.plugin-DPkIO3nk.js} +58 -49
  32. package/dist/masonry.plugin-DPkIO3nk.js.br +0 -0
  33. package/dist/navigation.js +10 -1
  34. package/dist/polyfill.js +14757 -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 +15 -13
  39. package/dist/ActionField-Bruv7ZZW.js.br +0 -0
  40. package/dist/AvailabilitySkeleton-DxVPZPw3.js +0 -277
  41. package/dist/AvailabilitySkeleton-DxVPZPw3.js.br +0 -0
  42. package/dist/AvailabilitySkeleton.vue_vue_type_style_index_0_scoped_17762b9b_lang-Z4h6wyqj.js.br +0 -0
  43. package/dist/CheckoutWindow-Dn3fiFuv.js.br +0 -0
  44. package/dist/ErrorMessage-VK8egk99.js.br +0 -0
  45. package/dist/EventAvailabilityForm-DbkL5luy.js +0 -422
  46. package/dist/EventAvailabilityForm-DbkL5luy.js.br +0 -0
  47. package/dist/Field-fZ3Q2e9-.js +0 -41
  48. package/dist/Field-fZ3Q2e9-.js.br +0 -0
  49. package/dist/Field.vue_vue_type_style_index_0_scoped_992f78a1_lang-CJgfqs-l.js +0 -30755
  50. package/dist/Field.vue_vue_type_style_index_0_scoped_992f78a1_lang-CJgfqs-l.js.br +0 -0
  51. package/dist/TermsOfService-2g29W45E.js +0 -26
  52. package/dist/_commonjsHelpers-DaMA6jEr.js +0 -8
  53. package/dist/masonry.plugin-WFnnzw7L.js.br +0 -0
package/dist/gift-card.js CHANGED
@@ -1,14 +1,23 @@
1
- import { H as ce, 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 ue, 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-CJgfqs-l.js";
2
- import { C as qe, a as Be, P as xe, _ as ze } from "./CheckoutWindow-Dn3fiFuv.js";
3
- import { F as z } from "./Field-fZ3Q2e9-.js";
4
- import { E as De } from "./ErrorMessage-VK8egk99.js";
5
- import { S as Oe } from "./TermsOfService-2g29W45E.js";
6
- const ne = ce("giftCard", () => {
7
- const { pay: g } = pe(), { bearerToken: u, metaData: v, currencyId: t } = le(oe()), p = oe(), r = V(T.InitialState), c = 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 c, a as G, w as R, f as l, c as y, e as o, u as e, b as F, n as ce, t as Y, i as ue, 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 he, j as be, 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-C8tvgzaO.js";
3
+ import "./navigation.js";
4
+ import { C as De, a as xe, P as Be, _ as ze } from "./CheckoutWindow-DPJ2GFqg.js";
5
+ import { F as B } from "./Field-Dr6RF4JV.js";
6
+ import { E as Oe } from "./ErrorMessage-4DJnsYbI.js";
7
+ import { S as je } from "./TermsOfService-B94i1jM5.js";
8
+ (function() {
9
+ try {
10
+ var u = typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, n = new Error().stack;
11
+ n && (u._sentryDebugIds = u._sentryDebugIds || {}, u._sentryDebugIds[n] = "1c70ec68-57ef-4c52-94a2-f315ae1a2cfd", u._sentryDebugIdIdentifier = "sentry-dbid-1c70ec68-57ef-4c52-94a2-f315ae1a2cfd");
12
+ } catch {
13
+ }
14
+ })();
15
+ const ne = ke("giftCard", () => {
16
+ const { pay: u } = _e(), { bearerToken: n, metaData: v, currencyId: t } = le(oe()), m = oe(), d = V(T.InitialState), p = ae("konnectio_name", "", void 0, { serializer: te.string }), h = ae("konnectio_email", "", void 0, { serializer: te.string }), s = ae("konnectio_phone", "", void 0, { serializer: te.string }), b = 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 = ce("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((R) => {
23
- C[R.placeType].data.push(R);
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(([, R]) => R.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, R = x.value[w.value].data;
33
- R.length === 1 ? C = R[0] : M !== void 0 && R.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
- }), I = k(() => !(!c.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 || !h.value || !(s.value.length >= 5) || !b.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(),
53
+ language: Ve(),
45
54
  amount: b.value,
46
- quantity: f.value,
47
- freeText: S.value,
48
- showPrice: q.value,
49
- contactName: c.value,
55
+ quantity: g.value,
56
+ freeText: P.value,
57
+ showPrice: M.value,
58
+ contactName: p.value,
50
59
  contactEmail: h.value,
51
- contactPhone: i.value,
52
- imageBase64: ve(a.value.base64),
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: u.value,
68
+ Authorization: n.value,
60
69
  Accept: "application/json",
61
- "Fresh-Booking-Ver": "4.0.56-rc35"
70
+ "Fresh-Booking-Ver": "4.0.56-rc37"
62
71
  }
63
72
  }).then((C) => {
64
- r.value = T.ReadyToPay, $.value = !1, g({
73
+ d.value = T.ReadyToPay, $.value = !1, u({
65
74
  callback: () => console.log("Callback!"),
66
75
  response: C.data
67
76
  });
@@ -71,31 +80,31 @@ const ne = ce("giftCard", () => {
71
80
  C && (_.value = C);
72
81
  }
73
82
  return {
74
- selectedPlace: A,
75
- moduleState: r,
76
- name: c,
83
+ selectedPlace: U,
84
+ moduleState: d,
85
+ name: p,
77
86
  email: h,
78
- phone: i,
87
+ phone: s,
79
88
  value: b,
80
- remark: S,
81
- showValue: q,
82
- quantity: f,
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: I,
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 = ce("giftCard", () => {
105
114
  required: { type: Boolean, default: !1 }
106
115
  },
107
116
  emits: ["update:modelValue"],
108
- setup(g, { emit: u }) {
109
- const v = u, t = g, { t: p } = Y(), { display: r } = ge(), c = V(), h = k(() => t.modelValue.base64 !== "");
110
- function i(a) {
117
+ setup(u, { emit: n }) {
118
+ const v = n, t = u, { t: m } = Q(), { display: d } = Fe(), p = V(), h = k(() => t.modelValue.base64 !== "");
119
+ function s(a) {
111
120
  v("update:modelValue", a);
112
121
  }
113
122
  function b() {
114
- i({
123
+ s({
115
124
  base64: "",
116
125
  name: "",
117
126
  type: ""
118
- }), c.value && (c.value.value = "");
127
+ }), p.value && (p.value.value = "");
119
128
  }
120
- function f() {
121
- c.value && c.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 = c.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) => (c(), 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: c,
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
+ h.value ? F("", !0) : (c(), 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
+ h.value ? (c(), 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
+ h.value ? (c(), 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) => b())
183
192
  }, null, 8, ["label", "icon-color"])
184
193
  ])) : F("", !0)
185
194
  ]),
186
195
  l("div", {
187
- class: ue([
196
+ class: ce([
188
197
  "media-selector-previewer",
189
198
  { opened: h.value }
190
199
  ])
191
200
  }, [
192
- a.modelValue ? (d(), y("img", {
201
+ a.modelValue ? (c(), 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 = ce("giftCard", () => {
201
210
  }, 8, ["label", "required"]));
202
211
  }
203
212
  });
204
- function de(g) {
205
- const u = g;
206
- u.__i18n = u.__i18n || [], u.__i18n.push({
213
+ function de(u) {
214
+ const n = u;
215
+ n.__i18n = n.__i18n || [], n.__i18n.push({
207
216
  locale: "",
208
217
  resource: {
209
218
  da: {
@@ -221,80 +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 (u, 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(u) {
237
+ return (n, v) => (c(), 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: u } = Y(), v = V(!1);
247
- return (t, p) => (d(), y("div", la, [
248
- o(e(ke), {
254
+ setup(u) {
255
+ const { t: n } = Q(), v = V(!1);
256
+ return (t, m) => (c(), 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] = ue((d) => v.value = !0, ["prevent"]))
261
270
  }, [
262
- l("span", null, X(e(u)("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: u } = Y(), v = ne();
278
- return (t, p) => (d(), G(na, {
285
+ setup(u) {
286
+ const { t: n } = Q(), v = ne();
287
+ return (t, m) => (c(), G(ia, {
279
288
  content: e(v).termsOfService,
280
- "button-label": e(u)("giftCard.orderGiftCard")
289
+ "button-label": e(n)("giftCard.orderGiftCard")
281
290
  }, null, 8, ["content", "button-label"]));
282
291
  }
283
- }), sa = (g) => (Ue("data-v-571cd69e"), g = g(), Ae(), g), ra = ["data-layout"], da = { id: "konnectio-gift-card-wrapper" }, ua = { id: "konnectio-gift-card-title" }, ca = { id: "konnectio-gift-card-content" }, pa = { id: "konnectio-gift-card-payment" }, ma = ["innerHTML"], fa = { key: 0 }, va = {
292
+ }), ra = (u) => (he("data-v-faae538e"), u = u(), be(), u), da = ["data-layout"], ca = { id: "konnectio-gift-card-wrapper" }, ua = { id: "konnectio-gift-card-title" }, pa = { id: "konnectio-gift-card-content" }, ma = { id: "konnectio-gift-card-payment" }, fa = ["innerHTML"], va = { key: 0 }, ga = {
284
293
  key: 0,
285
- id: "fresh-booking-select-place-type"
286
- }, ga = {
287
- class: /* @__PURE__ */ ue(["fresh-booking-label", "required"])
288
- }, ha = { id: "fresh-booking-select-place-type-input" }, ba = ["innerHTML"], ya = {
294
+ id: "konnectio-select-place-type"
295
+ }, ha = {
296
+ class: /* @__PURE__ */ ce(["konnectio-label", "required"])
297
+ }, ba = { id: "konnectio-select-place-type-input" }, ya = ["innerHTML"], ka = {
289
298
  key: 0,
290
299
  id: "konnectio-gift-card-order"
291
- }, ka = { class: "fresh-booking-panel" }, _a = {
300
+ }, _a = { class: "konnectio-panel" }, Ca = {
292
301
  key: 1,
293
302
  id: "konnectio-gift-card-remarks"
294
- }, Ca = {
303
+ }, Va = {
295
304
  key: 2,
296
305
  id: "konnectio-gift-card-order-minimal"
297
- }, 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({
298
307
  name: "GiftCardLayout",
299
308
  __name: "GiftCard",
300
309
  props: {
@@ -303,60 +312,60 @@ const Qe = { class: "gift-card-skeleton" }, ea = { class: "gift-card-skeleton-fo
303
312
  placeType: {},
304
313
  styling: {}
305
314
  },
306
- setup(g) {
307
- const u = g, v = k(() => ({
315
+ setup(u) {
316
+ const n = u, v = k(() => ({
308
317
  panelMaxWidth: "800px",
309
- ...u.styling
310
- })), { t } = Y(), {
311
- name: p,
312
- email: r,
313
- phone: c,
318
+ ...n.styling
319
+ })), { t } = Q(), {
320
+ name: m,
321
+ email: d,
322
+ phone: p,
314
323
  value: h,
315
- remark: i,
324
+ remark: s,
316
325
  showValue: b,
317
- quantity: f,
318
- media: q,
319
- placeId: S,
326
+ quantity: g,
327
+ media: M,
328
+ placeId: P,
320
329
  placeType: a,
321
- showFormPage: m,
330
+ showFormPage: f,
322
331
  showPaymentPage: w,
323
332
  showConfirmationPage: $,
324
333
  places: _,
325
334
  hasFilledForm: E,
326
- hasForcedPlaceType: B,
327
- isWaitingForResponse: U
328
- } = le(ne()), { initialize: Q, orderGiftCard: N } = ne(), { isRecaptchaEnabled: x, currency: W, hasError: A } = le(oe());
329
- return _e(a, () => {
330
- S.value = void 0;
331
- }), Ce(() => {
332
- const I = u.placeType ? parseInt(u.placeType) : void 0;
333
- Q(I);
334
- }), (I, s) => (d(), G(Ee, { styling: v.value }, {
335
- default: L(() => [
336
- (d(), G(Ve, null, {
337
- default: L(() => [
338
- 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) => (c(), G(Ae, { styling: v.value }, {
344
+ default: R(() => [
345
+ (c(), G(fe, null, {
346
+ default: R(() => [
347
+ o(Ue, {
339
348
  type: "gift-card",
340
- "access-token": I.accessToken,
341
- "data-layout": I.layout
349
+ "access-token": A.accessToken,
350
+ "data-layout": A.layout
342
351
  }, {
343
- default: L(() => [
344
- e(A) ? (d(), G(De, {
352
+ default: R(() => [
353
+ e(U) ? (c(), G(Oe, {
345
354
  key: 1,
346
355
  title: "Unable to render Gift card module",
347
356
  description: "Gift card functionality hasn't been setup for this account. Please contact Octopus PMS for support."
348
- })) : (d(), y("div", {
357
+ })) : (c(), y("div", {
349
358
  key: 0,
350
359
  id: "konnectio-gift-card-module",
351
- "data-layout": I.layout
360
+ "data-layout": A.layout
352
361
  }, [
353
- l("div", da, [
362
+ l("div", ca, [
354
363
  l("h2", ua, [
355
- l("span", null, X(e(t)("giftCard.title")), 1)
364
+ l("span", null, Y(e(t)("giftCard.title")), 1)
356
365
  ]),
357
- l("div", ca, [
358
- H(l("div", pa, [
359
- o(qe)
366
+ l("div", pa, [
367
+ H(l("div", ma, [
368
+ o(De)
360
369
  ], 512), [
361
370
  [K, e(w)]
362
371
  ]),
@@ -364,30 +373,30 @@ const Qe = { class: "gift-card-skeleton" }, ea = { class: "gift-card-skeleton-fo
364
373
  l("p", {
365
374
  id: "konnectio-gift-card-description",
366
375
  innerHTML: e(t)("giftCard.description")
367
- }, null, 8, ma),
376
+ }, null, 8, fa),
368
377
  l("form", null, [
369
- e(B) ? F("", !0) : (d(), y("div", fa, [
370
- e(_) ? (d(), y("div", va, [
371
- l("label", ga, [
372
- l("span", null, X(e(t)("giftCard.selectType")), 1)
378
+ e(D) ? F("", !0) : (c(), y("div", va, [
379
+ e(_) ? (c(), y("div", ga, [
380
+ l("label", ha, [
381
+ l("span", null, Y(e(t)("giftCard.selectType")), 1)
373
382
  ]),
374
- l("div", ha, [
383
+ l("div", ba, [
375
384
  l("ul", null, [
376
- (d(!0), y(we, null, Fe(e(_), (n, j) => (d(), y("li", { key: j }, [
377
- o(Be, {
385
+ (c(!0), y(ve, null, ge(e(_), (i, W) => (c(), y("li", { key: W }, [
386
+ o(xe, {
378
387
  modelValue: e(a),
379
- "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),
380
389
  type: "radio",
381
390
  name: "placeType",
382
- val: j,
383
- label: n.label
391
+ val: W,
392
+ label: i.label
384
393
  }, null, 8, ["modelValue", "val", "label"])
385
394
  ]))), 128))
386
395
  ]),
387
- e(_)[e(a)] && e(_)[e(a)].data.length > 1 ? (d(), G(Pe, {
396
+ e(_)[e(a)] && e(_)[e(a)].data.length > 1 ? (c(), G($e, {
388
397
  key: 0,
389
- modelValue: e(S),
390
- "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),
391
400
  placeholder: e(t)("giftCard.selectPlacePlaceholder"),
392
401
  options: e(_)[e(a)].data,
393
402
  labelKey: "name",
@@ -395,11 +404,11 @@ const Qe = { class: "gift-card-skeleton" }, ea = { class: "gift-card-skeleton-fo
395
404
  required: ""
396
405
  }, null, 8, ["modelValue", "placeholder", "options"])) : F("", !0)
397
406
  ])
398
- ])) : (d(), G(Se, { key: 1 }))
407
+ ])) : (c(), G(Ee, { key: 1 }))
399
408
  ])),
400
409
  o(Z, {
401
- modelValue: e(p),
402
- "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),
403
412
  type: "text",
404
413
  name: "name",
405
414
  autocomplete: "name",
@@ -409,8 +418,8 @@ const Qe = { class: "gift-card-skeleton" }, ea = { class: "gift-card-skeleton-fo
409
418
  required: ""
410
419
  }, null, 8, ["modelValue", "label", "placeholder"]),
411
420
  o(Z, {
412
- modelValue: e(r),
413
- "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),
414
423
  type: "email",
415
424
  name: "email",
416
425
  autocomplete: "email",
@@ -419,9 +428,9 @@ const Qe = { class: "gift-card-skeleton" }, ea = { class: "gift-card-skeleton-fo
419
428
  placeholder: e(t)("giftCard.emailPlaceholder"),
420
429
  required: ""
421
430
  }, null, 8, ["modelValue", "label", "placeholder"]),
422
- o(xe, {
423
- modelValue: e(c),
424
- "onUpdate:modelValue": s[4] || (s[4] = (n) => P(c) ? c.value = n : null),
431
+ o(Be, {
432
+ modelValue: e(p),
433
+ "onUpdate:modelValue": r[4] || (r[4] = (i) => S(p) ? p.value = i : null),
425
434
  icon: "phone-office",
426
435
  label: e(t)("giftCard.phone"),
427
436
  placeholder: e(t)("giftCard.phonePlaceholder"),
@@ -429,52 +438,52 @@ const Qe = { class: "gift-card-skeleton" }, ea = { class: "gift-card-skeleton-fo
429
438
  }, null, 8, ["modelValue", "label", "placeholder"]),
430
439
  o(Z, {
431
440
  modelValue: e(h),
432
- "onUpdate:modelValue": s[5] || (s[5] = (n) => P(h) ? h.value = n : null),
441
+ "onUpdate:modelValue": r[5] || (r[5] = (i) => S(h) ? h.value = i : null),
433
442
  type: "number",
434
443
  name: "value",
435
444
  label: e(t)("giftCard.value"),
436
445
  icon: "money-bill",
437
446
  placeholder: e(t)("giftCard.valuePlaceholder"),
438
- suffix: e(W),
447
+ suffix: e(N),
439
448
  required: ""
440
449
  }, null, 8, ["modelValue", "label", "placeholder", "suffix"]),
441
450
  F("", !0),
442
451
  F("", !0),
443
- o(Te, {
444
- modelValue: e(f),
445
- "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),
446
455
  label: e(t)("giftCard.quantity"),
447
456
  icon: "gift-card",
448
457
  required: ""
449
458
  }, null, 8, ["modelValue", "label"])
450
459
  ])
451
460
  ], 512), [
452
- [K, e(m)]
461
+ [K, e(f)]
453
462
  ]),
454
463
  H(l("div", null, [
455
464
  l("div", {
456
465
  innerHTML: e(t)("giftCard.thankYou")
457
- }, null, 8, ba)
466
+ }, null, 8, ya)
458
467
  ], 512), [
459
468
  [K, e($)]
460
469
  ])
461
470
  ]),
462
- I.layout !== "minimal" && e(m) ? (d(), y("div", ya, [
463
- l("div", ka, [
464
- o(D, {
471
+ A.layout !== "minimal" && e(f) ? (c(), y("div", ka, [
472
+ l("div", _a, [
473
+ o(z, {
465
474
  label: e(t)("giftCard.orderGiftCard"),
466
475
  "full-width": !0,
467
476
  disabled: !e(E),
468
- "is-loading": e(U),
469
- "onUpdate:isLoading": s[9] || (s[9] = (n) => P(U) ? U.value = n : null),
470
- 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)
471
480
  }, null, 8, ["label", "disabled", "is-loading", "onClickEvent"])
472
481
  ])
473
482
  ])) : F("", !0),
474
- e(m) ? (d(), y("div", _a, [
483
+ e(f) ? (c(), y("div", Ca, [
475
484
  o(Z, {
476
- modelValue: e(i),
477
- "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),
478
487
  type: "textarea",
479
488
  name: "remark",
480
489
  label: e(t)("giftCard.remark"),
@@ -482,34 +491,34 @@ const Qe = { class: "gift-card-skeleton" }, ea = { class: "gift-card-skeleton-fo
482
491
  placeholder: e(t)("giftCard.remarkPlaceholder")
483
492
  }, null, 8, ["modelValue", "label", "placeholder"])
484
493
  ])) : F("", !0),
485
- e(m) ? (d(), y("div", Ca, [
486
- o(D, {
494
+ e(f) ? (c(), y("div", Va, [
495
+ o(z, {
487
496
  label: e(t)("giftCard.orderGiftCard"),
488
497
  "full-width": !0,
489
498
  disabled: !e(E),
490
499
  "data-test": "orderGiftCard",
491
- "is-loading": e(U),
492
- "onUpdate:isLoading": s[11] || (s[11] = (n) => P(U) ? U.value = n : null),
493
- 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)
494
503
  }, null, 8, ["label", "disabled", "is-loading", "onClickEvent"]),
495
504
  l("div", null, [
496
- Va,
497
- o(ia)
505
+ wa,
506
+ o(sa)
498
507
  ]),
499
- H(l("div", wa, [
508
+ H(l("div", Fa, [
500
509
  o(ze)
501
510
  ], 512), [
502
511
  [K, e(x)]
503
512
  ])
504
513
  ])) : F("", !0)
505
514
  ])
506
- ], 8, ra))
515
+ ], 8, da))
507
516
  ]),
508
517
  _: 1
509
518
  }, 8, ["access-token", "data-layout"])
510
519
  ]),
511
- fallback: L(() => [
512
- o(ta)
520
+ fallback: R(() => [
521
+ o(la)
513
522
  ]),
514
523
  _: 1
515
524
  }))
@@ -517,8 +526,8 @@ const Qe = { class: "gift-card-skeleton" }, ea = { class: "gift-card-skeleton-fo
517
526
  _: 1
518
527
  }, 8, ["styling"]));
519
528
  }
520
- }), J = /* @__PURE__ */ ie(Fa, [["__scopeId", "data-v-571cd69e"]]), Pa = Ie(), Sa = Me();
521
- class Ta extends HTMLElement {
529
+ }), J = /* @__PURE__ */ ie(Sa, [["__scopeId", "data-v-faae538e"]]), Pa = Le(), Ta = Me();
530
+ class $a extends HTMLElement {
522
531
  vueApp;
523
532
  constructor() {
524
533
  super();
@@ -527,25 +536,26 @@ class Ta extends HTMLElement {
527
536
  this.vueApp.unmount();
528
537
  }
529
538
  connectedCallback() {
530
- const u = typeof J == "function" ? J.options : J;
531
- let v = Array.isArray(u.props) ? u.props : Object.keys(u.props || {});
532
- 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, (b, g) => (g ? "-" : "") + b.toLowerCase()), m = (s) => s.replace(/-./g, (b) => b[1].toUpperCase()), d = {};
533
542
  v = v.map(t);
534
- const c = {};
535
- for (const i of this.attributes) {
536
- const f = i.name.split(".");
537
- f.length > 1 && (c[f[0]] || (c[f[0]] = {}), c[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);
538
547
  }
539
- for (const i of v) {
540
- let b = this.attributes.getNamedItem(i)?.value;
541
- c.hasOwnProperty(i) && (b = c[i]), r[i] = b;
548
+ for (const s of v) {
549
+ let b = this.attributes.getNamedItem(s)?.value;
550
+ p.hasOwnProperty(s) && (b = p[s]), d[s] = b;
542
551
  }
543
- this.vueApp = Re(J, r), this.vueApp.provide("emitter", Sa), this.vueApp.use(Pa), this.vueApp.use(Ge), this.vueApp.use(Le, { bootstrap: !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 });
544
553
  const h = document.createElement("div");
545
554
  this.vueApp.mount(h), this.appendChild(h.children[0]);
546
555
  }
547
556
  }
548
- window.customElements.define("konnectio-gift-card", Ta);
557
+ window.customElements.define("konnectio-gift-card", $a);
549
558
  export {
550
- Ta as default
559
+ $a as default
551
560
  };
561
+ //# sourceMappingURL=gift-card.js.map