@wix/bookings 1.0.1786 → 1.0.1787

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 (51) hide show
  1. package/build/cjs/context-booking-checkout.d.ts +22 -6
  2. package/build/cjs/context-booking-checkout.js +2296 -2253
  3. package/build/cjs/context-booking-checkout.js.map +1 -1
  4. package/build/cjs/context-categories.js +285 -275
  5. package/build/cjs/context-categories.js.map +1 -1
  6. package/build/cjs/context-locations.js +465 -455
  7. package/build/cjs/context-locations.js.map +1 -1
  8. package/build/cjs/context-service-addons.js +964 -917
  9. package/build/cjs/context-service-addons.js.map +1 -1
  10. package/build/cjs/context-service.d.ts +14 -5
  11. package/build/cjs/context-service.js +3514 -3337
  12. package/build/cjs/context-service.js.map +1 -1
  13. package/build/cjs/context-services.js +878 -832
  14. package/build/cjs/context-services.js.map +1 -1
  15. package/build/cjs/context-time-slots.d.ts +10 -0
  16. package/build/cjs/context-time-slots.js +1202 -1159
  17. package/build/cjs/context-time-slots.js.map +1 -1
  18. package/build/es/context-booking-checkout.d.mts +22 -6
  19. package/build/es/context-booking-checkout.mjs +2304 -2261
  20. package/build/es/context-booking-checkout.mjs.map +1 -1
  21. package/build/es/context-categories.mjs +285 -275
  22. package/build/es/context-categories.mjs.map +1 -1
  23. package/build/es/context-locations.mjs +465 -455
  24. package/build/es/context-locations.mjs.map +1 -1
  25. package/build/es/context-service-addons.mjs +971 -924
  26. package/build/es/context-service-addons.mjs.map +1 -1
  27. package/build/es/context-service.d.mts +14 -5
  28. package/build/es/context-service.mjs +3383 -3206
  29. package/build/es/context-service.mjs.map +1 -1
  30. package/build/es/context-services.mjs +878 -832
  31. package/build/es/context-services.mjs.map +1 -1
  32. package/build/es/context-time-slots.d.mts +10 -0
  33. package/build/es/context-time-slots.mjs +1222 -1179
  34. package/build/es/context-time-slots.mjs.map +1 -1
  35. package/build/internal/cjs/context-booking-checkout.d.ts +22 -6
  36. package/build/internal/cjs/context-service.d.ts +14 -5
  37. package/build/internal/cjs/context-time-slots.d.ts +10 -0
  38. package/build/internal/es/context-booking-checkout.d.mts +22 -6
  39. package/build/internal/es/context-service.d.mts +14 -5
  40. package/build/internal/es/context-time-slots.d.mts +10 -0
  41. package/context-runtime/context-booking-checkout/runtime.d.ts +22 -6
  42. package/context-runtime/context-booking-checkout/runtime.js +3 -3
  43. package/context-runtime/context-categories/runtime.js +2 -2
  44. package/context-runtime/context-locations/runtime.js +2 -2
  45. package/context-runtime/context-service/runtime.d.ts +14 -5
  46. package/context-runtime/context-service/runtime.js +3 -3
  47. package/context-runtime/context-service-addons/runtime.js +2 -2
  48. package/context-runtime/context-services/runtime.js +3 -3
  49. package/context-runtime/context-time-slots/runtime.d.ts +10 -0
  50. package/context-runtime/context-time-slots/runtime.js +3 -3
  51. package/package.json +2 -2
@@ -88,67 +88,67 @@ function ie(e5) {
88
88
  }
89
89
  }
90
90
  var ae = { id: `_id`, createdDate: `_createdDate`, updatedDate: `_updatedDate` };
