@konnectio/core 4.0.2 → 4.0.3

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