@konnectio/core 4.0.56-rc4 → 4.0.56-rc41

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 (187) hide show
  1. package/dist/{ActionField-UFZMmHDy.js → ActionField-B7yd3wqo.js} +39 -31
  2. package/dist/ActionField-B7yd3wqo.js.br +0 -0
  3. package/dist/AvailabilitySkeleton-BFkO-iFk.js +288 -0
  4. package/dist/AvailabilitySkeleton-BFkO-iFk.js.br +0 -0
  5. package/dist/AvailabilitySkeleton.vue_vue_type_style_index_0_scoped_17762b9b_lang-CvsxXVBB.js +7746 -0
  6. package/dist/AvailabilitySkeleton.vue_vue_type_style_index_0_scoped_17762b9b_lang-CvsxXVBB.js.br +0 -0
  7. package/dist/CheckoutWindow-DXpTb3IM.js +668 -0
  8. package/dist/CheckoutWindow-DXpTb3IM.js.br +0 -0
  9. package/dist/ErrorMessage-DURaj0JK.js +45 -0
  10. package/dist/ErrorMessage-DURaj0JK.js.br +0 -0
  11. package/dist/EventAvailabilityForm-EdvNJO4b.js +432 -0
  12. package/dist/EventAvailabilityForm-EdvNJO4b.js.br +0 -0
  13. package/dist/Field-C31DtxD3.js +50 -0
  14. package/dist/Field-C31DtxD3.js.br +0 -0
  15. package/dist/{SelectField.vue_vue_type_style_index_0_lang-3YCxOJhZ.js → Field.vue_vue_type_style_index_0_scoped_992f78a1_lang-DCFBIwBo.js} +9594 -9834
  16. package/dist/Field.vue_vue_type_style_index_0_scoped_992f78a1_lang-DCFBIwBo.js.br +0 -0
  17. package/dist/TermsOfService-RMTyUzQE.js +35 -0
  18. package/dist/TermsOfService-RMTyUzQE.js.br +0 -0
  19. package/dist/_-C4rdBIG5.js +12 -0
  20. package/dist/_.vue_vue_type_style_index_0_lang-DxTbCVt9.js +71 -0
  21. package/dist/_.vue_vue_type_style_index_0_lang-DxTbCVt9.js.br +0 -0
  22. package/dist/_commonjsHelpers-BpcYSDvQ.js +11797 -0
  23. package/dist/_commonjsHelpers-BpcYSDvQ.js.br +0 -0
  24. package/dist/availability.js +95 -147
  25. package/dist/availability.js.br +0 -0
  26. package/dist/event.js +723 -494
  27. package/dist/event.js.br +0 -0
  28. package/dist/gift-card-validation.js +120 -64
  29. package/dist/gift-card-validation.js.br +0 -0
  30. package/dist/gift-card.js +364 -410
  31. package/dist/gift-card.js.br +0 -0
  32. package/dist/giftCard-CTOcXgxl.js +128 -0
  33. package/dist/giftCard-CTOcXgxl.js.br +0 -0
  34. package/dist/hotel.js +1372 -2419
  35. package/dist/hotel.js.br +0 -0
  36. package/dist/masonry.plugin-w0LZcwZT.js +12755 -0
  37. package/dist/masonry.plugin-w0LZcwZT.js.br +0 -0
  38. package/dist/navigation.js +10 -1
  39. package/dist/polyfill.js +14868 -4768
  40. package/dist/polyfill.js.br +0 -0
  41. package/dist/style.css +1 -1
  42. package/dist/style.css.br +0 -0
  43. package/package.json +45 -38
  44. package/dist/ActionField-UFZMmHDy.js.br +0 -0
  45. package/dist/AvailabilitySkeleton-hVUJYdXH.js +0 -242
  46. package/dist/AvailabilitySkeleton-hVUJYdXH.js.br +0 -0
  47. package/dist/CheckoutWindow-2RMgPiGi.js +0 -206
  48. package/dist/CheckoutWindow-2RMgPiGi.js.br +0 -0
  49. package/dist/Container-XBRB0sOV.js +0 -69
  50. package/dist/Container-XBRB0sOV.js.br +0 -0
  51. package/dist/DateField.vue_vue_type_style_index_0_lang-o-uoh8_-.js +0 -8567
  52. package/dist/DateField.vue_vue_type_style_index_0_lang-o-uoh8_-.js.br +0 -0
  53. package/dist/Field-uK3Wuuv6.js +0 -43
  54. package/dist/Field-uK3Wuuv6.js.br +0 -0
  55. package/dist/SelectField.vue_vue_type_style_index_0_lang-3YCxOJhZ.js.br +0 -0
  56. package/dist/ThankYou-nz4vPX4O.js +0 -13316
  57. package/dist/ThankYou-nz4vPX4O.js.br +0 -0
  58. package/dist/_-oPH7HiaC.js +0 -20
  59. package/dist/_commonjsHelpers-FF1eOqK0.js +0 -8
  60. package/dist/assets/typescript/mixins.d.ts +0 -34
  61. package/dist/availability.d.ts +0 -3
  62. package/dist/components/Alert.vue.d.ts +0 -28
  63. package/dist/components/Alert.vue.d.ts.map +0 -1
  64. package/dist/components/Clickable.vue.d.ts +0 -60
  65. package/dist/components/Clickable.vue.d.ts.map +0 -1
  66. package/dist/components/Container.vue.d.ts +0 -23
  67. package/dist/components/Container.vue.d.ts.map +0 -1
  68. package/dist/components/ErrorMessage.vue.d.ts +0 -15
  69. package/dist/components/ErrorMessage.vue.d.ts.map +0 -1
  70. package/dist/components/Gallery.vue.d.ts +0 -31
  71. package/dist/components/Gallery.vue.d.ts.map +0 -1
  72. package/dist/components/GoogleNotice.vue.d.ts +0 -2
  73. package/dist/components/GoogleNotice.vue.d.ts.map +0 -1
  74. package/dist/components/Icon.vue.d.ts +0 -38
  75. package/dist/components/Icon.vue.d.ts.map +0 -1
  76. package/dist/components/Loading.vue.d.ts +0 -29
  77. package/dist/components/Loading.vue.d.ts.map +0 -1
  78. package/dist/components/Spinner.vue.d.ts +0 -2
  79. package/dist/components/Spinner.vue.d.ts.map +0 -1
  80. package/dist/components/forms/EventAvailabilityForm.vue.d.ts +0 -18
  81. package/dist/components/forms/EventAvailabilityForm.vue.d.ts.map +0 -1
  82. package/dist/components/forms/HotelAvailabilityForm.vue.d.ts +0 -34
  83. package/dist/components/forms/HotelAvailabilityForm.vue.d.ts.map +0 -1
  84. package/dist/components/forms/HotelReservationForm.vue.d.ts +0 -41
  85. package/dist/components/forms/HotelReservationForm.vue.d.ts.map +0 -1
  86. package/dist/components/forms/MultiStepForm.vue.d.ts +0 -43
  87. package/dist/components/forms/MultiStepForm.vue.d.ts.map +0 -1
  88. package/dist/components/forms/ReservationForm.vue.d.ts +0 -63
  89. package/dist/components/forms/ReservationForm.vue.d.ts.map +0 -1
  90. package/dist/components/forms/_.vue.d.ts +0 -42
  91. package/dist/components/forms/_.vue.d.ts.map +0 -1
  92. package/dist/components/inputs/Checkbox.vue.d.ts +0 -55
  93. package/dist/components/inputs/Checkbox.vue.d.ts.map +0 -1
  94. package/dist/components/inputs/CheckboxField.vue.d.ts +0 -29
  95. package/dist/components/inputs/CheckboxField.vue.d.ts.map +0 -1
  96. package/dist/components/inputs/DateField.vue.d.ts +0 -104
  97. package/dist/components/inputs/DateField.vue.d.ts.map +0 -1
  98. package/dist/components/inputs/InputField.vue.d.ts +0 -62
  99. package/dist/components/inputs/InputField.vue.d.ts.map +0 -1
  100. package/dist/components/inputs/MediaSelector.vue.d.ts +0 -43
  101. package/dist/components/inputs/MediaSelector.vue.d.ts.map +0 -1
  102. package/dist/components/inputs/NumberField.vue.d.ts +0 -87
  103. package/dist/components/inputs/NumberField.vue.d.ts.map +0 -1
  104. package/dist/components/inputs/SelectField.vue.d.ts +0 -90
  105. package/dist/components/inputs/SelectField.vue.d.ts.map +0 -1
  106. package/dist/components/inputs/TextField.vue.d.ts +0 -68
  107. package/dist/components/inputs/TextField.vue.d.ts.map +0 -1
  108. package/dist/components/inputs/TimeField.vue.d.ts +0 -44
  109. package/dist/components/inputs/TimeField.vue.d.ts.map +0 -1
  110. package/dist/components/inputs/grouped/ActionField.vue.d.ts +0 -72
  111. package/dist/components/inputs/grouped/ActionField.vue.d.ts.map +0 -1
  112. package/dist/components/inputs/grouped/CountryField.vue.d.ts +0 -41
  113. package/dist/components/inputs/grouped/CountryField.vue.d.ts.map +0 -1
  114. package/dist/components/inputs/grouped/NameField.vue.d.ts +0 -71
  115. package/dist/components/inputs/grouped/NameField.vue.d.ts.map +0 -1
  116. package/dist/components/inputs/grouped/PhoneField.vue.d.ts +0 -51
  117. package/dist/components/inputs/grouped/PhoneField.vue.d.ts.map +0 -1
  118. package/dist/components/inputs/grouped/RoomConfigField.vue.d.ts +0 -47
  119. package/dist/components/inputs/grouped/RoomConfigField.vue.d.ts.map +0 -1
  120. package/dist/components/listings/Base.vue.d.ts +0 -56
  121. package/dist/components/listings/Base.vue.d.ts.map +0 -1
  122. package/dist/components/listings/Event.vue.d.ts +0 -47
  123. package/dist/components/listings/Event.vue.d.ts.map +0 -1
  124. package/dist/components/listings/Hotel.vue.d.ts +0 -16
  125. package/dist/components/listings/Hotel.vue.d.ts.map +0 -1
  126. package/dist/components/listings/Template.vue.d.ts +0 -21
  127. package/dist/components/listings/Template.vue.d.ts.map +0 -1
  128. package/dist/components/side-panels/Base.vue.d.ts +0 -61
  129. package/dist/components/side-panels/Base.vue.d.ts.map +0 -1
  130. package/dist/components/side-panels/ListingInfo.vue.d.ts +0 -18
  131. package/dist/components/side-panels/ListingInfo.vue.d.ts.map +0 -1
  132. package/dist/components/side-panels/Template.vue.d.ts +0 -18
  133. package/dist/components/side-panels/Template.vue.d.ts.map +0 -1
  134. package/dist/components/side-panels/TermsOfService.vue.d.ts +0 -14
  135. package/dist/components/side-panels/TermsOfService.vue.d.ts.map +0 -1
  136. package/dist/components/skeletons/AvailabilitySkeleton.vue.d.ts +0 -33
  137. package/dist/components/skeletons/AvailabilitySkeleton.vue.d.ts.map +0 -1
  138. package/dist/components/skeletons/Field.vue.d.ts +0 -36
  139. package/dist/components/skeletons/Field.vue.d.ts.map +0 -1
  140. package/dist/components/skeletons/GiftCardSkeleton.vue.d.ts +0 -2
  141. package/dist/components/skeletons/GiftCardSkeleton.vue.d.ts.map +0 -1
  142. package/dist/components/skeletons/HotelSkeleton.vue.d.ts +0 -2
  143. package/dist/components/skeletons/HotelSkeleton.vue.d.ts.map +0 -1
  144. package/dist/components/skeletons/Listing.vue.d.ts +0 -2
  145. package/dist/components/skeletons/Listing.vue.d.ts.map +0 -1
  146. package/dist/components/skeletons/Sidebar.vue.d.ts +0 -2
  147. package/dist/components/skeletons/Sidebar.vue.d.ts.map +0 -1
  148. package/dist/components/skeletons/_.vue.d.ts +0 -36
  149. package/dist/components/skeletons/_.vue.d.ts.map +0 -1
  150. package/dist/components/views/CheckoutWindow.vue.d.ts +0 -2
  151. package/dist/components/views/CheckoutWindow.vue.d.ts.map +0 -1
  152. package/dist/components/views/TermsOfService.vue.d.ts +0 -2
  153. package/dist/components/views/TermsOfService.vue.d.ts.map +0 -1
  154. package/dist/components/views/ThankYou.vue.d.ts +0 -15
  155. package/dist/components/views/ThankYou.vue.d.ts.map +0 -1
  156. package/dist/entries/availability.d.ts +0 -5
  157. package/dist/entries/event.d.ts +0 -2
  158. package/dist/entries/gift-card-validation.d.ts +0 -5
  159. package/dist/entries/gift-card.d.ts +0 -5
  160. package/dist/entries/hotel.d.ts +0 -5
  161. package/dist/entries/navigation.d.ts +0 -1
  162. package/dist/entries/polyfill.d.ts +0 -0
  163. package/dist/event--wgsUkQp.js +0 -359
  164. package/dist/event--wgsUkQp.js.br +0 -0
  165. package/dist/event.d.ts +0 -3
  166. package/dist/gift-card-validation.d.ts +0 -3
  167. package/dist/gift-card.d.ts +0 -3
  168. package/dist/hotel.d.ts +0 -3
  169. package/dist/layouts/Availability.vue.d.ts +0 -25
  170. package/dist/layouts/Event.vue.d.ts +0 -18
  171. package/dist/layouts/GiftCard.vue.d.ts +0 -32
  172. package/dist/layouts/GiftCardValidation.vue.d.ts +0 -18
  173. package/dist/layouts/Hotel.vue.d.ts +0 -36
  174. package/dist/layouts/_.vue.d.ts +0 -39
  175. package/dist/navigation.d.ts +0 -1
  176. package/dist/plugins/i18n.d.ts +0 -5
  177. package/dist/polyfill.d.ts +0 -1
  178. package/dist/store/alert.d.ts +0 -28
  179. package/dist/store/applyGiftCard.d.ts +0 -28
  180. package/dist/store/availability.d.ts +0 -40
  181. package/dist/store/event.d.ts +0 -683
  182. package/dist/store/giftCard.d.ts +0 -83
  183. package/dist/store/payment.d.ts +0 -139
  184. package/dist/store/recaptcha.d.ts +0 -28
  185. package/dist/store/tracking.d.ts +0 -57
  186. package/dist/store/utilities.d.ts +0 -350
  187. package/dist/types/index.d.ts +0 -976
