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