@revolugo/elements 6.8.3-beta.16 → 6.8.3-beta.18

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 (39) hide show
  1. package/dist/css/{revolugo.cancellationpoliciesbadge.CcLw1eDZ.css → revolugo.cancellationpoliciesbadge.BF6W5Rkn.css} +1 -1
  2. package/dist/css/{revolugo.webcomponentwrapper.CmjarAgQ.css → revolugo.webcomponentwrapper.CLc1qFgq.css} +1 -1
  3. package/dist/index.es.min.js +1 -0
  4. package/dist/index.es.min.js.map +1 -1
  5. package/dist/index.min.js +1 -1
  6. package/dist/index.min.js.map +1 -1
  7. package/dist/{revolugo.banktransferdetails.Cvzg5_Ic.min.js → revolugo.banktransferdetails.BySITPec.min.js} +4 -4
  8. package/dist/{revolugo.bookingdetailssidebar.k46HDmg6.min.js → revolugo.bookingdetailssidebar.BYzRYS22.min.js} +4 -4
  9. package/dist/{revolugo.bookingmanager.Bp3Iq-CV.min.js → revolugo.bookingmanager.nw9gGNh_.min.js} +4 -4
  10. package/dist/{revolugo.cancellationpoliciesbadge.D94ditk5.min.js → revolugo.cancellationpoliciesbadge.BeG993YZ.min.js} +4 -4
  11. package/dist/{revolugo.cancellationpoliciesbadge.props.BnLjFL5s.min.js → revolugo.cancellationpoliciesbadge.props.Dr18g1D_.min.js} +7787 -7613
  12. package/dist/{revolugo.cancellationpolicieslist.ofFI9Dx1.min.js → revolugo.cancellationpolicieslist.Ds8oi3Ea.min.js} +4 -4
  13. package/dist/{revolugo.creditcardform.DNY-xKYV.min.js → revolugo.creditcardform.By79p0Bj.min.js} +4 -4
  14. package/dist/{revolugo.creditcardpayment.DoH0pwLm.min.js → revolugo.creditcardpayment.DvO9zT4V.min.js} +4 -4
  15. package/dist/{revolugo.currencypickerbtn.DcoR1F1Y.min.js → revolugo.currencypickerbtn.CLC1mWT8.min.js} +4 -4
  16. package/dist/{revolugo.fastbookingflow.DdfGwiWZ.min.js → revolugo.fastbookingflow.Di2jU8_z.min.js} +4 -4
  17. package/dist/{revolugo.fullbookingflow.BbqC4qQ1.min.js → revolugo.fullbookingflow.DCtMc-R_.min.js} +4 -4
  18. package/dist/{revolugo.hoteldescriptionview.CBhuNO9_.min.js → revolugo.hoteldescriptionview.BjSUnjIh.min.js} +4 -4
  19. package/dist/{revolugo.hotelofferlist.DgZhb92H.min.js → revolugo.hotelofferlist.DAIv1qMO.min.js} +4 -4
  20. package/dist/revolugo.hoteloffersearchmenu.wFDKLBxy.min.js +71 -0
  21. package/dist/{revolugo.hoteloffersmap.95AMizbv.min.js → revolugo.hoteloffersmap.BKHy0T4U.min.js} +6 -6
  22. package/dist/revolugo.hoteloffersview.V2L1odGh.min.js +19 -0
  23. package/dist/{revolugo.hotelroomofferlist.deuoRfWR.min.js → revolugo.hotelroomofferlist.Kxi2PaU-.min.js} +6 -6
  24. package/dist/{revolugo.hotelroomoffersbookingflow.dTr1ET_n.min.js → revolugo.hotelroomoffersbookingflow.DVwHWQoy.min.js} +4 -4
  25. package/dist/{revolugo.hotelroomoffersearchmenu.DDi3cRLS.min.js → revolugo.hotelroomoffersearchmenu.CzlGeOLh.min.js} +6 -6
  26. package/dist/{revolugo.hotelroomoffersview.CFseu6Pj.min.js → revolugo.hotelroomoffersview.b_5VDEUw.min.js} +4 -4
  27. package/dist/{revolugo.index.wc.DevpsraD.min.js → revolugo.index.wc.CH4CMunP.min.js} +262 -295
  28. package/dist/{revolugo.langpickerbtn.B9byfQqd.min.js → revolugo.langpickerbtn.DMvledll.min.js} +4 -4
  29. package/dist/revolugo.min.js +1 -1
  30. package/dist/{revolugo.prebookform.BDFY-Ks_.min.js → revolugo.prebookform.Ct2YhDa5.min.js} +5 -5
  31. package/dist/{revolugo.roominglisteditor.B_AOuHI_.min.js → revolugo.roominglisteditor.BAH1K08N.min.js} +4 -4
  32. package/dist/revolugo.storybooktoolbar.DRJbNUi1.min.js +845 -0
  33. package/dist/{revolugo.termsandconditions.Dfp652uY.min.js → revolugo.termsandconditions.D7d-mv52.min.js} +4 -4
  34. package/dist/{revolugo.webcomponentwrapper.CEjK8-cS.min.js → revolugo.webcomponentwrapper.umNfPHAE.min.js} +1452 -1421
  35. package/package.json +1 -1
  36. package/dist/revolugo.hoteloffersearchmenu.Ojiuc5KP.min.js +0 -200
  37. package/dist/revolugo.hoteloffersview.CUcJpz15.min.js +0 -19
  38. package/dist/revolugo.index.Bz-n9tuq.min.js +0 -67
  39. package/dist/revolugo.storybooktoolbar.BamIltF8.min.js +0 -867
