@konnectio/core 4.0.56-rc6 → 4.0.56-rc60

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