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