@shopify/app-bridge-react 4.1.3 → 4.1.4
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/CHANGELOG.md +7 -0
- package/package.json +10 -10
- package/dist/index.cjs +0 -28
- package/dist/index.cjs.map +0 -1
- package/dist/index.d.ts +0 -115
- package/dist/index.js +0 -740
- package/dist/index.js.map +0 -1
package/dist/index.js
DELETED
|
@@ -1,740 +0,0 @@
|
|
|
1
|
-
import Se, { forwardRef as xe, useState as je, Children as fr, useEffect as j } from "react";
|
|
2
|
-
import cr from "react-dom";
|
|
3
|
-
var ee = { exports: {} }, L = {};
|
|
4
|
-
/**
|
|
5
|
-
* @license React
|
|
6
|
-
* react-jsx-runtime.production.min.js
|
|
7
|
-
*
|
|
8
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
9
|
-
*
|
|
10
|
-
* This source code is licensed under the MIT license found in the
|
|
11
|
-
* LICENSE file in the root directory of this source tree.
|
|
12
|
-
*/
|
|
13
|
-
var Oe;
|
|
14
|
-
function dr() {
|
|
15
|
-
if (Oe)
|
|
16
|
-
return L;
|
|
17
|
-
Oe = 1;
|
|
18
|
-
var R = Se, v = Symbol.for("react.element"), y = Symbol.for("react.fragment"), c = Object.prototype.hasOwnProperty, C = R.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, x = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
19
|
-
function h(a, d, b) {
|
|
20
|
-
var m, T = {}, w = null, E = null;
|
|
21
|
-
b !== void 0 && (w = "" + b), d.key !== void 0 && (w = "" + d.key), d.ref !== void 0 && (E = d.ref);
|
|
22
|
-
for (m in d)
|
|
23
|
-
c.call(d, m) && !x.hasOwnProperty(m) && (T[m] = d[m]);
|
|
24
|
-
if (a && a.defaultProps)
|
|
25
|
-
for (m in d = a.defaultProps, d)
|
|
26
|
-
T[m] === void 0 && (T[m] = d[m]);
|
|
27
|
-
return { $$typeof: v, type: a, key: w, ref: E, props: T, _owner: C.current };
|
|
28
|
-
}
|
|
29
|
-
return L.Fragment = y, L.jsx = h, L.jsxs = h, L;
|
|
30
|
-
}
|
|
31
|
-
var $ = {};
|
|
32
|
-
/**
|
|
33
|
-
* @license React
|
|
34
|
-
* react-jsx-runtime.development.js
|
|
35
|
-
*
|
|
36
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
37
|
-
*
|
|
38
|
-
* This source code is licensed under the MIT license found in the
|
|
39
|
-
* LICENSE file in the root directory of this source tree.
|
|
40
|
-
*/
|
|
41
|
-
var Pe;
|
|
42
|
-
function vr() {
|
|
43
|
-
return Pe || (Pe = 1, process.env.NODE_ENV !== "production" && function() {
|
|
44
|
-
var R = Se, v = Symbol.for("react.element"), y = Symbol.for("react.portal"), c = Symbol.for("react.fragment"), C = Symbol.for("react.strict_mode"), x = Symbol.for("react.profiler"), h = Symbol.for("react.provider"), a = Symbol.for("react.context"), d = Symbol.for("react.forward_ref"), b = Symbol.for("react.suspense"), m = Symbol.for("react.suspense_list"), T = Symbol.for("react.memo"), w = Symbol.for("react.lazy"), E = Symbol.for("react.offscreen"), k = Symbol.iterator, W = "@@iterator";
|
|
45
|
-
function Y(e) {
|
|
46
|
-
if (e === null || typeof e != "object")
|
|
47
|
-
return null;
|
|
48
|
-
var r = k && e[k] || e[W];
|
|
49
|
-
return typeof r == "function" ? r : null;
|
|
50
|
-
}
|
|
51
|
-
var O = R.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
52
|
-
function p(e) {
|
|
53
|
-
{
|
|
54
|
-
for (var r = arguments.length, t = new Array(r > 1 ? r - 1 : 0), n = 1; n < r; n++)
|
|
55
|
-
t[n - 1] = arguments[n];
|
|
56
|
-
ke("error", e, t);
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
function ke(e, r, t) {
|
|
60
|
-
{
|
|
61
|
-
var n = O.ReactDebugCurrentFrame, u = n.getStackAddendum();
|
|
62
|
-
u !== "" && (r += "%s", t = t.concat([u]));
|
|
63
|
-
var s = t.map(function(o) {
|
|
64
|
-
return String(o);
|
|
65
|
-
});
|
|
66
|
-
s.unshift("Warning: " + r), Function.prototype.apply.call(console[e], console, s);
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
var De = !1, Ae = !1, Fe = !1, Ie = !1, Ne = !1, te;
|
|
70
|
-
te = Symbol.for("react.module.reference");
|
|
71
|
-
function Le(e) {
|
|
72
|
-
return !!(typeof e == "string" || typeof e == "function" || e === c || e === x || Ne || e === C || e === b || e === m || Ie || e === E || De || Ae || Fe || typeof e == "object" && e !== null && (e.$$typeof === w || e.$$typeof === T || e.$$typeof === h || e.$$typeof === a || e.$$typeof === d || // This needs to include all possible module reference object
|
|
73
|
-
// types supported by any Flight configuration anywhere since
|
|
74
|
-
// we don't know which Flight build this will end up being used
|
|
75
|
-
// with.
|
|
76
|
-
e.$$typeof === te || e.getModuleId !== void 0));
|
|
77
|
-
}
|
|
78
|
-
function $e(e, r, t) {
|
|
79
|
-
var n = e.displayName;
|
|
80
|
-
if (n)
|
|
81
|
-
return n;
|
|
82
|
-
var u = r.displayName || r.name || "";
|
|
83
|
-
return u !== "" ? t + "(" + u + ")" : t;
|
|
84
|
-
}
|
|
85
|
-
function ne(e) {
|
|
86
|
-
return e.displayName || "Context";
|
|
87
|
-
}
|
|
88
|
-
function P(e) {
|
|
89
|
-
if (e == null)
|
|
90
|
-
return null;
|
|
91
|
-
if (typeof e.tag == "number" && p("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof e == "function")
|
|
92
|
-
return e.displayName || e.name || null;
|
|
93
|
-
if (typeof e == "string")
|
|
94
|
-
return e;
|
|
95
|
-
switch (e) {
|
|
96
|
-
case c:
|
|
97
|
-
return "Fragment";
|
|
98
|
-
case y:
|
|
99
|
-
return "Portal";
|
|
100
|
-
case x:
|
|
101
|
-
return "Profiler";
|
|
102
|
-
case C:
|
|
103
|
-
return "StrictMode";
|
|
104
|
-
case b:
|
|
105
|
-
return "Suspense";
|
|
106
|
-
case m:
|
|
107
|
-
return "SuspenseList";
|
|
108
|
-
}
|
|
109
|
-
if (typeof e == "object")
|
|
110
|
-
switch (e.$$typeof) {
|
|
111
|
-
case a:
|
|
112
|
-
var r = e;
|
|
113
|
-
return ne(r) + ".Consumer";
|
|
114
|
-
case h:
|
|
115
|
-
var t = e;
|
|
116
|
-
return ne(t._context) + ".Provider";
|
|
117
|
-
case d:
|
|
118
|
-
return $e(e, e.render, "ForwardRef");
|
|
119
|
-
case T:
|
|
120
|
-
var n = e.displayName || null;
|
|
121
|
-
return n !== null ? n : P(e.type) || "Memo";
|
|
122
|
-
case w: {
|
|
123
|
-
var u = e, s = u._payload, o = u._init;
|
|
124
|
-
try {
|
|
125
|
-
return P(o(s));
|
|
126
|
-
} catch {
|
|
127
|
-
return null;
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
return null;
|
|
132
|
-
}
|
|
133
|
-
var D = Object.assign, I = 0, ae, ie, oe, ue, se, le, fe;
|
|
134
|
-
function ce() {
|
|
135
|
-
}
|
|
136
|
-
ce.__reactDisabledLog = !0;
|
|
137
|
-
function We() {
|
|
138
|
-
{
|
|
139
|
-
if (I === 0) {
|
|
140
|
-
ae = console.log, ie = console.info, oe = console.warn, ue = console.error, se = console.group, le = console.groupCollapsed, fe = console.groupEnd;
|
|
141
|
-
var e = {
|
|
142
|
-
configurable: !0,
|
|
143
|
-
enumerable: !0,
|
|
144
|
-
value: ce,
|
|
145
|
-
writable: !0
|
|
146
|
-
};
|
|
147
|
-
Object.defineProperties(console, {
|
|
148
|
-
info: e,
|
|
149
|
-
log: e,
|
|
150
|
-
warn: e,
|
|
151
|
-
error: e,
|
|
152
|
-
group: e,
|
|
153
|
-
groupCollapsed: e,
|
|
154
|
-
groupEnd: e
|
|
155
|
-
});
|
|
156
|
-
}
|
|
157
|
-
I++;
|
|
158
|
-
}
|
|
159
|
-
}
|
|
160
|
-
function Ye() {
|
|
161
|
-
{
|
|
162
|
-
if (I--, I === 0) {
|
|
163
|
-
var e = {
|
|
164
|
-
configurable: !0,
|
|
165
|
-
enumerable: !0,
|
|
166
|
-
writable: !0
|
|
167
|
-
};
|
|
168
|
-
Object.defineProperties(console, {
|
|
169
|
-
log: D({}, e, {
|
|
170
|
-
value: ae
|
|
171
|
-
}),
|
|
172
|
-
info: D({}, e, {
|
|
173
|
-
value: ie
|
|
174
|
-
}),
|
|
175
|
-
warn: D({}, e, {
|
|
176
|
-
value: oe
|
|
177
|
-
}),
|
|
178
|
-
error: D({}, e, {
|
|
179
|
-
value: ue
|
|
180
|
-
}),
|
|
181
|
-
group: D({}, e, {
|
|
182
|
-
value: se
|
|
183
|
-
}),
|
|
184
|
-
groupCollapsed: D({}, e, {
|
|
185
|
-
value: le
|
|
186
|
-
}),
|
|
187
|
-
groupEnd: D({}, e, {
|
|
188
|
-
value: fe
|
|
189
|
-
})
|
|
190
|
-
});
|
|
191
|
-
}
|
|
192
|
-
I < 0 && p("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
193
|
-
}
|
|
194
|
-
}
|
|
195
|
-
var J = O.ReactCurrentDispatcher, G;
|
|
196
|
-
function M(e, r, t) {
|
|
197
|
-
{
|
|
198
|
-
if (G === void 0)
|
|
199
|
-
try {
|
|
200
|
-
throw Error();
|
|
201
|
-
} catch (u) {
|
|
202
|
-
var n = u.stack.trim().match(/\n( *(at )?)/);
|
|
203
|
-
G = n && n[1] || "";
|
|
204
|
-
}
|
|
205
|
-
return `
|
|
206
|
-
` + G + e;
|
|
207
|
-
}
|
|
208
|
-
}
|
|
209
|
-
var z = !1, B;
|
|
210
|
-
{
|
|
211
|
-
var Me = typeof WeakMap == "function" ? WeakMap : Map;
|
|
212
|
-
B = new Me();
|
|
213
|
-
}
|
|
214
|
-
function de(e, r) {
|
|
215
|
-
if (!e || z)
|
|
216
|
-
return "";
|
|
217
|
-
{
|
|
218
|
-
var t = B.get(e);
|
|
219
|
-
if (t !== void 0)
|
|
220
|
-
return t;
|
|
221
|
-
}
|
|
222
|
-
var n;
|
|
223
|
-
z = !0;
|
|
224
|
-
var u = Error.prepareStackTrace;
|
|
225
|
-
Error.prepareStackTrace = void 0;
|
|
226
|
-
var s;
|
|
227
|
-
s = J.current, J.current = null, We();
|
|
228
|
-
try {
|
|
229
|
-
if (r) {
|
|
230
|
-
var o = function() {
|
|
231
|
-
throw Error();
|
|
232
|
-
};
|
|
233
|
-
if (Object.defineProperty(o.prototype, "props", {
|
|
234
|
-
set: function() {
|
|
235
|
-
throw Error();
|
|
236
|
-
}
|
|
237
|
-
}), typeof Reflect == "object" && Reflect.construct) {
|
|
238
|
-
try {
|
|
239
|
-
Reflect.construct(o, []);
|
|
240
|
-
} catch (S) {
|
|
241
|
-
n = S;
|
|
242
|
-
}
|
|
243
|
-
Reflect.construct(e, [], o);
|
|
244
|
-
} else {
|
|
245
|
-
try {
|
|
246
|
-
o.call();
|
|
247
|
-
} catch (S) {
|
|
248
|
-
n = S;
|
|
249
|
-
}
|
|
250
|
-
e.call(o.prototype);
|
|
251
|
-
}
|
|
252
|
-
} else {
|
|
253
|
-
try {
|
|
254
|
-
throw Error();
|
|
255
|
-
} catch (S) {
|
|
256
|
-
n = S;
|
|
257
|
-
}
|
|
258
|
-
e();
|
|
259
|
-
}
|
|
260
|
-
} catch (S) {
|
|
261
|
-
if (S && n && typeof S.stack == "string") {
|
|
262
|
-
for (var i = S.stack.split(`
|
|
263
|
-
`), g = n.stack.split(`
|
|
264
|
-
`), l = i.length - 1, f = g.length - 1; l >= 1 && f >= 0 && i[l] !== g[f]; )
|
|
265
|
-
f--;
|
|
266
|
-
for (; l >= 1 && f >= 0; l--, f--)
|
|
267
|
-
if (i[l] !== g[f]) {
|
|
268
|
-
if (l !== 1 || f !== 1)
|
|
269
|
-
do
|
|
270
|
-
if (l--, f--, f < 0 || i[l] !== g[f]) {
|
|
271
|
-
var _ = `
|
|
272
|
-
` + i[l].replace(" at new ", " at ");
|
|
273
|
-
return e.displayName && _.includes("<anonymous>") && (_ = _.replace("<anonymous>", e.displayName)), typeof e == "function" && B.set(e, _), _;
|
|
274
|
-
}
|
|
275
|
-
while (l >= 1 && f >= 0);
|
|
276
|
-
break;
|
|
277
|
-
}
|
|
278
|
-
}
|
|
279
|
-
} finally {
|
|
280
|
-
z = !1, J.current = s, Ye(), Error.prepareStackTrace = u;
|
|
281
|
-
}
|
|
282
|
-
var F = e ? e.displayName || e.name : "", we = F ? M(F) : "";
|
|
283
|
-
return typeof e == "function" && B.set(e, we), we;
|
|
284
|
-
}
|
|
285
|
-
function Be(e, r, t) {
|
|
286
|
-
return de(e, !1);
|
|
287
|
-
}
|
|
288
|
-
function Ve(e) {
|
|
289
|
-
var r = e.prototype;
|
|
290
|
-
return !!(r && r.isReactComponent);
|
|
291
|
-
}
|
|
292
|
-
function V(e, r, t) {
|
|
293
|
-
if (e == null)
|
|
294
|
-
return "";
|
|
295
|
-
if (typeof e == "function")
|
|
296
|
-
return de(e, Ve(e));
|
|
297
|
-
if (typeof e == "string")
|
|
298
|
-
return M(e);
|
|
299
|
-
switch (e) {
|
|
300
|
-
case b:
|
|
301
|
-
return M("Suspense");
|
|
302
|
-
case m:
|
|
303
|
-
return M("SuspenseList");
|
|
304
|
-
}
|
|
305
|
-
if (typeof e == "object")
|
|
306
|
-
switch (e.$$typeof) {
|
|
307
|
-
case d:
|
|
308
|
-
return Be(e.render);
|
|
309
|
-
case T:
|
|
310
|
-
return V(e.type, r, t);
|
|
311
|
-
case w: {
|
|
312
|
-
var n = e, u = n._payload, s = n._init;
|
|
313
|
-
try {
|
|
314
|
-
return V(s(u), r, t);
|
|
315
|
-
} catch {
|
|
316
|
-
}
|
|
317
|
-
}
|
|
318
|
-
}
|
|
319
|
-
return "";
|
|
320
|
-
}
|
|
321
|
-
var U = Object.prototype.hasOwnProperty, ve = {}, pe = O.ReactDebugCurrentFrame;
|
|
322
|
-
function q(e) {
|
|
323
|
-
if (e) {
|
|
324
|
-
var r = e._owner, t = V(e.type, e._source, r ? r.type : null);
|
|
325
|
-
pe.setExtraStackFrame(t);
|
|
326
|
-
} else
|
|
327
|
-
pe.setExtraStackFrame(null);
|
|
328
|
-
}
|
|
329
|
-
function Ue(e, r, t, n, u) {
|
|
330
|
-
{
|
|
331
|
-
var s = Function.call.bind(U);
|
|
332
|
-
for (var o in e)
|
|
333
|
-
if (s(e, o)) {
|
|
334
|
-
var i = void 0;
|
|
335
|
-
try {
|
|
336
|
-
if (typeof e[o] != "function") {
|
|
337
|
-
var g = Error((n || "React class") + ": " + t + " type `" + o + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[o] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
|
|
338
|
-
throw g.name = "Invariant Violation", g;
|
|
339
|
-
}
|
|
340
|
-
i = e[o](r, o, n, t, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
341
|
-
} catch (l) {
|
|
342
|
-
i = l;
|
|
343
|
-
}
|
|
344
|
-
i && !(i instanceof Error) && (q(u), p("%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).", n || "React class", t, o, typeof i), q(null)), i instanceof Error && !(i.message in ve) && (ve[i.message] = !0, q(u), p("Failed %s type: %s", t, i.message), q(null));
|
|
345
|
-
}
|
|
346
|
-
}
|
|
347
|
-
}
|
|
348
|
-
var qe = Array.isArray;
|
|
349
|
-
function K(e) {
|
|
350
|
-
return qe(e);
|
|
351
|
-
}
|
|
352
|
-
function Je(e) {
|
|
353
|
-
{
|
|
354
|
-
var r = typeof Symbol == "function" && Symbol.toStringTag, t = r && e[Symbol.toStringTag] || e.constructor.name || "Object";
|
|
355
|
-
return t;
|
|
356
|
-
}
|
|
357
|
-
}
|
|
358
|
-
function Ge(e) {
|
|
359
|
-
try {
|
|
360
|
-
return ye(e), !1;
|
|
361
|
-
} catch {
|
|
362
|
-
return !0;
|
|
363
|
-
}
|
|
364
|
-
}
|
|
365
|
-
function ye(e) {
|
|
366
|
-
return "" + e;
|
|
367
|
-
}
|
|
368
|
-
function he(e) {
|
|
369
|
-
if (Ge(e))
|
|
370
|
-
return p("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Je(e)), ye(e);
|
|
371
|
-
}
|
|
372
|
-
var N = O.ReactCurrentOwner, ze = {
|
|
373
|
-
key: !0,
|
|
374
|
-
ref: !0,
|
|
375
|
-
__self: !0,
|
|
376
|
-
__source: !0
|
|
377
|
-
}, me, ge, X;
|
|
378
|
-
X = {};
|
|
379
|
-
function Ke(e) {
|
|
380
|
-
if (U.call(e, "ref")) {
|
|
381
|
-
var r = Object.getOwnPropertyDescriptor(e, "ref").get;
|
|
382
|
-
if (r && r.isReactWarning)
|
|
383
|
-
return !1;
|
|
384
|
-
}
|
|
385
|
-
return e.ref !== void 0;
|
|
386
|
-
}
|
|
387
|
-
function Xe(e) {
|
|
388
|
-
if (U.call(e, "key")) {
|
|
389
|
-
var r = Object.getOwnPropertyDescriptor(e, "key").get;
|
|
390
|
-
if (r && r.isReactWarning)
|
|
391
|
-
return !1;
|
|
392
|
-
}
|
|
393
|
-
return e.key !== void 0;
|
|
394
|
-
}
|
|
395
|
-
function Ze(e, r) {
|
|
396
|
-
if (typeof e.ref == "string" && N.current && r && N.current.stateNode !== r) {
|
|
397
|
-
var t = P(N.current.type);
|
|
398
|
-
X[t] || (p('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', P(N.current.type), e.ref), X[t] = !0);
|
|
399
|
-
}
|
|
400
|
-
}
|
|
401
|
-
function Qe(e, r) {
|
|
402
|
-
{
|
|
403
|
-
var t = function() {
|
|
404
|
-
me || (me = !0, p("%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)", r));
|
|
405
|
-
};
|
|
406
|
-
t.isReactWarning = !0, Object.defineProperty(e, "key", {
|
|
407
|
-
get: t,
|
|
408
|
-
configurable: !0
|
|
409
|
-
});
|
|
410
|
-
}
|
|
411
|
-
}
|
|
412
|
-
function He(e, r) {
|
|
413
|
-
{
|
|
414
|
-
var t = function() {
|
|
415
|
-
ge || (ge = !0, p("%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)", r));
|
|
416
|
-
};
|
|
417
|
-
t.isReactWarning = !0, Object.defineProperty(e, "ref", {
|
|
418
|
-
get: t,
|
|
419
|
-
configurable: !0
|
|
420
|
-
});
|
|
421
|
-
}
|
|
422
|
-
}
|
|
423
|
-
var er = function(e, r, t, n, u, s, o) {
|
|
424
|
-
var i = {
|
|
425
|
-
// This tag allows us to uniquely identify this as a React Element
|
|
426
|
-
$$typeof: v,
|
|
427
|
-
// Built-in properties that belong on the element
|
|
428
|
-
type: e,
|
|
429
|
-
key: r,
|
|
430
|
-
ref: t,
|
|
431
|
-
props: o,
|
|
432
|
-
// Record the component responsible for creating this element.
|
|
433
|
-
_owner: s
|
|
434
|
-
};
|
|
435
|
-
return i._store = {}, Object.defineProperty(i._store, "validated", {
|
|
436
|
-
configurable: !1,
|
|
437
|
-
enumerable: !1,
|
|
438
|
-
writable: !0,
|
|
439
|
-
value: !1
|
|
440
|
-
}), Object.defineProperty(i, "_self", {
|
|
441
|
-
configurable: !1,
|
|
442
|
-
enumerable: !1,
|
|
443
|
-
writable: !1,
|
|
444
|
-
value: n
|
|
445
|
-
}), Object.defineProperty(i, "_source", {
|
|
446
|
-
configurable: !1,
|
|
447
|
-
enumerable: !1,
|
|
448
|
-
writable: !1,
|
|
449
|
-
value: u
|
|
450
|
-
}), Object.freeze && (Object.freeze(i.props), Object.freeze(i)), i;
|
|
451
|
-
};
|
|
452
|
-
function rr(e, r, t, n, u) {
|
|
453
|
-
{
|
|
454
|
-
var s, o = {}, i = null, g = null;
|
|
455
|
-
t !== void 0 && (he(t), i = "" + t), Xe(r) && (he(r.key), i = "" + r.key), Ke(r) && (g = r.ref, Ze(r, u));
|
|
456
|
-
for (s in r)
|
|
457
|
-
U.call(r, s) && !ze.hasOwnProperty(s) && (o[s] = r[s]);
|
|
458
|
-
if (e && e.defaultProps) {
|
|
459
|
-
var l = e.defaultProps;
|
|
460
|
-
for (s in l)
|
|
461
|
-
o[s] === void 0 && (o[s] = l[s]);
|
|
462
|
-
}
|
|
463
|
-
if (i || g) {
|
|
464
|
-
var f = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
|
|
465
|
-
i && Qe(o, f), g && He(o, f);
|
|
466
|
-
}
|
|
467
|
-
return er(e, i, g, u, n, N.current, o);
|
|
468
|
-
}
|
|
469
|
-
}
|
|
470
|
-
var Z = O.ReactCurrentOwner, Ee = O.ReactDebugCurrentFrame;
|
|
471
|
-
function A(e) {
|
|
472
|
-
if (e) {
|
|
473
|
-
var r = e._owner, t = V(e.type, e._source, r ? r.type : null);
|
|
474
|
-
Ee.setExtraStackFrame(t);
|
|
475
|
-
} else
|
|
476
|
-
Ee.setExtraStackFrame(null);
|
|
477
|
-
}
|
|
478
|
-
var Q;
|
|
479
|
-
Q = !1;
|
|
480
|
-
function H(e) {
|
|
481
|
-
return typeof e == "object" && e !== null && e.$$typeof === v;
|
|
482
|
-
}
|
|
483
|
-
function be() {
|
|
484
|
-
{
|
|
485
|
-
if (Z.current) {
|
|
486
|
-
var e = P(Z.current.type);
|
|
487
|
-
if (e)
|
|
488
|
-
return `
|
|
489
|
-
|
|
490
|
-
Check the render method of \`` + e + "`.";
|
|
491
|
-
}
|
|
492
|
-
return "";
|
|
493
|
-
}
|
|
494
|
-
}
|
|
495
|
-
function tr(e) {
|
|
496
|
-
{
|
|
497
|
-
if (e !== void 0) {
|
|
498
|
-
var r = e.fileName.replace(/^.*[\\\/]/, ""), t = e.lineNumber;
|
|
499
|
-
return `
|
|
500
|
-
|
|
501
|
-
Check your code at ` + r + ":" + t + ".";
|
|
502
|
-
}
|
|
503
|
-
return "";
|
|
504
|
-
}
|
|
505
|
-
}
|
|
506
|
-
var _e = {};
|
|
507
|
-
function nr(e) {
|
|
508
|
-
{
|
|
509
|
-
var r = be();
|
|
510
|
-
if (!r) {
|
|
511
|
-
var t = typeof e == "string" ? e : e.displayName || e.name;
|
|
512
|
-
t && (r = `
|
|
513
|
-
|
|
514
|
-
Check the top-level render call using <` + t + ">.");
|
|
515
|
-
}
|
|
516
|
-
return r;
|
|
517
|
-
}
|
|
518
|
-
}
|
|
519
|
-
function Re(e, r) {
|
|
520
|
-
{
|
|
521
|
-
if (!e._store || e._store.validated || e.key != null)
|
|
522
|
-
return;
|
|
523
|
-
e._store.validated = !0;
|
|
524
|
-
var t = nr(r);
|
|
525
|
-
if (_e[t])
|
|
526
|
-
return;
|
|
527
|
-
_e[t] = !0;
|
|
528
|
-
var n = "";
|
|
529
|
-
e && e._owner && e._owner !== Z.current && (n = " It was passed a child from " + P(e._owner.type) + "."), A(e), p('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', t, n), A(null);
|
|
530
|
-
}
|
|
531
|
-
}
|
|
532
|
-
function Te(e, r) {
|
|
533
|
-
{
|
|
534
|
-
if (typeof e != "object")
|
|
535
|
-
return;
|
|
536
|
-
if (K(e))
|
|
537
|
-
for (var t = 0; t < e.length; t++) {
|
|
538
|
-
var n = e[t];
|
|
539
|
-
H(n) && Re(n, r);
|
|
540
|
-
}
|
|
541
|
-
else if (H(e))
|
|
542
|
-
e._store && (e._store.validated = !0);
|
|
543
|
-
else if (e) {
|
|
544
|
-
var u = Y(e);
|
|
545
|
-
if (typeof u == "function" && u !== e.entries)
|
|
546
|
-
for (var s = u.call(e), o; !(o = s.next()).done; )
|
|
547
|
-
H(o.value) && Re(o.value, r);
|
|
548
|
-
}
|
|
549
|
-
}
|
|
550
|
-
}
|
|
551
|
-
function ar(e) {
|
|
552
|
-
{
|
|
553
|
-
var r = e.type;
|
|
554
|
-
if (r == null || typeof r == "string")
|
|
555
|
-
return;
|
|
556
|
-
var t;
|
|
557
|
-
if (typeof r == "function")
|
|
558
|
-
t = r.propTypes;
|
|
559
|
-
else if (typeof r == "object" && (r.$$typeof === d || // Note: Memo only checks outer props here.
|
|
560
|
-
// Inner props are checked in the reconciler.
|
|
561
|
-
r.$$typeof === T))
|
|
562
|
-
t = r.propTypes;
|
|
563
|
-
else
|
|
564
|
-
return;
|
|
565
|
-
if (t) {
|
|
566
|
-
var n = P(r);
|
|
567
|
-
Ue(t, e.props, "prop", n, e);
|
|
568
|
-
} else if (r.PropTypes !== void 0 && !Q) {
|
|
569
|
-
Q = !0;
|
|
570
|
-
var u = P(r);
|
|
571
|
-
p("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", u || "Unknown");
|
|
572
|
-
}
|
|
573
|
-
typeof r.getDefaultProps == "function" && !r.getDefaultProps.isReactClassApproved && p("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
574
|
-
}
|
|
575
|
-
}
|
|
576
|
-
function ir(e) {
|
|
577
|
-
{
|
|
578
|
-
for (var r = Object.keys(e.props), t = 0; t < r.length; t++) {
|
|
579
|
-
var n = r[t];
|
|
580
|
-
if (n !== "children" && n !== "key") {
|
|
581
|
-
A(e), p("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", n), A(null);
|
|
582
|
-
break;
|
|
583
|
-
}
|
|
584
|
-
}
|
|
585
|
-
e.ref !== null && (A(e), p("Invalid attribute `ref` supplied to `React.Fragment`."), A(null));
|
|
586
|
-
}
|
|
587
|
-
}
|
|
588
|
-
function Ce(e, r, t, n, u, s) {
|
|
589
|
-
{
|
|
590
|
-
var o = Le(e);
|
|
591
|
-
if (!o) {
|
|
592
|
-
var i = "";
|
|
593
|
-
(e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (i += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
|
|
594
|
-
var g = tr(u);
|
|
595
|
-
g ? i += g : i += be();
|
|
596
|
-
var l;
|
|
597
|
-
e === null ? l = "null" : K(e) ? l = "array" : e !== void 0 && e.$$typeof === v ? (l = "<" + (P(e.type) || "Unknown") + " />", i = " Did you accidentally export a JSX literal instead of a component?") : l = typeof e, p("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", l, i);
|
|
598
|
-
}
|
|
599
|
-
var f = rr(e, r, t, u, s);
|
|
600
|
-
if (f == null)
|
|
601
|
-
return f;
|
|
602
|
-
if (o) {
|
|
603
|
-
var _ = r.children;
|
|
604
|
-
if (_ !== void 0)
|
|
605
|
-
if (n)
|
|
606
|
-
if (K(_)) {
|
|
607
|
-
for (var F = 0; F < _.length; F++)
|
|
608
|
-
Te(_[F], e);
|
|
609
|
-
Object.freeze && Object.freeze(_);
|
|
610
|
-
} else
|
|
611
|
-
p("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
|
612
|
-
else
|
|
613
|
-
Te(_, e);
|
|
614
|
-
}
|
|
615
|
-
return e === c ? ir(f) : ar(f), f;
|
|
616
|
-
}
|
|
617
|
-
}
|
|
618
|
-
function or(e, r, t) {
|
|
619
|
-
return Ce(e, r, t, !0);
|
|
620
|
-
}
|
|
621
|
-
function ur(e, r, t) {
|
|
622
|
-
return Ce(e, r, t, !1);
|
|
623
|
-
}
|
|
624
|
-
var sr = ur, lr = or;
|
|
625
|
-
$.Fragment = c, $.jsx = sr, $.jsxs = lr;
|
|
626
|
-
}()), $;
|
|
627
|
-
}
|
|
628
|
-
process.env.NODE_ENV === "production" ? ee.exports = dr() : ee.exports = vr();
|
|
629
|
-
var re = ee.exports;
|
|
630
|
-
const pr = xe(function({ open: v, onShow: y, onHide: c, children: C, ...x }, h) {
|
|
631
|
-
const [a, d] = je(), { titleBar: b, saveBar: m, modalContent: T } = fr.toArray(C).reduce(
|
|
632
|
-
(E, k) => {
|
|
633
|
-
const W = yr(k), Y = W === "ui-title-bar", O = W === "ui-save-bar";
|
|
634
|
-
return !Y && !O && E.modalContent.push(k), {
|
|
635
|
-
...E,
|
|
636
|
-
titleBar: Y ? k : E.titleBar,
|
|
637
|
-
saveBar: O ? k : E.saveBar
|
|
638
|
-
};
|
|
639
|
-
},
|
|
640
|
-
{ modalContent: [] }
|
|
641
|
-
), w = a && a.content ? cr.createPortal(T, a.content) : null;
|
|
642
|
-
return j(() => {
|
|
643
|
-
a && (v ? a.show() : a.hide());
|
|
644
|
-
}, [a, v]), j(() => {
|
|
645
|
-
if (!(!a || !y))
|
|
646
|
-
return a.addEventListener("show", y), () => {
|
|
647
|
-
a.removeEventListener("show", y);
|
|
648
|
-
};
|
|
649
|
-
}, [a, y]), j(() => {
|
|
650
|
-
if (!(!a || !c))
|
|
651
|
-
return a.addEventListener("hide", c), () => {
|
|
652
|
-
a.removeEventListener("hide", c);
|
|
653
|
-
};
|
|
654
|
-
}, [a, c]), j(() => {
|
|
655
|
-
if (a)
|
|
656
|
-
return () => {
|
|
657
|
-
a.hide();
|
|
658
|
-
};
|
|
659
|
-
}, [a]), /* @__PURE__ */ re.jsxs(
|
|
660
|
-
"ui-modal",
|
|
661
|
-
{
|
|
662
|
-
...x,
|
|
663
|
-
ref: (E) => {
|
|
664
|
-
d(E), h && (typeof h == "function" ? h(E) : h.current = E);
|
|
665
|
-
},
|
|
666
|
-
children: [
|
|
667
|
-
b,
|
|
668
|
-
m,
|
|
669
|
-
/* @__PURE__ */ re.jsx("div", { children: w })
|
|
670
|
-
]
|
|
671
|
-
}
|
|
672
|
-
);
|
|
673
|
-
});
|
|
674
|
-
pr.displayName = "ui-modal";
|
|
675
|
-
function yr(R) {
|
|
676
|
-
if (!R)
|
|
677
|
-
return;
|
|
678
|
-
const v = typeof R == "object" && "type" in R ? R.type : void 0, y = typeof v == "string" ? v : void 0, c = typeof v == "object" ? v.displayName : void 0;
|
|
679
|
-
return y || (typeof c == "string" ? c : void 0);
|
|
680
|
-
}
|
|
681
|
-
const br = "ui-nav-menu", _r = "ui-title-bar", hr = xe(function({ open: v, onShow: y, onHide: c, children: C, ...x }, h) {
|
|
682
|
-
const [a, d] = je();
|
|
683
|
-
return j(() => {
|
|
684
|
-
a && (v ? a.show() : a.hide());
|
|
685
|
-
}, [a, v]), j(() => {
|
|
686
|
-
if (!(!a || !y))
|
|
687
|
-
return a.addEventListener("show", y), () => {
|
|
688
|
-
a.removeEventListener("show", y);
|
|
689
|
-
};
|
|
690
|
-
}, [a, y]), j(() => {
|
|
691
|
-
if (!(!a || !c))
|
|
692
|
-
return a.addEventListener("hide", c), () => {
|
|
693
|
-
a.removeEventListener("hide", c);
|
|
694
|
-
};
|
|
695
|
-
}, [a, c]), j(() => {
|
|
696
|
-
if (a)
|
|
697
|
-
return () => {
|
|
698
|
-
a.hide();
|
|
699
|
-
};
|
|
700
|
-
}, [a]), /* @__PURE__ */ re.jsx(
|
|
701
|
-
"ui-save-bar",
|
|
702
|
-
{
|
|
703
|
-
...x,
|
|
704
|
-
ref: (b) => {
|
|
705
|
-
d(b), h && (typeof h == "function" ? h(b) : h.current = b);
|
|
706
|
-
},
|
|
707
|
-
children: C
|
|
708
|
-
}
|
|
709
|
-
);
|
|
710
|
-
});
|
|
711
|
-
hr.displayName = "ui-save-bar";
|
|
712
|
-
const mr = new Proxy(
|
|
713
|
-
{},
|
|
714
|
-
{
|
|
715
|
-
get(R, v) {
|
|
716
|
-
throw Error(
|
|
717
|
-
`shopify.${String(
|
|
718
|
-
v
|
|
719
|
-
)} can't be used in a server environment. You likely need to move this code into an Effect.`
|
|
720
|
-
);
|
|
721
|
-
}
|
|
722
|
-
}
|
|
723
|
-
);
|
|
724
|
-
function Rr() {
|
|
725
|
-
if (typeof window > "u")
|
|
726
|
-
return mr;
|
|
727
|
-
if (!window.shopify)
|
|
728
|
-
throw Error(
|
|
729
|
-
"The shopify global is not defined. This likely means the App Bridge script tag was not added correctly to this page"
|
|
730
|
-
);
|
|
731
|
-
return window.shopify;
|
|
732
|
-
}
|
|
733
|
-
export {
|
|
734
|
-
pr as Modal,
|
|
735
|
-
br as NavMenu,
|
|
736
|
-
hr as SaveBar,
|
|
737
|
-
_r as TitleBar,
|
|
738
|
-
Rr as useAppBridge
|
|
739
|
-
};
|
|
740
|
-
//# sourceMappingURL=index.js.map
|