@wix/stores 1.0.959 → 1.0.960

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (121) hide show
  1. package/_sdk-exports/context-category-by-id-context-provider/runtime.d.ts +4026 -0
  2. package/_sdk-exports/context-category-by-id-context-provider/runtime.js +2 -0
  3. package/_sdk-exports/context-category-by-slug-context-provider/runtime.d.ts +4046 -0
  4. package/_sdk-exports/context-category-by-slug-context-provider/runtime.js +2 -0
  5. package/_sdk-exports/context-category-info-context-provider/runtime.d.ts +3530 -0
  6. package/_sdk-exports/context-category-info-context-provider/runtime.js +2 -0
  7. package/_sdk-exports/context-category-list-context-provider/runtime.d.ts +101 -0
  8. package/_sdk-exports/context-category-list-context-provider/runtime.js +2 -0
  9. package/_sdk-exports/context-product-by-id-context-provider/runtime.d.ts +4221 -0
  10. package/_sdk-exports/context-product-by-id-context-provider/runtime.js +2 -0
  11. package/_sdk-exports/context-product-by-slug-context-provider/runtime.d.ts +4217 -0
  12. package/_sdk-exports/context-product-by-slug-context-provider/runtime.js +2 -0
  13. package/_sdk-exports/context-product-context-provider/runtime.d.ts +4449 -0
  14. package/_sdk-exports/context-product-context-provider/runtime.js +2 -0
  15. package/_sdk-exports/context-product-item-context-provider/runtime.d.ts +4102 -0
  16. package/_sdk-exports/context-product-item-context-provider/runtime.js +2 -0
  17. package/_sdk-exports/context-product-list-context-provider/runtime.d.ts +3969 -0
  18. package/_sdk-exports/context-product-list-context-provider/runtime.js +2 -0
  19. package/_sdk-exports/context-promotion-item-context-provider/runtime.d.ts +85 -0
  20. package/_sdk-exports/context-promotion-item-context-provider/runtime.js +2 -0
  21. package/build/cjs/context-category-by-id-context-provider.d.ts +4026 -0
  22. package/build/cjs/context-category-by-id-context-provider.js +3572 -0
  23. package/build/cjs/context-category-by-id-context-provider.js.map +1 -0
  24. package/build/cjs/context-category-by-slug-context-provider.d.ts +4046 -0
  25. package/build/cjs/context-category-by-slug-context-provider.js +3674 -0
  26. package/build/cjs/context-category-by-slug-context-provider.js.map +1 -0
  27. package/build/cjs/context-category-info-context-provider.d.ts +3530 -0
  28. package/build/cjs/context-category-info-context-provider.js +1201 -0
  29. package/build/cjs/context-category-info-context-provider.js.map +1 -0
  30. package/build/cjs/context-category-list-context-provider.d.ts +101 -0
  31. package/build/cjs/context-category-list-context-provider.js +587 -0
  32. package/build/cjs/context-category-list-context-provider.js.map +1 -0
  33. package/build/cjs/context-product-by-id-context-provider.d.ts +4221 -0
  34. package/build/cjs/context-product-by-id-context-provider.js +3454 -0
  35. package/build/cjs/context-product-by-id-context-provider.js.map +1 -0
  36. package/build/cjs/context-product-by-slug-context-provider.d.ts +4217 -0
  37. package/build/cjs/context-product-by-slug-context-provider.js +3477 -0
  38. package/build/cjs/context-product-by-slug-context-provider.js.map +1 -0
  39. package/build/cjs/context-product-context-provider.d.ts +4449 -0
  40. package/build/cjs/context-product-context-provider.js +587 -0
  41. package/build/cjs/context-product-context-provider.js.map +1 -0
  42. package/build/cjs/context-product-item-context-provider.d.ts +4102 -0
  43. package/build/cjs/context-product-item-context-provider.js +4396 -0
  44. package/build/cjs/context-product-item-context-provider.js.map +1 -0
  45. package/build/cjs/context-product-list-context-provider.d.ts +3970 -0
  46. package/build/cjs/context-product-list-context-provider.js +587 -0
  47. package/build/cjs/context-product-list-context-provider.js.map +1 -0
  48. package/build/cjs/context-promotion-item-context-provider.d.ts +85 -0
  49. package/build/cjs/context-promotion-item-context-provider.js +592 -0
  50. package/build/cjs/context-promotion-item-context-provider.js.map +1 -0
  51. package/build/es/context-category-by-id-context-provider.d.mts +4026 -0
  52. package/build/es/context-category-by-id-context-provider.mjs +3532 -0
  53. package/build/es/context-category-by-id-context-provider.mjs.map +1 -0
  54. package/build/es/context-category-by-slug-context-provider.d.mts +4046 -0
  55. package/build/es/context-category-by-slug-context-provider.mjs +3634 -0
  56. package/build/es/context-category-by-slug-context-provider.mjs.map +1 -0
  57. package/build/es/context-category-info-context-provider.d.mts +3530 -0
  58. package/build/es/context-category-info-context-provider.mjs +1172 -0
  59. package/build/es/context-category-info-context-provider.mjs.map +1 -0
  60. package/build/es/context-category-list-context-provider.d.mts +101 -0
  61. package/build/es/context-category-list-context-provider.mjs +558 -0
  62. package/build/es/context-category-list-context-provider.mjs.map +1 -0
  63. package/build/es/context-product-by-id-context-provider.d.mts +4221 -0
  64. package/build/es/context-product-by-id-context-provider.mjs +3415 -0
  65. package/build/es/context-product-by-id-context-provider.mjs.map +1 -0
  66. package/build/es/context-product-by-slug-context-provider.d.mts +4217 -0
  67. package/build/es/context-product-by-slug-context-provider.mjs +3437 -0
  68. package/build/es/context-product-by-slug-context-provider.mjs.map +1 -0
  69. package/build/es/context-product-context-provider.d.mts +4449 -0
  70. package/build/es/context-product-context-provider.mjs +558 -0
  71. package/build/es/context-product-context-provider.mjs.map +1 -0
  72. package/build/es/context-product-item-context-provider.d.mts +4102 -0
  73. package/build/es/context-product-item-context-provider.mjs +4356 -0
  74. package/build/es/context-product-item-context-provider.mjs.map +1 -0
  75. package/build/es/context-product-list-context-provider.d.mts +3970 -0
  76. package/build/es/context-product-list-context-provider.mjs +558 -0
  77. package/build/es/context-product-list-context-provider.mjs.map +1 -0
  78. package/build/es/context-promotion-item-context-provider.d.mts +85 -0
  79. package/build/es/context-promotion-item-context-provider.mjs +563 -0
  80. package/build/es/context-promotion-item-context-provider.mjs.map +1 -0
  81. package/build/internal/cjs/context-category-by-id-context-provider.d.ts +4026 -0
  82. package/build/internal/cjs/context-category-by-slug-context-provider.d.ts +4046 -0
  83. package/build/internal/cjs/context-category-info-context-provider.d.ts +3530 -0
  84. package/build/internal/cjs/context-category-list-context-provider.d.ts +101 -0
  85. package/build/internal/cjs/context-product-by-id-context-provider.d.ts +4221 -0
  86. package/build/internal/cjs/context-product-by-slug-context-provider.d.ts +4217 -0
  87. package/build/internal/cjs/context-product-context-provider.d.ts +4449 -0
  88. package/build/internal/cjs/context-product-item-context-provider.d.ts +4102 -0
  89. package/build/internal/cjs/context-product-list-context-provider.d.ts +3970 -0
  90. package/build/internal/cjs/context-promotion-item-context-provider.d.ts +85 -0
  91. package/build/internal/es/context-category-by-id-context-provider.d.mts +4026 -0
  92. package/build/internal/es/context-category-by-slug-context-provider.d.mts +4046 -0
  93. package/build/internal/es/context-category-info-context-provider.d.mts +3530 -0
  94. package/build/internal/es/context-category-list-context-provider.d.mts +101 -0
  95. package/build/internal/es/context-product-by-id-context-provider.d.mts +4221 -0
  96. package/build/internal/es/context-product-by-slug-context-provider.d.mts +4217 -0
  97. package/build/internal/es/context-product-context-provider.d.mts +4449 -0
  98. package/build/internal/es/context-product-item-context-provider.d.mts +4102 -0
  99. package/build/internal/es/context-product-list-context-provider.d.mts +3970 -0
  100. package/build/internal/es/context-promotion-item-context-provider.d.mts +85 -0
  101. package/category-by-id-context-provider/package.json +3 -0
  102. package/category-by-slug-context-provider/package.json +3 -0
  103. package/category-info-context-provider/package.json +3 -0
  104. package/category-list-context-provider/package.json +3 -0
  105. package/context/category-by-id-context-provider/package.json +3 -0
  106. package/context/category-by-slug-context-provider/package.json +3 -0
  107. package/context/category-info-context-provider/package.json +3 -0
  108. package/context/category-list-context-provider/package.json +3 -0
  109. package/context/product-by-id-context-provider/package.json +3 -0
  110. package/context/product-by-slug-context-provider/package.json +3 -0
  111. package/context/product-context-provider/package.json +3 -0
  112. package/context/product-item-context-provider/package.json +3 -0
  113. package/context/product-list-context-provider/package.json +3 -0
  114. package/context/promotion-item-context-provider/package.json +3 -0
  115. package/package.json +159 -24
  116. package/product-by-id-context-provider/package.json +3 -0
  117. package/product-by-slug-context-provider/package.json +3 -0
  118. package/product-context-provider/package.json +3 -0
  119. package/product-item-context-provider/package.json +3 -0
  120. package/product-list-context-provider/package.json +3 -0
  121. package/promotion-item-context-provider/package.json +3 -0
