@konnectio/core 4.0.56-rc3 → 4.0.56-rc31

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