@@ -0,0 +1,845 @@
1
+ import { s as ve, d as T, h as Z, i as w, b as N, A as me, X as ge, j as P, a as o, w as s, k as Q, l as $, p as b, m as ee, F as H, o as A, q as he, t as ye, v as q, x as Ee, u as C, r as O, y as be, c as te, z as _e } from "./revolugo.index.wc.CH4CMunP.min.js";
2
+ import { t as we, w as Se, d as ke, B as Ce, _ as j, V as ie, b as ae, c as B, e as U, f as ne, h as oe, i as z, j as re, k as se, l as S, m as Y, n as le, u as Ae, o as Ve, s as W, W as Oe } from "./revolugo.webcomponentwrapper.umNfPHAE.min.js";
3
+ function pe(t) {
4
+ try {
5
+ if (typeof document < "u") {
6
+ window.REVOLUGO_ELEMENTS_STYLES = window.REVOLUGO_ELEMENTS_STYLES || {
7
+ sheets: [],
8
+ components: []
9
+ };
10
+ const e = import.meta.url, a = e.slice(0, e.lastIndexOf("/") + 1) + t;
11
+ window.REVOLUGO_ELEMENTS_STYLES.sheets.push(a);
12
+ for (const i of REVOLUGO_ELEMENTS_STYLES.components)
13
+ i(a);
14
+ if (t.indexOf("fonts") >= 0) {
15
+ const i = document.createElement("link");
16
+ i.rel = "stylesheet", linK.href = a, document.head.appendChild(i);
17
+ }
18
+ }
19
+ } catch (e) {
20
+ console.error("[revolugo-elements] ", e);
21
+ }
22
+ }
23
+ var M = {};
24
+ /*!
25
+ * cookie
26
+ * Copyright(c) 2012-2014 Roman Shtylman
27
+ * Copyright(c) 2015 Douglas Christopher Wilson
28
+ * MIT Licensed
29
+ */
30
+ var G;
31
+ function Ke() {
32
+ if (G) return M;
33
+ G = 1, M.parse = c, M.serialize = I;
34
+ var t = Object.prototype.toString, e = Object.prototype.hasOwnProperty, a = /^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/, i = /^("?)[\u0021\u0023-\u002B\u002D-\u003A\u003C-\u005B\u005D-\u007E]*\1$/, f = /^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i, y = /^[\u0020-\u003A\u003D-\u007E]*$/;
35
+ function c(r, p) {
36
+ if (typeof r != "string")
37
+ throw new TypeError("argument str must be a string");
38
+ var n = {}, h = r.length;
39
+ if (h < 2) return n;
40
+ var _ = p && p.decode || v, d = 0, m = 0, l = 0;
41
+ do {
42
+ if (m = r.indexOf("=", d), m === -1) break;
43
+ if (l = r.indexOf(";", d), l === -1)
44
+ l = h;
45
+ else if (m > l) {
46
+ d = r.lastIndexOf(";", m - 1) + 1;
47
+ continue;
48
+ }
49
+ var k = E(r, d, m), g = u(r, m, k), F = r.slice(k, g);
50
+ if (!e.call(n, F)) {
51
+ var L = E(r, m + 1, l), D = u(r, l, L);
52
+ r.charCodeAt(L) === 34 && r.charCodeAt(D - 1) === 34 && (L++, D--);
53
+ var fe = r.slice(L, D);
54
+ n[F] = K(fe, _);
55
+ }
56
+ d = l + 1;
57
+ } while (d < h);
58
+ return n;
59
+ }
60
+ function E(r, p, n) {
61
+ do {
62
+ var h = r.charCodeAt(p);
63
+ if (h !== 32 && h !== 9) return p;
64
+ } while (++p < n);
65
+ return n;
66
+ }
67
+ function u(r, p, n) {
68
+ for (; p > n; ) {
69
+ var h = r.charCodeAt(--p);
70
+ if (h !== 32 && h !== 9) return p + 1;
71
+ }
72
+ return n;
73
+ }
74
+ function I(r, p, n) {
75
+ var h = n && n.encode || encodeURIComponent;
76
+ if (typeof h != "function")
77
+ throw new TypeError("option encode is invalid");
78
+ if (!a.test(r))
79
+ throw new TypeError("argument name is invalid");
80
+ var _ = h(p);
81
+ if (!i.test(_))
82
+ throw new TypeError("argument val is invalid");
83
+ var d = r + "=" + _;
84
+ if (!n) return d;
85
+ if (n.maxAge != null) {
86
+ var m = Math.floor(n.maxAge);
87
+ if (!isFinite(m))
88
+ throw new TypeError("option maxAge is invalid");
89
+ d += "; Max-Age=" + m;
90
+ }
91
+ if (n.domain) {
92
+ if (!f.test(n.domain))
93
+ throw new TypeError("option domain is invalid");
94
+ d += "; Domain=" + n.domain;
95
+ }
96
+ if (n.path) {
97
+ if (!y.test(n.path))
98
+ throw new TypeError("option path is invalid");
99
+ d += "; Path=" + n.path;
100
+ }
101
+ if (n.expires) {
102
+ var l = n.expires;
103
+ if (!V(l) || isNaN(l.valueOf()))
104
+ throw new TypeError("option expires is invalid");
105
+ d += "; Expires=" + l.toUTCString();
106
+ }
107
+ if (n.httpOnly && (d += "; HttpOnly"), n.secure && (d += "; Secure"), n.partitioned && (d += "; Partitioned"), n.priority) {
108
+ var k = typeof n.priority == "string" ? n.priority.toLowerCase() : n.priority;
109
+ switch (k) {
110
+ case "low":
111
+ d += "; Priority=Low";
112
+ break;
113
+ case "medium":
114
+ d += "; Priority=Medium";
115
+ break;
116
+ case "high":
117
+ d += "; Priority=High";
118
+ break;
119
+ default:
120
+ throw new TypeError("option priority is invalid");
121
+ }
122
+ }
123
+ if (n.sameSite) {
124
+ var g = typeof n.sameSite == "string" ? n.sameSite.toLowerCase() : n.sameSite;
125
+ switch (g) {
126
+ case !0:
127
+ d += "; SameSite=Strict";
128
+ break;
129
+ case "lax":
130
+ d += "; SameSite=Lax";
131
+ break;
132
+ case "strict":
133
+ d += "; SameSite=Strict";
134
+ break;
135
+ case "none":
136
+ d += "; SameSite=None";
137
+ break;
138
+ default:
139
+ throw new TypeError("option sameSite is invalid");
140
+ }
141
+ }
142
+ return d;
143
+ }
144
+ function v(r) {
145
+ return r.indexOf("%") !== -1 ? decodeURIComponent(r) : r;
146
+ }
147
+ function V(r) {
148
+ return t.call(r) === "[object Date]";
149
+ }
150
+ function K(r, p) {
151
+ try {
152
+ return p(r);
153
+ } catch {
154
+ return r;
155
+ }
156
+ }
157
+ return M;
158
+ }
159
+ var R = Ke();
160
+ function Le() {
161
+ const t = typeof global > "u" ? void 0 : global.TEST_HAS_DOCUMENT_COOKIE;
162
+ return typeof t == "boolean" ? t : typeof document == "object" && typeof document.cookie == "string";
163
+ }
164
+ function Me(t) {
165
+ return typeof t == "string" ? R.parse(t) : typeof t == "object" && t !== null ? t : {};
166
+ }
167
+ function x(t, e = {}) {
168
+ const a = Pe(t);
169
+ if (!e.doNotParse)
170
+ try {
171
+ return JSON.parse(a);
172
+ } catch {
173
+ }
174
+ return t;
175
+ }
176
+ function Pe(t) {
177
+ return t && t[0] === "j" && t[1] === ":" ? t.substr(2) : t;
178
+ }
179
+ class Re {
180
+ constructor(e, a = {}) {
181
+ this.changeListeners = [], this.HAS_DOCUMENT_COOKIE = !1, this.update = () => {
182
+ if (!this.HAS_DOCUMENT_COOKIE)
183
+ return;
184
+ const f = this.cookies;
185
+ this.cookies = R.parse(document.cookie), this._checkChanges(f);
186
+ };
187
+ const i = typeof document > "u" ? "" : document.cookie;
188
+ this.cookies = Me(e || i), this.defaultSetOptions = a, this.HAS_DOCUMENT_COOKIE = Le();
189
+ }
190
+ _emitChange(e) {
191
+ for (let a = 0; a < this.changeListeners.length; ++a)
192
+ this.changeListeners[a](e);
193
+ }
194
+ _checkChanges(e) {
195
+ new Set(Object.keys(e).concat(Object.keys(this.cookies))).forEach((i) => {
196
+ e[i] !== this.cookies[i] && this._emitChange({
197
+ name: i,
198
+ value: x(this.cookies[i])
199
+ });
200
+ });
201
+ }
202
+ _startPolling() {
203
+ this.pollingInterval = setInterval(this.update, 300);
204
+ }
205
+ _stopPolling() {
206
+ this.pollingInterval && clearInterval(this.pollingInterval);
207
+ }
208
+ get(e, a = {}) {
209
+ return a.doNotUpdate || this.update(), x(this.cookies[e], a);
210
+ }
211
+ getAll(e = {}) {
212
+ e.doNotUpdate || this.update();
213
+ const a = {};
214
+ for (let i in this.cookies)
215
+ a[i] = x(this.cookies[i], e);
216
+ return a;
217
+ }
218
+ set(e, a, i) {
219
+ i ? i = Object.assign(Object.assign({}, this.defaultSetOptions), i) : i = this.defaultSetOptions;
220
+ const f = typeof a == "string" ? a : JSON.stringify(a);
221
+ this.cookies = Object.assign(Object.assign({}, this.cookies), { [e]: f }), this.HAS_DOCUMENT_COOKIE && (document.cookie = R.serialize(e, f, i)), this._emitChange({ name: e, value: a, options: i });
222
+ }
223
+ remove(e, a) {
224
+ const i = a = Object.assign(Object.assign(Object.assign({}, this.defaultSetOptions), a), { expires: new Date(1970, 1, 1, 0, 0, 1), maxAge: 0 });
225
+ this.cookies = Object.assign({}, this.cookies), delete this.cookies[e], this.HAS_DOCUMENT_COOKIE && (document.cookie = R.serialize(e, "", i)), this._emitChange({ name: e, value: void 0, options: a });
226
+ }
227
+ addChangeListener(e) {
228
+ this.changeListeners.push(e), this.HAS_DOCUMENT_COOKIE && this.changeListeners.length === 1 && (typeof window == "object" && "cookieStore" in window ? window.cookieStore.addEventListener("change", this.update) : this._startPolling());
229
+ }
230
+ removeChangeListener(e) {
231
+ const a = this.changeListeners.indexOf(e);
232
+ a >= 0 && this.changeListeners.splice(a, 1), this.HAS_DOCUMENT_COOKIE && this.changeListeners.length === 0 && (typeof window == "object" && "cookieStore" in window ? window.cookieStore.removeEventListener("change", this.update) : this._stopPolling());
233
+ }
234
+ }
235
+ function de(t, { doNotParse: e = !1, autoUpdateDependencies: a = !1 } = {}, i = new Re()) {
236
+ const f = a ? [...t || []] : t;
237
+ let y = i.getAll({ doNotParse: !0 });
238
+ const c = ve(0), E = () => {
239
+ const u = i.getAll({ doNotParse: !0 });
240
+ Ue(
241
+ f || null,
242
+ u,
243
+ y
244
+ ) && c.value++, y = u;
245
+ };
246
+ return i.addChangeListener(E), we(() => {
247
+ i.removeChangeListener(E);
248
+ }), {
249
+ /**
250
+ * Reactive get cookie by name. If **autoUpdateDependencies = true** then it will update watching dependencies
251
+ */
252
+ get: (...u) => (a && f && !f.includes(u[0]) && f.push(u[0]), c.value, i.get(u[0], { doNotParse: e, ...u[1] })),
253
+ /**
254
+ * Reactive get all cookies
255
+ */
256
+ getAll: (...u) => (c.value, i.getAll({ doNotParse: e, ...u[0] })),
257
+ set: (...u) => i.set(...u),
258
+ remove: (...u) => i.remove(...u),
259
+ addChangeListener: (...u) => i.addChangeListener(...u),
260
+ removeChangeListener: (...u) => i.removeChangeListener(...u)
261
+ };
262
+ }
263
+ function Ue(t, e, a) {
264
+ if (!t)
265
+ return !0;
266
+ for (const i of t)
267
+ if (e[i] !== a[i])
268
+ return !0;
269
+ return !1;
270
+ }
271
+ const ue = T({
272
+ components: {
273
+ BTag: Ce
274
+ },
275
+ methods: {
276
+ closeDialog() {
277
+ this.dialog = !1, this.apiKey = this.cookies.get("apiKey");
278
+ },
279
+ async isValidApiKey() {
280
+ if (!this.apiKey)
281
+ return !1;
282
+ const t = {
283
+ apiEnvironment: window.RevolugoElements.config.apiEnvironment,
284
+ apiKey: this.apiKey,
285
+ apiVersion: me.V1,
286
+ optionalHeaders: window.RevolugoElements.config.optionalHeaders
287
+ }, e = new ge(t);
288
+ try {
289
+ return !!await e.hotels.retrieve({
290
+ id: "2yvb"
291
+ });
292
+ } catch (a) {
293
+ return console.error(a), !1;
294
+ }
295
+ },
296
+ async onSubmit() {
297
+ this.validate(), await this.updateApiKey(), this.apiKey && this.closeDialog();
298
+ },
299
+ async updateApiKey() {
300
+ try {
301
+ if (this.isLoading = !0, await this.isValidApiKey())
302
+ this.config.apiKey !== this.apiKey && this.updateConfig({
303
+ ...this.config,
304
+ apiKey: this.apiKey
305
+ }), this.cookies.set("apiKey", this.apiKey, {
306
+ expires: new Date(Date.now() + 1e3 * 60 * 60 * 24 * 365)
307
+ });
308
+ else
309
+ throw new Error("Invalid API Key");
310
+ } catch {
311
+ console.error("Invalid API Key");
312
+ } finally {
313
+ this.isLoading = !1;
314
+ }
315
+ },
316
+ validate() {
317
+ this.$refs.apiKeyEditorForm.validate();
318
+ }
319
+ },
320
+ mixins: [
321
+ Se(["config.apiEnvironment"], "updateApiKey", {
322
+ deep: !0,
323
+ immediate: !0
324
+ }),
325
+ ke
326
+ ],
327
+ name: "ApiKeyEditor",
328
+ setup() {
329
+ const t = de(["apiKey"]), { t: e } = Z(), a = w(t.get("apiKey")), i = N(
330
+ () => window.RevolugoElements.config.apiEnvironment
331
+ ), f = N(() => [
332
+ (u) => !!u || `A valid API Key is required. ${e("ApiKeyEditor.hint", {
333
+ environment: i.value
334
+ })}`
335
+ ]), y = w(!1), c = w(!1), E = w(!1);
336
+ return {
337
+ apiKey: a,
338
+ apiKeyRules: f,
339
+ cookies: t,
340
+ dialog: y,
341
+ isFormValid: c,
342
+ isLoading: E,
343
+ t: e
344
+ };
345
+ }
346
+ // eslint-disable-next-line @typescript-eslint/no-empty-object-type, @typescript-eslint/no-explicit-any
347
+ });
348
+ function J(t) {
349
+ const e = t;
350
+ e.__i18n = e.__i18n || [], e.__i18n.push({
351
+ locale: "",
352
+ resource: {
353
+ "en-US": {
354
+ ApiKeyEditor: {
355
+ hint: { t: 0, b: { t: 2, i: [{ t: 3, v: "Please, put your Publishable API Key for " }, { t: 4, k: "environment" }, { t: 3, v: " environment" }] } },
356
+ invalid: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "Provided API Key credential is not valid" } }
357
+ }
358
+ },
359
+ "fr-FR": {
360
+ ApiKeyEditor: {
361
+ hint: { t: 0, b: { t: 2, i: [{ t: 3, v: "Indiquez votre clé API Publishable pour l'environnement " }, { t: 4, k: "environment" }] } },
362
+ invalid: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "La clé API renseignée est invalide." } }
363
+ }
364
+ },
365
+ "de-DE": {
366
+ ApiKeyEditor: {
367
+ hint: { t: 0, b: { t: 2, i: [{ t: 3, v: "Bitte gib deinen Veröffentlichen API-Schlüssel für die " }, { t: 4, k: "environment" }, { t: 3, v: " Umgebung an" }] } },
368
+ invalid: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "Der angegebene API-Schlüssel ist ungültig" } }
369
+ }
370
+ },
371
+ "es-ES": {
372
+ ApiKeyEditor: {
373
+ hint: { t: 0, b: { t: 2, i: [{ t: 3, v: "Por favor, introduzca su clave API pública para el entorno " }, { t: 4, k: "environment" }] } },
374
+ invalid: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "La clave API proporcionada no es válida" } }
375
+ }
376
+ },
377
+ "it-IT": {
378
+ ApiKeyEditor: {
379
+ hint: { t: 0, b: { t: 2, i: [{ t: 3, v: "Inserisci la tua chiave API pubblica per l'ambiente " }, { t: 4, k: "environment" }] } },
380
+ invalid: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "La chiave API fornita non è valida" } }
381
+ }
382
+ },
383
+ "nl-NL": {
384
+ ApiKeyEditor: {
385
+ hint: { t: 0, b: { t: 2, i: [{ t: 3, v: "Vul hier uw Publishable API Key in voor de " }, { t: 4, k: "environment" }, { t: 3, v: " omgeving" }] } },
386
+ invalid: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "De opgegeven API Key is ongeldig" } }
387
+ }
388
+ },
389
+ "pt-PT": {
390
+ ApiKeyEditor: {
391
+ hint: { t: 0, b: { t: 2, i: [{ t: 3, v: "Por favor, coloque a sua chave API Publicável para o ambiente " }, { t: 4, k: "environment" }] } },
392
+ invalid: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "A credencial da chave API fornecida não é válida" } }
393
+ }
394
+ }
395
+ }
396
+ });
397
+ }
398
+ function Te(t, e, a, i, f, y) {
399
+ return A(), P("div", null, [
400
+ o(le, {
401
+ modelValue: t.dialog,
402
+ "onUpdate:modelValue": e[2] || (e[2] = (c) => t.dialog = c),
403
+ attach: t.$dialogAttach || void 0,
404
+ "max-width": "600px"
405
+ }, {
406
+ activator: s(({ props: c }) => [
407
+ o(S, ee(c, {
408
+ color: t.cookies.get("apiKey") ? "success" : "warning",
409
+ elevation: "0",
410
+ size: "x-small"
411
+ }), {
412
+ default: s(() => [
413
+ t.cookies.get("apiKey") ? (A(), P(H, { key: 1 }, [
414
+ o(Y, { class: "mr-2" }, {
415
+ default: s(() => e[5] || (e[5] = [
416
+ b(" fas fa-check ")
417
+ ])),
418
+ _: 1,
419
+ __: [5]
420
+ }),
421
+ e[6] || (e[6] = b(" Valid API key "))
422
+ ], 64)) : (A(), P(H, { key: 0 }, [
423
+ o(Y, { class: "mr-2" }, {
424
+ default: s(() => e[3] || (e[3] = [
425
+ b(" fas fa-exclamation ")
426
+ ])),
427
+ _: 1,
428
+ __: [3]
429
+ }),
430
+ e[4] || (e[4] = b(" No API key provided "))
431
+ ], 64))
432
+ ]),
433
+ _: 2
434
+ }, 1040, ["color"])
435
+ ]),
436
+ default: s(() => [
437
+ o(ie, null, {
438
+ default: s(() => [
439
+ o(ae, { class: "pa-4" }, {
440
+ default: s(() => [
441
+ o(B, { class: "pa-0" }, {
442
+ default: s(() => [
443
+ o(U, { "no-gutters": "" }, {
444
+ default: s(() => [
445
+ o(ne, null, {
446
+ default: s(() => [
447
+ o(oe, {
448
+ ref: "apiKeyEditorForm",
449
+ modelValue: t.isFormValid,
450
+ "onUpdate:modelValue": e[1] || (e[1] = (c) => t.isFormValid = c),
451
+ class: "m-0",
452
+ onSubmit: Q(t.onSubmit, ["prevent"])
453
+ }, {
454
+ default: s(() => [
455
+ o(z, {
456
+ modelValue: t.apiKey,
457
+ "onUpdate:modelValue": e[0] || (e[0] = (c) => t.apiKey = c),
458
+ density: "compact",
459
+ hint: t.t("ApiKeyEditor.hint", {
460
+ environment: t.config.apiEnvironment
461
+ }),
462
+ label: "API Key",
463
+ variant: "outlined",
464
+ "persistent-hint": "",
465
+ required: "",
466
+ rules: t.apiKeyRules,
467
+ onKeyup: $(t.onSubmit, ["enter"])
468
+ }, null, 8, ["modelValue", "hint", "rules", "onKeyup"])
469
+ ]),
470
+ _: 1
471
+ }, 8, ["modelValue", "onSubmit"])
472
+ ]),
473
+ _: 1
474
+ })
475
+ ]),
476
+ _: 1
477
+ })
478
+ ]),
479
+ _: 1
480
+ })
481
+ ]),
482
+ _: 1
483
+ }),
484
+ o(re, null, {
485
+ default: s(() => [
486
+ o(se),
487
+ o(S, {
488
+ color: "blue-darken-1",
489
+ size: "small",
490
+ variant: "text",
491
+ onClick: t.closeDialog
492
+ }, {
493
+ default: s(() => e[7] || (e[7] = [
494
+ b(" Close ")
495
+ ])),
496
+ _: 1,
497
+ __: [7]
498
+ }, 8, ["onClick"]),
499
+ o(S, {
500
+ class: "text-right",
501
+ color: "primary",
502
+ disabled: t.isLoading,
503
+ elevation: "0",
504
+ loading: t.isLoading,
505
+ size: "small",
506
+ onClick: t.onSubmit
507
+ }, {
508
+ default: s(() => e[8] || (e[8] = [
509
+ b(" Save ")
510
+ ])),
511
+ _: 1,
512
+ __: [8]
513
+ }, 8, ["disabled", "loading", "onClick"])
514
+ ]),
515
+ _: 1
516
+ })
517
+ ]),
518
+ _: 1
519
+ })
520
+ ]),
521
+ _: 1
522
+ }, 8, ["modelValue", "attach"])
523
+ ]);
524
+ }
525
+ typeof J == "function" && J(ue);
526
+ const Ie = /* @__PURE__ */ j(ue, [["render", Te]]), ce = /* @__PURE__ */ T({
527
+ __name: "EventMetadataEditor",
528
+ setup(t) {
529
+ const { config: e, updateConfig: a } = he(), i = de(["eventMetadata"]), { isFetching: f } = ye(Ae()), { t: y } = Z(), c = w(null), { $dialogAttach: E } = Ve(c), u = [
530
+ (m) => {
531
+ if (!m)
532
+ return !0;
533
+ try {
534
+ return (
535
+ // eslint-disable-next-line no-constant-binary-expression
536
+ !!new URL(m) || y("EventMetadataEditor.validation.imageURL")
537
+ );
538
+ } catch {
539
+ return y("EventMetadataEditor.validation.imageURL");
540
+ }
541
+ }
542
+ ], I = [
543
+ (m) => !!m || y("EventMetadataEditor.validation.name")
544
+ ], v = w(
545
+ i.get("eventMetadata") || {
546
+ dateEnd: q().add(1, "day").format("YYYY-MM-DD").toString(),
547
+ dateStart: q().format("YYYY-MM-DD").toString(),
548
+ name: ""
549
+ }
550
+ ), V = w(!1), K = w(!1), r = N({
551
+ get() {
552
+ return !v.value.dateStart || !v.value.dateEnd ? [] : W(
553
+ v.value.dateStart,
554
+ v.value.dateEnd
555
+ );
556
+ },
557
+ set(m) {
558
+ [v.value.dateStart, v.value.dateEnd] = W(...m);
559
+ }
560
+ });
561
+ function p() {
562
+ V.value = !1;
563
+ }
564
+ function n() {
565
+ return !(!v.value.name?.length || !r.value[0] || !r.value[1]);
566
+ }
567
+ function h() {
568
+ n() && (a({
569
+ ...e.value,
570
+ eventMetadata: v.value
571
+ }), i.set("eventMetadata", JSON.stringify(v)), p());
572
+ }
573
+ function _() {
574
+ h(), p();
575
+ }
576
+ function d() {
577
+ i.remove("eventMetadata"), v.value = {}, a({
578
+ ...e.value,
579
+ eventMetadata: {}
580
+ }), p();
581
+ }
582
+ return Ee(() => {
583
+ i.get("eventMetadata") && a({
584
+ ...e.value,
585
+ eventMetadata: i.get("eventMetadata")
586
+ });
587
+ }), (m, l) => {
588
+ const k = O("BDateRangePicker");
589
+ return A(), P("div", {
590
+ ref_key: "root",
591
+ ref: c
592
+ }, [
593
+ o(le, {
594
+ modelValue: V.value,
595
+ "onUpdate:modelValue": l[4] || (l[4] = (g) => V.value = g),
596
+ attach: C(E),
597
+ height: "600px",
598
+ "max-width": "600px"
599
+ }, {
600
+ activator: s(({ props: g }) => [
601
+ o(S, ee(g, {
602
+ color: C(i).get("eventMetadata") ? "success" : "warning",
603
+ elevation: "0",
604
+ size: "x-small"
605
+ }), {
606
+ default: s(() => [
607
+ b(be(v.value?.name ? `EVENT : ${v.value?.name}` : "ADD EVENT METADATA"), 1)
608
+ ]),
609
+ _: 2
610
+ }, 1040, ["color"])
611
+ ]),
612
+ default: s(() => [
613
+ o(ie, null, {
614
+ default: s(() => [
615
+ o(ae, { class: "pa-4" }, {
616
+ default: s(() => [
617
+ o(B, { class: "pa-0" }, {
618
+ default: s(() => [
619
+ o(U, { "no-gutters": "" }, {
620
+ default: s(() => [
621
+ o(ne, null, {
622
+ default: s(() => [
623
+ o(oe, {
624
+ ref: "eventMetadataEditorForm",
625
+ modelValue: K.value,
626
+ "onUpdate:modelValue": l[3] || (l[3] = (g) => K.value = g),
627
+ class: "m-0",
628
+ onSubmit: Q(_, ["prevent"])
629
+ }, {
630
+ default: s(() => [
631
+ o(z, {
632
+ modelValue: v.value.name,
633
+ "onUpdate:modelValue": l[0] || (l[0] = (g) => v.value.name = g),
634
+ density: "compact",
635
+ label: "Name of the event",
636
+ variant: "outlined",
637
+ "persistent-hint": "",
638
+ required: "",
639
+ rules: I,
640
+ onKeyup: $(_, ["enter"])
641
+ }, null, 8, ["modelValue"]),
642
+ o(z, {
643
+ modelValue: v.value.imageUrl,
644
+ "onUpdate:modelValue": l[1] || (l[1] = (g) => v.value.imageUrl = g),
645
+ density: "compact",
646
+ label: "Image URL",
647
+ variant: "outlined",
648
+ "persistent-hint": "",
649
+ rules: u,
650
+ onKeyup: $(_, ["enter"])
651
+ }, null, 8, ["modelValue"]),
652
+ o(U, null, {
653
+ default: s(() => [
654
+ o(k, {
655
+ modelValue: r.value,
656
+ "onUpdate:modelValue": l[2] || (l[2] = (g) => r.value = g)
657
+ }, null, 8, ["modelValue"])
658
+ ]),
659
+ _: 1
660
+ })
661
+ ]),
662
+ _: 1
663
+ }, 8, ["modelValue"])
664
+ ]),
665
+ _: 1
666
+ })
667
+ ]),
668
+ _: 1
669
+ })
670
+ ]),
671
+ _: 1
672
+ })
673
+ ]),
674
+ _: 1
675
+ }),
676
+ o(re, null, {
677
+ default: s(() => [
678
+ o(se),
679
+ o(S, {
680
+ color: "grey",
681
+ size: "small",
682
+ variant: "text",
683
+ onClick: p
684
+ }, {
685
+ default: s(() => l[5] || (l[5] = [
686
+ b(" Close ")
687
+ ])),
688
+ _: 1,
689
+ __: [5]
690
+ }),
691
+ o(S, {
692
+ color: "error",
693
+ disabled: C(f),
694
+ loading: C(f),
695
+ size: "small",
696
+ variant: "text",
697
+ onClick: d
698
+ }, {
699
+ default: s(() => l[6] || (l[6] = [
700
+ b(" Reset ")
701
+ ])),
702
+ _: 1,
703
+ __: [6]
704
+ }, 8, ["disabled", "loading"]),
705
+ o(S, {
706
+ color: "success",
707
+ disabled: C(f),
708
+ loading: C(f),
709
+ size: "small",
710
+ variant: "flat",
711
+ onClick: _
712
+ }, {
713
+ default: s(() => l[7] || (l[7] = [
714
+ b(" Save ")
715
+ ])),
716
+ _: 1,
717
+ __: [7]
718
+ }, 8, ["disabled", "loading"])
719
+ ]),
720
+ _: 1
721
+ })
722
+ ]),
723
+ _: 1
724
+ })
725
+ ]),
726
+ _: 1
727
+ }, 8, ["modelValue", "attach"])
728
+ ], 512);
729
+ };
730
+ }
731
+ });
732
+ function X(t) {
733
+ const e = t;
734
+ e.__i18n = e.__i18n || [], e.__i18n.push({
735
+ locale: "",
736
+ resource: {
737
+ "en-US": {
738
+ EventMetadataEditor: {
739
+ validation: {
740
+ imageURL: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "Please provide a valid URL" } },
741
+ name: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "Please provide a name" } }
742
+ }
743
+ }
744
+ },
745
+ "fr-FR": {
746
+ EventMetadataEditor: {
747
+ validation: {
748
+ imageURL: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "Veuillez fournir une URL valide d'image" } },
749
+ name: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "Veuillez entrer le nom de l'événement" } }
750
+ }
751
+ }
752
+ },
753
+ "de-DE": {
754
+ EventMetadataEditor: {
755
+ validation: {
756
+ imageURL: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "Bitte geben Sie eine gültige URL an" } },
757
+ name: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "Bitte geben Sie einen Namen an" } }
758
+ }
759
+ }
760
+ },
761
+ "es-ES": {
762
+ EventMetadataEditor: {
763
+ validation: {
764
+ imageURL: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "Por favor, introduce una URL válida" } },
765
+ name: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "Por favor, introduce un nombre" } }
766
+ }
767
+ }
768
+ },
769
+ "it-IT": {
770
+ EventMetadataEditor: {
771
+ validation: {
772
+ imageURL: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "Inserisci un URL valido" } },
773
+ name: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "Inserisci un nome" } }
774
+ }
775
+ }
776
+ },
777
+ "nl-NL": {
778
+ EventMetadataEditor: {
779
+ validation: {
780
+ imageURL: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "Geef een geldige URL op" } },
781
+ name: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "Geef een naam op" } }
782
+ }
783
+ }
784
+ },
785
+ "pt-PT": {
786
+ EventMetadataEditor: {
787
+ validation: {
788
+ imageURL: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "Por favor, introduza um URL válido" } },
789
+ name: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "Por favor, introduza um nome" } }
790
+ }
791
+ }
792
+ }
793
+ }
794
+ });
795
+ }
796
+ typeof X == "function" && X(ce);
797
+ const De = T({
798
+ components: {
799
+ ApiKeyEditor: Ie,
800
+ EventMetadataEditor: ce
801
+ },
802
+ name: "StorybookExtraToolbar"
803
+ // eslint-disable-next-line @typescript-eslint/no-empty-object-type, @typescript-eslint/no-explicit-any
804
+ }), xe = { class: "flex gap-1 px-3" };
805
+ function Ne(t, e, a, i, f, y) {
806
+ const c = O("ApiKeyEditor"), E = O("EventMetadataEditor");
807
+ return A(), te(B, {
808
+ class: "pa-0 mb-3",
809
+ fluid: ""
810
+ }, {
811
+ default: s(() => [
812
+ o(U, { "no-gutters": "" }, {
813
+ default: s(() => [
814
+ _e("div", xe, [
815
+ o(c),
816
+ o(E)
817
+ ])
818
+ ]),
819
+ _: 1
820
+ })
821
+ ]),
822
+ _: 1
823
+ });
824
+ }
825
+ const $e = /* @__PURE__ */ j(De, [["render", Ne]]), ze = T({
826
+ components: {
827
+ StorybookExtraToolbar: $e,
828
+ WebComponentWrapper: Oe
829
+ }
830
+ });
831
+ function je(t, e, a, i, f, y) {
832
+ const c = O("StorybookExtraToolbar"), E = O("WebComponentWrapper");
833
+ return A(), te(E, { "error-overlay-disabled": "" }, {
834
+ default: s(() => [
835
+ o(c)
836
+ ]),
837
+ _: 1
838
+ });
839
+ }
840
+ const He = /* @__PURE__ */ j(ze, [["render", je]]);
841
+ pe("css/revolugo.storybooktoolbar.d_cxquq9.css");
842
+ export {
843
+ He as default
844
+ };
845
+ //# sourceMappingURL=revolugo.storybooktoolbar.DRJbNUi1.min.js.map