@konnectio/core 4.0.56-rc5 → 4.0.56-rc51

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