91
- function oe(e5) {
92
- return de(e5).map((e6) => e6.toLocaleUpperCase()).join(`_`);
93
- }
94
- var se = /([\p{Ll}\d])(\p{Lu})/gu;
95
- var ce = /(\p{Lu})([\p{Lu}][\p{Ll}])/gu;
96
- var le = `$1\0$2`;
97
- var ue = /[^\p{L}\d]+/giu;
98
- function de(e5) {
91
+ function T(e5) {
92
+ return ue(e5).map((e6) => e6.toLocaleUpperCase()).join(`_`);
93
+ }
94
+ var oe = /([\p{Ll}\d])(\p{Lu})/gu;
95
+ var se = /(\p{Lu})([\p{Lu}][\p{Ll}])/gu;
96
+ var ce = `$1\0$2`;
97
+ var le = /[^\p{L}\d]+/giu;
98
+ function ue(e5) {
99
99
  let t2 = e5.trim();
100
- t2 = t2.replace(se, le).replace(ce, le), t2 = t2.replace(ue, `\0`);
100
+ t2 = t2.replace(oe, ce).replace(se, ce), t2 = t2.replace(le, `\0`);
101
101
  let n2 = 0, r2 = t2.length;
102
102
  for (; t2.charAt(n2) === `\0`; ) n2++;
103
103
  if (n2 === r2) return [];
104
104
  for (; t2.charAt(r2 - 1) === `\0`; ) r2--;
105
105
  return t2.slice(n2, r2).split(/\0/g);
106
106
  }
107
- var fe = (e5) => `validationError` in (e5.response?.data?.details ?? {});
108
- var pe = (e5) => `applicationError` in (e5.response?.data?.details ?? {});
109
- var me = (e5) => (e5.response?.status ?? -1) >= 400 && (e5.response?.status ?? -1) < 500;
110
- function he(e5, t2 = { explicitPathsToArguments: {}, spreadPathsToArguments: {}, singleArgumentUnchanged: false }, n2 = []) {
107
+ var de = (e5) => `validationError` in (e5.response?.data?.details ?? {});
108
+ var fe = (e5) => `applicationError` in (e5.response?.data?.details ?? {});
109
+ var pe = (e5) => (e5.response?.status ?? -1) >= 400 && (e5.response?.status ?? -1) < 500;
110
+ function me(e5, t2 = { explicitPathsToArguments: {}, spreadPathsToArguments: {}, singleArgumentUnchanged: false }, n2 = []) {
111
111
  if (typeof e5 != `object` || !e5) throw e5;
112
- if (fe(e5)) return ge(e5, t2, n2);
113
- if (pe(e5)) return _e(e5);
114
- if (me(e5)) {
115
- let t3 = e5.response?.status, n3 = e5.response?.statusText ?? `UNKNOWN`, r2 = e5.response?.data?.message ?? n3, i2 = { applicationError: { description: n3, code: oe(n3), data: {} }, requestId: e5.requestId };
116
- return T(e5, { message: JSON.stringify({ message: r2, details: i2 }, null, 2), extraProperties: { details: i2, status: t3 } });
112
+ if (de(e5)) return he(e5, t2, n2);
113
+ if (fe(e5)) return ge(e5);
114
+ if (pe(e5)) {
115
+ let t3 = e5.response?.status, n3 = e5.response?.statusText ?? `UNKNOWN`, r2 = e5.response?.data?.message ?? n3, i2 = { applicationError: { description: n3, code: T(n3), data: {} }, requestId: e5.requestId };
116
+ return E(e5, { message: JSON.stringify({ message: r2, details: i2 }, null, 2), extraProperties: { details: i2, status: t3 } });
117
117
  }
118
- return ve(e5);
118
+ return _e(e5);
119
119
  }
120
- var ge = (e5, t2, n2) => {
121
- let r2 = e5.response?.data, i2 = e5.requestId, { fieldViolations: a2 } = r2.details.validationError, o2 = ye(t2, a2, n2)?.sort((e6, t3) => e6.field < t3.field ? -1 : 1), s2 = `INVALID_ARGUMENT: ${o2?.map(({ field: e6, description: t3 }) => `"${e6}" ${t3}`)?.join(`, `)}`, c2 = { validationError: { fieldViolations: o2 }, requestId: i2 };
122
- return T(e5, { message: JSON.stringify({ message: s2, details: c2 }, null, 2), extraProperties: { details: c2, status: e5.response?.status, requestId: i2 } });
120
+ var he = (e5, t2, n2) => {
121
+ let r2 = e5.response?.data, i2 = e5.requestId, { fieldViolations: a2 } = r2.details.validationError, o2 = ve(t2, a2, n2)?.sort((e6, t3) => e6.field < t3.field ? -1 : 1), s2 = `INVALID_ARGUMENT: ${o2?.map(({ field: e6, description: t3 }) => `"${e6}" ${t3}`)?.join(`, `)}`, c2 = { validationError: { fieldViolations: o2 }, requestId: i2 };
122
+ return E(e5, { message: JSON.stringify({ message: s2, details: c2 }, null, 2), extraProperties: { details: c2, status: e5.response?.status, requestId: i2 } });
123
123
  };
124
- var T = (e5, { message: t2, extraProperties: n2 }) => Object.assign(e5, { ...n2, message: t2 });
125
- var _e = (e5) => {
126
- let t2 = e5.response?.status, n2 = e5.response?.statusText ?? `UNKNOWN`, r2 = e5.response?.data?.message ?? n2, i2 = e5.response?.data?.details?.applicationError?.description ?? n2, a2 = e5.response?.data?.details?.applicationError?.code ?? oe(n2), o2 = e5.response?.data?.details?.applicationError?.data ?? {}, s2 = r2 === i2 ? r2 : `${r2}: ${i2}`, c2 = { applicationError: { description: i2, code: a2, data: o2 }, requestId: e5.requestId };
127
- return T(e5, { message: JSON.stringify({ message: s2, details: c2 }, null, 2), extraProperties: { details: c2, status: t2, requestId: e5.requestId } });
124
+ var E = (e5, { message: t2, extraProperties: n2 }) => Object.assign(e5, { ...n2, message: t2 });
125
+ var ge = (e5) => {
126
+ let t2 = e5.response?.status, n2 = e5.response?.statusText ?? `UNKNOWN`, r2 = e5.response?.data?.message ?? n2, i2 = e5.response?.data?.details?.applicationError?.description ?? n2, a2 = e5.response?.data?.details?.applicationError?.code ?? T(n2), o2 = e5.response?.data?.details?.applicationError?.data ?? {}, s2 = r2 === i2 ? r2 : `${r2}: ${i2}`, c2 = { applicationError: { description: i2, code: a2, data: o2 }, requestId: e5.requestId };
127
+ return E(e5, { message: JSON.stringify({ message: s2, details: c2 }, null, 2), extraProperties: { details: c2, status: t2, requestId: e5.requestId } });
128
128
  };
129
- var ve = (e5) => T(e5, { message: e5.requestId ? `System error occurred, request-id: ${e5.requestId}` : `System error occurred: ${JSON.stringify(e5)}`, extraProperties: { requestId: e5.requestId, status: e5.response?.status, code: oe(e5.response?.statusText ?? `UNKNOWN`), ...!e5.response && { runtimeError: e5 } } });
130
- var ye = ({ spreadPathsToArguments: e5, explicitPathsToArguments: t2, singleArgumentUnchanged: n2 }, r2, i2) => {
129
+ var _e = (e5) => E(e5, { message: e5.requestId ? `System error occurred, request-id: ${e5.requestId}` : `System error occurred: ${JSON.stringify(e5)}`, extraProperties: { requestId: e5.requestId, status: e5.response?.status, code: T(e5.response?.statusText ?? `UNKNOWN`), ...!e5.response && { runtimeError: e5 } } });
130
+ var ve = ({ spreadPathsToArguments: e5, explicitPathsToArguments: t2, singleArgumentUnchanged: n2 }, r2, i2) => {
131
131
  let a2 = { ...e5, ...t2 }, o2 = Object.keys(a2);
132
132
  return r2?.filter((e6) => !r2.some((t3) => t3.field.length > e6.field.length && t3.field.startsWith(e6.field) && o2.includes(t3.field))).map((e6) => {
133
133
  let r3 = t2[e6.field];
134
- if (r3) return { ...e6, field: be(r3, i2) };
134
+ if (r3) return { ...e6, field: ye(r3, i2) };
135
135
  let s2 = o2?.sort((e7, t3) => t3.length - e7.length)?.find((t3) => e6.field.startsWith(t3));
136
136
  if (s2) {
137
137
  let t3 = a2[s2];
138
- if (t3) return { ...e6, field: e6.field.replace(s2, be(t3, i2)) };
138
+ if (t3) return { ...e6, field: e6.field.replace(s2, ye(t3, i2)) };
139
139
  }
140
140
  return n2 ? { ...e6, field: `${i2[0]}.${e6.field}` } : e6;
141
141
  });
142
142
  };
143
- var be = (e5, t2) => {
144
- let n2 = xe(e5);
143
+ var ye = (e5, t2) => {
144
+ let n2 = be(e5);
145
145
  return n2 == null ? e5 : e5.replace(`$[${n2}]`, t2[n2]);
146
146
  };
147
- var xe = (e5) => {
147
+ var be = (e5) => {
148
148
  let t2 = e5.match(/\$\[(?<argIndex>\d+)\]/);
149
149
  return t2 && t2.groups && Number(t2.groups.argIndex);
150
150
  };
151
- function Se(e5, t2, n2, r2, i2, a2, o2, s2, c2, l2, u2) {
151
+ function xe(e5, t2, n2, r2, i2, a2, o2, s2, c2, l2, u2) {
152
152
  return ie(() => e5({ request: async (e6) => {
153
153
  let i3 = e6({ host: s2?.HTTPHost || `www.wixapis.com` }), a3 = i3;
154
154
  a3.method === `GET` && a3.fallback?.length && (a3.params?.toString().length ?? 0) > 4e3 && (a3 = i3.fallback[0]);
@@ -162,7 +162,7 @@ function Se(e5, t2, n2, r2, i2, a2, o2, s2, c2, l2, u2) {
162
162
  e8 = await s3.json();
163
163
  } catch {
164
164
  }
165
- let t3 = we(s3.status, e8?.message ?? s3.statusText, e8?.details, { requestId: s3.headers.get(`X-Wix-Request-Id`), details: e8 }), n3 = he(t3);
165
+ let t3 = Ce(s3.status, e8?.message ?? s3.statusText, e8?.details, { requestId: s3.headers.get(`X-Wix-Request-Id`), details: e8 }), n3 = me(t3);
166
166
  throw r2?.handleError(n3, { requestOptions: { url: a3.url, method: a3.method, entityFqdn: i3.entityFqdn, methodFqn: i3.methodFqn } }), t3;
167
167
  }
168
168
  let l3 = await s3.json();
@@ -172,18 +172,18 @@ function Se(e5, t2, n2, r2, i2, a2, o2, s2, c2, l2, u2) {
172
172
  }
173
173
  }, fetchWithAuth: n2, wixAPIFetch: i2, getActiveToken: a2, getAuthHeaders: o2 }, { validateRequestSchema: u2 }));
174
174
  }
175
- var Ce = class extends Error {
175
+ var Se = class extends Error {
176
176
  response;
177
177
  requestId;
178
178
  constructor(e5) {
179
179
  super(), this.response = e5.response, this.requestId = e5.requestId;
180
180
  }
181
181
  };
182
- var we = (e5, t2, n2, r2) => new Ce({ response: { data: { details: { ...!n2?.validationError && { applicationError: { description: t2, code: e5, data: r2 } }, ...n2 }, message: t2 }, status: e5 }, requestId: r2?.requestId });
183
- var Te = `.`;
184
- function Ee(e5, t2, n2) {
182
+ var Ce = (e5, t2, n2, r2) => new Se({ response: { data: { details: { ...!n2?.validationError && { applicationError: { description: t2, code: e5, data: r2 } }, ...n2 }, message: t2 }, status: e5 }, requestId: r2?.requestId });
183
+ var we = `.`;
184
+ function Te(e5, t2, n2) {
185
185
  if (e5 == null) throw Error(`Cannot set value on null or undefined`);
186
- let r2 = De(t2), i2 = e5;
186
+ let r2 = Ee(t2), i2 = e5;
187
187
  for (let e6 = 0; e6 < r2.length; e6++) {
188
188
  let t3 = r2[e6];
189
189
  if (e6 === r2.length - 1) {
@@ -195,21 +195,21 @@ function Ee(e5, t2, n2) {
195
195
  }
196
196
  return e5;
197
197
  }
198
- function De(e5) {
199
- return Array.isArray(e5) ? e5 : e5.split(Te).map((e6) => Oe(e6) ? Number(e6) : e6);
198
+ function Ee(e5) {
199
+ return Array.isArray(e5) ? e5 : e5.split(we).map((e6) => De(e6) ? Number(e6) : e6);
200
200
  }
201
- function Oe(e5) {
201
+ function De(e5) {
202
202
  return /^\d+$/.test(e5);
203
203
  }
204
- function ke(e5) {
204
+ function Oe(e5) {
205
205
  let t2 = {};
206
- for (let [n2, r2] of Object.entries(e5)) Ae(n2) || Ee(t2, De(n2), r2);
206
+ for (let [n2, r2] of Object.entries(e5)) ke(n2) || Te(t2, Ee(n2), r2);
207
207
  return t2;
208
208
  }
209
- function Ae(e5) {
209
+ function ke(e5) {
210
210
  return e5 === `__proto__` || e5 === `constructor` || e5 === `prototype`;
211
211
  }
212
- var je = class {
212
+ var Ae = class {
213
213
  BRACKET_PATTERN = /\[(\d+)\]/g;
214
214
  NUMERIC_PATTERN = /^\d+$/;
215
215
  ESCAPED_DOT_PATTERN = /\\\./g;
@@ -232,7 +232,7 @@ var je = class {
232
232
  return e5.replace(this.ESCAPED_DOT_PLACEHOLDER, `\\.`).replace(this.ESCAPED_RIGHT_BRACKET_PLACEHOLDER, `\\]`).replace(this.ESCAPED_LEFT_BRACKET_PLACEHOLDER, `\\[`);
233
233
  }
234
234
  unflatten() {
235
- return this.cleanedModifiedFields = Object.fromEntries(Object.entries(this.modifiedFields).map(([e5, t2]) => [this.replaceEscapedCharacters(this.bracketToDotNotation(e5)), t2])), ke(this.cleanedModifiedFields);
235
+ return this.cleanedModifiedFields = Object.fromEntries(Object.entries(this.modifiedFields).map(([e5, t2]) => [this.replaceEscapedCharacters(this.bracketToDotNotation(e5)), t2])), Oe(this.cleanedModifiedFields);
236
236
  }
237
237
  flatten(e5) {
238
238
  let t2 = {};
@@ -257,7 +257,7 @@ var je = class {
257
257
  r2.push(i3), n2 = t3[i3];
258
258
  return;
259
259
  }
260
- let a3 = Fe(e6);
260
+ let a3 = Pe(e6);
261
261
  if (a3 && a3 in t3) {
262
262
  r2.push(a3), n2 = t3[a3];
263
263
  return;
@@ -288,28 +288,28 @@ var je = class {
288
288
  return e5.replace(this.BRACKET_PATTERN, (t2, n2, r2) => r2 > 0 && e5[r2 - 1] === `\\` ? t2 : `.` + n2);
289
289
  }
290
290
  };
291
- function Me(e5, t2) {
291
+ function je(e5, t2) {
292
292
  let n2 = e5?.modifiedFields;
293
293
  if (!n2) return null;
294
- let r2 = Ne(n2);
294
+ let r2 = Me(n2);
295
295
  if (!r2) return null;
296
296
  let { unflattenedModifiedFields: i2, modifiedFieldsManipulator: a2 } = r2;
297
297
  e5 = { ...e5, modifiedFields: i2 };
298
298
  let o2 = t2(e5), s2 = o2?.modifiedFields;
299
299
  if (!s2) return null;
300
- let c2 = Pe(s2, a2);
300
+ let c2 = Ne(s2, a2);
301
301
  return c2 === null ? null : (o2.modifiedFields = c2, o2);
302
302
  }
303
- function Ne(e5) {
303
+ function Me(e5) {
304
304
  if (typeof e5 == `object` && e5 && !Array.isArray(e5)) try {
305
- let t2 = new je(e5);
305
+ let t2 = new Ae(e5);
306
306
  return { unflattenedModifiedFields: t2.unflatten(), modifiedFieldsManipulator: t2 };
307
307
  } catch {
308
308
  return null;
309
309
  }
310
310
  return null;
311
311
  }
312
- function Pe(e5, t2) {
312
+ function Ne(e5, t2) {
313
313
  if (typeof e5 == `object` && e5 && !Array.isArray(e5)) try {
314
314
  return t2.flatten(e5);
315
315
  } catch {
@@ -317,10 +317,10 @@ function Pe(e5, t2) {
317
317
  }
318
318
  return null;
319
319
  }
320
- function Fe(e5) {
320
+ function Pe(e5) {
321
321
  return e5.replace(/[-_\s]+(.)?/g, (e6, t2) => t2 ? t2.toUpperCase() : ``).replace(/^./, (e6) => e6.toLowerCase());
322
322
  }
323
- function Ie() {
323
+ function Fe() {
324
324
  return { emit(e5, ...t2) {
325
325
  for (let n2 = 0, r2 = this.events[e5] || [], i2 = r2.length; n2 < i2; n2++) r2[n2](...t2);
326
326
  }, events: {}, on(e5, t2) {
@@ -329,8 +329,8 @@ function Ie() {
329
329
  };
330
330
  } };
331
331
  }
332
- var Le = (e5) => e5.__type === `event-definition`;
333
- function Re(e5, t2, n2, r2) {
332
+ var Ie = (e5) => e5.__type === `event-definition`;
333
+ function Le(e5, t2, n2, r2) {
334
334
  let i2;
335
335
  if (e5.isDomainEvent) {
336
336
  let { deletedEvent: e6, actionEvent: t3, createdEvent: a3, updatedEvent: o3, ...s3 } = n2, c2 = { ...r2, ...s3 };
@@ -341,14 +341,14 @@ function Re(e5, t2, n2, r2) {
341
341
  let e6 = s2.modifiedFields;
342
342
  if (typeof e6 == `object` && e6 && !Array.isArray(e6)) {
343
343
  o2 = structuredClone(i2);
344
- let e7 = Me(s2, a2);
344
+ let e7 = je(s2, a2);
345
345
  if (e7) return t2(e7);
346
346
  }
347
347
  }
348
348
  return t2(a2(o2));
349
349
  }
350
- function ze(e5) {
351
- let t2 = /* @__PURE__ */ new Map(), n2 = Ie();
350
+ function Re(e5) {
351
+ let t2 = /* @__PURE__ */ new Map(), n2 = Fe();
352
352
  return { initModule(e6) {
353
353
  return (r2) => {
354
354
  let i2 = t2.get(e6.type) ?? [];
@@ -358,7 +358,7 @@ function ze(e5) {
358
358
  let { eventType: r2, identity: i2, instanceId: a2, payload: o2, accountInfo: s2 } = await this.parseJWT(e6), c2 = [...n3.expectedEvents, ...Array.from(t2.keys()).map((e7) => ({ type: e7 }))];
359
359
  if (c2.length > 0 && !c2.some(({ type: e7 }) => e7 === r2)) throw Error(`Unexpected event type: ${r2}. Expected one of: ${c2.map((e7) => e7.type).join(`, `)}`);
360
360
  let l2 = t2.get(r2) ?? [];
361
- return await Promise.all(l2.map(({ eventDefinition: e7, handler: t3 }) => Re(e7, t3, o2, { instanceId: a2, identity: i2, accountInfo: s2 }))), { instanceId: a2, eventType: r2, payload: o2, identity: i2, accountInfo: s2 };
361
+ return await Promise.all(l2.map(({ eventDefinition: e7, handler: t3 }) => Le(e7, t3, o2, { instanceId: a2, identity: i2, accountInfo: s2 }))), { instanceId: a2, eventType: r2, payload: o2, identity: i2, accountInfo: s2 };
362
362
  }, async processRequest(e6, t3) {
363
363
  let n3 = await e6.text();
364
364
  return this.process(n3, t3);
@@ -377,12 +377,12 @@ function ze(e5) {
377
377
  let n3 = Array.from(t2.keys()).map((e7) => ({ type: e7 }));
378
378
  if (n3.length > 0 && !n3.some(({ type: t3 }) => t3 === e6.eventType)) throw Error(`Unexpected event type: ${e6.eventType}. Expected one of: ${n3.map((e7) => e7.type).join(`, `)}`);
379
379
  let r2 = t2.get(e6.eventType) ?? [];
380
- await Promise.all(r2.map(({ eventDefinition: t3, handler: n4 }) => Re(t3, n4, e6.payload, { instanceId: e6.instanceId, identity: e6.identity })));
380
+ await Promise.all(r2.map(({ eventDefinition: t3, handler: n4 }) => Le(t3, n4, e6.payload, { instanceId: e6.instanceId, identity: e6.identity })));
381
381
  }, apps: { AppInstalled: m(`AppInstalled`)(), AppRemoved: m(`AppRemoved`)() } } };
382
382
  }
383
- var Be = (e5) => e5.__type === `service-plugin-definition`;
384
- function Ve(e5) {
385
- let t2 = /* @__PURE__ */ new Map(), n2 = Ie();
383
+ var ze = (e5) => e5.__type === `service-plugin-definition`;
384
+ function Be(e5) {
385
+ let t2 = /* @__PURE__ */ new Map(), n2 = Fe();
386
386
  return { initModule(e6) {
387
387
  return (r2) => {
388
388
  let i2 = t2.get(e6.componentType.toLowerCase()) ?? [];
@@ -423,38 +423,38 @@ function Ve(e5) {
423
423
  return s2.transformations.toREST(await c2(s2.transformations.fromREST(e6)));
424
424
  } } };
425
425
  }
426
- var E = `X-Wix-Consistent`;
427
- function He(e5) {
426
+ var D = `X-Wix-Consistent`;
427
+ function Ve(e5) {
428
428
  let t2 = e5.headers || { Authorization: `` }, n2 = { getAuthHeaders: (e6) => Promise.resolve({ headers: {} }) }, r2 = e5.auth, i2 = typeof r2 == `function` ? r2 : () => r2 ?? n2, a2 = () => i2().getAuthHeaders(e5.host), o2 = () => e5.fetch ?? fetch, s2 = async (n3, r3) => {
429
- let i3 = o2(), s3 = await a2(), c3 = { ...r3?.headers ?? {}, ...s3.headers, ...e5.host?.essentials?.passThroughHeaders, ...t2[`X-Wix-Consistent`] ? { [E]: t2[E] } : {} }, l3 = e5.host?.getErrorHandler?.();
429
+ let i3 = o2(), s3 = await a2(), c3 = { ...r3?.headers ?? {}, ...s3.headers, ...e5.host?.essentials?.passThroughHeaders, ...t2[`X-Wix-Consistent`] ? { [D]: t2[D] } : {} }, l3 = e5.host?.getErrorHandler?.();
430
430
  try {
431
431
  if (typeof n3 == `string` || n3 instanceof URL) {
432
432
  let e6 = await i3(n3, { ...r3, headers: c3 });
433
433
  l3?.handleError(e6, { requestOptions: { url: n3.toString(), method: r3?.method } });
434
- let a3 = D(e6);
435
- return a3 && (t2[E] = a3), e6;
434
+ let a3 = O(e6);
435
+ return a3 && (t2[D] = a3), e6;
436
436
  }
437
437
  {
438
438
  for (let [e7, t3] of Object.entries(c3)) typeof t3 == `string` && n3.headers.set(e7, t3);
439
439
  let e6 = await i3(n3, r3);
440
440
  l3?.handleError(e6, { requestOptions: { url: n3.url, method: r3?.method } });
441
- let a3 = D(e6);
442
- return a3 && (t2[E] = a3), e6;
441
+ let a3 = O(e6);
442
+ return a3 && (t2[D] = a3), e6;
443
443
  }
444
444
  } catch (e6) {
445
445
  throw l3?.handleError(e6, { requestOptions: { url: typeof n3 == `string` || n3 instanceof URL ? n3.toString() : n3.url, method: r3?.method } }), e6;
446
446
  }
447
- }, { client: c2, initModule: l2 } = Ve(i2), { client: u2, initModule: d2 } = ze(i2), f2 = async (n3, r3) => {
448
- let i3 = o2(), s3 = await a2(), c3 = ee(r3), l3 = await i3(n3, { ...r3, headers: { ...c3, ...t2, ...s3?.headers, ...r3?.headers, ...e5.host?.essentials?.passThroughHeaders, ...t2[`X-Wix-Consistent`] ? { [E]: t2[E] } : {} } }), u3 = D(l3);
449
- return u3 && (t2[E] = u3), l3;
447
+ }, { client: c2, initModule: l2 } = Be(i2), { client: u2, initModule: d2 } = Re(i2), f2 = async (n3, r3) => {
448
+ let i3 = o2(), s3 = await a2(), c3 = ee(r3), l3 = await i3(n3, { ...r3, headers: { ...c3, ...t2, ...s3?.headers, ...r3?.headers, ...e5.host?.essentials?.passThroughHeaders, ...t2[`X-Wix-Consistent`] ? { [D]: t2[D] } : {} } }), u3 = O(l3);
449
+ return u3 && (t2[D] = u3), l3;
450
450
  }, m2 = (t3, n3) => {
451
- if (Le(t3)) return d2(t3);
452
- if (Be(t3)) return l2(t3);
451
+ if (Ie(t3)) return d2(t3);
452
+ if (ze(t3)) return l2(t3);
453
453
  if (S(t3) && e5.host) return C(t3, e5.host);
454
454
  if (typeof t3 == `function`) {
455
455
  if (`__type` in t3 && t3.__type === `wix_spi_error`) return t3;
456
456
  let r3 = e5.host?.apiBaseUrl ?? `www.wixapis.com`, o3 = e5.useCDN === void 0 ? i2().shouldUseCDN : e5.useCDN;
457
- return Se(ie(() => _(t3)) ? g(t3) : t3, n3 ?? {}, f2, e5.host?.getErrorHandler?.(), (e6, t4) => {
457
+ return xe(ie(() => _(t3)) ? g(t3) : t3, n3 ?? {}, f2, e5.host?.getErrorHandler?.(), (e6, t4) => {
458
458
  let n4 = new URL(e6, `https://${r3}`);
459
459
  return n4.host = r3, n4.protocol = `https`, f2(n4.toString(), t4);
460
460
  }, i2().getActiveToken, async () => a2(), { HTTPHost: r3 }, e5.host?.name, o3, e5.validateRequestSchema);
@@ -478,19 +478,19 @@ function He(e5) {
478
478
  return { data: o3 ?? {}, errors: s3 };
479
479
  }, webhooks: u2, servicePlugins: c2 };
480
480
  }
481
- function D(e5) {
481
+ function O(e5) {
482
482
  return e5.headers?.get(`X-Wix-Consistent`) ?? e5.headers?.get(`x-wix-consistent`);
483
483
  }
484
- var Ue = { _id: `id`, _createdDate: `createdDate`, _updatedDate: `updatedDate` };
485
- var We = { id: `_id`, createdDate: `_createdDate`, updatedDate: `_updatedDate` };
486
- function Ge(e5, t2) {
484
+ var He = { _id: `id`, _createdDate: `createdDate`, _updatedDate: `updatedDate` };
485
+ var Ue = { id: `_id`, createdDate: `_createdDate`, updatedDate: `_updatedDate` };
486
+ function We(e5, t2) {
487
487
  return e5?.split(`.`).map((e6) => t2?.[e6] ?? e6).join(`.`);
488
488
  }
489
- var Ke = `sort.fieldName`;
490
- function qe(e5, t2, n2) {
491
- return (e5 === Ke || e5.endsWith(`.${Ke}`)) && typeof t2 == `string` ? Ge(t2, n2) : t2;
489
+ var Ge = `sort.fieldName`;
490
+ function Ke(e5, t2, n2) {
491
+ return (e5 === Ge || e5.endsWith(`.${Ge}`)) && typeof t2 == `string` ? We(t2, n2) : t2;
492
492
  }
493
- function Je(e5, t2, n2) {
493
+ function qe(e5, t2, n2) {
494
494
  let r2 = (e6) => n2.includes(e6), i2 = (e6, n3) => {
495
495
  if (Array.isArray(e6)) e6.forEach((e7) => {
496
496
  i2(e7, n3);
@@ -500,144 +500,144 @@ function Je(e5, t2, n2) {
500
500
  Object.keys(a2).forEach((e7) => {
501
501
  let o2 = n3 === `` ? e7 : `${n3}.${e7}`;
502
502
  if (r2(o2)) return;
503
- let s2 = Ye(e7, t2);
504
- s2 !== e7 && !(s2 in a2) && (a2[s2] = a2[e7], delete a2[e7]), a2[s2] = qe(o2, a2[s2], t2), i2(a2[s2], o2);
503
+ let s2 = Je(e7, t2);
504
+ s2 !== e7 && !(s2 in a2) && (a2[s2] = a2[e7], delete a2[e7]), a2[s2] = Ke(o2, a2[s2], t2), i2(a2[s2], o2);
505
505
  });
506
506
  }
507
507
  };
508
508
  return i2(e5, ``), e5;
509
509
  }
510
- function Ye(e5, t2) {
510
+ function Je(e5, t2) {
511
511
  let n2;
512
512
  return n2 = e5.includes(`.`) ? e5.split(`.`).map((e6) => t2[e6] ?? e6).join(`.`) : t2[e5] ?? e5, n2;
513
513
  }
514
- function Xe(e5, t2 = []) {
515
- return Je(e5, Ue, t2);
514
+ function Ye(e5, t2 = []) {
515
+ return qe(e5, He, t2);
516
516
  }
517
- function Ze(e5, t2 = []) {
518
- return Je(e5, We, t2);
517
+ function Xe(e5, t2 = []) {
518
+ return qe(e5, Ue, t2);
519
519
  }
520
- var Qe = /* @__PURE__ */ new WeakMap();
521
- function O() {
520
+ var Ze = /* @__PURE__ */ new WeakMap();
521
+ function k() {
522
522
  return { leaves: void 0, fields: void 0, mapFields: void 0, anyField: void 0 };
523
523
  }
524
- function $e(e5, t2) {
524
+ function Qe(e5, t2) {
525
525
  let n2 = e5.get(t2);
526
- return n2 || (n2 = O(), e5.set(t2, n2)), n2;
526
+ return n2 || (n2 = k(), e5.set(t2, n2)), n2;
527
527
  }
528
- function et(e5, t2) {
529
- return t2 === `*` ? (e5.anyField ??= O(), e5.anyField) : t2.endsWith(`{}`) ? (e5.mapFields ??= /* @__PURE__ */ new Map(), $e(e5.mapFields, t2.slice(0, -2))) : (e5.fields ??= /* @__PURE__ */ new Map(), $e(e5.fields, t2));
528
+ function $e(e5, t2) {
529
+ return t2 === `*` ? (e5.anyField ??= k(), e5.anyField) : t2.endsWith(`{}`) ? (e5.mapFields ??= /* @__PURE__ */ new Map(), Qe(e5.mapFields, t2.slice(0, -2))) : (e5.fields ??= /* @__PURE__ */ new Map(), Qe(e5.fields, t2));
530
530
  }
531
- function tt(e5) {
532
- let t2 = O();
531
+ function et(e5) {
532
+ let t2 = k();
533
533
  for (let n2 of e5) {
534
- let e6 = n2.path.split(`.`).reduce(et, t2);
534
+ let e6 = n2.path.split(`.`).reduce($e, t2);
535
535
  e6.leaves ??= [], e6.leaves.push(n2);
536
536
  }
537
537
  return t2;
538
538
  }
539
- function nt(e5) {
540
- let t2 = Qe.get(e5);
541
- return t2 || (t2 = tt(e5), Qe.set(e5, t2)), t2;
539
+ function tt(e5) {
540
+ let t2 = Ze.get(e5);
541
+ return t2 || (t2 = et(e5), Ze.set(e5, t2)), t2;
542
542
  }
543
- function k(e5) {
543
+ function A(e5) {
544
544
  return typeof e5 == `object` && !!e5;
545
545
  }
546
- function rt(e5, { isRepeated: t2, isMap: n2 }, r2) {
547
- return t2 ? Array.isArray(e5) ? e5.map(r2) : e5 : n2 ? k(e5) ? Object.fromEntries(Object.entries(e5).map(([e6, t3]) => [e6, r2(t3)])) : e5 : r2(e5);
546
+ function nt(e5, { isRepeated: t2, isMap: n2 }, r2) {
547
+ return t2 ? Array.isArray(e5) ? e5.map(r2) : e5 : n2 ? A(e5) ? Object.fromEntries(Object.entries(e5).map(([e6, t3]) => [e6, r2(t3)])) : e5 : r2(e5);
548
548
  }
549
- function A(e5, t2, n2) {
550
- k(e5) && ot(e5, t2, n2);
549
+ function j(e5, t2, n2) {
550
+ A(e5) && at(e5, t2, n2);
551
551
  }
552
- function it(e5, t2, n2) {
552
+ function rt(e5, t2, n2) {
553
553
  for (let [r2, i2] of t2) {
554
554
  if (!(r2 in e5)) continue;
555
- if (i2.leaves) for (let t4 of i2.leaves) e5[r2] = rt(e5[r2], t4, n2);
555
+ if (i2.leaves) for (let t4 of i2.leaves) e5[r2] = nt(e5[r2], t4, n2);
556
556
  let t3 = e5[r2];
557
- Array.isArray(t3) ? t3.forEach((e6) => A(e6, i2, n2)) : A(t3, i2, n2);
557
+ Array.isArray(t3) ? t3.forEach((e6) => j(e6, i2, n2)) : j(t3, i2, n2);
558
558
  }
559
559
  }
560
- function at(e5, t2, n2) {
560
+ function it(e5, t2, n2) {
561
561
  for (let [r2, i2] of t2) {
562
562
  let t3 = e5[r2];
563
- k(t3) && Object.values(t3).forEach((e6) => A(e6, i2, n2));
563
+ A(t3) && Object.values(t3).forEach((e6) => j(e6, i2, n2));
564
564
  }
565
565
  }
566
- function ot(e5, { fields: t2, mapFields: n2, anyField: r2 }, i2) {
567
- t2 && it(e5, t2, i2), n2 && at(e5, n2, i2), r2 && Object.values(e5).forEach((e6) => A(e6, r2, i2));
566
+ function at(e5, { fields: t2, mapFields: n2, anyField: r2 }, i2) {
567
+ t2 && rt(e5, t2, i2), n2 && it(e5, n2, i2), r2 && Object.values(e5).forEach((e6) => j(e6, r2, i2));
568
568
  }
569
- function st(e5, t2) {
570
- if (!k(e5)) return e5;
571
- for (let { paths: n2, transformFn: r2 } of t2) ot(e5, nt(n2), r2);
569
+ function ot(e5, t2) {
570
+ if (!A(e5)) return e5;
571
+ for (let { paths: n2, transformFn: r2 } of t2) at(e5, tt(n2), r2);
572
572
  return e5;
573
573
  }
574
- function ct(e5) {
574
+ function st(e5) {
575
575
  return Object.fromEntries(Object.entries(e5).filter(([, e6]) => e6 !== void 0));
576
576
  }
577
- function j(e5) {
578
- return pt(e5).map((e6) => e6.toLocaleUpperCase()).join(`_`);
577
+ function M(e5) {
578
+ return ft(e5).map((e6) => e6.toLocaleUpperCase()).join(`_`);
579
579
  }
580
- var lt = /([\p{Ll}\d])(\p{Lu})/gu;
581
- var ut = /(\p{Lu})([\p{Lu}][\p{Ll}])/gu;
582
- var dt = `$1\0$2`;
583
- var ft = /[^\p{L}\d]+/giu;
584
- function pt(e5) {
580
+ var ct = /([\p{Ll}\d])(\p{Lu})/gu;
581
+ var lt = /(\p{Lu})([\p{Lu}][\p{Ll}])/gu;
582
+ var ut = `$1\0$2`;
583
+ var dt = /[^\p{L}\d]+/giu;
584
+ function ft(e5) {
585
585
  let t2 = e5.trim();
586
- t2 = t2.replace(lt, dt).replace(ut, dt), t2 = t2.replace(ft, `\0`);
586
+ t2 = t2.replace(ct, ut).replace(lt, ut), t2 = t2.replace(dt, `\0`);
587
587
  let n2 = 0, r2 = t2.length;
588
588
  for (; t2.charAt(n2) === `\0`; ) n2++;
589
589
  if (n2 === r2) return [];
590
590
  for (; t2.charAt(r2 - 1) === `\0`; ) r2--;
591
591
  return t2.slice(n2, r2).split(/\0/g);
592
592
  }
593
- var mt = (e5) => `validationError` in (e5.response?.data?.details ?? {});
594
- var ht = (e5) => `applicationError` in (e5.response?.data?.details ?? {});
595
- var gt = (e5) => (e5.response?.status ?? -1) >= 400 && (e5.response?.status ?? -1) < 500;
596
- function _t(e5, t2 = { explicitPathsToArguments: {}, spreadPathsToArguments: {}, singleArgumentUnchanged: false }, n2 = []) {
593
+ var pt = (e5) => `validationError` in (e5.response?.data?.details ?? {});
594
+ var mt = (e5) => `applicationError` in (e5.response?.data?.details ?? {});
595
+ var ht = (e5) => (e5.response?.status ?? -1) >= 400 && (e5.response?.status ?? -1) < 500;
596
+ function gt(e5, t2 = { explicitPathsToArguments: {}, spreadPathsToArguments: {}, singleArgumentUnchanged: false }, n2 = []) {
597
597
  if (typeof e5 != `object` || !e5) throw e5;
598
- if (mt(e5)) return vt(e5, t2, n2);
599
- if (ht(e5)) return yt(e5);
600
- if (gt(e5)) {
601
- let t3 = e5.response?.status, n3 = e5.response?.statusText ?? `UNKNOWN`, r2 = e5.response?.data?.message ?? n3, i2 = { applicationError: { description: n3, code: j(n3), data: {} }, requestId: e5.requestId };
602
- return M(e5, { message: JSON.stringify({ message: r2, details: i2 }, null, 2), extraProperties: { details: i2, status: t3 } });
598
+ if (pt(e5)) return _t(e5, t2, n2);
599
+ if (mt(e5)) return vt(e5);
600
+ if (ht(e5)) {
601
+ let t3 = e5.response?.status, n3 = e5.response?.statusText ?? `UNKNOWN`, r2 = e5.response?.data?.message ?? n3, i2 = { applicationError: { description: n3, code: M(n3), data: {} }, requestId: e5.requestId };
602
+ return N(e5, { message: JSON.stringify({ message: r2, details: i2 }, null, 2), extraProperties: { details: i2, status: t3 } });
603
603
  }
604
- return bt(e5);
604
+ return yt(e5);
605
605
  }
606
- var vt = (e5, t2, n2) => {
607
- let r2 = e5.response?.data, i2 = e5.requestId, { fieldViolations: a2 } = r2.details.validationError, o2 = xt(t2, a2, n2)?.sort((e6, t3) => e6.field < t3.field ? -1 : 1), s2 = `INVALID_ARGUMENT: ${o2?.map(({ field: e6, description: t3 }) => `"${e6}" ${t3}`)?.join(`, `)}`, c2 = { validationError: { fieldViolations: o2 }, requestId: i2 };
608
- return M(e5, { message: JSON.stringify({ message: s2, details: c2 }, null, 2), extraProperties: { details: c2, status: e5.response?.status, requestId: i2 } });
606
+ var _t = (e5, t2, n2) => {
607
+ let r2 = e5.response?.data, i2 = e5.requestId, { fieldViolations: a2 } = r2.details.validationError, o2 = bt(t2, a2, n2)?.sort((e6, t3) => e6.field < t3.field ? -1 : 1), s2 = `INVALID_ARGUMENT: ${o2?.map(({ field: e6, description: t3 }) => `"${e6}" ${t3}`)?.join(`, `)}`, c2 = { validationError: { fieldViolations: o2 }, requestId: i2 };
608
+ return N(e5, { message: JSON.stringify({ message: s2, details: c2 }, null, 2), extraProperties: { details: c2, status: e5.response?.status, requestId: i2 } });
609
609
  };
610
- var M = (e5, { message: t2, extraProperties: n2 }) => Object.assign(e5, { ...n2, message: t2 });
611
- var yt = (e5) => {
612
- let t2 = e5.response?.status, n2 = e5.response?.statusText ?? `UNKNOWN`, r2 = e5.response?.data?.message ?? n2, i2 = e5.response?.data?.details?.applicationError?.description ?? n2, a2 = e5.response?.data?.details?.applicationError?.code ?? j(n2), o2 = e5.response?.data?.details?.applicationError?.data ?? {}, s2 = r2 === i2 ? r2 : `${r2}: ${i2}`, c2 = { applicationError: { description: i2, code: a2, data: o2 }, requestId: e5.requestId };
613
- return M(e5, { message: JSON.stringify({ message: s2, details: c2 }, null, 2), extraProperties: { details: c2, status: t2, requestId: e5.requestId } });
610
+ var N = (e5, { message: t2, extraProperties: n2 }) => Object.assign(e5, { ...n2, message: t2 });
611
+ var vt = (e5) => {
612
+ let t2 = e5.response?.status, n2 = e5.response?.statusText ?? `UNKNOWN`, r2 = e5.response?.data?.message ?? n2, i2 = e5.response?.data?.details?.applicationError?.description ?? n2, a2 = e5.response?.data?.details?.applicationError?.code ?? M(n2), o2 = e5.response?.data?.details?.applicationError?.data ?? {}, s2 = r2 === i2 ? r2 : `${r2}: ${i2}`, c2 = { applicationError: { description: i2, code: a2, data: o2 }, requestId: e5.requestId };
613
+ return N(e5, { message: JSON.stringify({ message: s2, details: c2 }, null, 2), extraProperties: { details: c2, status: t2, requestId: e5.requestId } });
614
614
  };
615
- var bt = (e5) => M(e5, { message: e5.requestId ? `System error occurred, request-id: ${e5.requestId}` : `System error occurred: ${JSON.stringify(e5)}`, extraProperties: { requestId: e5.requestId, status: e5.response?.status, code: j(e5.response?.statusText ?? `UNKNOWN`), ...!e5.response && { runtimeError: e5 } } });
616
- var xt = ({ spreadPathsToArguments: e5, explicitPathsToArguments: t2, singleArgumentUnchanged: n2 }, r2, i2) => {
615
+ var yt = (e5) => N(e5, { message: e5.requestId ? `System error occurred, request-id: ${e5.requestId}` : `System error occurred: ${JSON.stringify(e5)}`, extraProperties: { requestId: e5.requestId, status: e5.response?.status, code: M(e5.response?.statusText ?? `UNKNOWN`), ...!e5.response && { runtimeError: e5 } } });
616
+ var bt = ({ spreadPathsToArguments: e5, explicitPathsToArguments: t2, singleArgumentUnchanged: n2 }, r2, i2) => {
617
617
  let a2 = { ...e5, ...t2 }, o2 = Object.keys(a2);
618
618
  return r2?.filter((e6) => !r2.some((t3) => t3.field.length > e6.field.length && t3.field.startsWith(e6.field) && o2.includes(t3.field))).map((e6) => {
619
619
  let r3 = t2[e6.field];
620
- if (r3) return { ...e6, field: St(r3, i2) };
620
+ if (r3) return { ...e6, field: xt(r3, i2) };
621
621
  let s2 = o2?.sort((e7, t3) => t3.length - e7.length)?.find((t3) => e6.field.startsWith(t3));
622
622
  if (s2) {
623
623
  let t3 = a2[s2];
624
- if (t3) return { ...e6, field: e6.field.replace(s2, St(t3, i2)) };
624
+ if (t3) return { ...e6, field: e6.field.replace(s2, xt(t3, i2)) };
625
625
  }
626
626
  return n2 ? { ...e6, field: `${i2[0]}.${e6.field}` } : e6;
627
627
  });
628
628
  };
629
- var St = (e5, t2) => {
630
- let n2 = Ct(e5);
629
+ var xt = (e5, t2) => {
630
+ let n2 = St(e5);
631
631
  return n2 == null ? e5 : e5.replace(`$[${n2}]`, t2[n2]);
632
632
  };
633
- var Ct = (e5) => {
633
+ var St = (e5) => {
634
634
  let t2 = e5.match(/\$\[(?<argIndex>\d+)\]/);
635
635
  return t2 && t2.groups && Number(t2.groups.argIndex);
636
636
  };
637
- function wt() {
637
+ function Ct() {
638
638
  let e5 = typeof $wixContext < `u` && $wixContext.initWixModules ? $wixContext.initWixModules : globalThis.__wix_context__ !== void 0 && globalThis.__wix_context__.initWixModules ? globalThis.__wix_context__.initWixModules : void 0;
639
639
  if (e5) return { initWixModules(t3, n3) {
640
- return N(() => e5(t3, n3));
640
+ return wt(() => e5(t3, n3));
641
641
  }, fetchWithAuth() {
642
642
  throw Error(`fetchWithAuth is not available in this context`);
643
643
  }, graphql() {
@@ -647,10 +647,10 @@ function wt() {
647
647
  if (t2 || n2) return { initWixModules(e6, r2) {
648
648
  if (r2) {
649
649
  if (!n2) throw Error(`An elevated client is required to use elevated modules. Make sure to initialize the Wix context with an elevated client before using elevated SDK modules`);
650
- return N(() => n2.use(e6));
650
+ return wt(() => n2.use(e6));
651
651
  }
652
652
  if (!t2) throw Error(`Wix context is not available. Make sure to initialize the Wix context before using SDK modules`);
653
- return N(() => t2.use(e6));
653
+ return wt(() => t2.use(e6));
654
654
  }, fetchWithAuth: (e6, n3) => {
655
655
  if (!t2) throw Error(`Wix context is not available. Make sure to initialize the Wix context before using SDK modules`);
656
656
  return t2.fetchWithAuth(e6, n3);
@@ -662,7 +662,7 @@ function wt() {
662
662
  return t2.graphql(e6, n3, r2);
663
663
  } };
664
664
  }
665
- function N(e5) {
665
+ function wt(e5) {
666
666
  let t2 = globalThis.__wix_context__, n2 = { client: p.client, elevatedClient: p.elevatedClient }, r2;
667
667
  globalThis.__wix_context__ = void 0, p.client = void 0, p.elevatedClient = void 0, typeof $wixContext < `u` && (r2 = { client: $wixContext?.client, elevatedClient: $wixContext?.elevatedClient }, delete $wixContext.client, delete $wixContext.elevatedClient);
668
668
  try {
@@ -673,7 +673,7 @@ function N(e5) {
673
673
  }
674
674
  function Tt(e5, t2) {
675
675
  return (...n2) => {
676
- let r2 = wt();
676
+ let r2 = Ct();
677
677
  return r2 ? r2.initWixModules(e5, t2).apply(void 0, n2) : e5.apply(void 0, n2);
678
678
  };
679
679
  }
@@ -758,7 +758,7 @@ function Xt(e5) {
758
758
  return e5 === `NaN` ? NaN : e5 === `Infinity` ? 1 / 0 : e5 === `-Infinity` ? -1 / 0 : e5;
759
759
  }
760
760
  function Zt(e5) {
761
- return e5 && ct({ formatted: e5.formattedAddress, location: e5.geocode, addressLine1: e5.addressLine, addressLine2: e5.addressLine2, streetAddress: e5.streetAddress && { name: e5.streetAddress.name, number: e5.streetAddress.number, apt: e5.streetAddress.apt, formattedAddressLine: e5.streetAddress.formattedAddressLine }, hint: e5.hint, city: e5.city, subdivision: e5.subdivision, country: e5.country, postalCode: e5.postalCode, countryFullname: e5.countryFullname, subdivisionFullname: e5.subdivisionFullname });
761
+ return e5 && st({ formatted: e5.formattedAddress, location: e5.geocode, addressLine1: e5.addressLine, addressLine2: e5.addressLine2, streetAddress: e5.streetAddress && { name: e5.streetAddress.name, number: e5.streetAddress.number, apt: e5.streetAddress.apt, formattedAddressLine: e5.streetAddress.formattedAddressLine }, hint: e5.hint, city: e5.city, subdivision: e5.subdivision, country: e5.country, postalCode: e5.postalCode, countryFullname: e5.countryFullname, subdivisionFullname: e5.subdivisionFullname });
762
762
  }
763
763
  var P;
764
764
  (function(e5) {
@@ -862,30 +862,36 @@ function dn(e5) {
862
862
  return console.warn(`[Multilingual Manager] cleanCurrentUrl failed`, e6), t2;
863
863
  }
864
864
  }
865
- var fn = `x-wix-linguist`;
866
- var pn = `00000000-0000-0000-0000-000000000000`;
867
- var mn = `false`;
868
- var hn = () => {
865
+ var fn = `x-wix-currency`;
866
+ var pn = () => {
867
+ let e5 = F(`currency`);
868
+ if (e5) return { [fn]: e5 };
869
+ };
870
+ var mn = `x-wix-linguist`;
871
+ var hn = `00000000-0000-0000-0000-000000000000`;
872
+ var gn = `false`;
873
+ var _n = () => {
869
874
  let e5 = F(`language`), t2 = F(`locale`);
870
- if (e5) return { [fn]: [e5, t2 || e5, mn, pn].join(`|`) };
875
+ if (e5) return { [mn]: [e5, t2 || e5, gn, hn].join(`|`) };
871
876
  };
872
- function gn() {
877
+ function vn() {
873
878
  let e5 = null, t2 = null;
874
879
  return { promise: new Promise((n2, r2) => {
875
880
  e5 = n2, t2 = r2;
876
881
  }), resolve: e5, reject: t2 };
877
882
  }
878
- var _n = () => (typeof window < `u` ? window.commonConfig : void 0) ?? globalThis.commonConfig;
879
- var F = (e5) => _n()?.[e5];
880
- var vn = ({ createHost: e5 }) => ({ __type: `host`, create: (e6) => ({}), host: (t2) => {
881
- let { applicationId: n2, componentId: r2 } = t2 ?? {}, i2 = typeof window < `u` ? window.wixEmbedsAPI : void 0, a2 = e5(t2), o2 = bn();
883
+ var yn = () => (typeof window < `u` ? window.commonConfig : void 0) ?? globalThis.commonConfig;
884
+ var F = (e5) => yn()?.[e5];
885
+ var bn = ({ createHost: e5 }) => ({ __type: `host`, create: (e6) => ({}), host: (t2) => {
886
+ let { applicationId: n2, componentId: r2 } = t2 ?? {}, i2 = typeof window < `u` ? window.wixEmbedsAPI : void 0, a2 = e5(t2), o2 = Sn();
882
887
  return { ...a2, apiBaseUrl: o2, getMonitoringClient: i2?.getMonitoringClientFunction?.(n2, r2), essentials: { language: F(`language`), locale: F(`locale`), get passThroughHeaders() {
883
- return hn();
888
+ let e6 = { ..._n(), ...pn() };
889
+ return Object.keys(e6).length > 0 ? e6 : void 0;
884
890
  } } };
885
891
  }, auth: (e6) => {
886
892
  let t2 = typeof window < `u` ? window.wixEmbedsAPI : void 0;
887
- !e6 && yn() && (e6 = t2?.getAccessTokenFunction?.());
888
- let n2 = false, { resolve: r2, promise: i2 } = gn();
893
+ !e6 && xn() && (e6 = t2?.getAccessTokenFunction?.());
894
+ let n2 = false, { resolve: r2, promise: i2 } = vn();
889
895
  return { getAuthHeaders: async () => {
890
896
  if (!e6 && n2 && (e6 = await i2), !e6) throw Error(`Failed to resolve auth token`);
891
897
  return { headers: { Authorization: await e6() } };
@@ -893,34 +899,34 @@ var vn = ({ createHost: e5 }) => ({ __type: `host`, create: (e6) => ({}), host:
893
899
  r2(e7);
894
900
  }) };
895
901
  } });
896
- function yn() {
902
+ function xn() {
897
903
  return typeof document < `u` && document.currentScript?.tagName === `SCRIPT`;
898
904
  }
899
- function bn() {
905
+ function Sn() {
900
906
  let e5 = (typeof window < `u` ? window.wixEmbedsAPI : void 0)?.getExternalBaseUrl?.();
901
907
  if (!e5) return;
902
908
  let t2 = new URL(e5);
903
909
  return t2?.pathname && t2.pathname !== `/` ? `${t2.hostname}${t2.pathname}` : t2.hostname;
904
910
  }
905
- var xn = ({ clientSdk: e5, applicationId: t2 }) => ({ invoke: async ({ namespace: n2, method: r2, args: i2 }) => {
911
+ var Cn = ({ clientSdk: e5, applicationId: t2 }) => ({ invoke: async ({ namespace: n2, method: r2, args: i2 }) => {
906
912
  if (!e5) throw Error(`Wix Site SDK only works in a Wix site environment. Learn more: https://dev.wix.com/docs/sdk/host-modules/site/introduction`);
907
913
  return e5.invoke({ namespace: n2, method: r2, args: i2, applicationId: t2, accessToken: `accessToken` });
908
914
  }, getAccessToken: () => {
909
915
  throw Error(`Not implemented`);
910
916
  }, observeState: () => ({ disconnect: () => {
911
917
  } }) });
912
- var Sn = vn({ createHost: function(e5) {
918
+ var wn = bn({ createHost: function(e5) {
913
919
  let t2 = (typeof $wixContext < `u` ? $wixContext.clientSdk : void 0) ?? e5?.clientSdk ?? (typeof window < `u` ? window?.clientSdk : void 0), { applicationId: n2 } = e5 || {};
914
920
  if (!n2) throw Error(`"createHost" was called without a required field "applicationId"`);
915
- return { channel: xn({ clientSdk: t2, applicationId: n2 }), close: () => {
921
+ return { channel: Cn({ clientSdk: t2, applicationId: n2 }), close: () => {
916
922
  } };
917
923
  } });
918
- var Cn = (e5, t2) => {
919
- let n2 = Sn.host({ applicationId: e5, componentId: t2 }), r2 = Sn.auth();
920
- return He({ auth: r2, host: n2 }).enableContext(`module`), r2.getAccessTokenInjector();
924
+ var Tn = (e5, t2) => {
925
+ let n2 = wn.host({ applicationId: e5, componentId: t2 }), r2 = wn.auth();
926
+ return Ve({ auth: r2, host: n2 }).enableContext(`module`), r2.getAccessTokenInjector();
921
927
  };
922
- var wn = (e5) => Cn(`13d21c63-b5ec-5912-8397-c3a5ddb27a97`, e5);
923
- function Tn() {
928
+ var En = (e5) => Tn(`13d21c63-b5ec-5912-8397-c3a5ddb27a97`, e5);
929
+ function Dn() {
924
930
  let e5 = typeof $wixContext < `u` && $wixContext.initWixModules ? $wixContext.initWixModules : globalThis.__wix_context__ !== void 0 && globalThis.__wix_context__.initWixModules ? globalThis.__wix_context__.initWixModules : void 0;
925
931
  if (e5) return { initWixModules(t3, n3) {
926
932
  return I(() => e5(t3, n3));
@@ -957,15 +963,15 @@ function I(e5) {
957
963
  globalThis.__wix_context__ = t2, p.client = n2.client, p.elevatedClient = n2.elevatedClient, typeof $wixContext < `u` && ($wixContext.client = r2.client, $wixContext.elevatedClient = r2.elevatedClient);
958
964
  }
959
965
  }
960
- function En(e5, t2) {
966
+ function On(e5, t2) {
961
967
  return { ...e5, ...Object.fromEntries(t2.map((t3) => [t3, (...n2) => {
962
- let r2 = Tn();
968
+ let r2 = Dn();
963
969
  if (!r2) throw Error(`Wix context is not available. Make sure to initialize the Wix context before using SDK modules`);
964
970
  return r2.initWixModules(e5)[t3].apply(void 0, n2);
965
971
  }])) };
966
972
  }
967
- function Dn(e5) {
968
- return En({ __type: `host`, create: (t2) => Object.entries(e5).reduce((e6, [n2, r2]) => ({ ...e6, [n2]: r2(t2) }), {}) }, Object.keys(e5));
973
+ function kn(e5) {
974
+ return On({ __type: `host`, create: (t2) => Object.entries(e5).reduce((e6, [n2, r2]) => ({ ...e6, [n2]: r2(t2) }), {}) }, Object.keys(e5));
969
975
  }
970
976
  var L = (e5) => typeof e5 == `string`;
971
977
  var R = () => {
@@ -974,25 +980,25 @@ var R = () => {
974
980
  });
975
981
  return n2.resolve = e5, n2.reject = t2, n2;
976
982
  };
977
- var On = (e5) => e5 == null ? `` : `` + e5;
978
- var kn = (e5, t2, n2) => {
983
+ var An = (e5) => e5 == null ? `` : `` + e5;
984
+ var jn = (e5, t2, n2) => {
979
985
  e5.forEach((e6) => {
980
986
  t2[e6] && (n2[e6] = t2[e6]);
981
987
  });
982
988
  };
983
- var An = /###/g;
984
- var jn = (e5) => e5 && e5.indexOf(`###`) > -1 ? e5.replace(An, `.`) : e5;
985
- var Mn = (e5) => !e5 || L(e5);
989
+ var Mn = /###/g;
990
+ var Nn = (e5) => e5 && e5.indexOf(`###`) > -1 ? e5.replace(Mn, `.`) : e5;
991
+ var Pn = (e5) => !e5 || L(e5);
986
992
  var z = (e5, t2, n2) => {
987
993
  let r2 = L(t2) ? t2.split(`.`) : t2, i2 = 0;
988
994
  for (; i2 < r2.length - 1; ) {
989
- if (Mn(e5)) return {};
990
- let t3 = jn(r2[i2]);
995
+ if (Pn(e5)) return {};
996
+ let t3 = Nn(r2[i2]);
991
997
  !e5[t3] && n2 && (e5[t3] = new n2()), e5 = Object.prototype.hasOwnProperty.call(e5, t3) ? e5[t3] : {}, ++i2;
992
998
  }
993
- return Mn(e5) ? {} : { obj: e5, k: jn(r2[i2]) };
999
+ return Pn(e5) ? {} : { obj: e5, k: Nn(r2[i2]) };
994
1000
  };
995
- var Nn = (e5, t2, n2) => {
1001
+ var Fn = (e5, t2, n2) => {
996
1002
  let { obj: r2, k: i2 } = z(e5, t2, Object);
997
1003
  if (r2 !== void 0 || t2.length === 1) {
998
1004
  r2[i2] = n2;
@@ -1002,7 +1008,7 @@ var Nn = (e5, t2, n2) => {
1002
1008
  for (; s2.obj === void 0 && o2.length; ) a2 = `${o2[o2.length - 1]}.${a2}`, o2 = o2.slice(0, o2.length - 1), s2 = z(e5, o2, Object), s2?.obj && s2.obj[`${s2.k}.${a2}`] !== void 0 && (s2.obj = void 0);
1003
1009
  s2.obj[`${s2.k}.${a2}`] = n2;
1004
1010
  };
1005
- var Pn = (e5, t2, n2, r2) => {
1011
+ var In = (e5, t2, n2, r2) => {
1006
1012
  let { obj: i2, k: a2 } = z(e5, t2, Object);
1007
1013
  i2[a2] = i2[a2] || [], i2[a2].push(n2);
1008
1014
  };
@@ -1010,18 +1016,18 @@ var B = (e5, t2) => {
1010
1016
  let { obj: n2, k: r2 } = z(e5, t2);
1011
1017
  if (n2 && Object.prototype.hasOwnProperty.call(n2, r2)) return n2[r2];
1012
1018
  };
1013
- var Fn = (e5, t2, n2) => {
1019
+ var Ln = (e5, t2, n2) => {
1014
1020
  let r2 = B(e5, n2);
1015
1021
  return r2 === void 0 ? B(t2, n2) : r2;
1016
1022
  };
1017
- var In = (e5, t2, n2) => {
1018
- for (let r2 in t2) r2 !== `__proto__` && r2 !== `constructor` && (r2 in e5 ? L(e5[r2]) || e5[r2] instanceof String || L(t2[r2]) || t2[r2] instanceof String ? n2 && (e5[r2] = t2[r2]) : In(e5[r2], t2[r2], n2) : e5[r2] = t2[r2]);
1023
+ var Rn = (e5, t2, n2) => {
1024
+ for (let r2 in t2) r2 !== `__proto__` && r2 !== `constructor` && (r2 in e5 ? L(e5[r2]) || e5[r2] instanceof String || L(t2[r2]) || t2[r2] instanceof String ? n2 && (e5[r2] = t2[r2]) : Rn(e5[r2], t2[r2], n2) : e5[r2] = t2[r2]);
1019
1025
  return e5;
1020
1026
  };
1021
1027
  var V = (e5) => e5.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, `\\$&`);
1022
- var Ln = { "&": `&amp;`, "<": `&lt;`, ">": `&gt;`, '"': `&quot;`, "'": `&#39;`, "/": `&#x2F;` };
1023
- var Rn = (e5) => L(e5) ? e5.replace(/[&<>"'\/]/g, (e6) => Ln[e6]) : e5;
1024
- var zn = class {
1028
+ var zn = { "&": `&amp;`, "<": `&lt;`, ">": `&gt;`, '"': `&quot;`, "'": `&#39;`, "/": `&#x2F;` };
1029
+ var Bn = (e5) => L(e5) ? e5.replace(/[&<>"'\/]/g, (e6) => zn[e6]) : e5;
1030
+ var Vn = class {
1025
1031
  constructor(e5) {
1026
1032
  this.capacity = e5, this.regExpMap = /* @__PURE__ */ new Map(), this.regExpQueue = [];
1027
1033
  }
@@ -1032,13 +1038,13 @@ var zn = class {
1032
1038
  return this.regExpQueue.length === this.capacity && this.regExpMap.delete(this.regExpQueue.shift()), this.regExpMap.set(e5, n2), this.regExpQueue.push(e5), n2;
1033
1039
  }
1034
1040
  };
1035
- var Bn = [` `, `,`, `?`, `!`, `;`];
1036
- var Vn = new zn(20);
1037
- var Hn = (e5, t2, n2) => {
1041
+ var Hn = [` `, `,`, `?`, `!`, `;`];
1042
+ var Un = new Vn(20);
1043
+ var Wn = (e5, t2, n2) => {
1038
1044
  t2 ||= ``, n2 ||= ``;
1039
- let r2 = Bn.filter((e6) => t2.indexOf(e6) < 0 && n2.indexOf(e6) < 0);
1045
+ let r2 = Hn.filter((e6) => t2.indexOf(e6) < 0 && n2.indexOf(e6) < 0);
1040
1046
  if (r2.length === 0) return true;
1041
- let i2 = Vn.getRegExp(`(${r2.map((e6) => e6 === `?` ? `\\?` : e6).join(`|`)})`), a2 = !i2.test(e5);
1047
+ let i2 = Un.getRegExp(`(${r2.map((e6) => e6 === `?` ? `\\?` : e6).join(`|`)})`), a2 = !i2.test(e5);
1042
1048
  if (!a2) {
1043
1049
  let t3 = e5.indexOf(n2);
1044
1050
  t3 > 0 && !i2.test(e5.substring(0, t3)) && (a2 = true);
@@ -1062,7 +1068,7 @@ var H = (e5, t2, n2 = `.`) => {
1062
1068
  return i2;
1063
1069
  };
1064
1070
  var U = (e5) => e5?.replace(/_/g, `-`);
1065
- var Un = { type: `logger`, log(e5) {
1071
+ var Gn = { type: `logger`, log(e5) {
1066
1072
  this.output(`log`, e5);
1067
1073
  }, warn(e5) {
1068
1074
  this.output(`warn`, e5);
@@ -1076,7 +1082,7 @@ var W = new class e2 {
1076
1082
  this.init(e5, t2);
1077
1083
  }
1078
1084
  init(e5, t2 = {}) {
1079
- this.prefix = t2.prefix || `i18next:`, this.logger = e5 || Un, this.options = t2, this.debug = t2.debug;
1085
+ this.prefix = t2.prefix || `i18next:`, this.logger = e5 || Gn, this.options = t2, this.debug = t2.debug;
1080
1086
  }
1081
1087
  log(...e5) {
1082
1088
  return this.forward(e5, `log`, ``, true);
@@ -1128,7 +1134,7 @@ var G = class {
1128
1134
  });
1129
1135
  }
1130
1136
  };
1131
- var Wn = class extends G {
1137
+ var Kn = class extends G {
1132
1138
  constructor(e5, t2 = { ns: [`translation`], defaultNS: `translation` }) {
1133
1139
  super(), this.data = e5 || {}, this.options = t2, this.options.keySeparator === void 0 && (this.options.keySeparator = `.`), this.options.ignoreJSONStructure === void 0 && (this.options.ignoreJSONStructure = true);
1134
1140
  }
@@ -1147,7 +1153,7 @@ var Wn = class extends G {
1147
1153
  }
1148
1154
  addResource(e5, t2, n2, r2, i2 = { silent: false }) {
1149
1155
  let a2 = i2.keySeparator === void 0 ? this.options.keySeparator : i2.keySeparator, o2 = [e5, t2];
1150
- n2 && (o2 = o2.concat(a2 ? n2.split(a2) : n2)), e5.indexOf(`.`) > -1 && (o2 = e5.split(`.`), r2 = t2, t2 = o2[1]), this.addNamespaces(t2), Nn(this.data, o2, r2), i2.silent || this.emit(`added`, e5, t2, n2, r2);
1156
+ n2 && (o2 = o2.concat(a2 ? n2.split(a2) : n2)), e5.indexOf(`.`) > -1 && (o2 = e5.split(`.`), r2 = t2, t2 = o2[1]), this.addNamespaces(t2), Fn(this.data, o2, r2), i2.silent || this.emit(`added`, e5, t2, n2, r2);
1151
1157
  }
1152
1158
  addResources(e5, t2, n2, r2 = { silent: false }) {
1153
1159
  for (let r3 in n2) (L(n2[r3]) || Array.isArray(n2[r3])) && this.addResource(e5, t2, r3, n2[r3], { silent: true });
@@ -1157,7 +1163,7 @@ var Wn = class extends G {
1157
1163
  let o2 = [e5, t2];
1158
1164
  e5.indexOf(`.`) > -1 && (o2 = e5.split(`.`), r2 = n2, n2 = t2, t2 = o2[1]), this.addNamespaces(t2);
1159
1165
  let s2 = B(this.data, o2) || {};
1160
- a2.skipCopy || (n2 = JSON.parse(JSON.stringify(n2))), r2 ? In(s2, n2, i2) : s2 = { ...s2, ...n2 }, Nn(this.data, o2, s2), a2.silent || this.emit(`added`, e5, t2, n2);
1166
+ a2.skipCopy || (n2 = JSON.parse(JSON.stringify(n2))), r2 ? Rn(s2, n2, i2) : s2 = { ...s2, ...n2 }, Fn(this.data, o2, s2), a2.silent || this.emit(`added`, e5, t2, n2);
1161
1167
  }
1162
1168
  removeResourceBundle(e5, t2) {
1163
1169
  this.hasResourceBundle(e5, t2) && delete this.data[e5][t2], this.removeNamespaces(t2), this.emit(`removed`, e5, t2);
@@ -1179,31 +1185,31 @@ var Wn = class extends G {
1179
1185
  return this.data;
1180
1186
  }
1181
1187
  };
1182
- var Gn = { processors: {}, addPostProcessor(e5) {
1188
+ var qn = { processors: {}, addPostProcessor(e5) {
1183
1189
  this.processors[e5.name] = e5;
1184
1190
  }, handle(e5, t2, n2, r2, i2) {
1185
1191
  return e5.forEach((e6) => {
1186
1192
  t2 = this.processors[e6]?.process(t2, n2, r2, i2) ?? t2;
1187
1193
  }), t2;
1188
1194
  } };
1189
- var Kn = Symbol(`i18next/PATH_KEY`);
1190
- function qn() {
1195
+ var Jn = Symbol(`i18next/PATH_KEY`);
1196
+ function Yn() {
1191
1197
  let e5 = [], t2 = /* @__PURE__ */ Object.create(null), n2;
1192
- return t2.get = (r2, i2) => (n2?.revoke?.(), i2 === Kn ? e5 : (e5.push(i2), n2 = Proxy.revocable(r2, t2), n2.proxy)), Proxy.revocable(/* @__PURE__ */ Object.create(null), t2).proxy;
1198
+ return t2.get = (r2, i2) => (n2?.revoke?.(), i2 === Jn ? e5 : (e5.push(i2), n2 = Proxy.revocable(r2, t2), n2.proxy)), Proxy.revocable(/* @__PURE__ */ Object.create(null), t2).proxy;
1193
1199
  }
1194
1200
  function K(e5, t2) {
1195
- let { [Kn]: n2 } = e5(qn()), r2 = t2?.keySeparator ?? `.`, i2 = t2?.nsSeparator ?? `:`;
1201
+ let { [Jn]: n2 } = e5(Yn()), r2 = t2?.keySeparator ?? `.`, i2 = t2?.nsSeparator ?? `:`;
1196
1202
  if (n2.length > 1 && i2) {
1197
1203
  let e6 = t2?.ns, a2 = Array.isArray(e6) ? e6 : null;
1198
1204
  if (a2 && a2.length > 1 && a2.slice(1).includes(n2[0])) return `${n2[0]}${i2}${n2.slice(1).join(r2)}`;
1199
1205
  }
1200
1206
  return n2.join(r2);
1201
1207
  }
1202
- var Jn = {};
1203
- var Yn = (e5) => !L(e5) && typeof e5 != `boolean` && typeof e5 != `number`;
1204
- var Xn = class e3 extends G {
1208
+ var Xn = {};
1209
+ var Zn = (e5) => !L(e5) && typeof e5 != `boolean` && typeof e5 != `number`;
1210
+ var Qn = class e3 extends G {
1205
1211
  constructor(e5, t2 = {}) {
1206
- super(), kn([`resourceStore`, `languageUtils`, `pluralResolver`, `interpolator`, `backendConnector`, `i18nFormat`, `utils`], e5, this), this.options = t2, this.options.keySeparator === void 0 && (this.options.keySeparator = `.`), this.logger = W.create(`translator`);
1212
+ super(), jn([`resourceStore`, `languageUtils`, `pluralResolver`, `interpolator`, `backendConnector`, `i18nFormat`, `utils`], e5, this), this.options = t2, this.options.keySeparator === void 0 && (this.options.keySeparator = `.`), this.logger = W.create(`translator`);
1207
1213
  }
1208
1214
  changeLanguage(e5) {
1209
1215
  e5 && (this.language = e5);
@@ -1213,13 +1219,13 @@ var Xn = class e3 extends G {
1213
1219
  if (e5 == null) return false;
1214
1220
  let r2 = this.resolve(e5, n2);
1215
1221
  if (r2?.res === void 0) return false;
1216
- let i2 = Yn(r2.res);
1222
+ let i2 = Zn(r2.res);
1217
1223
  return !(n2.returnObjects === false && i2);
1218
1224
  }
1219
1225
  extractFromKey(e5, t2) {
1220
1226
  let n2 = t2.nsSeparator === void 0 ? this.options.nsSeparator : t2.nsSeparator;
1221
1227
  n2 === void 0 && (n2 = `:`);
1222
- let r2 = t2.keySeparator === void 0 ? this.options.keySeparator : t2.keySeparator, i2 = t2.ns || this.options.defaultNS || [], a2 = n2 && e5.indexOf(n2) > -1, o2 = !this.options.userDefinedKeySeparator && !t2.keySeparator && !this.options.userDefinedNsSeparator && !t2.nsSeparator && !Hn(e5, n2, r2);
1228
+ let r2 = t2.keySeparator === void 0 ? this.options.keySeparator : t2.keySeparator, i2 = t2.ns || this.options.defaultNS || [], a2 = n2 && e5.indexOf(n2) > -1, o2 = !this.options.userDefinedKeySeparator && !t2.keySeparator && !this.options.userDefinedNsSeparator && !t2.nsSeparator && !Wn(e5, n2, r2);
1223
1229
  if (a2 && !o2) {
1224
1230
  let t3 = e5.match(this.interpolator.nestingRegexp);
1225
1231
  if (t3 && t3.length > 0) return { key: e5, namespaces: L(i2) ? [i2] : i2 };
@@ -1238,7 +1244,7 @@ var Xn = class e3 extends G {
1238
1244
  if (d2?.toLowerCase() === `cimode`) return f2 ? a2 ? { res: `${l2}${u2}${s2}`, usedKey: s2, exactUsedKey: s2, usedLng: d2, usedNS: l2, usedParams: this.getUsedParamsDetails(i2) } : `${l2}${u2}${s2}` : a2 ? { res: s2, usedKey: s2, exactUsedKey: s2, usedLng: d2, usedNS: l2, usedParams: this.getUsedParamsDetails(i2) } : s2;
1239
1245
  let p2 = this.resolve(t2, i2), m2 = p2?.res, h2 = p2?.usedKey || s2, g2 = p2?.exactUsedKey || s2, _2 = [`[object Number]`, `[object Function]`, `[object RegExp]`], v2 = i2.joinArrays === void 0 ? this.options.joinArrays : i2.joinArrays, y2 = !this.i18nFormat || this.i18nFormat.handleAsObject, b2 = i2.count !== void 0 && !L(i2.count), x2 = e3.hasDefaultValue(i2), ee2 = b2 ? this.pluralResolver.getSuffix(d2, i2.count, i2) : ``, te2 = i2.ordinal && b2 ? this.pluralResolver.getSuffix(d2, i2.count, { ordinal: false }) : ``, S2 = b2 && !i2.ordinal && i2.count === 0, C2 = S2 && i2[`defaultValue${this.options.pluralSeparator}zero`] || i2[`defaultValue${ee2}`] || i2[`defaultValue${te2}`] || i2.defaultValue, w2 = m2;
1240
1246
  y2 && !m2 && x2 && (w2 = C2);
1241
- let ne2 = Yn(w2), re2 = Object.prototype.toString.apply(w2);
1247
+ let ne2 = Zn(w2), re2 = Object.prototype.toString.apply(w2);
1242
1248
  if (y2 && w2 && ne2 && _2.indexOf(re2) < 0 && !(L(v2) && Array.isArray(w2))) {
1243
1249
  if (!i2.returnObjects && !this.options.returnObjects) {
1244
1250
  this.options.returnedObjectHandler || this.logger.warn(`accessing an object - but returnObjects options is not enabled!`);
@@ -1249,7 +1255,7 @@ var Xn = class e3 extends G {
1249
1255
  let e5 = Array.isArray(w2), t3 = e5 ? [] : {}, n3 = e5 ? g2 : h2;
1250
1256
  for (let e6 in w2) if (Object.prototype.hasOwnProperty.call(w2, e6)) {
1251
1257
  let r3 = `${n3}${o2}${e6}`;
1252
- t3[e6] = x2 && !m2 ? this.translate(r3, { ...i2, defaultValue: Yn(C2) ? C2[e6] : void 0, joinArrays: false, ns: c2 }) : this.translate(r3, { ...i2, joinArrays: false, ns: c2 }), t3[e6] === r3 && (t3[e6] = w2[e6]);
1258
+ t3[e6] = x2 && !m2 ? this.translate(r3, { ...i2, defaultValue: Zn(C2) ? C2[e6] : void 0, joinArrays: false, ns: c2 }) : this.translate(r3, { ...i2, joinArrays: false, ns: c2 }), t3[e6] === r3 && (t3[e6] = w2[e6]);
1253
1259
  }
1254
1260
  m2 = t3;
1255
1261
  }
@@ -1298,7 +1304,7 @@ var Xn = class e3 extends G {
1298
1304
  !n2.lng && r2 && r2.res && (n2.lng = this.language || r2.usedLng), n2.nest !== false && (e5 = this.interpolator.nest(e5, (...e6) => i2?.[0] === e6[0] && !n2.context ? (this.logger.warn(`It seems you are nesting recursively key: ${e6[0]} in key: ${t2[0]}`), null) : this.translate(...e6, t2), n2)), n2.interpolation && this.interpolator.reset();
1299
1305
  }
1300
1306
  let a2 = n2.postProcess || this.options.postProcess, o2 = L(a2) ? [a2] : a2;
1301
- return e5 != null && o2?.length && n2.applyPostProcessor !== false && (e5 = Gn.handle(o2, e5, t2, this.options && this.options.postProcessPassResolved ? { i18nResolved: { ...r2, usedParams: this.getUsedParamsDetails(n2) }, ...n2 } : n2, this)), e5;
1307
+ return e5 != null && o2?.length && n2.applyPostProcessor !== false && (e5 = qn.handle(o2, e5, t2, this.options && this.options.postProcessPassResolved ? { i18nResolved: { ...r2, usedParams: this.getUsedParamsDetails(n2) }, ...n2 } : n2, this)), e5;
1302
1308
  }
1303
1309
  resolve(e5, t2 = {}) {
1304
1310
  let n2, r2, i2, a2, o2;
@@ -1310,7 +1316,7 @@ var Xn = class e3 extends G {
1310
1316
  this.options.fallbackNS && (l2 = l2.concat(this.options.fallbackNS));
1311
1317
  let u2 = t2.count !== void 0 && !L(t2.count), d2 = u2 && !t2.ordinal && t2.count === 0, f2 = t2.context !== void 0 && (L(t2.context) || typeof t2.context == `number`) && t2.context !== ``, p2 = t2.lngs ? t2.lngs : this.languageUtils.toResolveHierarchy(t2.lng || this.language, t2.fallbackLng);
1312
1318
  l2.forEach((e7) => {
1313
- this.isValidLookup(n2) || (o2 = e7, !Jn[`${p2[0]}-${e7}`] && this.utils?.hasLoadedNamespace && !this.utils?.hasLoadedNamespace(o2) && (Jn[`${p2[0]}-${e7}`] = true, this.logger.warn(`key "${r2}" for languages "${p2.join(`, `)}" won't get resolved as namespace "${o2}" was not yet loaded`, `This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!`)), p2.forEach((r3) => {
1319
+ this.isValidLookup(n2) || (o2 = e7, !Xn[`${p2[0]}-${e7}`] && this.utils?.hasLoadedNamespace && !this.utils?.hasLoadedNamespace(o2) && (Xn[`${p2[0]}-${e7}`] = true, this.logger.warn(`key "${r2}" for languages "${p2.join(`, `)}" won't get resolved as namespace "${o2}" was not yet loaded`, `This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!`)), p2.forEach((r3) => {
1314
1320
  if (this.isValidLookup(n2)) return;
1315
1321
  a2 = r3;
1316
1322
  let o3 = [c2];
@@ -1349,7 +1355,7 @@ var Xn = class e3 extends G {
1349
1355
  return false;
1350
1356
  }
1351
1357
  };
1352
- var Zn = class {
1358
+ var $n = class {
1353
1359
  constructor(e5) {
1354
1360
  this.options = e5, this.supportedLngs = this.options.supportedLngs || false, this.logger = W.create(`languageUtils`);
1355
1361
  }
@@ -1411,9 +1417,9 @@ var Zn = class {
1411
1417
  }), r2;
1412
1418
  }
1413
1419
  };
1414
- var Qn = { zero: 0, one: 1, two: 2, few: 3, many: 4, other: 5 };
1415
- var $n = { select: (e5) => e5 === 1 ? `one` : `other`, resolvedOptions: () => ({ pluralCategories: [`one`, `other`] }) };
1416
- var er = class {
1420
+ var er = { zero: 0, one: 1, two: 2, few: 3, many: 4, other: 5 };
1421
+ var tr = { select: (e5) => e5 === 1 ? `one` : `other`, resolvedOptions: () => ({ pluralCategories: [`one`, `other`] }) };
1422
+ var nr = class {
1417
1423
  constructor(e5, t2 = {}) {
1418
1424
  this.languageUtils = e5, this.options = t2, this.logger = W.create(`pluralResolver`), this.pluralRulesCache = {};
1419
1425
  }
@@ -1427,8 +1433,8 @@ var er = class {
1427
1433
  try {
1428
1434
  a2 = new Intl.PluralRules(n2, { type: r2 });
1429
1435
  } catch {
1430
- if (typeof Intl > `u`) return this.logger.error(`No Intl support, please use an Intl polyfill!`), $n;
1431
- if (!e5.match(/-|_/)) return $n;
1436
+ if (typeof Intl > `u`) return this.logger.error(`No Intl support, please use an Intl polyfill!`), tr;
1437
+ if (!e5.match(/-|_/)) return tr;
1432
1438
  let n3 = this.languageUtils.getLanguagePartFromCode(e5);
1433
1439
  a2 = this.getRule(n3, t2);
1434
1440
  }
@@ -1443,26 +1449,26 @@ var er = class {
1443
1449
  }
1444
1450
  getSuffixes(e5, t2 = {}) {
1445
1451
  let n2 = this.getRule(e5, t2);
1446
- return n2 ||= this.getRule(`dev`, t2), n2 ? n2.resolvedOptions().pluralCategories.sort((e6, t3) => Qn[e6] - Qn[t3]).map((e6) => `${this.options.prepend}${t2.ordinal ? `ordinal${this.options.prepend}` : ``}${e6}`) : [];
1452
+ return n2 ||= this.getRule(`dev`, t2), n2 ? n2.resolvedOptions().pluralCategories.sort((e6, t3) => er[e6] - er[t3]).map((e6) => `${this.options.prepend}${t2.ordinal ? `ordinal${this.options.prepend}` : ``}${e6}`) : [];
1447
1453
  }
1448
1454
  getSuffix(e5, t2, n2 = {}) {
1449
1455
  let r2 = this.getRule(e5, n2);
1450
1456
  return r2 ? `${this.options.prepend}${n2.ordinal ? `ordinal${this.options.prepend}` : ``}${r2.select(t2)}` : (this.logger.warn(`no plural rule found for: ${e5}`), this.getSuffix(`dev`, t2, n2));
1451
1457
  }
1452
1458
  };
1453
- var tr = (e5, t2, n2, r2 = `.`, i2 = true) => {
1454
- let a2 = Fn(e5, t2, n2);
1459
+ var rr = (e5, t2, n2, r2 = `.`, i2 = true) => {
1460
+ let a2 = Ln(e5, t2, n2);
1455
1461
  return !a2 && i2 && L(n2) && (a2 = H(e5, n2, r2), a2 === void 0 && (a2 = H(t2, n2, r2))), a2;
1456
1462
  };
1457
- var nr = (e5) => e5.replace(/\$/g, `$$$$`);
1458
- var rr = class {
1463
+ var ir = (e5) => e5.replace(/\$/g, `$$$$`);
1464
+ var ar = class {
1459
1465
  constructor(e5 = {}) {
1460
1466
  this.logger = W.create(`interpolator`), this.options = e5, this.format = e5?.interpolation?.format || ((e6) => e6), this.init(e5);
1461
1467
  }
1462
1468
  init(e5 = {}) {
1463
1469
  e5.interpolation ||= { escapeValue: true };
1464
1470
  let { escape: t2, escapeValue: n2, useRawValueToEscape: r2, prefix: i2, prefixEscaped: a2, suffix: o2, suffixEscaped: s2, formatSeparator: c2, unescapeSuffix: l2, unescapePrefix: u2, nestingPrefix: d2, nestingPrefixEscaped: f2, nestingSuffix: p2, nestingSuffixEscaped: m2, nestingOptionsSeparator: h2, maxReplaces: g2, alwaysFormat: _2 } = e5.interpolation;
1465
- this.escape = t2 === void 0 ? Rn : t2, this.escapeValue = n2 === void 0 || n2, this.useRawValueToEscape = r2 !== void 0 && r2, this.prefix = i2 ? V(i2) : a2 || `{{`, this.suffix = o2 ? V(o2) : s2 || `}}`, this.formatSeparator = c2 || `,`, this.unescapePrefix = l2 ? `` : u2 || `-`, this.unescapeSuffix = this.unescapePrefix ? `` : l2 || ``, this.nestingPrefix = d2 ? V(d2) : f2 || V(`$t(`), this.nestingSuffix = p2 ? V(p2) : m2 || V(`)`), this.nestingOptionsSeparator = h2 || `,`, this.maxReplaces = g2 || 1e3, this.alwaysFormat = _2 !== void 0 && _2, this.resetRegExp();
1471
+ this.escape = t2 === void 0 ? Bn : t2, this.escapeValue = n2 === void 0 || n2, this.useRawValueToEscape = r2 !== void 0 && r2, this.prefix = i2 ? V(i2) : a2 || `{{`, this.suffix = o2 ? V(o2) : s2 || `}}`, this.formatSeparator = c2 || `,`, this.unescapePrefix = l2 ? `` : u2 || `-`, this.unescapeSuffix = this.unescapePrefix ? `` : l2 || ``, this.nestingPrefix = d2 ? V(d2) : f2 || V(`$t(`), this.nestingSuffix = p2 ? V(p2) : m2 || V(`)`), this.nestingOptionsSeparator = h2 || `,`, this.maxReplaces = g2 || 1e3, this.alwaysFormat = _2 !== void 0 && _2, this.resetRegExp();
1466
1472
  }
1467
1473
  reset() {
1468
1474
  this.options && this.init(this.options);
@@ -1474,15 +1480,15 @@ var rr = class {
1474
1480
  interpolate(e5, t2, n2, r2) {
1475
1481
  let i2, a2, o2, s2 = this.options && this.options.interpolation && this.options.interpolation.defaultVariables || {}, c2 = (e6) => {
1476
1482
  if (e6.indexOf(this.formatSeparator) < 0) {
1477
- let i4 = tr(t2, s2, e6, this.options.keySeparator, this.options.ignoreJSONStructure);
1483
+ let i4 = rr(t2, s2, e6, this.options.keySeparator, this.options.ignoreJSONStructure);
1478
1484
  return this.alwaysFormat ? this.format(i4, void 0, n2, { ...r2, ...t2, interpolationkey: e6 }) : i4;
1479
1485
  }
1480
1486
  let i3 = e6.split(this.formatSeparator), a3 = i3.shift().trim(), o3 = i3.join(this.formatSeparator).trim();
1481
- return this.format(tr(t2, s2, a3, this.options.keySeparator, this.options.ignoreJSONStructure), o3, n2, { ...r2, ...t2, interpolationkey: a3 });
1487
+ return this.format(rr(t2, s2, a3, this.options.keySeparator, this.options.ignoreJSONStructure), o3, n2, { ...r2, ...t2, interpolationkey: a3 });
1482
1488
  };
1483
1489
  this.resetRegExp();
1484
1490
  let l2 = r2?.missingInterpolationHandler || this.options.missingInterpolationHandler, u2 = r2?.interpolation?.skipOnVariables === void 0 ? this.options.interpolation.skipOnVariables : r2.interpolation.skipOnVariables;
1485
- return [{ regex: this.regexpUnescape, safeValue: (e6) => nr(e6) }, { regex: this.regexp, safeValue: (e6) => this.escapeValue ? nr(this.escape(e6)) : nr(e6) }].forEach((t3) => {
1491
+ return [{ regex: this.regexpUnescape, safeValue: (e6) => ir(e6) }, { regex: this.regexp, safeValue: (e6) => this.escapeValue ? ir(this.escape(e6)) : ir(e6) }].forEach((t3) => {
1486
1492
  for (o2 = 0; i2 = t3.regex.exec(e5); ) {
1487
1493
  let n3 = i2[1].trim();
1488
1494
  if (a2 = c2(n3), a2 === void 0) {
@@ -1494,7 +1500,7 @@ var rr = class {
1494
1500
  a2 = i2[0];
1495
1501
  continue;
1496
1502
  } else this.logger.warn(`missed to pass in variable ${n3} for interpolating ${e5}`), a2 = ``;
1497
- } else !L(a2) && !this.useRawValueToEscape && (a2 = On(a2));
1503
+ } else !L(a2) && !this.useRawValueToEscape && (a2 = An(a2));
1498
1504
  let s3 = t3.safeValue(a2);
1499
1505
  if (e5 = e5.replace(i2[0], s3), u2 ? (t3.regex.lastIndex += a2.length, t3.regex.lastIndex -= i2[0].length) : t3.regex.lastIndex = 0, o2++, o2 >= this.maxReplaces) break;
1500
1506
  }
@@ -1520,12 +1526,12 @@ var rr = class {
1520
1526
  a2 = { ...n2 }, a2 = a2.replace && !L(a2.replace) ? a2.replace : a2, a2.applyPostProcessor = false, delete a2.defaultValue;
1521
1527
  let c2 = /{.*}/.test(r2[1]) ? r2[1].lastIndexOf(`}`) + 1 : r2[1].indexOf(this.formatSeparator);
1522
1528
  if (c2 !== -1 && (s2 = r2[1].slice(c2).split(this.formatSeparator).map((e6) => e6.trim()).filter(Boolean), r2[1] = r2[1].slice(0, c2)), i2 = t2(o2.call(this, r2[1].trim(), a2), a2), i2 && r2[0] === e5 && !L(i2)) return i2;
1523
- L(i2) || (i2 = On(i2)), i2 ||= (this.logger.warn(`missed to resolve ${r2[1]} for nesting ${e5}`), ``), s2.length && (i2 = s2.reduce((e6, t3) => this.format(e6, t3, n2.lng, { ...n2, interpolationkey: r2[1].trim() }), i2.trim())), e5 = e5.replace(r2[0], i2), this.regexp.lastIndex = 0;
1529
+ L(i2) || (i2 = An(i2)), i2 ||= (this.logger.warn(`missed to resolve ${r2[1]} for nesting ${e5}`), ``), s2.length && (i2 = s2.reduce((e6, t3) => this.format(e6, t3, n2.lng, { ...n2, interpolationkey: r2[1].trim() }), i2.trim())), e5 = e5.replace(r2[0], i2), this.regexp.lastIndex = 0;
1524
1530
  }
1525
1531
  return e5;
1526
1532
  }
1527
1533
  };
1528
- var ir = (e5) => {
1534
+ var or = (e5) => {
1529
1535
  let t2 = e5.toLowerCase().trim(), n2 = {};
1530
1536
  if (e5.indexOf(`(`) > -1) {
1531
1537
  let r2 = e5.split(`(`);
@@ -1540,7 +1546,7 @@ var ir = (e5) => {
1540
1546
  }
1541
1547
  return { formatName: t2, formatOptions: n2 };
1542
1548
  };
1543
- var ar = (e5) => {
1549
+ var sr = (e5) => {
1544
1550
  let t2 = {};
1545
1551
  return (n2, r2, i2) => {
1546
1552
  let a2 = i2;
@@ -1549,14 +1555,14 @@ var ar = (e5) => {
1549
1555
  return s2 || (s2 = e5(U(r2), i2), t2[o2] = s2), s2(n2);
1550
1556
  };
1551
1557
  };
1552
- var or = (e5) => (t2, n2, r2) => e5(U(n2), r2)(t2);
1553
- var sr = class {
1558
+ var cr = (e5) => (t2, n2, r2) => e5(U(n2), r2)(t2);
1559
+ var lr = class {
1554
1560
  constructor(e5 = {}) {
1555
1561
  this.logger = W.create(`formatter`), this.options = e5, this.init(e5);
1556
1562
  }
1557
1563
  init(e5, t2 = { interpolation: {} }) {
1558
1564
  this.formatSeparator = t2.interpolation.formatSeparator || `,`;
1559
- let n2 = t2.cacheInBuiltFormats ? ar : or;
1565
+ let n2 = t2.cacheInBuiltFormats ? sr : cr;
1560
1566
  this.formats = { number: n2((e6, t3) => {
1561
1567
  let n3 = new Intl.NumberFormat(e6, { ...t3 });
1562
1568
  return (e7) => n3.format(e7);
@@ -1578,7 +1584,7 @@ var sr = class {
1578
1584
  this.formats[e5.toLowerCase().trim()] = t2;
1579
1585
  }
1580
1586
  addCached(e5, t2) {
1581
- this.formats[e5.toLowerCase().trim()] = ar(t2);
1587
+ this.formats[e5.toLowerCase().trim()] = sr(t2);
1582
1588
  }
1583
1589
  format(e5, t2, n2, r2 = {}) {
1584
1590
  let i2 = t2.split(this.formatSeparator);
@@ -1587,7 +1593,7 @@ var sr = class {
1587
1593
  i2[0] = [i2[0], ...i2.splice(1, e6)].join(this.formatSeparator);
1588
1594
  }
1589
1595
  return i2.reduce((e6, t3) => {
1590
- let { formatName: i3, formatOptions: a2 } = ir(t3);
1596
+ let { formatName: i3, formatOptions: a2 } = or(t3);
1591
1597
  if (this.formats[i3]) {
1592
1598
  let t4 = e6;
1593
1599
  try {
@@ -1602,10 +1608,10 @@ var sr = class {
1602
1608
  }, e5);
1603
1609
  }
1604
1610
  };
1605
- var cr = (e5, t2) => {
1611
+ var ur = (e5, t2) => {
1606
1612
  e5.pending[t2] !== void 0 && (delete e5.pending[t2], e5.pendingCount--);
1607
1613
  };
1608
- var lr = class extends G {
1614
+ var dr = class extends G {
1609
1615
  constructor(e5, t2, n2, r2 = {}) {
1610
1616
  super(), this.backend = e5, this.store = t2, this.services = n2, this.languageUtils = n2.languageUtils, this.options = r2, this.logger = W.create(`backendConnector`), this.waitingReads = [], this.maxParallelReads = r2.maxParallelReads || 10, this.readingCalls = 0, this.maxRetries = r2.maxRetries >= 0 ? r2.maxRetries : 5, this.retryTimeout = r2.retryTimeout >= 1 ? r2.retryTimeout : 350, this.state = {}, this.queue = [], this.backend?.init?.(n2, r2.backend, r2);
1611
1617
  }
@@ -1624,7 +1630,7 @@ var lr = class extends G {
1624
1630
  t2 && this.emit(`failedLoading`, i2, a2, t2), !t2 && n2 && this.store.addResourceBundle(i2, a2, n2, void 0, void 0, { skipCopy: true }), this.state[e5] = t2 ? -1 : 2, t2 && n2 && (this.state[e5] = 0);
1625
1631
  let o2 = {};
1626
1632
  this.queue.forEach((n3) => {
1627
- Pn(n3.loaded, [i2], a2), cr(n3, e5), t2 && n3.errors.push(t2), n3.pendingCount === 0 && !n3.done && (Object.keys(n3.loaded).forEach((e6) => {
1633
+ In(n3.loaded, [i2], a2), ur(n3, e5), t2 && n3.errors.push(t2), n3.pendingCount === 0 && !n3.done && (Object.keys(n3.loaded).forEach((e6) => {
1628
1634
  o2[e6] || (o2[e6] = {});
1629
1635
  let t3 = n3.loaded[e6];
1630
1636
  t3.length && t3.forEach((t4) => {
@@ -1706,7 +1712,7 @@ var lr = class extends G {
1706
1712
  }
1707
1713
  }
1708
1714
  };
1709
- var ur = () => ({ debug: false, initAsync: true, ns: [`translation`], defaultNS: [`translation`], fallbackLng: [`dev`], fallbackNS: false, supportedLngs: false, nonExplicitSupportedLngs: false, load: `all`, preload: false, simplifyPluralSuffix: true, keySeparator: `.`, nsSeparator: `:`, pluralSeparator: `_`, contextSeparator: `_`, partialBundledLanguages: false, saveMissing: false, updateMissing: false, saveMissingTo: `fallback`, saveMissingPlurals: true, missingKeyHandler: false, missingInterpolationHandler: false, postProcess: false, postProcessPassResolved: false, returnNull: false, returnEmptyString: true, returnObjects: false, joinArrays: false, returnedObjectHandler: false, parseMissingKeyHandler: false, appendNamespaceToMissingKey: false, appendNamespaceToCIMode: false, overloadTranslationOptionHandler: (e5) => {
1715
+ var fr = () => ({ debug: false, initAsync: true, ns: [`translation`], defaultNS: [`translation`], fallbackLng: [`dev`], fallbackNS: false, supportedLngs: false, nonExplicitSupportedLngs: false, load: `all`, preload: false, simplifyPluralSuffix: true, keySeparator: `.`, nsSeparator: `:`, pluralSeparator: `_`, contextSeparator: `_`, partialBundledLanguages: false, saveMissing: false, updateMissing: false, saveMissingTo: `fallback`, saveMissingPlurals: true, missingKeyHandler: false, missingInterpolationHandler: false, postProcess: false, postProcessPassResolved: false, returnNull: false, returnEmptyString: true, returnObjects: false, joinArrays: false, returnedObjectHandler: false, parseMissingKeyHandler: false, appendNamespaceToMissingKey: false, appendNamespaceToCIMode: false, overloadTranslationOptionHandler: (e5) => {
1710
1716
  let t2 = {};
1711
1717
  if (typeof e5[1] == `object` && (t2 = e5[1]), L(e5[1]) && (t2.defaultValue = e5[1]), L(e5[2]) && (t2.tDescription = e5[2]), typeof e5[2] == `object` || typeof e5[3] == `object`) {
1712
1718
  let n2 = e5[3] || e5[2];
@@ -1716,23 +1722,23 @@ var ur = () => ({ debug: false, initAsync: true, ns: [`translation`], defaultNS:
1716
1722
  }
1717
1723
  return t2;
1718
1724
  }, interpolation: { escapeValue: true, format: (e5) => e5, prefix: `{{`, suffix: `}}`, formatSeparator: `,`, unescapePrefix: `-`, nestingPrefix: `$t(`, nestingSuffix: `)`, nestingOptionsSeparator: `,`, maxReplaces: 1e3, skipOnVariables: true }, cacheInBuiltFormats: true });
1719
- var dr = (e5) => (L(e5.ns) && (e5.ns = [e5.ns]), L(e5.fallbackLng) && (e5.fallbackLng = [e5.fallbackLng]), L(e5.fallbackNS) && (e5.fallbackNS = [e5.fallbackNS]), e5.supportedLngs?.indexOf?.(`cimode`) < 0 && (e5.supportedLngs = e5.supportedLngs.concat([`cimode`])), typeof e5.initImmediate == `boolean` && (e5.initAsync = e5.initImmediate), e5);
1725
+ var pr = (e5) => (L(e5.ns) && (e5.ns = [e5.ns]), L(e5.fallbackLng) && (e5.fallbackLng = [e5.fallbackLng]), L(e5.fallbackNS) && (e5.fallbackNS = [e5.fallbackNS]), e5.supportedLngs?.indexOf?.(`cimode`) < 0 && (e5.supportedLngs = e5.supportedLngs.concat([`cimode`])), typeof e5.initImmediate == `boolean` && (e5.initAsync = e5.initImmediate), e5);
1720
1726
  var q = () => {
1721
1727
  };
1722
- var fr = (e5) => {
1728
+ var mr = (e5) => {
1723
1729
  Object.getOwnPropertyNames(Object.getPrototypeOf(e5)).forEach((t2) => {
1724
1730
  typeof e5[t2] == `function` && (e5[t2] = e5[t2].bind(e5));
1725
1731
  });
1726
1732
  };
1727
- var pr = `__i18next_supportNoticeShown`;
1728
- var mr = () => !!(typeof globalThis < `u` && globalThis[pr] || typeof process < `u` && {}.I18NEXT_NO_SUPPORT_NOTICE || typeof process < `u`);
1729
- var hr = () => {
1730
- typeof globalThis < `u` && (globalThis[pr] = true);
1733
+ var hr = `__i18next_supportNoticeShown`;
1734
+ var gr = () => !!(typeof globalThis < `u` && globalThis[hr] || typeof process < `u` && {}.I18NEXT_NO_SUPPORT_NOTICE || typeof process < `u`);
1735
+ var _r = () => {
1736
+ typeof globalThis < `u` && (globalThis[hr] = true);
1731
1737
  };
1732
- var gr = (e5) => !!(e5?.modules?.backend?.name?.indexOf(`Locize`) > 0 || e5?.modules?.backend?.constructor?.name?.indexOf(`Locize`) > 0 || e5?.options?.backend?.backends && e5.options.backend.backends.some((e6) => e6?.name?.indexOf(`Locize`) > 0 || e6?.constructor?.name?.indexOf(`Locize`) > 0) || e5?.options?.backend?.projectId || e5?.options?.backend?.backendOptions && e5.options.backend.backendOptions.some((e6) => e6?.projectId));
1738
+ var vr = (e5) => !!(e5?.modules?.backend?.name?.indexOf(`Locize`) > 0 || e5?.modules?.backend?.constructor?.name?.indexOf(`Locize`) > 0 || e5?.options?.backend?.backends && e5.options.backend.backends.some((e6) => e6?.name?.indexOf(`Locize`) > 0 || e6?.constructor?.name?.indexOf(`Locize`) > 0) || e5?.options?.backend?.projectId || e5?.options?.backend?.backendOptions && e5.options.backend.backendOptions.some((e6) => e6?.projectId));
1733
1739
  var J = class e4 extends G {
1734
1740
  constructor(e5 = {}, t2) {
1735
- if (super(), this.options = dr(e5), this.services = {}, this.logger = W, this.modules = { external: [] }, fr(this), t2 && !this.isInitialized && !e5.isClone) {
1741
+ if (super(), this.options = pr(e5), this.services = {}, this.logger = W, this.modules = { external: [] }, mr(this), t2 && !this.isInitialized && !e5.isClone) {
1736
1742
  if (!this.options.initAsync) return this.init(e5, t2), this;
1737
1743
  setTimeout(() => {
1738
1744
  this.init(e5, t2);
@@ -1741,19 +1747,19 @@ var J = class e4 extends G {
1741
1747
  }
1742
1748
  init(e5 = {}, t2) {
1743
1749
  this.isInitializing = true, typeof e5 == `function` && (t2 = e5, e5 = {}), e5.defaultNS == null && e5.ns && (L(e5.ns) ? e5.defaultNS = e5.ns : e5.ns.indexOf(`translation`) < 0 && (e5.defaultNS = e5.ns[0]));
1744
- let n2 = ur();
1745
- this.options = { ...n2, ...this.options, ...dr(e5) }, this.options.interpolation = { ...n2.interpolation, ...this.options.interpolation }, e5.keySeparator !== void 0 && (this.options.userDefinedKeySeparator = e5.keySeparator), e5.nsSeparator !== void 0 && (this.options.userDefinedNsSeparator = e5.nsSeparator), typeof this.options.overloadTranslationOptionHandler != `function` && (this.options.overloadTranslationOptionHandler = n2.overloadTranslationOptionHandler), this.options.showSupportNotice !== false && !gr(this) && !mr() && (typeof console < `u` && console.info !== void 0 && console.info(`\u{1F310} i18next is made possible by our own product, Locize \u2014 consider powering your project with managed localization (AI, CDN, integrations): https://locize.com \u{1F499}`), hr());
1750
+ let n2 = fr();
1751
+ this.options = { ...n2, ...this.options, ...pr(e5) }, this.options.interpolation = { ...n2.interpolation, ...this.options.interpolation }, e5.keySeparator !== void 0 && (this.options.userDefinedKeySeparator = e5.keySeparator), e5.nsSeparator !== void 0 && (this.options.userDefinedNsSeparator = e5.nsSeparator), typeof this.options.overloadTranslationOptionHandler != `function` && (this.options.overloadTranslationOptionHandler = n2.overloadTranslationOptionHandler), this.options.showSupportNotice !== false && !vr(this) && !gr() && (typeof console < `u` && console.info !== void 0 && console.info(`\u{1F310} i18next is made possible by our own product, Locize \u2014 consider powering your project with managed localization (AI, CDN, integrations): https://locize.com \u{1F499}`), _r());
1746
1752
  let r2 = (e6) => e6 ? typeof e6 == `function` ? new e6() : e6 : null;
1747
1753
  if (!this.options.isClone) {
1748
1754
  this.modules.logger ? W.init(r2(this.modules.logger), this.options) : W.init(null, this.options);
1749
1755
  let e6;
1750
- e6 = this.modules.formatter ? this.modules.formatter : sr;
1751
- let t3 = new Zn(this.options);
1752
- this.store = new Wn(this.options.resources, this.options);
1756
+ e6 = this.modules.formatter ? this.modules.formatter : lr;
1757
+ let t3 = new $n(this.options);
1758
+ this.store = new Kn(this.options.resources, this.options);
1753
1759
  let i3 = this.services;
1754
- i3.logger = W, i3.resourceStore = this.store, i3.languageUtils = t3, i3.pluralResolver = new er(t3, { prepend: this.options.pluralSeparator, simplifyPluralSuffix: this.options.simplifyPluralSuffix }), this.options.interpolation.format && this.options.interpolation.format !== n2.interpolation.format && this.logger.deprecate(`init: you are still using the legacy format function, please use the new approach: https://www.i18next.com/translation-function/formatting`), e6 && (!this.options.interpolation.format || this.options.interpolation.format === n2.interpolation.format) && (i3.formatter = r2(e6), i3.formatter.init && i3.formatter.init(i3, this.options), this.options.interpolation.format = i3.formatter.format.bind(i3.formatter)), i3.interpolator = new rr(this.options), i3.utils = { hasLoadedNamespace: this.hasLoadedNamespace.bind(this) }, i3.backendConnector = new lr(r2(this.modules.backend), i3.resourceStore, i3, this.options), i3.backendConnector.on(`*`, (e7, ...t4) => {
1760
+ i3.logger = W, i3.resourceStore = this.store, i3.languageUtils = t3, i3.pluralResolver = new nr(t3, { prepend: this.options.pluralSeparator, simplifyPluralSuffix: this.options.simplifyPluralSuffix }), this.options.interpolation.format && this.options.interpolation.format !== n2.interpolation.format && this.logger.deprecate(`init: you are still using the legacy format function, please use the new approach: https://www.i18next.com/translation-function/formatting`), e6 && (!this.options.interpolation.format || this.options.interpolation.format === n2.interpolation.format) && (i3.formatter = r2(e6), i3.formatter.init && i3.formatter.init(i3, this.options), this.options.interpolation.format = i3.formatter.format.bind(i3.formatter)), i3.interpolator = new ar(this.options), i3.utils = { hasLoadedNamespace: this.hasLoadedNamespace.bind(this) }, i3.backendConnector = new dr(r2(this.modules.backend), i3.resourceStore, i3, this.options), i3.backendConnector.on(`*`, (e7, ...t4) => {
1755
1761
  this.emit(e7, ...t4);
1756
- }), this.modules.languageDetector && (i3.languageDetector = r2(this.modules.languageDetector), i3.languageDetector.init && i3.languageDetector.init(i3, this.options.detection, this.options)), this.modules.i18nFormat && (i3.i18nFormat = r2(this.modules.i18nFormat), i3.i18nFormat.init && i3.i18nFormat.init(this)), this.translator = new Xn(this.services, this.options), this.translator.on(`*`, (e7, ...t4) => {
1762
+ }), this.modules.languageDetector && (i3.languageDetector = r2(this.modules.languageDetector), i3.languageDetector.init && i3.languageDetector.init(i3, this.options.detection, this.options)), this.modules.i18nFormat && (i3.i18nFormat = r2(this.modules.i18nFormat), i3.i18nFormat.init && i3.i18nFormat.init(this)), this.translator = new Qn(this.services, this.options), this.translator.on(`*`, (e7, ...t4) => {
1757
1763
  this.emit(e7, ...t4);
1758
1764
  }), this.modules.external.forEach((e7) => {
1759
1765
  e7.init && e7.init(this);
@@ -1800,7 +1806,7 @@ var J = class e4 extends G {
1800
1806
  use(e5) {
1801
1807
  if (!e5) throw Error(`You are passing an undefined module! Please check the object you are passing to i18next.use()`);
1802
1808
  if (!e5.type) throw Error(`You are passing a wrong module! Please check the object you are passing to i18next.use()`);
1803
- return e5.type === `backend` && (this.modules.backend = e5), (e5.type === `logger` || e5.log && e5.warn && e5.error) && (this.modules.logger = e5), e5.type === `languageDetector` && (this.modules.languageDetector = e5), e5.type === `i18nFormat` && (this.modules.i18nFormat = e5), e5.type === `postProcessor` && Gn.addPostProcessor(e5), e5.type === `formatter` && (this.modules.formatter = e5), e5.type === `3rdParty` && this.modules.external.push(e5), this;
1809
+ return e5.type === `backend` && (this.modules.backend = e5), (e5.type === `logger` || e5.log && e5.warn && e5.error) && (this.modules.logger = e5), e5.type === `languageDetector` && (this.modules.languageDetector = e5), e5.type === `i18nFormat` && (this.modules.i18nFormat = e5), e5.type === `postProcessor` && qn.addPostProcessor(e5), e5.type === `formatter` && (this.modules.formatter = e5), e5.type === `3rdParty` && this.modules.external.push(e5), this;
1804
1810
  }
1805
1811
  setResolvedLanguage(e5) {
1806
1812
  if (e5 && this.languages && !([`cimode`, `dev`].indexOf(e5) > -1)) {
@@ -1892,7 +1898,7 @@ var J = class e4 extends G {
1892
1898
  }
1893
1899
  } catch {
1894
1900
  }
1895
- let t2 = `ar.shu.sqr.ssh.xaa.yhd.yud.aao.abh.abv.acm.acq.acw.acx.acy.adf.ads.aeb.aec.afb.ajp.apc.apd.arb.arq.ars.ary.arz.auz.avl.ayh.ayl.ayn.ayp.bbz.pga.he.iw.ps.pbt.pbu.pst.prp.prd.ug.ur.ydd.yds.yih.ji.yi.hbo.men.xmn.fa.jpr.peo.pes.prs.dv.sam.ckb`.split(`.`), n2 = this.services?.languageUtils || new Zn(ur());
1901
+ let t2 = `ar.shu.sqr.ssh.xaa.yhd.yud.aao.abh.abv.acm.acq.acw.acx.acy.adf.ads.aeb.aec.afb.ajp.apc.apd.arb.arq.ars.ary.arz.auz.avl.ayh.ayl.ayn.ayp.bbz.pga.he.iw.ps.pbt.pbu.pst.prp.prd.ug.ur.ydd.yds.yih.ji.yi.hbo.men.xmn.fa.jpr.peo.pes.prs.dv.sam.ckb`.split(`.`), n2 = this.services?.languageUtils || new $n(fr());
1896
1902
  return e5.toLowerCase().indexOf(`-latn`) > 1 ? `ltr` : t2.indexOf(n2.getLanguagePartFromCode(e5)) > -1 || e5.toLowerCase().indexOf(`-arab`) > 1 ? `rtl` : `ltr`;
1897
1903
  }
1898
1904
  static createInstance(t2 = {}, n2) {
@@ -1905,11 +1911,11 @@ var J = class e4 extends G {
1905
1911
  let i2 = { ...this.options, ...t2, isClone: true }, a2 = new e4(i2);
1906
1912
  if ((t2.debug !== void 0 || t2.prefix !== void 0) && (a2.logger = a2.logger.clone(t2)), [`store`, `services`, `language`].forEach((e5) => {
1907
1913
  a2[e5] = this[e5];
1908
- }), a2.services = { ...this.services }, a2.services.utils = { hasLoadedNamespace: a2.hasLoadedNamespace.bind(a2) }, r2 && (a2.store = new Wn(Object.keys(this.store.data).reduce((e5, t3) => (e5[t3] = { ...this.store.data[t3] }, e5[t3] = Object.keys(e5[t3]).reduce((n3, r3) => (n3[r3] = { ...e5[t3][r3] }, n3), e5[t3]), e5), {}), i2), a2.services.resourceStore = a2.store), t2.interpolation) {
1909
- let e5 = { ...ur().interpolation, ...this.options.interpolation, ...t2.interpolation }, n3 = { ...i2, interpolation: e5 };
1910
- a2.services.interpolator = new rr(n3);
1914
+ }), a2.services = { ...this.services }, a2.services.utils = { hasLoadedNamespace: a2.hasLoadedNamespace.bind(a2) }, r2 && (a2.store = new Kn(Object.keys(this.store.data).reduce((e5, t3) => (e5[t3] = { ...this.store.data[t3] }, e5[t3] = Object.keys(e5[t3]).reduce((n3, r3) => (n3[r3] = { ...e5[t3][r3] }, n3), e5[t3]), e5), {}), i2), a2.services.resourceStore = a2.store), t2.interpolation) {
1915
+ let e5 = { ...fr().interpolation, ...this.options.interpolation, ...t2.interpolation }, n3 = { ...i2, interpolation: e5 };
1916
+ a2.services.interpolator = new ar(n3);
1911
1917
  }
1912
- return a2.translator = new Xn(a2.services, i2), a2.translator.on(`*`, (e5, ...t3) => {
1918
+ return a2.translator = new Qn(a2.services, i2), a2.translator.on(`*`, (e5, ...t3) => {
1913
1919
  a2.emit(e5, ...t3);
1914
1920
  }), a2.init(i2, n2), a2.translator.options = i2, a2.translator.backendConnector.services.utils = { hasLoadedNamespace: a2.hasLoadedNamespace.bind(a2) }, a2;
1915
1921
  }
@@ -1918,20 +1924,20 @@ var J = class e4 extends G {
1918
1924
  }
1919
1925
  }.createInstance();
1920
1926
  J.createInstance, J.dir, J.init, J.loadResources, J.reloadResources, J.use, J.changeLanguage, J.getFixedT, J.t, J.exists, J.setDefaultNamespace, J.hasLoadedNamespace, J.loadNamespaces, J.loadLanguages;
1921
- var _r = /&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g;
1922
- var vr = { "&amp;": `&`, "&#38;": `&`, "&lt;": `<`, "&#60;": `<`, "&gt;": `>`, "&#62;": `>`, "&apos;": `'`, "&#39;": `'`, "&quot;": `"`, "&#34;": `"`, "&nbsp;": ` `, "&#160;": ` `, "&copy;": `\xA9`, "&#169;": `\xA9`, "&reg;": `\xAE`, "&#174;": `\xAE`, "&hellip;": `\u2026`, "&#8230;": `\u2026`, "&#x2F;": `/`, "&#47;": `/` };
1923
- var yr = (e5) => vr[e5];
1924
- var br = { bindI18n: `languageChanged`, bindI18nStore: ``, transEmptyNodeValue: ``, transSupportBasicHtmlNodes: true, transWrapTextNodes: ``, transKeepBasicHtmlNodesFor: [`br`, `strong`, `i`, `p`], useSuspense: true, unescape: (e5) => e5.replace(_r, yr), transDefaultProps: void 0 };
1925
- var xr = (e5 = {}) => {
1926
- br = { ...br, ...e5 };
1927
+ var yr = /&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g;
1928
+ var br = { "&amp;": `&`, "&#38;": `&`, "&lt;": `<`, "&#60;": `<`, "&gt;": `>`, "&#62;": `>`, "&apos;": `'`, "&#39;": `'`, "&quot;": `"`, "&#34;": `"`, "&nbsp;": ` `, "&#160;": ` `, "&copy;": `\xA9`, "&#169;": `\xA9`, "&reg;": `\xAE`, "&#174;": `\xAE`, "&hellip;": `\u2026`, "&#8230;": `\u2026`, "&#x2F;": `/`, "&#47;": `/` };
1929
+ var xr = (e5) => br[e5];
1930
+ var Sr = { bindI18n: `languageChanged`, bindI18nStore: ``, transEmptyNodeValue: ``, transSupportBasicHtmlNodes: true, transWrapTextNodes: ``, transKeepBasicHtmlNodesFor: [`br`, `strong`, `i`, `p`], useSuspense: true, unescape: (e5) => e5.replace(yr, xr), transDefaultProps: void 0 };
1931
+ var Cr = (e5 = {}) => {
1932
+ Sr = { ...Sr, ...e5 };
1927
1933
  };
1928
- var Sr = { type: `3rdParty`, init(e5) {
1929
- xr(e5.options.react);
1934
+ var wr = { type: `3rdParty`, init(e5) {
1935
+ Cr(e5.options.react);
1930
1936
  } };
1931
1937
  var Y = /* @__PURE__ */ new Map();
1932
- var Cr = 500;
1938
+ var Tr = 500;
1933
1939
  var X;
1934
- function wr() {
1940
+ function Er() {
1935
1941
  if (X === void 0) try {
1936
1942
  X = new Intl.NumberFormat(`en-US`, { useGrouping: false, maximumFractionDigits: 0 }).format(`9007199254740993`) === `9007199254740993`;
1937
1943
  } catch {
@@ -1939,32 +1945,32 @@ function wr() {
1939
1945
  }
1940
1946
  return X;
1941
1947
  }
1942
- var Tr = 15;
1943
- function Er(e5) {
1944
- if (!(typeof e5 != `string` || wr()) && e5.replace(/[^0-9]/g, ``).replace(/^0+/, ``).length > Tr) throw Error(`Cannot format the amount '${e5}' exactly: this runtime's Intl implementation predates ES2023 string support and would lose precision. Use a runtime with ES2023 Intl support (for example Node 20+), or pass a value within 15 significant digits.`);
1948
+ var Dr = 15;
1949
+ function Or(e5) {
1950
+ if (!(typeof e5 != `string` || Er()) && e5.replace(/[^0-9]/g, ``).replace(/^0+/, ``).length > Dr) throw Error(`Cannot format the amount '${e5}' exactly: this runtime's Intl implementation predates ES2023 string support and would lose precision. Use a runtime with ES2023 Intl support (for example Node 20+), or pass a value within 15 significant digits.`);
1945
1951
  }
1946
- function Dr(e5, t2, n2) {
1952
+ function kr(e5, t2, n2) {
1947
1953
  return `${e5}|${t2}|${Object.entries(n2).filter(([, e6]) => e6 !== void 0).sort(([e6], [t3]) => e6 < t3 ? -1 : 1).map(([e6, t3]) => `${e6}=${String(t3)}`).join(`&`)}`;
1948
1954
  }
1949
- function Or(e5, t2, n2) {
1950
- let r2 = Dr(e5, t2, n2), i2 = Y.get(r2);
1951
- return i2 || (i2 = new Intl.NumberFormat(e5, { ...n2, style: `currency`, currency: t2 }), Y.size >= Cr && Y.clear(), Y.set(r2, i2)), i2;
1955
+ function Ar(e5, t2, n2) {
1956
+ let r2 = kr(e5, t2, n2), i2 = Y.get(r2);
1957
+ return i2 || (i2 = new Intl.NumberFormat(e5, { ...n2, style: `currency`, currency: t2 }), Y.size >= Tr && Y.clear(), Y.set(r2, i2)), i2;
1952
1958
  }
1953
- function kr(e5, { value: t2, currency: n2 }, r2 = {}) {
1954
- return Er(t2), Or(e5, n2, r2).format(t2);
1959
+ function jr(e5, { value: t2, currency: n2 }, r2 = {}) {
1960
+ return Or(t2), Ar(e5, n2, r2).format(t2);
1955
1961
  }
1956
- function Ar(e5, { value: t2, currency: n2 }, r2 = {}) {
1957
- return Er(t2), Or(e5, n2, r2).formatToParts(t2);
1962
+ function Mr(e5, { value: t2, currency: n2 }, r2 = {}) {
1963
+ return Or(t2), Ar(e5, n2, r2).formatToParts(t2);
1958
1964
  }
1959
- function jr(e5) {
1965
+ function Nr(e5) {
1960
1966
  return an().find((e6) => e6.primary)?.id ?? e5;
1961
1967
  }
1962
- function Mr(e5, t2) {
1968
+ function Pr(e5, t2) {
1963
1969
  let { locale: n2, ...r2 } = t2 ?? {}, i2 = n2 ?? e5.essentials?.locale;
1964
1970
  if (!i2) throw Error(`Host locale is not available on the current host. Make sure to use an updated version of the host initialization package.`);
1965
1971
  return { locale: i2, formatOptions: r2 };
1966
1972
  }
1967
- var Nr = Dn({ getLanguage: (e5) => () => {
1973
+ var Fr = kn({ getLanguage: (e5) => () => {
1968
1974
  let t2 = e5.essentials?.language;
1969
1975
  if (!t2) throw Error(`Host language is not available on the current host. Make sure to use an updated version of the host initialization package.`);
1970
1976
  return t2;
@@ -1973,20 +1979,20 @@ var Nr = Dn({ getLanguage: (e5) => () => {
1973
1979
  if (!t2) throw Error(`Host locale is not available on the current host. Make sure to use an updated version of the host initialization package.`);
1974
1980
  return t2;
1975
1981
  }, formatCurrency: (e5) => (t2, n2) => {
1976
- let { locale: r2, formatOptions: i2 } = Mr(e5, n2);
1977
- return kr(r2, t2, i2);
1982
+ let { locale: r2, formatOptions: i2 } = Pr(e5, n2);
1983
+ return jr(r2, t2, i2);
1978
1984
  }, formatCurrencyToParts: (e5) => (t2, n2) => {
1979
- let { locale: r2, formatOptions: i2 } = Mr(e5, n2);
1980
- return Ar(r2, t2, i2);
1985
+ let { locale: r2, formatOptions: i2 } = Pr(e5, n2);
1986
+ return Mr(r2, t2, i2);
1981
1987
  }, getTranslationFunction: (e5) => () => {
1982
1988
  let t2 = e5.translations?.();
1983
1989
  if (!t2) throw Error(`Host translation resources are not available.`);
1984
- let n2 = J.createInstance(), r2 = jr(e5.essentials?.language) || `en`, i2 = { lng: e5.essentials?.language || r2, fallbackLng: r2, resources: t2 };
1985
- return n2.use(Sr).init(i2, (e6) => {
1990
+ let n2 = J.createInstance(), r2 = Nr(e5.essentials?.language) || `en`, i2 = { lng: e5.essentials?.language || r2, fallbackLng: r2, resources: t2 };
1991
+ return n2.use(wr).init(i2, (e6) => {
1986
1992
  if (e6) throw e6;
1987
1993
  }), n2.t.bind(n2);
1988
1994
  } });
1989
- var Pr = class {
1995
+ var Ir = class {
1990
1996
  constructor(e5) {
1991
1997
  this.message = e5, this.captureException = () => {
1992
1998
  console.error(this.message);
@@ -2001,81 +2007,85 @@ var Pr = class {
2001
2007
  };
2002
2008
  }
2003
2009
  };
2004
- var Fr = (e5) => new Pr(e5);
2005
- var Ir = Dn({ getMonitoringClient: (e5) => () => e5.getMonitoringClient ? e5.getMonitoringClient() : Fr(`Host monitoring client is not available on the current host. Make sure to use an updated version of the host initialization package.`) });
2006
- var Lr = { service: `service`, services: `services`, categories: `categories`, locations: `locations`, sessions: `sessions`, timeSlots: `time-slots`, serviceAddOns: `service-addons`, bookingsSettings: `bookings-settings`, serviceCta: `service-cta`, preferences: `preferences`, bookingSummary: `booking-summary`, bookingCheckout: `booking-checkout`, formValues: `form-values`, paymentOptions: `payment-options`, seo: `seo`, warmup: `warmup`, reschedule: `reschedule` };
2007
- function Rr(e5) {
2010
+ var Lr = (e5) => new Ir(e5);
2011
+ var Rr = kn({ getMonitoringClient: (e5) => () => e5.getMonitoringClient ? e5.getMonitoringClient() : Lr(`Host monitoring client is not available on the current host. Make sure to use an updated version of the host initialization package.`) });
2012
+ var zr = { service: `service`, services: `services`, categories: `categories`, locations: `locations`, sessions: `sessions`, timeSlots: `time-slots`, serviceAddOns: `service-addons`, bookingsSettings: `bookings-settings`, serviceCta: `service-cta`, preferences: `preferences`, bookingSummary: `booking-summary`, bookingCheckout: `booking-checkout`, formValues: `form-values`, paymentOptions: `payment-options`, seo: `seo`, warmup: `warmup`, reschedule: `reschedule` };
2013
+ function Br(e5) {
2008
2014
  try {
2009
- let t2 = Ir.getMonitoringClient?.();
2015
+ let t2 = Rr.getMonitoringClient?.();
2010
2016
  return t2 && typeof t2[e5] == `function` ? t2 : null;
2011
2017
  } catch {
2012
2018
  return null;
2013
2019
  }
2014
2020
  }
2015
- function zr(e5, { feature: t2, action: n2, level: r2 = `error`, contexts: i2 }) {
2016
- let a2 = Rr(`captureException`);
2021
+ function Vr(e5, { feature: t2, action: n2, level: r2 = `error`, contexts: i2 }) {
2022
+ let a2 = Br(`captureException`);
2017
2023
  if (!a2) return;
2018
2024
  let o2 = e5 instanceof Error ? e5 : Error(String(e5));
2019
2025
  a2.captureException(o2, { level: r2, tags: { feature: t2, action: n2 }, ...i2 ? { contexts: i2 } : {} });
2020
2026
  }
2021
- function Br(e5, { feature: t2, tags: n2 }, r2) {
2022
- let i2 = Rr(`startSpanManual`);
2027
+ function Hr(e5, { feature: t2, tags: n2 }, r2) {
2028
+ let i2 = Br(`startSpanManual`);
2023
2029
  if (!i2) return r2;
2024
2030
  let a2 = i2.startSpanManual({ name: e5, tags: { feature: t2, ...n2 } });
2025
2031
  return r2.then(() => a2.end(), (e6) => a2.fail(e6)), r2;
2026
2032
  }
2027
- var Vr = class extends e {
2033
+ var Ur = class extends e {
2028
2034
  state = { hasError: false };
2029
2035
  static getDerivedStateFromError() {
2030
2036
  return { hasError: true };
2031
2037
  }
2032
2038
  componentDidCatch(e5, t2) {
2033
- zr(e5, { feature: this.props.feature ?? `service`, action: `render`, contexts: { react: { componentStack: t2.componentStack } } });
2039
+ Vr(e5, { feature: this.props.feature ?? `service`, action: `render`, contexts: { react: { componentStack: t2.componentStack } } });
2034
2040
  }
2035
2041
  render() {
2036
2042
  return this.state.hasError ? this.props.fallback : this.props.children;
2037
2043
  }
2038
2044
  };
2039
- function Hr(e5) {
2045
+ function Wr(e5) {
2040
2046
  let t2 = e5;
2041
- if (t2.__state || (t2.__state = { status: `pending` }, t2.then((e6) => {
2047
+ return t2.__state || (t2.__state = { status: `pending` }, t2.then((e6) => {
2042
2048
  t2.__state = { status: `fulfilled`, value: e6 };
2043
2049
  }, (e6) => {
2044
2050
  t2.__state = { status: `rejected`, reason: e6 };
2045
- })), t2.__state.status === `fulfilled`) return t2.__state.value;
2046
- throw t2.__state.status === `rejected` ? t2.__state.reason : t2;
2051
+ })), t2.__state;
2047
2052
  }
2048
- function Ur(e5) {
2053
+ function Gr(e5) {
2054
+ let t2 = Wr(e5);
2055
+ if (t2.status === `fulfilled`) return t2.value;
2056
+ throw t2.status === `rejected` ? t2.reason : e5;
2057
+ }
2058
+ function Kr(e5) {
2049
2059
  let t2 = Promise.resolve(e5);
2050
2060
  return t2.__state = { status: `fulfilled`, value: e5 }, t2;
2051
2061
  }
2052
- var Wr = /* @__PURE__ */ new WeakMap();
2053
- function Gr(e5, t2, n2) {
2054
- let r2 = Wr.get(e5);
2055
- r2 || (r2 = /* @__PURE__ */ new WeakMap(), Wr.set(e5, r2));
2062
+ var qr = /* @__PURE__ */ new WeakMap();
2063
+ function Jr(e5, t2, n2) {
2064
+ let r2 = qr.get(e5);
2065
+ r2 || (r2 = /* @__PURE__ */ new WeakMap(), qr.set(e5, r2));
2056
2066
  let i2 = r2.get(t2);
2057
2067
  i2 || (i2 = /* @__PURE__ */ new WeakMap(), r2.set(t2, i2));
2058
2068
  let a2 = i2.get(n2);
2059
2069
  if (!a2) {
2060
2070
  let r3 = e5;
2061
- a2 = r3.__state?.status === `fulfilled` ? Ur(t2(r3.__state.value)) : r3.__state?.status === `rejected` ? Ur(n2(r3.__state.reason)) : e5.then(t2, n2), i2.set(n2, a2);
2071
+ a2 = r3.__state?.status === `fulfilled` ? Kr(t2(r3.__state.value)) : r3.__state?.status === `rejected` ? Kr(n2(r3.__state.reason)) : e5.then(t2, n2), i2.set(n2, a2);
2062
2072
  }
2063
2073
  return a2;
2064
2074
  }
2065
2075
  function Z(e5) {
2066
2076
  return e5;
2067
2077
  }
2068
- var Kr = Z(`@wix/site-service-url`);
2069
- var qr = `appSectionParams`;
2070
- function Jr(e5) {
2071
- let t2 = e5.searchParams.get(qr);
2078
+ var Yr = Z(`@wix/site-service-url`);
2079
+ var Xr = `appSectionParams`;
2080
+ function Zr(e5) {
2081
+ let t2 = e5.searchParams.get(Xr);
2072
2082
  if (t2 === null) return e5;
2073
2083
  let n2 = new URL(e5);
2074
- n2.searchParams.delete(qr);
2075
- for (let [e6, r2] of Object.entries(Yr(t2))) typeof r2 == `string` && !n2.searchParams.has(e6) && n2.searchParams.set(e6, r2);
2084
+ n2.searchParams.delete(Xr);
2085
+ for (let [e6, r2] of Object.entries(Qr(t2))) typeof r2 == `string` && !n2.searchParams.has(e6) && n2.searchParams.set(e6, r2);
2076
2086
  return n2;
2077
2087
  }
2078
- function Yr(e5) {
2088
+ function Qr(e5) {
2079
2089
  try {
2080
2090
  let t2 = JSON.parse(e5);
2081
2091
  return t2 && typeof t2 == `object` && !Array.isArray(t2) ? t2 : {};
@@ -2083,16 +2093,16 @@ function Yr(e5) {
2083
2093
  return {};
2084
2094
  }
2085
2095
  }
2086
- var Xr = `bookings-uou:url-change`;
2087
- var Zr = (e5) => {
2096
+ var $r = `bookings-uou:url-change`;
2097
+ var ei = (e5) => {
2088
2098
  let t2 = new URL(e5);
2089
2099
  return t2.searchParams.sort(), t2.href;
2090
2100
  };
2091
- function Qr(e5, { disableScrollToTop: t2, skipHistory: n2 } = {}) {
2101
+ function ti(e5, { disableScrollToTop: t2, skipHistory: n2 } = {}) {
2092
2102
  let r2 = globalThis.window;
2093
2103
  if (!r2?.history) return;
2094
2104
  let i2 = new URL(r2.location.href);
2095
- if (Zr(i2) === Zr(e5)) return;
2105
+ if (ei(i2) === ei(e5)) return;
2096
2106
  let a2 = { scrollY: r2.scrollY };
2097
2107
  if (n2) r2.history.replaceState(a2, ``, e5.href);
2098
2108
  else {
@@ -2103,54 +2113,54 @@ function Qr(e5, { disableScrollToTop: t2, skipHistory: n2 } = {}) {
2103
2113
  return;
2104
2114
  }
2105
2115
  }
2106
- r2.dispatchEvent(new Event(Xr));
2116
+ r2.dispatchEvent(new Event($r));
2107
2117
  }
2108
- function $r(e5) {
2118
+ function ni(e5) {
2109
2119
  let t2 = globalThis.window;
2110
- return t2 ? (t2.addEventListener(Xr, e5), t2.addEventListener(`popstate`, e5), () => {
2111
- t2.removeEventListener(Xr, e5), t2.removeEventListener(`popstate`, e5);
2120
+ return t2 ? (t2.addEventListener($r, e5), t2.addEventListener(`popstate`, e5), () => {
2121
+ t2.removeEventListener($r, e5), t2.removeEventListener(`popstate`, e5);
2112
2122
  }) : () => {
2113
2123
  };
2114
2124
  }
2115
- var ei = (e5) => {
2125
+ var ri = (e5) => {
2116
2126
  try {
2117
2127
  return decodeURIComponent(e5);
2118
2128
  } catch {
2119
2129
  return e5;
2120
2130
  }
2121
2131
  };
2122
- function ti(e5, t2) {
2132
+ function ii(e5, t2) {
2123
2133
  let n2 = t2 ? new URL(t2).pathname : `/`;
2124
- return `./${ei(new URL(e5).pathname.replace(n2, ``).replace(/^\/|\/$/g, ``))}`;
2134
+ return `./${ri(new URL(e5).pathname.replace(n2, ``).replace(/^\/|\/$/g, ``))}`;
2125
2135
  }
2126
- function ni() {
2127
- let e5 = d(Kr), t2 = r(() => e5.currentUrl, [e5]), n2 = l($r, t2, t2), i2 = o(() => Jr(new URL(n2)), [n2]), a2 = e5.siteUrl.replace(/\/$/, ``);
2128
- return { pathname: i2.pathname, search: i2.search, searchParams: i2.searchParams, href: i2.href, getParsedUrl: () => Jr(new URL(e5.currentUrl)), getRelativeUrl: () => ti(e5.currentUrl, a2), getExternalBaseUrl: () => a2, pushUrl: Qr };
2136
+ function ai() {
2137
+ let e5 = d(Yr), t2 = r(() => e5.currentUrl, [e5]), n2 = l(ni, t2, t2), i2 = o(() => Zr(new URL(n2)), [n2]), a2 = e5.siteUrl.replace(/\/$/, ``);
2138
+ return { pathname: i2.pathname, search: i2.search, searchParams: i2.searchParams, href: i2.href, getParsedUrl: () => Zr(new URL(e5.currentUrl)), getRelativeUrl: () => ii(e5.currentUrl, a2), getExternalBaseUrl: () => a2, pushUrl: ti };
2129
2139
  }
2130
- var Q = { category: `category`, location: `location`, page: `page`, blob: `b`, resource: `resource`, referral: `referral`, timezone: `timezone`, bookingId: `bookingId`, token: `token`, rescheduleRedirectUrl: `rescheduleRedirectUrl` };
2131
- var ri = Z(`@wix/site-service-warmup-data`);
2132
- function ii() {
2140
+ var Q = { category: `category`, location: `location`, page: `page`, blob: `bookingSelection`, legacyBlob: `b`, resource: `resource`, referral: `referral`, timezone: `timezone`, bookingId: `bookingId`, token: `token`, rescheduleRedirectUrl: `rescheduleRedirectUrl` };
2141
+ var oi = Z(`@wix/site-service-warmup-data`);
2142
+ function si() {
2133
2143
  try {
2134
2144
  return u();
2135
2145
  } catch {
2136
2146
  return null;
2137
2147
  }
2138
2148
  }
2139
- function ai(e5) {
2149
+ function ci(e5) {
2140
2150
  try {
2141
- return e5 ? e5(ri) : null;
2151
+ return e5 ? e5(oi) : null;
2142
2152
  } catch {
2143
2153
  return null;
2144
2154
  }
2145
2155
  }
2146
- function oi() {
2147
- let e5 = ai(ii()), t2 = typeof window > `u`;
2156
+ function li() {
2157
+ let e5 = ci(si()), t2 = typeof window > `u`;
2148
2158
  return { scope: e5 ?? void 0, get: async (n2) => {
2149
2159
  if (t2 || !e5) return null;
2150
2160
  try {
2151
2161
  return await e5.get(n2);
2152
2162
  } catch (e6) {
2153
- return zr(e6, { feature: Lr.warmup, action: `read`, level: `warning`, contexts: { warmup: { key: n2 } } }), null;
2163
+ return Vr(e6, { feature: zr.warmup, action: `read`, level: `warning`, contexts: { warmup: { key: n2 } } }), null;
2154
2164
  }
2155
2165
  }, set: (n2, r2) => {
2156
2166
  if (t2 && e5) try {
@@ -2159,75 +2169,75 @@ function oi() {
2159
2169
  }
2160
2170
  } };
2161
2171
  }
2162
- var si = Z(`@wix/site-service-locale`);
2163
- var ci = Z;
2164
- var li = ci(`@wix/viewer-service-multilingual`);
2165
- function ui() {
2172
+ var ui = Z(`@wix/site-service-locale`);
2173
+ var di = Z;
2174
+ var fi = di(`@wix/viewer-service-multilingual`);
2175
+ function pi() {
2166
2176
  try {
2167
- return Nr.getLanguage() ?? `en`;
2177
+ return Fr.getLanguage() ?? `en`;
2168
2178
  } catch {
2169
2179
  return `en`;
2170
2180
  }
2171
2181
  }
2172
- function di(e5) {
2182
+ function mi(e5) {
2173
2183
  try {
2174
2184
  return d(e5);
2175
2185
  } catch {
2176
2186
  return null;
2177
2187
  }
2178
2188
  }
2179
- function fi() {
2180
- let e5 = di(si), t2 = di(li);
2181
- return t2?.multilingualEnabled && t2.currentLocale?.languageCode || e5?.language || ui();
2189
+ function hi() {
2190
+ let e5 = mi(ui), t2 = mi(fi);
2191
+ return t2?.multilingualEnabled && t2.currentLocale?.languageCode || e5?.language || pi();
2182
2192
  }
2183
- var pi = `bookings-uou`;
2184
- function mi(e5) {
2185
- return `${pi}:${e5}:locations:all`;
2193
+ var gi = `bookings-uou`;
2194
+ function _i(e5) {
2195
+ return `${gi}:${e5}:locations:all`;
2186
2196
  }
2187
- var hi = 5e3;
2188
- var gi = 100;
2189
- var _i = `wix-warmup-data`;
2190
- var vi = null;
2191
- function yi(e5) {
2197
+ var vi = 5e3;
2198
+ var yi = 100;
2199
+ var bi = `wix-warmup-data`;
2200
+ var xi = null;
2201
+ function Si(e5) {
2192
2202
  if (typeof document < `u`) try {
2193
- let t2 = document.getElementById(_i)?.textContent;
2194
- return t2 ? (vi?.text !== t2 && (vi = { text: t2, data: JSON.parse(t2).builderComponentsWarmupData ?? {} }), vi.data[e5] ?? void 0) : void 0;
2203
+ let t2 = document.getElementById(bi)?.textContent;
2204
+ return t2 ? (xi?.text !== t2 && (xi = { text: t2, data: JSON.parse(t2).builderComponentsWarmupData ?? {} }), xi.data[e5] ?? void 0) : void 0;
2195
2205
  } catch {
2196
2206
  return;
2197
2207
  }
2198
2208
  }
2199
- var bi = () => ({ promises: /* @__PURE__ */ new Map(), invalidatedWarmup: /* @__PURE__ */ new Set() });
2200
- var xi = bi();
2201
- var Si = /* @__PURE__ */ new WeakMap();
2202
- var Ci = /* @__PURE__ */ new WeakMap();
2203
- function wi(e5) {
2204
- if (!e5) return xi;
2205
- let t2 = Si.get(e5);
2206
- return t2 || (t2 = bi(), Si.set(e5, t2)), t2;
2209
+ var Ci = () => ({ promises: /* @__PURE__ */ new Map(), invalidatedWarmup: /* @__PURE__ */ new Set() });
2210
+ var wi = Ci();
2211
+ var Ti = /* @__PURE__ */ new WeakMap();
2212
+ var Ei = /* @__PURE__ */ new WeakMap();
2213
+ function Di(e5) {
2214
+ if (!e5) return wi;
2215
+ let t2 = Ti.get(e5);
2216
+ return t2 || (t2 = Ci(), Ti.set(e5, t2)), t2;
2207
2217
  }
2208
- function Ti({ key: e5, warmupData: t2, fetchData: n2, refresh: r2 = false }) {
2218
+ function Oi({ key: e5, warmupData: t2, fetchData: n2, refresh: r2 = false }) {
2209
2219
  if (e5 === null) return n2();
2210
2220
  if (typeof window > `u`) {
2211
2221
  let r3 = () => n2().then((n3) => (t2.set(e5, n3), n3)), { scope: i3 } = t2;
2212
2222
  if (!i3) return r3();
2213
- let a3 = Ci.get(i3);
2214
- a3 || (a3 = /* @__PURE__ */ new Map(), Ci.set(i3, a3));
2223
+ let a3 = Ei.get(i3);
2224
+ a3 || (a3 = /* @__PURE__ */ new Map(), Ei.set(i3, a3));
2215
2225
  let o3 = a3.get(e5);
2216
2226
  if (o3) return o3;
2217
2227
  let s3 = r3();
2218
2228
  return a3.set(e5, s3), s3.catch(() => a3.delete(e5)), s3;
2219
2229
  }
2220
- let i2 = wi(t2.scope), a2 = Date.now();
2230
+ let i2 = Di(t2.scope), a2 = Date.now();
2221
2231
  for (let [e6, t3] of i2.promises) t3.expiresAt <= a2 && i2.promises.delete(e6);
2222
2232
  let o2 = i2.promises.get(e5);
2223
2233
  if (o2 && !r2) return o2.promise;
2224
2234
  r2 && i2.invalidatedWarmup.add(e5);
2225
2235
  let s2 = !i2.invalidatedWarmup.has(e5);
2226
2236
  if (s2) {
2227
- let t3 = yi(e5);
2237
+ let t3 = Si(e5);
2228
2238
  if (t3 !== void 0) {
2229
- let n3 = Ur(t3);
2230
- return i2.promises.set(e5, { promise: n3, expiresAt: a2 + hi }), n3;
2239
+ let n3 = Kr(t3);
2240
+ return i2.promises.set(e5, { promise: n3, expiresAt: a2 + vi }), n3;
2231
2241
  }
2232
2242
  }
2233
2243
  let c2 = (async () => {
@@ -2237,123 +2247,123 @@ function Ti({ key: e5, warmupData: t2, fetchData: n2, refresh: r2 = false }) {
2237
2247
  }
2238
2248
  return n2();
2239
2249
  })();
2240
- i2.promises.size >= gi && i2.promises.delete(i2.promises.keys().next().value);
2250
+ i2.promises.size >= yi && i2.promises.delete(i2.promises.keys().next().value);
2241
2251
  let l2 = { promise: c2, expiresAt: 1 / 0 };
2242
2252
  return i2.promises.set(e5, l2), c2.then(() => {
2243
- l2.expiresAt = Date.now() + hi;
2253
+ l2.expiresAt = Date.now() + vi;
2244
2254
  }, () => {
2245
2255
  i2.promises.get(e5) === l2 && i2.promises.delete(e5);
2246
2256
  }), c2;
2247
2257
  }
2248
- var Ei = [{ path: `businessLocations.locations.business.address.geocode.latitude` }, { path: `businessLocations.locations.business.address.geocode.longitude` }, { path: `businessLocations.locations.custom.address.geocode.latitude` }, { path: `businessLocations.locations.custom.address.geocode.longitude` }, { path: `businessLocations.locations.calculatedAddress.geocode.latitude` }, { path: `businessLocations.locations.calculatedAddress.geocode.longitude` }];
2249
- function Di(e5) {
2258
+ var ki = [{ path: `businessLocations.locations.business.address.geocode.latitude` }, { path: `businessLocations.locations.business.address.geocode.longitude` }, { path: `businessLocations.locations.custom.address.geocode.latitude` }, { path: `businessLocations.locations.custom.address.geocode.longitude` }, { path: `businessLocations.locations.calculatedAddress.geocode.latitude` }, { path: `businessLocations.locations.calculatedAddress.geocode.longitude` }];
2259
+ function Ai(e5) {
2250
2260
  return Dt(Object.assign(e5, { domainToMappings: { "*.dev.wix-code.com": [{ srcPath: `/_api/services-2`, destPath: `` }, { srcPath: `/_api/bookings/v2/services`, destPath: `/v2/services` }], "www.wixapis.com": [{ srcPath: `/_api/bookings/v2/services`, destPath: `/v2/services` }, { srcPath: `/bookings/v2/services`, destPath: `/v2/services` }, { srcPath: `/bookings/v2/bulk/services`, destPath: `/v2/bulk/services` }, { srcPath: `/bookings/services/v2/bulk/services`, destPath: `/v2/bulk/services` }], "manage._base_domain_": [{ srcPath: `/_api/bookings/v2/services`, destPath: `/v2/services` }, { srcPath: `/_api/bookings/v2/bulk/services`, destPath: `/v2/bulk/services` }], "editor._base_domain_": [{ srcPath: `/_api/bookings/v2/services`, destPath: `/v2/services` }, { srcPath: `/_api/bookings/v2/bulk/services`, destPath: `/v2/bulk/services` }], "blocks._base_domain_": [{ srcPath: `/_api/bookings/v2/services`, destPath: `/v2/services` }, { srcPath: `/_api/bookings/v2/bulk/services`, destPath: `/v2/bulk/services` }], "create.editorx": [{ srcPath: `/_api/bookings/v2/services`, destPath: `/v2/services` }, { srcPath: `/_api/bookings/v2/bulk/services`, destPath: `/v2/bulk/services` }], _: [{ srcPath: `/_api/bookings/v2/services`, destPath: `/v2/services` }], "www._base_domain_": [{ srcPath: `/_api/bookings/v2/services`, destPath: `/v2/services` }], "bo._base_domain_": [{ srcPath: `/_api/bookings/v2/services`, destPath: `/v2/services` }], "wixbo.ai": [{ srcPath: `/_api/bookings/v2/services`, destPath: `/v2/services` }], "wix-bo.com": [{ srcPath: `/_api/bookings/v2/services`, destPath: `/v2/services` }], "editor.wixapps.net": [{ srcPath: `/_api/bookings/v2/services`, destPath: `/v2/services` }], "api._api_base_domain_": [{ srcPath: `/services-2`, destPath: `` }] } }));
2251
2261
  }
2252
- var Oi = `@wix/auto_sdk_bookings_services`;
2253
- function ki(e5) {
2262
+ var ji = `@wix/auto_sdk_bookings_services`;
2263
+ function Mi(e5) {
2254
2264
  function t2({ host: t3 }) {
2255
- return { entityFqdn: `wix.bookings.services.v2.service`, method: `POST`, methodFqn: `wix.bookings.services.v2.ServicesService.QueryLocations`, packageName: Oi, migrationOptions: { optInTransformResponse: true }, url: Di({ protoPath: `/v2/services/locations/query`, data: e5, host: t3 }), data: e5, transformResponse: (e6) => st(e6, [{ transformFn: Xt, paths: Ei }]) };
2265
+ return { entityFqdn: `wix.bookings.services.v2.service`, method: `POST`, methodFqn: `wix.bookings.services.v2.ServicesService.QueryLocations`, packageName: ji, migrationOptions: { optInTransformResponse: true }, url: Ai({ protoPath: `/v2/services/locations/query`, data: e5, host: t3 }), data: e5, transformResponse: (e6) => ot(e6, [{ transformFn: Xt, paths: ki }]) };
2256
2266
  }
2257
2267
  return t2;
2258
2268
  }
2259
- var Ai = [{ path: `businessLocations.locations.calculatedAddress` }, { path: `businessLocations.locations.business.address` }, { path: `businessLocations.locations.custom.address` }];
2260
- async function ji(e5) {
2261
- let { httpClient: t2, sideEffects: n2 } = arguments[1], r2 = ki(Xe({ filter: e5?.filter }));
2269
+ var Ni = [{ path: `businessLocations.locations.calculatedAddress` }, { path: `businessLocations.locations.business.address` }, { path: `businessLocations.locations.custom.address` }];
2270
+ async function Pi(e5) {
2271
+ let { httpClient: t2, sideEffects: n2 } = arguments[1], r2 = Mi(Ye({ filter: e5?.filter }));
2262
2272
  n2?.onSiteCall?.();
2263
2273
  try {
2264
2274
  let e6 = await t2.request(r2);
2265
- return n2?.onSuccess?.(e6), Ze(st(e6.data, [{ transformFn: Zt, paths: Ai }]));
2275
+ return n2?.onSuccess?.(e6), Xe(ot(e6.data, [{ transformFn: Zt, paths: Ni }]));
2266
2276
  } catch (e6) {
2267
- let t3 = _t(e6, { spreadPathsToArguments: {}, explicitPathsToArguments: { filter: `$[0].filter` }, singleArgumentUnchanged: false }, [`options`]);
2277
+ let t3 = gt(e6, { spreadPathsToArguments: {}, explicitPathsToArguments: { filter: `$[0].filter` }, singleArgumentUnchanged: false }, [`options`]);
2268
2278
  throw n2?.onError?.(e6), t3;
2269
2279
  }
2270
2280
  }
2271
- function Mi(e5) {
2272
- return (t2) => ji(t2, { httpClient: e5 });
2281
+ function Fi(e5) {
2282
+ return (t2) => Pi(t2, { httpClient: e5 });
2273
2283
  }
2274
- var Ni = Et(Mi);
2275
- var Pi = `13d21c63-b5ec-5912-8397-c3a5ddb27a97`;
2276
- var Fi = function(e5) {
2284
+ var Ii = Et(Fi);
2285
+ var Li = `13d21c63-b5ec-5912-8397-c3a5ddb27a97`;
2286
+ var Ri = function(e5) {
2277
2287
  return e5.BOOK_ONLINE = `bookingsBookOnline`, e5.SERVICE_PAGE = `bookingsServicePage`, e5.CALENDAR_PAGE = `bookingsCalendar`, e5.FORM_PAGE = `bookingsForm`, e5;
2278
2288
  }({});
2279
- function Ii(e5) {
2289
+ function zi(e5) {
2280
2290
  return e5.business?._id ?? null;
2281
2291
  }
2282
- function Li(e5) {
2292
+ function Bi(e5) {
2283
2293
  return e5.business?.name ?? null;
2284
2294
  }
2285
- async function Ri() {
2286
- let e5 = await Ni({ filter: { services: { appId: Pi, hidden: false } } });
2287
- return { locations: [...e5.businessLocations?.locations ?? []].sort((e6, t2) => (Li(e6) ?? ``).localeCompare(Li(t2) ?? ``)), hasOtherLocations: !!(e5.customLocations?.exists || e5.customerLocations?.exists) };
2295
+ async function Vi() {
2296
+ let e5 = await Ii({ filter: { services: { appId: Li, hidden: false } } });
2297
+ return { locations: [...e5.businessLocations?.locations ?? []].sort((e6, t2) => (Bi(e6) ?? ``).localeCompare(Bi(t2) ?? ``)), hasOtherLocations: !!(e5.customLocations?.exists || e5.customerLocations?.exists) };
2288
2298
  }
2289
- function zi({ isLoading: e5, hasError: t2, refetch: n2, children: r2 }) {
2290
- let { searchParams: i2 } = ni(), a2 = { locationItems: [], selectedLocationId: i2.get(Q.location), hasOtherLocations: false, hasMultipleLocations: false, isLoading: e5, hasError: t2, refetch: n2, selectLocation: () => {
2299
+ function Hi({ isLoading: e5, hasError: t2, refetch: n2, children: r2 }) {
2300
+ let { searchParams: i2 } = ai(), a2 = { locationItems: [], selectedLocationId: i2.get(Q.location), hasOtherLocations: false, hasMultipleLocations: false, isLoading: e5, hasError: t2, refetch: n2, selectLocation: () => {
2291
2301
  } };
2292
2302
  return f($.Provider, { value: a2, children: r2 });
2293
2303
  }
2294
- function Bi({ refetch: e5, children: t2 }) {
2295
- return f(zi, { isLoading: true, hasError: false, refetch: e5, children: t2 });
2304
+ function Ui({ refetch: e5, children: t2 }) {
2305
+ return f(Hi, { isLoading: true, hasError: false, refetch: e5, children: t2 });
2296
2306
  }
2297
- function Vi({ refetch: e5, children: t2 }) {
2298
- return f(zi, { isLoading: false, hasError: true, refetch: e5, children: t2 });
2307
+ function Wi({ refetch: e5, children: t2 }) {
2308
+ return f(Hi, { isLoading: false, hasError: true, refetch: e5, children: t2 });
2299
2309
  }
2300
- var Hi = ci(`@wix/site-service-business-logger`);
2301
- function Ui(e5) {
2310
+ var Gi = di(`@wix/site-service-business-logger`);
2311
+ function Ki(e5) {
2302
2312
  return { evid: 32, src: 16, endpoint: ``, params: e5 };
2303
2313
  }
2304
- var Wi = { SERVICES: `services_context`, SERVICE: `service_context`, TIME_SLOTS: `time_slots_context`, BOOKING_CHECKOUT: `booking_checkout_context`, CATEGORIES: `categories_context`, LOCATIONS: `locations_context`, SERVICE_ADD_ONS: `service_addons_context`, PREFERENCES: `preferences_context` };
2305
- Fi.BOOK_ONLINE;
2306
- var Gi = `new_bookings_server`;
2307
- var Ki = (e5) => {
2308
- let { reportBi: t2 } = d(Hi);
2314
+ var qi = { SERVICES: `services_context`, SERVICE: `service_context`, TIME_SLOTS: `time_slots_context`, BOOKING_CHECKOUT: `booking_checkout_context`, CATEGORIES: `categories_context`, LOCATIONS: `locations_context`, SERVICE_ADD_ONS: `service_addons_context`, PREFERENCES: `preferences_context` };
2315
+ Ri.BOOK_ONLINE;
2316
+ var Ji = `new_bookings_server`;
2317
+ var Yi = (e5) => {
2318
+ let { reportBi: t2 } = d(Gi);
2309
2319
  return r((n2) => {
2310
- t2({ widget_name: e5, bookingsPlatform: Gi, is_over_editor: false, ...n2.params, src: n2.src, evid: n2.evid }, { endpoint: n2.endpoint });
2320
+ t2({ widget_name: e5, bookingsPlatform: Ji, is_over_editor: false, ...n2.params, src: n2.src, evid: n2.evid }, { endpoint: n2.endpoint });
2311
2321
  }, [t2, e5]);
2312
2322
  };
2313
- var qi = (e5, t2 = true) => {
2314
- let n2 = Ki(e5), { getParsedUrl: r2 } = ni(), i2 = s(false);
2323
+ var Xi = (e5, t2 = true) => {
2324
+ let n2 = Yi(e5), { getParsedUrl: r2 } = ai(), i2 = s(false);
2315
2325
  a(() => {
2316
- t2 && !i2.current && (i2.current = true, n2(Ui({ referralInfo: r2().searchParams.get(Q.referral) ?? void 0 })));
2326
+ t2 && !i2.current && (i2.current = true, n2(Ki({ referralInfo: r2().searchParams.get(Q.referral) ?? void 0 })));
2317
2327
  }, [t2, n2, r2]);
2318
2328
  };
2319
2329
  var $ = n(null);
2320
- var Ji = `useLocationsContext must be used within LocationsContextProvider`;
2321
- function Yi() {
2330
+ var Zi = `useLocationsContext must be used within LocationsContextProvider`;
2331
+ function Qi() {
2322
2332
  let e5 = i($);
2323
- if (!e5) throw Error(Ji);
2333
+ if (!e5) throw Error(Zi);
2324
2334
  return e5;
2325
2335
  }
2326
- function Xi(e5, t2) {
2327
- let n2 = Ii(e5);
2328
- return { locationId: n2, locationName: Li(e5), isSelected: n2 != null && n2 === t2 };
2336
+ function $i(e5, t2) {
2337
+ let n2 = zi(e5);
2338
+ return { locationId: n2, locationName: Bi(e5), isSelected: n2 != null && n2 === t2 };
2329
2339
  }
2330
- var Zi = (e5) => ({ ...e5, hasError: false });
2331
- var Qi = () => ({ locations: [], hasOtherLocations: false, hasError: true });
2332
- function $i({ locationsPromise: e5, refetch: t2, children: n2 }) {
2333
- let { locations: i2, hasOtherLocations: s2, hasError: c2 } = Hr(e5), { pathname: l2, searchParams: u2, pushUrl: d2, getExternalBaseUrl: p2 } = ni(), m2 = u2.get(Q.location), h2 = r((e6, t3) => {
2340
+ var ea = (e5) => ({ ...e5, hasError: false });
2341
+ var ta = () => ({ locations: [], hasOtherLocations: false, hasError: true });
2342
+ function na({ locationsPromise: e5, refetch: t2, children: n2 }) {
2343
+ let { locations: i2, hasOtherLocations: s2, hasError: c2 } = Gr(e5), { pathname: l2, searchParams: u2, pushUrl: d2, getExternalBaseUrl: p2 } = ai(), m2 = u2.get(Q.location), h2 = r((e6, t3) => {
2334
2344
  let n3 = new URLSearchParams(u2);
2335
2345
  e6 ? n3.set(Q.location, e6) : n3.delete(Q.location), n3.delete(Q.page);
2336
2346
  let r2 = n3.toString(), i3 = r2 ? `${l2}?${r2}` : l2;
2337
2347
  d2(new URL(i3, `${p2()}/`), { disableScrollToTop: true, skipHistory: t3 });
2338
- }, [l2, u2, d2, p2]), g2 = r((e6) => h2(e6, false), [h2]), _2 = m2 != null && !c2 && !(m2 === `OTHER_LOCATIONS` && s2) && !i2.some((e6) => Ii(e6) === m2);
2348
+ }, [l2, u2, d2, p2]), g2 = r((e6) => h2(e6, false), [h2]), _2 = m2 != null && !c2 && !(m2 === `OTHER_LOCATIONS` && s2) && !i2.some((e6) => zi(e6) === m2);
2339
2349
  a(() => {
2340
2350
  _2 && h2(null, true);
2341
2351
  }, [_2, h2]);
2342
- let v2 = i2.filter((e6) => Ii(e6)).length + +!!s2, y2 = o(() => ({ locationItems: i2.map((e6) => Xi(e6, m2)), selectedLocationId: m2, hasOtherLocations: s2, hasMultipleLocations: v2 > 1, isLoading: false, hasError: c2, refetch: t2, selectLocation: g2 }), [i2, m2, s2, c2, v2, t2, g2]);
2352
+ let v2 = i2.filter((e6) => zi(e6)).length + +!!s2, y2 = o(() => ({ locationItems: i2.map((e6) => $i(e6, m2)), selectedLocationId: m2, hasOtherLocations: s2, hasMultipleLocations: v2 > 1, isLoading: false, hasError: c2, refetch: t2, selectLocation: g2 }), [i2, m2, s2, c2, v2, t2, g2]);
2343
2353
  return f($.Provider, { value: y2, children: n2 });
2344
2354
  }
2345
- function ea({ children: e5 }) {
2346
- qi(Wi.LOCATIONS);
2347
- let n2 = oi(), i2 = fi(), [a2, s2] = c(0), l2 = o(() => Gr(Ti({ key: mi(i2), refresh: a2 !== 0, warmupData: n2, fetchData: () => Br(`locations-context-load`, { feature: Lr.locations }, Ri()) }), Zi, Qi), [a2, i2]), u2 = r(() => s2((e6) => e6 + 1), []);
2348
- return f(Vr, { fallback: f(Vi, { refetch: u2, children: e5 }), feature: Lr.locations, children: f(t, { fallback: f(Bi, { refetch: u2, children: e5 }), children: f($i, { locationsPromise: l2, refetch: u2, children: e5 }) }) });
2355
+ function ra({ children: e5 }) {
2356
+ Xi(qi.LOCATIONS);
2357
+ let n2 = li(), i2 = hi(), [a2, s2] = c(0), l2 = o(() => Jr(Oi({ key: _i(i2), refresh: a2 !== 0, warmupData: n2, fetchData: () => Hr(`locations-context-load`, { feature: zr.locations }, Vi()) }), ea, ta), [a2, i2]), u2 = r(() => s2((e6) => e6 + 1), []);
2358
+ return f(Ur, { fallback: f(Wi, { refetch: u2, children: e5 }), feature: zr.locations, children: f(t, { fallback: f(Ui, { refetch: u2, children: e5 }), children: f(na, { locationsPromise: l2, refetch: u2, children: e5 }) }) });
2349
2359
  }
2350
- var ta = wn(`c151d9f7-1582-407c-bb59-59030f244b47`);
2360
+ var ia = En(`c151d9f7-1582-407c-bb59-59030f244b47`);
2351
2361
  export {
2352
- Ji as LOCATIONS_CONTEXT_MISSING_PROVIDER_ERROR,
2353
- ea as LocationsContextProvider,
2354
- ea as default,
2355
- ta as injectAccessTokenGetter,
2362
+ Zi as LOCATIONS_CONTEXT_MISSING_PROVIDER_ERROR,
2363
+ ra as LocationsContextProvider,
2364
+ ra as default,
2365
+ ia as injectAccessTokenGetter,
2356
2366
  $ as locationsContext,
2357
- Yi as useLocationsContext
2367
+ Qi as useLocationsContext
2358
2368
  };
2359
2369
  //# sourceMappingURL=context-locations.mjs.map