package/dist/gift-card.js CHANGED
@@ -1,131 +1,20 @@
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-3YCxOJhZ.js";
30
- import { C as Me } from "./Container-XBRB0sOV.js";
31
- import { a as xe, C as re, P as De, _ as ze } from "./CheckoutWindow-2RMgPiGi.js";
32
- import { E as Ae } from "./_-oPH7HiaC.js";
33
- import { F as x } from "./Field-uK3Wuuv6.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 = _({
37
- base64: "",
38
- type: "",
39
- 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 = {
42
- 1: {
43
- label: ie.t("giftCard.hotelType"),
44
- data: []
45
- },
46
- 2: {
47
- label: ie.t("giftCard.restaurantType"),
48
- data: []
49
- }
50
- }, U = r.value.hotels[0].places;
51
- return U && U.forEach((w) => {
52
- a[w.placeType].data.push(w);
53
- }), Object.fromEntries(
54
- Object.entries(a).filter(([, w]) => w.data.length > 0)
55
- );
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);
64
- });
65
- }
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-rc4"
92
- }
93
- }).then((a) => {
94
- s.value = $.ReadyToPay, y.value = !1, u({
95
- callback: () => console.log("Callback!"),
96
- response: a.data
97
- });
98
- });
99
- });
100
- }
101
- function i(a) {
102
- a && (q.value = a);
1
+ import { d as I, r as K, c as Z, o as s, b as w, w as F, g as t, a as v, f as o, u as e, e as g, n as Y, t as G, i as ae, q as oe, h as ne, S as ie, y as T, z as M, F as se, A as re, x as k, p as de, j as ue, k as ce } from "./_commonjsHelpers-BpcYSDvQ.js";
2
+ import { h as B, a as pe, C as S, I as me, E as fe, _ as z, F as be, s as O, b as ve, k as he, L as _e, T as L, l as ge, n as ye, o as ke, p as Ce, q as Ve, H as we, t as Fe } from "./Field.vue_vue_type_style_index_0_scoped_992f78a1_lang-DCFBIwBo.js";
3
+ import { u as D } from "./giftCard-CTOcXgxl.js";
4
+ import { _ as $e } from "./_.vue_vue_type_style_index_0_lang-DxTbCVt9.js";
5
+ import { C as Ee, a as Pe, P as Ue, _ as Ae } from "./CheckoutWindow-DXpTb3IM.js";
6
+ import { F as A } from "./Field-C31DtxD3.js";
7
+ import { E as Se } from "./ErrorMessage-DURaj0JK.js";
8
+ import { S as Ie } from "./TermsOfService-RMTyUzQE.js";
9
+ import "./navigation.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] = "0c48a098-5331-4805-80ee-7366488b93ab", d._sentryDebugIdIdentifier = "sentry-dbid-0c48a098-5331-4805-80ee-7366488b93ab");
14
+ } catch {
103
15
  }
