@machinemetrics/mm-react-embeddable 1.0.5 → 1.0.6
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/mm-react-embeddable.cjs.js +11 -11
- package/dist/mm-react-embeddable.es.js +348 -338
- package/dist/mm-react-embeddable.umd.js +11 -11
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
var
|
|
1
|
+
import Ne, { createContext as wr, useState as z, useRef as Q, useCallback as Y, useEffect as A, useMemo as Tr, useContext as Ge } from "react";
|
|
2
|
+
import X from "prop-types";
|
|
3
|
+
import Be from "styled-components";
|
|
4
|
+
var Ee = { exports: {} }, G = {};
|
|
5
5
|
/**
|
|
6
6
|
* @license React
|
|
7
7
|
* react-jsx-runtime.production.min.js
|
|
@@ -11,21 +11,21 @@ var ye = { exports: {} }, J = {};
|
|
|
11
11
|
* This source code is licensed under the MIT license found in the
|
|
12
12
|
* LICENSE file in the root directory of this source tree.
|
|
13
13
|
*/
|
|
14
|
-
var
|
|
14
|
+
var Je;
|
|
15
15
|
function Sr() {
|
|
16
|
-
if (
|
|
17
|
-
|
|
18
|
-
var n =
|
|
19
|
-
function
|
|
20
|
-
var
|
|
21
|
-
|
|
22
|
-
for (
|
|
23
|
-
if (
|
|
24
|
-
return { $$typeof: o, type:
|
|
16
|
+
if (Je) return G;
|
|
17
|
+
Je = 1;
|
|
18
|
+
var n = Ne, o = Symbol.for("react.element"), S = Symbol.for("react.fragment"), c = Object.prototype.hasOwnProperty, y = n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, h = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
19
|
+
function F(C, E, w) {
|
|
20
|
+
var b, P = {}, j = null, M = null;
|
|
21
|
+
w !== void 0 && (j = "" + w), E.key !== void 0 && (j = "" + E.key), E.ref !== void 0 && (M = E.ref);
|
|
22
|
+
for (b in E) c.call(E, b) && !h.hasOwnProperty(b) && (P[b] = E[b]);
|
|
23
|
+
if (C && C.defaultProps) for (b in E = C.defaultProps, E) P[b] === void 0 && (P[b] = E[b]);
|
|
24
|
+
return { $$typeof: o, type: C, key: j, ref: M, props: P, _owner: y.current };
|
|
25
25
|
}
|
|
26
|
-
return
|
|
26
|
+
return G.Fragment = S, G.jsx = F, G.jsxs = F, G;
|
|
27
27
|
}
|
|
28
|
-
var
|
|
28
|
+
var H = {};
|
|
29
29
|
/**
|
|
30
30
|
* @license React
|
|
31
31
|
* react-jsx-runtime.development.js
|
|
@@ -35,57 +35,57 @@ var K = {};
|
|
|
35
35
|
* This source code is licensed under the MIT license found in the
|
|
36
36
|
* LICENSE file in the root directory of this source tree.
|
|
37
37
|
*/
|
|
38
|
-
var
|
|
38
|
+
var Ke;
|
|
39
39
|
function Cr() {
|
|
40
|
-
return
|
|
41
|
-
var n =
|
|
42
|
-
function
|
|
40
|
+
return Ke || (Ke = 1, process.env.NODE_ENV !== "production" && function() {
|
|
41
|
+
var n = Ne, o = Symbol.for("react.element"), S = Symbol.for("react.portal"), c = Symbol.for("react.fragment"), y = Symbol.for("react.strict_mode"), h = Symbol.for("react.profiler"), F = Symbol.for("react.provider"), C = Symbol.for("react.context"), E = Symbol.for("react.forward_ref"), w = Symbol.for("react.suspense"), b = Symbol.for("react.suspense_list"), P = Symbol.for("react.memo"), j = Symbol.for("react.lazy"), M = Symbol.for("react.offscreen"), i = Symbol.iterator, g = "@@iterator";
|
|
42
|
+
function l(e) {
|
|
43
43
|
if (e === null || typeof e != "object")
|
|
44
44
|
return null;
|
|
45
|
-
var r =
|
|
45
|
+
var r = i && e[i] || e[g];
|
|
46
46
|
return typeof r == "function" ? r : null;
|
|
47
47
|
}
|
|
48
|
-
var
|
|
49
|
-
function
|
|
48
|
+
var f = n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
49
|
+
function d(e) {
|
|
50
50
|
{
|
|
51
51
|
for (var r = arguments.length, t = new Array(r > 1 ? r - 1 : 0), a = 1; a < r; a++)
|
|
52
52
|
t[a - 1] = arguments[a];
|
|
53
|
-
|
|
53
|
+
_("error", e, t);
|
|
54
54
|
}
|
|
55
55
|
}
|
|
56
|
-
function
|
|
56
|
+
function _(e, r, t) {
|
|
57
57
|
{
|
|
58
|
-
var a =
|
|
59
|
-
|
|
60
|
-
var
|
|
58
|
+
var a = f.ReactDebugCurrentFrame, v = a.getStackAddendum();
|
|
59
|
+
v !== "" && (r += "%s", t = t.concat([v]));
|
|
60
|
+
var p = t.map(function(u) {
|
|
61
61
|
return String(u);
|
|
62
62
|
});
|
|
63
|
-
|
|
63
|
+
p.unshift("Warning: " + r), Function.prototype.apply.call(console[e], console, p);
|
|
64
64
|
}
|
|
65
65
|
}
|
|
66
|
-
var D = !1,
|
|
67
|
-
|
|
68
|
-
function
|
|
69
|
-
return !!(typeof e == "string" || typeof e == "function" || e === c || e ===
|
|
66
|
+
var D = !1, V = !1, $ = !1, ee = !1, re = !1, U;
|
|
67
|
+
U = Symbol.for("react.module.reference");
|
|
68
|
+
function ue(e) {
|
|
69
|
+
return !!(typeof e == "string" || typeof e == "function" || e === c || e === h || re || e === y || e === w || e === b || ee || e === M || D || V || $ || typeof e == "object" && e !== null && (e.$$typeof === j || e.$$typeof === P || e.$$typeof === F || e.$$typeof === C || e.$$typeof === E || // This needs to include all possible module reference object
|
|
70
70
|
// types supported by any Flight configuration anywhere since
|
|
71
71
|
// we don't know which Flight build this will end up being used
|
|
72
72
|
// with.
|
|
73
|
-
e.$$typeof ===
|
|
73
|
+
e.$$typeof === U || e.getModuleId !== void 0));
|
|
74
74
|
}
|
|
75
|
-
function
|
|
75
|
+
function ce(e, r, t) {
|
|
76
76
|
var a = e.displayName;
|
|
77
77
|
if (a)
|
|
78
78
|
return a;
|
|
79
|
-
var
|
|
80
|
-
return
|
|
79
|
+
var v = r.displayName || r.name || "";
|
|
80
|
+
return v !== "" ? t + "(" + v + ")" : t;
|
|
81
81
|
}
|
|
82
|
-
function
|
|
82
|
+
function J(e) {
|
|
83
83
|
return e.displayName || "Context";
|
|
84
84
|
}
|
|
85
|
-
function
|
|
85
|
+
function I(e) {
|
|
86
86
|
if (e == null)
|
|
87
87
|
return null;
|
|
88
|
-
if (typeof e.tag == "number" &&
|
|
88
|
+
if (typeof e.tag == "number" && d("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof e == "function")
|
|
89
89
|
return e.displayName || e.name || null;
|
|
90
90
|
if (typeof e == "string")
|
|
91
91
|
return e;
|
|
@@ -94,32 +94,32 @@ function Cr() {
|
|
|
94
94
|
return "Fragment";
|
|
95
95
|
case S:
|
|
96
96
|
return "Portal";
|
|
97
|
-
case
|
|
97
|
+
case h:
|
|
98
98
|
return "Profiler";
|
|
99
|
-
case
|
|
99
|
+
case y:
|
|
100
100
|
return "StrictMode";
|
|
101
|
-
case
|
|
101
|
+
case w:
|
|
102
102
|
return "Suspense";
|
|
103
|
-
case
|
|
103
|
+
case b:
|
|
104
104
|
return "SuspenseList";
|
|
105
105
|
}
|
|
106
106
|
if (typeof e == "object")
|
|
107
107
|
switch (e.$$typeof) {
|
|
108
|
-
case
|
|
108
|
+
case C:
|
|
109
109
|
var r = e;
|
|
110
|
-
return
|
|
111
|
-
case
|
|
110
|
+
return J(r) + ".Consumer";
|
|
111
|
+
case F:
|
|
112
112
|
var t = e;
|
|
113
|
-
return
|
|
113
|
+
return J(t._context) + ".Provider";
|
|
114
114
|
case E:
|
|
115
|
-
return
|
|
116
|
-
case
|
|
115
|
+
return ce(e, e.render, "ForwardRef");
|
|
116
|
+
case P:
|
|
117
117
|
var a = e.displayName || null;
|
|
118
|
-
return a !== null ? a :
|
|
119
|
-
case
|
|
120
|
-
var
|
|
118
|
+
return a !== null ? a : I(e.type) || "Memo";
|
|
119
|
+
case j: {
|
|
120
|
+
var v = e, p = v._payload, u = v._init;
|
|
121
121
|
try {
|
|
122
|
-
return
|
|
122
|
+
return I(u(p));
|
|
123
123
|
} catch {
|
|
124
124
|
return null;
|
|
125
125
|
}
|
|
@@ -127,18 +127,18 @@ function Cr() {
|
|
|
127
127
|
}
|
|
128
128
|
return null;
|
|
129
129
|
}
|
|
130
|
-
var
|
|
131
|
-
function
|
|
130
|
+
var W = Object.assign, K = 0, _e, we, Te, Se, Ce, Oe, Pe;
|
|
131
|
+
function xe() {
|
|
132
132
|
}
|
|
133
|
-
|
|
134
|
-
function
|
|
133
|
+
xe.__reactDisabledLog = !0;
|
|
134
|
+
function He() {
|
|
135
135
|
{
|
|
136
|
-
if (
|
|
137
|
-
|
|
136
|
+
if (K === 0) {
|
|
137
|
+
_e = console.log, we = console.info, Te = console.warn, Se = console.error, Ce = console.group, Oe = console.groupCollapsed, Pe = console.groupEnd;
|
|
138
138
|
var e = {
|
|
139
139
|
configurable: !0,
|
|
140
140
|
enumerable: !0,
|
|
141
|
-
value:
|
|
141
|
+
value: xe,
|
|
142
142
|
writable: !0
|
|
143
143
|
};
|
|
144
144
|
Object.defineProperties(console, {
|
|
@@ -151,77 +151,77 @@ function Cr() {
|
|
|
151
151
|
groupEnd: e
|
|
152
152
|
});
|
|
153
153
|
}
|
|
154
|
-
|
|
154
|
+
K++;
|
|
155
155
|
}
|
|
156
156
|
}
|
|
157
|
-
function
|
|
157
|
+
function ze() {
|
|
158
158
|
{
|
|
159
|
-
if (
|
|
159
|
+
if (K--, K === 0) {
|
|
160
160
|
var e = {
|
|
161
161
|
configurable: !0,
|
|
162
162
|
enumerable: !0,
|
|
163
163
|
writable: !0
|
|
164
164
|
};
|
|
165
165
|
Object.defineProperties(console, {
|
|
166
|
-
log:
|
|
167
|
-
value: Re
|
|
168
|
-
}),
|
|
169
|
-
info: $({}, e, {
|
|
166
|
+
log: W({}, e, {
|
|
170
167
|
value: _e
|
|
171
168
|
}),
|
|
172
|
-
|
|
169
|
+
info: W({}, e, {
|
|
173
170
|
value: we
|
|
174
171
|
}),
|
|
175
|
-
|
|
172
|
+
warn: W({}, e, {
|
|
176
173
|
value: Te
|
|
177
174
|
}),
|
|
178
|
-
|
|
175
|
+
error: W({}, e, {
|
|
179
176
|
value: Se
|
|
180
177
|
}),
|
|
181
|
-
|
|
178
|
+
group: W({}, e, {
|
|
182
179
|
value: Ce
|
|
183
180
|
}),
|
|
184
|
-
|
|
181
|
+
groupCollapsed: W({}, e, {
|
|
185
182
|
value: Oe
|
|
183
|
+
}),
|
|
184
|
+
groupEnd: W({}, e, {
|
|
185
|
+
value: Pe
|
|
186
186
|
})
|
|
187
187
|
});
|
|
188
188
|
}
|
|
189
|
-
|
|
189
|
+
K < 0 && d("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
190
190
|
}
|
|
191
191
|
}
|
|
192
|
-
var
|
|
193
|
-
function
|
|
192
|
+
var le = f.ReactCurrentDispatcher, fe;
|
|
193
|
+
function te(e, r, t) {
|
|
194
194
|
{
|
|
195
|
-
if (
|
|
195
|
+
if (fe === void 0)
|
|
196
196
|
try {
|
|
197
197
|
throw Error();
|
|
198
|
-
} catch (
|
|
199
|
-
var a =
|
|
200
|
-
|
|
198
|
+
} catch (v) {
|
|
199
|
+
var a = v.stack.trim().match(/\n( *(at )?)/);
|
|
200
|
+
fe = a && a[1] || "";
|
|
201
201
|
}
|
|
202
202
|
return `
|
|
203
|
-
` +
|
|
203
|
+
` + fe + e;
|
|
204
204
|
}
|
|
205
205
|
}
|
|
206
|
-
var
|
|
206
|
+
var de = !1, ne;
|
|
207
207
|
{
|
|
208
|
-
var
|
|
209
|
-
|
|
208
|
+
var Xe = typeof WeakMap == "function" ? WeakMap : Map;
|
|
209
|
+
ne = new Xe();
|
|
210
210
|
}
|
|
211
|
-
function
|
|
212
|
-
if (!e ||
|
|
211
|
+
function je(e, r) {
|
|
212
|
+
if (!e || de)
|
|
213
213
|
return "";
|
|
214
214
|
{
|
|
215
|
-
var t =
|
|
215
|
+
var t = ne.get(e);
|
|
216
216
|
if (t !== void 0)
|
|
217
217
|
return t;
|
|
218
218
|
}
|
|
219
219
|
var a;
|
|
220
|
-
|
|
221
|
-
var
|
|
220
|
+
de = !0;
|
|
221
|
+
var v = Error.prepareStackTrace;
|
|
222
222
|
Error.prepareStackTrace = void 0;
|
|
223
|
-
var
|
|
224
|
-
|
|
223
|
+
var p;
|
|
224
|
+
p = le.current, le.current = null, He();
|
|
225
225
|
try {
|
|
226
226
|
if (r) {
|
|
227
227
|
var u = function() {
|
|
@@ -234,116 +234,116 @@ function Cr() {
|
|
|
234
234
|
}), typeof Reflect == "object" && Reflect.construct) {
|
|
235
235
|
try {
|
|
236
236
|
Reflect.construct(u, []);
|
|
237
|
-
} catch (
|
|
238
|
-
a =
|
|
237
|
+
} catch (x) {
|
|
238
|
+
a = x;
|
|
239
239
|
}
|
|
240
240
|
Reflect.construct(e, [], u);
|
|
241
241
|
} else {
|
|
242
242
|
try {
|
|
243
243
|
u.call();
|
|
244
|
-
} catch (
|
|
245
|
-
a =
|
|
244
|
+
} catch (x) {
|
|
245
|
+
a = x;
|
|
246
246
|
}
|
|
247
247
|
e.call(u.prototype);
|
|
248
248
|
}
|
|
249
249
|
} else {
|
|
250
250
|
try {
|
|
251
251
|
throw Error();
|
|
252
|
-
} catch (
|
|
253
|
-
a =
|
|
252
|
+
} catch (x) {
|
|
253
|
+
a = x;
|
|
254
254
|
}
|
|
255
255
|
e();
|
|
256
256
|
}
|
|
257
|
-
} catch (
|
|
258
|
-
if (
|
|
259
|
-
for (var s =
|
|
260
|
-
`),
|
|
261
|
-
`),
|
|
257
|
+
} catch (x) {
|
|
258
|
+
if (x && a && typeof x.stack == "string") {
|
|
259
|
+
for (var s = x.stack.split(`
|
|
260
|
+
`), O = a.stack.split(`
|
|
261
|
+
`), m = s.length - 1, R = O.length - 1; m >= 1 && R >= 0 && s[m] !== O[R]; )
|
|
262
262
|
R--;
|
|
263
|
-
for (;
|
|
264
|
-
if (s[
|
|
265
|
-
if (
|
|
263
|
+
for (; m >= 1 && R >= 0; m--, R--)
|
|
264
|
+
if (s[m] !== O[R]) {
|
|
265
|
+
if (m !== 1 || R !== 1)
|
|
266
266
|
do
|
|
267
|
-
if (
|
|
268
|
-
var
|
|
269
|
-
` + s[
|
|
270
|
-
return e.displayName &&
|
|
267
|
+
if (m--, R--, R < 0 || s[m] !== O[R]) {
|
|
268
|
+
var k = `
|
|
269
|
+
` + s[m].replace(" at new ", " at ");
|
|
270
|
+
return e.displayName && k.includes("<anonymous>") && (k = k.replace("<anonymous>", e.displayName)), typeof e == "function" && ne.set(e, k), k;
|
|
271
271
|
}
|
|
272
|
-
while (
|
|
272
|
+
while (m >= 1 && R >= 0);
|
|
273
273
|
break;
|
|
274
274
|
}
|
|
275
275
|
}
|
|
276
276
|
} finally {
|
|
277
|
-
|
|
277
|
+
de = !1, le.current = p, ze(), Error.prepareStackTrace = v;
|
|
278
278
|
}
|
|
279
|
-
var
|
|
280
|
-
return typeof e == "function" &&
|
|
279
|
+
var B = e ? e.displayName || e.name : "", L = B ? te(B) : "";
|
|
280
|
+
return typeof e == "function" && ne.set(e, L), L;
|
|
281
281
|
}
|
|
282
282
|
function Qe(e, r, t) {
|
|
283
|
-
return
|
|
283
|
+
return je(e, !1);
|
|
284
284
|
}
|
|
285
285
|
function er(e) {
|
|
286
286
|
var r = e.prototype;
|
|
287
287
|
return !!(r && r.isReactComponent);
|
|
288
288
|
}
|
|
289
|
-
function
|
|
289
|
+
function ae(e, r, t) {
|
|
290
290
|
if (e == null)
|
|
291
291
|
return "";
|
|
292
292
|
if (typeof e == "function")
|
|
293
|
-
return
|
|
293
|
+
return je(e, er(e));
|
|
294
294
|
if (typeof e == "string")
|
|
295
|
-
return
|
|
295
|
+
return te(e);
|
|
296
296
|
switch (e) {
|
|
297
|
-
case
|
|
298
|
-
return
|
|
299
|
-
case
|
|
300
|
-
return
|
|
297
|
+
case w:
|
|
298
|
+
return te("Suspense");
|
|
299
|
+
case b:
|
|
300
|
+
return te("SuspenseList");
|
|
301
301
|
}
|
|
302
302
|
if (typeof e == "object")
|
|
303
303
|
switch (e.$$typeof) {
|
|
304
304
|
case E:
|
|
305
305
|
return Qe(e.render);
|
|
306
|
-
case
|
|
307
|
-
return
|
|
308
|
-
case
|
|
309
|
-
var a = e,
|
|
306
|
+
case P:
|
|
307
|
+
return ae(e.type, r, t);
|
|
308
|
+
case j: {
|
|
309
|
+
var a = e, v = a._payload, p = a._init;
|
|
310
310
|
try {
|
|
311
|
-
return
|
|
311
|
+
return ae(p(v), r, t);
|
|
312
312
|
} catch {
|
|
313
313
|
}
|
|
314
314
|
}
|
|
315
315
|
}
|
|
316
316
|
return "";
|
|
317
317
|
}
|
|
318
|
-
var
|
|
319
|
-
function
|
|
318
|
+
var Z = Object.prototype.hasOwnProperty, ke = {}, Fe = f.ReactDebugCurrentFrame;
|
|
319
|
+
function oe(e) {
|
|
320
320
|
if (e) {
|
|
321
|
-
var r = e._owner, t =
|
|
322
|
-
|
|
321
|
+
var r = e._owner, t = ae(e.type, e._source, r ? r.type : null);
|
|
322
|
+
Fe.setExtraStackFrame(t);
|
|
323
323
|
} else
|
|
324
|
-
|
|
324
|
+
Fe.setExtraStackFrame(null);
|
|
325
325
|
}
|
|
326
|
-
function rr(e, r, t, a,
|
|
326
|
+
function rr(e, r, t, a, v) {
|
|
327
327
|
{
|
|
328
|
-
var
|
|
328
|
+
var p = Function.call.bind(Z);
|
|
329
329
|
for (var u in e)
|
|
330
|
-
if (
|
|
330
|
+
if (p(e, u)) {
|
|
331
331
|
var s = void 0;
|
|
332
332
|
try {
|
|
333
333
|
if (typeof e[u] != "function") {
|
|
334
|
-
var
|
|
335
|
-
throw
|
|
334
|
+
var O = Error((a || "React class") + ": " + t + " 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`.");
|
|
335
|
+
throw O.name = "Invariant Violation", O;
|
|
336
336
|
}
|
|
337
337
|
s = e[u](r, u, a, t, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
338
|
-
} catch (
|
|
339
|
-
s =
|
|
338
|
+
} catch (m) {
|
|
339
|
+
s = m;
|
|
340
340
|
}
|
|
341
|
-
s && !(s instanceof Error) && (
|
|
341
|
+
s && !(s instanceof Error) && (oe(v), d("%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).", a || "React class", t, u, typeof s), oe(null)), s instanceof Error && !(s.message in ke) && (ke[s.message] = !0, oe(v), d("Failed %s type: %s", t, s.message), oe(null));
|
|
342
342
|
}
|
|
343
343
|
}
|
|
344
344
|
}
|
|
345
345
|
var tr = Array.isArray;
|
|
346
|
-
function
|
|
346
|
+
function ve(e) {
|
|
347
347
|
return tr(e);
|
|
348
348
|
}
|
|
349
349
|
function nr(e) {
|
|
@@ -354,27 +354,27 @@ function Cr() {
|
|
|
354
354
|
}
|
|
355
355
|
function ar(e) {
|
|
356
356
|
try {
|
|
357
|
-
return
|
|
357
|
+
return Ie(e), !1;
|
|
358
358
|
} catch {
|
|
359
359
|
return !0;
|
|
360
360
|
}
|
|
361
361
|
}
|
|
362
|
-
function
|
|
362
|
+
function Ie(e) {
|
|
363
363
|
return "" + e;
|
|
364
364
|
}
|
|
365
|
-
function
|
|
365
|
+
function De(e) {
|
|
366
366
|
if (ar(e))
|
|
367
|
-
return
|
|
367
|
+
return d("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", nr(e)), Ie(e);
|
|
368
368
|
}
|
|
369
|
-
var
|
|
369
|
+
var N = f.ReactCurrentOwner, or = {
|
|
370
370
|
key: !0,
|
|
371
371
|
ref: !0,
|
|
372
372
|
__self: !0,
|
|
373
373
|
__source: !0
|
|
374
|
-
},
|
|
375
|
-
|
|
374
|
+
}, Me, Ae, pe;
|
|
375
|
+
pe = {};
|
|
376
376
|
function ir(e) {
|
|
377
|
-
if (
|
|
377
|
+
if (Z.call(e, "ref")) {
|
|
378
378
|
var r = Object.getOwnPropertyDescriptor(e, "ref").get;
|
|
379
379
|
if (r && r.isReactWarning)
|
|
380
380
|
return !1;
|
|
@@ -382,7 +382,7 @@ function Cr() {
|
|
|
382
382
|
return e.ref !== void 0;
|
|
383
383
|
}
|
|
384
384
|
function sr(e) {
|
|
385
|
-
if (
|
|
385
|
+
if (Z.call(e, "key")) {
|
|
386
386
|
var r = Object.getOwnPropertyDescriptor(e, "key").get;
|
|
387
387
|
if (r && r.isReactWarning)
|
|
388
388
|
return !1;
|
|
@@ -390,15 +390,15 @@ function Cr() {
|
|
|
390
390
|
return e.key !== void 0;
|
|
391
391
|
}
|
|
392
392
|
function ur(e, r) {
|
|
393
|
-
if (typeof e.ref == "string" &&
|
|
394
|
-
var t =
|
|
395
|
-
|
|
393
|
+
if (typeof e.ref == "string" && N.current && r && N.current.stateNode !== r) {
|
|
394
|
+
var t = I(N.current.type);
|
|
395
|
+
pe[t] || (d('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', I(N.current.type), e.ref), pe[t] = !0);
|
|
396
396
|
}
|
|
397
397
|
}
|
|
398
398
|
function cr(e, r) {
|
|
399
399
|
{
|
|
400
400
|
var t = function() {
|
|
401
|
-
|
|
401
|
+
Me || (Me = !0, d("%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));
|
|
402
402
|
};
|
|
403
403
|
t.isReactWarning = !0, Object.defineProperty(e, "key", {
|
|
404
404
|
get: t,
|
|
@@ -409,7 +409,7 @@ function Cr() {
|
|
|
409
409
|
function lr(e, r) {
|
|
410
410
|
{
|
|
411
411
|
var t = function() {
|
|
412
|
-
|
|
412
|
+
Ae || (Ae = !0, d("%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));
|
|
413
413
|
};
|
|
414
414
|
t.isReactWarning = !0, Object.defineProperty(e, "ref", {
|
|
415
415
|
get: t,
|
|
@@ -417,7 +417,7 @@ function Cr() {
|
|
|
417
417
|
});
|
|
418
418
|
}
|
|
419
419
|
}
|
|
420
|
-
var fr = function(e, r, t, a,
|
|
420
|
+
var fr = function(e, r, t, a, v, p, u) {
|
|
421
421
|
var s = {
|
|
422
422
|
// This tag allows us to uniquely identify this as a React Element
|
|
423
423
|
$$typeof: o,
|
|
@@ -427,7 +427,7 @@ function Cr() {
|
|
|
427
427
|
ref: t,
|
|
428
428
|
props: u,
|
|
429
429
|
// Record the component responsible for creating this element.
|
|
430
|
-
_owner:
|
|
430
|
+
_owner: p
|
|
431
431
|
};
|
|
432
432
|
return s._store = {}, Object.defineProperty(s._store, "validated", {
|
|
433
433
|
configurable: !1,
|
|
@@ -443,44 +443,44 @@ function Cr() {
|
|
|
443
443
|
configurable: !1,
|
|
444
444
|
enumerable: !1,
|
|
445
445
|
writable: !1,
|
|
446
|
-
value:
|
|
446
|
+
value: v
|
|
447
447
|
}), Object.freeze && (Object.freeze(s.props), Object.freeze(s)), s;
|
|
448
448
|
};
|
|
449
|
-
function dr(e, r, t, a,
|
|
449
|
+
function dr(e, r, t, a, v) {
|
|
450
450
|
{
|
|
451
|
-
var
|
|
452
|
-
t !== void 0 && (
|
|
453
|
-
for (
|
|
454
|
-
|
|
451
|
+
var p, u = {}, s = null, O = null;
|
|
452
|
+
t !== void 0 && (De(t), s = "" + t), sr(r) && (De(r.key), s = "" + r.key), ir(r) && (O = r.ref, ur(r, v));
|
|
453
|
+
for (p in r)
|
|
454
|
+
Z.call(r, p) && !or.hasOwnProperty(p) && (u[p] = r[p]);
|
|
455
455
|
if (e && e.defaultProps) {
|
|
456
|
-
var
|
|
457
|
-
for (
|
|
458
|
-
u[
|
|
456
|
+
var m = e.defaultProps;
|
|
457
|
+
for (p in m)
|
|
458
|
+
u[p] === void 0 && (u[p] = m[p]);
|
|
459
459
|
}
|
|
460
|
-
if (s ||
|
|
460
|
+
if (s || O) {
|
|
461
461
|
var R = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
|
|
462
|
-
s && cr(u, R),
|
|
462
|
+
s && cr(u, R), O && lr(u, R);
|
|
463
463
|
}
|
|
464
|
-
return fr(e, s,
|
|
464
|
+
return fr(e, s, O, v, a, N.current, u);
|
|
465
465
|
}
|
|
466
466
|
}
|
|
467
|
-
var
|
|
468
|
-
function
|
|
467
|
+
var ge = f.ReactCurrentOwner, $e = f.ReactDebugCurrentFrame;
|
|
468
|
+
function q(e) {
|
|
469
469
|
if (e) {
|
|
470
|
-
var r = e._owner, t =
|
|
471
|
-
|
|
470
|
+
var r = e._owner, t = ae(e.type, e._source, r ? r.type : null);
|
|
471
|
+
$e.setExtraStackFrame(t);
|
|
472
472
|
} else
|
|
473
|
-
|
|
473
|
+
$e.setExtraStackFrame(null);
|
|
474
474
|
}
|
|
475
|
-
var
|
|
476
|
-
|
|
477
|
-
function
|
|
475
|
+
var be;
|
|
476
|
+
be = !1;
|
|
477
|
+
function me(e) {
|
|
478
478
|
return typeof e == "object" && e !== null && e.$$typeof === o;
|
|
479
479
|
}
|
|
480
|
-
function
|
|
480
|
+
function Ue() {
|
|
481
481
|
{
|
|
482
|
-
if (
|
|
483
|
-
var e =
|
|
482
|
+
if (ge.current) {
|
|
483
|
+
var e = I(ge.current.type);
|
|
484
484
|
if (e)
|
|
485
485
|
return `
|
|
486
486
|
|
|
@@ -492,10 +492,10 @@ Check the render method of \`` + e + "`.";
|
|
|
492
492
|
function vr(e) {
|
|
493
493
|
return "";
|
|
494
494
|
}
|
|
495
|
-
var
|
|
495
|
+
var We = {};
|
|
496
496
|
function pr(e) {
|
|
497
497
|
{
|
|
498
|
-
var r =
|
|
498
|
+
var r = Ue();
|
|
499
499
|
if (!r) {
|
|
500
500
|
var t = typeof e == "string" ? e : e.displayName || e.name;
|
|
501
501
|
t && (r = `
|
|
@@ -505,35 +505,35 @@ Check the top-level render call using <` + t + ">.");
|
|
|
505
505
|
return r;
|
|
506
506
|
}
|
|
507
507
|
}
|
|
508
|
-
function
|
|
508
|
+
function Le(e, r) {
|
|
509
509
|
{
|
|
510
510
|
if (!e._store || e._store.validated || e.key != null)
|
|
511
511
|
return;
|
|
512
512
|
e._store.validated = !0;
|
|
513
513
|
var t = pr(r);
|
|
514
|
-
if (
|
|
514
|
+
if (We[t])
|
|
515
515
|
return;
|
|
516
|
-
|
|
516
|
+
We[t] = !0;
|
|
517
517
|
var a = "";
|
|
518
|
-
e && e._owner && e._owner !==
|
|
518
|
+
e && e._owner && e._owner !== ge.current && (a = " It was passed a child from " + I(e._owner.type) + "."), q(e), d('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', t, a), q(null);
|
|
519
519
|
}
|
|
520
520
|
}
|
|
521
|
-
function
|
|
521
|
+
function Ye(e, r) {
|
|
522
522
|
{
|
|
523
523
|
if (typeof e != "object")
|
|
524
524
|
return;
|
|
525
|
-
if (
|
|
525
|
+
if (ve(e))
|
|
526
526
|
for (var t = 0; t < e.length; t++) {
|
|
527
527
|
var a = e[t];
|
|
528
|
-
|
|
528
|
+
me(a) && Le(a, r);
|
|
529
529
|
}
|
|
530
|
-
else if (
|
|
530
|
+
else if (me(e))
|
|
531
531
|
e._store && (e._store.validated = !0);
|
|
532
532
|
else if (e) {
|
|
533
|
-
var
|
|
534
|
-
if (typeof
|
|
535
|
-
for (var
|
|
536
|
-
|
|
533
|
+
var v = l(e);
|
|
534
|
+
if (typeof v == "function" && v !== e.entries)
|
|
535
|
+
for (var p = v.call(e), u; !(u = p.next()).done; )
|
|
536
|
+
me(u.value) && Le(u.value, r);
|
|
537
537
|
}
|
|
538
538
|
}
|
|
539
539
|
}
|
|
@@ -547,19 +547,19 @@ Check the top-level render call using <` + t + ">.");
|
|
|
547
547
|
t = r.propTypes;
|
|
548
548
|
else if (typeof r == "object" && (r.$$typeof === E || // Note: Memo only checks outer props here.
|
|
549
549
|
// Inner props are checked in the reconciler.
|
|
550
|
-
r.$$typeof ===
|
|
550
|
+
r.$$typeof === P))
|
|
551
551
|
t = r.propTypes;
|
|
552
552
|
else
|
|
553
553
|
return;
|
|
554
554
|
if (t) {
|
|
555
|
-
var a =
|
|
555
|
+
var a = I(r);
|
|
556
556
|
rr(t, e.props, "prop", a, e);
|
|
557
|
-
} else if (r.PropTypes !== void 0 && !
|
|
558
|
-
|
|
559
|
-
var
|
|
560
|
-
|
|
557
|
+
} else if (r.PropTypes !== void 0 && !be) {
|
|
558
|
+
be = !0;
|
|
559
|
+
var v = I(r);
|
|
560
|
+
d("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", v || "Unknown");
|
|
561
561
|
}
|
|
562
|
-
typeof r.getDefaultProps == "function" && !r.getDefaultProps.isReactClassApproved &&
|
|
562
|
+
typeof r.getDefaultProps == "function" && !r.getDefaultProps.isReactClassApproved && d("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
563
563
|
}
|
|
564
564
|
}
|
|
565
565
|
function br(e) {
|
|
@@ -567,213 +567,223 @@ Check the top-level render call using <` + t + ">.");
|
|
|
567
567
|
for (var r = Object.keys(e.props), t = 0; t < r.length; t++) {
|
|
568
568
|
var a = r[t];
|
|
569
569
|
if (a !== "children" && a !== "key") {
|
|
570
|
-
|
|
570
|
+
q(e), d("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", a), q(null);
|
|
571
571
|
break;
|
|
572
572
|
}
|
|
573
573
|
}
|
|
574
|
-
e.ref !== null && (
|
|
574
|
+
e.ref !== null && (q(e), d("Invalid attribute `ref` supplied to `React.Fragment`."), q(null));
|
|
575
575
|
}
|
|
576
576
|
}
|
|
577
|
-
var
|
|
578
|
-
function
|
|
577
|
+
var Ve = {};
|
|
578
|
+
function qe(e, r, t, a, v, p) {
|
|
579
579
|
{
|
|
580
|
-
var u =
|
|
580
|
+
var u = ue(e);
|
|
581
581
|
if (!u) {
|
|
582
582
|
var s = "";
|
|
583
583
|
(e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (s += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
|
|
584
|
-
var
|
|
585
|
-
|
|
586
|
-
var
|
|
587
|
-
e === null ?
|
|
584
|
+
var O = vr();
|
|
585
|
+
O ? s += O : s += Ue();
|
|
586
|
+
var m;
|
|
587
|
+
e === null ? m = "null" : ve(e) ? m = "array" : e !== void 0 && e.$$typeof === o ? (m = "<" + (I(e.type) || "Unknown") + " />", s = " Did you accidentally export a JSX literal instead of a component?") : m = typeof e, d("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", m, s);
|
|
588
588
|
}
|
|
589
|
-
var R = dr(e, r, t,
|
|
589
|
+
var R = dr(e, r, t, v, p);
|
|
590
590
|
if (R == null)
|
|
591
591
|
return R;
|
|
592
592
|
if (u) {
|
|
593
|
-
var
|
|
594
|
-
if (
|
|
593
|
+
var k = r.children;
|
|
594
|
+
if (k !== void 0)
|
|
595
595
|
if (a)
|
|
596
|
-
if (
|
|
597
|
-
for (var
|
|
598
|
-
|
|
599
|
-
Object.freeze && Object.freeze(
|
|
596
|
+
if (ve(k)) {
|
|
597
|
+
for (var B = 0; B < k.length; B++)
|
|
598
|
+
Ye(k[B], e);
|
|
599
|
+
Object.freeze && Object.freeze(k);
|
|
600
600
|
} else
|
|
601
|
-
|
|
601
|
+
d("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
|
602
602
|
else
|
|
603
|
-
|
|
603
|
+
Ye(k, e);
|
|
604
604
|
}
|
|
605
|
-
if (
|
|
606
|
-
var
|
|
605
|
+
if (Z.call(r, "key")) {
|
|
606
|
+
var L = I(e), x = Object.keys(r).filter(function(_r) {
|
|
607
607
|
return _r !== "key";
|
|
608
|
-
}),
|
|
609
|
-
if (!
|
|
610
|
-
var Rr =
|
|
611
|
-
|
|
608
|
+
}), ye = x.length > 0 ? "{key: someKey, " + x.join(": ..., ") + ": ...}" : "{key: someKey}";
|
|
609
|
+
if (!Ve[L + ye]) {
|
|
610
|
+
var Rr = x.length > 0 ? "{" + x.join(": ..., ") + ": ...}" : "{}";
|
|
611
|
+
d(`A props object containing a "key" prop is being spread into JSX:
|
|
612
612
|
let props = %s;
|
|
613
613
|
<%s {...props} />
|
|
614
614
|
React keys must be passed directly to JSX without using spread:
|
|
615
615
|
let props = %s;
|
|
616
|
-
<%s key={someKey} {...props} />`,
|
|
616
|
+
<%s key={someKey} {...props} />`, ye, L, Rr, L), Ve[L + ye] = !0;
|
|
617
617
|
}
|
|
618
618
|
}
|
|
619
619
|
return e === c ? br(R) : gr(R), R;
|
|
620
620
|
}
|
|
621
621
|
}
|
|
622
622
|
function mr(e, r, t) {
|
|
623
|
-
return
|
|
623
|
+
return qe(e, r, t, !0);
|
|
624
624
|
}
|
|
625
625
|
function yr(e, r, t) {
|
|
626
|
-
return
|
|
626
|
+
return qe(e, r, t, !1);
|
|
627
627
|
}
|
|
628
628
|
var hr = yr, Er = mr;
|
|
629
|
-
|
|
630
|
-
}()),
|
|
629
|
+
H.Fragment = c, H.jsx = hr, H.jsxs = Er;
|
|
630
|
+
}()), H;
|
|
631
631
|
}
|
|
632
|
-
process.env.NODE_ENV === "production" ?
|
|
633
|
-
var
|
|
632
|
+
process.env.NODE_ENV === "production" ? Ee.exports = Sr() : Ee.exports = Cr();
|
|
633
|
+
var se = Ee.exports;
|
|
634
634
|
const T = [];
|
|
635
635
|
for (let n = 0; n < 256; ++n)
|
|
636
636
|
T.push((n + 256).toString(16).slice(1));
|
|
637
637
|
function Or(n, o = 0) {
|
|
638
638
|
return (T[n[o + 0]] + T[n[o + 1]] + T[n[o + 2]] + T[n[o + 3]] + "-" + T[n[o + 4]] + T[n[o + 5]] + "-" + T[n[o + 6]] + T[n[o + 7]] + "-" + T[n[o + 8]] + T[n[o + 9]] + "-" + T[n[o + 10]] + T[n[o + 11]] + T[n[o + 12]] + T[n[o + 13]] + T[n[o + 14]] + T[n[o + 15]]).toLowerCase();
|
|
639
639
|
}
|
|
640
|
-
let
|
|
640
|
+
let he;
|
|
641
641
|
const Pr = new Uint8Array(16);
|
|
642
642
|
function xr() {
|
|
643
|
-
if (!
|
|
643
|
+
if (!he) {
|
|
644
644
|
if (typeof crypto > "u" || !crypto.getRandomValues)
|
|
645
645
|
throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
|
|
646
|
-
|
|
646
|
+
he = crypto.getRandomValues.bind(crypto);
|
|
647
647
|
}
|
|
648
|
-
return
|
|
648
|
+
return he(Pr);
|
|
649
649
|
}
|
|
650
|
-
const jr = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto),
|
|
650
|
+
const jr = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), Ze = { randomUUID: jr };
|
|
651
651
|
function kr(n, o, S) {
|
|
652
|
-
var
|
|
653
|
-
if (
|
|
654
|
-
return
|
|
652
|
+
var y;
|
|
653
|
+
if (Ze.randomUUID && !o && !n)
|
|
654
|
+
return Ze.randomUUID();
|
|
655
655
|
n = n || {};
|
|
656
|
-
const c = n.random ?? ((
|
|
656
|
+
const c = n.random ?? ((y = n.rng) == null ? void 0 : y.call(n)) ?? xr();
|
|
657
657
|
if (c.length < 16)
|
|
658
658
|
throw new Error("Random bytes length must be >= 16");
|
|
659
659
|
return c[6] = c[6] & 15 | 64, c[8] = c[8] & 63 | 128, Or(c);
|
|
660
660
|
}
|
|
661
|
-
const
|
|
662
|
-
const [o, S] =
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
661
|
+
const Re = wr(null), Fr = ({ children: n }) => {
|
|
662
|
+
const [o, S] = z({}), c = Q({}), y = Q({}), h = Q({}), F = Y((i, g) => {
|
|
663
|
+
var l;
|
|
664
|
+
return !!((l = h.current[i]) != null && l.has(g));
|
|
665
|
+
}, []), C = Y((i, g, l) => {
|
|
666
|
+
S((f) => ({ ...f, [i]: { origin: g, frameRef: l } }));
|
|
667
|
+
}, []), E = Y((i) => {
|
|
668
|
+
S((g) => {
|
|
669
|
+
const l = { ...g };
|
|
667
670
|
return delete l[i], l;
|
|
668
|
-
});
|
|
671
|
+
}), delete h.current[i];
|
|
669
672
|
}, []);
|
|
670
673
|
A(() => {
|
|
671
|
-
const i = (l = [],
|
|
672
|
-
l.forEach((
|
|
673
|
-
},
|
|
674
|
-
var
|
|
675
|
-
if (!((
|
|
674
|
+
const i = (l = [], f) => {
|
|
675
|
+
l.forEach((d) => d(f));
|
|
676
|
+
}, g = (l) => {
|
|
677
|
+
var D, V, $, ee, re;
|
|
678
|
+
if (!((D = l == null ? void 0 : l.data) != null && D.instanceId))
|
|
676
679
|
return;
|
|
677
|
-
const { instanceId:
|
|
678
|
-
if (
|
|
679
|
-
const { callbackId:
|
|
680
|
-
|
|
680
|
+
const { instanceId: f, type: d } = l.data, _ = c.current;
|
|
681
|
+
if (d === "response") {
|
|
682
|
+
const { callbackId: U, response: ue, error: ce } = l.data, J = y.current[U];
|
|
683
|
+
J && (J(ue, ce), delete y.current[U]);
|
|
681
684
|
return;
|
|
682
685
|
}
|
|
683
|
-
|
|
686
|
+
if (d === "mark-registered") {
|
|
687
|
+
const { requestType: U } = l.data;
|
|
688
|
+
h.current[f] || (h.current[f] = /* @__PURE__ */ new Set()), h.current[f].add(U);
|
|
689
|
+
return;
|
|
690
|
+
}
|
|
691
|
+
i((V = _[f]) == null ? void 0 : V[d], l.data), i(($ = _["*"]) == null ? void 0 : $[d], l.data), i((ee = _[f]) == null ? void 0 : ee["*"], l.data), i((re = _["*"]) == null ? void 0 : re["*"], l.data);
|
|
684
692
|
};
|
|
685
|
-
return window.addEventListener("message",
|
|
686
|
-
window.removeEventListener("message",
|
|
693
|
+
return window.addEventListener("message", g), () => {
|
|
694
|
+
window.removeEventListener("message", g);
|
|
687
695
|
};
|
|
688
696
|
}, [o]);
|
|
689
|
-
const
|
|
690
|
-
(i,
|
|
691
|
-
var
|
|
692
|
-
const
|
|
693
|
-
if (!
|
|
697
|
+
const w = Y(
|
|
698
|
+
(i, g, l) => {
|
|
699
|
+
var d, _;
|
|
700
|
+
const f = o[i];
|
|
701
|
+
if (!f) {
|
|
694
702
|
console.warn(`Origin not set for id: ${i}. Unable to send message.`);
|
|
695
703
|
return;
|
|
696
704
|
}
|
|
697
|
-
(
|
|
698
|
-
{ type:
|
|
699
|
-
|
|
705
|
+
(_ = (d = f == null ? void 0 : f.frameRef) == null ? void 0 : d.current) != null && _.contentWindow && f.frameRef.current.contentWindow.postMessage(
|
|
706
|
+
{ type: g, ...l, instanceId: i },
|
|
707
|
+
f.origin
|
|
700
708
|
);
|
|
701
709
|
},
|
|
702
710
|
[o]
|
|
703
|
-
),
|
|
704
|
-
async (i,
|
|
705
|
-
const
|
|
706
|
-
delete
|
|
711
|
+
), b = Y(
|
|
712
|
+
async (i, g, l = {}) => new Promise((f, d) => {
|
|
713
|
+
const _ = kr(), D = (V, $) => {
|
|
714
|
+
delete y.current[_], $ ? d($) : f(V);
|
|
707
715
|
};
|
|
708
|
-
|
|
716
|
+
y.current[_] = D, w(i, "request", { callbackId: _, requestType: g, data: l });
|
|
709
717
|
}),
|
|
710
|
-
[
|
|
711
|
-
),
|
|
712
|
-
(i,
|
|
713
|
-
|
|
718
|
+
[w]
|
|
719
|
+
), P = Y(
|
|
720
|
+
(i, g) => {
|
|
721
|
+
w(i, "load-options", g);
|
|
714
722
|
},
|
|
715
|
-
[
|
|
716
|
-
),
|
|
717
|
-
(i,
|
|
718
|
-
|
|
723
|
+
[w]
|
|
724
|
+
), j = Y(
|
|
725
|
+
(i, g) => {
|
|
726
|
+
w(i, "validate", g);
|
|
719
727
|
},
|
|
720
|
-
[
|
|
721
|
-
),
|
|
728
|
+
[w]
|
|
729
|
+
), M = Tr(
|
|
722
730
|
() => ({
|
|
723
|
-
registerFrame:
|
|
724
|
-
unregisterFrame:
|
|
725
|
-
sendMessage:
|
|
726
|
-
sendRequest:
|
|
727
|
-
loadOptions:
|
|
728
|
-
validate:
|
|
729
|
-
|
|
730
|
-
|
|
731
|
+
registerFrame: C,
|
|
732
|
+
unregisterFrame: E,
|
|
733
|
+
sendMessage: w,
|
|
734
|
+
sendRequest: b,
|
|
735
|
+
loadOptions: P,
|
|
736
|
+
validate: j,
|
|
737
|
+
hasHandler: F,
|
|
738
|
+
addListener: (i, g, l) => (c.current[i] || (c.current[i] = {}), c.current[i][g] || (c.current[i][g] = []), c.current[i][g].push(l), () => {
|
|
739
|
+
c.current[i][g] = c.current[i][g].filter((f) => f !== l);
|
|
731
740
|
})
|
|
732
741
|
}),
|
|
733
742
|
[
|
|
734
|
-
|
|
735
|
-
k,
|
|
736
|
-
m,
|
|
743
|
+
C,
|
|
737
744
|
E,
|
|
738
|
-
|
|
739
|
-
|
|
745
|
+
w,
|
|
746
|
+
b,
|
|
747
|
+
P,
|
|
748
|
+
j,
|
|
749
|
+
F
|
|
740
750
|
]
|
|
741
751
|
);
|
|
742
|
-
return /* @__PURE__ */
|
|
743
|
-
},
|
|
752
|
+
return /* @__PURE__ */ se.jsx(Re.Provider, { value: M, children: n });
|
|
753
|
+
}, ie = {}, Ir = async (n) => {
|
|
744
754
|
try {
|
|
745
755
|
const o = new URL(n).origin;
|
|
746
|
-
if (
|
|
747
|
-
return
|
|
756
|
+
if (ie[o] !== void 0)
|
|
757
|
+
return ie[o];
|
|
748
758
|
const c = await (await fetch(`${o}/mm-app-manifest.json`)).json();
|
|
749
759
|
if (!c.version)
|
|
750
760
|
throw new Error("Invalid manifest");
|
|
751
|
-
return
|
|
761
|
+
return ie[o] = c, c;
|
|
752
762
|
} catch {
|
|
753
763
|
}
|
|
754
|
-
return
|
|
764
|
+
return ie[origin] = !1, !1;
|
|
755
765
|
}, Dr = async (n) => !!await Ir(n), Mr = (n, o, S) => {
|
|
756
|
-
const c =
|
|
766
|
+
const c = Ge(Re);
|
|
757
767
|
if (c === null)
|
|
758
768
|
throw new Error(
|
|
759
769
|
"useEmbeddedEffect must be used within a MMEmbeddableZoneProvider"
|
|
760
770
|
);
|
|
761
|
-
const
|
|
771
|
+
const y = Q(S);
|
|
762
772
|
A(() => {
|
|
763
|
-
|
|
773
|
+
y.current = S;
|
|
764
774
|
}, [S]), A(() => {
|
|
765
775
|
if (!(!n || !o))
|
|
766
776
|
return c.addListener(
|
|
767
777
|
n,
|
|
768
778
|
o,
|
|
769
|
-
(...
|
|
779
|
+
(...h) => y.current(...h)
|
|
770
780
|
);
|
|
771
781
|
}, [c, n, o]);
|
|
772
782
|
};
|
|
773
783
|
Fr.propTypes = {
|
|
774
|
-
children:
|
|
784
|
+
children: X.node.isRequired
|
|
775
785
|
};
|
|
776
|
-
const Ar =
|
|
786
|
+
const Ar = Be.default || Be, $r = Ar.iframe`
|
|
777
787
|
width: 100%;
|
|
778
788
|
height: 100%;
|
|
779
789
|
border: none;
|
|
@@ -784,55 +794,55 @@ const Ar = qe.default || qe, $r = Ar.iframe`
|
|
|
784
794
|
path: S,
|
|
785
795
|
onInit: c = () => {
|
|
786
796
|
},
|
|
787
|
-
context:
|
|
788
|
-
params:
|
|
789
|
-
...
|
|
797
|
+
context: y = {},
|
|
798
|
+
params: h = {},
|
|
799
|
+
...F
|
|
790
800
|
}) => {
|
|
791
|
-
if ("isConfiguring" in
|
|
801
|
+
if ("isConfiguring" in F)
|
|
792
802
|
return console.error(
|
|
793
803
|
"isConfiguring must be passed via the params prop to MMEmbeddableZone"
|
|
794
804
|
), null;
|
|
795
|
-
if ("colorMode" in
|
|
805
|
+
if ("colorMode" in y)
|
|
796
806
|
return console.error(
|
|
797
807
|
"colorMode must be passed via the params prop to MMEmbeddableZone"
|
|
798
808
|
), null;
|
|
799
|
-
if ("isFullScreen" in
|
|
809
|
+
if ("isFullScreen" in y)
|
|
800
810
|
return console.error(
|
|
801
811
|
"isFullScreen must be passed via the params prop to MMEmbeddableZone"
|
|
802
812
|
), null;
|
|
803
|
-
const
|
|
804
|
-
|
|
805
|
-
), [
|
|
813
|
+
const C = Q(), [E, w] = z(), [b, P] = z(0), { registerFrame: j, unregisterFrame: M, sendMessage: i } = Ge(
|
|
814
|
+
Re
|
|
815
|
+
), [g, l] = z(!0), [f, d] = z();
|
|
806
816
|
return A(() => {
|
|
807
|
-
|
|
817
|
+
b && i(n, "set-context", {
|
|
808
818
|
context: {
|
|
809
|
-
...
|
|
819
|
+
...y,
|
|
810
820
|
// TODO: Remove this once everything is migrated to params
|
|
811
|
-
colorMode:
|
|
812
|
-
isFullScreen:
|
|
821
|
+
colorMode: h.colorMode,
|
|
822
|
+
isFullScreen: h.isFullScreen
|
|
813
823
|
}
|
|
814
824
|
});
|
|
815
|
-
}, [
|
|
816
|
-
|
|
817
|
-
}, [
|
|
818
|
-
S !== void 0 &&
|
|
825
|
+
}, [y, h.colorMode, h.isFullScreen, n, b]), A(() => {
|
|
826
|
+
b && (i(n, "set-params", { params: h }), i(n, "set-configuring", { isConfiguring: h.isConfiguring }));
|
|
827
|
+
}, [h, n, b]), A(() => {
|
|
828
|
+
S !== void 0 && d(S);
|
|
819
829
|
}, [S]), A(() => {
|
|
820
|
-
|
|
821
|
-
}, [
|
|
822
|
-
if (!(!o || !n || !
|
|
830
|
+
f === void 0 || !b || i(n, "navigate", { path: f });
|
|
831
|
+
}, [f, b, n, i]), A(() => {
|
|
832
|
+
if (!(!o || !n || !C))
|
|
823
833
|
return (async () => {
|
|
824
|
-
const
|
|
825
|
-
if (
|
|
834
|
+
const _ = await Dr(o);
|
|
835
|
+
if (l(_), _) {
|
|
826
836
|
const D = new URL(o);
|
|
827
|
-
|
|
837
|
+
j(n, D.origin, C), c(), w(
|
|
828
838
|
`${D.origin}/mm-embedded-interop?id=${n}&origin=${window.location.origin}`
|
|
829
839
|
);
|
|
830
840
|
return;
|
|
831
841
|
}
|
|
832
842
|
})(), () => {
|
|
833
|
-
|
|
843
|
+
M(n);
|
|
834
844
|
};
|
|
835
|
-
}, [o, n,
|
|
845
|
+
}, [o, n, j, C]), Mr(n, "ready", () => P((_) => _ + 1)), g ? /* @__PURE__ */ se.jsx($r, { $isReady: b, ref: C, src: E, ...F }) : /* @__PURE__ */ se.jsx(
|
|
836
846
|
"div",
|
|
837
847
|
{
|
|
838
848
|
style: {
|
|
@@ -841,19 +851,19 @@ const Ar = qe.default || qe, $r = Ar.iframe`
|
|
|
841
851
|
alignItems: "center",
|
|
842
852
|
justifyContent: "center"
|
|
843
853
|
},
|
|
844
|
-
children: /* @__PURE__ */
|
|
854
|
+
children: /* @__PURE__ */ se.jsx("div", { style: { textAlign: "center" }, children: "Application must adhere to the MM App Manifest specification to be embedded." })
|
|
845
855
|
}
|
|
846
856
|
);
|
|
847
857
|
};
|
|
848
858
|
Ur.propTypes = {
|
|
849
|
-
id:
|
|
850
|
-
src:
|
|
851
|
-
path:
|
|
852
|
-
onInit:
|
|
859
|
+
id: X.string,
|
|
860
|
+
src: X.string.isRequired,
|
|
861
|
+
path: X.string,
|
|
862
|
+
onInit: X.func
|
|
853
863
|
};
|
|
854
864
|
export {
|
|
855
865
|
Ur as MMEmbeddableZone,
|
|
856
|
-
|
|
866
|
+
Re as MMEmbeddableZoneContext,
|
|
857
867
|
Fr as MMEmbeddableZoneProvider,
|
|
858
868
|
Ir as getAppInfo,
|
|
859
869
|
Dr as testIsEmbeddable,
|