@konnectio/core 4.0.1 → 4.0.2

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 (122) hide show
  1. package/dist/ActionField-138c1747.mjs +104 -0
  2. package/dist/ActionField-138c1747.mjs.br +0 -0
  3. package/dist/ActionField-2b6751b4.js +2 -0
  4. package/dist/ActionField-2b6751b4.js.br +0 -0
  5. package/dist/Clickable-26efd8d0.mjs +3497 -0
  6. package/dist/Clickable-26efd8d0.mjs.br +0 -0
  7. package/dist/Clickable-6b252cca.js +763 -0
  8. package/dist/Clickable-6b252cca.js.br +0 -0
  9. package/dist/HotelAvailabilityForm-56badafa.js +2 -0
  10. package/dist/HotelAvailabilityForm-56badafa.js.br +0 -0
  11. package/dist/HotelAvailabilityForm-a550be2e.mjs +100 -0
  12. package/dist/HotelAvailabilityForm-a550be2e.mjs.br +0 -0
  13. package/dist/NumberField.vue_vue_type_style_index_0_lang-778e8361.mjs +5918 -0
  14. package/dist/NumberField.vue_vue_type_style_index_0_lang-778e8361.mjs.br +0 -0
  15. package/dist/NumberField.vue_vue_type_style_index_0_lang-de20cf9f.js +56 -0
  16. package/dist/NumberField.vue_vue_type_style_index_0_lang-de20cf9f.js.br +0 -0
  17. package/dist/ReCaptchaVuePlugin-59863bbf.mjs +377 -0
  18. package/dist/ReCaptchaVuePlugin-59863bbf.mjs.br +0 -0
  19. package/dist/ReCaptchaVuePlugin-809f1dcc.js +2 -0
  20. package/dist/ReCaptchaVuePlugin-809f1dcc.js.br +0 -0
  21. package/dist/SelectField.vue_vue_type_style_index_0_lang-aa7a93a7.js +57 -0
  22. package/dist/SelectField.vue_vue_type_style_index_0_lang-aa7a93a7.js.br +0 -0
  23. package/dist/SelectField.vue_vue_type_style_index_0_lang-b4fb229d.mjs +10110 -0
  24. package/dist/SelectField.vue_vue_type_style_index_0_lang-b4fb229d.mjs.br +0 -0
  25. package/dist/ThankYou-103d0395.js +16 -0
  26. package/dist/ThankYou-103d0395.js.br +0 -0
  27. package/dist/ThankYou-95c1eef3.mjs +8520 -0
  28. package/dist/ThankYou-95c1eef3.mjs.br +0 -0
  29. package/dist/_commonjsHelpers-10dfc225.mjs +9 -0
  30. package/dist/_commonjsHelpers-87b0abe8.js +2 -0
  31. package/dist/applyGiftCard-2eac2416.js +2 -0
  32. package/dist/applyGiftCard-2eac2416.js.br +0 -0
  33. package/dist/applyGiftCard-fb6fb8f4.mjs +118 -0
  34. package/dist/applyGiftCard-fb6fb8f4.mjs.br +0 -0
  35. package/dist/availability.cjs.js +2 -0
  36. package/dist/availability.cjs.js.br +0 -0
  37. package/dist/availability.es.js +186 -0
  38. package/dist/availability.es.js.br +0 -0
  39. package/dist/event-b7b4870b.js +2 -0
  40. package/dist/event-b7b4870b.js.br +0 -0
  41. package/dist/event-d697bdb9.mjs +329 -0
  42. package/dist/event-d697bdb9.mjs.br +0 -0
  43. package/dist/event.cjs.js +2 -0
  44. package/dist/event.cjs.js.br +0 -0
  45. package/dist/event.es.js +648 -0
  46. package/dist/event.es.js.br +0 -0
  47. package/dist/gift-card-validation.cjs.js +2 -0
  48. package/dist/gift-card-validation.cjs.js.br +9 -0
  49. package/dist/gift-card-validation.es.js +173 -0
  50. package/dist/gift-card-validation.es.js.br +0 -0
  51. package/dist/gift-card.cjs.js +2 -0
  52. package/dist/gift-card.cjs.js.br +0 -0
  53. package/dist/gift-card.es.js +587 -0
  54. package/dist/gift-card.es.js.br +0 -0
  55. package/dist/hotel.cjs.js +20 -0
  56. package/dist/hotel.cjs.js.br +0 -0
  57. package/dist/hotel.es.js +2395 -0
  58. package/dist/hotel.es.js.br +0 -0
  59. package/dist/index-76459611.mjs +656 -0
  60. package/dist/index-76459611.mjs.br +0 -0
  61. package/dist/index-95820cc1.js +2 -0
  62. package/dist/index-95820cc1.js.br +0 -0
  63. package/dist/navigation.cjs.js +2 -0
  64. package/dist/navigation.cjs.js.br +0 -0
  65. package/dist/navigation.es.js +60 -0
  66. package/dist/navigation.es.js.br +0 -0
  67. package/dist/payment-215f120d.js +3 -0
  68. package/dist/payment-215f120d.js.br +0 -0
  69. package/dist/payment-31263275.mjs +8149 -0
  70. package/dist/payment-31263275.mjs.br +0 -0
  71. package/dist/polyfill.cjs.js +5 -0
  72. package/dist/polyfill.cjs.js.br +0 -0
  73. package/dist/polyfill.es.js +6766 -0
  74. package/dist/polyfill.es.js.br +0 -0
  75. package/dist/style.css +1 -0
  76. package/dist/style.css.br +0 -0
  77. package/package.json +3 -1
  78. package/dist/admin.js +0 -2
  79. package/dist/admin.js.br +0 -0
  80. package/dist/assets/ActionField-d1b315e3.js +0 -2
  81. package/dist/assets/ActionField-d1b315e3.js.br +0 -0
  82. package/dist/assets/Alert-2cd22061.js +0 -2
  83. package/dist/assets/Alert-2cd22061.js.br +0 -0
  84. package/dist/assets/Clickable-19c9ecdc.js +0 -2
  85. package/dist/assets/Clickable-19c9ecdc.js.br +0 -0
  86. package/dist/assets/GoogleNotice-83805aa2.js +0 -2
  87. package/dist/assets/GoogleNotice-83805aa2.js.br +0 -0
  88. package/dist/assets/HotelAvailabilityForm-53fa6ecb.js +0 -2
  89. package/dist/assets/HotelAvailabilityForm-53fa6ecb.js.br +0 -0
  90. package/dist/assets/Icon-6c933148.js +0 -2
  91. package/dist/assets/Icon-6c933148.js.br +0 -0
  92. package/dist/assets/NumberField.vue_vue_type_style_index_0_lang-9b1b90b2.js +0 -2
  93. package/dist/assets/NumberField.vue_vue_type_style_index_0_lang-9b1b90b2.js.br +0 -0
  94. package/dist/assets/SelectField.vue_vue_type_style_index_0_lang-c5d2bf7d.js +0 -2
  95. package/dist/assets/SelectField.vue_vue_type_style_index_0_lang-c5d2bf7d.js.br +0 -0
  96. package/dist/assets/ThankYou-29820212.js +0 -5
  97. package/dist/assets/ThankYou-29820212.js.br +0 -0
  98. package/dist/assets/applyGiftCard-39571f2e.js +0 -2
  99. package/dist/assets/applyGiftCard-39571f2e.js.br +0 -0
  100. package/dist/assets/event-79c562c0.js +0 -2
  101. package/dist/assets/event-79c562c0.js.br +0 -0
  102. package/dist/assets/payment-a3a9b5dd.js +0 -2
  103. package/dist/assets/payment-a3a9b5dd.js.br +0 -0
  104. package/dist/assets/style.css +0 -1
  105. package/dist/assets/style.css.br +0 -0
  106. package/dist/assets/vendor-65ee0d78.js +0 -889
  107. package/dist/assets/vendor-65ee0d78.js.br +0 -0
  108. package/dist/availability.js +0 -2
  109. package/dist/availability.js.br +0 -0
  110. package/dist/event.js +0 -2
  111. package/dist/event.js.br +0 -0
  112. package/dist/gift-card-validation.js +0 -2
  113. package/dist/gift-card-validation.js.br +0 -0
  114. package/dist/gift-card.js +0 -2
  115. package/dist/gift-card.js.br +0 -0
  116. package/dist/hotel.js +0 -2
  117. package/dist/hotel.js.br +0 -0
  118. package/dist/manifest.json +0 -231
  119. package/dist/manifest.json.br +0 -0
  120. package/dist/navigation.js +0 -2
  121. package/dist/navigation.js.br +0 -0
  122. package/dist/polyfill.js +0 -2
