@nosto/nosto-react 1.0.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/dist/index.d.ts +86 -760
- package/dist/index.es.js +538 -569
- package/dist/index.umd.js +9 -9
- package/package.json +3 -1
- package/src/components/Nosto404.tsx +4 -9
- package/src/components/NostoCategory.tsx +4 -7
- package/src/components/NostoCheckout.tsx +4 -9
- package/src/components/NostoHome.tsx +4 -8
- package/src/components/NostoOrder.tsx +5 -7
- package/src/components/NostoOther.tsx +4 -9
- package/src/components/NostoProduct.tsx +4 -8
- package/src/components/NostoProvider.tsx +12 -68
- package/src/components/NostoSearch.tsx +4 -7
- package/src/components/NostoSession.tsx +1 -2
- 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 +2 -0
- package/src/types.ts +73 -1
- package/src/components/context.ts +0 -55
- package/src/utils/hooks.ts +0 -41
package/dist/index.es.js
CHANGED
|
@@ -1,193 +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 n = ht(qe);
|
|
17
|
-
if (!n)
|
|
18
|
-
throw new Error("No nosto context found");
|
|
19
|
-
return n;
|
|
20
|
-
}
|
|
21
|
-
const We = (n) => String(n) === "[object Object]";
|
|
22
|
-
function Ve(n) {
|
|
23
|
-
if (!We(n))
|
|
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 o =
|
|
7
|
+
const o = r.constructor;
|
|
26
8
|
if (o === void 0)
|
|
27
9
|
return !0;
|
|
28
10
|
const a = o.prototype;
|
|
29
|
-
return !(!
|
|
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 a = Object.entries(
|
|
40
|
-
return a.length !== Object.keys(o).length ? !1 : a.every(([
|
|
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
|
|
46
|
-
}
|
|
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
|
-
}
|
|
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
|
-
});
|
|
57
|
-
}, [u, d, c, ...o ?? []]);
|
|
58
|
-
}
|
|
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;
|
|
26
|
+
function Ie(r, o) {
|
|
27
|
+
return se(r, Ct(o));
|
|
148
28
|
}
|
|
149
|
-
function
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
return o[u] = H(n[a]), o;
|
|
153
|
-
}, {});
|
|
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]);
|
|
154
32
|
}
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
}
|
|
161
|
-
function
|
|
162
|
-
const
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
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;
|
|
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;
|
|
176
44
|
}
|
|
177
|
-
function
|
|
178
|
-
const {
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
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;
|
|
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);
|
|
50
|
+
});
|
|
51
|
+
}, [s, d, p, ...o ?? []]);
|
|
189
52
|
}
|
|
190
|
-
var
|
|
53
|
+
var ie = { exports: {} }, V = {};
|
|
191
54
|
/**
|
|
192
55
|
* @license React
|
|
193
56
|
* react-jsx-runtime.production.min.js
|
|
@@ -197,25 +60,25 @@ var ve = { exports: {} }, M = {};
|
|
|
197
60
|
* This source code is licensed under the MIT license found in the
|
|
198
61
|
* LICENSE file in the root directory of this source tree.
|
|
199
62
|
*/
|
|
200
|
-
var
|
|
63
|
+
var Ne;
|
|
201
64
|
function Pt() {
|
|
202
|
-
if (
|
|
203
|
-
return
|
|
204
|
-
|
|
205
|
-
var
|
|
206
|
-
function
|
|
207
|
-
var
|
|
208
|
-
|
|
209
|
-
for (
|
|
210
|
-
|
|
211
|
-
if (
|
|
212
|
-
for (
|
|
213
|
-
|
|
214
|
-
return { $$typeof: o, type:
|
|
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 };
|
|
215
78
|
}
|
|
216
|
-
return
|
|
79
|
+
return V.Fragment = a, V.jsx = l, V.jsxs = l, V;
|
|
217
80
|
}
|
|
218
|
-
var
|
|
81
|
+
var Y = {};
|
|
219
82
|
/**
|
|
220
83
|
* @license React
|
|
221
84
|
* react-jsx-runtime.development.js
|
|
@@ -225,91 +88,91 @@ var q = {};
|
|
|
225
88
|
* This source code is licensed under the MIT license found in the
|
|
226
89
|
* LICENSE file in the root directory of this source tree.
|
|
227
90
|
*/
|
|
228
|
-
var
|
|
229
|
-
function
|
|
230
|
-
return
|
|
231
|
-
var
|
|
232
|
-
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) {
|
|
233
96
|
if (e === null || typeof e != "object")
|
|
234
97
|
return null;
|
|
235
|
-
var t =
|
|
98
|
+
var t = I && e[I] || e[v];
|
|
236
99
|
return typeof t == "function" ? t : null;
|
|
237
100
|
}
|
|
238
|
-
var
|
|
239
|
-
function
|
|
101
|
+
var b = r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
102
|
+
function _(e) {
|
|
240
103
|
{
|
|
241
|
-
for (var t = arguments.length,
|
|
242
|
-
|
|
243
|
-
|
|
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);
|
|
244
107
|
}
|
|
245
108
|
}
|
|
246
|
-
function
|
|
109
|
+
function Ve(e, t, n) {
|
|
247
110
|
{
|
|
248
|
-
var
|
|
249
|
-
|
|
250
|
-
var
|
|
251
|
-
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);
|
|
252
115
|
});
|
|
253
|
-
|
|
116
|
+
m.unshift("Warning: " + t), Function.prototype.apply.call(console[e], console, m);
|
|
254
117
|
}
|
|
255
118
|
}
|
|
256
|
-
var
|
|
257
|
-
|
|
258
|
-
function
|
|
259
|
-
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
|
|
260
123
|
// types supported by any Flight configuration anywhere since
|
|
261
124
|
// we don't know which Flight build this will end up being used
|
|
262
125
|
// with.
|
|
263
|
-
e.$$typeof ===
|
|
126
|
+
e.$$typeof === ue || e.getModuleId !== void 0));
|
|
264
127
|
}
|
|
265
|
-
function
|
|
266
|
-
var
|
|
267
|
-
if (
|
|
268
|
-
return
|
|
269
|
-
var
|
|
270
|
-
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;
|
|
271
134
|
}
|
|
272
|
-
function
|
|
135
|
+
function le(e) {
|
|
273
136
|
return e.displayName || "Context";
|
|
274
137
|
}
|
|
275
|
-
function
|
|
138
|
+
function j(e) {
|
|
276
139
|
if (e == null)
|
|
277
140
|
return null;
|
|
278
|
-
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")
|
|
279
142
|
return e.displayName || e.name || null;
|
|
280
143
|
if (typeof e == "string")
|
|
281
144
|
return e;
|
|
282
145
|
switch (e) {
|
|
283
|
-
case
|
|
146
|
+
case s:
|
|
284
147
|
return "Fragment";
|
|
285
148
|
case a:
|
|
286
149
|
return "Portal";
|
|
287
|
-
case
|
|
150
|
+
case p:
|
|
288
151
|
return "Profiler";
|
|
289
152
|
case d:
|
|
290
153
|
return "StrictMode";
|
|
291
|
-
case
|
|
154
|
+
case S:
|
|
292
155
|
return "Suspense";
|
|
293
|
-
case
|
|
156
|
+
case R:
|
|
294
157
|
return "SuspenseList";
|
|
295
158
|
}
|
|
296
159
|
if (typeof e == "object")
|
|
297
160
|
switch (e.$$typeof) {
|
|
298
|
-
case
|
|
161
|
+
case g:
|
|
299
162
|
var t = e;
|
|
300
|
-
return
|
|
301
|
-
case
|
|
302
|
-
var
|
|
303
|
-
return
|
|
304
|
-
case
|
|
305
|
-
return
|
|
306
|
-
case
|
|
307
|
-
var
|
|
308
|
-
return
|
|
309
|
-
case
|
|
310
|
-
var
|
|
163
|
+
return le(t) + ".Consumer";
|
|
164
|
+
case l:
|
|
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;
|
|
311
174
|
try {
|
|
312
|
-
return
|
|
175
|
+
return j(u(m));
|
|
313
176
|
} catch {
|
|
314
177
|
return null;
|
|
315
178
|
}
|
|
@@ -317,18 +180,18 @@ function Ot() {
|
|
|
317
180
|
}
|
|
318
181
|
return null;
|
|
319
182
|
}
|
|
320
|
-
var
|
|
321
|
-
function
|
|
183
|
+
var F = Object.assign, $ = 0, fe, de, me, pe, ve, ge, ye;
|
|
184
|
+
function he() {
|
|
322
185
|
}
|
|
323
|
-
|
|
186
|
+
he.__reactDisabledLog = !0;
|
|
324
187
|
function Je() {
|
|
325
188
|
{
|
|
326
|
-
if (
|
|
327
|
-
|
|
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;
|
|
328
191
|
var e = {
|
|
329
192
|
configurable: !0,
|
|
330
193
|
enumerable: !0,
|
|
331
|
-
value:
|
|
194
|
+
value: he,
|
|
332
195
|
writable: !0
|
|
333
196
|
};
|
|
334
197
|
Object.defineProperties(console, {
|
|
@@ -341,336 +204,336 @@ function Ot() {
|
|
|
341
204
|
groupEnd: e
|
|
342
205
|
});
|
|
343
206
|
}
|
|
344
|
-
|
|
207
|
+
$++;
|
|
345
208
|
}
|
|
346
209
|
}
|
|
347
|
-
function
|
|
210
|
+
function Ge() {
|
|
348
211
|
{
|
|
349
|
-
if (
|
|
212
|
+
if ($--, $ === 0) {
|
|
350
213
|
var e = {
|
|
351
214
|
configurable: !0,
|
|
352
215
|
enumerable: !0,
|
|
353
216
|
writable: !0
|
|
354
217
|
};
|
|
355
218
|
Object.defineProperties(console, {
|
|
356
|
-
log:
|
|
357
|
-
value:
|
|
219
|
+
log: F({}, e, {
|
|
220
|
+
value: fe
|
|
358
221
|
}),
|
|
359
|
-
info:
|
|
360
|
-
value:
|
|
222
|
+
info: F({}, e, {
|
|
223
|
+
value: de
|
|
361
224
|
}),
|
|
362
|
-
warn:
|
|
363
|
-
value:
|
|
225
|
+
warn: F({}, e, {
|
|
226
|
+
value: me
|
|
364
227
|
}),
|
|
365
|
-
error:
|
|
366
|
-
value:
|
|
228
|
+
error: F({}, e, {
|
|
229
|
+
value: pe
|
|
367
230
|
}),
|
|
368
|
-
group:
|
|
369
|
-
value:
|
|
231
|
+
group: F({}, e, {
|
|
232
|
+
value: ve
|
|
370
233
|
}),
|
|
371
|
-
groupCollapsed:
|
|
372
|
-
value:
|
|
234
|
+
groupCollapsed: F({}, e, {
|
|
235
|
+
value: ge
|
|
373
236
|
}),
|
|
374
|
-
groupEnd:
|
|
375
|
-
value:
|
|
237
|
+
groupEnd: F({}, e, {
|
|
238
|
+
value: ye
|
|
376
239
|
})
|
|
377
240
|
});
|
|
378
241
|
}
|
|
379
|
-
|
|
242
|
+
$ < 0 && _("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
380
243
|
}
|
|
381
244
|
}
|
|
382
|
-
var
|
|
383
|
-
function
|
|
245
|
+
var K = b.ReactCurrentDispatcher, X;
|
|
246
|
+
function q(e, t, n) {
|
|
384
247
|
{
|
|
385
|
-
if (
|
|
248
|
+
if (X === void 0)
|
|
386
249
|
try {
|
|
387
250
|
throw Error();
|
|
388
|
-
} catch (
|
|
389
|
-
var
|
|
390
|
-
|
|
251
|
+
} catch (f) {
|
|
252
|
+
var i = f.stack.trim().match(/\n( *(at )?)/);
|
|
253
|
+
X = i && i[1] || "";
|
|
391
254
|
}
|
|
392
255
|
return `
|
|
393
|
-
` +
|
|
256
|
+
` + X + e;
|
|
394
257
|
}
|
|
395
258
|
}
|
|
396
|
-
var
|
|
259
|
+
var Z = !1, B;
|
|
397
260
|
{
|
|
398
|
-
var
|
|
399
|
-
|
|
261
|
+
var Ke = typeof WeakMap == "function" ? WeakMap : Map;
|
|
262
|
+
B = new Ke();
|
|
400
263
|
}
|
|
401
|
-
function
|
|
402
|
-
if (!e ||
|
|
264
|
+
function Ee(e, t) {
|
|
265
|
+
if (!e || Z)
|
|
403
266
|
return "";
|
|
404
267
|
{
|
|
405
|
-
var
|
|
406
|
-
if (
|
|
407
|
-
return
|
|
268
|
+
var n = B.get(e);
|
|
269
|
+
if (n !== void 0)
|
|
270
|
+
return n;
|
|
408
271
|
}
|
|
409
|
-
var
|
|
410
|
-
|
|
411
|
-
var
|
|
272
|
+
var i;
|
|
273
|
+
Z = !0;
|
|
274
|
+
var f = Error.prepareStackTrace;
|
|
412
275
|
Error.prepareStackTrace = void 0;
|
|
413
|
-
var
|
|
414
|
-
|
|
276
|
+
var m;
|
|
277
|
+
m = K.current, K.current = null, Je();
|
|
415
278
|
try {
|
|
416
279
|
if (t) {
|
|
417
|
-
var
|
|
280
|
+
var u = function() {
|
|
418
281
|
throw Error();
|
|
419
282
|
};
|
|
420
|
-
if (Object.defineProperty(
|
|
283
|
+
if (Object.defineProperty(u.prototype, "props", {
|
|
421
284
|
set: function() {
|
|
422
285
|
throw Error();
|
|
423
286
|
}
|
|
424
287
|
}), typeof Reflect == "object" && Reflect.construct) {
|
|
425
288
|
try {
|
|
426
|
-
Reflect.construct(
|
|
427
|
-
} catch (
|
|
428
|
-
|
|
289
|
+
Reflect.construct(u, []);
|
|
290
|
+
} catch (x) {
|
|
291
|
+
i = x;
|
|
429
292
|
}
|
|
430
|
-
Reflect.construct(e, [],
|
|
293
|
+
Reflect.construct(e, [], u);
|
|
431
294
|
} else {
|
|
432
295
|
try {
|
|
433
|
-
|
|
434
|
-
} catch (
|
|
435
|
-
|
|
296
|
+
u.call();
|
|
297
|
+
} catch (x) {
|
|
298
|
+
i = x;
|
|
436
299
|
}
|
|
437
|
-
e.call(
|
|
300
|
+
e.call(u.prototype);
|
|
438
301
|
}
|
|
439
302
|
} else {
|
|
440
303
|
try {
|
|
441
304
|
throw Error();
|
|
442
|
-
} catch (
|
|
443
|
-
|
|
305
|
+
} catch (x) {
|
|
306
|
+
i = x;
|
|
444
307
|
}
|
|
445
308
|
e();
|
|
446
309
|
}
|
|
447
|
-
} catch (
|
|
448
|
-
if (
|
|
449
|
-
for (var
|
|
450
|
-
`),
|
|
451
|
-
`),
|
|
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]; )
|
|
452
315
|
E--;
|
|
453
|
-
for (;
|
|
454
|
-
if (
|
|
455
|
-
if (
|
|
316
|
+
for (; h >= 1 && E >= 0; h--, E--)
|
|
317
|
+
if (c[h] !== w[E]) {
|
|
318
|
+
if (h !== 1 || E !== 1)
|
|
456
319
|
do
|
|
457
|
-
if (
|
|
320
|
+
if (h--, E--, E < 0 || c[h] !== w[E]) {
|
|
458
321
|
var P = `
|
|
459
|
-
` +
|
|
460
|
-
return e.displayName && P.includes("<anonymous>") && (P = P.replace("<anonymous>", e.displayName)), typeof e == "function" &&
|
|
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;
|
|
461
324
|
}
|
|
462
|
-
while (
|
|
325
|
+
while (h >= 1 && E >= 0);
|
|
463
326
|
break;
|
|
464
327
|
}
|
|
465
328
|
}
|
|
466
329
|
} finally {
|
|
467
|
-
|
|
330
|
+
Z = !1, K.current = m, Ge(), Error.prepareStackTrace = f;
|
|
468
331
|
}
|
|
469
|
-
var
|
|
470
|
-
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;
|
|
471
334
|
}
|
|
472
|
-
function
|
|
473
|
-
return
|
|
335
|
+
function Xe(e, t, n) {
|
|
336
|
+
return Ee(e, !1);
|
|
474
337
|
}
|
|
475
|
-
function
|
|
338
|
+
function Ze(e) {
|
|
476
339
|
var t = e.prototype;
|
|
477
340
|
return !!(t && t.isReactComponent);
|
|
478
341
|
}
|
|
479
|
-
function
|
|
342
|
+
function z(e, t, n) {
|
|
480
343
|
if (e == null)
|
|
481
344
|
return "";
|
|
482
345
|
if (typeof e == "function")
|
|
483
|
-
return
|
|
346
|
+
return Ee(e, Ze(e));
|
|
484
347
|
if (typeof e == "string")
|
|
485
|
-
return
|
|
348
|
+
return q(e);
|
|
486
349
|
switch (e) {
|
|
487
|
-
case
|
|
488
|
-
return
|
|
489
|
-
case
|
|
490
|
-
return
|
|
350
|
+
case S:
|
|
351
|
+
return q("Suspense");
|
|
352
|
+
case R:
|
|
353
|
+
return q("SuspenseList");
|
|
491
354
|
}
|
|
492
355
|
if (typeof e == "object")
|
|
493
356
|
switch (e.$$typeof) {
|
|
494
|
-
case
|
|
495
|
-
return
|
|
496
|
-
case
|
|
497
|
-
return
|
|
498
|
-
case
|
|
499
|
-
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;
|
|
500
363
|
try {
|
|
501
|
-
return
|
|
364
|
+
return z(m(f), t, n);
|
|
502
365
|
} catch {
|
|
503
366
|
}
|
|
504
367
|
}
|
|
505
368
|
}
|
|
506
369
|
return "";
|
|
507
370
|
}
|
|
508
|
-
var
|
|
509
|
-
function
|
|
371
|
+
var H = Object.prototype.hasOwnProperty, Re = {}, _e = b.ReactDebugCurrentFrame;
|
|
372
|
+
function J(e) {
|
|
510
373
|
if (e) {
|
|
511
|
-
var t = e._owner,
|
|
512
|
-
|
|
374
|
+
var t = e._owner, n = z(e.type, e._source, t ? t.type : null);
|
|
375
|
+
_e.setExtraStackFrame(n);
|
|
513
376
|
} else
|
|
514
|
-
|
|
377
|
+
_e.setExtraStackFrame(null);
|
|
515
378
|
}
|
|
516
|
-
function
|
|
379
|
+
function Qe(e, t, n, i, f) {
|
|
517
380
|
{
|
|
518
|
-
var
|
|
519
|
-
for (var
|
|
520
|
-
if (
|
|
521
|
-
var
|
|
381
|
+
var m = Function.call.bind(H);
|
|
382
|
+
for (var u in e)
|
|
383
|
+
if (m(e, u)) {
|
|
384
|
+
var c = void 0;
|
|
522
385
|
try {
|
|
523
|
-
if (typeof e[
|
|
524
|
-
var
|
|
525
|
-
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;
|
|
526
389
|
}
|
|
527
|
-
|
|
528
|
-
} catch (
|
|
529
|
-
|
|
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;
|
|
530
393
|
}
|
|
531
|
-
|
|
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));
|
|
532
395
|
}
|
|
533
396
|
}
|
|
534
397
|
}
|
|
535
|
-
var
|
|
536
|
-
function
|
|
537
|
-
return
|
|
398
|
+
var et = Array.isArray;
|
|
399
|
+
function Q(e) {
|
|
400
|
+
return et(e);
|
|
538
401
|
}
|
|
539
|
-
function
|
|
402
|
+
function tt(e) {
|
|
540
403
|
{
|
|
541
|
-
var t = typeof Symbol == "function" && Symbol.toStringTag,
|
|
542
|
-
return
|
|
404
|
+
var t = typeof Symbol == "function" && Symbol.toStringTag, n = t && e[Symbol.toStringTag] || e.constructor.name || "Object";
|
|
405
|
+
return n;
|
|
543
406
|
}
|
|
544
407
|
}
|
|
545
|
-
function
|
|
408
|
+
function rt(e) {
|
|
546
409
|
try {
|
|
547
|
-
return
|
|
410
|
+
return be(e), !1;
|
|
548
411
|
} catch {
|
|
549
412
|
return !0;
|
|
550
413
|
}
|
|
551
414
|
}
|
|
552
|
-
function
|
|
415
|
+
function be(e) {
|
|
553
416
|
return "" + e;
|
|
554
417
|
}
|
|
555
|
-
function
|
|
556
|
-
if (
|
|
557
|
-
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);
|
|
558
421
|
}
|
|
559
|
-
var
|
|
422
|
+
var W = b.ReactCurrentOwner, nt = {
|
|
560
423
|
key: !0,
|
|
561
424
|
ref: !0,
|
|
562
425
|
__self: !0,
|
|
563
426
|
__source: !0
|
|
564
|
-
},
|
|
565
|
-
|
|
566
|
-
function
|
|
567
|
-
if (
|
|
427
|
+
}, Ce, Pe, ee;
|
|
428
|
+
ee = {};
|
|
429
|
+
function ot(e) {
|
|
430
|
+
if (H.call(e, "ref")) {
|
|
568
431
|
var t = Object.getOwnPropertyDescriptor(e, "ref").get;
|
|
569
432
|
if (t && t.isReactWarning)
|
|
570
433
|
return !1;
|
|
571
434
|
}
|
|
572
435
|
return e.ref !== void 0;
|
|
573
436
|
}
|
|
574
|
-
function
|
|
575
|
-
if (
|
|
437
|
+
function at(e) {
|
|
438
|
+
if (H.call(e, "key")) {
|
|
576
439
|
var t = Object.getOwnPropertyDescriptor(e, "key").get;
|
|
577
440
|
if (t && t.isReactWarning)
|
|
578
441
|
return !1;
|
|
579
442
|
}
|
|
580
443
|
return e.key !== void 0;
|
|
581
444
|
}
|
|
582
|
-
function
|
|
583
|
-
if (typeof e.ref == "string" &&
|
|
584
|
-
var
|
|
585
|
-
|
|
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);
|
|
586
449
|
}
|
|
587
450
|
}
|
|
588
451
|
function st(e, t) {
|
|
589
452
|
{
|
|
590
|
-
var
|
|
591
|
-
|
|
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));
|
|
592
455
|
};
|
|
593
|
-
|
|
594
|
-
get:
|
|
456
|
+
n.isReactWarning = !0, Object.defineProperty(e, "key", {
|
|
457
|
+
get: n,
|
|
595
458
|
configurable: !0
|
|
596
459
|
});
|
|
597
460
|
}
|
|
598
461
|
}
|
|
599
|
-
function
|
|
462
|
+
function ct(e, t) {
|
|
600
463
|
{
|
|
601
|
-
var
|
|
602
|
-
|
|
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));
|
|
603
466
|
};
|
|
604
|
-
|
|
605
|
-
get:
|
|
467
|
+
n.isReactWarning = !0, Object.defineProperty(e, "ref", {
|
|
468
|
+
get: n,
|
|
606
469
|
configurable: !0
|
|
607
470
|
});
|
|
608
471
|
}
|
|
609
472
|
}
|
|
610
|
-
var
|
|
611
|
-
var
|
|
473
|
+
var ut = function(e, t, n, i, f, m, u) {
|
|
474
|
+
var c = {
|
|
612
475
|
// This tag allows us to uniquely identify this as a React Element
|
|
613
476
|
$$typeof: o,
|
|
614
477
|
// Built-in properties that belong on the element
|
|
615
478
|
type: e,
|
|
616
479
|
key: t,
|
|
617
|
-
ref:
|
|
618
|
-
props:
|
|
480
|
+
ref: n,
|
|
481
|
+
props: u,
|
|
619
482
|
// Record the component responsible for creating this element.
|
|
620
|
-
_owner:
|
|
483
|
+
_owner: m
|
|
621
484
|
};
|
|
622
|
-
return
|
|
485
|
+
return c._store = {}, Object.defineProperty(c._store, "validated", {
|
|
623
486
|
configurable: !1,
|
|
624
487
|
enumerable: !1,
|
|
625
488
|
writable: !0,
|
|
626
489
|
value: !1
|
|
627
|
-
}), Object.defineProperty(
|
|
490
|
+
}), Object.defineProperty(c, "_self", {
|
|
628
491
|
configurable: !1,
|
|
629
492
|
enumerable: !1,
|
|
630
493
|
writable: !1,
|
|
631
|
-
value:
|
|
632
|
-
}), Object.defineProperty(
|
|
494
|
+
value: i
|
|
495
|
+
}), Object.defineProperty(c, "_source", {
|
|
633
496
|
configurable: !1,
|
|
634
497
|
enumerable: !1,
|
|
635
498
|
writable: !1,
|
|
636
|
-
value:
|
|
637
|
-
}), Object.freeze && (Object.freeze(
|
|
499
|
+
value: f
|
|
500
|
+
}), Object.freeze && (Object.freeze(c.props), Object.freeze(c)), c;
|
|
638
501
|
};
|
|
639
|
-
function
|
|
502
|
+
function lt(e, t, n, i, f) {
|
|
640
503
|
{
|
|
641
|
-
var
|
|
642
|
-
|
|
643
|
-
for (
|
|
644
|
-
|
|
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]);
|
|
645
508
|
if (e && e.defaultProps) {
|
|
646
|
-
var
|
|
647
|
-
for (
|
|
648
|
-
|
|
509
|
+
var h = e.defaultProps;
|
|
510
|
+
for (m in h)
|
|
511
|
+
u[m] === void 0 && (u[m] = h[m]);
|
|
649
512
|
}
|
|
650
|
-
if (
|
|
513
|
+
if (c || w) {
|
|
651
514
|
var E = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
|
|
652
|
-
|
|
515
|
+
c && st(u, E), w && ct(u, E);
|
|
653
516
|
}
|
|
654
|
-
return
|
|
517
|
+
return ut(e, c, w, f, i, W.current, u);
|
|
655
518
|
}
|
|
656
519
|
}
|
|
657
|
-
var
|
|
658
|
-
function
|
|
520
|
+
var te = b.ReactCurrentOwner, Se = b.ReactDebugCurrentFrame;
|
|
521
|
+
function N(e) {
|
|
659
522
|
if (e) {
|
|
660
|
-
var t = e._owner,
|
|
661
|
-
|
|
523
|
+
var t = e._owner, n = z(e.type, e._source, t ? t.type : null);
|
|
524
|
+
Se.setExtraStackFrame(n);
|
|
662
525
|
} else
|
|
663
|
-
|
|
526
|
+
Se.setExtraStackFrame(null);
|
|
664
527
|
}
|
|
665
|
-
var
|
|
666
|
-
|
|
667
|
-
function
|
|
528
|
+
var re;
|
|
529
|
+
re = !1;
|
|
530
|
+
function ne(e) {
|
|
668
531
|
return typeof e == "object" && e !== null && e.$$typeof === o;
|
|
669
532
|
}
|
|
670
|
-
function
|
|
533
|
+
function Oe() {
|
|
671
534
|
{
|
|
672
|
-
if (
|
|
673
|
-
var e =
|
|
535
|
+
if (te.current) {
|
|
536
|
+
var e = j(te.current.type);
|
|
674
537
|
if (e)
|
|
675
538
|
return `
|
|
676
539
|
|
|
@@ -679,249 +542,355 @@ Check the render method of \`` + e + "`.";
|
|
|
679
542
|
return "";
|
|
680
543
|
}
|
|
681
544
|
}
|
|
682
|
-
function
|
|
545
|
+
function ft(e) {
|
|
683
546
|
return "";
|
|
684
547
|
}
|
|
685
|
-
var
|
|
686
|
-
function
|
|
548
|
+
var Te = {};
|
|
549
|
+
function dt(e) {
|
|
687
550
|
{
|
|
688
|
-
var t =
|
|
551
|
+
var t = Oe();
|
|
689
552
|
if (!t) {
|
|
690
|
-
var
|
|
691
|
-
|
|
553
|
+
var n = typeof e == "string" ? e : e.displayName || e.name;
|
|
554
|
+
n && (t = `
|
|
692
555
|
|
|
693
|
-
Check the top-level render call using <` +
|
|
556
|
+
Check the top-level render call using <` + n + ">.");
|
|
694
557
|
}
|
|
695
558
|
return t;
|
|
696
559
|
}
|
|
697
560
|
}
|
|
698
|
-
function
|
|
561
|
+
function je(e, t) {
|
|
699
562
|
{
|
|
700
563
|
if (!e._store || e._store.validated || e.key != null)
|
|
701
564
|
return;
|
|
702
565
|
e._store.validated = !0;
|
|
703
|
-
var
|
|
704
|
-
if (
|
|
566
|
+
var n = dt(t);
|
|
567
|
+
if (Te[n])
|
|
705
568
|
return;
|
|
706
|
-
|
|
707
|
-
var
|
|
708
|
-
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);
|
|
709
572
|
}
|
|
710
573
|
}
|
|
711
|
-
function
|
|
574
|
+
function xe(e, t) {
|
|
712
575
|
{
|
|
713
576
|
if (typeof e != "object")
|
|
714
577
|
return;
|
|
715
|
-
if (
|
|
716
|
-
for (var
|
|
717
|
-
var
|
|
718
|
-
|
|
578
|
+
if (Q(e))
|
|
579
|
+
for (var n = 0; n < e.length; n++) {
|
|
580
|
+
var i = e[n];
|
|
581
|
+
ne(i) && je(i, t);
|
|
719
582
|
}
|
|
720
|
-
else if (
|
|
583
|
+
else if (ne(e))
|
|
721
584
|
e._store && (e._store.validated = !0);
|
|
722
585
|
else if (e) {
|
|
723
|
-
var
|
|
724
|
-
if (typeof
|
|
725
|
-
for (var
|
|
726
|
-
|
|
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);
|
|
727
590
|
}
|
|
728
591
|
}
|
|
729
592
|
}
|
|
730
|
-
function
|
|
593
|
+
function mt(e) {
|
|
731
594
|
{
|
|
732
595
|
var t = e.type;
|
|
733
596
|
if (t == null || typeof t == "string")
|
|
734
597
|
return;
|
|
735
|
-
var
|
|
598
|
+
var n;
|
|
736
599
|
if (typeof t == "function")
|
|
737
|
-
|
|
738
|
-
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.
|
|
739
602
|
// Inner props are checked in the reconciler.
|
|
740
|
-
t.$$typeof ===
|
|
741
|
-
|
|
603
|
+
t.$$typeof === C))
|
|
604
|
+
n = t.propTypes;
|
|
742
605
|
else
|
|
743
606
|
return;
|
|
744
|
-
if (
|
|
745
|
-
var
|
|
746
|
-
|
|
747
|
-
} else if (t.PropTypes !== void 0 && !
|
|
748
|
-
|
|
749
|
-
var
|
|
750
|
-
|
|
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");
|
|
751
614
|
}
|
|
752
|
-
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.");
|
|
753
616
|
}
|
|
754
617
|
}
|
|
755
618
|
function pt(e) {
|
|
756
619
|
{
|
|
757
|
-
for (var t = Object.keys(e.props),
|
|
758
|
-
var
|
|
759
|
-
if (
|
|
760
|
-
|
|
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);
|
|
761
624
|
break;
|
|
762
625
|
}
|
|
763
626
|
}
|
|
764
|
-
e.ref !== null && (
|
|
627
|
+
e.ref !== null && (N(e), _("Invalid attribute `ref` supplied to `React.Fragment`."), N(null));
|
|
765
628
|
}
|
|
766
629
|
}
|
|
767
|
-
function
|
|
630
|
+
function Ae(e, t, n, i, f, m) {
|
|
768
631
|
{
|
|
769
|
-
var
|
|
770
|
-
if (!
|
|
771
|
-
var
|
|
772
|
-
(e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (
|
|
773
|
-
var
|
|
774
|
-
|
|
775
|
-
var
|
|
776
|
-
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);
|
|
777
640
|
}
|
|
778
|
-
var E =
|
|
641
|
+
var E = lt(e, t, n, f, m);
|
|
779
642
|
if (E == null)
|
|
780
643
|
return E;
|
|
781
|
-
if (
|
|
644
|
+
if (u) {
|
|
782
645
|
var P = t.children;
|
|
783
646
|
if (P !== void 0)
|
|
784
|
-
if (
|
|
785
|
-
if (
|
|
786
|
-
for (var
|
|
787
|
-
|
|
647
|
+
if (i)
|
|
648
|
+
if (Q(P)) {
|
|
649
|
+
for (var L = 0; L < P.length; L++)
|
|
650
|
+
xe(P[L], e);
|
|
788
651
|
Object.freeze && Object.freeze(P);
|
|
789
652
|
} else
|
|
790
|
-
|
|
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.");
|
|
791
654
|
else
|
|
792
|
-
|
|
655
|
+
xe(P, e);
|
|
793
656
|
}
|
|
794
|
-
return e ===
|
|
657
|
+
return e === s ? pt(E) : mt(E), E;
|
|
795
658
|
}
|
|
796
659
|
}
|
|
797
|
-
function
|
|
798
|
-
return
|
|
660
|
+
function vt(e, t, n) {
|
|
661
|
+
return Ae(e, t, n, !0);
|
|
662
|
+
}
|
|
663
|
+
function gt(e, t, n) {
|
|
664
|
+
return Ae(e, t, n, !1);
|
|
799
665
|
}
|
|
800
|
-
|
|
801
|
-
|
|
666
|
+
var yt = gt, ht = vt;
|
|
667
|
+
Y.Fragment = s, Y.jsx = yt, Y.jsxs = ht;
|
|
668
|
+
}()), Y;
|
|
669
|
+
}
|
|
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
|
|
677
|
+
});
|
|
678
|
+
}
|
|
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);
|
|
684
|
+
});
|
|
685
|
+
}
|
|
686
|
+
function k() {
|
|
687
|
+
const {
|
|
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
|
+
})));
|
|
802
704
|
}
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
705
|
+
}
|
|
706
|
+
return {
|
|
707
|
+
renderCampaigns: s
|
|
708
|
+
};
|
|
709
|
+
}
|
|
710
|
+
function Nt(r) {
|
|
711
|
+
const {
|
|
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;
|
|
718
|
+
}
|
|
719
|
+
function Lt(r) {
|
|
720
|
+
const {
|
|
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;
|
|
727
|
+
}
|
|
728
|
+
function It(r) {
|
|
729
|
+
const {
|
|
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;
|
|
761
|
+
}
|
|
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;
|
|
778
|
+
}, {});
|
|
806
779
|
}
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
function
|
|
780
|
+
function xt(r) {
|
|
781
|
+
return Object.prototype.toString.call(r) === "[object Date]";
|
|
782
|
+
}
|
|
783
|
+
function At(r) {
|
|
784
|
+
return Object.prototype.toString.call(r) === "[object RegExp]";
|
|
785
|
+
}
|
|
786
|
+
function Yt(r) {
|
|
787
|
+
const {
|
|
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;
|
|
799
|
+
}
|
|
800
|
+
function Mt(r) {
|
|
801
|
+
const {
|
|
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;
|
|
808
|
+
}
|
|
809
|
+
function Ut(r) {
|
|
811
810
|
const {
|
|
812
811
|
id: o,
|
|
813
812
|
pageType: a
|
|
814
|
-
} =
|
|
815
|
-
return /* @__PURE__ */
|
|
813
|
+
} = r;
|
|
814
|
+
return /* @__PURE__ */ G("div", {
|
|
816
815
|
className: "nosto_element",
|
|
817
816
|
id: o
|
|
818
817
|
}, o + (a || ""));
|
|
819
818
|
}
|
|
820
|
-
function
|
|
819
|
+
function kt() {
|
|
820
|
+
return typeof window.nosto < "u";
|
|
821
|
+
}
|
|
822
|
+
function qt(r) {
|
|
821
823
|
const {
|
|
822
824
|
account: o,
|
|
823
825
|
multiCurrency: a = !1,
|
|
824
|
-
host:
|
|
826
|
+
host: s,
|
|
825
827
|
children: d,
|
|
826
|
-
recommendationComponent:
|
|
827
|
-
shopifyMarkets:
|
|
828
|
-
} =
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
})
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
function ne(j = "") {
|
|
837
|
-
const _ = pe({});
|
|
838
|
-
te(() => {
|
|
839
|
-
F !== j && J(j);
|
|
840
|
-
}, []);
|
|
841
|
-
const h = j === F;
|
|
842
|
-
function y(T, S) {
|
|
843
|
-
if (w == "HTML")
|
|
844
|
-
S.placements.injectCampaigns(T.recommendations);
|
|
845
|
-
else {
|
|
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
|
|
851
|
-
})));
|
|
852
|
-
}
|
|
853
|
-
}
|
|
854
|
-
}
|
|
855
|
-
return {
|
|
856
|
-
renderCampaigns: y,
|
|
857
|
-
pageTypeUpdated: h
|
|
858
|
-
};
|
|
859
|
-
}
|
|
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 = () => {
|
|
828
|
+
recommendationComponent: p,
|
|
829
|
+
shopifyMarkets: l
|
|
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 = () => {
|
|
867
838
|
var T;
|
|
868
839
|
typeof jest < "u" && ((T = window.nosto) == null || T.reload({
|
|
869
840
|
site: "localhost"
|
|
870
|
-
})),
|
|
871
|
-
}, document.body.appendChild(
|
|
872
|
-
}
|
|
873
|
-
if (
|
|
874
|
-
const
|
|
875
|
-
if (!
|
|
876
|
-
|
|
877
|
-
const
|
|
878
|
-
|
|
879
|
-
var
|
|
880
|
-
typeof jest < "u" && ((
|
|
841
|
+
})), y(!0);
|
|
842
|
+
}, document.body.appendChild(v);
|
|
843
|
+
}
|
|
844
|
+
if (l) {
|
|
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({
|
|
881
852
|
site: "localhost"
|
|
882
|
-
})),
|
|
883
|
-
}, document.body.appendChild(
|
|
853
|
+
})), y(!0);
|
|
854
|
+
}, document.body.appendChild(b);
|
|
884
855
|
}
|
|
885
856
|
}
|
|
886
|
-
}, [
|
|
857
|
+
}, [g, l]), /* @__PURE__ */ G($e.Provider, {
|
|
887
858
|
value: {
|
|
888
859
|
account: o,
|
|
889
|
-
clientScriptLoaded:
|
|
890
|
-
currentVariation:
|
|
891
|
-
responseMode:
|
|
892
|
-
recommendationComponent:
|
|
893
|
-
useRenderCampaigns: ne,
|
|
894
|
-
pageType: F
|
|
860
|
+
clientScriptLoaded: S,
|
|
861
|
+
currentVariation: R,
|
|
862
|
+
responseMode: C,
|
|
863
|
+
recommendationComponent: p
|
|
895
864
|
},
|
|
896
865
|
children: d
|
|
897
866
|
});
|
|
898
867
|
}
|
|
899
|
-
function
|
|
868
|
+
function Bt(r) {
|
|
900
869
|
const {
|
|
901
870
|
cart: o,
|
|
902
871
|
customer: a
|
|
903
|
-
} =
|
|
904
|
-
clientScriptLoaded:
|
|
905
|
-
} =
|
|
906
|
-
return
|
|
907
|
-
const d = o ?
|
|
908
|
-
|
|
909
|
-
|
|
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();
|
|
910
879
|
});
|
|
911
|
-
}, [
|
|
880
|
+
}, [s, o, a]), /* @__PURE__ */ G(Ot, {});
|
|
912
881
|
}
|
|
913
882
|
export {
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
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
|
|
927
896
|
};
|