@wix/bookings 1.0.1772 → 1.0.1773

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.
@@ -1,13 +1,13 @@
1
1
  // _sdk-exports/context-services/runtime.js
2
2
  import { Component as e, Suspense as t, createContext as n, startTransition as r, useCallback as i, useContext as a, useDeferredValue as o, useEffect as s, useMemo as c, useRef as l, useState as u, useSyncExternalStore as d } from "react";
3
3
  import { useGetService as f, useService as p } from "@wix/services-manager-react";
4
- import { jsx as m, jsxs as ee } from "react/jsx-runtime";
5
- var h = {};
6
- function g(e2, t2 = false, n2 = (e3) => e3) {
7
- return () => ({ __type: `event-definition`, type: e2, isDomainEvent: t2, transformations: n2 });
4
+ import { jsx as m, jsxs as h } from "react/jsx-runtime";
5
+ var g = {};
6
+ function _(e5, t2 = false, n2 = (e6) => e6) {
7
+ return () => ({ __type: `event-definition`, type: e5, isDomainEvent: t2, transformations: n2 });
8
8
  }
9
- var _ = (e2) => {
10
- switch (e2) {
9
+ var v = (e5) => {
10
+ switch (e5) {
11
11
  case `get`:
12
12
  case `GET`:
13
13
  return `GET`;
@@ -30,73 +30,73 @@ var _ = (e2) => {
30
30
  case `OPTIONS`:
31
31
  return `OPTIONS`;
32
32
  default:
33
- throw Error(`Unknown method: ${e2}`);
33
+ throw Error(`Unknown method: ${e5}`);
34
34
  }
35
35
  };
36
- var v = (e2) => (t2) => async (n2) => {
36
+ var y = (e5) => (t2) => async (n2) => {
37
37
  let r2, i2 = (t3) => {
38
- if (r2 = e2(n2)(t3), r2.url === void 0) throw Error(`Url was not successfully created for this request, please reach out to support channels for assistance.`);
38
+ 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.`);
39
39
  let { method: i3, url: a2, params: o2 } = r2;
40
- return { ...r2, method: _(i3), url: a2, data: r2.data, params: o2 };
40
+ return { ...r2, method: v(i3), url: a2, data: r2.data, params: o2 };
41
41
  };
42
42
  try {
43
- let e3 = await t2.request(i2);
43
+ let e6 = await t2.request(i2);
44
44
  if (r2 === void 0) throw Error(`Request options were not created for this request, please reach out to support channels for assistance.`);
45
- let n3 = Array.isArray(r2.transformResponse) ? r2.transformResponse : [r2.transformResponse], a2 = e3.data;
45
+ let n3 = Array.isArray(r2.transformResponse) ? r2.transformResponse : [r2.transformResponse], a2 = e6.data;
46
46
  return n3.forEach((t3) => {
47
- t3 && (a2 = t3(e3.data, e3.headers));
47
+ t3 && (a2 = t3(e6.data, e6.headers));
48
48
  }), a2;
49
- } catch (e3) {
50
- throw typeof e3 == `object` && e3 && `response` in e3 && typeof e3.response == `object` && e3.response !== null && `data` in e3.response ? e3.response.data : e3;
49
+ } catch (e6) {
50
+ throw typeof e6 == `object` && e6 && `response` in e6 && typeof e6.response == `object` && e6.response !== null && `data` in e6.response ? e6.response.data : e6;
51
51
  }
52
52
  };
53
- var y = (e2) => e2.__isAmbassador ? true : !!e2().__isAmbassador;
54
- var b = `__metadata`;
55
- var te = `edge.wixapis.com`;
56
- var x = class extends Error {
53
+ var b = (e5) => e5.__isAmbassador ? true : !!e5().__isAmbassador;
54
+ var x = `__metadata`;
55
+ var S = `edge.wixapis.com`;
56
+ var ee = class extends Error {
57
57
  message;
58
58
  response;
59
- constructor(e2, t2) {
60
- super(e2), this.message = e2, this.response = t2;
59
+ constructor(e5, t2) {
60
+ super(e5), this.message = e5, this.response = t2;
61
61
  }
62
62
  async details() {
63
- let e2 = await this.response.json();
64
- return S(this.response.status, e2?.message, e2?.details, { requestId: this.response.headers.get(`X-Wix-Request-Id`), details: e2 });
63
+ let e5 = await this.response.json();
64
+ return C(this.response.status, e5?.message, e5?.details, { requestId: this.response.headers.get(`X-Wix-Request-Id`), details: e5 });
65
65
  }
66
66
  };
67
- var S = (e2, t2, n2, r2) => ({ details: { ...!n2?.validationError && { applicationError: { description: t2, code: e2, data: r2 } }, ...n2 }, message: t2, requestId: r2?.requestId });
68
- var C = (e2) => e2?.method && [`post`, `put`, `patch`].includes(e2.method.toLocaleLowerCase()) && e2.body ? { "Content-Type": `application/json` } : {};
69
- var w = (e2) => e2 && typeof e2 == `object` && !Array.isArray(e2);
70
- var T = (e2) => e2.__type === `host`;
71
- function E(e2, t2) {
72
- return e2.create(t2);
73
- }
74
- var ne = `x-wix-bi-gateway`;
75
- function re(e2, t2, n2) {
76
- return { [ne]: ie({ environment: `js-sdk${n2 ? `-${n2}` : ``}`, "package-name": e2.packageName ?? t2?.PACKAGE_NAME, "method-fqn": e2.methodFqn, entity: e2.entityFqdn }) };
77
- }
78
- function ie(e2) {
79
- return Object.entries(e2).filter(([e3, t2]) => !!t2).map(([e3, t2]) => `${e3}=${t2}`).join(`,`);
80
- }
81
- function D(e2) {
82
- let t2 = globalThis.__wix_context__, n2 = { client: h.client, elevatedClient: h.elevatedClient }, r2;
83
- globalThis.__wix_context__ = void 0, h.client = void 0, h.elevatedClient = void 0, typeof $wixContext < `u` && (r2 = { client: $wixContext?.client, elevatedClient: $wixContext?.elevatedClient }, delete $wixContext.client, delete $wixContext.elevatedClient);
67
+ var C = (e5, t2, n2, r2) => ({ details: { ...!n2?.validationError && { applicationError: { description: t2, code: e5, data: r2 } }, ...n2 }, message: t2, requestId: r2?.requestId });
68
+ var w = (e5) => e5?.method && [`post`, `put`, `patch`].includes(e5.method.toLocaleLowerCase()) && e5.body ? { "Content-Type": `application/json` } : {};
69
+ var T = (e5) => e5 && typeof e5 == `object` && !Array.isArray(e5);
70
+ var E = (e5) => e5.__type === `host`;
71
+ function D(e5, t2) {
72
+ return e5.create(t2);
73
+ }
74
+ var O = `x-wix-bi-gateway`;
75
+ function te(e5, t2, n2) {
76
+ return { [O]: ne({ environment: `js-sdk${n2 ? `-${n2}` : ``}`, "package-name": e5.packageName ?? t2?.PACKAGE_NAME, "method-fqn": e5.methodFqn, entity: e5.entityFqdn }) };
77
+ }
78
+ function ne(e5) {
79
+ return Object.entries(e5).filter(([e6, t2]) => !!t2).map(([e6, t2]) => `${e6}=${t2}`).join(`,`);
80
+ }
81
+ function re(e5) {
82
+ let t2 = globalThis.__wix_context__, n2 = { client: g.client, elevatedClient: g.elevatedClient }, r2;
83
+ globalThis.__wix_context__ = void 0, g.client = void 0, g.elevatedClient = void 0, typeof $wixContext < `u` && (r2 = { client: $wixContext?.client, elevatedClient: $wixContext?.elevatedClient }, delete $wixContext.client, delete $wixContext.elevatedClient);
84
84
  try {
85
- return e2();
85
+ return e5();
86
86
  } finally {
87
- globalThis.__wix_context__ = t2, h.client = n2.client, h.elevatedClient = n2.elevatedClient, typeof $wixContext < `u` && ($wixContext.client = r2.client, $wixContext.elevatedClient = r2.elevatedClient);
87
+ globalThis.__wix_context__ = t2, g.client = n2.client, g.elevatedClient = n2.elevatedClient, typeof $wixContext < `u` && ($wixContext.client = r2.client, $wixContext.elevatedClient = r2.elevatedClient);
88
88
  }
89
89
  }
90
- var ae = { id: `_id`, createdDate: `_createdDate`, updatedDate: `_updatedDate` };
91
- function O(e2) {
92
- return ue(e2).map((e3) => e3.toLocaleUpperCase()).join(`_`);
90
+ var ie = { id: `_id`, createdDate: `_createdDate`, updatedDate: `_updatedDate` };
91
+ function ae(e5) {
92
+ return ue(e5).map((e6) => e6.toLocaleUpperCase()).join(`_`);
93
93
  }
94
94
  var oe = /([\p{Ll}\d])(\p{Lu})/gu;
95
95
  var se = /(\p{Lu})([\p{Lu}][\p{Ll}])/gu;
96
96
  var ce = `$1\0$2`;
97
97
  var le = /[^\p{L}\d]+/giu;
98
- function ue(e2) {
99
- let t2 = e2.trim();
98
+ function ue(e5) {
99
+ let t2 = e5.trim();
100
100
  t2 = t2.replace(oe, ce).replace(se, ce), t2 = t2.replace(le, `\0`);
101
101
  let n2 = 0, r2 = t2.length;
102
102
  for (; t2.charAt(n2) === `\0`; ) n2++;
@@ -104,110 +104,110 @@ function ue(e2) {
104
104
  for (; t2.charAt(r2 - 1) === `\0`; ) r2--;
105
105
  return t2.slice(n2, r2).split(/\0/g);
106
106
  }
107
- var de = (e2) => `validationError` in (e2.response?.data?.details ?? {});
108
- var fe = (e2) => `applicationError` in (e2.response?.data?.details ?? {});
109
- var pe = (e2) => (e2.response?.status ?? -1) >= 400 && (e2.response?.status ?? -1) < 500;
110
- function me(e2, t2 = { explicitPathsToArguments: {}, spreadPathsToArguments: {}, singleArgumentUnchanged: false }, n2 = []) {
111
- if (typeof e2 != `object` || !e2) throw e2;
112
- if (de(e2)) return he(e2, t2, n2);
113
- if (fe(e2)) return _e(e2);
114
- if (pe(e2)) {
115
- let t3 = e2.response?.status, n3 = e2.response?.statusText ?? `UNKNOWN`, r2 = e2.response?.data?.message ?? n3, i2 = { applicationError: { description: n3, code: O(n3), data: {} }, requestId: e2.requestId };
116
- return ge(e2, { message: JSON.stringify({ message: r2, details: i2 }, null, 2), extraProperties: { details: i2, status: t3 } });
117
- }
118
- return ve(e2);
119
- }
120
- var he = (e2, t2, n2) => {
121
- let r2 = e2.response?.data, i2 = e2.requestId, { fieldViolations: a2 } = r2.details.validationError, o2 = ye(t2, a2, n2)?.sort((e3, t3) => e3.field < t3.field ? -1 : 1), s2 = `INVALID_ARGUMENT: ${o2?.map(({ field: e3, description: t3 }) => `"${e3}" ${t3}`)?.join(`, `)}`, c2 = { validationError: { fieldViolations: o2 }, requestId: i2 };
122
- return ge(e2, { message: JSON.stringify({ message: s2, details: c2 }, null, 2), extraProperties: { details: c2, status: e2.response?.status, requestId: i2 } });
123
- };
124
- var ge = (e2, { message: t2, extraProperties: n2 }) => Object.assign(e2, { ...n2, message: t2 });
125
- var _e = (e2) => {
126
- let t2 = e2.response?.status, n2 = e2.response?.statusText ?? `UNKNOWN`, r2 = e2.response?.data?.message ?? n2, i2 = e2.response?.data?.details?.applicationError?.description ?? n2, a2 = e2.response?.data?.details?.applicationError?.code ?? O(n2), o2 = e2.response?.data?.details?.applicationError?.data ?? {}, s2 = r2 === i2 ? r2 : `${r2}: ${i2}`, c2 = { applicationError: { description: i2, code: a2, data: o2 }, requestId: e2.requestId };
127
- return ge(e2, { message: JSON.stringify({ message: s2, details: c2 }, null, 2), extraProperties: { details: c2, status: t2, requestId: e2.requestId } });
128
- };
129
- var ve = (e2) => ge(e2, { message: e2.requestId ? `System error occurred, request-id: ${e2.requestId}` : `System error occurred: ${JSON.stringify(e2)}`, extraProperties: { requestId: e2.requestId, status: e2.response?.status, code: O(e2.response?.statusText ?? `UNKNOWN`), ...!e2.response && { runtimeError: e2 } } });
130
- var ye = ({ spreadPathsToArguments: e2, explicitPathsToArguments: t2, singleArgumentUnchanged: n2 }, r2, i2) => {
131
- let a2 = { ...e2, ...t2 }, o2 = Object.keys(a2);
132
- return r2?.filter((e3) => !r2.some((t3) => t3.field.length > e3.field.length && t3.field.startsWith(e3.field) && o2.includes(t3.field))).map((e3) => {
133
- let r3 = t2[e3.field];
134
- if (r3) return { ...e3, field: be(r3, i2) };
135
- let s2 = o2?.sort((e4, t3) => t3.length - e4.length)?.find((t3) => e3.field.startsWith(t3));
107
+ var de = (e5) => `validationError` in (e5.response?.data?.details ?? {});
108
+ var fe = (e5) => `applicationError` in (e5.response?.data?.details ?? {});
109
+ var pe = (e5) => (e5.response?.status ?? -1) >= 400 && (e5.response?.status ?? -1) < 500;
110
+ function me(e5, t2 = { explicitPathsToArguments: {}, spreadPathsToArguments: {}, singleArgumentUnchanged: false }, n2 = []) {
111
+ if (typeof e5 != `object` || !e5) throw e5;
112
+ if (de(e5)) return he(e5, t2, n2);
113
+ if (fe(e5)) return _e(e5);
114
+ if (pe(e5)) {
115
+ let t3 = e5.response?.status, n3 = e5.response?.statusText ?? `UNKNOWN`, r2 = e5.response?.data?.message ?? n3, i2 = { applicationError: { description: n3, code: ae(n3), data: {} }, requestId: e5.requestId };
116
+ return ge(e5, { message: JSON.stringify({ message: r2, details: i2 }, null, 2), extraProperties: { details: i2, status: t3 } });
117
+ }
118
+ return ve(e5);
119
+ }
120
+ var he = (e5, t2, n2) => {
121
+ let r2 = e5.response?.data, i2 = e5.requestId, { fieldViolations: a2 } = r2.details.validationError, o2 = ye(t2, a2, n2)?.sort((e6, t3) => e6.field < t3.field ? -1 : 1), s2 = `INVALID_ARGUMENT: ${o2?.map(({ field: e6, description: t3 }) => `"${e6}" ${t3}`)?.join(`, `)}`, c2 = { validationError: { fieldViolations: o2 }, requestId: i2 };
122
+ return ge(e5, { message: JSON.stringify({ message: s2, details: c2 }, null, 2), extraProperties: { details: c2, status: e5.response?.status, requestId: i2 } });
123
+ };
124
+ var ge = (e5, { message: t2, extraProperties: n2 }) => Object.assign(e5, { ...n2, message: t2 });
125
+ var _e = (e5) => {
126
+ let t2 = e5.response?.status, n2 = e5.response?.statusText ?? `UNKNOWN`, r2 = e5.response?.data?.message ?? n2, i2 = e5.response?.data?.details?.applicationError?.description ?? n2, a2 = e5.response?.data?.details?.applicationError?.code ?? ae(n2), o2 = e5.response?.data?.details?.applicationError?.data ?? {}, s2 = r2 === i2 ? r2 : `${r2}: ${i2}`, c2 = { applicationError: { description: i2, code: a2, data: o2 }, requestId: e5.requestId };
127
+ return ge(e5, { message: JSON.stringify({ message: s2, details: c2 }, null, 2), extraProperties: { details: c2, status: t2, requestId: e5.requestId } });
128
+ };
129
+ var ve = (e5) => ge(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: ae(e5.response?.statusText ?? `UNKNOWN`), ...!e5.response && { runtimeError: e5 } } });
130
+ var ye = ({ spreadPathsToArguments: e5, explicitPathsToArguments: t2, singleArgumentUnchanged: n2 }, r2, i2) => {
131
+ let a2 = { ...e5, ...t2 }, o2 = Object.keys(a2);
132
+ return r2?.filter((e6) => !r2.some((t3) => t3.field.length > e6.field.length && t3.field.startsWith(e6.field) && o2.includes(t3.field))).map((e6) => {
133
+ let r3 = t2[e6.field];
134
+ if (r3) return { ...e6, field: be(r3, i2) };
135
+ let s2 = o2?.sort((e7, t3) => t3.length - e7.length)?.find((t3) => e6.field.startsWith(t3));
136
136
  if (s2) {
137
137
  let t3 = a2[s2];
138
- if (t3) return { ...e3, field: e3.field.replace(s2, be(t3, i2)) };
138
+ if (t3) return { ...e6, field: e6.field.replace(s2, be(t3, i2)) };
139
139
  }
140
- return n2 ? { ...e3, field: `${i2[0]}.${e3.field}` } : e3;
140
+ return n2 ? { ...e6, field: `${i2[0]}.${e6.field}` } : e6;
141
141
  });
142
142
  };
143
- var be = (e2, t2) => {
144
- let n2 = xe(e2);
145
- return n2 == null ? e2 : e2.replace(`$[${n2}]`, t2[n2]);
143
+ var be = (e5, t2) => {
144
+ let n2 = xe(e5);
145
+ return n2 == null ? e5 : e5.replace(`$[${n2}]`, t2[n2]);
146
146
  };
147
- var xe = (e2) => {
148
- let t2 = e2.match(/\$\[(?<argIndex>\d+)\]/);
147
+ var xe = (e5) => {
148
+ let t2 = e5.match(/\$\[(?<argIndex>\d+)\]/);
149
149
  return t2 && t2.groups && Number(t2.groups.argIndex);
150
150
  };
151
- function Se(e2, t2, n2, r2, i2, a2, o2, s2, c2, l2, u2) {
152
- return D(() => e2({ request: async (e3) => {
153
- let i3 = e3({ host: s2?.HTTPHost || `www.wixapis.com` }), a3 = i3;
151
+ function Se(e5, t2, n2, r2, i2, a2, o2, s2, c2, l2, u2) {
152
+ return re(() => e5({ request: async (e6) => {
153
+ let i3 = e6({ host: s2?.HTTPHost || `www.wixapis.com` }), a3 = i3;
154
154
  a3.method === `GET` && a3.fallback?.length && (a3.params?.toString().length ?? 0) > 4e3 && (a3 = i3.fallback[0]);
155
- let o3 = s2?.HTTPHost ?? `www.wixapis.com`, u3 = `https://${l2 ? te : o3}${a3.url}`;
155
+ let o3 = s2?.HTTPHost ?? `www.wixapis.com`, u3 = `https://${l2 ? S : o3}${a3.url}`;
156
156
  a3.params && a3.params.toString() && (u3 += `?${a3.params.toString()}`);
157
157
  try {
158
- let e4 = re(i3, t2, c2), o4 = { method: a3.method, ...a3.data && { body: JSON.stringify(a3.data) }, headers: { ...e4 } }, s3 = await n2(u3, o4);
158
+ let e7 = te(i3, t2, c2), o4 = { method: a3.method, ...a3.data && { body: JSON.stringify(a3.data) }, headers: { ...e7 } }, s3 = await n2(u3, o4);
159
159
  if (s3.status !== 200) {
160
- let e5 = null;
160
+ let e8 = null;
161
161
  try {
162
- e5 = await s3.json();
162
+ e8 = await s3.json();
163
163
  } catch {
164
164
  }
165
- let t3 = we(s3.status, e5?.message ?? s3.statusText, e5?.details, { requestId: s3.headers.get(`X-Wix-Request-Id`), details: e5 }), n3 = me(t3);
165
+ let t3 = we(s3.status, e8?.message ?? s3.statusText, e8?.details, { requestId: s3.headers.get(`X-Wix-Request-Id`), details: e8 }), n3 = me(t3);
166
166
  throw r2?.handleError(n3, { requestOptions: { url: a3.url, method: a3.method, entityFqdn: i3.entityFqdn, methodFqn: i3.methodFqn } }), t3;
167
167
  }
168
168
  let l3 = await s3.json();
169
169
  return { data: a3.migrationOptions?.optInTransformResponse && a3.transformResponse ? Array.isArray(a3.transformResponse) ? a3.transformResponse[0](l3) : a3.transformResponse(l3) : l3, headers: s3.headers, status: s3.status, statusText: s3.statusText };
170
- } catch (e4) {
171
- throw e4.message?.includes(`fetch is not defined`) && console.error(`Node.js v18+ is required`), e4;
170
+ } catch (e7) {
171
+ throw e7.message?.includes(`fetch is not defined`) && console.error(`Node.js v18+ is required`), e7;
172
172
  }
173
173
  }, fetchWithAuth: n2, wixAPIFetch: i2, getActiveToken: a2, getAuthHeaders: o2 }, { validateRequestSchema: u2 }));
174
174
  }
175
175
  var Ce = class extends Error {
176
176
  response;
177
177
  requestId;
178
- constructor(e2) {
179
- super(), this.response = e2.response, this.requestId = e2.requestId;
178
+ constructor(e5) {
179
+ super(), this.response = e5.response, this.requestId = e5.requestId;
180
180
  }
181
181
  };
182
- var we = (e2, t2, n2, r2) => new Ce({ response: { data: { details: { ...!n2?.validationError && { applicationError: { description: t2, code: e2, data: r2 } }, ...n2 }, message: t2 }, status: e2 }, requestId: r2?.requestId });
182
+ var we = (e5, t2, n2, r2) => new Ce({ response: { data: { details: { ...!n2?.validationError && { applicationError: { description: t2, code: e5, data: r2 } }, ...n2 }, message: t2 }, status: e5 }, requestId: r2?.requestId });
183
183
  var Te = `.`;
184
- function Ee(e2, t2, n2) {
185
- if (e2 == null) throw Error(`Cannot set value on null or undefined`);
186
- let r2 = De(t2), i2 = e2;
187
- for (let e3 = 0; e3 < r2.length; e3++) {
188
- let t3 = r2[e3];
189
- if (e3 === r2.length - 1) {
184
+ function Ee(e5, t2, n2) {
185
+ if (e5 == null) throw Error(`Cannot set value on null or undefined`);
186
+ let r2 = De(t2), i2 = e5;
187
+ for (let e6 = 0; e6 < r2.length; e6++) {
188
+ let t3 = r2[e6];
189
+ if (e6 === r2.length - 1) {
190
190
  i2[t3] = n2;
191
191
  break;
192
192
  }
193
- let a2 = r2[e3 + 1];
193
+ let a2 = r2[e6 + 1];
194
194
  (!(t3 in i2) || i2[t3] == null || typeof i2[t3] != `object` || i2[t3] === null) && (i2[t3] = typeof a2 == `number` ? [] : {}), i2 = i2[t3];
195
195
  }
196
- return e2;
196
+ return e5;
197
197
  }
198
- function De(e2) {
199
- return Array.isArray(e2) ? e2 : e2.split(Te).map((e3) => Oe(e3) ? Number(e3) : e3);
198
+ function De(e5) {
199
+ return Array.isArray(e5) ? e5 : e5.split(Te).map((e6) => Oe(e6) ? Number(e6) : e6);
200
200
  }
201
- function Oe(e2) {
202
- return /^\d+$/.test(e2);
201
+ function Oe(e5) {
202
+ return /^\d+$/.test(e5);
203
203
  }
204
- function ke(e2) {
204
+ function ke(e5) {
205
205
  let t2 = {};
206
- for (let [n2, r2] of Object.entries(e2)) Ae(n2) || Ee(t2, De(n2), r2);
206
+ for (let [n2, r2] of Object.entries(e5)) Ae(n2) || Ee(t2, De(n2), r2);
207
207
  return t2;
208
208
  }
209
- function Ae(e2) {
210
- return e2 === `__proto__` || e2 === `constructor` || e2 === `prototype`;
209
+ function Ae(e5) {
210
+ return e5 === `__proto__` || e5 === `constructor` || e5 === `prototype`;
211
211
  }
212
212
  var je = class {
213
213
  BRACKET_PATTERN = /\[(\d+)\]/g;
@@ -222,376 +222,376 @@ var je = class {
222
222
  ESCAPED_LEFT_BRACKET_PLACEHOLDER = `__LB__`;
223
223
  modifiedFields;
224
224
  cleanedModifiedFields;
225
- constructor(e2) {
226
- this.modifiedFields = e2;
225
+ constructor(e5) {
226
+ this.modifiedFields = e5;
227
227
  }
228
- replaceEscapedCharacters(e2) {
229
- return e2.replace(this.ESCAPED_DOT_PATTERN, this.ESCAPED_DOT_PLACEHOLDER).replace(this.ESCAPED_LEFT_BRACKET_PATTERN, this.ESCAPED_LEFT_BRACKET_PLACEHOLDER).replace(this.ESCAPED_RIGHT_BRACKET_PATTERN, this.ESCAPED_RIGHT_BRACKET_PLACEHOLDER);
228
+ replaceEscapedCharacters(e5) {
229
+ return e5.replace(this.ESCAPED_DOT_PATTERN, this.ESCAPED_DOT_PLACEHOLDER).replace(this.ESCAPED_LEFT_BRACKET_PATTERN, this.ESCAPED_LEFT_BRACKET_PLACEHOLDER).replace(this.ESCAPED_RIGHT_BRACKET_PATTERN, this.ESCAPED_RIGHT_BRACKET_PLACEHOLDER);
230
230
  }
231
- restoreEscapedCharacters(e2) {
232
- return e2.replace(this.ESCAPED_DOT_PLACEHOLDER, `\\.`).replace(this.ESCAPED_RIGHT_BRACKET_PLACEHOLDER, `\\]`).replace(this.ESCAPED_LEFT_BRACKET_PLACEHOLDER, `\\[`);
231
+ restoreEscapedCharacters(e5) {
232
+ return e5.replace(this.ESCAPED_DOT_PLACEHOLDER, `\\.`).replace(this.ESCAPED_RIGHT_BRACKET_PLACEHOLDER, `\\]`).replace(this.ESCAPED_LEFT_BRACKET_PLACEHOLDER, `\\[`);
233
233
  }
234
234
  unflatten() {
235
- return this.cleanedModifiedFields = Object.fromEntries(Object.entries(this.modifiedFields).map(([e2, t2]) => [this.replaceEscapedCharacters(this.bracketToDotNotation(e2)), t2])), ke(this.cleanedModifiedFields);
235
+ return this.cleanedModifiedFields = Object.fromEntries(Object.entries(this.modifiedFields).map(([e5, t2]) => [this.replaceEscapedCharacters(this.bracketToDotNotation(e5)), t2])), ke(this.cleanedModifiedFields);
236
236
  }
237
- flatten(e2) {
237
+ flatten(e5) {
238
238
  let t2 = {};
239
239
  for (let n2 of Object.keys(this.cleanedModifiedFields)) {
240
- let r2 = this.splitPath(n2), i2 = this.navigatePath(e2, r2);
240
+ let r2 = this.splitPath(n2), i2 = this.navigatePath(e5, r2);
241
241
  t2 = { ...t2, ...i2 };
242
242
  }
243
- return Object.fromEntries(Object.entries(t2).map(([e3, t3]) => [this.restoreEscapedCharacters(e3), t3]));
243
+ return Object.fromEntries(Object.entries(t2).map(([e6, t3]) => [this.restoreEscapedCharacters(e6), t3]));
244
244
  }
245
- splitPath(e2) {
246
- let t2 = [], n2 = 0, r2 = Array.from(e2.matchAll(this.SPLIT_PATTERN));
247
- for (let i2 of r2) i2.index > n2 && t2.push(e2.substring(n2, i2.index)), i2[1] && t2.push(i2[1]), n2 = i2.index + i2[0].length;
248
- return n2 < e2.length && t2.push(e2.substring(n2)), t2;
245
+ splitPath(e5) {
246
+ let t2 = [], n2 = 0, r2 = Array.from(e5.matchAll(this.SPLIT_PATTERN));
247
+ for (let i2 of r2) i2.index > n2 && t2.push(e5.substring(n2, i2.index)), i2[1] && t2.push(i2[1]), n2 = i2.index + i2[0].length;
248
+ return n2 < e5.length && t2.push(e5.substring(n2)), t2;
249
249
  }
250
- navigatePath(e2, t2) {
251
- let n2 = e2, r2 = [], i2 = (e3) => {
250
+ navigatePath(e5, t2) {
251
+ let n2 = e5, r2 = [], i2 = (e6) => {
252
252
  if (!Array.isArray(n2)) throw Error(`Expected array at path ${this.buildPathString(r2)}, but got ${typeof n2}`);
253
- r2.push(`[${e3}]`), n2 = n2[parseInt(e3, 10)];
254
- }, a2 = (e3, t3) => {
255
- let i3 = e3 in ae ? ae[e3] : void 0;
253
+ r2.push(`[${e6}]`), n2 = n2[parseInt(e6, 10)];
254
+ }, a2 = (e6, t3) => {
255
+ let i3 = e6 in ie ? ie[e6] : void 0;
256
256
  if (i3 && i3 in t3) {
257
257
  r2.push(i3), n2 = t3[i3];
258
258
  return;
259
259
  }
260
- let a3 = Fe(e3);
260
+ let a3 = Fe(e6);
261
261
  if (a3 && a3 in t3) {
262
262
  r2.push(a3), n2 = t3[a3];
263
263
  return;
264
264
  }
265
- throw Error(`Cannot find key '${e3}' or its transformations at path ${this.buildPathString(r2)}`);
266
- }, o2 = (e3, t3) => {
267
- r2.push(e3), n2 = t3[e3];
265
+ throw Error(`Cannot find key '${e6}' or its transformations at path ${this.buildPathString(r2)}`);
266
+ }, o2 = (e6, t3) => {
267
+ r2.push(e6), n2 = t3[e6];
268
268
  };
269
- for (let e3 of t2) {
270
- if (this.NUMERIC_PATTERN.test(e3)) {
271
- i2(e3);
269
+ for (let e6 of t2) {
270
+ if (this.NUMERIC_PATTERN.test(e6)) {
271
+ i2(e6);
272
272
  continue;
273
273
  }
274
- if (typeof n2 != `object` || !n2) throw Error(`Cannot access property '${e3}' on ${typeof n2} at path ${this.buildPathString(r2)}`);
274
+ if (typeof n2 != `object` || !n2) throw Error(`Cannot access property '${e6}' on ${typeof n2} at path ${this.buildPathString(r2)}`);
275
275
  let t3 = n2;
276
- if (e3 in n2) {
277
- o2(e3, t3);
276
+ if (e6 in n2) {
277
+ o2(e6, t3);
278
278
  continue;
279
279
  }
280
- a2(e3, t3);
280
+ a2(e6, t3);
281
281
  }
282
282
  return { [this.buildPathString(r2)]: n2 };
283
283
  }
284
- buildPathString(e2) {
285
- return e2.join(`.`).replace(this.DOT_BEFORE_BRACKET_PATTERN, `[`);
284
+ buildPathString(e5) {
285
+ return e5.join(`.`).replace(this.DOT_BEFORE_BRACKET_PATTERN, `[`);
286
286
  }
287
- bracketToDotNotation(e2) {
288
- return e2.replace(this.BRACKET_PATTERN, (t2, n2, r2) => r2 > 0 && e2[r2 - 1] === `\\` ? t2 : `.` + n2);
287
+ bracketToDotNotation(e5) {
288
+ return e5.replace(this.BRACKET_PATTERN, (t2, n2, r2) => r2 > 0 && e5[r2 - 1] === `\\` ? t2 : `.` + n2);
289
289
  }
290
290
  };
291
- function Me(e2, t2) {
292
- let n2 = e2?.modifiedFields;
291
+ function Me(e5, t2) {
292
+ let n2 = e5?.modifiedFields;
293
293
  if (!n2) return null;
294
294
  let r2 = Ne(n2);
295
295
  if (!r2) return null;
296
296
  let { unflattenedModifiedFields: i2, modifiedFieldsManipulator: a2 } = r2;
297
- e2 = { ...e2, modifiedFields: i2 };
298
- let o2 = t2(e2), s2 = o2?.modifiedFields;
297
+ e5 = { ...e5, modifiedFields: i2 };
298
+ let o2 = t2(e5), s2 = o2?.modifiedFields;
299
299
  if (!s2) return null;
300
300
  let c2 = Pe(s2, a2);
301
301
  return c2 === null ? null : (o2.modifiedFields = c2, o2);
302
302
  }
303
- function Ne(e2) {
304
- if (typeof e2 == `object` && e2 && !Array.isArray(e2)) try {
305
- let t2 = new je(e2);
303
+ function Ne(e5) {
304
+ if (typeof e5 == `object` && e5 && !Array.isArray(e5)) try {
305
+ let t2 = new je(e5);
306
306
  return { unflattenedModifiedFields: t2.unflatten(), modifiedFieldsManipulator: t2 };
307
307
  } catch {
308
308
  return null;
309
309
  }
310
310
  return null;
311
311
  }
312
- function Pe(e2, t2) {
313
- if (typeof e2 == `object` && e2 && !Array.isArray(e2)) try {
314
- return t2.flatten(e2);
312
+ function Pe(e5, t2) {
313
+ if (typeof e5 == `object` && e5 && !Array.isArray(e5)) try {
314
+ return t2.flatten(e5);
315
315
  } catch {
316
316
  return null;
317
317
  }
318
318
  return null;
319
319
  }
320
- function Fe(e2) {
321
- return e2.replace(/[-_\s]+(.)?/g, (e3, t2) => t2 ? t2.toUpperCase() : ``).replace(/^./, (e3) => e3.toLowerCase());
320
+ function Fe(e5) {
321
+ return e5.replace(/[-_\s]+(.)?/g, (e6, t2) => t2 ? t2.toUpperCase() : ``).replace(/^./, (e6) => e6.toLowerCase());
322
322
  }
323
323
  function Ie() {
324
- return { emit(e2, ...t2) {
325
- for (let n2 = 0, r2 = this.events[e2] || [], i2 = r2.length; n2 < i2; n2++) r2[n2](...t2);
326
- }, events: {}, on(e2, t2) {
327
- return (this.events[e2] ||= []).push(t2), () => {
328
- this.events[e2] = this.events[e2]?.filter((e3) => t2 !== e3);
324
+ return { emit(e5, ...t2) {
325
+ for (let n2 = 0, r2 = this.events[e5] || [], i2 = r2.length; n2 < i2; n2++) r2[n2](...t2);
326
+ }, events: {}, on(e5, t2) {
327
+ return (this.events[e5] ||= []).push(t2), () => {
328
+ this.events[e5] = this.events[e5]?.filter((e6) => t2 !== e6);
329
329
  };
330
330
  } };
331
331
  }
332
- var Le = (e2) => e2.__type === `event-definition`;
333
- function Re(e2, t2, n2, r2) {
332
+ var Le = (e5) => e5.__type === `event-definition`;
333
+ function Re(e5, t2, n2, r2) {
334
334
  let i2;
335
- if (e2.isDomainEvent) {
336
- let { deletedEvent: e3, actionEvent: t3, createdEvent: a3, updatedEvent: o3, ...s3 } = n2, c2 = { ...r2, ...s3 };
337
- i2 = e3 ? e3?.deletedEntity ? { entity: e3?.deletedEntity, metadata: c2 } : { metadata: c2 } : t3 ? { data: t3.body, metadata: c2 } : o3 ? { entity: o3.currentEntity, metadata: c2, ...o3.modifiedFields ? { modifiedFields: o3.modifiedFields } : {} } : { entity: a3?.entity, metadata: c2 };
335
+ if (e5.isDomainEvent) {
336
+ let { deletedEvent: e6, actionEvent: t3, createdEvent: a3, updatedEvent: o3, ...s3 } = n2, c2 = { ...r2, ...s3 };
337
+ i2 = e6 ? e6?.deletedEntity ? { entity: e6?.deletedEntity, metadata: c2 } : { metadata: c2 } : t3 ? { data: t3.body, metadata: c2 } : o3 ? { entity: o3.currentEntity, metadata: c2, ...o3.modifiedFields ? { modifiedFields: o3.modifiedFields } : {} } : { entity: a3?.entity, metadata: c2 };
338
338
  } else i2 = { data: n2, metadata: r2 };
339
- let a2 = e2.transformations ?? ((e3) => e3), o2 = i2, s2 = i2;
339
+ let a2 = e5.transformations ?? ((e6) => e6), o2 = i2, s2 = i2;
340
340
  if (s2.modifiedFields) {
341
- let e3 = s2.modifiedFields;
342
- if (typeof e3 == `object` && e3 && !Array.isArray(e3)) {
341
+ let e6 = s2.modifiedFields;
342
+ if (typeof e6 == `object` && e6 && !Array.isArray(e6)) {
343
343
  o2 = structuredClone(i2);
344
- let e4 = Me(s2, a2);
345
- if (e4) return t2(e4);
344
+ let e7 = Me(s2, a2);
345
+ if (e7) return t2(e7);
346
346
  }
347
347
  }
348
348
  return t2(a2(o2));
349
349
  }
350
- function ze(e2) {
350
+ function ze(e5) {
351
351
  let t2 = /* @__PURE__ */ new Map(), n2 = Ie();
352
- return { initModule(e3) {
352
+ return { initModule(e6) {
353
353
  return (r2) => {
354
- let i2 = t2.get(e3.type) ?? [];
355
- i2.push({ eventDefinition: e3, handler: r2 }), t2.set(e3.type, i2), n2.emit(`registered`, e3);
354
+ let i2 = t2.get(e6.type) ?? [];
355
+ i2.push({ eventDefinition: e6, handler: r2 }), t2.set(e6.type, i2), n2.emit(`registered`, e6);
356
356
  };
357
- }, client: { ...n2, getRegisteredEvents: () => t2, async process(e3, n3 = { expectedEvents: [] }) {
358
- let { eventType: r2, identity: i2, instanceId: a2, payload: o2, accountInfo: s2 } = await this.parseJWT(e3), c2 = [...n3.expectedEvents, ...Array.from(t2.keys()).map((e4) => ({ type: e4 }))];
359
- if (c2.length > 0 && !c2.some(({ type: e4 }) => e4 === r2)) throw Error(`Unexpected event type: ${r2}. Expected one of: ${c2.map((e4) => e4.type).join(`, `)}`);
357
+ }, client: { ...n2, getRegisteredEvents: () => t2, async process(e6, n3 = { expectedEvents: [] }) {
358
+ let { eventType: r2, identity: i2, instanceId: a2, payload: o2, accountInfo: s2 } = await this.parseJWT(e6), c2 = [...n3.expectedEvents, ...Array.from(t2.keys()).map((e7) => ({ type: e7 }))];
359
+ if (c2.length > 0 && !c2.some(({ type: e7 }) => e7 === r2)) throw Error(`Unexpected event type: ${r2}. Expected one of: ${c2.map((e7) => e7.type).join(`, `)}`);
360
360
  let l2 = t2.get(r2) ?? [];
361
- return await Promise.all(l2.map(({ eventDefinition: e4, handler: t3 }) => Re(e4, t3, o2, { instanceId: a2, identity: i2, accountInfo: s2 }))), { instanceId: a2, eventType: r2, payload: o2, identity: i2, accountInfo: s2 };
362
- }, async processRequest(e3, t3) {
363
- let n3 = await e3.text();
361
+ return await Promise.all(l2.map(({ eventDefinition: e7, handler: t3 }) => Re(e7, t3, o2, { instanceId: a2, identity: i2, accountInfo: s2 }))), { instanceId: a2, eventType: r2, payload: o2, identity: i2, accountInfo: s2 };
362
+ }, async processRequest(e6, t3) {
363
+ let n3 = await e6.text();
364
364
  return this.process(n3, t3);
365
365
  }, async parseJWT(t3) {
366
- let n3 = e2();
366
+ let n3 = e5();
367
367
  if (!n3.decodeJWT) throw Error(`decodeJWT is not supported by the authentication strategy`);
368
368
  let { decoded: r2, valid: i2 } = await n3.decodeJWT(t3);
369
369
  if (!i2) throw Error(`JWT is not valid`);
370
370
  if (typeof r2.data != `string`) throw Error(`Unexpected type of JWT data: expected string, got ${typeof r2.data}`);
371
371
  let a2 = JSON.parse(r2.data), o2 = a2.eventType, s2 = a2.accountInfo, c2 = a2.instanceId, l2 = a2.identity ? JSON.parse(a2.identity) : void 0;
372
372
  return { instanceId: c2, eventType: o2, payload: JSON.parse(a2.data), identity: l2, accountInfo: s2 };
373
- }, async parseRequest(e3) {
374
- let t3 = await e3.text();
373
+ }, async parseRequest(e6) {
374
+ let t3 = await e6.text();
375
375
  return this.parseJWT(t3);
376
- }, async executeHandlers(e3) {
377
- let n3 = Array.from(t2.keys()).map((e4) => ({ type: e4 }));
378
- if (n3.length > 0 && !n3.some(({ type: t3 }) => t3 === e3.eventType)) throw Error(`Unexpected event type: ${e3.eventType}. Expected one of: ${n3.map((e4) => e4.type).join(`, `)}`);
379
- let r2 = t2.get(e3.eventType) ?? [];
380
- await Promise.all(r2.map(({ eventDefinition: t3, handler: n4 }) => Re(t3, n4, e3.payload, { instanceId: e3.instanceId, identity: e3.identity })));
381
- }, apps: { AppInstalled: g(`AppInstalled`)(), AppRemoved: g(`AppRemoved`)() } } };
382
- }
383
- var Be = (e2) => e2.__type === `service-plugin-definition`;
384
- function Ve(e2) {
376
+ }, async executeHandlers(e6) {
377
+ let n3 = Array.from(t2.keys()).map((e7) => ({ type: e7 }));
378
+ if (n3.length > 0 && !n3.some(({ type: t3 }) => t3 === e6.eventType)) throw Error(`Unexpected event type: ${e6.eventType}. Expected one of: ${n3.map((e7) => e7.type).join(`, `)}`);
379
+ let r2 = t2.get(e6.eventType) ?? [];
380
+ await Promise.all(r2.map(({ eventDefinition: t3, handler: n4 }) => Re(t3, n4, e6.payload, { instanceId: e6.instanceId, identity: e6.identity })));
381
+ }, apps: { AppInstalled: _(`AppInstalled`)(), AppRemoved: _(`AppRemoved`)() } } };
382
+ }
383
+ var Be = (e5) => e5.__type === `service-plugin-definition`;
384
+ function Ve(e5) {
385
385
  let t2 = /* @__PURE__ */ new Map(), n2 = Ie();
386
- return { initModule(e3) {
386
+ return { initModule(e6) {
387
387
  return (r2) => {
388
- let i2 = t2.get(e3.componentType.toLowerCase()) ?? [];
389
- i2.push({ servicePluginDefinition: e3, implementation: r2 }), t2.set(e3.componentType.toLowerCase(), i2), n2.emit(`registered`, e3);
388
+ let i2 = t2.get(e6.componentType.toLowerCase()) ?? [];
389
+ i2.push({ servicePluginDefinition: e6, implementation: r2 }), t2.set(e6.componentType.toLowerCase(), i2), n2.emit(`registered`, e6);
390
390
  };
391
391
  }, client: { ...n2, getRegisteredServicePlugins: () => t2, async parseJWT(t3) {
392
- let n3 = e2();
392
+ let n3 = e5();
393
393
  if (!n3.decodeJWT) throw Error(`decodeJWT is not supported by the authentication strategy`);
394
394
  let { decoded: r2, valid: i2 } = await n3.decodeJWT(t3, true);
395
395
  if (!i2) throw Error(`JWT is not valid`);
396
396
  if (typeof r2.data != `object` || r2.data === null || !(`metadata` in r2.data) || typeof r2.data.metadata != `object` || r2.data.metadata === null || !(`appExtensionType` in r2.data.metadata) || typeof r2.data.metadata.appExtensionType != `string`) throw Error(`Unexpected JWT data: expected object with metadata.appExtensionType string`);
397
397
  return r2.data;
398
- }, async process(e3) {
399
- let t3 = await this.parseJWT(e3.body);
400
- return this.executeHandler(t3, e3.url);
401
- }, async parseRequest(e3) {
402
- let t3 = await e3.text();
398
+ }, async process(e6) {
399
+ let t3 = await this.parseJWT(e6.body);
400
+ return this.executeHandler(t3, e6.url);
401
+ }, async parseRequest(e6) {
402
+ let t3 = await e6.text();
403
403
  return this.parseJWT(t3);
404
- }, async processRequest(e3) {
405
- let t3 = await this.parseRequest(e3);
406
- return this.processParsedRequest(t3, e3.url);
407
- }, async processParsedRequest(e3, t3) {
404
+ }, async processRequest(e6) {
405
+ let t3 = await this.parseRequest(e6);
406
+ return this.processParsedRequest(t3, e6.url);
407
+ }, async processParsedRequest(e6, t3) {
408
408
  try {
409
- let n3 = await this.executeHandler(e3, t3);
409
+ let n3 = await this.executeHandler(e6, t3);
410
410
  return Response.json(n3);
411
- } catch (e4) {
412
- if (e4.errorType === `SPI` && e4.applicationCode && e4.httpCode) return Response.json({ applicationError: { code: e4.applicationCode, data: e4.data } }, { status: e4.httpCode });
413
- throw e4;
411
+ } catch (e7) {
412
+ if (e7.errorType === `SPI` && e7.applicationCode && e7.httpCode) return Response.json({ applicationError: { code: e7.applicationCode, data: e7.data } }, { status: e7.httpCode });
413
+ throw e7;
414
414
  }
415
- }, async executeHandler(e3, n3) {
416
- let r2 = e3.metadata.appExtensionType.toLowerCase(), i2 = t2.get(r2) ?? [];
415
+ }, async executeHandler(e6, n3) {
416
+ let r2 = e6.metadata.appExtensionType.toLowerCase(), i2 = t2.get(r2) ?? [];
417
417
  if (i2.length === 0) throw Error(`No service plugin implementations found for component type ${r2}`);
418
418
  if (i2.length > 1) throw Error(`Multiple service plugin implementations found for component type ${r2}. This is currently not supported`);
419
- let { implementation: a2, servicePluginDefinition: o2 } = i2[0], s2 = o2.methods.find((e4) => n3.endsWith(e4.primaryHttpMappingPath));
419
+ let { implementation: a2, servicePluginDefinition: o2 } = i2[0], s2 = o2.methods.find((e7) => n3.endsWith(e7.primaryHttpMappingPath));
420
420
  if (!s2) throw Error(`Unexpect request: request url did not match any method: ` + n3);
421
421
  let c2 = a2[s2.name];
422
422
  if (!c2) throw Error(`Got request for service plugin method ${s2.name} but no implementation was provided. Available methods: ${Object.keys(a2).join(`, `)}`);
423
- return s2.transformations.toREST(await c2(s2.transformations.fromREST(e3)));
423
+ return s2.transformations.toREST(await c2(s2.transformations.fromREST(e6)));
424
424
  } } };
425
425
  }
426
426
  var k = `X-Wix-Consistent`;
427
- function He(e2) {
428
- let t2 = e2.headers || { Authorization: `` }, n2 = { getAuthHeaders: (e3) => Promise.resolve({ headers: {} }) }, r2 = e2.auth, i2 = typeof r2 == `function` ? r2 : () => r2 ?? n2, a2 = () => i2().getAuthHeaders(e2.host), o2 = () => e2.fetch ?? fetch, s2 = async (n3, r3) => {
429
- let i3 = o2(), s3 = await a2(), c3 = { ...r3?.headers ?? {}, ...s3.headers, ...e2.host?.essentials?.passThroughHeaders, ...t2[`X-Wix-Consistent`] ? { [k]: t2[k] } : {} }, l3 = e2.host?.getErrorHandler?.();
427
+ function He(e5) {
428
+ let t2 = e5.headers || { Authorization: `` }, n2 = { getAuthHeaders: (e6) => Promise.resolve({ headers: {} }) }, r2 = e5.auth, i2 = typeof r2 == `function` ? r2 : () => r2 ?? n2, a2 = () => i2().getAuthHeaders(e5.host), o2 = () => e5.fetch ?? fetch, s2 = async (n3, r3) => {
429
+ let i3 = o2(), s3 = await a2(), c3 = { ...r3?.headers ?? {}, ...s3.headers, ...e5.host?.essentials?.passThroughHeaders, ...t2[`X-Wix-Consistent`] ? { [k]: t2[k] } : {} }, l3 = e5.host?.getErrorHandler?.();
430
430
  try {
431
431
  if (typeof n3 == `string` || n3 instanceof URL) {
432
- let e3 = await i3(n3, { ...r3, headers: c3 });
433
- l3?.handleError(e3, { requestOptions: { url: n3.toString(), method: r3?.method } });
434
- let a3 = Ue(e3);
435
- return a3 && (t2[k] = a3), e3;
432
+ let e6 = await i3(n3, { ...r3, headers: c3 });
433
+ l3?.handleError(e6, { requestOptions: { url: n3.toString(), method: r3?.method } });
434
+ let a3 = Ue(e6);
435
+ return a3 && (t2[k] = a3), e6;
436
436
  }
437
437
  {
438
- for (let [e4, t3] of Object.entries(c3)) typeof t3 == `string` && n3.headers.set(e4, t3);
439
- let e3 = await i3(n3, r3);
440
- l3?.handleError(e3, { requestOptions: { url: n3.url, method: r3?.method } });
441
- let a3 = Ue(e3);
442
- return a3 && (t2[k] = a3), e3;
438
+ for (let [e7, t3] of Object.entries(c3)) typeof t3 == `string` && n3.headers.set(e7, t3);
439
+ let e6 = await i3(n3, r3);
440
+ l3?.handleError(e6, { requestOptions: { url: n3.url, method: r3?.method } });
441
+ let a3 = Ue(e6);
442
+ return a3 && (t2[k] = a3), e6;
443
443
  }
444
- } catch (e3) {
445
- throw l3?.handleError(e3, { requestOptions: { url: typeof n3 == `string` || n3 instanceof URL ? n3.toString() : n3.url, method: r3?.method } }), e3;
444
+ } catch (e6) {
445
+ throw l3?.handleError(e6, { requestOptions: { url: typeof n3 == `string` || n3 instanceof URL ? n3.toString() : n3.url, method: r3?.method } }), e6;
446
446
  }
447
447
  }, { client: c2, initModule: l2 } = Ve(i2), { client: u2, initModule: d2 } = ze(i2), f2 = async (n3, r3) => {
448
- let i3 = o2(), s3 = await a2(), c3 = C(r3), l3 = await i3(n3, { ...r3, headers: { ...c3, ...t2, ...s3?.headers, ...r3?.headers, ...e2.host?.essentials?.passThroughHeaders, ...t2[`X-Wix-Consistent`] ? { [k]: t2[k] } : {} } }), u3 = Ue(l3);
448
+ let i3 = o2(), s3 = await a2(), c3 = w(r3), l3 = await i3(n3, { ...r3, headers: { ...c3, ...t2, ...s3?.headers, ...r3?.headers, ...e5.host?.essentials?.passThroughHeaders, ...t2[`X-Wix-Consistent`] ? { [k]: t2[k] } : {} } }), u3 = Ue(l3);
449
449
  return u3 && (t2[k] = u3), l3;
450
450
  }, p2 = (t3, n3) => {
451
451
  if (Le(t3)) return d2(t3);
452
452
  if (Be(t3)) return l2(t3);
453
- if (T(t3) && e2.host) return E(t3, e2.host);
453
+ if (E(t3) && e5.host) return D(t3, e5.host);
454
454
  if (typeof t3 == `function`) {
455
455
  if (`__type` in t3 && t3.__type === `wix_spi_error`) return t3;
456
- let r3 = e2.host?.apiBaseUrl ?? `www.wixapis.com`, o3 = e2.useCDN === void 0 ? i2().shouldUseCDN : e2.useCDN;
457
- return Se(D(() => y(t3)) ? v(t3) : t3, n3 ?? {}, f2, e2.host?.getErrorHandler?.(), (e3, t4) => {
458
- let n4 = new URL(e3, `https://${r3}`);
456
+ let r3 = e5.host?.apiBaseUrl ?? `www.wixapis.com`, o3 = e5.useCDN === void 0 ? i2().shouldUseCDN : e5.useCDN;
457
+ return Se(re(() => b(t3)) ? y(t3) : t3, n3 ?? {}, f2, e5.host?.getErrorHandler?.(), (e6, t4) => {
458
+ let n4 = new URL(e6, `https://${r3}`);
459
459
  return n4.host = r3, n4.protocol = `https`, f2(n4.toString(), t4);
460
- }, i2().getActiveToken, async () => a2(), { HTTPHost: r3 }, e2.host?.name, o3, e2.validateRequestSchema);
460
+ }, i2().getActiveToken, async () => a2(), { HTTPHost: r3 }, e5.host?.name, o3, e5.validateRequestSchema);
461
461
  }
462
- return w(t3) ? Object.fromEntries(Object.entries(t3).map(([e3, n4]) => [e3, p2(n4, t3[b])])) : t3;
463
- }, m2 = (e3) => {
464
- for (let n3 in e3) t2[n3] = e3[n3];
462
+ return T(t3) ? Object.fromEntries(Object.entries(t3).map(([e6, n4]) => [e6, p2(n4, t3[x])])) : t3;
463
+ }, m2 = (e6) => {
464
+ for (let n3 in e6) t2[n3] = e6[n3];
465
465
  };
466
- return { ...e2.modules ? p2(e2.modules) : {}, get auth() {
466
+ return { ...e5.modules ? p2(e5.modules) : {}, get auth() {
467
467
  let t3 = i2();
468
- return t3.getAuthHeaders = t3.getAuthHeaders.bind(void 0, e2.host), t3;
469
- }, setHeaders: m2, use: p2, enableContext(e3, t3 = { elevated: false }) {
470
- e3 === `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 ? h.elevatedClient = this : h.client = this;
468
+ return t3.getAuthHeaders = t3.getAuthHeaders.bind(void 0, e5.host), t3;
469
+ }, setHeaders: m2, use: p2, enableContext(e6, t3 = { elevated: false }) {
470
+ 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 ? g.elevatedClient = this : g.client = this;
471
471
  }, fetch: (t3, n3) => {
472
- let r3 = e2.host?.apiBaseUrl ?? `www.wixapis.com`, i3 = new URL(t3, `https://${r3}`);
472
+ let r3 = e5.host?.apiBaseUrl ?? `www.wixapis.com`, i3 = new URL(t3, `https://${r3}`);
473
473
  return i3.host = r3, i3.protocol = `https`, f2(i3.toString(), n3);
474
474
  }, fetchWithAuth: s2, async graphql(t3, n3, r3 = { apiVersion: `alpha` }) {
475
- let i3 = e2?.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 }) });
476
- if (a3.status !== 200) throw new x(`GraphQL request failed with status ${a3.status}`, a3);
475
+ 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 }) });
476
+ if (a3.status !== 200) throw new ee(`GraphQL request failed with status ${a3.status}`, a3);
477
477
  let { data: o3, errors: s3 } = await a3.json();
478
478
  return { data: o3 ?? {}, errors: s3 };
479
479
  }, webhooks: u2, servicePlugins: c2 };
480
480
  }
481
- function Ue(e2) {
482
- return e2.headers?.get(`X-Wix-Consistent`) ?? e2.headers?.get(`x-wix-consistent`);
481
+ function Ue(e5) {
482
+ return e5.headers?.get(`X-Wix-Consistent`) ?? e5.headers?.get(`x-wix-consistent`);
483
483
  }
484
484
  var We = { _id: `id`, _createdDate: `createdDate`, _updatedDate: `updatedDate` };
485
485
  var Ge = { id: `_id`, createdDate: `_createdDate`, updatedDate: `_updatedDate` };
486
486
  var Ke = `items`;
487
487
  var qe = `pagingMetadata`;
488
488
  var Je = We;
489
- function Ye(e2, t2) {
490
- return e2?.split(`.`).map((e3) => t2?.[e3] ?? e3).join(`.`);
489
+ function Ye(e5, t2) {
490
+ return e5?.split(`.`).map((e6) => t2?.[e6] ?? e6).join(`.`);
491
491
  }
492
- function Xe(e2, { transformSystemFields: t2 = true } = {}) {
493
- return t2 ? Ye(e2, Je) : e2;
492
+ function Xe(e5, { transformSystemFields: t2 = true } = {}) {
493
+ return t2 ? Ye(e5, Je) : e5;
494
494
  }
495
495
  var Ze = `sort.fieldName`;
496
- function Qe(e2, t2, n2) {
497
- return (e2 === Ze || e2.endsWith(`.${Ze}`)) && typeof t2 == `string` ? Ye(t2, n2) : t2;
496
+ function Qe(e5, t2, n2) {
497
+ return (e5 === Ze || e5.endsWith(`.${Ze}`)) && typeof t2 == `string` ? Ye(t2, n2) : t2;
498
498
  }
499
- function $e(e2, t2, n2) {
500
- let r2 = (e3) => n2.includes(e3), i2 = (e3, n3) => {
501
- if (Array.isArray(e3)) e3.forEach((e4) => {
502
- i2(e4, n3);
499
+ function $e(e5, t2, n2) {
500
+ let r2 = (e6) => n2.includes(e6), i2 = (e6, n3) => {
501
+ if (Array.isArray(e6)) e6.forEach((e7) => {
502
+ i2(e7, n3);
503
503
  });
504
- else if (typeof e3 == `object` && e3) {
505
- let a2 = e3;
506
- Object.keys(a2).forEach((e4) => {
507
- let o2 = n3 === `` ? e4 : `${n3}.${e4}`;
504
+ else if (typeof e6 == `object` && e6) {
505
+ let a2 = e6;
506
+ Object.keys(a2).forEach((e7) => {
507
+ let o2 = n3 === `` ? e7 : `${n3}.${e7}`;
508
508
  if (r2(o2)) return;
509
- let s2 = et(e4, t2);
510
- s2 !== e4 && !(s2 in a2) && (a2[s2] = a2[e4], delete a2[e4]), a2[s2] = Qe(o2, a2[s2], t2), i2(a2[s2], o2);
509
+ let s2 = et(e7, t2);
510
+ s2 !== e7 && !(s2 in a2) && (a2[s2] = a2[e7], delete a2[e7]), a2[s2] = Qe(o2, a2[s2], t2), i2(a2[s2], o2);
511
511
  });
512
512
  }
513
513
  };
514
- return i2(e2, ``), e2;
514
+ return i2(e5, ``), e5;
515
515
  }
516
- function et(e2, t2) {
516
+ function et(e5, t2) {
517
517
  let n2;
518
- return n2 = e2.includes(`.`) ? e2.split(`.`).map((e3) => t2[e3] ?? e3).join(`.`) : t2[e2] ?? e2, n2;
518
+ return n2 = e5.includes(`.`) ? e5.split(`.`).map((e6) => t2[e6] ?? e6).join(`.`) : t2[e5] ?? e5, n2;
519
519
  }
520
- function A(e2, t2 = []) {
521
- return $e(e2, We, t2);
520
+ function A(e5, t2 = []) {
521
+ return $e(e5, We, t2);
522
522
  }
523
- function j(e2, t2 = []) {
524
- return $e(e2, Ge, t2);
523
+ function j(e5, t2 = []) {
524
+ return $e(e5, Ge, t2);
525
525
  }
526
- function M(e2) {
527
- return e2 ? new Date(e2) : void 0;
526
+ function M(e5) {
527
+ return e5 ? new Date(e5) : void 0;
528
528
  }
529
529
  var tt = /* @__PURE__ */ new WeakMap();
530
530
  function nt() {
531
531
  return { leaves: void 0, fields: void 0, mapFields: void 0, anyField: void 0 };
532
532
  }
533
- function rt(e2, t2) {
534
- let n2 = e2.get(t2);
535
- return n2 || (n2 = nt(), e2.set(t2, n2)), n2;
533
+ function rt(e5, t2) {
534
+ let n2 = e5.get(t2);
535
+ return n2 || (n2 = nt(), e5.set(t2, n2)), n2;
536
536
  }
537
- function it(e2, t2) {
538
- return t2 === `*` ? (e2.anyField ??= nt(), e2.anyField) : t2.endsWith(`{}`) ? (e2.mapFields ??= /* @__PURE__ */ new Map(), rt(e2.mapFields, t2.slice(0, -2))) : (e2.fields ??= /* @__PURE__ */ new Map(), rt(e2.fields, t2));
537
+ function it(e5, t2) {
538
+ return t2 === `*` ? (e5.anyField ??= nt(), e5.anyField) : t2.endsWith(`{}`) ? (e5.mapFields ??= /* @__PURE__ */ new Map(), rt(e5.mapFields, t2.slice(0, -2))) : (e5.fields ??= /* @__PURE__ */ new Map(), rt(e5.fields, t2));
539
539
  }
540
- function at(e2) {
540
+ function at(e5) {
541
541
  let t2 = nt();
542
- for (let n2 of e2) {
543
- let e3 = n2.path.split(`.`).reduce(it, t2);
544
- e3.leaves ??= [], e3.leaves.push(n2);
542
+ for (let n2 of e5) {
543
+ let e6 = n2.path.split(`.`).reduce(it, t2);
544
+ e6.leaves ??= [], e6.leaves.push(n2);
545
545
  }
546
546
  return t2;
547
547
  }
548
- function ot(e2) {
549
- let t2 = tt.get(e2);
550
- return t2 || (t2 = at(e2), tt.set(e2, t2)), t2;
548
+ function ot(e5) {
549
+ let t2 = tt.get(e5);
550
+ return t2 || (t2 = at(e5), tt.set(e5, t2)), t2;
551
551
  }
552
- function st(e2) {
553
- return typeof e2 == `object` && !!e2;
552
+ function st(e5) {
553
+ return typeof e5 == `object` && !!e5;
554
554
  }
555
- function ct(e2, { isRepeated: t2, isMap: n2 }, r2) {
556
- return t2 ? Array.isArray(e2) ? e2.map(r2) : e2 : n2 ? st(e2) ? Object.fromEntries(Object.entries(e2).map(([e3, t3]) => [e3, r2(t3)])) : e2 : r2(e2);
555
+ function ct(e5, { isRepeated: t2, isMap: n2 }, r2) {
556
+ return t2 ? Array.isArray(e5) ? e5.map(r2) : e5 : n2 ? st(e5) ? Object.fromEntries(Object.entries(e5).map(([e6, t3]) => [e6, r2(t3)])) : e5 : r2(e5);
557
557
  }
558
- function lt(e2, t2, n2) {
559
- st(e2) && ft(e2, t2, n2);
558
+ function lt(e5, t2, n2) {
559
+ st(e5) && ft(e5, t2, n2);
560
560
  }
561
- function ut(e2, t2, n2) {
561
+ function ut(e5, t2, n2) {
562
562
  for (let [r2, i2] of t2) {
563
- if (!(r2 in e2)) continue;
564
- if (i2.leaves) for (let t4 of i2.leaves) e2[r2] = ct(e2[r2], t4, n2);
565
- let t3 = e2[r2];
566
- Array.isArray(t3) ? t3.forEach((e3) => lt(e3, i2, n2)) : lt(t3, i2, n2);
563
+ if (!(r2 in e5)) continue;
564
+ if (i2.leaves) for (let t4 of i2.leaves) e5[r2] = ct(e5[r2], t4, n2);
565
+ let t3 = e5[r2];
566
+ Array.isArray(t3) ? t3.forEach((e6) => lt(e6, i2, n2)) : lt(t3, i2, n2);
567
567
  }
568
568
  }
569
- function dt(e2, t2, n2) {
569
+ function dt(e5, t2, n2) {
570
570
  for (let [r2, i2] of t2) {
571
- let t3 = e2[r2];
572
- st(t3) && Object.values(t3).forEach((e3) => lt(e3, i2, n2));
571
+ let t3 = e5[r2];
572
+ st(t3) && Object.values(t3).forEach((e6) => lt(e6, i2, n2));
573
573
  }
574
574
  }
575
- function ft(e2, { fields: t2, mapFields: n2, anyField: r2 }, i2) {
576
- t2 && ut(e2, t2, i2), n2 && dt(e2, n2, i2), r2 && Object.values(e2).forEach((e3) => lt(e3, r2, i2));
575
+ function ft(e5, { fields: t2, mapFields: n2, anyField: r2 }, i2) {
576
+ t2 && ut(e5, t2, i2), n2 && dt(e5, n2, i2), r2 && Object.values(e5).forEach((e6) => lt(e6, r2, i2));
577
577
  }
578
- function N(e2, t2) {
579
- if (!st(e2)) return e2;
580
- for (let { paths: n2, transformFn: r2 } of t2) ft(e2, ot(n2), r2);
581
- return e2;
578
+ function N(e5, t2) {
579
+ if (!st(e5)) return e5;
580
+ for (let { paths: n2, transformFn: r2 } of t2) ft(e5, ot(n2), r2);
581
+ return e5;
582
582
  }
583
- function pt(e2) {
584
- return Object.fromEntries(Object.entries(e2).filter(([, e3]) => e3 !== void 0));
583
+ function pt(e5) {
584
+ return Object.fromEntries(Object.entries(e5).filter(([, e6]) => e6 !== void 0));
585
585
  }
586
- function mt(e2) {
587
- return yt(e2).map((e3) => e3.toLocaleUpperCase()).join(`_`);
586
+ function mt(e5) {
587
+ return yt(e5).map((e6) => e6.toLocaleUpperCase()).join(`_`);
588
588
  }
589
589
  var ht = /([\p{Ll}\d])(\p{Lu})/gu;
590
590
  var gt = /(\p{Lu})([\p{Lu}][\p{Ll}])/gu;
591
591
  var _t = `$1\0$2`;
592
592
  var vt = /[^\p{L}\d]+/giu;
593
- function yt(e2) {
594
- let t2 = e2.trim();
593
+ function yt(e5) {
594
+ let t2 = e5.trim();
595
595
  t2 = t2.replace(ht, _t).replace(gt, _t), t2 = t2.replace(vt, `\0`);
596
596
  let n2 = 0, r2 = t2.length;
597
597
  for (; t2.charAt(n2) === `\0`; ) n2++;
@@ -599,336 +599,1389 @@ function yt(e2) {
599
599
  for (; t2.charAt(r2 - 1) === `\0`; ) r2--;
600
600
  return t2.slice(n2, r2).split(/\0/g);
601
601
  }
602
- var bt = (e2) => `validationError` in (e2.response?.data?.details ?? {});
603
- var xt = (e2) => `applicationError` in (e2.response?.data?.details ?? {});
604
- var St = (e2) => (e2.response?.status ?? -1) >= 400 && (e2.response?.status ?? -1) < 500;
605
- function P(e2, t2 = { explicitPathsToArguments: {}, spreadPathsToArguments: {}, singleArgumentUnchanged: false }, n2 = []) {
606
- if (typeof e2 != `object` || !e2) throw e2;
607
- if (bt(e2)) return Ct(e2, t2, n2);
608
- if (xt(e2)) return Tt(e2);
609
- if (St(e2)) {
610
- let t3 = e2.response?.status, n3 = e2.response?.statusText ?? `UNKNOWN`, r2 = e2.response?.data?.message ?? n3, i2 = { applicationError: { description: n3, code: mt(n3), data: {} }, requestId: e2.requestId };
611
- return wt(e2, { message: JSON.stringify({ message: r2, details: i2 }, null, 2), extraProperties: { details: i2, status: t3 } });
612
- }
613
- return Et(e2);
614
- }
615
- var Ct = (e2, t2, n2) => {
616
- let r2 = e2.response?.data, i2 = e2.requestId, { fieldViolations: a2 } = r2.details.validationError, o2 = Dt(t2, a2, n2)?.sort((e3, t3) => e3.field < t3.field ? -1 : 1), s2 = `INVALID_ARGUMENT: ${o2?.map(({ field: e3, description: t3 }) => `"${e3}" ${t3}`)?.join(`, `)}`, c2 = { validationError: { fieldViolations: o2 }, requestId: i2 };
617
- return wt(e2, { message: JSON.stringify({ message: s2, details: c2 }, null, 2), extraProperties: { details: c2, status: e2.response?.status, requestId: i2 } });
618
- };
619
- var wt = (e2, { message: t2, extraProperties: n2 }) => Object.assign(e2, { ...n2, message: t2 });
620
- var Tt = (e2) => {
621
- let t2 = e2.response?.status, n2 = e2.response?.statusText ?? `UNKNOWN`, r2 = e2.response?.data?.message ?? n2, i2 = e2.response?.data?.details?.applicationError?.description ?? n2, a2 = e2.response?.data?.details?.applicationError?.code ?? mt(n2), o2 = e2.response?.data?.details?.applicationError?.data ?? {}, s2 = r2 === i2 ? r2 : `${r2}: ${i2}`, c2 = { applicationError: { description: i2, code: a2, data: o2 }, requestId: e2.requestId };
622
- return wt(e2, { message: JSON.stringify({ message: s2, details: c2 }, null, 2), extraProperties: { details: c2, status: t2, requestId: e2.requestId } });
623
- };
624
- var Et = (e2) => wt(e2, { message: e2.requestId ? `System error occurred, request-id: ${e2.requestId}` : `System error occurred: ${JSON.stringify(e2)}`, extraProperties: { requestId: e2.requestId, status: e2.response?.status, code: mt(e2.response?.statusText ?? `UNKNOWN`), ...!e2.response && { runtimeError: e2 } } });
625
- var Dt = ({ spreadPathsToArguments: e2, explicitPathsToArguments: t2, singleArgumentUnchanged: n2 }, r2, i2) => {
626
- let a2 = { ...e2, ...t2 }, o2 = Object.keys(a2);
627
- return r2?.filter((e3) => !r2.some((t3) => t3.field.length > e3.field.length && t3.field.startsWith(e3.field) && o2.includes(t3.field))).map((e3) => {
628
- let r3 = t2[e3.field];
629
- if (r3) return { ...e3, field: Ot(r3, i2) };
630
- let s2 = o2?.sort((e4, t3) => t3.length - e4.length)?.find((t3) => e3.field.startsWith(t3));
602
+ var bt = (e5) => `validationError` in (e5.response?.data?.details ?? {});
603
+ var xt = (e5) => `applicationError` in (e5.response?.data?.details ?? {});
604
+ var St = (e5) => (e5.response?.status ?? -1) >= 400 && (e5.response?.status ?? -1) < 500;
605
+ function P(e5, t2 = { explicitPathsToArguments: {}, spreadPathsToArguments: {}, singleArgumentUnchanged: false }, n2 = []) {
606
+ if (typeof e5 != `object` || !e5) throw e5;
607
+ if (bt(e5)) return Ct(e5, t2, n2);
608
+ if (xt(e5)) return Tt(e5);
609
+ if (St(e5)) {
610
+ let t3 = e5.response?.status, n3 = e5.response?.statusText ?? `UNKNOWN`, r2 = e5.response?.data?.message ?? n3, i2 = { applicationError: { description: n3, code: mt(n3), data: {} }, requestId: e5.requestId };
611
+ return wt(e5, { message: JSON.stringify({ message: r2, details: i2 }, null, 2), extraProperties: { details: i2, status: t3 } });
612
+ }
613
+ return Et(e5);
614
+ }
615
+ var Ct = (e5, t2, n2) => {
616
+ let r2 = e5.response?.data, i2 = e5.requestId, { fieldViolations: a2 } = r2.details.validationError, o2 = Dt(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 };
617
+ return wt(e5, { message: JSON.stringify({ message: s2, details: c2 }, null, 2), extraProperties: { details: c2, status: e5.response?.status, requestId: i2 } });
618
+ };
619
+ var wt = (e5, { message: t2, extraProperties: n2 }) => Object.assign(e5, { ...n2, message: t2 });
620
+ var Tt = (e5) => {
621
+ 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 ?? mt(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 };
622
+ return wt(e5, { message: JSON.stringify({ message: s2, details: c2 }, null, 2), extraProperties: { details: c2, status: t2, requestId: e5.requestId } });
623
+ };
624
+ var Et = (e5) => wt(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: mt(e5.response?.statusText ?? `UNKNOWN`), ...!e5.response && { runtimeError: e5 } } });
625
+ var Dt = ({ spreadPathsToArguments: e5, explicitPathsToArguments: t2, singleArgumentUnchanged: n2 }, r2, i2) => {
626
+ let a2 = { ...e5, ...t2 }, o2 = Object.keys(a2);
627
+ return r2?.filter((e6) => !r2.some((t3) => t3.field.length > e6.field.length && t3.field.startsWith(e6.field) && o2.includes(t3.field))).map((e6) => {
628
+ let r3 = t2[e6.field];
629
+ if (r3) return { ...e6, field: Ot(r3, i2) };
630
+ let s2 = o2?.sort((e7, t3) => t3.length - e7.length)?.find((t3) => e6.field.startsWith(t3));
631
631
  if (s2) {
632
632
  let t3 = a2[s2];
633
- if (t3) return { ...e3, field: e3.field.replace(s2, Ot(t3, i2)) };
633
+ if (t3) return { ...e6, field: e6.field.replace(s2, Ot(t3, i2)) };
634
634
  }
635
- return n2 ? { ...e3, field: `${i2[0]}.${e3.field}` } : e3;
635
+ return n2 ? { ...e6, field: `${i2[0]}.${e6.field}` } : e6;
636
636
  });
637
637
  };
638
- var Ot = (e2, t2) => {
639
- let n2 = kt(e2);
640
- return n2 == null ? e2 : e2.replace(`$[${n2}]`, t2[n2]);
638
+ var Ot = (e5, t2) => {
639
+ let n2 = kt(e5);
640
+ return n2 == null ? e5 : e5.replace(`$[${n2}]`, t2[n2]);
641
641
  };
642
- var kt = (e2) => {
643
- let t2 = e2.match(/\$\[(?<argIndex>\d+)\]/);
642
+ var kt = (e5) => {
643
+ let t2 = e5.match(/\$\[(?<argIndex>\d+)\]/);
644
644
  return t2 && t2.groups && Number(t2.groups.argIndex);
645
645
  };
646
646
  function At() {
647
- let e2 = typeof $wixContext < `u` && $wixContext.initWixModules ? $wixContext.initWixModules : globalThis.__wix_context__ !== void 0 && globalThis.__wix_context__.initWixModules ? globalThis.__wix_context__.initWixModules : void 0;
648
- if (e2) return { initWixModules(t3, n3) {
649
- return jt(() => e2(t3, n3));
647
+ let e5 = typeof $wixContext < `u` && $wixContext.initWixModules ? $wixContext.initWixModules : globalThis.__wix_context__ !== void 0 && globalThis.__wix_context__.initWixModules ? globalThis.__wix_context__.initWixModules : void 0;
648
+ if (e5) return { initWixModules(t3, n3) {
649
+ return jt(() => e5(t3, n3));
650
650
  }, fetchWithAuth() {
651
651
  throw Error(`fetchWithAuth is not available in this context`);
652
652
  }, graphql() {
653
653
  throw Error(`graphql is not available in this context`);
654
654
  } };
655
- let t2 = typeof $wixContext < `u` ? $wixContext.client : h.client === void 0 ? globalThis.__wix_context__ === void 0 ? void 0 : globalThis.__wix_context__.client : h.client, n2 = typeof $wixContext < `u` ? $wixContext.elevatedClient : h.elevatedClient === void 0 ? globalThis.__wix_context__ === void 0 ? void 0 : globalThis.__wix_context__.elevatedClient : h.elevatedClient;
656
- if (t2 || n2) return { initWixModules(e3, r2) {
655
+ let t2 = typeof $wixContext < `u` ? $wixContext.client : g.client === void 0 ? globalThis.__wix_context__ === void 0 ? void 0 : globalThis.__wix_context__.client : g.client, n2 = typeof $wixContext < `u` ? $wixContext.elevatedClient : g.elevatedClient === void 0 ? globalThis.__wix_context__ === void 0 ? void 0 : globalThis.__wix_context__.elevatedClient : g.elevatedClient;
656
+ if (t2 || n2) return { initWixModules(e6, r2) {
657
657
  if (r2) {
658
658
  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`);
659
- return jt(() => n2.use(e3));
659
+ return jt(() => n2.use(e6));
660
660
  }
661
661
  if (!t2) throw Error(`Wix context is not available. Make sure to initialize the Wix context before using SDK modules`);
662
- return jt(() => t2.use(e3));
663
- }, fetchWithAuth: (e3, n3) => {
662
+ return jt(() => t2.use(e6));
663
+ }, fetchWithAuth: (e6, n3) => {
664
664
  if (!t2) throw Error(`Wix context is not available. Make sure to initialize the Wix context before using SDK modules`);
665
- return t2.fetchWithAuth(e3, n3);
665
+ return t2.fetchWithAuth(e6, n3);
666
666
  }, getAuth() {
667
667
  if (!t2) throw Error(`Wix context is not available. Make sure to initialize the Wix context before using SDK modules`);
668
668
  return t2.auth;
669
- }, async graphql(e3, n3, r2) {
669
+ }, async graphql(e6, n3, r2) {
670
670
  if (!t2) throw Error(`Wix context is not available. Make sure to initialize the Wix context before using SDK modules`);
671
- return t2.graphql(e3, n3, r2);
671
+ return t2.graphql(e6, n3, r2);
672
672
  } };
673
673
  }
674
- function jt(e2) {
675
- let t2 = globalThis.__wix_context__, n2 = { client: h.client, elevatedClient: h.elevatedClient }, r2;
676
- globalThis.__wix_context__ = void 0, h.client = void 0, h.elevatedClient = void 0, typeof $wixContext < `u` && (r2 = { client: $wixContext?.client, elevatedClient: $wixContext?.elevatedClient }, delete $wixContext.client, delete $wixContext.elevatedClient);
674
+ function jt(e5) {
675
+ let t2 = globalThis.__wix_context__, n2 = { client: g.client, elevatedClient: g.elevatedClient }, r2;
676
+ globalThis.__wix_context__ = void 0, g.client = void 0, g.elevatedClient = void 0, typeof $wixContext < `u` && (r2 = { client: $wixContext?.client, elevatedClient: $wixContext?.elevatedClient }, delete $wixContext.client, delete $wixContext.elevatedClient);
677
677
  try {
678
- return e2();
678
+ return e5();
679
679
  } finally {
680
- globalThis.__wix_context__ = t2, h.client = n2.client, h.elevatedClient = n2.elevatedClient, typeof $wixContext < `u` && ($wixContext.client = r2.client, $wixContext.elevatedClient = r2.elevatedClient);
680
+ globalThis.__wix_context__ = t2, g.client = n2.client, g.elevatedClient = n2.elevatedClient, typeof $wixContext < `u` && ($wixContext.client = r2.client, $wixContext.elevatedClient = r2.elevatedClient);
681
681
  }
682
682
  }
683
- function Mt(e2, t2) {
683
+ function Mt(e5, t2) {
684
684
  return (...n2) => {
685
685
  let r2 = At();
686
- return r2 ? r2.initWixModules(e2, t2).apply(void 0, n2) : e2.apply(void 0, n2);
686
+ return r2 ? r2.initWixModules(e5, t2).apply(void 0, n2) : e5.apply(void 0, n2);
687
687
  };
688
688
  }
689
- function Nt(e2) {
689
+ function Nt(e5) {
690
690
  let t2 = (...t3) => {
691
691
  let n2 = At();
692
- return n2 ? n2.initWixModules(e2).apply(void 0, t3) : () => ({ slug: e2.type });
692
+ return n2 ? n2.initWixModules(e5).apply(void 0, t3) : () => ({ slug: e5.type });
693
693
  };
694
- return t2.__type = e2.__type, t2.type = e2.type, t2.isDomainEvent = e2.isDomainEvent, t2.transformations = e2.transformations, t2;
694
+ return t2.__type = e5.__type, t2.type = e5.type, t2.isDomainEvent = e5.isDomainEvent, t2.transformations = e5.transformations, t2;
695
695
  }
696
- function Pt(e2, t2 = false) {
697
- return Mt(e2, t2);
696
+ function Pt(e5, t2 = false) {
697
+ return Mt(e5, t2);
698
698
  }
699
- function Ft(e2, t2) {
700
- let n2 = It(e2), r2 = Object.entries(n2).some(([e3, t3]) => e3.includes(`.`) || Array.isArray(t3) && t3.some((e4) => typeof e4 == `object`));
701
- return t2 && r2 ? new URLSearchParams({ ".r": Rt(JSON.stringify(e2)) }) : Object.entries(n2).reduce((e3, [t3, n3]) => ((Array.isArray(n3) ? n3 : [n3]).forEach((r3) => {
702
- r3 == null || Array.isArray(n3) && typeof r3 == `object` || e3.append(t3, r3);
703
- }), e3), new URLSearchParams());
699
+ function Ft(e5, t2) {
700
+ let n2 = Lt(e5), r2 = Object.entries(n2).some(([e6, t3]) => e6.includes(`.`) || Array.isArray(t3) && t3.some((e7) => typeof e7 == `object`));
701
+ return t2 && r2 ? new URLSearchParams({ ".r": zt(JSON.stringify(e5)) }) : Object.entries(n2).reduce((e6, [t3, n3]) => ((Array.isArray(n3) ? n3 : [n3]).forEach((r3) => {
702
+ r3 == null || Array.isArray(n3) && typeof r3 == `object` || e6.append(t3, r3);
703
+ }), e6), new URLSearchParams());
704
704
  }
705
- function F(e2) {
706
- let t2 = Zt(Yt(e2.host), e2.domainToMappings);
707
- return sn(rn(e2.protoPath, e2.data || {}), t2);
705
+ function It(e5) {
706
+ let t2 = Qt(Xt(e5.host), e5.domainToMappings);
707
+ return cn(an(e5.protoPath, e5.data || {}), t2);
708
708
  }
709
- function It(e2, t2 = ``) {
709
+ function Lt(e5, t2 = ``) {
710
710
  let n2 = {};
711
- return Object.entries(e2).forEach(([e3, r2]) => {
712
- let i2 = typeof r2 == `object` && !!r2 && !Array.isArray(r2), a2 = Lt(t2, e3);
711
+ return Object.entries(e5).forEach(([e6, r2]) => {
712
+ let i2 = typeof r2 == `object` && !!r2 && !Array.isArray(r2), a2 = Rt(t2, e6);
713
713
  if (i2) {
714
- let e4 = It(r2, a2);
715
- Object.assign(n2, e4);
714
+ let e7 = Lt(r2, a2);
715
+ Object.assign(n2, e7);
716
716
  } else n2[a2] = r2;
717
717
  }), n2;
718
718
  }
719
- function Lt(e2, t2) {
720
- return `${e2}${e2 ? `.` : ``}${t2}`;
721
- }
722
- var Rt = (e2) => {
723
- let t2 = new TextEncoder().encode(e2);
724
- return (typeof btoa < `u` ? btoa(String.fromCodePoint(...t2)) : Buffer.from(e2, `utf-8`).toString(`base64`)).replace(/=/g, ``).replace(/\+/g, `-`).replace(/\//g, `_`);
725
- };
726
- var zt = [`wix.com`, `editorx.com`];
727
- var Bt = `_`;
728
- var Vt = `*.`;
729
- var Ht = RegExp(`\\.(${zt.join(`|`)})$`);
730
- var Ut = [`42.wixprod.net`, `uw2-edt-1.wixprod.net`, `virginia-edt.wixprod.net`];
731
- var Wt = { "payments.base44.com": `manage.wix.com`, "create.editorx.com": `editor.editorx.com` };
732
- var Gt = `dev.wix-code.com`;
733
- var Kt = /{(.*)}/;
734
- var qt = RegExp(`\\.(${Ut.join(`|`)})$`);
735
- var Jt = RegExp(`.*\\.${Gt}$`);
736
- function Yt(e2) {
737
- return Xt(e2).replace(Ht, `._base_domain_`).replace(qt, `._api_base_domain_`).replace(Jt, `*.dev.wix-code.com`);
738
- }
739
- function Xt(e2) {
740
- return Wt[e2] ?? e2;
741
- }
742
- function Zt(e2, t2) {
743
- let n2 = t2[e2];
719
+ function Rt(e5, t2) {
720
+ return `${e5}${e5 ? `.` : ``}${t2}`;
721
+ }
722
+ var zt = (e5) => {
723
+ let t2 = new TextEncoder().encode(e5);
724
+ return (typeof btoa < `u` ? btoa(String.fromCodePoint(...t2)) : Buffer.from(e5, `utf-8`).toString(`base64`)).replace(/=/g, ``).replace(/\+/g, `-`).replace(/\//g, `_`);
725
+ };
726
+ var Bt = [`wix.com`, `editorx.com`];
727
+ var Vt = `_`;
728
+ var Ht = `*.`;
729
+ var Ut = RegExp(`\\.(${Bt.join(`|`)})$`);
730
+ var Wt = [`42.wixprod.net`, `uw2-edt-1.wixprod.net`, `virginia-edt.wixprod.net`];
731
+ var Gt = { "payments.base44.com": `manage.wix.com`, "create.editorx.com": `editor.editorx.com` };
732
+ var Kt = `dev.wix-code.com`;
733
+ var qt = /{(.*)}/;
734
+ var Jt = RegExp(`\\.(${Wt.join(`|`)})$`);
735
+ var Yt = RegExp(`.*\\.${Kt}$`);
736
+ function Xt(e5) {
737
+ return Zt(e5).replace(Ut, `._base_domain_`).replace(Jt, `._api_base_domain_`).replace(Yt, `*.dev.wix-code.com`);
738
+ }
739
+ function Zt(e5) {
740
+ return Gt[e5] ?? e5;
741
+ }
742
+ function Qt(e5, t2) {
743
+ let n2 = t2[e5];
744
744
  if (n2) return n2;
745
- let r2 = Qt(e2, t2) ?? $t(e2, t2);
745
+ let r2 = $t(e5, t2) ?? en(e5, t2);
746
746
  if (!r2) {
747
- if (tn(e2)) {
748
- let e3 = t2[nn];
749
- if (e3) return e3;
747
+ if (nn(e5)) {
748
+ let e6 = t2[rn];
749
+ if (e6) return e6;
750
750
  }
751
- let n3 = t2[Bt];
751
+ let n3 = t2[Vt];
752
752
  if (n3) return n3;
753
753
  }
754
754
  return r2 ?? [];
755
755
  }
756
- function Qt(e2, t2) {
756
+ function $t(e5, t2) {
757
757
  return Object.entries(t2).find(([t3]) => {
758
- let [, ...n2] = e2.split(`.`);
758
+ let [, ...n2] = e5.split(`.`);
759
759
  return n2.join(`.`) === t3;
760
760
  })?.[1];
761
761
  }
762
- function $t(e2, t2) {
763
- let [n2] = Object.entries(t2).filter(([t3]) => en(e2, t3)).sort(([e3], [t3]) => t3.length - e3.length);
762
+ function en(e5, t2) {
763
+ let [n2] = Object.entries(t2).filter(([t3]) => tn(e5, t3)).sort(([e6], [t3]) => t3.length - e6.length);
764
764
  if (!n2) return;
765
765
  let [, r2] = n2;
766
766
  return r2;
767
767
  }
768
- function en(e2, t2) {
769
- if (!t2.startsWith(Vt)) return false;
768
+ function tn(e5, t2) {
769
+ if (!t2.startsWith(Ht)) return false;
770
770
  let n2 = t2.slice(1);
771
- return e2.length > n2.length && e2.endsWith(n2);
771
+ return e5.length > n2.length && e5.endsWith(n2);
772
772
  }
773
- function tn(e2) {
774
- return !!e2.match(/\._base_domain_$/);
773
+ function nn(e5) {
774
+ return !!e5.match(/\._base_domain_$/);
775
775
  }
776
- var nn = `www._base_domain_`;
777
- function rn(e2, t2) {
778
- return e2.split(`/`).map((e3) => an(e3, t2)).join(`/`);
776
+ var rn = `www._base_domain_`;
777
+ function an(e5, t2) {
778
+ return e5.split(`/`).map((e6) => on(e6, t2)).join(`/`);
779
779
  }
780
- function an(e2, t2) {
781
- let n2 = e2.match(Kt) || [], r2 = n2[1];
782
- return r2 ? on(t2, r2, e2, e2.replace(n2[0], ``)) : e2;
780
+ function on(e5, t2) {
781
+ let n2 = e5.match(qt) || [], r2 = n2[1];
782
+ return r2 ? sn(t2, r2, e5, e5.replace(n2[0], ``)) : e5;
783
783
  }
784
- function on(e2, t2, n2, r2) {
785
- let i2 = e2;
786
- for (let e3 of t2.split(`.`)) {
784
+ function sn(e5, t2, n2, r2) {
785
+ let i2 = e5;
786
+ for (let e6 of t2.split(`.`)) {
787
787
  if (!i2) return n2;
788
- i2 = i2[e3];
788
+ i2 = i2[e6];
789
789
  }
790
790
  return `${i2}${r2}`;
791
791
  }
792
- function sn(e2, t2) {
793
- let n2 = t2?.find((t3) => e2.startsWith(t3.destPath));
794
- return n2 ? n2.srcPath + e2.slice(n2.destPath.length) : e2;
792
+ function cn(e5, t2) {
793
+ let n2 = t2?.find((t3) => e5.startsWith(t3.destPath));
794
+ return n2 ? n2.srcPath + e5.slice(n2.destPath.length) : e5;
795
795
  }
796
- function I(e2) {
797
- return Nt(e2);
796
+ function ln(e5) {
797
+ return Nt(e5);
798
798
  }
799
- function cn(e2) {
800
- return e2 === `NaN` ? NaN : e2 === `Infinity` ? 1 / 0 : e2 === `-Infinity` ? -1 / 0 : e2;
799
+ function un(e5) {
800
+ return e5 === `NaN` ? NaN : e5 === `Infinity` ? 1 / 0 : e5 === `-Infinity` ? -1 / 0 : e5;
801
801
  }
802
- function ln(e2) {
803
- return e2 && pt({ formatted: e2.formattedAddress, location: e2.geocode, addressLine1: e2.addressLine, addressLine2: e2.addressLine2, streetAddress: e2.streetAddress && { name: e2.streetAddress.name, number: e2.streetAddress.number, apt: e2.streetAddress.apt, formattedAddressLine: e2.streetAddress.formattedAddressLine }, hint: e2.hint, city: e2.city, subdivision: e2.subdivision, country: e2.country, postalCode: e2.postalCode, countryFullname: e2.countryFullname, subdivisionFullname: e2.subdivisionFullname });
802
+ function dn(e5) {
803
+ return e5 && pt({ formatted: e5.formattedAddress, location: e5.geocode, addressLine1: e5.addressLine, addressLine2: e5.addressLine2, streetAddress: e5.streetAddress && { name: e5.streetAddress.name, number: e5.streetAddress.number, apt: e5.streetAddress.apt, formattedAddressLine: e5.streetAddress.formattedAddressLine }, hint: e5.hint, city: e5.city, subdivision: e5.subdivision, country: e5.country, postalCode: e5.postalCode, countryFullname: e5.countryFullname, subdivisionFullname: e5.subdivisionFullname });
804
804
  }
805
- var un = `x-wix-linguist`;
806
- var dn = `00000000-0000-0000-0000-000000000000`;
807
- var fn = `false`;
808
- var pn = () => {
809
- let e2 = gn(`language`), t2 = gn(`locale`);
810
- if (e2) return { [un]: [e2, t2 || e2, fn, dn].join(`|`) };
805
+ var fn;
806
+ (function(e5) {
807
+ e5.QUERY_PARAM = `QUERY_PARAM`, e5.SUBDOMAIN = `SUBDOMAIN`, e5.SUBDIRECTORY = `SUBDIRECTORY`;
808
+ })(fn ||= {});
809
+ var pn = { 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` };
810
+ var mn = (e5, t2) => {
811
+ e5.searchParams.set(`lang`, t2);
812
+ };
813
+ var hn = (e5, t2) => {
814
+ let n2 = e5.hostname.split(`.`);
815
+ n2[0] === `www` && (n2 = n2.slice(1)), n2 = [t2, ...n2], e5.hostname = n2.join(`.`);
816
+ };
817
+ var gn = (e5, t2) => {
818
+ e5.pathname = `/${t2}${e5.pathname}`;
819
+ };
820
+ var _n = (e5, t2) => {
821
+ if (!t2.languageCode || !t2?.resolutionMethod) return e5;
822
+ let n2 = new URL(e5);
823
+ return (t2?.resolutionMethod === `QUERY_PARAM` ? mn : t2?.resolutionMethod === `SUBDOMAIN` ? hn : gn)(n2, t2.languageCode), n2.href;
811
824
  };
812
- function mn() {
813
- let e2 = null, t2 = null;
825
+ var vn = (e5, t2) => {
826
+ if (!e5?.length) return e5;
827
+ let n2;
828
+ try {
829
+ n2 = new URL(e5);
830
+ } catch {
831
+ return e5;
832
+ }
833
+ n2.searchParams.delete(`lang`);
834
+ let r2 = n2.pathname.split(`/`)[1]?.toLowerCase();
835
+ if (t2.includes(r2 ?? ``)) {
836
+ let e6 = n2.pathname.split(`/`);
837
+ e6.splice(1, 1), n2.pathname = e6.join(`/`);
838
+ }
839
+ let i2 = n2.hostname.split(`.`)[0]?.toLowerCase();
840
+ if (t2.includes(i2 ?? ``)) {
841
+ let e6 = n2.hostname.split(`.`);
842
+ e6.shift(), n2.hostname = e6.join(`.`);
843
+ }
844
+ return n2.href;
845
+ };
846
+ function yn() {
847
+ let e5 = bn();
848
+ return e5 ? xn(e5) : [];
849
+ }
850
+ function bn() {
851
+ let e5 = typeof globals < `u` ? globals?.$ns?.[`wix-window`]?.multilingual : void 0, t2 = typeof window < `u` ? window?.essentials?.multilingual : void 0;
852
+ return e5 ?? t2 ?? globalThis?.__wix_site_metadata__?.multilingual;
853
+ }
854
+ function xn(e5) {
855
+ try {
856
+ if (e5?.supportedLanguages?.length) {
857
+ let t2 = e5.supportedLanguages, n2 = t2.map((e6) => e6.languageCode).filter(Boolean), r2 = e5.cleanUrl ?? Tn(n2);
858
+ return t2.map((e6) => ({ id: e6.languageCode, displayName: Sn(e6), regionalFormat: [e6.locale?.languageCode, e6.locale?.country].filter(Boolean).join(`-`), url: Cn(e6, r2), primary: e6.isPrimary, resolutionMethod: e6.resolutionMethod }));
859
+ }
860
+ if (e5?.siteLanguages?.length) {
861
+ let t2 = e5.siteLanguages, n2 = Tn(t2.map((e6) => e6.languageCode).filter(Boolean));
862
+ return t2.map((e6) => ({ id: e6.languageCode, displayName: Sn(e6), regionalFormat: e6.locale, url: Cn(e6, n2), primary: e6.isPrimaryLanguage, resolutionMethod: e6.resolutionMethod ? wn(e6.resolutionMethod) : void 0 }));
863
+ }
864
+ } catch (e6) {
865
+ return console.warn(`[Multilingual Manager] listSupportedLanguages failed`, e6), [];
866
+ }
867
+ return console.warn(`[Multilingual Manager] listSupportedLanguages is not available`), [];
868
+ }
869
+ function Sn(e5) {
870
+ let t2 = pn[e5.languageCode];
871
+ if (t2) return t2;
872
+ let n2 = e5.name ?? e5.countryCode;
873
+ if (n2) return n2;
874
+ }
875
+ function Cn(e5, t2) {
876
+ if (e5.url || !t2 || !e5.resolutionMethod) return e5.url;
877
+ if (e5.languageCode) try {
878
+ return _n(t2, { languageCode: e5.languageCode, countryCode: e5.countryCode, resolutionMethod: wn(e5.resolutionMethod), locale: { languageCode: e5.languageCode, country: e5.countryCode } });
879
+ } catch (e6) {
880
+ console.warn(`[Multilingual Manager] buildUrlForLanguage failed`, e6);
881
+ return;
882
+ }
883
+ }
884
+ function wn(e5) {
885
+ switch (e5) {
886
+ case `QUERY_PARAM`:
887
+ case `QueryParam`:
888
+ return fn.QUERY_PARAM;
889
+ case `SUBDOMAIN`:
890
+ case `Subdomain`:
891
+ return fn.SUBDOMAIN;
892
+ case `SUBDIRECTORY`:
893
+ case `Subdirectory`:
894
+ return fn.SUBDIRECTORY;
895
+ default:
896
+ return;
897
+ }
898
+ }
899
+ function Tn(e5) {
900
+ let t2 = typeof window < `u` && window.location?.href ? window.location.href : ``;
901
+ try {
902
+ return vn(t2, e5);
903
+ } catch (e6) {
904
+ return console.warn(`[Multilingual Manager] cleanCurrentUrl failed`, e6), t2;
905
+ }
906
+ }
907
+ var En = `x-wix-linguist`;
908
+ var Dn = `00000000-0000-0000-0000-000000000000`;
909
+ var On = `false`;
910
+ var kn = () => {
911
+ let e5 = Mn(`language`), t2 = Mn(`locale`);
912
+ if (e5) return { [En]: [e5, t2 || e5, On, Dn].join(`|`) };
913
+ };
914
+ function An() {
915
+ let e5 = null, t2 = null;
814
916
  return { promise: new Promise((n2, r2) => {
815
- e2 = n2, t2 = r2;
816
- }), resolve: e2, reject: t2 };
817
- }
818
- var hn = () => (typeof window < `u` ? window.commonConfig : void 0) ?? globalThis.commonConfig;
819
- var gn = (e2) => hn()?.[e2];
820
- var _n = ({ createHost: e2 }) => ({ __type: `host`, create: (e3) => ({}), host: (t2) => {
821
- let { applicationId: n2, componentId: r2 } = t2 ?? {}, i2 = typeof window < `u` ? window.wixEmbedsAPI : void 0, a2 = e2(t2), o2 = yn();
822
- return { ...a2, apiBaseUrl: o2, getMonitoringClient: i2?.getMonitoringClientFunction?.(n2, r2), essentials: { language: gn(`language`), locale: gn(`locale`), get passThroughHeaders() {
823
- return pn();
917
+ e5 = n2, t2 = r2;
918
+ }), resolve: e5, reject: t2 };
919
+ }
920
+ var jn = () => (typeof window < `u` ? window.commonConfig : void 0) ?? globalThis.commonConfig;
921
+ var Mn = (e5) => jn()?.[e5];
922
+ var Nn = ({ createHost: e5 }) => ({ __type: `host`, create: (e6) => ({}), host: (t2) => {
923
+ let { applicationId: n2, componentId: r2 } = t2 ?? {}, i2 = typeof window < `u` ? window.wixEmbedsAPI : void 0, a2 = e5(t2), o2 = Fn();
924
+ return { ...a2, apiBaseUrl: o2, getMonitoringClient: i2?.getMonitoringClientFunction?.(n2, r2), essentials: { language: Mn(`language`), locale: Mn(`locale`), get passThroughHeaders() {
925
+ return kn();
824
926
  } } };
825
- }, auth: (e3) => {
927
+ }, auth: (e6) => {
826
928
  let t2 = typeof window < `u` ? window.wixEmbedsAPI : void 0;
827
- !e3 && vn() && (e3 = t2?.getAccessTokenFunction?.());
828
- let n2 = false, { resolve: r2, promise: i2 } = mn();
929
+ !e6 && Pn() && (e6 = t2?.getAccessTokenFunction?.());
930
+ let n2 = false, { resolve: r2, promise: i2 } = An();
829
931
  return { getAuthHeaders: async () => {
830
- if (!e3 && n2 && (e3 = await i2), !e3) throw Error(`Failed to resolve auth token`);
831
- return { headers: { Authorization: await e3() } };
832
- }, getAccessTokenInjector: () => (n2 = true, (e4) => {
833
- r2(e4);
932
+ if (!e6 && n2 && (e6 = await i2), !e6) throw Error(`Failed to resolve auth token`);
933
+ return { headers: { Authorization: await e6() } };
934
+ }, getAccessTokenInjector: () => (n2 = true, (e7) => {
935
+ r2(e7);
834
936
  }) };
835
937
  } });
836
- function vn() {
938
+ function Pn() {
837
939
  return typeof document < `u` && document.currentScript?.tagName === `SCRIPT`;
838
940
  }
839
- function yn() {
840
- let e2 = (typeof window < `u` ? window.wixEmbedsAPI : void 0)?.getExternalBaseUrl?.();
841
- if (!e2) return;
842
- let t2 = new URL(e2);
941
+ function Fn() {
942
+ let e5 = (typeof window < `u` ? window.wixEmbedsAPI : void 0)?.getExternalBaseUrl?.();
943
+ if (!e5) return;
944
+ let t2 = new URL(e5);
843
945
  return t2?.pathname && t2.pathname !== `/` ? `${t2.hostname}${t2.pathname}` : t2.hostname;
844
946
  }
845
- var bn = ({ clientSdk: e2, applicationId: t2 }) => ({ invoke: async ({ namespace: n2, method: r2, args: i2 }) => {
846
- if (!e2) throw Error(`Wix Site SDK only works in a Wix site environment. Learn more: https://dev.wix.com/docs/sdk/host-modules/site/introduction`);
847
- return e2.invoke({ namespace: n2, method: r2, args: i2, applicationId: t2, accessToken: `accessToken` });
947
+ var In = ({ clientSdk: e5, applicationId: t2 }) => ({ invoke: async ({ namespace: n2, method: r2, args: i2 }) => {
948
+ 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`);
949
+ return e5.invoke({ namespace: n2, method: r2, args: i2, applicationId: t2, accessToken: `accessToken` });
848
950
  }, getAccessToken: () => {
849
951
  throw Error(`Not implemented`);
850
952
  }, observeState: () => ({ disconnect: () => {
851
953
  } }) });
852
- var xn = _n({ createHost: function(e2) {
853
- let t2 = (typeof $wixContext < `u` ? $wixContext.clientSdk : void 0) ?? e2?.clientSdk ?? (typeof window < `u` ? window?.clientSdk : void 0), { applicationId: n2 } = e2 || {};
954
+ var Ln = Nn({ createHost: function(e5) {
955
+ let t2 = (typeof $wixContext < `u` ? $wixContext.clientSdk : void 0) ?? e5?.clientSdk ?? (typeof window < `u` ? window?.clientSdk : void 0), { applicationId: n2 } = e5 || {};
854
956
  if (!n2) throw Error(`"createHost" was called without a required field "applicationId"`);
855
- return { channel: bn({ clientSdk: t2, applicationId: n2 }), close: () => {
957
+ return { channel: In({ clientSdk: t2, applicationId: n2 }), close: () => {
856
958
  } };
857
959
  } });
858
- var Sn = (e2, t2) => {
859
- let n2 = xn.host({ applicationId: e2, componentId: t2 }), r2 = xn.auth();
960
+ var Rn = (e5, t2) => {
961
+ let n2 = Ln.host({ applicationId: e5, componentId: t2 }), r2 = Ln.auth();
860
962
  return He({ auth: r2, host: n2 }).enableContext(`module`), r2.getAccessTokenInjector();
861
963
  };
862
- var Cn = (e2) => Sn(`13d21c63-b5ec-5912-8397-c3a5ddb27a97`, e2);
863
- function wn() {
864
- let e2 = typeof $wixContext < `u` && $wixContext.initWixModules ? $wixContext.initWixModules : globalThis.__wix_context__ !== void 0 && globalThis.__wix_context__.initWixModules ? globalThis.__wix_context__.initWixModules : void 0;
865
- if (e2) return { initWixModules(t3, n3) {
866
- return Tn(() => e2(t3, n3));
964
+ var zn = (e5) => Rn(`13d21c63-b5ec-5912-8397-c3a5ddb27a97`, e5);
965
+ function Bn() {
966
+ let e5 = typeof $wixContext < `u` && $wixContext.initWixModules ? $wixContext.initWixModules : globalThis.__wix_context__ !== void 0 && globalThis.__wix_context__.initWixModules ? globalThis.__wix_context__.initWixModules : void 0;
967
+ if (e5) return { initWixModules(t3, n3) {
968
+ return Vn(() => e5(t3, n3));
867
969
  }, fetchWithAuth() {
868
970
  throw Error(`fetchWithAuth is not available in this context`);
869
971
  }, graphql() {
870
972
  throw Error(`graphql is not available in this context`);
871
973
  } };
872
- let t2 = typeof $wixContext < `u` ? $wixContext.client : h.client === void 0 ? globalThis.__wix_context__ === void 0 ? void 0 : globalThis.__wix_context__.client : h.client, n2 = typeof $wixContext < `u` ? $wixContext.elevatedClient : h.elevatedClient === void 0 ? globalThis.__wix_context__ === void 0 ? void 0 : globalThis.__wix_context__.elevatedClient : h.elevatedClient;
873
- if (t2 || n2) return { initWixModules(e3, r2) {
974
+ let t2 = typeof $wixContext < `u` ? $wixContext.client : g.client === void 0 ? globalThis.__wix_context__ === void 0 ? void 0 : globalThis.__wix_context__.client : g.client, n2 = typeof $wixContext < `u` ? $wixContext.elevatedClient : g.elevatedClient === void 0 ? globalThis.__wix_context__ === void 0 ? void 0 : globalThis.__wix_context__.elevatedClient : g.elevatedClient;
975
+ if (t2 || n2) return { initWixModules(e6, r2) {
874
976
  if (r2) {
875
977
  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`);
876
- return Tn(() => n2.use(e3));
978
+ return Vn(() => n2.use(e6));
877
979
  }
878
980
  if (!t2) throw Error(`Wix context is not available. Make sure to initialize the Wix context before using SDK modules`);
879
- return Tn(() => t2.use(e3));
880
- }, fetchWithAuth: (e3, n3) => {
981
+ return Vn(() => t2.use(e6));
982
+ }, fetchWithAuth: (e6, n3) => {
881
983
  if (!t2) throw Error(`Wix context is not available. Make sure to initialize the Wix context before using SDK modules`);
882
- return t2.fetchWithAuth(e3, n3);
984
+ return t2.fetchWithAuth(e6, n3);
883
985
  }, getAuth() {
884
986
  if (!t2) throw Error(`Wix context is not available. Make sure to initialize the Wix context before using SDK modules`);
885
987
  return t2.auth;
886
- }, async graphql(e3, n3, r2) {
988
+ }, async graphql(e6, n3, r2) {
887
989
  if (!t2) throw Error(`Wix context is not available. Make sure to initialize the Wix context before using SDK modules`);
888
- return t2.graphql(e3, n3, r2);
990
+ return t2.graphql(e6, n3, r2);
889
991
  } };
890
992
  }
891
- function Tn(e2) {
892
- let t2 = globalThis.__wix_context__, n2 = { client: h.client, elevatedClient: h.elevatedClient }, r2;
893
- globalThis.__wix_context__ = void 0, h.client = void 0, h.elevatedClient = void 0, typeof $wixContext < `u` && (r2 = { client: $wixContext?.client, elevatedClient: $wixContext?.elevatedClient }, delete $wixContext.client, delete $wixContext.elevatedClient);
993
+ function Vn(e5) {
994
+ let t2 = globalThis.__wix_context__, n2 = { client: g.client, elevatedClient: g.elevatedClient }, r2;
995
+ globalThis.__wix_context__ = void 0, g.client = void 0, g.elevatedClient = void 0, typeof $wixContext < `u` && (r2 = { client: $wixContext?.client, elevatedClient: $wixContext?.elevatedClient }, delete $wixContext.client, delete $wixContext.elevatedClient);
894
996
  try {
895
- return e2();
997
+ return e5();
896
998
  } finally {
897
- globalThis.__wix_context__ = t2, h.client = n2.client, h.elevatedClient = n2.elevatedClient, typeof $wixContext < `u` && ($wixContext.client = r2.client, $wixContext.elevatedClient = r2.elevatedClient);
999
+ globalThis.__wix_context__ = t2, g.client = n2.client, g.elevatedClient = n2.elevatedClient, typeof $wixContext < `u` && ($wixContext.client = r2.client, $wixContext.elevatedClient = r2.elevatedClient);
898
1000
  }
899
1001
  }
900
- function En(e2, t2) {
901
- return { ...e2, ...Object.fromEntries(t2.map((t3) => [t3, (...n2) => {
902
- let r2 = wn();
1002
+ function Hn(e5, t2) {
1003
+ return { ...e5, ...Object.fromEntries(t2.map((t3) => [t3, (...n2) => {
1004
+ let r2 = Bn();
903
1005
  if (!r2) throw Error(`Wix context is not available. Make sure to initialize the Wix context before using SDK modules`);
904
- return r2.initWixModules(e2)[t3].apply(void 0, n2);
1006
+ return r2.initWixModules(e5)[t3].apply(void 0, n2);
905
1007
  }])) };
906
1008
  }
907
- function Dn(e2) {
908
- return En({ __type: `host`, create: (t2) => Object.entries(e2).reduce((e3, [n2, r2]) => ({ ...e3, [n2]: r2(t2) }), {}) }, Object.keys(e2));
1009
+ function Un(e5) {
1010
+ return Hn({ __type: `host`, create: (t2) => Object.entries(e5).reduce((e6, [n2, r2]) => ({ ...e6, [n2]: r2(t2) }), {}) }, Object.keys(e5));
909
1011
  }
910
- var On = function() {
911
- return On = Object.assign || function(e2) {
912
- for (var t2, n2 = 1, r2 = arguments.length; n2 < r2; n2++) for (var i2 in t2 = arguments[n2], t2) Object.prototype.hasOwnProperty.call(t2, i2) && (e2[i2] = t2[i2]);
913
- return e2;
914
- }, On.apply(this, arguments);
1012
+ var F = (e5) => typeof e5 == `string`;
1013
+ var Wn = () => {
1014
+ let e5, t2, n2 = new Promise((n3, r2) => {
1015
+ e5 = n3, t2 = r2;
1016
+ });
1017
+ return n2.resolve = e5, n2.reject = t2, n2;
1018
+ };
1019
+ var Gn = (e5) => e5 == null ? `` : `` + e5;
1020
+ var Kn = (e5, t2, n2) => {
1021
+ e5.forEach((e6) => {
1022
+ t2[e6] && (n2[e6] = t2[e6]);
1023
+ });
1024
+ };
1025
+ var qn = /###/g;
1026
+ var Jn = (e5) => e5 && e5.indexOf(`###`) > -1 ? e5.replace(qn, `.`) : e5;
1027
+ var Yn = (e5) => !e5 || F(e5);
1028
+ var Xn = (e5, t2, n2) => {
1029
+ let r2 = F(t2) ? t2.split(`.`) : t2, i2 = 0;
1030
+ for (; i2 < r2.length - 1; ) {
1031
+ if (Yn(e5)) return {};
1032
+ let t3 = Jn(r2[i2]);
1033
+ !e5[t3] && n2 && (e5[t3] = new n2()), e5 = Object.prototype.hasOwnProperty.call(e5, t3) ? e5[t3] : {}, ++i2;
1034
+ }
1035
+ return Yn(e5) ? {} : { obj: e5, k: Jn(r2[i2]) };
1036
+ };
1037
+ var Zn = (e5, t2, n2) => {
1038
+ let { obj: r2, k: i2 } = Xn(e5, t2, Object);
1039
+ if (r2 !== void 0 || t2.length === 1) {
1040
+ r2[i2] = n2;
1041
+ return;
1042
+ }
1043
+ let a2 = t2[t2.length - 1], o2 = t2.slice(0, t2.length - 1), s2 = Xn(e5, o2, Object);
1044
+ for (; s2.obj === void 0 && o2.length; ) a2 = `${o2[o2.length - 1]}.${a2}`, o2 = o2.slice(0, o2.length - 1), s2 = Xn(e5, o2, Object), s2?.obj && s2.obj[`${s2.k}.${a2}`] !== void 0 && (s2.obj = void 0);
1045
+ s2.obj[`${s2.k}.${a2}`] = n2;
1046
+ };
1047
+ var Qn = (e5, t2, n2, r2) => {
1048
+ let { obj: i2, k: a2 } = Xn(e5, t2, Object);
1049
+ i2[a2] = i2[a2] || [], i2[a2].push(n2);
1050
+ };
1051
+ var $n = (e5, t2) => {
1052
+ let { obj: n2, k: r2 } = Xn(e5, t2);
1053
+ if (n2 && Object.prototype.hasOwnProperty.call(n2, r2)) return n2[r2];
1054
+ };
1055
+ var er = (e5, t2, n2) => {
1056
+ let r2 = $n(e5, n2);
1057
+ return r2 === void 0 ? $n(t2, n2) : r2;
1058
+ };
1059
+ var tr = (e5, t2, n2) => {
1060
+ for (let r2 in t2) r2 !== `__proto__` && r2 !== `constructor` && (r2 in e5 ? F(e5[r2]) || e5[r2] instanceof String || F(t2[r2]) || t2[r2] instanceof String ? n2 && (e5[r2] = t2[r2]) : tr(e5[r2], t2[r2], n2) : e5[r2] = t2[r2]);
1061
+ return e5;
1062
+ };
1063
+ var I = (e5) => e5.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, `\\$&`);
1064
+ var nr = { "&": `&amp;`, "<": `&lt;`, ">": `&gt;`, '"': `&quot;`, "'": `&#39;`, "/": `&#x2F;` };
1065
+ var rr = (e5) => F(e5) ? e5.replace(/[&<>"'\/]/g, (e6) => nr[e6]) : e5;
1066
+ var ir = class {
1067
+ constructor(e5) {
1068
+ this.capacity = e5, this.regExpMap = /* @__PURE__ */ new Map(), this.regExpQueue = [];
1069
+ }
1070
+ getRegExp(e5) {
1071
+ let t2 = this.regExpMap.get(e5);
1072
+ if (t2 !== void 0) return t2;
1073
+ let n2 = new RegExp(e5);
1074
+ return this.regExpQueue.length === this.capacity && this.regExpMap.delete(this.regExpQueue.shift()), this.regExpMap.set(e5, n2), this.regExpQueue.push(e5), n2;
1075
+ }
1076
+ };
1077
+ var ar = [` `, `,`, `?`, `!`, `;`];
1078
+ var or = new ir(20);
1079
+ var sr = (e5, t2, n2) => {
1080
+ t2 ||= ``, n2 ||= ``;
1081
+ let r2 = ar.filter((e6) => t2.indexOf(e6) < 0 && n2.indexOf(e6) < 0);
1082
+ if (r2.length === 0) return true;
1083
+ let i2 = or.getRegExp(`(${r2.map((e6) => e6 === `?` ? `\\?` : e6).join(`|`)})`), a2 = !i2.test(e5);
1084
+ if (!a2) {
1085
+ let t3 = e5.indexOf(n2);
1086
+ t3 > 0 && !i2.test(e5.substring(0, t3)) && (a2 = true);
1087
+ }
1088
+ return a2;
1089
+ };
1090
+ var cr = (e5, t2, n2 = `.`) => {
1091
+ if (!e5) return;
1092
+ if (e5[t2]) return Object.prototype.hasOwnProperty.call(e5, t2) ? e5[t2] : void 0;
1093
+ let r2 = t2.split(n2), i2 = e5;
1094
+ for (let e6 = 0; e6 < r2.length; ) {
1095
+ if (!i2 || typeof i2 != `object`) return;
1096
+ let t3, a2 = ``;
1097
+ for (let o2 = e6; o2 < r2.length; ++o2) if (o2 !== e6 && (a2 += n2), a2 += r2[o2], t3 = i2[a2], t3 !== void 0) {
1098
+ if ([`string`, `number`, `boolean`].indexOf(typeof t3) > -1 && o2 < r2.length - 1) continue;
1099
+ e6 += o2 - e6 + 1;
1100
+ break;
1101
+ }
1102
+ i2 = t3;
1103
+ }
1104
+ return i2;
1105
+ };
1106
+ var lr = (e5) => e5?.replace(/_/g, `-`);
1107
+ var ur = { type: `logger`, log(e5) {
1108
+ this.output(`log`, e5);
1109
+ }, warn(e5) {
1110
+ this.output(`warn`, e5);
1111
+ }, error(e5) {
1112
+ this.output(`error`, e5);
1113
+ }, output(e5, t2) {
1114
+ console?.[e5]?.apply?.(console, t2);
1115
+ } };
1116
+ var L = new class e2 {
1117
+ constructor(e5, t2 = {}) {
1118
+ this.init(e5, t2);
1119
+ }
1120
+ init(e5, t2 = {}) {
1121
+ this.prefix = t2.prefix || `i18next:`, this.logger = e5 || ur, this.options = t2, this.debug = t2.debug;
1122
+ }
1123
+ log(...e5) {
1124
+ return this.forward(e5, `log`, ``, true);
1125
+ }
1126
+ warn(...e5) {
1127
+ return this.forward(e5, `warn`, ``, true);
1128
+ }
1129
+ error(...e5) {
1130
+ return this.forward(e5, `error`, ``);
1131
+ }
1132
+ deprecate(...e5) {
1133
+ return this.forward(e5, `warn`, `WARNING DEPRECATED: `, true);
1134
+ }
1135
+ forward(e5, t2, n2, r2) {
1136
+ return r2 && !this.debug ? null : (F(e5[0]) && (e5[0] = `${n2}${this.prefix} ${e5[0]}`), this.logger[t2](e5));
1137
+ }
1138
+ create(t2) {
1139
+ return new e2(this.logger, { prefix: `${this.prefix}:${t2}:`, ...this.options });
1140
+ }
1141
+ clone(t2) {
1142
+ return t2 ||= this.options, t2.prefix = t2.prefix || this.prefix, new e2(this.logger, t2);
1143
+ }
1144
+ }();
1145
+ var dr = class {
1146
+ constructor() {
1147
+ this.observers = {};
1148
+ }
1149
+ on(e5, t2) {
1150
+ return e5.split(` `).forEach((e6) => {
1151
+ this.observers[e6] || (this.observers[e6] = /* @__PURE__ */ new Map());
1152
+ let n2 = this.observers[e6].get(t2) || 0;
1153
+ this.observers[e6].set(t2, n2 + 1);
1154
+ }), this;
1155
+ }
1156
+ off(e5, t2) {
1157
+ if (this.observers[e5]) {
1158
+ if (!t2) {
1159
+ delete this.observers[e5];
1160
+ return;
1161
+ }
1162
+ this.observers[e5].delete(t2);
1163
+ }
1164
+ }
1165
+ emit(e5, ...t2) {
1166
+ this.observers[e5] && Array.from(this.observers[e5].entries()).forEach(([e6, n2]) => {
1167
+ for (let r2 = 0; r2 < n2; r2++) e6(...t2);
1168
+ }), this.observers[`*`] && Array.from(this.observers[`*`].entries()).forEach(([n2, r2]) => {
1169
+ for (let i2 = 0; i2 < r2; i2++) n2.apply(n2, [e5, ...t2]);
1170
+ });
1171
+ }
1172
+ };
1173
+ var fr = class extends dr {
1174
+ constructor(e5, t2 = { ns: [`translation`], defaultNS: `translation` }) {
1175
+ super(), this.data = e5 || {}, this.options = t2, this.options.keySeparator === void 0 && (this.options.keySeparator = `.`), this.options.ignoreJSONStructure === void 0 && (this.options.ignoreJSONStructure = true);
1176
+ }
1177
+ addNamespaces(e5) {
1178
+ this.options.ns.indexOf(e5) < 0 && this.options.ns.push(e5);
1179
+ }
1180
+ removeNamespaces(e5) {
1181
+ let t2 = this.options.ns.indexOf(e5);
1182
+ t2 > -1 && this.options.ns.splice(t2, 1);
1183
+ }
1184
+ getResource(e5, t2, n2, r2 = {}) {
1185
+ let i2 = r2.keySeparator === void 0 ? this.options.keySeparator : r2.keySeparator, a2 = r2.ignoreJSONStructure === void 0 ? this.options.ignoreJSONStructure : r2.ignoreJSONStructure, o2;
1186
+ e5.indexOf(`.`) > -1 ? o2 = e5.split(`.`) : (o2 = [e5, t2], n2 && (Array.isArray(n2) ? o2.push(...n2) : F(n2) && i2 ? o2.push(...n2.split(i2)) : o2.push(n2)));
1187
+ let s2 = $n(this.data, o2);
1188
+ return !s2 && !t2 && !n2 && e5.indexOf(`.`) > -1 && (e5 = o2[0], t2 = o2[1], n2 = o2.slice(2).join(`.`)), s2 || !a2 || !F(n2) ? s2 : cr(this.data?.[e5]?.[t2], n2, i2);
1189
+ }
1190
+ addResource(e5, t2, n2, r2, i2 = { silent: false }) {
1191
+ let a2 = i2.keySeparator === void 0 ? this.options.keySeparator : i2.keySeparator, o2 = [e5, t2];
1192
+ n2 && (o2 = o2.concat(a2 ? n2.split(a2) : n2)), e5.indexOf(`.`) > -1 && (o2 = e5.split(`.`), r2 = t2, t2 = o2[1]), this.addNamespaces(t2), Zn(this.data, o2, r2), i2.silent || this.emit(`added`, e5, t2, n2, r2);
1193
+ }
1194
+ addResources(e5, t2, n2, r2 = { silent: false }) {
1195
+ for (let r3 in n2) (F(n2[r3]) || Array.isArray(n2[r3])) && this.addResource(e5, t2, r3, n2[r3], { silent: true });
1196
+ r2.silent || this.emit(`added`, e5, t2, n2);
1197
+ }
1198
+ addResourceBundle(e5, t2, n2, r2, i2, a2 = { silent: false, skipCopy: false }) {
1199
+ let o2 = [e5, t2];
1200
+ e5.indexOf(`.`) > -1 && (o2 = e5.split(`.`), r2 = n2, n2 = t2, t2 = o2[1]), this.addNamespaces(t2);
1201
+ let s2 = $n(this.data, o2) || {};
1202
+ a2.skipCopy || (n2 = JSON.parse(JSON.stringify(n2))), r2 ? tr(s2, n2, i2) : s2 = { ...s2, ...n2 }, Zn(this.data, o2, s2), a2.silent || this.emit(`added`, e5, t2, n2);
1203
+ }
1204
+ removeResourceBundle(e5, t2) {
1205
+ this.hasResourceBundle(e5, t2) && delete this.data[e5][t2], this.removeNamespaces(t2), this.emit(`removed`, e5, t2);
1206
+ }
1207
+ hasResourceBundle(e5, t2) {
1208
+ return this.getResource(e5, t2) !== void 0;
1209
+ }
1210
+ getResourceBundle(e5, t2) {
1211
+ return t2 ||= this.options.defaultNS, this.getResource(e5, t2);
1212
+ }
1213
+ getDataByLanguage(e5) {
1214
+ return this.data[e5];
1215
+ }
1216
+ hasLanguageSomeTranslations(e5) {
1217
+ let t2 = this.getDataByLanguage(e5);
1218
+ return !!(t2 && Object.keys(t2) || []).find((e6) => t2[e6] && Object.keys(t2[e6]).length > 0);
1219
+ }
1220
+ toJSON() {
1221
+ return this.data;
1222
+ }
1223
+ };
1224
+ var pr = { processors: {}, addPostProcessor(e5) {
1225
+ this.processors[e5.name] = e5;
1226
+ }, handle(e5, t2, n2, r2, i2) {
1227
+ return e5.forEach((e6) => {
1228
+ t2 = this.processors[e6]?.process(t2, n2, r2, i2) ?? t2;
1229
+ }), t2;
1230
+ } };
1231
+ var mr = Symbol(`i18next/PATH_KEY`);
1232
+ function hr() {
1233
+ let e5 = [], t2 = /* @__PURE__ */ Object.create(null), n2;
1234
+ return t2.get = (r2, i2) => (n2?.revoke?.(), i2 === mr ? e5 : (e5.push(i2), n2 = Proxy.revocable(r2, t2), n2.proxy)), Proxy.revocable(/* @__PURE__ */ Object.create(null), t2).proxy;
1235
+ }
1236
+ function R(e5, t2) {
1237
+ let { [mr]: n2 } = e5(hr()), r2 = t2?.keySeparator ?? `.`, i2 = t2?.nsSeparator ?? `:`;
1238
+ if (n2.length > 1 && i2) {
1239
+ let e6 = t2?.ns, a2 = Array.isArray(e6) ? e6 : null;
1240
+ if (a2 && a2.length > 1 && a2.slice(1).includes(n2[0])) return `${n2[0]}${i2}${n2.slice(1).join(r2)}`;
1241
+ }
1242
+ return n2.join(r2);
1243
+ }
1244
+ var gr = {};
1245
+ var _r = (e5) => !F(e5) && typeof e5 != `boolean` && typeof e5 != `number`;
1246
+ var vr = class e3 extends dr {
1247
+ constructor(e5, t2 = {}) {
1248
+ super(), Kn([`resourceStore`, `languageUtils`, `pluralResolver`, `interpolator`, `backendConnector`, `i18nFormat`, `utils`], e5, this), this.options = t2, this.options.keySeparator === void 0 && (this.options.keySeparator = `.`), this.logger = L.create(`translator`);
1249
+ }
1250
+ changeLanguage(e5) {
1251
+ e5 && (this.language = e5);
1252
+ }
1253
+ exists(e5, t2 = { interpolation: {} }) {
1254
+ let n2 = { ...t2 };
1255
+ if (e5 == null) return false;
1256
+ let r2 = this.resolve(e5, n2);
1257
+ if (r2?.res === void 0) return false;
1258
+ let i2 = _r(r2.res);
1259
+ return !(n2.returnObjects === false && i2);
1260
+ }
1261
+ extractFromKey(e5, t2) {
1262
+ let n2 = t2.nsSeparator === void 0 ? this.options.nsSeparator : t2.nsSeparator;
1263
+ n2 === void 0 && (n2 = `:`);
1264
+ 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 && !sr(e5, n2, r2);
1265
+ if (a2 && !o2) {
1266
+ let t3 = e5.match(this.interpolator.nestingRegexp);
1267
+ if (t3 && t3.length > 0) return { key: e5, namespaces: F(i2) ? [i2] : i2 };
1268
+ let a3 = e5.split(n2);
1269
+ (n2 !== r2 || n2 === r2 && this.options.ns.indexOf(a3[0]) > -1) && (i2 = a3.shift()), e5 = a3.join(r2);
1270
+ }
1271
+ return { key: e5, namespaces: F(i2) ? [i2] : i2 };
1272
+ }
1273
+ translate(t2, n2, r2) {
1274
+ let i2 = typeof n2 == `object` ? { ...n2 } : n2;
1275
+ if (typeof i2 != `object` && this.options.overloadTranslationOptionHandler && (i2 = this.options.overloadTranslationOptionHandler(arguments)), typeof i2 == `object` && (i2 = { ...i2 }), i2 ||= {}, t2 == null) return ``;
1276
+ typeof t2 == `function` && (t2 = R(t2, { ...this.options, ...i2 })), Array.isArray(t2) || (t2 = [String(t2)]), t2 = t2.map((e5) => typeof e5 == `function` ? R(e5, { ...this.options, ...i2 }) : String(e5));
1277
+ let a2 = i2.returnDetails === void 0 ? this.options.returnDetails : i2.returnDetails, o2 = i2.keySeparator === void 0 ? this.options.keySeparator : i2.keySeparator, { key: s2, namespaces: c2 } = this.extractFromKey(t2[t2.length - 1], i2), l2 = c2[c2.length - 1], u2 = i2.nsSeparator === void 0 ? this.options.nsSeparator : i2.nsSeparator;
1278
+ u2 === void 0 && (u2 = `:`);
1279
+ let d2 = i2.lng || this.language, f2 = i2.appendNamespaceToCIMode || this.options.appendNamespaceToCIMode;
1280
+ 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;
1281
+ 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 && !F(i2.count), x2 = e3.hasDefaultValue(i2), S2 = b2 ? this.pluralResolver.getSuffix(d2, i2.count, i2) : ``, ee2 = i2.ordinal && b2 ? this.pluralResolver.getSuffix(d2, i2.count, { ordinal: false }) : ``, C2 = b2 && !i2.ordinal && i2.count === 0, w2 = C2 && i2[`defaultValue${this.options.pluralSeparator}zero`] || i2[`defaultValue${S2}`] || i2[`defaultValue${ee2}`] || i2.defaultValue, T2 = m2;
1282
+ y2 && !m2 && x2 && (T2 = w2);
1283
+ let E2 = _r(T2), D2 = Object.prototype.toString.apply(T2);
1284
+ if (y2 && T2 && E2 && _2.indexOf(D2) < 0 && !(F(v2) && Array.isArray(T2))) {
1285
+ if (!i2.returnObjects && !this.options.returnObjects) {
1286
+ this.options.returnedObjectHandler || this.logger.warn(`accessing an object - but returnObjects options is not enabled!`);
1287
+ let e5 = this.options.returnedObjectHandler ? this.options.returnedObjectHandler(h2, T2, { ...i2, ns: c2 }) : `key '${s2} (${this.language})' returned an object instead of string.`;
1288
+ return a2 ? (p2.res = e5, p2.usedParams = this.getUsedParamsDetails(i2), p2) : e5;
1289
+ }
1290
+ if (o2) {
1291
+ let e5 = Array.isArray(T2), t3 = e5 ? [] : {}, n3 = e5 ? g2 : h2;
1292
+ for (let e6 in T2) if (Object.prototype.hasOwnProperty.call(T2, e6)) {
1293
+ let r3 = `${n3}${o2}${e6}`;
1294
+ t3[e6] = x2 && !m2 ? this.translate(r3, { ...i2, defaultValue: _r(w2) ? w2[e6] : void 0, joinArrays: false, ns: c2 }) : this.translate(r3, { ...i2, joinArrays: false, ns: c2 }), t3[e6] === r3 && (t3[e6] = T2[e6]);
1295
+ }
1296
+ m2 = t3;
1297
+ }
1298
+ } else if (y2 && F(v2) && Array.isArray(m2)) m2 = m2.join(v2), m2 &&= this.extendTranslation(m2, t2, i2, r2);
1299
+ else {
1300
+ let e5 = false, n3 = false;
1301
+ !this.isValidLookup(m2) && x2 && (e5 = true, m2 = w2), this.isValidLookup(m2) || (n3 = true, m2 = s2);
1302
+ let a3 = (i2.missingKeyNoValueFallbackToKey || this.options.missingKeyNoValueFallbackToKey) && n3 ? void 0 : m2, c3 = x2 && w2 !== m2 && this.options.updateMissing;
1303
+ if (n3 || e5 || c3) {
1304
+ if (this.logger.log(c3 ? `updateKey` : `missingKey`, d2, l2, s2, c3 ? w2 : m2), o2) {
1305
+ let e7 = this.resolve(s2, { ...i2, keySeparator: false });
1306
+ e7 && e7.res && this.logger.warn(`Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.`);
1307
+ }
1308
+ let e6 = [], t3 = this.languageUtils.getFallbackCodes(this.options.fallbackLng, i2.lng || this.language);
1309
+ if (this.options.saveMissingTo === `fallback` && t3 && t3[0]) for (let n5 = 0; n5 < t3.length; n5++) e6.push(t3[n5]);
1310
+ else this.options.saveMissingTo === `all` ? e6 = this.languageUtils.toResolveHierarchy(i2.lng || this.language) : e6.push(i2.lng || this.language);
1311
+ let n4 = (e7, t4, n5) => {
1312
+ let r3 = x2 && n5 !== m2 ? n5 : a3;
1313
+ this.options.missingKeyHandler ? this.options.missingKeyHandler(e7, l2, t4, r3, c3, i2) : this.backendConnector?.saveMissing && this.backendConnector.saveMissing(e7, l2, t4, r3, c3, i2), this.emit(`missingKey`, e7, l2, t4, m2);
1314
+ };
1315
+ this.options.saveMissing && (this.options.saveMissingPlurals && b2 ? e6.forEach((e7) => {
1316
+ let t4 = this.pluralResolver.getSuffixes(e7, i2);
1317
+ C2 && i2[`defaultValue${this.options.pluralSeparator}zero`] && t4.indexOf(`${this.options.pluralSeparator}zero`) < 0 && t4.push(`${this.options.pluralSeparator}zero`), t4.forEach((t5) => {
1318
+ n4([e7], s2 + t5, i2[`defaultValue${t5}`] || w2);
1319
+ });
1320
+ }) : n4(e6, s2, w2));
1321
+ }
1322
+ m2 = this.extendTranslation(m2, t2, i2, p2, r2), n3 && m2 === s2 && this.options.appendNamespaceToMissingKey && (m2 = `${l2}${u2}${s2}`), (n3 || e5) && this.options.parseMissingKeyHandler && (m2 = this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey ? `${l2}${u2}${s2}` : s2, e5 ? m2 : void 0, i2));
1323
+ }
1324
+ return a2 ? (p2.res = m2, p2.usedParams = this.getUsedParamsDetails(i2), p2) : m2;
1325
+ }
1326
+ extendTranslation(e5, t2, n2, r2, i2) {
1327
+ 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 });
1328
+ else if (!n2.skipInterpolation) {
1329
+ n2.interpolation && this.interpolator.init({ ...n2, interpolation: { ...this.options.interpolation, ...n2.interpolation } });
1330
+ let a3 = F(e5) && (n2?.interpolation?.skipOnVariables === void 0 ? this.options.interpolation.skipOnVariables : n2.interpolation.skipOnVariables), o3;
1331
+ if (a3) {
1332
+ let t3 = e5.match(this.interpolator.nestingRegexp);
1333
+ o3 = t3 && t3.length;
1334
+ }
1335
+ let s2 = n2.replace && !F(n2.replace) ? n2.replace : n2;
1336
+ 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) {
1337
+ let t3 = e5.match(this.interpolator.nestingRegexp), r3 = t3 && t3.length;
1338
+ o3 < r3 && (n2.nest = false);
1339
+ }
1340
+ !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();
1341
+ }
1342
+ let a2 = n2.postProcess || this.options.postProcess, o2 = F(a2) ? [a2] : a2;
1343
+ return e5 != null && o2?.length && n2.applyPostProcessor !== false && (e5 = pr.handle(o2, e5, t2, this.options && this.options.postProcessPassResolved ? { i18nResolved: { ...r2, usedParams: this.getUsedParamsDetails(n2) }, ...n2 } : n2, this)), e5;
1344
+ }
1345
+ resolve(e5, t2 = {}) {
1346
+ let n2, r2, i2, a2, o2;
1347
+ return F(e5) && (e5 = [e5]), Array.isArray(e5) && (e5 = e5.map((e6) => typeof e6 == `function` ? R(e6, { ...this.options, ...t2 }) : e6)), e5.forEach((e6) => {
1348
+ if (this.isValidLookup(n2)) return;
1349
+ let s2 = this.extractFromKey(e6, t2), c2 = s2.key;
1350
+ r2 = c2;
1351
+ let l2 = s2.namespaces;
1352
+ this.options.fallbackNS && (l2 = l2.concat(this.options.fallbackNS));
1353
+ let u2 = t2.count !== void 0 && !F(t2.count), d2 = u2 && !t2.ordinal && t2.count === 0, f2 = t2.context !== void 0 && (F(t2.context) || typeof t2.context == `number`) && t2.context !== ``, p2 = t2.lngs ? t2.lngs : this.languageUtils.toResolveHierarchy(t2.lng || this.language, t2.fallbackLng);
1354
+ l2.forEach((e7) => {
1355
+ this.isValidLookup(n2) || (o2 = e7, !gr[`${p2[0]}-${e7}`] && this.utils?.hasLoadedNamespace && !this.utils?.hasLoadedNamespace(o2) && (gr[`${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) => {
1356
+ if (this.isValidLookup(n2)) return;
1357
+ a2 = r3;
1358
+ let o3 = [c2];
1359
+ if (this.i18nFormat?.addLookupKeys) this.i18nFormat.addLookupKeys(o3, c2, r3, e7, t2);
1360
+ else {
1361
+ let e8;
1362
+ u2 && (e8 = this.pluralResolver.getSuffix(r3, t2.count, t2));
1363
+ let n3 = `${this.options.pluralSeparator}zero`, i3 = `${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;
1364
+ if (u2 && (t2.ordinal && e8.indexOf(i3) === 0 && o3.push(c2 + e8.replace(i3, this.options.pluralSeparator)), o3.push(c2 + e8), d2 && o3.push(c2 + n3)), f2) {
1365
+ let r4 = `${c2}${this.options.contextSeparator || `_`}${t2.context}`;
1366
+ o3.push(r4), u2 && (t2.ordinal && e8.indexOf(i3) === 0 && o3.push(r4 + e8.replace(i3, this.options.pluralSeparator)), o3.push(r4 + e8), d2 && o3.push(r4 + n3));
1367
+ }
1368
+ }
1369
+ let s3;
1370
+ for (; s3 = o3.pop(); ) this.isValidLookup(n2) || (i2 = s3, n2 = this.getResource(r3, e7, s3, t2));
1371
+ }));
1372
+ });
1373
+ }), { res: n2, usedKey: r2, exactUsedKey: i2, usedLng: a2, usedNS: o2 };
1374
+ }
1375
+ isValidLookup(e5) {
1376
+ return e5 !== void 0 && !(!this.options.returnNull && e5 === null) && !(!this.options.returnEmptyString && e5 === ``);
1377
+ }
1378
+ getResource(e5, t2, n2, r2 = {}) {
1379
+ return this.i18nFormat?.getResource ? this.i18nFormat.getResource(e5, t2, n2, r2) : this.resourceStore.getResource(e5, t2, n2, r2);
1380
+ }
1381
+ getUsedParamsDetails(e5 = {}) {
1382
+ let t2 = [`defaultValue`, `ordinal`, `context`, `replace`, `lng`, `lngs`, `fallbackLng`, `ns`, `keySeparator`, `nsSeparator`, `returnObjects`, `returnDetails`, `joinArrays`, `postProcess`, `interpolation`], n2 = e5.replace && !F(e5.replace), r2 = n2 ? e5.replace : e5;
1383
+ if (n2 && e5.count !== void 0 && (r2.count = e5.count), this.options.interpolation.defaultVariables && (r2 = { ...this.options.interpolation.defaultVariables, ...r2 }), !n2) {
1384
+ r2 = { ...r2 };
1385
+ for (let e6 of t2) delete r2[e6];
1386
+ }
1387
+ return r2;
1388
+ }
1389
+ static hasDefaultValue(e5) {
1390
+ for (let t2 in e5) if (Object.prototype.hasOwnProperty.call(e5, t2) && t2.substring(0, 12) === `defaultValue` && e5[t2] !== void 0) return true;
1391
+ return false;
1392
+ }
1393
+ };
1394
+ var yr = class {
1395
+ constructor(e5) {
1396
+ this.options = e5, this.supportedLngs = this.options.supportedLngs || false, this.logger = L.create(`languageUtils`);
1397
+ }
1398
+ getScriptPartFromCode(e5) {
1399
+ if (e5 = lr(e5), !e5 || e5.indexOf(`-`) < 0) return null;
1400
+ let t2 = e5.split(`-`);
1401
+ return t2.length === 2 || (t2.pop(), t2[t2.length - 1].toLowerCase() === `x`) ? null : this.formatLanguageCode(t2.join(`-`));
1402
+ }
1403
+ getLanguagePartFromCode(e5) {
1404
+ if (e5 = lr(e5), !e5 || e5.indexOf(`-`) < 0) return e5;
1405
+ let t2 = e5.split(`-`);
1406
+ return this.formatLanguageCode(t2[0]);
1407
+ }
1408
+ formatLanguageCode(e5) {
1409
+ if (F(e5) && e5.indexOf(`-`) > -1) {
1410
+ let t2;
1411
+ try {
1412
+ t2 = Intl.getCanonicalLocales(e5)[0];
1413
+ } catch {
1414
+ }
1415
+ return t2 && this.options.lowerCaseLng && (t2 = t2.toLowerCase()), t2 || (this.options.lowerCaseLng ? e5.toLowerCase() : e5);
1416
+ }
1417
+ return this.options.cleanCode || this.options.lowerCaseLng ? e5.toLowerCase() : e5;
1418
+ }
1419
+ isSupportedCode(e5) {
1420
+ return (this.options.load === `languageOnly` || this.options.nonExplicitSupportedLngs) && (e5 = this.getLanguagePartFromCode(e5)), !this.supportedLngs || !this.supportedLngs.length || this.supportedLngs.indexOf(e5) > -1;
1421
+ }
1422
+ getBestMatchFromCodes(e5) {
1423
+ if (!e5) return null;
1424
+ let t2;
1425
+ return e5.forEach((e6) => {
1426
+ if (t2) return;
1427
+ let n2 = this.formatLanguageCode(e6);
1428
+ (!this.options.supportedLngs || this.isSupportedCode(n2)) && (t2 = n2);
1429
+ }), !t2 && this.options.supportedLngs && e5.forEach((e6) => {
1430
+ if (t2) return;
1431
+ let n2 = this.getScriptPartFromCode(e6);
1432
+ if (this.isSupportedCode(n2)) return t2 = n2;
1433
+ let r2 = this.getLanguagePartFromCode(e6);
1434
+ if (this.isSupportedCode(r2)) return t2 = r2;
1435
+ t2 = this.options.supportedLngs.find((e7) => {
1436
+ if (e7 === r2 || !(e7.indexOf(`-`) < 0 && r2.indexOf(`-`) < 0) && (e7.indexOf(`-`) > 0 && r2.indexOf(`-`) < 0 && e7.substring(0, e7.indexOf(`-`)) === r2 || e7.indexOf(r2) === 0 && r2.length > 1)) return e7;
1437
+ });
1438
+ }), t2 ||= this.getFallbackCodes(this.options.fallbackLng)[0], t2;
1439
+ }
1440
+ getFallbackCodes(e5, t2) {
1441
+ if (!e5) return [];
1442
+ if (typeof e5 == `function` && (e5 = e5(t2)), F(e5) && (e5 = [e5]), Array.isArray(e5)) return e5;
1443
+ if (!t2) return e5.default || [];
1444
+ let n2 = e5[t2];
1445
+ return n2 ||= e5[this.getScriptPartFromCode(t2)], n2 ||= e5[this.formatLanguageCode(t2)], n2 ||= e5[this.getLanguagePartFromCode(t2)], n2 ||= e5.default, n2 || [];
1446
+ }
1447
+ toResolveHierarchy(e5, t2) {
1448
+ let n2 = this.getFallbackCodes((t2 === false ? [] : t2) || this.options.fallbackLng || [], e5), r2 = [], i2 = (e6) => {
1449
+ e6 && (this.isSupportedCode(e6) ? r2.push(e6) : this.logger.warn(`rejecting language code not found in supportedLngs: ${e6}`));
1450
+ };
1451
+ return F(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))) : F(e5) && i2(this.formatLanguageCode(e5)), n2.forEach((e6) => {
1452
+ r2.indexOf(e6) < 0 && i2(this.formatLanguageCode(e6));
1453
+ }), r2;
1454
+ }
1455
+ };
1456
+ var br = { zero: 0, one: 1, two: 2, few: 3, many: 4, other: 5 };
1457
+ var xr = { select: (e5) => e5 === 1 ? `one` : `other`, resolvedOptions: () => ({ pluralCategories: [`one`, `other`] }) };
1458
+ var Sr = class {
1459
+ constructor(e5, t2 = {}) {
1460
+ this.languageUtils = e5, this.options = t2, this.logger = L.create(`pluralResolver`), this.pluralRulesCache = {};
1461
+ }
1462
+ clearCache() {
1463
+ this.pluralRulesCache = {};
1464
+ }
1465
+ getRule(e5, t2 = {}) {
1466
+ let n2 = lr(e5 === `dev` ? `en` : e5), r2 = t2.ordinal ? `ordinal` : `cardinal`, i2 = JSON.stringify({ cleanedCode: n2, type: r2 });
1467
+ if (i2 in this.pluralRulesCache) return this.pluralRulesCache[i2];
1468
+ let a2;
1469
+ try {
1470
+ a2 = new Intl.PluralRules(n2, { type: r2 });
1471
+ } catch {
1472
+ if (typeof Intl > `u`) return this.logger.error(`No Intl support, please use an Intl polyfill!`), xr;
1473
+ if (!e5.match(/-|_/)) return xr;
1474
+ let n3 = this.languageUtils.getLanguagePartFromCode(e5);
1475
+ a2 = this.getRule(n3, t2);
1476
+ }
1477
+ return this.pluralRulesCache[i2] = a2, a2;
1478
+ }
1479
+ needsPlural(e5, t2 = {}) {
1480
+ let n2 = this.getRule(e5, t2);
1481
+ return n2 ||= this.getRule(`dev`, t2), n2?.resolvedOptions().pluralCategories.length > 1;
1482
+ }
1483
+ getPluralFormsOfKey(e5, t2, n2 = {}) {
1484
+ return this.getSuffixes(e5, n2).map((e6) => `${t2}${e6}`);
1485
+ }
1486
+ getSuffixes(e5, t2 = {}) {
1487
+ let n2 = this.getRule(e5, t2);
1488
+ return n2 ||= this.getRule(`dev`, t2), n2 ? n2.resolvedOptions().pluralCategories.sort((e6, t3) => br[e6] - br[t3]).map((e6) => `${this.options.prepend}${t2.ordinal ? `ordinal${this.options.prepend}` : ``}${e6}`) : [];
1489
+ }
1490
+ getSuffix(e5, t2, n2 = {}) {
1491
+ let r2 = this.getRule(e5, n2);
1492
+ 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));
1493
+ }
1494
+ };
1495
+ var Cr = (e5, t2, n2, r2 = `.`, i2 = true) => {
1496
+ let a2 = er(e5, t2, n2);
1497
+ return !a2 && i2 && F(n2) && (a2 = cr(e5, n2, r2), a2 === void 0 && (a2 = cr(t2, n2, r2))), a2;
1498
+ };
1499
+ var wr = (e5) => e5.replace(/\$/g, `$$$$`);
1500
+ var Tr = class {
1501
+ constructor(e5 = {}) {
1502
+ this.logger = L.create(`interpolator`), this.options = e5, this.format = e5?.interpolation?.format || ((e6) => e6), this.init(e5);
1503
+ }
1504
+ init(e5 = {}) {
1505
+ e5.interpolation ||= { escapeValue: true };
1506
+ 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;
1507
+ this.escape = t2 === void 0 ? rr : t2, this.escapeValue = n2 === void 0 || n2, this.useRawValueToEscape = r2 !== void 0 && r2, this.prefix = i2 ? I(i2) : a2 || `{{`, this.suffix = o2 ? I(o2) : s2 || `}}`, this.formatSeparator = c2 || `,`, this.unescapePrefix = l2 ? `` : u2 || `-`, this.unescapeSuffix = this.unescapePrefix ? `` : l2 || ``, this.nestingPrefix = d2 ? I(d2) : f2 || I(`$t(`), this.nestingSuffix = p2 ? I(p2) : m2 || I(`)`), this.nestingOptionsSeparator = h2 || `,`, this.maxReplaces = g2 || 1e3, this.alwaysFormat = _2 !== void 0 && _2, this.resetRegExp();
1508
+ }
1509
+ reset() {
1510
+ this.options && this.init(this.options);
1511
+ }
1512
+ resetRegExp() {
1513
+ let e5 = (e6, t2) => e6?.source === t2 ? (e6.lastIndex = 0, e6) : new RegExp(t2, `g`);
1514
+ this.regexp = e5(this.regexp, `${this.prefix}(.+?)${this.suffix}`), this.regexpUnescape = e5(this.regexpUnescape, `${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`), this.nestingRegexp = e5(this.nestingRegexp, `${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`);
1515
+ }
1516
+ interpolate(e5, t2, n2, r2) {
1517
+ let i2, a2, o2, s2 = this.options && this.options.interpolation && this.options.interpolation.defaultVariables || {}, c2 = (e6) => {
1518
+ if (e6.indexOf(this.formatSeparator) < 0) {
1519
+ let i4 = Cr(t2, s2, e6, this.options.keySeparator, this.options.ignoreJSONStructure);
1520
+ return this.alwaysFormat ? this.format(i4, void 0, n2, { ...r2, ...t2, interpolationkey: e6 }) : i4;
1521
+ }
1522
+ let i3 = e6.split(this.formatSeparator), a3 = i3.shift().trim(), o3 = i3.join(this.formatSeparator).trim();
1523
+ return this.format(Cr(t2, s2, a3, this.options.keySeparator, this.options.ignoreJSONStructure), o3, n2, { ...r2, ...t2, interpolationkey: a3 });
1524
+ };
1525
+ this.resetRegExp();
1526
+ let l2 = r2?.missingInterpolationHandler || this.options.missingInterpolationHandler, u2 = r2?.interpolation?.skipOnVariables === void 0 ? this.options.interpolation.skipOnVariables : r2.interpolation.skipOnVariables;
1527
+ return [{ regex: this.regexpUnescape, safeValue: (e6) => wr(e6) }, { regex: this.regexp, safeValue: (e6) => this.escapeValue ? wr(this.escape(e6)) : wr(e6) }].forEach((t3) => {
1528
+ for (o2 = 0; i2 = t3.regex.exec(e5); ) {
1529
+ let n3 = i2[1].trim();
1530
+ if (a2 = c2(n3), a2 === void 0) {
1531
+ if (typeof l2 == `function`) {
1532
+ let t4 = l2(e5, i2, r2);
1533
+ a2 = F(t4) ? t4 : ``;
1534
+ } else if (r2 && Object.prototype.hasOwnProperty.call(r2, n3)) a2 = ``;
1535
+ else if (u2) {
1536
+ a2 = i2[0];
1537
+ continue;
1538
+ } else this.logger.warn(`missed to pass in variable ${n3} for interpolating ${e5}`), a2 = ``;
1539
+ } else !F(a2) && !this.useRawValueToEscape && (a2 = Gn(a2));
1540
+ let s3 = t3.safeValue(a2);
1541
+ 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;
1542
+ }
1543
+ }), e5;
1544
+ }
1545
+ nest(e5, t2, n2 = {}) {
1546
+ let r2, i2, a2, o2 = (e6, t3) => {
1547
+ let n3 = this.nestingOptionsSeparator;
1548
+ if (e6.indexOf(n3) < 0) return e6;
1549
+ let r3 = e6.split(RegExp(`${I(n3)}[ ]*{`)), i3 = `{${r3[1]}`;
1550
+ e6 = r3[0], i3 = this.interpolate(i3, a2);
1551
+ let o3 = i3.match(/'/g), s2 = i3.match(/"/g);
1552
+ ((o3?.length ?? 0) % 2 == 0 && !s2 || (s2?.length ?? 0) % 2 != 0) && (i3 = i3.replace(/'/g, `"`));
1553
+ try {
1554
+ a2 = JSON.parse(i3), t3 && (a2 = { ...t3, ...a2 });
1555
+ } catch (t4) {
1556
+ return this.logger.warn(`failed parsing options string in nesting for key ${e6}`, t4), `${e6}${n3}${i3}`;
1557
+ }
1558
+ return a2.defaultValue && a2.defaultValue.indexOf(this.prefix) > -1 && delete a2.defaultValue, e6;
1559
+ };
1560
+ for (; r2 = this.nestingRegexp.exec(e5); ) {
1561
+ let s2 = [];
1562
+ a2 = { ...n2 }, a2 = a2.replace && !F(a2.replace) ? a2.replace : a2, a2.applyPostProcessor = false, delete a2.defaultValue;
1563
+ let c2 = /{.*}/.test(r2[1]) ? r2[1].lastIndexOf(`}`) + 1 : r2[1].indexOf(this.formatSeparator);
1564
+ 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 && !F(i2)) return i2;
1565
+ F(i2) || (i2 = Gn(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;
1566
+ }
1567
+ return e5;
1568
+ }
1569
+ };
1570
+ var Er = (e5) => {
1571
+ let t2 = e5.toLowerCase().trim(), n2 = {};
1572
+ if (e5.indexOf(`(`) > -1) {
1573
+ let r2 = e5.split(`(`);
1574
+ t2 = r2[0].toLowerCase().trim();
1575
+ let i2 = r2[1].substring(0, r2[1].length - 1);
1576
+ t2 === `currency` && i2.indexOf(`:`) < 0 ? n2.currency ||= i2.trim() : t2 === `relativetime` && i2.indexOf(`:`) < 0 ? n2.range ||= i2.trim() : i2.split(`;`).forEach((e6) => {
1577
+ if (e6) {
1578
+ let [t3, ...r3] = e6.split(`:`), i3 = r3.join(`:`).trim().replace(/^'+|'+$/g, ``), a2 = t3.trim();
1579
+ n2[a2] || (n2[a2] = i3), i3 === `false` && (n2[a2] = false), i3 === `true` && (n2[a2] = true), isNaN(i3) || (n2[a2] = parseInt(i3, 10));
1580
+ }
1581
+ });
1582
+ }
1583
+ return { formatName: t2, formatOptions: n2 };
1584
+ };
1585
+ var Dr = (e5) => {
1586
+ let t2 = {};
1587
+ return (n2, r2, i2) => {
1588
+ let a2 = i2;
1589
+ i2 && i2.interpolationkey && i2.formatParams && i2.formatParams[i2.interpolationkey] && i2[i2.interpolationkey] && (a2 = { ...a2, [i2.interpolationkey]: void 0 });
1590
+ let o2 = r2 + JSON.stringify(a2), s2 = t2[o2];
1591
+ return s2 || (s2 = e5(lr(r2), i2), t2[o2] = s2), s2(n2);
1592
+ };
1593
+ };
1594
+ var Or = (e5) => (t2, n2, r2) => e5(lr(n2), r2)(t2);
1595
+ var kr = class {
1596
+ constructor(e5 = {}) {
1597
+ this.logger = L.create(`formatter`), this.options = e5, this.init(e5);
1598
+ }
1599
+ init(e5, t2 = { interpolation: {} }) {
1600
+ this.formatSeparator = t2.interpolation.formatSeparator || `,`;
1601
+ let n2 = t2.cacheInBuiltFormats ? Dr : Or;
1602
+ this.formats = { number: n2((e6, t3) => {
1603
+ let n3 = new Intl.NumberFormat(e6, { ...t3 });
1604
+ return (e7) => n3.format(e7);
1605
+ }), currency: n2((e6, t3) => {
1606
+ let n3 = new Intl.NumberFormat(e6, { ...t3, style: `currency` });
1607
+ return (e7) => n3.format(e7);
1608
+ }), datetime: n2((e6, t3) => {
1609
+ let n3 = new Intl.DateTimeFormat(e6, { ...t3 });
1610
+ return (e7) => n3.format(e7);
1611
+ }), relativetime: n2((e6, t3) => {
1612
+ let n3 = new Intl.RelativeTimeFormat(e6, { ...t3 });
1613
+ return (e7) => n3.format(e7, t3.range || `day`);
1614
+ }), list: n2((e6, t3) => {
1615
+ let n3 = new Intl.ListFormat(e6, { ...t3 });
1616
+ return (e7) => n3.format(e7);
1617
+ }) };
1618
+ }
1619
+ add(e5, t2) {
1620
+ this.formats[e5.toLowerCase().trim()] = t2;
1621
+ }
1622
+ addCached(e5, t2) {
1623
+ this.formats[e5.toLowerCase().trim()] = Dr(t2);
1624
+ }
1625
+ format(e5, t2, n2, r2 = {}) {
1626
+ let i2 = t2.split(this.formatSeparator);
1627
+ if (i2.length > 1 && i2[0].indexOf(`(`) > 1 && i2[0].indexOf(`)`) < 0 && i2.find((e6) => e6.indexOf(`)`) > -1)) {
1628
+ let e6 = i2.findIndex((e7) => e7.indexOf(`)`) > -1);
1629
+ i2[0] = [i2[0], ...i2.splice(1, e6)].join(this.formatSeparator);
1630
+ }
1631
+ return i2.reduce((e6, t3) => {
1632
+ let { formatName: i3, formatOptions: a2 } = Er(t3);
1633
+ if (this.formats[i3]) {
1634
+ let t4 = e6;
1635
+ try {
1636
+ let o2 = r2?.formatParams?.[r2.interpolationkey] || {}, s2 = o2.locale || o2.lng || r2.locale || r2.lng || n2;
1637
+ t4 = this.formats[i3](e6, s2, { ...a2, ...r2, ...o2 });
1638
+ } catch (e7) {
1639
+ this.logger.warn(e7);
1640
+ }
1641
+ return t4;
1642
+ }
1643
+ return this.logger.warn(`there was no format function for ${i3}`), e6;
1644
+ }, e5);
1645
+ }
1646
+ };
1647
+ var Ar = (e5, t2) => {
1648
+ e5.pending[t2] !== void 0 && (delete e5.pending[t2], e5.pendingCount--);
1649
+ };
1650
+ var jr = class extends dr {
1651
+ constructor(e5, t2, n2, r2 = {}) {
1652
+ super(), this.backend = e5, this.store = t2, this.services = n2, this.languageUtils = n2.languageUtils, this.options = r2, this.logger = L.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);
1653
+ }
1654
+ queueLoad(e5, t2, n2, r2) {
1655
+ let i2 = {}, a2 = {}, o2 = {}, s2 = {};
1656
+ return e5.forEach((e6) => {
1657
+ let r3 = true;
1658
+ t2.forEach((t3) => {
1659
+ let o3 = `${e6}|${t3}`;
1660
+ !n2.reload && this.store.hasResourceBundle(e6, t3) ? this.state[o3] = 2 : this.state[o3] < 0 || (this.state[o3] === 1 ? a2[o3] === void 0 && (a2[o3] = true) : (this.state[o3] = 1, r3 = false, a2[o3] === void 0 && (a2[o3] = true), i2[o3] === void 0 && (i2[o3] = true), s2[t3] === void 0 && (s2[t3] = true)));
1661
+ }), r3 || (o2[e6] = true);
1662
+ }), (Object.keys(i2).length || Object.keys(a2).length) && this.queue.push({ pending: a2, pendingCount: Object.keys(a2).length, loaded: {}, errors: [], callback: r2 }), { toLoad: Object.keys(i2), pending: Object.keys(a2), toLoadLanguages: Object.keys(o2), toLoadNamespaces: Object.keys(s2) };
1663
+ }
1664
+ loaded(e5, t2, n2) {
1665
+ let r2 = e5.split(`|`), i2 = r2[0], a2 = r2[1];
1666
+ 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);
1667
+ let o2 = {};
1668
+ this.queue.forEach((n3) => {
1669
+ Qn(n3.loaded, [i2], a2), Ar(n3, e5), t2 && n3.errors.push(t2), n3.pendingCount === 0 && !n3.done && (Object.keys(n3.loaded).forEach((e6) => {
1670
+ o2[e6] || (o2[e6] = {});
1671
+ let t3 = n3.loaded[e6];
1672
+ t3.length && t3.forEach((t4) => {
1673
+ o2[e6][t4] === void 0 && (o2[e6][t4] = true);
1674
+ });
1675
+ }), n3.done = true, n3.errors.length ? n3.callback(n3.errors) : n3.callback());
1676
+ }), this.emit(`loaded`, o2), this.queue = this.queue.filter((e6) => !e6.done);
1677
+ }
1678
+ read(e5, t2, n2, r2 = 0, i2 = this.retryTimeout, a2) {
1679
+ if (!e5.length) return a2(null, {});
1680
+ if (this.readingCalls >= this.maxParallelReads) {
1681
+ this.waitingReads.push({ lng: e5, ns: t2, fcName: n2, tried: r2, wait: i2, callback: a2 });
1682
+ return;
1683
+ }
1684
+ this.readingCalls++;
1685
+ let o2 = (o3, s3) => {
1686
+ if (this.readingCalls--, this.waitingReads.length > 0) {
1687
+ let e6 = this.waitingReads.shift();
1688
+ this.read(e6.lng, e6.ns, e6.fcName, e6.tried, e6.wait, e6.callback);
1689
+ }
1690
+ if (o3 && s3 && r2 < this.maxRetries) {
1691
+ setTimeout(() => {
1692
+ this.read.call(this, e5, t2, n2, r2 + 1, i2 * 2, a2);
1693
+ }, i2);
1694
+ return;
1695
+ }
1696
+ a2(o3, s3);
1697
+ }, s2 = this.backend[n2].bind(this.backend);
1698
+ if (s2.length === 2) {
1699
+ try {
1700
+ let n3 = s2(e5, t2);
1701
+ n3 && typeof n3.then == `function` ? n3.then((e6) => o2(null, e6)).catch(o2) : o2(null, n3);
1702
+ } catch (e6) {
1703
+ o2(e6);
1704
+ }
1705
+ return;
1706
+ }
1707
+ return s2(e5, t2, o2);
1708
+ }
1709
+ prepareLoading(e5, t2, n2 = {}, r2) {
1710
+ if (!this.backend) return this.logger.warn(`No backend was added via i18next.use. Will not load resources.`), r2 && r2();
1711
+ F(e5) && (e5 = this.languageUtils.toResolveHierarchy(e5)), F(t2) && (t2 = [t2]);
1712
+ let i2 = this.queueLoad(e5, t2, n2, r2);
1713
+ if (!i2.toLoad.length) return i2.pending.length || r2(), null;
1714
+ i2.toLoad.forEach((e6) => {
1715
+ this.loadOne(e6);
1716
+ });
1717
+ }
1718
+ load(e5, t2, n2) {
1719
+ this.prepareLoading(e5, t2, {}, n2);
1720
+ }
1721
+ reload(e5, t2, n2) {
1722
+ this.prepareLoading(e5, t2, { reload: true }, n2);
1723
+ }
1724
+ loadOne(e5, t2 = ``) {
1725
+ let n2 = e5.split(`|`), r2 = n2[0], i2 = n2[1];
1726
+ this.read(r2, i2, `read`, void 0, void 0, (n3, a2) => {
1727
+ n3 && this.logger.warn(`${t2}loading namespace ${i2} for language ${r2} failed`, n3), !n3 && a2 && this.logger.log(`${t2}loaded namespace ${i2} for language ${r2}`, a2), this.loaded(e5, n3, a2);
1728
+ });
1729
+ }
1730
+ saveMissing(e5, t2, n2, r2, i2, a2 = {}, o2 = () => {
1731
+ }) {
1732
+ if (this.services?.utils?.hasLoadedNamespace && !this.services?.utils?.hasLoadedNamespace(t2)) {
1733
+ this.logger.warn(`did not save key "${n2}" as the namespace "${t2}" 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!!!`);
1734
+ return;
1735
+ }
1736
+ if (n2 != null && n2 !== ``) {
1737
+ if (this.backend?.create) {
1738
+ let s2 = { ...a2, isUpdate: i2 }, c2 = this.backend.create.bind(this.backend);
1739
+ if (c2.length < 6) try {
1740
+ let i3;
1741
+ i3 = c2.length === 5 ? c2(e5, t2, n2, r2, s2) : c2(e5, t2, n2, r2), i3 && typeof i3.then == `function` ? i3.then((e6) => o2(null, e6)).catch(o2) : o2(null, i3);
1742
+ } catch (e6) {
1743
+ o2(e6);
1744
+ }
1745
+ else c2(e5, t2, n2, r2, o2, s2);
1746
+ }
1747
+ e5 && e5[0] && this.store.addResource(e5[0], t2, n2, r2);
1748
+ }
1749
+ }
1750
+ };
1751
+ var Mr = () => ({ 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) => {
1752
+ let t2 = {};
1753
+ if (typeof e5[1] == `object` && (t2 = e5[1]), F(e5[1]) && (t2.defaultValue = e5[1]), F(e5[2]) && (t2.tDescription = e5[2]), typeof e5[2] == `object` || typeof e5[3] == `object`) {
1754
+ let n2 = e5[3] || e5[2];
1755
+ Object.keys(n2).forEach((e6) => {
1756
+ t2[e6] = n2[e6];
1757
+ });
1758
+ }
1759
+ return t2;
1760
+ }, interpolation: { escapeValue: true, format: (e5) => e5, prefix: `{{`, suffix: `}}`, formatSeparator: `,`, unescapePrefix: `-`, nestingPrefix: `$t(`, nestingSuffix: `)`, nestingOptionsSeparator: `,`, maxReplaces: 1e3, skipOnVariables: true }, cacheInBuiltFormats: true });
1761
+ var Nr = (e5) => (F(e5.ns) && (e5.ns = [e5.ns]), F(e5.fallbackLng) && (e5.fallbackLng = [e5.fallbackLng]), F(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);
1762
+ var Pr = () => {
915
1763
  };
916
- function kn(e2) {
917
- var t2 = typeof Symbol == `function` && Symbol.iterator, n2 = t2 && e2[t2], r2 = 0;
918
- if (n2) return n2.call(e2);
919
- if (e2 && typeof e2.length == `number`) return { next: function() {
920
- return e2 && r2 >= e2.length && (e2 = void 0), { value: e2 && e2[r2++], done: !e2 };
1764
+ var Fr = (e5) => {
1765
+ Object.getOwnPropertyNames(Object.getPrototypeOf(e5)).forEach((t2) => {
1766
+ typeof e5[t2] == `function` && (e5[t2] = e5[t2].bind(e5));
1767
+ });
1768
+ };
1769
+ var Ir = `__i18next_supportNoticeShown`;
1770
+ var Lr = () => !!(typeof globalThis < `u` && globalThis[Ir] || typeof process < `u` && {}.I18NEXT_NO_SUPPORT_NOTICE || typeof process < `u`);
1771
+ var Rr = () => {
1772
+ typeof globalThis < `u` && (globalThis[Ir] = true);
1773
+ };
1774
+ var zr = (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));
1775
+ var z = class e4 extends dr {
1776
+ constructor(e5 = {}, t2) {
1777
+ if (super(), this.options = Nr(e5), this.services = {}, this.logger = L, this.modules = { external: [] }, Fr(this), t2 && !this.isInitialized && !e5.isClone) {
1778
+ if (!this.options.initAsync) return this.init(e5, t2), this;
1779
+ setTimeout(() => {
1780
+ this.init(e5, t2);
1781
+ }, 0);
1782
+ }
1783
+ }
1784
+ init(e5 = {}, t2) {
1785
+ this.isInitializing = true, typeof e5 == `function` && (t2 = e5, e5 = {}), e5.defaultNS == null && e5.ns && (F(e5.ns) ? e5.defaultNS = e5.ns : e5.ns.indexOf(`translation`) < 0 && (e5.defaultNS = e5.ns[0]));
1786
+ let n2 = Mr();
1787
+ this.options = { ...n2, ...this.options, ...Nr(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 && !zr(this) && !Lr() && (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}`), Rr());
1788
+ let r2 = (e6) => e6 ? typeof e6 == `function` ? new e6() : e6 : null;
1789
+ if (!this.options.isClone) {
1790
+ this.modules.logger ? L.init(r2(this.modules.logger), this.options) : L.init(null, this.options);
1791
+ let e6;
1792
+ e6 = this.modules.formatter ? this.modules.formatter : kr;
1793
+ let t3 = new yr(this.options);
1794
+ this.store = new fr(this.options.resources, this.options);
1795
+ let i3 = this.services;
1796
+ i3.logger = L, i3.resourceStore = this.store, i3.languageUtils = t3, i3.pluralResolver = new Sr(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 Tr(this.options), i3.utils = { hasLoadedNamespace: this.hasLoadedNamespace.bind(this) }, i3.backendConnector = new jr(r2(this.modules.backend), i3.resourceStore, i3, this.options), i3.backendConnector.on(`*`, (e7, ...t4) => {
1797
+ this.emit(e7, ...t4);
1798
+ }), 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 vr(this.services, this.options), this.translator.on(`*`, (e7, ...t4) => {
1799
+ this.emit(e7, ...t4);
1800
+ }), this.modules.external.forEach((e7) => {
1801
+ e7.init && e7.init(this);
1802
+ });
1803
+ }
1804
+ if (this.format = this.options.interpolation.format, t2 ||= Pr, this.options.fallbackLng && !this.services.languageDetector && !this.options.lng) {
1805
+ let e6 = this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);
1806
+ e6.length > 0 && e6[0] !== `dev` && (this.options.lng = e6[0]);
1807
+ }
1808
+ !this.services.languageDetector && !this.options.lng && this.logger.warn(`init: no languageDetector is used and no lng is defined`), [`getResource`, `hasResourceBundle`, `getResourceBundle`, `getDataByLanguage`].forEach((e6) => {
1809
+ this[e6] = (...t3) => this.store[e6](...t3);
1810
+ }), [`addResource`, `addResources`, `addResourceBundle`, `removeResourceBundle`].forEach((e6) => {
1811
+ this[e6] = (...t3) => (this.store[e6](...t3), this);
1812
+ });
1813
+ let i2 = Wn(), a2 = () => {
1814
+ let e6 = (e7, n3) => {
1815
+ 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);
1816
+ };
1817
+ if (this.languages && !this.isInitialized) return e6(null, this.t.bind(this));
1818
+ this.changeLanguage(this.options.lng, e6);
1819
+ };
1820
+ return this.options.resources || !this.options.initAsync ? a2() : setTimeout(a2, 0), i2;
1821
+ }
1822
+ loadResources(e5, t2 = Pr) {
1823
+ let n2 = t2, r2 = F(e5) ? e5 : this.language;
1824
+ if (typeof e5 == `function` && (n2 = e5), !this.options.resources || this.options.partialBundledLanguages) {
1825
+ if (r2?.toLowerCase() === `cimode` && (!this.options.preload || this.options.preload.length === 0)) return n2();
1826
+ let e6 = [], t3 = (t4) => {
1827
+ t4 && t4 !== `cimode` && this.services.languageUtils.toResolveHierarchy(t4).forEach((t5) => {
1828
+ t5 !== `cimode` && e6.indexOf(t5) < 0 && e6.push(t5);
1829
+ });
1830
+ };
1831
+ r2 ? t3(r2) : this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach((e7) => t3(e7)), this.options.preload?.forEach?.((e7) => t3(e7)), this.services.backendConnector.load(e6, this.options.ns, (e7) => {
1832
+ !e7 && !this.resolvedLanguage && this.language && this.setResolvedLanguage(this.language), n2(e7);
1833
+ });
1834
+ } else n2(null);
1835
+ }
1836
+ reloadResources(e5, t2, n2) {
1837
+ let r2 = Wn();
1838
+ 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 ||= Pr, this.services.backendConnector.reload(e5, t2, (e6) => {
1839
+ r2.resolve(), n2(e6);
1840
+ }), r2;
1841
+ }
1842
+ use(e5) {
1843
+ if (!e5) throw Error(`You are passing an undefined module! Please check the object you are passing to i18next.use()`);
1844
+ if (!e5.type) throw Error(`You are passing a wrong module! Please check the object you are passing to i18next.use()`);
1845
+ 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` && pr.addPostProcessor(e5), e5.type === `formatter` && (this.modules.formatter = e5), e5.type === `3rdParty` && this.modules.external.push(e5), this;
1846
+ }
1847
+ setResolvedLanguage(e5) {
1848
+ if (e5 && this.languages && !([`cimode`, `dev`].indexOf(e5) > -1)) {
1849
+ for (let e6 = 0; e6 < this.languages.length; e6++) {
1850
+ let t2 = this.languages[e6];
1851
+ if (!([`cimode`, `dev`].indexOf(t2) > -1) && this.store.hasLanguageSomeTranslations(t2)) {
1852
+ this.resolvedLanguage = t2;
1853
+ break;
1854
+ }
1855
+ }
1856
+ !this.resolvedLanguage && this.languages.indexOf(e5) < 0 && this.store.hasLanguageSomeTranslations(e5) && (this.resolvedLanguage = e5, this.languages.unshift(e5));
1857
+ }
1858
+ }
1859
+ changeLanguage(e5, t2) {
1860
+ this.isLanguageChangingTo = e5;
1861
+ let n2 = Wn();
1862
+ this.emit(`languageChanging`, e5);
1863
+ let r2 = (e6) => {
1864
+ this.language = e6, this.languages = this.services.languageUtils.toResolveHierarchy(e6), this.resolvedLanguage = void 0, this.setResolvedLanguage(e6);
1865
+ }, i2 = (i3, a3) => {
1866
+ 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));
1867
+ }, a2 = (t3) => {
1868
+ !e5 && !t3 && this.services.languageDetector && (t3 = []);
1869
+ let n3 = F(t3) ? t3 : t3 && t3[0], a3 = this.store.hasLanguageSomeTranslations(n3) ? n3 : this.services.languageUtils.getBestMatchFromCodes(F(t3) ? [t3] : t3);
1870
+ a3 && (this.language || r2(a3), this.translator.language || this.translator.changeLanguage(a3), this.services.languageDetector?.cacheUserLanguage?.(a3)), this.loadResources(a3, (e6) => {
1871
+ i2(e6, a3);
1872
+ });
1873
+ };
1874
+ return !e5 && this.services.languageDetector && !this.services.languageDetector.async ? a2(this.services.languageDetector.detect()) : !e5 && this.services.languageDetector && this.services.languageDetector.async ? this.services.languageDetector.detect.length === 0 ? this.services.languageDetector.detect().then(a2) : this.services.languageDetector.detect(a2) : a2(e5), n2;
1875
+ }
1876
+ getFixedT(e5, t2, n2) {
1877
+ let r2 = (e6, t3, ...i2) => {
1878
+ let a2;
1879
+ a2 = typeof t3 == `object` ? { ...t3 } : this.options.overloadTranslationOptionHandler([e6, t3].concat(i2)), a2.lng = a2.lng || r2.lng, a2.lngs = a2.lngs || r2.lngs, a2.ns = a2.ns || r2.ns, a2.keyPrefix !== `` && (a2.keyPrefix = a2.keyPrefix || n2 || r2.keyPrefix);
1880
+ let o2 = { ...this.options, ...a2 };
1881
+ typeof a2.keyPrefix == `function` && (a2.keyPrefix = R(a2.keyPrefix, o2));
1882
+ let s2 = this.options.keySeparator || `.`, c2;
1883
+ return a2.keyPrefix && Array.isArray(e6) ? c2 = e6.map((e7) => (typeof e7 == `function` && (e7 = R(e7, o2)), `${a2.keyPrefix}${s2}${e7}`)) : (typeof e6 == `function` && (e6 = R(e6, o2)), c2 = a2.keyPrefix ? `${a2.keyPrefix}${s2}${e6}` : e6), this.t(c2, a2);
1884
+ };
1885
+ return F(e5) ? r2.lng = e5 : r2.lngs = e5, r2.ns = t2, r2.keyPrefix = n2, r2;
1886
+ }
1887
+ t(...e5) {
1888
+ return this.translator?.translate(...e5);
1889
+ }
1890
+ exists(...e5) {
1891
+ return this.translator?.exists(...e5);
1892
+ }
1893
+ setDefaultNamespace(e5) {
1894
+ this.options.defaultNS = e5;
1895
+ }
1896
+ hasLoadedNamespace(e5, t2 = {}) {
1897
+ if (!this.isInitialized) return this.logger.warn(`hasLoadedNamespace: i18next was not initialized`, this.languages), false;
1898
+ if (!this.languages || !this.languages.length) return this.logger.warn(`hasLoadedNamespace: i18n.languages were undefined or empty`, this.languages), false;
1899
+ let n2 = t2.lng || this.resolvedLanguage || this.languages[0], r2 = this.options ? this.options.fallbackLng : false, i2 = this.languages[this.languages.length - 1];
1900
+ if (n2.toLowerCase() === `cimode`) return true;
1901
+ let a2 = (e6, t3) => {
1902
+ let n3 = this.services.backendConnector.state[`${e6}|${t3}`];
1903
+ return n3 === -1 || n3 === 0 || n3 === 2;
1904
+ };
1905
+ if (t2.precheck) {
1906
+ let e6 = t2.precheck(this, a2);
1907
+ if (e6 !== void 0) return e6;
1908
+ }
1909
+ return !!(this.hasResourceBundle(n2, e5) || !this.services.backendConnector.backend || this.options.resources && !this.options.partialBundledLanguages || a2(n2, e5) && (!r2 || a2(i2, e5)));
1910
+ }
1911
+ loadNamespaces(e5, t2) {
1912
+ let n2 = Wn();
1913
+ return this.options.ns ? (F(e5) && (e5 = [e5]), e5.forEach((e6) => {
1914
+ this.options.ns.indexOf(e6) < 0 && this.options.ns.push(e6);
1915
+ }), this.loadResources((e6) => {
1916
+ n2.resolve(), t2 && t2(e6);
1917
+ }), n2) : (t2 && t2(), Promise.resolve());
1918
+ }
1919
+ loadLanguages(e5, t2) {
1920
+ let n2 = Wn();
1921
+ F(e5) && (e5 = [e5]);
1922
+ let r2 = this.options.preload || [], i2 = e5.filter((e6) => r2.indexOf(e6) < 0 && this.services.languageUtils.isSupportedCode(e6));
1923
+ return i2.length ? (this.options.preload = r2.concat(i2), this.loadResources((e6) => {
1924
+ n2.resolve(), t2 && t2(e6);
1925
+ }), n2) : (t2 && t2(), Promise.resolve());
1926
+ }
1927
+ dir(e5) {
1928
+ if (e5 ||= this.resolvedLanguage || (this.languages?.length > 0 ? this.languages[0] : this.language), !e5) return `rtl`;
1929
+ try {
1930
+ let t3 = new Intl.Locale(e5);
1931
+ if (t3 && t3.getTextInfo) {
1932
+ let e6 = t3.getTextInfo();
1933
+ if (e6 && e6.direction) return e6.direction;
1934
+ }
1935
+ } catch {
1936
+ }
1937
+ 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 yr(Mr());
1938
+ return e5.toLowerCase().indexOf(`-latn`) > 1 ? `ltr` : t2.indexOf(n2.getLanguagePartFromCode(e5)) > -1 || e5.toLowerCase().indexOf(`-arab`) > 1 ? `rtl` : `ltr`;
1939
+ }
1940
+ static createInstance(t2 = {}, n2) {
1941
+ let r2 = new e4(t2, n2);
1942
+ return r2.createInstance = e4.createInstance, r2;
1943
+ }
1944
+ cloneInstance(t2 = {}, n2 = Pr) {
1945
+ let r2 = t2.forkResourceStore;
1946
+ r2 && delete t2.forkResourceStore;
1947
+ let i2 = { ...this.options, ...t2, isClone: true }, a2 = new e4(i2);
1948
+ if ((t2.debug !== void 0 || t2.prefix !== void 0) && (a2.logger = a2.logger.clone(t2)), [`store`, `services`, `language`].forEach((e5) => {
1949
+ a2[e5] = this[e5];
1950
+ }), a2.services = { ...this.services }, a2.services.utils = { hasLoadedNamespace: a2.hasLoadedNamespace.bind(a2) }, r2 && (a2.store = new fr(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) {
1951
+ let e5 = { ...Mr().interpolation, ...this.options.interpolation, ...t2.interpolation }, n3 = { ...i2, interpolation: e5 };
1952
+ a2.services.interpolator = new Tr(n3);
1953
+ }
1954
+ return a2.translator = new vr(a2.services, i2), a2.translator.on(`*`, (e5, ...t3) => {
1955
+ a2.emit(e5, ...t3);
1956
+ }), a2.init(i2, n2), a2.translator.options = i2, a2.translator.backendConnector.services.utils = { hasLoadedNamespace: a2.hasLoadedNamespace.bind(a2) }, a2;
1957
+ }
1958
+ toJSON() {
1959
+ return { options: this.options, store: this.store, language: this.language, languages: this.languages, resolvedLanguage: this.resolvedLanguage };
1960
+ }
1961
+ }.createInstance();
1962
+ z.createInstance, z.dir, z.init, z.loadResources, z.reloadResources, z.use, z.changeLanguage, z.getFixedT, z.t, z.exists, z.setDefaultNamespace, z.hasLoadedNamespace, z.loadNamespaces, z.loadLanguages;
1963
+ var Br = function() {
1964
+ return Br = Object.assign || function(e5) {
1965
+ for (var t2, n2 = 1, r2 = arguments.length; n2 < r2; n2++) for (var i2 in t2 = arguments[n2], t2) Object.prototype.hasOwnProperty.call(t2, i2) && (e5[i2] = t2[i2]);
1966
+ return e5;
1967
+ }, Br.apply(this, arguments);
1968
+ };
1969
+ function Vr(e5) {
1970
+ var t2 = typeof Symbol == `function` && Symbol.iterator, n2 = t2 && e5[t2], r2 = 0;
1971
+ if (n2) return n2.call(e5);
1972
+ if (e5 && typeof e5.length == `number`) return { next: function() {
1973
+ return e5 && r2 >= e5.length && (e5 = void 0), { value: e5 && e5[r2++], done: !e5 };
921
1974
  } };
922
1975
  throw TypeError(t2 ? `Object is not iterable.` : `Symbol.iterator is not defined.`);
923
1976
  }
924
- function L(e2, t2) {
925
- var n2 = typeof Symbol == `function` && e2[Symbol.iterator];
926
- if (!n2) return e2;
927
- var r2 = n2.call(e2), i2, a2 = [], o2;
1977
+ function B(e5, t2) {
1978
+ var n2 = typeof Symbol == `function` && e5[Symbol.iterator];
1979
+ if (!n2) return e5;
1980
+ var r2 = n2.call(e5), i2, a2 = [], o2;
928
1981
  try {
929
1982
  for (; (t2 === void 0 || t2-- > 0) && !(i2 = r2.next()).done; ) a2.push(i2.value);
930
- } catch (e3) {
931
- o2 = { error: e3 };
1983
+ } catch (e6) {
1984
+ o2 = { error: e6 };
932
1985
  } finally {
933
1986
  try {
934
1987
  i2 && !i2.done && (n2 = r2.return) && n2.call(r2);
@@ -938,17 +1991,85 @@ function L(e2, t2) {
938
1991
  }
939
1992
  return a2;
940
1993
  }
941
- function R(e2, t2, n2) {
1994
+ function Hr(e5, t2, n2) {
942
1995
  if (n2 || arguments.length === 2) for (var r2 = 0, i2 = t2.length, a2; r2 < i2; r2++) (a2 || !(r2 in t2)) && (a2 ||= Array.prototype.slice.call(t2, 0, r2), a2[r2] = t2[r2]);
943
- return e2.concat(a2 || Array.prototype.slice.call(t2));
1996
+ return e5.concat(a2 || Array.prototype.slice.call(t2));
1997
+ }
1998
+ var Ur = /&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g;
1999
+ var Wr = { "&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;": `/` };
2000
+ var Gr = (e5) => Wr[e5];
2001
+ var Kr = { bindI18n: `languageChanged`, bindI18nStore: ``, transEmptyNodeValue: ``, transSupportBasicHtmlNodes: true, transWrapTextNodes: ``, transKeepBasicHtmlNodesFor: [`br`, `strong`, `i`, `p`], useSuspense: true, unescape: (e5) => e5.replace(Ur, Gr), transDefaultProps: void 0 };
2002
+ var qr = (e5 = {}) => {
2003
+ Kr = { ...Kr, ...e5 };
2004
+ };
2005
+ var Jr = { type: `3rdParty`, init(e5) {
2006
+ qr(e5.options.react);
2007
+ } };
2008
+ var Yr = /* @__PURE__ */ new Map();
2009
+ var Xr = 500;
2010
+ var Zr;
2011
+ function Qr() {
2012
+ if (Zr === void 0) try {
2013
+ Zr = new Intl.NumberFormat(`en-US`, { useGrouping: false, maximumFractionDigits: 0 }).format(`9007199254740993`) === `9007199254740993`;
2014
+ } catch {
2015
+ Zr = false;
2016
+ }
2017
+ return Zr;
2018
+ }
2019
+ var $r = 15;
2020
+ function ei(e5) {
2021
+ if (!(typeof e5 != `string` || Qr()) && e5.replace(/[^0-9]/g, ``).replace(/^0+/, ``).length > $r) 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.`);
2022
+ }
2023
+ function ti(e5, t2, n2) {
2024
+ 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(`&`)}`;
2025
+ }
2026
+ function ni(e5, t2, n2) {
2027
+ let r2 = ti(e5, t2, n2), i2 = Yr.get(r2);
2028
+ return i2 || (i2 = new Intl.NumberFormat(e5, { ...n2, style: `currency`, currency: t2 }), Yr.size >= Xr && Yr.clear(), Yr.set(r2, i2)), i2;
2029
+ }
2030
+ function ri(e5, { value: t2, currency: n2 }, r2 = {}) {
2031
+ return ei(t2), ni(e5, n2, r2).format(t2);
944
2032
  }
945
- var An = class {
946
- constructor(e2) {
947
- this.message = e2, this.captureException = () => {
2033
+ function ii(e5, { value: t2, currency: n2 }, r2 = {}) {
2034
+ return ei(t2), ni(e5, n2, r2).formatToParts(t2);
2035
+ }
2036
+ function ai(e5) {
2037
+ return yn().find((e6) => e6.primary)?.id ?? e5;
2038
+ }
2039
+ function oi(e5, t2) {
2040
+ let { locale: n2, ...r2 } = t2 ?? {}, i2 = n2 ?? e5.essentials?.locale;
2041
+ 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.`);
2042
+ return { locale: i2, formatOptions: r2 };
2043
+ }
2044
+ var si = Un({ getLanguage: (e5) => () => {
2045
+ let t2 = e5.essentials?.language;
2046
+ 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.`);
2047
+ return t2;
2048
+ }, getLocale: (e5) => () => {
2049
+ let t2 = e5.essentials?.locale;
2050
+ 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.`);
2051
+ return t2;
2052
+ }, formatCurrency: (e5) => (t2, n2) => {
2053
+ let { locale: r2, formatOptions: i2 } = oi(e5, n2);
2054
+ return ri(r2, t2, i2);
2055
+ }, formatCurrencyToParts: (e5) => (t2, n2) => {
2056
+ let { locale: r2, formatOptions: i2 } = oi(e5, n2);
2057
+ return ii(r2, t2, i2);
2058
+ }, getTranslationFunction: (e5) => () => {
2059
+ let t2 = e5.translations?.();
2060
+ if (!t2) throw Error(`Host translation resources are not available.`);
2061
+ let n2 = z.createInstance(), r2 = ai(e5.essentials?.language) || `en`, i2 = { lng: e5.essentials?.language || r2, fallbackLng: r2, resources: t2 };
2062
+ return n2.use(Jr).init(i2, (e6) => {
2063
+ if (e6) throw e6;
2064
+ }), n2.t.bind(n2);
2065
+ } });
2066
+ var ci = class {
2067
+ constructor(e5) {
2068
+ this.message = e5, this.captureException = () => {
948
2069
  console.error(this.message);
949
2070
  }, this.captureMessage = () => {
950
2071
  console.error(this.message);
951
- }, this.startSpan = (e3, t2) => (console.error(this.message), t2(void 0)), this.startSpanManual = () => (console.error(this.message), { end: () => {
2072
+ }, this.startSpan = (e6, t2) => (console.error(this.message), t2(void 0)), this.startSpanManual = () => (console.error(this.message), { end: () => {
952
2073
  }, fail: () => {
953
2074
  } }), this.endSpanManual = () => {
954
2075
  console.error(this.message);
@@ -957,366 +2078,366 @@ var An = class {
957
2078
  };
958
2079
  }
959
2080
  };
960
- var jn = (e2) => new An(e2);
961
- var Mn = Dn({ getMonitoringClient: (e2) => () => e2.getMonitoringClient ? e2.getMonitoringClient() : jn(`Host monitoring client is not available on the current host. Make sure to use an updated version of the host initialization package.`) });
962
- var z = { 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` };
963
- function Nn(e2) {
2081
+ var li = (e5) => new ci(e5);
2082
+ var ui = Un({ getMonitoringClient: (e5) => () => e5.getMonitoringClient ? e5.getMonitoringClient() : li(`Host monitoring client is not available on the current host. Make sure to use an updated version of the host initialization package.`) });
2083
+ var V = { 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` };
2084
+ function di(e5) {
964
2085
  try {
965
- let t2 = Mn.getMonitoringClient?.();
966
- return t2 && typeof t2[e2] == `function` ? t2 : null;
2086
+ let t2 = ui.getMonitoringClient?.();
2087
+ return t2 && typeof t2[e5] == `function` ? t2 : null;
967
2088
  } catch {
968
2089
  return null;
969
2090
  }
970
2091
  }
971
- function B(e2, { feature: t2, action: n2, level: r2 = `error`, contexts: i2 }) {
972
- let a2 = Nn(`captureException`);
2092
+ function H(e5, { feature: t2, action: n2, level: r2 = `error`, contexts: i2 }) {
2093
+ let a2 = di(`captureException`);
973
2094
  if (!a2) return;
974
- let o2 = e2 instanceof Error ? e2 : Error(String(e2));
2095
+ let o2 = e5 instanceof Error ? e5 : Error(String(e5));
975
2096
  a2.captureException(o2, { level: r2, tags: { feature: t2, action: n2 }, ...i2 ? { contexts: i2 } : {} });
976
2097
  }
977
- function Pn(e2, { feature: t2, tags: n2 }, r2) {
978
- let i2 = Nn(`startSpanManual`);
2098
+ function fi(e5, { feature: t2, tags: n2 }, r2) {
2099
+ let i2 = di(`startSpanManual`);
979
2100
  if (!i2) return r2;
980
- let a2 = i2.startSpanManual({ name: e2, tags: { feature: t2, ...n2 } });
981
- return r2.then(() => a2.end(), (e3) => a2.fail(e3)), r2;
2101
+ let a2 = i2.startSpanManual({ name: e5, tags: { feature: t2, ...n2 } });
2102
+ return r2.then(() => a2.end(), (e6) => a2.fail(e6)), r2;
982
2103
  }
983
- var Fn = class extends e {
2104
+ var pi = class extends e {
984
2105
  state = { hasError: false };
985
2106
  static getDerivedStateFromError() {
986
2107
  return { hasError: true };
987
2108
  }
988
- componentDidCatch(e2, t2) {
989
- B(e2, { feature: this.props.feature ?? `service`, action: `render`, contexts: { react: { componentStack: t2.componentStack } } });
2109
+ componentDidCatch(e5, t2) {
2110
+ H(e5, { feature: this.props.feature ?? `service`, action: `render`, contexts: { react: { componentStack: t2.componentStack } } });
990
2111
  }
991
2112
  render() {
992
2113
  return this.state.hasError ? this.props.fallback : this.props.children;
993
2114
  }
994
2115
  };
995
- function In(e2) {
996
- let t2 = e2;
997
- if (t2.__state || (t2.__state = { status: `pending` }, t2.then((e3) => {
998
- t2.__state = { status: `fulfilled`, value: e3 };
999
- }, (e3) => {
1000
- t2.__state = { status: `rejected`, reason: e3 };
2116
+ function mi(e5) {
2117
+ let t2 = e5;
2118
+ if (t2.__state || (t2.__state = { status: `pending` }, t2.then((e6) => {
2119
+ t2.__state = { status: `fulfilled`, value: e6 };
2120
+ }, (e6) => {
2121
+ t2.__state = { status: `rejected`, reason: e6 };
1001
2122
  })), t2.__state.status === `fulfilled`) return t2.__state.value;
1002
2123
  throw t2.__state.status === `rejected` ? t2.__state.reason : t2;
1003
2124
  }
1004
- function Ln(e2) {
1005
- let t2 = Promise.resolve(e2);
1006
- return t2.__state = { status: `fulfilled`, value: e2 }, t2;
2125
+ function hi(e5) {
2126
+ let t2 = Promise.resolve(e5);
2127
+ return t2.__state = { status: `fulfilled`, value: e5 }, t2;
1007
2128
  }
1008
- var Rn = /* @__PURE__ */ new WeakMap();
1009
- function zn(e2, t2, n2) {
1010
- let r2 = Rn.get(e2);
1011
- r2 || (r2 = /* @__PURE__ */ new WeakMap(), Rn.set(e2, r2));
2129
+ var gi = /* @__PURE__ */ new WeakMap();
2130
+ function _i(e5, t2, n2) {
2131
+ let r2 = gi.get(e5);
2132
+ r2 || (r2 = /* @__PURE__ */ new WeakMap(), gi.set(e5, r2));
1012
2133
  let i2 = r2.get(t2);
1013
2134
  i2 || (i2 = /* @__PURE__ */ new WeakMap(), r2.set(t2, i2));
1014
2135
  let a2 = i2.get(n2);
1015
2136
  if (!a2) {
1016
- let r3 = e2;
1017
- a2 = r3.__state?.status === `fulfilled` ? Ln(t2(r3.__state.value)) : r3.__state?.status === `rejected` ? Ln(n2(r3.__state.reason)) : e2.then(t2, n2), i2.set(n2, a2);
2137
+ let r3 = e5;
2138
+ a2 = r3.__state?.status === `fulfilled` ? hi(t2(r3.__state.value)) : r3.__state?.status === `rejected` ? hi(n2(r3.__state.reason)) : e5.then(t2, n2), i2.set(n2, a2);
1018
2139
  }
1019
2140
  return a2;
1020
2141
  }
1021
- function V(e2) {
1022
- return e2;
1023
- }
1024
- var Bn = V(`@wix/site-service-url`);
1025
- var Vn = `appSectionParams`;
1026
- function Hn(e2) {
1027
- let t2 = e2.searchParams.get(Vn);
1028
- if (t2 === null) return e2;
1029
- let n2 = new URL(e2);
1030
- n2.searchParams.delete(Vn);
1031
- for (let [e3, r2] of Object.entries(Un(t2))) typeof r2 == `string` && !n2.searchParams.has(e3) && n2.searchParams.set(e3, r2);
2142
+ function U(e5) {
2143
+ return e5;
2144
+ }
2145
+ var vi = U(`@wix/site-service-url`);
2146
+ var yi = `appSectionParams`;
2147
+ function bi(e5) {
2148
+ let t2 = e5.searchParams.get(yi);
2149
+ if (t2 === null) return e5;
2150
+ let n2 = new URL(e5);
2151
+ n2.searchParams.delete(yi);
2152
+ for (let [e6, r2] of Object.entries(xi(t2))) typeof r2 == `string` && !n2.searchParams.has(e6) && n2.searchParams.set(e6, r2);
1032
2153
  return n2;
1033
2154
  }
1034
- function Un(e2) {
2155
+ function xi(e5) {
1035
2156
  try {
1036
- let t2 = JSON.parse(e2);
2157
+ let t2 = JSON.parse(e5);
1037
2158
  return t2 && typeof t2 == `object` && !Array.isArray(t2) ? t2 : {};
1038
2159
  } catch {
1039
2160
  return {};
1040
2161
  }
1041
2162
  }
1042
- var Wn = `bookings-uou:url-change`;
1043
- var Gn = (e2) => {
1044
- let t2 = new URL(e2);
2163
+ var Si = `bookings-uou:url-change`;
2164
+ var Ci = (e5) => {
2165
+ let t2 = new URL(e5);
1045
2166
  return t2.searchParams.sort(), t2.href;
1046
2167
  };
1047
- function Kn(e2, { disableScrollToTop: t2, skipHistory: n2 } = {}) {
2168
+ function wi(e5, { disableScrollToTop: t2, skipHistory: n2 } = {}) {
1048
2169
  let r2 = globalThis.window;
1049
2170
  if (!r2?.history) return;
1050
2171
  let i2 = new URL(r2.location.href);
1051
- if (Gn(i2) === Gn(e2)) return;
2172
+ if (Ci(i2) === Ci(e5)) return;
1052
2173
  let a2 = { scrollY: r2.scrollY };
1053
- if (n2) r2.history.replaceState(a2, ``, e2.href);
2174
+ if (n2) r2.history.replaceState(a2, ``, e5.href);
1054
2175
  else {
1055
2176
  r2.history.replaceState(a2, ``, i2.href);
1056
2177
  try {
1057
- r2.history.pushState(t2 ? a2 : null, ``, e2.href);
2178
+ r2.history.pushState(t2 ? a2 : null, ``, e5.href);
1058
2179
  } catch {
1059
2180
  return;
1060
2181
  }
1061
2182
  }
1062
- r2.dispatchEvent(new Event(Wn));
2183
+ r2.dispatchEvent(new Event(Si));
1063
2184
  }
1064
- function qn(e2) {
2185
+ function Ti(e5) {
1065
2186
  let t2 = globalThis.window;
1066
- return t2 ? (t2.addEventListener(Wn, e2), t2.addEventListener(`popstate`, e2), () => {
1067
- t2.removeEventListener(Wn, e2), t2.removeEventListener(`popstate`, e2);
2187
+ return t2 ? (t2.addEventListener(Si, e5), t2.addEventListener(`popstate`, e5), () => {
2188
+ t2.removeEventListener(Si, e5), t2.removeEventListener(`popstate`, e5);
1068
2189
  }) : () => {
1069
2190
  };
1070
2191
  }
1071
- var Jn = (e2) => {
2192
+ var Ei = (e5) => {
1072
2193
  try {
1073
- return decodeURIComponent(e2);
2194
+ return decodeURIComponent(e5);
1074
2195
  } catch {
1075
- return e2;
2196
+ return e5;
1076
2197
  }
1077
2198
  };
1078
- function Yn(e2, t2) {
2199
+ function Di(e5, t2) {
1079
2200
  let n2 = t2 ? new URL(t2).pathname : `/`;
1080
- return `./${Jn(new URL(e2).pathname.replace(n2, ``).replace(/^\/|\/$/g, ``))}`;
1081
- }
1082
- function Xn() {
1083
- let e2 = p(Bn), t2 = i(() => e2.currentUrl, [e2]), n2 = d(qn, t2, t2), r2 = c(() => Hn(new URL(n2)), [n2]), a2 = e2.siteUrl.replace(/\/$/, ``);
1084
- return { pathname: r2.pathname, search: r2.search, searchParams: r2.searchParams, href: r2.href, getParsedUrl: () => Hn(new URL(e2.currentUrl)), getRelativeUrl: () => Yn(e2.currentUrl, a2), getExternalBaseUrl: () => a2, pushUrl: Kn };
1085
- }
1086
- var Zn = V(`@wix/site-service-editor-context`);
1087
- var Qn = V(`@wix/site-service-pages`);
1088
- var $n = V(`@wix/site-service-router`);
1089
- var er = V(`@wix/site-service-renderer-configuration`);
1090
- var tr = `13d21c63-b5ec-5912-8397-c3a5ddb27a97`;
1091
- var nr = `shopping_cart`;
1092
- var rr = `thank_you_page`;
1093
- var H = function(e2) {
1094
- return e2.BOOK_ONLINE = `bookingsBookOnline`, e2.SERVICE_PAGE = `bookingsServicePage`, e2.CALENDAR_PAGE = `bookingsCalendar`, e2.FORM_PAGE = `bookingsForm`, e2;
2201
+ return `./${Ei(new URL(e5).pathname.replace(n2, ``).replace(/^\/|\/$/g, ``))}`;
2202
+ }
2203
+ function Oi() {
2204
+ let e5 = p(vi), t2 = i(() => e5.currentUrl, [e5]), n2 = d(Ti, t2, t2), r2 = c(() => bi(new URL(n2)), [n2]), a2 = e5.siteUrl.replace(/\/$/, ``);
2205
+ return { pathname: r2.pathname, search: r2.search, searchParams: r2.searchParams, href: r2.href, getParsedUrl: () => bi(new URL(e5.currentUrl)), getRelativeUrl: () => Di(e5.currentUrl, a2), getExternalBaseUrl: () => a2, pushUrl: wi };
2206
+ }
2207
+ var ki = U(`@wix/site-service-editor-context`);
2208
+ var Ai = U(`@wix/site-service-pages`);
2209
+ var ji = U(`@wix/site-service-router`);
2210
+ var Mi = U(`@wix/site-service-renderer-configuration`);
2211
+ var Ni = `13d21c63-b5ec-5912-8397-c3a5ddb27a97`;
2212
+ var Pi = `shopping_cart`;
2213
+ var Fi = `thank_you_page`;
2214
+ var W = function(e5) {
2215
+ return e5.BOOK_ONLINE = `bookingsBookOnline`, e5.SERVICE_PAGE = `bookingsServicePage`, e5.CALENDAR_PAGE = `bookingsCalendar`, e5.FORM_PAGE = `bookingsForm`, e5;
1095
2216
  }({});
1096
- var ir = `{{(.*?)}}`;
1097
- var ar = `[{{}}]`;
1098
- var or = `([^/]+)`;
1099
- var U;
1100
- (function(e2) {
1101
- e2.product_page = `product_page`, e2.blog = `blog`, e2.post = `post`, e2.forum = `forum`, e2.group = `group`, e2.bookings = `Booking Service Page`, e2.challenges = `challenge_page`;
1102
- })(U ||= {});
1103
- var W;
1104
- (function(e2) {
1105
- e2.PRODUCT_PAGE = `wix.stores.sub_pages.product`, e2.BLOG_POST = `wix.blog.sub_pages.post`, e2.BLOG_POST_EDIT = `wix.blog.sub_pages.post.edit`, e2.BLOG_POST_PREVIEW = `wix.blog.sub_pages.post.preview`, e2.BLOG_CATEGORY = `wix.blog.sub_pages.category`, e2.FORUM_CATEGORY = `wix.forum.sub_pages.category`, e2.FORUM_CATEGORY_PAGINATION = `wix.forum.sub_pages.category.pagination`, e2.FORUM_CATEGORY_CREATE_POST = `wix.forum.sub_pages.category.create-post`, e2.FORUM_CATEGORY_CREATE_QUESTION = `wix.forum.sub_pages.category.create-question`, e2.FORUM_POST = `wix.forum.sub_pages.post`, e2.FORUM_POST_EDIT = `wix.forum.sub_pages.post.edit`, e2.FORUM_POST_PAGINATION = `wix.forum.sub_pages.post.pagination`, e2.FORUM_POST_DEEP_LINK_DATA = `wix.forum.sub_pages.post.deep-link-data`, e2.FORUM_POST_PAGINATION_AND_DEEP_LINK_DATA = `wix.forum.sub_pages.post.pagination-and-deep-link-data`, e2.GROUP = `wix.groups.sub_pages.group`, e2.GROUP_POST = `wix.groups.sub_pages.post`, e2.BOOKINGS_SERVICE = `wix.bookings.sub_pages.service_page`, e2.CHALLENGES_PAGE = `wix.online_programs.sub_pages.online_program`;
1106
- })(W ||= {});
1107
- var sr = {};
1108
- var cr = (sr[W.PRODUCT_PAGE] = { variables: [`slug`], required: [`slug`] }, sr);
1109
- var G = `{{main-mapping}}`;
1110
- var lr = {};
1111
- var ur;
1112
- var dr = (lr[W.BLOG_POST] = { variables: [`slug`], required: [`slug`], subMappings: (ur = {}, ur[W.BLOG_POST_EDIT] = { defaultMapping: `${G}/edit` }, ur[W.BLOG_POST_PREVIEW] = { required: [`instance`], defaultMapping: `${G}/preview/{{instance}}` }, ur) }, lr);
1113
- var fr = {};
1114
- var pr = (fr[W.BLOG_CATEGORY] = { variables: [`slug`], required: [`slug`], defaultPrefix: `categories` }, fr);
1115
- var mr = {};
2217
+ var Ii = `{{(.*?)}}`;
2218
+ var Li = `[{{}}]`;
2219
+ var Ri = `([^/]+)`;
2220
+ var G;
2221
+ (function(e5) {
2222
+ e5.product_page = `product_page`, e5.blog = `blog`, e5.post = `post`, e5.forum = `forum`, e5.group = `group`, e5.bookings = `Booking Service Page`, e5.challenges = `challenge_page`;
2223
+ })(G ||= {});
1116
2224
  var K;
1117
- var q;
1118
- var hr = (mr[W.FORUM_POST] = { variables: [`categorySlug`, `postSlug`], required: [`categorySlug`, `postSlug`], subMappings: (K = {}, K[W.FORUM_POST_EDIT] = { defaultMapping: `${G}/edit` }, K[W.FORUM_POST_PAGINATION] = { required: [`page`], defaultMapping: `${G}/p-{{page}}` }, K[W.FORUM_POST_DEEP_LINK_DATA] = { required: [`deepLinkData`], defaultMapping: `${G}/dl-{{deepLinkData}}` }, K[W.FORUM_POST_PAGINATION_AND_DEEP_LINK_DATA] = { required: [`page`, `deepLinkData`], defaultMapping: `${G}/p-{{page}}/dl-{{deepLinkData}}` }, K) }, mr[W.FORUM_CATEGORY] = { variables: [`slug`], required: [`slug`], subMappings: (q = {}, q[W.FORUM_CATEGORY_CREATE_POST] = { defaultMapping: `${G}/create-post` }, q[W.FORUM_CATEGORY_CREATE_QUESTION] = { defaultMapping: `${G}/create-question` }, q[W.FORUM_CATEGORY_PAGINATION] = { required: [`page`], defaultMapping: `${G}/p-{{page}}` }, q) }, mr);
1119
- var gr = {};
1120
- var _r = (gr[W.GROUP] = { variables: [`groupId`, `tabName`], required: [`groupId`, `tabName`] }, gr[W.GROUP_POST] = { variables: [`groupId`, `tabName`, `postId`], required: [`groupId`, `tabName`, `postId`] }, gr);
1121
- var vr = {};
1122
- var yr = (vr[W.BOOKINGS_SERVICE] = { variables: [`slug`], required: [`slug`], defaultPrefix: `service-page` }, vr);
1123
- var br = {};
1124
- var xr = (br[W.CHALLENGES_PAGE] = { variables: [`slug`], required: [`slug`], defaultPrefix: `challenge-page` }, br);
1125
- var J = {};
1126
- var Sr = (J[U.product_page] = cr, J[U.post] = dr, J[U.blog] = pr, J[U.forum] = hr, J[U.group] = _r, J[U.bookings] = yr, J[U.challenges] = xr, J);
1127
- var Cr = function(e2) {
1128
- return Object.values(wr()).some(function(t2) {
1129
- return !!t2?.subMappings?.[e2];
2225
+ (function(e5) {
2226
+ e5.PRODUCT_PAGE = `wix.stores.sub_pages.product`, e5.BLOG_POST = `wix.blog.sub_pages.post`, e5.BLOG_POST_EDIT = `wix.blog.sub_pages.post.edit`, e5.BLOG_POST_PREVIEW = `wix.blog.sub_pages.post.preview`, e5.BLOG_CATEGORY = `wix.blog.sub_pages.category`, e5.FORUM_CATEGORY = `wix.forum.sub_pages.category`, e5.FORUM_CATEGORY_PAGINATION = `wix.forum.sub_pages.category.pagination`, e5.FORUM_CATEGORY_CREATE_POST = `wix.forum.sub_pages.category.create-post`, e5.FORUM_CATEGORY_CREATE_QUESTION = `wix.forum.sub_pages.category.create-question`, e5.FORUM_POST = `wix.forum.sub_pages.post`, e5.FORUM_POST_EDIT = `wix.forum.sub_pages.post.edit`, e5.FORUM_POST_PAGINATION = `wix.forum.sub_pages.post.pagination`, e5.FORUM_POST_DEEP_LINK_DATA = `wix.forum.sub_pages.post.deep-link-data`, e5.FORUM_POST_PAGINATION_AND_DEEP_LINK_DATA = `wix.forum.sub_pages.post.pagination-and-deep-link-data`, e5.GROUP = `wix.groups.sub_pages.group`, e5.GROUP_POST = `wix.groups.sub_pages.post`, e5.BOOKINGS_SERVICE = `wix.bookings.sub_pages.service_page`, e5.CHALLENGES_PAGE = `wix.online_programs.sub_pages.online_program`;
2227
+ })(K ||= {});
2228
+ var zi = {};
2229
+ var Bi = (zi[K.PRODUCT_PAGE] = { variables: [`slug`], required: [`slug`] }, zi);
2230
+ var q = `{{main-mapping}}`;
2231
+ var Vi = {};
2232
+ var Hi;
2233
+ var Ui = (Vi[K.BLOG_POST] = { variables: [`slug`], required: [`slug`], subMappings: (Hi = {}, Hi[K.BLOG_POST_EDIT] = { defaultMapping: `${q}/edit` }, Hi[K.BLOG_POST_PREVIEW] = { required: [`instance`], defaultMapping: `${q}/preview/{{instance}}` }, Hi) }, Vi);
2234
+ var Wi = {};
2235
+ var Gi = (Wi[K.BLOG_CATEGORY] = { variables: [`slug`], required: [`slug`], defaultPrefix: `categories` }, Wi);
2236
+ var Ki = {};
2237
+ var J;
2238
+ var qi;
2239
+ var Ji = (Ki[K.FORUM_POST] = { variables: [`categorySlug`, `postSlug`], required: [`categorySlug`, `postSlug`], subMappings: (J = {}, J[K.FORUM_POST_EDIT] = { defaultMapping: `${q}/edit` }, J[K.FORUM_POST_PAGINATION] = { required: [`page`], defaultMapping: `${q}/p-{{page}}` }, J[K.FORUM_POST_DEEP_LINK_DATA] = { required: [`deepLinkData`], defaultMapping: `${q}/dl-{{deepLinkData}}` }, J[K.FORUM_POST_PAGINATION_AND_DEEP_LINK_DATA] = { required: [`page`, `deepLinkData`], defaultMapping: `${q}/p-{{page}}/dl-{{deepLinkData}}` }, J) }, Ki[K.FORUM_CATEGORY] = { variables: [`slug`], required: [`slug`], subMappings: (qi = {}, qi[K.FORUM_CATEGORY_CREATE_POST] = { defaultMapping: `${q}/create-post` }, qi[K.FORUM_CATEGORY_CREATE_QUESTION] = { defaultMapping: `${q}/create-question` }, qi[K.FORUM_CATEGORY_PAGINATION] = { required: [`page`], defaultMapping: `${q}/p-{{page}}` }, qi) }, Ki);
2240
+ var Yi = {};
2241
+ var Xi = (Yi[K.GROUP] = { variables: [`groupId`, `tabName`], required: [`groupId`, `tabName`] }, Yi[K.GROUP_POST] = { variables: [`groupId`, `tabName`, `postId`], required: [`groupId`, `tabName`, `postId`] }, Yi);
2242
+ var Zi = {};
2243
+ var Qi = (Zi[K.BOOKINGS_SERVICE] = { variables: [`slug`], required: [`slug`], defaultPrefix: `service-page` }, Zi);
2244
+ var $i = {};
2245
+ var ea = ($i[K.CHALLENGES_PAGE] = { variables: [`slug`], required: [`slug`], defaultPrefix: `challenge-page` }, $i);
2246
+ var Y = {};
2247
+ var ta = (Y[G.product_page] = Bi, Y[G.post] = Ui, Y[G.blog] = Gi, Y[G.forum] = Ji, Y[G.group] = Xi, Y[G.bookings] = Qi, Y[G.challenges] = ea, Y);
2248
+ var na = function(e5) {
2249
+ return Object.values(ra()).some(function(t2) {
2250
+ return !!t2?.subMappings?.[e5];
1130
2251
  });
1131
2252
  };
1132
- var wr = function() {
1133
- return Object.values(Sr).reduce(function(e2, t2) {
1134
- return On(On({}, e2), t2);
2253
+ var ra = function() {
2254
+ return Object.values(ta).reduce(function(e5, t2) {
2255
+ return Br(Br({}, e5), t2);
1135
2256
  }, {}) || {};
1136
2257
  };
1137
- var Tr = function(e2) {
1138
- var t2 = wr()[e2];
1139
- return !t2 && Cr(e2) && console.warn(`You cannot get variables schema for subMappings key (${e2}).`), t2;
2258
+ var ia = function(e5) {
2259
+ var t2 = ra()[e5];
2260
+ return !t2 && na(e5) && console.warn(`You cannot get variables schema for subMappings key (${e5}).`), t2;
1140
2261
  };
1141
- var Er = function(e2) {
1142
- return Object.entries(Sr).filter(function(t2) {
1143
- var n2 = L(t2, 2)[1];
1144
- return Object.keys(n2).includes(e2);
1145
- }).map(function(e3) {
1146
- return L(e3, 1)[0];
2262
+ var aa = function(e5) {
2263
+ return Object.entries(ta).filter(function(t2) {
2264
+ var n2 = B(t2, 2)[1];
2265
+ return Object.keys(n2).includes(e5);
2266
+ }).map(function(e6) {
2267
+ return B(e6, 1)[0];
1147
2268
  })[0];
1148
2269
  };
1149
- var Dr = function(e2) {
1150
- return Object.entries(wr()).find(function(t2) {
1151
- var n2 = L(t2, 2);
1152
- return n2[0], !!n2[1]?.subMappings?.[e2];
2270
+ var oa = function(e5) {
2271
+ return Object.entries(ra()).find(function(t2) {
2272
+ var n2 = B(t2, 2);
2273
+ return n2[0], !!n2[1]?.subMappings?.[e5];
1153
2274
  });
1154
2275
  };
1155
- var Or = function(e2) {
2276
+ var sa = function(e5) {
1156
2277
  var t2 = [];
1157
- if (Cr(e2)) {
1158
- var n2 = L(Dr(e2), 2);
2278
+ if (na(e5)) {
2279
+ var n2 = B(oa(e5), 2);
1159
2280
  n2[0];
1160
2281
  var r2 = n2[1];
1161
- t2.push.apply(t2, R(R([], L(r2?.required || []), false), L(r2?.subMappings?.[e2]?.required || []), false));
1162
- } else t2.push.apply(t2, R([], L(Tr(e2)?.required || []), false));
2282
+ t2.push.apply(t2, Hr(Hr([], B(r2?.required || []), false), B(r2?.subMappings?.[e5]?.required || []), false));
2283
+ } else t2.push.apply(t2, Hr([], B(ia(e5)?.required || []), false));
1163
2284
  return t2;
1164
2285
  };
1165
- var kr = function(e2, t2) {
2286
+ var ca = function(e5, t2) {
1166
2287
  var n2;
1167
- return t2 === void 0 && (t2 = ``), (n2 = e2?.main)?.find?.call(n2, function(e3) {
1168
- return e3.key === t2;
2288
+ return t2 === void 0 && (t2 = ``), (n2 = e5?.main)?.find?.call(n2, function(e6) {
2289
+ return e6.key === t2;
1169
2290
  });
1170
2291
  };
1171
- var Ar = function(e2, t2) {
1172
- return Error(`Url Mappings Error - [${e2}]: ${t2}`);
2292
+ var la = function(e5, t2) {
2293
+ return Error(`Url Mappings Error - [${e5}]: ${t2}`);
1173
2294
  };
1174
- var jr = Object.values(W);
1175
- var Mr = Ar(`key`, `must be one of: ${jr.toString()}`);
1176
- var Nr = function(e2) {
1177
- if (typeof e2 != `string` || !jr.includes(e2)) return Mr;
2295
+ var ua = Object.values(K);
2296
+ var da = la(`key`, `must be one of: ${ua.toString()}`);
2297
+ var fa = function(e5) {
2298
+ if (typeof e5 != `string` || !ua.includes(e5)) return da;
1178
2299
  };
1179
- var Pr = Ar(`itemData`, `must be on object with string as value, for example: { "slug": "shoes" }`);
1180
- var Fr = function(e2) {
1181
- if (typeof e2 != `object` || !e2 || !Object.values(e2).every(function(e3) {
1182
- return typeof e3 == `string`;
1183
- }) || Array.isArray(e2)) return Pr;
2300
+ var pa = la(`itemData`, `must be on object with string as value, for example: { "slug": "shoes" }`);
2301
+ var ma = function(e5) {
2302
+ if (typeof e5 != `object` || !e5 || !Object.values(e5).every(function(e6) {
2303
+ return typeof e6 == `string`;
2304
+ }) || Array.isArray(e5)) return pa;
1184
2305
  };
1185
- var Ir = Ar(`itemData`, `must have required variables, for example: { "slug": "shoes" }`);
1186
- var Lr = function(e2, t2) {
2306
+ var ha = la(`itemData`, `must have required variables, for example: { "slug": "shoes" }`);
2307
+ var ga = function(e5, t2) {
1187
2308
  try {
1188
- var n2 = Or(e2);
1189
- if (!n2.every(function(e3) {
1190
- return !!t2[e3];
2309
+ var n2 = sa(e5);
2310
+ if (!n2.every(function(e6) {
2311
+ return !!t2[e6];
1191
2312
  }) || !n2.length) throw Error();
1192
2313
  } catch {
1193
- return Ir;
2314
+ return ha;
1194
2315
  }
1195
2316
  };
1196
- var Rr = function(e2) {
1197
- var t2 = e2.key, n2 = e2.itemData;
1198
- return [Nr(t2), Fr(n2), Lr(t2, n2)].find(Boolean);
2317
+ var _a = function(e5) {
2318
+ var t2 = e5.key, n2 = e5.itemData;
2319
+ return [fa(t2), ma(n2), ga(t2, n2)].find(Boolean);
1199
2320
  };
1200
- var zr = function(e2) {
2321
+ var va = function(e5) {
1201
2322
  return function(t2) {
1202
- var n2 = new RegExp(ar, `g`), r2 = t2.replace(n2, ``);
1203
- return e2?.[r2];
2323
+ var n2 = new RegExp(Li, `g`), r2 = t2.replace(n2, ``);
2324
+ return e5?.[r2];
1204
2325
  };
1205
2326
  };
1206
- var Br = function(e2, t2, n2, r2) {
1207
- e2 === void 0 && (e2 = { main: [] }), r2 === void 0 && (r2 = {});
1208
- var i2 = Rr({ key: t2, itemData: n2 });
2327
+ var ya = function(e5, t2, n2, r2) {
2328
+ e5 === void 0 && (e5 = { main: [] }), r2 === void 0 && (r2 = {});
2329
+ var i2 = _a({ key: t2, itemData: n2 });
1209
2330
  if (i2) throw i2;
1210
- var a2 = (kr(e2, t2) || {}).mapping, o2 = (r2 || {}).baseUrl;
2331
+ var a2 = (ca(e5, t2) || {}).mapping, o2 = (r2 || {}).baseUrl;
1211
2332
  if (o2 ??= ``, o2 = o2.endsWith(`/`) ? o2?.slice(0, -1) : o2, a2 && typeof a2 == `string`) {
1212
- var s2 = new RegExp(ir, `g`), c2 = a2.replace(s2, zr(n2));
2333
+ var s2 = new RegExp(Ii, `g`), c2 = a2.replace(s2, va(n2));
1213
2334
  return o2.concat(`/${c2}`);
1214
2335
  }
1215
2336
  };
1216
- var Vr = /[.*+?^$()|]/g;
1217
- var Hr = function(e2) {
1218
- var t2 = e2.replace(Vr, `\\$&`).replace(new RegExp(ir, `g`), or);
2337
+ var ba = /[.*+?^$()|]/g;
2338
+ var xa = function(e5) {
2339
+ var t2 = e5.replace(ba, `\\$&`).replace(new RegExp(Ii, `g`), Ri);
1219
2340
  return RegExp(`^${t2}$`);
1220
2341
  };
1221
- var Ur = function(e2, t2) {
1222
- return e2 === void 0 && (e2 = []), e2.find(function(e3) {
1223
- return Hr(e3).test(t2);
2342
+ var Sa = function(e5, t2) {
2343
+ return e5 === void 0 && (e5 = []), e5.find(function(e6) {
2344
+ return xa(e6).test(t2);
1224
2345
  });
1225
2346
  };
1226
- Ar(`url`, `Url must be a string`);
1227
- var Wr = function(e2) {
2347
+ la(`url`, `Url must be a string`);
2348
+ var Ca = function(e5) {
1228
2349
  return [` `, ` `, `
1229
2350
  `].every(function(t2) {
1230
- return !e2?.includes?.call(e2, t2);
2351
+ return !e5?.includes?.call(e5, t2);
1231
2352
  });
1232
2353
  };
1233
- var Gr = function(e2) {
1234
- return e2?.length <= ri.MAX_URL_MAPPING_LENGTH;
2354
+ var wa = function(e5) {
2355
+ return e5?.length <= Ia.MAX_URL_MAPPING_LENGTH;
1235
2356
  };
1236
- var Kr = function(e2) {
1237
- return e2?.split(`/`).every(Boolean);
2357
+ var Ta = function(e5) {
2358
+ return e5?.split(`/`).every(Boolean);
1238
2359
  };
1239
- var qr = function(e2, t2) {
2360
+ var Ea = function(e5, t2) {
1240
2361
  var n2 = t2.urlMappingKey;
1241
- return Or(n2)?.every(function(t3) {
1242
- return e2?.includes(`{{${t3}}}`);
2362
+ return sa(n2)?.every(function(t3) {
2363
+ return e5?.includes(`{{${t3}}}`);
1243
2364
  });
1244
2365
  };
1245
- var Jr = function(e2) {
1246
- return (e2.match(new RegExp(ir, `g`))?.length || 0) <= 1;
2366
+ var Da = function(e5) {
2367
+ return (e5.match(new RegExp(Ii, `g`))?.length || 0) <= 1;
1247
2368
  };
1248
- var Yr = function(e2) {
1249
- return e2?.split(`/`).every(Jr);
2369
+ var Oa = function(e5) {
2370
+ return e5?.split(`/`).every(Da);
1250
2371
  };
1251
- var Xr = function(e2) {
1252
- return [e2.publishedPrefix, e2.savedPrefix].filter(Boolean);
2372
+ var ka = function(e5) {
2373
+ return [e5.publishedPrefix, e5.savedPrefix].filter(Boolean);
1253
2374
  };
1254
- var Zr = function(e2, t2) {
2375
+ var Aa = function(e5, t2) {
1255
2376
  return t2 === void 0 && (t2 = []), function(n2, r2) {
1256
2377
  var i2 = n2.split(`/`), a2 = n2 === r2;
1257
2378
  if (i2.length < 1 || a2) return true;
1258
- var o2 = L(r2.split(`/`), 1)[0], s2 = L(i2, 1)[0];
1259
- return t2.includes(s2) ? true : e2.every(function(e3) {
1260
- return e3 === o2 || e3 !== s2;
2379
+ var o2 = B(r2.split(`/`), 1)[0], s2 = B(i2, 1)[0];
2380
+ return t2.includes(s2) ? true : e5.every(function(e6) {
2381
+ return e6 === o2 || e6 !== s2;
1261
2382
  });
1262
2383
  };
1263
2384
  };
1264
- var Qr = function(e2, t2) {
2385
+ var ja = function(e5, t2) {
1265
2386
  var n2 = t2.pathPrefixes;
1266
- return Zr(Object.values(n2).map(function(e3) {
1267
- return e3.publishedPrefix;
1268
- }).filter(Boolean), Xr(t2.pathPrefix))(e2, t2.defaultMapping.defaultPublished);
2387
+ return Aa(Object.values(n2).map(function(e6) {
2388
+ return e6.publishedPrefix;
2389
+ }).filter(Boolean), ka(t2.pathPrefix))(e5, t2.defaultMapping.defaultPublished);
1269
2390
  };
1270
- var $r = function(e2, t2) {
2391
+ var Ma = function(e5, t2) {
1271
2392
  var n2 = t2.urlMappingKey, r2 = t2.urlMappings;
1272
- return !Ur(r2.main?.filter(function(e3) {
1273
- return n2 !== e3.key;
1274
- }).map(function(e3) {
1275
- return e3.mapping;
1276
- }), e2);
1277
- };
1278
- var ei = function(e2) {
1279
- e2 = e2.replace(new RegExp(ir, `ig`), ``);
1280
- var t2 = new RegExp(/[^\]_.~!*'();:@&=+$,<>\\#^%?`"]/, `g`), n2 = !/(?:[\u2700-\u27bf]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff]|[\u0023-\u0039]\ufe0f?\u20e3|\u3299|\u3297|\u303d|\u3030|\u24c2|\ud83c[\udd70-\udd71]|\ud83c[\udd7e-\udd7f]|\ud83c\udd8e|\ud83c[\udd91-\udd9a]|\ud83c[\udde6-\uddff]|[\ud83c[\ude01-\ude02]|\ud83c\ude1a|\ud83c\ude2f|[\ud83c[\ude32-\ude3a]|[\ud83c[\ude50-\ude51]|\u203c|\u2049|[\u25aa-\u25ab]|\u25b6|\u25c0|[\u25fb-\u25fe]|\u00a9|\u00ae|\u2122|\u2139|\ud83c\udc04|[\u2600-\u26FF]|\u2b05|\u2b06|\u2b07|\u2b1b|\u2b1c|\u2b50|\u2b55|\u231a|\u231b|\u2328|\u23cf|[\u23e9-\u23f3]|[\u23f8-\u23fa]|\ud83c\udccf|\u2934|\u2935|[\u2190-\u21ff])/g.test(e2), r2 = !e2.replace(t2, ``);
2393
+ return !Sa(r2.main?.filter(function(e6) {
2394
+ return n2 !== e6.key;
2395
+ }).map(function(e6) {
2396
+ return e6.mapping;
2397
+ }), e5);
2398
+ };
2399
+ var Na = function(e5) {
2400
+ e5 = e5.replace(new RegExp(Ii, `ig`), ``);
2401
+ var t2 = new RegExp(/[^\]_.~!*'();:@&=+$,<>\\#^%?`"]/, `g`), n2 = !/(?:[\u2700-\u27bf]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff]|[\u0023-\u0039]\ufe0f?\u20e3|\u3299|\u3297|\u303d|\u3030|\u24c2|\ud83c[\udd70-\udd71]|\ud83c[\udd7e-\udd7f]|\ud83c\udd8e|\ud83c[\udd91-\udd9a]|\ud83c[\udde6-\uddff]|[\ud83c[\ude01-\ude02]|\ud83c\ude1a|\ud83c\ude2f|[\ud83c[\ude32-\ude3a]|[\ud83c[\ude50-\ude51]|\u203c|\u2049|[\u25aa-\u25ab]|\u25b6|\u25c0|[\u25fb-\u25fe]|\u00a9|\u00ae|\u2122|\u2139|\ud83c\udc04|[\u2600-\u26FF]|\u2b05|\u2b06|\u2b07|\u2b1b|\u2b1c|\u2b50|\u2b55|\u231a|\u231b|\u2328|\u23cf|[\u23e9-\u23f3]|[\u23f8-\u23fa]|\ud83c\udccf|\u2934|\u2935|[\u2190-\u21ff])/g.test(e5), r2 = !e5.replace(t2, ``);
1281
2402
  return n2 && r2;
1282
2403
  };
1283
- var ti = function(e2) {
1284
- var t2 = L(e2, 1)[0], n2 = e2.slice(-1);
2404
+ var Pa = function(e5) {
2405
+ var t2 = B(e5, 1)[0], n2 = e5.slice(-1);
1285
2406
  return t2 !== `/` && n2 !== `/`;
1286
2407
  };
1287
- var ni = function(e2, t2) {
2408
+ var Fa = function(e5, t2) {
1288
2409
  var n2 = t2.pathPrefixes;
1289
- return Zr(Object.values(n2).map(function(e3) {
1290
- return e3.savedPrefix;
1291
- }).filter(Boolean), Xr(t2.pathPrefix))(e2, t2.defaultMapping.defaultSaved);
1292
- };
1293
- var Y;
1294
- (function(e2) {
1295
- e2.MAX_LENGTH_ERROR = `MAX_LENGTH_ERROR`, e2.NO_SPACES_ERROR = `NO_SPACES_ERROR`, e2.NO_EMPTY_SEGMENT_ERROR = `NO_EMPTY_SEGMENT_ERROR`, e2.CONTAIN_MAIN_VARIABLE_ERROR = `CONTAIN_MAIN_VARIABLE_ERROR`, e2.ONLY_ONE_VARIABLE_PER_SEGMENT_ERROR = `ONLY_ONE_VARIABLE_PER_SEGMENT_ERROR`, e2.ONLY_UNIQUE_PUBLISHED_URL_ERROR = `ONLY_UNIQUE_PUBLISHED_URL_ERROR`, e2.ONLY_UNIQUE_SAVED_URL_ERROR = `ONLY_UNIQUE_SAVED_URL_ERROR`, e2.ONLY_UNIQUE_MAPPING_ERROR = `ONLY_UNIQUE_MAPPING_ERROR`, e2.NO_INVALID_CHARACTERS_ERROR = `NO_INVALID_CHARACTERS_ERROR`, e2.NO_STARTING_OR_ENDING_SLASH_ERROR = `NO_STARTING_OR_ENDING_SLASH_ERROR`;
1296
- })(Y ||= {});
1297
- var ri = function() {
1298
- function e2(e3) {
1299
- var t2 = e3.urlMappingKey, n2 = e3.pathPrefixes, r2 = e3.urlMappings, i2 = this;
2410
+ return Aa(Object.values(n2).map(function(e6) {
2411
+ return e6.savedPrefix;
2412
+ }).filter(Boolean), ka(t2.pathPrefix))(e5, t2.defaultMapping.defaultSaved);
2413
+ };
2414
+ var X;
2415
+ (function(e5) {
2416
+ e5.MAX_LENGTH_ERROR = `MAX_LENGTH_ERROR`, e5.NO_SPACES_ERROR = `NO_SPACES_ERROR`, e5.NO_EMPTY_SEGMENT_ERROR = `NO_EMPTY_SEGMENT_ERROR`, e5.CONTAIN_MAIN_VARIABLE_ERROR = `CONTAIN_MAIN_VARIABLE_ERROR`, e5.ONLY_ONE_VARIABLE_PER_SEGMENT_ERROR = `ONLY_ONE_VARIABLE_PER_SEGMENT_ERROR`, e5.ONLY_UNIQUE_PUBLISHED_URL_ERROR = `ONLY_UNIQUE_PUBLISHED_URL_ERROR`, e5.ONLY_UNIQUE_SAVED_URL_ERROR = `ONLY_UNIQUE_SAVED_URL_ERROR`, e5.ONLY_UNIQUE_MAPPING_ERROR = `ONLY_UNIQUE_MAPPING_ERROR`, e5.NO_INVALID_CHARACTERS_ERROR = `NO_INVALID_CHARACTERS_ERROR`, e5.NO_STARTING_OR_ENDING_SLASH_ERROR = `NO_STARTING_OR_ENDING_SLASH_ERROR`;
2417
+ })(X ||= {});
2418
+ var Ia = function() {
2419
+ function e5(e6) {
2420
+ var t2 = e6.urlMappingKey, n2 = e6.pathPrefixes, r2 = e6.urlMappings, i2 = this;
1300
2421
  this.initValidators = function() {
1301
- i2.validators = [[Gr, Y.MAX_LENGTH_ERROR], [Wr, Y.NO_SPACES_ERROR], [ti, Y.NO_STARTING_OR_ENDING_SLASH_ERROR], [Kr, Y.NO_EMPTY_SEGMENT_ERROR], [ei, Y.NO_INVALID_CHARACTERS_ERROR], [qr, Y.CONTAIN_MAIN_VARIABLE_ERROR], [Yr, Y.ONLY_ONE_VARIABLE_PER_SEGMENT_ERROR], [Qr, Y.ONLY_UNIQUE_PUBLISHED_URL_ERROR], [ni, Y.ONLY_UNIQUE_SAVED_URL_ERROR], [$r, Y.ONLY_UNIQUE_MAPPING_ERROR]];
1302
- }, this.urlMappings = r2, this.pathPrefixes = n2, this.urlMappingKey = t2, this.pathPrefix = this.getPathPrefix(), this.defaultMapping = ii(t2, this.pathPrefix), this.initValidators();
1303
- }
1304
- return e2.prototype.getPathPrefix = function() {
1305
- var t2 = Er(this.urlMappingKey);
1306
- if (!t2) throw Cr(this.urlMappingKey) ? Error(`Url Mapper Validator Error: Validator does not support sub mapping, please use the main url mapping key`) : Error(`Url Mapper Validator Error: Url mapping key is not supported (${this.urlMappingKey})`);
1307
- return this.pathPrefixes[t2] || e2.FALLBACK_PATH_PREFIX;
1308
- }, Object.defineProperty(e2.prototype, "validatorProps", { get: function() {
1309
- var e3 = this;
1310
- return { urlMappingKey: e3.urlMappingKey, urlMappings: e3.urlMappings, pathPrefix: e3.pathPrefix, pathPrefixes: e3.pathPrefixes, defaultMapping: e3.defaultMapping };
1311
- }, enumerable: false, configurable: true }), e2.prototype.validate = function(e3) {
2422
+ i2.validators = [[wa, X.MAX_LENGTH_ERROR], [Ca, X.NO_SPACES_ERROR], [Pa, X.NO_STARTING_OR_ENDING_SLASH_ERROR], [Ta, X.NO_EMPTY_SEGMENT_ERROR], [Na, X.NO_INVALID_CHARACTERS_ERROR], [Ea, X.CONTAIN_MAIN_VARIABLE_ERROR], [Oa, X.ONLY_ONE_VARIABLE_PER_SEGMENT_ERROR], [ja, X.ONLY_UNIQUE_PUBLISHED_URL_ERROR], [Fa, X.ONLY_UNIQUE_SAVED_URL_ERROR], [Ma, X.ONLY_UNIQUE_MAPPING_ERROR]];
2423
+ }, this.urlMappings = r2, this.pathPrefixes = n2, this.urlMappingKey = t2, this.pathPrefix = this.getPathPrefix(), this.defaultMapping = La(t2, this.pathPrefix), this.initValidators();
2424
+ }
2425
+ return e5.prototype.getPathPrefix = function() {
2426
+ var t2 = aa(this.urlMappingKey);
2427
+ if (!t2) throw na(this.urlMappingKey) ? Error(`Url Mapper Validator Error: Validator does not support sub mapping, please use the main url mapping key`) : Error(`Url Mapper Validator Error: Url mapping key is not supported (${this.urlMappingKey})`);
2428
+ return this.pathPrefixes[t2] || e5.FALLBACK_PATH_PREFIX;
2429
+ }, Object.defineProperty(e5.prototype, "validatorProps", { get: function() {
2430
+ var e6 = this;
2431
+ return { urlMappingKey: e6.urlMappingKey, urlMappings: e6.urlMappings, pathPrefix: e6.pathPrefix, pathPrefixes: e6.pathPrefixes, defaultMapping: e6.defaultMapping };
2432
+ }, enumerable: false, configurable: true }), e5.prototype.validate = function(e6) {
1312
2433
  var t2, n2;
1313
2434
  try {
1314
- for (var r2 = kn(this.validators), i2 = r2.next(); !i2.done; i2 = r2.next()) {
1315
- var a2 = L(i2.value, 2), o2 = a2[0], s2 = a2[1], c2 = !!o2(e3, this.validatorProps);
2435
+ for (var r2 = Vr(this.validators), i2 = r2.next(); !i2.done; i2 = r2.next()) {
2436
+ var a2 = B(i2.value, 2), o2 = a2[0], s2 = a2[1], c2 = !!o2(e6, this.validatorProps);
1316
2437
  if (!c2) return { isValid: c2, error: s2 };
1317
2438
  }
1318
- } catch (e4) {
1319
- t2 = { error: e4 };
2439
+ } catch (e7) {
2440
+ t2 = { error: e7 };
1320
2441
  } finally {
1321
2442
  try {
1322
2443
  i2 && !i2.done && (n2 = r2.return) && n2.call(r2);
@@ -1325,50 +2446,50 @@ var ri = function() {
1325
2446
  }
1326
2447
  }
1327
2448
  return { isValid: true };
1328
- }, e2.errorArray = Object.values(Y), e2.MAX_URL_MAPPING_LENGTH = 1e3, e2.FALLBACK_PATH_PREFIX = `unknown`, e2;
2449
+ }, e5.errorArray = Object.values(X), e5.MAX_URL_MAPPING_LENGTH = 1e3, e5.FALLBACK_PATH_PREFIX = `unknown`, e5;
1329
2450
  }();
1330
- var ii = function(e2, t2) {
1331
- var n2 = wr()[e2] || { required: [`slug`] }, r2 = n2.required, i2 = n2.defaultPrefix, a2 = {};
1332
- return t2 && typeof t2 == `object` ? (a2.savedPrefix = t2.savedPrefix ?? ``, a2.publishedPrefix = t2.publishedPrefix ?? ``) : (a2.savedPrefix = ri.FALLBACK_PATH_PREFIX, a2.publishedPrefix = ri.FALLBACK_PATH_PREFIX), { defaultSaved: R([a2.savedPrefix, i2], L(r2?.map(function(e3) {
1333
- return `{{${e3}}}`;
1334
- })), false).filter(Boolean).join(`/`), defaultPublished: R([a2.publishedPrefix, i2], L(r2?.map(function(e3) {
1335
- return `{{${e3}}}`;
2451
+ var La = function(e5, t2) {
2452
+ var n2 = ra()[e5] || { required: [`slug`] }, r2 = n2.required, i2 = n2.defaultPrefix, a2 = {};
2453
+ return t2 && typeof t2 == `object` ? (a2.savedPrefix = t2.savedPrefix ?? ``, a2.publishedPrefix = t2.publishedPrefix ?? ``) : (a2.savedPrefix = Ia.FALLBACK_PATH_PREFIX, a2.publishedPrefix = Ia.FALLBACK_PATH_PREFIX), { defaultSaved: Hr([a2.savedPrefix, i2], B(r2?.map(function(e6) {
2454
+ return `{{${e6}}}`;
2455
+ })), false).filter(Boolean).join(`/`), defaultPublished: Hr([a2.publishedPrefix, i2], B(r2?.map(function(e6) {
2456
+ return `{{${e6}}}`;
1336
2457
  })), false).filter(Boolean).join(`/`) };
1337
2458
  };
1338
- function ai(e2, t2) {
1339
- return t2 ? Br(e2, W.BOOKINGS_SERVICE, { slug: t2 }, { baseUrl: `` }) : void 0;
2459
+ function Ra(e5, t2) {
2460
+ return t2 ? ya(e5, K.BOOKINGS_SERVICE, { slug: t2 }, { baseUrl: `` }) : void 0;
1340
2461
  }
1341
- function oi(e2) {
1342
- if (!e2) return;
2462
+ function za(e5) {
2463
+ if (!e5) return;
1343
2464
  let t2 = ``;
1344
- return (e2.filename || e2.altText) && (t2 = `/${encodeURIComponent(e2.filename || e2.altText)}`), e2.id ? `wix:image://v1/${e2.id}${t2}#originWidth=${e2.width}&originHeight=${e2.height}` : e2.url;
2465
+ 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;
1345
2466
  }
1346
- function si(e2) {
1347
- return Object.keys(e2).length === 1 && `$and` in e2 && Array.isArray(e2.$and);
2467
+ function Ba(e5) {
2468
+ return Object.keys(e5).length === 1 && `$and` in e5 && Array.isArray(e5.$and);
1348
2469
  }
1349
- function ci(e2) {
1350
- return Object.keys(e2).length === 1 && `$or` in e2 && Array.isArray(e2.$or);
2470
+ function Va(e5) {
2471
+ return Object.keys(e5).length === 1 && `$or` in e5 && Array.isArray(e5.$or);
1351
2472
  }
1352
- function li(e2) {
1353
- return Object.keys(e2).length === 1 && `$not` in e2 && typeof e2.$not == `object`;
2473
+ function Ha(e5) {
2474
+ return Object.keys(e5).length === 1 && `$not` in e5 && typeof e5.$not == `object`;
1354
2475
  }
1355
- function X(e2, t2) {
1356
- return e2 === void 0 || Object.keys(e2).length === 0 ? t2 : t2 === void 0 || Object.keys(t2).length === 0 ? e2 : { $and: [...si(e2) ? e2.$and : [e2], ...si(t2) ? t2.$and : [t2]] };
2476
+ function Z(e5, t2) {
2477
+ return e5 === void 0 || Object.keys(e5).length === 0 ? t2 : t2 === void 0 || Object.keys(t2).length === 0 ? e5 : { $and: [...Ba(e5) ? e5.$and : [e5], ...Ba(t2) ? t2.$and : [t2]] };
1357
2478
  }
1358
- function ui(e2, t2) {
1359
- return e2 === void 0 || Object.keys(e2).length === 0 ? t2 : t2 === void 0 || Object.keys(t2).length === 0 ? e2 : { $or: [...ci(e2) ? e2.$or : [e2], ...ci(t2) ? t2.$or : [t2]] };
2479
+ function Ua(e5, t2) {
2480
+ return e5 === void 0 || Object.keys(e5).length === 0 ? t2 : t2 === void 0 || Object.keys(t2).length === 0 ? e5 : { $or: [...Va(e5) ? e5.$or : [e5], ...Va(t2) ? t2.$or : [t2]] };
1360
2481
  }
1361
- function di(e2) {
1362
- if (e2 !== void 0 && Object.keys(e2).length !== 0) return li(e2) ? e2.$not : { $not: e2 };
2482
+ function Wa(e5) {
2483
+ if (e5 !== void 0 && Object.keys(e5).length !== 0) return Ha(e5) ? e5.$not : { $not: e5 };
1363
2484
  }
1364
- var fi = class {
2485
+ var Ga = class {
1365
2486
  _items;
1366
2487
  _fetchNextPage;
1367
2488
  _fetchPrevPage;
1368
2489
  _originQuery;
1369
2490
  _limit;
1370
- constructor({ items: e2, originQuery: t2, fetchNextPage: n2, fetchPrevPage: r2, limit: i2 }) {
1371
- this._items = e2, this._fetchNextPage = n2, this._fetchPrevPage = r2, this._originQuery = t2, this._limit = i2;
2491
+ constructor({ items: e5, originQuery: t2, fetchNextPage: n2, fetchPrevPage: r2, limit: i2 }) {
2492
+ this._items = e5, this._fetchNextPage = n2, this._fetchPrevPage = r2, this._originQuery = t2, this._limit = i2;
1372
2493
  }
1373
2494
  get items() {
1374
2495
  return this._items;
@@ -1391,12 +2512,12 @@ var fi = class {
1391
2512
  return await this._fetchPrevPage();
1392
2513
  }
1393
2514
  };
1394
- var pi = class extends fi {
2515
+ var Ka = class extends Ga {
1395
2516
  _nextCursor;
1396
2517
  _prevCursor;
1397
2518
  cursors;
1398
- constructor({ items: e2, originQuery: t2, fetchNextPage: n2, fetchPrevPage: r2, limit: i2, nextCursor: a2, prevCursor: o2 }) {
1399
- super({ items: e2, originQuery: t2, fetchNextPage: n2, fetchPrevPage: r2, limit: i2 }), this._nextCursor = a2, this._prevCursor = o2, this.cursors = { next: a2, prev: o2 };
2519
+ constructor({ items: e5, originQuery: t2, fetchNextPage: n2, fetchPrevPage: r2, limit: i2, nextCursor: a2, prevCursor: o2 }) {
2520
+ super({ items: e5, originQuery: t2, fetchNextPage: n2, fetchPrevPage: r2, limit: i2 }), this._nextCursor = a2, this._prevCursor = o2, this.cursors = { next: a2, prev: o2 };
1400
2521
  }
1401
2522
  hasNext() {
1402
2523
  return !!this._nextCursor;
@@ -1405,12 +2526,12 @@ var pi = class extends fi {
1405
2526
  return !!this._prevCursor;
1406
2527
  }
1407
2528
  };
1408
- var mi = class extends fi {
2529
+ var qa = class extends Ga {
1409
2530
  _totalCount;
1410
2531
  _offset;
1411
2532
  _tooManyToCount;
1412
- constructor({ items: e2, fetchNextPage: t2, fetchPrevPage: n2, offset: r2, originQuery: i2, limit: a2, totalCount: o2, tooManyToCount: s2 }) {
1413
- super({ items: e2, fetchNextPage: t2, fetchPrevPage: n2, originQuery: i2, limit: a2 }), this._totalCount = o2, this._offset = r2, this._tooManyToCount = s2;
2533
+ constructor({ items: e5, fetchNextPage: t2, fetchPrevPage: n2, offset: r2, originQuery: i2, limit: a2, totalCount: o2, tooManyToCount: s2 }) {
2534
+ super({ items: e5, fetchNextPage: t2, fetchPrevPage: n2, originQuery: i2, limit: a2 }), this._totalCount = o2, this._offset = r2, this._tooManyToCount = s2;
1414
2535
  }
1415
2536
  get currentPage() {
1416
2537
  return this._limit === 0 ? void 0 : Math.floor(this._offset / this._limit);
@@ -1428,736 +2549,757 @@ var mi = class extends fi {
1428
2549
  return !!(this._limit !== 0 && this.currentPage && this.currentPage > 0);
1429
2550
  }
1430
2551
  };
1431
- function hi(e2) {
2552
+ function Ja(e5) {
1432
2553
  let t2 = (n2) => ({ query: n2, async find() {
1433
2554
  try {
1434
- let r2 = e2.requestTransformer(e2.pagingMethod === `CURSOR` && n2.cursorPaging.cursor ? { cursorPaging: n2.cursorPaging } : n2), i2 = await e2.func(r2), { [Ke]: a2, [qe]: o2 } = e2.responseTransformer(i2);
1435
- if (e2.pagingMethod === `OFFSET`) {
1436
- let e3 = n2;
1437
- return new mi({ items: a2 ?? [], fetchNextPage: () => t2({ ...e3, paging: { offset: e3.paging.offset + e3.paging.limit, limit: e3.paging.limit } }).find(), fetchPrevPage: () => t2({ ...n2, paging: { offset: Math.max(e3.paging.offset - e3.paging.limit, 0), limit: e3.paging.limit } }).find(), offset: e3.paging.offset, limit: e3.paging.limit, totalCount: o2?.total, tooManyToCount: o2?.tooManyToCount, originQuery: this });
2555
+ let r2 = e5.requestTransformer(e5.pagingMethod === `CURSOR` && n2.cursorPaging.cursor ? { cursorPaging: n2.cursorPaging } : n2), i2 = await e5.func(r2), { [Ke]: a2, [qe]: o2 } = e5.responseTransformer(i2);
2556
+ if (e5.pagingMethod === `OFFSET`) {
2557
+ let e6 = n2;
2558
+ return new qa({ items: a2 ?? [], fetchNextPage: () => t2({ ...e6, paging: { offset: e6.paging.offset + e6.paging.limit, limit: e6.paging.limit } }).find(), fetchPrevPage: () => t2({ ...n2, paging: { offset: Math.max(e6.paging.offset - e6.paging.limit, 0), limit: e6.paging.limit } }).find(), offset: e6.paging.offset, limit: e6.paging.limit, totalCount: o2?.total, tooManyToCount: o2?.tooManyToCount, originQuery: this });
1438
2559
  }
1439
2560
  let s2 = n2.cursorPaging;
1440
- return new pi({ items: a2 ?? [], limit: s2.limit, originQuery: this, fetchNextPage: () => t2({ ...n2, cursorPaging: { cursor: o2?.cursors?.next ?? void 0, limit: s2.limit } }).find(), fetchPrevPage: () => t2({ ...n2, cursorPaging: { cursor: o2?.cursors?.prev ?? void 0, limit: s2.limit } }).find(), prevCursor: o2?.cursors?.prev ?? void 0, nextCursor: o2?.cursors?.next ?? void 0 });
2561
+ return new Ka({ items: a2 ?? [], limit: s2.limit, originQuery: this, fetchNextPage: () => t2({ ...n2, cursorPaging: { cursor: o2?.cursors?.next ?? void 0, limit: s2.limit } }).find(), fetchPrevPage: () => t2({ ...n2, cursorPaging: { cursor: o2?.cursors?.prev ?? void 0, limit: s2.limit } }).find(), prevCursor: o2?.cursors?.prev ?? void 0, nextCursor: o2?.cursors?.next ?? void 0 });
1441
2562
  } catch (t3) {
1442
- throw e2.errorTransformer(t3);
2563
+ throw e5.errorTransformer(t3);
1443
2564
  }
1444
- }, skipTo(e3) {
1445
- return t2({ ...n2, cursorPaging: { cursor: e3, limit: n2.cursorPaging.limit } });
2565
+ }, skipTo(e6) {
2566
+ return t2({ ...n2, cursorPaging: { cursor: e6, limit: n2.cursorPaging.limit } });
1446
2567
  }, eq(r2, i2) {
1447
- let a2 = i2 === void 0 ? null : i2, o2 = { [Z(e2.transformationPaths, r2)]: a2 };
1448
- return t2({ ...n2, filter: X(n2.filter, o2) });
2568
+ let a2 = i2 === void 0 ? null : i2, o2 = { [Q(e5.transformationPaths, r2)]: a2 };
2569
+ return t2({ ...n2, filter: Z(n2.filter, o2) });
1449
2570
  }, ne(r2, i2) {
1450
- let a2 = i2 === void 0 ? null : i2, o2 = { [Z(e2.transformationPaths, r2)]: { $ne: a2 } };
1451
- return t2({ ...n2, filter: X(n2.filter, o2) });
2571
+ let a2 = i2 === void 0 ? null : i2, o2 = { [Q(e5.transformationPaths, r2)]: { $ne: a2 } };
2572
+ return t2({ ...n2, filter: Z(n2.filter, o2) });
1452
2573
  }, ge(r2, i2) {
1453
- let a2 = { [Z(e2.transformationPaths, r2)]: { $gte: i2 } };
1454
- return t2({ ...n2, filter: X(n2.filter, a2) });
2574
+ let a2 = { [Q(e5.transformationPaths, r2)]: { $gte: i2 } };
2575
+ return t2({ ...n2, filter: Z(n2.filter, a2) });
1455
2576
  }, gt(r2, i2) {
1456
- let a2 = { [Z(e2.transformationPaths, r2)]: { $gt: i2 } };
1457
- return t2({ ...n2, filter: X(n2.filter, a2) });
2577
+ let a2 = { [Q(e5.transformationPaths, r2)]: { $gt: i2 } };
2578
+ return t2({ ...n2, filter: Z(n2.filter, a2) });
1458
2579
  }, le(r2, i2) {
1459
- let a2 = { [Z(e2.transformationPaths, r2)]: { $lte: i2 } };
1460
- return t2({ ...n2, filter: X(n2.filter, a2) });
2580
+ let a2 = { [Q(e5.transformationPaths, r2)]: { $lte: i2 } };
2581
+ return t2({ ...n2, filter: Z(n2.filter, a2) });
1461
2582
  }, lt(r2, i2) {
1462
- let a2 = { [Z(e2.transformationPaths, r2)]: { $lt: i2 } };
1463
- return t2({ ...n2, filter: X(n2.filter, a2) });
1464
- }, isNotEmpty(e3) {
1465
- return this.ne(e3, null);
1466
- }, isEmpty(e3) {
1467
- return this.eq(e3, null);
2583
+ let a2 = { [Q(e5.transformationPaths, r2)]: { $lt: i2 } };
2584
+ return t2({ ...n2, filter: Z(n2.filter, a2) });
2585
+ }, isNotEmpty(e6) {
2586
+ return this.ne(e6, null);
2587
+ }, isEmpty(e6) {
2588
+ return this.eq(e6, null);
1468
2589
  }, startsWith(r2, i2) {
1469
- let a2 = { [Z(e2.transformationPaths, r2)]: { $startsWith: i2 } };
1470
- return t2({ ...n2, filter: X(n2.filter, a2) });
2590
+ let a2 = { [Q(e5.transformationPaths, r2)]: { $startsWith: i2 } };
2591
+ return t2({ ...n2, filter: Z(n2.filter, a2) });
1471
2592
  }, endsWith(r2, i2) {
1472
- let a2 = { [Z(e2.transformationPaths, r2)]: { $endsWith: i2 } };
1473
- return t2({ ...n2, filter: X(n2.filter, a2) });
2593
+ let a2 = { [Q(e5.transformationPaths, r2)]: { $endsWith: i2 } };
2594
+ return t2({ ...n2, filter: Z(n2.filter, a2) });
1474
2595
  }, contains(r2, i2) {
1475
- let a2 = { [Z(e2.transformationPaths, r2)]: { $contains: i2 } };
1476
- return t2({ ...n2, filter: X(n2.filter, a2) });
2596
+ let a2 = { [Q(e5.transformationPaths, r2)]: { $contains: i2 } };
2597
+ return t2({ ...n2, filter: Z(n2.filter, a2) });
1477
2598
  }, hasSome(r2, ...i2) {
1478
- let a2 = { [Z(e2.transformationPaths, r2)]: { $hasSome: Array.isArray(i2[0]) ? i2[0] : i2 } };
1479
- return t2({ ...n2, filter: X(n2.filter, a2) });
2599
+ let a2 = { [Q(e5.transformationPaths, r2)]: { $hasSome: Array.isArray(i2[0]) ? i2[0] : i2 } };
2600
+ return t2({ ...n2, filter: Z(n2.filter, a2) });
1480
2601
  }, hasAll(r2, ...i2) {
1481
- let a2 = { [Z(e2.transformationPaths, r2)]: { $hasAll: Array.isArray(i2[0]) ? i2[0] : i2 } };
1482
- return t2({ ...n2, filter: X(n2.filter, a2) });
1483
- }, between(e3, t3, n3) {
1484
- return this.ge(e3, t3).lt(e3, n3);
2602
+ let a2 = { [Q(e5.transformationPaths, r2)]: { $hasAll: Array.isArray(i2[0]) ? i2[0] : i2 } };
2603
+ return t2({ ...n2, filter: Z(n2.filter, a2) });
2604
+ }, between(e6, t3, n3) {
2605
+ return this.ge(e6, t3).lt(e6, n3);
1485
2606
  }, in(r2, i2) {
1486
- let a2 = { [Z(e2.transformationPaths, r2)]: { $in: i2 } };
1487
- return t2({ ...n2, filter: X(n2.filter, a2) });
2607
+ let a2 = { [Q(e5.transformationPaths, r2)]: { $in: i2 } };
2608
+ return t2({ ...n2, filter: Z(n2.filter, a2) });
1488
2609
  }, exists(r2, i2 = true) {
1489
- let a2 = { [Z(e2.transformationPaths, r2)]: { $exists: i2 } };
1490
- return t2({ ...n2, filter: X(n2.filter, a2) });
1491
- }, or(e3) {
1492
- return t2({ ...n2, filter: ui(n2.filter, e3.query.filter) });
1493
- }, and(e3) {
1494
- return t2({ ...n2, filter: X(n2.filter, e3.query.filter) });
1495
- }, not(e3) {
1496
- return t2({ ...n2, filter: di(e3.query.filter) });
2610
+ let a2 = { [Q(e5.transformationPaths, r2)]: { $exists: i2 } };
2611
+ return t2({ ...n2, filter: Z(n2.filter, a2) });
2612
+ }, or(e6) {
2613
+ return t2({ ...n2, filter: Ua(n2.filter, e6.query.filter) });
2614
+ }, and(e6) {
2615
+ return t2({ ...n2, filter: Z(n2.filter, e6.query.filter) });
2616
+ }, not(e6) {
2617
+ return t2({ ...n2, filter: Wa(e6.query.filter) });
1497
2618
  }, ascending(...r2) {
1498
- return t2({ ...n2, sort: [...n2.sort ?? [], ...r2.map((t3) => ({ fieldName: Z(e2.transformationPaths, t3), order: `ASC` }))] });
2619
+ return t2({ ...n2, sort: [...n2.sort ?? [], ...r2.map((t3) => ({ fieldName: Q(e5.transformationPaths, t3), order: `ASC` }))] });
1499
2620
  }, descending(...r2) {
1500
- return t2({ ...n2, sort: [...n2.sort ?? [], ...r2.map((t3) => ({ fieldName: Z(e2.transformationPaths, t3), order: `DESC` }))] });
1501
- }, skip(e3) {
1502
- return t2({ ...n2, paging: { offset: e3, limit: `limit` in n2.paging ? n2.paging.limit : 50 } });
2621
+ return t2({ ...n2, sort: [...n2.sort ?? [], ...r2.map((t3) => ({ fieldName: Q(e5.transformationPaths, t3), order: `DESC` }))] });
2622
+ }, skip(e6) {
2623
+ return t2({ ...n2, paging: { offset: e6, limit: `limit` in n2.paging ? n2.paging.limit : 50 } });
1503
2624
  }, limit(r2) {
1504
- if (e2.pagingMethod === `CURSOR`) {
1505
- let e3 = n2;
1506
- return t2({ ...n2, cursorPaging: { limit: r2, cursor: `cursor` in e3.cursorPaging ? e3.cursorPaging.cursor : void 0 } });
2625
+ if (e5.pagingMethod === `CURSOR`) {
2626
+ let e6 = n2;
2627
+ return t2({ ...n2, cursorPaging: { limit: r2, cursor: `cursor` in e6.cursorPaging ? e6.cursorPaging.cursor : void 0 } });
1507
2628
  }
1508
2629
  let i2 = n2;
1509
2630
  return t2({ ...n2, paging: { limit: r2, offset: `offset` in i2.paging ? i2.paging.offset : 0 } });
1510
2631
  } });
1511
- return t2({ filter: {}, ...e2.pagingMethod === `OFFSET` ? { paging: { offset: 0, limit: 50 } } : { cursorPaging: { limit: 50 } } });
2632
+ return t2({ filter: {}, ...e5.pagingMethod === `OFFSET` ? { paging: { offset: 0, limit: 50 } } : { cursorPaging: { limit: 50 } } });
1512
2633
  }
1513
- function Z(e2, t2) {
1514
- let n2 = Object.entries(e2).find(([e3]) => e3 === t2 || t2.startsWith(`${e3}.`))?.[0];
1515
- return n2 ? t2.replace(n2, e2[n2]) : Ye(t2, { ...e2, ...Je });
2634
+ function Q(e5, t2) {
2635
+ let n2 = Object.entries(e5).find(([e6]) => e6 === t2 || t2.startsWith(`${e6}.`))?.[0];
2636
+ return n2 ? t2.replace(n2, e5[n2]) : Ye(t2, { ...e5, ...Je });
1516
2637
  }
1517
- function gi(e2, t2, n2 = {}) {
1518
- let r2 = (r3, i3) => gi(e2, t2, { ...n2, [r3]: i3 }), i2 = () => Object.keys(n2).length === 0 ? {} : { [Xe(e2, t2)]: n2 };
2638
+ function Ya(e5, t2, n2 = {}) {
2639
+ let r2 = (r3, i3) => Ya(e5, t2, { ...n2, [r3]: i3 }), i2 = () => Object.keys(n2).length === 0 ? {} : { [Xe(e5, t2)]: n2 };
1519
2640
  return { get filter() {
1520
2641
  return i2();
1521
- }, eq: (e3) => r2(`$eq`, e3), ne: (e3) => r2(`$ne`, e3), gt: (e3) => r2(`$gt`, e3), gte: (e3) => r2(`$gte`, e3), lt: (e3) => r2(`$lt`, e3), lte: (e3) => r2(`$lte`, e3), startsWith: (e3) => r2(`$startsWith`, e3), endsWith: (e3) => r2(`$endsWith`, e3), contains: (e3) => r2(`$contains`, e3), in: (e3) => r2(`$in`, e3), nin: (e3) => r2(`$nin`, e3), hasSome: (e3) => r2(`$hasSome`, e3), hasAll: (e3) => r2(`$hasAll`, e3), exists: (e3 = true) => r2(`$exists`, e3), isEmpty: (e3 = true) => r2(`$isEmpty`, e3), isNotEmpty: () => r2(`$ne`, null) };
2642
+ }, eq: (e6) => r2(`$eq`, e6), ne: (e6) => r2(`$ne`, e6), gt: (e6) => r2(`$gt`, e6), gte: (e6) => r2(`$gte`, e6), lt: (e6) => r2(`$lt`, e6), lte: (e6) => r2(`$lte`, e6), startsWith: (e6) => r2(`$startsWith`, e6), endsWith: (e6) => r2(`$endsWith`, e6), contains: (e6) => r2(`$contains`, e6), in: (e6) => r2(`$in`, e6), nin: (e6) => r2(`$nin`, e6), hasSome: (e6) => r2(`$hasSome`, e6), hasAll: (e6) => r2(`$hasAll`, e6), exists: (e6 = true) => r2(`$exists`, e6), isEmpty: (e6 = true) => r2(`$isEmpty`, e6), isNotEmpty: () => r2(`$ne`, null) };
1522
2643
  }
1523
- function _i(e2) {
1524
- return Object.assign((t2) => gi(t2, e2), { and: (...e3) => ({ filter: { $and: e3.map((e4) => e4.filter) } }), or: (...e3) => ({ filter: { $or: e3.map((e4) => e4.filter) } }), not: (e3) => ({ filter: { $not: e3.filter } }) });
2644
+ function Xa(e5) {
2645
+ return Object.assign((t2) => Ya(t2, e5), { and: (...e6) => ({ filter: { $and: e6.map((e7) => e7.filter) } }), or: (...e6) => ({ filter: { $or: e6.map((e7) => e7.filter) } }), not: (e6) => ({ filter: { $not: e6.filter } }) });
1525
2646
  }
1526
- function vi(e2) {
1527
- return (t2) => ({ asc: () => ({ sort: { fieldName: Xe(t2, e2), order: `ASC` } }), desc: () => ({ sort: { fieldName: Xe(t2, e2), order: `DESC` } }) });
2647
+ function Za(e5) {
2648
+ return (t2) => ({ asc: () => ({ sort: { fieldName: Xe(t2, e5), order: `ASC` } }), desc: () => ({ sort: { fieldName: Xe(t2, e5), order: `DESC` } }) });
1528
2649
  }
1529
- function yi(e2) {
2650
+ function Qa(e5) {
1530
2651
  return () => {
1531
- let t2 = {}, n2 = { withFilter(e3) {
1532
- return t2 = { ...t2, filter: e3.filter }, n2;
2652
+ let t2 = {}, n2 = { withFilter(e6) {
2653
+ return t2 = { ...t2, filter: e6.filter }, n2;
1533
2654
  }, withFields(...r2) {
1534
- return t2 = { ...t2, fields: r2.map((t3) => Xe(t3, e2)) }, n2;
1535
- }, withSorting(...e3) {
1536
- return t2 = { ...t2, sort: e3.map((e4) => e4.sort) }, n2;
1537
- }, withPaging(e3) {
1538
- return t2 = { ...t2, paging: e3 }, n2;
2655
+ return t2 = { ...t2, fields: r2.map((t3) => Xe(t3, e5)) }, n2;
2656
+ }, withSorting(...e6) {
2657
+ return t2 = { ...t2, sort: e6.map((e7) => e7.sort) }, n2;
2658
+ }, withPaging(e6) {
2659
+ return t2 = { ...t2, paging: e6 }, n2;
1539
2660
  }, build() {
1540
2661
  return t2;
1541
2662
  } };
1542
2663
  return n2;
1543
2664
  };
1544
2665
  }
1545
- function bi(e2) {
1546
- return { QueryBuilder: yi(e2), Filter: _i(e2), Sort: vi(e2) };
2666
+ function $a(e5) {
2667
+ return { QueryBuilder: Qa(e5), Filter: Xa(e5), Sort: Za(e5) };
1547
2668
  }
1548
- var xi = `filter`;
1549
- var Si = `sort`;
1550
- var Ci = `cursorPaging`;
1551
- var wi = `paging`;
1552
- var Ti = [xi, Si, Ci];
1553
- var Ei = [xi, Si, wi];
1554
- function Di(e2, t2) {
1555
- return !e2 || typeof e2 != `object` ? false : t2.some((t3) => e2.hasOwnProperty(t3));
2669
+ var eo = `filter`;
2670
+ var to = `sort`;
2671
+ var no = `cursorPaging`;
2672
+ var ro = `paging`;
2673
+ var io = [eo, to, no];
2674
+ var ao = [eo, to, ro];
2675
+ function oo(e5, t2) {
2676
+ return !e5 || typeof e5 != `object` ? false : t2.some((t3) => e5.hasOwnProperty(t3));
1556
2677
  }
1557
- function Oi(e2) {
1558
- return Di(e2, Ti);
2678
+ function so(e5) {
2679
+ return oo(e5, io);
1559
2680
  }
1560
- function ki(e2) {
1561
- return Di(e2, Ei);
2681
+ function co(e5) {
2682
+ return oo(e5, ao);
1562
2683
  }
1563
- function Ai(e2) {
1564
- let { hasOptionsParameter: t2 } = e2;
2684
+ function lo(e5) {
2685
+ let { hasOptionsParameter: t2 } = e5;
1565
2686
  return function(...n2) {
1566
- return t2 ? Mi(n2, e2) : ji(n2, e2);
2687
+ return t2 ? fo(n2, e5) : uo(n2, e5);
1567
2688
  };
1568
2689
  }
1569
- function ji(e2, t2) {
1570
- return e2.length === 0 ? t2.builderQueryFunction() : t2.typedQueryFunction(e2[0]);
2690
+ function uo(e5, t2) {
2691
+ return e5.length === 0 ? t2.builderQueryFunction() : t2.typedQueryFunction(e5[0]);
1571
2692
  }
1572
- function Mi(e2, t2) {
1573
- switch (e2.length) {
2693
+ function fo(e5, t2) {
2694
+ switch (e5.length) {
1574
2695
  case 0:
1575
2696
  return t2.builderQueryFunction();
1576
2697
  case 1:
1577
- return Oi(e2[0]) || ki(e2[0]) ? t2.typedQueryFunction(e2[0]) : t2.builderQueryFunction(e2[0]);
2698
+ return so(e5[0]) || co(e5[0]) ? t2.typedQueryFunction(e5[0]) : t2.builderQueryFunction(e5[0]);
1578
2699
  default:
1579
- return t2.typedQueryFunction(e2[0], e2[1]);
2700
+ return t2.typedQueryFunction(e5[0], e5[1]);
1580
2701
  }
1581
2702
  }
1582
- function Ni(e2) {
1583
- return F(Object.assign(e2, { domainToMappings: { "manage._base_domain_": [{ srcPath: `/_api/v1/service-options-and-variants`, destPath: `/v1/serviceOptionsAndVariants` }, { srcPath: `/_api/v1/serviceOptionsAndVariants`, destPath: `/v1/serviceOptionsAndVariants` }, { srcPath: `/_api/bookings/v1/service-options-and-variants`, destPath: `` }], _: [{ srcPath: `/_api/v1/service-options-and-variants`, destPath: `/v1/serviceOptionsAndVariants` }, { srcPath: `/_api/v1/serviceOptionsAndVariants`, destPath: `/v1/serviceOptionsAndVariants` }], "*.dev.wix-code.com": [{ srcPath: `/_api/v1/service-options-and-variants`, destPath: `/v1/serviceOptionsAndVariants` }], "editor._base_domain_": [{ srcPath: `/_api/v1/service-options-and-variants`, destPath: `/v1/serviceOptionsAndVariants` }, { srcPath: `/_api/bookings/v1/service-options-and-variants`, destPath: `` }], "blocks._base_domain_": [{ srcPath: `/_api/v1/service-options-and-variants`, destPath: `/v1/serviceOptionsAndVariants` }, { srcPath: `/_api/bookings/v1/service-options-and-variants`, destPath: `` }], "create.editorx": [{ srcPath: `/_api/v1/service-options-and-variants`, destPath: `/v1/serviceOptionsAndVariants` }, { srcPath: `/_api/bookings/v1/service-options-and-variants`, destPath: `` }], "www.wixapis.com": [{ srcPath: `/bookings/v1/serviceOptionsAndVariants`, destPath: `/v1/serviceOptionsAndVariants` }], "bo._base_domain_": [{ srcPath: `/_api/v1/service-options-and-variants`, destPath: `/v1/serviceOptionsAndVariants` }], "wixbo.ai": [{ srcPath: `/_api/v1/service-options-and-variants`, destPath: `/v1/serviceOptionsAndVariants` }], "wix-bo.com": [{ srcPath: `/_api/v1/service-options-and-variants`, destPath: `/v1/serviceOptionsAndVariants` }], "www._base_domain_": [{ srcPath: `/_api/v1/service-options-and-variants`, destPath: `/v1/service-options-and-variants` }] } }));
2703
+ function po(e5) {
2704
+ return It(Object.assign(e5, { domainToMappings: { "manage._base_domain_": [{ srcPath: `/_api/v1/service-options-and-variants`, destPath: `/v1/serviceOptionsAndVariants` }, { srcPath: `/_api/v1/serviceOptionsAndVariants`, destPath: `/v1/serviceOptionsAndVariants` }, { srcPath: `/_api/bookings/v1/service-options-and-variants`, destPath: `` }], _: [{ srcPath: `/_api/v1/service-options-and-variants`, destPath: `/v1/serviceOptionsAndVariants` }, { srcPath: `/_api/v1/serviceOptionsAndVariants`, destPath: `/v1/serviceOptionsAndVariants` }], "*.dev.wix-code.com": [{ srcPath: `/_api/v1/service-options-and-variants`, destPath: `/v1/serviceOptionsAndVariants` }], "editor._base_domain_": [{ srcPath: `/_api/v1/service-options-and-variants`, destPath: `/v1/serviceOptionsAndVariants` }, { srcPath: `/_api/bookings/v1/service-options-and-variants`, destPath: `` }], "blocks._base_domain_": [{ srcPath: `/_api/v1/service-options-and-variants`, destPath: `/v1/serviceOptionsAndVariants` }, { srcPath: `/_api/bookings/v1/service-options-and-variants`, destPath: `` }], "create.editorx": [{ srcPath: `/_api/v1/service-options-and-variants`, destPath: `/v1/serviceOptionsAndVariants` }, { srcPath: `/_api/bookings/v1/service-options-and-variants`, destPath: `` }], "www.wixapis.com": [{ srcPath: `/bookings/v1/serviceOptionsAndVariants`, destPath: `/v1/serviceOptionsAndVariants` }], "bo._base_domain_": [{ srcPath: `/_api/v1/service-options-and-variants`, destPath: `/v1/serviceOptionsAndVariants` }], "wixbo.ai": [{ srcPath: `/_api/v1/service-options-and-variants`, destPath: `/v1/serviceOptionsAndVariants` }], "wix-bo.com": [{ srcPath: `/_api/v1/service-options-and-variants`, destPath: `/v1/serviceOptionsAndVariants` }], "www._base_domain_": [{ srcPath: `/_api/v1/service-options-and-variants`, destPath: `/v1/service-options-and-variants` }] } }));
1584
2705
  }
1585
- var Pi = `@wix/auto_sdk_bookings_service-options-and-variants`;
1586
- function Fi(e2) {
2706
+ var mo = `@wix/auto_sdk_bookings_service-options-and-variants`;
2707
+ function ho(e5) {
1587
2708
  function t2({ host: t3 }) {
1588
- return { entityFqdn: `wix.bookings.catalog.v1.service_options_and_variants`, method: `POST`, methodFqn: `wix.bookings.catalog.v1.ServiceOptionsAndVariantsService.QueryServiceOptionsAndVariants`, packageName: Pi, migrationOptions: { optInTransformResponse: true }, url: Ni({ protoPath: `/v1/serviceOptionsAndVariants/query`, data: e2, host: t3 }), data: e2 };
2709
+ return { entityFqdn: `wix.bookings.catalog.v1.service_options_and_variants`, method: `POST`, methodFqn: `wix.bookings.catalog.v1.ServiceOptionsAndVariantsService.QueryServiceOptionsAndVariants`, packageName: mo, migrationOptions: { optInTransformResponse: true }, url: po({ protoPath: `/v1/serviceOptionsAndVariants/query`, data: e5, host: t3 }), data: e5 };
1589
2710
  }
1590
2711
  return t2;
1591
2712
  }
1592
- function Ii() {
1593
- let { httpClient: e2, sideEffects: t2 } = arguments[0];
1594
- return hi({ func: async (n2) => {
1595
- let r2 = Fi(n2);
2713
+ function go() {
2714
+ let { httpClient: e5, sideEffects: t2 } = arguments[0];
2715
+ return Ja({ func: async (n2) => {
2716
+ let r2 = ho(n2);
1596
2717
  t2?.onSiteCall?.();
1597
2718
  try {
1598
- let n3 = await e2.request(r2);
2719
+ let n3 = await e5.request(r2);
1599
2720
  return t2?.onSuccess?.(n3), n3;
1600
- } catch (e3) {
1601
- throw t2?.onError?.(e3), e3;
2721
+ } catch (e6) {
2722
+ throw t2?.onError?.(e6), e6;
1602
2723
  }
1603
- }, requestTransformer: (e3) => {
1604
- let t3 = [e3, {}];
2724
+ }, requestTransformer: (e6) => {
2725
+ let t3 = [e6, {}];
1605
2726
  return A({ ...t3?.[1], query: t3?.[0] });
1606
- }, responseTransformer: ({ data: e3 }) => {
1607
- let t3 = j(N(e3, []));
2727
+ }, responseTransformer: ({ data: e6 }) => {
2728
+ let t3 = j(N(e6, []));
1608
2729
  return { items: t3?.serviceOptionsAndVariantsList, pagingMetadata: t3?.pagingMetadata };
1609
- }, errorTransformer: (e3) => {
1610
- throw P(e3, { spreadPathsToArguments: {}, explicitPathsToArguments: { query: `$[0]` }, singleArgumentUnchanged: false });
2730
+ }, errorTransformer: (e6) => {
2731
+ throw P(e6, { spreadPathsToArguments: {}, explicitPathsToArguments: { query: `$[0]` }, singleArgumentUnchanged: false });
1611
2732
  }, pagingMethod: `CURSOR`, transformationPaths: {} });
1612
2733
  }
1613
- async function Li(e2) {
1614
- let { httpClient: t2, sideEffects: n2 } = arguments[1], r2 = Fi(A({ query: e2 }));
2734
+ async function _o(e5) {
2735
+ let { httpClient: t2, sideEffects: n2 } = arguments[1], r2 = ho(A({ query: e5 }));
1615
2736
  n2?.onSiteCall?.();
1616
2737
  try {
1617
- let e3 = await t2.request(r2);
1618
- return n2?.onSuccess?.(e3), j(e3.data);
1619
- } catch (e3) {
1620
- let t3 = P(e3, { spreadPathsToArguments: {}, explicitPathsToArguments: { query: `$[0]` }, singleArgumentUnchanged: false }, [`query`]);
1621
- throw n2?.onError?.(e3), t3;
2738
+ let e6 = await t2.request(r2);
2739
+ return n2?.onSuccess?.(e6), j(e6.data);
2740
+ } catch (e6) {
2741
+ let t3 = P(e6, { spreadPathsToArguments: {}, explicitPathsToArguments: { query: `$[0]` }, singleArgumentUnchanged: false }, [`query`]);
2742
+ throw n2?.onError?.(e6), t3;
1622
2743
  }
1623
2744
  }
1624
- function Ri(e2) {
1625
- return () => Ii({ httpClient: e2 });
2745
+ function vo(e5) {
2746
+ return () => go({ httpClient: e5 });
1626
2747
  }
1627
- function zi(e2) {
1628
- return (t2) => Li(t2, { httpClient: e2 });
2748
+ function yo(e5) {
2749
+ return (t2) => _o(t2, { httpClient: e5 });
1629
2750
  }
1630
- function Bi(e2) {
1631
- let t2 = Ai({ builderQueryFunction: () => Ri(e2)(), typedQueryFunction: (t3) => zi(e2)(t3), hasOptionsParameter: false });
1632
- function n2(e3) {
2751
+ function bo(e5) {
2752
+ let t2 = lo({ builderQueryFunction: () => vo(e5)(), typedQueryFunction: (t3) => yo(e5)(t3), hasOptionsParameter: false });
2753
+ function n2(e6) {
1633
2754
  return t2(...arguments);
1634
2755
  }
1635
2756
  return n2;
1636
2757
  }
1637
- var Vi = Pt(Bi);
1638
- function Hi(e2) {
1639
- if (e2) return e2.url;
2758
+ var xo = Pt(bo);
2759
+ function So(e5) {
2760
+ if (e5) return e5.url;
1640
2761
  }
1641
- var Ui = [{ path: `services.createdDate` }, { path: `services.updatedDate` }, { path: `services.media.items.image.urlExpirationDate` }, { path: `services.media.mainMedia.image.urlExpirationDate` }, { path: `services.media.coverMedia.image.urlExpirationDate` }, { path: `services.payment.subscription.recurringStartDate` }, { path: `services.bookingPolicy.createdDate` }, { path: `services.bookingPolicy.updatedDate` }, { path: `services.schedule.firstSessionStart` }, { path: `services.schedule.lastSessionEnd` }, { path: `services.staffMembers.mainMedia.image.urlExpirationDate` }, { path: `services.staffMemberDetails.staffMembers.mainMedia.image.urlExpirationDate` }, { path: `services.supportedSlugs.createdDate` }, { path: `services.mainSlug.createdDate` }];
1642
- var Wi = [{ path: `services.locations.business.address.geocode.latitude` }, { path: `services.locations.business.address.geocode.longitude` }, { path: `services.locations.custom.address.geocode.latitude` }, { path: `services.locations.custom.address.geocode.longitude` }, { path: `services.locations.calculatedAddress.geocode.latitude` }, { path: `services.locations.calculatedAddress.geocode.longitude` }];
1643
- function Gi(e2) {
1644
- return F(Object.assign(e2, { 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: `` }] } }));
2762
+ var Co = [{ path: `services.createdDate` }, { path: `services.updatedDate` }, { path: `services.media.items.image.urlExpirationDate` }, { path: `services.media.mainMedia.image.urlExpirationDate` }, { path: `services.media.coverMedia.image.urlExpirationDate` }, { path: `services.payment.subscription.recurringStartDate` }, { path: `services.bookingPolicy.createdDate` }, { path: `services.bookingPolicy.updatedDate` }, { path: `services.schedule.firstSessionStart` }, { path: `services.schedule.lastSessionEnd` }, { path: `services.staffMembers.mainMedia.image.urlExpirationDate` }, { path: `services.staffMemberDetails.staffMembers.mainMedia.image.urlExpirationDate` }, { path: `services.supportedSlugs.createdDate` }, { path: `services.mainSlug.createdDate` }];
2763
+ var wo = [{ path: `services.locations.business.address.geocode.latitude` }, { path: `services.locations.business.address.geocode.longitude` }, { path: `services.locations.custom.address.geocode.latitude` }, { path: `services.locations.custom.address.geocode.longitude` }, { path: `services.locations.calculatedAddress.geocode.latitude` }, { path: `services.locations.calculatedAddress.geocode.longitude` }];
2764
+ function To(e5) {
2765
+ return It(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: `` }] } }));
1645
2766
  }
1646
- var Ki = `@wix/auto_sdk_bookings_services`;
1647
- function qi(e2) {
2767
+ var Eo = `@wix/auto_sdk_bookings_services`;
2768
+ function Do(e5) {
1648
2769
  function t2({ host: t3 }) {
1649
- return { entityFqdn: `wix.bookings.services.v2.service`, method: `POST`, methodFqn: `wix.bookings.services.v2.ServicesService.QueryServices`, packageName: Ki, migrationOptions: { optInTransformResponse: true }, url: Gi({ protoPath: `/v2/services/query`, data: e2, host: t3 }), data: e2, transformResponse: (e3) => N(e3, [{ transformFn: M, paths: Ui }, { transformFn: cn, paths: Wi }]) };
2770
+ return { entityFqdn: `wix.bookings.services.v2.service`, method: `POST`, methodFqn: `wix.bookings.services.v2.ServicesService.QueryServices`, packageName: Eo, migrationOptions: { optInTransformResponse: true }, url: To({ protoPath: `/v2/services/query`, data: e5, host: t3 }), data: e5, transformResponse: (e6) => N(e6, [{ transformFn: M, paths: Co }, { transformFn: un, paths: wo }]) };
1650
2771
  }
1651
2772
  return t2;
1652
2773
  }
1653
- var Ji = [{ path: `services.media.items.image` }, { path: `services.media.mainMedia.image` }, { path: `services.media.coverMedia.image` }, { path: `services.staffMembers.mainMedia.image` }, { path: `services.staffMemberDetails.staffMembers.mainMedia.image` }];
1654
- var Yi = [{ path: `services.locations.calculatedAddress` }, { path: `services.locations.business.address` }, { path: `services.locations.custom.address` }];
1655
- var Xi = [{ path: `services.urls.servicePage` }, { path: `services.urls.bookingPage` }, { path: `services.urls.calendarPage` }];
1656
- var Zi = ((e2) => (e2.APPOINTMENT = `APPOINTMENT`, e2.CLASS = `CLASS`, e2.COURSE = `COURSE`, e2))(Zi || {});
1657
- var Qi = ((e2) => (e2.FIXED = `FIXED`, e2.CUSTOM = `CUSTOM`, e2.VARIED = `VARIED`, e2.NO_FEE = `NO_FEE`, e2.SUBSCRIPTION = `SUBSCRIPTION`, e2))(Qi || {});
1658
- var $i = ((e2) => (e2.CUSTOM = `CUSTOM`, e2.BUSINESS = `BUSINESS`, e2.CUSTOMER = `CUSTOMER`, e2))($i || {});
1659
- function ea(e2) {
2774
+ var Oo = [{ path: `services.media.items.image` }, { path: `services.media.mainMedia.image` }, { path: `services.media.coverMedia.image` }, { path: `services.staffMembers.mainMedia.image` }, { path: `services.staffMemberDetails.staffMembers.mainMedia.image` }];
2775
+ var ko = [{ path: `services.locations.calculatedAddress` }, { path: `services.locations.business.address` }, { path: `services.locations.custom.address` }];
2776
+ var Ao = [{ path: `services.urls.servicePage` }, { path: `services.urls.bookingPage` }, { path: `services.urls.calendarPage` }];
2777
+ var jo = ((e5) => (e5.APPOINTMENT = `APPOINTMENT`, e5.CLASS = `CLASS`, e5.COURSE = `COURSE`, e5))(jo || {});
2778
+ var Mo = ((e5) => (e5.FIXED = `FIXED`, e5.CUSTOM = `CUSTOM`, e5.VARIED = `VARIED`, e5.NO_FEE = `NO_FEE`, e5.SUBSCRIPTION = `SUBSCRIPTION`, e5))(Mo || {});
2779
+ var No = ((e5) => (e5.CUSTOM = `CUSTOM`, e5.BUSINESS = `BUSINESS`, e5.CUSTOMER = `CUSTOMER`, e5))(No || {});
2780
+ function Po(e5) {
1660
2781
  let { httpClient: t2, sideEffects: n2 } = arguments[1];
1661
- return hi({ func: async (r2) => {
1662
- let i2 = qi({ ...r2, ...e2 ?? {} });
2782
+ return Ja({ func: async (r2) => {
2783
+ let i2 = Do({ ...r2, ...e5 ?? {} });
1663
2784
  n2?.onSiteCall?.();
1664
2785
  try {
1665
- let e3 = await t2.request(i2);
1666
- return n2?.onSuccess?.(e3), e3;
1667
- } catch (e3) {
1668
- throw n2?.onError?.(e3), e3;
2786
+ let e6 = await t2.request(i2);
2787
+ return n2?.onSuccess?.(e6), e6;
2788
+ } catch (e6) {
2789
+ throw n2?.onError?.(e6), e6;
1669
2790
  }
1670
2791
  }, requestTransformer: (t3) => {
1671
- let n3 = [t3, e2];
2792
+ let n3 = [t3, e5];
1672
2793
  return A({ ...n3?.[1], query: n3?.[0] });
1673
- }, responseTransformer: ({ data: e3 }) => {
1674
- let t3 = j(N(e3, [{ transformFn: oi, paths: Ji }, { transformFn: ln, paths: Yi }, { transformFn: Hi, paths: Xi }]));
2794
+ }, responseTransformer: ({ data: e6 }) => {
2795
+ let t3 = j(N(e6, [{ transformFn: za, paths: Oo }, { transformFn: dn, paths: ko }, { transformFn: So, paths: Ao }]));
1675
2796
  return { items: t3?.services, pagingMetadata: t3?.pagingMetadata };
1676
- }, errorTransformer: (e3) => {
1677
- throw P(e3, { spreadPathsToArguments: {}, explicitPathsToArguments: { query: `$[0]` }, singleArgumentUnchanged: false });
2797
+ }, errorTransformer: (e6) => {
2798
+ throw P(e6, { spreadPathsToArguments: {}, explicitPathsToArguments: { query: `$[0]` }, singleArgumentUnchanged: false });
1678
2799
  }, pagingMethod: `OFFSET`, transformationPaths: {} });
1679
2800
  }
1680
- async function ta(e2, t2) {
1681
- let { httpClient: n2, sideEffects: r2 } = arguments[2], i2 = qi(A({ query: e2, ...t2 }));
2801
+ async function Fo(e5, t2) {
2802
+ let { httpClient: n2, sideEffects: r2 } = arguments[2], i2 = Do(A({ query: e5, ...t2 }));
1682
2803
  r2?.onSiteCall?.();
1683
2804
  try {
1684
- let e3 = await n2.request(i2);
1685
- return r2?.onSuccess?.(e3), j(N(e3.data, [{ transformFn: oi, paths: Ji }, { transformFn: ln, paths: Yi }, { transformFn: Hi, paths: Xi }]));
1686
- } catch (e3) {
1687
- let t3 = P(e3, { spreadPathsToArguments: {}, explicitPathsToArguments: { query: `$[0]` }, singleArgumentUnchanged: false }, [`query`, `options`]);
1688
- throw r2?.onError?.(e3), t3;
2805
+ let e6 = await n2.request(i2);
2806
+ return r2?.onSuccess?.(e6), j(N(e6.data, [{ transformFn: za, paths: Oo }, { transformFn: dn, paths: ko }, { transformFn: So, paths: Ao }]));
2807
+ } catch (e6) {
2808
+ let t3 = P(e6, { spreadPathsToArguments: {}, explicitPathsToArguments: { query: `$[0]` }, singleArgumentUnchanged: false }, [`query`, `options`]);
2809
+ throw r2?.onError?.(e6), t3;
1689
2810
  }
1690
2811
  }
1691
- function na(e2) {
1692
- return (t2) => ea(t2, { httpClient: e2 });
2812
+ function Io(e5) {
2813
+ return (t2) => Po(t2, { httpClient: e5 });
1693
2814
  }
1694
- function ra(e2) {
1695
- return (t2, n2) => ta(t2, n2, { httpClient: e2 });
2815
+ function Lo(e5) {
2816
+ return (t2, n2) => Fo(t2, n2, { httpClient: e5 });
1696
2817
  }
1697
- function ia(e2) {
1698
- let t2 = Ai({ builderQueryFunction: (t3) => na(e2)(t3), typedQueryFunction: (t3, n3) => ra(e2)(t3, n3), hasOptionsParameter: true });
1699
- function n2(e3, n3) {
2818
+ function Ro(e5) {
2819
+ let t2 = lo({ builderQueryFunction: (t3) => Io(e5)(t3), typedQueryFunction: (t3, n3) => Lo(e5)(t3, n3), hasOptionsParameter: true });
2820
+ function n2(e6, n3) {
1700
2821
  return t2(...arguments);
1701
2822
  }
1702
2823
  return n2;
1703
2824
  }
1704
- var aa = Pt(ia);
1705
- var oa = [{ path: `bookingsSettings.createdDate` }, { path: `bookingsSettings.updatedDate` }];
1706
- var sa = [{ path: `bookingsSettings.siteProperties.address.coordinates.latitude` }, { path: `bookingsSettings.siteProperties.address.coordinates.longitude` }];
1707
- function ca(e2) {
1708
- return F(Object.assign(e2, { domainToMappings: { "manage._base_domain_": [{ srcPath: `/_api/bookings-settings`, destPath: `` }], "dev._base_domain_": [{ srcPath: `/_api/bookings-settings`, destPath: `` }], "*.dev.wix-code.com": [{ srcPath: `/_api/bookings-settings`, destPath: `` }], "www.wixapis.com": [{ srcPath: `/_api/bookings-settings`, destPath: `` }], _: [{ srcPath: `/_api/bookings-settings`, destPath: `` }], "api._api_base_domain_": [{ srcPath: `/bookings-settings`, destPath: `` }], "editor._base_domain_": [{ srcPath: `/_api/bookings-settings`, destPath: `` }], "blocks._base_domain_": [{ srcPath: `/_api/bookings-settings`, destPath: `` }], "create.editorx": [{ srcPath: `/_api/bookings-settings`, destPath: `` }], "editor.wixapps.net": [{ srcPath: `/_api/bookings-settings`, destPath: `` }], "www._base_domain_": [{ srcPath: `/_api/bookings-settings`, destPath: `` }] } }));
2825
+ var zo = Pt(Ro);
2826
+ var Bo = [{ path: `bookingsSettings.createdDate` }, { path: `bookingsSettings.updatedDate` }];
2827
+ var Vo = [{ path: `bookingsSettings.siteProperties.address.coordinates.latitude` }, { path: `bookingsSettings.siteProperties.address.coordinates.longitude` }];
2828
+ function Ho(e5) {
2829
+ return It(Object.assign(e5, { domainToMappings: { "manage._base_domain_": [{ srcPath: `/_api/bookings-settings`, destPath: `` }], "dev._base_domain_": [{ srcPath: `/_api/bookings-settings`, destPath: `` }], "*.dev.wix-code.com": [{ srcPath: `/_api/bookings-settings`, destPath: `` }], "www.wixapis.com": [{ srcPath: `/_api/bookings-settings`, destPath: `` }], _: [{ srcPath: `/_api/bookings-settings`, destPath: `` }], "api._api_base_domain_": [{ srcPath: `/bookings-settings`, destPath: `` }], "editor._base_domain_": [{ srcPath: `/_api/bookings-settings`, destPath: `` }], "blocks._base_domain_": [{ srcPath: `/_api/bookings-settings`, destPath: `` }], "create.editorx": [{ srcPath: `/_api/bookings-settings`, destPath: `` }], "editor.wixapps.net": [{ srcPath: `/_api/bookings-settings`, destPath: `` }], "www._base_domain_": [{ srcPath: `/_api/bookings-settings`, destPath: `` }] } }));
1709
2830
  }
1710
- var la = `@wix/auto_sdk_bookings_bookings-settings`;
1711
- function ua(e2) {
2831
+ var Uo = `@wix/auto_sdk_bookings_bookings-settings`;
2832
+ function Wo(e5) {
1712
2833
  function t2({ host: t3 }) {
1713
- return { entityFqdn: `wix.bookings.v2.bookings_settings`, method: `GET`, methodFqn: `wix.bookings.settings.v2.BookingsSettingsService.GetBookingsSettings`, packageName: la, migrationOptions: { optInTransformResponse: true }, url: ca({ protoPath: `/v2/settings`, data: e2, host: t3 }), params: Ft(e2), transformResponse: (e3) => N(e3, [{ transformFn: M, paths: oa }, { transformFn: cn, paths: sa }]), fallback: [{ method: `GET`, url: ca({ protoPath: `/v2/settings`, data: e2, host: t3 }), params: Ft(e2) }] };
2834
+ return { entityFqdn: `wix.bookings.v2.bookings_settings`, method: `GET`, methodFqn: `wix.bookings.settings.v2.BookingsSettingsService.GetBookingsSettings`, packageName: Uo, migrationOptions: { optInTransformResponse: true }, url: Ho({ protoPath: `/v2/settings`, data: e5, host: t3 }), params: Ft(e5), transformResponse: (e6) => N(e6, [{ transformFn: M, paths: Bo }, { transformFn: un, paths: Vo }]), fallback: [{ method: `GET`, url: Ho({ protoPath: `/v2/settings`, data: e5, host: t3 }), params: Ft(e5) }] };
1714
2835
  }
1715
2836
  return t2;
1716
2837
  }
1717
- var da = ((e2) => (e2.BUSINESS_TIME_ZONE = `BUSINESS_TIME_ZONE`, e2.CUSTOMER_TIME_ZONE = `CUSTOMER_TIME_ZONE`, e2))(da || {});
1718
- async function fa() {
1719
- let { httpClient: e2, sideEffects: t2 } = arguments[0], n2 = ua(A({}));
2838
+ var Go = ((e5) => (e5.BUSINESS_TIME_ZONE = `BUSINESS_TIME_ZONE`, e5.CUSTOMER_TIME_ZONE = `CUSTOMER_TIME_ZONE`, e5))(Go || {});
2839
+ async function Ko() {
2840
+ let { httpClient: e5, sideEffects: t2 } = arguments[0], n2 = Wo(A({}));
1720
2841
  t2?.onSiteCall?.();
1721
2842
  try {
1722
- let r2 = await e2.request(n2);
2843
+ let r2 = await e5.request(n2);
1723
2844
  return t2?.onSuccess?.(r2), j(r2.data)?.bookingsSettings;
1724
- } catch (e3) {
1725
- let n3 = P(e3, { spreadPathsToArguments: {}, explicitPathsToArguments: {}, singleArgumentUnchanged: false }, []);
1726
- throw t2?.onError?.(e3), n3;
2845
+ } catch (e6) {
2846
+ let n3 = P(e6, { spreadPathsToArguments: {}, explicitPathsToArguments: {}, singleArgumentUnchanged: false }, []);
2847
+ throw t2?.onError?.(e6), n3;
1727
2848
  }
1728
2849
  }
1729
- function pa(e2) {
1730
- return () => fa({ httpClient: e2 });
2850
+ function qo(e5) {
2851
+ return () => Ko({ httpClient: e5 });
1731
2852
  }
1732
- var ma = Pt(pa);
1733
- var ha = (e2) => e2 === Zi.APPOINTMENT;
1734
- var ga = (e2) => e2.payment?.rateType === Qi.VARIED;
1735
- var _a = [`STAFF_MEMBER_DETAILS`, `STAFF_WORKING_HOURS_LOCATIONS`, `DISCOUNT_INFO_DETAILS`];
1736
- function va() {
1737
- return aa({ conditionalFields: _a }).eq(`appId`, tr).eq(`hidden`, false);
2853
+ var Jo = Pt(qo);
2854
+ var Yo = (e5) => e5 === jo.APPOINTMENT;
2855
+ var Xo = (e5) => e5.payment?.rateType === Mo.VARIED;
2856
+ var Zo = [`STAFF_MEMBER_DETAILS`, `STAFF_WORKING_HOURS_LOCATIONS`, `DISCOUNT_INFO_DETAILS`];
2857
+ function Qo() {
2858
+ return zo({ conditionalFields: Zo }).eq(`appId`, Ni).eq(`hidden`, false);
1738
2859
  }
1739
- async function ya({ limit: e2, offset: t2, categoryId: n2, locationId: r2, serviceIds: i2, categoryIds: a2 }) {
2860
+ async function $o({ limit: e5, offset: t2, categoryId: n2, locationId: r2, serviceIds: i2, categoryIds: a2 }) {
1740
2861
  if (n2 && a2?.length && !a2.includes(n2)) return { services: [], hasMore: false, totalPages: 1 };
1741
- let o2 = va().limit(e2).skip(t2);
1742
- i2?.length && (o2 = o2.in(`_id`, i2)), n2 ? o2 = o2.eq(`category.id`, n2) : a2?.length && (o2 = o2.in(`category.id`, a2)), r2 === `OTHER_LOCATIONS` ? o2 = o2.hasSome(`locations.type`, [$i.CUSTOM, $i.CUSTOMER]) : r2 && (o2 = o2.eq(`locations.business.id`, r2));
2862
+ let o2 = Qo().limit(e5).skip(t2);
2863
+ i2?.length && (o2 = o2.in(`_id`, i2)), n2 ? o2 = o2.eq(`category.id`, n2) : a2?.length && (o2 = o2.in(`category.id`, a2)), r2 === `OTHER_LOCATIONS` ? o2 = o2.hasSome(`locations.type`, [No.CUSTOM, No.CUSTOMER]) : r2 && (o2 = o2.eq(`locations.business.id`, r2));
1743
2864
  let s2 = await o2.find();
1744
2865
  return { services: s2.items ?? [], hasMore: s2.hasNext(), totalPages: s2.totalPages ?? 1 };
1745
2866
  }
1746
- var Q = { category: `category`, location: `location`, page: `page`, blob: `b`, resource: `resource`, referral: `referral`, timezone: `timezone`, bookingId: `bookingId`, token: `token`, rescheduleRedirectUrl: `rescheduleRedirectUrl` };
1747
- function ba(e2, t2) {
1748
- let n2 = e2(t2);
2867
+ var es = { category: `category`, location: `location`, page: `page`, blob: `b`, resource: `resource`, referral: `referral`, timezone: `timezone`, bookingId: `bookingId`, token: `token`, rescheduleRedirectUrl: `rescheduleRedirectUrl` };
2868
+ function ts(e5, t2) {
2869
+ let n2 = e5(t2);
1749
2870
  return n2 ? n2.replace(/\/$/, ``) || `/` : null;
1750
2871
  }
1751
- function xa(e2, t2, n2) {
1752
- let r2 = e2(t2);
2872
+ function ns(e5, t2, n2) {
2873
+ let r2 = e5(t2);
1753
2874
  return !r2 || !n2 ? null : `${r2.replace(/\/$/, ``)}/${n2}`;
1754
2875
  }
1755
- function Sa(e2, t2) {
1756
- switch (e2) {
2876
+ function rs(e5, t2) {
2877
+ switch (e5) {
1757
2878
  case `servicePage`:
1758
- return (t2.slug ? t2.buildCustomServiceUrl(t2.slug) : void 0) ?? xa(t2.appSectionUrl, H.SERVICE_PAGE, t2.slug);
2879
+ return (t2.slug ? t2.buildCustomServiceUrl(t2.slug) : void 0) ?? ns(t2.appSectionUrl, W.SERVICE_PAGE, t2.slug);
1759
2880
  case `bookingCalendar`:
1760
- return t2.isMultiService ? ba(t2.appSectionUrl, H.CALENDAR_PAGE) : xa(t2.appSectionUrl, H.CALENDAR_PAGE, t2.slug);
2881
+ return t2.isMultiService ? ts(t2.appSectionUrl, W.CALENDAR_PAGE) : ns(t2.appSectionUrl, W.CALENDAR_PAGE, t2.slug);
1761
2882
  case `bookingForm`:
1762
- return t2.serviceId ? xa(t2.appSectionUrl, H.FORM_PAGE, t2.slug) : null;
2883
+ return t2.serviceId ? ns(t2.appSectionUrl, W.FORM_PAGE, t2.slug) : null;
1763
2884
  default:
1764
2885
  return null;
1765
2886
  }
1766
2887
  }
1767
- var Ca = (e2) => e2.target === `_blank`;
1768
- var wa = (e2, t2) => t2 === `/` ? e2 : new URL(`.${t2}`, `${e2}/`).href;
1769
- var Ta = (e2, t2, n2) => n2 ? `.${t2}` : Ea(e2, t2);
1770
- var Ea = (e2, t2) => e2 ? wa(e2, t2) : t2;
1771
- var Da = () => {
1772
- let { previewMode: e2 } = p(Zn), t2 = p(Bn), n2 = t2.siteUrl.replace(/\/$/, ``), { navigateTo: r2 } = p($n), a2 = p(er), o2 = f(), s2 = i(async (t3) => {
1773
- let i2 = Ta(n2, t3, e2);
2888
+ var is = (e5) => e5.target === `_blank`;
2889
+ var as = (e5, t2) => t2 === `/` ? e5 : new URL(`.${t2}`, `${e5}/`).href;
2890
+ var os = (e5, t2, n2) => n2 ? `.${t2}` : ss(e5, t2);
2891
+ var ss = (e5, t2) => e5 ? as(e5, t2) : t2;
2892
+ var cs = () => {
2893
+ let { previewMode: e5 } = p(ki), t2 = p(vi), n2 = t2.siteUrl.replace(/\/$/, ``), { navigateTo: r2 } = p(ji), a2 = p(Mi), o2 = f(), s2 = i(async (t3) => {
2894
+ let i2 = os(n2, t3, e5);
1774
2895
  await r2({ href: i2 });
1775
- }, [e2, n2, r2]), c2 = i(async (e3) => {
1776
- await r2(Ca(e3) ? { href: e3.href, type: `ExternalLink`, target: `_blank` } : { href: e3.href });
1777
- }, [r2]), l2 = i((e3) => Ea(n2, e3), [n2]), u2 = i((e3) => t2.appSectionRelativeUrl(tr, e3), [t2]), d2 = i((e3) => ai(a2.urlMappings, e3), [a2]), m2 = i((e3, t3) => Sa(e3, { ...t3, appSectionUrl: u2, buildCustomServiceUrl: d2 }), [u2, d2]), ee2 = i((e3, t3) => {
1778
- let r3 = m2(e3, t3);
1779
- return r3 && n2 ? wa(n2, r3) : null;
1780
- }, [m2, n2]), h2 = i((e3, t3) => {
1781
- let n3 = m2(e3, t3);
2896
+ }, [e5, n2, r2]), c2 = i(async (e6) => {
2897
+ await r2(is(e6) ? { href: e6.href, type: `ExternalLink`, target: `_blank` } : { href: e6.href });
2898
+ }, [r2]), l2 = i((e6) => ss(n2, e6), [n2]), u2 = i((e6) => t2.appSectionRelativeUrl(Ni, e6), [t2]), d2 = i((e6) => Ra(a2.urlMappings, e6), [a2]), m2 = i((e6, t3) => rs(e6, { ...t3, appSectionUrl: u2, buildCustomServiceUrl: d2 }), [u2, d2]), h2 = i((e6, t3) => {
2899
+ let r3 = m2(e6, t3);
2900
+ return r3 && n2 ? as(n2, r3) : null;
2901
+ }, [m2, n2]), g2 = i((e6, t3) => {
2902
+ let n3 = m2(e6, t3);
1782
2903
  n3 && s2(n3);
1783
- }, [m2, s2]), g2 = i(() => u2(H.FORM_PAGE) || void 0, [u2]), _2 = i((e3) => Object.values(o2(Qn).pages).some((t3) => t3.appPageId === e3 && (!t3.appDefinitionId || t3.appDefinitionId === `1380b703-ce81-ff05-f115-39571d94dfcd`)) && t2.appSectionRelativeUrl(`1380b703-ce81-ff05-f115-39571d94dfcd`, e3) || void 0, [t2, o2]);
1784
- return { navigate: s2, navigateToHref: c2, resolvePath: m2, toHref: l2, resolveAbsoluteUrl: ee2, navigateTo: h2, getBookingFormPath: g2, getCartPagePath: i(() => _2(nr), [_2]), getThankYouPagePath: i((e3) => {
1785
- let t3 = _2(rr);
1786
- return t3 ? `${t3}/${e3}?origin=bookings` : void 0;
1787
- }, [_2]) };
1788
- };
1789
- var Oa = V(`@wix/site-service-warmup-data`);
1790
- function ka() {
2904
+ }, [m2, s2]), _2 = i(() => u2(W.FORM_PAGE) || void 0, [u2]), v2 = i((e6) => Object.values(o2(Ai).pages).some((t3) => t3.appPageId === e6 && (!t3.appDefinitionId || t3.appDefinitionId === `1380b703-ce81-ff05-f115-39571d94dfcd`)) && t2.appSectionRelativeUrl(`1380b703-ce81-ff05-f115-39571d94dfcd`, e6) || void 0, [t2, o2]);
2905
+ return { navigate: s2, navigateToHref: c2, resolvePath: m2, toHref: l2, resolveAbsoluteUrl: h2, navigateTo: g2, getBookingFormPath: _2, getCartPagePath: i(() => v2(Pi), [v2]), getThankYouPagePath: i((e6) => {
2906
+ let t3 = v2(Fi);
2907
+ return t3 ? `${t3}/${e6}?origin=bookings` : void 0;
2908
+ }, [v2]) };
2909
+ };
2910
+ var ls = U(`@wix/site-service-warmup-data`);
2911
+ function us() {
1791
2912
  try {
1792
2913
  return f();
1793
2914
  } catch {
1794
2915
  return null;
1795
2916
  }
1796
2917
  }
1797
- function Aa(e2) {
2918
+ function ds(e5) {
1798
2919
  try {
1799
- return e2 ? e2(Oa) : null;
2920
+ return e5 ? e5(ls) : null;
1800
2921
  } catch {
1801
2922
  return null;
1802
2923
  }
1803
2924
  }
1804
- function ja() {
1805
- let e2 = Aa(ka()), t2 = typeof window > `u`;
1806
- return { scope: e2 ?? void 0, get: async (n2) => {
1807
- if (t2 || !e2) return null;
2925
+ function fs() {
2926
+ let e5 = ds(us()), t2 = typeof window > `u`;
2927
+ return { scope: e5 ?? void 0, get: async (n2) => {
2928
+ if (t2 || !e5) return null;
1808
2929
  try {
1809
- return await e2.get(n2);
1810
- } catch (e3) {
1811
- return B(e3, { feature: z.warmup, action: `read`, level: `warning`, contexts: { warmup: { key: n2 } } }), null;
2930
+ return await e5.get(n2);
2931
+ } catch (e6) {
2932
+ return H(e6, { feature: V.warmup, action: `read`, level: `warning`, contexts: { warmup: { key: n2 } } }), null;
1812
2933
  }
1813
2934
  }, set: (n2, r2) => {
1814
- if (t2 && e2) try {
1815
- e2.set(n2, r2);
2935
+ if (t2 && e5) try {
2936
+ e5.set(n2, r2);
1816
2937
  } catch {
1817
2938
  }
1818
2939
  } };
1819
2940
  }
1820
- var Ma = `bookings-uou`;
1821
- function Na(e2, t2, n2, r2, i2 = [], a2 = []) {
1822
- let o2 = i2.length ? `:ids-${encodeURIComponent(JSON.stringify([...i2].sort()))}` : ``, s2 = a2.length ? `:cats-${encodeURIComponent(JSON.stringify([...a2].sort()))}` : ``;
1823
- return `${Ma}:services:${e2 ?? `all`}:${t2 ?? `all`}:page-${n2}:limit-${r2}${o2}${s2}`;
2941
+ var ps = U(`@wix/site-service-locale`);
2942
+ var ms = U;
2943
+ var hs = ms(`@wix/viewer-service-multilingual`);
2944
+ function gs() {
2945
+ try {
2946
+ return si.getLanguage() ?? `en`;
2947
+ } catch {
2948
+ return `en`;
2949
+ }
1824
2950
  }
1825
- function Pa(e2, t2) {
1826
- return `${Ma}:services-variants:ids-${encodeURIComponent(JSON.stringify([...e2].sort()))}:refresh-${t2}`;
2951
+ function _s(e5) {
2952
+ try {
2953
+ return p(e5);
2954
+ } catch {
2955
+ return null;
2956
+ }
2957
+ }
2958
+ function vs() {
2959
+ let e5 = _s(ps), t2 = _s(hs);
2960
+ return t2?.multilingualEnabled && t2.currentLocale?.languageCode || e5?.language || gs();
2961
+ }
2962
+ var ys = `bookings-uou`;
2963
+ function bs(e5, t2, n2, r2, i2, a2 = [], o2 = []) {
2964
+ let s2 = a2.length ? `:ids-${encodeURIComponent(JSON.stringify([...a2].sort()))}` : ``, c2 = o2.length ? `:cats-${encodeURIComponent(JSON.stringify([...o2].sort()))}` : ``;
2965
+ return `${ys}:${e5}:services:${t2 ?? `all`}:${n2 ?? `all`}:page-${r2}:limit-${i2}${s2}${c2}`;
1827
2966
  }
1828
- function Fa() {
1829
- return `${Ma}:bookings-settings`;
2967
+ function xs(e5, t2, n2) {
2968
+ return `${ys}:${e5}:services-variants:ids-${encodeURIComponent(JSON.stringify([...t2].sort()))}:refresh-${n2}`;
1830
2969
  }
1831
- var Ia = 5e3;
1832
- var La = 100;
1833
- var Ra = `wix-warmup-data`;
1834
- var za = null;
1835
- function Ba(e2) {
2970
+ function Ss() {
2971
+ return `${ys}:bookings-settings`;
2972
+ }
2973
+ var Cs = 5e3;
2974
+ var ws = 100;
2975
+ var Ts = `wix-warmup-data`;
2976
+ var Es = null;
2977
+ function Ds(e5) {
1836
2978
  if (typeof document < `u`) try {
1837
- let t2 = document.getElementById(Ra)?.textContent;
1838
- return t2 ? (za?.text !== t2 && (za = { text: t2, data: JSON.parse(t2).builderComponentsWarmupData ?? {} }), za.data[e2] ?? void 0) : void 0;
2979
+ let t2 = document.getElementById(Ts)?.textContent;
2980
+ return t2 ? (Es?.text !== t2 && (Es = { text: t2, data: JSON.parse(t2).builderComponentsWarmupData ?? {} }), Es.data[e5] ?? void 0) : void 0;
1839
2981
  } catch {
1840
2982
  return;
1841
2983
  }
1842
2984
  }
1843
- var Va = () => ({ promises: /* @__PURE__ */ new Map(), invalidatedWarmup: /* @__PURE__ */ new Set() });
1844
- var Ha = Va();
1845
- var Ua = /* @__PURE__ */ new WeakMap();
1846
- var Wa = /* @__PURE__ */ new WeakMap();
1847
- function Ga(e2) {
1848
- if (!e2) return Ha;
1849
- let t2 = Ua.get(e2);
1850
- return t2 || (t2 = Va(), Ua.set(e2, t2)), t2;
2985
+ var Os = () => ({ promises: /* @__PURE__ */ new Map(), invalidatedWarmup: /* @__PURE__ */ new Set() });
2986
+ var ks = Os();
2987
+ var As = /* @__PURE__ */ new WeakMap();
2988
+ var js = /* @__PURE__ */ new WeakMap();
2989
+ function Ms(e5) {
2990
+ if (!e5) return ks;
2991
+ let t2 = As.get(e5);
2992
+ return t2 || (t2 = Os(), As.set(e5, t2)), t2;
1851
2993
  }
1852
- function Ka({ key: e2, warmupData: t2, fetchData: n2, refresh: r2 = false }) {
1853
- if (e2 === null) return n2();
2994
+ function Ns({ key: e5, warmupData: t2, fetchData: n2, refresh: r2 = false }) {
2995
+ if (e5 === null) return n2();
1854
2996
  if (typeof window > `u`) {
1855
- let r3 = () => n2().then((n3) => (t2.set(e2, n3), n3)), { scope: i3 } = t2;
2997
+ let r3 = () => n2().then((n3) => (t2.set(e5, n3), n3)), { scope: i3 } = t2;
1856
2998
  if (!i3) return r3();
1857
- let a3 = Wa.get(i3);
1858
- a3 || (a3 = /* @__PURE__ */ new Map(), Wa.set(i3, a3));
1859
- let o3 = a3.get(e2);
2999
+ let a3 = js.get(i3);
3000
+ a3 || (a3 = /* @__PURE__ */ new Map(), js.set(i3, a3));
3001
+ let o3 = a3.get(e5);
1860
3002
  if (o3) return o3;
1861
3003
  let s3 = r3();
1862
- return a3.set(e2, s3), s3.catch(() => a3.delete(e2)), s3;
3004
+ return a3.set(e5, s3), s3.catch(() => a3.delete(e5)), s3;
1863
3005
  }
1864
- let i2 = Ga(t2.scope), a2 = Date.now();
1865
- for (let [e3, t3] of i2.promises) t3.expiresAt <= a2 && i2.promises.delete(e3);
1866
- let o2 = i2.promises.get(e2);
3006
+ let i2 = Ms(t2.scope), a2 = Date.now();
3007
+ for (let [e6, t3] of i2.promises) t3.expiresAt <= a2 && i2.promises.delete(e6);
3008
+ let o2 = i2.promises.get(e5);
1867
3009
  if (o2 && !r2) return o2.promise;
1868
- r2 && i2.invalidatedWarmup.add(e2);
1869
- let s2 = !i2.invalidatedWarmup.has(e2);
3010
+ r2 && i2.invalidatedWarmup.add(e5);
3011
+ let s2 = !i2.invalidatedWarmup.has(e5);
1870
3012
  if (s2) {
1871
- let t3 = Ba(e2);
3013
+ let t3 = Ds(e5);
1872
3014
  if (t3 !== void 0) {
1873
- let n3 = Ln(t3);
1874
- return i2.promises.set(e2, { promise: n3, expiresAt: a2 + Ia }), n3;
3015
+ let n3 = hi(t3);
3016
+ return i2.promises.set(e5, { promise: n3, expiresAt: a2 + Cs }), n3;
1875
3017
  }
1876
3018
  }
1877
3019
  let c2 = (async () => {
1878
3020
  if (s2) {
1879
- let n3 = await t2.get(e2);
3021
+ let n3 = await t2.get(e5);
1880
3022
  if (n3 != null) return n3;
1881
3023
  }
1882
3024
  return n2();
1883
3025
  })();
1884
- i2.promises.size >= La && i2.promises.delete(i2.promises.keys().next().value);
3026
+ i2.promises.size >= ws && i2.promises.delete(i2.promises.keys().next().value);
1885
3027
  let l2 = { promise: c2, expiresAt: 1 / 0 };
1886
- return i2.promises.set(e2, l2), c2.then(() => {
1887
- l2.expiresAt = Date.now() + Ia;
3028
+ return i2.promises.set(e5, l2), c2.then(() => {
3029
+ l2.expiresAt = Date.now() + Cs;
1888
3030
  }, () => {
1889
- i2.promises.get(e2) === l2 && i2.promises.delete(e2);
3031
+ i2.promises.get(e5) === l2 && i2.promises.delete(e5);
1890
3032
  }), c2;
1891
3033
  }
1892
- var qa = 100;
1893
- async function Ja(e2) {
1894
- if (e2.length === 0) return {};
3034
+ var Ps = 100;
3035
+ async function Fs(e5) {
3036
+ if (e5.length === 0) return {};
1895
3037
  let t2 = [];
1896
- for (let n3 = 0; n3 < e2.length; n3 += qa) t2.push(e2.slice(n3, n3 + qa));
1897
- let n2 = await Promise.all(t2.map((e3) => Vi().in(`serviceId`, e3).limit(qa).find())), r2 = {};
1898
- for (let e3 of n2.flatMap((e4) => e4.items ?? [])) e3.serviceId && (r2[e3.serviceId] = e3);
3038
+ for (let n3 = 0; n3 < e5.length; n3 += Ps) t2.push(e5.slice(n3, n3 + Ps));
3039
+ let n2 = await Promise.all(t2.map((e6) => xo().in(`serviceId`, e6).limit(Ps).find())), r2 = {};
3040
+ for (let e6 of n2.flatMap((e7) => e7.items ?? [])) e6.serviceId && (r2[e6.serviceId] = e6);
1899
3041
  return r2;
1900
3042
  }
1901
- var Ya = V(`@wix/site-service-rendering-context`);
1902
- var Xa = () => {
1903
- let { SSR: e2 } = p(Ya);
1904
- return { isSSR: () => e2 };
3043
+ var Is = U(`@wix/site-service-rendering-context`);
3044
+ var Ls = () => {
3045
+ let { SSR: e5 } = p(Is);
3046
+ return { isSSR: () => e5 };
1905
3047
  };
1906
- var Za = V(`@wix/site-service-business-logger`);
1907
- function Qa(e2) {
1908
- return { evid: 1222, src: 16, endpoint: ``, params: e2 };
1909
- }
1910
- function $a(e2) {
1911
- return { evid: 32, src: 16, endpoint: ``, params: e2 };
1912
- }
1913
- var eo = { 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` };
1914
- var to = H.BOOK_ONLINE;
1915
- var no = `new_bookings_server`;
1916
- var ro = `load more`;
1917
- var io = (e2) => {
1918
- let { reportBi: t2 } = p(Za);
3048
+ var Rs = ms(`@wix/site-service-business-logger`);
3049
+ function zs(e5) {
3050
+ return { evid: 1222, src: 16, endpoint: ``, params: e5 };
3051
+ }
3052
+ function Bs(e5) {
3053
+ return { evid: 32, src: 16, endpoint: ``, params: e5 };
3054
+ }
3055
+ var Vs = { 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` };
3056
+ var Hs = W.BOOK_ONLINE;
3057
+ var Us = `new_bookings_server`;
3058
+ var Ws = `load more`;
3059
+ var Gs = (e5) => {
3060
+ let { reportBi: t2 } = p(Rs);
1919
3061
  return i((n2) => {
1920
- t2({ widget_name: e2, bookingsPlatform: no, is_over_editor: false, ...n2.params, src: n2.src, evid: n2.evid }, { endpoint: n2.endpoint });
1921
- }, [t2, e2]);
3062
+ t2({ widget_name: e5, bookingsPlatform: Us, is_over_editor: false, ...n2.params, src: n2.src, evid: n2.evid }, { endpoint: n2.endpoint });
3063
+ }, [t2, e5]);
1922
3064
  };
1923
- function ao(e2) {
1924
- return { evid: 540, src: 16, endpoint: `wixboost-ugc`, params: e2 };
3065
+ function Ks(e5) {
3066
+ return { evid: 540, src: 16, endpoint: `wixboost-ugc`, params: e5 };
1925
3067
  }
1926
- var oo = V(`seo/seo-service`);
1927
- function so() {
1928
- let e2 = f();
3068
+ var qs = U(`seo/seo-service`);
3069
+ function Js() {
3070
+ let e5 = f();
1929
3071
  try {
1930
- return e2(oo);
3072
+ return e5(qs);
1931
3073
  } catch {
1932
3074
  return null;
1933
3075
  }
1934
3076
  }
1935
- function co() {
1936
- let e2 = so();
1937
- return { resolved: !!e2, send: (t2) => {
1938
- if (!e2) return Promise.resolve(`unavailable`);
1939
- let n2 = (e3) => B(e3, { feature: z.seo, action: `send-seo-entity`, level: `warning`, contexts: { seo: { itemType: t2.itemType } } });
3077
+ function Ys() {
3078
+ let e5 = Js();
3079
+ return { resolved: !!e5, send: (t2) => {
3080
+ if (!e5) return Promise.resolve(`unavailable`);
3081
+ let n2 = (e6) => H(e6, { feature: V.seo, action: `send-seo-entity`, level: `warning`, contexts: { seo: { itemType: t2.itemType } } });
1940
3082
  try {
1941
- return e2.setSeoEntity(t2).then(() => `sent`).catch((e3) => (n2(e3), `failed`));
1942
- } catch (e3) {
1943
- return n2(e3), Promise.resolve(`failed`);
3083
+ return e5.setSeoEntity(t2).then(() => `sent`).catch((e6) => (n2(e6), `failed`));
3084
+ } catch (e6) {
3085
+ return n2(e6), Promise.resolve(`failed`);
1944
3086
  }
1945
3087
  } };
1946
3088
  }
1947
- var lo = `SERVICES_COMPONENT`;
1948
- var uo = `PAGINATED_COMPONENT`;
1949
- function fo(e2, t2, n2) {
1950
- return { itemType: lo, itemData: { services: e2.map((e3) => ({ ...e3, urls: { servicePage: { url: t2(e3) ?? `` } } })), pagination: n2 } };
3089
+ var Xs = `SERVICES_COMPONENT`;
3090
+ var Zs = `PAGINATED_COMPONENT`;
3091
+ function Qs(e5, t2, n2) {
3092
+ return { itemType: Xs, itemData: { services: e5.map((e6) => ({ ...e6, urls: { servicePage: { url: t2(e6) ?? `` } } })), pagination: n2 } };
1951
3093
  }
1952
- function po(e2) {
1953
- return { itemType: uo, itemData: { pagination: e2 } };
3094
+ function $s(e5) {
3095
+ return { itemType: Zs, itemData: { pagination: e5 } };
1954
3096
  }
1955
- var mo = /* @__PURE__ */ new WeakSet();
1956
- function ho({ servicesPromise: e2, currentPage: t2, pageQueryParam: n2 }) {
1957
- let { services: r2, totalPages: i2 } = In(e2), { resolveAbsoluteUrl: a2 } = Da(), { send: o2 } = co();
3097
+ var ec = /* @__PURE__ */ new WeakSet();
3098
+ function tc({ servicesPromise: e5, currentPage: t2, pageQueryParam: n2 }) {
3099
+ let { services: r2, totalPages: i2 } = mi(e5), { resolveAbsoluteUrl: a2 } = cs(), { send: o2 } = Ys();
1958
3100
  return u(() => {
1959
- if (mo.has(e2)) return true;
1960
- mo.add(e2);
3101
+ if (ec.has(e5)) return true;
3102
+ ec.add(e5);
1961
3103
  let s2 = { currentPage: t2, totalPages: i2, queryParam: n2 };
1962
- return o2(fo(r2, (e3) => a2(`servicePage`, { slug: e3.mainSlug?.name ?? null, serviceId: e3._id ?? null }), s2)), i2 > 1 && o2(po(s2)), true;
3104
+ return o2(Qs(r2, (e6) => a2(`servicePage`, { slug: e6.mainSlug?.name ?? null, serviceId: e6._id ?? null }), s2)), i2 > 1 && o2($s(s2)), true;
1963
3105
  }), null;
1964
3106
  }
1965
- function go(e2) {
1966
- return F(Object.assign(e2, { domainToMappings: { "api._api_base_domain_": [{ srcPath: `/events-3`, destPath: `` }], "manage._base_domain_": [{ srcPath: `/_api/calendar/v3/events`, destPath: `/v3/events` }, { srcPath: `/_api/calendar/v3/bulk/events`, destPath: `/v3/bulk/events` }, { srcPath: `/_api/calendar/v3/ro/events`, destPath: `/v3/events` }], "www.wixapis.com": [{ srcPath: `/calendar/v3/events`, destPath: `/v3/events` }, { srcPath: `/calendar/v3/bulk/events`, destPath: `/v3/bulk/events` }], _: [{ srcPath: `/_api/calendar/v3/events`, destPath: `/v3/events` }, { srcPath: `/_api/calendar/v3/bulk/events`, destPath: `/v3/bulk/events` }], "*.dev.wix-code.com": [{ srcPath: `/_api/calendar/v3/events`, destPath: `/v3/events` }, { srcPath: `/_api/calendar/v3/bulk/events`, destPath: `/v3/bulk/events` }], "editor._base_domain_": [{ srcPath: `/_api/calendar/v3/events`, destPath: `/v3/events` }, { srcPath: `/_api/calendar/v3/bulk/events`, destPath: `/v3/bulk/events` }], "blocks._base_domain_": [{ srcPath: `/_api/calendar/v3/events`, destPath: `/v3/events` }, { srcPath: `/_api/calendar/v3/bulk/events`, destPath: `/v3/bulk/events` }], "create.editorx": [{ srcPath: `/_api/calendar/v3/events`, destPath: `/v3/events` }, { srcPath: `/_api/calendar/v3/bulk/events`, destPath: `/v3/bulk/events` }] } }));
3107
+ function nc(e5) {
3108
+ return It(Object.assign(e5, { domainToMappings: { "api._api_base_domain_": [{ srcPath: `/events-3`, destPath: `` }], "manage._base_domain_": [{ srcPath: `/_api/calendar/v3/events`, destPath: `/v3/events` }, { srcPath: `/_api/calendar/v3/bulk/events`, destPath: `/v3/bulk/events` }, { srcPath: `/_api/calendar/v3/ro/events`, destPath: `/v3/events` }], "www.wixapis.com": [{ srcPath: `/calendar/v3/events`, destPath: `/v3/events` }, { srcPath: `/calendar/v3/bulk/events`, destPath: `/v3/bulk/events` }], _: [{ srcPath: `/_api/calendar/v3/events`, destPath: `/v3/events` }, { srcPath: `/_api/calendar/v3/bulk/events`, destPath: `/v3/bulk/events` }], "*.dev.wix-code.com": [{ srcPath: `/_api/calendar/v3/events`, destPath: `/v3/events` }, { srcPath: `/_api/calendar/v3/bulk/events`, destPath: `/v3/bulk/events` }], "editor._base_domain_": [{ srcPath: `/_api/calendar/v3/events`, destPath: `/v3/events` }, { srcPath: `/_api/calendar/v3/bulk/events`, destPath: `/v3/bulk/events` }], "blocks._base_domain_": [{ srcPath: `/_api/calendar/v3/events`, destPath: `/v3/events` }, { srcPath: `/_api/calendar/v3/bulk/events`, destPath: `/v3/bulk/events` }], "create.editorx": [{ srcPath: `/_api/calendar/v3/events`, destPath: `/v3/events` }, { srcPath: `/_api/calendar/v3/bulk/events`, destPath: `/v3/bulk/events` }] } }));
1967
3109
  }
1968
- var _o = `@wix/auto_sdk_calendar_events`;
1969
- function vo(e2) {
3110
+ var rc = `@wix/auto_sdk_calendar_events`;
3111
+ function ic(e5) {
1970
3112
  function t2({ host: t3 }) {
1971
- return { entityFqdn: `wix.calendar.v3.event`, method: `POST`, methodFqn: `wix.calendar.events.v3.EventsService.QueryEvents`, packageName: _o, migrationOptions: { optInTransformResponse: true }, url: go({ protoPath: `/v3/events/query`, data: e2, host: t3 }), data: e2, transformResponse: (e3) => N(e3, [{ transformFn: M, paths: [{ path: `events.createdDate` }, { path: `events.updatedDate` }, { path: `events.start.utcDate` }, { path: `events.end.utcDate` }, { path: `events.adjustedStart.utcDate` }, { path: `events.adjustedEnd.utcDate` }, { path: `events.recurrenceRule.until.utcDate` }, { path: `events.recurrenceRule.adjustedUntil.utcDate` }] }]) };
3113
+ return { entityFqdn: `wix.calendar.v3.event`, method: `POST`, methodFqn: `wix.calendar.events.v3.EventsService.QueryEvents`, packageName: rc, migrationOptions: { optInTransformResponse: true }, url: nc({ protoPath: `/v3/events/query`, data: e5, host: t3 }), data: e5, transformResponse: (e6) => N(e6, [{ transformFn: M, paths: [{ path: `events.createdDate` }, { path: `events.updatedDate` }, { path: `events.start.utcDate` }, { path: `events.end.utcDate` }, { path: `events.adjustedStart.utcDate` }, { path: `events.adjustedEnd.utcDate` }, { path: `events.recurrenceRule.until.utcDate` }, { path: `events.recurrenceRule.adjustedUntil.utcDate` }] }]) };
1972
3114
  }
1973
3115
  return t2;
1974
3116
  }
1975
- function yo(e2) {
3117
+ function ac(e5) {
1976
3118
  let { httpClient: t2, sideEffects: n2 } = arguments[1];
1977
- return hi({ func: async (r2) => {
1978
- let i2 = vo({ ...r2, ...e2 ?? {} });
3119
+ return Ja({ func: async (r2) => {
3120
+ let i2 = ic({ ...r2, ...e5 ?? {} });
1979
3121
  n2?.onSiteCall?.();
1980
3122
  try {
1981
- let e3 = await t2.request(i2);
1982
- return n2?.onSuccess?.(e3), e3;
1983
- } catch (e3) {
1984
- throw n2?.onError?.(e3), e3;
3123
+ let e6 = await t2.request(i2);
3124
+ return n2?.onSuccess?.(e6), e6;
3125
+ } catch (e6) {
3126
+ throw n2?.onError?.(e6), e6;
1985
3127
  }
1986
3128
  }, requestTransformer: (t3) => {
1987
- let n3 = [t3, e2];
3129
+ let n3 = [t3, e5];
1988
3130
  return A({ ...n3?.[1], query: n3?.[0] });
1989
- }, responseTransformer: ({ data: e3 }) => {
1990
- let t3 = j(N(e3, []));
3131
+ }, responseTransformer: ({ data: e6 }) => {
3132
+ let t3 = j(N(e6, []));
1991
3133
  return { items: t3?.events, pagingMetadata: t3?.pagingMetadata };
1992
- }, errorTransformer: (e3) => {
1993
- throw P(e3, { spreadPathsToArguments: {}, explicitPathsToArguments: { query: `$[0]` }, singleArgumentUnchanged: false });
3134
+ }, errorTransformer: (e6) => {
3135
+ throw P(e6, { spreadPathsToArguments: {}, explicitPathsToArguments: { query: `$[0]` }, singleArgumentUnchanged: false });
1994
3136
  }, pagingMethod: `CURSOR`, transformationPaths: {} });
1995
3137
  }
1996
- async function bo(e2, t2) {
1997
- let { httpClient: n2, sideEffects: r2 } = arguments[2], i2 = vo(A({ query: e2, ...t2 }));
3138
+ async function oc(e5, t2) {
3139
+ let { httpClient: n2, sideEffects: r2 } = arguments[2], i2 = ic(A({ query: e5, ...t2 }));
1998
3140
  r2?.onSiteCall?.();
1999
3141
  try {
2000
- let e3 = await n2.request(i2);
2001
- return r2?.onSuccess?.(e3), j(e3.data);
2002
- } catch (e3) {
2003
- let t3 = P(e3, { spreadPathsToArguments: {}, explicitPathsToArguments: { query: `$[0]` }, singleArgumentUnchanged: false }, [`query`, `options`]);
2004
- throw r2?.onError?.(e3), t3;
2005
- }
2006
- }
2007
- ({ ...bi() });
2008
- function xo(e2) {
2009
- return (t2) => yo(t2, { httpClient: e2 });
2010
- }
2011
- function So(e2) {
2012
- return (t2, n2) => bo(t2, n2, { httpClient: e2 });
2013
- }
2014
- var Co = g(`wix.calendar.v3.event_cancelled`, true, (e2) => j(N(e2, [{ transformFn: M, paths: [{ path: `data.event.createdDate` }, { path: `data.event.updatedDate` }, { path: `data.event.start.utcDate` }, { path: `data.event.end.utcDate` }, { path: `data.event.adjustedStart.utcDate` }, { path: `data.event.adjustedEnd.utcDate` }, { path: `data.event.recurrenceRule.until.utcDate` }, { path: `data.event.recurrenceRule.adjustedUntil.utcDate` }, { path: `metadata.eventTime` }] }])))();
2015
- var wo = g(`wix.calendar.v3.event_created`, true, (e2) => j(N(e2, [{ transformFn: M, paths: [{ path: `entity.createdDate` }, { path: `entity.updatedDate` }, { path: `entity.start.utcDate` }, { path: `entity.end.utcDate` }, { path: `entity.adjustedStart.utcDate` }, { path: `entity.adjustedEnd.utcDate` }, { path: `entity.recurrenceRule.until.utcDate` }, { path: `entity.recurrenceRule.adjustedUntil.utcDate` }, { path: `metadata.eventTime` }] }])))();
2016
- var To = g(`wix.calendar.v3.event_recurring_split`, true, (e2) => j(N(e2, [{ transformFn: M, paths: [{ path: `data.updatedRecurringEventEndingBeforeSplit.createdDate` }, { path: `data.updatedRecurringEventEndingBeforeSplit.updatedDate` }, { path: `data.updatedRecurringEventEndingBeforeSplit.start.utcDate` }, { path: `data.updatedRecurringEventEndingBeforeSplit.end.utcDate` }, { path: `data.updatedRecurringEventEndingBeforeSplit.adjustedStart.utcDate` }, { path: `data.updatedRecurringEventEndingBeforeSplit.adjustedEnd.utcDate` }, { path: `data.updatedRecurringEventEndingBeforeSplit.recurrenceRule.until.utcDate` }, { path: `data.updatedRecurringEventEndingBeforeSplit.recurrenceRule.adjustedUntil.utcDate` }, { path: `data.newRecurringEventStartingFromSplit.createdDate` }, { path: `data.newRecurringEventStartingFromSplit.updatedDate` }, { path: `data.newRecurringEventStartingFromSplit.start.utcDate` }, { path: `data.newRecurringEventStartingFromSplit.end.utcDate` }, { path: `data.newRecurringEventStartingFromSplit.adjustedStart.utcDate` }, { path: `data.newRecurringEventStartingFromSplit.adjustedEnd.utcDate` }, { path: `data.newRecurringEventStartingFromSplit.recurrenceRule.until.utcDate` }, { path: `data.newRecurringEventStartingFromSplit.recurrenceRule.adjustedUntil.utcDate` }, { path: `metadata.eventTime` }] }])))();
2017
- var Eo = g(`wix.calendar.v3.event_updated`, true, (e2) => j(N(e2, [{ transformFn: M, paths: [{ path: `entity.createdDate` }, { path: `entity.updatedDate` }, { path: `entity.start.utcDate` }, { path: `entity.end.utcDate` }, { path: `entity.adjustedStart.utcDate` }, { path: `entity.adjustedEnd.utcDate` }, { path: `entity.recurrenceRule.until.utcDate` }, { path: `entity.recurrenceRule.adjustedUntil.utcDate` }, { path: `metadata.eventTime` }, { path: `modifiedFields.createdDate` }, { path: `modifiedFields.updatedDate` }, { path: `modifiedFields.start.utcDate` }, { path: `modifiedFields.end.utcDate` }, { path: `modifiedFields.adjustedStart.utcDate` }, { path: `modifiedFields.adjustedEnd.utcDate` }, { path: `modifiedFields.recurrenceRule.until.utcDate` }, { path: `modifiedFields.recurrenceRule.adjustedUntil.utcDate` }] }])))();
2018
- function Do(e2) {
2019
- let t2 = Ai({ builderQueryFunction: (t3) => xo(e2)(t3), typedQueryFunction: (t3, n3) => So(e2)(t3, n3), hasOptionsParameter: true });
2020
- function n2(e3, n3) {
3142
+ let e6 = await n2.request(i2);
3143
+ return r2?.onSuccess?.(e6), j(e6.data);
3144
+ } catch (e6) {
3145
+ let t3 = P(e6, { spreadPathsToArguments: {}, explicitPathsToArguments: { query: `$[0]` }, singleArgumentUnchanged: false }, [`query`, `options`]);
3146
+ throw r2?.onError?.(e6), t3;
3147
+ }
3148
+ }
3149
+ ({ ...$a() });
3150
+ function sc(e5) {
3151
+ return (t2) => ac(t2, { httpClient: e5 });
3152
+ }
3153
+ function cc(e5) {
3154
+ return (t2, n2) => oc(t2, n2, { httpClient: e5 });
3155
+ }
3156
+ var lc = _(`wix.calendar.v3.event_cancelled`, true, (e5) => j(N(e5, [{ transformFn: M, paths: [{ path: `data.event.createdDate` }, { path: `data.event.updatedDate` }, { path: `data.event.start.utcDate` }, { path: `data.event.end.utcDate` }, { path: `data.event.adjustedStart.utcDate` }, { path: `data.event.adjustedEnd.utcDate` }, { path: `data.event.recurrenceRule.until.utcDate` }, { path: `data.event.recurrenceRule.adjustedUntil.utcDate` }, { path: `metadata.eventTime` }] }])))();
3157
+ var uc = _(`wix.calendar.v3.event_created`, true, (e5) => j(N(e5, [{ transformFn: M, paths: [{ path: `entity.createdDate` }, { path: `entity.updatedDate` }, { path: `entity.start.utcDate` }, { path: `entity.end.utcDate` }, { path: `entity.adjustedStart.utcDate` }, { path: `entity.adjustedEnd.utcDate` }, { path: `entity.recurrenceRule.until.utcDate` }, { path: `entity.recurrenceRule.adjustedUntil.utcDate` }, { path: `metadata.eventTime` }] }])))();
3158
+ var dc = _(`wix.calendar.v3.event_recurring_split`, true, (e5) => j(N(e5, [{ transformFn: M, paths: [{ path: `data.updatedRecurringEventEndingBeforeSplit.createdDate` }, { path: `data.updatedRecurringEventEndingBeforeSplit.updatedDate` }, { path: `data.updatedRecurringEventEndingBeforeSplit.start.utcDate` }, { path: `data.updatedRecurringEventEndingBeforeSplit.end.utcDate` }, { path: `data.updatedRecurringEventEndingBeforeSplit.adjustedStart.utcDate` }, { path: `data.updatedRecurringEventEndingBeforeSplit.adjustedEnd.utcDate` }, { path: `data.updatedRecurringEventEndingBeforeSplit.recurrenceRule.until.utcDate` }, { path: `data.updatedRecurringEventEndingBeforeSplit.recurrenceRule.adjustedUntil.utcDate` }, { path: `data.newRecurringEventStartingFromSplit.createdDate` }, { path: `data.newRecurringEventStartingFromSplit.updatedDate` }, { path: `data.newRecurringEventStartingFromSplit.start.utcDate` }, { path: `data.newRecurringEventStartingFromSplit.end.utcDate` }, { path: `data.newRecurringEventStartingFromSplit.adjustedStart.utcDate` }, { path: `data.newRecurringEventStartingFromSplit.adjustedEnd.utcDate` }, { path: `data.newRecurringEventStartingFromSplit.recurrenceRule.until.utcDate` }, { path: `data.newRecurringEventStartingFromSplit.recurrenceRule.adjustedUntil.utcDate` }, { path: `metadata.eventTime` }] }])))();
3159
+ var fc = _(`wix.calendar.v3.event_updated`, true, (e5) => j(N(e5, [{ transformFn: M, paths: [{ path: `entity.createdDate` }, { path: `entity.updatedDate` }, { path: `entity.start.utcDate` }, { path: `entity.end.utcDate` }, { path: `entity.adjustedStart.utcDate` }, { path: `entity.adjustedEnd.utcDate` }, { path: `entity.recurrenceRule.until.utcDate` }, { path: `entity.recurrenceRule.adjustedUntil.utcDate` }, { path: `metadata.eventTime` }, { path: `modifiedFields.createdDate` }, { path: `modifiedFields.updatedDate` }, { path: `modifiedFields.start.utcDate` }, { path: `modifiedFields.end.utcDate` }, { path: `modifiedFields.adjustedStart.utcDate` }, { path: `modifiedFields.adjustedEnd.utcDate` }, { path: `modifiedFields.recurrenceRule.until.utcDate` }, { path: `modifiedFields.recurrenceRule.adjustedUntil.utcDate` }] }])))();
3160
+ function pc(e5) {
3161
+ let t2 = lo({ builderQueryFunction: (t3) => sc(e5)(t3), typedQueryFunction: (t3, n3) => cc(e5)(t3, n3), hasOptionsParameter: true });
3162
+ function n2(e6, n3) {
2021
3163
  return t2(...arguments);
2022
3164
  }
2023
3165
  return n2;
2024
3166
  }
2025
- var Oo = Pt(Do);
2026
- I(Co), I(wo), I(To), I(Eo);
2027
- var ko = (e2) => {
2028
- let t2 = (e3) => e3 < 10 ? `0${e3}` : `${e3}`;
2029
- return `${e2.getFullYear()}-${t2(e2.getMonth() + 1)}-${t2(e2.getDate())}`;
3167
+ var mc = Pt(pc);
3168
+ ln(lc), ln(uc), ln(dc), ln(fc);
3169
+ var hc = (e5) => {
3170
+ let t2 = (e6) => e6 < 10 ? `0${e6}` : `${e6}`;
3171
+ return `${e5.getFullYear()}-${t2(e5.getMonth() + 1)}-${t2(e5.getDate())}`;
2030
3172
  };
2031
- var Ao = (e2) => `${ko(e2)}T00:00:00`;
2032
- var jo = 1e3;
2033
- async function Mo(e2, t2) {
3173
+ var gc = (e5) => `${hc(e5)}T00:00:00`;
3174
+ var _c = 1e3;
3175
+ async function vc(e5, t2) {
2034
3176
  let n2 = [], r2;
2035
3177
  do {
2036
- let i2 = await Oo({ filter: e2, cursorPaging: { limit: jo, ...r2 ? { cursor: r2 } : {} } }, t2);
3178
+ let i2 = await mc({ filter: e5, cursorPaging: { limit: _c, ...r2 ? { cursor: r2 } : {} } }, t2);
2037
3179
  n2.push(...i2.events ?? []), r2 = i2.pagingMetadata?.hasNext ? i2.pagingMetadata.cursors?.next ?? void 0 : void 0;
2038
3180
  } while (r2);
2039
3181
  return n2;
2040
3182
  }
2041
- async function No(e2, t2) {
2042
- return e2.length === 0 ? [] : Mo({ appId: tr, scheduleId: { $in: e2 } }, { recurrenceType: [`MASTER`, `NONE`], fromLocalDate: Ao(/* @__PURE__ */ new Date()), ...t2 ? { timeZone: t2 } : {} });
3183
+ async function yc(e5, t2) {
3184
+ return e5.length === 0 ? [] : vc({ appId: Ni, scheduleId: { $in: e5 } }, { recurrenceType: [`MASTER`, `NONE`], fromLocalDate: gc(/* @__PURE__ */ new Date()), ...t2 ? { timeZone: t2 } : {} });
2043
3185
  }
2044
- function Po(e2) {
3186
+ function bc(e5) {
2045
3187
  let t2 = {};
2046
- for (let n2 of e2) n2.scheduleId && (t2[n2.scheduleId] ??= []).push(n2);
3188
+ for (let n2 of e5) n2.scheduleId && (t2[n2.scheduleId] ??= []).push(n2);
2047
3189
  return t2;
2048
3190
  }
2049
- var Fo = { displayTimeZonePolicy: { basedOn: da.BUSINESS_TIME_ZONE, customerCanChange: false }, multiServiceAppointmentsEnabled: false };
2050
- async function Io() {
3191
+ var xc = { displayTimeZonePolicy: { basedOn: Go.BUSINESS_TIME_ZONE, customerCanChange: false }, multiServiceAppointmentsEnabled: false };
3192
+ async function Sc() {
2051
3193
  try {
2052
- let e2 = await ma();
2053
- return { displayTimeZonePolicy: { basedOn: e2.displayTimeZone?.basedOn ?? da.BUSINESS_TIME_ZONE, customerCanChange: e2.displayTimeZone?.customerCanChange ?? false }, multiServiceAppointmentsEnabled: e2.multiServiceAppointments?.enabled ?? false };
2054
- } catch (e2) {
2055
- return B(e2, { feature: z.bookingsSettings, action: `fetch-bookings-settings`, level: `warning` }), Fo;
3194
+ let e5 = await Jo();
3195
+ return { displayTimeZonePolicy: { basedOn: e5.displayTimeZone?.basedOn ?? Go.BUSINESS_TIME_ZONE, customerCanChange: e5.displayTimeZone?.customerCanChange ?? false }, multiServiceAppointmentsEnabled: e5.multiServiceAppointments?.enabled ?? false };
3196
+ } catch (e5) {
3197
+ return H(e5, { feature: V.bookingsSettings, action: `fetch-bookings-settings`, level: `warning` }), xc;
2056
3198
  }
2057
3199
  }
2058
3200
  n(null);
2059
- function Lo(e2) {
2060
- return e2.basedOn === da.CUSTOMER_TIME_ZONE ? Intl.DateTimeFormat().resolvedOptions().timeZone : void 0;
3201
+ function Cc(e5) {
3202
+ return e5.basedOn === Go.CUSTOMER_TIME_ZONE ? Intl.DateTimeFormat().resolvedOptions().timeZone : void 0;
2061
3203
  }
2062
- function Ro({ categoryId: e2, locationId: t2, serviceItems: n2, isLoading: r2, hasError: i2, children: a2 }) {
2063
- let o2 = { serviceItems: n2, bookingsSettings: null, hasMore: false, isLoading: r2, hasError: i2, categoryId: e2, locationId: t2, loadMore: async () => {
3204
+ function wc({ categoryId: e5, locationId: t2, serviceItems: n2, isLoading: r2, hasError: i2, children: a2 }) {
3205
+ let o2 = { serviceItems: n2, bookingsSettings: null, hasMore: false, isLoading: r2, hasError: i2, categoryId: e5, locationId: t2, loadMore: async () => {
2064
3206
  } };
2065
- return m(Qo.Provider, { value: o2, children: a2 });
2066
- }
2067
- function zo({ categoryId: e2, locationId: t2, children: n2 }) {
2068
- return m(Ro, { categoryId: e2, locationId: t2, serviceItems: [], isLoading: true, hasError: false, children: n2 });
2069
- }
2070
- function Bo({ categoryId: e2, locationId: t2, children: n2 }) {
2071
- return m(Ro, { categoryId: e2, locationId: t2, serviceItems: [], isLoading: false, hasError: true, children: n2 });
2072
- }
2073
- function Vo(e2) {
2074
- let t2 = e2?.$in ?? (e2?.$eq == null ? [] : [e2.$eq]);
2075
- return [...new Set(t2.filter((e3) => typeof e3 == `string` && e3 !== ``))].sort().join(`,`);
2076
- }
2077
- function $(e2) {
2078
- return e2 ? e2.split(`,`) : null;
2079
- }
2080
- var Ho = 20;
2081
- var Uo = 100;
2082
- var Wo = [];
2083
- var Go = [];
2084
- var Ko = {};
2085
- var qo = {};
2086
- function Jo(e2, t2) {
2087
- return Object.keys(t2).length === 0 ? e2 : { ...e2, ...t2 };
2088
- }
2089
- function Yo(e2, t2, n2, r2) {
2090
- let i2 = [...new Set(e2.filter((e3) => !ha(e3.type)).map((e3) => e3.schedule?._id).filter((e3) => !!e3))], a2 = e2.filter(ga).map((e3) => e3._id).filter((e3) => !!e3);
2091
- return Promise.all([i2.length === 0 ? Ko : No(i2, t2).then(Po).catch(() => Ko), a2.length === 0 ? qo : Ka({ key: Pa(a2, n2), warmupData: r2, fetchData: () => Ja(a2) }).catch((e3) => (B(e3, { feature: z.services, action: `fetch-service-variants`, level: `warning` }), null))]);
2092
- }
2093
- var Xo = { services: [], hasMore: false, totalPages: 1, hasError: true };
2094
- function Zo(e2) {
2095
- let t2 = Math.floor(Number(e2));
2096
- return !e2 || !Number.isSafeInteger(t2) || t2 < 1 ? 1 : t2;
2097
- }
2098
- var Qo = n(null);
2099
- var $o = `useServicesContext must be used within ServicesContextProvider`;
2100
- function es() {
2101
- let e2 = a(Qo);
2102
- if (!e2) throw Error($o);
2103
- return e2;
2104
- }
2105
- function ts(e2, t2) {
2106
- return { firstPage: e2, services: e2.services, hasMore: e2.hasMore, isLoadingMore: false, cursor: { offset: (t2.paginationIndex - 1) * t2.safeLimit + e2.services.length, hasMore: e2.hasMore, pending: null, dropped: false } };
2107
- }
2108
- function ns({ query: e2, isQueryPending: t2, settingsPromise: n2, categoryId: a2, locationId: o2, children: d2 }) {
2109
- let { firstPagePromise: f2, safeLimit: p2, serviceIdsKey: ee2, categoryIdsKey: h2, refreshSignal: g2 } = e2, _2 = In(f2), v2 = In(n2), [y2, b2] = u(() => ts(_2, e2)), [te2, x2] = u({}), [S2, C2] = u({});
2110
- y2.firstPage !== _2 && (b2(ts(_2, e2)), x2({}), C2({}));
2111
- let { cursor: w2 } = y2;
2112
- s(() => (w2.dropped = false, () => {
2113
- w2.dropped = true;
2114
- }), [w2]);
2115
- let T2 = Lo(v2.displayTimeZonePolicy), E2 = io(eo.SERVICES), { getParsedUrl: ne2 } = Xn(), re2 = l(null), ie2 = ja(), D2 = l(ie2);
2116
- D2.current = ie2, s(() => {
2117
- re2.current !== _2 && (re2.current = _2, E2($a({ referralInfo: ne2().searchParams.get(Q.referral) ?? void 0 })), E2(ao({ numOfServices: _2.services.length })));
2118
- }, [E2, ne2, _2]), s(() => {
2119
- let e3 = false;
2120
- return Yo(_2.services, T2, g2, D2.current).then(([t3, n3]) => {
2121
- e3 || r(() => {
2122
- x2((e4) => Jo(e4, t3)), n3 && C2((e4) => Jo(e4, n3));
3207
+ return m(Rc.Provider, { value: o2, children: a2 });
3208
+ }
3209
+ function Tc({ categoryId: e5, locationId: t2, children: n2 }) {
3210
+ return m(wc, { categoryId: e5, locationId: t2, serviceItems: [], isLoading: true, hasError: false, children: n2 });
3211
+ }
3212
+ function Ec({ categoryId: e5, locationId: t2, children: n2 }) {
3213
+ return m(wc, { categoryId: e5, locationId: t2, serviceItems: [], isLoading: false, hasError: true, children: n2 });
3214
+ }
3215
+ function Dc(e5) {
3216
+ let t2 = e5?.$in ?? (e5?.$eq == null ? [] : [e5.$eq]);
3217
+ return [...new Set(t2.filter((e6) => typeof e6 == `string` && e6 !== ``))].sort().join(`,`);
3218
+ }
3219
+ function $(e5) {
3220
+ return e5 ? e5.split(`,`) : null;
3221
+ }
3222
+ var Oc = 20;
3223
+ var kc = 100;
3224
+ var Ac = [];
3225
+ var jc = [];
3226
+ var Mc = {};
3227
+ var Nc = {};
3228
+ function Pc(e5, t2) {
3229
+ return Object.keys(t2).length === 0 ? e5 : { ...e5, ...t2 };
3230
+ }
3231
+ function Fc(e5, t2, n2, r2, i2) {
3232
+ let a2 = [...new Set(e5.filter((e6) => !Yo(e6.type)).map((e6) => e6.schedule?._id).filter((e6) => !!e6))], o2 = e5.filter(Xo).map((e6) => e6._id).filter((e6) => !!e6);
3233
+ return Promise.all([a2.length === 0 ? Mc : yc(a2, t2).then(bc).catch(() => Mc), o2.length === 0 ? Nc : Ns({ key: xs(r2, o2, n2), warmupData: i2, fetchData: () => Fs(o2) }).catch((e6) => (H(e6, { feature: V.services, action: `fetch-service-variants`, level: `warning` }), null))]);
3234
+ }
3235
+ var Ic = { services: [], hasMore: false, totalPages: 1, hasError: true };
3236
+ function Lc(e5) {
3237
+ let t2 = Math.floor(Number(e5));
3238
+ return !e5 || !Number.isSafeInteger(t2) || t2 < 1 ? 1 : t2;
3239
+ }
3240
+ var Rc = n(null);
3241
+ var zc = `useServicesContext must be used within ServicesContextProvider`;
3242
+ function Bc() {
3243
+ let e5 = a(Rc);
3244
+ if (!e5) throw Error(zc);
3245
+ return e5;
3246
+ }
3247
+ function Vc(e5, t2) {
3248
+ return { firstPage: e5, services: e5.services, hasMore: e5.hasMore, isLoadingMore: false, cursor: { offset: (t2.paginationIndex - 1) * t2.safeLimit + e5.services.length, hasMore: e5.hasMore, pending: null, dropped: false } };
3249
+ }
3250
+ function Hc({ query: e5, isQueryPending: t2, settingsPromise: n2, categoryId: a2, locationId: o2, children: d2 }) {
3251
+ let { firstPagePromise: f2, safeLimit: p2, serviceIdsKey: h2, categoryIdsKey: g2, refreshSignal: _2, language: v2 } = e5, y2 = mi(f2), b2 = mi(n2), [x2, S2] = u(() => Vc(y2, e5)), [ee2, C2] = u({}), [w2, T2] = u({});
3252
+ x2.firstPage !== y2 && (S2(Vc(y2, e5)), C2({}), T2({}));
3253
+ let { cursor: E2 } = x2;
3254
+ s(() => (E2.dropped = false, () => {
3255
+ E2.dropped = true;
3256
+ }), [E2]);
3257
+ let D2 = Cc(b2.displayTimeZonePolicy), O2 = Gs(Vs.SERVICES), { getParsedUrl: te2 } = Oi(), ne2 = l(null), re2 = fs(), ie2 = l(re2);
3258
+ ie2.current = re2, s(() => {
3259
+ ne2.current !== y2 && (ne2.current = y2, O2(Bs({ referralInfo: te2().searchParams.get(es.referral) ?? void 0 })), O2(Ks({ numOfServices: y2.services.length })));
3260
+ }, [O2, te2, y2]), s(() => {
3261
+ let e6 = false;
3262
+ return Fc(y2.services, D2, _2, v2, ie2.current).then(([t3, n3]) => {
3263
+ e6 || r(() => {
3264
+ C2((e7) => Pc(e7, t3)), n3 && T2((e7) => Pc(e7, n3));
2123
3265
  });
2124
3266
  }), () => {
2125
- e3 = true;
3267
+ e6 = true;
2126
3268
  };
2127
- }, [_2.services, T2, g2]);
3269
+ }, [y2.services, D2, _2, v2]);
2128
3270
  let ae2 = i(async () => {
2129
- if (E2(Qa({ pageName: to, buttonName: ro })), w2.pending) return w2.pending;
2130
- if (!w2.hasMore) return;
2131
- let t3 = (e3) => b2((t4) => t4.cursor === w2 ? e3(t4) : t4);
2132
- return t3((e3) => ({ ...e3, isLoadingMore: true })), w2.pending = ya({ limit: p2, offset: w2.offset, categoryId: e2.categoryId, locationId: e2.locationId, serviceIds: $(ee2), categoryIds: $(h2) }).then((e3) => {
2133
- w2.dropped || (w2.hasMore = e3.hasMore, w2.offset += e3.services.length, t3((t4) => ({ ...t4, services: [...t4.services, ...e3.services], hasMore: e3.hasMore })), Yo(e3.services, T2, g2, D2.current).then(([e4, t4]) => {
2134
- w2.dropped || r(() => {
2135
- x2((t5) => Jo(t5, e4)), t4 && C2((e5) => Jo(e5, t4));
3271
+ if (O2(zs({ pageName: Hs, buttonName: Ws })), E2.pending) return E2.pending;
3272
+ if (!E2.hasMore) return;
3273
+ let t3 = (e6) => S2((t4) => t4.cursor === E2 ? e6(t4) : t4);
3274
+ return t3((e6) => ({ ...e6, isLoadingMore: true })), E2.pending = $o({ limit: p2, offset: E2.offset, categoryId: e5.categoryId, locationId: e5.locationId, serviceIds: $(h2), categoryIds: $(g2) }).then((e6) => {
3275
+ E2.dropped || (E2.hasMore = e6.hasMore, E2.offset += e6.services.length, t3((t4) => ({ ...t4, services: [...t4.services, ...e6.services], hasMore: e6.hasMore })), Fc(e6.services, D2, _2, v2, ie2.current).then(([e7, t4]) => {
3276
+ E2.dropped || r(() => {
3277
+ C2((t5) => Pc(t5, e7)), t4 && T2((e8) => Pc(e8, t4));
2136
3278
  });
2137
3279
  }));
2138
3280
  }).catch(() => {
2139
3281
  }).finally(() => {
2140
- w2.pending = null, t3((e3) => ({ ...e3, isLoadingMore: false }));
2141
- }), w2.pending;
2142
- }, [w2, p2, e2.categoryId, e2.locationId, ee2, h2, E2, T2, g2]), { resolvePath: O2, toHref: oe2 } = Da(), se2 = c(() => y2.services.map((e3) => {
2143
- let t3 = O2(`servicePage`, { slug: e3.mainSlug?.name ?? null, serviceId: e3._id ?? null });
2144
- return { serviceId: e3._id ?? null, refreshSignal: g2, service: e3, masterEvents: te2[e3.schedule?._id ?? ``] ?? Wo, serviceOptionsAndVariants: S2[e3._id ?? ``] ?? null, bookingsSettings: v2, servicePageLink: t3 ? { href: oe2(t3), target: `_self` } : null };
2145
- }), [O2, oe2, y2.services, g2, te2, S2, v2]), ce2 = c(() => ({ serviceItems: t2 ? Go : se2, bookingsSettings: v2, hasMore: !t2 && y2.hasMore, isLoading: t2 || y2.isLoadingMore, hasError: !t2 && _2.hasError, categoryId: a2, locationId: o2, loadMore: ae2 }), [t2, se2, v2, y2.hasMore, y2.isLoadingMore, _2.hasError, a2, o2, ae2]);
2146
- return m(Qo.Provider, { value: ce2, children: d2 });
2147
- }
2148
- var rs = (e2) => ({ ...e2, hasError: false });
2149
- var is = () => ({ ...Xo });
2150
- function as({ categoryData: e2, limit: n2 = Ho, servicesPicker: r2, categoriesPicker: i2, refreshSignal: a2 = 0, children: s2 }) {
2151
- let l2 = Math.min(n2 ?? Ho, Uo), { searchParams: d2 } = Xn(), f2 = e2?.categoryId, p2 = !!f2, h2 = f2 || d2.get(Q.category), g2 = d2.get(Q.location), _2 = p2 ? 1 : Zo(d2.get(Q.page)), v2 = Vo(r2?.serviceId), y2 = Vo(i2?.categoryId), b2 = ja(), { isSSR: te2 } = Xa(), [x2] = u(() => te2()), S2 = c(() => ({ firstPagePromise: zn(Ka({ key: Na(h2, g2, _2, l2, $(v2) ?? [], $(y2) ?? []), refresh: a2 !== 0, warmupData: b2, fetchData: () => Pn(`services-context-load`, { feature: z.services }, ya({ limit: l2, offset: (_2 - 1) * l2, categoryId: h2, locationId: g2, serviceIds: $(v2), categoryIds: $(y2) })) }), rs, is), safeLimit: l2, paginationIndex: _2, categoryId: h2, locationId: g2, serviceIdsKey: v2, categoryIdsKey: y2, refreshSignal: a2 }), [l2, h2, g2, _2, a2, v2, y2]), [C2] = u(() => Ka({ key: Fa(), warmupData: b2, fetchData: Io })), w2 = o(S2);
2152
- return m(Fn, { fallback: m(Bo, { categoryId: h2, locationId: g2, children: s2 }), feature: z.services, children: ee(t, { fallback: m(zo, { categoryId: h2, locationId: g2, children: s2 }), children: [x2 && !p2 && m(ho, { servicesPromise: S2.firstPagePromise, currentPage: _2, pageQueryParam: Q.page }), m(ns, { query: w2, isQueryPending: w2 !== S2, settingsPromise: C2, categoryId: h2, locationId: g2, children: s2 })] }) });
2153
- }
2154
- var os = Cn(`117fa14c-cf9c-47f5-b2cb-7797094612ce`);
3282
+ E2.pending = null, t3((e6) => ({ ...e6, isLoadingMore: false }));
3283
+ }), E2.pending;
3284
+ }, [E2, p2, e5.categoryId, e5.locationId, h2, g2, O2, D2, _2, v2]), { resolvePath: oe2, toHref: se2 } = cs(), ce2 = c(() => x2.services.map((e6) => {
3285
+ let t3 = oe2(`servicePage`, { slug: e6.mainSlug?.name ?? null, serviceId: e6._id ?? null });
3286
+ return { serviceId: e6._id ?? null, refreshSignal: _2, service: e6, masterEvents: ee2[e6.schedule?._id ?? ``] ?? Ac, serviceOptionsAndVariants: w2[e6._id ?? ``] ?? null, bookingsSettings: b2, servicePageLink: t3 ? { href: se2(t3), target: `_self` } : null };
3287
+ }), [oe2, se2, x2.services, _2, ee2, w2, b2]), le2 = c(() => ({ serviceItems: t2 ? jc : ce2, bookingsSettings: b2, hasMore: !t2 && x2.hasMore, isLoading: t2 || x2.isLoadingMore, hasError: !t2 && y2.hasError, categoryId: a2, locationId: o2, loadMore: ae2 }), [t2, ce2, b2, x2.hasMore, x2.isLoadingMore, y2.hasError, a2, o2, ae2]);
3288
+ return m(Rc.Provider, { value: le2, children: d2 });
3289
+ }
3290
+ var Uc = (e5) => ({ ...e5, hasError: false });
3291
+ var Wc = () => ({ ...Ic });
3292
+ function Gc({ categoryData: e5, limit: n2 = Oc, servicesPicker: r2, categoriesPicker: i2, refreshSignal: a2 = 0, children: s2 }) {
3293
+ let l2 = Math.min(n2 ?? Oc, kc), { searchParams: d2 } = Oi(), f2 = e5?.categoryId, p2 = !!f2, g2 = f2 || d2.get(es.category), _2 = d2.get(es.location), v2 = p2 ? 1 : Lc(d2.get(es.page)), y2 = Dc(r2?.serviceId), b2 = Dc(i2?.categoryId), x2 = fs(), S2 = vs(), { isSSR: ee2 } = Ls(), [C2] = u(() => ee2()), w2 = c(() => ({ firstPagePromise: _i(Ns({ key: bs(S2, g2, _2, v2, l2, $(y2) ?? [], $(b2) ?? []), refresh: a2 !== 0, warmupData: x2, fetchData: () => fi(`services-context-load`, { feature: V.services }, $o({ limit: l2, offset: (v2 - 1) * l2, categoryId: g2, locationId: _2, serviceIds: $(y2), categoryIds: $(b2) })) }), Uc, Wc), safeLimit: l2, paginationIndex: v2, categoryId: g2, locationId: _2, serviceIdsKey: y2, categoryIdsKey: b2, refreshSignal: a2, language: S2 }), [l2, g2, _2, v2, a2, y2, b2, S2]), [T2] = u(() => Ns({ key: Ss(), warmupData: x2, fetchData: Sc })), E2 = o(w2);
3294
+ return m(pi, { fallback: m(Ec, { categoryId: g2, locationId: _2, children: s2 }), feature: V.services, children: h(t, { fallback: m(Tc, { categoryId: g2, locationId: _2, children: s2 }), children: [C2 && !p2 && m(tc, { servicesPromise: w2.firstPagePromise, currentPage: v2, pageQueryParam: es.page }), m(Hc, { query: E2, isQueryPending: E2 !== w2, settingsPromise: T2, categoryId: g2, locationId: _2, children: s2 })] }) });
3295
+ }
3296
+ var Kc = zn(`117fa14c-cf9c-47f5-b2cb-7797094612ce`);
2155
3297
  export {
2156
- $o as SERVICES_CONTEXT_MISSING_PROVIDER_ERROR,
2157
- as as ServicesContextProvider,
2158
- as as default,
2159
- os as injectAccessTokenGetter,
2160
- Qo as servicesContext,
2161
- es as useServicesContext
3298
+ zc as SERVICES_CONTEXT_MISSING_PROVIDER_ERROR,
3299
+ Gc as ServicesContextProvider,
3300
+ Gc as default,
3301
+ Kc as injectAccessTokenGetter,
3302
+ Rc as servicesContext,
3303
+ Bc as useServicesContext
2162
3304
  };
2163
3305
  //# sourceMappingURL=context-services.mjs.map