104
- 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
127
- };
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({
16
+ })();
17
+ const Te = { class: "media-selector" }, Me = ["accept"], Le = { class: "media-selector-wrapper" }, qe = { class: "media-selector-tools" }, Ge = { key: 0 }, Be = { key: 1 }, Re = { key: 2 }, xe = ["src"], De = /* @__PURE__ */ I({
129
18
  __name: "MediaSelector",
130
19
  props: {
131
20
  modelValue: {},
@@ -135,96 +24,94 @@ const se = Fe("giftCard", () => {
135
24
  required: { type: Boolean, default: !1 }
136
25
  },
137
26
  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);
27
+ setup(d, { emit: n }) {
28
+ const m = n, l = d, { t: c } = B(), { display: h } = pe(), p = K(), _ = Z(() => l.modelValue.base64 !== "");
29
+ function u(a) {
30
+ m("update:modelValue", a);
142
31
  }
143
- function g() {
144
- m({
32
+ function y() {
33
+ u({
145
34
  base64: "",
146
35
  name: "",
147
36
  type: ""
148
- }), f.value && (f.value.value = "");
37
+ }), p.value && (p.value.value = "");
149
38
  }
150
- function S() {
151
- f.value && f.value.click();
39
+ function b() {
40
+ p.value && p.value.click();
152
41
  }
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 });
42
+ function H(a, f) {
43
+ const [V, R] = [a.name, a.type], C = new FileReader();
44
+ C.onload = function(U) {
45
+ if (U.target) {
46
+ const x = U.target.result;
47
+ f({ base64: x, name: V, type: R });
159
48
  } else
160
49
  h({
161
- message: s("imageUploadError"),
50
+ message: c("imageUploadError"),
162
51
  type: "error"
163
52
  });
164
- }, F.readAsDataURL(l);
53
+ }, C.readAsDataURL(a);
165
54
  }
166
- function k() {
167
- return J(this, null, function* () {
168
- let l;
169
- (l = f.value.files) instanceof FileList && G(l[0], m);
170
- });
55
+ async function $() {
56
+ let a;
57
+ (a = p.value.files) instanceof FileList && H(a[0], u);
171
58
  }
172
- return (l, c) => (p(), L($e, {
173
- label: l.label,
174
- required: l.required,
59
+ return (a, f) => (s(), w(me, {
60
+ label: a.label,
61
+ required: a.required,
175
62
  type: "media"
176
63
  }, {
177
- default: D(() => [
178
- d("div", Be, [
179
- d("input", {
64
+ default: F(() => [
65
+ t("div", Te, [
66
+ t("input", {
180
67
  ref_key: "fileInput",
181
- ref: f,
68
+ ref: p,
182
69
  type: "file",
183
70
  class: "hidden",
184
- accept: l.validation,
71
+ accept: a.validation,
185
72
  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"),
73
+ onChange: f[0] || (f[0] = (V) => $())
74
+ }, null, 40, Me),
75
+ t("div", Le, [
76
+ t("ul", qe, [
77
+ _.value ? g("", !0) : (s(), v("li", Ge, [
78
+ o(S, {
79
+ label: e(c)("uploadFile"),
193
80
  type: "button",
194
81
  icon: "upload",
195
- "icon-color": l.iconColor,
196
- onClickEvent: c[1] || (c[1] = (y) => S())
82
+ "icon-color": a.iconColor,
83
+ onClickEvent: f[1] || (f[1] = (V) => b())
197
84
  }, null, 8, ["label", "icon-color"])
198
85
  ])),
199
- v.value ? (p(), b("li", Oe, [
200
- n(z, {
201
- label: e(s)("replaceFile"),
86
+ _.value ? (s(), v("li", Be, [
87
+ o(S, {
88
+ label: e(c)("replaceFile"),
202
89
  type: "button",
203
90
  icon: "repeat-alt",
204
- "icon-color": l.iconColor,
205
- onClickEvent: c[2] || (c[2] = (y) => S())
91
+ "icon-color": a.iconColor,
92
+ onClickEvent: f[2] || (f[2] = (V) => b())
206
93
  }, null, 8, ["label", "icon-color"])
207
- ])) : T("", !0),
208
- v.value ? (p(), b("li", Ke, [
209
- n(z, {
210
- label: e(s)("removeFile"),
94
+ ])) : g("", !0),
95
+ _.value ? (s(), v("li", Re, [
96
+ o(S, {
97
+ label: e(c)("removeFile"),
211
98
  type: "button",
212
99
  icon: "trash-alt",
213
- "icon-color": l.iconColor,
214
- onClickEvent: c[3] || (c[3] = (y) => g())
100
+ "icon-color": a.iconColor,
101
+ onClickEvent: f[3] || (f[3] = (V) => y())
215
102
  }, null, 8, ["label", "icon-color"])
216
- ])) : T("", !0)
103
+ ])) : g("", !0)
217
104
  ]),
218
- d("div", {
219
- class: ue([
105
+ t("div", {
106
+ class: Y([
220
107
  "media-selector-previewer",
221
- { opened: v.value }
108
+ { opened: _.value }
222
109
  ])
223
110
  }, [
224
- l.modelValue ? (p(), b("img", {
111
+ a.modelValue ? (s(), v("img", {
225
112
  key: 0,
226
- src: l.modelValue.base64
227
- }, null, 8, Je)) : T("", !0)
113
+ src: a.modelValue.base64
114
+ }, null, 8, xe)) : g("", !0)
228
115
  ], 2)
229
116
  ])
230
117
  ])
@@ -233,9 +120,9 @@ const se = Fe("giftCard", () => {
233
120
  }, 8, ["label", "required"]));
234
121
  }
235
122
  });
236
- function de(u) {
237
- const t = u;
238
- t.__i18n = t.__i18n || [], t.__i18n.push({
123
+ function W(d) {
124
+ const n = d;
125
+ n.__i18n = n.__i18n || [], n.__i18n.push({
239
126
  locale: "",
240
127
  resource: {
241
128
  da: {
@@ -253,39 +140,80 @@ function de(u) {
253
140
  }
254
141
  });
255
142
  }
256
- typeof de == "function" && de(Ye);
257
- const Qe = { class: "gift-card-skeleton" }, Xe = { class: "gift-card-skeleton-form" }, Ze = /* @__PURE__ */ Z({
143
+ typeof W == "function" && W(De);
144
+ const ze = { class: "gift-card-skeleton" }, He = { class: "gift-card-skeleton-form" }, je = /* @__PURE__ */ I({
258
145
  __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" })
146
+ setup(d) {
147
+ return (n, m) => (s(), v("div", ze, [
148
+ t("div", He, [
149
+ o(A),
150
+ o(A),
151
+ o(A),
152
+ o(A),
153
+ o(A, { "is-text-area": "" }),
154
+ o(fe, { height: "44px" })
268
155
  ])
269
156
  ]));
270
157
  }
271
- }), ea = /* @__PURE__ */ me(Ze, [["__scopeId", "data-v-e35c75b3"]]), aa = {
272
- key: 0,
273
- 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 = {
158
+ }), Ne = /* @__PURE__ */ z(je, [["__scopeId", "data-v-ba3efaa1"]]), Oe = { class: "konnectio-accept-terms" }, We = /* @__PURE__ */ I({
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(be), {
168
+ keypath: "general.termsAndConditionsNotice",
169
+ tag: "span",
170
+ scope: "global"
171
+ }, {
172
+ button: F(() => [
173
+ t("i", null, '"' + G(l.buttonLabel) + '"', 1)
174
+ ]),
175
+ terms: F(() => [
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, G(e(n)("general.termsAndConditions")), 1)
182
+ ])
183
+ ]),
184
+ _: 1
185
+ }),
186
+ o(Ie, {
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__ */ I({
194
+ __name: "GiftCard",
195
+ setup(d) {
196
+ const { t: n } = B(), m = D();
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-36e1c4fe"), 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 = {
275
203
  key: 0,
276
- 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 = {
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 = {
280
208
  key: 0,
281
209
  id: "konnectio-gift-card-order"
282
- }, pa = { class: "fresh-booking-panel" }, ma = {
210
+ }, dt = { class: "konnectio-panel" }, ut = {
283
211
  key: 1,
284
212
  id: "konnectio-gift-card-remarks"
285
- }, fa = {
213
+ }, ct = {
286
214
  key: 2,
287
215
  id: "konnectio-gift-card-order-minimal"
288
- }, va = { id: "konnectio-gift-card-recaptcha" }, ga = /* @__PURE__ */ Z({
216
+ }, pt = /* @__PURE__ */ Ye(() => /* @__PURE__ */ t("div", { class: "konnectio-divider" }, null, -1)), mt = { id: "konnectio-gift-card-recaptcha" }, ft = /* @__PURE__ */ I({
289
217
  name: "GiftCardLayout",
290
218
  __name: "GiftCard",
291
219
  props: {
@@ -294,207 +222,213 @@ const Qe = { class: "gift-card-skeleton" }, Xe = { class: "gift-card-skeleton-fo
294
222
  placeType: {},
295
223
  styling: {}
296
224
  },
297
- setup(u) {
298
- const t = u, r = V(() => te({
299
- panelMaxWidth: "800px"
300
- }, t.styling)), { t: o } = pe(), {
301
- name: s,
225
+ setup(d) {
226
+ const n = d, m = Z(() => ({
227
+ panelMaxWidth: "800px",
228
+ ...n.styling
229
+ })), { t: l } = B(), {
230
+ name: c,
302
231
  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, {
330
- id: "konnectio-gift-card-module",
331
- type: "gift-card",
332
- "access-token": R.accessToken,
333
- "data-layout": R.layout
232
+ phone: p,
233
+ value: _,
234
+ remark: u,
235
+ showValue: y,
236
+ quantity: b,
237
+ media: H,
238
+ placeId: $,
239
+ placeType: a,
240
+ showFormPage: f,
241
+ showPaymentPage: V,
242
+ showConfirmationPage: R,
243
+ places: C,
244
+ hasFilledForm: U,
245
+ hasForcedPlaceType: x,
246
+ isWaitingForResponse: E
247
+ } = O(D()), { initialize: J, orderGiftCard: j, fetchMetadata: Q } = D(), { isRecaptchaEnabled: X, currency: ee, hasError: te } = O(ve());
248
+ return oe(a, () => {
249
+ $.value = void 0;
250
+ }), ne(() => {
251
+ const P = n.placeType ? parseInt(n.placeType) : void 0;
252
+ J(P);
253
+ }), (P, r) => (s(), w(ye, { styling: m.value }, {
254
+ default: F(() => [
255
+ (s(), w(ie, null, {
256
+ default: F(() => [
257
+ o($e, {
258
+ "access-token": P.accessToken,
259
+ "data-layout": P.layout,
260
+ onMetadata: e(Q)
334
261
  }, {
335
- default: D(() => [
336
- e(A) ? (p(), b("div", aa, [
337
- d("h2", la, [
338
- d("span", null, oe(e(o)("giftCard.title")), 1)
339
- ]),
340
- d("div", ta, [
341
- W(d("div", oa, [
342
- n(xe)
343
- ], 512), [
344
- [j, e(y)]
262
+ default: F(() => [
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, G(e(l)("giftCard.title")), 1)
345
275
  ]),
346
- W(d("div", null, [
347
- d("p", {
348
- 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)
356
- ]),
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),
363
- type: "radio",
364
- name: "placeType",
365
- val: U,
366
- label: a.label
367
- }, null, 8, ["modelValue", "val", "label"])
368
- ]))), 128))
276
+ t("div", et, [
277
+ T(t("div", tt, [
278
+ o(Ee)
279
+ ], 512), [
280
+ [M, e(V)]
281
+ ]),
282
+ T(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(x) ? g("", !0) : (s(), v("div", at, [
289
+ e(C) ? (s(), v("div", ot, [
290
+ t("label", nt, [
291
+ t("span", null, G(e(l)("giftCard.selectType")), 1)
369
292
  ]),
370
- e(F)[e(l)] && e(F)[e(l)].data.length > 1 ? (p(), L(qe, {
371
- 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,
376
- labelKey: "name",
377
- valueKey: "id",
378
- required: ""
379
- }, null, 8, ["modelValue", "placeholder", "options"])) : T("", !0)
380
- ])
381
- ])) : (p(), L(ne, { key: 1 }))
382
- ])),
383
- n(H, {
384
- modelValue: e(s),
385
- "onUpdate:modelValue": i[2] || (i[2] = (a) => C(s) ? s.value = a : null),
386
- type: "text",
387
- name: "name",
388
- autocomplete: "name",
389
- label: e(o)("giftCard.name"),
390
- icon: "user-alt",
391
- placeholder: e(o)("giftCard.namePlaceholder"),
392
- required: ""
393
- }, 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),
397
- type: "email",
398
- name: "email",
399
- autocomplete: "email",
400
- label: e(o)("giftCard.email"),
401
- icon: "at",
402
- placeholder: e(o)("giftCard.emailPlaceholder"),
403
- required: ""
404
- }, 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),
408
- icon: "phone-office",
409
- label: e(o)("giftCard.phone"),
410
- placeholder: e(o)("giftCard.phonePlaceholder"),
411
- required: ""
412
- }, 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),
416
- type: "number",
417
- name: "value",
418
- label: e(o)("giftCard.value"),
419
- icon: "money-bill",
420
- placeholder: e(o)("giftCard.valuePlaceholder"),
421
- suffix: e(K),
422
- required: ""
423
- }, 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"),
437
- icon: "gift-card",
438
- required: ""
439
- }, 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(he, {
307
+ key: 0,
308
+ modelValue: e($),
309
+ "onUpdate:modelValue": r[1] || (r[1] = (i) => k($) ? $.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(_e, { key: 1 }))
318
+ ])),
319
+ o(L, {
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(L, {
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(L, {
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(ge, {
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
+ [M, e(f)]
372
+ ]),
373
+ T(t("div", null, [
374
+ t("div", {
375
+ innerHTML: e(l)("giftCard.thankYou")
376
+ }, null, 8, st)
377
+ ], 512), [
378
+ [M, e(R)]
440
379
  ])
441
- ], 512), [
442
- [j, e(c)]
443
380
  ]),
444
- W(d("div", null, [
445
- d("div", {
446
- innerHTML: e(o)("giftCard.thankYou")
447
- }, null, 8, ua)
448
- ], 512), [
449
- [j, e(q)]
450
- ])
451
- ]),
452
- R.layout !== "minimal" && e(c) ? (p(), b("div", ca, [
453
- d("div", pa, [
454
- n(z, {
455
- label: e(o)("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(j)
390
+ }, null, 8, ["label", "disabled", "is-loading", "onClickEvent"])
391
+ ])
392
+ ])) : g("", !0),
393
+ e(f) ? (s(), v("div", ut, [
394
+ o(L, {
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"),
456
407
  "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)
461
- }, null, 8, ["label", "disabled", "is-loading", "onClickEvent"])
462
- ])
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),
468
- type: "textarea",
469
- name: "remark",
470
- label: e(o)("giftCard.remark"),
471
- icon: "info-circle",
472
- placeholder: e(o)("giftCard.remarkPlaceholder")
473
- }, null, 8, ["modelValue", "label", "placeholder"])
474
- ])) : T("", !0),
475
- e(c) ? (p(), b("div", fa, [
476
- n(z, {
477
- label: e(o)("giftCard.orderGiftCard"),
478
- "full-width": !0,
479
- disabled: !e(I),
480
- "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)
484
- }, null, 8, ["label", "disabled", "is-loading", "onClickEvent"]),
485
- W(d("div", va, [
486
- n(ze)
487
- ], 512), [
488
- [j, e(O)]
489
- ])
490
- ])) : T("", !0)
491
- ])) : (p(), L(ne, { 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(j)
413
+ }, null, 8, ["label", "disabled", "is-loading", "onClickEvent"]),
414
+ t("div", null, [
415
+ pt,
416
+ o(Ze)
417
+ ]),
418
+ T(t("div", mt, [
419
+ o(Ae)
420
+ ], 512), [
421
+ [M, e(X)]
422
+ ])
423
+ ])) : g("", !0)
424
+ ])
425
+ ], 8, Je))
492
426
  ]),
493
427
  _: 1
494
- }, 8, ["access-token", "data-layout"])
428
+ }, 8, ["access-token", "data-layout", "onMetadata"])
495
429
  ]),
496
- fallback: D(() => [
497
- n(ea)
430
+ fallback: F(() => [
431
+ o(Ne)
498
432
  ]),
499
433
  _: 1
500
434
  }))
@@ -502,16 +436,36 @@ const Qe = { class: "gift-card-skeleton" }, Xe = { class: "gift-card-skeleton-fo
502
436
  _: 1
503
437
  }, 8, ["styling"]));
504
438
  }
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);
439
+ }), q = /* @__PURE__ */ z(ft, [["__scopeId", "data-v-36e1c4fe"]]), bt = ke(), vt = Fe();
440
+ class ht extends HTMLElement {
441
+ vueApp;
442
+ constructor() {
443
+ super();
513
444
  }
514
- };
445
+ disconnectedCallback() {
446
+ this.vueApp.unmount();
447
+ }
448
+ connectedCallback() {
449
+ const n = typeof q == "function" ? q.options : q;
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;
461
+ }
462
+ this.vueApp = ce(q, h), Ce(this.vueApp), this.vueApp.provide("emitter", vt), this.vueApp.use(bt), this.vueApp.use(Ve), this.vueApp.use(we, { bootstrap: !0 });
463
+ const _ = document.createElement("div");
464
+ this.vueApp.mount(_), this.appendChild(_.children[0]);
465
+ }
466
+ }
467
+ window.customElements.define("konnectio-gift-card", ht);
515
468
  export {
516
- wa as default
469
+ ht as default
517
470
  };
471
+ //# sourceMappingURL=gift-card.js.map