@nosto/nosto-react 0.5.0 → 1.0.0
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.
- package/README.md +1 -6
- package/dist/index.d.ts +793 -111
- package/dist/index.es.js +562 -752
- package/dist/index.umd.js +9 -9
- package/package.json +1 -1
- package/src/components/Nosto404.tsx +1 -8
- package/src/components/NostoCategory.tsx +1 -11
- package/src/components/NostoCheckout.tsx +1 -9
- package/src/components/NostoHome.tsx +1 -8
- package/src/components/NostoOrder.tsx +3 -13
- package/src/components/NostoOther.tsx +1 -8
- package/src/components/NostoProduct.tsx +3 -95
- package/src/components/NostoSearch.tsx +1 -11
- package/src/components/NostoSession.tsx +2 -2
- package/src/components/context.ts +2 -2
- package/src/index.ts +1 -2
- package/src/types.ts +792 -101
- package/src/utils/hooks.ts +1 -1
package/dist/index.es.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { createRoot as
|
|
3
|
-
const
|
|
1
|
+
import B, { createContext as Rt, useContext as ht, useEffect as te, useRef as pe, useMemo as Et, isValidElement as Ct, useState as bt } from "react";
|
|
2
|
+
import { createRoot as _t } from "react-dom/client";
|
|
3
|
+
const qe = Rt({
|
|
4
4
|
account: "",
|
|
5
5
|
currentVariation: "",
|
|
6
6
|
pageType: "",
|
|
@@ -13,50 +13,181 @@ const Je = Cr({
|
|
|
13
13
|
})
|
|
14
14
|
});
|
|
15
15
|
function x() {
|
|
16
|
-
const
|
|
17
|
-
if (!
|
|
16
|
+
const n = ht(qe);
|
|
17
|
+
if (!n)
|
|
18
18
|
throw new Error("No nosto context found");
|
|
19
|
-
return
|
|
19
|
+
return n;
|
|
20
20
|
}
|
|
21
|
-
const
|
|
22
|
-
function
|
|
23
|
-
if (!
|
|
21
|
+
const We = (n) => String(n) === "[object Object]";
|
|
22
|
+
function Ve(n) {
|
|
23
|
+
if (!We(n))
|
|
24
24
|
return !1;
|
|
25
|
-
const
|
|
26
|
-
if (
|
|
25
|
+
const o = n.constructor;
|
|
26
|
+
if (o === void 0)
|
|
27
27
|
return !0;
|
|
28
|
-
const
|
|
29
|
-
return !(!
|
|
28
|
+
const a = o.prototype;
|
|
29
|
+
return !(!We(a) || !a.hasOwnProperty("isPrototypeOf"));
|
|
30
30
|
}
|
|
31
|
-
function
|
|
32
|
-
if (
|
|
31
|
+
function me(n, o) {
|
|
32
|
+
if (n === o)
|
|
33
33
|
return !0;
|
|
34
|
-
if (
|
|
35
|
-
return
|
|
36
|
-
if (
|
|
37
|
-
return
|
|
38
|
-
if (
|
|
39
|
-
const
|
|
40
|
-
return
|
|
34
|
+
if (n instanceof Date && o instanceof Date)
|
|
35
|
+
return n.getTime() === o.getTime();
|
|
36
|
+
if (n instanceof Array && o instanceof Array)
|
|
37
|
+
return n.length !== o.length ? !1 : n.every((a, u) => me(a, o[u]));
|
|
38
|
+
if (Ve(n) && Ve(o)) {
|
|
39
|
+
const a = Object.entries(n);
|
|
40
|
+
return a.length !== Object.keys(o).length ? !1 : a.every(([u, d]) => me(d, o[u]));
|
|
41
41
|
}
|
|
42
42
|
return !1;
|
|
43
43
|
}
|
|
44
|
-
function
|
|
45
|
-
return
|
|
44
|
+
function Be(n, o) {
|
|
45
|
+
return te(n, wt(o));
|
|
46
46
|
}
|
|
47
|
-
function
|
|
48
|
-
const
|
|
49
|
-
return
|
|
47
|
+
function wt(n) {
|
|
48
|
+
const o = pe(n), a = pe(0);
|
|
49
|
+
return me(n, o.current) || (o.current = n, a.current += 1), Et(() => o.current, [a.current]);
|
|
50
50
|
}
|
|
51
|
-
function
|
|
52
|
-
const { clientScriptLoaded:
|
|
53
|
-
(
|
|
54
|
-
|
|
55
|
-
|
|
51
|
+
function N(n, o, a) {
|
|
52
|
+
const { clientScriptLoaded: u, currentVariation: d, responseMode: c } = x();
|
|
53
|
+
(a != null && a.deep ? Be : te)(() => {
|
|
54
|
+
u && window.nostojs((m) => {
|
|
55
|
+
m.defaultSession().setVariation(d).setResponseMode(c), n(m);
|
|
56
56
|
});
|
|
57
|
-
}, [
|
|
57
|
+
}, [u, d, c, ...o ?? []]);
|
|
58
58
|
}
|
|
59
|
-
|
|
59
|
+
function kt(n) {
|
|
60
|
+
const {
|
|
61
|
+
recommendationComponent: o,
|
|
62
|
+
useRenderCampaigns: a
|
|
63
|
+
} = x(), {
|
|
64
|
+
renderCampaigns: u,
|
|
65
|
+
pageTypeUpdated: d
|
|
66
|
+
} = a("404");
|
|
67
|
+
return N(async (c) => {
|
|
68
|
+
const i = await c.defaultSession().viewNotFound().setPlacements(n.placements || c.placements.getPlacements()).load();
|
|
69
|
+
u(i, c);
|
|
70
|
+
}, [o, d]), null;
|
|
71
|
+
}
|
|
72
|
+
function Dt(n) {
|
|
73
|
+
const {
|
|
74
|
+
recommendationComponent: o,
|
|
75
|
+
useRenderCampaigns: a
|
|
76
|
+
} = x(), {
|
|
77
|
+
renderCampaigns: u,
|
|
78
|
+
pageTypeUpdated: d
|
|
79
|
+
} = a("other");
|
|
80
|
+
return N(async (c) => {
|
|
81
|
+
const i = await c.defaultSession().viewOther().setPlacements(n.placements || c.placements.getPlacements()).load();
|
|
82
|
+
u(i, c);
|
|
83
|
+
}, [o, d]), null;
|
|
84
|
+
}
|
|
85
|
+
function Ft(n) {
|
|
86
|
+
const {
|
|
87
|
+
recommendationComponent: o,
|
|
88
|
+
useRenderCampaigns: a
|
|
89
|
+
} = x(), {
|
|
90
|
+
renderCampaigns: u,
|
|
91
|
+
pageTypeUpdated: d
|
|
92
|
+
} = a("checkout");
|
|
93
|
+
return N(async (c) => {
|
|
94
|
+
const i = await c.defaultSession().viewCart().setPlacements(n.placements || c.placements.getPlacements()).load();
|
|
95
|
+
u(i, c);
|
|
96
|
+
}, [o, d]), null;
|
|
97
|
+
}
|
|
98
|
+
function Nt(n) {
|
|
99
|
+
const {
|
|
100
|
+
product: o,
|
|
101
|
+
tagging: a,
|
|
102
|
+
placements: u
|
|
103
|
+
} = n, {
|
|
104
|
+
recommendationComponent: d,
|
|
105
|
+
useRenderCampaigns: c
|
|
106
|
+
} = x(), {
|
|
107
|
+
renderCampaigns: i,
|
|
108
|
+
pageTypeUpdated: m
|
|
109
|
+
} = c("product");
|
|
110
|
+
return N(async (v) => {
|
|
111
|
+
const O = await v.defaultSession().viewProduct(a ?? o).setPlacements(u || v.placements.getPlacements()).load();
|
|
112
|
+
i(O, v);
|
|
113
|
+
}, [o, d, m], {
|
|
114
|
+
deep: !0
|
|
115
|
+
}), null;
|
|
116
|
+
}
|
|
117
|
+
function Lt(n) {
|
|
118
|
+
const {
|
|
119
|
+
category: o,
|
|
120
|
+
placements: a
|
|
121
|
+
} = n, {
|
|
122
|
+
recommendationComponent: u,
|
|
123
|
+
useRenderCampaigns: d
|
|
124
|
+
} = x(), {
|
|
125
|
+
renderCampaigns: c,
|
|
126
|
+
pageTypeUpdated: i
|
|
127
|
+
} = d("home");
|
|
128
|
+
return N(async (m) => {
|
|
129
|
+
const v = await m.defaultSession().viewCategory(o).setPlacements(a || m.placements.getPlacements()).load();
|
|
130
|
+
c(v, m);
|
|
131
|
+
}, [o, u, i]), null;
|
|
132
|
+
}
|
|
133
|
+
function It(n) {
|
|
134
|
+
const {
|
|
135
|
+
query: o,
|
|
136
|
+
placements: a
|
|
137
|
+
} = n, {
|
|
138
|
+
recommendationComponent: u,
|
|
139
|
+
useRenderCampaigns: d
|
|
140
|
+
} = x(), {
|
|
141
|
+
renderCampaigns: c,
|
|
142
|
+
pageTypeUpdated: i
|
|
143
|
+
} = d("search");
|
|
144
|
+
return N(async (m) => {
|
|
145
|
+
const v = await m.defaultSession().viewSearch(o).setPlacements(a || m.placements.getPlacements()).load();
|
|
146
|
+
c(v, m);
|
|
147
|
+
}, [o, u, i]), null;
|
|
148
|
+
}
|
|
149
|
+
function H(n) {
|
|
150
|
+
return !n || typeof n != "object" || Tt(n) || St(n) ? n : Array.isArray(n) ? n.map(H) : Object.keys(n).reduce((o, a) => {
|
|
151
|
+
const u = a[0].toLowerCase() + a.slice(1).replace(/([A-Z]+)/g, (d, c) => "_" + c.toLowerCase());
|
|
152
|
+
return o[u] = H(n[a]), o;
|
|
153
|
+
}, {});
|
|
154
|
+
}
|
|
155
|
+
function Tt(n) {
|
|
156
|
+
return Object.prototype.toString.call(n) === "[object Date]";
|
|
157
|
+
}
|
|
158
|
+
function St(n) {
|
|
159
|
+
return Object.prototype.toString.call(n) === "[object RegExp]";
|
|
160
|
+
}
|
|
161
|
+
function $t(n) {
|
|
162
|
+
const {
|
|
163
|
+
order: o,
|
|
164
|
+
placements: a
|
|
165
|
+
} = n, {
|
|
166
|
+
recommendationComponent: u,
|
|
167
|
+
useRenderCampaigns: d
|
|
168
|
+
} = x(), {
|
|
169
|
+
renderCampaigns: c,
|
|
170
|
+
pageTypeUpdated: i
|
|
171
|
+
} = d("order");
|
|
172
|
+
return N(async (m) => {
|
|
173
|
+
const v = await m.defaultSession().addOrder(H(o)).setPlacements(a || m.placements.getPlacements()).load();
|
|
174
|
+
c(v, m);
|
|
175
|
+
}, [u, i]), null;
|
|
176
|
+
}
|
|
177
|
+
function Ut(n) {
|
|
178
|
+
const {
|
|
179
|
+
recommendationComponent: o,
|
|
180
|
+
useRenderCampaigns: a
|
|
181
|
+
} = x(), {
|
|
182
|
+
renderCampaigns: u,
|
|
183
|
+
pageTypeUpdated: d
|
|
184
|
+
} = a("home");
|
|
185
|
+
return N(async (c) => {
|
|
186
|
+
const i = await c.defaultSession().viewFrontPage().setPlacements(n.placements || c.placements.getPlacements()).load();
|
|
187
|
+
u(i, c);
|
|
188
|
+
}, [o, d]), null;
|
|
189
|
+
}
|
|
190
|
+
var ve = { exports: {} }, M = {};
|
|
60
191
|
/**
|
|
61
192
|
* @license React
|
|
62
193
|
* react-jsx-runtime.production.min.js
|
|
@@ -66,25 +197,25 @@ var he = { exports: {} }, H = {};
|
|
|
66
197
|
* This source code is licensed under the MIT license found in the
|
|
67
198
|
* LICENSE file in the root directory of this source tree.
|
|
68
199
|
*/
|
|
69
|
-
var
|
|
70
|
-
function
|
|
71
|
-
if (
|
|
72
|
-
return
|
|
73
|
-
|
|
74
|
-
var
|
|
75
|
-
function
|
|
76
|
-
var
|
|
77
|
-
|
|
78
|
-
for (
|
|
79
|
-
|
|
80
|
-
if (
|
|
81
|
-
for (
|
|
82
|
-
|
|
83
|
-
return { $$typeof:
|
|
200
|
+
var Ye;
|
|
201
|
+
function Pt() {
|
|
202
|
+
if (Ye)
|
|
203
|
+
return M;
|
|
204
|
+
Ye = 1;
|
|
205
|
+
var n = B, o = Symbol.for("react.element"), a = Symbol.for("react.fragment"), u = Object.prototype.hasOwnProperty, d = n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, c = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
206
|
+
function i(m, v, O) {
|
|
207
|
+
var C, w = {}, A = null, F = null;
|
|
208
|
+
O !== void 0 && (A = "" + O), v.key !== void 0 && (A = "" + v.key), v.ref !== void 0 && (F = v.ref);
|
|
209
|
+
for (C in v)
|
|
210
|
+
u.call(v, C) && !c.hasOwnProperty(C) && (w[C] = v[C]);
|
|
211
|
+
if (m && m.defaultProps)
|
|
212
|
+
for (C in v = m.defaultProps, v)
|
|
213
|
+
w[C] === void 0 && (w[C] = v[C]);
|
|
214
|
+
return { $$typeof: o, type: m, key: A, ref: F, props: w, _owner: d.current };
|
|
84
215
|
}
|
|
85
|
-
return
|
|
216
|
+
return M.Fragment = a, M.jsx = i, M.jsxs = i, M;
|
|
86
217
|
}
|
|
87
|
-
var
|
|
218
|
+
var q = {};
|
|
88
219
|
/**
|
|
89
220
|
* @license React
|
|
90
221
|
* react-jsx-runtime.development.js
|
|
@@ -94,91 +225,91 @@ var J = {};
|
|
|
94
225
|
* This source code is licensed under the MIT license found in the
|
|
95
226
|
* LICENSE file in the root directory of this source tree.
|
|
96
227
|
*/
|
|
97
|
-
var
|
|
98
|
-
function
|
|
99
|
-
return
|
|
100
|
-
var
|
|
228
|
+
var Me;
|
|
229
|
+
function Ot() {
|
|
230
|
+
return Me || (Me = 1, process.env.NODE_ENV !== "production" && function() {
|
|
231
|
+
var n = B, o = Symbol.for("react.element"), a = Symbol.for("react.portal"), u = Symbol.for("react.fragment"), d = Symbol.for("react.strict_mode"), c = Symbol.for("react.profiler"), i = Symbol.for("react.provider"), m = Symbol.for("react.context"), v = Symbol.for("react.forward_ref"), O = Symbol.for("react.suspense"), C = Symbol.for("react.suspense_list"), w = Symbol.for("react.memo"), A = Symbol.for("react.lazy"), F = Symbol.for("react.offscreen"), J = Symbol.iterator, ne = "@@iterator";
|
|
101
232
|
function j(e) {
|
|
102
233
|
if (e === null || typeof e != "object")
|
|
103
234
|
return null;
|
|
104
|
-
var t =
|
|
235
|
+
var t = J && e[J] || e[ne];
|
|
105
236
|
return typeof t == "function" ? t : null;
|
|
106
237
|
}
|
|
107
|
-
var
|
|
108
|
-
function
|
|
238
|
+
var _ = n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
239
|
+
function h(e) {
|
|
109
240
|
{
|
|
110
|
-
for (var t = arguments.length,
|
|
111
|
-
|
|
112
|
-
|
|
241
|
+
for (var t = arguments.length, r = new Array(t > 1 ? t - 1 : 0), s = 1; s < t; s++)
|
|
242
|
+
r[s - 1] = arguments[s];
|
|
243
|
+
y("error", e, r);
|
|
113
244
|
}
|
|
114
245
|
}
|
|
115
|
-
function
|
|
246
|
+
function y(e, t, r) {
|
|
116
247
|
{
|
|
117
|
-
var
|
|
118
|
-
|
|
119
|
-
var
|
|
120
|
-
return String(
|
|
248
|
+
var s = _.ReactDebugCurrentFrame, p = s.getStackAddendum();
|
|
249
|
+
p !== "" && (t += "%s", r = r.concat([p]));
|
|
250
|
+
var g = r.map(function(f) {
|
|
251
|
+
return String(f);
|
|
121
252
|
});
|
|
122
|
-
|
|
253
|
+
g.unshift("Warning: " + t), Function.prototype.apply.call(console[e], console, g);
|
|
123
254
|
}
|
|
124
255
|
}
|
|
125
|
-
var
|
|
126
|
-
|
|
127
|
-
function
|
|
128
|
-
return !!(typeof e == "string" || typeof e == "function" || e ===
|
|
256
|
+
var T = !1, S = !1, L = !1, I = !1, oe = !1, z;
|
|
257
|
+
z = Symbol.for("react.module.reference");
|
|
258
|
+
function G(e) {
|
|
259
|
+
return !!(typeof e == "string" || typeof e == "function" || e === u || e === c || oe || e === d || e === O || e === C || I || e === F || T || S || L || typeof e == "object" && e !== null && (e.$$typeof === A || e.$$typeof === w || e.$$typeof === i || e.$$typeof === m || e.$$typeof === v || // This needs to include all possible module reference object
|
|
129
260
|
// types supported by any Flight configuration anywhere since
|
|
130
261
|
// we don't know which Flight build this will end up being used
|
|
131
262
|
// with.
|
|
132
|
-
e.$$typeof ===
|
|
263
|
+
e.$$typeof === z || e.getModuleId !== void 0));
|
|
133
264
|
}
|
|
134
|
-
function
|
|
135
|
-
var
|
|
136
|
-
if (
|
|
137
|
-
return
|
|
138
|
-
var
|
|
139
|
-
return
|
|
265
|
+
function ge(e, t, r) {
|
|
266
|
+
var s = e.displayName;
|
|
267
|
+
if (s)
|
|
268
|
+
return s;
|
|
269
|
+
var p = t.displayName || t.name || "";
|
|
270
|
+
return p !== "" ? r + "(" + p + ")" : r;
|
|
140
271
|
}
|
|
141
|
-
function
|
|
272
|
+
function ye(e) {
|
|
142
273
|
return e.displayName || "Context";
|
|
143
274
|
}
|
|
144
|
-
function
|
|
275
|
+
function k(e) {
|
|
145
276
|
if (e == null)
|
|
146
277
|
return null;
|
|
147
|
-
if (typeof e.tag == "number" &&
|
|
278
|
+
if (typeof e.tag == "number" && h("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof e == "function")
|
|
148
279
|
return e.displayName || e.name || null;
|
|
149
280
|
if (typeof e == "string")
|
|
150
281
|
return e;
|
|
151
282
|
switch (e) {
|
|
152
|
-
case
|
|
283
|
+
case u:
|
|
153
284
|
return "Fragment";
|
|
154
|
-
case
|
|
285
|
+
case a:
|
|
155
286
|
return "Portal";
|
|
156
|
-
case
|
|
287
|
+
case c:
|
|
157
288
|
return "Profiler";
|
|
158
|
-
case
|
|
289
|
+
case d:
|
|
159
290
|
return "StrictMode";
|
|
160
|
-
case
|
|
291
|
+
case O:
|
|
161
292
|
return "Suspense";
|
|
162
|
-
case
|
|
293
|
+
case C:
|
|
163
294
|
return "SuspenseList";
|
|
164
295
|
}
|
|
165
296
|
if (typeof e == "object")
|
|
166
297
|
switch (e.$$typeof) {
|
|
167
|
-
case
|
|
298
|
+
case m:
|
|
168
299
|
var t = e;
|
|
169
|
-
return
|
|
170
|
-
case
|
|
171
|
-
var
|
|
172
|
-
return
|
|
173
|
-
case
|
|
174
|
-
return
|
|
175
|
-
case
|
|
176
|
-
var
|
|
177
|
-
return
|
|
178
|
-
case
|
|
179
|
-
var
|
|
300
|
+
return ye(t) + ".Consumer";
|
|
301
|
+
case i:
|
|
302
|
+
var r = e;
|
|
303
|
+
return ye(r._context) + ".Provider";
|
|
304
|
+
case v:
|
|
305
|
+
return ge(e, e.render, "ForwardRef");
|
|
306
|
+
case w:
|
|
307
|
+
var s = e.displayName || null;
|
|
308
|
+
return s !== null ? s : k(e.type) || "Memo";
|
|
309
|
+
case A: {
|
|
310
|
+
var p = e, g = p._payload, f = p._init;
|
|
180
311
|
try {
|
|
181
|
-
return
|
|
312
|
+
return k(f(g));
|
|
182
313
|
} catch {
|
|
183
314
|
return null;
|
|
184
315
|
}
|
|
@@ -186,18 +317,18 @@ function Or() {
|
|
|
186
317
|
}
|
|
187
318
|
return null;
|
|
188
319
|
}
|
|
189
|
-
var
|
|
190
|
-
function
|
|
320
|
+
var $ = Object.assign, V = 0, Re, he, Ee, Ce, be, _e, we;
|
|
321
|
+
function Te() {
|
|
191
322
|
}
|
|
192
|
-
|
|
193
|
-
function
|
|
323
|
+
Te.__reactDisabledLog = !0;
|
|
324
|
+
function Je() {
|
|
194
325
|
{
|
|
195
|
-
if (
|
|
196
|
-
|
|
326
|
+
if (V === 0) {
|
|
327
|
+
Re = console.log, he = console.info, Ee = console.warn, Ce = console.error, be = console.group, _e = console.groupCollapsed, we = console.groupEnd;
|
|
197
328
|
var e = {
|
|
198
329
|
configurable: !0,
|
|
199
330
|
enumerable: !0,
|
|
200
|
-
value:
|
|
331
|
+
value: Te,
|
|
201
332
|
writable: !0
|
|
202
333
|
};
|
|
203
334
|
Object.defineProperties(console, {
|
|
@@ -210,336 +341,336 @@ function Or() {
|
|
|
210
341
|
groupEnd: e
|
|
211
342
|
});
|
|
212
343
|
}
|
|
213
|
-
|
|
344
|
+
V++;
|
|
214
345
|
}
|
|
215
346
|
}
|
|
216
|
-
function
|
|
347
|
+
function ze() {
|
|
217
348
|
{
|
|
218
|
-
if (
|
|
349
|
+
if (V--, V === 0) {
|
|
219
350
|
var e = {
|
|
220
351
|
configurable: !0,
|
|
221
352
|
enumerable: !0,
|
|
222
353
|
writable: !0
|
|
223
354
|
};
|
|
224
355
|
Object.defineProperties(console, {
|
|
225
|
-
log:
|
|
226
|
-
value:
|
|
356
|
+
log: $({}, e, {
|
|
357
|
+
value: Re
|
|
227
358
|
}),
|
|
228
|
-
info:
|
|
229
|
-
value:
|
|
359
|
+
info: $({}, e, {
|
|
360
|
+
value: he
|
|
230
361
|
}),
|
|
231
|
-
warn:
|
|
232
|
-
value:
|
|
362
|
+
warn: $({}, e, {
|
|
363
|
+
value: Ee
|
|
233
364
|
}),
|
|
234
|
-
error:
|
|
235
|
-
value:
|
|
365
|
+
error: $({}, e, {
|
|
366
|
+
value: Ce
|
|
236
367
|
}),
|
|
237
|
-
group:
|
|
238
|
-
value:
|
|
368
|
+
group: $({}, e, {
|
|
369
|
+
value: be
|
|
239
370
|
}),
|
|
240
|
-
groupCollapsed:
|
|
241
|
-
value:
|
|
371
|
+
groupCollapsed: $({}, e, {
|
|
372
|
+
value: _e
|
|
242
373
|
}),
|
|
243
|
-
groupEnd:
|
|
244
|
-
value:
|
|
374
|
+
groupEnd: $({}, e, {
|
|
375
|
+
value: we
|
|
245
376
|
})
|
|
246
377
|
});
|
|
247
378
|
}
|
|
248
|
-
|
|
379
|
+
V < 0 && h("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
249
380
|
}
|
|
250
381
|
}
|
|
251
|
-
var
|
|
252
|
-
function
|
|
382
|
+
var ae = _.ReactCurrentDispatcher, se;
|
|
383
|
+
function K(e, t, r) {
|
|
253
384
|
{
|
|
254
|
-
if (
|
|
385
|
+
if (se === void 0)
|
|
255
386
|
try {
|
|
256
387
|
throw Error();
|
|
257
|
-
} catch (
|
|
258
|
-
var
|
|
259
|
-
|
|
388
|
+
} catch (p) {
|
|
389
|
+
var s = p.stack.trim().match(/\n( *(at )?)/);
|
|
390
|
+
se = s && s[1] || "";
|
|
260
391
|
}
|
|
261
392
|
return `
|
|
262
|
-
` +
|
|
393
|
+
` + se + e;
|
|
263
394
|
}
|
|
264
395
|
}
|
|
265
|
-
var
|
|
396
|
+
var ie = !1, X;
|
|
266
397
|
{
|
|
267
|
-
var
|
|
268
|
-
|
|
398
|
+
var Ge = typeof WeakMap == "function" ? WeakMap : Map;
|
|
399
|
+
X = new Ge();
|
|
269
400
|
}
|
|
270
|
-
function
|
|
271
|
-
if (!e ||
|
|
401
|
+
function Se(e, t) {
|
|
402
|
+
if (!e || ie)
|
|
272
403
|
return "";
|
|
273
404
|
{
|
|
274
|
-
var
|
|
275
|
-
if (
|
|
276
|
-
return
|
|
405
|
+
var r = X.get(e);
|
|
406
|
+
if (r !== void 0)
|
|
407
|
+
return r;
|
|
277
408
|
}
|
|
278
|
-
var
|
|
279
|
-
|
|
280
|
-
var
|
|
409
|
+
var s;
|
|
410
|
+
ie = !0;
|
|
411
|
+
var p = Error.prepareStackTrace;
|
|
281
412
|
Error.prepareStackTrace = void 0;
|
|
282
|
-
var
|
|
283
|
-
|
|
413
|
+
var g;
|
|
414
|
+
g = ae.current, ae.current = null, Je();
|
|
284
415
|
try {
|
|
285
416
|
if (t) {
|
|
286
|
-
var
|
|
417
|
+
var f = function() {
|
|
287
418
|
throw Error();
|
|
288
419
|
};
|
|
289
|
-
if (Object.defineProperty(
|
|
420
|
+
if (Object.defineProperty(f.prototype, "props", {
|
|
290
421
|
set: function() {
|
|
291
422
|
throw Error();
|
|
292
423
|
}
|
|
293
424
|
}), typeof Reflect == "object" && Reflect.construct) {
|
|
294
425
|
try {
|
|
295
|
-
Reflect.construct(
|
|
426
|
+
Reflect.construct(f, []);
|
|
296
427
|
} catch (D) {
|
|
297
|
-
|
|
428
|
+
s = D;
|
|
298
429
|
}
|
|
299
|
-
Reflect.construct(e, [],
|
|
430
|
+
Reflect.construct(e, [], f);
|
|
300
431
|
} else {
|
|
301
432
|
try {
|
|
302
|
-
|
|
433
|
+
f.call();
|
|
303
434
|
} catch (D) {
|
|
304
|
-
|
|
435
|
+
s = D;
|
|
305
436
|
}
|
|
306
|
-
e.call(
|
|
437
|
+
e.call(f.prototype);
|
|
307
438
|
}
|
|
308
439
|
} else {
|
|
309
440
|
try {
|
|
310
441
|
throw Error();
|
|
311
442
|
} catch (D) {
|
|
312
|
-
|
|
443
|
+
s = D;
|
|
313
444
|
}
|
|
314
445
|
e();
|
|
315
446
|
}
|
|
316
447
|
} catch (D) {
|
|
317
|
-
if (D &&
|
|
318
|
-
for (var
|
|
319
|
-
`),
|
|
320
|
-
`),
|
|
448
|
+
if (D && s && typeof D.stack == "string") {
|
|
449
|
+
for (var l = D.stack.split(`
|
|
450
|
+
`), b = s.stack.split(`
|
|
451
|
+
`), R = l.length - 1, E = b.length - 1; R >= 1 && E >= 0 && l[R] !== b[E]; )
|
|
321
452
|
E--;
|
|
322
|
-
for (;
|
|
323
|
-
if (
|
|
324
|
-
if (
|
|
453
|
+
for (; R >= 1 && E >= 0; R--, E--)
|
|
454
|
+
if (l[R] !== b[E]) {
|
|
455
|
+
if (R !== 1 || E !== 1)
|
|
325
456
|
do
|
|
326
|
-
if (
|
|
327
|
-
var
|
|
328
|
-
` +
|
|
329
|
-
return e.displayName &&
|
|
457
|
+
if (R--, E--, E < 0 || l[R] !== b[E]) {
|
|
458
|
+
var P = `
|
|
459
|
+
` + l[R].replace(" at new ", " at ");
|
|
460
|
+
return e.displayName && P.includes("<anonymous>") && (P = P.replace("<anonymous>", e.displayName)), typeof e == "function" && X.set(e, P), P;
|
|
330
461
|
}
|
|
331
|
-
while (
|
|
462
|
+
while (R >= 1 && E >= 0);
|
|
332
463
|
break;
|
|
333
464
|
}
|
|
334
465
|
}
|
|
335
466
|
} finally {
|
|
336
|
-
|
|
467
|
+
ie = !1, ae.current = g, ze(), Error.prepareStackTrace = p;
|
|
337
468
|
}
|
|
338
|
-
var
|
|
339
|
-
return typeof e == "function" &&
|
|
469
|
+
var W = e ? e.displayName || e.name : "", Ue = W ? K(W) : "";
|
|
470
|
+
return typeof e == "function" && X.set(e, Ue), Ue;
|
|
340
471
|
}
|
|
341
|
-
function
|
|
342
|
-
return
|
|
472
|
+
function Ke(e, t, r) {
|
|
473
|
+
return Se(e, !1);
|
|
343
474
|
}
|
|
344
|
-
function
|
|
475
|
+
function Xe(e) {
|
|
345
476
|
var t = e.prototype;
|
|
346
477
|
return !!(t && t.isReactComponent);
|
|
347
478
|
}
|
|
348
|
-
function
|
|
479
|
+
function Z(e, t, r) {
|
|
349
480
|
if (e == null)
|
|
350
481
|
return "";
|
|
351
482
|
if (typeof e == "function")
|
|
352
|
-
return
|
|
483
|
+
return Se(e, Xe(e));
|
|
353
484
|
if (typeof e == "string")
|
|
354
|
-
return
|
|
485
|
+
return K(e);
|
|
355
486
|
switch (e) {
|
|
356
|
-
case
|
|
357
|
-
return
|
|
358
|
-
case
|
|
359
|
-
return
|
|
487
|
+
case O:
|
|
488
|
+
return K("Suspense");
|
|
489
|
+
case C:
|
|
490
|
+
return K("SuspenseList");
|
|
360
491
|
}
|
|
361
492
|
if (typeof e == "object")
|
|
362
493
|
switch (e.$$typeof) {
|
|
363
|
-
case
|
|
364
|
-
return
|
|
365
|
-
case
|
|
366
|
-
return
|
|
367
|
-
case
|
|
368
|
-
var
|
|
494
|
+
case v:
|
|
495
|
+
return Ke(e.render);
|
|
496
|
+
case w:
|
|
497
|
+
return Z(e.type, t, r);
|
|
498
|
+
case A: {
|
|
499
|
+
var s = e, p = s._payload, g = s._init;
|
|
369
500
|
try {
|
|
370
|
-
return
|
|
501
|
+
return Z(g(p), t, r);
|
|
371
502
|
} catch {
|
|
372
503
|
}
|
|
373
504
|
}
|
|
374
505
|
}
|
|
375
506
|
return "";
|
|
376
507
|
}
|
|
377
|
-
var
|
|
378
|
-
function
|
|
508
|
+
var Q = Object.prototype.hasOwnProperty, Pe = {}, Oe = _.ReactDebugCurrentFrame;
|
|
509
|
+
function ee(e) {
|
|
379
510
|
if (e) {
|
|
380
|
-
var t = e._owner,
|
|
381
|
-
|
|
511
|
+
var t = e._owner, r = Z(e.type, e._source, t ? t.type : null);
|
|
512
|
+
Oe.setExtraStackFrame(r);
|
|
382
513
|
} else
|
|
383
|
-
|
|
514
|
+
Oe.setExtraStackFrame(null);
|
|
384
515
|
}
|
|
385
|
-
function
|
|
516
|
+
function Ze(e, t, r, s, p) {
|
|
386
517
|
{
|
|
387
|
-
var
|
|
388
|
-
for (var
|
|
389
|
-
if (
|
|
390
|
-
var
|
|
518
|
+
var g = Function.call.bind(Q);
|
|
519
|
+
for (var f in e)
|
|
520
|
+
if (g(e, f)) {
|
|
521
|
+
var l = void 0;
|
|
391
522
|
try {
|
|
392
|
-
if (typeof e[
|
|
393
|
-
var
|
|
394
|
-
throw
|
|
523
|
+
if (typeof e[f] != "function") {
|
|
524
|
+
var b = Error((s || "React class") + ": " + r + " type `" + f + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[f] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
|
|
525
|
+
throw b.name = "Invariant Violation", b;
|
|
395
526
|
}
|
|
396
|
-
|
|
397
|
-
} catch (
|
|
398
|
-
|
|
527
|
+
l = e[f](t, f, s, r, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
528
|
+
} catch (R) {
|
|
529
|
+
l = R;
|
|
399
530
|
}
|
|
400
|
-
|
|
531
|
+
l && !(l instanceof Error) && (ee(p), h("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", s || "React class", r, f, typeof l), ee(null)), l instanceof Error && !(l.message in Pe) && (Pe[l.message] = !0, ee(p), h("Failed %s type: %s", r, l.message), ee(null));
|
|
401
532
|
}
|
|
402
533
|
}
|
|
403
534
|
}
|
|
404
|
-
var
|
|
405
|
-
function
|
|
406
|
-
return
|
|
535
|
+
var Qe = Array.isArray;
|
|
536
|
+
function ce(e) {
|
|
537
|
+
return Qe(e);
|
|
407
538
|
}
|
|
408
|
-
function
|
|
539
|
+
function et(e) {
|
|
409
540
|
{
|
|
410
|
-
var t = typeof Symbol == "function" && Symbol.toStringTag,
|
|
411
|
-
return
|
|
541
|
+
var t = typeof Symbol == "function" && Symbol.toStringTag, r = t && e[Symbol.toStringTag] || e.constructor.name || "Object";
|
|
542
|
+
return r;
|
|
412
543
|
}
|
|
413
544
|
}
|
|
414
|
-
function
|
|
545
|
+
function tt(e) {
|
|
415
546
|
try {
|
|
416
|
-
return
|
|
547
|
+
return je(e), !1;
|
|
417
548
|
} catch {
|
|
418
549
|
return !0;
|
|
419
550
|
}
|
|
420
551
|
}
|
|
421
|
-
function
|
|
552
|
+
function je(e) {
|
|
422
553
|
return "" + e;
|
|
423
554
|
}
|
|
424
|
-
function
|
|
425
|
-
if (
|
|
426
|
-
return
|
|
555
|
+
function xe(e) {
|
|
556
|
+
if (tt(e))
|
|
557
|
+
return h("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", et(e)), je(e);
|
|
427
558
|
}
|
|
428
|
-
var
|
|
559
|
+
var Y = _.ReactCurrentOwner, rt = {
|
|
429
560
|
key: !0,
|
|
430
561
|
ref: !0,
|
|
431
562
|
__self: !0,
|
|
432
563
|
__source: !0
|
|
433
|
-
},
|
|
434
|
-
|
|
435
|
-
function
|
|
436
|
-
if (
|
|
564
|
+
}, Ae, ke, ue;
|
|
565
|
+
ue = {};
|
|
566
|
+
function nt(e) {
|
|
567
|
+
if (Q.call(e, "ref")) {
|
|
437
568
|
var t = Object.getOwnPropertyDescriptor(e, "ref").get;
|
|
438
569
|
if (t && t.isReactWarning)
|
|
439
570
|
return !1;
|
|
440
571
|
}
|
|
441
572
|
return e.ref !== void 0;
|
|
442
573
|
}
|
|
443
|
-
function
|
|
444
|
-
if (
|
|
574
|
+
function ot(e) {
|
|
575
|
+
if (Q.call(e, "key")) {
|
|
445
576
|
var t = Object.getOwnPropertyDescriptor(e, "key").get;
|
|
446
577
|
if (t && t.isReactWarning)
|
|
447
578
|
return !1;
|
|
448
579
|
}
|
|
449
580
|
return e.key !== void 0;
|
|
450
581
|
}
|
|
451
|
-
function
|
|
452
|
-
if (typeof e.ref == "string" &&
|
|
453
|
-
var
|
|
454
|
-
|
|
582
|
+
function at(e, t) {
|
|
583
|
+
if (typeof e.ref == "string" && Y.current && t && Y.current.stateNode !== t) {
|
|
584
|
+
var r = k(Y.current.type);
|
|
585
|
+
ue[r] || (h('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', k(Y.current.type), e.ref), ue[r] = !0);
|
|
455
586
|
}
|
|
456
587
|
}
|
|
457
|
-
function
|
|
588
|
+
function st(e, t) {
|
|
458
589
|
{
|
|
459
|
-
var
|
|
460
|
-
|
|
590
|
+
var r = function() {
|
|
591
|
+
Ae || (Ae = !0, h("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", t));
|
|
461
592
|
};
|
|
462
|
-
|
|
463
|
-
get:
|
|
593
|
+
r.isReactWarning = !0, Object.defineProperty(e, "key", {
|
|
594
|
+
get: r,
|
|
464
595
|
configurable: !0
|
|
465
596
|
});
|
|
466
597
|
}
|
|
467
598
|
}
|
|
468
|
-
function
|
|
599
|
+
function it(e, t) {
|
|
469
600
|
{
|
|
470
|
-
var
|
|
471
|
-
|
|
601
|
+
var r = function() {
|
|
602
|
+
ke || (ke = !0, h("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", t));
|
|
472
603
|
};
|
|
473
|
-
|
|
474
|
-
get:
|
|
604
|
+
r.isReactWarning = !0, Object.defineProperty(e, "ref", {
|
|
605
|
+
get: r,
|
|
475
606
|
configurable: !0
|
|
476
607
|
});
|
|
477
608
|
}
|
|
478
609
|
}
|
|
479
|
-
var
|
|
480
|
-
var
|
|
610
|
+
var ct = function(e, t, r, s, p, g, f) {
|
|
611
|
+
var l = {
|
|
481
612
|
// This tag allows us to uniquely identify this as a React Element
|
|
482
|
-
$$typeof:
|
|
613
|
+
$$typeof: o,
|
|
483
614
|
// Built-in properties that belong on the element
|
|
484
615
|
type: e,
|
|
485
616
|
key: t,
|
|
486
|
-
ref:
|
|
487
|
-
props:
|
|
617
|
+
ref: r,
|
|
618
|
+
props: f,
|
|
488
619
|
// Record the component responsible for creating this element.
|
|
489
|
-
_owner:
|
|
620
|
+
_owner: g
|
|
490
621
|
};
|
|
491
|
-
return
|
|
622
|
+
return l._store = {}, Object.defineProperty(l._store, "validated", {
|
|
492
623
|
configurable: !1,
|
|
493
624
|
enumerable: !1,
|
|
494
625
|
writable: !0,
|
|
495
626
|
value: !1
|
|
496
|
-
}), Object.defineProperty(
|
|
627
|
+
}), Object.defineProperty(l, "_self", {
|
|
497
628
|
configurable: !1,
|
|
498
629
|
enumerable: !1,
|
|
499
630
|
writable: !1,
|
|
500
|
-
value:
|
|
501
|
-
}), Object.defineProperty(
|
|
631
|
+
value: s
|
|
632
|
+
}), Object.defineProperty(l, "_source", {
|
|
502
633
|
configurable: !1,
|
|
503
634
|
enumerable: !1,
|
|
504
635
|
writable: !1,
|
|
505
|
-
value:
|
|
506
|
-
}), Object.freeze && (Object.freeze(
|
|
636
|
+
value: p
|
|
637
|
+
}), Object.freeze && (Object.freeze(l.props), Object.freeze(l)), l;
|
|
507
638
|
};
|
|
508
|
-
function
|
|
639
|
+
function ut(e, t, r, s, p) {
|
|
509
640
|
{
|
|
510
|
-
var
|
|
511
|
-
|
|
512
|
-
for (
|
|
513
|
-
|
|
641
|
+
var g, f = {}, l = null, b = null;
|
|
642
|
+
r !== void 0 && (xe(r), l = "" + r), ot(t) && (xe(t.key), l = "" + t.key), nt(t) && (b = t.ref, at(t, p));
|
|
643
|
+
for (g in t)
|
|
644
|
+
Q.call(t, g) && !rt.hasOwnProperty(g) && (f[g] = t[g]);
|
|
514
645
|
if (e && e.defaultProps) {
|
|
515
|
-
var
|
|
516
|
-
for (
|
|
517
|
-
|
|
646
|
+
var R = e.defaultProps;
|
|
647
|
+
for (g in R)
|
|
648
|
+
f[g] === void 0 && (f[g] = R[g]);
|
|
518
649
|
}
|
|
519
|
-
if (
|
|
650
|
+
if (l || b) {
|
|
520
651
|
var E = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
|
|
521
|
-
|
|
652
|
+
l && st(f, E), b && it(f, E);
|
|
522
653
|
}
|
|
523
|
-
return
|
|
654
|
+
return ct(e, l, b, p, s, Y.current, f);
|
|
524
655
|
}
|
|
525
656
|
}
|
|
526
|
-
var
|
|
527
|
-
function
|
|
657
|
+
var le = _.ReactCurrentOwner, De = _.ReactDebugCurrentFrame;
|
|
658
|
+
function U(e) {
|
|
528
659
|
if (e) {
|
|
529
|
-
var t = e._owner,
|
|
530
|
-
|
|
660
|
+
var t = e._owner, r = Z(e.type, e._source, t ? t.type : null);
|
|
661
|
+
De.setExtraStackFrame(r);
|
|
531
662
|
} else
|
|
532
|
-
|
|
663
|
+
De.setExtraStackFrame(null);
|
|
533
664
|
}
|
|
534
|
-
var
|
|
535
|
-
|
|
536
|
-
function
|
|
537
|
-
return typeof e == "object" && e !== null && e.$$typeof ===
|
|
665
|
+
var fe;
|
|
666
|
+
fe = !1;
|
|
667
|
+
function de(e) {
|
|
668
|
+
return typeof e == "object" && e !== null && e.$$typeof === o;
|
|
538
669
|
}
|
|
539
|
-
function
|
|
670
|
+
function Fe() {
|
|
540
671
|
{
|
|
541
|
-
if (
|
|
542
|
-
var e =
|
|
672
|
+
if (le.current) {
|
|
673
|
+
var e = k(le.current.type);
|
|
543
674
|
if (e)
|
|
544
675
|
return `
|
|
545
676
|
|
|
@@ -548,570 +679,249 @@ Check the render method of \`` + e + "`.";
|
|
|
548
679
|
return "";
|
|
549
680
|
}
|
|
550
681
|
}
|
|
551
|
-
function
|
|
682
|
+
function lt(e) {
|
|
552
683
|
return "";
|
|
553
684
|
}
|
|
554
|
-
var
|
|
555
|
-
function
|
|
685
|
+
var Ne = {};
|
|
686
|
+
function ft(e) {
|
|
556
687
|
{
|
|
557
|
-
var t =
|
|
688
|
+
var t = Fe();
|
|
558
689
|
if (!t) {
|
|
559
|
-
var
|
|
560
|
-
|
|
690
|
+
var r = typeof e == "string" ? e : e.displayName || e.name;
|
|
691
|
+
r && (t = `
|
|
561
692
|
|
|
562
|
-
Check the top-level render call using <` +
|
|
693
|
+
Check the top-level render call using <` + r + ">.");
|
|
563
694
|
}
|
|
564
695
|
return t;
|
|
565
696
|
}
|
|
566
697
|
}
|
|
567
|
-
function
|
|
698
|
+
function Le(e, t) {
|
|
568
699
|
{
|
|
569
700
|
if (!e._store || e._store.validated || e.key != null)
|
|
570
701
|
return;
|
|
571
702
|
e._store.validated = !0;
|
|
572
|
-
var
|
|
573
|
-
if (
|
|
703
|
+
var r = ft(t);
|
|
704
|
+
if (Ne[r])
|
|
574
705
|
return;
|
|
575
|
-
|
|
576
|
-
var
|
|
577
|
-
e && e._owner && e._owner !==
|
|
706
|
+
Ne[r] = !0;
|
|
707
|
+
var s = "";
|
|
708
|
+
e && e._owner && e._owner !== le.current && (s = " It was passed a child from " + k(e._owner.type) + "."), U(e), h('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', r, s), U(null);
|
|
578
709
|
}
|
|
579
710
|
}
|
|
580
|
-
function
|
|
711
|
+
function Ie(e, t) {
|
|
581
712
|
{
|
|
582
713
|
if (typeof e != "object")
|
|
583
714
|
return;
|
|
584
|
-
if (
|
|
585
|
-
for (var
|
|
586
|
-
var
|
|
587
|
-
|
|
715
|
+
if (ce(e))
|
|
716
|
+
for (var r = 0; r < e.length; r++) {
|
|
717
|
+
var s = e[r];
|
|
718
|
+
de(s) && Le(s, t);
|
|
588
719
|
}
|
|
589
|
-
else if (
|
|
720
|
+
else if (de(e))
|
|
590
721
|
e._store && (e._store.validated = !0);
|
|
591
722
|
else if (e) {
|
|
592
|
-
var
|
|
593
|
-
if (typeof
|
|
594
|
-
for (var
|
|
595
|
-
|
|
723
|
+
var p = j(e);
|
|
724
|
+
if (typeof p == "function" && p !== e.entries)
|
|
725
|
+
for (var g = p.call(e), f; !(f = g.next()).done; )
|
|
726
|
+
de(f.value) && Le(f.value, t);
|
|
596
727
|
}
|
|
597
728
|
}
|
|
598
729
|
}
|
|
599
|
-
function
|
|
730
|
+
function dt(e) {
|
|
600
731
|
{
|
|
601
732
|
var t = e.type;
|
|
602
733
|
if (t == null || typeof t == "string")
|
|
603
734
|
return;
|
|
604
|
-
var
|
|
735
|
+
var r;
|
|
605
736
|
if (typeof t == "function")
|
|
606
|
-
|
|
607
|
-
else if (typeof t == "object" && (t.$$typeof ===
|
|
737
|
+
r = t.propTypes;
|
|
738
|
+
else if (typeof t == "object" && (t.$$typeof === v || // Note: Memo only checks outer props here.
|
|
608
739
|
// Inner props are checked in the reconciler.
|
|
609
|
-
t.$$typeof ===
|
|
610
|
-
|
|
740
|
+
t.$$typeof === w))
|
|
741
|
+
r = t.propTypes;
|
|
611
742
|
else
|
|
612
743
|
return;
|
|
613
|
-
if (
|
|
614
|
-
var
|
|
615
|
-
|
|
616
|
-
} else if (t.PropTypes !== void 0 && !
|
|
617
|
-
|
|
618
|
-
var
|
|
619
|
-
|
|
744
|
+
if (r) {
|
|
745
|
+
var s = k(t);
|
|
746
|
+
Ze(r, e.props, "prop", s, e);
|
|
747
|
+
} else if (t.PropTypes !== void 0 && !fe) {
|
|
748
|
+
fe = !0;
|
|
749
|
+
var p = k(t);
|
|
750
|
+
h("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", p || "Unknown");
|
|
620
751
|
}
|
|
621
|
-
typeof t.getDefaultProps == "function" && !t.getDefaultProps.isReactClassApproved &&
|
|
752
|
+
typeof t.getDefaultProps == "function" && !t.getDefaultProps.isReactClassApproved && h("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
622
753
|
}
|
|
623
754
|
}
|
|
624
|
-
function
|
|
755
|
+
function pt(e) {
|
|
625
756
|
{
|
|
626
|
-
for (var t = Object.keys(e.props),
|
|
627
|
-
var
|
|
628
|
-
if (
|
|
629
|
-
|
|
757
|
+
for (var t = Object.keys(e.props), r = 0; r < t.length; r++) {
|
|
758
|
+
var s = t[r];
|
|
759
|
+
if (s !== "children" && s !== "key") {
|
|
760
|
+
U(e), h("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", s), U(null);
|
|
630
761
|
break;
|
|
631
762
|
}
|
|
632
763
|
}
|
|
633
|
-
e.ref !== null && (
|
|
764
|
+
e.ref !== null && (U(e), h("Invalid attribute `ref` supplied to `React.Fragment`."), U(null));
|
|
634
765
|
}
|
|
635
766
|
}
|
|
636
|
-
function
|
|
767
|
+
function $e(e, t, r, s, p, g) {
|
|
637
768
|
{
|
|
638
|
-
var
|
|
639
|
-
if (!
|
|
640
|
-
var
|
|
641
|
-
(e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (
|
|
642
|
-
var
|
|
643
|
-
|
|
644
|
-
var
|
|
645
|
-
e === null ?
|
|
769
|
+
var f = G(e);
|
|
770
|
+
if (!f) {
|
|
771
|
+
var l = "";
|
|
772
|
+
(e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (l += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
|
|
773
|
+
var b = lt();
|
|
774
|
+
b ? l += b : l += Fe();
|
|
775
|
+
var R;
|
|
776
|
+
e === null ? R = "null" : ce(e) ? R = "array" : e !== void 0 && e.$$typeof === o ? (R = "<" + (k(e.type) || "Unknown") + " />", l = " Did you accidentally export a JSX literal instead of a component?") : R = typeof e, h("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", R, l);
|
|
646
777
|
}
|
|
647
|
-
var E =
|
|
778
|
+
var E = ut(e, t, r, p, g);
|
|
648
779
|
if (E == null)
|
|
649
780
|
return E;
|
|
650
|
-
if (
|
|
651
|
-
var
|
|
652
|
-
if (
|
|
653
|
-
if (
|
|
654
|
-
if (
|
|
655
|
-
for (var
|
|
656
|
-
|
|
657
|
-
Object.freeze && Object.freeze(
|
|
781
|
+
if (f) {
|
|
782
|
+
var P = t.children;
|
|
783
|
+
if (P !== void 0)
|
|
784
|
+
if (s)
|
|
785
|
+
if (ce(P)) {
|
|
786
|
+
for (var W = 0; W < P.length; W++)
|
|
787
|
+
Ie(P[W], e);
|
|
788
|
+
Object.freeze && Object.freeze(P);
|
|
658
789
|
} else
|
|
659
|
-
|
|
790
|
+
h("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
|
660
791
|
else
|
|
661
|
-
|
|
792
|
+
Ie(P, e);
|
|
662
793
|
}
|
|
663
|
-
return e ===
|
|
794
|
+
return e === u ? pt(E) : dt(E), E;
|
|
664
795
|
}
|
|
665
796
|
}
|
|
666
|
-
function
|
|
667
|
-
return
|
|
797
|
+
function mt(e, t, r) {
|
|
798
|
+
return $e(e, t, r, !0);
|
|
668
799
|
}
|
|
669
|
-
function
|
|
670
|
-
return
|
|
800
|
+
function vt(e, t, r) {
|
|
801
|
+
return $e(e, t, r, !1);
|
|
671
802
|
}
|
|
672
|
-
var
|
|
673
|
-
|
|
674
|
-
}()),
|
|
803
|
+
var gt = vt, yt = mt;
|
|
804
|
+
q.Fragment = u, q.jsx = gt, q.jsxs = yt;
|
|
805
|
+
}()), q;
|
|
675
806
|
}
|
|
676
|
-
process.env.NODE_ENV === "production" ?
|
|
677
|
-
var
|
|
678
|
-
const
|
|
679
|
-
function
|
|
807
|
+
process.env.NODE_ENV === "production" ? ve.exports = Pt() : ve.exports = Ot();
|
|
808
|
+
var He = ve.exports;
|
|
809
|
+
const re = He.jsx, jt = He.Fragment;
|
|
810
|
+
function Wt(n) {
|
|
680
811
|
const {
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
} =
|
|
684
|
-
|
|
685
|
-
pageTypeUpdated: m
|
|
686
|
-
} = r("404");
|
|
687
|
-
return U(async (u) => {
|
|
688
|
-
const l = await u.defaultSession().viewNotFound().setPlacements(o.placements || u.placements.getPlacements()).load();
|
|
689
|
-
d(l, u);
|
|
690
|
-
}, [s, m]), /* @__PURE__ */ i(I, {
|
|
691
|
-
children: /* @__PURE__ */ i("div", {
|
|
692
|
-
className: "nosto_page_type",
|
|
693
|
-
style: {
|
|
694
|
-
display: "none"
|
|
695
|
-
},
|
|
696
|
-
children: "notfound"
|
|
697
|
-
})
|
|
698
|
-
});
|
|
699
|
-
}
|
|
700
|
-
function Dr(o) {
|
|
701
|
-
const {
|
|
702
|
-
recommendationComponent: s,
|
|
703
|
-
useRenderCampaigns: r
|
|
704
|
-
} = x(), {
|
|
705
|
-
renderCampaigns: d,
|
|
706
|
-
pageTypeUpdated: m
|
|
707
|
-
} = r("other");
|
|
708
|
-
return U(async (u) => {
|
|
709
|
-
const l = await u.defaultSession().viewOther().setPlacements(o.placements || u.placements.getPlacements()).load();
|
|
710
|
-
d(l, u);
|
|
711
|
-
}, [s, m]), /* @__PURE__ */ i(I, {
|
|
712
|
-
children: /* @__PURE__ */ i("div", {
|
|
713
|
-
className: "nosto_page_type",
|
|
714
|
-
style: {
|
|
715
|
-
display: "none"
|
|
716
|
-
},
|
|
717
|
-
children: "other"
|
|
718
|
-
})
|
|
719
|
-
});
|
|
720
|
-
}
|
|
721
|
-
function Ir(o) {
|
|
722
|
-
const {
|
|
723
|
-
recommendationComponent: s,
|
|
724
|
-
useRenderCampaigns: r
|
|
725
|
-
} = x(), {
|
|
726
|
-
renderCampaigns: d,
|
|
727
|
-
pageTypeUpdated: m
|
|
728
|
-
} = r("checkout");
|
|
729
|
-
return U(async (u) => {
|
|
730
|
-
const l = await u.defaultSession().viewCart().setPlacements(o.placements || u.placements.getPlacements()).load();
|
|
731
|
-
d(l, u);
|
|
732
|
-
}, [s, m]), /* @__PURE__ */ i(I, {
|
|
733
|
-
children: /* @__PURE__ */ i("div", {
|
|
734
|
-
className: "nosto_page_type",
|
|
735
|
-
style: {
|
|
736
|
-
display: "none"
|
|
737
|
-
},
|
|
738
|
-
children: "cart"
|
|
739
|
-
})
|
|
740
|
-
});
|
|
741
|
-
}
|
|
742
|
-
function Lr(o) {
|
|
743
|
-
const {
|
|
744
|
-
product: s,
|
|
745
|
-
tagging: r,
|
|
746
|
-
placements: d
|
|
747
|
-
} = o, {
|
|
748
|
-
recommendationComponent: m,
|
|
749
|
-
useRenderCampaigns: u
|
|
750
|
-
} = x(), {
|
|
751
|
-
renderCampaigns: l,
|
|
752
|
-
pageTypeUpdated: y
|
|
753
|
-
} = u("product");
|
|
754
|
-
return U(async (n) => {
|
|
755
|
-
const R = await n.defaultSession().viewProduct(s).setPlacements(d || n.placements.getPlacements()).load();
|
|
756
|
-
l(R, n);
|
|
757
|
-
}, [s, m, y], {
|
|
758
|
-
deep: !0
|
|
759
|
-
}), /* @__PURE__ */ q(I, {
|
|
760
|
-
children: [/* @__PURE__ */ i("div", {
|
|
761
|
-
className: "nosto_page_type",
|
|
762
|
-
style: {
|
|
763
|
-
display: "none"
|
|
764
|
-
},
|
|
765
|
-
children: "product"
|
|
766
|
-
}), /* @__PURE__ */ q("div", {
|
|
767
|
-
className: "nosto_product",
|
|
768
|
-
style: {
|
|
769
|
-
display: "none"
|
|
770
|
-
},
|
|
771
|
-
children: [(r == null ? void 0 : r.variationId) && /* @__PURE__ */ i("span", {
|
|
772
|
-
className: "variation_id",
|
|
773
|
-
children: r.variationId
|
|
774
|
-
}), s && /* @__PURE__ */ i("span", {
|
|
775
|
-
className: "product_id",
|
|
776
|
-
children: s
|
|
777
|
-
}), (r == null ? void 0 : r.name) && /* @__PURE__ */ i("span", {
|
|
778
|
-
className: "name",
|
|
779
|
-
children: r.name
|
|
780
|
-
}), (r == null ? void 0 : r.url) && /* @__PURE__ */ i("span", {
|
|
781
|
-
className: "url",
|
|
782
|
-
children: r.url.toString()
|
|
783
|
-
}), (r == null ? void 0 : r.imageUrl) && /* @__PURE__ */ i("span", {
|
|
784
|
-
className: "image_url",
|
|
785
|
-
children: r.imageUrl.toString()
|
|
786
|
-
}), (r == null ? void 0 : r.availability) && /* @__PURE__ */ i("span", {
|
|
787
|
-
className: "availability",
|
|
788
|
-
children: r.availability
|
|
789
|
-
}), (r == null ? void 0 : r.price) && /* @__PURE__ */ i("span", {
|
|
790
|
-
className: "price",
|
|
791
|
-
children: r.price
|
|
792
|
-
}), (r == null ? void 0 : r.listPrice) && /* @__PURE__ */ i("span", {
|
|
793
|
-
className: "list_price",
|
|
794
|
-
children: r.listPrice
|
|
795
|
-
}), (r == null ? void 0 : r.priceCurrencyCode) && /* @__PURE__ */ i("span", {
|
|
796
|
-
className: "price_currency_code",
|
|
797
|
-
children: r.priceCurrencyCode
|
|
798
|
-
}), (r == null ? void 0 : r.brand) && /* @__PURE__ */ i("span", {
|
|
799
|
-
className: "brand",
|
|
800
|
-
children: r.brand
|
|
801
|
-
}), (r == null ? void 0 : r.description) && /* @__PURE__ */ i("span", {
|
|
802
|
-
className: "description",
|
|
803
|
-
children: r.description
|
|
804
|
-
}), (r == null ? void 0 : r.googleCategory) && /* @__PURE__ */ i("span", {
|
|
805
|
-
className: "description",
|
|
806
|
-
children: r.googleCategory
|
|
807
|
-
}), (r == null ? void 0 : r.condition) && /* @__PURE__ */ i("span", {
|
|
808
|
-
className: "condition",
|
|
809
|
-
children: r.condition
|
|
810
|
-
}), (r == null ? void 0 : r.gender) && /* @__PURE__ */ i("span", {
|
|
811
|
-
className: "gender",
|
|
812
|
-
children: r.gender
|
|
813
|
-
}), (r == null ? void 0 : r.ageGroup) && /* @__PURE__ */ i("span", {
|
|
814
|
-
className: "age_group",
|
|
815
|
-
children: r.ageGroup
|
|
816
|
-
}), (r == null ? void 0 : r.gtin) && /* @__PURE__ */ i("span", {
|
|
817
|
-
className: "gtin",
|
|
818
|
-
children: r.gtin
|
|
819
|
-
}), (r == null ? void 0 : r.category) && (r == null ? void 0 : r.category.map((n, R) => /* @__PURE__ */ i("span", {
|
|
820
|
-
className: "category",
|
|
821
|
-
children: n
|
|
822
|
-
}, R))), (r == null ? void 0 : r.tags1) && r.tags1.map((n, R) => /* @__PURE__ */ i("span", {
|
|
823
|
-
className: "tag1",
|
|
824
|
-
children: n
|
|
825
|
-
}, R)), (r == null ? void 0 : r.tags2) && r.tags2.map((n, R) => /* @__PURE__ */ i("span", {
|
|
826
|
-
className: "tag2",
|
|
827
|
-
children: n
|
|
828
|
-
}, R)), (r == null ? void 0 : r.tags3) && r.tags3.map((n, R) => /* @__PURE__ */ i("span", {
|
|
829
|
-
className: "tag3",
|
|
830
|
-
children: n
|
|
831
|
-
}, R)), (r == null ? void 0 : r.ratingValue) && /* @__PURE__ */ i("span", {
|
|
832
|
-
className: "rating_value",
|
|
833
|
-
children: r.ratingValue
|
|
834
|
-
}), (r == null ? void 0 : r.reviewCount) && /* @__PURE__ */ i("span", {
|
|
835
|
-
className: "review_count",
|
|
836
|
-
children: r.reviewCount
|
|
837
|
-
}), (r == null ? void 0 : r.alternateImageUrls) && r.alternateImageUrls.map((n, R) => /* @__PURE__ */ i("span", {
|
|
838
|
-
className: "alternate_image_url",
|
|
839
|
-
children: n.toString()
|
|
840
|
-
}, R)), (r == null ? void 0 : r.customFields) && Object.keys(r.customFields).map((n, R) => r.customFields && r.customFields[n] && /* @__PURE__ */ i("span", {
|
|
841
|
-
className: n,
|
|
842
|
-
children: r.customFields[n]
|
|
843
|
-
}, R)), (r == null ? void 0 : r.skus) && r.skus.map((n, R) => /* @__PURE__ */ q("span", {
|
|
844
|
-
className: "nosto_sku",
|
|
845
|
-
children: [(n == null ? void 0 : n.id) && /* @__PURE__ */ i("span", {
|
|
846
|
-
className: "product_id",
|
|
847
|
-
children: n.id
|
|
848
|
-
}), (n == null ? void 0 : n.name) && /* @__PURE__ */ i("span", {
|
|
849
|
-
className: "name",
|
|
850
|
-
children: n.name
|
|
851
|
-
}), (n == null ? void 0 : n.price) && /* @__PURE__ */ i("span", {
|
|
852
|
-
className: "price",
|
|
853
|
-
children: n.price
|
|
854
|
-
}), (n == null ? void 0 : n.listPrice) && /* @__PURE__ */ i("span", {
|
|
855
|
-
className: "list_price",
|
|
856
|
-
children: n.listPrice
|
|
857
|
-
}), (n == null ? void 0 : n.url) && /* @__PURE__ */ i("span", {
|
|
858
|
-
className: "url",
|
|
859
|
-
children: n.url.toString()
|
|
860
|
-
}), (n == null ? void 0 : n.imageUrl) && /* @__PURE__ */ i("span", {
|
|
861
|
-
className: "image_url",
|
|
862
|
-
children: n.imageUrl.toString()
|
|
863
|
-
}), (n == null ? void 0 : n.gtin) && /* @__PURE__ */ i("span", {
|
|
864
|
-
className: "gtin",
|
|
865
|
-
children: n.gtin
|
|
866
|
-
}), (n == null ? void 0 : n.availability) && /* @__PURE__ */ i("span", {
|
|
867
|
-
className: "availability",
|
|
868
|
-
children: n.availability
|
|
869
|
-
}), (n == null ? void 0 : n.customFields) && Object.keys(n.customFields).map((w, T) => n.customFields && n.customFields[w] && /* @__PURE__ */ i("span", {
|
|
870
|
-
className: w,
|
|
871
|
-
children: n.customFields[w]
|
|
872
|
-
}, T))]
|
|
873
|
-
}, R))]
|
|
874
|
-
})]
|
|
875
|
-
});
|
|
876
|
-
}
|
|
877
|
-
function Ur(o) {
|
|
878
|
-
const {
|
|
879
|
-
category: s,
|
|
880
|
-
placements: r
|
|
881
|
-
} = o, {
|
|
882
|
-
recommendationComponent: d,
|
|
883
|
-
useRenderCampaigns: m
|
|
884
|
-
} = x(), {
|
|
885
|
-
renderCampaigns: u,
|
|
886
|
-
pageTypeUpdated: l
|
|
887
|
-
} = m("home");
|
|
888
|
-
return U(async (y) => {
|
|
889
|
-
const n = await y.defaultSession().viewCategory(s).setPlacements(r || y.placements.getPlacements()).load();
|
|
890
|
-
u(n, y);
|
|
891
|
-
}, [s, d, l]), /* @__PURE__ */ q(I, {
|
|
892
|
-
children: [/* @__PURE__ */ i("div", {
|
|
893
|
-
className: "nosto_page_type",
|
|
894
|
-
style: {
|
|
895
|
-
display: "none"
|
|
896
|
-
},
|
|
897
|
-
children: "category"
|
|
898
|
-
}), /* @__PURE__ */ i("div", {
|
|
899
|
-
className: "nosto_category",
|
|
900
|
-
style: {
|
|
901
|
-
display: "none"
|
|
902
|
-
},
|
|
903
|
-
children: s
|
|
904
|
-
})]
|
|
905
|
-
});
|
|
906
|
-
}
|
|
907
|
-
function $r(o) {
|
|
908
|
-
const {
|
|
909
|
-
query: s,
|
|
910
|
-
placements: r
|
|
911
|
-
} = o, {
|
|
912
|
-
recommendationComponent: d,
|
|
913
|
-
useRenderCampaigns: m
|
|
914
|
-
} = x(), {
|
|
915
|
-
renderCampaigns: u,
|
|
916
|
-
pageTypeUpdated: l
|
|
917
|
-
} = m("search");
|
|
918
|
-
return U(async (y) => {
|
|
919
|
-
const n = await y.defaultSession().viewSearch(s).setPlacements(r || y.placements.getPlacements()).load();
|
|
920
|
-
u(n, y);
|
|
921
|
-
}, [s, d, l]), /* @__PURE__ */ q(I, {
|
|
922
|
-
children: [/* @__PURE__ */ i("div", {
|
|
923
|
-
className: "nosto_page_type",
|
|
924
|
-
style: {
|
|
925
|
-
display: "none"
|
|
926
|
-
},
|
|
927
|
-
children: "search"
|
|
928
|
-
}), /* @__PURE__ */ i("div", {
|
|
929
|
-
className: "nosto_search",
|
|
930
|
-
style: {
|
|
931
|
-
display: "none"
|
|
932
|
-
},
|
|
933
|
-
children: s
|
|
934
|
-
})]
|
|
935
|
-
});
|
|
936
|
-
}
|
|
937
|
-
function K(o) {
|
|
938
|
-
return !o || typeof o != "object" || Nr(o) || jr(o) ? o : Array.isArray(o) ? o.map(K) : Object.keys(o).reduce((s, r) => {
|
|
939
|
-
const d = r[0].toLowerCase() + r.slice(1).replace(/([A-Z]+)/g, (m, u) => "_" + u.toLowerCase());
|
|
940
|
-
return s[d] = K(o[r]), s;
|
|
941
|
-
}, {});
|
|
942
|
-
}
|
|
943
|
-
function Nr(o) {
|
|
944
|
-
return Object.prototype.toString.call(o) === "[object Date]";
|
|
945
|
-
}
|
|
946
|
-
function jr(o) {
|
|
947
|
-
return Object.prototype.toString.call(o) === "[object RegExp]";
|
|
948
|
-
}
|
|
949
|
-
function Vr(o) {
|
|
950
|
-
const {
|
|
951
|
-
order: s,
|
|
952
|
-
placements: r
|
|
953
|
-
} = o, {
|
|
954
|
-
recommendationComponent: d,
|
|
955
|
-
useRenderCampaigns: m
|
|
956
|
-
} = x(), {
|
|
957
|
-
renderCampaigns: u,
|
|
958
|
-
pageTypeUpdated: l
|
|
959
|
-
} = m("order");
|
|
960
|
-
return U(async (y) => {
|
|
961
|
-
const n = await y.defaultSession().addOrder(K(s)).setPlacements(r || y.placements.getPlacements()).load();
|
|
962
|
-
u(n, y);
|
|
963
|
-
}, [d, l]), /* @__PURE__ */ q(I, {
|
|
964
|
-
children: [/* @__PURE__ */ i("div", {
|
|
965
|
-
className: "nosto_page_type",
|
|
966
|
-
style: {
|
|
967
|
-
display: "none"
|
|
968
|
-
},
|
|
969
|
-
children: "order"
|
|
970
|
-
}), /* @__PURE__ */ i("div", {
|
|
971
|
-
className: "nosto_order",
|
|
972
|
-
style: {
|
|
973
|
-
display: "none"
|
|
974
|
-
},
|
|
975
|
-
children: s.purchase.number
|
|
976
|
-
})]
|
|
977
|
-
});
|
|
978
|
-
}
|
|
979
|
-
function Wr(o) {
|
|
980
|
-
const {
|
|
981
|
-
recommendationComponent: s,
|
|
982
|
-
useRenderCampaigns: r
|
|
983
|
-
} = x(), {
|
|
984
|
-
renderCampaigns: d,
|
|
985
|
-
pageTypeUpdated: m
|
|
986
|
-
} = r("home");
|
|
987
|
-
return U(async (u) => {
|
|
988
|
-
const l = await u.defaultSession().viewFrontPage().setPlacements(o.placements || u.placements.getPlacements()).load();
|
|
989
|
-
d(l, u);
|
|
990
|
-
}, [s, m]), /* @__PURE__ */ i(I, {
|
|
991
|
-
children: /* @__PURE__ */ i("div", {
|
|
992
|
-
className: "nosto_page_type",
|
|
993
|
-
style: {
|
|
994
|
-
display: "none"
|
|
995
|
-
},
|
|
996
|
-
children: "front"
|
|
997
|
-
})
|
|
998
|
-
});
|
|
999
|
-
}
|
|
1000
|
-
function Yr(o) {
|
|
1001
|
-
const {
|
|
1002
|
-
id: s,
|
|
1003
|
-
pageType: r
|
|
1004
|
-
} = o;
|
|
1005
|
-
return /* @__PURE__ */ i("div", {
|
|
812
|
+
id: o,
|
|
813
|
+
pageType: a
|
|
814
|
+
} = n;
|
|
815
|
+
return /* @__PURE__ */ re("div", {
|
|
1006
816
|
className: "nosto_element",
|
|
1007
|
-
id:
|
|
1008
|
-
},
|
|
817
|
+
id: o
|
|
818
|
+
}, o + (a || ""));
|
|
1009
819
|
}
|
|
1010
|
-
function
|
|
820
|
+
function Vt(n) {
|
|
1011
821
|
const {
|
|
1012
|
-
account:
|
|
1013
|
-
multiCurrency:
|
|
1014
|
-
host:
|
|
1015
|
-
children:
|
|
1016
|
-
recommendationComponent:
|
|
1017
|
-
shopifyMarkets:
|
|
1018
|
-
} =
|
|
1019
|
-
function
|
|
1020
|
-
return
|
|
822
|
+
account: o,
|
|
823
|
+
multiCurrency: a = !1,
|
|
824
|
+
host: u,
|
|
825
|
+
children: d,
|
|
826
|
+
recommendationComponent: c,
|
|
827
|
+
shopifyMarkets: i
|
|
828
|
+
} = n, [m, v] = B.useState(!1), O = B.useMemo(() => m, [m]), C = a ? n.currentVariation : "", w = Ct(c) ? "JSON_ORIGINAL" : "HTML";
|
|
829
|
+
function A(j) {
|
|
830
|
+
return B.cloneElement(c, {
|
|
1021
831
|
// eslint-disable-next-line react/prop-types
|
|
1022
832
|
nostoRecommendation: j.nostoRecommendation
|
|
1023
833
|
});
|
|
1024
834
|
}
|
|
1025
|
-
const [
|
|
1026
|
-
function
|
|
1027
|
-
const
|
|
1028
|
-
|
|
1029
|
-
|
|
835
|
+
const [F, J] = bt("");
|
|
836
|
+
function ne(j = "") {
|
|
837
|
+
const _ = pe({});
|
|
838
|
+
te(() => {
|
|
839
|
+
F !== j && J(j);
|
|
1030
840
|
}, []);
|
|
1031
|
-
const
|
|
1032
|
-
function
|
|
1033
|
-
if (
|
|
1034
|
-
|
|
841
|
+
const h = j === F;
|
|
842
|
+
function y(T, S) {
|
|
843
|
+
if (w == "HTML")
|
|
844
|
+
S.placements.injectCampaigns(T.recommendations);
|
|
1035
845
|
else {
|
|
1036
|
-
const
|
|
1037
|
-
for (const
|
|
1038
|
-
const
|
|
1039
|
-
|
|
1040
|
-
nostoRecommendation:
|
|
846
|
+
const L = T.campaigns.recommendations;
|
|
847
|
+
for (const I in L) {
|
|
848
|
+
const oe = L[I], z = "#" + I, G = () => document.querySelector(z);
|
|
849
|
+
G() && (_.current[I] || (_.current[I] = _t(G())), _.current[I].render(/* @__PURE__ */ re(A, {
|
|
850
|
+
nostoRecommendation: oe
|
|
1041
851
|
})));
|
|
1042
852
|
}
|
|
1043
853
|
}
|
|
1044
854
|
}
|
|
1045
855
|
return {
|
|
1046
|
-
renderCampaigns:
|
|
1047
|
-
pageTypeUpdated:
|
|
856
|
+
renderCampaigns: y,
|
|
857
|
+
pageTypeUpdated: h
|
|
1048
858
|
};
|
|
1049
859
|
}
|
|
1050
|
-
return
|
|
1051
|
-
var j,
|
|
1052
|
-
if (window.nostojs || (window.nostojs = (
|
|
1053
|
-
(window.nostojs.q = window.nostojs.q || []).push(
|
|
1054
|
-
}, window.nostojs((
|
|
1055
|
-
const
|
|
1056
|
-
|
|
1057
|
-
var
|
|
1058
|
-
typeof jest < "u" && ((
|
|
860
|
+
return te(() => {
|
|
861
|
+
var j, _, h;
|
|
862
|
+
if (window.nostojs || (window.nostojs = (y) => {
|
|
863
|
+
(window.nostojs.q = window.nostojs.q || []).push(y);
|
|
864
|
+
}, window.nostojs((y) => y.setAutoLoad(!1))), !document.querySelectorAll("[nosto-client-script]").length && !i) {
|
|
865
|
+
const y = document.createElement("script");
|
|
866
|
+
y.type = "text/javascript", y.src = "//" + (u || "connect.nosto.com") + "/include/" + o, y.async = !0, y.setAttribute("nosto-client-script", ""), y.onload = () => {
|
|
867
|
+
var T;
|
|
868
|
+
typeof jest < "u" && ((T = window.nosto) == null || T.reload({
|
|
1059
869
|
site: "localhost"
|
|
1060
|
-
})),
|
|
1061
|
-
}, document.body.appendChild(
|
|
1062
|
-
}
|
|
1063
|
-
if (
|
|
1064
|
-
const
|
|
1065
|
-
if (!
|
|
1066
|
-
|
|
1067
|
-
const
|
|
1068
|
-
|
|
1069
|
-
var
|
|
1070
|
-
typeof jest < "u" && ((
|
|
870
|
+
})), v(!0);
|
|
871
|
+
}, document.body.appendChild(y);
|
|
872
|
+
}
|
|
873
|
+
if (i) {
|
|
874
|
+
const y = document.querySelector("[nosto-client-script]"), T = document.querySelector("#nosto-sandbox");
|
|
875
|
+
if (!y || (y == null ? void 0 : y.getAttribute("nosto-language")) !== (i == null ? void 0 : i.language) || (y == null ? void 0 : y.getAttribute("nosto-market-id")) !== (i == null ? void 0 : i.marketId)) {
|
|
876
|
+
m && v(!1), (j = y == null ? void 0 : y.parentNode) == null || j.removeChild(y), (_ = T == null ? void 0 : T.parentNode) == null || _.removeChild(T);
|
|
877
|
+
const S = document.createElement("script");
|
|
878
|
+
S.type = "text/javascript", S.src = "//" + (u || "connect.nosto.com") + `/script/shopify/market/nosto.js?merchant=${o}&market=${i.marketId || ""}&locale=${((h = i == null ? void 0 : i.language) == null ? void 0 : h.toLowerCase()) || ""}`, S.async = !0, S.setAttribute("nosto-client-script", ""), S.setAttribute("nosto-language", (i == null ? void 0 : i.language) || ""), S.setAttribute("nosto-market-id", String(i == null ? void 0 : i.marketId)), S.onload = () => {
|
|
879
|
+
var L;
|
|
880
|
+
typeof jest < "u" && ((L = window.nosto) == null || L.reload({
|
|
1071
881
|
site: "localhost"
|
|
1072
|
-
})),
|
|
1073
|
-
}, document.body.appendChild(
|
|
882
|
+
})), v(!0);
|
|
883
|
+
}, document.body.appendChild(S);
|
|
1074
884
|
}
|
|
1075
885
|
}
|
|
1076
|
-
}, [
|
|
886
|
+
}, [m, i]), /* @__PURE__ */ re(qe.Provider, {
|
|
1077
887
|
value: {
|
|
1078
|
-
account:
|
|
1079
|
-
clientScriptLoaded:
|
|
1080
|
-
currentVariation:
|
|
1081
|
-
responseMode:
|
|
1082
|
-
recommendationComponent:
|
|
1083
|
-
useRenderCampaigns:
|
|
1084
|
-
pageType:
|
|
888
|
+
account: o,
|
|
889
|
+
clientScriptLoaded: O,
|
|
890
|
+
currentVariation: C,
|
|
891
|
+
responseMode: w,
|
|
892
|
+
recommendationComponent: c,
|
|
893
|
+
useRenderCampaigns: ne,
|
|
894
|
+
pageType: F
|
|
1085
895
|
},
|
|
1086
|
-
children:
|
|
896
|
+
children: d
|
|
1087
897
|
});
|
|
1088
898
|
}
|
|
1089
|
-
function
|
|
899
|
+
function Yt(n) {
|
|
1090
900
|
const {
|
|
1091
|
-
cart:
|
|
1092
|
-
customer:
|
|
1093
|
-
} =
|
|
1094
|
-
clientScriptLoaded:
|
|
901
|
+
cart: o,
|
|
902
|
+
customer: a
|
|
903
|
+
} = n ?? {}, {
|
|
904
|
+
clientScriptLoaded: u
|
|
1095
905
|
} = x();
|
|
1096
|
-
return
|
|
1097
|
-
const
|
|
1098
|
-
|
|
1099
|
-
|
|
906
|
+
return Be(() => {
|
|
907
|
+
const d = o ? H(o) : void 0, c = a ? H(a) : void 0;
|
|
908
|
+
u && window.nostojs((i) => {
|
|
909
|
+
i.defaultSession().setResponseMode("HTML").setCart(d).setCustomer(c).viewOther().load();
|
|
1100
910
|
});
|
|
1101
|
-
}, [
|
|
911
|
+
}, [u, o, a]), /* @__PURE__ */ re(jt, {});
|
|
1102
912
|
}
|
|
1103
913
|
export {
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
914
|
+
kt as Nosto404,
|
|
915
|
+
Lt as NostoCategory,
|
|
916
|
+
Ft as NostoCheckout,
|
|
917
|
+
qe as NostoContext,
|
|
918
|
+
Ut as NostoHome,
|
|
919
|
+
$t as NostoOrder,
|
|
920
|
+
Dt as NostoOther,
|
|
921
|
+
Wt as NostoPlacement,
|
|
922
|
+
Nt as NostoProduct,
|
|
923
|
+
Vt as NostoProvider,
|
|
924
|
+
It as NostoSearch,
|
|
925
|
+
Yt as NostoSession,
|
|
1116
926
|
x as useNostoContext
|
|
1117
927
|
};
|