@konnectio/core 4.0.56-rc24 → 4.0.56-rc26

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