@@ -0,0 +1,587 @@
1
+ import { ref as k, computed as S, defineComponent as se, openBlock as u, createBlock as M, withCtx as x, createElementVNode as i, createElementBlock as b, createVNode as m, unref as e, createCommentVNode as C, normalizeClass as de, watch as fe, onMounted as ge, resolveDirective as ve, Suspense as be, toDisplayString as oe, withDirectives as W, vShow as O, isRef as P, Fragment as he, renderList as ye, normalizeStyle as ae, pushScopeId as ke, popScopeId as Ce, createApp as _e } from "vue";
2
+ import { o as Fe, b as Z, s as X, k as ue, G as y, p as J, v as q, S as Q, r as ce, t as Ve, w as Pe, R as le, u as pe, I as Se, _ as Be, d as Te, c as ze, a as we, i as Re } from "./NumberField.vue_vue_type_style_index_0_lang-778e8361.mjs";
3
+ import { P as Ee, C as te, _ as $e, S as Ue, i as Ie } from "./index-76459611.mjs";
4
+ import { u as Le } from "./ReCaptchaVuePlugin-59863bbf.mjs";
5
+ import { T as j, _ as We } from "./SelectField.vue_vue_type_style_index_0_lang-b4fb229d.mjs";
6
+ import { C as D, L as ne, _ as qe } from "./Clickable-26efd8d0.mjs";
7
+ import "./_commonjsHelpers-10dfc225.mjs";
8
+ const re = Fe("giftCard", () => {
9
+ const { display: f } = Z(), { bearerToken: a, metaData: o } = X(ue()), l = k(y.InitialState), B = J("freshBookingName", "", void 0, { serializer: Q.string }), p = J("freshBookingEmail", "", void 0, { serializer: Q.string }), g = J("freshBookingPhone", "", void 0, { serializer: Q.string }), _ = k(""), T = k(1), E = k(!0), U = k(""), h = k({
10
+ base64: "",
11
+ type: "",
12
+ name: ""
13
+ }), n = k(void 0), s = k(0), v = k(!1), z = k(0), F = S(() => l.value === y.InitialState || l.value === y.WaitingForResponse), w = S(() => l.value === y.ReadyToPay), I = S(() => l.value === y.PaymentSuccess), V = S(() => {
14
+ const c = {
15
+ 1: {
16
+ label: q.t("giftCard.hotelType"),
17
+ data: []
18
+ },
19
+ 2: {
20
+ label: q.t("giftCard.restaurantType"),
21
+ data: []
22
+ }
23
+ }, r = o.value.places;
24
+ return r && r.forEach((t) => {
25
+ c[t.placeType].data.push(t);
26
+ }), Object.fromEntries(
27
+ Object.entries(c).filter(([, t]) => t.data.length > 0)
28
+ );
29
+ }), G = S(() => z.value !== 0), R = S(() => {
30
+ let c;
31
+ if (G.value)
32
+ c = V.value[z.value].data[0];
33
+ else if (s.value !== 0) {
34
+ const r = n.value, t = V.value[s.value].data;
35
+ t.length === 1 ? c = t[0] : r !== void 0 && t.forEach((L) => {
36
+ String(L.id) === String(r) && (c = L);
37
+ });
38
+ }
39
+ return c;
40
+ }), A = S(() => !(!B.value || !p.value || !(g.value.length >= 5) || !_.value || R.value === void 0)), N = S(() => !(l.value === y.InitialState && v.value)), K = S(() => !!(l.value === y.WaitingForResponse && v.value));
41
+ async function Y() {
42
+ l.value = y.WaitingForResponse, v.value = !0, await ce.post("http://localhost:91/api/gift-card/create", {
43
+ termsOfserviceURL: "https://freshbooking.dk",
44
+ checkoutUrl: "https://freshbooking.dk",
45
+ currencyID: o.value.currency.id,
46
+ language: Ve(),
47
+ amount: _.value,
48
+ quantity: T.value,
49
+ freeText: U.value,
50
+ showPrice: E.value,
51
+ contactName: B.value,
52
+ contactEmail: p.value,
53
+ contactPhone: g.value,
54
+ imageBase64: Pe(h.value.base64),
55
+ imageName: h.value.name,
56
+ imageFormat: h.value.type,
57
+ placeType: R.value ? R.value.placeType : void 0,
58
+ placeID: R.value ? R.value.id : void 0
59
+ }, {
60
+ headers: {
61
+ Authorization: a.value,
62
+ Accept: "application/json",
63
+ "Fresh-Booking-Ver": "4.0.1"
64
+ }
65
+ }).then((c) => {
66
+ if (v.value = !1, c.data.easyPayment) {
67
+ l.value = y.ReadyToPay;
68
+ const r = new Reepay.EmbeddedCheckout(
69
+ c.data.easyPayment.paymentID,
70
+ { html_element: "fresh-booking-gift-card-payment" }
71
+ );
72
+ r.addEventHandler(le.Accept, () => {
73
+ l.value = y.PaymentSuccess, f({
74
+ message: q.t("alert.success.giftCardOrdered"),
75
+ type: "success"
76
+ });
77
+ }), r.addEventHandler(le.Error, () => {
78
+ f({
79
+ message: q.t("booking.other.errorMessage"),
80
+ type: "warning"
81
+ });
82
+ });
83
+ } else
84
+ l.value = y.InitialState, f({
85
+ message: `${q.t("booking.other.errorMessage")} (HTTP: ${c.status})`,
86
+ type: "warning"
87
+ });
88
+ });
89
+ }
90
+ function H(c) {
91
+ z.value = c;
92
+ }
93
+ return {
94
+ moduleState: l,
95
+ name: B,
96
+ email: p,
97
+ phone: g,
98
+ value: _,
99
+ remark: U,
100
+ showValue: E,
101
+ quantity: T,
102
+ media: h,
103
+ placeId: n,
104
+ placeType: s,
105
+ showFormPage: F,
106
+ showPaymentPage: w,
107
+ showConfirmationPage: I,
108
+ places: V,
109
+ hasFilledForm: A,
110
+ hasForcedPlaceType: G,
111
+ isWaitingForResponse: K,
112
+ isMetaDataAvailable: N,
113
+ orderGiftCard: Y,
114
+ initialize: H
115
+ };
116
+ }), Me = { class: "media-selector" }, De = ["accept"], Ge = { class: "media-selector-wrapper" }, Ae = { class: "media-selector-tools" }, Ne = { key: 0 }, He = { key: 1 }, Oe = { key: 2 }, je = ["src"], xe = /* @__PURE__ */ se({
117
+ __name: "MediaSelector",
118
+ props: {
119
+ modelValue: {},
120
+ validation: { default: "image/*" },
121
+ iconColor: { default: "#000" },
122
+ label: {},
123
+ required: { type: Boolean, default: !1 }
124
+ },
125
+ emits: ["update:modelValue"],
126
+ setup(f, { emit: a }) {
127
+ const o = f, { t: l } = pe(), { display: B } = Z(), p = k(), g = S(() => o.modelValue.base64 !== "");
128
+ function _(n) {
129
+ a("update:modelValue", n);
130
+ }
131
+ function T() {
132
+ _({
133
+ base64: "",
134
+ name: "",
135
+ type: ""
136
+ }), p.value && (p.value.value = "");
137
+ }
138
+ function E() {
139
+ p.value && p.value.click();
140
+ }
141
+ function U(n, s) {
142
+ const [v, z] = [n.name, n.type], F = new FileReader();
143
+ F.onload = function(w) {
144
+ if (w.target) {
145
+ const I = w.target.result;
146
+ s({ base64: I, name: v, type: z });
147
+ } else
148
+ B({
149
+ message: l("imageUploadError"),
150
+ type: "error"
151
+ });
152
+ }, F.readAsDataURL(n);
153
+ }
154
+ async function h() {
155
+ let n;
156
+ (n = p.value.files) instanceof FileList && U(n[0], _);
157
+ }
158
+ return (n, s) => (u(), M(Se, {
159
+ label: n.label,
160
+ required: n.required,
161
+ type: "media"
162
+ }, {
163
+ default: x(() => [
164
+ i("div", Me, [
165
+ i("input", {
166
+ ref_key: "fileInput",
167
+ ref: p,
168
+ type: "file",
169
+ class: "hidden",
170
+ accept: n.validation,
171
+ single: "",
172
+ onChange: s[0] || (s[0] = (v) => h())
173
+ }, null, 40, De),
174
+ i("div", Ge, [
175
+ i("ul", Ae, [
176
+ g.value ? C("", !0) : (u(), b("li", Ne, [
177
+ m(D, {
178
+ label: e(l)("uploadFile"),
179
+ type: "button",
180
+ icon: "upload",
181
+ "icon-color": n.iconColor,
182
+ onClickEvent: s[1] || (s[1] = (v) => E())
183
+ }, null, 8, ["label", "icon-color"])
184
+ ])),
185
+ g.value ? (u(), b("li", He, [
186
+ m(D, {
187
+ label: e(l)("replaceFile"),
188
+ type: "button",
189
+ icon: "repeat-alt",
190
+ "icon-color": n.iconColor,
191
+ onClickEvent: s[2] || (s[2] = (v) => E())
192
+ }, null, 8, ["label", "icon-color"])
193
+ ])) : C("", !0),
194
+ g.value ? (u(), b("li", Oe, [
195
+ m(D, {
196
+ label: e(l)("removeFile"),
197
+ type: "button",
198
+ icon: "trash-alt",
199
+ "icon-color": n.iconColor,
200
+ onClickEvent: s[3] || (s[3] = (v) => T())
201
+ }, null, 8, ["label", "icon-color"])
202
+ ])) : C("", !0)
203
+ ]),
204
+ i("div", {
205
+ class: de([
206
+ "media-selector-previewer",
207
+ { opened: g.value }
208
+ ])
209
+ }, [
210
+ n.modelValue ? (u(), b("img", {
211
+ key: 0,
212
+ src: n.modelValue.base64
213
+ }, null, 8, je)) : C("", !0)
214
+ ], 2)
215
+ ])
216
+ ])
217
+ ]),
218
+ _: 1
219
+ }, 8, ["label", "required"]));
220
+ }
221
+ });
222
+ function ie(f) {
223
+ const a = f;
224
+ a.__i18n = a.__i18n || [], a.__i18n.push({
225
+ locale: "",
226
+ resource: {
227
+ da: {
228
+ uploadFile: (o) => {
229
+ const { normalize: l } = o;
230
+ return l(["Upload billede"]);
231
+ },
232
+ removeFile: (o) => {
233
+ const { normalize: l } = o;
234
+ return l(["Fjern billede"]);
235
+ },
236
+ replaceFile: (o) => {
237
+ const { normalize: l } = o;
238
+ return l(["Ersat billede"]);
239
+ },
240
+ imageUploadError: (o) => {
241
+ const { normalize: l } = o;
242
+ return l(["Der skete en fejl under billede upload!"]);
243
+ }
244
+ },
245
+ en: {
246
+ uploadFile: (o) => {
247
+ const { normalize: l } = o;
248
+ return l(["Upload image"]);
249
+ },
250
+ removeFile: (o) => {
251
+ const { normalize: l } = o;
252
+ return l(["Remove image"]);
253
+ },
254
+ replaceFile: (o) => {
255
+ const { normalize: l } = o;
256
+ return l(["Replace image"]);
257
+ },
258
+ imageUploadError: (o) => {
259
+ const { normalize: l } = o;
260
+ return l(["An error occurred under image upload!"]);
261
+ }
262
+ }
263
+ }
264
+ });
265
+ }
266
+ typeof ie == "function" && ie(xe);
267
+ const Ke = (f) => (ke("data-v-10b51e8f"), f = f(), Ce(), f), Ye = {
268
+ key: 0,
269
+ id: "fresh-booking-gift-card-wrapper"
270
+ }, Je = { id: "fresh-booking-gift-card-title" }, Qe = { id: "fresh-booking-gift-card-content" }, Xe = { id: "fresh-booking-gift-card-payment" }, Ze = ["innerHTML"], eo = { key: 0 }, oo = {
271
+ key: 0,
272
+ id: "fresh-booking-select-place-type"
273
+ }, ao = {
274
+ class: /* @__PURE__ */ de(["fresh-booking-label", "required"])
275
+ }, lo = { id: "fresh-booking-select-place-type-input" }, to = ["innerHTML"], no = {
276
+ key: 0,
277
+ id: "fresh-booking-gift-card-order"
278
+ }, ro = { class: "fresh-booking-panel" }, io = {
279
+ key: 1,
280
+ id: "fresh-booking-gift-card-remarks"
281
+ }, so = {
282
+ key: 2,
283
+ id: "fresh-booking-gift-card-order-minimal",
284
+ "sticky-side": "bottom"
285
+ }, uo = { id: "fresh-booking-gift-card-recaptcha" }, co = /* @__PURE__ */ Ke(() => /* @__PURE__ */ i("span", null, "Loading...", -1)), po = /* @__PURE__ */ se({
286
+ __name: "GiftCard",
287
+ props: {
288
+ accessToken: {},
289
+ accentColor: {},
290
+ buttonBackground: {},
291
+ buttonBorder: {},
292
+ buttonBorderRadius: {},
293
+ buttonColor: {},
294
+ buttonFontFamily: {},
295
+ buttonFontSize: {},
296
+ buttonTextTransform: {},
297
+ buttonFontWeight: {},
298
+ fontColor: {},
299
+ fontFamily: {},
300
+ fontSize: {},
301
+ fontWeight: {},
302
+ grayColor: {},
303
+ headerColor: {},
304
+ headerFontSize: {},
305
+ inputBackground: {},
306
+ inputBorder: {},
307
+ inputBorderRadius: {},
308
+ inputFontColor: {},
309
+ labelFontWeight: {},
310
+ labelPadding: {},
311
+ layout: {},
312
+ loadingColor: {},
313
+ panelBackground: {},
314
+ panelBorder: {},
315
+ panelBorderRadius: {},
316
+ panelPadding: {},
317
+ placeType: {},
318
+ successColor: {}
319
+ },
320
+ setup(f) {
321
+ const a = f, { t: o } = pe(), {
322
+ name: l,
323
+ email: B,
324
+ phone: p,
325
+ value: g,
326
+ remark: _,
327
+ showValue: T,
328
+ quantity: E,
329
+ media: U,
330
+ placeId: h,
331
+ placeType: n,
332
+ showFormPage: s,
333
+ showPaymentPage: v,
334
+ showConfirmationPage: z,
335
+ places: F,
336
+ hasFilledForm: w,
337
+ hasForcedPlaceType: I,
338
+ isWaitingForResponse: V,
339
+ isMetaDataAvailable: G
340
+ } = X(re()), { initialize: R, orderGiftCard: A } = re(), { isRecaptchaEnabled: N, currency: K } = X(ue()), { display: Y } = Z();
341
+ async function H() {
342
+ const r = Le();
343
+ if (N.value && r) {
344
+ await r.recaptchaLoaded();
345
+ const t = await r.executeRecaptcha("create_gift_card");
346
+ (await ce.get(`/?rest_route=/freshcase-octopus/v1/recaptcha/${t}`)).data.success ? await A() : Y({
347
+ message: o("alert.error.robot"),
348
+ type: "error"
349
+ });
350
+ } else
351
+ await A();
352
+ }
353
+ fe(n, () => {
354
+ h.value = void 0;
355
+ }), ge(() => {
356
+ R(parseInt(a.placeType));
357
+ });
358
+ const c = {
359
+ "--accentColor": a.accentColor,
360
+ "--buttonBackground": a.buttonBackground,
361
+ "--buttonBorder": a.buttonBorder,
362
+ "--buttonBorderRadius": a.buttonBorderRadius,
363
+ "--buttonFontFamily": a.buttonFontFamily,
364
+ "--buttonColor": a.buttonColor,
365
+ "--buttonFontSize": a.buttonFontSize,
366
+ "--buttonTextTransform": a.buttonTextTransform,
367
+ "--buttonFontWeight": a.buttonFontWeight,
368
+ "--fontColor": a.fontColor,
369
+ "--fontFamily": a.fontFamily,
370
+ "--fontSize": a.fontSize,
371
+ "--fontWeight": a.fontWeight,
372
+ "--grayColor": a.grayColor,
373
+ "--headerColor": a.headerColor,
374
+ "--headerFontSize": a.headerFontSize,
375
+ "--inputBackground": a.inputBackground,
376
+ "--inputBorder": a.inputBorder,
377
+ "--inputBorderRadius": a.inputBorderRadius,
378
+ "--inputFontColor": a.inputFontColor,
379
+ "--labelFontWeight": a.labelFontWeight,
380
+ "--labelPadding": a.labelPadding,
381
+ "--loadingColor": a.loadingColor,
382
+ "--panelBackground": a.panelBackground,
383
+ "--panelBorder": a.panelBorder,
384
+ "--panelBorderRadius": a.panelBorderRadius,
385
+ "--panelPadding": a.panelPadding,
386
+ "--successColor": a.successColor
387
+ };
388
+ return (r, t) => {
389
+ const L = ve("sticky");
390
+ return u(), M(be, null, {
391
+ default: x(() => [
392
+ m(Be, {
393
+ id: "fresh-booking-gift-card-module",
394
+ class: "fresh-booking-app",
395
+ type: "gift-card",
396
+ "access-token": r.accessToken,
397
+ "data-layout": r.layout,
398
+ style: c,
399
+ "sticky-container": ""
400
+ }, {
401
+ default: x(() => [
402
+ e(G) ? (u(), b("div", Ye, [
403
+ i("h4", Je, [
404
+ i("span", null, oe(e(o)("giftCard.title")), 1)
405
+ ]),
406
+ i("div", Qe, [
407
+ W(i("div", Xe, null, 512), [
408
+ [O, e(v)]
409
+ ]),
410
+ W(i("div", null, [
411
+ i("p", {
412
+ id: "fresh-booking-gift-card-description",
413
+ innerHTML: e(o)("giftCard.description")
414
+ }, null, 8, Ze),
415
+ i("form", null, [
416
+ m(j, {
417
+ modelValue: e(l),
418
+ "onUpdate:modelValue": t[0] || (t[0] = (d) => P(l) ? l.value = d : null),
419
+ type: "text",
420
+ name: "name",
421
+ autocomplete: "name",
422
+ label: e(o)("giftCard.name"),
423
+ icon: "user-alt",
424
+ "icon-color": r.accentColor,
425
+ placeholder: e(o)("giftCard.namePlaceholder"),
426
+ required: ""
427
+ }, null, 8, ["modelValue", "label", "icon-color", "placeholder"]),
428
+ m(j, {
429
+ modelValue: e(B),
430
+ "onUpdate:modelValue": t[1] || (t[1] = (d) => P(B) ? B.value = d : null),
431
+ type: "email",
432
+ name: "email",
433
+ autocomplete: "email",
434
+ label: e(o)("giftCard.email"),
435
+ icon: "at",
436
+ "icon-color": r.accentColor,
437
+ placeholder: e(o)("giftCard.emailPlaceholder"),
438
+ required: ""
439
+ }, null, 8, ["modelValue", "label", "icon-color", "placeholder"]),
440
+ m(Ee, {
441
+ modelValue: e(p),
442
+ "onUpdate:modelValue": t[2] || (t[2] = (d) => P(p) ? p.value = d : null),
443
+ icon: "phone-office",
444
+ "icon-color": r.accentColor,
445
+ label: e(o)("giftCard.phone"),
446
+ placeholder: e(o)("giftCard.phonePlaceholder"),
447
+ required: ""
448
+ }, null, 8, ["modelValue", "icon-color", "label", "placeholder"]),
449
+ e(I) ? C("", !0) : (u(), b("div", eo, [
450
+ e(F) ? (u(), b("div", oo, [
451
+ i("label", ao, [
452
+ i("span", null, oe(e(o)("giftCard.selectType")), 1)
453
+ ]),
454
+ i("div", lo, [
455
+ i("ul", null, [
456
+ (u(!0), b(he, null, ye(e(F), (d, ee) => (u(), b("li", { key: ee }, [
457
+ m(te, {
458
+ modelValue: e(n),
459
+ "onUpdate:modelValue": t[3] || (t[3] = (me) => P(n) ? n.value = me : null),
460
+ type: "radio",
461
+ name: "placeType",
462
+ val: ee,
463
+ label: d.label
464
+ }, null, 8, ["modelValue", "val", "label"])
465
+ ]))), 128))
466
+ ]),
467
+ e(F)[e(n)] && e(F)[e(n)].data.length > 1 ? (u(), M(We, {
468
+ key: 0,
469
+ modelValue: e(h),
470
+ "onUpdate:modelValue": t[4] || (t[4] = (d) => P(h) ? h.value = d : null),
471
+ placeholder: e(o)("giftCard.selectPlacePlaceholder"),
472
+ options: e(F)[e(n)].data,
473
+ labelKey: "name",
474
+ valueKey: "id",
475
+ required: ""
476
+ }, null, 8, ["modelValue", "placeholder", "options"])) : C("", !0)
477
+ ])
478
+ ])) : (u(), M(ne, {
479
+ key: 1,
480
+ color: r.loadingColor
481
+ }, null, 8, ["color"]))
482
+ ])),
483
+ m(j, {
484
+ modelValue: e(g),
485
+ "onUpdate:modelValue": t[5] || (t[5] = (d) => P(g) ? g.value = d : null),
486
+ type: "number",
487
+ name: "value",
488
+ label: e(o)("giftCard.value"),
489
+ icon: "money-bill",
490
+ "icon-color": r.accentColor,
491
+ placeholder: e(o)("giftCard.valuePlaceholder"),
492
+ suffix: e(K),
493
+ required: ""
494
+ }, null, 8, ["modelValue", "label", "icon-color", "placeholder", "suffix"]),
495
+ m(te, {
496
+ modelValue: e(T),
497
+ "onUpdate:modelValue": t[6] || (t[6] = (d) => P(T) ? T.value = d : null),
498
+ type: "checkbox",
499
+ name: "showValue",
500
+ label: e(o)("giftCard.showValue"),
501
+ checked: e(T)
502
+ }, null, 8, ["modelValue", "label", "checked"]),
503
+ C("", !0),
504
+ C("", !0)
505
+ ])
506
+ ], 512), [
507
+ [O, e(s)]
508
+ ]),
509
+ W(i("div", null, [
510
+ i("div", {
511
+ innerHTML: e(o)("giftCard.thankYou")
512
+ }, null, 8, to)
513
+ ], 512), [
514
+ [O, e(z)]
515
+ ])
516
+ ]),
517
+ r.layout !== "minimal" && e(s) ? (u(), b("div", no, [
518
+ i("div", ro, [
519
+ m(D, {
520
+ label: e(o)("giftCard.orderGiftCard"),
521
+ style: ae({
522
+ background: r.successColor
523
+ }),
524
+ "full-width": !0,
525
+ disabled: !e(w),
526
+ "is-loading": e(V),
527
+ "onUpdate:isLoading": t[9] || (t[9] = (d) => P(V) ? V.value = d : null),
528
+ onClickEvent: H
529
+ }, null, 8, ["label", "style", "disabled", "is-loading"])
530
+ ])
531
+ ])) : C("", !0),
532
+ e(s) ? (u(), b("div", io, [
533
+ m(j, {
534
+ modelValue: e(_),
535
+ "onUpdate:modelValue": t[10] || (t[10] = (d) => P(_) ? _.value = d : null),
536
+ type: "textarea",
537
+ name: "remark",
538
+ label: e(o)("giftCard.remark"),
539
+ icon: "info-circle",
540
+ "icon-color": r.accentColor,
541
+ placeholder: e(o)("giftCard.remarkPlaceholder")
542
+ }, null, 8, ["modelValue", "label", "icon-color", "placeholder"])
543
+ ])) : C("", !0),
544
+ e(s) ? W((u(), b("div", so, [
545
+ m(D, {
546
+ label: e(o)("giftCard.orderGiftCard"),
547
+ style: ae({
548
+ background: r.successColor
549
+ }),
550
+ "full-width": !0,
551
+ disabled: !e(w),
552
+ "data-test": "orderGiftCard",
553
+ "is-loading": e(V),
554
+ "onUpdate:isLoading": t[11] || (t[11] = (d) => P(V) ? V.value = d : null),
555
+ onClickEvent: H
556
+ }, null, 8, ["label", "style", "disabled", "is-loading"]),
557
+ W(i("div", uo, [
558
+ m($e)
559
+ ], 512), [
560
+ [O, e(N)]
561
+ ])
562
+ ])), [
563
+ [L]
564
+ ]) : C("", !0)
565
+ ])) : (u(), M(ne, { key: 1 }))
566
+ ]),
567
+ _: 1
568
+ }, 8, ["access-token", "data-layout"])
569
+ ]),
570
+ fallback: x(() => [
571
+ co
572
+ ]),
573
+ _: 1
574
+ });
575
+ };
576
+ }
577
+ });
578
+ const mo = /* @__PURE__ */ qe(po, [["__scopeId", "data-v-10b51e8f"]]);
579
+ process.env.NODE_ENV === "production" && Te.flare.light();
580
+ const fo = ze(), $ = _e({ components: { GiftCard: mo } });
581
+ $.use(we.flareVue);
582
+ $.use(fo);
583
+ $.use(Re);
584
+ $.use(Ue);
585
+ $.use(Ie, { bootstrap: !1 });
586
+ $.mount("#fresh-booking-gift-card-app");
587
+ //# sourceMappingURL=gift-card.es.js.map
Binary file