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