@@ -0,0 +1,3437 @@
1
+ // _sdk-exports/context-product-by-slug-context-provider/runtime.js
2
+ import { Suspense as e, useCallback as t, useMemo as n, useRef as r, useState as i } from "react";
3
+ import a, { useProductContext as o } from "@wix/stores/product-context-provider";
4
+ import { useGetService as s, useService as c } from "@wix/services-manager-react";
5
+ import { jsx as l, jsxs as u } from "react/jsx-runtime";
6
+ var d = Object.create;
7
+ var f = Object.defineProperty;
8
+ var p = Object.getOwnPropertyDescriptor;
9
+ var m = Object.getOwnPropertyNames;
10
+ var h = Object.getPrototypeOf;
11
+ var g = Object.prototype.hasOwnProperty;
12
+ var _ = (e2, t2) => () => (t2 || (e2((t2 = { exports: {} }).exports, t2), e2 = null), t2.exports);
13
+ var v = (e2, t2, n2, r2) => {
14
+ if (t2 && typeof t2 == `object` || typeof t2 == `function`) for (var i2 = m(t2), a2 = 0, o2 = i2.length, s2; a2 < o2; a2++) s2 = i2[a2], !g.call(e2, s2) && s2 !== n2 && f(e2, s2, { get: ((e3) => t2[e3]).bind(null, s2), enumerable: !(r2 = p(t2, s2)) || r2.enumerable });
15
+ return e2;
16
+ };
17
+ var y = (e2, t2, n2) => (n2 = e2 == null ? {} : d(h(e2)), v(t2 || !e2 || !e2.__esModule || !g.call(e2, `default`) ? f(n2, `default`, { value: e2, enumerable: true }) : n2, e2));
18
+ var b = {};
19
+ function x(e2, t2 = false, n2 = (e3) => e3) {
20
+ return () => ({ __type: `event-definition`, type: e2, isDomainEvent: t2, transformations: n2 });
21
+ }
22
+ var S = (e2) => {
23
+ switch (e2) {
24
+ case `get`:
25
+ case `GET`:
26
+ return `GET`;
27
+ case `post`:
28
+ case `POST`:
29
+ return `POST`;
30
+ case `put`:
31
+ case `PUT`:
32
+ return `PUT`;
33
+ case `delete`:
34
+ case `DELETE`:
35
+ return `DELETE`;
36
+ case `patch`:
37
+ case `PATCH`:
38
+ return `PATCH`;
39
+ case `head`:
40
+ case `HEAD`:
41
+ return `HEAD`;
42
+ case `options`:
43
+ case `OPTIONS`:
44
+ return `OPTIONS`;
45
+ default:
46
+ throw Error(`Unknown method: ${e2}`);
47
+ }
48
+ };
49
+ var C = (e2) => (t2) => async (n2) => {
50
+ let r2, i2 = (t3) => {
51
+ 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.`);
52
+ let { method: i3, url: a2, params: o2 } = r2;
53
+ return { ...r2, method: S(i3), url: a2, data: r2.data, params: o2 };
54
+ };
55
+ try {
56
+ let e3 = await t2.request(i2);
57
+ if (r2 === void 0) throw Error(`Request options were not created for this request, please reach out to support channels for assistance.`);
58
+ let n3 = Array.isArray(r2.transformResponse) ? r2.transformResponse : [r2.transformResponse], a2 = e3.data;
59
+ return n3.forEach((t3) => {
60
+ t3 && (a2 = t3(e3.data, e3.headers));
61
+ }), a2;
62
+ } catch (e3) {
63
+ throw typeof e3 == `object` && e3 && `response` in e3 && typeof e3.response == `object` && e3.response !== null && `data` in e3.response ? e3.response.data : e3;
64
+ }
65
+ };
66
+ var w = (e2) => e2.__isAmbassador ? true : !!e2().__isAmbassador;
67
+ var T = `__metadata`;
68
+ var E = `edge.wixapis.com`;
69
+ var D = class extends Error {
70
+ message;
71
+ response;
72
+ constructor(e2, t2) {
73
+ super(e2), this.message = e2, this.response = t2;
74
+ }
75
+ async details() {
76
+ let e2 = await this.response.json();
77
+ return O(this.response.status, e2?.message, e2?.details, { requestId: this.response.headers.get(`X-Wix-Request-Id`), details: e2 });
78
+ }
79
+ };
80
+ var O = (e2, t2, n2, r2) => ({ details: { ...!n2?.validationError && { applicationError: { description: t2, code: e2, data: r2 } }, ...n2 }, message: t2, requestId: r2?.requestId });
81
+ var k = (e2) => e2?.method && [`post`, `put`, `patch`].includes(e2.method.toLocaleLowerCase()) && e2.body ? { "Content-Type": `application/json` } : {};
82
+ var ee = (e2) => e2 && typeof e2 == `object` && !Array.isArray(e2);
83
+ var te = (e2) => e2.__type === `host`;
84
+ function ne(e2, t2) {
85
+ return e2.create(t2);
86
+ }
87
+ var re = `x-wix-bi-gateway`;
88
+ function ie(e2, t2, n2) {
89
+ return { [re]: ae({ environment: `js-sdk${n2 ? `-${n2}` : ``}`, "package-name": e2.packageName ?? t2?.PACKAGE_NAME, "method-fqn": e2.methodFqn, entity: e2.entityFqdn }) };
90
+ }
91
+ function ae(e2) {
92
+ return Object.entries(e2).filter(([e3, t2]) => !!t2).map(([e3, t2]) => `${e3}=${t2}`).join(`,`);
93
+ }
94
+ function oe(e2) {
95
+ let t2 = globalThis.__wix_context__, n2 = { client: b.client, elevatedClient: b.elevatedClient }, r2;
96
+ globalThis.__wix_context__ = void 0, b.client = void 0, b.elevatedClient = void 0, typeof $wixContext < `u` && (r2 = { client: $wixContext?.client, elevatedClient: $wixContext?.elevatedClient }, delete $wixContext.client, delete $wixContext.elevatedClient);
97
+ try {
98
+ return e2();
99
+ } finally {
100
+ globalThis.__wix_context__ = t2, b.client = n2.client, b.elevatedClient = n2.elevatedClient, typeof $wixContext < `u` && ($wixContext.client = r2.client, $wixContext.elevatedClient = r2.elevatedClient);
101
+ }
102
+ }
103
+ var se = { id: `_id`, createdDate: `_createdDate`, updatedDate: `_updatedDate` };
104
+ function ce(e2) {
105
+ return pe(e2).map((e3) => e3.toLocaleUpperCase()).join(`_`);
106
+ }
107
+ var le = /([\p{Ll}\d])(\p{Lu})/gu;
108
+ var ue = /(\p{Lu})([\p{Lu}][\p{Ll}])/gu;
109
+ var de = `$1\0$2`;
110
+ var fe = /[^\p{L}\d]+/giu;
111
+ function pe(e2) {
112
+ let t2 = e2.trim();
113
+ t2 = t2.replace(le, de).replace(ue, de), t2 = t2.replace(fe, `\0`);
114
+ let n2 = 0, r2 = t2.length;
115
+ for (; t2.charAt(n2) === `\0`; ) n2++;
116
+ if (n2 === r2) return [];
117
+ for (; t2.charAt(r2 - 1) === `\0`; ) r2--;
118
+ return t2.slice(n2, r2).split(/\0/g);
119
+ }
120
+ var me = (e2) => `validationError` in (e2.response?.data?.details ?? {});
121
+ var he = (e2) => `applicationError` in (e2.response?.data?.details ?? {});
122
+ var ge = (e2) => (e2.response?.status ?? -1) >= 400 && (e2.response?.status ?? -1) < 500;
123
+ function _e(e2, t2 = { explicitPathsToArguments: {}, spreadPathsToArguments: {}, singleArgumentUnchanged: false }, n2 = []) {
124
+ if (typeof e2 != `object` || !e2) throw e2;
125
+ if (me(e2)) return ve(e2, t2, n2);
126
+ if (he(e2)) return be(e2);
127
+ if (ge(e2)) {
128
+ let t3 = e2.response?.status, n3 = e2.response?.statusText ?? `UNKNOWN`, r2 = e2.response?.data?.message ?? n3, i2 = { applicationError: { description: n3, code: ce(n3), data: {} }, requestId: e2.requestId };
129
+ return ye(e2, { message: JSON.stringify({ message: r2, details: i2 }, null, 2), extraProperties: { details: i2, status: t3 } });
130
+ }
131
+ return xe(e2);
132
+ }
133
+ var ve = (e2, t2, n2) => {
134
+ let r2 = e2.response?.data, i2 = e2.requestId, { fieldViolations: a2 } = r2.details.validationError, o2 = Se(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 };
135
+ return ye(e2, { message: JSON.stringify({ message: s2, details: c2 }, null, 2), extraProperties: { details: c2, status: e2.response?.status, requestId: i2 } });
136
+ };
137
+ var ye = (e2, { message: t2, extraProperties: n2 }) => Object.assign(e2, { ...n2, message: t2 });
138
+ var be = (e2) => {
139
+ 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 ?? ce(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 };
140
+ return ye(e2, { message: JSON.stringify({ message: s2, details: c2 }, null, 2), extraProperties: { details: c2, status: t2, requestId: e2.requestId } });
141
+ };
142
+ var xe = (e2) => ye(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: ce(e2.response?.statusText ?? `UNKNOWN`), ...!e2.response && { runtimeError: e2 } } });
143
+ var Se = ({ spreadPathsToArguments: e2, explicitPathsToArguments: t2, singleArgumentUnchanged: n2 }, r2, i2) => {
144
+ let a2 = { ...e2, ...t2 }, o2 = Object.keys(a2);
145
+ return r2?.filter((e3) => !r2.some((t3) => t3.field.length > e3.field.length && t3.field.startsWith(e3.field) && o2.includes(t3.field))).map((e3) => {
146
+ let r3 = t2[e3.field];
147
+ if (r3) return { ...e3, field: Ce(r3, i2) };
148
+ let s2 = o2?.sort((e4, t3) => t3.length - e4.length)?.find((t3) => e3.field.startsWith(t3));
149
+ if (s2) {
150
+ let t3 = a2[s2];
151
+ if (t3) return { ...e3, field: e3.field.replace(s2, Ce(t3, i2)) };
152
+ }
153
+ return n2 ? { ...e3, field: `${i2[0]}.${e3.field}` } : e3;
154
+ });
155
+ };
156
+ var Ce = (e2, t2) => {
157
+ let n2 = we(e2);
158
+ return n2 == null ? e2 : e2.replace(`$[${n2}]`, t2[n2]);
159
+ };
160
+ var we = (e2) => {
161
+ let t2 = e2.match(/\$\[(?<argIndex>\d+)\]/);
162
+ return t2 && t2.groups && Number(t2.groups.argIndex);
163
+ };
164
+ function Te(e2, t2, n2, r2, i2, a2, o2, s2, c2, l2, u2) {
165
+ return oe(() => e2({ request: async (e3) => {
166
+ let i3 = e3({ host: s2?.HTTPHost || `www.wixapis.com` }), a3 = i3;
167
+ a3.method === `GET` && a3.fallback?.length && (a3.params?.toString().length ?? 0) > 4e3 && (a3 = i3.fallback[0]);
168
+ let o3 = s2?.HTTPHost ?? `www.wixapis.com`, u3 = `https://${l2 ? E : o3}${a3.url}`;
169
+ a3.params && a3.params.toString() && (u3 += `?${a3.params.toString()}`);
170
+ try {
171
+ let e4 = ie(i3, t2, c2), o4 = { method: a3.method, ...a3.data && { body: JSON.stringify(a3.data) }, headers: { ...e4 } }, s3 = await n2(u3, o4);
172
+ if (s3.status !== 200) {
173
+ let e5 = null;
174
+ try {
175
+ e5 = await s3.json();
176
+ } catch {
177
+ }
178
+ let t3 = De(s3.status, e5?.message ?? s3.statusText, e5?.details, { requestId: s3.headers.get(`X-Wix-Request-Id`), details: e5 }), n3 = _e(t3);
179
+ throw r2?.handleError(n3, { requestOptions: { url: a3.url, method: a3.method, entityFqdn: i3.entityFqdn, methodFqn: i3.methodFqn } }), t3;
180
+ }
181
+ let l3 = await s3.json();
182
+ 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 };
183
+ } catch (e4) {
184
+ throw e4.message?.includes(`fetch is not defined`) && console.error(`Node.js v18+ is required`), e4;
185
+ }
186
+ }, fetchWithAuth: n2, wixAPIFetch: i2, getActiveToken: a2, getAuthHeaders: o2 }, { validateRequestSchema: u2 }));
187
+ }
188
+ var Ee = class extends Error {
189
+ response;
190
+ requestId;
191
+ constructor(e2) {
192
+ super(), this.response = e2.response, this.requestId = e2.requestId;
193
+ }
194
+ };
195
+ var De = (e2, t2, n2, r2) => new Ee({ response: { data: { details: { ...!n2?.validationError && { applicationError: { description: t2, code: e2, data: r2 } }, ...n2 }, message: t2 }, status: e2 }, requestId: r2?.requestId });
196
+ var Oe = `.`;
197
+ function ke(e2, t2, n2) {
198
+ if (e2 == null) throw Error(`Cannot set value on null or undefined`);
199
+ let r2 = Ae(t2), i2 = e2;
200
+ for (let e3 = 0; e3 < r2.length; e3++) {
201
+ let t3 = r2[e3];
202
+ if (e3 === r2.length - 1) {
203
+ i2[t3] = n2;
204
+ break;
205
+ }
206
+ let a2 = r2[e3 + 1];
207
+ (!(t3 in i2) || i2[t3] == null || typeof i2[t3] != `object` || i2[t3] === null) && (i2[t3] = typeof a2 == `number` ? [] : {}), i2 = i2[t3];
208
+ }
209
+ return e2;
210
+ }
211
+ function Ae(e2) {
212
+ return Array.isArray(e2) ? e2 : e2.split(Oe).map((e3) => je(e3) ? Number(e3) : e3);
213
+ }
214
+ function je(e2) {
215
+ return /^\d+$/.test(e2);
216
+ }
217
+ function Me(e2) {
218
+ let t2 = {};
219
+ for (let [n2, r2] of Object.entries(e2)) Ne(n2) || ke(t2, Ae(n2), r2);
220
+ return t2;
221
+ }
222
+ function Ne(e2) {
223
+ return e2 === `__proto__` || e2 === `constructor` || e2 === `prototype`;
224
+ }
225
+ var Pe = class {
226
+ BRACKET_PATTERN = /\[(\d+)\]/g;
227
+ NUMERIC_PATTERN = /^\d+$/;
228
+ ESCAPED_DOT_PATTERN = /\\\./g;
229
+ ESCAPED_LEFT_BRACKET_PATTERN = /\\\[/g;
230
+ ESCAPED_RIGHT_BRACKET_PATTERN = /\\\]/g;
231
+ SPLIT_PATTERN = /\.|\[(\d+)\]/g;
232
+ DOT_BEFORE_BRACKET_PATTERN = /\.\[/g;
233
+ ESCAPED_DOT_PLACEHOLDER = `__DOT__`;
234
+ ESCAPED_RIGHT_BRACKET_PLACEHOLDER = `__RB__`;
235
+ ESCAPED_LEFT_BRACKET_PLACEHOLDER = `__LB__`;
236
+ modifiedFields;
237
+ cleanedModifiedFields;
238
+ constructor(e2) {
239
+ this.modifiedFields = e2;
240
+ }
241
+ replaceEscapedCharacters(e2) {
242
+ 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);
243
+ }
244
+ restoreEscapedCharacters(e2) {
245
+ return e2.replace(this.ESCAPED_DOT_PLACEHOLDER, `\\.`).replace(this.ESCAPED_RIGHT_BRACKET_PLACEHOLDER, `\\]`).replace(this.ESCAPED_LEFT_BRACKET_PLACEHOLDER, `\\[`);
246
+ }
247
+ unflatten() {
248
+ return this.cleanedModifiedFields = Object.fromEntries(Object.entries(this.modifiedFields).map(([e2, t2]) => [this.replaceEscapedCharacters(this.bracketToDotNotation(e2)), t2])), Me(this.cleanedModifiedFields);
249
+ }
250
+ flatten(e2) {
251
+ let t2 = {};
252
+ for (let n2 of Object.keys(this.cleanedModifiedFields)) {
253
+ let r2 = this.splitPath(n2), i2 = this.navigatePath(e2, r2);
254
+ t2 = { ...t2, ...i2 };
255
+ }
256
+ return Object.fromEntries(Object.entries(t2).map(([e3, t3]) => [this.restoreEscapedCharacters(e3), t3]));
257
+ }
258
+ splitPath(e2) {
259
+ let t2 = [], n2 = 0, r2 = Array.from(e2.matchAll(this.SPLIT_PATTERN));
260
+ 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;
261
+ return n2 < e2.length && t2.push(e2.substring(n2)), t2;
262
+ }
263
+ navigatePath(e2, t2) {
264
+ let n2 = e2, r2 = [], i2 = (e3) => {
265
+ if (!Array.isArray(n2)) throw Error(`Expected array at path ${this.buildPathString(r2)}, but got ${typeof n2}`);
266
+ r2.push(`[${e3}]`), n2 = n2[parseInt(e3, 10)];
267
+ }, a2 = (e3, t3) => {
268
+ let i3 = e3 in se ? se[e3] : void 0;
269
+ if (i3 && i3 in t3) {
270
+ r2.push(i3), n2 = t3[i3];
271
+ return;
272
+ }
273
+ let a3 = Re(e3);
274
+ if (a3 && a3 in t3) {
275
+ r2.push(a3), n2 = t3[a3];
276
+ return;
277
+ }
278
+ throw Error(`Cannot find key '${e3}' or its transformations at path ${this.buildPathString(r2)}`);
279
+ }, o2 = (e3, t3) => {
280
+ r2.push(e3), n2 = t3[e3];
281
+ };
282
+ for (let e3 of t2) {
283
+ if (this.NUMERIC_PATTERN.test(e3)) {
284
+ i2(e3);
285
+ continue;
286
+ }
287
+ if (typeof n2 != `object` || !n2) throw Error(`Cannot access property '${e3}' on ${typeof n2} at path ${this.buildPathString(r2)}`);
288
+ let t3 = n2;
289
+ if (e3 in n2) {
290
+ o2(e3, t3);
291
+ continue;
292
+ }
293
+ a2(e3, t3);
294
+ }
295
+ return { [this.buildPathString(r2)]: n2 };
296
+ }
297
+ buildPathString(e2) {
298
+ return e2.join(`.`).replace(this.DOT_BEFORE_BRACKET_PATTERN, `[`);
299
+ }
300
+ bracketToDotNotation(e2) {
301
+ return e2.replace(this.BRACKET_PATTERN, (t2, n2, r2) => r2 > 0 && e2[r2 - 1] === `\\` ? t2 : `.` + n2);
302
+ }
303
+ };
304
+ function Fe(e2, t2) {
305
+ let n2 = e2?.modifiedFields;
306
+ if (!n2) return null;
307
+ let r2 = Ie(n2);
308
+ if (!r2) return null;
309
+ let { unflattenedModifiedFields: i2, modifiedFieldsManipulator: a2 } = r2;
310
+ e2 = { ...e2, modifiedFields: i2 };
311
+ let o2 = t2(e2), s2 = o2?.modifiedFields;
312
+ if (!s2) return null;
313
+ let c2 = Le(s2, a2);
314
+ return c2 === null ? null : (o2.modifiedFields = c2, o2);
315
+ }
316
+ function Ie(e2) {
317
+ if (typeof e2 == `object` && e2 && !Array.isArray(e2)) try {
318
+ let t2 = new Pe(e2);
319
+ return { unflattenedModifiedFields: t2.unflatten(), modifiedFieldsManipulator: t2 };
320
+ } catch {
321
+ return null;
322
+ }
323
+ return null;
324
+ }
325
+ function Le(e2, t2) {
326
+ if (typeof e2 == `object` && e2 && !Array.isArray(e2)) try {
327
+ return t2.flatten(e2);
328
+ } catch {
329
+ return null;
330
+ }
331
+ return null;
332
+ }
333
+ function Re(e2) {
334
+ return e2.replace(/[-_\s]+(.)?/g, (e3, t2) => t2 ? t2.toUpperCase() : ``).replace(/^./, (e3) => e3.toLowerCase());
335
+ }
336
+ function ze() {
337
+ return { emit(e2, ...t2) {
338
+ for (let n2 = 0, r2 = this.events[e2] || [], i2 = r2.length; n2 < i2; n2++) r2[n2](...t2);
339
+ }, events: {}, on(e2, t2) {
340
+ return (this.events[e2] ||= []).push(t2), () => {
341
+ this.events[e2] = this.events[e2]?.filter((e3) => t2 !== e3);
342
+ };
343
+ } };
344
+ }
345
+ var Be = (e2) => e2.__type === `event-definition`;
346
+ function Ve(e2, t2, n2, r2) {
347
+ let i2;
348
+ if (e2.isDomainEvent) {
349
+ let { deletedEvent: e3, actionEvent: t3, createdEvent: a3, updatedEvent: o3, ...s3 } = n2, c2 = { ...r2, ...s3 };
350
+ 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 };
351
+ } else i2 = { data: n2, metadata: r2 };
352
+ let a2 = e2.transformations ?? ((e3) => e3), o2 = i2, s2 = i2;
353
+ if (s2.modifiedFields) {
354
+ let e3 = s2.modifiedFields;
355
+ if (typeof e3 == `object` && e3 && !Array.isArray(e3)) {
356
+ o2 = structuredClone(i2);
357
+ let e4 = Fe(s2, a2);
358
+ if (e4) return t2(e4);
359
+ }
360
+ }
361
+ return t2(a2(o2));
362
+ }
363
+ function He(e2) {
364
+ let t2 = /* @__PURE__ */ new Map(), n2 = ze();
365
+ return { initModule(e3) {
366
+ return (r2) => {
367
+ let i2 = t2.get(e3.type) ?? [];
368
+ i2.push({ eventDefinition: e3, handler: r2 }), t2.set(e3.type, i2), n2.emit(`registered`, e3);
369
+ };
370
+ }, client: { ...n2, getRegisteredEvents: () => t2, async process(e3, n3 = { expectedEvents: [] }) {
371
+ 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 }))];
372
+ 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(`, `)}`);
373
+ let l2 = t2.get(r2) ?? [];
374
+ return await Promise.all(l2.map(({ eventDefinition: e4, handler: t3 }) => Ve(e4, t3, o2, { instanceId: a2, identity: i2, accountInfo: s2 }))), { instanceId: a2, eventType: r2, payload: o2, identity: i2, accountInfo: s2 };
375
+ }, async processRequest(e3, t3) {
376
+ let n3 = await e3.text();
377
+ return this.process(n3, t3);
378
+ }, async parseJWT(t3) {
379
+ let n3 = e2();
380
+ if (!n3.decodeJWT) throw Error(`decodeJWT is not supported by the authentication strategy`);
381
+ let { decoded: r2, valid: i2 } = await n3.decodeJWT(t3);
382
+ if (!i2) throw Error(`JWT is not valid`);
383
+ if (typeof r2.data != `string`) throw Error(`Unexpected type of JWT data: expected string, got ${typeof r2.data}`);
384
+ let a2 = JSON.parse(r2.data), o2 = a2.eventType, s2 = a2.accountInfo, c2 = a2.instanceId, l2 = a2.identity ? JSON.parse(a2.identity) : void 0;
385
+ return { instanceId: c2, eventType: o2, payload: JSON.parse(a2.data), identity: l2, accountInfo: s2 };
386
+ }, async parseRequest(e3) {
387
+ let t3 = await e3.text();
388
+ return this.parseJWT(t3);
389
+ }, async executeHandlers(e3) {
390
+ let n3 = Array.from(t2.keys()).map((e4) => ({ type: e4 }));
391
+ 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(`, `)}`);
392
+ let r2 = t2.get(e3.eventType) ?? [];
393
+ await Promise.all(r2.map(({ eventDefinition: t3, handler: n4 }) => Ve(t3, n4, e3.payload, { instanceId: e3.instanceId, identity: e3.identity })));
394
+ }, apps: { AppInstalled: x(`AppInstalled`)(), AppRemoved: x(`AppRemoved`)() } } };
395
+ }
396
+ var Ue = (e2) => e2.__type === `service-plugin-definition`;
397
+ function We(e2) {
398
+ let t2 = /* @__PURE__ */ new Map(), n2 = ze();
399
+ return { initModule(e3) {
400
+ return (r2) => {
401
+ let i2 = t2.get(e3.componentType.toLowerCase()) ?? [];
402
+ i2.push({ servicePluginDefinition: e3, implementation: r2 }), t2.set(e3.componentType.toLowerCase(), i2), n2.emit(`registered`, e3);
403
+ };
404
+ }, client: { ...n2, getRegisteredServicePlugins: () => t2, async parseJWT(t3) {
405
+ let n3 = e2();
406
+ if (!n3.decodeJWT) throw Error(`decodeJWT is not supported by the authentication strategy`);
407
+ let { decoded: r2, valid: i2 } = await n3.decodeJWT(t3, true);
408
+ if (!i2) throw Error(`JWT is not valid`);
409
+ 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`);
410
+ return r2.data;
411
+ }, async process(e3) {
412
+ let t3 = await this.parseJWT(e3.body);
413
+ return this.executeHandler(t3, e3.url);
414
+ }, async parseRequest(e3) {
415
+ let t3 = await e3.text();
416
+ return this.parseJWT(t3);
417
+ }, async processRequest(e3) {
418
+ let t3 = await this.parseRequest(e3);
419
+ return this.processParsedRequest(t3, e3.url);
420
+ }, async processParsedRequest(e3, t3) {
421
+ try {
422
+ let n3 = await this.executeHandler(e3, t3);
423
+ return Response.json(n3);
424
+ } catch (e4) {
425
+ if (e4.errorType === `SPI` && e4.applicationCode && e4.httpCode) return Response.json({ applicationError: { code: e4.applicationCode, data: e4.data } }, { status: e4.httpCode });
426
+ throw e4;
427
+ }
428
+ }, async executeHandler(e3, n3) {
429
+ let r2 = e3.metadata.appExtensionType.toLowerCase(), i2 = t2.get(r2) ?? [];
430
+ if (i2.length === 0) throw Error(`No service plugin implementations found for component type ${r2}`);
431
+ if (i2.length > 1) throw Error(`Multiple service plugin implementations found for component type ${r2}. This is currently not supported`);
432
+ let { implementation: a2, servicePluginDefinition: o2 } = i2[0], s2 = o2.methods.find((e4) => n3.endsWith(e4.primaryHttpMappingPath));
433
+ if (!s2) throw Error(`Unexpect request: request url did not match any method: ` + n3);
434
+ let c2 = a2[s2.name];
435
+ if (!c2) throw Error(`Got request for service plugin method ${s2.name} but no implementation was provided. Available methods: ${Object.keys(a2).join(`, `)}`);
436
+ return s2.transformations.toREST(await c2(s2.transformations.fromREST(e3)));
437
+ } } };
438
+ }
439
+ var A = `X-Wix-Consistent`;
440
+ function Ge(e2) {
441
+ 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) => {
442
+ let i3 = o2(), s3 = await a2(), c3 = { ...r3?.headers ?? {}, ...s3.headers, ...e2.host?.essentials?.passThroughHeaders, ...t2[`X-Wix-Consistent`] ? { [A]: t2[A] } : {} }, l3 = e2.host?.getErrorHandler?.();
443
+ try {
444
+ if (typeof n3 == `string` || n3 instanceof URL) {
445
+ let e3 = await i3(n3, { ...r3, headers: c3 });
446
+ l3?.handleError(e3, { requestOptions: { url: n3.toString(), method: r3?.method } });
447
+ let a3 = Ke(e3);
448
+ return a3 && (t2[A] = a3), e3;
449
+ }
450
+ {
451
+ for (let [e4, t3] of Object.entries(c3)) typeof t3 == `string` && n3.headers.set(e4, t3);
452
+ let e3 = await i3(n3, r3);
453
+ l3?.handleError(e3, { requestOptions: { url: n3.url, method: r3?.method } });
454
+ let a3 = Ke(e3);
455
+ return a3 && (t2[A] = a3), e3;
456
+ }
457
+ } catch (e3) {
458
+ throw l3?.handleError(e3, { requestOptions: { url: typeof n3 == `string` || n3 instanceof URL ? n3.toString() : n3.url, method: r3?.method } }), e3;
459
+ }
460
+ }, { client: c2, initModule: l2 } = We(i2), { client: u2, initModule: d2 } = He(i2), f2 = async (n3, r3) => {
461
+ let i3 = o2(), s3 = await a2(), c3 = k(r3), l3 = await i3(n3, { ...r3, headers: { ...c3, ...t2, ...s3?.headers, ...r3?.headers, ...e2.host?.essentials?.passThroughHeaders, ...t2[`X-Wix-Consistent`] ? { [A]: t2[A] } : {} } }), u3 = Ke(l3);
462
+ return u3 && (t2[A] = u3), l3;
463
+ }, p2 = (t3, n3) => {
464
+ if (Be(t3)) return d2(t3);
465
+ if (Ue(t3)) return l2(t3);
466
+ if (te(t3) && e2.host) return ne(t3, e2.host);
467
+ if (typeof t3 == `function`) {
468
+ if (`__type` in t3 && t3.__type === `wix_spi_error`) return t3;
469
+ let r3 = e2.host?.apiBaseUrl ?? `www.wixapis.com`, o3 = e2.useCDN === void 0 ? i2().shouldUseCDN : e2.useCDN;
470
+ return Te(oe(() => w(t3)) ? C(t3) : t3, n3 ?? {}, f2, e2.host?.getErrorHandler?.(), (e3, t4) => {
471
+ let n4 = new URL(e3, `https://${r3}`);
472
+ return n4.host = r3, n4.protocol = `https`, f2(n4.toString(), t4);
473
+ }, i2().getActiveToken, async () => a2(), { HTTPHost: r3 }, e2.host?.name, o3, e2.validateRequestSchema);
474
+ }
475
+ return ee(t3) ? Object.fromEntries(Object.entries(t3).map(([e3, n4]) => [e3, p2(n4, t3[T])])) : t3;
476
+ }, m2 = (e3) => {
477
+ for (let n3 in e3) t2[n3] = e3[n3];
478
+ };
479
+ return { ...e2.modules ? p2(e2.modules) : {}, get auth() {
480
+ let t3 = i2();
481
+ return t3.getAuthHeaders = t3.getAuthHeaders.bind(void 0, e2.host), t3;
482
+ }, setHeaders: m2, use: p2, enableContext(e3, t3 = { elevated: false }) {
483
+ 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 ? b.elevatedClient = this : b.client = this;
484
+ }, fetch: (t3, n3) => {
485
+ let r3 = e2.host?.apiBaseUrl ?? `www.wixapis.com`, i3 = new URL(t3, `https://${r3}`);
486
+ return i3.host = r3, i3.protocol = `https`, f2(i3.toString(), n3);
487
+ }, fetchWithAuth: s2, async graphql(t3, n3, r3 = { apiVersion: `alpha` }) {
488
+ 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 }) });
489
+ if (a3.status !== 200) throw new D(`GraphQL request failed with status ${a3.status}`, a3);
490
+ let { data: o3, errors: s3 } = await a3.json();
491
+ return { data: o3 ?? {}, errors: s3 };
492
+ }, webhooks: u2, servicePlugins: c2 };
493
+ }
494
+ function Ke(e2) {
495
+ return e2.headers?.get(`X-Wix-Consistent`) ?? e2.headers?.get(`x-wix-consistent`);
496
+ }
497
+ var qe = `wix:`;
498
+ var Je = { _id: `id`, _createdDate: `createdDate`, _updatedDate: `updatedDate` };
499
+ var Ye = { id: `_id`, createdDate: `_createdDate`, updatedDate: `_updatedDate` };
500
+ var Xe = `items`;
501
+ var Ze = `pagingMetadata`;
502
+ var Qe = Je;
503
+ function $e(e2, t2) {
504
+ return e2?.split(`.`).map((e3) => t2?.[e3] ?? e3).join(`.`);
505
+ }
506
+ function j(e2, { transformSystemFields: t2 = true } = {}) {
507
+ return t2 ? $e(e2, Qe) : e2;
508
+ }
509
+ var et = `sort.fieldName`;
510
+ function tt(e2, t2, n2) {
511
+ return (e2 === et || e2.endsWith(`.${et}`)) && typeof t2 == `string` ? $e(t2, n2) : t2;
512
+ }
513
+ function nt(e2, t2, n2) {
514
+ let r2 = (e3) => n2.includes(e3), i2 = (e3, n3) => {
515
+ if (Array.isArray(e3)) e3.forEach((e4) => {
516
+ i2(e4, n3);
517
+ });
518
+ else if (typeof e3 == `object` && e3) {
519
+ let a2 = e3;
520
+ Object.keys(a2).forEach((e4) => {
521
+ let o2 = n3 === `` ? e4 : `${n3}.${e4}`;
522
+ if (r2(o2)) return;
523
+ let s2 = rt(e4, t2);
524
+ s2 !== e4 && !(s2 in a2) && (a2[s2] = a2[e4], delete a2[e4]), a2[s2] = tt(o2, a2[s2], t2), i2(a2[s2], o2);
525
+ });
526
+ }
527
+ };
528
+ return i2(e2, ``), e2;
529
+ }
530
+ function rt(e2, t2) {
531
+ let n2;
532
+ return n2 = e2.includes(`.`) ? e2.split(`.`).map((e3) => t2[e3] ?? e3).join(`.`) : t2[e2] ?? e2, n2;
533
+ }
534
+ function M(e2, t2 = []) {
535
+ return nt(e2, Je, t2);
536
+ }
537
+ function N(e2, t2 = []) {
538
+ return nt(e2, Ye, t2);
539
+ }
540
+ function it(e2) {
541
+ return e2?.toISOString();
542
+ }
543
+ function P(e2) {
544
+ return e2 ? new Date(e2) : void 0;
545
+ }
546
+ var at = /* @__PURE__ */ new WeakMap();
547
+ function ot() {
548
+ return { leaves: void 0, fields: void 0, mapFields: void 0, anyField: void 0 };
549
+ }
550
+ function st(e2, t2) {
551
+ let n2 = e2.get(t2);
552
+ return n2 || (n2 = ot(), e2.set(t2, n2)), n2;
553
+ }
554
+ function ct(e2, t2) {
555
+ return t2 === `*` ? (e2.anyField ??= ot(), e2.anyField) : t2.endsWith(`{}`) ? (e2.mapFields ??= /* @__PURE__ */ new Map(), st(e2.mapFields, t2.slice(0, -2))) : (e2.fields ??= /* @__PURE__ */ new Map(), st(e2.fields, t2));
556
+ }
557
+ function lt(e2) {
558
+ let t2 = ot();
559
+ for (let n2 of e2) {
560
+ let e3 = n2.path.split(`.`).reduce(ct, t2);
561
+ e3.leaves ??= [], e3.leaves.push(n2);
562
+ }
563
+ return t2;
564
+ }
565
+ function ut(e2) {
566
+ let t2 = at.get(e2);
567
+ return t2 || (t2 = lt(e2), at.set(e2, t2)), t2;
568
+ }
569
+ function dt(e2) {
570
+ return typeof e2 == `object` && !!e2;
571
+ }
572
+ function ft(e2, { isRepeated: t2, isMap: n2 }, r2) {
573
+ return t2 ? Array.isArray(e2) ? e2.map(r2) : e2 : n2 ? dt(e2) ? Object.fromEntries(Object.entries(e2).map(([e3, t3]) => [e3, r2(t3)])) : e2 : r2(e2);
574
+ }
575
+ function pt(e2, t2, n2) {
576
+ dt(e2) && gt(e2, t2, n2);
577
+ }
578
+ function mt(e2, t2, n2) {
579
+ for (let [r2, i2] of t2) {
580
+ if (!(r2 in e2)) continue;
581
+ if (i2.leaves) for (let t4 of i2.leaves) e2[r2] = ft(e2[r2], t4, n2);
582
+ let t3 = e2[r2];
583
+ Array.isArray(t3) ? t3.forEach((e3) => pt(e3, i2, n2)) : pt(t3, i2, n2);
584
+ }
585
+ }
586
+ function ht(e2, t2, n2) {
587
+ for (let [r2, i2] of t2) {
588
+ let t3 = e2[r2];
589
+ dt(t3) && Object.values(t3).forEach((e3) => pt(e3, i2, n2));
590
+ }
591
+ }
592
+ function gt(e2, { fields: t2, mapFields: n2, anyField: r2 }, i2) {
593
+ t2 && mt(e2, t2, i2), n2 && ht(e2, n2, i2), r2 && Object.values(e2).forEach((e3) => pt(e3, r2, i2));
594
+ }
595
+ function F(e2, t2) {
596
+ if (!dt(e2)) return e2;
597
+ for (let { paths: n2, transformFn: r2 } of t2) gt(e2, ut(n2), r2);
598
+ return e2;
599
+ }
600
+ function _t(e2, t2) {
601
+ let { protocol: n2 } = new URL(e2);
602
+ return n2 === `${t2}:` ? `${qe}${e2}` : e2;
603
+ }
604
+ function vt(e2) {
605
+ return Object.fromEntries(Object.entries(e2).filter(([, e3]) => e3 !== void 0));
606
+ }
607
+ function yt(e2) {
608
+ return wt(e2).map((e3) => e3.toLocaleUpperCase()).join(`_`);
609
+ }
610
+ var bt = /([\p{Ll}\d])(\p{Lu})/gu;
611
+ var xt = /(\p{Lu})([\p{Lu}][\p{Ll}])/gu;
612
+ var St = `$1\0$2`;
613
+ var Ct = /[^\p{L}\d]+/giu;
614
+ function wt(e2) {
615
+ let t2 = e2.trim();
616
+ t2 = t2.replace(bt, St).replace(xt, St), t2 = t2.replace(Ct, `\0`);
617
+ let n2 = 0, r2 = t2.length;
618
+ for (; t2.charAt(n2) === `\0`; ) n2++;
619
+ if (n2 === r2) return [];
620
+ for (; t2.charAt(r2 - 1) === `\0`; ) r2--;
621
+ return t2.slice(n2, r2).split(/\0/g);
622
+ }
623
+ var Tt = (e2) => `validationError` in (e2.response?.data?.details ?? {});
624
+ var Et = (e2) => `applicationError` in (e2.response?.data?.details ?? {});
625
+ var Dt = (e2) => (e2.response?.status ?? -1) >= 400 && (e2.response?.status ?? -1) < 500;
626
+ function I(e2, t2 = { explicitPathsToArguments: {}, spreadPathsToArguments: {}, singleArgumentUnchanged: false }, n2 = []) {
627
+ if (typeof e2 != `object` || !e2) throw e2;
628
+ if (Tt(e2)) return Ot(e2, t2, n2);
629
+ if (Et(e2)) return At(e2);
630
+ if (Dt(e2)) {
631
+ let t3 = e2.response?.status, n3 = e2.response?.statusText ?? `UNKNOWN`, r2 = e2.response?.data?.message ?? n3, i2 = { applicationError: { description: n3, code: yt(n3), data: {} }, requestId: e2.requestId };
632
+ return kt(e2, { message: JSON.stringify({ message: r2, details: i2 }, null, 2), extraProperties: { details: i2, status: t3 } });
633
+ }
634
+ return jt(e2);
635
+ }
636
+ var Ot = (e2, t2, n2) => {
637
+ let r2 = e2.response?.data, i2 = e2.requestId, { fieldViolations: a2 } = r2.details.validationError, o2 = Mt(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 };
638
+ return kt(e2, { message: JSON.stringify({ message: s2, details: c2 }, null, 2), extraProperties: { details: c2, status: e2.response?.status, requestId: i2 } });
639
+ };
640
+ var kt = (e2, { message: t2, extraProperties: n2 }) => Object.assign(e2, { ...n2, message: t2 });
641
+ var At = (e2) => {
642
+ 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 ?? yt(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 };
643
+ return kt(e2, { message: JSON.stringify({ message: s2, details: c2 }, null, 2), extraProperties: { details: c2, status: t2, requestId: e2.requestId } });
644
+ };
645
+ var jt = (e2) => kt(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: yt(e2.response?.statusText ?? `UNKNOWN`), ...!e2.response && { runtimeError: e2 } } });
646
+ var Mt = ({ spreadPathsToArguments: e2, explicitPathsToArguments: t2, singleArgumentUnchanged: n2 }, r2, i2) => {
647
+ let a2 = { ...e2, ...t2 }, o2 = Object.keys(a2);
648
+ return r2?.filter((e3) => !r2.some((t3) => t3.field.length > e3.field.length && t3.field.startsWith(e3.field) && o2.includes(t3.field))).map((e3) => {
649
+ let r3 = t2[e3.field];
650
+ if (r3) return { ...e3, field: Nt(r3, i2) };
651
+ let s2 = o2?.sort((e4, t3) => t3.length - e4.length)?.find((t3) => e3.field.startsWith(t3));
652
+ if (s2) {
653
+ let t3 = a2[s2];
654
+ if (t3) return { ...e3, field: e3.field.replace(s2, Nt(t3, i2)) };
655
+ }
656
+ return n2 ? { ...e3, field: `${i2[0]}.${e3.field}` } : e3;
657
+ });
658
+ };
659
+ var Nt = (e2, t2) => {
660
+ let n2 = Pt(e2);
661
+ return n2 == null ? e2 : e2.replace(`$[${n2}]`, t2[n2]);
662
+ };
663
+ var Pt = (e2) => {
664
+ let t2 = e2.match(/\$\[(?<argIndex>\d+)\]/);
665
+ return t2 && t2.groups && Number(t2.groups.argIndex);
666
+ };
667
+ function Ft() {
668
+ let e2 = typeof $wixContext < `u` && $wixContext.initWixModules ? $wixContext.initWixModules : globalThis.__wix_context__ !== void 0 && globalThis.__wix_context__.initWixModules ? globalThis.__wix_context__.initWixModules : void 0;
669
+ if (e2) return { initWixModules(t3, n3) {
670
+ return It(() => e2(t3, n3));
671
+ }, fetchWithAuth() {
672
+ throw Error(`fetchWithAuth is not available in this context`);
673
+ }, graphql() {
674
+ throw Error(`graphql is not available in this context`);
675
+ } };
676
+ let t2 = typeof $wixContext < `u` ? $wixContext.client : b.client === void 0 ? globalThis.__wix_context__ === void 0 ? void 0 : globalThis.__wix_context__.client : b.client, n2 = typeof $wixContext < `u` ? $wixContext.elevatedClient : b.elevatedClient === void 0 ? globalThis.__wix_context__ === void 0 ? void 0 : globalThis.__wix_context__.elevatedClient : b.elevatedClient;
677
+ if (t2 || n2) return { initWixModules(e3, r2) {
678
+ if (r2) {
679
+ 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`);
680
+ return It(() => n2.use(e3));
681
+ }
682
+ if (!t2) throw Error(`Wix context is not available. Make sure to initialize the Wix context before using SDK modules`);
683
+ return It(() => t2.use(e3));
684
+ }, fetchWithAuth: (e3, n3) => {
685
+ if (!t2) throw Error(`Wix context is not available. Make sure to initialize the Wix context before using SDK modules`);
686
+ return t2.fetchWithAuth(e3, n3);
687
+ }, getAuth() {
688
+ if (!t2) throw Error(`Wix context is not available. Make sure to initialize the Wix context before using SDK modules`);
689
+ return t2.auth;
690
+ }, async graphql(e3, n3, r2) {
691
+ if (!t2) throw Error(`Wix context is not available. Make sure to initialize the Wix context before using SDK modules`);
692
+ return t2.graphql(e3, n3, r2);
693
+ } };
694
+ }
695
+ function It(e2) {
696
+ let t2 = globalThis.__wix_context__, n2 = { client: b.client, elevatedClient: b.elevatedClient }, r2;
697
+ globalThis.__wix_context__ = void 0, b.client = void 0, b.elevatedClient = void 0, typeof $wixContext < `u` && (r2 = { client: $wixContext?.client, elevatedClient: $wixContext?.elevatedClient }, delete $wixContext.client, delete $wixContext.elevatedClient);
698
+ try {
699
+ return e2();
700
+ } finally {
701
+ globalThis.__wix_context__ = t2, b.client = n2.client, b.elevatedClient = n2.elevatedClient, typeof $wixContext < `u` && ($wixContext.client = r2.client, $wixContext.elevatedClient = r2.elevatedClient);
702
+ }
703
+ }
704
+ function Lt(e2, t2) {
705
+ return (...n2) => {
706
+ let r2 = Ft();
707
+ return r2 ? r2.initWixModules(e2, t2).apply(void 0, n2) : e2.apply(void 0, n2);
708
+ };
709
+ }
710
+ function Rt(e2) {
711
+ let t2 = (...t3) => {
712
+ let n2 = Ft();
713
+ return n2 ? n2.initWixModules(e2).apply(void 0, t3) : () => ({ slug: e2.type });
714
+ };
715
+ return t2.__type = e2.__type, t2.type = e2.type, t2.isDomainEvent = e2.isDomainEvent, t2.transformations = e2.transformations, t2;
716
+ }
717
+ function L(e2, t2 = false) {
718
+ return Lt(e2, t2);
719
+ }
720
+ function zt(e2, t2) {
721
+ let n2 = Bt(e2), r2 = Object.entries(n2).some(([e3, t3]) => e3.includes(`.`) || Array.isArray(t3) && t3.some((e4) => typeof e4 == `object`));
722
+ return t2 && r2 ? new URLSearchParams({ ".r": Ht(JSON.stringify(e2)) }) : Object.entries(n2).reduce((e3, [t3, n3]) => ((Array.isArray(n3) ? n3 : [n3]).forEach((r3) => {
723
+ r3 == null || Array.isArray(n3) && typeof r3 == `object` || e3.append(t3, r3);
724
+ }), e3), new URLSearchParams());
725
+ }
726
+ function R(e2) {
727
+ let t2 = tn($t(e2.host), e2.domainToMappings);
728
+ return dn(cn(e2.protoPath, e2.data || {}), t2);
729
+ }
730
+ function Bt(e2, t2 = ``) {
731
+ let n2 = {};
732
+ return Object.entries(e2).forEach(([e3, r2]) => {
733
+ let i2 = typeof r2 == `object` && !!r2 && !Array.isArray(r2), a2 = Vt(t2, e3);
734
+ if (i2) {
735
+ let e4 = Bt(r2, a2);
736
+ Object.assign(n2, e4);
737
+ } else n2[a2] = r2;
738
+ }), n2;
739
+ }
740
+ function Vt(e2, t2) {
741
+ return `${e2}${e2 ? `.` : ``}${t2}`;
742
+ }
743
+ var Ht = (e2) => {
744
+ let t2 = new TextEncoder().encode(e2);
745
+ return (typeof btoa < `u` ? btoa(String.fromCodePoint(...t2)) : Buffer.from(e2, `utf-8`).toString(`base64`)).replace(/=/g, ``).replace(/\+/g, `-`).replace(/\//g, `_`);
746
+ };
747
+ var Ut = [`wix.com`, `editorx.com`];
748
+ var Wt = `_`;
749
+ var Gt = `*.`;
750
+ var Kt = RegExp(`\\.(${Ut.join(`|`)})$`);
751
+ var qt = [`42.wixprod.net`, `uw2-edt-1.wixprod.net`, `virginia-edt.wixprod.net`];
752
+ var Jt = { "payments.base44.com": `manage.wix.com`, "create.editorx.com": `editor.editorx.com` };
753
+ var Yt = `dev.wix-code.com`;
754
+ var Xt = /{(.*)}/;
755
+ var Zt = RegExp(`\\.(${qt.join(`|`)})$`);
756
+ var Qt = RegExp(`.*\\.${Yt}$`);
757
+ function $t(e2) {
758
+ return en(e2).replace(Kt, `._base_domain_`).replace(Zt, `._api_base_domain_`).replace(Qt, `*.dev.wix-code.com`);
759
+ }
760
+ function en(e2) {
761
+ return Jt[e2] ?? e2;
762
+ }
763
+ function tn(e2, t2) {
764
+ let n2 = t2[e2];
765
+ if (n2) return n2;
766
+ let r2 = nn(e2, t2) ?? rn(e2, t2);
767
+ if (!r2) {
768
+ if (on(e2)) {
769
+ let e3 = t2[sn];
770
+ if (e3) return e3;
771
+ }
772
+ let n3 = t2[Wt];
773
+ if (n3) return n3;
774
+ }
775
+ return r2 ?? [];
776
+ }
777
+ function nn(e2, t2) {
778
+ return Object.entries(t2).find(([t3]) => {
779
+ let [, ...n2] = e2.split(`.`);
780
+ return n2.join(`.`) === t3;
781
+ })?.[1];
782
+ }
783
+ function rn(e2, t2) {
784
+ let [n2] = Object.entries(t2).filter(([t3]) => an(e2, t3)).sort(([e3], [t3]) => t3.length - e3.length);
785
+ if (!n2) return;
786
+ let [, r2] = n2;
787
+ return r2;
788
+ }
789
+ function an(e2, t2) {
790
+ if (!t2.startsWith(Gt)) return false;
791
+ let n2 = t2.slice(1);
792
+ return e2.length > n2.length && e2.endsWith(n2);
793
+ }
794
+ function on(e2) {
795
+ return !!e2.match(/\._base_domain_$/);
796
+ }
797
+ var sn = `www._base_domain_`;
798
+ function cn(e2, t2) {
799
+ return e2.split(`/`).map((e3) => ln(e3, t2)).join(`/`);
800
+ }
801
+ function ln(e2, t2) {
802
+ let n2 = e2.match(Xt) || [], r2 = n2[1];
803
+ return r2 ? un(t2, r2, e2, e2.replace(n2[0], ``)) : e2;
804
+ }
805
+ function un(e2, t2, n2, r2) {
806
+ let i2 = e2;
807
+ for (let e3 of t2.split(`.`)) {
808
+ if (!i2) return n2;
809
+ i2 = i2[e3];
810
+ }
811
+ return `${i2}${r2}`;
812
+ }
813
+ function dn(e2, t2) {
814
+ let n2 = t2?.find((t3) => e2.startsWith(t3.destPath));
815
+ return n2 ? n2.srcPath + e2.slice(n2.destPath.length) : e2;
816
+ }
817
+ function z(e2) {
818
+ return Rt(e2);
819
+ }
820
+ function fn(e2) {
821
+ return isFinite(e2) ? e2 : e2.toString();
822
+ }
823
+ function B(e2) {
824
+ return e2 === `NaN` ? NaN : e2 === `Infinity` ? 1 / 0 : e2 === `-Infinity` ? -1 / 0 : e2;
825
+ }
826
+ function pn(e2) {
827
+ return e2 && vt({ city: e2.city, hint: e2.hint, subdivision: e2.subdivision, country: e2.country, postalCode: e2.postalCode, formattedAddress: e2.formatted, geocode: e2.location, addressLine: e2.addressLine1, addressLine2: e2.addressLine2, streetAddress: e2.streetAddress && { name: e2.streetAddress.name, number: e2.streetAddress.number, apt: e2.streetAddress.apt, formattedAddressLine: e2.streetAddress.formattedAddressLine } });
828
+ }
829
+ function mn(e2) {
830
+ return e2 && vt({ 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 });
831
+ }
832
+ var hn = `x-wix-linguist`;
833
+ var gn = `00000000-0000-0000-0000-000000000000`;
834
+ var _n = `false`;
835
+ var vn = () => {
836
+ let e2 = xn(`language`), t2 = xn(`locale`);
837
+ if (e2) return { [hn]: [e2, t2 || e2, _n, gn].join(`|`) };
838
+ };
839
+ function yn() {
840
+ let e2 = null, t2 = null;
841
+ return { promise: new Promise((n2, r2) => {
842
+ e2 = n2, t2 = r2;
843
+ }), resolve: e2, reject: t2 };
844
+ }
845
+ var bn = () => (typeof window < `u` ? window.commonConfig : void 0) ?? globalThis.commonConfig;
846
+ var xn = (e2) => bn()?.[e2];
847
+ var Sn = ({ createHost: e2 }) => ({ __type: `host`, create: (e3) => ({}), host: (t2) => {
848
+ let { applicationId: n2, componentId: r2 } = t2 ?? {}, i2 = typeof window < `u` ? window.wixEmbedsAPI : void 0, a2 = e2(t2), o2 = wn();
849
+ return { ...a2, apiBaseUrl: o2, getMonitoringClient: i2?.getMonitoringClientFunction?.(n2, r2), essentials: { language: xn(`language`), locale: xn(`locale`), get passThroughHeaders() {
850
+ return vn();
851
+ } } };
852
+ }, auth: (e3) => {
853
+ let t2 = typeof window < `u` ? window.wixEmbedsAPI : void 0;
854
+ !e3 && Cn() && (e3 = t2?.getAccessTokenFunction?.());
855
+ let n2 = false, { resolve: r2, promise: i2 } = yn();
856
+ return { getAuthHeaders: async () => {
857
+ if (!e3 && n2 && (e3 = await i2), !e3) throw Error(`Failed to resolve auth token`);
858
+ return { headers: { Authorization: await e3() } };
859
+ }, getAccessTokenInjector: () => (n2 = true, (e4) => {
860
+ r2(e4);
861
+ }) };
862
+ } });
863
+ function Cn() {
864
+ return typeof document < `u` && document.currentScript?.tagName === `SCRIPT`;
865
+ }
866
+ function wn() {
867
+ let e2 = (typeof window < `u` ? window.wixEmbedsAPI : void 0)?.getExternalBaseUrl?.();
868
+ if (!e2) return;
869
+ let t2 = new URL(e2);
870
+ return t2?.pathname && t2.pathname !== `/` ? `${t2.hostname}${t2.pathname}` : t2.hostname;
871
+ }
872
+ var Tn = ({ clientSdk: e2, applicationId: t2 }) => ({ invoke: async ({ namespace: n2, method: r2, args: i2 }) => {
873
+ 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`);
874
+ return e2.invoke({ namespace: n2, method: r2, args: i2, applicationId: t2, accessToken: `accessToken` });
875
+ }, getAccessToken: () => {
876
+ throw Error(`Not implemented`);
877
+ }, observeState: () => ({ disconnect: () => {
878
+ } }) });
879
+ var En = Sn({ createHost: function(e2) {
880
+ let t2 = (typeof $wixContext < `u` ? $wixContext.clientSdk : void 0) ?? e2?.clientSdk ?? (typeof window < `u` ? window?.clientSdk : void 0), { applicationId: n2 } = e2 || {};
881
+ if (!n2) throw Error(`"createHost" was called without a required field "applicationId"`);
882
+ return { channel: Tn({ clientSdk: t2, applicationId: n2 }), close: () => {
883
+ } };
884
+ } });
885
+ var Dn = (e2, t2) => {
886
+ let n2 = En.host({ applicationId: e2, componentId: t2 }), r2 = En.auth();
887
+ return Ge({ auth: r2, host: n2 }).enableContext(`module`), r2.getAccessTokenInjector();
888
+ };
889
+ var On = (e2) => Dn(`215238eb-22a5-4c36-9e7b-e7c08025e04e`, e2);
890
+ function kn(e2) {
891
+ if (e2.status === `fulfilled`) return e2.value;
892
+ throw e2.status === `rejected` ? e2.reason : e2.status === `pending` ? e2 : (e2.status = `pending`, e2.then((t2) => {
893
+ e2.status = `fulfilled`, e2.value = t2;
894
+ }, (t2) => {
895
+ e2.status = `rejected`, e2.reason = t2;
896
+ }), e2);
897
+ }
898
+ function An(e2) {
899
+ return Object.keys(e2).length === 1 && `$and` in e2 && Array.isArray(e2.$and);
900
+ }
901
+ function jn(e2) {
902
+ return Object.keys(e2).length === 1 && `$or` in e2 && Array.isArray(e2.$or);
903
+ }
904
+ function Mn(e2) {
905
+ return Object.keys(e2).length === 1 && `$not` in e2 && typeof e2.$not == `object`;
906
+ }
907
+ function V(e2, t2) {
908
+ return e2 === void 0 || Object.keys(e2).length === 0 ? t2 : t2 === void 0 || Object.keys(t2).length === 0 ? e2 : { $and: [...An(e2) ? e2.$and : [e2], ...An(t2) ? t2.$and : [t2]] };
909
+ }
910
+ function Nn(e2, t2) {
911
+ return e2 === void 0 || Object.keys(e2).length === 0 ? t2 : t2 === void 0 || Object.keys(t2).length === 0 ? e2 : { $or: [...jn(e2) ? e2.$or : [e2], ...jn(t2) ? t2.$or : [t2]] };
912
+ }
913
+ function Pn(e2) {
914
+ if (e2 !== void 0 && Object.keys(e2).length !== 0) return Mn(e2) ? e2.$not : { $not: e2 };
915
+ }
916
+ var Fn = class {
917
+ _items;
918
+ _fetchNextPage;
919
+ _fetchPrevPage;
920
+ _originQuery;
921
+ _limit;
922
+ constructor({ items: e2, originQuery: t2, fetchNextPage: n2, fetchPrevPage: r2, limit: i2 }) {
923
+ this._items = e2, this._fetchNextPage = n2, this._fetchPrevPage = r2, this._originQuery = t2, this._limit = i2;
924
+ }
925
+ get items() {
926
+ return this._items;
927
+ }
928
+ get length() {
929
+ return this._items.length;
930
+ }
931
+ get pageSize() {
932
+ return this._limit;
933
+ }
934
+ get query() {
935
+ return this._originQuery;
936
+ }
937
+ async next() {
938
+ if (!this.hasNext()) throw Error(`No next page to fetch`);
939
+ return await this._fetchNextPage();
940
+ }
941
+ async prev() {
942
+ if (!this.hasPrev()) throw Error(`No previous page to fetch`);
943
+ return await this._fetchPrevPage();
944
+ }
945
+ };
946
+ var In = class extends Fn {
947
+ _nextCursor;
948
+ _prevCursor;
949
+ cursors;
950
+ constructor({ items: e2, originQuery: t2, fetchNextPage: n2, fetchPrevPage: r2, limit: i2, nextCursor: a2, prevCursor: o2 }) {
951
+ super({ items: e2, originQuery: t2, fetchNextPage: n2, fetchPrevPage: r2, limit: i2 }), this._nextCursor = a2, this._prevCursor = o2, this.cursors = { next: a2, prev: o2 };
952
+ }
953
+ hasNext() {
954
+ return !!this._nextCursor;
955
+ }
956
+ hasPrev() {
957
+ return !!this._prevCursor;
958
+ }
959
+ };
960
+ var Ln = class extends Fn {
961
+ _totalCount;
962
+ _offset;
963
+ _tooManyToCount;
964
+ constructor({ items: e2, fetchNextPage: t2, fetchPrevPage: n2, offset: r2, originQuery: i2, limit: a2, totalCount: o2, tooManyToCount: s2 }) {
965
+ super({ items: e2, fetchNextPage: t2, fetchPrevPage: n2, originQuery: i2, limit: a2 }), this._totalCount = o2, this._offset = r2, this._tooManyToCount = s2;
966
+ }
967
+ get currentPage() {
968
+ return this._limit === 0 ? void 0 : Math.floor(this._offset / this._limit);
969
+ }
970
+ get totalPages() {
971
+ return this._tooManyToCount || this._limit === 0 ? void 0 : Math.ceil(this._totalCount / this._limit);
972
+ }
973
+ get totalCount() {
974
+ return this._tooManyToCount ? void 0 : this._totalCount;
975
+ }
976
+ hasNext() {
977
+ return this._limit !== 0 && this.currentPage !== void 0 && this.totalPages !== void 0 && this.currentPage < this.totalPages - 1;
978
+ }
979
+ hasPrev() {
980
+ return !!(this._limit !== 0 && this.currentPage && this.currentPage > 0);
981
+ }
982
+ };
983
+ function Rn(e2) {
984
+ let t2 = (n2) => ({ query: n2, async find() {
985
+ try {
986
+ let r2 = e2.requestTransformer(e2.pagingMethod === `CURSOR` && n2.cursorPaging.cursor ? { cursorPaging: n2.cursorPaging } : n2), i2 = await e2.func(r2), { [Xe]: a2, [Ze]: o2 } = e2.responseTransformer(i2);
987
+ if (e2.pagingMethod === `OFFSET`) {
988
+ let e3 = n2;
989
+ return new Ln({ 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 });
990
+ }
991
+ let s2 = n2.cursorPaging;
992
+ return new In({ 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 });
993
+ } catch (t3) {
994
+ throw e2.errorTransformer(t3);
995
+ }
996
+ }, skipTo(e3) {
997
+ return t2({ ...n2, cursorPaging: { cursor: e3, limit: n2.cursorPaging.limit } });
998
+ }, eq(r2, i2) {
999
+ let a2 = i2 === void 0 ? null : i2, o2 = { [H(e2.transformationPaths, r2)]: a2 };
1000
+ return t2({ ...n2, filter: V(n2.filter, o2) });
1001
+ }, ne(r2, i2) {
1002
+ let a2 = i2 === void 0 ? null : i2, o2 = { [H(e2.transformationPaths, r2)]: { $ne: a2 } };
1003
+ return t2({ ...n2, filter: V(n2.filter, o2) });
1004
+ }, ge(r2, i2) {
1005
+ let a2 = { [H(e2.transformationPaths, r2)]: { $gte: i2 } };
1006
+ return t2({ ...n2, filter: V(n2.filter, a2) });
1007
+ }, gt(r2, i2) {
1008
+ let a2 = { [H(e2.transformationPaths, r2)]: { $gt: i2 } };
1009
+ return t2({ ...n2, filter: V(n2.filter, a2) });
1010
+ }, le(r2, i2) {
1011
+ let a2 = { [H(e2.transformationPaths, r2)]: { $lte: i2 } };
1012
+ return t2({ ...n2, filter: V(n2.filter, a2) });
1013
+ }, lt(r2, i2) {
1014
+ let a2 = { [H(e2.transformationPaths, r2)]: { $lt: i2 } };
1015
+ return t2({ ...n2, filter: V(n2.filter, a2) });
1016
+ }, isNotEmpty(e3) {
1017
+ return this.ne(e3, null);
1018
+ }, isEmpty(e3) {
1019
+ return this.eq(e3, null);
1020
+ }, startsWith(r2, i2) {
1021
+ let a2 = { [H(e2.transformationPaths, r2)]: { $startsWith: i2 } };
1022
+ return t2({ ...n2, filter: V(n2.filter, a2) });
1023
+ }, endsWith(r2, i2) {
1024
+ let a2 = { [H(e2.transformationPaths, r2)]: { $endsWith: i2 } };
1025
+ return t2({ ...n2, filter: V(n2.filter, a2) });
1026
+ }, contains(r2, i2) {
1027
+ let a2 = { [H(e2.transformationPaths, r2)]: { $contains: i2 } };
1028
+ return t2({ ...n2, filter: V(n2.filter, a2) });
1029
+ }, hasSome(r2, ...i2) {
1030
+ let a2 = { [H(e2.transformationPaths, r2)]: { $hasSome: Array.isArray(i2[0]) ? i2[0] : i2 } };
1031
+ return t2({ ...n2, filter: V(n2.filter, a2) });
1032
+ }, hasAll(r2, ...i2) {
1033
+ let a2 = { [H(e2.transformationPaths, r2)]: { $hasAll: Array.isArray(i2[0]) ? i2[0] : i2 } };
1034
+ return t2({ ...n2, filter: V(n2.filter, a2) });
1035
+ }, between(e3, t3, n3) {
1036
+ return this.ge(e3, t3).lt(e3, n3);
1037
+ }, in(r2, i2) {
1038
+ let a2 = { [H(e2.transformationPaths, r2)]: { $in: i2 } };
1039
+ return t2({ ...n2, filter: V(n2.filter, a2) });
1040
+ }, exists(r2, i2 = true) {
1041
+ let a2 = { [H(e2.transformationPaths, r2)]: { $exists: i2 } };
1042
+ return t2({ ...n2, filter: V(n2.filter, a2) });
1043
+ }, or(e3) {
1044
+ return t2({ ...n2, filter: Nn(n2.filter, e3.query.filter) });
1045
+ }, and(e3) {
1046
+ return t2({ ...n2, filter: V(n2.filter, e3.query.filter) });
1047
+ }, not(e3) {
1048
+ return t2({ ...n2, filter: Pn(e3.query.filter) });
1049
+ }, ascending(...r2) {
1050
+ return t2({ ...n2, sort: [...n2.sort ?? [], ...r2.map((t3) => ({ fieldName: H(e2.transformationPaths, t3), order: `ASC` }))] });
1051
+ }, descending(...r2) {
1052
+ return t2({ ...n2, sort: [...n2.sort ?? [], ...r2.map((t3) => ({ fieldName: H(e2.transformationPaths, t3), order: `DESC` }))] });
1053
+ }, skip(e3) {
1054
+ return t2({ ...n2, paging: { offset: e3, limit: `limit` in n2.paging ? n2.paging.limit : 50 } });
1055
+ }, limit(r2) {
1056
+ if (e2.pagingMethod === `CURSOR`) {
1057
+ let e3 = n2;
1058
+ return t2({ ...n2, cursorPaging: { limit: r2, cursor: `cursor` in e3.cursorPaging ? e3.cursorPaging.cursor : void 0 } });
1059
+ }
1060
+ let i2 = n2;
1061
+ return t2({ ...n2, paging: { limit: r2, offset: `offset` in i2.paging ? i2.paging.offset : 0 } });
1062
+ } });
1063
+ return t2({ filter: {}, ...e2.pagingMethod === `OFFSET` ? { paging: { offset: 0, limit: 50 } } : { cursorPaging: { limit: 50 } } });
1064
+ }
1065
+ function H(e2, t2) {
1066
+ let n2 = Object.entries(e2).find(([e3]) => e3 === t2 || t2.startsWith(`${e3}.`))?.[0];
1067
+ return n2 ? t2.replace(n2, e2[n2]) : $e(t2, { ...e2, ...Qe });
1068
+ }
1069
+ function zn(e2, t2, n2 = {}) {
1070
+ let r2 = (r3, i3) => zn(e2, t2, { ...n2, [r3]: i3 }), i2 = () => Object.keys(n2).length === 0 ? {} : { [j(e2, t2)]: n2 };
1071
+ return { get filter() {
1072
+ return i2();
1073
+ }, 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) };
1074
+ }
1075
+ function Bn(e2) {
1076
+ return Object.assign((t2) => zn(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 } }) });
1077
+ }
1078
+ function Vn(e2) {
1079
+ return (t2) => ({ asc: () => ({ sort: { fieldName: j(t2, e2), order: `ASC` } }), desc: () => ({ sort: { fieldName: j(t2, e2), order: `DESC` } }) });
1080
+ }
1081
+ function Hn(e2) {
1082
+ return () => {
1083
+ let t2 = {}, n2 = { withFilter(e3) {
1084
+ return t2 = { ...t2, filter: e3.filter }, n2;
1085
+ }, withFields(...r2) {
1086
+ return t2 = { ...t2, fields: r2.map((t3) => j(t3, e2)) }, n2;
1087
+ }, withSorting(...e3) {
1088
+ return t2 = { ...t2, sort: e3.map((e4) => e4.sort) }, n2;
1089
+ }, withPaging(e3) {
1090
+ return t2 = { ...t2, paging: e3 }, n2;
1091
+ }, build() {
1092
+ return t2;
1093
+ } };
1094
+ return n2;
1095
+ };
1096
+ }
1097
+ function Un(e2) {
1098
+ return { QueryBuilder: Hn(e2), Filter: Bn(e2), Sort: Vn(e2) };
1099
+ }
1100
+ var Wn = `filter`;
1101
+ var Gn = `sort`;
1102
+ var Kn = `cursorPaging`;
1103
+ var qn = `paging`;
1104
+ var Jn = [Wn, Gn, Kn];
1105
+ var Yn = [Wn, Gn, qn];
1106
+ function Xn(e2, t2) {
1107
+ return !e2 || typeof e2 != `object` ? false : t2.some((t3) => e2.hasOwnProperty(t3));
1108
+ }
1109
+ function Zn(e2) {
1110
+ return Xn(e2, Jn);
1111
+ }
1112
+ function Qn(e2) {
1113
+ return Xn(e2, Yn);
1114
+ }
1115
+ function $n(e2) {
1116
+ let { hasOptionsParameter: t2 } = e2;
1117
+ return function(...n2) {
1118
+ return t2 ? tr(n2, e2) : er(n2, e2);
1119
+ };
1120
+ }
1121
+ function er(e2, t2) {
1122
+ return e2.length === 0 ? t2.builderQueryFunction() : t2.typedQueryFunction(e2[0]);
1123
+ }
1124
+ function tr(e2, t2) {
1125
+ switch (e2.length) {
1126
+ case 0:
1127
+ return t2.builderQueryFunction();
1128
+ case 1:
1129
+ return Zn(e2[0]) || Qn(e2[0]) ? t2.typedQueryFunction(e2[0]) : t2.builderQueryFunction(e2[0]);
1130
+ default:
1131
+ return t2.typedQueryFunction(e2[0], e2[1]);
1132
+ }
1133
+ }
1134
+ function nr(e2) {
1135
+ if (!e2) return;
1136
+ let t2 = _t(e2, `image`), { protocol: n2, hash: r2, pathname: i2 } = new URL(t2), a2 = new URLSearchParams(r2.replace(`#`, ``)), o2 = a2.get(`originHeight`), s2 = a2.get(`originWidth`), [c2, l2] = i2.replace(`image://v1/`, ``).split(`/`), u2 = decodeURIComponent(l2);
1137
+ if (n2 === `wix:`) {
1138
+ let t3 = { id: c2, height: Number(o2), width: Number(s2) };
1139
+ return u2 ? { ...t3, altText: u2, filename: u2, url: e2 } : t3;
1140
+ }
1141
+ return { url: e2 };
1142
+ }
1143
+ function U(e2) {
1144
+ if (!e2) return;
1145
+ let t2 = ``;
1146
+ 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;
1147
+ }
1148
+ function rr(e2) {
1149
+ if (!e2) return;
1150
+ let t2 = ``;
1151
+ e2?.filename && (t2 = `/${encodeURIComponent(e2.filename)}`);
1152
+ let n2 = ``;
1153
+ if (e2.posters?.length) {
1154
+ let [t3, r2] = e2.posters, i2 = r2 || t3, a2 = i2.id || ``;
1155
+ if (!a2 && i2.url) {
1156
+ let e3 = i2.url.lastIndexOf(`/`);
1157
+ e3 !== -1 && (a2 = i2.url.substring(e3 + 1));
1158
+ }
1159
+ a2 && (n2 = `#posterUri=${a2}&posterWidth=${i2.width}&posterHeight=${i2.height}`);
1160
+ }
1161
+ return e2.id ? `wix:video://v1/${e2.id}${t2}${n2}` : e2.url;
1162
+ }
1163
+ function ir(e2) {
1164
+ let t2 = {}, n2 = { get search() {
1165
+ return t2;
1166
+ }, expression(e3) {
1167
+ return t2 = { ...t2, expression: e3 }, n2;
1168
+ }, mode(e3) {
1169
+ return t2 = { ...t2, mode: e3 }, n2;
1170
+ }, fields(r2) {
1171
+ return t2 = { ...t2, fields: r2.map((t3) => j(t3, e2)) }, n2;
1172
+ }, fuzzy(e3 = true) {
1173
+ return t2 = { ...t2, fuzzy: e3 }, n2;
1174
+ } };
1175
+ return n2;
1176
+ }
1177
+ function ar(e2) {
1178
+ return (t2) => {
1179
+ let n2 = ir(e2);
1180
+ return t2 === void 0 ? n2 : n2.expression(t2);
1181
+ };
1182
+ }
1183
+ function or(e2) {
1184
+ let t2 = { ...e2, type: `VALUE`, value: { ...e2.value } }, n2 = { get aggregation() {
1185
+ return t2;
1186
+ }, sortBy(e3, r2) {
1187
+ return t2 = { ...t2, value: { ...t2.value, sortType: e3, sortDirection: r2 } }, n2;
1188
+ }, limit(e3) {
1189
+ return t2 = { ...t2, value: { ...t2.value, limit: e3 } }, n2;
1190
+ }, excludeMissingValues() {
1191
+ return t2 = { ...t2, value: { ...t2.value, missingValues: `EXCLUDE` } }, n2;
1192
+ }, includeMissingValues() {
1193
+ return t2 = { ...t2, value: { ...t2.value, missingValues: `INCLUDE` } }, n2;
1194
+ }, includeValues(e3) {
1195
+ return t2 = { ...t2, value: { ...t2.value, includeOptions: { addToBucket: e3 } } }, n2;
1196
+ } };
1197
+ return n2;
1198
+ }
1199
+ function sr(e2) {
1200
+ let t2 = { ...e2, type: `RANGE`, range: { buckets: [] } }, n2 = { get aggregation() {
1201
+ return t2;
1202
+ }, withBuckets(...e3) {
1203
+ return t2 = { ...t2, range: { buckets: e3 } }, n2;
1204
+ } };
1205
+ return n2;
1206
+ }
1207
+ function cr(e2) {
1208
+ let t2 = { ...e2, type: `DATE_HISTOGRAM`, dateHistogram: {} }, n2 = { get aggregation() {
1209
+ return t2;
1210
+ }, interval(e3) {
1211
+ return t2 = { ...t2, dateHistogram: { interval: e3 } }, n2;
1212
+ } };
1213
+ return n2;
1214
+ }
1215
+ function lr(e2) {
1216
+ let t2 = { ...e2, type: `SCALAR`, scalar: {} }, n2 = { get aggregation() {
1217
+ return t2;
1218
+ }, type(e3) {
1219
+ return t2 = { ...t2, scalar: { type: e3 } }, n2;
1220
+ } };
1221
+ return n2;
1222
+ }
1223
+ function ur(e2) {
1224
+ let t2 = { ...e2, type: `NESTED`, nested: { nestedAggregations: [] } }, n2 = { get aggregation() {
1225
+ return t2;
1226
+ }, addNestedAggregation(e3) {
1227
+ let r2 = e3.aggregation, i2 = [...t2.nested?.nestedAggregations ?? [], r2];
1228
+ return t2 = { ...t2, nested: { nestedAggregations: i2 } }, n2;
1229
+ } };
1230
+ return n2;
1231
+ }
1232
+ function dr(e2, t2) {
1233
+ let n2 = { name: e2 }, r2 = { get aggregation() {
1234
+ return n2;
1235
+ }, ofType(e3) {
1236
+ return n2 = { ...n2, type: e3 }, r2;
1237
+ }, onField(e3) {
1238
+ return n2 = { ...n2, fieldPath: j(e3, t2) }, r2;
1239
+ }, asValueAggregation() {
1240
+ return or(n2);
1241
+ }, asRangeAggregation() {
1242
+ return sr(n2);
1243
+ }, asDateHistogramAggregation() {
1244
+ return cr(n2);
1245
+ }, asScalarAggregation() {
1246
+ return lr(n2);
1247
+ }, asNestedAggregation() {
1248
+ return ur(n2);
1249
+ } };
1250
+ return r2;
1251
+ }
1252
+ function fr(e2) {
1253
+ return (t2) => dr(t2, e2);
1254
+ }
1255
+ function pr() {
1256
+ return () => {
1257
+ let e2 = {}, t2 = { withFilter(n2) {
1258
+ return e2 = { ...e2, filter: n2.filter }, t2;
1259
+ }, withSearchClause(n2) {
1260
+ return e2 = { ...e2, search: n2.search }, t2;
1261
+ }, withSorting(...n2) {
1262
+ return e2 = { ...e2, sort: n2.map((e3) => e3.sort) }, t2;
1263
+ }, withAggregation(...n2) {
1264
+ return e2 = { ...e2, aggregations: n2.map((e3) => e3.aggregation) }, t2;
1265
+ }, withPaging(n2) {
1266
+ return e2 = { ...e2, paging: n2 }, t2;
1267
+ }, withTimeZone(n2) {
1268
+ return e2 = { ...e2, timeZone: n2 }, t2;
1269
+ }, build() {
1270
+ return e2;
1271
+ } };
1272
+ return t2;
1273
+ };
1274
+ }
1275
+ function mr(e2) {
1276
+ return { SearchBuilder: pr(), Filter: Bn(e2), Sort: Vn(e2), SearchParams: ar(e2), Aggregation: fr(e2) };
1277
+ }
1278
+ function hr(e2) {
1279
+ return R(Object.assign(e2, { domainToMappings: { "manage._base_domain_": [{ srcPath: `/inventory`, destPath: `` }], "api._api_base_domain_": [{ srcPath: `/inventory`, destPath: `` }], _: [{ srcPath: `/_api/inventory`, destPath: `` }], "editor._base_domain_": [{ srcPath: `/_api/inventory`, destPath: `` }], "blocks._base_domain_": [{ srcPath: `/_api/inventory`, destPath: `` }], "create.editorx": [{ srcPath: `/_api/inventory`, destPath: `` }], "www.wixapis.com": [{ srcPath: `/stores/v3/inventory-items`, destPath: `/v3/inventory-items` }, { srcPath: `/stores/v3/bulk/inventory-items`, destPath: `/v3/bulk/inventory-items` }], "*.dev.wix-code.com": [{ srcPath: `/_api/inventory`, destPath: `` }], "editor.wixapps.net": [{ srcPath: `/_api/inventory`, destPath: `` }] } }));
1280
+ }
1281
+ var gr = `@wix/auto_sdk_stores_inventory-items-v-3`;
1282
+ function _r(e2) {
1283
+ function t2({ host: t3 }) {
1284
+ return { entityFqdn: `wix.stores.catalog.v3.inventory_item`, method: `GET`, methodFqn: `com.wix.stores.catalog.inventory.api.v3.InventoryService.QueryInventoryItems`, packageName: gr, migrationOptions: { optInTransformResponse: true }, url: hr({ protoPath: `/v3/inventory-items/query`, data: e2, host: t3 }), params: zt(e2, true), transformResponse: (e3) => F(e3, [{ transformFn: P, paths: [{ path: `inventoryItems.createdDate` }, { path: `inventoryItems.updatedDate` }] }]), fallback: [{ method: `POST`, url: hr({ protoPath: `/v3/inventory-items/query`, data: e2, host: t3 }), data: e2 }] };
1285
+ }
1286
+ return t2;
1287
+ }
1288
+ var vr = ((e2) => (e2.OUT_OF_STOCK = `OUT_OF_STOCK`, e2.IN_STOCK = `IN_STOCK`, e2.PREORDER = `PREORDER`, e2))(vr || {});
1289
+ function yr() {
1290
+ let { httpClient: e2, sideEffects: t2 } = arguments[0];
1291
+ return Rn({ func: async (n2) => {
1292
+ let r2 = _r(n2);
1293
+ t2?.onSiteCall?.();
1294
+ try {
1295
+ let n3 = await e2.request(r2);
1296
+ return t2?.onSuccess?.(n3), n3;
1297
+ } catch (e3) {
1298
+ throw t2?.onError?.(e3), e3;
1299
+ }
1300
+ }, requestTransformer: (e3) => {
1301
+ let t3 = [e3, {}];
1302
+ return M({ ...t3?.[1], query: t3?.[0] });
1303
+ }, responseTransformer: ({ data: e3 }) => {
1304
+ let t3 = N(F(e3, []));
1305
+ return { items: t3?.inventoryItems, pagingMetadata: t3?.pagingMetadata };
1306
+ }, errorTransformer: (e3) => {
1307
+ throw I(e3, { spreadPathsToArguments: {}, explicitPathsToArguments: { query: `$[0]` }, singleArgumentUnchanged: false });
1308
+ }, pagingMethod: `CURSOR`, transformationPaths: {} });
1309
+ }
1310
+ async function br(e2) {
1311
+ let { httpClient: t2, sideEffects: n2 } = arguments[1], r2 = _r(M({ query: e2 }));
1312
+ n2?.onSiteCall?.();
1313
+ try {
1314
+ let e3 = await t2.request(r2);
1315
+ return n2?.onSuccess?.(e3), N(e3.data);
1316
+ } catch (e3) {
1317
+ let t3 = I(e3, { spreadPathsToArguments: {}, explicitPathsToArguments: { query: `$[0]` }, singleArgumentUnchanged: false }, [`query`]);
1318
+ throw n2?.onError?.(e3), t3;
1319
+ }
1320
+ }
1321
+ ({ ...Un() }, { ...mr() });
1322
+ function xr(e2) {
1323
+ return () => yr({ httpClient: e2 });
1324
+ }
1325
+ function Sr(e2) {
1326
+ return (t2) => br(t2, { httpClient: e2 });
1327
+ }
1328
+ var Cr = x(`wix.stores.catalog.v3.inventory_item_created`, true, (e2) => N(F(e2, [{ transformFn: P, paths: [{ path: `entity.createdDate` }, { path: `entity.updatedDate` }, { path: `metadata.eventTime` }] }])))();
1329
+ var wr = x(`wix.stores.catalog.v3.inventory_item_deleted`, true, (e2) => N(F(e2, [{ transformFn: P, paths: [{ path: `entity.createdDate` }, { path: `entity.updatedDate` }, { path: `metadata.eventTime` }] }])))();
1330
+ var Tr = x(`wix.stores.catalog.v3.inventory_item_stock_status_updated`, true, (e2) => N(F(e2, [{ transformFn: P, paths: [{ path: `metadata.eventTime` }] }])))();
1331
+ var Er = x(`wix.stores.catalog.v3.inventory_item_updated`, true, (e2) => N(F(e2, [{ transformFn: P, paths: [{ path: `entity.createdDate` }, { path: `entity.updatedDate` }, { path: `metadata.eventTime` }, { path: `modifiedFields.createdDate` }, { path: `modifiedFields.updatedDate` }] }])))();
1332
+ var Dr = x(`wix.stores.catalog.v3.inventory_item_updated_with_reason`, true, (e2) => N(F(e2, [{ transformFn: P, paths: [{ path: `data.currentEntity.createdDate` }, { path: `data.currentEntity.updatedDate` }, { path: `metadata.eventTime` }] }])))();
1333
+ function Or(e2) {
1334
+ let t2 = $n({ builderQueryFunction: () => xr(e2)(), typedQueryFunction: (t3) => Sr(e2)(t3), hasOptionsParameter: false });
1335
+ function n2(e3) {
1336
+ return t2(...arguments);
1337
+ }
1338
+ return n2;
1339
+ }
1340
+ var kr = L(Or);
1341
+ z(Cr), z(wr), z(Tr), z(Er), z(Dr);
1342
+ function Ar(e2) {
1343
+ if (!e2) return;
1344
+ let { pathname: t2 } = new URL(e2);
1345
+ return { relativePath: t2, url: e2 };
1346
+ }
1347
+ function W(e2) {
1348
+ if (e2) return e2.url;
1349
+ }
1350
+ function jr(e2) {
1351
+ return R(Object.assign(e2, { domainToMappings: { "api._api_base_domain_": [{ srcPath: `/stores-catalog-orchestrator`, destPath: `` }], "manage._base_domain_": [{ srcPath: `/stores`, destPath: `` }], "www.wixapis.com": [{ srcPath: `/stores/v3/products`, destPath: `/v3/products` }, { srcPath: `/stores/v3/bulk/products`, destPath: `/v3/bulk/products` }, { srcPath: `/stores/v3/products-with-inventory`, destPath: `/v3/products-with-inventory` }, { srcPath: `/stores/v3/bulk/products-with-inventory`, destPath: `/v3/bulk/products-with-inventory` }, { srcPath: `/stores/v3/all-products-category`, destPath: `/v3/all-products-category` }], "www._base_domain_": [{ srcPath: `/_api/stores-catalog-orchestrator`, destPath: `` }], "editor._base_domain_": [{ srcPath: `/_api/stores-catalog-orchestrator`, destPath: `` }], "blocks._base_domain_": [{ srcPath: `/_api/stores-catalog-orchestrator`, destPath: `` }], "create.editorx": [{ srcPath: `/_api/stores-catalog-orchestrator`, destPath: `` }], "editor.wixapps.net": [{ srcPath: `/_api/stores-catalog-orchestrator`, destPath: `` }], "*.dev.wix-code.com": [{ srcPath: `/_api/stores-catalog-orchestrator`, destPath: `` }], _: [{ srcPath: `/_api/stores-catalog-orchestrator`, destPath: `` }] } }));
1352
+ }
1353
+ var Mr = `@wix/auto_sdk_stores_products-v-3`;
1354
+ function Nr(e2) {
1355
+ function t2({ host: t3 }) {
1356
+ return { entityFqdn: `wix.stores.catalog.v3.product`, method: `GET`, methodFqn: `wix.stores.catalog.v3.CatalogApi.GetProductBySlug`, packageName: Mr, migrationOptions: { optInTransformResponse: true }, url: jr({ protoPath: `/v3/products/slug/{slug}`, data: e2, host: t3 }), params: zt(e2), transformResponse: (e3) => F(e3, [{ transformFn: P, paths: [{ path: `product.createdDate` }, { path: `product.updatedDate` }, { path: `product.description.metadata.createdTimestamp` }, { path: `product.description.metadata.updatedTimestamp` }, { path: `product.media.main.image.urlExpirationDate` }, { path: `product.media.main.video.urlExpirationDate` }, { path: `product.media.main.video.resolutions.urlExpirationDate` }, { path: `product.media.main.video.resolutions.poster.urlExpirationDate` }, { path: `product.media.main.video.posters.urlExpirationDate` }, { path: `product.media.itemsInfo.items.image.urlExpirationDate` }, { path: `product.media.itemsInfo.items.video.urlExpirationDate` }, { path: `product.media.itemsInfo.items.video.resolutions.urlExpirationDate` }, { path: `product.media.itemsInfo.items.video.resolutions.poster.urlExpirationDate` }, { path: `product.media.itemsInfo.items.video.posters.urlExpirationDate` }, { path: `product.options.choicesSettings.choices.image.urlExpirationDate` }, { path: `product.options.choicesSettings.choices.linkedMedia.image.urlExpirationDate` }, { path: `product.options.choicesSettings.choices.linkedMedia.video.urlExpirationDate` }, { path: `product.options.choicesSettings.choices.linkedMedia.video.resolutions.urlExpirationDate` }, { path: `product.options.choicesSettings.choices.linkedMedia.video.resolutions.poster.urlExpirationDate` }, { path: `product.options.choicesSettings.choices.linkedMedia.video.posters.urlExpirationDate` }, { path: `product.options.choicesSettings.choices.displayImage.urlExpirationDate` }, { path: `product.modifiers.choicesSettings.choices.image.urlExpirationDate` }, { path: `product.modifiers.choicesSettings.choices.linkedMedia.image.urlExpirationDate` }, { path: `product.modifiers.choicesSettings.choices.linkedMedia.video.urlExpirationDate` }, { path: `product.modifiers.choicesSettings.choices.linkedMedia.video.resolutions.urlExpirationDate` }, { path: `product.modifiers.choicesSettings.choices.linkedMedia.video.resolutions.poster.urlExpirationDate` }, { path: `product.modifiers.choicesSettings.choices.linkedMedia.video.posters.urlExpirationDate` }, { path: `product.modifiers.choicesSettings.choices.displayImage.urlExpirationDate` }, { path: `product.infoSections.description.metadata.createdTimestamp` }, { path: `product.infoSections.description.metadata.updatedTimestamp` }, { path: `product.variantsInfo.variants.media.image.urlExpirationDate` }, { path: `product.variantsInfo.variants.media.video.urlExpirationDate` }, { path: `product.variantsInfo.variants.media.video.resolutions.urlExpirationDate` }, { path: `product.variantsInfo.variants.media.video.resolutions.poster.urlExpirationDate` }, { path: `product.variantsInfo.variants.media.video.posters.urlExpirationDate` }, { path: `product.variantSummary.minPriceVariant.media.image.urlExpirationDate` }, { path: `product.variantSummary.minPriceVariant.media.video.urlExpirationDate` }, { path: `product.variantSummary.minPriceVariant.media.video.resolutions.urlExpirationDate` }, { path: `product.variantSummary.minPriceVariant.media.video.resolutions.poster.urlExpirationDate` }, { path: `product.variantSummary.minPriceVariant.media.video.posters.urlExpirationDate` }] }, { transformFn: B, paths: [{ path: `product.physicalProperties.pricePerUnit.quantity` }, { path: `product.physicalProperties.shippingWeightRange.minValue` }, { path: `product.physicalProperties.shippingWeightRange.maxValue` }, { path: `product.variantsInfo.variants.physicalProperties.pricePerUnit.settings.quantity` }, { path: `product.variantsInfo.variants.revenueDetails.profitMargin` }, { path: `product.subscriptionDetails.subscriptions.discount.percentOff` }, { path: `product.variantSummary.minPriceVariant.physicalProperties.pricePerUnit.settings.quantity` }, { path: `product.variantSummary.minPriceVariant.revenueDetails.profitMargin` }, { path: `product.minVariantPriceInfo.pricePerUnitData.settings.quantity` }, { path: `product.minVariantPriceInfo.revenueDetails.profitMargin` }, { path: `product.description.nodes.buttonData.styles.background.gradient.centerX` }, { path: `product.description.nodes.buttonData.styles.background.gradient.centerY` }, { path: `product.description.nodes.buttonData.styles.background.gradient.stops.position` }, { path: `product.description.nodes.buttonData.styles.backgroundHover.gradient.centerX` }, { path: `product.description.nodes.buttonData.styles.backgroundHover.gradient.centerY` }, { path: `product.description.nodes.buttonData.styles.backgroundHover.gradient.stops.position` }, { path: `product.description.nodes.galleryData.items.image.media.duration` }, { path: `product.description.nodes.galleryData.items.video.media.duration` }, { path: `product.description.nodes.galleryData.items.video.thumbnail.duration` }, { path: `product.description.nodes.galleryData.options.item.ratio` }, { path: `product.description.nodes.imageData.image.duration` }, { path: `product.description.nodes.imageData.crop.x` }, { path: `product.description.nodes.imageData.crop.y` }, { path: `product.description.nodes.imageData.crop.width` }, { path: `product.description.nodes.imageData.crop.height` }, { path: `product.description.nodes.mapData.mapSettings.lat` }, { path: `product.description.nodes.mapData.mapSettings.lng` }, { path: `product.description.nodes.pollData.poll.image.duration` }, { path: `product.description.nodes.pollData.poll.options.image.duration` }, { path: `product.description.nodes.pollData.design.poll.background.image.duration` }, { path: `product.description.nodes.appEmbedData.image.duration` }, { path: `product.description.nodes.videoData.video.duration` }, { path: `product.description.nodes.videoData.thumbnail.duration` }, { path: `product.description.nodes.audioData.audio.duration` }, { path: `product.description.nodes.audioData.coverImage.duration` }, { path: `product.description.nodes.layoutData.backgroundImage.media.duration` }, { path: `product.description.nodes.layoutData.backgroundImage.overlay.gradient.centerX` }, { path: `product.description.nodes.layoutData.backgroundImage.overlay.gradient.centerY` }, { path: `product.description.nodes.layoutData.backgroundImage.overlay.gradient.stops.position` }, { path: `product.description.nodes.layoutData.backdropImage.media.duration` }, { path: `product.description.nodes.layoutData.backdropImage.overlay.gradient.centerX` }, { path: `product.description.nodes.layoutData.backdropImage.overlay.gradient.centerY` }, { path: `product.description.nodes.layoutData.backdropImage.overlay.gradient.stops.position` }, { path: `product.description.nodes.layoutData.background.gradient.centerX` }, { path: `product.description.nodes.layoutData.background.gradient.centerY` }, { path: `product.description.nodes.layoutData.background.gradient.stops.position` }, { path: `product.description.nodes.layoutData.backdrop.gradient.centerX` }, { path: `product.description.nodes.layoutData.backdrop.gradient.centerY` }, { path: `product.description.nodes.layoutData.backdrop.gradient.stops.position` }, { path: `product.description.nodes.shapeData.shape.duration` }, { path: `product.description.nodes.cardData.background.gradient.centerX` }, { path: `product.description.nodes.cardData.background.gradient.centerY` }, { path: `product.description.nodes.cardData.background.gradient.stops.position` }, { path: `product.description.nodes.cardData.backgroundImage.media.duration` }, { path: `product.description.nodes.cardData.backgroundImage.overlay.gradient.centerX` }, { path: `product.description.nodes.cardData.backgroundImage.overlay.gradient.centerY` }, { path: `product.description.nodes.cardData.backgroundImage.overlay.gradient.stops.position` }, { path: `product.description.nodes.tocData.fontSize` }, { path: `product.description.nodes.tocData.itemSpacing` }, { path: `product.description.nodes.smartBlockCellData.shape.duration` }, { path: `product.infoSections.description.nodes.buttonData.styles.background.gradient.centerX` }, { path: `product.infoSections.description.nodes.buttonData.styles.background.gradient.centerY` }, { path: `product.infoSections.description.nodes.buttonData.styles.background.gradient.stops.position` }, { path: `product.infoSections.description.nodes.buttonData.styles.backgroundHover.gradient.centerX` }, { path: `product.infoSections.description.nodes.buttonData.styles.backgroundHover.gradient.centerY` }, { path: `product.infoSections.description.nodes.buttonData.styles.backgroundHover.gradient.stops.position` }, { path: `product.infoSections.description.nodes.galleryData.items.image.media.duration` }, { path: `product.infoSections.description.nodes.galleryData.items.video.media.duration` }, { path: `product.infoSections.description.nodes.galleryData.items.video.thumbnail.duration` }, { path: `product.infoSections.description.nodes.galleryData.options.item.ratio` }, { path: `product.infoSections.description.nodes.imageData.image.duration` }, { path: `product.infoSections.description.nodes.imageData.crop.x` }, { path: `product.infoSections.description.nodes.imageData.crop.y` }, { path: `product.infoSections.description.nodes.imageData.crop.width` }, { path: `product.infoSections.description.nodes.imageData.crop.height` }, { path: `product.infoSections.description.nodes.mapData.mapSettings.lat` }, { path: `product.infoSections.description.nodes.mapData.mapSettings.lng` }, { path: `product.infoSections.description.nodes.pollData.poll.image.duration` }, { path: `product.infoSections.description.nodes.pollData.poll.options.image.duration` }, { path: `product.infoSections.description.nodes.pollData.design.poll.background.image.duration` }, { path: `product.infoSections.description.nodes.appEmbedData.image.duration` }, { path: `product.infoSections.description.nodes.videoData.video.duration` }, { path: `product.infoSections.description.nodes.videoData.thumbnail.duration` }, { path: `product.infoSections.description.nodes.audioData.audio.duration` }, { path: `product.infoSections.description.nodes.audioData.coverImage.duration` }, { path: `product.infoSections.description.nodes.layoutData.backgroundImage.media.duration` }, { path: `product.infoSections.description.nodes.layoutData.backgroundImage.overlay.gradient.centerX` }, { path: `product.infoSections.description.nodes.layoutData.backgroundImage.overlay.gradient.centerY` }, { path: `product.infoSections.description.nodes.layoutData.backgroundImage.overlay.gradient.stops.position` }, { path: `product.infoSections.description.nodes.layoutData.backdropImage.media.duration` }, { path: `product.infoSections.description.nodes.layoutData.backdropImage.overlay.gradient.centerX` }, { path: `product.infoSections.description.nodes.layoutData.backdropImage.overlay.gradient.centerY` }, { path: `product.infoSections.description.nodes.layoutData.backdropImage.overlay.gradient.stops.position` }, { path: `product.infoSections.description.nodes.layoutData.background.gradient.centerX` }, { path: `product.infoSections.description.nodes.layoutData.background.gradient.centerY` }, { path: `product.infoSections.description.nodes.layoutData.background.gradient.stops.position` }, { path: `product.infoSections.description.nodes.layoutData.backdrop.gradient.centerX` }, { path: `product.infoSections.description.nodes.layoutData.backdrop.gradient.centerY` }, { path: `product.infoSections.description.nodes.layoutData.backdrop.gradient.stops.position` }, { path: `product.infoSections.description.nodes.shapeData.shape.duration` }, { path: `product.infoSections.description.nodes.cardData.background.gradient.centerX` }, { path: `product.infoSections.description.nodes.cardData.background.gradient.centerY` }, { path: `product.infoSections.description.nodes.cardData.background.gradient.stops.position` }, { path: `product.infoSections.description.nodes.cardData.backgroundImage.media.duration` }, { path: `product.infoSections.description.nodes.cardData.backgroundImage.overlay.gradient.centerX` }, { path: `product.infoSections.description.nodes.cardData.backgroundImage.overlay.gradient.centerY` }, { path: `product.infoSections.description.nodes.cardData.backgroundImage.overlay.gradient.stops.position` }, { path: `product.infoSections.description.nodes.tocData.fontSize` }, { path: `product.infoSections.description.nodes.tocData.itemSpacing` }, { path: `product.infoSections.description.nodes.smartBlockCellData.shape.duration` }, { path: `product.variantsInfo.variants.physicalProperties.weight` }, { path: `product.variantSummary.minPriceVariant.physicalProperties.weight` }, { path: `product.minVariantPriceInfo.weight` }] }]) };
1357
+ }
1358
+ return t2;
1359
+ }
1360
+ var Pr = ((e2) => (e2.FREE_TEXT = `FREE_TEXT`, e2.TEXT_CHOICES = `TEXT_CHOICES`, e2.SWATCH_CHOICES = `SWATCH_CHOICES`, e2))(Pr || {});
1361
+ var Fr = ((e2) => (e2.IN_STOCK = `IN_STOCK`, e2.OUT_OF_STOCK = `OUT_OF_STOCK`, e2.PARTIALLY_OUT_OF_STOCK = `PARTIALLY_OUT_OF_STOCK`, e2))(Fr || {});
1362
+ var Ir = ((e2) => (e2.ALL_VARIANTS = `ALL_VARIANTS`, e2.NO_VARIANTS = `NO_VARIANTS`, e2.SOME_VARIANTS = `SOME_VARIANTS`, e2))(Ir || {});
1363
+ var G = ((e2) => (e2.URL = `URL`, e2.CURRENCY = `CURRENCY`, e2.INFO_SECTION = `INFO_SECTION`, e2.MERCHANT_DATA = `MERCHANT_DATA`, e2.PLAIN_DESCRIPTION = `PLAIN_DESCRIPTION`, e2.INFO_SECTION_PLAIN_DESCRIPTION = `INFO_SECTION_PLAIN_DESCRIPTION`, e2.SUBSCRIPTION_PRICES_INFO = `SUBSCRIPTION_PRICES_INFO`, e2.BREADCRUMBS_INFO = `BREADCRUMBS_INFO`, e2.WEIGHT_MEASUREMENT_UNIT_INFO = `WEIGHT_MEASUREMENT_UNIT_INFO`, e2.VARIANT_OPTION_CHOICE_NAMES = `VARIANT_OPTION_CHOICE_NAMES`, e2.MEDIA_ITEMS_INFO = `MEDIA_ITEMS_INFO`, e2.DESCRIPTION = `DESCRIPTION`, e2.DIRECT_CATEGORIES_INFO = `DIRECT_CATEGORIES_INFO`, e2.ALL_CATEGORIES_INFO = `ALL_CATEGORIES_INFO`, e2.INFO_SECTION_DESCRIPTION = `INFO_SECTION_DESCRIPTION`, e2.THUMBNAIL = `THUMBNAIL`, e2.PRODUCT_CHOICES_MEDIA_REFERENCES = `PRODUCT_CHOICES_MEDIA_REFERENCES`, e2.PRODUCT_CHOICES_DISPLAY_IMAGE = `PRODUCT_CHOICES_DISPLAY_IMAGE`, e2.MIN_PRICE_VARIANT = `MIN_PRICE_VARIANT`, e2.DISCOUNT_INFO = `DISCOUNT_INFO`, e2))(G || {});
1364
+ async function Lr(e2, t2) {
1365
+ let { httpClient: n2, sideEffects: r2 } = arguments[2], i2 = Nr(M({ slug: e2, fields: t2?.fields }, []));
1366
+ r2?.onSiteCall?.();
1367
+ try {
1368
+ let e3 = await n2.request(i2);
1369
+ return r2?.onSuccess?.(e3), N(F(e3.data, [{ transformFn: W, paths: [{ path: `product.url` }] }, { transformFn: U, paths: [{ path: `product.media.main.image` }, { path: `product.media.itemsInfo.items.image` }, { path: `product.options.choicesSettings.choices.image` }, { path: `product.options.choicesSettings.choices.displayImage` }, { path: `product.options.choicesSettings.choices.linkedMedia.image` }, { path: `product.modifiers.choicesSettings.choices.image` }, { path: `product.modifiers.choicesSettings.choices.displayImage` }, { path: `product.modifiers.choicesSettings.choices.linkedMedia.image` }, { path: `product.variantsInfo.variants.media.image` }, { path: `product.variantSummary.minPriceVariant.media.image` }] }, { transformFn: rr, paths: [{ path: `product.media.main.video` }, { path: `product.media.itemsInfo.items.video` }, { path: `product.options.choicesSettings.choices.linkedMedia.video` }, { path: `product.modifiers.choicesSettings.choices.linkedMedia.video` }, { path: `product.variantsInfo.variants.media.video` }, { path: `product.variantSummary.minPriceVariant.media.video` }] }]), [`product.description`, `product.infoSections.description`]);
1370
+ } catch (e3) {
1371
+ let t3 = I(e3, { spreadPathsToArguments: {}, explicitPathsToArguments: { slug: `$[0]`, fields: `$[1].fields` }, singleArgumentUnchanged: false }, [`slug`, `options`]);
1372
+ throw r2?.onError?.(e3), t3;
1373
+ }
1374
+ }
1375
+ ({ ...mr() }, { ...Un() });
1376
+ function Rr(e2) {
1377
+ return (t2, n2) => Lr(t2, n2, { httpClient: e2 });
1378
+ }
1379
+ var zr = x(`wix.stores.catalog.v3.product_created`, true, (e2) => N(F(e2, [{ transformFn: P, paths: [{ path: `entity.createdDate` }, { path: `entity.updatedDate` }, { path: `entity.description.metadata.createdTimestamp` }, { path: `entity.description.metadata.updatedTimestamp` }, { path: `entity.infoSections.description.metadata.createdTimestamp` }, { path: `entity.infoSections.description.metadata.updatedTimestamp` }, { path: `metadata.eventTime` }] }, { transformFn: W, paths: [{ path: `entity.url` }] }, { transformFn: B, paths: [{ path: `entity.physicalProperties.pricePerUnit.quantity` }, { path: `entity.physicalProperties.shippingWeightRange.minValue` }, { path: `entity.physicalProperties.shippingWeightRange.maxValue` }, { path: `entity.variantsInfo.variants.physicalProperties.pricePerUnit.settings.quantity` }, { path: `entity.variantsInfo.variants.revenueDetails.profitMargin` }, { path: `entity.subscriptionDetails.subscriptions.discount.percentOff` }, { path: `entity.variantSummary.minPriceVariant.physicalProperties.pricePerUnit.settings.quantity` }, { path: `entity.variantSummary.minPriceVariant.revenueDetails.profitMargin` }, { path: `entity.minVariantPriceInfo.pricePerUnitData.settings.quantity` }, { path: `entity.minVariantPriceInfo.revenueDetails.profitMargin` }, { path: `entity.description.nodes.buttonData.styles.background.gradient.centerX` }, { path: `entity.description.nodes.buttonData.styles.background.gradient.centerY` }, { path: `entity.description.nodes.buttonData.styles.background.gradient.stops.position` }, { path: `entity.description.nodes.buttonData.styles.backgroundHover.gradient.centerX` }, { path: `entity.description.nodes.buttonData.styles.backgroundHover.gradient.centerY` }, { path: `entity.description.nodes.buttonData.styles.backgroundHover.gradient.stops.position` }, { path: `entity.description.nodes.galleryData.items.image.media.duration` }, { path: `entity.description.nodes.galleryData.items.video.media.duration` }, { path: `entity.description.nodes.galleryData.items.video.thumbnail.duration` }, { path: `entity.description.nodes.galleryData.options.item.ratio` }, { path: `entity.description.nodes.imageData.image.duration` }, { path: `entity.description.nodes.imageData.crop.x` }, { path: `entity.description.nodes.imageData.crop.y` }, { path: `entity.description.nodes.imageData.crop.width` }, { path: `entity.description.nodes.imageData.crop.height` }, { path: `entity.description.nodes.mapData.mapSettings.lat` }, { path: `entity.description.nodes.mapData.mapSettings.lng` }, { path: `entity.description.nodes.pollData.poll.image.duration` }, { path: `entity.description.nodes.pollData.poll.options.image.duration` }, { path: `entity.description.nodes.pollData.design.poll.background.image.duration` }, { path: `entity.description.nodes.appEmbedData.image.duration` }, { path: `entity.description.nodes.videoData.video.duration` }, { path: `entity.description.nodes.videoData.thumbnail.duration` }, { path: `entity.description.nodes.audioData.audio.duration` }, { path: `entity.description.nodes.audioData.coverImage.duration` }, { path: `entity.description.nodes.layoutData.backgroundImage.media.duration` }, { path: `entity.description.nodes.layoutData.backgroundImage.overlay.gradient.centerX` }, { path: `entity.description.nodes.layoutData.backgroundImage.overlay.gradient.centerY` }, { path: `entity.description.nodes.layoutData.backgroundImage.overlay.gradient.stops.position` }, { path: `entity.description.nodes.layoutData.backdropImage.media.duration` }, { path: `entity.description.nodes.layoutData.backdropImage.overlay.gradient.centerX` }, { path: `entity.description.nodes.layoutData.backdropImage.overlay.gradient.centerY` }, { path: `entity.description.nodes.layoutData.backdropImage.overlay.gradient.stops.position` }, { path: `entity.description.nodes.layoutData.background.gradient.centerX` }, { path: `entity.description.nodes.layoutData.background.gradient.centerY` }, { path: `entity.description.nodes.layoutData.background.gradient.stops.position` }, { path: `entity.description.nodes.layoutData.backdrop.gradient.centerX` }, { path: `entity.description.nodes.layoutData.backdrop.gradient.centerY` }, { path: `entity.description.nodes.layoutData.backdrop.gradient.stops.position` }, { path: `entity.description.nodes.shapeData.shape.duration` }, { path: `entity.description.nodes.cardData.background.gradient.centerX` }, { path: `entity.description.nodes.cardData.background.gradient.centerY` }, { path: `entity.description.nodes.cardData.background.gradient.stops.position` }, { path: `entity.description.nodes.cardData.backgroundImage.media.duration` }, { path: `entity.description.nodes.cardData.backgroundImage.overlay.gradient.centerX` }, { path: `entity.description.nodes.cardData.backgroundImage.overlay.gradient.centerY` }, { path: `entity.description.nodes.cardData.backgroundImage.overlay.gradient.stops.position` }, { path: `entity.description.nodes.tocData.fontSize` }, { path: `entity.description.nodes.tocData.itemSpacing` }, { path: `entity.description.nodes.smartBlockCellData.shape.duration` }, { path: `entity.infoSections.description.nodes.buttonData.styles.background.gradient.centerX` }, { path: `entity.infoSections.description.nodes.buttonData.styles.background.gradient.centerY` }, { path: `entity.infoSections.description.nodes.buttonData.styles.background.gradient.stops.position` }, { path: `entity.infoSections.description.nodes.buttonData.styles.backgroundHover.gradient.centerX` }, { path: `entity.infoSections.description.nodes.buttonData.styles.backgroundHover.gradient.centerY` }, { path: `entity.infoSections.description.nodes.buttonData.styles.backgroundHover.gradient.stops.position` }, { path: `entity.infoSections.description.nodes.galleryData.items.image.media.duration` }, { path: `entity.infoSections.description.nodes.galleryData.items.video.media.duration` }, { path: `entity.infoSections.description.nodes.galleryData.items.video.thumbnail.duration` }, { path: `entity.infoSections.description.nodes.galleryData.options.item.ratio` }, { path: `entity.infoSections.description.nodes.imageData.image.duration` }, { path: `entity.infoSections.description.nodes.imageData.crop.x` }, { path: `entity.infoSections.description.nodes.imageData.crop.y` }, { path: `entity.infoSections.description.nodes.imageData.crop.width` }, { path: `entity.infoSections.description.nodes.imageData.crop.height` }, { path: `entity.infoSections.description.nodes.mapData.mapSettings.lat` }, { path: `entity.infoSections.description.nodes.mapData.mapSettings.lng` }, { path: `entity.infoSections.description.nodes.pollData.poll.image.duration` }, { path: `entity.infoSections.description.nodes.pollData.poll.options.image.duration` }, { path: `entity.infoSections.description.nodes.pollData.design.poll.background.image.duration` }, { path: `entity.infoSections.description.nodes.appEmbedData.image.duration` }, { path: `entity.infoSections.description.nodes.videoData.video.duration` }, { path: `entity.infoSections.description.nodes.videoData.thumbnail.duration` }, { path: `entity.infoSections.description.nodes.audioData.audio.duration` }, { path: `entity.infoSections.description.nodes.audioData.coverImage.duration` }, { path: `entity.infoSections.description.nodes.layoutData.backgroundImage.media.duration` }, { path: `entity.infoSections.description.nodes.layoutData.backgroundImage.overlay.gradient.centerX` }, { path: `entity.infoSections.description.nodes.layoutData.backgroundImage.overlay.gradient.centerY` }, { path: `entity.infoSections.description.nodes.layoutData.backgroundImage.overlay.gradient.stops.position` }, { path: `entity.infoSections.description.nodes.layoutData.backdropImage.media.duration` }, { path: `entity.infoSections.description.nodes.layoutData.backdropImage.overlay.gradient.centerX` }, { path: `entity.infoSections.description.nodes.layoutData.backdropImage.overlay.gradient.centerY` }, { path: `entity.infoSections.description.nodes.layoutData.backdropImage.overlay.gradient.stops.position` }, { path: `entity.infoSections.description.nodes.layoutData.background.gradient.centerX` }, { path: `entity.infoSections.description.nodes.layoutData.background.gradient.centerY` }, { path: `entity.infoSections.description.nodes.layoutData.background.gradient.stops.position` }, { path: `entity.infoSections.description.nodes.layoutData.backdrop.gradient.centerX` }, { path: `entity.infoSections.description.nodes.layoutData.backdrop.gradient.centerY` }, { path: `entity.infoSections.description.nodes.layoutData.backdrop.gradient.stops.position` }, { path: `entity.infoSections.description.nodes.shapeData.shape.duration` }, { path: `entity.infoSections.description.nodes.cardData.background.gradient.centerX` }, { path: `entity.infoSections.description.nodes.cardData.background.gradient.centerY` }, { path: `entity.infoSections.description.nodes.cardData.background.gradient.stops.position` }, { path: `entity.infoSections.description.nodes.cardData.backgroundImage.media.duration` }, { path: `entity.infoSections.description.nodes.cardData.backgroundImage.overlay.gradient.centerX` }, { path: `entity.infoSections.description.nodes.cardData.backgroundImage.overlay.gradient.centerY` }, { path: `entity.infoSections.description.nodes.cardData.backgroundImage.overlay.gradient.stops.position` }, { path: `entity.infoSections.description.nodes.tocData.fontSize` }, { path: `entity.infoSections.description.nodes.tocData.itemSpacing` }, { path: `entity.infoSections.description.nodes.smartBlockCellData.shape.duration` }, { path: `entity.variantsInfo.variants.physicalProperties.weight` }, { path: `entity.variantSummary.minPriceVariant.physicalProperties.weight` }, { path: `entity.minVariantPriceInfo.weight` }] }, { transformFn: U, paths: [{ path: `entity.media.main.image` }, { path: `entity.media.itemsInfo.items.image` }, { path: `entity.options.choicesSettings.choices.image` }, { path: `entity.options.choicesSettings.choices.displayImage` }, { path: `entity.options.choicesSettings.choices.linkedMedia.image` }, { path: `entity.modifiers.choicesSettings.choices.image` }, { path: `entity.modifiers.choicesSettings.choices.displayImage` }, { path: `entity.modifiers.choicesSettings.choices.linkedMedia.image` }, { path: `entity.variantsInfo.variants.media.image` }, { path: `entity.variantSummary.minPriceVariant.media.image` }] }, { transformFn: rr, paths: [{ path: `entity.media.main.video` }, { path: `entity.media.itemsInfo.items.video` }, { path: `entity.options.choicesSettings.choices.linkedMedia.video` }, { path: `entity.modifiers.choicesSettings.choices.linkedMedia.video` }, { path: `entity.variantsInfo.variants.media.video` }, { path: `entity.variantSummary.minPriceVariant.media.video` }] }])))();
1380
+ var Br = x(`wix.stores.catalog.v3.product_deleted`, true, (e2) => N(F(e2, [{ transformFn: P, paths: [{ path: `entity.createdDate` }, { path: `entity.updatedDate` }, { path: `entity.description.metadata.createdTimestamp` }, { path: `entity.description.metadata.updatedTimestamp` }, { path: `entity.infoSections.description.metadata.createdTimestamp` }, { path: `entity.infoSections.description.metadata.updatedTimestamp` }, { path: `metadata.eventTime` }] }, { transformFn: W, paths: [{ path: `entity.url` }] }, { transformFn: B, paths: [{ path: `entity.physicalProperties.pricePerUnit.quantity` }, { path: `entity.physicalProperties.shippingWeightRange.minValue` }, { path: `entity.physicalProperties.shippingWeightRange.maxValue` }, { path: `entity.variantsInfo.variants.physicalProperties.pricePerUnit.settings.quantity` }, { path: `entity.variantsInfo.variants.revenueDetails.profitMargin` }, { path: `entity.subscriptionDetails.subscriptions.discount.percentOff` }, { path: `entity.variantSummary.minPriceVariant.physicalProperties.pricePerUnit.settings.quantity` }, { path: `entity.variantSummary.minPriceVariant.revenueDetails.profitMargin` }, { path: `entity.minVariantPriceInfo.pricePerUnitData.settings.quantity` }, { path: `entity.minVariantPriceInfo.revenueDetails.profitMargin` }, { path: `entity.description.nodes.buttonData.styles.background.gradient.centerX` }, { path: `entity.description.nodes.buttonData.styles.background.gradient.centerY` }, { path: `entity.description.nodes.buttonData.styles.background.gradient.stops.position` }, { path: `entity.description.nodes.buttonData.styles.backgroundHover.gradient.centerX` }, { path: `entity.description.nodes.buttonData.styles.backgroundHover.gradient.centerY` }, { path: `entity.description.nodes.buttonData.styles.backgroundHover.gradient.stops.position` }, { path: `entity.description.nodes.galleryData.items.image.media.duration` }, { path: `entity.description.nodes.galleryData.items.video.media.duration` }, { path: `entity.description.nodes.galleryData.items.video.thumbnail.duration` }, { path: `entity.description.nodes.galleryData.options.item.ratio` }, { path: `entity.description.nodes.imageData.image.duration` }, { path: `entity.description.nodes.imageData.crop.x` }, { path: `entity.description.nodes.imageData.crop.y` }, { path: `entity.description.nodes.imageData.crop.width` }, { path: `entity.description.nodes.imageData.crop.height` }, { path: `entity.description.nodes.mapData.mapSettings.lat` }, { path: `entity.description.nodes.mapData.mapSettings.lng` }, { path: `entity.description.nodes.pollData.poll.image.duration` }, { path: `entity.description.nodes.pollData.poll.options.image.duration` }, { path: `entity.description.nodes.pollData.design.poll.background.image.duration` }, { path: `entity.description.nodes.appEmbedData.image.duration` }, { path: `entity.description.nodes.videoData.video.duration` }, { path: `entity.description.nodes.videoData.thumbnail.duration` }, { path: `entity.description.nodes.audioData.audio.duration` }, { path: `entity.description.nodes.audioData.coverImage.duration` }, { path: `entity.description.nodes.layoutData.backgroundImage.media.duration` }, { path: `entity.description.nodes.layoutData.backgroundImage.overlay.gradient.centerX` }, { path: `entity.description.nodes.layoutData.backgroundImage.overlay.gradient.centerY` }, { path: `entity.description.nodes.layoutData.backgroundImage.overlay.gradient.stops.position` }, { path: `entity.description.nodes.layoutData.backdropImage.media.duration` }, { path: `entity.description.nodes.layoutData.backdropImage.overlay.gradient.centerX` }, { path: `entity.description.nodes.layoutData.backdropImage.overlay.gradient.centerY` }, { path: `entity.description.nodes.layoutData.backdropImage.overlay.gradient.stops.position` }, { path: `entity.description.nodes.layoutData.background.gradient.centerX` }, { path: `entity.description.nodes.layoutData.background.gradient.centerY` }, { path: `entity.description.nodes.layoutData.background.gradient.stops.position` }, { path: `entity.description.nodes.layoutData.backdrop.gradient.centerX` }, { path: `entity.description.nodes.layoutData.backdrop.gradient.centerY` }, { path: `entity.description.nodes.layoutData.backdrop.gradient.stops.position` }, { path: `entity.description.nodes.shapeData.shape.duration` }, { path: `entity.description.nodes.cardData.background.gradient.centerX` }, { path: `entity.description.nodes.cardData.background.gradient.centerY` }, { path: `entity.description.nodes.cardData.background.gradient.stops.position` }, { path: `entity.description.nodes.cardData.backgroundImage.media.duration` }, { path: `entity.description.nodes.cardData.backgroundImage.overlay.gradient.centerX` }, { path: `entity.description.nodes.cardData.backgroundImage.overlay.gradient.centerY` }, { path: `entity.description.nodes.cardData.backgroundImage.overlay.gradient.stops.position` }, { path: `entity.description.nodes.tocData.fontSize` }, { path: `entity.description.nodes.tocData.itemSpacing` }, { path: `entity.description.nodes.smartBlockCellData.shape.duration` }, { path: `entity.infoSections.description.nodes.buttonData.styles.background.gradient.centerX` }, { path: `entity.infoSections.description.nodes.buttonData.styles.background.gradient.centerY` }, { path: `entity.infoSections.description.nodes.buttonData.styles.background.gradient.stops.position` }, { path: `entity.infoSections.description.nodes.buttonData.styles.backgroundHover.gradient.centerX` }, { path: `entity.infoSections.description.nodes.buttonData.styles.backgroundHover.gradient.centerY` }, { path: `entity.infoSections.description.nodes.buttonData.styles.backgroundHover.gradient.stops.position` }, { path: `entity.infoSections.description.nodes.galleryData.items.image.media.duration` }, { path: `entity.infoSections.description.nodes.galleryData.items.video.media.duration` }, { path: `entity.infoSections.description.nodes.galleryData.items.video.thumbnail.duration` }, { path: `entity.infoSections.description.nodes.galleryData.options.item.ratio` }, { path: `entity.infoSections.description.nodes.imageData.image.duration` }, { path: `entity.infoSections.description.nodes.imageData.crop.x` }, { path: `entity.infoSections.description.nodes.imageData.crop.y` }, { path: `entity.infoSections.description.nodes.imageData.crop.width` }, { path: `entity.infoSections.description.nodes.imageData.crop.height` }, { path: `entity.infoSections.description.nodes.mapData.mapSettings.lat` }, { path: `entity.infoSections.description.nodes.mapData.mapSettings.lng` }, { path: `entity.infoSections.description.nodes.pollData.poll.image.duration` }, { path: `entity.infoSections.description.nodes.pollData.poll.options.image.duration` }, { path: `entity.infoSections.description.nodes.pollData.design.poll.background.image.duration` }, { path: `entity.infoSections.description.nodes.appEmbedData.image.duration` }, { path: `entity.infoSections.description.nodes.videoData.video.duration` }, { path: `entity.infoSections.description.nodes.videoData.thumbnail.duration` }, { path: `entity.infoSections.description.nodes.audioData.audio.duration` }, { path: `entity.infoSections.description.nodes.audioData.coverImage.duration` }, { path: `entity.infoSections.description.nodes.layoutData.backgroundImage.media.duration` }, { path: `entity.infoSections.description.nodes.layoutData.backgroundImage.overlay.gradient.centerX` }, { path: `entity.infoSections.description.nodes.layoutData.backgroundImage.overlay.gradient.centerY` }, { path: `entity.infoSections.description.nodes.layoutData.backgroundImage.overlay.gradient.stops.position` }, { path: `entity.infoSections.description.nodes.layoutData.backdropImage.media.duration` }, { path: `entity.infoSections.description.nodes.layoutData.backdropImage.overlay.gradient.centerX` }, { path: `entity.infoSections.description.nodes.layoutData.backdropImage.overlay.gradient.centerY` }, { path: `entity.infoSections.description.nodes.layoutData.backdropImage.overlay.gradient.stops.position` }, { path: `entity.infoSections.description.nodes.layoutData.background.gradient.centerX` }, { path: `entity.infoSections.description.nodes.layoutData.background.gradient.centerY` }, { path: `entity.infoSections.description.nodes.layoutData.background.gradient.stops.position` }, { path: `entity.infoSections.description.nodes.layoutData.backdrop.gradient.centerX` }, { path: `entity.infoSections.description.nodes.layoutData.backdrop.gradient.centerY` }, { path: `entity.infoSections.description.nodes.layoutData.backdrop.gradient.stops.position` }, { path: `entity.infoSections.description.nodes.shapeData.shape.duration` }, { path: `entity.infoSections.description.nodes.cardData.background.gradient.centerX` }, { path: `entity.infoSections.description.nodes.cardData.background.gradient.centerY` }, { path: `entity.infoSections.description.nodes.cardData.background.gradient.stops.position` }, { path: `entity.infoSections.description.nodes.cardData.backgroundImage.media.duration` }, { path: `entity.infoSections.description.nodes.cardData.backgroundImage.overlay.gradient.centerX` }, { path: `entity.infoSections.description.nodes.cardData.backgroundImage.overlay.gradient.centerY` }, { path: `entity.infoSections.description.nodes.cardData.backgroundImage.overlay.gradient.stops.position` }, { path: `entity.infoSections.description.nodes.tocData.fontSize` }, { path: `entity.infoSections.description.nodes.tocData.itemSpacing` }, { path: `entity.infoSections.description.nodes.smartBlockCellData.shape.duration` }, { path: `entity.variantsInfo.variants.physicalProperties.weight` }, { path: `entity.variantSummary.minPriceVariant.physicalProperties.weight` }, { path: `entity.minVariantPriceInfo.weight` }] }, { transformFn: U, paths: [{ path: `entity.media.main.image` }, { path: `entity.media.itemsInfo.items.image` }, { path: `entity.options.choicesSettings.choices.image` }, { path: `entity.options.choicesSettings.choices.displayImage` }, { path: `entity.options.choicesSettings.choices.linkedMedia.image` }, { path: `entity.modifiers.choicesSettings.choices.image` }, { path: `entity.modifiers.choicesSettings.choices.displayImage` }, { path: `entity.modifiers.choicesSettings.choices.linkedMedia.image` }, { path: `entity.variantsInfo.variants.media.image` }, { path: `entity.variantSummary.minPriceVariant.media.image` }] }, { transformFn: rr, paths: [{ path: `entity.media.main.video` }, { path: `entity.media.itemsInfo.items.video` }, { path: `entity.options.choicesSettings.choices.linkedMedia.video` }, { path: `entity.modifiers.choicesSettings.choices.linkedMedia.video` }, { path: `entity.variantsInfo.variants.media.video` }, { path: `entity.variantSummary.minPriceVariant.media.video` }] }])))();
1381
+ var Vr = x(`wix.stores.catalog.v3.product_updated`, true, (e2) => N(F(e2, [{ transformFn: P, paths: [{ path: `entity.createdDate` }, { path: `entity.updatedDate` }, { path: `entity.description.metadata.createdTimestamp` }, { path: `entity.description.metadata.updatedTimestamp` }, { path: `entity.infoSections.description.metadata.createdTimestamp` }, { path: `entity.infoSections.description.metadata.updatedTimestamp` }, { path: `metadata.eventTime` }, { path: `modifiedFields.createdDate` }, { path: `modifiedFields.updatedDate` }, { path: `modifiedFields.description.metadata.createdTimestamp` }, { path: `modifiedFields.description.metadata.updatedTimestamp` }, { path: `modifiedFields.infoSections.description.metadata.createdTimestamp` }, { path: `modifiedFields.infoSections.description.metadata.updatedTimestamp` }] }, { transformFn: W, paths: [{ path: `entity.url` }, { path: `modifiedFields.url` }] }, { transformFn: B, paths: [{ path: `entity.physicalProperties.pricePerUnit.quantity` }, { path: `entity.physicalProperties.shippingWeightRange.minValue` }, { path: `entity.physicalProperties.shippingWeightRange.maxValue` }, { path: `entity.variantsInfo.variants.physicalProperties.pricePerUnit.settings.quantity` }, { path: `entity.variantsInfo.variants.revenueDetails.profitMargin` }, { path: `entity.subscriptionDetails.subscriptions.discount.percentOff` }, { path: `entity.variantSummary.minPriceVariant.physicalProperties.pricePerUnit.settings.quantity` }, { path: `entity.variantSummary.minPriceVariant.revenueDetails.profitMargin` }, { path: `entity.minVariantPriceInfo.pricePerUnitData.settings.quantity` }, { path: `entity.minVariantPriceInfo.revenueDetails.profitMargin` }, { path: `entity.description.nodes.buttonData.styles.background.gradient.centerX` }, { path: `entity.description.nodes.buttonData.styles.background.gradient.centerY` }, { path: `entity.description.nodes.buttonData.styles.background.gradient.stops.position` }, { path: `entity.description.nodes.buttonData.styles.backgroundHover.gradient.centerX` }, { path: `entity.description.nodes.buttonData.styles.backgroundHover.gradient.centerY` }, { path: `entity.description.nodes.buttonData.styles.backgroundHover.gradient.stops.position` }, { path: `entity.description.nodes.galleryData.items.image.media.duration` }, { path: `entity.description.nodes.galleryData.items.video.media.duration` }, { path: `entity.description.nodes.galleryData.items.video.thumbnail.duration` }, { path: `entity.description.nodes.galleryData.options.item.ratio` }, { path: `entity.description.nodes.imageData.image.duration` }, { path: `entity.description.nodes.imageData.crop.x` }, { path: `entity.description.nodes.imageData.crop.y` }, { path: `entity.description.nodes.imageData.crop.width` }, { path: `entity.description.nodes.imageData.crop.height` }, { path: `entity.description.nodes.mapData.mapSettings.lat` }, { path: `entity.description.nodes.mapData.mapSettings.lng` }, { path: `entity.description.nodes.pollData.poll.image.duration` }, { path: `entity.description.nodes.pollData.poll.options.image.duration` }, { path: `entity.description.nodes.pollData.design.poll.background.image.duration` }, { path: `entity.description.nodes.appEmbedData.image.duration` }, { path: `entity.description.nodes.videoData.video.duration` }, { path: `entity.description.nodes.videoData.thumbnail.duration` }, { path: `entity.description.nodes.audioData.audio.duration` }, { path: `entity.description.nodes.audioData.coverImage.duration` }, { path: `entity.description.nodes.layoutData.backgroundImage.media.duration` }, { path: `entity.description.nodes.layoutData.backgroundImage.overlay.gradient.centerX` }, { path: `entity.description.nodes.layoutData.backgroundImage.overlay.gradient.centerY` }, { path: `entity.description.nodes.layoutData.backgroundImage.overlay.gradient.stops.position` }, { path: `entity.description.nodes.layoutData.backdropImage.media.duration` }, { path: `entity.description.nodes.layoutData.backdropImage.overlay.gradient.centerX` }, { path: `entity.description.nodes.layoutData.backdropImage.overlay.gradient.centerY` }, { path: `entity.description.nodes.layoutData.backdropImage.overlay.gradient.stops.position` }, { path: `entity.description.nodes.layoutData.background.gradient.centerX` }, { path: `entity.description.nodes.layoutData.background.gradient.centerY` }, { path: `entity.description.nodes.layoutData.background.gradient.stops.position` }, { path: `entity.description.nodes.layoutData.backdrop.gradient.centerX` }, { path: `entity.description.nodes.layoutData.backdrop.gradient.centerY` }, { path: `entity.description.nodes.layoutData.backdrop.gradient.stops.position` }, { path: `entity.description.nodes.shapeData.shape.duration` }, { path: `entity.description.nodes.cardData.background.gradient.centerX` }, { path: `entity.description.nodes.cardData.background.gradient.centerY` }, { path: `entity.description.nodes.cardData.background.gradient.stops.position` }, { path: `entity.description.nodes.cardData.backgroundImage.media.duration` }, { path: `entity.description.nodes.cardData.backgroundImage.overlay.gradient.centerX` }, { path: `entity.description.nodes.cardData.backgroundImage.overlay.gradient.centerY` }, { path: `entity.description.nodes.cardData.backgroundImage.overlay.gradient.stops.position` }, { path: `entity.description.nodes.tocData.fontSize` }, { path: `entity.description.nodes.tocData.itemSpacing` }, { path: `entity.description.nodes.smartBlockCellData.shape.duration` }, { path: `entity.infoSections.description.nodes.buttonData.styles.background.gradient.centerX` }, { path: `entity.infoSections.description.nodes.buttonData.styles.background.gradient.centerY` }, { path: `entity.infoSections.description.nodes.buttonData.styles.background.gradient.stops.position` }, { path: `entity.infoSections.description.nodes.buttonData.styles.backgroundHover.gradient.centerX` }, { path: `entity.infoSections.description.nodes.buttonData.styles.backgroundHover.gradient.centerY` }, { path: `entity.infoSections.description.nodes.buttonData.styles.backgroundHover.gradient.stops.position` }, { path: `entity.infoSections.description.nodes.galleryData.items.image.media.duration` }, { path: `entity.infoSections.description.nodes.galleryData.items.video.media.duration` }, { path: `entity.infoSections.description.nodes.galleryData.items.video.thumbnail.duration` }, { path: `entity.infoSections.description.nodes.galleryData.options.item.ratio` }, { path: `entity.infoSections.description.nodes.imageData.image.duration` }, { path: `entity.infoSections.description.nodes.imageData.crop.x` }, { path: `entity.infoSections.description.nodes.imageData.crop.y` }, { path: `entity.infoSections.description.nodes.imageData.crop.width` }, { path: `entity.infoSections.description.nodes.imageData.crop.height` }, { path: `entity.infoSections.description.nodes.mapData.mapSettings.lat` }, { path: `entity.infoSections.description.nodes.mapData.mapSettings.lng` }, { path: `entity.infoSections.description.nodes.pollData.poll.image.duration` }, { path: `entity.infoSections.description.nodes.pollData.poll.options.image.duration` }, { path: `entity.infoSections.description.nodes.pollData.design.poll.background.image.duration` }, { path: `entity.infoSections.description.nodes.appEmbedData.image.duration` }, { path: `entity.infoSections.description.nodes.videoData.video.duration` }, { path: `entity.infoSections.description.nodes.videoData.thumbnail.duration` }, { path: `entity.infoSections.description.nodes.audioData.audio.duration` }, { path: `entity.infoSections.description.nodes.audioData.coverImage.duration` }, { path: `entity.infoSections.description.nodes.layoutData.backgroundImage.media.duration` }, { path: `entity.infoSections.description.nodes.layoutData.backgroundImage.overlay.gradient.centerX` }, { path: `entity.infoSections.description.nodes.layoutData.backgroundImage.overlay.gradient.centerY` }, { path: `entity.infoSections.description.nodes.layoutData.backgroundImage.overlay.gradient.stops.position` }, { path: `entity.infoSections.description.nodes.layoutData.backdropImage.media.duration` }, { path: `entity.infoSections.description.nodes.layoutData.backdropImage.overlay.gradient.centerX` }, { path: `entity.infoSections.description.nodes.layoutData.backdropImage.overlay.gradient.centerY` }, { path: `entity.infoSections.description.nodes.layoutData.backdropImage.overlay.gradient.stops.position` }, { path: `entity.infoSections.description.nodes.layoutData.background.gradient.centerX` }, { path: `entity.infoSections.description.nodes.layoutData.background.gradient.centerY` }, { path: `entity.infoSections.description.nodes.layoutData.background.gradient.stops.position` }, { path: `entity.infoSections.description.nodes.layoutData.backdrop.gradient.centerX` }, { path: `entity.infoSections.description.nodes.layoutData.backdrop.gradient.centerY` }, { path: `entity.infoSections.description.nodes.layoutData.backdrop.gradient.stops.position` }, { path: `entity.infoSections.description.nodes.shapeData.shape.duration` }, { path: `entity.infoSections.description.nodes.cardData.background.gradient.centerX` }, { path: `entity.infoSections.description.nodes.cardData.background.gradient.centerY` }, { path: `entity.infoSections.description.nodes.cardData.background.gradient.stops.position` }, { path: `entity.infoSections.description.nodes.cardData.backgroundImage.media.duration` }, { path: `entity.infoSections.description.nodes.cardData.backgroundImage.overlay.gradient.centerX` }, { path: `entity.infoSections.description.nodes.cardData.backgroundImage.overlay.gradient.centerY` }, { path: `entity.infoSections.description.nodes.cardData.backgroundImage.overlay.gradient.stops.position` }, { path: `entity.infoSections.description.nodes.tocData.fontSize` }, { path: `entity.infoSections.description.nodes.tocData.itemSpacing` }, { path: `entity.infoSections.description.nodes.smartBlockCellData.shape.duration` }, { path: `entity.variantsInfo.variants.physicalProperties.weight` }, { path: `entity.variantSummary.minPriceVariant.physicalProperties.weight` }, { path: `entity.minVariantPriceInfo.weight` }, { path: `modifiedFields.physicalProperties.pricePerUnit.quantity` }, { path: `modifiedFields.physicalProperties.shippingWeightRange.minValue` }, { path: `modifiedFields.physicalProperties.shippingWeightRange.maxValue` }, { path: `modifiedFields.variantsInfo.variants.physicalProperties.pricePerUnit.settings.quantity` }, { path: `modifiedFields.variantsInfo.variants.revenueDetails.profitMargin` }, { path: `modifiedFields.subscriptionDetails.subscriptions.discount.percentOff` }, { path: `modifiedFields.variantSummary.minPriceVariant.physicalProperties.pricePerUnit.settings.quantity` }, { path: `modifiedFields.variantSummary.minPriceVariant.revenueDetails.profitMargin` }, { path: `modifiedFields.minVariantPriceInfo.pricePerUnitData.settings.quantity` }, { path: `modifiedFields.minVariantPriceInfo.revenueDetails.profitMargin` }, { path: `modifiedFields.description.nodes.buttonData.styles.background.gradient.centerX` }, { path: `modifiedFields.description.nodes.buttonData.styles.background.gradient.centerY` }, { path: `modifiedFields.description.nodes.buttonData.styles.background.gradient.stops.position` }, { path: `modifiedFields.description.nodes.buttonData.styles.backgroundHover.gradient.centerX` }, { path: `modifiedFields.description.nodes.buttonData.styles.backgroundHover.gradient.centerY` }, { path: `modifiedFields.description.nodes.buttonData.styles.backgroundHover.gradient.stops.position` }, { path: `modifiedFields.description.nodes.galleryData.items.image.media.duration` }, { path: `modifiedFields.description.nodes.galleryData.items.video.media.duration` }, { path: `modifiedFields.description.nodes.galleryData.items.video.thumbnail.duration` }, { path: `modifiedFields.description.nodes.galleryData.options.item.ratio` }, { path: `modifiedFields.description.nodes.imageData.image.duration` }, { path: `modifiedFields.description.nodes.imageData.crop.x` }, { path: `modifiedFields.description.nodes.imageData.crop.y` }, { path: `modifiedFields.description.nodes.imageData.crop.width` }, { path: `modifiedFields.description.nodes.imageData.crop.height` }, { path: `modifiedFields.description.nodes.mapData.mapSettings.lat` }, { path: `modifiedFields.description.nodes.mapData.mapSettings.lng` }, { path: `modifiedFields.description.nodes.pollData.poll.image.duration` }, { path: `modifiedFields.description.nodes.pollData.poll.options.image.duration` }, { path: `modifiedFields.description.nodes.pollData.design.poll.background.image.duration` }, { path: `modifiedFields.description.nodes.appEmbedData.image.duration` }, { path: `modifiedFields.description.nodes.videoData.video.duration` }, { path: `modifiedFields.description.nodes.videoData.thumbnail.duration` }, { path: `modifiedFields.description.nodes.audioData.audio.duration` }, { path: `modifiedFields.description.nodes.audioData.coverImage.duration` }, { path: `modifiedFields.description.nodes.layoutData.backgroundImage.media.duration` }, { path: `modifiedFields.description.nodes.layoutData.backgroundImage.overlay.gradient.centerX` }, { path: `modifiedFields.description.nodes.layoutData.backgroundImage.overlay.gradient.centerY` }, { path: `modifiedFields.description.nodes.layoutData.backgroundImage.overlay.gradient.stops.position` }, { path: `modifiedFields.description.nodes.layoutData.backdropImage.media.duration` }, { path: `modifiedFields.description.nodes.layoutData.backdropImage.overlay.gradient.centerX` }, { path: `modifiedFields.description.nodes.layoutData.backdropImage.overlay.gradient.centerY` }, { path: `modifiedFields.description.nodes.layoutData.backdropImage.overlay.gradient.stops.position` }, { path: `modifiedFields.description.nodes.layoutData.background.gradient.centerX` }, { path: `modifiedFields.description.nodes.layoutData.background.gradient.centerY` }, { path: `modifiedFields.description.nodes.layoutData.background.gradient.stops.position` }, { path: `modifiedFields.description.nodes.layoutData.backdrop.gradient.centerX` }, { path: `modifiedFields.description.nodes.layoutData.backdrop.gradient.centerY` }, { path: `modifiedFields.description.nodes.layoutData.backdrop.gradient.stops.position` }, { path: `modifiedFields.description.nodes.shapeData.shape.duration` }, { path: `modifiedFields.description.nodes.cardData.background.gradient.centerX` }, { path: `modifiedFields.description.nodes.cardData.background.gradient.centerY` }, { path: `modifiedFields.description.nodes.cardData.background.gradient.stops.position` }, { path: `modifiedFields.description.nodes.cardData.backgroundImage.media.duration` }, { path: `modifiedFields.description.nodes.cardData.backgroundImage.overlay.gradient.centerX` }, { path: `modifiedFields.description.nodes.cardData.backgroundImage.overlay.gradient.centerY` }, { path: `modifiedFields.description.nodes.cardData.backgroundImage.overlay.gradient.stops.position` }, { path: `modifiedFields.description.nodes.tocData.fontSize` }, { path: `modifiedFields.description.nodes.tocData.itemSpacing` }, { path: `modifiedFields.description.nodes.smartBlockCellData.shape.duration` }, { path: `modifiedFields.infoSections.description.nodes.buttonData.styles.background.gradient.centerX` }, { path: `modifiedFields.infoSections.description.nodes.buttonData.styles.background.gradient.centerY` }, { path: `modifiedFields.infoSections.description.nodes.buttonData.styles.background.gradient.stops.position` }, { path: `modifiedFields.infoSections.description.nodes.buttonData.styles.backgroundHover.gradient.centerX` }, { path: `modifiedFields.infoSections.description.nodes.buttonData.styles.backgroundHover.gradient.centerY` }, { path: `modifiedFields.infoSections.description.nodes.buttonData.styles.backgroundHover.gradient.stops.position` }, { path: `modifiedFields.infoSections.description.nodes.galleryData.items.image.media.duration` }, { path: `modifiedFields.infoSections.description.nodes.galleryData.items.video.media.duration` }, { path: `modifiedFields.infoSections.description.nodes.galleryData.items.video.thumbnail.duration` }, { path: `modifiedFields.infoSections.description.nodes.galleryData.options.item.ratio` }, { path: `modifiedFields.infoSections.description.nodes.imageData.image.duration` }, { path: `modifiedFields.infoSections.description.nodes.imageData.crop.x` }, { path: `modifiedFields.infoSections.description.nodes.imageData.crop.y` }, { path: `modifiedFields.infoSections.description.nodes.imageData.crop.width` }, { path: `modifiedFields.infoSections.description.nodes.imageData.crop.height` }, { path: `modifiedFields.infoSections.description.nodes.mapData.mapSettings.lat` }, { path: `modifiedFields.infoSections.description.nodes.mapData.mapSettings.lng` }, { path: `modifiedFields.infoSections.description.nodes.pollData.poll.image.duration` }, { path: `modifiedFields.infoSections.description.nodes.pollData.poll.options.image.duration` }, { path: `modifiedFields.infoSections.description.nodes.pollData.design.poll.background.image.duration` }, { path: `modifiedFields.infoSections.description.nodes.appEmbedData.image.duration` }, { path: `modifiedFields.infoSections.description.nodes.videoData.video.duration` }, { path: `modifiedFields.infoSections.description.nodes.videoData.thumbnail.duration` }, { path: `modifiedFields.infoSections.description.nodes.audioData.audio.duration` }, { path: `modifiedFields.infoSections.description.nodes.audioData.coverImage.duration` }, { path: `modifiedFields.infoSections.description.nodes.layoutData.backgroundImage.media.duration` }, { path: `modifiedFields.infoSections.description.nodes.layoutData.backgroundImage.overlay.gradient.centerX` }, { path: `modifiedFields.infoSections.description.nodes.layoutData.backgroundImage.overlay.gradient.centerY` }, { path: `modifiedFields.infoSections.description.nodes.layoutData.backgroundImage.overlay.gradient.stops.position` }, { path: `modifiedFields.infoSections.description.nodes.layoutData.backdropImage.media.duration` }, { path: `modifiedFields.infoSections.description.nodes.layoutData.backdropImage.overlay.gradient.centerX` }, { path: `modifiedFields.infoSections.description.nodes.layoutData.backdropImage.overlay.gradient.centerY` }, { path: `modifiedFields.infoSections.description.nodes.layoutData.backdropImage.overlay.gradient.stops.position` }, { path: `modifiedFields.infoSections.description.nodes.layoutData.background.gradient.centerX` }, { path: `modifiedFields.infoSections.description.nodes.layoutData.background.gradient.centerY` }, { path: `modifiedFields.infoSections.description.nodes.layoutData.background.gradient.stops.position` }, { path: `modifiedFields.infoSections.description.nodes.layoutData.backdrop.gradient.centerX` }, { path: `modifiedFields.infoSections.description.nodes.layoutData.backdrop.gradient.centerY` }, { path: `modifiedFields.infoSections.description.nodes.layoutData.backdrop.gradient.stops.position` }, { path: `modifiedFields.infoSections.description.nodes.shapeData.shape.duration` }, { path: `modifiedFields.infoSections.description.nodes.cardData.background.gradient.centerX` }, { path: `modifiedFields.infoSections.description.nodes.cardData.background.gradient.centerY` }, { path: `modifiedFields.infoSections.description.nodes.cardData.background.gradient.stops.position` }, { path: `modifiedFields.infoSections.description.nodes.cardData.backgroundImage.media.duration` }, { path: `modifiedFields.infoSections.description.nodes.cardData.backgroundImage.overlay.gradient.centerX` }, { path: `modifiedFields.infoSections.description.nodes.cardData.backgroundImage.overlay.gradient.centerY` }, { path: `modifiedFields.infoSections.description.nodes.cardData.backgroundImage.overlay.gradient.stops.position` }, { path: `modifiedFields.infoSections.description.nodes.tocData.fontSize` }, { path: `modifiedFields.infoSections.description.nodes.tocData.itemSpacing` }, { path: `modifiedFields.infoSections.description.nodes.smartBlockCellData.shape.duration` }, { path: `modifiedFields.variantsInfo.variants.physicalProperties.weight` }, { path: `modifiedFields.variantSummary.minPriceVariant.physicalProperties.weight` }, { path: `modifiedFields.minVariantPriceInfo.weight` }] }, { transformFn: U, paths: [{ path: `entity.media.main.image` }, { path: `entity.media.itemsInfo.items.image` }, { path: `entity.options.choicesSettings.choices.image` }, { path: `entity.options.choicesSettings.choices.displayImage` }, { path: `entity.options.choicesSettings.choices.linkedMedia.image` }, { path: `entity.modifiers.choicesSettings.choices.image` }, { path: `entity.modifiers.choicesSettings.choices.displayImage` }, { path: `entity.modifiers.choicesSettings.choices.linkedMedia.image` }, { path: `entity.variantsInfo.variants.media.image` }, { path: `entity.variantSummary.minPriceVariant.media.image` }, { path: `modifiedFields.media.main.image` }, { path: `modifiedFields.media.itemsInfo.items.image` }, { path: `modifiedFields.options.choicesSettings.choices.image` }, { path: `modifiedFields.options.choicesSettings.choices.displayImage` }, { path: `modifiedFields.options.choicesSettings.choices.linkedMedia.image` }, { path: `modifiedFields.modifiers.choicesSettings.choices.image` }, { path: `modifiedFields.modifiers.choicesSettings.choices.displayImage` }, { path: `modifiedFields.modifiers.choicesSettings.choices.linkedMedia.image` }, { path: `modifiedFields.variantsInfo.variants.media.image` }, { path: `modifiedFields.variantSummary.minPriceVariant.media.image` }] }, { transformFn: rr, paths: [{ path: `entity.media.main.video` }, { path: `entity.media.itemsInfo.items.video` }, { path: `entity.options.choicesSettings.choices.linkedMedia.video` }, { path: `entity.modifiers.choicesSettings.choices.linkedMedia.video` }, { path: `entity.variantsInfo.variants.media.video` }, { path: `entity.variantSummary.minPriceVariant.media.video` }, { path: `modifiedFields.media.main.video` }, { path: `modifiedFields.media.itemsInfo.items.video` }, { path: `modifiedFields.options.choicesSettings.choices.linkedMedia.video` }, { path: `modifiedFields.modifiers.choicesSettings.choices.linkedMedia.video` }, { path: `modifiedFields.variantsInfo.variants.media.video` }, { path: `modifiedFields.variantSummary.minPriceVariant.media.video` }] }])))();
1382
+ var Hr = L(Rr);
1383
+ z(zr), z(Br), z(Vr);
1384
+ function Ur(e2) {
1385
+ return R(Object.assign(e2, { domainToMappings: { "api._api_base_domain_": [{ srcPath: `/product-group`, destPath: `` }], "editor._base_domain_": [{ srcPath: `/_api/product-group`, destPath: `` }], "blocks._base_domain_": [{ srcPath: `/_api/product-group`, destPath: `` }], "create.editorx": [{ srcPath: `/_api/product-group`, destPath: `` }], _: [{ srcPath: `/_api/product-group`, destPath: `` }], "manage._base_domain_": [{ srcPath: `/_api/product-group`, destPath: `` }], "www.wixapis.com": [{ srcPath: `/stores/v3/product-groups`, destPath: `/v3/product-groups` }, { srcPath: `/stores/v3/bulk/product-groups`, destPath: `/v3/bulk/product-groups` }], "*.dev.wix-code.com": [{ srcPath: `/_api/product-group`, destPath: `` }] } }));
1386
+ }
1387
+ var Wr = `@wix/auto_sdk_stores_product-groups-v-3`;
1388
+ function Gr(e2) {
1389
+ function t2({ host: t3 }) {
1390
+ return { entityFqdn: `wix.stores.catalog.v3.product_group`, method: `GET`, methodFqn: `wix.stores.catalog.product_group.v3.ProductGroupService.QueryProductGroups`, packageName: Wr, migrationOptions: { optInTransformResponse: true }, url: Ur({ protoPath: `/v3/product-groups/query`, data: e2, host: t3 }), params: zt(e2, true), transformResponse: (e3) => F(e3, [{ transformFn: P, paths: [{ path: `productGroups.createdDate` }, { path: `productGroups.updatedDate` }, { path: `productGroups.media.image.urlExpirationDate` }] }]), fallback: [{ method: `POST`, url: Ur({ protoPath: `/v3/product-groups/query`, data: e2, host: t3 }), data: e2 }] };
1391
+ }
1392
+ return t2;
1393
+ }
1394
+ var Kr = ((e2) => (e2.GROUPING_CUSTOMIZATION = `GROUPING_CUSTOMIZATION`, e2.THUMBNAIL = `THUMBNAIL`, e2))(Kr || {});
1395
+ function qr(e2) {
1396
+ let { httpClient: t2, sideEffects: n2 } = arguments[1];
1397
+ return Rn({ func: async (r2) => {
1398
+ let i2 = Gr({ ...r2, ...e2 ?? {} });
1399
+ n2?.onSiteCall?.();
1400
+ try {
1401
+ let e3 = await t2.request(i2);
1402
+ return n2?.onSuccess?.(e3), e3;
1403
+ } catch (e3) {
1404
+ throw n2?.onError?.(e3), e3;
1405
+ }
1406
+ }, requestTransformer: (t3) => {
1407
+ let n3 = [t3, e2];
1408
+ return M({ ...n3?.[1], query: n3?.[0] });
1409
+ }, responseTransformer: ({ data: e3 }) => {
1410
+ let t3 = N(F(e3, [{ transformFn: U, paths: [{ path: `productGroups.media.image` }] }]));
1411
+ return { items: t3?.productGroups, pagingMetadata: t3?.pagingMetadata };
1412
+ }, errorTransformer: (e3) => {
1413
+ throw I(e3, { spreadPathsToArguments: {}, explicitPathsToArguments: { query: `$[0]` }, singleArgumentUnchanged: false });
1414
+ }, pagingMethod: `CURSOR`, transformationPaths: {} });
1415
+ }
1416
+ async function Jr(e2, t2) {
1417
+ let { httpClient: n2, sideEffects: r2 } = arguments[2], i2 = Gr(M({ query: e2, ...t2 }));
1418
+ r2?.onSiteCall?.();
1419
+ try {
1420
+ let e3 = await n2.request(i2);
1421
+ return r2?.onSuccess?.(e3), N(F(e3.data, [{ transformFn: U, paths: [{ path: `productGroups.media.image` }] }]));
1422
+ } catch (e3) {
1423
+ let t3 = I(e3, { spreadPathsToArguments: {}, explicitPathsToArguments: { query: `$[0]` }, singleArgumentUnchanged: false }, [`query`, `options`]);
1424
+ throw r2?.onError?.(e3), t3;
1425
+ }
1426
+ }
1427
+ ({ ...Un() }, { ...mr() });
1428
+ function Yr(e2) {
1429
+ return (t2) => qr(t2, { httpClient: e2 });
1430
+ }
1431
+ function Xr(e2) {
1432
+ return (t2, n2) => Jr(t2, n2, { httpClient: e2 });
1433
+ }
1434
+ function Zr(e2) {
1435
+ let t2 = $n({ builderQueryFunction: (t3) => Yr(e2)(t3), typedQueryFunction: (t3, n3) => Xr(e2)(t3, n3), hasOptionsParameter: true });
1436
+ function n2(e3, n3) {
1437
+ return t2(...arguments);
1438
+ }
1439
+ return n2;
1440
+ }
1441
+ var Qr = L(Zr);
1442
+ function $r(e2) {
1443
+ return R(Object.assign(e2, { domainToMappings: { "manage._base_domain_": [{ srcPath: `/_api/location`, destPath: `` }], _: [{ srcPath: `/_api/location`, destPath: `` }], "*.dev.wix-code.com": [{ srcPath: `/_api/location`, destPath: `` }], "www.wixapis.com": [{ srcPath: `/stores/v3/locations`, destPath: `/v3/locations` }] } }));
1444
+ }
1445
+ var ei = `@wix/auto_sdk_stores_stores-locations-v-3`;
1446
+ function ti(e2) {
1447
+ function t2({ host: t3 }) {
1448
+ return { entityFqdn: `wix.stores.catalog.v3.stores_location`, method: `POST`, methodFqn: `wix.stores.catalog.location.v3.StoresLocationService.QueryStoresLocations`, packageName: ei, migrationOptions: { optInTransformResponse: true }, url: $r({ protoPath: `/v3/locations/query`, data: e2, host: t3 }), data: e2, transformResponse: (e3) => F(e3, [{ transformFn: P, paths: [{ path: `storesLocations.createdDate` }, { path: `storesLocations.updatedDate` }] }]) };
1449
+ }
1450
+ return t2;
1451
+ }
1452
+ function ni() {
1453
+ let { httpClient: e2, sideEffects: t2 } = arguments[0];
1454
+ return Rn({ func: async (n2) => {
1455
+ let r2 = ti(n2);
1456
+ t2?.onSiteCall?.();
1457
+ try {
1458
+ let n3 = await e2.request(r2);
1459
+ return t2?.onSuccess?.(n3), n3;
1460
+ } catch (e3) {
1461
+ throw t2?.onError?.(e3), e3;
1462
+ }
1463
+ }, requestTransformer: (e3) => {
1464
+ let t3 = [e3, {}];
1465
+ return M({ ...t3?.[1], query: t3?.[0] });
1466
+ }, responseTransformer: ({ data: e3 }) => {
1467
+ let t3 = N(F(e3, []));
1468
+ return { items: t3?.storesLocations, pagingMetadata: t3?.pagingMetadata };
1469
+ }, errorTransformer: (e3) => {
1470
+ throw I(e3, { spreadPathsToArguments: {}, explicitPathsToArguments: { query: `$[0]` }, singleArgumentUnchanged: false });
1471
+ }, pagingMethod: `CURSOR`, transformationPaths: {} });
1472
+ }
1473
+ async function ri(e2) {
1474
+ let { httpClient: t2, sideEffects: n2 } = arguments[1], r2 = ti(M({ query: e2 }));
1475
+ n2?.onSiteCall?.();
1476
+ try {
1477
+ let e3 = await t2.request(r2);
1478
+ return n2?.onSuccess?.(e3), N(e3.data);
1479
+ } catch (e3) {
1480
+ let t3 = I(e3, { spreadPathsToArguments: {}, explicitPathsToArguments: { query: `$[0]` }, singleArgumentUnchanged: false }, [`query`]);
1481
+ throw n2?.onError?.(e3), t3;
1482
+ }
1483
+ }
1484
+ ({ ...Un() });
1485
+ function ii(e2) {
1486
+ return () => ni({ httpClient: e2 });
1487
+ }
1488
+ function ai(e2) {
1489
+ return (t2) => ri(t2, { httpClient: e2 });
1490
+ }
1491
+ function oi(e2) {
1492
+ let t2 = $n({ builderQueryFunction: () => ii(e2)(), typedQueryFunction: (t3) => ai(e2)(t3), hasOptionsParameter: false });
1493
+ function n2(e3) {
1494
+ return t2(...arguments);
1495
+ }
1496
+ return n2;
1497
+ }
1498
+ var si = L(oi);
1499
+ var ci = `https://static.wixstatic.com/media`;
1500
+ var li = `https://video.wixstatic.com/video`;
1501
+ var ui = /image:\/\/v1\/([^/#]+)/;
1502
+ var di = /^(?:wix:)?video:\/\/v1\/([^/#]+)(?:\/[^#]*)?(?:#(.*))?$/;
1503
+ function fi(e2) {
1504
+ let t2 = e2?.match(di);
1505
+ if (!t2) return null;
1506
+ let [, n2, r2] = t2, i2 = new URLSearchParams(r2 ?? ``), a2 = i2.get(`posterUri`);
1507
+ return { id: n2, url: `${li}/${n2}/file`, ...a2 ? { poster: { uri: a2, url: `${ci}/${a2}`, width: Number(i2.get(`posterWidth`)) || 0, height: Number(i2.get(`posterHeight`)) || 0 } } : {} };
1508
+ }
1509
+ function pi(e2) {
1510
+ return e2 ? e2.match(ui)?.[1] ?? null : null;
1511
+ }
1512
+ function mi(e2) {
1513
+ if (!e2) return;
1514
+ if (/^https?:\/\//i.test(e2)) return e2;
1515
+ let t2 = pi(e2);
1516
+ return t2 ? `${ci}/${t2}` : void 0;
1517
+ }
1518
+ function hi(e2) {
1519
+ if (!e2) return null;
1520
+ let t2 = e2.match(/#originWidth=(\d+)&originHeight=(\d+)/);
1521
+ return t2 ? { width: parseInt(t2[1], 10), height: parseInt(t2[2], 10) } : null;
1522
+ }
1523
+ var gi = `one-time`;
1524
+ function _i(e2) {
1525
+ return e2.map((e3) => ({ id: e3._id, key: e3.key, name: e3.name ?? void 0, optionRenderType: e3.optionRenderType, choices: (e3.choicesSettings?.choices ?? []).map((e4) => {
1526
+ let t2 = pi(e4.displayImage) ?? void 0;
1527
+ return { choiceId: e4.choiceId, key: e4.key, name: e4.name ?? void 0, colorCode: e4.colorCode, ...t2 ? { displayImageUri: t2 } : {}, inStock: e4.inStock, visible: e4.visible ?? void 0, mediaIds: vi(e4.media) };
1528
+ }) }));
1529
+ }
1530
+ var vi = (e2) => {
1531
+ let t2 = (e2?.items ?? []).map((e3) => e3.mediaId);
1532
+ return t2.length > 0 ? t2 : void 0;
1533
+ };
1534
+ function yi(e2) {
1535
+ let t2 = e2.map((e3) => {
1536
+ let t3 = e3._id, n2 = e3.modifierRenderType === Pr.FREE_TEXT;
1537
+ return [t3, { id: t3, key: e3.key, name: e3.name ?? void 0, mandatory: e3.mandatory !== false, modifierRenderType: e3.modifierRenderType, freeTextSettings: n2 ? e3.freeTextSettings : void 0, choices: n2 ? void 0 : (e3.choicesSettings?.choices ?? []).map((e4) => {
1538
+ let t4 = pi(e4.displayImage) ?? void 0;
1539
+ return { choiceId: e4.choiceId, key: e4.key, name: e4.name ?? void 0, colorCode: e4.colorCode, ...t4 ? { displayImageUri: t4 } : {}, mediaIds: vi(e4.media) };
1540
+ }) }];
1541
+ });
1542
+ return Object.fromEntries(t2);
1543
+ }
1544
+ function bi(e2) {
1545
+ return e2.filter((e3) => e3.visible !== false).map(xi);
1546
+ }
1547
+ var xi = (e2) => {
1548
+ let t2 = Object.fromEntries((e2.choices ?? []).map((e3) => {
1549
+ let t3 = e3.optionChoiceIds;
1550
+ return [t3?.optionId, t3?.choiceId];
1551
+ }));
1552
+ return { id: e2._id, sku: e2.sku ?? void 0, choices: t2, price: Ci(e2), subscriptionPrices: wi(e2) };
1553
+ };
1554
+ function Si(e2) {
1555
+ return e2?.description == null ? void 0 : { description: e2.description };
1556
+ }
1557
+ var Ci = (e2) => {
1558
+ let t2 = e2.price;
1559
+ return { actualPrice: Hi(t2?.actualPrice), compareAtPrice: K(t2?.compareAtPrice), priceAfterDiscount: K(t2?.priceAfterDiscount), pricePerUnit: Si(e2.physicalProperties?.pricePerUnit) };
1560
+ };
1561
+ var wi = (e2) => (e2.subscriptionPricesInfo?.subscriptionPrices ?? []).map((e3) => ({ subscriptionId: e3.subscriptionId, price: Hi(e3.price) }));
1562
+ var Ti = { nodes: [] };
1563
+ var Ei = `@stores/product-groups`;
1564
+ function Di(e2) {
1565
+ let t2 = _i(e2.options ?? []), n2 = yi(e2.modifiers ?? []), r2 = ji(e2.subscriptionDetails?.subscriptions ?? []), i2 = bi(e2.variantsInfo?.variants ?? []), a2 = { subscriptions: r2, allowOneTimePurchases: e2.subscriptionDetails?.allowOneTimePurchases ?? false }, o2 = e2.additionalRibbons ?? [], s2 = { primary: e2.ribbon?.name ?? void 0, additional: o2.map((e3) => e3.name ?? void 0).filter((e3) => !!e3) }, c2 = e2.description ? Mi(e2.description) : Ti, l2 = e2.discountInfo?.discountRuleNames, u2 = ki(e2);
1566
+ return { id: e2._id, slug: e2.slug ?? void 0, url: e2.url ? { href: e2.url } : void 0, name: e2.name, description: c2, media: Vi(e2), mainMedia: Bi(e2.media?.main), ribbons: s2, breadcrumbs: Ni(e2), mainCategoryId: e2.mainCategoryId ?? void 0, categories: Pi(e2), infoSections: Oi(e2), currency: e2.currency, options: t2, modifiers: n2, variants: i2, minPriceVariant: Ri(e2), priceRange: zi(e2), subscriptionDetails: a2, inventory: { availabilityStatus: e2.inventory?.availabilityStatus, preorderAvailability: e2.inventory?.preorderAvailability }, discountRuleNames: l2, productGroupId: u2 };
1567
+ }
1568
+ function Oi(e2) {
1569
+ return (e2.infoSections ?? []).map((e3) => ({ _id: e3.uniqueName ?? e3._id, name: e3.title, body: e3.description ? Mi(e3.description) : void 0 }));
1570
+ }
1571
+ function ki(e2) {
1572
+ let t2 = e2.extendedFields?.namespaces?.[Ei]?.productGroupId;
1573
+ return typeof t2 == `string` ? t2 : void 0;
1574
+ }
1575
+ function Ai(e2) {
1576
+ return e2 === `WEEK` || e2 === `MONTH` || e2 === `YEAR` ? e2 : void 0;
1577
+ }
1578
+ function ji(e2) {
1579
+ return e2.filter((e3) => e3.visible !== false).map((e3) => ({ id: e3._id, name: e3.title, description: e3.description ?? void 0, frequency: Ai(e3.frequency), interval: e3.interval, billingCycles: e3.billingCycles ?? void 0 }));
1580
+ }
1581
+ function Mi(e2) {
1582
+ return { ...e2, nodes: e2.nodes ?? [] };
1583
+ }
1584
+ function Ni(e2) {
1585
+ return (e2.breadcrumbsInfo?.breadcrumbs ?? []).map((e3) => ({ id: e3.categoryId, name: e3.categoryName, slug: e3.categorySlug }));
1586
+ }
1587
+ function Pi(e2) {
1588
+ return (e2.directCategoriesInfo?.categories ?? []).flatMap((e3) => e3._id ? [{ id: e3._id }] : []);
1589
+ }
1590
+ function Fi(e2) {
1591
+ return { ...e2.displayName ? { title: e2.displayName } : {}, ...e2.altText ? { alt: e2.altText } : {} };
1592
+ }
1593
+ function Ii(e2, t2) {
1594
+ let n2 = e2.image ?? e2.url;
1595
+ if (!n2) return;
1596
+ let r2 = hi(e2.image), { title: i2, alt: a2 } = Fi(e2);
1597
+ return { id: pi(e2.image) ?? e2._id ?? t2, media: { type: `image`, src: n2, ...r2 ? { width: r2.width, height: r2.height } : {}, ...i2 ? { title: i2 } : {}, ...a2 ? { parameters: { alt: a2 } } : {} } };
1598
+ }
1599
+ function Li(e2, t2) {
1600
+ let n2 = fi(e2.video), r2 = n2?.url ?? e2.url;
1601
+ if (!r2) return;
1602
+ let i2 = n2?.poster?.url, a2 = n2?.poster?.width, o2 = n2?.poster?.height, { title: s2, alt: c2 } = Fi(e2);
1603
+ return { id: n2?.id ?? e2._id ?? t2, media: { type: `video`, src: r2, ...a2 === void 0 ? {} : { width: a2 }, ...o2 === void 0 ? {} : { height: o2 }, ...s2 ? { title: s2 } : {}, ...c2 || i2 ? { parameters: { ...c2 ? { alt: c2 } : {}, ...i2 ? { thumbnail: i2 } : {} } } : {} } };
1604
+ }
1605
+ function Ri(e2) {
1606
+ let t2 = e2.variantSummary?.minPriceVariant;
1607
+ return t2 ? bi([t2])[0] : void 0;
1608
+ }
1609
+ function zi(e2) {
1610
+ return { minActualPrice: K(e2.actualPriceRange?.minValue), maxActualPrice: K(e2.actualPriceRange?.maxValue), minCompareAtPrice: K(e2.compareAtPriceRange?.minValue), maxCompareAtPrice: K(e2.compareAtPriceRange?.maxValue) };
1611
+ }
1612
+ function Bi(e2) {
1613
+ if (!e2) return;
1614
+ let { title: t2, alt: n2 } = Fi(e2);
1615
+ if (e2.mediaType === `VIDEO`) {
1616
+ let r3 = fi(e2.video)?.poster;
1617
+ return r3 ? { ...r3, name: t2, alt: n2 } : void 0;
1618
+ }
1619
+ let r2 = e2.image ?? e2.url;
1620
+ if (!r2) return;
1621
+ let i2 = hi(e2.image);
1622
+ return { uri: pi(e2.image) ?? void 0, url: r2, width: i2?.width, height: i2?.height, name: t2, alt: n2 };
1623
+ }
1624
+ function Vi(e2) {
1625
+ return (e2.media?.itemsInfo?.items ?? (e2.media?.main ? [e2.media.main] : [])).flatMap((e3, t2) => {
1626
+ let n2 = e3.mediaType === `VIDEO` ? Li(e3, String(t2)) : Ii(e3, String(t2));
1627
+ return n2 ? [n2] : [];
1628
+ });
1629
+ }
1630
+ var Hi = (e2) => Number.parseFloat(e2?.amount);
1631
+ var K = (e2) => e2?.amount == null ? void 0 : Hi(e2);
1632
+ var Ui = [G.URL, G.DESCRIPTION, G.PLAIN_DESCRIPTION, G.MEDIA_ITEMS_INFO, G.INFO_SECTION, G.INFO_SECTION_DESCRIPTION, G.CURRENCY, G.DISCOUNT_INFO, G.SUBSCRIPTION_PRICES_INFO, G.BREADCRUMBS_INFO, G.DIRECT_CATEGORIES_INFO, G.PRODUCT_CHOICES_MEDIA_REFERENCES, G.PRODUCT_CHOICES_DISPLAY_IMAGE];
1633
+ function Wi(e2) {
1634
+ let { _id: t2, ...n2 } = e2;
1635
+ return { ...n2, id: t2 };
1636
+ }
1637
+ async function Gi(e2) {
1638
+ let t2 = (await Hr(e2, { fields: Ui })).product;
1639
+ if (!t2) throw Error(`Product not found for slug: ${e2}`);
1640
+ return { product: Di(t2), seoProduct: Wi(t2) };
1641
+ }
1642
+ function Ki(e2) {
1643
+ return R(Object.assign(e2, { domainToMappings: { "bo._base_domain_": [{ srcPath: `/back-in-stock-service`, destPath: `` }], "wixbo.ai": [{ srcPath: `/back-in-stock-service`, destPath: `` }], "wix-bo.com": [{ srcPath: `/back-in-stock-service`, destPath: `` }], "www.wixapis.com": [{ srcPath: `/back-in-stock-service`, destPath: `` }], _: [{ srcPath: `/v1/back-in-stock-notification-requests`, destPath: `/v1/back-in-stock-notification-requests` }], "*.dev.wix-code.com": [{ srcPath: `/v1/back-in-stock-notification-requests`, destPath: `/v1/back-in-stock-notification-requests` }] } }));
1644
+ }
1645
+ var qi = `@wix/auto_sdk_ecom_back-in-stock-notifications`;
1646
+ function Ji(e2) {
1647
+ function t2({ host: t3 }) {
1648
+ let n2 = F(e2, [{ transformFn: it, paths: [{ path: `request.createdDate` }, { path: `itemDetails.image.urlExpirationDate` }] }, { transformFn: fn, paths: [{ path: `itemDetails.image.focalPoint.x` }, { path: `itemDetails.image.focalPoint.y` }] }]);
1649
+ return { entityFqdn: `wix.ecom.v1.back_in_stock_notification_request`, method: `POST`, methodFqn: `com.wixpress.ecom.back.in.stock.BackInStockNotificationRequestService.CreateBackInStockNotificationRequest`, packageName: qi, migrationOptions: { optInTransformResponse: true }, url: Ki({ protoPath: `/v1/back-in-stock-notification-requests`, data: n2, host: t3 }), data: n2, transformResponse: (e3) => F(e3, [{ transformFn: P, paths: [{ path: `request.createdDate` }] }]) };
1650
+ }
1651
+ return t2;
1652
+ }
1653
+ async function Yi(e2, t2) {
1654
+ let { httpClient: n2, sideEffects: r2 } = arguments[2], i2 = Ji(F(M({ request: e2, itemDetails: t2 }), [{ transformFn: nr, paths: [{ path: `itemDetails.image` }] }]));
1655
+ r2?.onSiteCall?.();
1656
+ try {
1657
+ let e3 = await n2.request(i2);
1658
+ return r2?.onSuccess?.(e3), N(e3.data)?.request;
1659
+ } catch (e3) {
1660
+ let t3 = I(e3, { spreadPathsToArguments: {}, explicitPathsToArguments: { request: `$[0]`, itemDetails: `$[1]` }, singleArgumentUnchanged: false }, [`request`, `itemDetails`]);
1661
+ throw r2?.onError?.(e3), t3;
1662
+ }
1663
+ }
1664
+ ({ ...Un() });
1665
+ function Xi(e2) {
1666
+ return (t2, n2) => Yi(t2, n2, { httpClient: e2 });
1667
+ }
1668
+ var Zi = x(`wix.ecom.v1.back_in_stock_notification_request_created`, true, (e2) => N(F(e2, [{ transformFn: P, paths: [{ path: `entity.createdDate` }, { path: `metadata.eventTime` }] }])))();
1669
+ var Qi = x(`wix.ecom.v1.back_in_stock_notification_request_deleted`, true, (e2) => N(F(e2, [{ transformFn: P, paths: [{ path: `undefined.createdDate` }, { path: `metadata.eventTime` }] }])))();
1670
+ var $i = x(`wix.ecom.v1.back_in_stock_notification_request_updated`, true, (e2) => N(F(e2, [{ transformFn: P, paths: [{ path: `entity.createdDate` }, { path: `metadata.eventTime` }] }])))();
1671
+ var ea = L(Xi);
1672
+ z(Zi), z(Qi), z($i);
1673
+ function ta(e2) {
1674
+ return R(Object.assign(e2, { domainToMappings: { "bo._base_domain_": [{ srcPath: `/back-in-stock-service`, destPath: `` }], "wixbo.ai": [{ srcPath: `/back-in-stock-service`, destPath: `` }], "wix-bo.com": [{ srcPath: `/back-in-stock-service`, destPath: `` }], "www.wixapis.com": [{ srcPath: `/back-in-stock-service`, destPath: `` }], _: [{ srcPath: `/v1/back-in-stock-notification-requests`, destPath: `/v1/back-in-stock-notification-requests` }], "*.dev.wix-code.com": [{ srcPath: `/v1/back-in-stock-notification-requests`, destPath: `/v1/back-in-stock-notification-requests` }] } }));
1675
+ }
1676
+ var na = `@wix/auto_sdk_ecom_back-in-stock-settings`;
1677
+ function ra(e2) {
1678
+ function t2({ host: t3 }) {
1679
+ return { entityFqdn: `wix.ecom.v1.back_in_stock_settings`, method: `PUT`, methodFqn: `com.wixpress.ecom.back.in.stock.BackInStockSettingsService.GetSettings`, packageName: na, migrationOptions: { optInTransformResponse: true }, url: ta({ protoPath: `/v1/back-in-stock-notification-requests/settings`, data: e2, host: t3 }), data: e2 };
1680
+ }
1681
+ return t2;
1682
+ }
1683
+ async function ia() {
1684
+ let { httpClient: e2, sideEffects: t2 } = arguments[0], n2 = ra(M({}));
1685
+ t2?.onSiteCall?.();
1686
+ try {
1687
+ let r2 = await e2.request(n2);
1688
+ return t2?.onSuccess?.(r2), N(r2.data);
1689
+ } catch (e3) {
1690
+ let n3 = I(e3, { spreadPathsToArguments: {}, explicitPathsToArguments: {}, singleArgumentUnchanged: false }, []);
1691
+ throw t2?.onError?.(e3), n3;
1692
+ }
1693
+ }
1694
+ function aa(e2) {
1695
+ return () => ia({ httpClient: e2 });
1696
+ }
1697
+ var oa = L(aa);
1698
+ function sa(e2) {
1699
+ return R(Object.assign(e2, { domainToMappings: { "api._api_base_domain_": [{ srcPath: `/cart-v2`, destPath: `` }], _: [{ srcPath: `/_api/cart-v2`, destPath: `` }], "*.dev.wix-code.com": [{ srcPath: `/_api/cart-v2`, destPath: `` }], "www._base_domain_": [{ srcPath: `/_api/cart-v2`, destPath: `` }], "editor._base_domain_": [{ srcPath: `/_api/cart-v2`, destPath: `` }], "blocks._base_domain_": [{ srcPath: `/_api/cart-v2`, destPath: `` }], "create.editorx": [{ srcPath: `/_api/cart-v2`, destPath: `` }], "apps._base_domain_": [{ srcPath: `/_api/cart-v2`, destPath: `` }], "manage._base_domain_": [{ srcPath: `/_api/cart-v2`, destPath: `` }], "bo._base_domain_": [{ srcPath: `/_api/cart-v2`, destPath: `` }], "wixbo.ai": [{ srcPath: `/_api/cart-v2`, destPath: `` }], "wix-bo.com": [{ srcPath: `/_api/cart-v2`, destPath: `` }], "www.wixapis.com": [{ srcPath: `/ecom/v2/carts`, destPath: `/v2/carts` }], "editor.wixapps.net": [{ srcPath: `/_api/cart-v2`, destPath: `` }] } }));
1700
+ }
1701
+ var ca = `@wix/auto_sdk_ecom_cart-v-2`;
1702
+ function la(e2) {
1703
+ function t2({ host: t3 }) {
1704
+ let n2 = F(e2, [{ transformFn: it, paths: [{ path: `cart.createdDate` }, { path: `cart.updatedDate` }, { path: `cart.lineItems.source.catalogOverrideFields.image.urlExpirationDate` }, { path: `cart.lineItems.attributes.image.urlExpirationDate` }, { path: `cart.lineItems.attributes.subscriptionInfo.subscriptionSettings.startDate` }, { path: `cart.lineItems.attributes.serviceProperties.scheduledDate` }, { path: `cart.lineItems.attributes.serviceProperties.endDate` }, { path: `catalogItems.catalogOverrideFields.image.urlExpirationDate` }, { path: `customItems.attributes.image.urlExpirationDate` }, { path: `customItems.attributes.serviceProperties.scheduledDate` }, { path: `customItems.attributes.serviceProperties.endDate` }, { path: `customItems.attributes.subscriptionInfo.subscriptionSettings.startDate` }] }, { transformFn: fn, paths: [{ path: `cart.lineItems.source.catalogOverrideFields.physicalProperties.weight` }, { path: `cart.lineItems.attributes.physicalProperties.weight` }, { path: `cart.deliveryInfo.address.geocode.latitude` }, { path: `cart.deliveryInfo.address.geocode.longitude` }, { path: `cart.paymentInfo.billingAddress.geocode.latitude` }, { path: `cart.paymentInfo.billingAddress.geocode.longitude` }, { path: `cart.legacyFields.discounts.merchantDiscount.percentage` }, { path: `cart.tcAppliedDiscounts.merchantDiscount.percentage` }, { path: `catalogItems.catalogOverrideFields.physicalProperties.weight` }, { path: `customItems.attributes.physicalProperties.weight` }] }]);
1705
+ return { entityFqdn: `wix.ecom.v2.cart`, method: `POST`, methodFqn: `wix.ecom.cart.v2.CartService.CreateCart`, packageName: ca, migrationOptions: { optInTransformResponse: true }, url: sa({ protoPath: `/v2/carts`, data: n2, host: t3 }), data: n2, transformResponse: (e3) => F(e3, [{ transformFn: P, paths: [{ path: `cart.createdDate` }, { path: `cart.updatedDate` }, { path: `cart.lineItems.source.catalogOverrideFields.image.urlExpirationDate` }, { path: `cart.lineItems.attributes.image.urlExpirationDate` }, { path: `cart.lineItems.attributes.subscriptionInfo.subscriptionSettings.startDate` }, { path: `cart.lineItems.attributes.serviceProperties.scheduledDate` }, { path: `cart.lineItems.attributes.serviceProperties.endDate` }] }, { transformFn: B, paths: [{ path: `cart.lineItems.source.catalogOverrideFields.physicalProperties.weight` }, { path: `cart.lineItems.attributes.physicalProperties.weight` }, { path: `cart.deliveryInfo.address.geocode.latitude` }, { path: `cart.deliveryInfo.address.geocode.longitude` }, { path: `cart.paymentInfo.billingAddress.geocode.latitude` }, { path: `cart.paymentInfo.billingAddress.geocode.longitude` }, { path: `cart.legacyFields.discounts.merchantDiscount.percentage` }, { path: `cart.tcAppliedDiscounts.merchantDiscount.percentage` }] }]) };
1706
+ }
1707
+ return t2;
1708
+ }
1709
+ var ua = ((e2) => (e2.UNSPECIFIED = `UNSPECIFIED`, e2.WEB = `WEB`, e2.POS = `POS`, e2.EBAY = `EBAY`, e2.AMAZON = `AMAZON`, e2.OTHER_PLATFORM = `OTHER_PLATFORM`, e2.WIX_APP_STORE = `WIX_APP_STORE`, e2.WIX_INVOICES = `WIX_INVOICES`, e2.BACKOFFICE_MERCHANT = `BACKOFFICE_MERCHANT`, e2.WISH = `WISH`, e2.CLASS_PASS = `CLASS_PASS`, e2.GLOBAL_E = `GLOBAL_E`, e2.FACEBOOK = `FACEBOOK`, e2.ETSY = `ETSY`, e2.TIKTOK = `TIKTOK`, e2.FAIRE_COM = `FAIRE_COM`, e2.PAYPAL_AGENTIC_CHECKOUT = `PAYPAL_AGENTIC_CHECKOUT`, e2.STRIPE_AGENTIC_CHECKOUT = `STRIPE_AGENTIC_CHECKOUT`, e2.WIX_INVOICES_PLATFORM = `WIX_INVOICES_PLATFORM`, e2.UCP_AGENTIC_CHECKOUT = `UCP_AGENTIC_CHECKOUT`, e2))(ua || {});
1710
+ async function da(e2) {
1711
+ let { httpClient: t2, sideEffects: n2 } = arguments[1], r2 = la(F(M({ cart: e2?.cart, catalogItems: e2?.catalogItems, customItems: e2?.customItems, coupons: e2?.coupons, deliveryMethod: e2?.deliveryMethod, giftCards: e2?.giftCards }), [{ transformFn: nr, paths: [{ path: `cart.lineItems.source.catalogOverrideFields.image` }, { path: `cart.lineItems.attributes.image` }, { path: `catalogItems.catalogOverrideFields.image` }, { path: `customItems.attributes.image` }] }, { transformFn: Ar, paths: [{ path: `cart.lineItems.attributes.url` }, { path: `customItems.attributes.url` }] }, { transformFn: pn, paths: [{ path: `cart.deliveryInfo.address` }, { path: `cart.paymentInfo.billingAddress` }] }]));
1712
+ n2?.onSiteCall?.();
1713
+ try {
1714
+ let e3 = await t2.request(r2);
1715
+ return n2?.onSuccess?.(e3), N(F(e3.data, [{ transformFn: U, paths: [{ path: `cart.lineItems.source.catalogOverrideFields.image` }, { path: `cart.lineItems.attributes.image` }] }, { transformFn: W, paths: [{ path: `cart.lineItems.attributes.url` }] }, { transformFn: mn, paths: [{ path: `cart.deliveryInfo.address` }, { path: `cart.paymentInfo.billingAddress` }] }]))?.cart;
1716
+ } catch (e3) {
1717
+ let t3 = I(e3, { spreadPathsToArguments: {}, explicitPathsToArguments: { cart: `$[0].cart`, catalogItems: `$[0].catalogItems`, customItems: `$[0].customItems`, coupons: `$[0].coupons`, deliveryMethod: `$[0].deliveryMethod`, giftCards: `$[0].giftCards` }, singleArgumentUnchanged: false }, [`options`]);
1718
+ throw n2?.onError?.(e3), t3;
1719
+ }
1720
+ }
1721
+ function fa(e2) {
1722
+ return (t2) => da(t2, { httpClient: e2 });
1723
+ }
1724
+ var pa = L(fa);
1725
+ function ma(e2) {
1726
+ return R(Object.assign(e2, { domainToMappings: { "api._api_base_domain_": [{ srcPath: `/cart-v2`, destPath: `` }], _: [{ srcPath: `/_api/cart-v2`, destPath: `` }], "*.dev.wix-code.com": [{ srcPath: `/_api/cart-v2`, destPath: `` }], "www._base_domain_": [{ srcPath: `/_api/cart-v2`, destPath: `` }], "editor._base_domain_": [{ srcPath: `/_api/cart-v2`, destPath: `` }], "blocks._base_domain_": [{ srcPath: `/_api/cart-v2`, destPath: `` }], "create.editorx": [{ srcPath: `/_api/cart-v2`, destPath: `` }], "apps._base_domain_": [{ srcPath: `/_api/cart-v2`, destPath: `` }], "manage._base_domain_": [{ srcPath: `/_api/cart-v2`, destPath: `` }], "bo._base_domain_": [{ srcPath: `/_api/cart-v2`, destPath: `` }], "wixbo.ai": [{ srcPath: `/_api/cart-v2`, destPath: `` }], "wix-bo.com": [{ srcPath: `/_api/cart-v2`, destPath: `` }], "www.wixapis.com": [{ srcPath: `/ecom/v2/carts`, destPath: `/v2/carts` }], "editor.wixapps.net": [{ srcPath: `/_api/cart-v2`, destPath: `` }] } }));
1727
+ }
1728
+ var ha = `@wix/auto_sdk_ecom_current-cart-v-2`;
1729
+ function ga(e2) {
1730
+ function t2({ host: t3 }) {
1731
+ let n2 = F(e2, [{ transformFn: fn, paths: [{ path: `catalogItems.catalogOverrideFields.physicalProperties.weight` }, { path: `customItems.attributes.physicalProperties.weight` }] }, { transformFn: it, paths: [{ path: `catalogItems.catalogOverrideFields.image.urlExpirationDate` }, { path: `customItems.attributes.image.urlExpirationDate` }, { path: `customItems.attributes.serviceProperties.scheduledDate` }, { path: `customItems.attributes.serviceProperties.endDate` }, { path: `customItems.attributes.subscriptionInfo.subscriptionSettings.startDate` }] }]);
1732
+ return { entityFqdn: `wix.ecom.v2.cart`, method: `POST`, methodFqn: `wix.ecom.cart.v2.CurrentCartService.AddLineItemsToCurrentCart`, packageName: ha, migrationOptions: { optInTransformResponse: true }, url: ma({ protoPath: `/v2/carts/current/add-line-items`, data: n2, host: t3 }), data: n2, transformResponse: (e3) => F(e3, [{ transformFn: P, paths: [{ path: `cart.createdDate` }, { path: `cart.updatedDate` }, { path: `cart.lineItems.source.catalogOverrideFields.image.urlExpirationDate` }, { path: `cart.lineItems.attributes.image.urlExpirationDate` }, { path: `cart.lineItems.attributes.subscriptionInfo.subscriptionSettings.startDate` }, { path: `cart.lineItems.attributes.serviceProperties.scheduledDate` }, { path: `cart.lineItems.attributes.serviceProperties.endDate` }] }, { transformFn: B, paths: [{ path: `cart.lineItems.source.catalogOverrideFields.physicalProperties.weight` }, { path: `cart.lineItems.attributes.physicalProperties.weight` }, { path: `cart.deliveryInfo.address.geocode.latitude` }, { path: `cart.deliveryInfo.address.geocode.longitude` }, { path: `cart.paymentInfo.billingAddress.geocode.latitude` }, { path: `cart.paymentInfo.billingAddress.geocode.longitude` }, { path: `cart.legacyFields.discounts.merchantDiscount.percentage` }, { path: `cart.tcAppliedDiscounts.merchantDiscount.percentage` }] }]) };
1733
+ }
1734
+ return t2;
1735
+ }
1736
+ async function _a(e2) {
1737
+ let { httpClient: t2, sideEffects: n2 } = arguments[1], r2 = ga(F(M({ catalogItems: e2?.catalogItems, customItems: e2?.customItems }), [{ transformFn: nr, paths: [{ path: `catalogItems.catalogOverrideFields.image` }, { path: `customItems.attributes.image` }] }, { transformFn: Ar, paths: [{ path: `customItems.attributes.url` }] }]));
1738
+ n2?.onSiteCall?.();
1739
+ try {
1740
+ let e3 = await t2.request(r2);
1741
+ return n2?.onSuccess?.(e3), N(F(e3.data, [{ transformFn: U, paths: [{ path: `cart.lineItems.source.catalogOverrideFields.image` }, { path: `cart.lineItems.attributes.image` }] }, { transformFn: W, paths: [{ path: `cart.lineItems.attributes.url` }] }, { transformFn: mn, paths: [{ path: `cart.deliveryInfo.address` }, { path: `cart.paymentInfo.billingAddress` }] }]));
1742
+ } catch (e3) {
1743
+ let t3 = I(e3, { spreadPathsToArguments: {}, explicitPathsToArguments: { catalogItems: `$[0].catalogItems`, customItems: `$[0].customItems` }, singleArgumentUnchanged: false }, [`options`]);
1744
+ throw n2?.onError?.(e3), t3;
1745
+ }
1746
+ }
1747
+ function va(e2) {
1748
+ return (t2) => _a(t2, { httpClient: e2 });
1749
+ }
1750
+ var ya = L(va);
1751
+ async function ba(e2) {
1752
+ await ya({ catalogItems: [e2] });
1753
+ }
1754
+ var xa = { type: `invalid-purchase`, message: `This item can't be purchased.` };
1755
+ function Sa(e2) {
1756
+ let t2 = e2;
1757
+ return { type: `cart`, message: t2?.message, details: t2?.details };
1758
+ }
1759
+ function q(e2) {
1760
+ return e2;
1761
+ }
1762
+ var Ca = q(`@wix/site-service-public-api-caller`);
1763
+ var wa = `215238eb-22a5-4c36-9e7b-e7c08025e04e`;
1764
+ var Ta = `1380b703-ce81-ff05-f115-39571d94dfcd`;
1765
+ `${wa}`, `${wa}`;
1766
+ var J = function(e2) {
1767
+ return e2.SIDE_CART = `ecom_side_cart`, e2.CART = `shopping_cart`, e2.CHECKOUT = `checkout`, e2.PRODUCT_PAGE = `product-page-builder`, e2.CATEGORY_PAGE = `category-page-builder`, e2;
1768
+ }({});
1769
+ var Ea = () => {
1770
+ let e2 = s();
1771
+ return { reloadCart: t(async () => {
1772
+ if (typeof window < `u`) try {
1773
+ await e2(Ca).callPublicApi(Ta, `cart.reloadCart`, []);
1774
+ } catch {
1775
+ }
1776
+ }, [e2]) };
1777
+ };
1778
+ var Da = q(`@wix/viewer-service-router`);
1779
+ var Oa = q(`@wix/site-service-url`);
1780
+ var ka = q(`@wix/site-service-editor-context`);
1781
+ var Aa = q(`@wix/site-service-pages`);
1782
+ var ja = () => {
1783
+ let e2 = c(Oa), n2 = t((t2, n3) => {
1784
+ let r2 = e2.appSectionRelativeUrl(wa, t2, true);
1785
+ if (r2) return `./${r2.replace(/^\//, ``).replace(/\/$/, ``)}/${encodeURIComponent(n3)}`;
1786
+ }, [e2]);
1787
+ return { getPageRelativeUrl: n2, getPageAbsoluteUrl: t((t2, r2) => {
1788
+ let i2 = n2(t2, r2);
1789
+ if (i2) return new URL(i2, `${e2.siteUrl.replace(/\/$/, ``)}/`).href;
1790
+ }, [n2, e2]) };
1791
+ };
1792
+ var Ma = (e2) => {
1793
+ if (!e2) return ``;
1794
+ let t2 = new URLSearchParams(e2).toString();
1795
+ return t2 ? `?${t2}` : ``;
1796
+ };
1797
+ var Na = (e2, t2, n2) => {
1798
+ let r2 = `./${e2.replace(/^\//, ``)}`;
1799
+ return n2 ? r2 : new URL(r2, `${t2.replace(/\/$/, ``)}/`).href;
1800
+ };
1801
+ var Pa = () => {
1802
+ let e2 = c(Da), n2 = c(Oa), r2 = c(ka), i2 = c(Aa), { getPageRelativeUrl: a2, getPageAbsoluteUrl: o2 } = ja();
1803
+ return { navigateToPage: t(async (t2, i3) => {
1804
+ try {
1805
+ let a3 = n2.appSectionRelativeUrl(Ta, t2);
1806
+ if (!a3) return false;
1807
+ let o3 = `${a3}${Ma(i3)}`;
1808
+ return await e2.navigateTo({ href: Na(o3, n2.siteUrl, r2.previewMode) }), true;
1809
+ } catch {
1810
+ return false;
1811
+ }
1812
+ }, [e2, n2, r2]), navigateToProductPage: t(async (t2) => {
1813
+ try {
1814
+ let n3 = r2.previewMode ? a2(J.PRODUCT_PAGE, t2) : o2(J.PRODUCT_PAGE, t2);
1815
+ if (!n3) throw Error(`Failed to resolve app section relative URL for the product page`);
1816
+ await e2.navigateTo({ href: n3 });
1817
+ } catch (e3) {
1818
+ console.error(`navigateToProductPage: failed to navigate to product "${t2}"`, e3);
1819
+ }
1820
+ }, [e2, r2, a2, o2]), openLightbox: t(async (t2) => {
1821
+ try {
1822
+ let n3 = Object.entries(i2.pages).find(([, e3]) => e3.popup && e3.appPageId === t2)?.[0];
1823
+ return n3 ? (await e2.navigateTo({ linkPopupId: n3 }), true) : false;
1824
+ } catch {
1825
+ return false;
1826
+ }
1827
+ }, [e2, i2]) };
1828
+ };
1829
+ var Y = function(e2) {
1830
+ return e2.IDLE = `idle`, e2.IN_PROGRESS = `in-progress`, e2.SUCCESS = `success`, e2;
1831
+ }({});
1832
+ var Fa = function(e2) {
1833
+ return e2.NONE = `none`, e2.NAVIGATE_TO_CART = `navigate-to-cart`, e2.OPEN_SIDE_CART = `open-side-cart`, e2;
1834
+ }({});
1835
+ var Ia = () => {
1836
+ let [e2, n2] = i(Y.IDLE), { navigateToPage: r2, openLightbox: a2 } = Pa(), { reloadCart: o2 } = Ea(), s2 = t(async (e3) => {
1837
+ switch (e3) {
1838
+ case Fa.NAVIGATE_TO_CART:
1839
+ await r2(J.CART);
1840
+ return;
1841
+ case Fa.OPEN_SIDE_CART:
1842
+ await a2(J.SIDE_CART);
1843
+ return;
1844
+ case Fa.NONE:
1845
+ default:
1846
+ return;
1847
+ }
1848
+ }, [r2, a2]);
1849
+ return { addToCart: t(async (e3, t2) => {
1850
+ n2(Y.IN_PROGRESS);
1851
+ try {
1852
+ await ba(e3);
1853
+ } catch (e4) {
1854
+ return n2(Y.IDLE), { ok: false, error: Sa(e4) };
1855
+ }
1856
+ try {
1857
+ await o2(), n2(Y.SUCCESS), await s2(t2), setTimeout(() => n2(Y.IDLE), 2e3);
1858
+ } catch {
1859
+ n2(Y.IDLE);
1860
+ }
1861
+ return { ok: true };
1862
+ }, [o2, s2]), addToCartState: e2, reloadCart: o2 };
1863
+ };
1864
+ async function La(e2) {
1865
+ let t2 = await pa({ cart: { source: { channelType: ua.WEB } }, catalogItems: [e2] });
1866
+ if (!t2._id) throw Error(`missing checkout id`);
1867
+ return t2._id;
1868
+ }
1869
+ var Ra = function(e2) {
1870
+ return e2.IDLE = `idle`, e2.IN_PROGRESS = `in-progress`, e2;
1871
+ }({});
1872
+ var za = () => {
1873
+ let { navigateToPage: e2 } = Pa(), [n2, r2] = i(Ra.IDLE);
1874
+ return { buyNowState: n2, buyNow: t(async (t2) => {
1875
+ r2(Ra.IN_PROGRESS);
1876
+ try {
1877
+ let n3 = await La(t2);
1878
+ return await e2(J.CHECKOUT, { checkoutId: n3 }) ? { ok: true } : { ok: false, error: Sa(Error(`Failed to navigate to checkout`)) };
1879
+ } catch (e3) {
1880
+ return { ok: false, error: Sa(e3) };
1881
+ } finally {
1882
+ r2(Ra.IDLE);
1883
+ }
1884
+ }, [e2]) };
1885
+ };
1886
+ function Ba(e2) {
1887
+ let { product: t2, selectedVariant: n2, userSelections: r2, isPreOrder: i2 } = e2;
1888
+ return { catalogReference: { appId: wa, catalogItemId: t2.id, options: Va({ product: t2, selectedVariant: n2, userSelections: r2, isPreOrder: i2 }) }, quantity: r2.quantity };
1889
+ }
1890
+ var Va = ({ product: e2, selectedVariant: t2, userSelections: n2, isPreOrder: r2 }) => {
1891
+ let i2 = Ha(e2, t2.choices), { choiceBasedModifiers: a2, customTextFields: o2 } = Ua(e2, n2.selectedModifiers), s2 = { ...i2, ...a2 }, { selectedSubscriptionPlanId: c2 } = n2, l2 = { variantId: t2.id, options: s2 };
1892
+ return Object.keys(o2).length > 0 && (l2.customTextFields = o2), Wa(c2) && (l2.subscriptionOptionId = c2), r2 && (l2.preOrderRequested = true), l2;
1893
+ };
1894
+ var Ha = (e2, t2) => {
1895
+ let n2 = {};
1896
+ for (let [r2, i2] of Object.entries(t2)) {
1897
+ let t3 = e2.options.find((e3) => e3.id === r2), a2 = t3?.choices.find((e3) => e3.choiceId === i2);
1898
+ t3 && a2 && (n2[t3.key] = a2.key);
1899
+ }
1900
+ return n2;
1901
+ };
1902
+ var Ua = (e2, t2) => {
1903
+ let n2 = {}, r2 = {};
1904
+ for (let i2 of Object.values(e2.modifiers)) if (i2.modifierRenderType === Pr.FREE_TEXT) {
1905
+ let e3 = i2.freeTextSettings?.key;
1906
+ e3 && (r2[e3] = t2[i2.id] ?? ``);
1907
+ } else {
1908
+ let e3 = t2[i2.id], r3 = i2.choices?.find((t3) => t3.choiceId === e3);
1909
+ r3 && (n2[i2.key] = r3.key);
1910
+ }
1911
+ return { choiceBasedModifiers: n2, customTextFields: r2 };
1912
+ };
1913
+ var Wa = (e2) => e2 !== void 0 && e2 !== `one-time`;
1914
+ function Ga(e2, r2, i2) {
1915
+ let { selectedVariant: a2, selectedModifiers: o2, selectedSubscriptionPlanId: s2, quantity: c2, isSelectionValid: l2, setHasAttemptedSubmit: u2 } = r2, { addToCart: d2, addToCartState: f2 } = Ia(), { buyNow: p2, buyNowState: m2 } = za(), h2 = i2.isPreOrderState || i2.isInStock, g2 = t(async (t2) => !h2 || (u2(true), !l2 || !a2) ? { ok: false, error: xa } : d2(Ba({ product: e2, selectedVariant: a2, userSelections: { selectedModifiers: o2, selectedSubscriptionPlanId: s2, quantity: c2 }, isPreOrder: i2.isPreOrderState }), t2 ?? Fa.NONE), [h2, i2.isPreOrderState, l2, u2, e2, a2, o2, s2, c2, d2]), _2 = t(async () => !h2 || (u2(true), !l2 || !a2) ? { ok: false, error: xa } : p2(Ba({ product: e2, selectedVariant: a2, userSelections: { selectedModifiers: o2, selectedSubscriptionPlanId: s2, quantity: c2 }, isPreOrder: i2.isPreOrderState })), [h2, i2.isPreOrderState, l2, u2, e2, a2, o2, s2, c2, p2]);
1916
+ return n(() => ({ addToCartState: f2, buyNowState: m2, handleAddToCart: g2, handleBuyNow: _2 }), [f2, m2, g2, _2]);
1917
+ }
1918
+ function Ka(e2) {
1919
+ return Ja(e2) ?? 99999;
1920
+ }
1921
+ function qa(e2, t2) {
1922
+ return Math.min(e2, Math.max(t2, 1));
1923
+ }
1924
+ function Ja(e2) {
1925
+ if (!e2 || !e2.trackQuantity) return;
1926
+ let { availabilityStatus: t2, inventoryQuantity: n2, preorderInfo: r2 } = e2, i2 = t2 === `PREORDER` ? r2?.quantity : n2;
1927
+ if (i2 != null) return Math.max(0, i2);
1928
+ }
1929
+ function Ya(e2) {
1930
+ let { availabilityStatus: t2, preorderAvailability: n2 } = e2 ?? {}, r2 = t2 !== Fr.OUT_OF_STOCK;
1931
+ return { isInStock: r2, isPreOrderState: n2 === Ir.ALL_VARIANTS || n2 === Ir.SOME_VARIANTS && !r2 };
1932
+ }
1933
+ function Xa(e2, t2) {
1934
+ return t2 ? { isInStock: t2.availabilityStatus === vr.IN_STOCK, isPreOrderState: t2.availabilityStatus === vr.PREORDER } : Ya(e2.inventory);
1935
+ }
1936
+ function Za(e2, t2) {
1937
+ return n(() => {
1938
+ let { isInStock: n2, isPreOrderState: r2 } = Xa(e2, t2);
1939
+ return { isInStock: n2, isPreOrderState: r2, preOrderMessage: r2 ? t2?.preorderInfo?.message : void 0, remainingItemCount: Ja(t2) };
1940
+ }, [e2.inventory, t2]);
1941
+ }
1942
+ var Qa = _((e2, t2) => {
1943
+ t2.exports = typeof window == `object` && window && window.Object === Object && window;
1944
+ });
1945
+ var X = _((e2, t2) => {
1946
+ var n2 = Qa(), r2 = typeof self == `object` && self && self.Object === Object && self;
1947
+ t2.exports = n2 || r2 || Function(`return this`)();
1948
+ });
1949
+ var $a = _((e2, t2) => {
1950
+ t2.exports = X().Symbol;
1951
+ });
1952
+ var eo = _((e2, t2) => {
1953
+ var n2 = $a(), r2 = Object.prototype, i2 = r2.hasOwnProperty, a2 = r2.toString, o2 = n2 ? n2.toStringTag : void 0;
1954
+ function s2(e3) {
1955
+ var t3 = i2.call(e3, o2), n3 = e3[o2];
1956
+ try {
1957
+ e3[o2] = void 0;
1958
+ var r3 = true;
1959
+ } catch {
1960
+ }
1961
+ var s3 = a2.call(e3);
1962
+ return r3 && (t3 ? e3[o2] = n3 : delete e3[o2]), s3;
1963
+ }
1964
+ t2.exports = s2;
1965
+ });
1966
+ var to = _((e2, t2) => {
1967
+ var n2 = Object.prototype.toString;
1968
+ function r2(e3) {
1969
+ return n2.call(e3);
1970
+ }
1971
+ t2.exports = r2;
1972
+ });
1973
+ var no = _((e2, t2) => {
1974
+ var n2 = $a(), r2 = eo(), i2 = to(), a2 = `[object Null]`, o2 = `[object Undefined]`, s2 = n2 ? n2.toStringTag : void 0;
1975
+ function c2(e3) {
1976
+ return e3 == null ? e3 === void 0 ? o2 : a2 : s2 && s2 in Object(e3) ? r2(e3) : i2(e3);
1977
+ }
1978
+ t2.exports = c2;
1979
+ });
1980
+ var ro = _((e2, t2) => {
1981
+ function n2(e3) {
1982
+ return typeof e3 == `object` && !!e3;
1983
+ }
1984
+ t2.exports = n2;
1985
+ });
1986
+ var io = _((e2, t2) => {
1987
+ var n2 = no(), r2 = ro(), i2 = `[object Symbol]`;
1988
+ function a2(e3) {
1989
+ return typeof e3 == `symbol` || r2(e3) && n2(e3) == i2;
1990
+ }
1991
+ t2.exports = a2;
1992
+ });
1993
+ var ao = _((e2, t2) => {
1994
+ var n2 = io();
1995
+ function r2(e3, t3, r3) {
1996
+ for (var i2 = -1, a2 = e3.length; ++i2 < a2; ) {
1997
+ var o2 = e3[i2], s2 = t3(o2);
1998
+ if (s2 != null && (c2 === void 0 ? s2 === s2 && !n2(s2) : r3(s2, c2))) var c2 = s2, l2 = o2;
1999
+ }
2000
+ return l2;
2001
+ }
2002
+ t2.exports = r2;
2003
+ });
2004
+ var oo = _((e2, t2) => {
2005
+ function n2(e3, t3) {
2006
+ return e3 > t3;
2007
+ }
2008
+ t2.exports = n2;
2009
+ });
2010
+ var so = _((e2, t2) => {
2011
+ function n2(e3) {
2012
+ return e3;
2013
+ }
2014
+ t2.exports = n2;
2015
+ });
2016
+ var co = _((e2, t2) => {
2017
+ var n2 = ao(), r2 = oo(), i2 = so();
2018
+ function a2(e3) {
2019
+ return e3 && e3.length ? n2(e3, i2, r2) : void 0;
2020
+ }
2021
+ t2.exports = a2;
2022
+ });
2023
+ var lo = _((e2, t2) => {
2024
+ function n2() {
2025
+ this.__data__ = [], this.size = 0;
2026
+ }
2027
+ t2.exports = n2;
2028
+ });
2029
+ var uo = _((e2, t2) => {
2030
+ function n2(e3, t3) {
2031
+ return e3 === t3 || e3 !== e3 && t3 !== t3;
2032
+ }
2033
+ t2.exports = n2;
2034
+ });
2035
+ var fo = _((e2, t2) => {
2036
+ var n2 = uo();
2037
+ function r2(e3, t3) {
2038
+ for (var r3 = e3.length; r3--; ) if (n2(e3[r3][0], t3)) return r3;
2039
+ return -1;
2040
+ }
2041
+ t2.exports = r2;
2042
+ });
2043
+ var po = _((e2, t2) => {
2044
+ var n2 = fo(), r2 = Array.prototype.splice;
2045
+ function i2(e3) {
2046
+ var t3 = this.__data__, i3 = n2(t3, e3);
2047
+ return i3 < 0 ? false : (i3 == t3.length - 1 ? t3.pop() : r2.call(t3, i3, 1), --this.size, true);
2048
+ }
2049
+ t2.exports = i2;
2050
+ });
2051
+ var mo = _((e2, t2) => {
2052
+ var n2 = fo();
2053
+ function r2(e3) {
2054
+ var t3 = this.__data__, r3 = n2(t3, e3);
2055
+ return r3 < 0 ? void 0 : t3[r3][1];
2056
+ }
2057
+ t2.exports = r2;
2058
+ });
2059
+ var ho = _((e2, t2) => {
2060
+ var n2 = fo();
2061
+ function r2(e3) {
2062
+ return n2(this.__data__, e3) > -1;
2063
+ }
2064
+ t2.exports = r2;
2065
+ });
2066
+ var go = _((e2, t2) => {
2067
+ var n2 = fo();
2068
+ function r2(e3, t3) {
2069
+ var r3 = this.__data__, i2 = n2(r3, e3);
2070
+ return i2 < 0 ? (++this.size, r3.push([e3, t3])) : r3[i2][1] = t3, this;
2071
+ }
2072
+ t2.exports = r2;
2073
+ });
2074
+ var _o = _((e2, t2) => {
2075
+ var n2 = lo(), r2 = po(), i2 = mo(), a2 = ho(), o2 = go();
2076
+ function s2(e3) {
2077
+ var t3 = -1, n3 = e3 == null ? 0 : e3.length;
2078
+ for (this.clear(); ++t3 < n3; ) {
2079
+ var r3 = e3[t3];
2080
+ this.set(r3[0], r3[1]);
2081
+ }
2082
+ }
2083
+ s2.prototype.clear = n2, s2.prototype.delete = r2, s2.prototype.get = i2, s2.prototype.has = a2, s2.prototype.set = o2, t2.exports = s2;
2084
+ });
2085
+ var vo = _((e2, t2) => {
2086
+ var n2 = _o();
2087
+ function r2() {
2088
+ this.__data__ = new n2(), this.size = 0;
2089
+ }
2090
+ t2.exports = r2;
2091
+ });
2092
+ var yo = _((e2, t2) => {
2093
+ function n2(e3) {
2094
+ var t3 = this.__data__, n3 = t3.delete(e3);
2095
+ return this.size = t3.size, n3;
2096
+ }
2097
+ t2.exports = n2;
2098
+ });
2099
+ var bo = _((e2, t2) => {
2100
+ function n2(e3) {
2101
+ return this.__data__.get(e3);
2102
+ }
2103
+ t2.exports = n2;
2104
+ });
2105
+ var xo = _((e2, t2) => {
2106
+ function n2(e3) {
2107
+ return this.__data__.has(e3);
2108
+ }
2109
+ t2.exports = n2;
2110
+ });
2111
+ var So = _((e2, t2) => {
2112
+ function n2(e3) {
2113
+ var t3 = typeof e3;
2114
+ return e3 != null && (t3 == `object` || t3 == `function`);
2115
+ }
2116
+ t2.exports = n2;
2117
+ });
2118
+ var Co = _((e2, t2) => {
2119
+ var n2 = no(), r2 = So(), i2 = `[object AsyncFunction]`, a2 = `[object Function]`, o2 = `[object GeneratorFunction]`, s2 = `[object Proxy]`;
2120
+ function c2(e3) {
2121
+ if (!r2(e3)) return false;
2122
+ var t3 = n2(e3);
2123
+ return t3 == a2 || t3 == o2 || t3 == i2 || t3 == s2;
2124
+ }
2125
+ t2.exports = c2;
2126
+ });
2127
+ var wo = _((e2, t2) => {
2128
+ t2.exports = X()[`__core-js_shared__`];
2129
+ });
2130
+ var To = _((e2, t2) => {
2131
+ var n2 = wo(), r2 = function() {
2132
+ var e3 = /[^.]+$/.exec(n2 && n2.keys && n2.keys.IE_PROTO || ``);
2133
+ return e3 ? `Symbol(src)_1.` + e3 : ``;
2134
+ }();
2135
+ function i2(e3) {
2136
+ return !!r2 && r2 in e3;
2137
+ }
2138
+ t2.exports = i2;
2139
+ });
2140
+ var Eo = _((e2, t2) => {
2141
+ var n2 = Function.prototype.toString;
2142
+ function r2(e3) {
2143
+ if (e3 != null) {
2144
+ try {
2145
+ return n2.call(e3);
2146
+ } catch {
2147
+ }
2148
+ try {
2149
+ return e3 + ``;
2150
+ } catch {
2151
+ }
2152
+ }
2153
+ return ``;
2154
+ }
2155
+ t2.exports = r2;
2156
+ });
2157
+ var Do = _((e2, t2) => {
2158
+ var n2 = Co(), r2 = To(), i2 = So(), a2 = Eo(), o2 = /[\\^$.*+?()[\]{}|]/g, s2 = /^\[object .+?Constructor\]$/, c2 = Function.prototype, l2 = Object.prototype, u2 = c2.toString, d2 = l2.hasOwnProperty, f2 = RegExp(`^` + u2.call(d2).replace(o2, `\\$&`).replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, `$1.*?`) + `$`);
2159
+ function p2(e3) {
2160
+ return !i2(e3) || r2(e3) ? false : (n2(e3) ? f2 : s2).test(a2(e3));
2161
+ }
2162
+ t2.exports = p2;
2163
+ });
2164
+ var Oo = _((e2, t2) => {
2165
+ function n2(e3, t3) {
2166
+ return e3?.[t3];
2167
+ }
2168
+ t2.exports = n2;
2169
+ });
2170
+ var ko = _((e2, t2) => {
2171
+ var n2 = Do(), r2 = Oo();
2172
+ function i2(e3, t3) {
2173
+ var i3 = r2(e3, t3);
2174
+ return n2(i3) ? i3 : void 0;
2175
+ }
2176
+ t2.exports = i2;
2177
+ });
2178
+ var Ao = _((e2, t2) => {
2179
+ t2.exports = ko()(X(), `Map`);
2180
+ });
2181
+ var jo = _((e2, t2) => {
2182
+ t2.exports = ko()(Object, `create`);
2183
+ });
2184
+ var Mo = _((e2, t2) => {
2185
+ var n2 = jo();
2186
+ function r2() {
2187
+ this.__data__ = n2 ? n2(null) : {}, this.size = 0;
2188
+ }
2189
+ t2.exports = r2;
2190
+ });
2191
+ var No = _((e2, t2) => {
2192
+ function n2(e3) {
2193
+ var t3 = this.has(e3) && delete this.__data__[e3];
2194
+ return this.size -= +!!t3, t3;
2195
+ }
2196
+ t2.exports = n2;
2197
+ });
2198
+ var Po = _((e2, t2) => {
2199
+ var n2 = jo(), r2 = `__lodash_hash_undefined__`, i2 = Object.prototype.hasOwnProperty;
2200
+ function a2(e3) {
2201
+ var t3 = this.__data__;
2202
+ if (n2) {
2203
+ var a3 = t3[e3];
2204
+ return a3 === r2 ? void 0 : a3;
2205
+ }
2206
+ return i2.call(t3, e3) ? t3[e3] : void 0;
2207
+ }
2208
+ t2.exports = a2;
2209
+ });
2210
+ var Fo = _((e2, t2) => {
2211
+ var n2 = jo(), r2 = Object.prototype.hasOwnProperty;
2212
+ function i2(e3) {
2213
+ var t3 = this.__data__;
2214
+ return n2 ? t3[e3] !== void 0 : r2.call(t3, e3);
2215
+ }
2216
+ t2.exports = i2;
2217
+ });
2218
+ var Io = _((e2, t2) => {
2219
+ var n2 = jo(), r2 = `__lodash_hash_undefined__`;
2220
+ function i2(e3, t3) {
2221
+ var i3 = this.__data__;
2222
+ return this.size += +!this.has(e3), i3[e3] = n2 && t3 === void 0 ? r2 : t3, this;
2223
+ }
2224
+ t2.exports = i2;
2225
+ });
2226
+ var Lo = _((e2, t2) => {
2227
+ var n2 = Mo(), r2 = No(), i2 = Po(), a2 = Fo(), o2 = Io();
2228
+ function s2(e3) {
2229
+ var t3 = -1, n3 = e3 == null ? 0 : e3.length;
2230
+ for (this.clear(); ++t3 < n3; ) {
2231
+ var r3 = e3[t3];
2232
+ this.set(r3[0], r3[1]);
2233
+ }
2234
+ }
2235
+ s2.prototype.clear = n2, s2.prototype.delete = r2, s2.prototype.get = i2, s2.prototype.has = a2, s2.prototype.set = o2, t2.exports = s2;
2236
+ });
2237
+ var Ro = _((e2, t2) => {
2238
+ var n2 = Lo(), r2 = _o(), i2 = Ao();
2239
+ function a2() {
2240
+ this.size = 0, this.__data__ = { hash: new n2(), map: new (i2 || r2)(), string: new n2() };
2241
+ }
2242
+ t2.exports = a2;
2243
+ });
2244
+ var zo = _((e2, t2) => {
2245
+ function n2(e3) {
2246
+ var t3 = typeof e3;
2247
+ return t3 == `string` || t3 == `number` || t3 == `symbol` || t3 == `boolean` ? e3 !== `__proto__` : e3 === null;
2248
+ }
2249
+ t2.exports = n2;
2250
+ });
2251
+ var Bo = _((e2, t2) => {
2252
+ var n2 = zo();
2253
+ function r2(e3, t3) {
2254
+ var r3 = e3.__data__;
2255
+ return n2(t3) ? r3[typeof t3 == `string` ? `string` : `hash`] : r3.map;
2256
+ }
2257
+ t2.exports = r2;
2258
+ });
2259
+ var Vo = _((e2, t2) => {
2260
+ var n2 = Bo();
2261
+ function r2(e3) {
2262
+ var t3 = n2(this, e3).delete(e3);
2263
+ return this.size -= +!!t3, t3;
2264
+ }
2265
+ t2.exports = r2;
2266
+ });
2267
+ var Ho = _((e2, t2) => {
2268
+ var n2 = Bo();
2269
+ function r2(e3) {
2270
+ return n2(this, e3).get(e3);
2271
+ }
2272
+ t2.exports = r2;
2273
+ });
2274
+ var Uo = _((e2, t2) => {
2275
+ var n2 = Bo();
2276
+ function r2(e3) {
2277
+ return n2(this, e3).has(e3);
2278
+ }
2279
+ t2.exports = r2;
2280
+ });
2281
+ var Wo = _((e2, t2) => {
2282
+ var n2 = Bo();
2283
+ function r2(e3, t3) {
2284
+ var r3 = n2(this, e3), i2 = r3.size;
2285
+ return r3.set(e3, t3), this.size += r3.size == i2 ? 0 : 1, this;
2286
+ }
2287
+ t2.exports = r2;
2288
+ });
2289
+ var Go = _((e2, t2) => {
2290
+ var n2 = Ro(), r2 = Vo(), i2 = Ho(), a2 = Uo(), o2 = Wo();
2291
+ function s2(e3) {
2292
+ var t3 = -1, n3 = e3 == null ? 0 : e3.length;
2293
+ for (this.clear(); ++t3 < n3; ) {
2294
+ var r3 = e3[t3];
2295
+ this.set(r3[0], r3[1]);
2296
+ }
2297
+ }
2298
+ s2.prototype.clear = n2, s2.prototype.delete = r2, s2.prototype.get = i2, s2.prototype.has = a2, s2.prototype.set = o2, t2.exports = s2;
2299
+ });
2300
+ var Ko = _((e2, t2) => {
2301
+ var n2 = _o(), r2 = Ao(), i2 = Go(), a2 = 200;
2302
+ function o2(e3, t3) {
2303
+ var o3 = this.__data__;
2304
+ if (o3 instanceof n2) {
2305
+ var s2 = o3.__data__;
2306
+ if (!r2 || s2.length < a2 - 1) return s2.push([e3, t3]), this.size = ++o3.size, this;
2307
+ o3 = this.__data__ = new i2(s2);
2308
+ }
2309
+ return o3.set(e3, t3), this.size = o3.size, this;
2310
+ }
2311
+ t2.exports = o2;
2312
+ });
2313
+ var qo = _((e2, t2) => {
2314
+ var n2 = _o(), r2 = vo(), i2 = yo(), a2 = bo(), o2 = xo(), s2 = Ko();
2315
+ function c2(e3) {
2316
+ var t3 = this.__data__ = new n2(e3);
2317
+ this.size = t3.size;
2318
+ }
2319
+ c2.prototype.clear = r2, c2.prototype.delete = i2, c2.prototype.get = a2, c2.prototype.has = o2, c2.prototype.set = s2, t2.exports = c2;
2320
+ });
2321
+ var Jo = _((e2, t2) => {
2322
+ function n2(e3) {
2323
+ return this.__data__.set(e3, `__lodash_hash_undefined__`), this;
2324
+ }
2325
+ t2.exports = n2;
2326
+ });
2327
+ var Yo = _((e2, t2) => {
2328
+ function n2(e3) {
2329
+ return this.__data__.has(e3);
2330
+ }
2331
+ t2.exports = n2;
2332
+ });
2333
+ var Xo = _((e2, t2) => {
2334
+ var n2 = Go(), r2 = Jo(), i2 = Yo();
2335
+ function a2(e3) {
2336
+ var t3 = -1, r3 = e3 == null ? 0 : e3.length;
2337
+ for (this.__data__ = new n2(); ++t3 < r3; ) this.add(e3[t3]);
2338
+ }
2339
+ a2.prototype.add = a2.prototype.push = r2, a2.prototype.has = i2, t2.exports = a2;
2340
+ });
2341
+ var Zo = _((e2, t2) => {
2342
+ function n2(e3, t3) {
2343
+ for (var n3 = -1, r2 = e3 == null ? 0 : e3.length; ++n3 < r2; ) if (t3(e3[n3], n3, e3)) return true;
2344
+ return false;
2345
+ }
2346
+ t2.exports = n2;
2347
+ });
2348
+ var Qo = _((e2, t2) => {
2349
+ function n2(e3, t3) {
2350
+ return e3.has(t3);
2351
+ }
2352
+ t2.exports = n2;
2353
+ });
2354
+ var $o = _((e2, t2) => {
2355
+ var n2 = Xo(), r2 = Zo(), i2 = Qo(), a2 = 1, o2 = 2;
2356
+ function s2(e3, t3, s3, c2, l2, u2) {
2357
+ var d2 = s3 & a2, f2 = e3.length, p2 = t3.length;
2358
+ if (f2 != p2 && !(d2 && p2 > f2)) return false;
2359
+ var m2 = u2.get(e3), h2 = u2.get(t3);
2360
+ if (m2 && h2) return m2 == t3 && h2 == e3;
2361
+ var g2 = -1, _2 = true, v2 = s3 & o2 ? new n2() : void 0;
2362
+ for (u2.set(e3, t3), u2.set(t3, e3); ++g2 < f2; ) {
2363
+ var y2 = e3[g2], b2 = t3[g2];
2364
+ if (c2) var x2 = d2 ? c2(b2, y2, g2, t3, e3, u2) : c2(y2, b2, g2, e3, t3, u2);
2365
+ if (x2 !== void 0) {
2366
+ if (x2) continue;
2367
+ _2 = false;
2368
+ break;
2369
+ }
2370
+ if (v2) {
2371
+ if (!r2(t3, function(e4, t4) {
2372
+ if (!i2(v2, t4) && (y2 === e4 || l2(y2, e4, s3, c2, u2))) return v2.push(t4);
2373
+ })) {
2374
+ _2 = false;
2375
+ break;
2376
+ }
2377
+ } else if (!(y2 === b2 || l2(y2, b2, s3, c2, u2))) {
2378
+ _2 = false;
2379
+ break;
2380
+ }
2381
+ }
2382
+ return u2.delete(e3), u2.delete(t3), _2;
2383
+ }
2384
+ t2.exports = s2;
2385
+ });
2386
+ var es = _((e2, t2) => {
2387
+ t2.exports = X().Uint8Array;
2388
+ });
2389
+ var ts = _((e2, t2) => {
2390
+ function n2(e3) {
2391
+ var t3 = -1, n3 = Array(e3.size);
2392
+ return e3.forEach(function(e4, r2) {
2393
+ n3[++t3] = [r2, e4];
2394
+ }), n3;
2395
+ }
2396
+ t2.exports = n2;
2397
+ });
2398
+ var ns = _((e2, t2) => {
2399
+ function n2(e3) {
2400
+ var t3 = -1, n3 = Array(e3.size);
2401
+ return e3.forEach(function(e4) {
2402
+ n3[++t3] = e4;
2403
+ }), n3;
2404
+ }
2405
+ t2.exports = n2;
2406
+ });
2407
+ var rs = _((e2, t2) => {
2408
+ var n2 = $a(), r2 = es(), i2 = uo(), a2 = $o(), o2 = ts(), s2 = ns(), c2 = 1, l2 = 2, u2 = `[object Boolean]`, d2 = `[object Date]`, f2 = `[object Error]`, p2 = `[object Map]`, m2 = `[object Number]`, h2 = `[object RegExp]`, g2 = `[object Set]`, _2 = `[object String]`, v2 = `[object Symbol]`, y2 = `[object ArrayBuffer]`, b2 = `[object DataView]`, x2 = n2 ? n2.prototype : void 0, S2 = x2 ? x2.valueOf : void 0;
2409
+ function C2(e3, t3, n3, x3, C3, w2, T2) {
2410
+ switch (n3) {
2411
+ case b2:
2412
+ if (e3.byteLength != t3.byteLength || e3.byteOffset != t3.byteOffset) return false;
2413
+ e3 = e3.buffer, t3 = t3.buffer;
2414
+ case y2:
2415
+ return !(e3.byteLength != t3.byteLength || !w2(new r2(e3), new r2(t3)));
2416
+ case u2:
2417
+ case d2:
2418
+ case m2:
2419
+ return i2(+e3, +t3);
2420
+ case f2:
2421
+ return e3.name == t3.name && e3.message == t3.message;
2422
+ case h2:
2423
+ case _2:
2424
+ return e3 == t3 + ``;
2425
+ case p2:
2426
+ var E2 = o2;
2427
+ case g2:
2428
+ var D2 = x3 & c2;
2429
+ if (E2 ||= s2, e3.size != t3.size && !D2) return false;
2430
+ var O2 = T2.get(e3);
2431
+ if (O2) return O2 == t3;
2432
+ x3 |= l2, T2.set(e3, t3);
2433
+ var k2 = a2(E2(e3), E2(t3), x3, C3, w2, T2);
2434
+ return T2.delete(e3), k2;
2435
+ case v2:
2436
+ if (S2) return S2.call(e3) == S2.call(t3);
2437
+ }
2438
+ return false;
2439
+ }
2440
+ t2.exports = C2;
2441
+ });
2442
+ var is = _((e2, t2) => {
2443
+ function n2(e3, t3) {
2444
+ for (var n3 = -1, r2 = t3.length, i2 = e3.length; ++n3 < r2; ) e3[i2 + n3] = t3[n3];
2445
+ return e3;
2446
+ }
2447
+ t2.exports = n2;
2448
+ });
2449
+ var Z = _((e2, t2) => {
2450
+ t2.exports = Array.isArray;
2451
+ });
2452
+ var as = _((e2, t2) => {
2453
+ var n2 = is(), r2 = Z();
2454
+ function i2(e3, t3, i3) {
2455
+ var a2 = t3(e3);
2456
+ return r2(e3) ? a2 : n2(a2, i3(e3));
2457
+ }
2458
+ t2.exports = i2;
2459
+ });
2460
+ var os = _((e2, t2) => {
2461
+ function n2(e3, t3) {
2462
+ for (var n3 = -1, r2 = e3 == null ? 0 : e3.length, i2 = 0, a2 = []; ++n3 < r2; ) {
2463
+ var o2 = e3[n3];
2464
+ t3(o2, n3, e3) && (a2[i2++] = o2);
2465
+ }
2466
+ return a2;
2467
+ }
2468
+ t2.exports = n2;
2469
+ });
2470
+ var ss = _((e2, t2) => {
2471
+ function n2() {
2472
+ return [];
2473
+ }
2474
+ t2.exports = n2;
2475
+ });
2476
+ var cs = _((e2, t2) => {
2477
+ var n2 = os(), r2 = ss(), i2 = Object.prototype.propertyIsEnumerable, a2 = Object.getOwnPropertySymbols;
2478
+ t2.exports = a2 ? function(e3) {
2479
+ return e3 == null ? [] : (e3 = Object(e3), n2(a2(e3), function(t3) {
2480
+ return i2.call(e3, t3);
2481
+ }));
2482
+ } : r2;
2483
+ });
2484
+ var ls = _((e2, t2) => {
2485
+ function n2(e3, t3) {
2486
+ for (var n3 = -1, r2 = Array(e3); ++n3 < e3; ) r2[n3] = t3(n3);
2487
+ return r2;
2488
+ }
2489
+ t2.exports = n2;
2490
+ });
2491
+ var us = _((e2, t2) => {
2492
+ var n2 = no(), r2 = ro(), i2 = `[object Arguments]`;
2493
+ function a2(e3) {
2494
+ return r2(e3) && n2(e3) == i2;
2495
+ }
2496
+ t2.exports = a2;
2497
+ });
2498
+ var ds = _((e2, t2) => {
2499
+ var n2 = us(), r2 = ro(), i2 = Object.prototype, a2 = i2.hasOwnProperty, o2 = i2.propertyIsEnumerable;
2500
+ t2.exports = n2(/* @__PURE__ */ function() {
2501
+ return arguments;
2502
+ }()) ? n2 : function(e3) {
2503
+ return r2(e3) && a2.call(e3, `callee`) && !o2.call(e3, `callee`);
2504
+ };
2505
+ });
2506
+ var fs = _((e2, t2) => {
2507
+ function n2() {
2508
+ return false;
2509
+ }
2510
+ t2.exports = n2;
2511
+ });
2512
+ var ps = _((e2, t2) => {
2513
+ var n2 = X(), r2 = fs(), i2 = typeof e2 == `object` && e2 && !e2.nodeType && e2, a2 = i2 && typeof t2 == `object` && t2 && !t2.nodeType && t2, o2 = a2 && a2.exports === i2 ? n2.Buffer : void 0;
2514
+ t2.exports = (o2 ? o2.isBuffer : void 0) || r2;
2515
+ });
2516
+ var ms = _((e2, t2) => {
2517
+ var n2 = /^(?:0|[1-9]\d*)$/;
2518
+ function r2(e3, t3) {
2519
+ var r3 = typeof e3;
2520
+ return t3 ??= 9007199254740991, !!t3 && (r3 == `number` || r3 != `symbol` && n2.test(e3)) && e3 > -1 && e3 % 1 == 0 && e3 < t3;
2521
+ }
2522
+ t2.exports = r2;
2523
+ });
2524
+ var hs = _((e2, t2) => {
2525
+ function n2(e3) {
2526
+ return typeof e3 == `number` && e3 > -1 && e3 % 1 == 0 && e3 <= 9007199254740991;
2527
+ }
2528
+ t2.exports = n2;
2529
+ });
2530
+ var gs = _((e2, t2) => {
2531
+ var n2 = no(), r2 = hs(), i2 = ro(), a2 = `[object Arguments]`, o2 = `[object Array]`, s2 = `[object Boolean]`, c2 = `[object Date]`, l2 = `[object Error]`, u2 = `[object Function]`, d2 = `[object Map]`, f2 = `[object Number]`, p2 = `[object Object]`, m2 = `[object RegExp]`, h2 = `[object Set]`, g2 = `[object String]`, _2 = `[object WeakMap]`, v2 = `[object ArrayBuffer]`, y2 = `[object DataView]`, b2 = `[object Float32Array]`, x2 = `[object Float64Array]`, S2 = `[object Int8Array]`, C2 = `[object Int16Array]`, w2 = `[object Int32Array]`, T2 = `[object Uint8Array]`, E2 = `[object Uint8ClampedArray]`, D2 = `[object Uint16Array]`, O2 = `[object Uint32Array]`, k2 = {};
2532
+ k2[b2] = k2[x2] = k2[S2] = k2[C2] = k2[w2] = k2[T2] = k2[E2] = k2[D2] = k2[O2] = true, k2[a2] = k2[o2] = k2[v2] = k2[s2] = k2[y2] = k2[c2] = k2[l2] = k2[u2] = k2[d2] = k2[f2] = k2[p2] = k2[m2] = k2[h2] = k2[g2] = k2[_2] = false;
2533
+ function ee2(e3) {
2534
+ return i2(e3) && r2(e3.length) && !!k2[n2(e3)];
2535
+ }
2536
+ t2.exports = ee2;
2537
+ });
2538
+ var _s = _((e2, t2) => {
2539
+ function n2(e3) {
2540
+ return function(t3) {
2541
+ return e3(t3);
2542
+ };
2543
+ }
2544
+ t2.exports = n2;
2545
+ });
2546
+ var vs = _((e2, t2) => {
2547
+ var n2 = Qa(), r2 = typeof e2 == `object` && e2 && !e2.nodeType && e2, i2 = r2 && typeof t2 == `object` && t2 && !t2.nodeType && t2, a2 = i2 && i2.exports === r2 && n2.process;
2548
+ t2.exports = function() {
2549
+ try {
2550
+ return i2 && i2.require && i2.require(`util`).types || a2 && a2.binding && a2.binding(`util`);
2551
+ } catch {
2552
+ }
2553
+ }();
2554
+ });
2555
+ var ys = _((e2, t2) => {
2556
+ var n2 = gs(), r2 = _s(), i2 = vs(), a2 = i2 && i2.isTypedArray;
2557
+ t2.exports = a2 ? r2(a2) : n2;
2558
+ });
2559
+ var bs = _((e2, t2) => {
2560
+ var n2 = ls(), r2 = ds(), i2 = Z(), a2 = ps(), o2 = ms(), s2 = ys(), c2 = Object.prototype.hasOwnProperty;
2561
+ function l2(e3, t3) {
2562
+ var l3 = i2(e3), u2 = !l3 && r2(e3), d2 = !l3 && !u2 && a2(e3), f2 = !l3 && !u2 && !d2 && s2(e3), p2 = l3 || u2 || d2 || f2, m2 = p2 ? n2(e3.length, String) : [], h2 = m2.length;
2563
+ for (var g2 in e3) (t3 || c2.call(e3, g2)) && !(p2 && (g2 == `length` || d2 && (g2 == `offset` || g2 == `parent`) || f2 && (g2 == `buffer` || g2 == `byteLength` || g2 == `byteOffset`) || o2(g2, h2))) && m2.push(g2);
2564
+ return m2;
2565
+ }
2566
+ t2.exports = l2;
2567
+ });
2568
+ var xs = _((e2, t2) => {
2569
+ var n2 = Object.prototype;
2570
+ function r2(e3) {
2571
+ var t3 = e3 && e3.constructor;
2572
+ return e3 === (typeof t3 == `function` && t3.prototype || n2);
2573
+ }
2574
+ t2.exports = r2;
2575
+ });
2576
+ var Ss = _((e2, t2) => {
2577
+ function n2(e3, t3) {
2578
+ return function(n3) {
2579
+ return e3(t3(n3));
2580
+ };
2581
+ }
2582
+ t2.exports = n2;
2583
+ });
2584
+ var Cs = _((e2, t2) => {
2585
+ t2.exports = Ss()(Object.keys, Object);
2586
+ });
2587
+ var ws = _((e2, t2) => {
2588
+ var n2 = xs(), r2 = Cs(), i2 = Object.prototype.hasOwnProperty;
2589
+ function a2(e3) {
2590
+ if (!n2(e3)) return r2(e3);
2591
+ var t3 = [];
2592
+ for (var a3 in Object(e3)) i2.call(e3, a3) && a3 != `constructor` && t3.push(a3);
2593
+ return t3;
2594
+ }
2595
+ t2.exports = a2;
2596
+ });
2597
+ var Ts = _((e2, t2) => {
2598
+ var n2 = Co(), r2 = hs();
2599
+ function i2(e3) {
2600
+ return e3 != null && r2(e3.length) && !n2(e3);
2601
+ }
2602
+ t2.exports = i2;
2603
+ });
2604
+ var Es = _((e2, t2) => {
2605
+ var n2 = bs(), r2 = ws(), i2 = Ts();
2606
+ function a2(e3) {
2607
+ return i2(e3) ? n2(e3) : r2(e3);
2608
+ }
2609
+ t2.exports = a2;
2610
+ });
2611
+ var Ds = _((e2, t2) => {
2612
+ var n2 = as(), r2 = cs(), i2 = Es();
2613
+ function a2(e3) {
2614
+ return n2(e3, i2, r2);
2615
+ }
2616
+ t2.exports = a2;
2617
+ });
2618
+ var Os = _((e2, t2) => {
2619
+ var n2 = Ds(), r2 = 1, i2 = Object.prototype.hasOwnProperty;
2620
+ function a2(e3, t3, a3, o2, s2, c2) {
2621
+ var l2 = a3 & r2, u2 = n2(e3), d2 = u2.length;
2622
+ if (d2 != n2(t3).length && !l2) return false;
2623
+ for (var f2 = d2; f2--; ) {
2624
+ var p2 = u2[f2];
2625
+ if (!(l2 ? p2 in t3 : i2.call(t3, p2))) return false;
2626
+ }
2627
+ var m2 = c2.get(e3), h2 = c2.get(t3);
2628
+ if (m2 && h2) return m2 == t3 && h2 == e3;
2629
+ var g2 = true;
2630
+ c2.set(e3, t3), c2.set(t3, e3);
2631
+ for (var _2 = l2; ++f2 < d2; ) {
2632
+ p2 = u2[f2];
2633
+ var v2 = e3[p2], y2 = t3[p2];
2634
+ if (o2) var b2 = l2 ? o2(y2, v2, p2, t3, e3, c2) : o2(v2, y2, p2, e3, t3, c2);
2635
+ if (!(b2 === void 0 ? v2 === y2 || s2(v2, y2, a3, o2, c2) : b2)) {
2636
+ g2 = false;
2637
+ break;
2638
+ }
2639
+ _2 ||= p2 == `constructor`;
2640
+ }
2641
+ if (g2 && !_2) {
2642
+ var x2 = e3.constructor, S2 = t3.constructor;
2643
+ x2 != S2 && `constructor` in e3 && `constructor` in t3 && !(typeof x2 == `function` && x2 instanceof x2 && typeof S2 == `function` && S2 instanceof S2) && (g2 = false);
2644
+ }
2645
+ return c2.delete(e3), c2.delete(t3), g2;
2646
+ }
2647
+ t2.exports = a2;
2648
+ });
2649
+ var ks = _((e2, t2) => {
2650
+ t2.exports = ko()(X(), `DataView`);
2651
+ });
2652
+ var As = _((e2, t2) => {
2653
+ t2.exports = ko()(X(), `Promise`);
2654
+ });
2655
+ var js = _((e2, t2) => {
2656
+ t2.exports = ko()(X(), `Set`);
2657
+ });
2658
+ var Ms = _((e2, t2) => {
2659
+ t2.exports = ko()(X(), `WeakMap`);
2660
+ });
2661
+ var Ns = _((e2, t2) => {
2662
+ var n2 = ks(), r2 = Ao(), i2 = As(), a2 = js(), o2 = Ms(), s2 = no(), c2 = Eo(), l2 = `[object Map]`, u2 = `[object Object]`, d2 = `[object Promise]`, f2 = `[object Set]`, p2 = `[object WeakMap]`, m2 = `[object DataView]`, h2 = c2(n2), g2 = c2(r2), _2 = c2(i2), v2 = c2(a2), y2 = c2(o2), b2 = s2;
2663
+ (n2 && b2(new n2(new ArrayBuffer(1))) != m2 || r2 && b2(new r2()) != l2 || i2 && b2(i2.resolve()) != d2 || a2 && b2(new a2()) != f2 || o2 && b2(new o2()) != p2) && (b2 = function(e3) {
2664
+ var t3 = s2(e3), n3 = t3 == u2 ? e3.constructor : void 0, r3 = n3 ? c2(n3) : ``;
2665
+ if (r3) switch (r3) {
2666
+ case h2:
2667
+ return m2;
2668
+ case g2:
2669
+ return l2;
2670
+ case _2:
2671
+ return d2;
2672
+ case v2:
2673
+ return f2;
2674
+ case y2:
2675
+ return p2;
2676
+ }
2677
+ return t3;
2678
+ }), t2.exports = b2;
2679
+ });
2680
+ var Ps = _((e2, t2) => {
2681
+ var n2 = qo(), r2 = $o(), i2 = rs(), a2 = Os(), o2 = Ns(), s2 = Z(), c2 = ps(), l2 = ys(), u2 = 1, d2 = `[object Arguments]`, f2 = `[object Array]`, p2 = `[object Object]`, m2 = Object.prototype.hasOwnProperty;
2682
+ function h2(e3, t3, h3, g2, _2, v2) {
2683
+ var y2 = s2(e3), b2 = s2(t3), x2 = y2 ? f2 : o2(e3), S2 = b2 ? f2 : o2(t3);
2684
+ x2 = x2 == d2 ? p2 : x2, S2 = S2 == d2 ? p2 : S2;
2685
+ var C2 = x2 == p2, w2 = S2 == p2, T2 = x2 == S2;
2686
+ if (T2 && c2(e3)) {
2687
+ if (!c2(t3)) return false;
2688
+ y2 = true, C2 = false;
2689
+ }
2690
+ if (T2 && !C2) return v2 ||= new n2(), y2 || l2(e3) ? r2(e3, t3, h3, g2, _2, v2) : i2(e3, t3, x2, h3, g2, _2, v2);
2691
+ if (!(h3 & u2)) {
2692
+ var E2 = C2 && m2.call(e3, `__wrapped__`), D2 = w2 && m2.call(t3, `__wrapped__`);
2693
+ if (E2 || D2) {
2694
+ var O2 = E2 ? e3.value() : e3, k2 = D2 ? t3.value() : t3;
2695
+ return v2 ||= new n2(), _2(O2, k2, h3, g2, v2);
2696
+ }
2697
+ }
2698
+ return T2 ? (v2 ||= new n2(), a2(e3, t3, h3, g2, _2, v2)) : false;
2699
+ }
2700
+ t2.exports = h2;
2701
+ });
2702
+ var Fs = _((e2, t2) => {
2703
+ var n2 = Ps(), r2 = ro();
2704
+ function i2(e3, t3, a2, o2, s2) {
2705
+ return e3 === t3 ? true : e3 == null || t3 == null || !r2(e3) && !r2(t3) ? e3 !== e3 && t3 !== t3 : n2(e3, t3, a2, o2, i2, s2);
2706
+ }
2707
+ t2.exports = i2;
2708
+ });
2709
+ var Is = _((e2, t2) => {
2710
+ var n2 = qo(), r2 = Fs(), i2 = 1, a2 = 2;
2711
+ function o2(e3, t3, o3, s2) {
2712
+ var c2 = o3.length, l2 = c2, u2 = !s2;
2713
+ if (e3 == null) return !l2;
2714
+ for (e3 = Object(e3); c2--; ) {
2715
+ var d2 = o3[c2];
2716
+ if (u2 && d2[2] ? d2[1] !== e3[d2[0]] : !(d2[0] in e3)) return false;
2717
+ }
2718
+ for (; ++c2 < l2; ) {
2719
+ d2 = o3[c2];
2720
+ var f2 = d2[0], p2 = e3[f2], m2 = d2[1];
2721
+ if (u2 && d2[2]) {
2722
+ if (p2 === void 0 && !(f2 in e3)) return false;
2723
+ } else {
2724
+ var h2 = new n2();
2725
+ if (s2) var g2 = s2(p2, m2, f2, e3, t3, h2);
2726
+ if (!(g2 === void 0 ? r2(m2, p2, i2 | a2, s2, h2) : g2)) return false;
2727
+ }
2728
+ }
2729
+ return true;
2730
+ }
2731
+ t2.exports = o2;
2732
+ });
2733
+ var Ls = _((e2, t2) => {
2734
+ var n2 = So();
2735
+ function r2(e3) {
2736
+ return e3 === e3 && !n2(e3);
2737
+ }
2738
+ t2.exports = r2;
2739
+ });
2740
+ var Rs = _((e2, t2) => {
2741
+ var n2 = Ls(), r2 = Es();
2742
+ function i2(e3) {
2743
+ for (var t3 = r2(e3), i3 = t3.length; i3--; ) {
2744
+ var a2 = t3[i3], o2 = e3[a2];
2745
+ t3[i3] = [a2, o2, n2(o2)];
2746
+ }
2747
+ return t3;
2748
+ }
2749
+ t2.exports = i2;
2750
+ });
2751
+ var zs = _((e2, t2) => {
2752
+ function n2(e3, t3) {
2753
+ return function(n3) {
2754
+ return n3 != null && n3[e3] === t3 && (t3 !== void 0 || e3 in Object(n3));
2755
+ };
2756
+ }
2757
+ t2.exports = n2;
2758
+ });
2759
+ var Bs = _((e2, t2) => {
2760
+ var n2 = Is(), r2 = Rs(), i2 = zs();
2761
+ function a2(e3) {
2762
+ var t3 = r2(e3);
2763
+ return t3.length == 1 && t3[0][2] ? i2(t3[0][0], t3[0][1]) : function(r3) {
2764
+ return r3 === e3 || n2(r3, e3, t3);
2765
+ };
2766
+ }
2767
+ t2.exports = a2;
2768
+ });
2769
+ var Vs = _((e2, t2) => {
2770
+ var n2 = Z(), r2 = io(), i2 = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, a2 = /^\w*$/;
2771
+ function o2(e3, t3) {
2772
+ if (n2(e3)) return false;
2773
+ var o3 = typeof e3;
2774
+ return o3 == `number` || o3 == `symbol` || o3 == `boolean` || e3 == null || r2(e3) ? true : a2.test(e3) || !i2.test(e3) || t3 != null && e3 in Object(t3);
2775
+ }
2776
+ t2.exports = o2;
2777
+ });
2778
+ var Hs = _((e2, t2) => {
2779
+ var n2 = Go(), r2 = `Expected a function`;
2780
+ function i2(e3, t3) {
2781
+ if (typeof e3 != `function` || t3 != null && typeof t3 != `function`) throw TypeError(r2);
2782
+ var a2 = function() {
2783
+ var n3 = arguments, r3 = t3 ? t3.apply(this, n3) : n3[0], i3 = a2.cache;
2784
+ if (i3.has(r3)) return i3.get(r3);
2785
+ var o2 = e3.apply(this, n3);
2786
+ return a2.cache = i3.set(r3, o2) || i3, o2;
2787
+ };
2788
+ return a2.cache = new (i2.Cache || n2)(), a2;
2789
+ }
2790
+ i2.Cache = n2, t2.exports = i2;
2791
+ });
2792
+ var Us = _((e2, t2) => {
2793
+ var n2 = Hs(), r2 = 500;
2794
+ function i2(e3) {
2795
+ var t3 = n2(e3, function(e4) {
2796
+ return i3.size === r2 && i3.clear(), e4;
2797
+ }), i3 = t3.cache;
2798
+ return t3;
2799
+ }
2800
+ t2.exports = i2;
2801
+ });
2802
+ var Ws = _((e2, t2) => {
2803
+ var n2 = Us(), r2 = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, i2 = /\\(\\)?/g;
2804
+ t2.exports = n2(function(e3) {
2805
+ var t3 = [];
2806
+ return e3.charCodeAt(0) === 46 && t3.push(``), e3.replace(r2, function(e4, n3, r3, a2) {
2807
+ t3.push(r3 ? a2.replace(i2, `$1`) : n3 || e4);
2808
+ }), t3;
2809
+ });
2810
+ });
2811
+ var Gs = _((e2, t2) => {
2812
+ function n2(e3, t3) {
2813
+ for (var n3 = -1, r2 = e3 == null ? 0 : e3.length, i2 = Array(r2); ++n3 < r2; ) i2[n3] = t3(e3[n3], n3, e3);
2814
+ return i2;
2815
+ }
2816
+ t2.exports = n2;
2817
+ });
2818
+ var Ks = _((e2, t2) => {
2819
+ var n2 = $a(), r2 = Gs(), i2 = Z(), a2 = io(), o2 = 1 / 0, s2 = n2 ? n2.prototype : void 0, c2 = s2 ? s2.toString : void 0;
2820
+ function l2(e3) {
2821
+ if (typeof e3 == `string`) return e3;
2822
+ if (i2(e3)) return r2(e3, l2) + ``;
2823
+ if (a2(e3)) return c2 ? c2.call(e3) : ``;
2824
+ var t3 = e3 + ``;
2825
+ return t3 == `0` && 1 / e3 == -o2 ? `-0` : t3;
2826
+ }
2827
+ t2.exports = l2;
2828
+ });
2829
+ var qs = _((e2, t2) => {
2830
+ var n2 = Ks();
2831
+ function r2(e3) {
2832
+ return e3 == null ? `` : n2(e3);
2833
+ }
2834
+ t2.exports = r2;
2835
+ });
2836
+ var Js = _((e2, t2) => {
2837
+ var n2 = Z(), r2 = Vs(), i2 = Ws(), a2 = qs();
2838
+ function o2(e3, t3) {
2839
+ return n2(e3) ? e3 : r2(e3, t3) ? [e3] : i2(a2(e3));
2840
+ }
2841
+ t2.exports = o2;
2842
+ });
2843
+ var Ys = _((e2, t2) => {
2844
+ var n2 = io(), r2 = 1 / 0;
2845
+ function i2(e3) {
2846
+ if (typeof e3 == `string` || n2(e3)) return e3;
2847
+ var t3 = e3 + ``;
2848
+ return t3 == `0` && 1 / e3 == -r2 ? `-0` : t3;
2849
+ }
2850
+ t2.exports = i2;
2851
+ });
2852
+ var Xs = _((e2, t2) => {
2853
+ var n2 = Js(), r2 = Ys();
2854
+ function i2(e3, t3) {
2855
+ t3 = n2(t3, e3);
2856
+ for (var i3 = 0, a2 = t3.length; e3 != null && i3 < a2; ) e3 = e3[r2(t3[i3++])];
2857
+ return i3 && i3 == a2 ? e3 : void 0;
2858
+ }
2859
+ t2.exports = i2;
2860
+ });
2861
+ var Zs = _((e2, t2) => {
2862
+ var n2 = Xs();
2863
+ function r2(e3, t3, r3) {
2864
+ var i2 = e3 == null ? void 0 : n2(e3, t3);
2865
+ return i2 === void 0 ? r3 : i2;
2866
+ }
2867
+ t2.exports = r2;
2868
+ });
2869
+ var Qs = _((e2, t2) => {
2870
+ function n2(e3, t3) {
2871
+ return e3 != null && t3 in Object(e3);
2872
+ }
2873
+ t2.exports = n2;
2874
+ });
2875
+ var $s = _((e2, t2) => {
2876
+ var n2 = Js(), r2 = ds(), i2 = Z(), a2 = ms(), o2 = hs(), s2 = Ys();
2877
+ function c2(e3, t3, c3) {
2878
+ t3 = n2(t3, e3);
2879
+ for (var l2 = -1, u2 = t3.length, d2 = false; ++l2 < u2; ) {
2880
+ var f2 = s2(t3[l2]);
2881
+ if (!(d2 = e3 != null && c3(e3, f2))) break;
2882
+ e3 = e3[f2];
2883
+ }
2884
+ return d2 || ++l2 != u2 ? d2 : (u2 = e3 == null ? 0 : e3.length, !!u2 && o2(u2) && a2(f2, u2) && (i2(e3) || r2(e3)));
2885
+ }
2886
+ t2.exports = c2;
2887
+ });
2888
+ var ec = _((e2, t2) => {
2889
+ var n2 = Qs(), r2 = $s();
2890
+ function i2(e3, t3) {
2891
+ return e3 != null && r2(e3, t3, n2);
2892
+ }
2893
+ t2.exports = i2;
2894
+ });
2895
+ var tc = _((e2, t2) => {
2896
+ var n2 = Fs(), r2 = Zs(), i2 = ec(), a2 = Vs(), o2 = Ls(), s2 = zs(), c2 = Ys(), l2 = 1, u2 = 2;
2897
+ function d2(e3, t3) {
2898
+ return a2(e3) && o2(t3) ? s2(c2(e3), t3) : function(a3) {
2899
+ var o3 = r2(a3, e3);
2900
+ return o3 === void 0 && o3 === t3 ? i2(a3, e3) : n2(t3, o3, l2 | u2);
2901
+ };
2902
+ }
2903
+ t2.exports = d2;
2904
+ });
2905
+ var nc = _((e2, t2) => {
2906
+ function n2(e3) {
2907
+ return function(t3) {
2908
+ return t3?.[e3];
2909
+ };
2910
+ }
2911
+ t2.exports = n2;
2912
+ });
2913
+ var rc = _((e2, t2) => {
2914
+ var n2 = Xs();
2915
+ function r2(e3) {
2916
+ return function(t3) {
2917
+ return n2(t3, e3);
2918
+ };
2919
+ }
2920
+ t2.exports = r2;
2921
+ });
2922
+ var ic = _((e2, t2) => {
2923
+ var n2 = nc(), r2 = rc(), i2 = Vs(), a2 = Ys();
2924
+ function o2(e3) {
2925
+ return i2(e3) ? n2(a2(e3)) : r2(e3);
2926
+ }
2927
+ t2.exports = o2;
2928
+ });
2929
+ var ac = _((e2, t2) => {
2930
+ var n2 = Bs(), r2 = tc(), i2 = so(), a2 = Z(), o2 = ic();
2931
+ function s2(e3) {
2932
+ return typeof e3 == `function` ? e3 : e3 == null ? i2 : typeof e3 == `object` ? a2(e3) ? r2(e3[0], e3[1]) : n2(e3) : o2(e3);
2933
+ }
2934
+ t2.exports = s2;
2935
+ });
2936
+ var oc = _((e2, t2) => {
2937
+ var n2 = ao(), r2 = oo(), i2 = ac();
2938
+ function a2(e3, t3) {
2939
+ return e3 && e3.length ? n2(e3, i2(t3, 2), r2) : void 0;
2940
+ }
2941
+ t2.exports = a2;
2942
+ });
2943
+ var sc = _((e2, t2) => {
2944
+ function n2(e3, t3) {
2945
+ return e3 < t3;
2946
+ }
2947
+ t2.exports = n2;
2948
+ });
2949
+ var cc = _((e2, t2) => {
2950
+ var n2 = ao(), r2 = sc(), i2 = so();
2951
+ function a2(e3) {
2952
+ return e3 && e3.length ? n2(e3, i2, r2) : void 0;
2953
+ }
2954
+ t2.exports = a2;
2955
+ });
2956
+ var lc = _((e2, t2) => {
2957
+ var n2 = ao(), r2 = ac(), i2 = sc();
2958
+ function a2(e3, t3) {
2959
+ return e3 && e3.length ? n2(e3, r2(t3, 2), i2) : void 0;
2960
+ }
2961
+ t2.exports = a2;
2962
+ });
2963
+ var uc = y(co(), 1);
2964
+ var dc = y(oc(), 1);
2965
+ var fc = y(cc(), 1);
2966
+ var pc = y(lc(), 1);
2967
+ var mc = ({ price: e2 }) => e2.actualPrice;
2968
+ function hc(e2) {
2969
+ return e2.priceAfterDiscount === void 0 ? { currentSellingPrice: e2.actualPrice, priceBeforeDiscount: e2.compareAtPrice, pricePerUnit: e2.pricePerUnit } : { currentSellingPrice: e2.priceAfterDiscount, priceBeforeDiscount: e2.actualPrice, pricePerUnit: e2.pricePerUnit };
2970
+ }
2971
+ function gc(e2, t2) {
2972
+ let n2 = e2.subscriptionPrices.find((e3) => e3.subscriptionId === t2);
2973
+ if (!n2) throw Error(`Missing subscription price for plan ${t2} on variant ${e2.id}`);
2974
+ let r2 = n2.price;
2975
+ return { currentSellingPrice: r2, priceBeforeDiscount: r2 < e2.price.actualPrice ? e2.price.actualPrice : void 0 };
2976
+ }
2977
+ function _c(e2) {
2978
+ let t2 = (0, pc.default)(e2, mc), n2 = (0, dc.default)(e2, mc), r2 = e2.map(({ price: e3 }) => hc(e3)), i2 = hc(t2.price), a2 = hc(n2.price), o2 = r2.flatMap(({ priceBeforeDiscount: e3 }) => e3 === void 0 ? [] : [e3]);
2979
+ return { minCurrentSellingPrice: i2.currentSellingPrice, maxCurrentSellingPrice: a2.currentSellingPrice, minPriceBeforeDiscount: (0, fc.default)(o2), maxPriceBeforeDiscount: (0, uc.default)(o2), minPricePerUnit: i2.pricePerUnit, maxPricePerUnit: a2.pricePerUnit };
2980
+ }
2981
+ function vc(e2, t2) {
2982
+ return e2.subscriptionDetails.subscriptions.map((e3) => ({ subscription: e3, price: gc(t2, e3.id) }));
2983
+ }
2984
+ function yc(e2) {
2985
+ return { productPrice: { currentSellingPrice: void 0 }, subscriptionPlanPrices: e2.subscriptionDetails.subscriptions.map((e3) => ({ subscription: e3, price: { currentSellingPrice: void 0 } })), productPriceRange: { minCurrentSellingPrice: void 0, maxCurrentSellingPrice: void 0 } };
2986
+ }
2987
+ function bc(e2) {
2988
+ if (!e2.minPriceVariant) return yc(e2);
2989
+ let t2 = hc(e2.minPriceVariant.price), n2 = e2.minPriceVariant.price.priceAfterDiscount !== void 0;
2990
+ return { productPrice: t2, subscriptionPlanPrices: e2.subscriptionDetails.subscriptions.map((e3) => ({ subscription: e3, price: {} })), productPriceRange: { minCurrentSellingPrice: t2.currentSellingPrice, maxCurrentSellingPrice: n2 ? void 0 : e2.priceRange.maxActualPrice, minPriceBeforeDiscount: t2.priceBeforeDiscount, maxPriceBeforeDiscount: n2 ? e2.priceRange.maxActualPrice : e2.priceRange.maxCompareAtPrice, minPricePerUnit: t2.pricePerUnit } };
2991
+ }
2992
+ function xc(e2, t2, n2) {
2993
+ if (!n2) return bc(e2);
2994
+ let r2 = (0, pc.default)(e2.variants, mc), i2 = t2 ?? r2;
2995
+ return i2 ? { productPrice: hc(i2.price), subscriptionPlanPrices: vc(e2, i2), productPriceRange: _c(e2.variants) } : yc(e2);
2996
+ }
2997
+ function Sc(e2, t2) {
2998
+ let n2 = e2.subscriptionPlanPrices.find(({ subscription: e3 }) => e3.id === t2);
2999
+ return n2 ? { currentSellingPrice: n2.price.currentSellingPrice, priceBeforeDiscount: n2.price.priceBeforeDiscount, pricePerUnit: e2.productPrice.pricePerUnit } : e2.productPrice;
3000
+ }
3001
+ function Cc(e2) {
3002
+ return hc(e2.price).currentSellingPrice;
3003
+ }
3004
+ var wc = `BACK_IN_STOCK_NOTIFICATION_REQUEST_ALREADY_EXISTS`;
3005
+ function Tc(e2) {
3006
+ return e2?.details?.applicationError?.code ?? `UNKNOWN`;
3007
+ }
3008
+ function Ec(e2) {
3009
+ return { code: Tc(e2), message: e2?.message };
3010
+ }
3011
+ async function Dc(e2) {
3012
+ let { productId: t2, variantId: n2, email: r2, name: i2, price: a2, imageUrl: o2 } = e2;
3013
+ try {
3014
+ return await ea({ catalogReference: { catalogItemId: t2, appId: wa, ...n2 ? { options: { variantId: n2 } } : {} }, email: r2 }, { name: i2, price: String(a2), ...o2 ? { image: o2 } : {} }), `created`;
3015
+ } catch (e3) {
3016
+ if (Tc(e3) === wc) return `already-subscribed`;
3017
+ throw Ec(e3);
3018
+ }
3019
+ }
3020
+ var Oc = (e2) => e2.media.type === `image`;
3021
+ function kc(e2, t2) {
3022
+ let n2 = t2.choices[e2.id];
3023
+ return e2.choices.find((e3) => e3.choiceId === n2);
3024
+ }
3025
+ function Ac(e2, t2) {
3026
+ let n2 = e2.options.map((e3) => kc(e3, t2)?.mediaIds).filter((e3) => !!(e3 && e3.length > 0));
3027
+ if (n2.length === 0) return;
3028
+ let r2 = n2.reduce((e3, t3) => e3.filter((e4) => t3.includes(e4))), i2 = r2.length > 0 ? r2 : n2.flat(), a2 = /* @__PURE__ */ new Map();
3029
+ for (let t3 of e2.media ?? []) Oc(t3) && a2.set(t3.id, t3);
3030
+ for (let e3 of i2) {
3031
+ let t3 = a2.get(e3)?.media.src;
3032
+ if (t3) return t3;
3033
+ }
3034
+ }
3035
+ function jc(e2, t2) {
3036
+ let n2 = [t2 ? Ac(e2, t2) : void 0, e2.media?.find(Oc)?.media.src];
3037
+ for (let e3 of n2) {
3038
+ let t3 = mi(e3);
3039
+ if (t3) return t3;
3040
+ }
3041
+ }
3042
+ function Mc(e2, r2) {
3043
+ let i2 = t((t2) => r2 ? Dc({ productId: e2.id, variantId: r2.id, email: t2, name: e2.name ?? ``, price: Cc(r2), imageUrl: jc(e2, r2) }) : Promise.reject(Error(`Cannot create a back-in-stock notification without a selected variant`)), [e2, r2]);
3044
+ return n(() => ({ handleNotifyMe: i2 }), [i2]);
3045
+ }
3046
+ function Nc(e2, t2) {
3047
+ return n(() => ({ id: e2.id, name: e2.name, description: e2.description, ribbons: e2.ribbons, breadcrumbs: e2.breadcrumbs, mainCategoryId: e2.mainCategoryId, categories: e2.categories, infoSections: e2.infoSections, sku: t2?.sku, discountRules: e2.discountRuleNames?.map((e3) => ({ name: e3 })) }), [e2, t2]);
3048
+ }
3049
+ function Pc(e2) {
3050
+ return { type: `image`, src: e2.url, width: e2.width, height: e2.height, ...e2.name === void 0 ? {} : { title: e2.name }, ...e2.alt === void 0 ? {} : { parameters: { alt: e2.alt } } };
3051
+ }
3052
+ var Fc = `11062b_7b9f1e3756b64285ad5cf5e244b4ae77~mv2.png`;
3053
+ var Ic = { uri: Fc, url: `https://static.wixstatic.com/media/${Fc}`, width: 460, height: 460 };
3054
+ var Lc = [Pc(Ic)];
3055
+ function Rc(e2, t2, n2) {
3056
+ let r2 = Vc(e2, zc(e2, t2, n2));
3057
+ return r2.length > 0 ? r2 : e2.media ?? [];
3058
+ }
3059
+ function zc(e2, t2, n2) {
3060
+ let r2 = e2.options.flatMap((e3) => Bc(e3.choices, t2[e3.id])), i2 = Object.values(e2.modifiers).flatMap((e3) => Bc(e3.choices, n2[e3.id]));
3061
+ return [.../* @__PURE__ */ new Set([...r2, ...i2])];
3062
+ }
3063
+ function Bc(e2, t2) {
3064
+ return e2?.find((e3) => e3.choiceId === t2)?.mediaIds ?? [];
3065
+ }
3066
+ function Vc(e2, t2) {
3067
+ let n2 = new Map((e2.media ?? []).map((e3) => [e3.id, e3]));
3068
+ return t2.flatMap((e3) => {
3069
+ let t3 = n2.get(e3);
3070
+ return t3 ? [t3] : [];
3071
+ });
3072
+ }
3073
+ function Hc(e2) {
3074
+ return e2.map((e3) => e3.id).join(`|`);
3075
+ }
3076
+ function Uc(e2) {
3077
+ return e2.length > 0 ? e2.map((e3) => e3.media) : Lc;
3078
+ }
3079
+ function Wc({ product: e2, selectedOptions: r2, selectedModifiers: a2 }) {
3080
+ let o2 = n(() => Uc(e2.media ?? []), [e2.media]), s2 = e2.mainMedia ?? Ic, c2 = n(() => Rc(e2, r2, a2), [e2, r2, a2]), l2 = n(() => Uc(c2), [c2]), u2 = Hc(c2), [d2, f2] = i(u2), [p2, m2] = i(0);
3081
+ d2 !== u2 && (f2(u2), m2(0));
3082
+ let h2 = t((e3) => m2(e3), []);
3083
+ return n(() => ({ allMedia: o2, mainMedia: s2, media: l2, selectedMediaIndex: p2, selectMedia: h2 }), [o2, s2, l2, p2, h2]);
3084
+ }
3085
+ function Gc(e2) {
3086
+ return Object.entries(e2).map(([e3, t2]) => ({ optionId: e3, choiceId: t2 }));
3087
+ }
3088
+ function Kc(e2) {
3089
+ return Object.entries(e2).map(([e3, t2]) => ({ modifierId: e3, value: t2 }));
3090
+ }
3091
+ function qc(e2, t2, r2, i2 = false) {
3092
+ let { selectedVariant: a2 } = t2, o2 = Nc(e2, a2), s2 = Za(e2, a2), c2 = Wc({ product: e2, selectedOptions: t2.selectedOptions, selectedModifiers: t2.selectedModifiers }), l2 = Mc(e2, a2), { getPageAbsoluteUrl: u2 } = ja(), d2 = n(() => {
3093
+ if (!e2.slug) return;
3094
+ let t3 = u2(J.PRODUCT_PAGE, e2.slug);
3095
+ return t3 ? { href: t3 } : void 0;
3096
+ }, [e2.slug, u2]);
3097
+ return n(() => {
3098
+ let { selectedVariant: e3, setHasAttemptedSubmit: n2, isSelectionValid: a3, selectedOptions: u3, selectedModifiers: f2, selectedSubscriptionPlanId: p2, quantity: m2, ...h2 } = t2;
3099
+ return { ...o2, link: d2, ...r2, ...h2, buyerSelections: { options: Gc(u3), modifiers: Kc(f2), subscriptionPlanId: p2, quantity: m2 }, ...s2, ...c2, ...l2, isBackInStockEnabled: i2 };
3100
+ }, [o2, d2, r2, t2, s2, c2, l2, i2]);
3101
+ }
3102
+ var Jc = q(`@wix/viewer-service-environment`);
3103
+ function Yc() {
3104
+ return c(Jc).language;
3105
+ }
3106
+ var Xc = (e2) => {
3107
+ let t2 = e2?.maximumFractionDigits ?? 2;
3108
+ return (e3) => e3?.toFixed(t2);
3109
+ };
3110
+ var Zc = (e2, t2, n2) => {
3111
+ let r2 = new Intl.NumberFormat(t2, { style: `currency`, currency: e2, ...n2 });
3112
+ return (e3) => {
3113
+ if (e3 != null) return r2.format(e3);
3114
+ };
3115
+ };
3116
+ function Qc(e2, t2, n2) {
3117
+ return e2 ? Zc(e2, t2, n2) : Xc(n2);
3118
+ }
3119
+ function $c(e2, t2) {
3120
+ let r2 = Yc();
3121
+ return n(() => Qc(e2, r2, t2), [e2, r2, t2]);
3122
+ }
3123
+ function Q(e2, t2) {
3124
+ return e2 === void 0 ? void 0 : { amount: e2, formattedAmount: t2(e2) };
3125
+ }
3126
+ function el(e2, t2, n2) {
3127
+ return { id: e2.id, name: e2.name, isOneTimePurchase: false, description: e2.description, currentPrice: Q(t2.currentSellingPrice, n2), originalPrice: Q(t2.priceBeforeDiscount, n2), frequency: e2.frequency, interval: e2.interval, duration: e2.billingCycles };
3128
+ }
3129
+ function tl(e2) {
3130
+ return e2 === void 0 ? void 0 : { description: e2.description };
3131
+ }
3132
+ function nl(e2, t2) {
3133
+ return { currentSellingPrice: Q(e2.currentSellingPrice, t2), priceBeforeDiscount: Q(e2.priceBeforeDiscount, t2), pricePerUnit: tl(e2.pricePerUnit) };
3134
+ }
3135
+ function rl(e2, t2) {
3136
+ return { minCurrentSellingPrice: Q(e2.minCurrentSellingPrice, t2), maxCurrentSellingPrice: Q(e2.maxCurrentSellingPrice, t2), minPriceBeforeDiscount: Q(e2.minPriceBeforeDiscount, t2), maxPriceBeforeDiscount: Q(e2.maxPriceBeforeDiscount, t2), minPricePerUnit: tl(e2.minPricePerUnit), maxPricePerUnit: tl(e2.maxPricePerUnit) };
3137
+ }
3138
+ function il(e2, t2, n2, r2) {
3139
+ if (e2.length === 0) return [];
3140
+ let i2 = e2.map(({ subscription: e3, price: t3 }) => el(e3, t3, r2));
3141
+ return t2 ? [{ id: gi, name: `One-time purchase`, isOneTimePurchase: true, currentPrice: Q(n2.currentSellingPrice, r2) }, ...i2] : i2;
3142
+ }
3143
+ function al({ product: e2, userInputs: t2, hasLoadedVariants: r2 }) {
3144
+ let { selectedVariant: i2, selectedSubscriptionPlanId: a2 } = t2, o2 = $c(e2.currency);
3145
+ return n(() => {
3146
+ let t3 = xc(e2, i2, r2), n2 = { ...nl(Sc(t3, a2), o2), ...rl(t3.productPriceRange, o2) }, s2 = il(t3.subscriptionPlanPrices, e2.subscriptionDetails.allowOneTimePurchases, t3.productPrice, o2);
3147
+ return { currency: e2.currency, pricing: n2, subscriptionPlans: s2 };
3148
+ }, [e2, i2, a2, r2, o2]);
3149
+ }
3150
+ function ol(e2) {
3151
+ return Object.values(e2).toSorted().join(`_`);
3152
+ }
3153
+ function sl(e2) {
3154
+ let t2 = /* @__PURE__ */ new Map();
3155
+ for (let n2 of e2) t2.set(ol(n2.choices), n2);
3156
+ return t2;
3157
+ }
3158
+ function cl(e2, t2, n2) {
3159
+ let r2 = Object.keys(n2).length > 0, i2 = {};
3160
+ for (let a2 of e2) {
3161
+ i2[a2.id] = {};
3162
+ for (let e3 of a2.choices) {
3163
+ if (!r2) {
3164
+ i2[a2.id][e3.choiceId] = { isInStock: e3.inStock ?? true, isVisible: e3.visible ?? true };
3165
+ continue;
3166
+ }
3167
+ if (e3.inStock === false && e3.visible === false) {
3168
+ i2[a2.id][e3.choiceId] = { isInStock: false, isVisible: false };
3169
+ continue;
3170
+ }
3171
+ let { isInStock: o2, isVisible: s2 } = ll({ ...n2, [a2.id]: e3.choiceId }, t2);
3172
+ i2[a2.id][e3.choiceId] = { isInStock: o2, isVisible: s2 };
3173
+ }
3174
+ }
3175
+ return i2;
3176
+ }
3177
+ function ll(e2, t2) {
3178
+ let n2 = false, r2 = false;
3179
+ for (let i2 of t2.values()) if (Object.entries(e2).every(([e3, t3]) => i2.choices[e3] === t3) && (r2 = true, (i2.availabilityStatus === vr.IN_STOCK || i2.availabilityStatus === vr.PREORDER) && (n2 = true), n2)) break;
3180
+ return { isInStock: n2, isVisible: r2 };
3181
+ }
3182
+ function ul(e2, t2) {
3183
+ let n2 = /* @__PURE__ */ new Map();
3184
+ for (let e3 of t2) n2.set(e3.variantId, e3);
3185
+ return e2.map((e3) => {
3186
+ let t3 = n2.get(e3.id);
3187
+ return { ...e3, availabilityStatus: t3?.availabilityStatus, preorderInfo: t3?.preorderInfo, inventoryQuantity: t3?.quantity, trackQuantity: t3?.trackQuantity };
3188
+ });
3189
+ }
3190
+ var dl = (e2, t2) => e2.modifierRenderType === Pr.FREE_TEXT ? !!t2 : e2.choices?.some((e3) => e3.choiceId === t2);
3191
+ function fl({ product: e2, selections: t2, selectedVariant: n2 }) {
3192
+ let r2 = { options: pl(e2.options, t2.selectedOptions, n2), modifiers: hl(e2.modifiers, t2.selectedModifiers), quantity: ml(t2.quantity, n2), subscriptionPlanId: gl(e2.subscriptionDetails, t2.selectedSubscriptionPlanId) };
3193
+ return { valid: Object.values(r2.options).length === 0 && Object.values(r2.modifiers).length === 0 && !r2.quantity && !r2.subscriptionPlanId, fields: r2 };
3194
+ }
3195
+ function pl(e2, t2, n2) {
3196
+ if (n2 !== null) return {};
3197
+ let r2 = {};
3198
+ for (let n3 of e2) t2[n3.id] || (r2[n3.id] = `missing`);
3199
+ return r2;
3200
+ }
3201
+ function ml(e2, t2) {
3202
+ if (e2 < 1) return `below-min`;
3203
+ if (e2 > Ka(t2)) return `above-max`;
3204
+ }
3205
+ function hl(e2, t2) {
3206
+ let n2 = Object.values(e2).filter((e3) => e3.mandatory && !dl(e3, t2[e3.id]));
3207
+ return Object.fromEntries(n2.map((e3) => [e3.id, `missing`]));
3208
+ }
3209
+ function gl(e2, t2) {
3210
+ if (e2.subscriptions.length !== 0) return t2 ? t2 === `one-time` ? e2.allowOneTimePurchases ? void 0 : `missing` : _l(e2, t2) ? void 0 : `missing` : `missing`;
3211
+ }
3212
+ function _l(e2, t2) {
3213
+ return e2.subscriptions.some((e3) => e3.id === t2);
3214
+ }
3215
+ var $ = function(e2) {
3216
+ return e2.PRODUCT_OPTION = `PRODUCT_OPTION`, e2.MODIFIER = `MODIFIER`, e2;
3217
+ }({});
3218
+ function vl(e2) {
3219
+ if (e2 === `IN_STOCK` || e2 === `OUT_OF_STOCK` || e2 === `PARTIALLY_OUT_OF_STOCK`) return e2;
3220
+ }
3221
+ function yl(e2) {
3222
+ if (!(!e2 || e2.customizationRenderType !== `TEXT_CHOICES` && e2.customizationRenderType !== `SWATCH_CHOICES`)) {
3223
+ if (e2.customizationType === `PRODUCT_OPTION`) return `PRODUCT_OPTION`;
3224
+ if (e2.customizationType === `MODIFIER`) return `MODIFIER`;
3225
+ }
3226
+ }
3227
+ function bl(e2) {
3228
+ return !e2._id || !e2.key ? null : { choiceId: e2._id, key: e2.key, name: e2.name, colorCode: e2.colorCode };
3229
+ }
3230
+ function xl(e2) {
3231
+ if (e2.status !== `ACTIVE` || !e2.productId || !e2.slug || !e2.choice) return null;
3232
+ let t2 = bl(e2.choice);
3233
+ return t2 ? { productId: e2.productId, choice: t2, slug: e2.slug, inventoryAvailabilityStatus: vl(e2.inventoryAvailabilityStatus) } : null;
3234
+ }
3235
+ function Sl(e2) {
3236
+ let t2 = e2.groupingCustomizationId, n2 = yl(e2.groupingCustomization);
3237
+ if (!t2 || !n2) return;
3238
+ let r2 = (e2.members ?? []).map((e3) => xl(e3)).filter((e3) => e3 !== null);
3239
+ if (r2.length !== 0) return { groupingCustomizationId: t2, customizationType: n2, members: r2 };
3240
+ }
3241
+ async function Cl(e2) {
3242
+ if (e2) try {
3243
+ let t2 = await Qr({ fields: [Kr.GROUPING_CUSTOMIZATION] }).eq(`_id`, e2).limit(1).find();
3244
+ return t2.items[0] ? Sl(t2.items[0]) : void 0;
3245
+ } catch {
3246
+ return;
3247
+ }
3248
+ }
3249
+ function wl(e2, t2) {
3250
+ if (!t2) return;
3251
+ let n2 = t2.members.find((t3) => t3.productId === e2.id);
3252
+ if (!n2) return;
3253
+ let r2 = { groupingCustomizationId: t2.groupingCustomizationId, currentProductChoiceId: n2.choice.choiceId, members: t2.members };
3254
+ if (t2.customizationType === $.PRODUCT_OPTION) return e2.options.find(({ id: e3 }) => e3 === t2.groupingCustomizationId) ? { ...r2, customizationType: $.PRODUCT_OPTION } : void 0;
3255
+ if (e2.modifiers[t2.groupingCustomizationId]) return { ...r2, customizationType: $.MODIFIER };
3256
+ }
3257
+ function Tl(e2, t2) {
3258
+ return e2.members.find((e3) => e3.choice.choiceId === t2);
3259
+ }
3260
+ function El(e2, t2, n2) {
3261
+ return !!e2 && t2 === e2.groupingCustomizationId && n2 !== e2.currentProductChoiceId;
3262
+ }
3263
+ function Dl(e2, t2) {
3264
+ if (!t2) return;
3265
+ if (t2.customizationType === $.PRODUCT_OPTION) {
3266
+ let n3 = e2.options.find(({ id: e3 }) => e3 === t2.groupingCustomizationId);
3267
+ if (!n3) return;
3268
+ let r3 = Ol(n3, t2);
3269
+ return { options: e2.options.map((e3) => e3.id === n3.id ? r3 : e3) };
3270
+ }
3271
+ let n2 = e2.modifiers[t2.groupingCustomizationId];
3272
+ if (!n2) return;
3273
+ let r2 = kl(n2, t2);
3274
+ return { modifiers: { ...e2.modifiers, [t2.groupingCustomizationId]: r2 } };
3275
+ }
3276
+ function Ol(e2, t2) {
3277
+ return { ...e2, isGroupedOption: true, choices: t2.members.map((e3) => ({ ...e3.choice, inStock: e3.inventoryAvailabilityStatus !== `OUT_OF_STOCK` })) };
3278
+ }
3279
+ function kl(e2, t2) {
3280
+ return { ...e2, choices: t2.members.map(({ choice: e3 }) => e3) };
3281
+ }
3282
+ function Al(e2, t2) {
3283
+ if (!t2 || t2.customizationType !== $.PRODUCT_OPTION) return e2;
3284
+ let n2 = Object.fromEntries(t2.members.map((e3) => [e3.choice.choiceId, { isInStock: e3.inventoryAvailabilityStatus !== `OUT_OF_STOCK`, isVisible: true }]));
3285
+ return { ...e2, [t2.groupingCustomizationId]: { ...n2, ...e2[t2.groupingCustomizationId] } };
3286
+ }
3287
+ function jl(e2, r2) {
3288
+ let { navigateToProductPage: i2 } = Pa(), a2 = n(() => wl(e2, r2), [e2, r2]);
3289
+ return { productGrouping: a2, selectGroupSiblingChoice: t((e3) => {
3290
+ if (!a2) return;
3291
+ let t2 = Tl(a2, e3);
3292
+ t2 && i2(t2.slug);
3293
+ }, [a2, i2]), productCustomizations: n(() => Dl(e2, a2), [e2, a2]), addGroupChoicesAvailability: t((e3) => Al(e3, a2), [a2]), initialSelection: n(() => {
3294
+ if (!a2) return { options: {}, modifiers: {} };
3295
+ let { customizationType: t2, groupingCustomizationId: n2, currentProductChoiceId: r3 } = a2;
3296
+ if (t2 === $.MODIFIER && e2.modifiers[n2].mandatory === false) return { options: {}, modifiers: {} };
3297
+ let i3 = { [n2]: r3 };
3298
+ return t2 === $.PRODUCT_OPTION ? { options: i3, modifiers: {} } : { options: {}, modifiers: i3 };
3299
+ }, [a2, e2.modifiers]) };
3300
+ }
3301
+ function Ml(e2, r2, a2) {
3302
+ let o2 = jl(e2, a2), { productGrouping: s2, selectGroupSiblingChoice: c2, addGroupChoicesAvailability: l2 } = o2, [u2, d2] = i(() => o2.initialSelection.options), [f2, p2] = i(() => o2.initialSelection.modifiers), [m2, h2] = i(void 0), [g2, _2] = i(1), [v2, y2] = i(false), b2 = n(() => sl(ul(e2.variants, r2)), [e2.variants, r2]), x2 = n(() => {
3303
+ let t2 = /* @__PURE__ */ new Map();
3304
+ return (n2) => {
3305
+ let r3 = ol(n2), i2 = t2.get(r3);
3306
+ if (i2) return i2;
3307
+ let a3 = l2(cl(e2.options, b2, n2));
3308
+ return t2.set(r3, a3), a3;
3309
+ };
3310
+ }, [b2, e2.options, l2]), S2 = n(() => x2(u2), [x2, u2]), C2 = n(() => Object.keys(u2).length === e2.options.length ? b2.get(ol(u2)) ?? null : null, [b2, u2, e2.options.length]), w2 = t((e3, t2) => {
3311
+ if (u2[e3] !== t2) {
3312
+ if (El(s2, e3, t2)) {
3313
+ c2(t2);
3314
+ return;
3315
+ }
3316
+ d2((n2) => ({ ...n2, [e3]: t2 })), _2(1);
3317
+ }
3318
+ }, [u2, s2, c2]), T2 = t((e3, t2) => {
3319
+ if (El(s2, e3, t2)) {
3320
+ c2(t2);
3321
+ return;
3322
+ }
3323
+ p2((n2) => n2[e3] === t2 ? n2 : { ...n2, [e3]: t2 });
3324
+ }, [s2, c2]), E2 = t((e3) => {
3325
+ p2((t2) => {
3326
+ if (!(e3 in t2)) return t2;
3327
+ let { [e3]: n2, ...r3 } = t2;
3328
+ return r3;
3329
+ });
3330
+ }, []), D2 = t((e3) => {
3331
+ h2(e3);
3332
+ }, []), O2 = n(() => Ka(C2), [C2]), k2 = n(() => qa(g2, O2), [g2, O2]), ee2 = t((e3) => {
3333
+ _2(e3);
3334
+ }, []), te2 = n(() => fl({ product: e2, selections: { selectedOptions: u2, selectedModifiers: f2, selectedSubscriptionPlanId: m2, quantity: k2 }, selectedVariant: C2 }), [e2, u2, f2, m2, k2, C2]), ne2 = o2.productCustomizations?.options ?? e2.options, re2 = o2.productCustomizations?.modifiers ?? e2.modifiers;
3335
+ return n(() => ({ options: ne2, modifiers: re2, quantity: k2, selectedOptions: u2, selectedModifiers: f2, selectedSubscriptionPlanId: m2, selectedVariant: C2, selectedVariantId: C2?.id ?? null, selectionsAvailability: S2, maxPurchasableQuantity: O2, isSelectionValid: te2.valid, selectionValidationErrors: te2.fields, hasAttemptedSubmit: v2, setHasAttemptedSubmit: y2, selectOption: w2, selectModifier: T2, clearModifierSelection: E2, selectSubscriptionPlan: D2, selectQuantity: ee2 }), [ne2, re2, k2, u2, f2, m2, C2, S2, O2, te2, v2, w2, T2, E2, D2, ee2]);
3336
+ }
3337
+ function Nl({ product: e2, productGroup: t2, inventoryItems: r2, isBackInStockEnabled: i2, source: a2 }) {
3338
+ let o2 = Ml(e2, r2, t2), s2 = Ga(e2, o2, Za(e2, o2.selectedVariant)), c2 = qc(e2, o2, al({ product: e2, userInputs: o2, hasLoadedVariants: true }), i2);
3339
+ return n(() => ({ ...c2, ...s2, source: a2 }), [c2, s2, a2]);
3340
+ }
3341
+ function Pl({ productPromise: e2, source: t2, children: n2 }) {
3342
+ let { product: r2, productGroup: i2, inventoryItems: o2, isBackInStockEnabled: s2 } = kn(e2), c2 = Nl({ product: r2, productGroup: i2, inventoryItems: o2, isBackInStockEnabled: s2, source: t2 });
3343
+ return l(a, { value: c2, children: n2 });
3344
+ }
3345
+ function Fl(t2) {
3346
+ return l(e, { fallback: null, children: l(Pl, { ...t2 }) });
3347
+ }
3348
+ Fl.displayName = `StandaloneProductContextProvider`;
3349
+ var Il = q(`@wix/site-service-warmup-data`);
3350
+ async function Ll(e2, t2, n2) {
3351
+ let r2 = typeof window > `u`;
3352
+ if (!r2 && e2) try {
3353
+ let n3 = await e2.get(t2);
3354
+ if (n3 !== null) return n3;
3355
+ } catch {
3356
+ }
3357
+ let i2 = await n2();
3358
+ if (r2 && e2) try {
3359
+ e2.set(t2, i2);
3360
+ } catch {
3361
+ }
3362
+ return i2;
3363
+ }
3364
+ function Rl(e2, t2) {
3365
+ let n2 = s(), [r2] = i(() => {
3366
+ let r3;
3367
+ try {
3368
+ r3 = n2(Il);
3369
+ } catch {
3370
+ r3 = null;
3371
+ }
3372
+ return Ll(r3, e2, t2);
3373
+ });
3374
+ return r2;
3375
+ }
3376
+ async function zl() {
3377
+ return (await si().eq(`defaultLocation`, true).find()).items?.[0]?._id ?? void 0;
3378
+ }
3379
+ async function Bl() {
3380
+ try {
3381
+ return (await oa()).settings?.collectionStates?.some((e2) => e2.appId === `215238eb-22a5-4c36-9e7b-e7c08025e04e` && e2.collectingRequests) ?? false;
3382
+ } catch {
3383
+ return false;
3384
+ }
3385
+ }
3386
+ function Vl(e2) {
3387
+ return e2.map((e3) => ({ variantId: e3.variantId ?? ``, availabilityStatus: e3.availabilityStatus, quantity: e3.quantity ?? void 0, trackQuantity: e3.trackQuantity ?? false, preorderInfo: e3.preorderInfo ? { message: e3.preorderInfo.message ?? void 0, quantity: e3.preorderInfo.quantity ?? void 0 } : void 0 }));
3388
+ }
3389
+ async function Hl(e2, t2) {
3390
+ return Vl((await kr().eq(`productId`, e2).eq(`locationId`, t2).find()).items ?? []);
3391
+ }
3392
+ async function Ul(e2) {
3393
+ let [t2, n2, r2] = await Promise.all([e2(), zl(), Bl()]), { product: i2 } = t2;
3394
+ if (!n2) throw Error(`Location not found`);
3395
+ let [a2, o2] = await Promise.all([Hl(i2.id, n2), i2.productGroupId ? Cl(i2.productGroupId) : void 0]);
3396
+ return { ...t2, productGroup: o2, inventoryItems: a2, isBackInStockEnabled: r2 };
3397
+ }
3398
+ function Wl(e2, t2) {
3399
+ return Rl(`wixstores-storefront-builder:product-data:${e2}`, () => Ul(t2));
3400
+ }
3401
+ var Gl = function(e2) {
3402
+ return e2.PRODUCT_BY_SLUG = `product-by-slug`, e2.PRODUCT_BY_ID = `product-by-id`, e2.PRODUCT_ITEM = `product-item`, e2;
3403
+ }({});
3404
+ function Kl() {
3405
+ let e2 = c(Oa);
3406
+ return ql(new URL(e2.currentUrl));
3407
+ }
3408
+ function ql(e2) {
3409
+ return e2.pathname.split(`/`).filter(Boolean).at(-1) || void 0;
3410
+ }
3411
+ var Jl = q(`seo/seo-service`);
3412
+ function Yl(e2) {
3413
+ let t2 = c(Jl), n2 = c(Jc), i2 = r(false);
3414
+ !i2.current && e2.id && n2.isSSR() && (i2.current = true, t2.setSeoEntity({ itemType: `STORES_PRODUCT`, seoData: e2.seoData ?? {}, itemData: { product: e2 } }).catch(() => {
3415
+ }));
3416
+ }
3417
+ var Xl = `No product slug is available for the product context`;
3418
+ function Zl() {
3419
+ return o();
3420
+ }
3421
+ function Ql({ productPromise: e2 }) {
3422
+ let { seoProduct: t2 } = kn(e2);
3423
+ return Yl(t2), null;
3424
+ }
3425
+ function $l({ children: e2 }) {
3426
+ let t2 = Kl(), n2 = Wl(`slug:${t2}`, () => t2 ? Gi(t2) : Promise.reject(Error(Xl)));
3427
+ return u(Fl, { productPromise: n2, source: Gl.PRODUCT_BY_SLUG, children: [l(Ql, { productPromise: n2 }), e2] });
3428
+ }
3429
+ var eu = On(`b276b552-68b9-4936-98d5-fbe43c0bd257`);
3430
+ export {
3431
+ Xl as NO_PRODUCT_SLUG_ERROR,
3432
+ $l as ProductBySlugContextProvider,
3433
+ $l as default,
3434
+ eu as injectAccessTokenGetter,
3435
+ Zl as useProductBySlugContext
3436
+ };
3437
+ //# sourceMappingURL=context-product-by-slug-context-provider.mjs.map