@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
@@ -20,11 +20,11 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
20
20
  // context-service-addons.ts
21
21
  var context_service_addons_exports = {};
22
22
  __export(context_service_addons_exports, {
23
- ServiceAddOnsContextProvider: () => $s,
24
- default: () => $s,
25
- injectAccessTokenGetter: () => ec,
26
- serviceAddOnsContext: () => Xs,
27
- useServiceAddOnsContext: () => Zs
23
+ ServiceAddOnsContextProvider: () => pc,
24
+ default: () => pc,
25
+ injectAccessTokenGetter: () => mc,
26
+ serviceAddOnsContext: () => uc,
27
+ useServiceAddOnsContext: () => dc
28
28
  });
29
29
  module.exports = __toCommonJS(context_service_addons_exports);
30
30
 
@@ -33,11 +33,11 @@ var import_react = require("react");
33
33
  var import_service = require("@wix/bookings/context/service");
34
34
  var import_services_manager_react = require("@wix/services-manager-react");
35
35
  var import_jsx_runtime = require("react/jsx-runtime");
36
- var p = {};
37
- function m(e5, t2 = false, n2 = (e6) => e6) {
36
+ var m = {};
37
+ function h(e5, t2 = false, n2 = (e6) => e6) {
38
38
  return () => ({ __type: `event-definition`, type: e5, isDomainEvent: t2, transformations: n2 });
39
39
  }
40
- var h = (e5) => {
40
+ var g = (e5) => {
41
41
  switch (e5) {
42
42
  case `get`:
43
43
  case `GET`:
@@ -64,11 +64,11 @@ var h = (e5) => {
64
64
  throw Error(`Unknown method: ${e5}`);
65
65
  }
66
66
  };
67
- var g = (e5) => (t2) => async (n2) => {
67
+ var _ = (e5) => (t2) => async (n2) => {
68
68
  let r2, i2 = (t3) => {
69
69
  if (r2 = e5(n2)(t3), r2.url === void 0) throw Error(`Url was not successfully created for this request, please reach out to support channels for assistance.`);
70
70
  let { method: i3, url: a2, params: o2 } = r2;
71
- return { ...r2, method: h(i3), url: a2, data: r2.data, params: o2 };
71
+ return { ...r2, method: g(i3), url: a2, data: r2.data, params: o2 };
72
72
  };
73
73
  try {
74
74
  let e6 = await t2.request(i2);
@@ -81,10 +81,10 @@ var g = (e5) => (t2) => async (n2) => {
81
81
  throw typeof e6 == `object` && e6 && `response` in e6 && typeof e6.response == `object` && e6.response !== null && `data` in e6.response ? e6.response.data : e6;
82
82
  }
83
83
  };
84
- var _ = (e5) => e5.__isAmbassador ? true : !!e5().__isAmbassador;
85
- var v = `__metadata`;
86
- var y = `edge.wixapis.com`;
87
- var b = class extends Error {
84
+ var v = (e5) => e5.__isAmbassador ? true : !!e5().__isAmbassador;
85
+ var y = `__metadata`;
86
+ var b = `edge.wixapis.com`;
87
+ var x = class extends Error {
88
88
  message;
89
89
  response;
90
90
  constructor(e5, t2) {
@@ -92,108 +92,108 @@ var b = class extends Error {
92
92
  }
93
93
  async details() {
94
94
  let e5 = await this.response.json();
95
- return x(this.response.status, e5?.message, e5?.details, { requestId: this.response.headers.get(`X-Wix-Request-Id`), details: e5 });
95
+ return ee(this.response.status, e5?.message, e5?.details, { requestId: this.response.headers.get(`X-Wix-Request-Id`), details: e5 });
96
96
  }
97
97
  };
98
- var x = (e5, t2, n2, r2) => ({ details: { ...!n2?.validationError && { applicationError: { description: t2, code: e5, data: r2 } }, ...n2 }, message: t2, requestId: r2?.requestId });
99
- var ee = (e5) => e5?.method && [`post`, `put`, `patch`].includes(e5.method.toLocaleLowerCase()) && e5.body ? { "Content-Type": `application/json` } : {};
100
- var te = (e5) => e5 && typeof e5 == `object` && !Array.isArray(e5);
101
- var ne = (e5) => e5.__type === `host`;
102
- function S(e5, t2) {
98
+ var ee = (e5, t2, n2, r2) => ({ details: { ...!n2?.validationError && { applicationError: { description: t2, code: e5, data: r2 } }, ...n2 }, message: t2, requestId: r2?.requestId });
99
+ var te = (e5) => e5?.method && [`post`, `put`, `patch`].includes(e5.method.toLocaleLowerCase()) && e5.body ? { "Content-Type": `application/json` } : {};
100
+ var ne = (e5) => e5 && typeof e5 == `object` && !Array.isArray(e5);
101
+ var S = (e5) => e5.__type === `host`;
102
+ function C(e5, t2) {
103
103
  return e5.create(t2);
104
104
  }
105
- var C = `x-wix-bi-gateway`;
106
- function re(e5, t2, n2) {
107
- return { [C]: ie({ environment: `js-sdk${n2 ? `-${n2}` : ``}`, "package-name": e5.packageName ?? t2?.PACKAGE_NAME, "method-fqn": e5.methodFqn, entity: e5.entityFqdn }) };
105
+ var re = `x-wix-bi-gateway`;
106
+ function ie(e5, t2, n2) {
107
+ return { [re]: ae({ environment: `js-sdk${n2 ? `-${n2}` : ``}`, "package-name": e5.packageName ?? t2?.PACKAGE_NAME, "method-fqn": e5.methodFqn, entity: e5.entityFqdn }) };
108
108
  }
109
- function ie(e5) {
109
+ function ae(e5) {
110
110
  return Object.entries(e5).filter(([e6, t2]) => !!t2).map(([e6, t2]) => `${e6}=${t2}`).join(`,`);
111
111
  }
112
- function ae(e5) {
113
- let t2 = globalThis.__wix_context__, n2 = { client: p.client, elevatedClient: p.elevatedClient }, r2;
114
- 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);
112
+ function oe(e5) {
113
+ let t2 = globalThis.__wix_context__, n2 = { client: m.client, elevatedClient: m.elevatedClient }, r2;
114
+ globalThis.__wix_context__ = void 0, m.client = void 0, m.elevatedClient = void 0, typeof $wixContext < `u` && (r2 = { client: $wixContext?.client, elevatedClient: $wixContext?.elevatedClient }, delete $wixContext.client, delete $wixContext.elevatedClient);
115
115
  try {
116
116
  return e5();
117
117
  } finally {
118
- globalThis.__wix_context__ = t2, p.client = n2.client, p.elevatedClient = n2.elevatedClient, typeof $wixContext < `u` && ($wixContext.client = r2.client, $wixContext.elevatedClient = r2.elevatedClient);
118
+ globalThis.__wix_context__ = t2, m.client = n2.client, m.elevatedClient = n2.elevatedClient, typeof $wixContext < `u` && ($wixContext.client = r2.client, $wixContext.elevatedClient = r2.elevatedClient);
119
119
  }
120
120
  }
121
- var oe = { id: `_id`, createdDate: `_createdDate`, updatedDate: `_updatedDate` };
122
- function se(e5) {
123
- return fe(e5).map((e6) => e6.toLocaleUpperCase()).join(`_`);
121
+ var se = { id: `_id`, createdDate: `_createdDate`, updatedDate: `_updatedDate` };
122
+ function ce(e5) {
123
+ return pe(e5).map((e6) => e6.toLocaleUpperCase()).join(`_`);
124
124
  }
125
- var ce = /([\p{Ll}\d])(\p{Lu})/gu;
126
- var le = /(\p{Lu})([\p{Lu}][\p{Ll}])/gu;
127
- var ue = `$1\0$2`;
128
- var de = /[^\p{L}\d]+/giu;
129
- function fe(e5) {
125
+ var le = /([\p{Ll}\d])(\p{Lu})/gu;
126
+ var ue = /(\p{Lu})([\p{Lu}][\p{Ll}])/gu;
127
+ var de = `$1\0$2`;
128
+ var fe = /[^\p{L}\d]+/giu;
129
+ function pe(e5) {
130
130
  let t2 = e5.trim();
131
- t2 = t2.replace(ce, ue).replace(le, ue), t2 = t2.replace(de, `\0`);
131
+ t2 = t2.replace(le, de).replace(ue, de), t2 = t2.replace(fe, `\0`);
132
132
  let n2 = 0, r2 = t2.length;
133
133
  for (; t2.charAt(n2) === `\0`; ) n2++;
134
134
  if (n2 === r2) return [];
135
135
  for (; t2.charAt(r2 - 1) === `\0`; ) r2--;
136
136
  return t2.slice(n2, r2).split(/\0/g);
137
137
  }
138
- var pe = (e5) => `validationError` in (e5.response?.data?.details ?? {});
139
- var me = (e5) => `applicationError` in (e5.response?.data?.details ?? {});
140
- var he = (e5) => (e5.response?.status ?? -1) >= 400 && (e5.response?.status ?? -1) < 500;
141
- function ge(e5, t2 = { explicitPathsToArguments: {}, spreadPathsToArguments: {}, singleArgumentUnchanged: false }, n2 = []) {
138
+ var me = (e5) => `validationError` in (e5.response?.data?.details ?? {});
139
+ var he = (e5) => `applicationError` in (e5.response?.data?.details ?? {});
140
+ var ge = (e5) => (e5.response?.status ?? -1) >= 400 && (e5.response?.status ?? -1) < 500;
141
+ function _e(e5, t2 = { explicitPathsToArguments: {}, spreadPathsToArguments: {}, singleArgumentUnchanged: false }, n2 = []) {
142
142
  if (typeof e5 != `object` || !e5) throw e5;
143
- if (pe(e5)) return _e(e5, t2, n2);
144
- if (me(e5)) return ve(e5);
145
- if (he(e5)) {
146
- let t3 = e5.response?.status, n3 = e5.response?.statusText ?? `UNKNOWN`, r2 = e5.response?.data?.message ?? n3, i2 = { applicationError: { description: n3, code: se(n3), data: {} }, requestId: e5.requestId };
143
+ if (me(e5)) return ve(e5, t2, n2);
144
+ if (he(e5)) return ye(e5);
145
+ if (ge(e5)) {
146
+ let t3 = e5.response?.status, n3 = e5.response?.statusText ?? `UNKNOWN`, r2 = e5.response?.data?.message ?? n3, i2 = { applicationError: { description: n3, code: ce(n3), data: {} }, requestId: e5.requestId };
147
147
  return w(e5, { message: JSON.stringify({ message: r2, details: i2 }, null, 2), extraProperties: { details: i2, status: t3 } });
148
148
  }
149
- return ye(e5);
149
+ return be(e5);
150
150
  }
151
- var _e = (e5, t2, n2) => {
152
- let r2 = e5.response?.data, i2 = e5.requestId, { fieldViolations: a2 } = r2.details.validationError, o2 = be(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 };
151
+ var ve = (e5, t2, n2) => {
152
+ let r2 = e5.response?.data, i2 = e5.requestId, { fieldViolations: a2 } = r2.details.validationError, o2 = xe(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 };
153
153
  return w(e5, { message: JSON.stringify({ message: s2, details: c2 }, null, 2), extraProperties: { details: c2, status: e5.response?.status, requestId: i2 } });
154
154
  };
155
155
  var w = (e5, { message: t2, extraProperties: n2 }) => Object.assign(e5, { ...n2, message: t2 });
156
- var ve = (e5) => {
157
- 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 ?? se(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 };
156
+ var ye = (e5) => {
157
+ 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 ?? ce(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 };
158
158
  return w(e5, { message: JSON.stringify({ message: s2, details: c2 }, null, 2), extraProperties: { details: c2, status: t2, requestId: e5.requestId } });
159
159
  };
160
- var ye = (e5) => w(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: se(e5.response?.statusText ?? `UNKNOWN`), ...!e5.response && { runtimeError: e5 } } });
161
- var be = ({ spreadPathsToArguments: e5, explicitPathsToArguments: t2, singleArgumentUnchanged: n2 }, r2, i2) => {
160
+ var be = (e5) => w(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: ce(e5.response?.statusText ?? `UNKNOWN`), ...!e5.response && { runtimeError: e5 } } });
161
+ var xe = ({ spreadPathsToArguments: e5, explicitPathsToArguments: t2, singleArgumentUnchanged: n2 }, r2, i2) => {
162
162
  let a2 = { ...e5, ...t2 }, o2 = Object.keys(a2);
163
163
  return r2?.filter((e6) => !r2.some((t3) => t3.field.length > e6.field.length && t3.field.startsWith(e6.field) && o2.includes(t3.field))).map((e6) => {
164
164
  let r3 = t2[e6.field];
165
- if (r3) return { ...e6, field: xe(r3, i2) };
165
+ if (r3) return { ...e6, field: Se(r3, i2) };
166
166
  let s2 = o2?.sort((e7, t3) => t3.length - e7.length)?.find((t3) => e6.field.startsWith(t3));
167
167
  if (s2) {
168
168
  let t3 = a2[s2];
169
- if (t3) return { ...e6, field: e6.field.replace(s2, xe(t3, i2)) };
169
+ if (t3) return { ...e6, field: e6.field.replace(s2, Se(t3, i2)) };
170
170
  }
171
171
  return n2 ? { ...e6, field: `${i2[0]}.${e6.field}` } : e6;
172
172
  });
173
173
  };
174
- var xe = (e5, t2) => {
175
- let n2 = Se(e5);
174
+ var Se = (e5, t2) => {
175
+ let n2 = Ce(e5);
176
176
  return n2 == null ? e5 : e5.replace(`$[${n2}]`, t2[n2]);
177
177
  };
178
- var Se = (e5) => {
178
+ var Ce = (e5) => {
179
179
  let t2 = e5.match(/\$\[(?<argIndex>\d+)\]/);
180
180
  return t2 && t2.groups && Number(t2.groups.argIndex);
181
181
  };
182
- function Ce(e5, t2, n2, r2, i2, a2, o2, s2, c2, l2, u2) {
183
- return ae(() => e5({ request: async (e6) => {
182
+ function we(e5, t2, n2, r2, i2, a2, o2, s2, c2, l2, u2) {
183
+ return oe(() => e5({ request: async (e6) => {
184
184
  let i3 = e6({ host: s2?.HTTPHost || `www.wixapis.com` }), a3 = i3;
185
185
  a3.method === `GET` && a3.fallback?.length && (a3.params?.toString().length ?? 0) > 4e3 && (a3 = i3.fallback[0]);
186
- let o3 = s2?.HTTPHost ?? `www.wixapis.com`, u3 = `https://${l2 ? y : o3}${a3.url}`;
186
+ let o3 = s2?.HTTPHost ?? `www.wixapis.com`, u3 = `https://${l2 ? b : o3}${a3.url}`;
187
187
  a3.params && a3.params.toString() && (u3 += `?${a3.params.toString()}`);
188
188
  try {
189
- let e7 = re(i3, t2, c2), o4 = { method: a3.method, ...a3.data && { body: JSON.stringify(a3.data) }, headers: { ...e7 } }, s3 = await n2(u3, o4);
189
+ let e7 = ie(i3, t2, c2), o4 = { method: a3.method, ...a3.data && { body: JSON.stringify(a3.data) }, headers: { ...e7 } }, s3 = await n2(u3, o4);
190
190
  if (s3.status !== 200) {
191
191
  let e8 = null;
192
192
  try {
193
193
  e8 = await s3.json();
194
194
  } catch {
195
195
  }
196
- let t3 = Te(s3.status, e8?.message ?? s3.statusText, e8?.details, { requestId: s3.headers.get(`X-Wix-Request-Id`), details: e8 }), n3 = ge(t3);
196
+ let t3 = Ee(s3.status, e8?.message ?? s3.statusText, e8?.details, { requestId: s3.headers.get(`X-Wix-Request-Id`), details: e8 }), n3 = _e(t3);
197
197
  throw r2?.handleError(n3, { requestOptions: { url: a3.url, method: a3.method, entityFqdn: i3.entityFqdn, methodFqn: i3.methodFqn } }), t3;
198
198
  }
199
199
  let l3 = await s3.json();
@@ -203,18 +203,18 @@ function Ce(e5, t2, n2, r2, i2, a2, o2, s2, c2, l2, u2) {
203
203
  }
204
204
  }, fetchWithAuth: n2, wixAPIFetch: i2, getActiveToken: a2, getAuthHeaders: o2 }, { validateRequestSchema: u2 }));
205
205
  }
206
- var we = class extends Error {
206
+ var Te = class extends Error {
207
207
  response;
208
208
  requestId;
209
209
  constructor(e5) {
210
210
  super(), this.response = e5.response, this.requestId = e5.requestId;
211
211
  }
212
212
  };
213
- var Te = (e5, t2, n2, r2) => new we({ response: { data: { details: { ...!n2?.validationError && { applicationError: { description: t2, code: e5, data: r2 } }, ...n2 }, message: t2 }, status: e5 }, requestId: r2?.requestId });
214
- var Ee = `.`;
215
- function De(e5, t2, n2) {
213
+ var Ee = (e5, t2, n2, r2) => new Te({ response: { data: { details: { ...!n2?.validationError && { applicationError: { description: t2, code: e5, data: r2 } }, ...n2 }, message: t2 }, status: e5 }, requestId: r2?.requestId });
214
+ var De = `.`;
215
+ function Oe(e5, t2, n2) {
216
216
  if (e5 == null) throw Error(`Cannot set value on null or undefined`);
217
- let r2 = Oe(t2), i2 = e5;
217
+ let r2 = ke(t2), i2 = e5;
218
218
  for (let e6 = 0; e6 < r2.length; e6++) {
219
219
  let t3 = r2[e6];
220
220
  if (e6 === r2.length - 1) {
@@ -226,21 +226,21 @@ function De(e5, t2, n2) {
226
226
  }
227
227
  return e5;
228
228
  }
229
- function Oe(e5) {
230
- return Array.isArray(e5) ? e5 : e5.split(Ee).map((e6) => ke(e6) ? Number(e6) : e6);
231
- }
232
229
  function ke(e5) {
233
- return /^\d+$/.test(e5);
230
+ return Array.isArray(e5) ? e5 : e5.split(De).map((e6) => Ae(e6) ? Number(e6) : e6);
234
231
  }
235
232
  function Ae(e5) {
233
+ return /^\d+$/.test(e5);
234
+ }
235
+ function je(e5) {
236
236
  let t2 = {};
237
- for (let [n2, r2] of Object.entries(e5)) je(n2) || De(t2, Oe(n2), r2);
237
+ for (let [n2, r2] of Object.entries(e5)) Me(n2) || Oe(t2, ke(n2), r2);
238
238
  return t2;
239
239
  }
240
- function je(e5) {
240
+ function Me(e5) {
241
241
  return e5 === `__proto__` || e5 === `constructor` || e5 === `prototype`;
242
242
  }
243
- var Me = class {
243
+ var Ne = class {
244
244
  BRACKET_PATTERN = /\[(\d+)\]/g;
245
245
  NUMERIC_PATTERN = /^\d+$/;
246
246
  ESCAPED_DOT_PATTERN = /\\\./g;
@@ -263,7 +263,7 @@ var Me = class {
263
263
  return e5.replace(this.ESCAPED_DOT_PLACEHOLDER, `\\.`).replace(this.ESCAPED_RIGHT_BRACKET_PLACEHOLDER, `\\]`).replace(this.ESCAPED_LEFT_BRACKET_PLACEHOLDER, `\\[`);
264
264
  }
265
265
  unflatten() {
266
- return this.cleanedModifiedFields = Object.fromEntries(Object.entries(this.modifiedFields).map(([e5, t2]) => [this.replaceEscapedCharacters(this.bracketToDotNotation(e5)), t2])), Ae(this.cleanedModifiedFields);
266
+ return this.cleanedModifiedFields = Object.fromEntries(Object.entries(this.modifiedFields).map(([e5, t2]) => [this.replaceEscapedCharacters(this.bracketToDotNotation(e5)), t2])), je(this.cleanedModifiedFields);
267
267
  }
268
268
  flatten(e5) {
269
269
  let t2 = {};
@@ -283,12 +283,12 @@ var Me = class {
283
283
  if (!Array.isArray(n2)) throw Error(`Expected array at path ${this.buildPathString(r2)}, but got ${typeof n2}`);
284
284
  r2.push(`[${e6}]`), n2 = n2[parseInt(e6, 10)];
285
285
  }, a2 = (e6, t3) => {
286
- let i3 = e6 in oe ? oe[e6] : void 0;
286
+ let i3 = e6 in se ? se[e6] : void 0;
287
287
  if (i3 && i3 in t3) {
288
288
  r2.push(i3), n2 = t3[i3];
289
289
  return;
290
290
  }
291
- let a3 = Ie(e6);
291
+ let a3 = Le(e6);
292
292
  if (a3 && a3 in t3) {
293
293
  r2.push(a3), n2 = t3[a3];
294
294
  return;
@@ -319,28 +319,28 @@ var Me = class {
319
319
  return e5.replace(this.BRACKET_PATTERN, (t2, n2, r2) => r2 > 0 && e5[r2 - 1] === `\\` ? t2 : `.` + n2);
320
320
  }
321
321
  };
322
- function Ne(e5, t2) {
322
+ function Pe(e5, t2) {
323
323
  let n2 = e5?.modifiedFields;
324
324
  if (!n2) return null;
325
- let r2 = Pe(n2);
325
+ let r2 = Fe(n2);
326
326
  if (!r2) return null;
327
327
  let { unflattenedModifiedFields: i2, modifiedFieldsManipulator: a2 } = r2;
328
328
  e5 = { ...e5, modifiedFields: i2 };
329
329
  let o2 = t2(e5), s2 = o2?.modifiedFields;
330
330
  if (!s2) return null;
331
- let c2 = Fe(s2, a2);
331
+ let c2 = Ie(s2, a2);
332
332
  return c2 === null ? null : (o2.modifiedFields = c2, o2);
333
333
  }
334
- function Pe(e5) {
334
+ function Fe(e5) {
335
335
  if (typeof e5 == `object` && e5 && !Array.isArray(e5)) try {
336
- let t2 = new Me(e5);
336
+ let t2 = new Ne(e5);
337
337
  return { unflattenedModifiedFields: t2.unflatten(), modifiedFieldsManipulator: t2 };
338
338
  } catch {
339
339
  return null;
340
340
  }
341
341
  return null;
342
342
  }
343
- function Fe(e5, t2) {
343
+ function Ie(e5, t2) {
344
344
  if (typeof e5 == `object` && e5 && !Array.isArray(e5)) try {
345
345
  return t2.flatten(e5);
346
346
  } catch {
@@ -348,10 +348,10 @@ function Fe(e5, t2) {
348
348
  }
349
349
  return null;
350
350
  }
351
- function Ie(e5) {
351
+ function Le(e5) {
352
352
  return e5.replace(/[-_\s]+(.)?/g, (e6, t2) => t2 ? t2.toUpperCase() : ``).replace(/^./, (e6) => e6.toLowerCase());
353
353
  }
354
- function Le() {
354
+ function Re() {
355
355
  return { emit(e5, ...t2) {
356
356
  for (let n2 = 0, r2 = this.events[e5] || [], i2 = r2.length; n2 < i2; n2++) r2[n2](...t2);
357
357
  }, events: {}, on(e5, t2) {
@@ -360,8 +360,8 @@ function Le() {
360
360
  };
361
361
  } };
362
362
  }
363
- var Re = (e5) => e5.__type === `event-definition`;
364
- function ze(e5, t2, n2, r2) {
363
+ var ze = (e5) => e5.__type === `event-definition`;
364
+ function Be(e5, t2, n2, r2) {
365
365
  let i2;
366
366
  if (e5.isDomainEvent) {
367
367
  let { deletedEvent: e6, actionEvent: t3, createdEvent: a3, updatedEvent: o3, ...s3 } = n2, c2 = { ...r2, ...s3 };
@@ -372,14 +372,14 @@ function ze(e5, t2, n2, r2) {
372
372
  let e6 = s2.modifiedFields;
373
373
  if (typeof e6 == `object` && e6 && !Array.isArray(e6)) {
374
374
  o2 = structuredClone(i2);
375
- let e7 = Ne(s2, a2);
375
+ let e7 = Pe(s2, a2);
376
376
  if (e7) return t2(e7);
377
377
  }
378
378
  }
379
379
  return t2(a2(o2));
380
380
  }
381
- function Be(e5) {
382
- let t2 = /* @__PURE__ */ new Map(), n2 = Le();
381
+ function Ve(e5) {
382
+ let t2 = /* @__PURE__ */ new Map(), n2 = Re();
383
383
  return { initModule(e6) {
384
384
  return (r2) => {
385
385
  let i2 = t2.get(e6.type) ?? [];
@@ -389,7 +389,7 @@ function Be(e5) {
389
389
  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 }))];
390
390
  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(`, `)}`);
391
391
  let l2 = t2.get(r2) ?? [];
392
- return await Promise.all(l2.map(({ eventDefinition: e7, handler: t3 }) => ze(e7, t3, o2, { instanceId: a2, identity: i2, accountInfo: s2 }))), { instanceId: a2, eventType: r2, payload: o2, identity: i2, accountInfo: s2 };
392
+ return await Promise.all(l2.map(({ eventDefinition: e7, handler: t3 }) => Be(e7, t3, o2, { instanceId: a2, identity: i2, accountInfo: s2 }))), { instanceId: a2, eventType: r2, payload: o2, identity: i2, accountInfo: s2 };
393
393
  }, async processRequest(e6, t3) {
394
394
  let n3 = await e6.text();
395
395
  return this.process(n3, t3);
@@ -408,12 +408,12 @@ function Be(e5) {
408
408
  let n3 = Array.from(t2.keys()).map((e7) => ({ type: e7 }));
409
409
  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(`, `)}`);
410
410
  let r2 = t2.get(e6.eventType) ?? [];
411
- await Promise.all(r2.map(({ eventDefinition: t3, handler: n4 }) => ze(t3, n4, e6.payload, { instanceId: e6.instanceId, identity: e6.identity })));
412
- }, apps: { AppInstalled: m(`AppInstalled`)(), AppRemoved: m(`AppRemoved`)() } } };
411
+ await Promise.all(r2.map(({ eventDefinition: t3, handler: n4 }) => Be(t3, n4, e6.payload, { instanceId: e6.instanceId, identity: e6.identity })));
412
+ }, apps: { AppInstalled: h(`AppInstalled`)(), AppRemoved: h(`AppRemoved`)() } } };
413
413
  }
414
- var Ve = (e5) => e5.__type === `service-plugin-definition`;
415
- function He(e5) {
416
- let t2 = /* @__PURE__ */ new Map(), n2 = Le();
414
+ var He = (e5) => e5.__type === `service-plugin-definition`;
415
+ function Ue(e5) {
416
+ let t2 = /* @__PURE__ */ new Map(), n2 = Re();
417
417
  return { initModule(e6) {
418
418
  return (r2) => {
419
419
  let i2 = t2.get(e6.componentType.toLowerCase()) ?? [];
@@ -455,83 +455,83 @@ function He(e5) {
455
455
  } } };
456
456
  }
457
457
  var T = `X-Wix-Consistent`;
458
- function Ue(e5) {
458
+ function We(e5) {
459
459
  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) => {
460
460
  let i3 = o2(), s3 = await a2(), c3 = { ...r3?.headers ?? {}, ...s3.headers, ...e5.host?.essentials?.passThroughHeaders, ...t2[`X-Wix-Consistent`] ? { [T]: t2[T] } : {} }, l3 = e5.host?.getErrorHandler?.();
461
461
  try {
462
462
  if (typeof n3 == `string` || n3 instanceof URL) {
463
463
  let e6 = await i3(n3, { ...r3, headers: c3 });
464
464
  l3?.handleError(e6, { requestOptions: { url: n3.toString(), method: r3?.method } });
465
- let a3 = We(e6);
465
+ let a3 = Ge(e6);
466
466
  return a3 && (t2[T] = a3), e6;
467
467
  }
468
468
  {
469
469
  for (let [e7, t3] of Object.entries(c3)) typeof t3 == `string` && n3.headers.set(e7, t3);
470
470
  let e6 = await i3(n3, r3);
471
471
  l3?.handleError(e6, { requestOptions: { url: n3.url, method: r3?.method } });
472
- let a3 = We(e6);
472
+ let a3 = Ge(e6);
473
473
  return a3 && (t2[T] = a3), e6;
474
474
  }
475
475
  } catch (e6) {
476
476
  throw l3?.handleError(e6, { requestOptions: { url: typeof n3 == `string` || n3 instanceof URL ? n3.toString() : n3.url, method: r3?.method } }), e6;
477
477
  }
478
- }, { client: c2, initModule: l2 } = He(i2), { client: u2, initModule: d2 } = Be(i2), f2 = async (n3, r3) => {
479
- 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`] ? { [T]: t2[T] } : {} } }), u3 = We(l3);
478
+ }, { client: c2, initModule: l2 } = Ue(i2), { client: u2, initModule: d2 } = Ve(i2), f2 = async (n3, r3) => {
479
+ let i3 = o2(), s3 = await a2(), c3 = te(r3), l3 = await i3(n3, { ...r3, headers: { ...c3, ...t2, ...s3?.headers, ...r3?.headers, ...e5.host?.essentials?.passThroughHeaders, ...t2[`X-Wix-Consistent`] ? { [T]: t2[T] } : {} } }), u3 = Ge(l3);
480
480
  return u3 && (t2[T] = u3), l3;
481
- }, m2 = (t3, n3) => {
482
- if (Re(t3)) return d2(t3);
483
- if (Ve(t3)) return l2(t3);
484
- if (ne(t3) && e5.host) return S(t3, e5.host);
481
+ }, p2 = (t3, n3) => {
482
+ if (ze(t3)) return d2(t3);
483
+ if (He(t3)) return l2(t3);
484
+ if (S(t3) && e5.host) return C(t3, e5.host);
485
485
  if (typeof t3 == `function`) {
486
486
  if (`__type` in t3 && t3.__type === `wix_spi_error`) return t3;
487
487
  let r3 = e5.host?.apiBaseUrl ?? `www.wixapis.com`, o3 = e5.useCDN === void 0 ? i2().shouldUseCDN : e5.useCDN;
488
- return Ce(ae(() => _(t3)) ? g(t3) : t3, n3 ?? {}, f2, e5.host?.getErrorHandler?.(), (e6, t4) => {
488
+ return we(oe(() => v(t3)) ? _(t3) : t3, n3 ?? {}, f2, e5.host?.getErrorHandler?.(), (e6, t4) => {
489
489
  let n4 = new URL(e6, `https://${r3}`);
490
490
  return n4.host = r3, n4.protocol = `https`, f2(n4.toString(), t4);
491
491
  }, i2().getActiveToken, async () => a2(), { HTTPHost: r3 }, e5.host?.name, o3, e5.validateRequestSchema);
492
492
  }
493
- return te(t3) ? Object.fromEntries(Object.entries(t3).map(([e6, n4]) => [e6, m2(n4, t3[v])])) : t3;
493
+ return ne(t3) ? Object.fromEntries(Object.entries(t3).map(([e6, n4]) => [e6, p2(n4, t3[y])])) : t3;
494
494
  }, h2 = (e6) => {
495
495
  for (let n3 in e6) t2[n3] = e6[n3];
496
496
  };
497
- return { ...e5.modules ? m2(e5.modules) : {}, get auth() {
497
+ return { ...e5.modules ? p2(e5.modules) : {}, get auth() {
498
498
  let t3 = i2();
499
499
  return t3.getAuthHeaders = t3.getAuthHeaders.bind(void 0, e5.host), t3;
500
- }, setHeaders: h2, use: m2, enableContext(e6, t3 = { elevated: false }) {
501
- e6 === `global` ? globalThis.__wix_context__ == null ? t3.elevated ? globalThis.__wix_context__ = { elevatedClient: this } : globalThis.__wix_context__ = { client: this } : t3.elevated ? globalThis.__wix_context__.elevatedClient = this : globalThis.__wix_context__.client = this : t3.elevated ? p.elevatedClient = this : p.client = this;
500
+ }, setHeaders: h2, use: p2, enableContext(e6, t3 = { elevated: false }) {
501
+ e6 === `global` ? globalThis.__wix_context__ == null ? t3.elevated ? globalThis.__wix_context__ = { elevatedClient: this } : globalThis.__wix_context__ = { client: this } : t3.elevated ? globalThis.__wix_context__.elevatedClient = this : globalThis.__wix_context__.client = this : t3.elevated ? m.elevatedClient = this : m.client = this;
502
502
  }, fetch: (t3, n3) => {
503
503
  let r3 = e5.host?.apiBaseUrl ?? `www.wixapis.com`, i3 = new URL(t3, `https://${r3}`);
504
504
  return i3.host = r3, i3.protocol = `https`, f2(i3.toString(), n3);
505
505
  }, fetchWithAuth: s2, async graphql(t3, n3, r3 = { apiVersion: `alpha` }) {
506
506
  let i3 = e5?.host?.apiBaseUrl ?? `www.wixapis.com`, a3 = await f2(`https://${i3}/graphql/${r3.apiVersion}`, { method: `POST`, headers: { "Content-Type": `application/json` }, body: JSON.stringify({ query: t3, variables: n3 }) });
507
- if (a3.status !== 200) throw new b(`GraphQL request failed with status ${a3.status}`, a3);
507
+ if (a3.status !== 200) throw new x(`GraphQL request failed with status ${a3.status}`, a3);
508
508
  let { data: o3, errors: s3 } = await a3.json();
509
509
  return { data: o3 ?? {}, errors: s3 };
510
510
  }, webhooks: u2, servicePlugins: c2 };
511
511
  }
512
- function We(e5) {
512
+ function Ge(e5) {
513
513
  return e5.headers?.get(`X-Wix-Consistent`) ?? e5.headers?.get(`x-wix-consistent`);
514
514
  }
515
- var Ge = 1920;
516
515
  var Ke = 1920;
517
- var qe = 1e3;
516
+ var qe = 1920;
518
517
  var Je = 1e3;
518
+ var Ye = 1e3;
519
519
  var E = { SCALE_TO_FILL: `fill`, SCALE_TO_FIT: `fit`, STRETCH: `stretch`, ORIGINAL_SIZE: `original_size`, TILE: `tile`, TILE_HORIZONTAL: `tile_horizontal`, TILE_VERTICAL: `tile_vertical`, FIT_AND_TILE: `fit_and_tile`, LEGACY_STRIP_TILE: `legacy_strip_tile`, LEGACY_STRIP_TILE_HORIZONTAL: `legacy_strip_tile_horizontal`, LEGACY_STRIP_TILE_VERTICAL: `legacy_strip_tile_vertical`, LEGACY_STRIP_SCALE_TO_FILL: `legacy_strip_fill`, LEGACY_STRIP_SCALE_TO_FIT: `legacy_strip_fit`, LEGACY_STRIP_FIT_AND_TILE: `legacy_strip_fit_and_tile`, LEGACY_STRIP_ORIGINAL_SIZE: `legacy_strip_original_size`, LEGACY_ORIGINAL_SIZE: `actual_size`, LEGACY_FIT_WIDTH: `fitWidth`, LEGACY_FIT_HEIGHT: `fitHeight`, LEGACY_FULL: `full`, LEGACY_BG_FIT_AND_TILE: `legacy_tile`, LEGACY_BG_FIT_AND_TILE_HORIZONTAL: `legacy_tile_horizontal`, LEGACY_BG_FIT_AND_TILE_VERTICAL: `legacy_tile_vertical`, LEGACY_BG_NORMAL: `legacy_normal` };
520
520
  var D = { FIT: `fit`, FILL: `fill`, FILL_FOCAL: `fill_focal`, CROP: `crop`, LEGACY_CROP: `legacy_crop`, LEGACY_FILL: `legacy_fill` };
521
521
  var O = { CENTER: `center`, TOP: `top`, TOP_LEFT: `top_left`, TOP_RIGHT: `top_right`, BOTTOM: `bottom`, BOTTOM_LEFT: `bottom_left`, BOTTOM_RIGHT: `bottom_right`, LEFT: `left`, RIGHT: `right` };
522
- var Ye = { [O.CENTER]: { x: 0.5, y: 0.5 }, [O.TOP_LEFT]: { x: 0, y: 0 }, [O.TOP_RIGHT]: { x: 1, y: 0 }, [O.TOP]: { x: 0.5, y: 0 }, [O.BOTTOM_LEFT]: { x: 0, y: 1 }, [O.BOTTOM_RIGHT]: { x: 1, y: 1 }, [O.BOTTOM]: { x: 0.5, y: 1 }, [O.RIGHT]: { x: 1, y: 0.5 }, [O.LEFT]: { x: 0, y: 0.5 } };
523
- var Xe = { center: `c`, top: `t`, top_left: `tl`, top_right: `tr`, bottom: `b`, bottom_left: `bl`, bottom_right: `br`, left: `l`, right: `r` };
524
- var Ze = { BG: `bg`, IMG: `img`, SVG: `svg` };
525
- var Qe = { AUTO: `auto`, CLASSIC: `classic`, SUPER: `super` };
526
- var $e = { classic: 1, super: 2 };
527
- var et = { radius: `0.66`, amount: `1.00`, threshold: `0.01` };
528
- var tt = 25e6;
529
- var nt = [1.5, 2, 4];
522
+ var Xe = { [O.CENTER]: { x: 0.5, y: 0.5 }, [O.TOP_LEFT]: { x: 0, y: 0 }, [O.TOP_RIGHT]: { x: 1, y: 0 }, [O.TOP]: { x: 0.5, y: 0 }, [O.BOTTOM_LEFT]: { x: 0, y: 1 }, [O.BOTTOM_RIGHT]: { x: 1, y: 1 }, [O.BOTTOM]: { x: 0.5, y: 1 }, [O.RIGHT]: { x: 1, y: 0.5 }, [O.LEFT]: { x: 0, y: 0.5 } };
523
+ var Ze = { center: `c`, top: `t`, top_left: `tl`, top_right: `tr`, bottom: `b`, bottom_left: `bl`, bottom_right: `br`, left: `l`, right: `r` };
524
+ var Qe = { BG: `bg`, IMG: `img`, SVG: `svg` };
525
+ var $e = { AUTO: `auto`, CLASSIC: `classic`, SUPER: `super` };
526
+ var et = { classic: 1, super: 2 };
527
+ var tt = { radius: `0.66`, amount: `1.00`, threshold: `0.01` };
528
+ var nt = 25e6;
529
+ var rt = [1.5, 2, 4];
530
530
  var k = { HIGH: { size: 196e4, quality: 90, maxUpscale: 1 }, MEDIUM: { size: 36e4, quality: 85, maxUpscale: 1 }, LOW: { size: 16e4, quality: 80, maxUpscale: 1.2 }, TINY: { size: 0, quality: 80, maxUpscale: 1.4 } };
531
531
  var A = { HIGH: `HIGH`, MEDIUM: `MEDIUM`, LOW: `LOW`, TINY: `TINY` };
532
532
  var j = { CONTRAST: `contrast`, BRIGHTNESS: `brightness`, SATURATION: `saturation`, HUE: `hue`, BLUR: `blur` };
533
533
  var M = { JPG: `jpg`, JPEG: `jpeg`, JPE: `jpe`, PNG: `png`, WEBP: `webp`, WIX_ICO_MP: `wix_ico_mp`, WIX_MP: `wix_mp`, GIF: `gif`, SVG: `svg`, AVIF: `avif`, UNRECOGNIZED: `unrecognized` };
534
- var rt = { AVIF: `AVIF`, PAVIF: `PAVIF` };
534
+ var it = { AVIF: `AVIF`, PAVIF: `PAVIF` };
535
535
  M.JPG, M.JPEG, M.JPE, M.PNG, M.GIF, M.WEBP;
536
536
  function N(e5, ...t2) {
537
537
  return function(...n2) {
@@ -542,131 +542,131 @@ function N(e5, ...t2) {
542
542
  }), i2.join(``);
543
543
  };
544
544
  }
545
- function P(e5) {
545
+ function at(e5) {
546
546
  return e5[e5.length - 1];
547
547
  }
548
- var it = [M.PNG, M.JPEG, M.JPG, M.JPE, M.WIX_ICO_MP, M.WIX_MP, M.WEBP, M.AVIF];
549
- var at = [M.JPEG, M.JPG, M.JPE];
550
- function ot(e5) {
551
- return it.includes(L(e5));
548
+ var ot = [M.PNG, M.JPEG, M.JPG, M.JPE, M.WIX_ICO_MP, M.WIX_MP, M.WEBP, M.AVIF];
549
+ var st = [M.JPEG, M.JPG, M.JPE];
550
+ function ct(e5) {
551
+ return ot.includes(I(e5));
552
552
  }
553
- function st(e5, t2, n2) {
554
- return n2 && t2 && !ht(t2.id) && Object.values(E).includes(e5);
553
+ function lt(e5, t2, n2) {
554
+ return n2 && t2 && !_t(t2.id) && Object.values(E).includes(e5);
555
555
  }
556
- function ct(e5, t2, n2) {
557
- return !(F(e5) || I(e5)) || !t2 || n2;
556
+ function ut(e5, t2, n2) {
557
+ return !(P(e5) || F(e5)) || !t2 || n2;
558
558
  }
559
- function lt(e5, t2, n2) {
560
- return pt(e5) ? !!(t2 || n2) : false;
559
+ function dt(e5, t2, n2) {
560
+ return ht(e5) ? !!(t2 || n2) : false;
561
561
  }
562
- function ut(e5, t2, n2, r2) {
563
- if (mt(e5) || !ct(e5, t2, n2)) return false;
564
- let i2 = ot(e5), a2 = lt(e5, n2, r2);
562
+ function ft(e5, t2, n2, r2) {
563
+ if (gt(e5) || !ut(e5, t2, n2)) return false;
564
+ let i2 = ct(e5), a2 = dt(e5, n2, r2);
565
565
  return i2 || a2;
566
566
  }
567
- function dt(e5) {
568
- return at.includes(L(e5));
567
+ function pt(e5) {
568
+ return st.includes(I(e5));
569
569
  }
570
- function ft(e5) {
571
- return L(e5) === M.PNG;
570
+ function mt(e5) {
571
+ return I(e5) === M.PNG;
572
572
  }
573
- function F(e5) {
574
- return L(e5) === M.WEBP;
573
+ function P(e5) {
574
+ return I(e5) === M.WEBP;
575
575
  }
576
- function pt(e5) {
577
- return L(e5) === M.GIF;
576
+ function ht(e5) {
577
+ return I(e5) === M.GIF;
578
578
  }
579
- function I(e5) {
580
- return L(e5) === M.AVIF;
579
+ function F(e5) {
580
+ return I(e5) === M.AVIF;
581
581
  }
582
- function mt(e5) {
582
+ function gt(e5) {
583
583
  return /(^https?)|(^data)|(^\/\/)/.test(e5);
584
584
  }
585
- function ht(e5) {
585
+ function _t(e5) {
586
586
  return !e5 || !e5.trim() || e5.toLowerCase() === `none`;
587
587
  }
588
- function gt(e5) {
588
+ function vt(e5) {
589
589
  return e5?.isSEOBot ?? false;
590
590
  }
591
- var _t = [`/`, `\\`, `?`, `<`, `>`, `|`, `\u201C`, `:`, `"`].map(encodeURIComponent);
592
- var vt = [`\\.`, `\\*`];
593
- var yt = `_`;
594
- function bt(e5, t2) {
595
- let n2 = /\/(.*?)$/, r2 = /\.([^.]*)$/, i2 = RegExp(`(${_t.concat(vt).join(`|`)})`, `g`);
591
+ var yt = [`/`, `\\`, `?`, `<`, `>`, `|`, `\u201C`, `:`, `"`].map(encodeURIComponent);
592
+ var bt = [`\\.`, `\\*`];
593
+ var xt = `_`;
594
+ function St(e5, t2) {
595
+ let n2 = /\/(.*?)$/, r2 = /\.([^.]*)$/, i2 = RegExp(`(${yt.concat(bt).join(`|`)})`, `g`);
596
596
  if (t2 && t2.length) {
597
597
  let e6 = t2, n3 = t2.match(r2);
598
- return n3 && it.includes(n3[1]) && (e6 = t2.replace(r2, ``)), encodeURIComponent(e6).replace(i2, yt);
598
+ return n3 && ot.includes(n3[1]) && (e6 = t2.replace(r2, ``)), encodeURIComponent(e6).replace(i2, xt);
599
599
  }
600
600
  let a2 = e5.match(n2);
601
601
  return (a2 ? a2[1] : e5).replace(r2, ``);
602
602
  }
603
- function xt(e5) {
604
- return dt(e5) ? M.JPG : ft(e5) ? M.PNG : F(e5) ? M.WEBP : pt(e5) ? M.GIF : I(e5) ? M.AVIF : M.UNRECOGNIZED;
603
+ function Ct(e5) {
604
+ return pt(e5) ? M.JPG : mt(e5) ? M.PNG : P(e5) ? M.WEBP : ht(e5) ? M.GIF : F(e5) ? M.AVIF : M.UNRECOGNIZED;
605
605
  }
606
- function L(e5) {
606
+ function I(e5) {
607
607
  return (/[.]([^.]+)$/.exec(e5) && /[.]([^.]+)$/.exec(e5)[1] || ``).toLowerCase();
608
608
  }
609
- function St(e5, t2, n2, r2) {
609
+ function wt(e5, t2, n2, r2) {
610
610
  return Math.min(n2 / e5, r2 / t2);
611
611
  }
612
- function Ct(e5, t2, n2, r2) {
612
+ function Tt(e5, t2, n2, r2) {
613
613
  return Math.max(n2 / e5, r2 / t2);
614
614
  }
615
- function wt(e5, t2, n2, r2, i2) {
615
+ function Et(e5, t2, n2, r2, i2) {
616
616
  let a2;
617
- return a2 = i2 === D.FILL ? Ct(e5, t2, n2, r2) : i2 === D.FIT ? St(e5, t2, n2, r2) : 1, a2;
617
+ return a2 = i2 === D.FILL ? Tt(e5, t2, n2, r2) : i2 === D.FIT ? wt(e5, t2, n2, r2) : 1, a2;
618
618
  }
619
- function Tt(e5, t2, n2, r2, i2) {
619
+ function Dt(e5, t2, n2, r2, i2) {
620
620
  let a2, o2 = n2, s2 = r2;
621
- if (a2 = wt(e5, t2, n2, r2, i2), i2 === D.FIT && (o2 = e5 * a2, s2 = t2 * a2), o2 && s2 && o2 * s2 > 25e6) {
622
- let n3 = Math.sqrt(tt / (o2 * s2));
623
- o2 *= n3, s2 *= n3, a2 = wt(e5, t2, o2, s2, i2);
621
+ if (a2 = Et(e5, t2, n2, r2, i2), i2 === D.FIT && (o2 = e5 * a2, s2 = t2 * a2), o2 && s2 && o2 * s2 > 25e6) {
622
+ let n3 = Math.sqrt(nt / (o2 * s2));
623
+ o2 *= n3, s2 *= n3, a2 = Et(e5, t2, o2, s2, i2);
624
624
  }
625
625
  return { scaleFactor: a2, width: o2, height: s2 };
626
626
  }
627
- function Et(e5, t2, n2, r2, i2, a2) {
627
+ function Ot(e5, t2, n2, r2, i2, a2) {
628
628
  e5 ||= r2.width, t2 ||= r2.height;
629
- let { scaleFactor: o2, width: s2, height: c2 } = Tt(e5, t2, r2.width * i2, r2.height * i2, n2);
630
- return Rt(e5, t2, s2, c2, a2, o2, n2);
629
+ let { scaleFactor: o2, width: s2, height: c2 } = Dt(e5, t2, r2.width * i2, r2.height * i2, n2);
630
+ return Bt(e5, t2, s2, c2, a2, o2, n2);
631
631
  }
632
- function Dt(e5 = O.CENTER) {
633
- return Ye[e5];
632
+ function kt(e5 = O.CENTER) {
633
+ return Xe[e5];
634
634
  }
635
- function Ot(e5, t2, n2, r2) {
636
- let i2 = Mt(n2) || Dt(r2);
635
+ function At(e5, t2, n2, r2) {
636
+ let i2 = Pt(n2) || kt(r2);
637
637
  return { x: Math.max(0, Math.min(e5.width - t2.width, i2.x * e5.width - t2.width / 2)), y: Math.max(0, Math.min(e5.height - t2.height, i2.y * e5.height - t2.height / 2)), width: Math.min(e5.width, t2.width), height: Math.min(e5.height, t2.height) };
638
638
  }
639
- function kt(e5, t2) {
639
+ function jt(e5, t2) {
640
640
  let n2 = Math.max(0, Math.min(e5.width, t2.x + t2.width) - Math.max(0, t2.x)), r2 = Math.max(0, Math.min(e5.height, t2.y + t2.height) - Math.max(0, t2.y));
641
641
  return n2 && r2 && (e5.width !== n2 || e5.height !== r2) ? { x: Math.max(0, t2.x), y: Math.max(0, t2.y), width: n2, height: r2 } : null;
642
642
  }
643
- function At(e5) {
643
+ function Mt(e5) {
644
644
  return Math.min(e5.pixelAspectRatio || 1, 2);
645
645
  }
646
- function jt(e5) {
647
- return e5.alignment && Xe[e5.alignment] || Xe[O.CENTER];
646
+ function Nt(e5) {
647
+ return e5.alignment && Ze[e5.alignment] || Ze[O.CENTER];
648
648
  }
649
- function Mt(e5) {
649
+ function Pt(e5) {
650
650
  let t2;
651
- return e5 && typeof e5.x == `number` && !isNaN(e5.x) && typeof e5.y == `number` && !isNaN(e5.y) && (t2 = { x: R(Math.max(0, Math.min(100, e5.x)) / 100, 2), y: R(Math.max(0, Math.min(100, e5.y)) / 100, 2) }), t2;
651
+ return e5 && typeof e5.x == `number` && !isNaN(e5.x) && typeof e5.y == `number` && !isNaN(e5.y) && (t2 = { x: L(Math.max(0, Math.min(100, e5.x)) / 100, 2), y: L(Math.max(0, Math.min(100, e5.y)) / 100, 2) }), t2;
652
652
  }
653
- function Nt(e5, t2) {
654
- return k[zt(e5, t2)].quality;
653
+ function Ft(e5, t2) {
654
+ return k[Vt(e5, t2)].quality;
655
655
  }
656
- function Pt(e5, t2) {
657
- return { optimizedScaleFactor: k[zt(e5, t2)].maxUpscale, upscaleMethodValue: $e.classic, forceUSM: false };
656
+ function It(e5, t2) {
657
+ return { optimizedScaleFactor: k[Vt(e5, t2)].maxUpscale, upscaleMethodValue: et.classic, forceUSM: false };
658
658
  }
659
- function Ft(e5, t2) {
660
- return { optimizedScaleFactor: k[zt(e5, t2)].maxUpscale, upscaleMethodValue: $e.classic, forceUSM: false };
659
+ function Lt(e5, t2) {
660
+ return { optimizedScaleFactor: k[Vt(e5, t2)].maxUpscale, upscaleMethodValue: et.classic, forceUSM: false };
661
661
  }
662
- function It(e5) {
663
- return { optimizedScaleFactor: P(nt), upscaleMethodValue: $e.super, forceUSM: !(nt.includes(e5) || e5 > P(nt)) };
662
+ function Rt(e5) {
663
+ return { optimizedScaleFactor: at(rt), upscaleMethodValue: et.super, forceUSM: !(rt.includes(e5) || e5 > at(rt)) };
664
664
  }
665
- function Lt(e5, t2, n2, r2) {
666
- return r2 === `auto` ? Ft(e5, t2) : r2 === `super` ? It(n2) : Pt(e5, t2);
665
+ function zt(e5, t2, n2, r2) {
666
+ return r2 === `auto` ? Lt(e5, t2) : r2 === `super` ? Rt(n2) : It(e5, t2);
667
667
  }
668
- function Rt(e5, t2, n2, r2, i2, a2, o2) {
669
- let { optimizedScaleFactor: s2, upscaleMethodValue: c2, forceUSM: l2 } = Lt(e5, t2, a2, i2), u2 = n2, d2 = r2;
668
+ function Bt(e5, t2, n2, r2, i2, a2, o2) {
669
+ let { optimizedScaleFactor: s2, upscaleMethodValue: c2, forceUSM: l2 } = zt(e5, t2, a2, i2), u2 = n2, d2 = r2;
670
670
  if (a2 <= s2) return { width: u2, height: d2, scaleFactor: a2, upscaleMethodValue: c2, forceUSM: l2, cssUpscaleNeeded: false };
671
671
  switch (o2) {
672
672
  case D.FILL:
@@ -677,41 +677,41 @@ function Rt(e5, t2, n2, r2, i2, a2, o2) {
677
677
  }
678
678
  return { width: u2, height: d2, scaleFactor: s2, upscaleMethodValue: c2, forceUSM: l2, cssUpscaleNeeded: true };
679
679
  }
680
- function zt(e5, t2) {
680
+ function Vt(e5, t2) {
681
681
  let n2 = e5 * t2;
682
682
  return n2 > k[A.HIGH].size ? A.HIGH : n2 > k[A.MEDIUM].size ? A.MEDIUM : n2 > k[A.LOW].size ? A.LOW : A.TINY;
683
683
  }
684
- function R(e5, t2) {
684
+ function L(e5, t2) {
685
685
  let n2 = 10 ** (t2 || 0);
686
686
  return (e5 * n2 / n2).toFixed(t2);
687
687
  }
688
- function Bt(e5) {
689
- return !e5 || !e5.upscaleMethod ? Qe.AUTO : Qe[e5.upscaleMethod.toUpperCase()] || Qe.AUTO;
688
+ function Ht(e5) {
689
+ return !e5 || !e5.upscaleMethod ? $e.AUTO : $e[e5.upscaleMethod.toUpperCase()] || $e.AUTO;
690
690
  }
691
- function Vt(e5, t2) {
692
- let n2 = F(e5) || I(e5);
693
- return L(e5) === M.GIF || n2 && t2;
691
+ function Ut(e5, t2) {
692
+ let n2 = P(e5) || F(e5);
693
+ return I(e5) === M.GIF || n2 && t2;
694
694
  }
695
- var Ht = { isMobile: false };
696
- var Ut = function(e5) {
697
- return Ht[e5];
695
+ var Wt = { isMobile: false };
696
+ var Gt = function(e5) {
697
+ return Wt[e5];
698
698
  };
699
- var Wt = function(e5, t2) {
700
- Ht[e5] = t2;
699
+ var Kt = function(e5, t2) {
700
+ Wt[e5] = t2;
701
701
  };
702
- function Gt() {
702
+ function qt() {
703
703
  if (typeof window < `u` && typeof navigator < `u`) {
704
704
  let e5 = window.matchMedia && window.matchMedia(`(max-width: 767px)`).matches, t2 = /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);
705
- Wt(`isMobile`, e5 && t2);
705
+ Kt(`isMobile`, e5 && t2);
706
706
  }
707
707
  }
708
708
  O.CENTER, O.TOP, O.TOP_LEFT, O.TOP_RIGHT, O.BOTTOM, O.BOTTOM_LEFT, O.BOTTOM_RIGHT, O.LEFT, O.RIGHT;
709
- function Kt() {
710
- return Ut(`isMobile`);
709
+ function Jt() {
710
+ return Gt(`isMobile`);
711
711
  }
712
- function qt(e5, t2, n2) {
712
+ function Yt(e5, t2, n2) {
713
713
  let r2;
714
- switch (t2.crop && (r2 = kt(t2, t2.crop), r2 && (e5.src.width = r2.width, e5.src.height = r2.height, e5.src.isCropped = true, e5.parts.push(Zt(r2)))), e5.fittingType) {
714
+ switch (t2.crop && (r2 = jt(t2, t2.crop), r2 && (e5.src.width = r2.width, e5.src.height = r2.height, e5.src.isCropped = true, e5.parts.push($t(r2)))), e5.fittingType) {
715
715
  case E.SCALE_TO_FIT:
716
716
  case E.LEGACY_FIT_WIDTH:
717
717
  case E.LEGACY_FIT_HEIGHT:
@@ -721,285 +721,285 @@ function qt(e5, t2, n2) {
721
721
  case E.LEGACY_BG_FIT_AND_TILE_HORIZONTAL:
722
722
  case E.LEGACY_BG_FIT_AND_TILE_VERTICAL:
723
723
  case E.LEGACY_BG_NORMAL:
724
- e5.parts.push(Jt(e5, n2));
724
+ e5.parts.push(Xt(e5, n2));
725
725
  break;
726
726
  case E.SCALE_TO_FILL:
727
- e5.parts.push(Yt(e5, n2));
727
+ e5.parts.push(Zt(e5, n2));
728
728
  break;
729
729
  case E.STRETCH:
730
- e5.parts.push(Xt(e5, n2));
730
+ e5.parts.push(Qt(e5, n2));
731
731
  break;
732
732
  case E.TILE_HORIZONTAL:
733
733
  case E.TILE_VERTICAL:
734
734
  case E.TILE:
735
735
  case E.LEGACY_ORIGINAL_SIZE:
736
736
  case E.ORIGINAL_SIZE:
737
- r2 = Ot(e5.src, n2, e5.focalPoint, n2.alignment), e5.src.isCropped ? (Object.assign(e5.parts[0], r2), e5.src.width = r2.width, e5.src.height = r2.height) : e5.parts.push(Zt(r2));
737
+ r2 = At(e5.src, n2, e5.focalPoint, n2.alignment), e5.src.isCropped ? (Object.assign(e5.parts[0], r2), e5.src.width = r2.width, e5.src.height = r2.height) : e5.parts.push($t(r2));
738
738
  break;
739
739
  case E.LEGACY_STRIP_TILE_HORIZONTAL:
740
740
  case E.LEGACY_STRIP_TILE_VERTICAL:
741
741
  case E.LEGACY_STRIP_TILE:
742
742
  case E.LEGACY_STRIP_ORIGINAL_SIZE:
743
- e5.parts.push(en(n2));
743
+ e5.parts.push(nn(n2));
744
744
  break;
745
745
  case E.LEGACY_STRIP_SCALE_TO_FIT:
746
746
  case E.LEGACY_STRIP_FIT_AND_TILE:
747
- e5.parts.push(Qt(n2));
747
+ e5.parts.push(en(n2));
748
748
  break;
749
749
  case E.LEGACY_STRIP_SCALE_TO_FILL:
750
- e5.parts.push($t(n2));
750
+ e5.parts.push(tn(n2));
751
751
  }
752
752
  }
753
- function Jt(e5, t2) {
754
- let n2 = Et(e5.src.width, e5.src.height, D.FIT, t2, e5.devicePixelRatio, e5.upscaleMethod);
755
- return { transformType: !e5.src.width || !e5.src.height ? D.FIT : D.FILL, width: Math.round(n2.width), height: Math.round(n2.height), alignment: Xe.center, upscale: n2.scaleFactor > 1, forceUSM: n2.forceUSM, scaleFactor: n2.scaleFactor, cssUpscaleNeeded: n2.cssUpscaleNeeded, upscaleMethodValue: n2.upscaleMethodValue };
756
- }
757
- function Yt(e5, t2) {
758
- let n2 = Et(e5.src.width, e5.src.height, D.FILL, t2, e5.devicePixelRatio, e5.upscaleMethod), r2 = Mt(e5.focalPoint);
759
- return { transformType: r2 ? D.FILL_FOCAL : D.FILL, width: Math.round(n2.width), height: Math.round(n2.height), alignment: jt(t2), focalPointX: r2 && r2.x, focalPointY: r2 && r2.y, upscale: n2.scaleFactor > 1, forceUSM: n2.forceUSM, scaleFactor: n2.scaleFactor, cssUpscaleNeeded: n2.cssUpscaleNeeded, upscaleMethodValue: n2.upscaleMethodValue };
760
- }
761
753
  function Xt(e5, t2) {
762
- let n2 = wt(e5.src.width, e5.src.height, t2.width, t2.height, D.FILL), r2 = { ...t2 };
763
- return r2.width = e5.src.width * n2, r2.height = e5.src.height * n2, Jt(e5, r2);
754
+ let n2 = Ot(e5.src.width, e5.src.height, D.FIT, t2, e5.devicePixelRatio, e5.upscaleMethod);
755
+ return { transformType: !e5.src.width || !e5.src.height ? D.FIT : D.FILL, width: Math.round(n2.width), height: Math.round(n2.height), alignment: Ze.center, upscale: n2.scaleFactor > 1, forceUSM: n2.forceUSM, scaleFactor: n2.scaleFactor, cssUpscaleNeeded: n2.cssUpscaleNeeded, upscaleMethodValue: n2.upscaleMethodValue };
764
756
  }
765
- function Zt(e5) {
766
- return { transformType: D.CROP, x: Math.round(e5.x), y: Math.round(e5.y), width: Math.round(e5.width), height: Math.round(e5.height), upscale: false, forceUSM: false, scaleFactor: 1, cssUpscaleNeeded: false };
757
+ function Zt(e5, t2) {
758
+ let n2 = Ot(e5.src.width, e5.src.height, D.FILL, t2, e5.devicePixelRatio, e5.upscaleMethod), r2 = Pt(e5.focalPoint);
759
+ return { transformType: r2 ? D.FILL_FOCAL : D.FILL, width: Math.round(n2.width), height: Math.round(n2.height), alignment: Nt(t2), focalPointX: r2 && r2.x, focalPointY: r2 && r2.y, upscale: n2.scaleFactor > 1, forceUSM: n2.forceUSM, scaleFactor: n2.scaleFactor, cssUpscaleNeeded: n2.cssUpscaleNeeded, upscaleMethodValue: n2.upscaleMethodValue };
767
760
  }
768
- function Qt(e5) {
769
- return { transformType: D.FIT, width: Math.round(e5.width), height: Math.round(e5.height), upscale: false, forceUSM: true, scaleFactor: 1, cssUpscaleNeeded: false };
761
+ function Qt(e5, t2) {
762
+ let n2 = Et(e5.src.width, e5.src.height, t2.width, t2.height, D.FILL), r2 = { ...t2 };
763
+ return r2.width = e5.src.width * n2, r2.height = e5.src.height * n2, Xt(e5, r2);
770
764
  }
771
765
  function $t(e5) {
772
- return { transformType: D.LEGACY_FILL, width: Math.round(e5.width), height: Math.round(e5.height), alignment: jt(e5), upscale: false, forceUSM: true, scaleFactor: 1, cssUpscaleNeeded: false };
766
+ return { transformType: D.CROP, x: Math.round(e5.x), y: Math.round(e5.y), width: Math.round(e5.width), height: Math.round(e5.height), upscale: false, forceUSM: false, scaleFactor: 1, cssUpscaleNeeded: false };
773
767
  }
774
768
  function en(e5) {
775
- return { transformType: D.LEGACY_CROP, width: Math.round(e5.width), height: Math.round(e5.height), alignment: jt(e5), upscale: false, forceUSM: false, scaleFactor: 1, cssUpscaleNeeded: false };
769
+ return { transformType: D.FIT, width: Math.round(e5.width), height: Math.round(e5.height), upscale: false, forceUSM: true, scaleFactor: 1, cssUpscaleNeeded: false };
776
770
  }
777
- function tn(e5, t2) {
778
- t2 ||= {}, e5.quality = an(e5, t2), e5.progressive = rn(t2), e5.watermark = nn(t2), e5.autoEncode = t2.autoEncode ?? true, e5.encoding = t2?.encoding, e5.unsharpMask = sn(e5, t2), e5.filters = on(t2);
771
+ function tn(e5) {
772
+ return { transformType: D.LEGACY_FILL, width: Math.round(e5.width), height: Math.round(e5.height), alignment: Nt(e5), upscale: false, forceUSM: true, scaleFactor: 1, cssUpscaleNeeded: false };
779
773
  }
780
774
  function nn(e5) {
775
+ return { transformType: D.LEGACY_CROP, width: Math.round(e5.width), height: Math.round(e5.height), alignment: Nt(e5), upscale: false, forceUSM: false, scaleFactor: 1, cssUpscaleNeeded: false };
776
+ }
777
+ function rn(e5, t2) {
778
+ t2 ||= {}, e5.quality = sn(e5, t2), e5.progressive = on(t2), e5.watermark = an(t2), e5.autoEncode = t2.autoEncode ?? true, e5.encoding = t2?.encoding, e5.unsharpMask = ln(e5, t2), e5.filters = cn(t2);
779
+ }
780
+ function an(e5) {
781
781
  return e5.watermark;
782
782
  }
783
- function rn(e5) {
783
+ function on(e5) {
784
784
  return e5.progressive !== false;
785
785
  }
786
- function an(e5, t2) {
786
+ function sn(e5, t2) {
787
787
  let n2 = e5.fileType === M.PNG, r2 = e5.fileType === M.JPG, i2 = e5.fileType === M.WEBP, a2 = e5.fileType === M.AVIF;
788
788
  if (r2 || n2 || i2 || a2) {
789
- let r3 = P(e5.parts), i3 = Nt(r3.width, r3.height), a3 = t2.quality && t2.quality >= 5 && t2.quality <= 90 ? t2.quality : i3;
789
+ let r3 = at(e5.parts), i3 = Ft(r3.width, r3.height), a3 = t2.quality && t2.quality >= 5 && t2.quality <= 90 ? t2.quality : i3;
790
790
  return a3 = n2 ? a3 + 5 : a3, a3;
791
791
  }
792
792
  return 0;
793
793
  }
794
- function on(e5) {
794
+ function cn(e5) {
795
795
  let t2 = e5.filters || {}, n2 = {};
796
- return z(t2[j.CONTRAST], -100, 100) && (n2[j.CONTRAST] = t2[j.CONTRAST]), z(t2[j.BRIGHTNESS], -100, 100) && (n2[j.BRIGHTNESS] = t2[j.BRIGHTNESS]), z(t2[j.SATURATION], -100, 100) && (n2[j.SATURATION] = t2[j.SATURATION]), z(t2[j.HUE], -180, 180) && (n2[j.HUE] = t2[j.HUE]), z(t2[j.BLUR], 0, 100) && (n2[j.BLUR] = t2[j.BLUR]), n2;
796
+ return R(t2[j.CONTRAST], -100, 100) && (n2[j.CONTRAST] = t2[j.CONTRAST]), R(t2[j.BRIGHTNESS], -100, 100) && (n2[j.BRIGHTNESS] = t2[j.BRIGHTNESS]), R(t2[j.SATURATION], -100, 100) && (n2[j.SATURATION] = t2[j.SATURATION]), R(t2[j.HUE], -180, 180) && (n2[j.HUE] = t2[j.HUE]), R(t2[j.BLUR], 0, 100) && (n2[j.BLUR] = t2[j.BLUR]), n2;
797
797
  }
798
- function z(e5, t2, n2) {
798
+ function R(e5, t2, n2) {
799
799
  return typeof e5 == `number` && !isNaN(e5) && e5 !== 0 && e5 >= t2 && e5 <= n2;
800
800
  }
801
- function sn(e5, t2) {
802
- if (ln(t2.unsharpMask)) return { radius: R(t2.unsharpMask?.radius, 2), amount: R(t2.unsharpMask?.amount, 2), threshold: R(t2.unsharpMask?.threshold, 2) };
803
- if (!un(t2.unsharpMask) && cn(e5)) return et;
801
+ function ln(e5, t2) {
802
+ if (dn(t2.unsharpMask)) return { radius: L(t2.unsharpMask?.radius, 2), amount: L(t2.unsharpMask?.amount, 2), threshold: L(t2.unsharpMask?.threshold, 2) };
803
+ if (!fn(t2.unsharpMask) && un(e5)) return tt;
804
804
  }
805
- function cn(e5) {
806
- let t2 = P(e5.parts);
805
+ function un(e5) {
806
+ let t2 = at(e5.parts);
807
807
  return !(t2.scaleFactor >= 1) || t2.forceUSM || t2.transformType === D.FIT;
808
808
  }
809
- function ln(e5) {
809
+ function dn(e5) {
810
810
  e5 ||= {};
811
811
  let t2 = typeof e5.radius == `number` && !isNaN(e5.radius) && e5.radius >= 0.1 && e5.radius <= 500, n2 = typeof e5.amount == `number` && !isNaN(e5.amount) && e5.amount >= 0 && e5.amount <= 10, r2 = typeof e5.threshold == `number` && !isNaN(e5.threshold) && e5.threshold >= 0 && e5.threshold <= 255;
812
812
  return t2 && n2 && r2;
813
813
  }
814
- function un(e5) {
814
+ function fn(e5) {
815
815
  return e5 ||= {}, typeof e5.radius == `number` && !isNaN(e5.radius) && e5.radius === 0 && typeof e5.amount == `number` && !isNaN(e5.amount) && e5.amount === 0 && typeof e5.threshold == `number` && !isNaN(e5.threshold) && e5.threshold === 0;
816
816
  }
817
- function dn(e5, t2, n2, r2) {
818
- let i2 = gt(r2), a2 = xt(t2.id), o2 = bt(t2.id, t2.name), s2 = i2 ? 1 : At(n2), c2 = L(t2.id), l2 = c2, u2 = ut(t2.id, r2?.hasAnimation, r2?.allowAnimatedTransform, r2?.allowFullGIFTransformation), d2 = { fileName: o2, fileExtension: c2, fileType: a2, fittingType: e5, preferredExtension: l2, src: { id: t2.id, width: t2.width, height: t2.height, isCropped: false, isAnimated: Vt(t2.id, r2?.hasAnimation) }, focalPoint: { x: t2.focalPoint && t2.focalPoint.x, y: t2.focalPoint && t2.focalPoint.y }, parts: [], devicePixelRatio: s2, quality: 0, upscaleMethod: Bt(r2), progressive: true, watermark: ``, unsharpMask: {}, filters: {}, transformed: u2, allowFullGIFTransformation: r2?.allowFullGIFTransformation, isPlaceholderFlow: r2?.isPlaceholderFlow };
819
- return u2 && (qt(d2, t2, n2), tn(d2, r2)), d2;
817
+ function pn(e5, t2, n2, r2) {
818
+ let i2 = vt(r2), a2 = Ct(t2.id), o2 = St(t2.id, t2.name), s2 = i2 ? 1 : Mt(n2), c2 = I(t2.id), l2 = c2, u2 = ft(t2.id, r2?.hasAnimation, r2?.allowAnimatedTransform, r2?.allowFullGIFTransformation), d2 = { fileName: o2, fileExtension: c2, fileType: a2, fittingType: e5, preferredExtension: l2, src: { id: t2.id, width: t2.width, height: t2.height, isCropped: false, isAnimated: Ut(t2.id, r2?.hasAnimation) }, focalPoint: { x: t2.focalPoint && t2.focalPoint.x, y: t2.focalPoint && t2.focalPoint.y }, parts: [], devicePixelRatio: s2, quality: 0, upscaleMethod: Ht(r2), progressive: true, watermark: ``, unsharpMask: {}, filters: {}, transformed: u2, allowFullGIFTransformation: r2?.allowFullGIFTransformation, isPlaceholderFlow: r2?.isPlaceholderFlow };
819
+ return u2 && (Yt(d2, t2, n2), rn(d2, r2)), d2;
820
820
  }
821
- function fn(e5, t2, n2) {
822
- let r2 = { ...n2 }, i2 = Kt();
821
+ function mn(e5, t2, n2) {
822
+ let r2 = { ...n2 }, i2 = Jt();
823
823
  switch (e5) {
824
824
  case E.LEGACY_BG_FIT_AND_TILE:
825
825
  case E.LEGACY_BG_FIT_AND_TILE_HORIZONTAL:
826
826
  case E.LEGACY_BG_FIT_AND_TILE_VERTICAL:
827
827
  case E.LEGACY_BG_NORMAL:
828
- let e6 = i2 ? qe : Ge, n3 = i2 ? Je : Ke;
828
+ let e6 = i2 ? Je : Ke, n3 = i2 ? Ye : qe;
829
829
  r2.width = Math.min(e6, t2.width), r2.height = Math.min(n3, Math.round(r2.width / (t2.width / t2.height))), r2.pixelAspectRatio = 1;
830
830
  }
831
831
  return r2;
832
832
  }
833
- var pn = N`fit/w_${`width`},h_${`height`}`;
834
- var mn = N`fill/w_${`width`},h_${`height`},al_${`alignment`}`;
835
- var hn = N`fill/w_${`width`},h_${`height`},fp_${`focalPointX`}_${`focalPointY`}`;
836
- var gn = N`crop/x_${`x`},y_${`y`},w_${`width`},h_${`height`}`;
837
- var _n = N`crop/w_${`width`},h_${`height`},al_${`alignment`}`;
838
- var vn = N`fill/w_${`width`},h_${`height`},al_${`alignment`}`;
839
- var yn = N`,lg_${`upscaleMethodValue`}`;
840
- var bn = N`,q_${`quality`}`;
841
- var xn = N`,quality_auto`;
842
- var Sn = N`,usm_${`radius`}_${`amount`}_${`threshold`}`;
843
- var Cn = N`,bl`;
844
- var wn = N`,wm_${`watermark`}`;
845
- var Tn = { [j.CONTRAST]: N`,con_${`contrast`}`, [j.BRIGHTNESS]: N`,br_${`brightness`}`, [j.SATURATION]: N`,sat_${`saturation`}`, [j.HUE]: N`,hue_${`hue`}`, [j.BLUR]: N`,blur_${`blur`}` };
846
- var En = N`,enc_auto`;
847
- var Dn = N`,enc_avif`;
848
- var On = N`,enc_pavif`;
849
- var kn = N`,pstr`;
850
- var An = N`,anm_all`;
851
- function jn(e5) {
833
+ var hn = N`fit/w_${`width`},h_${`height`}`;
834
+ var gn = N`fill/w_${`width`},h_${`height`},al_${`alignment`}`;
835
+ var _n = N`fill/w_${`width`},h_${`height`},fp_${`focalPointX`}_${`focalPointY`}`;
836
+ var vn = N`crop/x_${`x`},y_${`y`},w_${`width`},h_${`height`}`;
837
+ var yn = N`crop/w_${`width`},h_${`height`},al_${`alignment`}`;
838
+ var bn = N`fill/w_${`width`},h_${`height`},al_${`alignment`}`;
839
+ var z = N`,lg_${`upscaleMethodValue`}`;
840
+ var xn = N`,q_${`quality`}`;
841
+ var Sn = N`,quality_auto`;
842
+ var Cn = N`,usm_${`radius`}_${`amount`}_${`threshold`}`;
843
+ var wn = N`,bl`;
844
+ var Tn = N`,wm_${`watermark`}`;
845
+ var En = { [j.CONTRAST]: N`,con_${`contrast`}`, [j.BRIGHTNESS]: N`,br_${`brightness`}`, [j.SATURATION]: N`,sat_${`saturation`}`, [j.HUE]: N`,hue_${`hue`}`, [j.BLUR]: N`,blur_${`blur`}` };
846
+ var Dn = N`,enc_auto`;
847
+ var On = N`,enc_avif`;
848
+ var kn = N`,enc_pavif`;
849
+ var An = N`,pstr`;
850
+ var jn = N`,anm_all`;
851
+ function Mn(e5) {
852
852
  if (e5.parts.some(({ width: e6, height: t3 }) => !Number.isFinite(e6) || e6 <= 0 || !Number.isFinite(t3) || t3 <= 0)) return e5.src.id;
853
853
  let t2 = [];
854
854
  e5.parts.forEach((e6) => {
855
855
  switch (e6.transformType) {
856
856
  case D.CROP:
857
- t2.push(gn(e6));
857
+ t2.push(vn(e6));
858
858
  break;
859
859
  case D.LEGACY_CROP:
860
- t2.push(_n(e6));
860
+ t2.push(yn(e6));
861
861
  break;
862
862
  case D.LEGACY_FILL:
863
- let n3 = vn(e6);
864
- e6.upscale && (n3 += yn(e6)), t2.push(n3);
863
+ let n3 = bn(e6);
864
+ e6.upscale && (n3 += z(e6)), t2.push(n3);
865
865
  break;
866
866
  case D.FIT:
867
- let r2 = pn(e6);
868
- e6.upscale && (r2 += yn(e6)), t2.push(r2);
867
+ let r2 = hn(e6);
868
+ e6.upscale && (r2 += z(e6)), t2.push(r2);
869
869
  break;
870
870
  case D.FILL:
871
- let i2 = mn(e6);
872
- e6.upscale && (i2 += yn(e6)), t2.push(i2);
871
+ let i2 = gn(e6);
872
+ e6.upscale && (i2 += z(e6)), t2.push(i2);
873
873
  break;
874
874
  case D.FILL_FOCAL:
875
- let a2 = hn(e6);
876
- e6.upscale && (a2 += yn(e6)), t2.push(a2);
875
+ let a2 = _n(e6);
876
+ e6.upscale && (a2 += z(e6)), t2.push(a2);
877
877
  }
878
878
  });
879
879
  let n2 = t2.join(`/`);
880
- if (e5.quality && (n2 += bn(e5)), e5.unsharpMask && (n2 += Sn(e5.unsharpMask)), e5.progressive || (n2 += Cn(e5)), e5.watermark && (n2 += wn(e5)), e5.filters && (n2 += Object.keys(e5.filters).map((t3) => Tn[t3](e5.filters)).join(``)), e5.fileType !== M.GIF && (e5.encoding === rt.AVIF ? (n2 += Dn(e5), n2 += xn(e5)) : e5.encoding === rt.PAVIF ? (n2 += On(e5), n2 += xn(e5)) : e5.autoEncode && (n2 += En(e5))), e5.src?.isAnimated && e5.transformed) {
881
- let t3 = pt(e5.src.id), r2 = e5.isPlaceholderFlow === true, i2 = e5.allowFullGIFTransformation === true;
882
- r2 ? n2 += kn(e5) : t3 && i2 && (n2 += An(e5));
880
+ if (e5.quality && (n2 += xn(e5)), e5.unsharpMask && (n2 += Cn(e5.unsharpMask)), e5.progressive || (n2 += wn(e5)), e5.watermark && (n2 += Tn(e5)), e5.filters && (n2 += Object.keys(e5.filters).map((t3) => En[t3](e5.filters)).join(``)), e5.fileType !== M.GIF && (e5.encoding === it.AVIF ? (n2 += On(e5), n2 += Sn(e5)) : e5.encoding === it.PAVIF ? (n2 += kn(e5), n2 += Sn(e5)) : e5.autoEncode && (n2 += Dn(e5))), e5.src?.isAnimated && e5.transformed) {
881
+ let t3 = ht(e5.src.id), r2 = e5.isPlaceholderFlow === true, i2 = e5.allowFullGIFTransformation === true;
882
+ r2 ? n2 += An(e5) : t3 && i2 && (n2 += jn(e5));
883
883
  }
884
884
  return `${e5.src.id}/v1/${n2}/${e5.fileName}.${e5.preferredExtension}`;
885
885
  }
886
- function Mn(e5, t2, n2, r2 = {}, i2) {
887
- if (ut(t2.id, r2?.hasAnimation, r2?.allowAnimatedTransform, r2?.allowFullGIFTransformation)) {
888
- if ((F(t2.id) || I(t2.id)) && !r2.allowWebpAvifTransforms) {
886
+ function Nn(e5, t2, n2, r2 = {}, i2) {
887
+ if (ft(t2.id, r2?.hasAnimation, r2?.allowAnimatedTransform, r2?.allowFullGIFTransformation)) {
888
+ if ((P(t2.id) || F(t2.id)) && !r2.allowWebpAvifTransforms) {
889
889
  let { alignment: a2, ...o2 } = n2;
890
- t2.focalPoint = { x: void 0, y: void 0 }, delete t2?.crop, i2 = dn(e5, t2, o2, r2);
891
- } else i2 ||= dn(e5, t2, n2, r2);
892
- return jn(i2);
890
+ t2.focalPoint = { x: void 0, y: void 0 }, delete t2?.crop, i2 = pn(e5, t2, o2, r2);
891
+ } else i2 ||= pn(e5, t2, n2, r2);
892
+ return Mn(i2);
893
893
  }
894
894
  return t2.id;
895
895
  }
896
- var Nn = { [O.CENTER]: `50% 50%`, [O.TOP_LEFT]: `0% 0%`, [O.TOP_RIGHT]: `100% 0%`, [O.TOP]: `50% 0%`, [O.BOTTOM_LEFT]: `0% 100%`, [O.BOTTOM_RIGHT]: `100% 100%`, [O.BOTTOM]: `50% 100%`, [O.RIGHT]: `100% 50%`, [O.LEFT]: `0% 50%` };
897
- Object.entries(Nn).reduce((e5, [t2, n2]) => (e5[n2] = t2, e5), {}), E.TILE, E.TILE_HORIZONTAL, E.TILE_VERTICAL, E.LEGACY_BG_FIT_AND_TILE, E.LEGACY_BG_FIT_AND_TILE_HORIZONTAL, E.LEGACY_BG_FIT_AND_TILE_VERTICAL, E.LEGACY_ORIGINAL_SIZE, E.ORIGINAL_SIZE, E.LEGACY_BG_NORMAL;
898
- function Pn(e5, t2, n2, r2) {
899
- if (st(e5, t2, n2)) {
900
- let i2 = fn(e5, t2, n2), a2 = dn(e5, t2, i2, r2);
901
- return { uri: Mn(e5, t2, i2, r2 || {}, a2) };
896
+ var Pn = { [O.CENTER]: `50% 50%`, [O.TOP_LEFT]: `0% 0%`, [O.TOP_RIGHT]: `100% 0%`, [O.TOP]: `50% 0%`, [O.BOTTOM_LEFT]: `0% 100%`, [O.BOTTOM_RIGHT]: `100% 100%`, [O.BOTTOM]: `50% 100%`, [O.RIGHT]: `100% 50%`, [O.LEFT]: `0% 50%` };
897
+ Object.entries(Pn).reduce((e5, [t2, n2]) => (e5[n2] = t2, e5), {}), E.TILE, E.TILE_HORIZONTAL, E.TILE_VERTICAL, E.LEGACY_BG_FIT_AND_TILE, E.LEGACY_BG_FIT_AND_TILE_HORIZONTAL, E.LEGACY_BG_FIT_AND_TILE_VERTICAL, E.LEGACY_ORIGINAL_SIZE, E.ORIGINAL_SIZE, E.LEGACY_BG_NORMAL;
898
+ function Fn(e5, t2, n2, r2) {
899
+ if (lt(e5, t2, n2)) {
900
+ let i2 = mn(e5, t2, n2), a2 = pn(e5, t2, i2, r2);
901
+ return { uri: Nn(e5, t2, i2, r2 || {}, a2) };
902
902
  }
903
903
  return { uri: `` };
904
904
  }
905
- var Fn = `https://static.wixstatic.com/`;
906
- var In = `https://static.wixstatic.com/media/`;
907
- var Ln = /^media\//i;
908
- var Rn = typeof window < `u` ? window.devicePixelRatio : 1;
909
- var zn = (e5) => Ln.test(e5) ? `${Fn}${e5}` : `${In}${e5}`;
910
- var Bn = (e5, t2) => {
905
+ var In = `https://static.wixstatic.com/`;
906
+ var Ln = `https://static.wixstatic.com/media/`;
907
+ var Rn = /^media\//i;
908
+ var zn = typeof window < `u` ? window.devicePixelRatio : 1;
909
+ var Bn = (e5) => Rn.test(e5) ? `${In}${e5}` : `${Ln}${e5}`;
910
+ var Vn = (e5, t2) => {
911
911
  let n2 = t2 && t2.baseHostURL;
912
- return n2 ? `${n2}${e5}` : zn(e5);
912
+ return n2 ? `${n2}${e5}` : Bn(e5);
913
913
  };
914
- function Vn(e5, t2, n2, r2, i2, a2) {
915
- return Bn(Pn(E.SCALE_TO_FIT, { id: e5, width: t2, height: n2, name: a2 && a2.name }, { width: r2, height: i2, htmlTag: Ze.IMG, alignment: O.CENTER, pixelAspectRatio: a2?.devicePixelRatio ?? Rn }, a2).uri, a2);
916
- }
917
914
  function Hn(e5, t2, n2, r2, i2, a2) {
918
- return Bn(Pn(E.SCALE_TO_FILL, { id: e5, width: t2, height: n2, name: a2 && a2.name, focalPoint: { x: a2 && a2.focalPoint && a2.focalPoint.x, y: a2 && a2.focalPoint && a2.focalPoint.y } }, { width: r2, height: i2, htmlTag: Ze.IMG, alignment: O.CENTER, pixelAspectRatio: a2?.devicePixelRatio ?? Rn }, a2).uri, a2);
919
- }
920
- function Un(e5, t2, n2, r2, i2, a2, o2, s2, c2, l2) {
921
- return Bn(Pn(E.SCALE_TO_FILL, { id: e5, width: t2, height: n2, name: l2 && l2.name, crop: { x: r2, y: i2, width: a2, height: o2 } }, { width: s2, height: c2, htmlTag: Ze.IMG, alignment: O.CENTER, pixelAspectRatio: l2?.devicePixelRatio ?? Rn }, l2).uri, l2);
922
- }
923
- Gt(), Gt();
924
- var Wn = { getScaleToFitImageURL: Vn, getScaleToFillImageURL: Hn, getCropImageURL: Un };
925
- var Gn = `wix:`;
926
- var Kn = `image`;
927
- var qn = `video`;
928
- var Jn = `audio`;
929
- var Yn = `document`;
930
- var Xn = `https://static.wixstatic.com/media/`;
931
- var Zn = `https://static.wixstatic.com/shapes/`;
932
- var Qn = `https://video.wixstatic.com/video/`;
933
- var $n = `https://static.wixstatic.com/mp3/`;
934
- var er = `https://d945e594-8657-47e2-9cd9-e9033c3d8da0.usrfiles.com/`;
935
- function tr(e5, t2, n2, r2) {
936
- let i2 = ir(e5);
937
- return Wn.getScaleToFillImageURL(i2.id, i2.height, i2.width, t2, n2, r2);
938
- }
915
+ return Vn(Fn(E.SCALE_TO_FIT, { id: e5, width: t2, height: n2, name: a2 && a2.name }, { width: r2, height: i2, htmlTag: Qe.IMG, alignment: O.CENTER, pixelAspectRatio: a2?.devicePixelRatio ?? zn }, a2).uri, a2);
916
+ }
917
+ function Un(e5, t2, n2, r2, i2, a2) {
918
+ return Vn(Fn(E.SCALE_TO_FILL, { id: e5, width: t2, height: n2, name: a2 && a2.name, focalPoint: { x: a2 && a2.focalPoint && a2.focalPoint.x, y: a2 && a2.focalPoint && a2.focalPoint.y } }, { width: r2, height: i2, htmlTag: Qe.IMG, alignment: O.CENTER, pixelAspectRatio: a2?.devicePixelRatio ?? zn }, a2).uri, a2);
919
+ }
920
+ function Wn(e5, t2, n2, r2, i2, a2, o2, s2, c2, l2) {
921
+ return Vn(Fn(E.SCALE_TO_FILL, { id: e5, width: t2, height: n2, name: l2 && l2.name, crop: { x: r2, y: i2, width: a2, height: o2 } }, { width: s2, height: c2, htmlTag: Qe.IMG, alignment: O.CENTER, pixelAspectRatio: l2?.devicePixelRatio ?? zn }, l2).uri, l2);
922
+ }
923
+ qt(), qt();
924
+ var Gn = { getScaleToFitImageURL: Hn, getScaleToFillImageURL: Un, getCropImageURL: Wn };
925
+ var Kn = `wix:`;
926
+ var qn = `image`;
927
+ var Jn = `video`;
928
+ var Yn = `audio`;
929
+ var Xn = `document`;
930
+ var Zn = `https://static.wixstatic.com/media/`;
931
+ var Qn = `https://static.wixstatic.com/shapes/`;
932
+ var $n = `https://video.wixstatic.com/video/`;
933
+ var er = `https://static.wixstatic.com/mp3/`;
934
+ var tr = `https://d945e594-8657-47e2-9cd9-e9033c3d8da0.usrfiles.com/`;
939
935
  function nr(e5, t2, n2, r2) {
940
- let i2 = ir(e5);
941
- return Wn.getScaleToFitImageURL(i2.id, i2.height, i2.width, t2, n2, r2);
936
+ let i2 = ar(e5);
937
+ return Gn.getScaleToFillImageURL(i2.id, i2.height, i2.width, t2, n2, r2);
942
938
  }
943
- function rr(e5, t2, n2, r2, i2, a2, o2, s2) {
944
- let c2 = ir(e5);
945
- return Wn.getCropImageURL(c2.id, c2.height, c2.width, t2, n2, r2, i2, a2, o2, s2);
939
+ function rr(e5, t2, n2, r2) {
940
+ let i2 = ar(e5);
941
+ return Gn.getScaleToFitImageURL(i2.id, i2.height, i2.width, t2, n2, r2);
946
942
  }
947
- function ir(e5) {
948
- return or(e5, Xn);
943
+ function ir(e5, t2, n2, r2, i2, a2, o2, s2) {
944
+ let c2 = ar(e5);
945
+ return Gn.getCropImageURL(c2.id, c2.height, c2.width, t2, n2, r2, i2, a2, o2, s2);
949
946
  }
950
947
  function ar(e5) {
951
- return or(e5, Zn);
948
+ return sr(e5, Zn);
952
949
  }
953
- function or(e5, t2 = Xn) {
950
+ function or(e5) {
951
+ return sr(e5, Qn);
952
+ }
953
+ function sr(e5, t2 = Zn) {
954
954
  let n2, r2, i2, a2;
955
955
  if (e5.startsWith(t2)) n2 = e5.split(t2).pop().split(`/`)[0], a2 = e5.split(`/w_`).pop().split(`,`)[0], i2 = e5.split(`,h_`).pop().split(`,`)[0];
956
956
  else {
957
- let t3 = dr(e5, Kn), { hash: o3, pathname: s3 } = new URL(t3), c2 = new URLSearchParams(o3.replace(`#`, ``));
958
- i2 = c2.get(`originHeight`), a2 = c2.get(`originWidth`), [n2, r2] = s3.replace(`${Kn}://v1/`, ``).split(`/`);
957
+ let t3 = fr(e5, qn), { hash: o3, pathname: s3 } = new URL(t3), c2 = new URLSearchParams(o3.replace(`#`, ``));
958
+ i2 = c2.get(`originHeight`), a2 = c2.get(`originWidth`), [n2, r2] = s3.replace(`${qn}://v1/`, ``).split(`/`);
959
959
  }
960
- let o2 = ur(r2), s2 = { id: n2, url: `${t2}${n2}`, height: Number(i2), width: Number(a2) };
960
+ let o2 = dr(r2), s2 = { id: n2, url: `${t2}${n2}`, height: Number(i2), width: Number(a2) };
961
961
  return o2 ? { ...s2, altText: o2, filename: o2 } : s2;
962
962
  }
963
- function sr(e5, t2) {
963
+ function cr(e5, t2) {
964
964
  let n2, r2, i2, a2, o2 = ``;
965
- if (e5.startsWith(Qn)) n2 = e5.split(Qn).pop().split(`/`)[0], r2 = `${n2}.jpg`, i2 = `50`, a2 = `50`;
965
+ if (e5.startsWith($n)) n2 = e5.split($n).pop().split(`/`)[0], r2 = `${n2}.jpg`, i2 = `50`, a2 = `50`;
966
966
  else {
967
- let t3 = dr(e5, qn), { pathname: s3, hash: c2 } = new URL(t3), l2 = new URLSearchParams(c2.replace(`#`, ``)), [u2, d2] = s3.replace(`${qn}://v1/`, ``).split(`/`);
968
- n2 = u2, r2 = l2.get(`posterUri`) || `${n2}.jpg`, i2 = l2.get(`posterWidth`) || `50`, a2 = l2.get(`posterHeight`) || `50`, o2 = ur(d2);
967
+ let t3 = fr(e5, Jn), { pathname: s3, hash: c2 } = new URL(t3), l2 = new URLSearchParams(c2.replace(`#`, ``)), [u2, d2] = s3.replace(`${Jn}://v1/`, ``).split(`/`);
968
+ n2 = u2, r2 = l2.get(`posterUri`) || `${n2}.jpg`, i2 = l2.get(`posterWidth`) || `50`, a2 = l2.get(`posterHeight`) || `50`, o2 = dr(d2);
969
969
  }
970
- let s2 = { id: n2, url: `${Qn}${n2}/${t2 ? `${t2}/mp4/file.mp4` : `file`}`, thumbnail: `${Gn}${Kn}://v1/${r2}#originWidth=${i2}&originHeight=${a2}` };
970
+ let s2 = { id: n2, url: `${$n}${n2}/${t2 ? `${t2}/mp4/file.mp4` : `file`}`, thumbnail: `${Kn}${qn}://v1/${r2}#originWidth=${i2}&originHeight=${a2}` };
971
971
  return o2 ? { ...s2, filename: o2 } : s2;
972
972
  }
973
- function cr(e5) {
974
- let t2 = dr(e5, Jn), { pathname: n2, hash: r2 } = new URL(t2), [i2, a2] = n2.replace(`${Jn}://v1/`, ``).split(`/`), o2 = ur(a2), s2 = new URLSearchParams(r2.replace(`#`, ``)), c2 = { id: i2, duration: Number(s2.get(`duration`) || ``), url: `${$n}${i2}` };
973
+ function lr(e5) {
974
+ let t2 = fr(e5, Yn), { pathname: n2, hash: r2 } = new URL(t2), [i2, a2] = n2.replace(`${Yn}://v1/`, ``).split(`/`), o2 = dr(a2), s2 = new URLSearchParams(r2.replace(`#`, ``)), c2 = { id: i2, duration: Number(s2.get(`duration`) || ``), url: `${er}${i2}` };
975
975
  return o2 ? { ...c2, filename: o2 } : c2;
976
976
  }
977
- function lr(e5) {
978
- let t2 = dr(e5, Yn), { pathname: n2 } = new URL(t2), r2 = n2.replace(`${Yn}://v1/`, ``).split(`/`), i2 = r2[0] === `ugd` || r2[0] === `archives` ? r2.shift() : `ugd`, [a2, o2] = r2, s2 = ur(o2), c2 = { id: a2, url: `${er}${i2}/${a2}` };
977
+ function ur(e5) {
978
+ let t2 = fr(e5, Xn), { pathname: n2 } = new URL(t2), r2 = n2.replace(`${Xn}://v1/`, ``).split(`/`), i2 = r2[0] === `ugd` || r2[0] === `archives` ? r2.shift() : `ugd`, [a2, o2] = r2, s2 = dr(o2), c2 = { id: a2, url: `${tr}${i2}/${a2}` };
979
979
  return s2 ? { ...c2, filename: s2 } : c2;
980
980
  }
981
- function ur(e5) {
981
+ function dr(e5) {
982
982
  return e5 && decodeURIComponent(e5);
983
983
  }
984
- function dr(e5, t2) {
984
+ function fr(e5, t2) {
985
985
  let { protocol: n2 } = new URL(e5);
986
- return n2 === `${t2}:` ? `${Gn}${e5}` : e5;
986
+ return n2 === `${t2}:` ? `${Kn}${e5}` : e5;
987
987
  }
988
- var fr;
988
+ var pr;
989
989
  (function(e5) {
990
990
  e5.MOBILE = `360p`, e5.LOW = `480p`, e5.MID = `720p`, e5.HIGH = `1080p`;
991
- })(fr ||= {});
992
- var pr = { getCroppedImageUrl: rr, getScaledToFillImageUrl: tr, getScaledToFitImageUrl: nr, getImageUrl: ir, getVideoUrl: sr, getAudioUrl: cr, getDocumentUrl: lr, getShapeUrl: ar };
993
- var mr = { _id: `id`, _createdDate: `createdDate`, _updatedDate: `updatedDate` };
994
- var hr = { id: `_id`, createdDate: `_createdDate`, updatedDate: `_updatedDate` };
995
- function gr(e5, t2) {
991
+ })(pr ||= {});
992
+ var mr = { getCroppedImageUrl: ir, getScaledToFillImageUrl: nr, getScaledToFitImageUrl: rr, getImageUrl: ar, getVideoUrl: cr, getAudioUrl: lr, getDocumentUrl: ur, getShapeUrl: or };
993
+ var hr = { _id: `id`, _createdDate: `createdDate`, _updatedDate: `updatedDate` };
994
+ var gr = { id: `_id`, createdDate: `_createdDate`, updatedDate: `_updatedDate` };
995
+ function _r(e5, t2) {
996
996
  return e5?.split(`.`).map((e6) => t2?.[e6] ?? e6).join(`.`);
997
997
  }
998
- var _r = `sort.fieldName`;
999
- function vr(e5, t2, n2) {
1000
- return (e5 === _r || e5.endsWith(`.${_r}`)) && typeof t2 == `string` ? gr(t2, n2) : t2;
1001
- }
998
+ var vr = `sort.fieldName`;
1002
999
  function yr(e5, t2, n2) {
1000
+ return (e5 === vr || e5.endsWith(`.${vr}`)) && typeof t2 == `string` ? _r(t2, n2) : t2;
1001
+ }
1002
+ function br(e5, t2, n2) {
1003
1003
  let r2 = (e6) => n2.includes(e6), i2 = (e6, n3) => {
1004
1004
  if (Array.isArray(e6)) e6.forEach((e7) => {
1005
1005
  i2(e7, n3);
@@ -1009,157 +1009,157 @@ function yr(e5, t2, n2) {
1009
1009
  Object.keys(a2).forEach((e7) => {
1010
1010
  let o2 = n3 === `` ? e7 : `${n3}.${e7}`;
1011
1011
  if (r2(o2)) return;
1012
- let s2 = br(e7, t2);
1013
- s2 !== e7 && !(s2 in a2) && (a2[s2] = a2[e7], delete a2[e7]), a2[s2] = vr(o2, a2[s2], t2), i2(a2[s2], o2);
1012
+ let s2 = xr(e7, t2);
1013
+ s2 !== e7 && !(s2 in a2) && (a2[s2] = a2[e7], delete a2[e7]), a2[s2] = yr(o2, a2[s2], t2), i2(a2[s2], o2);
1014
1014
  });
1015
1015
  }
1016
1016
  };
1017
1017
  return i2(e5, ``), e5;
1018
1018
  }
1019
- function br(e5, t2) {
1019
+ function xr(e5, t2) {
1020
1020
  let n2;
1021
1021
  return n2 = e5.includes(`.`) ? e5.split(`.`).map((e6) => t2[e6] ?? e6).join(`.`) : t2[e5] ?? e5, n2;
1022
1022
  }
1023
- function xr(e5, t2 = []) {
1024
- return yr(e5, mr, t2);
1025
- }
1026
1023
  function Sr(e5, t2 = []) {
1027
- return yr(e5, hr, t2);
1024
+ return br(e5, hr, t2);
1028
1025
  }
1029
- function Cr(e5) {
1026
+ function Cr(e5, t2 = []) {
1027
+ return br(e5, gr, t2);
1028
+ }
1029
+ function wr(e5) {
1030
1030
  return e5 ? new Date(e5) : void 0;
1031
1031
  }
1032
- var wr = /* @__PURE__ */ new WeakMap();
1033
- function Tr() {
1032
+ var Tr = /* @__PURE__ */ new WeakMap();
1033
+ function Er() {
1034
1034
  return { leaves: void 0, fields: void 0, mapFields: void 0, anyField: void 0 };
1035
1035
  }
1036
- function Er(e5, t2) {
1036
+ function Dr(e5, t2) {
1037
1037
  let n2 = e5.get(t2);
1038
- return n2 || (n2 = Tr(), e5.set(t2, n2)), n2;
1038
+ return n2 || (n2 = Er(), e5.set(t2, n2)), n2;
1039
1039
  }
1040
- function Dr(e5, t2) {
1041
- return t2 === `*` ? (e5.anyField ??= Tr(), e5.anyField) : t2.endsWith(`{}`) ? (e5.mapFields ??= /* @__PURE__ */ new Map(), Er(e5.mapFields, t2.slice(0, -2))) : (e5.fields ??= /* @__PURE__ */ new Map(), Er(e5.fields, t2));
1040
+ function Or(e5, t2) {
1041
+ return t2 === `*` ? (e5.anyField ??= Er(), e5.anyField) : t2.endsWith(`{}`) ? (e5.mapFields ??= /* @__PURE__ */ new Map(), Dr(e5.mapFields, t2.slice(0, -2))) : (e5.fields ??= /* @__PURE__ */ new Map(), Dr(e5.fields, t2));
1042
1042
  }
1043
- function Or(e5) {
1044
- let t2 = Tr();
1043
+ function kr(e5) {
1044
+ let t2 = Er();
1045
1045
  for (let n2 of e5) {
1046
- let e6 = n2.path.split(`.`).reduce(Dr, t2);
1046
+ let e6 = n2.path.split(`.`).reduce(Or, t2);
1047
1047
  e6.leaves ??= [], e6.leaves.push(n2);
1048
1048
  }
1049
1049
  return t2;
1050
1050
  }
1051
- function kr(e5) {
1052
- let t2 = wr.get(e5);
1053
- return t2 || (t2 = Or(e5), wr.set(e5, t2)), t2;
1054
- }
1055
1051
  function Ar(e5) {
1056
- return typeof e5 == `object` && !!e5;
1052
+ let t2 = Tr.get(e5);
1053
+ return t2 || (t2 = kr(e5), Tr.set(e5, t2)), t2;
1057
1054
  }
1058
- function jr(e5, { isRepeated: t2, isMap: n2 }, r2) {
1059
- return t2 ? Array.isArray(e5) ? e5.map(r2) : e5 : n2 ? Ar(e5) ? Object.fromEntries(Object.entries(e5).map(([e6, t3]) => [e6, r2(t3)])) : e5 : r2(e5);
1055
+ function jr(e5) {
1056
+ return typeof e5 == `object` && !!e5;
1060
1057
  }
1061
- function Mr(e5, t2, n2) {
1062
- Ar(e5) && Fr(e5, t2, n2);
1058
+ function Mr(e5, { isRepeated: t2, isMap: n2 }, r2) {
1059
+ return t2 ? Array.isArray(e5) ? e5.map(r2) : e5 : n2 ? jr(e5) ? Object.fromEntries(Object.entries(e5).map(([e6, t3]) => [e6, r2(t3)])) : e5 : r2(e5);
1063
1060
  }
1064
1061
  function Nr(e5, t2, n2) {
1062
+ jr(e5) && Ir(e5, t2, n2);
1063
+ }
1064
+ function Pr(e5, t2, n2) {
1065
1065
  for (let [r2, i2] of t2) {
1066
1066
  if (!(r2 in e5)) continue;
1067
- if (i2.leaves) for (let t4 of i2.leaves) e5[r2] = jr(e5[r2], t4, n2);
1067
+ if (i2.leaves) for (let t4 of i2.leaves) e5[r2] = Mr(e5[r2], t4, n2);
1068
1068
  let t3 = e5[r2];
1069
- Array.isArray(t3) ? t3.forEach((e6) => Mr(e6, i2, n2)) : Mr(t3, i2, n2);
1069
+ Array.isArray(t3) ? t3.forEach((e6) => Nr(e6, i2, n2)) : Nr(t3, i2, n2);
1070
1070
  }
1071
1071
  }
1072
- function Pr(e5, t2, n2) {
1072
+ function Fr(e5, t2, n2) {
1073
1073
  for (let [r2, i2] of t2) {
1074
1074
  let t3 = e5[r2];
1075
- Ar(t3) && Object.values(t3).forEach((e6) => Mr(e6, i2, n2));
1075
+ jr(t3) && Object.values(t3).forEach((e6) => Nr(e6, i2, n2));
1076
1076
  }
1077
1077
  }
1078
- function Fr(e5, { fields: t2, mapFields: n2, anyField: r2 }, i2) {
1079
- t2 && Nr(e5, t2, i2), n2 && Pr(e5, n2, i2), r2 && Object.values(e5).forEach((e6) => Mr(e6, r2, i2));
1078
+ function Ir(e5, { fields: t2, mapFields: n2, anyField: r2 }, i2) {
1079
+ t2 && Pr(e5, t2, i2), n2 && Fr(e5, n2, i2), r2 && Object.values(e5).forEach((e6) => Nr(e6, r2, i2));
1080
1080
  }
1081
- function Ir(e5, t2) {
1082
- if (!Ar(e5)) return e5;
1083
- for (let { paths: n2, transformFn: r2 } of t2) Fr(e5, kr(n2), r2);
1081
+ function Lr(e5, t2) {
1082
+ if (!jr(e5)) return e5;
1083
+ for (let { paths: n2, transformFn: r2 } of t2) Ir(e5, Ar(n2), r2);
1084
1084
  return e5;
1085
1085
  }
1086
- function Lr(e5) {
1087
- return Hr(e5).map((e6) => e6.toLocaleUpperCase()).join(`_`);
1086
+ function Rr(e5) {
1087
+ return Ur(e5).map((e6) => e6.toLocaleUpperCase()).join(`_`);
1088
1088
  }
1089
- var Rr = /([\p{Ll}\d])(\p{Lu})/gu;
1090
- var zr = /(\p{Lu})([\p{Lu}][\p{Ll}])/gu;
1091
- var Br = `$1\0$2`;
1092
- var Vr = /[^\p{L}\d]+/giu;
1093
- function Hr(e5) {
1089
+ var zr = /([\p{Ll}\d])(\p{Lu})/gu;
1090
+ var Br = /(\p{Lu})([\p{Lu}][\p{Ll}])/gu;
1091
+ var Vr = `$1\0$2`;
1092
+ var Hr = /[^\p{L}\d]+/giu;
1093
+ function Ur(e5) {
1094
1094
  let t2 = e5.trim();
1095
- t2 = t2.replace(Rr, Br).replace(zr, Br), t2 = t2.replace(Vr, `\0`);
1095
+ t2 = t2.replace(zr, Vr).replace(Br, Vr), t2 = t2.replace(Hr, `\0`);
1096
1096
  let n2 = 0, r2 = t2.length;
1097
1097
  for (; t2.charAt(n2) === `\0`; ) n2++;
1098
1098
  if (n2 === r2) return [];
1099
1099
  for (; t2.charAt(r2 - 1) === `\0`; ) r2--;
1100
1100
  return t2.slice(n2, r2).split(/\0/g);
1101
1101
  }
1102
- var Ur = (e5) => `validationError` in (e5.response?.data?.details ?? {});
1103
- var Wr = (e5) => `applicationError` in (e5.response?.data?.details ?? {});
1104
- var Gr = (e5) => (e5.response?.status ?? -1) >= 400 && (e5.response?.status ?? -1) < 500;
1105
- function Kr(e5, t2 = { explicitPathsToArguments: {}, spreadPathsToArguments: {}, singleArgumentUnchanged: false }, n2 = []) {
1102
+ var Wr = (e5) => `validationError` in (e5.response?.data?.details ?? {});
1103
+ var Gr = (e5) => `applicationError` in (e5.response?.data?.details ?? {});
1104
+ var Kr = (e5) => (e5.response?.status ?? -1) >= 400 && (e5.response?.status ?? -1) < 500;
1105
+ function qr(e5, t2 = { explicitPathsToArguments: {}, spreadPathsToArguments: {}, singleArgumentUnchanged: false }, n2 = []) {
1106
1106
  if (typeof e5 != `object` || !e5) throw e5;
1107
- if (Ur(e5)) return qr(e5, t2, n2);
1108
- if (Wr(e5)) return Yr(e5);
1109
- if (Gr(e5)) {
1110
- let t3 = e5.response?.status, n3 = e5.response?.statusText ?? `UNKNOWN`, r2 = e5.response?.data?.message ?? n3, i2 = { applicationError: { description: n3, code: Lr(n3), data: {} }, requestId: e5.requestId };
1111
- return Jr(e5, { message: JSON.stringify({ message: r2, details: i2 }, null, 2), extraProperties: { details: i2, status: t3 } });
1107
+ if (Wr(e5)) return Jr(e5, t2, n2);
1108
+ if (Gr(e5)) return Xr(e5);
1109
+ if (Kr(e5)) {
1110
+ let t3 = e5.response?.status, n3 = e5.response?.statusText ?? `UNKNOWN`, r2 = e5.response?.data?.message ?? n3, i2 = { applicationError: { description: n3, code: Rr(n3), data: {} }, requestId: e5.requestId };
1111
+ return Yr(e5, { message: JSON.stringify({ message: r2, details: i2 }, null, 2), extraProperties: { details: i2, status: t3 } });
1112
1112
  }
1113
- return Xr(e5);
1113
+ return Zr(e5);
1114
1114
  }
1115
- var qr = (e5, t2, n2) => {
1116
- let r2 = e5.response?.data, i2 = e5.requestId, { fieldViolations: a2 } = r2.details.validationError, o2 = Zr(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 };
1117
- return Jr(e5, { message: JSON.stringify({ message: s2, details: c2 }, null, 2), extraProperties: { details: c2, status: e5.response?.status, requestId: i2 } });
1115
+ var Jr = (e5, t2, n2) => {
1116
+ let r2 = e5.response?.data, i2 = e5.requestId, { fieldViolations: a2 } = r2.details.validationError, o2 = Qr(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 };
1117
+ return Yr(e5, { message: JSON.stringify({ message: s2, details: c2 }, null, 2), extraProperties: { details: c2, status: e5.response?.status, requestId: i2 } });
1118
1118
  };
1119
- var Jr = (e5, { message: t2, extraProperties: n2 }) => Object.assign(e5, { ...n2, message: t2 });
1120
- var Yr = (e5) => {
1121
- 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 ?? Lr(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 };
1122
- return Jr(e5, { message: JSON.stringify({ message: s2, details: c2 }, null, 2), extraProperties: { details: c2, status: t2, requestId: e5.requestId } });
1119
+ var Yr = (e5, { message: t2, extraProperties: n2 }) => Object.assign(e5, { ...n2, message: t2 });
1120
+ var Xr = (e5) => {
1121
+ 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 ?? Rr(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 };
1122
+ return Yr(e5, { message: JSON.stringify({ message: s2, details: c2 }, null, 2), extraProperties: { details: c2, status: t2, requestId: e5.requestId } });
1123
1123
  };
1124
- var Xr = (e5) => Jr(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: Lr(e5.response?.statusText ?? `UNKNOWN`), ...!e5.response && { runtimeError: e5 } } });
1125
- var Zr = ({ spreadPathsToArguments: e5, explicitPathsToArguments: t2, singleArgumentUnchanged: n2 }, r2, i2) => {
1124
+ var Zr = (e5) => Yr(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: Rr(e5.response?.statusText ?? `UNKNOWN`), ...!e5.response && { runtimeError: e5 } } });
1125
+ var Qr = ({ spreadPathsToArguments: e5, explicitPathsToArguments: t2, singleArgumentUnchanged: n2 }, r2, i2) => {
1126
1126
  let a2 = { ...e5, ...t2 }, o2 = Object.keys(a2);
1127
1127
  return r2?.filter((e6) => !r2.some((t3) => t3.field.length > e6.field.length && t3.field.startsWith(e6.field) && o2.includes(t3.field))).map((e6) => {
1128
1128
  let r3 = t2[e6.field];
1129
- if (r3) return { ...e6, field: Qr(r3, i2) };
1129
+ if (r3) return { ...e6, field: $r(r3, i2) };
1130
1130
  let s2 = o2?.sort((e7, t3) => t3.length - e7.length)?.find((t3) => e6.field.startsWith(t3));
1131
1131
  if (s2) {
1132
1132
  let t3 = a2[s2];
1133
- if (t3) return { ...e6, field: e6.field.replace(s2, Qr(t3, i2)) };
1133
+ if (t3) return { ...e6, field: e6.field.replace(s2, $r(t3, i2)) };
1134
1134
  }
1135
1135
  return n2 ? { ...e6, field: `${i2[0]}.${e6.field}` } : e6;
1136
1136
  });
1137
1137
  };
1138
- var Qr = (e5, t2) => {
1139
- let n2 = $r(e5);
1138
+ var $r = (e5, t2) => {
1139
+ let n2 = ei(e5);
1140
1140
  return n2 == null ? e5 : e5.replace(`$[${n2}]`, t2[n2]);
1141
1141
  };
1142
- var $r = (e5) => {
1142
+ var ei = (e5) => {
1143
1143
  let t2 = e5.match(/\$\[(?<argIndex>\d+)\]/);
1144
1144
  return t2 && t2.groups && Number(t2.groups.argIndex);
1145
1145
  };
1146
- function ei() {
1146
+ function ti() {
1147
1147
  let e5 = typeof $wixContext < `u` && $wixContext.initWixModules ? $wixContext.initWixModules : globalThis.__wix_context__ !== void 0 && globalThis.__wix_context__.initWixModules ? globalThis.__wix_context__.initWixModules : void 0;
1148
1148
  if (e5) return { initWixModules(t3, n3) {
1149
- return ti(() => e5(t3, n3));
1149
+ return ni(() => e5(t3, n3));
1150
1150
  }, fetchWithAuth() {
1151
1151
  throw Error(`fetchWithAuth is not available in this context`);
1152
1152
  }, graphql() {
1153
1153
  throw Error(`graphql is not available in this context`);
1154
1154
  } };
1155
- let t2 = typeof $wixContext < `u` ? $wixContext.client : p.client === void 0 ? globalThis.__wix_context__ === void 0 ? void 0 : globalThis.__wix_context__.client : p.client, n2 = typeof $wixContext < `u` ? $wixContext.elevatedClient : p.elevatedClient === void 0 ? globalThis.__wix_context__ === void 0 ? void 0 : globalThis.__wix_context__.elevatedClient : p.elevatedClient;
1155
+ let t2 = typeof $wixContext < `u` ? $wixContext.client : m.client === void 0 ? globalThis.__wix_context__ === void 0 ? void 0 : globalThis.__wix_context__.client : m.client, n2 = typeof $wixContext < `u` ? $wixContext.elevatedClient : m.elevatedClient === void 0 ? globalThis.__wix_context__ === void 0 ? void 0 : globalThis.__wix_context__.elevatedClient : m.elevatedClient;
1156
1156
  if (t2 || n2) return { initWixModules(e6, r2) {
1157
1157
  if (r2) {
1158
1158
  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`);
1159
- return ti(() => n2.use(e6));
1159
+ return ni(() => n2.use(e6));
1160
1160
  }
1161
1161
  if (!t2) throw Error(`Wix context is not available. Make sure to initialize the Wix context before using SDK modules`);
1162
- return ti(() => t2.use(e6));
1162
+ return ni(() => t2.use(e6));
1163
1163
  }, fetchWithAuth: (e6, n3) => {
1164
1164
  if (!t2) throw Error(`Wix context is not available. Make sure to initialize the Wix context before using SDK modules`);
1165
1165
  return t2.fetchWithAuth(e6, n3);
@@ -1171,87 +1171,87 @@ function ei() {
1171
1171
  return t2.graphql(e6, n3, r2);
1172
1172
  } };
1173
1173
  }
1174
- function ti(e5) {
1175
- let t2 = globalThis.__wix_context__, n2 = { client: p.client, elevatedClient: p.elevatedClient }, r2;
1176
- 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);
1174
+ function ni(e5) {
1175
+ let t2 = globalThis.__wix_context__, n2 = { client: m.client, elevatedClient: m.elevatedClient }, r2;
1176
+ globalThis.__wix_context__ = void 0, m.client = void 0, m.elevatedClient = void 0, typeof $wixContext < `u` && (r2 = { client: $wixContext?.client, elevatedClient: $wixContext?.elevatedClient }, delete $wixContext.client, delete $wixContext.elevatedClient);
1177
1177
  try {
1178
1178
  return e5();
1179
1179
  } finally {
1180
- globalThis.__wix_context__ = t2, p.client = n2.client, p.elevatedClient = n2.elevatedClient, typeof $wixContext < `u` && ($wixContext.client = r2.client, $wixContext.elevatedClient = r2.elevatedClient);
1180
+ globalThis.__wix_context__ = t2, m.client = n2.client, m.elevatedClient = n2.elevatedClient, typeof $wixContext < `u` && ($wixContext.client = r2.client, $wixContext.elevatedClient = r2.elevatedClient);
1181
1181
  }
1182
1182
  }
1183
- function ni(e5, t2) {
1183
+ function ri(e5, t2) {
1184
1184
  return (...n2) => {
1185
- let r2 = ei();
1185
+ let r2 = ti();
1186
1186
  return r2 ? r2.initWixModules(e5, t2).apply(void 0, n2) : e5.apply(void 0, n2);
1187
1187
  };
1188
1188
  }
1189
- function ri(e5, t2 = false) {
1190
- return ni(e5, t2);
1191
- }
1192
- function ii(e5) {
1193
- let t2 = _i(hi(e5.host), e5.domainToMappings);
1194
- return Ei(Ci(e5.protoPath, e5.data || {}), t2);
1195
- }
1196
- var ai = [`wix.com`, `editorx.com`];
1197
- var oi = `_`;
1198
- var si = `*.`;
1199
- var ci = RegExp(`\\.(${ai.join(`|`)})$`);
1200
- var li = [`42.wixprod.net`, `uw2-edt-1.wixprod.net`, `virginia-edt.wixprod.net`];
1201
- var ui = { "payments.base44.com": `manage.wix.com`, "create.editorx.com": `editor.editorx.com` };
1202
- var di = `dev.wix-code.com`;
1203
- var fi = /{(.*)}/;
1204
- var pi = RegExp(`\\.(${li.join(`|`)})$`);
1205
- var mi = RegExp(`.*\\.${di}$`);
1206
- function hi(e5) {
1207
- return gi(e5).replace(ci, `._base_domain_`).replace(pi, `._api_base_domain_`).replace(mi, `*.dev.wix-code.com`);
1208
- }
1189
+ function ii(e5, t2 = false) {
1190
+ return ri(e5, t2);
1191
+ }
1192
+ function ai(e5) {
1193
+ let t2 = vi(gi(e5.host), e5.domainToMappings);
1194
+ return Di(wi(e5.protoPath, e5.data || {}), t2);
1195
+ }
1196
+ var oi = [`wix.com`, `editorx.com`];
1197
+ var si = `_`;
1198
+ var ci = `*.`;
1199
+ var li = RegExp(`\\.(${oi.join(`|`)})$`);
1200
+ var ui = [`42.wixprod.net`, `uw2-edt-1.wixprod.net`, `virginia-edt.wixprod.net`];
1201
+ var di = { "payments.base44.com": `manage.wix.com`, "create.editorx.com": `editor.editorx.com` };
1202
+ var fi = `dev.wix-code.com`;
1203
+ var pi = /{(.*)}/;
1204
+ var mi = RegExp(`\\.(${ui.join(`|`)})$`);
1205
+ var hi = RegExp(`.*\\.${fi}$`);
1209
1206
  function gi(e5) {
1210
- return ui[e5] ?? e5;
1207
+ return _i(e5).replace(li, `._base_domain_`).replace(mi, `._api_base_domain_`).replace(hi, `*.dev.wix-code.com`);
1208
+ }
1209
+ function _i(e5) {
1210
+ return di[e5] ?? e5;
1211
1211
  }
1212
- function _i(e5, t2) {
1212
+ function vi(e5, t2) {
1213
1213
  let n2 = t2[e5];
1214
1214
  if (n2) return n2;
1215
- let r2 = vi(e5, t2) ?? yi(e5, t2);
1215
+ let r2 = yi(e5, t2) ?? bi(e5, t2);
1216
1216
  if (!r2) {
1217
- if (xi(e5)) {
1218
- let e6 = t2[Si];
1217
+ if (Si(e5)) {
1218
+ let e6 = t2[Ci];
1219
1219
  if (e6) return e6;
1220
1220
  }
1221
- let n3 = t2[oi];
1221
+ let n3 = t2[si];
1222
1222
  if (n3) return n3;
1223
1223
  }
1224
1224
  return r2 ?? [];
1225
1225
  }
1226
- function vi(e5, t2) {
1226
+ function yi(e5, t2) {
1227
1227
  return Object.entries(t2).find(([t3]) => {
1228
1228
  let [, ...n2] = e5.split(`.`);
1229
1229
  return n2.join(`.`) === t3;
1230
1230
  })?.[1];
1231
1231
  }
1232
- function yi(e5, t2) {
1233
- let [n2] = Object.entries(t2).filter(([t3]) => bi(e5, t3)).sort(([e6], [t3]) => t3.length - e6.length);
1232
+ function bi(e5, t2) {
1233
+ let [n2] = Object.entries(t2).filter(([t3]) => xi(e5, t3)).sort(([e6], [t3]) => t3.length - e6.length);
1234
1234
  if (!n2) return;
1235
1235
  let [, r2] = n2;
1236
1236
  return r2;
1237
1237
  }
1238
- function bi(e5, t2) {
1239
- if (!t2.startsWith(si)) return false;
1238
+ function xi(e5, t2) {
1239
+ if (!t2.startsWith(ci)) return false;
1240
1240
  let n2 = t2.slice(1);
1241
1241
  return e5.length > n2.length && e5.endsWith(n2);
1242
1242
  }
1243
- function xi(e5) {
1243
+ function Si(e5) {
1244
1244
  return !!e5.match(/\._base_domain_$/);
1245
1245
  }
1246
- var Si = `www._base_domain_`;
1247
- function Ci(e5, t2) {
1248
- return e5.split(`/`).map((e6) => wi(e6, t2)).join(`/`);
1249
- }
1246
+ var Ci = `www._base_domain_`;
1250
1247
  function wi(e5, t2) {
1251
- let n2 = e5.match(fi) || [], r2 = n2[1];
1252
- return r2 ? Ti(t2, r2, e5, e5.replace(n2[0], ``)) : e5;
1248
+ return e5.split(`/`).map((e6) => Ti(e6, t2)).join(`/`);
1249
+ }
1250
+ function Ti(e5, t2) {
1251
+ let n2 = e5.match(pi) || [], r2 = n2[1];
1252
+ return r2 ? Ei(t2, r2, e5, e5.replace(n2[0], ``)) : e5;
1253
1253
  }
1254
- function Ti(e5, t2, n2, r2) {
1254
+ function Ei(e5, t2, n2, r2) {
1255
1255
  let i2 = e5;
1256
1256
  for (let e6 of t2.split(`.`)) {
1257
1257
  if (!i2) return n2;
@@ -1259,31 +1259,31 @@ function Ti(e5, t2, n2, r2) {
1259
1259
  }
1260
1260
  return `${i2}${r2}`;
1261
1261
  }
1262
- function Ei(e5, t2) {
1262
+ function Di(e5, t2) {
1263
1263
  let n2 = t2?.find((t3) => e5.startsWith(t3.destPath));
1264
1264
  return n2 ? n2.srcPath + e5.slice(n2.destPath.length) : e5;
1265
1265
  }
1266
- var B;
1266
+ var Oi;
1267
1267
  (function(e5) {
1268
1268
  e5.QUERY_PARAM = `QUERY_PARAM`, e5.SUBDOMAIN = `SUBDOMAIN`, e5.SUBDIRECTORY = `SUBDIRECTORY`;
1269
- })(B ||= {});
1270
- var Di = { cs: `\u010Ce\u0161tina`, da: `Dansk`, de: `Deutsch`, en: `English`, es: `Espa\xF1ol`, fr: `Fran\xE7ais`, hi: `\u0939\u093F\u0928\u094D\u0926\u0940`, id: `Bahasa Indonesia`, it: `Italiano`, ja: `\u65E5\u672C\u8A9E`, ko: `\uD55C\uAD6D\uC5B4`, nl: `Nederlands`, no: `Norsk`, pl: `Polski`, pt: `Portugu\xEAs`, ru: `\u0420\u0443\u0441\u0441\u043A\u0438\u0439`, sv: `Svenska`, th: `\u0E44\u0E17\u0E22`, tr: `T\xFCrk\xE7e`, uk: `\u0423\u043A\u0440\u0430\u0457\u043D\u0441\u044C\u043A\u0430`, vi: `Ti\u1EBFng Vi\u1EC7t`, zh: `\u7E41\u9AD4\u4E2D\u6587`, sq: `Shqip`, am: `\u12A0\u121B\u122D\u129B`, ar: `\u0627\u0644\u0639\u0631\u0628\u064A\u0629`, hy: `\u0540\u0561\u0575\u0565\u0580\u0565\u0576`, az: `Az\u0259rbaycan dili`, eu: `Euskara`, be: `\u0411\u0435\u043B\u0430\u0440\u0443\u0441\u043A\u0430\u044F`, bn: `\u09AC\u09BE\u0982\u09B2\u09BE`, bs: `Bosanski`, bg: `\u0411\u044A\u043B\u0433\u0430\u0440\u0441\u043A\u0438`, ca: `Catal\xE0`, ny: `ChiChe\u0175a`, co: `Corsu`, hr: `Hrvatski`, et: `Eesti`, fj: `Vosa Vakaviti`, fi: `Suomi`, ga: `Gaeilge`, gl: `Galego`, ka: `\u10E5\u10D0\u10E0\u10D7\u10E3\u10DA\u10D8`, el: `\u0395\u03BB\u03BB\u03B7\u03BD\u03B9\u03BA\u03AC`, gu: `\u0A97\u0AC1\u0A9C\u0AB0\u0ABE\u0AA4\u0AC0`, ht: `Krey\xF2l Ayisyen`, ha: `Hausa`, he: `\u05E2\u05D1\u05E8\u05D9\u05EA`, hu: `Magyar`, is: `\xCDslenska`, ig: `Igbo`, kn: `\u0C95\u0CA8\u0CCD\u0CA8\u0CA1`, kk: `\u049A\u0430\u0437\u0430\u049B \u0442\u0456\u043B\u0456`, km: `\u1797\u17B6\u179F\u17B6\u1781\u17D2\u1798\u17C2\u179A`, ku: `Kurd\xEE`, ky: `\u041A\u044B\u0440\u0433\u044B\u0437\u0447\u0430`, lb: `L\xEBtzebuergesch`, lo: `\u0EA5\u0EB2\u0EA7`, la: `Latina`, lv: `Latvie\u0161u`, lt: `Lietuvi\u0173`, mk: `\u041C\u0430\u043A\u0435\u0434\u043E\u043D\u0441\u043A\u0438`, mg: `Malagasy`, ms: `Bahasa Melayu`, ml: `\u0D2E\u0D32\u0D2F\u0D3E\u0D33\u0D02`, mt: `Malti`, mn: `\u041C\u043E\u043D\u0433\u043E\u043B`, ne: `\u0928\u0947\u092A\u093E\u0932\u0940`, ps: `\u067E\u069A\u062A\u0648`, fa: `\u0641\u0627\u0631\u0633\u06CC`, ro: `Rom\xE2n\u0103`, sm: `Gagana Samoa`, sr: `\u0421\u0440\u043F\u0441\u043A\u0438`, sn: `Shona`, sd: `\u0633\u0646\u068C\u064A`, si: `\u0DC3\u0DD2\u0D82\u0DC4\u0DBD`, sk: `Sloven\u010Dina`, sl: `Sloven\u0161\u010Dina`, so: `Soomaaliga`, su: `Basa Sunda`, sw: `Kiswahili`, tl: `Filipino`, tg: `\u0422\u043E\u04B7\u0438\u043A\u04E3`, ta: `\u0BA4\u0BAE\u0BBF\u0BB4\u0BCD`, te: `\u0C24\u0C46\u0C32\u0C41\u0C17\u0C41`, tk: `T\xFCrkmen`, ur: `\u0627\u0631\u062F\u0648`, uz: `O'zbek`, cy: `Cymraeg`, xh: `isiXhosa`, yi: `\u05D9\u05D9\u05B4\u05D3\u05D9\u05E9`, yo: `Yor\xF9b\xE1`, zu: `isiZulu`, kl: `Kalaallisut`, fo: `F\xF8royskt`, ln: `Ling\xE1la`, mi: `M\u0101ori`, mr: `\u092E\u0930\u093E\u0920\u0940`, my: `\u1019\u103C\u1014\u103A\u1019\u102C`, se: `S\xE1megiella`, ug: `\u0626\u06C7\u064A\u063A\u06C7\u0631\u0686\u06D5`, qu: `Runa Simi`, aa: `Afar`, ab: `\u0410\u04A7\u0441\u0443\u0430`, ae: `Avestan`, ak: `Akan`, an: `Aragon\xE9s`, as: `\u0985\u09B8\u09AE\u09C0\u09AF\u09BC\u09BE`, av: `\u0410\u0432\u0430\u0440`, ay: `Aymar aru`, ba: `\u0411\u0430\u0448\u04A1\u043E\u0440\u0442\u0441\u0430`, bh: `\u092D\u094B\u091C\u092A\u0941\u0930\u0940`, bi: `Bislama`, bm: `Bamanankan`, bo: `\u0F56\u0F7C\u0F51\u0F0B\u0F66\u0F90\u0F51\u0F0B`, br: `Brezhoneg`, ce: `\u041D\u043E\u0445\u0447\u0438\u0439\u043D`, ch: `Chamoru`, cr: `\u14C0\u1426\u1403\u152D\u140D\u140F\u1423`, cu: `\u0426\u0440\u044C\u043A\u044A\u0432\u044C\u043D\u043E\u0441\u043B\u043E\u0432\u0463\u043D\u044C\u0441\u043A\u044A`, cv: `\u0427\u04D1\u0432\u0430\u0448\u043B\u0430`, dv: `\u078B\u07A8\u0788\u07AC\u0780\u07A8\u0784\u07A6\u0790\u07B0`, dz: `\u0F62\u0FAB\u0F7C\u0F44\u0F0B\u0F41`, ee: `E\u028Begbe`, eo: `Esperanto`, ff: `Fulah`, fy: `Frysk`, gd: `G\xE0idhlig`, gn: `Ava\xF1e'\u1EBD`, gv: `Gaelg`, ho: `Hiri Motu`, hz: `Otjiherero`, ia: `Interlingua`, ie: `Interlingue`, ii: `\uA188\uA320\uA259`, ik: `I\xF1upiaq`, io: `Ido`, iu: `\u1403\u14C4\u1483\u144E\u1450\u1466`, jv: `Basa Jawa`, ki: `Gikuyu`, kr: `Kanuri`, ks: `\u06A9\u0672\u0634\u064F\u0631`, kw: `Kernewek`, lg: `Luganda`, li: `Limburgs`, lu: `Tshiluba`, mh: `Kajin M\u0327aje\u013C`, na: `Dorerin Naoero`, nb: `Norsk Bokm\xE5l`, nd: `isiNdebele`, ng: `Oshiwambo`, nn: `Norsk Nynorsk`, nr: `isiNdebele (South)`, nv: `Din\xE9 Bizaad`, oc: `Occitan`, oj: `Anishinaabemowin`, om: `Afaan Oromoo`, or: `\u0B13\u0B21\u0B3C\u0B3F\u0B06`, os: `\u0418\u0440\u043E\u043D`, pa: `\u0A2A\u0A70\u0A1C\u0A3E\u0A2C\u0A40`, pi: `\u{11005}\u{1102F}\u{11022}`, rm: `Rumantsch`, rn: `Ikirundi`, rw: `Kinyarwanda`, sa: `\u0938\u0902\u0938\u094D\u0915\u0943\u0924\u092E\u094D`, sc: `Sardu`, sg: `S\xE4ng\xF6`, ss: `SiSwati`, st: `Sesotho`, ti: `\u1275\u130D\u122D\u129B`, tn: `Setswana`, to: `Faka Tonga`, ts: `Xitsonga`, tt: `\u0422\u0430\u0442\u0430\u0440\u0447\u0430`, tw: `Twi`, ty: `Reo Tahiti`, ve: `Tshiven\u1E13a`, vo: `Volap\xFCk`, wa: `Walon`, wo: `Wolof`, za: `Sa\u026F cue\u014B\u0185` };
1271
- var Oi = (e5, t2) => {
1269
+ })(Oi ||= {});
1270
+ var ki = { cs: `\u010Ce\u0161tina`, da: `Dansk`, de: `Deutsch`, en: `English`, es: `Espa\xF1ol`, fr: `Fran\xE7ais`, hi: `\u0939\u093F\u0928\u094D\u0926\u0940`, id: `Bahasa Indonesia`, it: `Italiano`, ja: `\u65E5\u672C\u8A9E`, ko: `\uD55C\uAD6D\uC5B4`, nl: `Nederlands`, no: `Norsk`, pl: `Polski`, pt: `Portugu\xEAs`, ru: `\u0420\u0443\u0441\u0441\u043A\u0438\u0439`, sv: `Svenska`, th: `\u0E44\u0E17\u0E22`, tr: `T\xFCrk\xE7e`, uk: `\u0423\u043A\u0440\u0430\u0457\u043D\u0441\u044C\u043A\u0430`, vi: `Ti\u1EBFng Vi\u1EC7t`, zh: `\u7E41\u9AD4\u4E2D\u6587`, sq: `Shqip`, am: `\u12A0\u121B\u122D\u129B`, ar: `\u0627\u0644\u0639\u0631\u0628\u064A\u0629`, hy: `\u0540\u0561\u0575\u0565\u0580\u0565\u0576`, az: `Az\u0259rbaycan dili`, eu: `Euskara`, be: `\u0411\u0435\u043B\u0430\u0440\u0443\u0441\u043A\u0430\u044F`, bn: `\u09AC\u09BE\u0982\u09B2\u09BE`, bs: `Bosanski`, bg: `\u0411\u044A\u043B\u0433\u0430\u0440\u0441\u043A\u0438`, ca: `Catal\xE0`, ny: `ChiChe\u0175a`, co: `Corsu`, hr: `Hrvatski`, et: `Eesti`, fj: `Vosa Vakaviti`, fi: `Suomi`, ga: `Gaeilge`, gl: `Galego`, ka: `\u10E5\u10D0\u10E0\u10D7\u10E3\u10DA\u10D8`, el: `\u0395\u03BB\u03BB\u03B7\u03BD\u03B9\u03BA\u03AC`, gu: `\u0A97\u0AC1\u0A9C\u0AB0\u0ABE\u0AA4\u0AC0`, ht: `Krey\xF2l Ayisyen`, ha: `Hausa`, he: `\u05E2\u05D1\u05E8\u05D9\u05EA`, hu: `Magyar`, is: `\xCDslenska`, ig: `Igbo`, kn: `\u0C95\u0CA8\u0CCD\u0CA8\u0CA1`, kk: `\u049A\u0430\u0437\u0430\u049B \u0442\u0456\u043B\u0456`, km: `\u1797\u17B6\u179F\u17B6\u1781\u17D2\u1798\u17C2\u179A`, ku: `Kurd\xEE`, ky: `\u041A\u044B\u0440\u0433\u044B\u0437\u0447\u0430`, lb: `L\xEBtzebuergesch`, lo: `\u0EA5\u0EB2\u0EA7`, la: `Latina`, lv: `Latvie\u0161u`, lt: `Lietuvi\u0173`, mk: `\u041C\u0430\u043A\u0435\u0434\u043E\u043D\u0441\u043A\u0438`, mg: `Malagasy`, ms: `Bahasa Melayu`, ml: `\u0D2E\u0D32\u0D2F\u0D3E\u0D33\u0D02`, mt: `Malti`, mn: `\u041C\u043E\u043D\u0433\u043E\u043B`, ne: `\u0928\u0947\u092A\u093E\u0932\u0940`, ps: `\u067E\u069A\u062A\u0648`, fa: `\u0641\u0627\u0631\u0633\u06CC`, ro: `Rom\xE2n\u0103`, sm: `Gagana Samoa`, sr: `\u0421\u0440\u043F\u0441\u043A\u0438`, sn: `Shona`, sd: `\u0633\u0646\u068C\u064A`, si: `\u0DC3\u0DD2\u0D82\u0DC4\u0DBD`, sk: `Sloven\u010Dina`, sl: `Sloven\u0161\u010Dina`, so: `Soomaaliga`, su: `Basa Sunda`, sw: `Kiswahili`, tl: `Filipino`, tg: `\u0422\u043E\u04B7\u0438\u043A\u04E3`, ta: `\u0BA4\u0BAE\u0BBF\u0BB4\u0BCD`, te: `\u0C24\u0C46\u0C32\u0C41\u0C17\u0C41`, tk: `T\xFCrkmen`, ur: `\u0627\u0631\u062F\u0648`, uz: `O'zbek`, cy: `Cymraeg`, xh: `isiXhosa`, yi: `\u05D9\u05D9\u05B4\u05D3\u05D9\u05E9`, yo: `Yor\xF9b\xE1`, zu: `isiZulu`, kl: `Kalaallisut`, fo: `F\xF8royskt`, ln: `Ling\xE1la`, mi: `M\u0101ori`, mr: `\u092E\u0930\u093E\u0920\u0940`, my: `\u1019\u103C\u1014\u103A\u1019\u102C`, se: `S\xE1megiella`, ug: `\u0626\u06C7\u064A\u063A\u06C7\u0631\u0686\u06D5`, qu: `Runa Simi`, aa: `Afar`, ab: `\u0410\u04A7\u0441\u0443\u0430`, ae: `Avestan`, ak: `Akan`, an: `Aragon\xE9s`, as: `\u0985\u09B8\u09AE\u09C0\u09AF\u09BC\u09BE`, av: `\u0410\u0432\u0430\u0440`, ay: `Aymar aru`, ba: `\u0411\u0430\u0448\u04A1\u043E\u0440\u0442\u0441\u0430`, bh: `\u092D\u094B\u091C\u092A\u0941\u0930\u0940`, bi: `Bislama`, bm: `Bamanankan`, bo: `\u0F56\u0F7C\u0F51\u0F0B\u0F66\u0F90\u0F51\u0F0B`, br: `Brezhoneg`, ce: `\u041D\u043E\u0445\u0447\u0438\u0439\u043D`, ch: `Chamoru`, cr: `\u14C0\u1426\u1403\u152D\u140D\u140F\u1423`, cu: `\u0426\u0440\u044C\u043A\u044A\u0432\u044C\u043D\u043E\u0441\u043B\u043E\u0432\u0463\u043D\u044C\u0441\u043A\u044A`, cv: `\u0427\u04D1\u0432\u0430\u0448\u043B\u0430`, dv: `\u078B\u07A8\u0788\u07AC\u0780\u07A8\u0784\u07A6\u0790\u07B0`, dz: `\u0F62\u0FAB\u0F7C\u0F44\u0F0B\u0F41`, ee: `E\u028Begbe`, eo: `Esperanto`, ff: `Fulah`, fy: `Frysk`, gd: `G\xE0idhlig`, gn: `Ava\xF1e'\u1EBD`, gv: `Gaelg`, ho: `Hiri Motu`, hz: `Otjiherero`, ia: `Interlingua`, ie: `Interlingue`, ii: `\uA188\uA320\uA259`, ik: `I\xF1upiaq`, io: `Ido`, iu: `\u1403\u14C4\u1483\u144E\u1450\u1466`, jv: `Basa Jawa`, ki: `Gikuyu`, kr: `Kanuri`, ks: `\u06A9\u0672\u0634\u064F\u0631`, kw: `Kernewek`, lg: `Luganda`, li: `Limburgs`, lu: `Tshiluba`, mh: `Kajin M\u0327aje\u013C`, na: `Dorerin Naoero`, nb: `Norsk Bokm\xE5l`, nd: `isiNdebele`, ng: `Oshiwambo`, nn: `Norsk Nynorsk`, nr: `isiNdebele (South)`, nv: `Din\xE9 Bizaad`, oc: `Occitan`, oj: `Anishinaabemowin`, om: `Afaan Oromoo`, or: `\u0B13\u0B21\u0B3C\u0B3F\u0B06`, os: `\u0418\u0440\u043E\u043D`, pa: `\u0A2A\u0A70\u0A1C\u0A3E\u0A2C\u0A40`, pi: `\u{11005}\u{1102F}\u{11022}`, rm: `Rumantsch`, rn: `Ikirundi`, rw: `Kinyarwanda`, sa: `\u0938\u0902\u0938\u094D\u0915\u0943\u0924\u092E\u094D`, sc: `Sardu`, sg: `S\xE4ng\xF6`, ss: `SiSwati`, st: `Sesotho`, ti: `\u1275\u130D\u122D\u129B`, tn: `Setswana`, to: `Faka Tonga`, ts: `Xitsonga`, tt: `\u0422\u0430\u0442\u0430\u0440\u0447\u0430`, tw: `Twi`, ty: `Reo Tahiti`, ve: `Tshiven\u1E13a`, vo: `Volap\xFCk`, wa: `Walon`, wo: `Wolof`, za: `Sa\u026F cue\u014B\u0185` };
1271
+ var Ai = (e5, t2) => {
1272
1272
  e5.searchParams.set(`lang`, t2);
1273
1273
  };
1274
- var ki = (e5, t2) => {
1274
+ var ji = (e5, t2) => {
1275
1275
  let n2 = e5.hostname.split(`.`);
1276
1276
  n2[0] === `www` && (n2 = n2.slice(1)), n2 = [t2, ...n2], e5.hostname = n2.join(`.`);
1277
1277
  };
1278
- var Ai = (e5, t2) => {
1278
+ var Mi = (e5, t2) => {
1279
1279
  e5.pathname = `/${t2}${e5.pathname}`;
1280
1280
  };
1281
- var ji = (e5, t2) => {
1281
+ var Ni = (e5, t2) => {
1282
1282
  if (!t2.languageCode || !t2?.resolutionMethod) return e5;
1283
1283
  let n2 = new URL(e5);
1284
- return (t2?.resolutionMethod === `QUERY_PARAM` ? Oi : t2?.resolutionMethod === `SUBDOMAIN` ? ki : Ai)(n2, t2.languageCode), n2.href;
1284
+ return (t2?.resolutionMethod === `QUERY_PARAM` ? Ai : t2?.resolutionMethod === `SUBDOMAIN` ? ji : Mi)(n2, t2.languageCode), n2.href;
1285
1285
  };
1286
- var Mi = (e5, t2) => {
1286
+ var Pi = (e5, t2) => {
1287
1287
  if (!e5?.length) return e5;
1288
1288
  let n2;
1289
1289
  try {
@@ -1304,91 +1304,97 @@ var Mi = (e5, t2) => {
1304
1304
  }
1305
1305
  return n2.href;
1306
1306
  };
1307
- function Ni() {
1308
- let e5 = Pi();
1309
- return e5 ? Fi(e5) : [];
1307
+ function Fi() {
1308
+ let e5 = Ii();
1309
+ return e5 ? Li(e5) : [];
1310
1310
  }
1311
- function Pi() {
1311
+ function Ii() {
1312
1312
  let e5 = typeof globals < `u` ? globals?.$ns?.[`wix-window`]?.multilingual : void 0, t2 = typeof window < `u` ? window?.essentials?.multilingual : void 0;
1313
1313
  return e5 ?? t2 ?? globalThis?.__wix_site_metadata__?.multilingual;
1314
1314
  }
1315
- function Fi(e5) {
1315
+ function Li(e5) {
1316
1316
  try {
1317
1317
  if (e5?.supportedLanguages?.length) {
1318
- let t2 = e5.supportedLanguages, n2 = t2.map((e6) => e6.languageCode).filter(Boolean), r2 = e5.cleanUrl ?? zi(n2);
1319
- return t2.map((e6) => ({ id: e6.languageCode, displayName: Ii(e6), regionalFormat: [e6.locale?.languageCode, e6.locale?.country].filter(Boolean).join(`-`), url: Li(e6, r2), primary: e6.isPrimary, resolutionMethod: e6.resolutionMethod }));
1318
+ let t2 = e5.supportedLanguages, n2 = t2.map((e6) => e6.languageCode).filter(Boolean), r2 = e5.cleanUrl ?? Vi(n2);
1319
+ return t2.map((e6) => ({ id: e6.languageCode, displayName: Ri(e6), regionalFormat: [e6.locale?.languageCode, e6.locale?.country].filter(Boolean).join(`-`), url: zi(e6, r2), primary: e6.isPrimary, resolutionMethod: e6.resolutionMethod }));
1320
1320
  }
1321
1321
  if (e5?.siteLanguages?.length) {
1322
- let t2 = e5.siteLanguages, n2 = zi(t2.map((e6) => e6.languageCode).filter(Boolean));
1323
- return t2.map((e6) => ({ id: e6.languageCode, displayName: Ii(e6), regionalFormat: e6.locale, url: Li(e6, n2), primary: e6.isPrimaryLanguage, resolutionMethod: e6.resolutionMethod ? Ri(e6.resolutionMethod) : void 0 }));
1322
+ let t2 = e5.siteLanguages, n2 = Vi(t2.map((e6) => e6.languageCode).filter(Boolean));
1323
+ return t2.map((e6) => ({ id: e6.languageCode, displayName: Ri(e6), regionalFormat: e6.locale, url: zi(e6, n2), primary: e6.isPrimaryLanguage, resolutionMethod: e6.resolutionMethod ? Bi(e6.resolutionMethod) : void 0 }));
1324
1324
  }
1325
1325
  } catch (e6) {
1326
1326
  return console.warn(`[Multilingual Manager] listSupportedLanguages failed`, e6), [];
1327
1327
  }
1328
1328
  return console.warn(`[Multilingual Manager] listSupportedLanguages is not available`), [];
1329
1329
  }
1330
- function Ii(e5) {
1331
- let t2 = Di[e5.languageCode];
1330
+ function Ri(e5) {
1331
+ let t2 = ki[e5.languageCode];
1332
1332
  if (t2) return t2;
1333
1333
  let n2 = e5.name ?? e5.countryCode;
1334
1334
  if (n2) return n2;
1335
1335
  }
1336
- function Li(e5, t2) {
1336
+ function zi(e5, t2) {
1337
1337
  if (e5.url || !t2 || !e5.resolutionMethod) return e5.url;
1338
1338
  if (e5.languageCode) try {
1339
- return ji(t2, { languageCode: e5.languageCode, countryCode: e5.countryCode, resolutionMethod: Ri(e5.resolutionMethod), locale: { languageCode: e5.languageCode, country: e5.countryCode } });
1339
+ return Ni(t2, { languageCode: e5.languageCode, countryCode: e5.countryCode, resolutionMethod: Bi(e5.resolutionMethod), locale: { languageCode: e5.languageCode, country: e5.countryCode } });
1340
1340
  } catch (e6) {
1341
1341
  console.warn(`[Multilingual Manager] buildUrlForLanguage failed`, e6);
1342
1342
  return;
1343
1343
  }
1344
1344
  }
1345
- function Ri(e5) {
1345
+ function Bi(e5) {
1346
1346
  switch (e5) {
1347
1347
  case `QUERY_PARAM`:
1348
1348
  case `QueryParam`:
1349
- return B.QUERY_PARAM;
1349
+ return Oi.QUERY_PARAM;
1350
1350
  case `SUBDOMAIN`:
1351
1351
  case `Subdomain`:
1352
- return B.SUBDOMAIN;
1352
+ return Oi.SUBDOMAIN;
1353
1353
  case `SUBDIRECTORY`:
1354
1354
  case `Subdirectory`:
1355
- return B.SUBDIRECTORY;
1355
+ return Oi.SUBDIRECTORY;
1356
1356
  default:
1357
1357
  return;
1358
1358
  }
1359
1359
  }
1360
- function zi(e5) {
1360
+ function Vi(e5) {
1361
1361
  let t2 = typeof window < `u` && window.location?.href ? window.location.href : ``;
1362
1362
  try {
1363
- return Mi(t2, e5);
1363
+ return Pi(t2, e5);
1364
1364
  } catch (e6) {
1365
1365
  return console.warn(`[Multilingual Manager] cleanCurrentUrl failed`, e6), t2;
1366
1366
  }
1367
1367
  }
1368
- var Bi = `x-wix-linguist`;
1369
- var Vi = `00000000-0000-0000-0000-000000000000`;
1370
- var Hi = `false`;
1368
+ var Hi = `x-wix-currency`;
1371
1369
  var Ui = () => {
1372
- let e5 = V(`language`), t2 = V(`locale`);
1373
- if (e5) return { [Bi]: [e5, t2 || e5, Hi, Vi].join(`|`) };
1370
+ let e5 = B(`currency`);
1371
+ if (e5) return { [Hi]: e5 };
1374
1372
  };
1375
- function Wi() {
1373
+ var Wi = `x-wix-linguist`;
1374
+ var Gi = `00000000-0000-0000-0000-000000000000`;
1375
+ var Ki = `false`;
1376
+ var qi = () => {
1377
+ let e5 = B(`language`), t2 = B(`locale`);
1378
+ if (e5) return { [Wi]: [e5, t2 || e5, Ki, Gi].join(`|`) };
1379
+ };
1380
+ function Ji() {
1376
1381
  let e5 = null, t2 = null;
1377
1382
  return { promise: new Promise((n2, r2) => {
1378
1383
  e5 = n2, t2 = r2;
1379
1384
  }), resolve: e5, reject: t2 };
1380
1385
  }
1381
- var Gi = () => (typeof window < `u` ? window.commonConfig : void 0) ?? globalThis.commonConfig;
1382
- var V = (e5) => Gi()?.[e5];
1383
- var Ki = ({ createHost: e5 }) => ({ __type: `host`, create: (e6) => ({}), host: (t2) => {
1384
- let { applicationId: n2, componentId: r2 } = t2 ?? {}, i2 = typeof window < `u` ? window.wixEmbedsAPI : void 0, a2 = e5(t2), o2 = Ji();
1385
- return { ...a2, apiBaseUrl: o2, getMonitoringClient: i2?.getMonitoringClientFunction?.(n2, r2), essentials: { language: V(`language`), locale: V(`locale`), get passThroughHeaders() {
1386
- return Ui();
1386
+ var Yi = () => (typeof window < `u` ? window.commonConfig : void 0) ?? globalThis.commonConfig;
1387
+ var B = (e5) => Yi()?.[e5];
1388
+ var Xi = ({ createHost: e5 }) => ({ __type: `host`, create: (e6) => ({}), host: (t2) => {
1389
+ let { applicationId: n2, componentId: r2 } = t2 ?? {}, i2 = typeof window < `u` ? window.wixEmbedsAPI : void 0, a2 = e5(t2), o2 = Qi();
1390
+ return { ...a2, apiBaseUrl: o2, getMonitoringClient: i2?.getMonitoringClientFunction?.(n2, r2), essentials: { language: B(`language`), locale: B(`locale`), get passThroughHeaders() {
1391
+ let e6 = { ...qi(), ...Ui() };
1392
+ return Object.keys(e6).length > 0 ? e6 : void 0;
1387
1393
  } } };
1388
1394
  }, auth: (e6) => {
1389
1395
  let t2 = typeof window < `u` ? window.wixEmbedsAPI : void 0;
1390
- !e6 && qi() && (e6 = t2?.getAccessTokenFunction?.());
1391
- let n2 = false, { resolve: r2, promise: i2 } = Wi();
1396
+ !e6 && Zi() && (e6 = t2?.getAccessTokenFunction?.());
1397
+ let n2 = false, { resolve: r2, promise: i2 } = Ji();
1392
1398
  return { getAuthHeaders: async () => {
1393
1399
  if (!e6 && n2 && (e6 = await i2), !e6) throw Error(`Failed to resolve auth token`);
1394
1400
  return { headers: { Authorization: await e6() } };
@@ -1396,102 +1402,102 @@ var Ki = ({ createHost: e5 }) => ({ __type: `host`, create: (e6) => ({}), host:
1396
1402
  r2(e7);
1397
1403
  }) };
1398
1404
  } });
1399
- function qi() {
1405
+ function Zi() {
1400
1406
  return typeof document < `u` && document.currentScript?.tagName === `SCRIPT`;
1401
1407
  }
1402
- function Ji() {
1408
+ function Qi() {
1403
1409
  let e5 = (typeof window < `u` ? window.wixEmbedsAPI : void 0)?.getExternalBaseUrl?.();
1404
1410
  if (!e5) return;
1405
1411
  let t2 = new URL(e5);
1406
1412
  return t2?.pathname && t2.pathname !== `/` ? `${t2.hostname}${t2.pathname}` : t2.hostname;
1407
1413
  }
1408
- var Yi = ({ clientSdk: e5, applicationId: t2 }) => ({ invoke: async ({ namespace: n2, method: r2, args: i2 }) => {
1414
+ var $i = ({ clientSdk: e5, applicationId: t2 }) => ({ invoke: async ({ namespace: n2, method: r2, args: i2 }) => {
1409
1415
  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`);
1410
1416
  return e5.invoke({ namespace: n2, method: r2, args: i2, applicationId: t2, accessToken: `accessToken` });
1411
1417
  }, getAccessToken: () => {
1412
1418
  throw Error(`Not implemented`);
1413
1419
  }, observeState: () => ({ disconnect: () => {
1414
1420
  } }) });
1415
- var Xi = Ki({ createHost: function(e5) {
1421
+ var ea = Xi({ createHost: function(e5) {
1416
1422
  let t2 = (typeof $wixContext < `u` ? $wixContext.clientSdk : void 0) ?? e5?.clientSdk ?? (typeof window < `u` ? window?.clientSdk : void 0), { applicationId: n2 } = e5 || {};
1417
1423
  if (!n2) throw Error(`"createHost" was called without a required field "applicationId"`);
1418
- return { channel: Yi({ clientSdk: t2, applicationId: n2 }), close: () => {
1424
+ return { channel: $i({ clientSdk: t2, applicationId: n2 }), close: () => {
1419
1425
  } };
1420
1426
  } });
1421
- var Zi = (e5, t2) => {
1422
- let n2 = Xi.host({ applicationId: e5, componentId: t2 }), r2 = Xi.auth();
1423
- return Ue({ auth: r2, host: n2 }).enableContext(`module`), r2.getAccessTokenInjector();
1427
+ var ta = (e5, t2) => {
1428
+ let n2 = ea.host({ applicationId: e5, componentId: t2 }), r2 = ea.auth();
1429
+ return We({ auth: r2, host: n2 }).enableContext(`module`), r2.getAccessTokenInjector();
1424
1430
  };
1425
- var Qi = (e5) => Zi(`13d21c63-b5ec-5912-8397-c3a5ddb27a97`, e5);
1426
- function H(e5, t2) {
1431
+ var na = (e5) => ta(`13d21c63-b5ec-5912-8397-c3a5ddb27a97`, e5);
1432
+ function V(e5, t2) {
1427
1433
  for (let n2 of e5) {
1428
1434
  let e6 = n2.addOns.find((e7) => e7.addOnId === t2);
1429
1435
  if (e6) return { group: n2, addOn: e6 };
1430
1436
  }
1431
1437
  return null;
1432
1438
  }
1433
- function $i(e5, t2) {
1434
- return H(e5, t2)?.addOn ?? null;
1439
+ function ra(e5, t2) {
1440
+ return V(e5, t2)?.addOn ?? null;
1435
1441
  }
1436
- function U(e5, t2) {
1437
- return t2.filter((t3) => H(e5, t3.id) !== null);
1442
+ function H(e5, t2) {
1443
+ return t2.filter((t3) => V(e5, t3.id) !== null);
1438
1444
  }
1439
- function ea(e5, t2, n2) {
1440
- return n2.filter((n3) => H(e5, n3.id)?.group === t2).length;
1445
+ function ia(e5, t2, n2) {
1446
+ return n2.filter((n3) => V(e5, n3.id)?.group === t2).length;
1441
1447
  }
1442
- function ta(e5, t2) {
1448
+ function aa(e5, t2) {
1443
1449
  return !e5.maxNumberOfAddOns || t2 < e5.maxNumberOfAddOns;
1444
1450
  }
1445
- function na(e5, t2) {
1451
+ function oa(e5, t2) {
1446
1452
  return e5.map((n2) => {
1447
- let r2 = ea(e5, n2, t2);
1453
+ let r2 = ia(e5, n2, t2);
1448
1454
  return { ...n2, addOns: n2.addOns.map((e6) => {
1449
1455
  let n3 = t2.find((t3) => t3.id === e6.addOnId)?.quantity ?? 0;
1450
1456
  return { ...e6, isSelected: n3 > 0, selectedQuantity: n3 };
1451
- }), selectedCount: r2, canSelectMore: ta(n2, r2) };
1457
+ }), selectedCount: r2, canSelectMore: aa(n2, r2) };
1452
1458
  });
1453
1459
  }
1454
- function ra(e5, t2, n2) {
1455
- let r2 = H(e5, n2);
1456
- return r2 ? t2.some((e6) => e6.id === n2) ? true : ta(r2.group, ea(e5, r2.group, t2)) : false;
1460
+ function sa(e5, t2, n2) {
1461
+ let r2 = V(e5, n2);
1462
+ return r2 ? t2.some((e6) => e6.id === n2) ? true : aa(r2.group, ia(e5, r2.group, t2)) : false;
1457
1463
  }
1458
- function ia(e5, t2) {
1464
+ function ca(e5, t2) {
1459
1465
  let n2 = e5.maxQuantity ?? 1;
1460
1466
  return Number.isFinite(t2) ? Math.min(Math.max(Math.trunc(t2), 0), n2) : 0;
1461
1467
  }
1462
- var aa = { category: `category`, location: `location`, page: `page`, blob: `b`, resource: `resource`, referral: `referral`, timezone: `timezone`, bookingId: `bookingId`, token: `token`, rescheduleRedirectUrl: `rescheduleRedirectUrl` };
1463
- function W(e5) {
1468
+ var la = { category: `category`, location: `location`, page: `page`, blob: `bookingSelection`, legacyBlob: `b`, resource: `resource`, referral: `referral`, timezone: `timezone`, bookingId: `bookingId`, token: `token`, rescheduleRedirectUrl: `rescheduleRedirectUrl` };
1469
+ function U(e5) {
1464
1470
  return e5.addOns ?? [];
1465
1471
  }
1466
- function oa(e5, t2) {
1472
+ function ua(e5, t2) {
1467
1473
  let n2 = { ...e5 };
1468
1474
  return t2.length ? n2.addOns = t2 : delete n2.addOns, n2;
1469
1475
  }
1470
- function sa(e5, t2) {
1471
- let n2 = W(e5);
1472
- return oa(e5, n2.some((e6) => e6.id === t2) ? n2.filter((e6) => e6.id !== t2) : [...n2, { id: t2, quantity: 1 }]);
1476
+ function da(e5, t2) {
1477
+ let n2 = U(e5);
1478
+ return ua(e5, n2.some((e6) => e6.id === t2) ? n2.filter((e6) => e6.id !== t2) : [...n2, { id: t2, quantity: 1 }]);
1473
1479
  }
1474
- function ca(e5, t2, n2) {
1475
- let r2 = W(e5);
1476
- return n2 <= 0 ? oa(e5, r2.filter((e6) => e6.id !== t2)) : oa(e5, r2.some((e6) => e6.id === t2) ? r2.map((e6) => e6.id === t2 ? { ...e6, quantity: n2 } : e6) : [...r2, { id: t2, quantity: n2 }]);
1480
+ function fa(e5, t2, n2) {
1481
+ let r2 = U(e5);
1482
+ return n2 <= 0 ? ua(e5, r2.filter((e6) => e6.id !== t2)) : ua(e5, r2.some((e6) => e6.id === t2) ? r2.map((e6) => e6.id === t2 ? { ...e6, quantity: n2 } : e6) : [...r2, { id: t2, quantity: n2 }]);
1477
1483
  }
1478
- function la() {
1484
+ function pa() {
1479
1485
  let e5 = typeof $wixContext < `u` && $wixContext.initWixModules ? $wixContext.initWixModules : globalThis.__wix_context__ !== void 0 && globalThis.__wix_context__.initWixModules ? globalThis.__wix_context__.initWixModules : void 0;
1480
1486
  if (e5) return { initWixModules(t3, n3) {
1481
- return ua(() => e5(t3, n3));
1487
+ return ma(() => e5(t3, n3));
1482
1488
  }, fetchWithAuth() {
1483
1489
  throw Error(`fetchWithAuth is not available in this context`);
1484
1490
  }, graphql() {
1485
1491
  throw Error(`graphql is not available in this context`);
1486
1492
  } };
1487
- let t2 = typeof $wixContext < `u` ? $wixContext.client : p.client === void 0 ? globalThis.__wix_context__ === void 0 ? void 0 : globalThis.__wix_context__.client : p.client, n2 = typeof $wixContext < `u` ? $wixContext.elevatedClient : p.elevatedClient === void 0 ? globalThis.__wix_context__ === void 0 ? void 0 : globalThis.__wix_context__.elevatedClient : p.elevatedClient;
1493
+ let t2 = typeof $wixContext < `u` ? $wixContext.client : m.client === void 0 ? globalThis.__wix_context__ === void 0 ? void 0 : globalThis.__wix_context__.client : m.client, n2 = typeof $wixContext < `u` ? $wixContext.elevatedClient : m.elevatedClient === void 0 ? globalThis.__wix_context__ === void 0 ? void 0 : globalThis.__wix_context__.elevatedClient : m.elevatedClient;
1488
1494
  if (t2 || n2) return { initWixModules(e6, r2) {
1489
1495
  if (r2) {
1490
1496
  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`);
1491
- return ua(() => n2.use(e6));
1497
+ return ma(() => n2.use(e6));
1492
1498
  }
1493
1499
  if (!t2) throw Error(`Wix context is not available. Make sure to initialize the Wix context before using SDK modules`);
1494
- return ua(() => t2.use(e6));
1500
+ return ma(() => t2.use(e6));
1495
1501
  }, fetchWithAuth: (e6, n3) => {
1496
1502
  if (!t2) throw Error(`Wix context is not available. Make sure to initialize the Wix context before using SDK modules`);
1497
1503
  return t2.fetchWithAuth(e6, n3);
@@ -1503,80 +1509,80 @@ function la() {
1503
1509
  return t2.graphql(e6, n3, r2);
1504
1510
  } };
1505
1511
  }
1506
- function ua(e5) {
1507
- let t2 = globalThis.__wix_context__, n2 = { client: p.client, elevatedClient: p.elevatedClient }, r2;
1508
- 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);
1512
+ function ma(e5) {
1513
+ let t2 = globalThis.__wix_context__, n2 = { client: m.client, elevatedClient: m.elevatedClient }, r2;
1514
+ globalThis.__wix_context__ = void 0, m.client = void 0, m.elevatedClient = void 0, typeof $wixContext < `u` && (r2 = { client: $wixContext?.client, elevatedClient: $wixContext?.elevatedClient }, delete $wixContext.client, delete $wixContext.elevatedClient);
1509
1515
  try {
1510
1516
  return e5();
1511
1517
  } finally {
1512
- globalThis.__wix_context__ = t2, p.client = n2.client, p.elevatedClient = n2.elevatedClient, typeof $wixContext < `u` && ($wixContext.client = r2.client, $wixContext.elevatedClient = r2.elevatedClient);
1518
+ globalThis.__wix_context__ = t2, m.client = n2.client, m.elevatedClient = n2.elevatedClient, typeof $wixContext < `u` && ($wixContext.client = r2.client, $wixContext.elevatedClient = r2.elevatedClient);
1513
1519
  }
1514
1520
  }
1515
- function da(e5, t2) {
1521
+ function ha(e5, t2) {
1516
1522
  return { ...e5, ...Object.fromEntries(t2.map((t3) => [t3, (...n2) => {
1517
- let r2 = la();
1523
+ let r2 = pa();
1518
1524
  if (!r2) throw Error(`Wix context is not available. Make sure to initialize the Wix context before using SDK modules`);
1519
1525
  return r2.initWixModules(e5)[t3].apply(void 0, n2);
1520
1526
  }])) };
1521
1527
  }
1522
- function fa(e5) {
1523
- return da({ __type: `host`, create: (t2) => Object.entries(e5).reduce((e6, [n2, r2]) => ({ ...e6, [n2]: r2(t2) }), {}) }, Object.keys(e5));
1528
+ function ga(e5) {
1529
+ return ha({ __type: `host`, create: (t2) => Object.entries(e5).reduce((e6, [n2, r2]) => ({ ...e6, [n2]: r2(t2) }), {}) }, Object.keys(e5));
1524
1530
  }
1525
- var G = (e5) => typeof e5 == `string`;
1526
- var K = () => {
1531
+ var W = (e5) => typeof e5 == `string`;
1532
+ var G = () => {
1527
1533
  let e5, t2, n2 = new Promise((n3, r2) => {
1528
1534
  e5 = n3, t2 = r2;
1529
1535
  });
1530
1536
  return n2.resolve = e5, n2.reject = t2, n2;
1531
1537
  };
1532
- var pa = (e5) => e5 == null ? `` : `` + e5;
1533
- var ma = (e5, t2, n2) => {
1538
+ var _a = (e5) => e5 == null ? `` : `` + e5;
1539
+ var va = (e5, t2, n2) => {
1534
1540
  e5.forEach((e6) => {
1535
1541
  t2[e6] && (n2[e6] = t2[e6]);
1536
1542
  });
1537
1543
  };
1538
- var ha = /###/g;
1539
- var ga = (e5) => e5 && e5.indexOf(`###`) > -1 ? e5.replace(ha, `.`) : e5;
1540
- var _a = (e5) => !e5 || G(e5);
1541
- var q = (e5, t2, n2) => {
1542
- let r2 = G(t2) ? t2.split(`.`) : t2, i2 = 0;
1544
+ var ya = /###/g;
1545
+ var ba = (e5) => e5 && e5.indexOf(`###`) > -1 ? e5.replace(ya, `.`) : e5;
1546
+ var xa = (e5) => !e5 || W(e5);
1547
+ var K = (e5, t2, n2) => {
1548
+ let r2 = W(t2) ? t2.split(`.`) : t2, i2 = 0;
1543
1549
  for (; i2 < r2.length - 1; ) {
1544
- if (_a(e5)) return {};
1545
- let t3 = ga(r2[i2]);
1550
+ if (xa(e5)) return {};
1551
+ let t3 = ba(r2[i2]);
1546
1552
  !e5[t3] && n2 && (e5[t3] = new n2()), e5 = Object.prototype.hasOwnProperty.call(e5, t3) ? e5[t3] : {}, ++i2;
1547
1553
  }
1548
- return _a(e5) ? {} : { obj: e5, k: ga(r2[i2]) };
1554
+ return xa(e5) ? {} : { obj: e5, k: ba(r2[i2]) };
1549
1555
  };
1550
- var va = (e5, t2, n2) => {
1551
- let { obj: r2, k: i2 } = q(e5, t2, Object);
1556
+ var Sa = (e5, t2, n2) => {
1557
+ let { obj: r2, k: i2 } = K(e5, t2, Object);
1552
1558
  if (r2 !== void 0 || t2.length === 1) {
1553
1559
  r2[i2] = n2;
1554
1560
  return;
1555
1561
  }
1556
- let a2 = t2[t2.length - 1], o2 = t2.slice(0, t2.length - 1), s2 = q(e5, o2, Object);
1557
- for (; s2.obj === void 0 && o2.length; ) a2 = `${o2[o2.length - 1]}.${a2}`, o2 = o2.slice(0, o2.length - 1), s2 = q(e5, o2, Object), s2?.obj && s2.obj[`${s2.k}.${a2}`] !== void 0 && (s2.obj = void 0);
1562
+ let a2 = t2[t2.length - 1], o2 = t2.slice(0, t2.length - 1), s2 = K(e5, o2, Object);
1563
+ for (; s2.obj === void 0 && o2.length; ) a2 = `${o2[o2.length - 1]}.${a2}`, o2 = o2.slice(0, o2.length - 1), s2 = K(e5, o2, Object), s2?.obj && s2.obj[`${s2.k}.${a2}`] !== void 0 && (s2.obj = void 0);
1558
1564
  s2.obj[`${s2.k}.${a2}`] = n2;
1559
1565
  };
1560
- var ya = (e5, t2, n2, r2) => {
1561
- let { obj: i2, k: a2 } = q(e5, t2, Object);
1566
+ var Ca = (e5, t2, n2, r2) => {
1567
+ let { obj: i2, k: a2 } = K(e5, t2, Object);
1562
1568
  i2[a2] = i2[a2] || [], i2[a2].push(n2);
1563
1569
  };
1564
- var ba = (e5, t2) => {
1565
- let { obj: n2, k: r2 } = q(e5, t2);
1570
+ var q = (e5, t2) => {
1571
+ let { obj: n2, k: r2 } = K(e5, t2);
1566
1572
  if (n2 && Object.prototype.hasOwnProperty.call(n2, r2)) return n2[r2];
1567
1573
  };
1568
- var xa = (e5, t2, n2) => {
1569
- let r2 = ba(e5, n2);
1570
- return r2 === void 0 ? ba(t2, n2) : r2;
1574
+ var wa = (e5, t2, n2) => {
1575
+ let r2 = q(e5, n2);
1576
+ return r2 === void 0 ? q(t2, n2) : r2;
1571
1577
  };
1572
- var Sa = (e5, t2, n2) => {
1573
- for (let r2 in t2) r2 !== `__proto__` && r2 !== `constructor` && (r2 in e5 ? G(e5[r2]) || e5[r2] instanceof String || G(t2[r2]) || t2[r2] instanceof String ? n2 && (e5[r2] = t2[r2]) : Sa(e5[r2], t2[r2], n2) : e5[r2] = t2[r2]);
1578
+ var Ta = (e5, t2, n2) => {
1579
+ for (let r2 in t2) r2 !== `__proto__` && r2 !== `constructor` && (r2 in e5 ? W(e5[r2]) || e5[r2] instanceof String || W(t2[r2]) || t2[r2] instanceof String ? n2 && (e5[r2] = t2[r2]) : Ta(e5[r2], t2[r2], n2) : e5[r2] = t2[r2]);
1574
1580
  return e5;
1575
1581
  };
1576
1582
  var J = (e5) => e5.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, `\\$&`);
1577
- var Ca = { "&": `&amp;`, "<": `&lt;`, ">": `&gt;`, '"': `&quot;`, "'": `&#39;`, "/": `&#x2F;` };
1578
- var wa = (e5) => G(e5) ? e5.replace(/[&<>"'\/]/g, (e6) => Ca[e6]) : e5;
1579
- var Ta = class {
1583
+ var Ea = { "&": `&amp;`, "<": `&lt;`, ">": `&gt;`, '"': `&quot;`, "'": `&#39;`, "/": `&#x2F;` };
1584
+ var Da = (e5) => W(e5) ? e5.replace(/[&<>"'\/]/g, (e6) => Ea[e6]) : e5;
1585
+ var Oa = class {
1580
1586
  constructor(e5) {
1581
1587
  this.capacity = e5, this.regExpMap = /* @__PURE__ */ new Map(), this.regExpQueue = [];
1582
1588
  }
@@ -1587,20 +1593,20 @@ var Ta = class {
1587
1593
  return this.regExpQueue.length === this.capacity && this.regExpMap.delete(this.regExpQueue.shift()), this.regExpMap.set(e5, n2), this.regExpQueue.push(e5), n2;
1588
1594
  }
1589
1595
  };
1590
- var Ea = [` `, `,`, `?`, `!`, `;`];
1591
- var Da = new Ta(20);
1592
- var Oa = (e5, t2, n2) => {
1596
+ var ka = [` `, `,`, `?`, `!`, `;`];
1597
+ var Aa = new Oa(20);
1598
+ var ja = (e5, t2, n2) => {
1593
1599
  t2 ||= ``, n2 ||= ``;
1594
- let r2 = Ea.filter((e6) => t2.indexOf(e6) < 0 && n2.indexOf(e6) < 0);
1600
+ let r2 = ka.filter((e6) => t2.indexOf(e6) < 0 && n2.indexOf(e6) < 0);
1595
1601
  if (r2.length === 0) return true;
1596
- let i2 = Da.getRegExp(`(${r2.map((e6) => e6 === `?` ? `\\?` : e6).join(`|`)})`), a2 = !i2.test(e5);
1602
+ let i2 = Aa.getRegExp(`(${r2.map((e6) => e6 === `?` ? `\\?` : e6).join(`|`)})`), a2 = !i2.test(e5);
1597
1603
  if (!a2) {
1598
1604
  let t3 = e5.indexOf(n2);
1599
1605
  t3 > 0 && !i2.test(e5.substring(0, t3)) && (a2 = true);
1600
1606
  }
1601
1607
  return a2;
1602
1608
  };
1603
- var ka = (e5, t2, n2 = `.`) => {
1609
+ var Ma = (e5, t2, n2 = `.`) => {
1604
1610
  if (!e5) return;
1605
1611
  if (e5[t2]) return Object.prototype.hasOwnProperty.call(e5, t2) ? e5[t2] : void 0;
1606
1612
  let r2 = t2.split(n2), i2 = e5;
@@ -1617,7 +1623,7 @@ var ka = (e5, t2, n2 = `.`) => {
1617
1623
  return i2;
1618
1624
  };
1619
1625
  var Y = (e5) => e5?.replace(/_/g, `-`);
1620
- var Aa = { type: `logger`, log(e5) {
1626
+ var Na = { type: `logger`, log(e5) {
1621
1627
  this.output(`log`, e5);
1622
1628
  }, warn(e5) {
1623
1629
  this.output(`warn`, e5);
@@ -1631,7 +1637,7 @@ var X = new class e2 {
1631
1637
  this.init(e5, t2);
1632
1638
  }
1633
1639
  init(e5, t2 = {}) {
1634
- this.prefix = t2.prefix || `i18next:`, this.logger = e5 || Aa, this.options = t2, this.debug = t2.debug;
1640
+ this.prefix = t2.prefix || `i18next:`, this.logger = e5 || Na, this.options = t2, this.debug = t2.debug;
1635
1641
  }
1636
1642
  log(...e5) {
1637
1643
  return this.forward(e5, `log`, ``, true);
@@ -1646,7 +1652,7 @@ var X = new class e2 {
1646
1652
  return this.forward(e5, `warn`, `WARNING DEPRECATED: `, true);
1647
1653
  }
1648
1654
  forward(e5, t2, n2, r2) {
1649
- return r2 && !this.debug ? null : (G(e5[0]) && (e5[0] = `${n2}${this.prefix} ${e5[0]}`), this.logger[t2](e5));
1655
+ return r2 && !this.debug ? null : (W(e5[0]) && (e5[0] = `${n2}${this.prefix} ${e5[0]}`), this.logger[t2](e5));
1650
1656
  }
1651
1657
  create(t2) {
1652
1658
  return new e2(this.logger, { prefix: `${this.prefix}:${t2}:`, ...this.options });
@@ -1655,7 +1661,7 @@ var X = new class e2 {
1655
1661
  return t2 ||= this.options, t2.prefix = t2.prefix || this.prefix, new e2(this.logger, t2);
1656
1662
  }
1657
1663
  }();
1658
- var ja = class {
1664
+ var Pa = class {
1659
1665
  constructor() {
1660
1666
  this.observers = {};
1661
1667
  }
@@ -1683,7 +1689,7 @@ var ja = class {
1683
1689
  });
1684
1690
  }
1685
1691
  };
1686
- var Ma = class extends ja {
1692
+ var Fa = class extends Pa {
1687
1693
  constructor(e5, t2 = { ns: [`translation`], defaultNS: `translation` }) {
1688
1694
  super(), this.data = e5 || {}, this.options = t2, this.options.keySeparator === void 0 && (this.options.keySeparator = `.`), this.options.ignoreJSONStructure === void 0 && (this.options.ignoreJSONStructure = true);
1689
1695
  }
@@ -1696,23 +1702,23 @@ var Ma = class extends ja {
1696
1702
  }
1697
1703
  getResource(e5, t2, n2, r2 = {}) {
1698
1704
  let i2 = r2.keySeparator === void 0 ? this.options.keySeparator : r2.keySeparator, a2 = r2.ignoreJSONStructure === void 0 ? this.options.ignoreJSONStructure : r2.ignoreJSONStructure, o2;
1699
- e5.indexOf(`.`) > -1 ? o2 = e5.split(`.`) : (o2 = [e5, t2], n2 && (Array.isArray(n2) ? o2.push(...n2) : G(n2) && i2 ? o2.push(...n2.split(i2)) : o2.push(n2)));
1700
- let s2 = ba(this.data, o2);
1701
- return !s2 && !t2 && !n2 && e5.indexOf(`.`) > -1 && (e5 = o2[0], t2 = o2[1], n2 = o2.slice(2).join(`.`)), s2 || !a2 || !G(n2) ? s2 : ka(this.data?.[e5]?.[t2], n2, i2);
1705
+ e5.indexOf(`.`) > -1 ? o2 = e5.split(`.`) : (o2 = [e5, t2], n2 && (Array.isArray(n2) ? o2.push(...n2) : W(n2) && i2 ? o2.push(...n2.split(i2)) : o2.push(n2)));
1706
+ let s2 = q(this.data, o2);
1707
+ return !s2 && !t2 && !n2 && e5.indexOf(`.`) > -1 && (e5 = o2[0], t2 = o2[1], n2 = o2.slice(2).join(`.`)), s2 || !a2 || !W(n2) ? s2 : Ma(this.data?.[e5]?.[t2], n2, i2);
1702
1708
  }
1703
1709
  addResource(e5, t2, n2, r2, i2 = { silent: false }) {
1704
1710
  let a2 = i2.keySeparator === void 0 ? this.options.keySeparator : i2.keySeparator, o2 = [e5, t2];
1705
- n2 && (o2 = o2.concat(a2 ? n2.split(a2) : n2)), e5.indexOf(`.`) > -1 && (o2 = e5.split(`.`), r2 = t2, t2 = o2[1]), this.addNamespaces(t2), va(this.data, o2, r2), i2.silent || this.emit(`added`, e5, t2, n2, r2);
1711
+ n2 && (o2 = o2.concat(a2 ? n2.split(a2) : n2)), e5.indexOf(`.`) > -1 && (o2 = e5.split(`.`), r2 = t2, t2 = o2[1]), this.addNamespaces(t2), Sa(this.data, o2, r2), i2.silent || this.emit(`added`, e5, t2, n2, r2);
1706
1712
  }
1707
1713
  addResources(e5, t2, n2, r2 = { silent: false }) {
1708
- for (let r3 in n2) (G(n2[r3]) || Array.isArray(n2[r3])) && this.addResource(e5, t2, r3, n2[r3], { silent: true });
1714
+ for (let r3 in n2) (W(n2[r3]) || Array.isArray(n2[r3])) && this.addResource(e5, t2, r3, n2[r3], { silent: true });
1709
1715
  r2.silent || this.emit(`added`, e5, t2, n2);
1710
1716
  }
1711
1717
  addResourceBundle(e5, t2, n2, r2, i2, a2 = { silent: false, skipCopy: false }) {
1712
1718
  let o2 = [e5, t2];
1713
1719
  e5.indexOf(`.`) > -1 && (o2 = e5.split(`.`), r2 = n2, n2 = t2, t2 = o2[1]), this.addNamespaces(t2);
1714
- let s2 = ba(this.data, o2) || {};
1715
- a2.skipCopy || (n2 = JSON.parse(JSON.stringify(n2))), r2 ? Sa(s2, n2, i2) : s2 = { ...s2, ...n2 }, va(this.data, o2, s2), a2.silent || this.emit(`added`, e5, t2, n2);
1720
+ let s2 = q(this.data, o2) || {};
1721
+ a2.skipCopy || (n2 = JSON.parse(JSON.stringify(n2))), r2 ? Ta(s2, n2, i2) : s2 = { ...s2, ...n2 }, Sa(this.data, o2, s2), a2.silent || this.emit(`added`, e5, t2, n2);
1716
1722
  }
1717
1723
  removeResourceBundle(e5, t2) {
1718
1724
  this.hasResourceBundle(e5, t2) && delete this.data[e5][t2], this.removeNamespaces(t2), this.emit(`removed`, e5, t2);
@@ -1734,31 +1740,31 @@ var Ma = class extends ja {
1734
1740
  return this.data;
1735
1741
  }
1736
1742
  };
1737
- var Na = { processors: {}, addPostProcessor(e5) {
1743
+ var Ia = { processors: {}, addPostProcessor(e5) {
1738
1744
  this.processors[e5.name] = e5;
1739
1745
  }, handle(e5, t2, n2, r2, i2) {
1740
1746
  return e5.forEach((e6) => {
1741
1747
  t2 = this.processors[e6]?.process(t2, n2, r2, i2) ?? t2;
1742
1748
  }), t2;
1743
1749
  } };
1744
- var Pa = Symbol(`i18next/PATH_KEY`);
1745
- function Fa() {
1750
+ var La = Symbol(`i18next/PATH_KEY`);
1751
+ function Ra() {
1746
1752
  let e5 = [], t2 = /* @__PURE__ */ Object.create(null), n2;
1747
- return t2.get = (r2, i2) => (n2?.revoke?.(), i2 === Pa ? e5 : (e5.push(i2), n2 = Proxy.revocable(r2, t2), n2.proxy)), Proxy.revocable(/* @__PURE__ */ Object.create(null), t2).proxy;
1753
+ return t2.get = (r2, i2) => (n2?.revoke?.(), i2 === La ? e5 : (e5.push(i2), n2 = Proxy.revocable(r2, t2), n2.proxy)), Proxy.revocable(/* @__PURE__ */ Object.create(null), t2).proxy;
1748
1754
  }
1749
1755
  function Z(e5, t2) {
1750
- let { [Pa]: n2 } = e5(Fa()), r2 = t2?.keySeparator ?? `.`, i2 = t2?.nsSeparator ?? `:`;
1756
+ let { [La]: n2 } = e5(Ra()), r2 = t2?.keySeparator ?? `.`, i2 = t2?.nsSeparator ?? `:`;
1751
1757
  if (n2.length > 1 && i2) {
1752
1758
  let e6 = t2?.ns, a2 = Array.isArray(e6) ? e6 : null;
1753
1759
  if (a2 && a2.length > 1 && a2.slice(1).includes(n2[0])) return `${n2[0]}${i2}${n2.slice(1).join(r2)}`;
1754
1760
  }
1755
1761
  return n2.join(r2);
1756
1762
  }
1757
- var Ia = {};
1758
- var La = (e5) => !G(e5) && typeof e5 != `boolean` && typeof e5 != `number`;
1759
- var Ra = class e3 extends ja {
1763
+ var za = {};
1764
+ var Ba = (e5) => !W(e5) && typeof e5 != `boolean` && typeof e5 != `number`;
1765
+ var Va = class e3 extends Pa {
1760
1766
  constructor(e5, t2 = {}) {
1761
- super(), ma([`resourceStore`, `languageUtils`, `pluralResolver`, `interpolator`, `backendConnector`, `i18nFormat`, `utils`], e5, this), this.options = t2, this.options.keySeparator === void 0 && (this.options.keySeparator = `.`), this.logger = X.create(`translator`);
1767
+ super(), va([`resourceStore`, `languageUtils`, `pluralResolver`, `interpolator`, `backendConnector`, `i18nFormat`, `utils`], e5, this), this.options = t2, this.options.keySeparator === void 0 && (this.options.keySeparator = `.`), this.logger = X.create(`translator`);
1762
1768
  }
1763
1769
  changeLanguage(e5) {
1764
1770
  e5 && (this.language = e5);
@@ -1768,20 +1774,20 @@ var Ra = class e3 extends ja {
1768
1774
  if (e5 == null) return false;
1769
1775
  let r2 = this.resolve(e5, n2);
1770
1776
  if (r2?.res === void 0) return false;
1771
- let i2 = La(r2.res);
1777
+ let i2 = Ba(r2.res);
1772
1778
  return !(n2.returnObjects === false && i2);
1773
1779
  }
1774
1780
  extractFromKey(e5, t2) {
1775
1781
  let n2 = t2.nsSeparator === void 0 ? this.options.nsSeparator : t2.nsSeparator;
1776
1782
  n2 === void 0 && (n2 = `:`);
1777
- 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 && !Oa(e5, n2, r2);
1783
+ 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 && !ja(e5, n2, r2);
1778
1784
  if (a2 && !o2) {
1779
1785
  let t3 = e5.match(this.interpolator.nestingRegexp);
1780
- if (t3 && t3.length > 0) return { key: e5, namespaces: G(i2) ? [i2] : i2 };
1786
+ if (t3 && t3.length > 0) return { key: e5, namespaces: W(i2) ? [i2] : i2 };
1781
1787
  let a3 = e5.split(n2);
1782
1788
  (n2 !== r2 || n2 === r2 && this.options.ns.indexOf(a3[0]) > -1) && (i2 = a3.shift()), e5 = a3.join(r2);
1783
1789
  }
1784
- return { key: e5, namespaces: G(i2) ? [i2] : i2 };
1790
+ return { key: e5, namespaces: W(i2) ? [i2] : i2 };
1785
1791
  }
1786
1792
  translate(t2, n2, r2) {
1787
1793
  let i2 = typeof n2 == `object` ? { ...n2 } : n2;
@@ -1791,10 +1797,10 @@ var Ra = class e3 extends ja {
1791
1797
  u2 === void 0 && (u2 = `:`);
1792
1798
  let d2 = i2.lng || this.language, f2 = i2.appendNamespaceToCIMode || this.options.appendNamespaceToCIMode;
1793
1799
  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;
1794
- 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 && !G(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 }) : ``, ne2 = b2 && !i2.ordinal && i2.count === 0, S2 = ne2 && i2[`defaultValue${this.options.pluralSeparator}zero`] || i2[`defaultValue${ee2}`] || i2[`defaultValue${te2}`] || i2.defaultValue, C2 = m2;
1800
+ 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 && !W(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 }) : ``, ne2 = b2 && !i2.ordinal && i2.count === 0, S2 = ne2 && i2[`defaultValue${this.options.pluralSeparator}zero`] || i2[`defaultValue${ee2}`] || i2[`defaultValue${te2}`] || i2.defaultValue, C2 = m2;
1795
1801
  y2 && !m2 && x2 && (C2 = S2);
1796
- let re2 = La(C2), ie2 = Object.prototype.toString.apply(C2);
1797
- if (y2 && C2 && re2 && _2.indexOf(ie2) < 0 && !(G(v2) && Array.isArray(C2))) {
1802
+ let re2 = Ba(C2), ie2 = Object.prototype.toString.apply(C2);
1803
+ if (y2 && C2 && re2 && _2.indexOf(ie2) < 0 && !(W(v2) && Array.isArray(C2))) {
1798
1804
  if (!i2.returnObjects && !this.options.returnObjects) {
1799
1805
  this.options.returnedObjectHandler || this.logger.warn(`accessing an object - but returnObjects options is not enabled!`);
1800
1806
  let e5 = this.options.returnedObjectHandler ? this.options.returnedObjectHandler(h2, C2, { ...i2, ns: c2 }) : `key '${s2} (${this.language})' returned an object instead of string.`;
@@ -1804,11 +1810,11 @@ var Ra = class e3 extends ja {
1804
1810
  let e5 = Array.isArray(C2), t3 = e5 ? [] : {}, n3 = e5 ? g2 : h2;
1805
1811
  for (let e6 in C2) if (Object.prototype.hasOwnProperty.call(C2, e6)) {
1806
1812
  let r3 = `${n3}${o2}${e6}`;
1807
- t3[e6] = x2 && !m2 ? this.translate(r3, { ...i2, defaultValue: La(S2) ? S2[e6] : void 0, joinArrays: false, ns: c2 }) : this.translate(r3, { ...i2, joinArrays: false, ns: c2 }), t3[e6] === r3 && (t3[e6] = C2[e6]);
1813
+ t3[e6] = x2 && !m2 ? this.translate(r3, { ...i2, defaultValue: Ba(S2) ? S2[e6] : void 0, joinArrays: false, ns: c2 }) : this.translate(r3, { ...i2, joinArrays: false, ns: c2 }), t3[e6] === r3 && (t3[e6] = C2[e6]);
1808
1814
  }
1809
1815
  m2 = t3;
1810
1816
  }
1811
- } else if (y2 && G(v2) && Array.isArray(m2)) m2 = m2.join(v2), m2 &&= this.extendTranslation(m2, t2, i2, r2);
1817
+ } else if (y2 && W(v2) && Array.isArray(m2)) m2 = m2.join(v2), m2 &&= this.extendTranslation(m2, t2, i2, r2);
1812
1818
  else {
1813
1819
  let e5 = false, n3 = false;
1814
1820
  !this.isValidLookup(m2) && x2 && (e5 = true, m2 = S2), this.isValidLookup(m2) || (n3 = true, m2 = s2);
@@ -1840,32 +1846,32 @@ var Ra = class e3 extends ja {
1840
1846
  if (this.i18nFormat?.parse) e5 = this.i18nFormat.parse(e5, { ...this.options.interpolation.defaultVariables, ...n2 }, n2.lng || this.language || r2.usedLng, r2.usedNS, r2.usedKey, { resolved: r2 });
1841
1847
  else if (!n2.skipInterpolation) {
1842
1848
  n2.interpolation && this.interpolator.init({ ...n2, interpolation: { ...this.options.interpolation, ...n2.interpolation } });
1843
- let a3 = G(e5) && (n2?.interpolation?.skipOnVariables === void 0 ? this.options.interpolation.skipOnVariables : n2.interpolation.skipOnVariables), o3;
1849
+ let a3 = W(e5) && (n2?.interpolation?.skipOnVariables === void 0 ? this.options.interpolation.skipOnVariables : n2.interpolation.skipOnVariables), o3;
1844
1850
  if (a3) {
1845
1851
  let t3 = e5.match(this.interpolator.nestingRegexp);
1846
1852
  o3 = t3 && t3.length;
1847
1853
  }
1848
- let s2 = n2.replace && !G(n2.replace) ? n2.replace : n2;
1854
+ let s2 = n2.replace && !W(n2.replace) ? n2.replace : n2;
1849
1855
  if (this.options.interpolation.defaultVariables && (s2 = { ...this.options.interpolation.defaultVariables, ...s2 }), e5 = this.interpolator.interpolate(e5, s2, n2.lng || this.language || r2.usedLng, n2), a3) {
1850
1856
  let t3 = e5.match(this.interpolator.nestingRegexp), r3 = t3 && t3.length;
1851
1857
  o3 < r3 && (n2.nest = false);
1852
1858
  }
1853
1859
  !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();
1854
1860
  }
1855
- let a2 = n2.postProcess || this.options.postProcess, o2 = G(a2) ? [a2] : a2;
1856
- return e5 != null && o2?.length && n2.applyPostProcessor !== false && (e5 = Na.handle(o2, e5, t2, this.options && this.options.postProcessPassResolved ? { i18nResolved: { ...r2, usedParams: this.getUsedParamsDetails(n2) }, ...n2 } : n2, this)), e5;
1861
+ let a2 = n2.postProcess || this.options.postProcess, o2 = W(a2) ? [a2] : a2;
1862
+ return e5 != null && o2?.length && n2.applyPostProcessor !== false && (e5 = Ia.handle(o2, e5, t2, this.options && this.options.postProcessPassResolved ? { i18nResolved: { ...r2, usedParams: this.getUsedParamsDetails(n2) }, ...n2 } : n2, this)), e5;
1857
1863
  }
1858
1864
  resolve(e5, t2 = {}) {
1859
1865
  let n2, r2, i2, a2, o2;
1860
- return G(e5) && (e5 = [e5]), Array.isArray(e5) && (e5 = e5.map((e6) => typeof e6 == `function` ? Z(e6, { ...this.options, ...t2 }) : e6)), e5.forEach((e6) => {
1866
+ return W(e5) && (e5 = [e5]), Array.isArray(e5) && (e5 = e5.map((e6) => typeof e6 == `function` ? Z(e6, { ...this.options, ...t2 }) : e6)), e5.forEach((e6) => {
1861
1867
  if (this.isValidLookup(n2)) return;
1862
1868
  let s2 = this.extractFromKey(e6, t2), c2 = s2.key;
1863
1869
  r2 = c2;
1864
1870
  let l2 = s2.namespaces;
1865
1871
  this.options.fallbackNS && (l2 = l2.concat(this.options.fallbackNS));
1866
- let u2 = t2.count !== void 0 && !G(t2.count), d2 = u2 && !t2.ordinal && t2.count === 0, f2 = t2.context !== void 0 && (G(t2.context) || typeof t2.context == `number`) && t2.context !== ``, p2 = t2.lngs ? t2.lngs : this.languageUtils.toResolveHierarchy(t2.lng || this.language, t2.fallbackLng);
1872
+ let u2 = t2.count !== void 0 && !W(t2.count), d2 = u2 && !t2.ordinal && t2.count === 0, f2 = t2.context !== void 0 && (W(t2.context) || typeof t2.context == `number`) && t2.context !== ``, p2 = t2.lngs ? t2.lngs : this.languageUtils.toResolveHierarchy(t2.lng || this.language, t2.fallbackLng);
1867
1873
  l2.forEach((e7) => {
1868
- this.isValidLookup(n2) || (o2 = e7, !Ia[`${p2[0]}-${e7}`] && this.utils?.hasLoadedNamespace && !this.utils?.hasLoadedNamespace(o2) && (Ia[`${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) => {
1874
+ this.isValidLookup(n2) || (o2 = e7, !za[`${p2[0]}-${e7}`] && this.utils?.hasLoadedNamespace && !this.utils?.hasLoadedNamespace(o2) && (za[`${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) => {
1869
1875
  if (this.isValidLookup(n2)) return;
1870
1876
  a2 = r3;
1871
1877
  let o3 = [c2];
@@ -1892,7 +1898,7 @@ var Ra = class e3 extends ja {
1892
1898
  return this.i18nFormat?.getResource ? this.i18nFormat.getResource(e5, t2, n2, r2) : this.resourceStore.getResource(e5, t2, n2, r2);
1893
1899
  }
1894
1900
  getUsedParamsDetails(e5 = {}) {
1895
- let t2 = [`defaultValue`, `ordinal`, `context`, `replace`, `lng`, `lngs`, `fallbackLng`, `ns`, `keySeparator`, `nsSeparator`, `returnObjects`, `returnDetails`, `joinArrays`, `postProcess`, `interpolation`], n2 = e5.replace && !G(e5.replace), r2 = n2 ? e5.replace : e5;
1901
+ let t2 = [`defaultValue`, `ordinal`, `context`, `replace`, `lng`, `lngs`, `fallbackLng`, `ns`, `keySeparator`, `nsSeparator`, `returnObjects`, `returnDetails`, `joinArrays`, `postProcess`, `interpolation`], n2 = e5.replace && !W(e5.replace), r2 = n2 ? e5.replace : e5;
1896
1902
  if (n2 && e5.count !== void 0 && (r2.count = e5.count), this.options.interpolation.defaultVariables && (r2 = { ...this.options.interpolation.defaultVariables, ...r2 }), !n2) {
1897
1903
  r2 = { ...r2 };
1898
1904
  for (let e6 of t2) delete r2[e6];
@@ -1904,7 +1910,7 @@ var Ra = class e3 extends ja {
1904
1910
  return false;
1905
1911
  }
1906
1912
  };
1907
- var za = class {
1913
+ var Ha = class {
1908
1914
  constructor(e5) {
1909
1915
  this.options = e5, this.supportedLngs = this.options.supportedLngs || false, this.logger = X.create(`languageUtils`);
1910
1916
  }
@@ -1919,7 +1925,7 @@ var za = class {
1919
1925
  return this.formatLanguageCode(t2[0]);
1920
1926
  }
1921
1927
  formatLanguageCode(e5) {
1922
- if (G(e5) && e5.indexOf(`-`) > -1) {
1928
+ if (W(e5) && e5.indexOf(`-`) > -1) {
1923
1929
  let t2;
1924
1930
  try {
1925
1931
  t2 = Intl.getCanonicalLocales(e5)[0];
@@ -1952,7 +1958,7 @@ var za = class {
1952
1958
  }
1953
1959
  getFallbackCodes(e5, t2) {
1954
1960
  if (!e5) return [];
1955
- if (typeof e5 == `function` && (e5 = e5(t2)), G(e5) && (e5 = [e5]), Array.isArray(e5)) return e5;
1961
+ if (typeof e5 == `function` && (e5 = e5(t2)), W(e5) && (e5 = [e5]), Array.isArray(e5)) return e5;
1956
1962
  if (!t2) return e5.default || [];
1957
1963
  let n2 = e5[t2];
1958
1964
  return n2 ||= e5[this.getScriptPartFromCode(t2)], n2 ||= e5[this.formatLanguageCode(t2)], n2 ||= e5[this.getLanguagePartFromCode(t2)], n2 ||= e5.default, n2 || [];
@@ -1961,14 +1967,14 @@ var za = class {
1961
1967
  let n2 = this.getFallbackCodes((t2 === false ? [] : t2) || this.options.fallbackLng || [], e5), r2 = [], i2 = (e6) => {
1962
1968
  e6 && (this.isSupportedCode(e6) ? r2.push(e6) : this.logger.warn(`rejecting language code not found in supportedLngs: ${e6}`));
1963
1969
  };
1964
- return G(e5) && (e5.indexOf(`-`) > -1 || e5.indexOf(`_`) > -1) ? (this.options.load !== `languageOnly` && i2(this.formatLanguageCode(e5)), this.options.load !== `languageOnly` && this.options.load !== `currentOnly` && i2(this.getScriptPartFromCode(e5)), this.options.load !== `currentOnly` && i2(this.getLanguagePartFromCode(e5))) : G(e5) && i2(this.formatLanguageCode(e5)), n2.forEach((e6) => {
1970
+ return W(e5) && (e5.indexOf(`-`) > -1 || e5.indexOf(`_`) > -1) ? (this.options.load !== `languageOnly` && i2(this.formatLanguageCode(e5)), this.options.load !== `languageOnly` && this.options.load !== `currentOnly` && i2(this.getScriptPartFromCode(e5)), this.options.load !== `currentOnly` && i2(this.getLanguagePartFromCode(e5))) : W(e5) && i2(this.formatLanguageCode(e5)), n2.forEach((e6) => {
1965
1971
  r2.indexOf(e6) < 0 && i2(this.formatLanguageCode(e6));
1966
1972
  }), r2;
1967
1973
  }
1968
1974
  };
1969
- var Ba = { zero: 0, one: 1, two: 2, few: 3, many: 4, other: 5 };
1970
- var Va = { select: (e5) => e5 === 1 ? `one` : `other`, resolvedOptions: () => ({ pluralCategories: [`one`, `other`] }) };
1971
- var Ha = class {
1975
+ var Ua = { zero: 0, one: 1, two: 2, few: 3, many: 4, other: 5 };
1976
+ var Wa = { select: (e5) => e5 === 1 ? `one` : `other`, resolvedOptions: () => ({ pluralCategories: [`one`, `other`] }) };
1977
+ var Ga = class {
1972
1978
  constructor(e5, t2 = {}) {
1973
1979
  this.languageUtils = e5, this.options = t2, this.logger = X.create(`pluralResolver`), this.pluralRulesCache = {};
1974
1980
  }
@@ -1982,8 +1988,8 @@ var Ha = class {
1982
1988
  try {
1983
1989
  a2 = new Intl.PluralRules(n2, { type: r2 });
1984
1990
  } catch {
1985
- if (typeof Intl > `u`) return this.logger.error(`No Intl support, please use an Intl polyfill!`), Va;
1986
- if (!e5.match(/-|_/)) return Va;
1991
+ if (typeof Intl > `u`) return this.logger.error(`No Intl support, please use an Intl polyfill!`), Wa;
1992
+ if (!e5.match(/-|_/)) return Wa;
1987
1993
  let n3 = this.languageUtils.getLanguagePartFromCode(e5);
1988
1994
  a2 = this.getRule(n3, t2);
1989
1995
  }
@@ -1998,26 +2004,26 @@ var Ha = class {
1998
2004
  }
1999
2005
  getSuffixes(e5, t2 = {}) {
2000
2006
  let n2 = this.getRule(e5, t2);
2001
- return n2 ||= this.getRule(`dev`, t2), n2 ? n2.resolvedOptions().pluralCategories.sort((e6, t3) => Ba[e6] - Ba[t3]).map((e6) => `${this.options.prepend}${t2.ordinal ? `ordinal${this.options.prepend}` : ``}${e6}`) : [];
2007
+ return n2 ||= this.getRule(`dev`, t2), n2 ? n2.resolvedOptions().pluralCategories.sort((e6, t3) => Ua[e6] - Ua[t3]).map((e6) => `${this.options.prepend}${t2.ordinal ? `ordinal${this.options.prepend}` : ``}${e6}`) : [];
2002
2008
  }
2003
2009
  getSuffix(e5, t2, n2 = {}) {
2004
2010
  let r2 = this.getRule(e5, n2);
2005
2011
  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));
2006
2012
  }
2007
2013
  };
2008
- var Ua = (e5, t2, n2, r2 = `.`, i2 = true) => {
2009
- let a2 = xa(e5, t2, n2);
2010
- return !a2 && i2 && G(n2) && (a2 = ka(e5, n2, r2), a2 === void 0 && (a2 = ka(t2, n2, r2))), a2;
2014
+ var Ka = (e5, t2, n2, r2 = `.`, i2 = true) => {
2015
+ let a2 = wa(e5, t2, n2);
2016
+ return !a2 && i2 && W(n2) && (a2 = Ma(e5, n2, r2), a2 === void 0 && (a2 = Ma(t2, n2, r2))), a2;
2011
2017
  };
2012
- var Wa = (e5) => e5.replace(/\$/g, `$$$$`);
2013
- var Ga = class {
2018
+ var qa = (e5) => e5.replace(/\$/g, `$$$$`);
2019
+ var Ja = class {
2014
2020
  constructor(e5 = {}) {
2015
2021
  this.logger = X.create(`interpolator`), this.options = e5, this.format = e5?.interpolation?.format || ((e6) => e6), this.init(e5);
2016
2022
  }
2017
2023
  init(e5 = {}) {
2018
2024
  e5.interpolation ||= { escapeValue: true };
2019
2025
  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;
2020
- this.escape = t2 === void 0 ? wa : t2, this.escapeValue = n2 === void 0 || n2, this.useRawValueToEscape = r2 !== void 0 && r2, this.prefix = i2 ? J(i2) : a2 || `{{`, this.suffix = o2 ? J(o2) : s2 || `}}`, this.formatSeparator = c2 || `,`, this.unescapePrefix = l2 ? `` : u2 || `-`, this.unescapeSuffix = this.unescapePrefix ? `` : l2 || ``, this.nestingPrefix = d2 ? J(d2) : f2 || J(`$t(`), this.nestingSuffix = p2 ? J(p2) : m2 || J(`)`), this.nestingOptionsSeparator = h2 || `,`, this.maxReplaces = g2 || 1e3, this.alwaysFormat = _2 !== void 0 && _2, this.resetRegExp();
2026
+ this.escape = t2 === void 0 ? Da : t2, this.escapeValue = n2 === void 0 || n2, this.useRawValueToEscape = r2 !== void 0 && r2, this.prefix = i2 ? J(i2) : a2 || `{{`, this.suffix = o2 ? J(o2) : s2 || `}}`, this.formatSeparator = c2 || `,`, this.unescapePrefix = l2 ? `` : u2 || `-`, this.unescapeSuffix = this.unescapePrefix ? `` : l2 || ``, this.nestingPrefix = d2 ? J(d2) : f2 || J(`$t(`), this.nestingSuffix = p2 ? J(p2) : m2 || J(`)`), this.nestingOptionsSeparator = h2 || `,`, this.maxReplaces = g2 || 1e3, this.alwaysFormat = _2 !== void 0 && _2, this.resetRegExp();
2021
2027
  }
2022
2028
  reset() {
2023
2029
  this.options && this.init(this.options);
@@ -2029,27 +2035,27 @@ var Ga = class {
2029
2035
  interpolate(e5, t2, n2, r2) {
2030
2036
  let i2, a2, o2, s2 = this.options && this.options.interpolation && this.options.interpolation.defaultVariables || {}, c2 = (e6) => {
2031
2037
  if (e6.indexOf(this.formatSeparator) < 0) {
2032
- let i4 = Ua(t2, s2, e6, this.options.keySeparator, this.options.ignoreJSONStructure);
2038
+ let i4 = Ka(t2, s2, e6, this.options.keySeparator, this.options.ignoreJSONStructure);
2033
2039
  return this.alwaysFormat ? this.format(i4, void 0, n2, { ...r2, ...t2, interpolationkey: e6 }) : i4;
2034
2040
  }
2035
2041
  let i3 = e6.split(this.formatSeparator), a3 = i3.shift().trim(), o3 = i3.join(this.formatSeparator).trim();
2036
- return this.format(Ua(t2, s2, a3, this.options.keySeparator, this.options.ignoreJSONStructure), o3, n2, { ...r2, ...t2, interpolationkey: a3 });
2042
+ return this.format(Ka(t2, s2, a3, this.options.keySeparator, this.options.ignoreJSONStructure), o3, n2, { ...r2, ...t2, interpolationkey: a3 });
2037
2043
  };
2038
2044
  this.resetRegExp();
2039
2045
  let l2 = r2?.missingInterpolationHandler || this.options.missingInterpolationHandler, u2 = r2?.interpolation?.skipOnVariables === void 0 ? this.options.interpolation.skipOnVariables : r2.interpolation.skipOnVariables;
2040
- return [{ regex: this.regexpUnescape, safeValue: (e6) => Wa(e6) }, { regex: this.regexp, safeValue: (e6) => this.escapeValue ? Wa(this.escape(e6)) : Wa(e6) }].forEach((t3) => {
2046
+ return [{ regex: this.regexpUnescape, safeValue: (e6) => qa(e6) }, { regex: this.regexp, safeValue: (e6) => this.escapeValue ? qa(this.escape(e6)) : qa(e6) }].forEach((t3) => {
2041
2047
  for (o2 = 0; i2 = t3.regex.exec(e5); ) {
2042
2048
  let n3 = i2[1].trim();
2043
2049
  if (a2 = c2(n3), a2 === void 0) {
2044
2050
  if (typeof l2 == `function`) {
2045
2051
  let t4 = l2(e5, i2, r2);
2046
- a2 = G(t4) ? t4 : ``;
2052
+ a2 = W(t4) ? t4 : ``;
2047
2053
  } else if (r2 && Object.prototype.hasOwnProperty.call(r2, n3)) a2 = ``;
2048
2054
  else if (u2) {
2049
2055
  a2 = i2[0];
2050
2056
  continue;
2051
2057
  } else this.logger.warn(`missed to pass in variable ${n3} for interpolating ${e5}`), a2 = ``;
2052
- } else !G(a2) && !this.useRawValueToEscape && (a2 = pa(a2));
2058
+ } else !W(a2) && !this.useRawValueToEscape && (a2 = _a(a2));
2053
2059
  let s3 = t3.safeValue(a2);
2054
2060
  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;
2055
2061
  }
@@ -2072,15 +2078,15 @@ var Ga = class {
2072
2078
  };
2073
2079
  for (; r2 = this.nestingRegexp.exec(e5); ) {
2074
2080
  let s2 = [];
2075
- a2 = { ...n2 }, a2 = a2.replace && !G(a2.replace) ? a2.replace : a2, a2.applyPostProcessor = false, delete a2.defaultValue;
2081
+ a2 = { ...n2 }, a2 = a2.replace && !W(a2.replace) ? a2.replace : a2, a2.applyPostProcessor = false, delete a2.defaultValue;
2076
2082
  let c2 = /{.*}/.test(r2[1]) ? r2[1].lastIndexOf(`}`) + 1 : r2[1].indexOf(this.formatSeparator);
2077
- 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 && !G(i2)) return i2;
2078
- G(i2) || (i2 = pa(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;
2083
+ 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 && !W(i2)) return i2;
2084
+ W(i2) || (i2 = _a(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;
2079
2085
  }
2080
2086
  return e5;
2081
2087
  }
2082
2088
  };
2083
- var Ka = (e5) => {
2089
+ var Ya = (e5) => {
2084
2090
  let t2 = e5.toLowerCase().trim(), n2 = {};
2085
2091
  if (e5.indexOf(`(`) > -1) {
2086
2092
  let r2 = e5.split(`(`);
@@ -2095,7 +2101,7 @@ var Ka = (e5) => {
2095
2101
  }
2096
2102
  return { formatName: t2, formatOptions: n2 };
2097
2103
  };
2098
- var qa = (e5) => {
2104
+ var Xa = (e5) => {
2099
2105
  let t2 = {};
2100
2106
  return (n2, r2, i2) => {
2101
2107
  let a2 = i2;
@@ -2104,14 +2110,14 @@ var qa = (e5) => {
2104
2110
  return s2 || (s2 = e5(Y(r2), i2), t2[o2] = s2), s2(n2);
2105
2111
  };
2106
2112
  };
2107
- var Ja = (e5) => (t2, n2, r2) => e5(Y(n2), r2)(t2);
2108
- var Ya = class {
2113
+ var Za = (e5) => (t2, n2, r2) => e5(Y(n2), r2)(t2);
2114
+ var Qa = class {
2109
2115
  constructor(e5 = {}) {
2110
2116
  this.logger = X.create(`formatter`), this.options = e5, this.init(e5);
2111
2117
  }
2112
2118
  init(e5, t2 = { interpolation: {} }) {
2113
2119
  this.formatSeparator = t2.interpolation.formatSeparator || `,`;
2114
- let n2 = t2.cacheInBuiltFormats ? qa : Ja;
2120
+ let n2 = t2.cacheInBuiltFormats ? Xa : Za;
2115
2121
  this.formats = { number: n2((e6, t3) => {
2116
2122
  let n3 = new Intl.NumberFormat(e6, { ...t3 });
2117
2123
  return (e7) => n3.format(e7);
@@ -2133,7 +2139,7 @@ var Ya = class {
2133
2139
  this.formats[e5.toLowerCase().trim()] = t2;
2134
2140
  }
2135
2141
  addCached(e5, t2) {
2136
- this.formats[e5.toLowerCase().trim()] = qa(t2);
2142
+ this.formats[e5.toLowerCase().trim()] = Xa(t2);
2137
2143
  }
2138
2144
  format(e5, t2, n2, r2 = {}) {
2139
2145
  let i2 = t2.split(this.formatSeparator);
@@ -2142,7 +2148,7 @@ var Ya = class {
2142
2148
  i2[0] = [i2[0], ...i2.splice(1, e6)].join(this.formatSeparator);
2143
2149
  }
2144
2150
  return i2.reduce((e6, t3) => {
2145
- let { formatName: i3, formatOptions: a2 } = Ka(t3);
2151
+ let { formatName: i3, formatOptions: a2 } = Ya(t3);
2146
2152
  if (this.formats[i3]) {
2147
2153
  let t4 = e6;
2148
2154
  try {
@@ -2157,10 +2163,10 @@ var Ya = class {
2157
2163
  }, e5);
2158
2164
  }
2159
2165
  };
2160
- var Xa = (e5, t2) => {
2166
+ var $a = (e5, t2) => {
2161
2167
  e5.pending[t2] !== void 0 && (delete e5.pending[t2], e5.pendingCount--);
2162
2168
  };
2163
- var Za = class extends ja {
2169
+ var eo = class extends Pa {
2164
2170
  constructor(e5, t2, n2, r2 = {}) {
2165
2171
  super(), this.backend = e5, this.store = t2, this.services = n2, this.languageUtils = n2.languageUtils, this.options = r2, this.logger = X.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);
2166
2172
  }
@@ -2179,7 +2185,7 @@ var Za = class extends ja {
2179
2185
  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);
2180
2186
  let o2 = {};
2181
2187
  this.queue.forEach((n3) => {
2182
- ya(n3.loaded, [i2], a2), Xa(n3, e5), t2 && n3.errors.push(t2), n3.pendingCount === 0 && !n3.done && (Object.keys(n3.loaded).forEach((e6) => {
2188
+ Ca(n3.loaded, [i2], a2), $a(n3, e5), t2 && n3.errors.push(t2), n3.pendingCount === 0 && !n3.done && (Object.keys(n3.loaded).forEach((e6) => {
2183
2189
  o2[e6] || (o2[e6] = {});
2184
2190
  let t3 = n3.loaded[e6];
2185
2191
  t3.length && t3.forEach((t4) => {
@@ -2221,7 +2227,7 @@ var Za = class extends ja {
2221
2227
  }
2222
2228
  prepareLoading(e5, t2, n2 = {}, r2) {
2223
2229
  if (!this.backend) return this.logger.warn(`No backend was added via i18next.use. Will not load resources.`), r2 && r2();
2224
- G(e5) && (e5 = this.languageUtils.toResolveHierarchy(e5)), G(t2) && (t2 = [t2]);
2230
+ W(e5) && (e5 = this.languageUtils.toResolveHierarchy(e5)), W(t2) && (t2 = [t2]);
2225
2231
  let i2 = this.queueLoad(e5, t2, n2, r2);
2226
2232
  if (!i2.toLoad.length) return i2.pending.length || r2(), null;
2227
2233
  i2.toLoad.forEach((e6) => {
@@ -2261,9 +2267,9 @@ var Za = class extends ja {
2261
2267
  }
2262
2268
  }
2263
2269
  };
2264
- var Qa = () => ({ 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) => {
2270
+ var to = () => ({ 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) => {
2265
2271
  let t2 = {};
2266
- if (typeof e5[1] == `object` && (t2 = e5[1]), G(e5[1]) && (t2.defaultValue = e5[1]), G(e5[2]) && (t2.tDescription = e5[2]), typeof e5[2] == `object` || typeof e5[3] == `object`) {
2272
+ if (typeof e5[1] == `object` && (t2 = e5[1]), W(e5[1]) && (t2.defaultValue = e5[1]), W(e5[2]) && (t2.tDescription = e5[2]), typeof e5[2] == `object` || typeof e5[3] == `object`) {
2267
2273
  let n2 = e5[3] || e5[2];
2268
2274
  Object.keys(n2).forEach((e6) => {
2269
2275
  t2[e6] = n2[e6];
@@ -2271,23 +2277,23 @@ var Qa = () => ({ debug: false, initAsync: true, ns: [`translation`], defaultNS:
2271
2277
  }
2272
2278
  return t2;
2273
2279
  }, interpolation: { escapeValue: true, format: (e5) => e5, prefix: `{{`, suffix: `}}`, formatSeparator: `,`, unescapePrefix: `-`, nestingPrefix: `$t(`, nestingSuffix: `)`, nestingOptionsSeparator: `,`, maxReplaces: 1e3, skipOnVariables: true }, cacheInBuiltFormats: true });
2274
- var $a = (e5) => (G(e5.ns) && (e5.ns = [e5.ns]), G(e5.fallbackLng) && (e5.fallbackLng = [e5.fallbackLng]), G(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);
2275
- var eo = () => {
2280
+ var no = (e5) => (W(e5.ns) && (e5.ns = [e5.ns]), W(e5.fallbackLng) && (e5.fallbackLng = [e5.fallbackLng]), W(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);
2281
+ var ro = () => {
2276
2282
  };
2277
- var to = (e5) => {
2283
+ var io = (e5) => {
2278
2284
  Object.getOwnPropertyNames(Object.getPrototypeOf(e5)).forEach((t2) => {
2279
2285
  typeof e5[t2] == `function` && (e5[t2] = e5[t2].bind(e5));
2280
2286
  });
2281
2287
  };
2282
- var no = `__i18next_supportNoticeShown`;
2283
- var ro = () => !!(typeof globalThis < `u` && globalThis[no] || typeof process < `u` && {}.I18NEXT_NO_SUPPORT_NOTICE || typeof process < `u`);
2284
- var io = () => {
2285
- typeof globalThis < `u` && (globalThis[no] = true);
2288
+ var ao = `__i18next_supportNoticeShown`;
2289
+ var oo = () => !!(typeof globalThis < `u` && globalThis[ao] || typeof process < `u` && {}.I18NEXT_NO_SUPPORT_NOTICE || typeof process < `u`);
2290
+ var so = () => {
2291
+ typeof globalThis < `u` && (globalThis[ao] = true);
2286
2292
  };
2287
- var ao = (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));
2288
- var Q = class e4 extends ja {
2293
+ var co = (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));
2294
+ var Q = class e4 extends Pa {
2289
2295
  constructor(e5 = {}, t2) {
2290
- if (super(), this.options = $a(e5), this.services = {}, this.logger = X, this.modules = { external: [] }, to(this), t2 && !this.isInitialized && !e5.isClone) {
2296
+ if (super(), this.options = no(e5), this.services = {}, this.logger = X, this.modules = { external: [] }, io(this), t2 && !this.isInitialized && !e5.isClone) {
2291
2297
  if (!this.options.initAsync) return this.init(e5, t2), this;
2292
2298
  setTimeout(() => {
2293
2299
  this.init(e5, t2);
@@ -2295,26 +2301,26 @@ var Q = class e4 extends ja {
2295
2301
  }
2296
2302
  }
2297
2303
  init(e5 = {}, t2) {
2298
- this.isInitializing = true, typeof e5 == `function` && (t2 = e5, e5 = {}), e5.defaultNS == null && e5.ns && (G(e5.ns) ? e5.defaultNS = e5.ns : e5.ns.indexOf(`translation`) < 0 && (e5.defaultNS = e5.ns[0]));
2299
- let n2 = Qa();
2300
- this.options = { ...n2, ...this.options, ...$a(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 && !ao(this) && !ro() && (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}`), io());
2304
+ this.isInitializing = true, typeof e5 == `function` && (t2 = e5, e5 = {}), e5.defaultNS == null && e5.ns && (W(e5.ns) ? e5.defaultNS = e5.ns : e5.ns.indexOf(`translation`) < 0 && (e5.defaultNS = e5.ns[0]));
2305
+ let n2 = to();
2306
+ this.options = { ...n2, ...this.options, ...no(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 && !co(this) && !oo() && (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}`), so());
2301
2307
  let r2 = (e6) => e6 ? typeof e6 == `function` ? new e6() : e6 : null;
2302
2308
  if (!this.options.isClone) {
2303
2309
  this.modules.logger ? X.init(r2(this.modules.logger), this.options) : X.init(null, this.options);
2304
2310
  let e6;
2305
- e6 = this.modules.formatter ? this.modules.formatter : Ya;
2306
- let t3 = new za(this.options);
2307
- this.store = new Ma(this.options.resources, this.options);
2311
+ e6 = this.modules.formatter ? this.modules.formatter : Qa;
2312
+ let t3 = new Ha(this.options);
2313
+ this.store = new Fa(this.options.resources, this.options);
2308
2314
  let i3 = this.services;
2309
- i3.logger = X, i3.resourceStore = this.store, i3.languageUtils = t3, i3.pluralResolver = new Ha(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 Ga(this.options), i3.utils = { hasLoadedNamespace: this.hasLoadedNamespace.bind(this) }, i3.backendConnector = new Za(r2(this.modules.backend), i3.resourceStore, i3, this.options), i3.backendConnector.on(`*`, (e7, ...t4) => {
2315
+ i3.logger = X, i3.resourceStore = this.store, i3.languageUtils = t3, i3.pluralResolver = new Ga(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 Ja(this.options), i3.utils = { hasLoadedNamespace: this.hasLoadedNamespace.bind(this) }, i3.backendConnector = new eo(r2(this.modules.backend), i3.resourceStore, i3, this.options), i3.backendConnector.on(`*`, (e7, ...t4) => {
2310
2316
  this.emit(e7, ...t4);
2311
- }), 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 Ra(this.services, this.options), this.translator.on(`*`, (e7, ...t4) => {
2317
+ }), 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 Va(this.services, this.options), this.translator.on(`*`, (e7, ...t4) => {
2312
2318
  this.emit(e7, ...t4);
2313
2319
  }), this.modules.external.forEach((e7) => {
2314
2320
  e7.init && e7.init(this);
2315
2321
  });
2316
2322
  }
2317
- if (this.format = this.options.interpolation.format, t2 ||= eo, this.options.fallbackLng && !this.services.languageDetector && !this.options.lng) {
2323
+ if (this.format = this.options.interpolation.format, t2 ||= ro, this.options.fallbackLng && !this.services.languageDetector && !this.options.lng) {
2318
2324
  let e6 = this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);
2319
2325
  e6.length > 0 && e6[0] !== `dev` && (this.options.lng = e6[0]);
2320
2326
  }
@@ -2323,7 +2329,7 @@ var Q = class e4 extends ja {
2323
2329
  }), [`addResource`, `addResources`, `addResourceBundle`, `removeResourceBundle`].forEach((e6) => {
2324
2330
  this[e6] = (...t3) => (this.store[e6](...t3), this);
2325
2331
  });
2326
- let i2 = K(), a2 = () => {
2332
+ let i2 = G(), a2 = () => {
2327
2333
  let e6 = (e7, n3) => {
2328
2334
  this.isInitializing = false, this.isInitialized && !this.initializedStoreOnce && this.logger.warn(`init: i18next is already initialized. You should call init just once!`), this.isInitialized = true, this.options.isClone || this.logger.log(`initialized`, this.options), this.emit(`initialized`, this.options), i2.resolve(n3), t2(e7, n3);
2329
2335
  };
@@ -2332,8 +2338,8 @@ var Q = class e4 extends ja {
2332
2338
  };
2333
2339
  return this.options.resources || !this.options.initAsync ? a2() : setTimeout(a2, 0), i2;
2334
2340
  }
2335
- loadResources(e5, t2 = eo) {
2336
- let n2 = t2, r2 = G(e5) ? e5 : this.language;
2341
+ loadResources(e5, t2 = ro) {
2342
+ let n2 = t2, r2 = W(e5) ? e5 : this.language;
2337
2343
  if (typeof e5 == `function` && (n2 = e5), !this.options.resources || this.options.partialBundledLanguages) {
2338
2344
  if (r2?.toLowerCase() === `cimode` && (!this.options.preload || this.options.preload.length === 0)) return n2();
2339
2345
  let e6 = [], t3 = (t4) => {
@@ -2347,15 +2353,15 @@ var Q = class e4 extends ja {
2347
2353
  } else n2(null);
2348
2354
  }
2349
2355
  reloadResources(e5, t2, n2) {
2350
- let r2 = K();
2351
- return typeof e5 == `function` && (n2 = e5, e5 = void 0), typeof t2 == `function` && (n2 = t2, t2 = void 0), e5 ||= this.languages, t2 ||= this.options.ns, n2 ||= eo, this.services.backendConnector.reload(e5, t2, (e6) => {
2356
+ let r2 = G();
2357
+ return typeof e5 == `function` && (n2 = e5, e5 = void 0), typeof t2 == `function` && (n2 = t2, t2 = void 0), e5 ||= this.languages, t2 ||= this.options.ns, n2 ||= ro, this.services.backendConnector.reload(e5, t2, (e6) => {
2352
2358
  r2.resolve(), n2(e6);
2353
2359
  }), r2;
2354
2360
  }
2355
2361
  use(e5) {
2356
2362
  if (!e5) throw Error(`You are passing an undefined module! Please check the object you are passing to i18next.use()`);
2357
2363
  if (!e5.type) throw Error(`You are passing a wrong module! Please check the object you are passing to i18next.use()`);
2358
- 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` && Na.addPostProcessor(e5), e5.type === `formatter` && (this.modules.formatter = e5), e5.type === `3rdParty` && this.modules.external.push(e5), this;
2364
+ 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` && Ia.addPostProcessor(e5), e5.type === `formatter` && (this.modules.formatter = e5), e5.type === `3rdParty` && this.modules.external.push(e5), this;
2359
2365
  }
2360
2366
  setResolvedLanguage(e5) {
2361
2367
  if (e5 && this.languages && !([`cimode`, `dev`].indexOf(e5) > -1)) {
@@ -2371,7 +2377,7 @@ var Q = class e4 extends ja {
2371
2377
  }
2372
2378
  changeLanguage(e5, t2) {
2373
2379
  this.isLanguageChangingTo = e5;
2374
- let n2 = K();
2380
+ let n2 = G();
2375
2381
  this.emit(`languageChanging`, e5);
2376
2382
  let r2 = (e6) => {
2377
2383
  this.language = e6, this.languages = this.services.languageUtils.toResolveHierarchy(e6), this.resolvedLanguage = void 0, this.setResolvedLanguage(e6);
@@ -2379,7 +2385,7 @@ var Q = class e4 extends ja {
2379
2385
  a3 ? this.isLanguageChangingTo === e5 && (r2(a3), this.translator.changeLanguage(a3), this.isLanguageChangingTo = void 0, this.emit(`languageChanged`, a3), this.logger.log(`languageChanged`, a3)) : this.isLanguageChangingTo = void 0, n2.resolve((...e6) => this.t(...e6)), t2 && t2(i3, (...e6) => this.t(...e6));
2380
2386
  }, a2 = (t3) => {
2381
2387
  !e5 && !t3 && this.services.languageDetector && (t3 = []);
2382
- let n3 = G(t3) ? t3 : t3 && t3[0], a3 = this.store.hasLanguageSomeTranslations(n3) ? n3 : this.services.languageUtils.getBestMatchFromCodes(G(t3) ? [t3] : t3);
2388
+ let n3 = W(t3) ? t3 : t3 && t3[0], a3 = this.store.hasLanguageSomeTranslations(n3) ? n3 : this.services.languageUtils.getBestMatchFromCodes(W(t3) ? [t3] : t3);
2383
2389
  a3 && (this.language || r2(a3), this.translator.language || this.translator.changeLanguage(a3), this.services.languageDetector?.cacheUserLanguage?.(a3)), this.loadResources(a3, (e6) => {
2384
2390
  i2(e6, a3);
2385
2391
  });
@@ -2395,7 +2401,7 @@ var Q = class e4 extends ja {
2395
2401
  let s2 = this.options.keySeparator || `.`, c2;
2396
2402
  return a2.keyPrefix && Array.isArray(e6) ? c2 = e6.map((e7) => (typeof e7 == `function` && (e7 = Z(e7, o2)), `${a2.keyPrefix}${s2}${e7}`)) : (typeof e6 == `function` && (e6 = Z(e6, o2)), c2 = a2.keyPrefix ? `${a2.keyPrefix}${s2}${e6}` : e6), this.t(c2, a2);
2397
2403
  };
2398
- return G(e5) ? r2.lng = e5 : r2.lngs = e5, r2.ns = t2, r2.keyPrefix = n2, r2;
2404
+ return W(e5) ? r2.lng = e5 : r2.lngs = e5, r2.ns = t2, r2.keyPrefix = n2, r2;
2399
2405
  }
2400
2406
  t(...e5) {
2401
2407
  return this.translator?.translate(...e5);
@@ -2422,16 +2428,16 @@ var Q = class e4 extends ja {
2422
2428
  return !!(this.hasResourceBundle(n2, e5) || !this.services.backendConnector.backend || this.options.resources && !this.options.partialBundledLanguages || a2(n2, e5) && (!r2 || a2(i2, e5)));
2423
2429
  }
2424
2430
  loadNamespaces(e5, t2) {
2425
- let n2 = K();
2426
- return this.options.ns ? (G(e5) && (e5 = [e5]), e5.forEach((e6) => {
2431
+ let n2 = G();
2432
+ return this.options.ns ? (W(e5) && (e5 = [e5]), e5.forEach((e6) => {
2427
2433
  this.options.ns.indexOf(e6) < 0 && this.options.ns.push(e6);
2428
2434
  }), this.loadResources((e6) => {
2429
2435
  n2.resolve(), t2 && t2(e6);
2430
2436
  }), n2) : (t2 && t2(), Promise.resolve());
2431
2437
  }
2432
2438
  loadLanguages(e5, t2) {
2433
- let n2 = K();
2434
- G(e5) && (e5 = [e5]);
2439
+ let n2 = G();
2440
+ W(e5) && (e5 = [e5]);
2435
2441
  let r2 = this.options.preload || [], i2 = e5.filter((e6) => r2.indexOf(e6) < 0 && this.services.languageUtils.isSupportedCode(e6));
2436
2442
  return i2.length ? (this.options.preload = r2.concat(i2), this.loadResources((e6) => {
2437
2443
  n2.resolve(), t2 && t2(e6);
@@ -2447,24 +2453,24 @@ var Q = class e4 extends ja {
2447
2453
  }
2448
2454
  } catch {
2449
2455
  }
2450
- 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 za(Qa());
2456
+ 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 Ha(to());
2451
2457
  return e5.toLowerCase().indexOf(`-latn`) > 1 ? `ltr` : t2.indexOf(n2.getLanguagePartFromCode(e5)) > -1 || e5.toLowerCase().indexOf(`-arab`) > 1 ? `rtl` : `ltr`;
2452
2458
  }
2453
2459
  static createInstance(t2 = {}, n2) {
2454
2460
  let r2 = new e4(t2, n2);
2455
2461
  return r2.createInstance = e4.createInstance, r2;
2456
2462
  }
2457
- cloneInstance(t2 = {}, n2 = eo) {
2463
+ cloneInstance(t2 = {}, n2 = ro) {
2458
2464
  let r2 = t2.forkResourceStore;
2459
2465
  r2 && delete t2.forkResourceStore;
2460
2466
  let i2 = { ...this.options, ...t2, isClone: true }, a2 = new e4(i2);
2461
2467
  if ((t2.debug !== void 0 || t2.prefix !== void 0) && (a2.logger = a2.logger.clone(t2)), [`store`, `services`, `language`].forEach((e5) => {
2462
2468
  a2[e5] = this[e5];
2463
- }), a2.services = { ...this.services }, a2.services.utils = { hasLoadedNamespace: a2.hasLoadedNamespace.bind(a2) }, r2 && (a2.store = new Ma(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) {
2464
- let e5 = { ...Qa().interpolation, ...this.options.interpolation, ...t2.interpolation }, n3 = { ...i2, interpolation: e5 };
2465
- a2.services.interpolator = new Ga(n3);
2469
+ }), a2.services = { ...this.services }, a2.services.utils = { hasLoadedNamespace: a2.hasLoadedNamespace.bind(a2) }, r2 && (a2.store = new Fa(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) {
2470
+ let e5 = { ...to().interpolation, ...this.options.interpolation, ...t2.interpolation }, n3 = { ...i2, interpolation: e5 };
2471
+ a2.services.interpolator = new Ja(n3);
2466
2472
  }
2467
- return a2.translator = new Ra(a2.services, i2), a2.translator.on(`*`, (e5, ...t3) => {
2473
+ return a2.translator = new Va(a2.services, i2), a2.translator.on(`*`, (e5, ...t3) => {
2468
2474
  a2.emit(e5, ...t3);
2469
2475
  }), a2.init(i2, n2), a2.translator.options = i2, a2.translator.backendConnector.services.utils = { hasLoadedNamespace: a2.hasLoadedNamespace.bind(a2) }, a2;
2470
2476
  }
@@ -2473,53 +2479,53 @@ var Q = class e4 extends ja {
2473
2479
  }
2474
2480
  }.createInstance();
2475
2481
  Q.createInstance, Q.dir, Q.init, Q.loadResources, Q.reloadResources, Q.use, Q.changeLanguage, Q.getFixedT, Q.t, Q.exists, Q.setDefaultNamespace, Q.hasLoadedNamespace, Q.loadNamespaces, Q.loadLanguages;
2476
- var oo = /&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g;
2477
- var so = { "&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;": `/` };
2478
- var co = (e5) => so[e5];
2479
- var lo = { bindI18n: `languageChanged`, bindI18nStore: ``, transEmptyNodeValue: ``, transSupportBasicHtmlNodes: true, transWrapTextNodes: ``, transKeepBasicHtmlNodesFor: [`br`, `strong`, `i`, `p`], useSuspense: true, unescape: (e5) => e5.replace(oo, co), transDefaultProps: void 0 };
2480
- var uo = (e5 = {}) => {
2481
- lo = { ...lo, ...e5 };
2482
+ var lo = /&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g;
2483
+ var uo = { "&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;": `/` };
2484
+ var fo = (e5) => uo[e5];
2485
+ var po = { bindI18n: `languageChanged`, bindI18nStore: ``, transEmptyNodeValue: ``, transSupportBasicHtmlNodes: true, transWrapTextNodes: ``, transKeepBasicHtmlNodesFor: [`br`, `strong`, `i`, `p`], useSuspense: true, unescape: (e5) => e5.replace(lo, fo), transDefaultProps: void 0 };
2486
+ var mo = (e5 = {}) => {
2487
+ po = { ...po, ...e5 };
2482
2488
  };
2483
- var fo = { type: `3rdParty`, init(e5) {
2484
- uo(e5.options.react);
2489
+ var ho = { type: `3rdParty`, init(e5) {
2490
+ mo(e5.options.react);
2485
2491
  } };
2486
- var po = /* @__PURE__ */ new Map();
2487
- var mo = 500;
2488
- var $;
2489
- function ho() {
2490
- if ($ === void 0) try {
2491
- $ = new Intl.NumberFormat(`en-US`, { useGrouping: false, maximumFractionDigits: 0 }).format(`9007199254740993`) === `9007199254740993`;
2492
+ var go = /* @__PURE__ */ new Map();
2493
+ var _o = 500;
2494
+ var vo;
2495
+ function yo() {
2496
+ if (vo === void 0) try {
2497
+ vo = new Intl.NumberFormat(`en-US`, { useGrouping: false, maximumFractionDigits: 0 }).format(`9007199254740993`) === `9007199254740993`;
2492
2498
  } catch {
2493
- $ = false;
2499
+ vo = false;
2494
2500
  }
2495
- return $;
2501
+ return vo;
2496
2502
  }
2497
- var go = 15;
2498
- function _o(e5) {
2499
- if (!(typeof e5 != `string` || ho()) && e5.replace(/[^0-9]/g, ``).replace(/^0+/, ``).length > go) 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.`);
2503
+ var bo = 15;
2504
+ function xo(e5) {
2505
+ if (!(typeof e5 != `string` || yo()) && e5.replace(/[^0-9]/g, ``).replace(/^0+/, ``).length > bo) 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.`);
2500
2506
  }
2501
- function vo(e5, t2, n2) {
2507
+ function So(e5, t2, n2) {
2502
2508
  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(`&`)}`;
2503
2509
  }
2504
- function yo(e5, t2, n2) {
2505
- let r2 = vo(e5, t2, n2), i2 = po.get(r2);
2506
- return i2 || (i2 = new Intl.NumberFormat(e5, { ...n2, style: `currency`, currency: t2 }), po.size >= mo && po.clear(), po.set(r2, i2)), i2;
2510
+ function Co(e5, t2, n2) {
2511
+ let r2 = So(e5, t2, n2), i2 = go.get(r2);
2512
+ return i2 || (i2 = new Intl.NumberFormat(e5, { ...n2, style: `currency`, currency: t2 }), go.size >= _o && go.clear(), go.set(r2, i2)), i2;
2507
2513
  }
2508
- function bo(e5, { value: t2, currency: n2 }, r2 = {}) {
2509
- return _o(t2), yo(e5, n2, r2).format(t2);
2514
+ function wo(e5, { value: t2, currency: n2 }, r2 = {}) {
2515
+ return xo(t2), Co(e5, n2, r2).format(t2);
2510
2516
  }
2511
- function xo(e5, { value: t2, currency: n2 }, r2 = {}) {
2512
- return _o(t2), yo(e5, n2, r2).formatToParts(t2);
2517
+ function To(e5, { value: t2, currency: n2 }, r2 = {}) {
2518
+ return xo(t2), Co(e5, n2, r2).formatToParts(t2);
2513
2519
  }
2514
- function So(e5) {
2515
- return Ni().find((e6) => e6.primary)?.id ?? e5;
2520
+ function Eo(e5) {
2521
+ return Fi().find((e6) => e6.primary)?.id ?? e5;
2516
2522
  }
2517
- function Co(e5, t2) {
2523
+ function Do(e5, t2) {
2518
2524
  let { locale: n2, ...r2 } = t2 ?? {}, i2 = n2 ?? e5.essentials?.locale;
2519
2525
  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.`);
2520
2526
  return { locale: i2, formatOptions: r2 };
2521
2527
  }
2522
- var wo = fa({ getLanguage: (e5) => () => {
2528
+ var Oo = ga({ getLanguage: (e5) => () => {
2523
2529
  let t2 = e5.essentials?.language;
2524
2530
  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.`);
2525
2531
  return t2;
@@ -2528,20 +2534,20 @@ var wo = fa({ getLanguage: (e5) => () => {
2528
2534
  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.`);
2529
2535
  return t2;
2530
2536
  }, formatCurrency: (e5) => (t2, n2) => {
2531
- let { locale: r2, formatOptions: i2 } = Co(e5, n2);
2532
- return bo(r2, t2, i2);
2537
+ let { locale: r2, formatOptions: i2 } = Do(e5, n2);
2538
+ return wo(r2, t2, i2);
2533
2539
  }, formatCurrencyToParts: (e5) => (t2, n2) => {
2534
- let { locale: r2, formatOptions: i2 } = Co(e5, n2);
2535
- return xo(r2, t2, i2);
2540
+ let { locale: r2, formatOptions: i2 } = Do(e5, n2);
2541
+ return To(r2, t2, i2);
2536
2542
  }, getTranslationFunction: (e5) => () => {
2537
2543
  let t2 = e5.translations?.();
2538
2544
  if (!t2) throw Error(`Host translation resources are not available.`);
2539
- let n2 = Q.createInstance(), r2 = So(e5.essentials?.language) || `en`, i2 = { lng: e5.essentials?.language || r2, fallbackLng: r2, resources: t2 };
2540
- return n2.use(fo).init(i2, (e6) => {
2545
+ let n2 = Q.createInstance(), r2 = Eo(e5.essentials?.language) || `en`, i2 = { lng: e5.essentials?.language || r2, fallbackLng: r2, resources: t2 };
2546
+ return n2.use(ho).init(i2, (e6) => {
2541
2547
  if (e6) throw e6;
2542
2548
  }), n2.t.bind(n2);
2543
2549
  } });
2544
- var To = class {
2550
+ var ko = class {
2545
2551
  constructor(e5) {
2546
2552
  this.message = e5, this.captureException = () => {
2547
2553
  console.error(this.message);
@@ -2556,93 +2562,97 @@ var To = class {
2556
2562
  };
2557
2563
  }
2558
2564
  };
2559
- var Eo = (e5) => new To(e5);
2560
- var Do = fa({ getMonitoringClient: (e5) => () => e5.getMonitoringClient ? e5.getMonitoringClient() : Eo(`Host monitoring client is not available on the current host. Make sure to use an updated version of the host initialization package.`) });
2561
- var Oo = { 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` };
2562
- function ko(e5) {
2565
+ var Ao = (e5) => new ko(e5);
2566
+ var jo = ga({ getMonitoringClient: (e5) => () => e5.getMonitoringClient ? e5.getMonitoringClient() : Ao(`Host monitoring client is not available on the current host. Make sure to use an updated version of the host initialization package.`) });
2567
+ var Mo = { 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` };
2568
+ function No(e5) {
2563
2569
  try {
2564
- let t2 = Do.getMonitoringClient?.();
2570
+ let t2 = jo.getMonitoringClient?.();
2565
2571
  return t2 && typeof t2[e5] == `function` ? t2 : null;
2566
2572
  } catch {
2567
2573
  return null;
2568
2574
  }
2569
2575
  }
2570
- function Ao(e5, { feature: t2, action: n2, level: r2 = `error`, contexts: i2 }) {
2571
- let a2 = ko(`captureException`);
2576
+ function Po(e5, { feature: t2, action: n2, level: r2 = `error`, contexts: i2 }) {
2577
+ let a2 = No(`captureException`);
2572
2578
  if (!a2) return;
2573
2579
  let o2 = e5 instanceof Error ? e5 : Error(String(e5));
2574
2580
  a2.captureException(o2, { level: r2, tags: { feature: t2, action: n2 }, ...i2 ? { contexts: i2 } : {} });
2575
2581
  }
2576
- function jo(e5, { feature: t2, tags: n2 }, r2) {
2577
- let i2 = ko(`startSpanManual`);
2582
+ function Fo(e5, { feature: t2, tags: n2 }, r2) {
2583
+ let i2 = No(`startSpanManual`);
2578
2584
  if (!i2) return r2;
2579
2585
  let a2 = i2.startSpanManual({ name: e5, tags: { feature: t2, ...n2 } });
2580
2586
  return r2.then(() => a2.end(), (e6) => a2.fail(e6)), r2;
2581
2587
  }
2582
- var Mo = class extends import_react.Component {
2588
+ var Io = class extends import_react.Component {
2583
2589
  state = { hasError: false };
2584
2590
  static getDerivedStateFromError() {
2585
2591
  return { hasError: true };
2586
2592
  }
2587
2593
  componentDidCatch(e5, t2) {
2588
- Ao(e5, { feature: this.props.feature ?? `service`, action: `render`, contexts: { react: { componentStack: t2.componentStack } } });
2594
+ Po(e5, { feature: this.props.feature ?? `service`, action: `render`, contexts: { react: { componentStack: t2.componentStack } } });
2589
2595
  }
2590
2596
  render() {
2591
2597
  return this.state.hasError ? this.props.fallback : this.props.children;
2592
2598
  }
2593
2599
  };
2594
- function No(e5) {
2600
+ function Lo(e5) {
2595
2601
  let t2 = e5;
2596
- if (t2.__state || (t2.__state = { status: `pending` }, t2.then((e6) => {
2602
+ return t2.__state || (t2.__state = { status: `pending` }, t2.then((e6) => {
2597
2603
  t2.__state = { status: `fulfilled`, value: e6 };
2598
2604
  }, (e6) => {
2599
2605
  t2.__state = { status: `rejected`, reason: e6 };
2600
- })), t2.__state.status === `fulfilled`) return t2.__state.value;
2601
- throw t2.__state.status === `rejected` ? t2.__state.reason : t2;
2606
+ })), t2.__state;
2607
+ }
2608
+ function Ro(e5) {
2609
+ let t2 = Lo(e5);
2610
+ if (t2.status === `fulfilled`) return t2.value;
2611
+ throw t2.status === `rejected` ? t2.reason : e5;
2602
2612
  }
2603
- function Po(e5) {
2613
+ function zo(e5) {
2604
2614
  let t2 = Promise.resolve(e5);
2605
2615
  return t2.__state = { status: `fulfilled`, value: e5 }, t2;
2606
2616
  }
2607
- var Fo = /* @__PURE__ */ new WeakMap();
2608
- function Io(e5, t2, n2) {
2609
- let r2 = Fo.get(e5);
2610
- r2 || (r2 = /* @__PURE__ */ new WeakMap(), Fo.set(e5, r2));
2617
+ var Bo = /* @__PURE__ */ new WeakMap();
2618
+ function Vo(e5, t2, n2) {
2619
+ let r2 = Bo.get(e5);
2620
+ r2 || (r2 = /* @__PURE__ */ new WeakMap(), Bo.set(e5, r2));
2611
2621
  let i2 = r2.get(t2);
2612
2622
  i2 || (i2 = /* @__PURE__ */ new WeakMap(), r2.set(t2, i2));
2613
2623
  let a2 = i2.get(n2);
2614
2624
  if (!a2) {
2615
2625
  let r3 = e5;
2616
- a2 = r3.__state?.status === `fulfilled` ? Po(t2(r3.__state.value)) : r3.__state?.status === `rejected` ? Po(n2(r3.__state.reason)) : e5.then(t2, n2), i2.set(n2, a2);
2626
+ a2 = r3.__state?.status === `fulfilled` ? zo(t2(r3.__state.value)) : r3.__state?.status === `rejected` ? zo(n2(r3.__state.reason)) : e5.then(t2, n2), i2.set(n2, a2);
2617
2627
  }
2618
2628
  return a2;
2619
2629
  }
2620
- function Lo(e5) {
2630
+ function $(e5) {
2621
2631
  return e5;
2622
2632
  }
2623
- var Ro = Lo(`@wix/site-service-warmup-data`);
2624
- function zo() {
2633
+ var Ho = $(`@wix/site-service-warmup-data`);
2634
+ function Uo() {
2625
2635
  try {
2626
2636
  return (0, import_services_manager_react.useGetService)();
2627
2637
  } catch {
2628
2638
  return null;
2629
2639
  }
2630
2640
  }
2631
- function Bo(e5) {
2641
+ function Wo(e5) {
2632
2642
  try {
2633
- return e5 ? e5(Ro) : null;
2643
+ return e5 ? e5(Ho) : null;
2634
2644
  } catch {
2635
2645
  return null;
2636
2646
  }
2637
2647
  }
2638
- function Vo() {
2639
- let e5 = Bo(zo()), t2 = typeof window > `u`;
2648
+ function Go() {
2649
+ let e5 = Wo(Uo()), t2 = typeof window > `u`;
2640
2650
  return { scope: e5 ?? void 0, get: async (n2) => {
2641
2651
  if (t2 || !e5) return null;
2642
2652
  try {
2643
2653
  return await e5.get(n2);
2644
2654
  } catch (e6) {
2645
- return Ao(e6, { feature: Oo.warmup, action: `read`, level: `warning`, contexts: { warmup: { key: n2 } } }), null;
2655
+ return Po(e6, { feature: Mo.warmup, action: `read`, level: `warning`, contexts: { warmup: { key: n2 } } }), null;
2646
2656
  }
2647
2657
  }, set: (n2, r2) => {
2648
2658
  if (t2 && e5) try {
@@ -2651,75 +2661,109 @@ function Vo() {
2651
2661
  }
2652
2662
  } };
2653
2663
  }
2654
- var Ho = Lo(`@wix/site-service-locale`);
2655
- var Uo = Lo;
2656
- var Wo = Uo(`@wix/viewer-service-multilingual`);
2657
- function Go() {
2664
+ var Ko = $(`@wix/site-service-locale`);
2665
+ var qo = $;
2666
+ var Jo = qo(`@wix/viewer-service-multilingual`);
2667
+ function Yo() {
2658
2668
  try {
2659
- return wo.getLanguage() ?? `en`;
2669
+ return Oo.getLanguage() ?? `en`;
2660
2670
  } catch {
2661
2671
  return `en`;
2662
2672
  }
2663
2673
  }
2664
- function Ko(e5) {
2674
+ function Xo(e5) {
2665
2675
  try {
2666
2676
  return (0, import_services_manager_react.useService)(e5);
2667
2677
  } catch {
2668
2678
  return null;
2669
2679
  }
2670
2680
  }
2671
- function qo() {
2672
- let e5 = Ko(Ho), t2 = Ko(Wo);
2673
- return t2?.multilingualEnabled && t2.currentLocale?.languageCode || e5?.language || Go();
2681
+ function Zo() {
2682
+ let e5 = Xo(Ko), t2 = Xo(Jo);
2683
+ return t2?.multilingualEnabled && t2.currentLocale?.languageCode || e5?.language || Yo();
2684
+ }
2685
+ var Qo = $(`@wix/site-service-renderer-configuration`);
2686
+ function $o() {
2687
+ return (0, import_services_manager_react.useService)(Qo).currency;
2688
+ }
2689
+ function es() {
2690
+ return globalThis.commonConfig?.currency;
2691
+ }
2692
+ function ts(e5) {
2693
+ let t2 = globalThis.window;
2694
+ if (!t2) return () => {
2695
+ };
2696
+ let n2 = t2.navigation, r2 = true, i2 = () => queueMicrotask(() => {
2697
+ r2 && e5();
2698
+ });
2699
+ return n2?.addEventListener(`currententrychange`, i2), t2.addEventListener(`popstate`, e5), () => {
2700
+ r2 = false, n2?.removeEventListener(`currententrychange`, i2), t2.removeEventListener(`popstate`, e5);
2701
+ };
2702
+ }
2703
+ var ns = /^[A-Z]{3}$/;
2704
+ function rs(e5) {
2705
+ return ns.test(e5) ? typeof Intl.supportedValuesOf != `function` || Intl.supportedValuesOf(`currency`).includes(e5) : false;
2674
2706
  }
2675
- var Jo = [];
2676
- var Yo = [];
2677
- var Xo = `useServiceAddOnsContext must be used within ServiceAddOnsContextProvider`;
2678
- function Zo({ isLoading: e5, hasError: t2, children: n2 }) {
2679
- let r2 = { addOnGroups: Jo, selected: Yo, isLoading: e5, hasError: t2, toggleAddOn: () => {
2707
+ function is(e5) {
2708
+ let t2 = e5?.toUpperCase();
2709
+ return t2 && rs(t2) ? t2 : null;
2710
+ }
2711
+ function as(e5, t2) {
2712
+ let n2 = is(e5);
2713
+ return n2 && n2 !== is(t2) ? n2 : null;
2714
+ }
2715
+ function os() {
2716
+ let e5 = (0, import_react.useSyncExternalStore)(ts, es, es), t2 = $o();
2717
+ return (0, import_react.useDeferredValue)(as(e5, t2));
2718
+ }
2719
+ var ss = [];
2720
+ var cs = [];
2721
+ var ls = `useServiceAddOnsContext must be used within ServiceAddOnsContextProvider`;
2722
+ function us({ isLoading: e5, hasError: t2, children: n2 }) {
2723
+ let r2 = { addOnGroups: ss, selected: cs, isLoading: e5, hasError: t2, toggleAddOn: () => {
2680
2724
  }, setAddOnQuantity: () => {
2681
2725
  } };
2682
- return (0, import_jsx_runtime.jsx)(Xs.Provider, { value: r2, children: n2 });
2726
+ return (0, import_jsx_runtime.jsx)(uc.Provider, { value: r2, children: n2 });
2683
2727
  }
2684
- function Qo({ children: e5 }) {
2685
- return (0, import_jsx_runtime.jsx)(Zo, { isLoading: true, hasError: false, children: e5 });
2728
+ function ds({ children: e5 }) {
2729
+ return (0, import_jsx_runtime.jsx)(us, { isLoading: true, hasError: false, children: e5 });
2686
2730
  }
2687
- function $o({ children: e5 }) {
2688
- return (0, import_jsx_runtime.jsx)(Zo, { isLoading: false, hasError: true, children: e5 });
2731
+ function fs({ children: e5 }) {
2732
+ return (0, import_jsx_runtime.jsx)(us, { isLoading: false, hasError: true, children: e5 });
2689
2733
  }
2690
- function es(e5) {
2734
+ function ps(e5) {
2691
2735
  if (!e5) return;
2692
2736
  let t2 = ``;
2693
2737
  return (e5.filename || e5.altText) && (t2 = `/${encodeURIComponent(e5.filename || e5.altText)}`), e5.id ? `wix:image://v1/${e5.id}${t2}#originWidth=${e5.width}&originHeight=${e5.height}` : e5.url;
2694
2738
  }
2695
- var ts = [{ path: `addOnGroupsDetails.addOns.mainMedia.image.urlExpirationDate` }];
2696
- function ns(e5) {
2697
- return ii(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: `` }] } }));
2739
+ var ms = [{ path: `addOnGroupsDetails.addOns.mainMedia.image.urlExpirationDate` }];
2740
+ function hs(e5) {
2741
+ return ai(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: `` }] } }));
2698
2742
  }
2699
- var rs = `@wix/auto_sdk_bookings_services`;
2700
- function is(e5) {
2743
+ var gs = `@wix/auto_sdk_bookings_services`;
2744
+ function _s(e5) {
2701
2745
  function t2({ host: t3 }) {
2702
- return { entityFqdn: `wix.bookings.services.v2.service`, method: `POST`, methodFqn: `wix.bookings.services.v2.AddOnGroupsService.ListAddOnGroupsByServiceId`, packageName: rs, migrationOptions: { optInTransformResponse: true }, url: ns({ protoPath: `/v2/services/add-on-groups/list-add-on-groups-by-service-id`, data: e5, host: t3 }), data: e5, transformResponse: (e6) => Ir(e6, [{ transformFn: Cr, paths: ts }]) };
2746
+ return { entityFqdn: `wix.bookings.services.v2.service`, method: `POST`, methodFqn: `wix.bookings.services.v2.AddOnGroupsService.ListAddOnGroupsByServiceId`, packageName: gs, migrationOptions: { optInTransformResponse: true }, url: hs({ protoPath: `/v2/services/add-on-groups/list-add-on-groups-by-service-id`, data: e5, host: t3 }), data: e5, transformResponse: (e6) => Lr(e6, [{ transformFn: wr, paths: ms }]) };
2703
2747
  }
2704
2748
  return t2;
2705
2749
  }
2706
- var as = [{ path: `addOnGroupsDetails.addOns.mainMedia.image` }];
2707
- async function os(e5, t2) {
2708
- let { httpClient: n2, sideEffects: r2 } = arguments[2], i2 = is(xr({ serviceId: e5, groupIds: t2?.groupIds }));
2750
+ var vs = [{ path: `addOnGroupsDetails.addOns.mainMedia.image` }];
2751
+ async function ys(e5, t2) {
2752
+ let { httpClient: n2, sideEffects: r2 } = arguments[2], i2 = _s(Sr({ serviceId: e5, groupIds: t2?.groupIds }));
2709
2753
  r2?.onSiteCall?.();
2710
2754
  try {
2711
2755
  let e6 = await n2.request(i2);
2712
- return r2?.onSuccess?.(e6), Sr(Ir(e6.data, [{ transformFn: es, paths: as }]));
2756
+ return r2?.onSuccess?.(e6), Cr(Lr(e6.data, [{ transformFn: ps, paths: vs }]));
2713
2757
  } catch (e6) {
2714
- let t3 = Kr(e6, { spreadPathsToArguments: {}, explicitPathsToArguments: { serviceId: `$[0]`, groupIds: `$[1].groupIds` }, singleArgumentUnchanged: false }, [`serviceId`, `options`]);
2758
+ let t3 = qr(e6, { spreadPathsToArguments: {}, explicitPathsToArguments: { serviceId: `$[0]`, groupIds: `$[1].groupIds` }, singleArgumentUnchanged: false }, [`serviceId`, `options`]);
2715
2759
  throw r2?.onError?.(e6), t3;
2716
2760
  }
2717
2761
  }
2718
- function ss(e5) {
2719
- return (t2, n2) => os(t2, n2, { httpClient: e5 });
2762
+ function bs(e5) {
2763
+ return (t2, n2) => ys(t2, n2, { httpClient: e5 });
2720
2764
  }
2721
- var cs = ri(ss);
2722
- function ls(e5, t2) {
2765
+ var xs = ii(bs);
2766
+ function Ss(e5, t2) {
2723
2767
  let n2 = e5?.value, r2 = e5?.currency;
2724
2768
  if (n2 == null || !r2) return null;
2725
2769
  let i2 = Number(n2);
@@ -2727,73 +2771,76 @@ function ls(e5, t2) {
2727
2771
  let a2 = i2 % 1 == 0 ? 0 : 2;
2728
2772
  return new Intl.NumberFormat(t2, { style: `currency`, currency: r2, currencyDisplay: `symbol`, maximumFractionDigits: a2, minimumFractionDigits: a2 }).format(i2).replace(/\p{Zs}/gu, `\xA0`);
2729
2773
  }
2730
- async function us(e5) {
2731
- return (await cs(e5)).addOnGroupsDetails ?? [];
2774
+ async function Cs(e5) {
2775
+ return (await xs(e5)).addOnGroupsDetails ?? [];
2732
2776
  }
2733
- function ds(e5) {
2777
+ function ws(e5) {
2734
2778
  if (!e5) return null;
2735
2779
  try {
2736
- let { id: t2, url: n2, width: r2, height: i2 } = pr.getImageUrl(e5);
2780
+ let { id: t2, url: n2, width: r2, height: i2 } = mr.getImageUrl(e5);
2737
2781
  return t2 && n2 ? { uri: t2, url: n2, width: r2, height: i2 } : null;
2738
2782
  } catch {
2739
2783
  return null;
2740
2784
  }
2741
2785
  }
2742
- function fs(e5, t2) {
2786
+ function Ts(e5, t2) {
2743
2787
  let n2 = e5.price?.value == null ? null : Number(e5.price.value);
2744
- return { addOnId: e5.addOnId ?? null, addOnName: e5.nameTranslated ?? e5.name ?? null, addOnPrice: ls(e5.price, t2), addOnPriceValue: n2 != null && Number.isFinite(n2) ? n2 : null, addOnCurrency: e5.price?.currency ?? null, durationInMinutes: e5.durationInMinutes ?? null, maxQuantity: e5.maxQuantity ?? null, addOnImage: ds(e5.mainMedia?.image), isSelected: false, selectedQuantity: 0 };
2788
+ return { addOnId: e5.addOnId ?? null, addOnName: e5.nameTranslated ?? e5.name ?? null, addOnPrice: Ss(e5.price, t2), addOnPriceValue: n2 != null && Number.isFinite(n2) ? n2 : null, addOnCurrency: e5.price?.currency ?? null, durationInMinutes: e5.durationInMinutes ?? null, maxQuantity: e5.maxQuantity ?? null, addOnImage: ws(e5.mainMedia?.image), isSelected: false, selectedQuantity: 0 };
2745
2789
  }
2746
- function ps(e5, t2) {
2747
- return e5.map((e6) => ({ groupId: e6.groupId ?? null, groupName: e6.groupNameTranslated ?? e6.groupName ?? null, prompt: e6.promptTranslated ?? e6.prompt ?? null, maxNumberOfAddOns: e6.maxNumberOfAddOns ?? null, addOns: (e6.addOns ?? []).map((e7) => fs(e7, t2)), selectedCount: 0, canSelectMore: true }));
2790
+ function Es(e5, t2) {
2791
+ return e5.map((e6) => ({ groupId: e6.groupId ?? null, groupName: e6.groupNameTranslated ?? e6.groupName ?? null, prompt: e6.promptTranslated ?? e6.prompt ?? null, maxNumberOfAddOns: e6.maxNumberOfAddOns ?? null, addOns: (e6.addOns ?? []).map((e7) => Ts(e7, t2)), selectedCount: 0, canSelectMore: true }));
2748
2792
  }
2749
- var ms = `bookings-uou`;
2750
- function hs(e5, t2, n2) {
2751
- return `${ms}:${e5}:addons:${t2}:${n2}`;
2793
+ var Ds = `bookings-uou`;
2794
+ function Os(e5) {
2795
+ return e5 ? `:currency-${e5}` : ``;
2752
2796
  }
2753
- var gs = 5e3;
2754
- var _s = 100;
2755
- var vs = `wix-warmup-data`;
2756
- var ys = null;
2757
- function bs(e5) {
2797
+ function ks(e5, t2, n2, r2) {
2798
+ return `${Ds}:${e5}:addons:${n2}:${r2}${Os(t2)}`;
2799
+ }
2800
+ var As = 5e3;
2801
+ var js = 100;
2802
+ var Ms = `wix-warmup-data`;
2803
+ var Ns = null;
2804
+ function Ps(e5) {
2758
2805
  if (typeof document < `u`) try {
2759
- let t2 = document.getElementById(vs)?.textContent;
2760
- return t2 ? (ys?.text !== t2 && (ys = { text: t2, data: JSON.parse(t2).builderComponentsWarmupData ?? {} }), ys.data[e5] ?? void 0) : void 0;
2806
+ let t2 = document.getElementById(Ms)?.textContent;
2807
+ return t2 ? (Ns?.text !== t2 && (Ns = { text: t2, data: JSON.parse(t2).builderComponentsWarmupData ?? {} }), Ns.data[e5] ?? void 0) : void 0;
2761
2808
  } catch {
2762
2809
  return;
2763
2810
  }
2764
2811
  }
2765
- var xs = () => ({ promises: /* @__PURE__ */ new Map(), invalidatedWarmup: /* @__PURE__ */ new Set() });
2766
- var Ss = xs();
2767
- var Cs = /* @__PURE__ */ new WeakMap();
2768
- var ws = /* @__PURE__ */ new WeakMap();
2769
- function Ts(e5) {
2770
- if (!e5) return Ss;
2771
- let t2 = Cs.get(e5);
2772
- return t2 || (t2 = xs(), Cs.set(e5, t2)), t2;
2812
+ var Fs = () => ({ promises: /* @__PURE__ */ new Map(), invalidatedWarmup: /* @__PURE__ */ new Set() });
2813
+ var Is = Fs();
2814
+ var Ls = /* @__PURE__ */ new WeakMap();
2815
+ var Rs = /* @__PURE__ */ new WeakMap();
2816
+ function zs(e5) {
2817
+ if (!e5) return Is;
2818
+ let t2 = Ls.get(e5);
2819
+ return t2 || (t2 = Fs(), Ls.set(e5, t2)), t2;
2773
2820
  }
2774
- function Es({ key: e5, warmupData: t2, fetchData: n2, refresh: r2 = false }) {
2821
+ function Bs({ key: e5, warmupData: t2, fetchData: n2, refresh: r2 = false }) {
2775
2822
  if (e5 === null) return n2();
2776
2823
  if (typeof window > `u`) {
2777
2824
  let r3 = () => n2().then((n3) => (t2.set(e5, n3), n3)), { scope: i3 } = t2;
2778
2825
  if (!i3) return r3();
2779
- let a3 = ws.get(i3);
2780
- a3 || (a3 = /* @__PURE__ */ new Map(), ws.set(i3, a3));
2826
+ let a3 = Rs.get(i3);
2827
+ a3 || (a3 = /* @__PURE__ */ new Map(), Rs.set(i3, a3));
2781
2828
  let o3 = a3.get(e5);
2782
2829
  if (o3) return o3;
2783
2830
  let s3 = r3();
2784
2831
  return a3.set(e5, s3), s3.catch(() => a3.delete(e5)), s3;
2785
2832
  }
2786
- let i2 = Ts(t2.scope), a2 = Date.now();
2833
+ let i2 = zs(t2.scope), a2 = Date.now();
2787
2834
  for (let [e6, t3] of i2.promises) t3.expiresAt <= a2 && i2.promises.delete(e6);
2788
2835
  let o2 = i2.promises.get(e5);
2789
2836
  if (o2 && !r2) return o2.promise;
2790
2837
  r2 && i2.invalidatedWarmup.add(e5);
2791
2838
  let s2 = !i2.invalidatedWarmup.has(e5);
2792
2839
  if (s2) {
2793
- let t3 = bs(e5);
2840
+ let t3 = Ps(e5);
2794
2841
  if (t3 !== void 0) {
2795
- let n3 = Po(t3);
2796
- return i2.promises.set(e5, { promise: n3, expiresAt: a2 + gs }), n3;
2842
+ let n3 = zo(t3);
2843
+ return i2.promises.set(e5, { promise: n3, expiresAt: a2 + As }), n3;
2797
2844
  }
2798
2845
  }
2799
2846
  let c2 = (async () => {
@@ -2803,37 +2850,37 @@ function Es({ key: e5, warmupData: t2, fetchData: n2, refresh: r2 = false }) {
2803
2850
  }
2804
2851
  return n2();
2805
2852
  })();
2806
- i2.promises.size >= _s && i2.promises.delete(i2.promises.keys().next().value);
2853
+ i2.promises.size >= js && i2.promises.delete(i2.promises.keys().next().value);
2807
2854
  let l2 = { promise: c2, expiresAt: 1 / 0 };
2808
2855
  return i2.promises.set(e5, l2), c2.then(() => {
2809
- l2.expiresAt = Date.now() + gs;
2856
+ l2.expiresAt = Date.now() + As;
2810
2857
  }, () => {
2811
2858
  i2.promises.get(e5) === l2 && i2.promises.delete(e5);
2812
2859
  }), c2;
2813
2860
  }
2814
- function Ds(e5, t2) {
2815
- return jo(`service-addons-context-load`, { feature: Oo.serviceAddOns, tags: { serviceId: e5 } }, us(e5)).then((e6) => ps(e6, t2), (t3) => {
2816
- throw Ao(t3, { feature: Oo.serviceAddOns, action: `fetch-add-on-groups`, level: `warning`, contexts: { service: { serviceId: e5 } } }), t3;
2861
+ function Vs(e5, t2) {
2862
+ return Fo(`service-addons-context-load`, { feature: Mo.serviceAddOns, tags: { serviceId: e5 } }, Cs(e5)).then((e6) => Es(e6, t2), (t3) => {
2863
+ throw Po(t3, { feature: Mo.serviceAddOns, action: `fetch-add-on-groups`, level: `warning`, contexts: { service: { serviceId: e5 } } }), t3;
2817
2864
  });
2818
2865
  }
2819
- function Os({ serviceId: e5, locale: t2, language: n2, warmupData: r2 }) {
2820
- return Es({ key: hs(n2, e5, t2), warmupData: r2, fetchData: () => Ds(e5, t2) });
2866
+ function Hs({ serviceId: e5, locale: t2, language: n2, currency: r2, warmupData: i2 }) {
2867
+ return Bs({ key: ks(n2, r2, e5, t2), warmupData: i2, fetchData: () => Vs(e5, t2) });
2821
2868
  }
2822
- var ks = Uo(`@wix/site-service-business-logger`);
2823
- function As(e5) {
2869
+ var Us = qo(`@wix/site-service-business-logger`);
2870
+ function Ws(e5) {
2824
2871
  return { evid: 32, src: 16, endpoint: ``, params: e5 };
2825
2872
  }
2826
- var js = Lo(`@wix/site-service-url`);
2827
- var Ms = `appSectionParams`;
2828
- function Ns(e5) {
2829
- let t2 = e5.searchParams.get(Ms);
2873
+ var Gs = $(`@wix/site-service-url`);
2874
+ var Ks = `appSectionParams`;
2875
+ function qs(e5) {
2876
+ let t2 = e5.searchParams.get(Ks);
2830
2877
  if (t2 === null) return e5;
2831
2878
  let n2 = new URL(e5);
2832
- n2.searchParams.delete(Ms);
2833
- for (let [e6, r2] of Object.entries(Ps(t2))) typeof r2 == `string` && !n2.searchParams.has(e6) && n2.searchParams.set(e6, r2);
2879
+ n2.searchParams.delete(Ks);
2880
+ for (let [e6, r2] of Object.entries(Js(t2))) typeof r2 == `string` && !n2.searchParams.has(e6) && n2.searchParams.set(e6, r2);
2834
2881
  return n2;
2835
2882
  }
2836
- function Ps(e5) {
2883
+ function Js(e5) {
2837
2884
  try {
2838
2885
  let t2 = JSON.parse(e5);
2839
2886
  return t2 && typeof t2 == `object` && !Array.isArray(t2) ? t2 : {};
@@ -2841,16 +2888,16 @@ function Ps(e5) {
2841
2888
  return {};
2842
2889
  }
2843
2890
  }
2844
- var Fs = `bookings-uou:url-change`;
2845
- var Is = (e5) => {
2891
+ var Ys = `bookings-uou:url-change`;
2892
+ var Xs = (e5) => {
2846
2893
  let t2 = new URL(e5);
2847
2894
  return t2.searchParams.sort(), t2.href;
2848
2895
  };
2849
- function Ls(e5, { disableScrollToTop: t2, skipHistory: n2 } = {}) {
2896
+ function Zs(e5, { disableScrollToTop: t2, skipHistory: n2 } = {}) {
2850
2897
  let r2 = globalThis.window;
2851
2898
  if (!r2?.history) return;
2852
2899
  let i2 = new URL(r2.location.href);
2853
- if (Is(i2) === Is(e5)) return;
2900
+ if (Xs(i2) === Xs(e5)) return;
2854
2901
  let a2 = { scrollY: r2.scrollY };
2855
2902
  if (n2) r2.history.replaceState(a2, ``, e5.href);
2856
2903
  else {
@@ -2861,84 +2908,84 @@ function Ls(e5, { disableScrollToTop: t2, skipHistory: n2 } = {}) {
2861
2908
  return;
2862
2909
  }
2863
2910
  }
2864
- r2.dispatchEvent(new Event(Fs));
2911
+ r2.dispatchEvent(new Event(Ys));
2865
2912
  }
2866
- function Rs(e5) {
2913
+ function Qs(e5) {
2867
2914
  let t2 = globalThis.window;
2868
- return t2 ? (t2.addEventListener(Fs, e5), t2.addEventListener(`popstate`, e5), () => {
2869
- t2.removeEventListener(Fs, e5), t2.removeEventListener(`popstate`, e5);
2915
+ return t2 ? (t2.addEventListener(Ys, e5), t2.addEventListener(`popstate`, e5), () => {
2916
+ t2.removeEventListener(Ys, e5), t2.removeEventListener(`popstate`, e5);
2870
2917
  }) : () => {
2871
2918
  };
2872
2919
  }
2873
- var zs = (e5) => {
2920
+ var $s = (e5) => {
2874
2921
  try {
2875
2922
  return decodeURIComponent(e5);
2876
2923
  } catch {
2877
2924
  return e5;
2878
2925
  }
2879
2926
  };
2880
- function Bs(e5, t2) {
2927
+ function ec(e5, t2) {
2881
2928
  let n2 = t2 ? new URL(t2).pathname : `/`;
2882
- return `./${zs(new URL(e5).pathname.replace(n2, ``).replace(/^\/|\/$/g, ``))}`;
2929
+ return `./${$s(new URL(e5).pathname.replace(n2, ``).replace(/^\/|\/$/g, ``))}`;
2883
2930
  }
2884
- function Vs() {
2885
- let e5 = (0, import_services_manager_react.useService)(js), t2 = (0, import_react.useCallback)(() => e5.currentUrl, [e5]), n2 = (0, import_react.useSyncExternalStore)(Rs, t2, t2), i2 = (0, import_react.useMemo)(() => Ns(new URL(n2)), [n2]), a2 = e5.siteUrl.replace(/\/$/, ``);
2886
- return { pathname: i2.pathname, search: i2.search, searchParams: i2.searchParams, href: i2.href, getParsedUrl: () => Ns(new URL(e5.currentUrl)), getRelativeUrl: () => Bs(e5.currentUrl, a2), getExternalBaseUrl: () => a2, pushUrl: Ls };
2931
+ function tc() {
2932
+ let e5 = (0, import_services_manager_react.useService)(Gs), t2 = (0, import_react.useCallback)(() => e5.currentUrl, [e5]), n2 = (0, import_react.useSyncExternalStore)(Qs, t2, t2), i2 = (0, import_react.useMemo)(() => qs(new URL(n2)), [n2]), a2 = e5.siteUrl.replace(/\/$/, ``);
2933
+ return { pathname: i2.pathname, search: i2.search, searchParams: i2.searchParams, href: i2.href, getParsedUrl: () => qs(new URL(e5.currentUrl)), getRelativeUrl: () => ec(e5.currentUrl, a2), getExternalBaseUrl: () => a2, pushUrl: Zs };
2887
2934
  }
2888
- var Hs = function(e5) {
2935
+ var nc = function(e5) {
2889
2936
  return e5.BOOK_ONLINE = `bookingsBookOnline`, e5.SERVICE_PAGE = `bookingsServicePage`, e5.CALENDAR_PAGE = `bookingsCalendar`, e5.FORM_PAGE = `bookingsForm`, e5;
2890
2937
  }({});
2891
- var Us = { 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` };
2892
- Hs.BOOK_ONLINE;
2893
- var Ws = `new_bookings_server`;
2894
- var Gs = (e5) => {
2895
- let { reportBi: t2 } = (0, import_services_manager_react.useService)(ks);
2938
+ var rc = { 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` };
2939
+ nc.BOOK_ONLINE;
2940
+ var ic = `new_bookings_server`;
2941
+ var ac = (e5) => {
2942
+ let { reportBi: t2 } = (0, import_services_manager_react.useService)(Us);
2896
2943
  return (0, import_react.useCallback)((n2) => {
2897
- t2({ widget_name: e5, bookingsPlatform: Ws, is_over_editor: false, ...n2.params, src: n2.src, evid: n2.evid }, { endpoint: n2.endpoint });
2944
+ t2({ widget_name: e5, bookingsPlatform: ic, is_over_editor: false, ...n2.params, src: n2.src, evid: n2.evid }, { endpoint: n2.endpoint });
2898
2945
  }, [t2, e5]);
2899
2946
  };
2900
- var Ks = (e5, t2 = true) => {
2901
- let n2 = Gs(e5), { getParsedUrl: r2 } = Vs(), i2 = (0, import_react.useRef)(false);
2947
+ var oc = (e5, t2 = true) => {
2948
+ let n2 = ac(e5), { getParsedUrl: r2 } = tc(), i2 = (0, import_react.useRef)(false);
2902
2949
  (0, import_react.useEffect)(() => {
2903
- t2 && !i2.current && (i2.current = true, n2(As({ referralInfo: r2().searchParams.get(aa.referral) ?? void 0 })));
2950
+ t2 && !i2.current && (i2.current = true, n2(Ws({ referralInfo: r2().searchParams.get(la.referral) ?? void 0 })));
2904
2951
  }, [t2, n2, r2]);
2905
2952
  };
2906
- var qs = Po({ addOnGroups: Jo, hasError: false });
2907
- var Js = (e5) => ({ addOnGroups: e5, hasError: false });
2908
- var Ys = () => ({ addOnGroups: Jo, hasError: true });
2909
- var Xs = (0, import_react.createContext)(null);
2910
- function Zs() {
2911
- let e5 = (0, import_react.useContext)(Xs);
2912
- if (!e5) throw Error(Xo);
2953
+ var sc = zo({ addOnGroups: ss, hasError: false });
2954
+ var cc = (e5) => ({ addOnGroups: e5, hasError: false });
2955
+ var lc = () => ({ addOnGroups: ss, hasError: true });
2956
+ var uc = (0, import_react.createContext)(null);
2957
+ function dc() {
2958
+ let e5 = (0, import_react.useContext)(uc);
2959
+ if (!e5) throw Error(ls);
2913
2960
  return e5;
2914
2961
  }
2915
- function Qs({ addOnsPromise: e5, isLoading: t2, pickedAddOns: n2, forwardToggleAddOn: i2, forwardSetAddOnQuantity: a2, children: c2 }) {
2916
- let { addOnGroups: l2, hasError: u2 } = No(e5), d2 = (0, import_react.useMemo)(() => U(l2, n2), [l2, n2]), p2 = (0, import_react.useMemo)(() => na(l2, d2), [l2, d2]), m2 = (0, import_react.useRef)({ source: n2, picks: n2 });
2962
+ function fc({ addOnsPromise: e5, isLoading: t2, pickedAddOns: n2, forwardToggleAddOn: i2, forwardSetAddOnQuantity: a2, children: o2 }) {
2963
+ let { addOnGroups: l2, hasError: u2 } = Ro(e5), d2 = (0, import_react.useMemo)(() => H(l2, n2), [l2, n2]), f2 = (0, import_react.useMemo)(() => oa(l2, d2), [l2, d2]), m2 = (0, import_react.useRef)({ source: n2, picks: n2 });
2917
2964
  m2.current.source !== n2 && (m2.current = { source: n2, picks: n2 });
2918
2965
  let h2 = (e6) => {
2919
2966
  let t3 = m2.current;
2920
- t3.picks = W(e6({ serviceId: ``, addOns: t3.picks }));
2967
+ t3.picks = U(e6({ serviceId: ``, addOns: t3.picks }));
2921
2968
  }, g2 = (0, import_react.useCallback)(() => {
2922
- let e6 = m2.current, t3 = U(l2, e6.picks);
2969
+ let e6 = m2.current, t3 = H(l2, e6.picks);
2923
2970
  return e6.picks.filter((e7) => !t3.includes(e7)).forEach((e7) => a2(e7.id, 0)), e6.picks = t3, t3;
2924
2971
  }, [l2, a2]), _2 = (0, import_react.useCallback)((e6) => {
2925
- let n3 = U(l2, m2.current.picks);
2926
- !t2 && ra(l2, n3, e6) && (g2(), i2(e6), h2((t3) => sa(t3, e6)));
2972
+ let n3 = H(l2, m2.current.picks);
2973
+ !t2 && sa(l2, n3, e6) && (g2(), i2(e6), h2((t3) => da(t3, e6)));
2927
2974
  }, [t2, l2, g2, i2]), v2 = (0, import_react.useCallback)((e6, n3) => {
2928
- let r2 = t2 ? null : $i(l2, e6);
2975
+ let r2 = t2 ? null : ra(l2, e6);
2929
2976
  if (!r2) return;
2930
- let i3 = U(l2, m2.current.picks), o2 = i3.find((t3) => t3.id === e6)?.quantity ?? 0, s2 = ia(r2, n3);
2931
- s2 === o2 || o2 === 0 && !ra(l2, i3, e6) || (g2(), a2(e6, s2), h2((t3) => ca(t3, e6, s2)));
2932
- }, [t2, l2, g2, a2]), y2 = (0, import_react.useMemo)(() => ({ addOnGroups: p2, selected: d2, isLoading: t2, hasError: u2, toggleAddOn: _2, setAddOnQuantity: v2 }), [p2, d2, t2, u2, _2, v2]);
2933
- return (0, import_jsx_runtime.jsx)(Xs.Provider, { value: y2, children: c2 });
2934
- }
2935
- function $s({ children: e5 }) {
2936
- let { service: n2, serviceId: r2, hasAddOns: i2, locale: a2, isLoading: s2, bookingsSettingsLoading: c2, selection: u2, toggleAddOn: d2, setAddOnQuantity: p2 } = (0, import_service.useServiceContext)();
2937
- Ks(Us.SERVICE_ADD_ONS, !s2 && !c2);
2938
- let m2 = (0, import_react.useMemo)(() => W(u2), [u2]), h2 = Vo(), g2 = qo(), _2 = n2 && i2 && r2 ? r2 : null, v2 = (0, import_react.useMemo)(() => _2 ? Io(Os({ serviceId: _2, locale: a2, language: g2, warmupData: h2 }), Js, Ys) : qs, [_2, a2, g2]), y2 = !_2 && !!s2;
2939
- return (0, import_jsx_runtime.jsx)(Mo, { fallback: (0, import_jsx_runtime.jsx)($o, { children: e5 }), feature: Oo.serviceAddOns, children: (0, import_jsx_runtime.jsx)(import_react.Suspense, { fallback: (0, import_jsx_runtime.jsx)(Qo, { children: e5 }), children: (0, import_jsx_runtime.jsx)(Qs, { addOnsPromise: v2, isLoading: y2, pickedAddOns: m2, forwardToggleAddOn: d2, forwardSetAddOnQuantity: p2, children: e5 }) }) });
2940
- }
2941
- var ec = Qi(`bcc1b809-bde5-4d7d-a7bb-89831fe5ccb8`);
2977
+ let i3 = H(l2, m2.current.picks), o3 = i3.find((t3) => t3.id === e6)?.quantity ?? 0, s2 = ca(r2, n3);
2978
+ s2 === o3 || o3 === 0 && !sa(l2, i3, e6) || (g2(), a2(e6, s2), h2((t3) => fa(t3, e6, s2)));
2979
+ }, [t2, l2, g2, a2]), y2 = (0, import_react.useMemo)(() => ({ addOnGroups: f2, selected: d2, isLoading: t2, hasError: u2, toggleAddOn: _2, setAddOnQuantity: v2 }), [f2, d2, t2, u2, _2, v2]);
2980
+ return (0, import_jsx_runtime.jsx)(uc.Provider, { value: y2, children: o2 });
2981
+ }
2982
+ function pc({ children: e5 }) {
2983
+ let { service: n2, serviceId: r2, hasAddOns: i2, locale: a2, isLoading: o2, bookingsSettingsLoading: c2, selection: l2, toggleAddOn: d2, setAddOnQuantity: f2 } = (0, import_service.useServiceContext)();
2984
+ oc(rc.SERVICE_ADD_ONS, !o2 && !c2);
2985
+ let m2 = (0, import_react.useMemo)(() => U(l2), [l2]), h2 = Go(), g2 = Zo(), _2 = os(), v2 = n2 && i2 && r2 ? r2 : null, y2 = (0, import_react.useMemo)(() => v2 ? Vo(Hs({ serviceId: v2, locale: a2, language: g2, currency: _2, warmupData: h2 }), cc, lc) : sc, [v2, a2, g2, _2]), b2 = !v2 && !!o2;
2986
+ return (0, import_jsx_runtime.jsx)(Io, { fallback: (0, import_jsx_runtime.jsx)(fs, { children: e5 }), feature: Mo.serviceAddOns, children: (0, import_jsx_runtime.jsx)(import_react.Suspense, { fallback: (0, import_jsx_runtime.jsx)(ds, { children: e5 }), children: (0, import_jsx_runtime.jsx)(fc, { addOnsPromise: y2, isLoading: b2, pickedAddOns: m2, forwardToggleAddOn: d2, forwardSetAddOnQuantity: f2, children: e5 }) }) });
2987
+ }
2988
+ var mc = na(`bcc1b809-bde5-4d7d-a7bb-89831fe5ccb8`);
2942
2989
  // Annotate the CommonJS export names for ESM import in node:
2943
2990
  0 && (module.exports = {
2944
2991
  ServiceAddOnsContextProvider,