@machinemetrics/mm-react-embeddable 2.0.0-7 → 2.0.1-0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,7 @@
1
- import $, { createContext as fe, useContext as V, useState as O, useRef as m, useCallback as h, useEffect as b, useMemo as ge } from "react";
1
+ import P, { createContext as ue, useContext as G, useState as L, useRef as g, useCallback as h, useEffect as b, useMemo as fe } from "react";
2
2
  import E from "prop-types";
3
- import ie from "styled-components";
4
- const ne = fe(null), J = fe({
3
+ import te from "styled-components";
4
+ const ee = ue(null), J = ue({
5
5
  pending: [],
6
6
  authorize: () => {
7
7
  },
@@ -14,345 +14,289 @@ const ne = fe(null), J = fe({
14
14
  originEpochs: {},
15
15
  credentials: {},
16
16
  unsupported: {}
17
- }), be = "access_token", ce = (t) => t ? t.kind ? t : t.accessToken ? {
18
- kind: be,
19
- accessToken: t.accessToken,
20
- expiresAt: t.expiresAt || null
21
- } : null : null, Ee = 60, Re = 120, we = /* @__PURE__ */ new Set([
17
+ }), pe = "access_token", ne = (r) => r ? r.kind ? r : r.accessToken ? {
18
+ kind: pe,
19
+ accessToken: r.accessToken,
20
+ expiresAt: r.expiresAt || null
21
+ } : null : null, he = 60, ge = 120, me = /* @__PURE__ */ new Set([
22
22
  "host_not_allowed",
23
23
  "unbound_host_bound_guest",
24
24
  "invalid_token",
25
25
  "provider_unavailable"
26
- ]), te = typeof window != "undefined" && window.location.protocol === "https:", Te = 8e3, N = (t) => {
26
+ ]), V = (r) => {
27
27
  try {
28
- return new URL(t).origin;
28
+ return new URL(r).origin;
29
29
  } catch {
30
30
  return null;
31
31
  }
32
- }, ue = (t, s) => {
33
- const c = s == null ? void 0 : s.origin;
34
- return !c || N(t == null ? void 0 : t.authUrl) !== c ? null : c;
35
- }, le = (t) => {
36
- if (!t || /^\d{1,3}(?:\.\d{1,3}){3}$/.test(t) || t.includes(":"))
37
- return t;
38
- const s = t.split(".");
39
- return s.length <= 2 ? t : s.slice(-2).join(".");
40
- }, ae = (t, s) => {
32
+ }, oe = (r, o) => {
33
+ const i = o == null ? void 0 : o.origin;
34
+ return !i || V(r == null ? void 0 : r.authUrl) !== i ? null : i;
35
+ }, se = (r) => {
36
+ if (!r || /^\d{1,3}(?:\.\d{1,3}){3}$/.test(r) || r.includes(":"))
37
+ return r;
38
+ const o = r.split(".");
39
+ return o.length <= 2 ? r : o.slice(-2).join(".");
40
+ }, ce = (r, o) => {
41
41
  try {
42
- const c = new URL(t), d = new URL(s);
43
- return c.protocol !== d.protocol ? !0 : le(c.hostname) !== le(d.hostname);
42
+ const i = new URL(r), p = new URL(o);
43
+ return i.protocol !== p.protocol ? !0 : se(i.hostname) !== se(p.hostname);
44
44
  } catch {
45
45
  return !0;
46
46
  }
47
- }, ke = (t, { onBlocked: s, onClosed: c }) => {
48
- const d = window.open(
49
- t.authUrl,
47
+ }, be = (r, { onBlocked: o, onClosed: i }) => {
48
+ const p = window.open(
49
+ r.authUrl,
50
50
  "mm-embed-auth",
51
51
  "popup,width=600,height=700"
52
52
  );
53
- if (!d)
54
- return s(), () => {
53
+ if (!p)
54
+ return o(), () => {
55
55
  };
56
- const f = setInterval(() => {
57
- d.closed && (clearInterval(f), c());
56
+ const m = setInterval(() => {
57
+ p.closed && (clearInterval(m), i());
58
58
  }, 1e3);
59
- return () => clearInterval(f);
60
- }, pe = ({ children: t, launcher: s, broker: c }) => {
61
- const d = V(ne), [f, g] = O({}), [P, B] = O({}), [W, H] = O({}), [k, z] = O({}), y = m(W);
62
- y.current = W;
63
- const U = m(f);
64
- U.current = f;
65
- const x = m(null), Y = m({}), R = m({}), G = m({}), v = m(c);
66
- v.current = c;
67
- const M = h((e) => {
68
- const r = R.current[e];
69
- if (!r)
59
+ return () => clearInterval(m);
60
+ }, ae = ({ children: r, launcher: o, broker: i }) => {
61
+ const p = G(ee), [m, R] = L({}), [v, B] = L({}), [W, j] = L({}), [T, A] = L({}), $ = g(W);
62
+ $.current = W;
63
+ const _ = g(m);
64
+ _.current = m;
65
+ const U = g(null), q = g({}), I = g({}), D = g(i);
66
+ D.current = i;
67
+ const O = h((e) => {
68
+ const n = q.current[e];
69
+ if (!n)
70
70
  return;
71
- const n = (i) => !i[e] || i[e].clientId ? i : { ...i, [e]: { ...i[e], clientId: r } };
72
- g(n), z(n);
73
- }, []), L = h(
74
- (e, r) => {
75
- e && (z((n) => n[e] ? n : {
76
- ...n,
71
+ const t = (s) => !s[e] || s[e].clientId ? s : { ...s, [e]: { ...s[e], clientId: n } };
72
+ R(t), A(t);
73
+ }, []), x = h(
74
+ (e, n) => {
75
+ e && (A((t) => t[e] ? t : {
76
+ ...t,
77
77
  [e]: {
78
78
  origin: e,
79
- reason: r,
80
- clientId: R.current[e] || null
79
+ reason: n,
80
+ clientId: q.current[e] || null
81
81
  }
82
- }), M(e));
82
+ }), O(e));
83
83
  },
84
- [M]
85
- ), S = h(
86
- (e, { v2: r = !1, origin: n = null } = {}) => {
87
- n && (r && y.current[n] || (g((i) => i[n] ? i : {
88
- ...i,
89
- [n]: {
90
- origin: n,
84
+ [O]
85
+ ), M = h(
86
+ (e, { v2: n = !1, origin: t = null } = {}) => {
87
+ t && (n && $.current[t] || (R((s) => s[t] ? s : {
88
+ ...s,
89
+ [t]: {
90
+ origin: t,
91
91
  authUrl: e.authUrl,
92
- silentUrl: e.silentUrl || null,
93
- // v2 entries try the invisible silent resolver first — but only on a host that can
94
- // frame login (https). Otherwise (and for legacy signals) go straight to interactive,
95
- // so an http host doesn't wait out a silent frame that can never load login.
96
- status: r && v.current ? "broker" : r && e.silentUrl && te ? "silent" : "interactive",
97
- v2: r,
98
- // v1.9: the scope the guest asked for; forwarded verbatim to the broker.
92
+ status: n && D.current ? "broker" : "interactive",
93
+ v2: n,
99
94
  scope: e.scope || null,
100
- acceptsCredentials: G.current[n] || null,
95
+ acceptsCredentials: I.current[t] || null,
101
96
  consent: null,
102
97
  error: null,
103
- // clientId from the request payload (v2) or the cached init (legacy);
104
- // the host resolves the display name from it.
105
- clientId: e.clientId || R.current[n] || null,
98
+ clientId: e.clientId || q.current[t] || null,
106
99
  popupBlocked: !1
107
100
  }
108
- }), M(n)));
101
+ }), O(t)));
109
102
  },
110
- [M]
111
- ), C = m({}), l = h((e) => {
112
- C.current[e] && (clearTimeout(C.current[e]), delete C.current[e]);
113
- }, []), u = h(
103
+ [O]
104
+ ), y = g({}), F = h((e) => {
105
+ y.current[e] && (clearTimeout(y.current[e]), delete y.current[e]);
106
+ }, []), c = h(
114
107
  (e) => {
115
- l(e), g((r) => {
116
- if (!r[e])
117
- return r;
118
- const n = { ...r };
119
- return delete n[e], n;
108
+ F(e), R((n) => {
109
+ if (!n[e])
110
+ return n;
111
+ const t = { ...n };
112
+ return delete t[e], t;
120
113
  });
121
114
  },
122
- [l]
123
- ), o = h(
115
+ [F]
116
+ ), l = h(
124
117
  (e) => {
125
- e && (u(e), B((r) => ({
126
- ...r,
127
- [e]: (r[e] || 0) + 1
118
+ e && (c(e), B((n) => ({
119
+ ...n,
120
+ [e]: (n[e] || 0) + 1
128
121
  })));
129
122
  },
130
- [u]
131
- ), a = h((e) => {
132
- g((r) => !r[e] || r[e].status === "interactive" ? r : {
133
- ...r,
134
- [e]: { ...r[e], status: "interactive" }
135
- });
136
- }, []), T = h(
123
+ [c]
124
+ ), u = h(
137
125
  (e) => {
138
- u(e.origin);
126
+ c(e.origin);
139
127
  },
140
- [u]
141
- ), p = h(
142
- (e, r) => {
143
- const n = ue(e, r);
144
- if (n) {
145
- if (ae(n, window.location.origin)) {
146
- L(n, "cross-site-legacy");
128
+ [c]
129
+ ), d = h(
130
+ (e, n) => {
131
+ const t = oe(e, n);
132
+ if (t) {
133
+ if (ce(t, window.location.origin)) {
134
+ x(t, "cross-site-legacy");
147
135
  return;
148
136
  }
149
- S(e, { origin: n });
137
+ M(e, { origin: t });
150
138
  }
151
139
  },
152
- [S, L]
140
+ [M, x]
153
141
  );
154
142
  b(() => {
155
- if (!d)
143
+ if (!p)
156
144
  return;
157
145
  const e = [
158
- // `init` carries the app's OAuth clientId. Cache it by the ATTESTED app
159
- // origin (payload `origin` is ignored) and attach it to any entry already
160
- // showing. `init` is posted before the authorize/login/credential-request
161
- // signals, so it is usually cached by the time an entry is created. The
162
- // clientId is only a lookup key: the host resolves the display name from
163
- // it, and a broker binds it to the attested origin server-side.
164
- d.addListener("*", "init", (r, n) => {
165
- n != null && n.origin && (r != null && r.clientId) && (R.current[n.origin] = r.clientId, M(n.origin)), n != null && n.origin && Array.isArray(r == null ? void 0 : r.acceptsCredentials) ? G.current[n.origin] = r.acceptsCredentials : n != null && n.origin && ae(n.origin, window.location.origin) && L(n.origin, "cross-site-legacy");
146
+ p.addListener("*", "init", (n, t) => {
147
+ t != null && t.origin && (n != null && n.clientId) && (q.current[t.origin] = n.clientId, O(t.origin)), t != null && t.origin && Array.isArray(n == null ? void 0 : n.acceptsCredentials) ? I.current[t.origin] = n.acceptsCredentials : t != null && t.origin && ce(t.origin, window.location.origin) && x(t.origin, "cross-site-legacy");
166
148
  }),
167
- d.addListener("*", "authorize", p),
168
- d.addListener("*", "login", p),
169
- d.addListener(
149
+ p.addListener("*", "authorize", d),
150
+ p.addListener("*", "login", d),
151
+ p.addListener(
170
152
  "*",
171
153
  "credential-request",
172
- (r, n) => S(r, { v2: !0, origin: ue(r, n) })
154
+ (n, t) => M(n, { v2: !0, origin: oe(n, t) })
173
155
  )
174
156
  ];
175
- return () => e.forEach((r) => r());
176
- }, [d, p, S, M, L]), b(() => {
177
- const e = (r) => {
178
- const n = r == null ? void 0 : r.data;
179
- if (!n || n.type !== "authorized" && n.type !== "authorize-failed")
157
+ return () => e.forEach((n) => n());
158
+ }, [p, d, M, O, x]), b(() => {
159
+ const e = (n) => {
160
+ const t = n == null ? void 0 : n.data;
161
+ if (!t || t.type !== "authorized")
180
162
  return;
181
- const i = N(n.authUrl);
182
- if (!(!i || r.origin !== i)) {
183
- if (n.type === "authorized") {
184
- if (n.accessToken) {
185
- if (!U.current[i])
186
- return;
187
- H((_) => ({
188
- ..._,
189
- [i]: ce({ accessToken: n.accessToken })
190
- })), u(i);
191
- } else
192
- o(i);
163
+ const s = V(t.authUrl);
164
+ if (!(!s || n.origin !== s)) {
165
+ if (t.accessToken) {
166
+ if (!_.current[s])
167
+ return;
168
+ j((a) => ({
169
+ ...a,
170
+ [s]: ne({ accessToken: t.accessToken })
171
+ })), c(s);
193
172
  return;
194
173
  }
195
- a(i);
174
+ l(s);
196
175
  }
197
176
  };
198
177
  return window.addEventListener("message", e), () => window.removeEventListener("message", e);
199
- }, [u, o, a]);
200
- const F = h(
201
- (e, r) => {
202
- const n = e == null ? void 0 : e.origin, i = ce(r);
203
- !n || !i || (H((_) => ({ ..._, [n]: i })), u(n));
178
+ }, [c, l]);
179
+ const w = h(
180
+ (e, n) => {
181
+ const t = e == null ? void 0 : e.origin, s = ne(n);
182
+ !t || !s || (j((a) => ({ ...a, [t]: s })), c(t));
204
183
  },
205
- [u]
206
- ), w = h((e, r) => {
207
- g((n) => n[e] ? { ...n, [e]: { ...n[e], ...r } } : n);
208
- }, []), I = m({}), A = h(
209
- async (e, { approve: r } = {}) => {
210
- const n = v.current, { origin: i } = e;
211
- let _;
184
+ [c]
185
+ ), f = h((e, n) => {
186
+ R((t) => t[e] ? { ...t, [e]: { ...t[e], ...n } } : t);
187
+ }, []), C = g({}), k = h(
188
+ async (e, { approve: n } = {}) => {
189
+ const t = D.current, { origin: s } = e;
190
+ let a;
212
191
  try {
213
- _ = await n(
192
+ a = await t(
214
193
  {
215
- origin: i,
194
+ origin: s,
216
195
  clientId: e.clientId,
217
196
  scope: e.scope,
218
197
  authUrl: e.authUrl
219
198
  },
220
- { approve: r }
199
+ { approve: n }
221
200
  );
222
201
  } catch {
223
- r ? w(i, { error: { reason: "broker_unavailable" } }) : w(i, {
224
- status: e.silentUrl && te ? "silent" : "interactive"
225
- });
202
+ n ? f(s, { error: { reason: "broker_unavailable" } }) : f(s, { status: "interactive" });
226
203
  return;
227
204
  }
228
- const oe = _ == null ? void 0 : _.status, Z = (_ == null ? void 0 : _.body) || {};
229
- if (oe === 200 && Z.credential) {
230
- F(e, Z.credential);
205
+ const Q = a == null ? void 0 : a.status, S = (a == null ? void 0 : a.body) || {};
206
+ if (Q === 200 && S.credential) {
207
+ w(e, S.credential);
231
208
  return;
232
209
  }
233
- if (oe === 409 && Z.consentRequired) {
234
- w(i, {
210
+ if (Q === 409 && S.consentRequired) {
211
+ f(s, {
235
212
  status: "interactive",
236
213
  consent: {
237
- client: Z.client || null,
238
- stepUp: !!Z.stepUp,
239
- scope: Z.scope || e.scope
214
+ client: S.client || null,
215
+ stepUp: !!S.stepUp,
216
+ scope: S.scope || e.scope
240
217
  },
241
218
  error: null
242
219
  });
243
220
  return;
244
221
  }
245
- const ee = Z.error || "broker_error";
246
- if (!r && we.has(ee)) {
247
- w(i, {
248
- status: e.silentUrl && te ? "silent" : "interactive"
249
- });
222
+ const Y = S.error || "broker_error";
223
+ if (!n && me.has(Y)) {
224
+ f(s, { status: "interactive" });
250
225
  return;
251
226
  }
252
- if (r && ee === "consent_denied") {
253
- w(i, { error: null });
227
+ if (n && Y === "consent_denied") {
228
+ f(s, { error: null });
254
229
  return;
255
230
  }
256
- if (ee === "rate_limited" && !e.rateLimitRetried) {
257
- const re = Math.min(
258
- Number(Z.retryAfter) > 0 ? Number(Z.retryAfter) : Ee,
259
- Re
260
- ), me = { ...e, rateLimitRetried: !0 };
261
- l(i), C.current[i] = setTimeout(() => {
262
- delete C.current[i], I.current[i] = !0, D.current(me, { approve: r }).finally(() => {
263
- delete I.current[i];
231
+ if (Y === "rate_limited" && !e.rateLimitRetried) {
232
+ const N = Math.min(
233
+ Number(S.retryAfter) > 0 ? Number(S.retryAfter) : he,
234
+ ge
235
+ ), de = { ...e, rateLimitRetried: !0 };
236
+ F(s), y.current[s] = setTimeout(() => {
237
+ delete y.current[s], C.current[s] = !0, z.current(de, { approve: n }).finally(() => {
238
+ delete C.current[s];
264
239
  });
265
- }, re * 1e3), w(i, { rateLimitRetried: !0 });
240
+ }, N * 1e3), f(s, { rateLimitRetried: !0 });
266
241
  return;
267
242
  }
268
- u(i), z((re) => ({
269
- ...re,
270
- [i]: {
271
- origin: i,
272
- reason: `broker:${ee}`,
273
- detail: _ || null,
274
- clientId: e.clientId || R.current[i] || null
243
+ c(s), A((N) => ({
244
+ ...N,
245
+ [s]: {
246
+ origin: s,
247
+ reason: `broker:${Y}`,
248
+ detail: a || null,
249
+ clientId: e.clientId || q.current[s] || null
275
250
  }
276
251
  }));
277
252
  },
278
- [F, w, u, l]
279
- ), D = m(A);
280
- D.current = A, b(() => {
281
- Object.values(f).forEach((e) => {
282
- e.status !== "broker" || I.current[e.origin] || C.current[e.origin] || (I.current[e.origin] = !0, A(e).finally(() => {
283
- delete I.current[e.origin];
253
+ [w, f, c, F]
254
+ ), z = g(k);
255
+ z.current = k, b(() => {
256
+ Object.values(m).forEach((e) => {
257
+ e.status !== "broker" || C.current[e.origin] || y.current[e.origin] || (C.current[e.origin] = !0, k(e).finally(() => {
258
+ delete C.current[e.origin];
284
259
  }));
285
260
  });
286
- }, [f, A]);
287
- const Q = h(
288
- (e) => !v.current || !(e != null && e.consent) ? Promise.resolve() : A(e, { approve: !0 }),
289
- [A]
261
+ }, [m, k]);
262
+ const Z = h(
263
+ (e) => !D.current || !(e != null && e.consent) ? Promise.resolve() : k(e, { approve: !0 }),
264
+ [k]
290
265
  );
291
- b(() => {
292
- const e = Y.current;
293
- Object.values(f).forEach((r) => {
294
- r.status === "silent" && !e[r.origin] && (e[r.origin] = setTimeout(() => {
295
- delete e[r.origin], a(r.origin);
296
- }, Te));
297
- }), Object.keys(e).forEach((r) => {
298
- (!f[r] || f[r].status !== "silent") && (clearTimeout(e[r]), delete e[r]);
299
- });
300
- }, [f, a]), b(() => () => {
301
- x.current && x.current(), Object.values(Y.current).forEach(clearTimeout), Object.values(C.current).forEach(clearTimeout);
266
+ b(() => () => {
267
+ U.current && U.current(), Object.values(y.current).forEach(clearTimeout);
302
268
  }, []);
303
- const K = h(
269
+ const H = h(
304
270
  (e) => {
305
- x.current && (x.current(), x.current = null);
306
- const r = s || ke;
307
- x.current = r(e, {
271
+ U.current && (U.current(), U.current = null);
272
+ const n = o || be;
273
+ U.current = n(e, {
308
274
  onBlocked: () => {
309
- g((n) => n[e.origin] ? {
310
- ...n,
311
- [e.origin]: { ...n[e.origin], popupBlocked: !0 }
312
- } : n);
275
+ R((t) => t[e.origin] ? {
276
+ ...t,
277
+ [e.origin]: { ...t[e.origin], popupBlocked: !0 }
278
+ } : t);
313
279
  },
314
- onClosed: () => {
315
- if (e.v2) {
316
- te && g((n) => !n[e.origin] || !n[e.origin].silentUrl ? n : {
317
- ...n,
318
- [e.origin]: { ...n[e.origin], status: "silent" }
319
- });
320
- return;
321
- }
322
- o(e.origin);
323
- }
280
+ // A popup closed without posting may still have completed login; the remounted guest re-requests.
281
+ onClosed: () => l(e.origin)
324
282
  });
325
283
  },
326
- [s, o]
327
- ), j = {
328
- // Hosts render UI for interactive entries only; silent resolution is
329
- // invisible by design.
330
- pending: Object.values(f).filter(
284
+ [o, l]
285
+ ), K = {
286
+ pending: Object.values(m).filter(
331
287
  (e) => e.status === "interactive"
332
288
  ),
333
- authorize: K,
334
- approve: Q,
335
- complete: F,
336
- dismiss: T,
337
- originEpochs: P,
289
+ authorize: H,
290
+ approve: Z,
291
+ complete: w,
292
+ dismiss: u,
293
+ originEpochs: v,
338
294
  credentials: W,
339
- unsupported: k
340
- }, q = Object.values(f).filter(
341
- (e) => e.status === "silent" && e.silentUrl
342
- );
343
- return /* @__PURE__ */ $.createElement(J.Provider, { value: j }, t, q.map((e) => /* @__PURE__ */ $.createElement(
344
- "iframe",
345
- {
346
- key: `mm-silent-auth-${e.origin}`,
347
- src: e.silentUrl,
348
- title: `MachineMetrics silent authorization (${e.origin})`,
349
- "aria-hidden": "true",
350
- tabIndex: -1,
351
- style: { display: "none" }
352
- }
353
- )));
295
+ unsupported: T
296
+ };
297
+ return /* @__PURE__ */ P.createElement(J.Provider, { value: K }, r);
354
298
  };
355
- pe.propTypes = {
299
+ ae.propTypes = {
356
300
  children: E.node,
357
301
  launcher: E.func,
358
302
  /**
@@ -365,166 +309,165 @@ pe.propTypes = {
365
309
  */
366
310
  broker: E.func
367
311
  };
368
- const qe = () => V(J), Ie = (t) => {
369
- const { originEpochs: s } = V(J), c = N(t);
370
- return c && s[c] || 0;
371
- }, _e = (t) => {
372
- const { credentials: s } = V(J), c = N(t);
373
- return c && s[c] || null;
374
- }, Ue = (t) => {
375
- const { unsupported: s } = V(J), c = N(t);
376
- return c && s[c] || null;
377
- }, de = "MMEmbeddableZoneProvider requires a boolean `ready` prop (true once the host holds the bearer its credentialBroker needs). Embedded apps will not load until it is provided.", Me = ({
378
- children: t,
379
- authorizationLauncher: s,
380
- credentialBroker: c,
381
- ready: d
312
+ const Oe = () => G(J), Ee = (r) => {
313
+ const { originEpochs: o } = G(J), i = V(r);
314
+ return i && o[i] || 0;
315
+ }, Re = (r) => {
316
+ const { credentials: o } = G(J), i = V(r);
317
+ return i && o[i] || null;
318
+ }, we = (r) => {
319
+ const { unsupported: o } = G(J), i = V(r);
320
+ return i && o[i] || null;
321
+ }, ie = "MMEmbeddableZoneProvider requires a boolean `ready` prop (true once the host holds the bearer its credentialBroker needs). Embedded apps will not load until it is provided.", ke = ({
322
+ children: r,
323
+ authorizationLauncher: o,
324
+ credentialBroker: i,
325
+ ready: p
382
326
  }) => {
383
- const f = d === !0, g = m(!1);
327
+ const m = p === !0, R = g(!1);
384
328
  b(() => {
385
- d !== void 0 || g.current || (g.current = !0, console.error(de), typeof window != "undefined" && typeof window.alert == "function" && window.alert(de));
386
- }, [d]);
387
- const [P, B] = O({}), [W, H] = O({}), k = m({}), z = m({}), y = m({}), U = h((l, u) => {
388
- var o;
389
- return !!((o = y.current[l]) != null && o.has(u));
390
- }, []), x = h((l, u, o) => {
391
- B((a) => ({ ...a, [l]: { origin: u, frameRef: o } }));
392
- }, []), Y = h((l) => {
393
- B((u) => {
394
- const o = { ...u };
395
- return delete o[l], o;
396
- }), H((u) => {
397
- const o = { ...u };
398
- return delete o[l], o;
399
- }), delete y.current[l];
329
+ p !== void 0 || R.current || (R.current = !0, console.error(ie), typeof window != "undefined" && typeof window.alert == "function" && window.alert(ie));
330
+ }, [p]);
331
+ const [v, B] = L({}), [W, j] = L({}), T = g({}), A = g({}), $ = g({}), _ = h((c, l) => {
332
+ var u;
333
+ return !!((u = $.current[c]) != null && u.has(l));
334
+ }, []), U = h((c, l, u) => {
335
+ B((d) => ({ ...d, [c]: { origin: l, frameRef: u } }));
336
+ }, []), q = h((c) => {
337
+ B((l) => {
338
+ const u = { ...l };
339
+ return delete u[c], u;
340
+ }), j((l) => {
341
+ const u = { ...l };
342
+ return delete u[c], u;
343
+ }), delete $.current[c];
400
344
  }, []);
401
345
  b(() => {
402
- const l = (o = [], a, T) => {
403
- o.forEach((p) => p(a, T));
404
- }, u = (o) => {
405
- var A, D, Q, K, j, q, e;
406
- if (!((A = o == null ? void 0 : o.data) != null && A.instanceId))
346
+ const c = (u = [], d, w) => {
347
+ u.forEach((f) => f(d, w));
348
+ }, l = (u) => {
349
+ var Z, H, K, e, n, t, s;
350
+ if (!((Z = u == null ? void 0 : u.data) != null && Z.instanceId))
407
351
  return;
408
- const { instanceId: a, type: T } = o.data, p = P[a], F = (Q = (D = p == null ? void 0 : p.frameRef) == null ? void 0 : D.current) == null ? void 0 : Q.contentWindow;
409
- if (!F || o.source !== F || o.origin !== p.origin)
352
+ const { instanceId: d, type: w } = u.data, f = v[d], C = (K = (H = f == null ? void 0 : f.frameRef) == null ? void 0 : H.current) == null ? void 0 : K.contentWindow;
353
+ if (!C || u.source !== C || u.origin !== f.origin)
410
354
  return;
411
- const w = { origin: o.origin }, I = k.current;
412
- if (T === "response") {
413
- const { callbackId: r, response: n, error: i } = o.data, _ = z.current[r];
414
- _ && (_(n, i), delete z.current[r]);
355
+ const k = { origin: u.origin }, z = T.current;
356
+ if (w === "response") {
357
+ const { callbackId: a, response: Q, error: S } = u.data, Y = A.current[a];
358
+ Y && (Y(Q, S), delete A.current[a]);
415
359
  return;
416
360
  }
417
- if (T === "mark-registered") {
418
- const { requestType: r } = o.data;
419
- y.current[a] || (y.current[a] = /* @__PURE__ */ new Set()), y.current[a].add(r);
361
+ if (w === "mark-registered") {
362
+ const { requestType: a } = u.data;
363
+ $.current[d] || ($.current[d] = /* @__PURE__ */ new Set()), $.current[d].add(a);
420
364
  return;
421
365
  }
422
- T === "ready" && H((r) => ({ ...r, [a]: !0 })), l((K = I[a]) == null ? void 0 : K[T], o.data, w), l((j = I["*"]) == null ? void 0 : j[T], o.data, w), l((q = I[a]) == null ? void 0 : q["*"], o.data, w), l((e = I["*"]) == null ? void 0 : e["*"], o.data, w);
366
+ w === "ready" && j((a) => ({ ...a, [d]: !0 })), c((e = z[d]) == null ? void 0 : e[w], u.data, k), c((n = z["*"]) == null ? void 0 : n[w], u.data, k), c((t = z[d]) == null ? void 0 : t["*"], u.data, k), c((s = z["*"]) == null ? void 0 : s["*"], u.data, k);
423
367
  };
424
- return window.addEventListener("message", u), () => {
425
- window.removeEventListener("message", u);
368
+ return window.addEventListener("message", l), () => {
369
+ window.removeEventListener("message", l);
426
370
  };
427
- }, [P]);
428
- const R = h(
429
- (l, u, o) => {
430
- var T, p;
431
- const a = P[l];
432
- if (!a) {
433
- console.warn(`Origin not set for id: ${l}. Unable to send message.`);
371
+ }, [v]);
372
+ const I = h(
373
+ (c, l, u) => {
374
+ var w, f;
375
+ const d = v[c];
376
+ if (!d) {
377
+ console.warn(`Origin not set for id: ${c}. Unable to send message.`);
434
378
  return;
435
379
  }
436
- (p = (T = a == null ? void 0 : a.frameRef) == null ? void 0 : T.current) != null && p.contentWindow && a.frameRef.current.contentWindow.postMessage(
437
- { type: u, ...o, instanceId: l },
438
- a.origin
380
+ (f = (w = d == null ? void 0 : d.frameRef) == null ? void 0 : w.current) != null && f.contentWindow && d.frameRef.current.contentWindow.postMessage(
381
+ { type: l, ...u, instanceId: c },
382
+ d.origin
439
383
  );
440
384
  },
441
- [P]
442
- ), G = m(0), v = h(() => `${Date.now()}-${++G.current}`, []), M = h(
443
- async (l, u, o = {}) => new Promise((a, T) => {
444
- const p = v(), F = (w, I) => {
445
- delete z.current[p], I ? T(I) : a(w);
385
+ [v]
386
+ ), D = g(0), O = h(() => `${Date.now()}-${++D.current}`, []), x = h(
387
+ async (c, l, u = {}) => new Promise((d, w) => {
388
+ const f = O(), C = (k, z) => {
389
+ delete A.current[f], z ? w(z) : d(k);
446
390
  };
447
- z.current[p] = F, R(l, "request", { callbackId: p, requestType: u, data: o });
391
+ A.current[f] = C, I(c, "request", { callbackId: f, requestType: l, data: u });
448
392
  }),
449
- [R]
450
- ), L = h(
451
- (l, u) => {
452
- R(l, "load-options", u);
393
+ [I]
394
+ ), M = h(
395
+ (c, l) => {
396
+ I(c, "load-options", l);
453
397
  },
454
- [R]
455
- ), S = h(
456
- (l, u) => {
457
- R(l, "validate", u);
398
+ [I]
399
+ ), y = h(
400
+ (c, l) => {
401
+ I(c, "validate", l);
458
402
  },
459
- [R]
460
- ), C = ge(
403
+ [I]
404
+ ), F = fe(
461
405
  () => ({
462
- registerFrame: x,
463
- unregisterFrame: Y,
464
- sendMessage: R,
465
- sendRequest: M,
466
- loadOptions: L,
467
- validate: S,
468
- hasHandler: U,
406
+ registerFrame: U,
407
+ unregisterFrame: q,
408
+ sendMessage: I,
409
+ sendRequest: x,
410
+ loadOptions: M,
411
+ validate: y,
412
+ hasHandler: _,
469
413
  readyFrames: W,
470
- ready: f,
471
- addListener: (l, u, o) => (k.current[l] || (k.current[l] = {}), k.current[l][u] || (k.current[l][u] = []), k.current[l][u].push(o), () => {
472
- k.current[l][u] = k.current[l][u].filter((a) => a !== o);
414
+ ready: m,
415
+ addListener: (c, l, u) => (T.current[c] || (T.current[c] = {}), T.current[c][l] || (T.current[c][l] = []), T.current[c][l].push(u), () => {
416
+ T.current[c][l] = T.current[c][l].filter((d) => d !== u);
473
417
  })
474
418
  }),
475
419
  [
420
+ U,
421
+ q,
422
+ I,
476
423
  x,
477
- Y,
478
- R,
479
424
  M,
480
- L,
481
- S,
482
- U,
425
+ y,
426
+ _,
483
427
  W,
484
- f
428
+ m
485
429
  ]
486
430
  );
487
- return /* @__PURE__ */ $.createElement(ne.Provider, { value: C }, /* @__PURE__ */ $.createElement(
488
- pe,
431
+ return /* @__PURE__ */ P.createElement(ee.Provider, { value: F }, /* @__PURE__ */ P.createElement(
432
+ ae,
489
433
  {
490
- launcher: s,
491
- broker: c
434
+ launcher: o,
435
+ broker: i
492
436
  },
493
- t
437
+ r
494
438
  ));
495
- }, X = (t, s, c) => {
496
- const d = V(ne);
497
- if (d === null)
439
+ }, X = (r, o, i) => {
440
+ const p = G(ee);
441
+ if (p === null)
498
442
  throw new Error(
499
443
  "useEmbeddedEffect must be used within a MMEmbeddableZoneProvider"
500
444
  );
501
- const f = m(c);
445
+ const m = g(i);
502
446
  b(() => {
503
- f.current = c;
504
- }, [c]), b(() => {
505
- if (!(!t || !s)) {
506
- if (s.startsWith("key:")) {
507
- const g = s.substring(4);
508
- return d.readyFrames[t] && d.sendMessage(t, "subscribe-key", { keyChord: g }), d.addListener(
509
- t,
510
- `key-pressed:${g}`,
511
- (...B) => f.current(...B)
447
+ m.current = i;
448
+ }, [i]), b(() => {
449
+ if (!(!r || !o)) {
450
+ if (o.startsWith("key:")) {
451
+ const R = o.substring(4);
452
+ return p.readyFrames[r] && p.sendMessage(r, "subscribe-key", { keyChord: R }), p.addListener(
453
+ r,
454
+ `key-pressed:${R}`,
455
+ (...B) => m.current(...B)
512
456
  );
513
457
  }
514
- return d.addListener(
515
- t,
516
- s,
517
- (...g) => f.current(...g)
458
+ return p.addListener(
459
+ r,
460
+ o,
461
+ (...R) => m.current(...R)
518
462
  );
519
463
  }
520
- }, [d, t, s]);
464
+ }, [p, r, o]);
521
465
  };
522
- Me.propTypes = {
466
+ ke.propTypes = {
523
467
  children: E.node.isRequired,
524
468
  /**
525
- * Required. True once the host holds the bearer its `credentialBroker` sends; every
526
- * MMEmbeddableZone below stays unmounted (no iframe src) until then, so the first broker call
527
- * always carries a token. Missing prop = not ready, plus a one-time alert.
469
+ * Required. True once the host holds its bearer; zones mount no iframe until then. Missing =
470
+ * not ready, plus a one-time alert.
528
471
  */
529
472
  ready: E.bool.isRequired,
530
473
  /**
@@ -537,19 +480,19 @@ Me.propTypes = {
537
480
  /**
538
481
  * Optional credential broker for hosts that are first-party MachineMetrics clients
539
482
  * (`async (request, { approve }) => result`, see EmbeddedAuthorizationManager). When present,
540
- * v2 credential requests are brokered server-side (no popup, no hidden frame) and consent is
483
+ * v2 credential requests are brokered server-side (no popup) and consent is
541
484
  * rendered natively by the host from the broker's `client` identity.
542
485
  */
543
486
  credentialBroker: E.func
544
487
  };
545
- const se = ie.default || ie, Le = 1e4, Ce = "credentials", Ae = (t, s) => `${t}/mm-embedded-interop?id=${encodeURIComponent(s)}&origin=${encodeURIComponent(
488
+ const re = te.default || te, Te = 1e4, Ie = "credentials", _e = (r, o) => `${r}/mm-embedded-interop?id=${encodeURIComponent(o)}&origin=${encodeURIComponent(
546
489
  window.location.origin
547
- )}&caps=${Ce}`, Oe = se.iframe`
490
+ )}&caps=${Ie}`, Me = re.iframe`
548
491
  width: 100%;
549
492
  height: 100%;
550
493
  border: none;
551
- visibility: ${(t) => t.$isReady ? "visible" : "hidden"};
552
- `, ze = se.div`
494
+ visibility: ${(r) => r.$isReady ? "visible" : "hidden"};
495
+ `, ye = re.div`
553
496
  width: 100%;
554
497
  height: 100%;
555
498
  display: flex;
@@ -562,39 +505,39 @@ const se = ie.default || ie, Le = 1e4, Ce = "credentials", Ae = (t, s) => `${t}/
562
505
  text-align: center;
563
506
  color: #555;
564
507
  font-size: 14px;
565
- `, xe = (t) => {
566
- const s = t && t.origin || "This app", c = t && t.reason || "";
567
- switch (c) {
508
+ `, Ce = (r) => {
509
+ const o = r && r.origin || "This app", i = r && r.reason || "";
510
+ switch (i) {
568
511
  case "broker:scope_above_ceiling":
569
512
  return {
570
- title: `${s} can’t be authorized here`,
513
+ title: `${o} can’t be authorized here`,
571
514
  detail: "It asks for permissions your role doesn’t have."
572
515
  };
573
516
  case "broker:origin_mismatch":
574
517
  case "broker:unknown_client":
575
518
  return {
576
- title: `${s} can’t be authorized here`,
519
+ title: `${o} can’t be authorized here`,
577
520
  detail: "It isn’t registered to run at this address."
578
521
  };
579
522
  case "broker:cross_company_principal":
580
523
  return {
581
- title: `${s} can’t be authorized here`,
524
+ title: `${o} can’t be authorized here`,
582
525
  detail: "It can’t be authorized for this account."
583
526
  };
584
527
  default:
585
- return c.startsWith("broker:") ? {
586
- title: `${s} can’t be authorized here`,
528
+ return i.startsWith("broker:") ? {
529
+ title: `${o} can’t be authorized here`,
587
530
  detail: "Authorization was refused."
588
531
  } : {
589
- title: `${s} can’t be embedded here`,
532
+ title: `${o} can’t be embedded here`,
590
533
  detail: "It needs an update to support embedding from a different domain."
591
534
  };
592
535
  }
593
- }, he = ({ entry: t }) => {
594
- const s = xe(t);
595
- return /* @__PURE__ */ $.createElement(ze, { "data-reason": t && t.reason || void 0 }, /* @__PURE__ */ $.createElement("div", { style: { fontWeight: 600 } }, s.title), /* @__PURE__ */ $.createElement("div", { style: { fontSize: 12, color: "#888" } }, s.detail));
536
+ }, le = ({ entry: r }) => {
537
+ const o = Ce(r);
538
+ return /* @__PURE__ */ P.createElement(ye, { "data-reason": r && r.reason || void 0 }, /* @__PURE__ */ P.createElement("div", { style: { fontWeight: 600 } }, o.title), /* @__PURE__ */ P.createElement("div", { style: { fontSize: 12, color: "#888" } }, o.detail));
596
539
  };
597
- he.propTypes = {
540
+ le.propTypes = {
598
541
  entry: E.shape({
599
542
  origin: E.string,
600
543
  name: E.string,
@@ -602,115 +545,115 @@ he.propTypes = {
602
545
  detail: E.object
603
546
  })
604
547
  };
605
- const $e = se.div`
548
+ const Le = re.div`
606
549
  height: 100%;
607
550
  display: flex;
608
551
  flex: 1;
609
552
  align-items: center;
610
553
  justify-content: center;
611
- `, ye = () => /* @__PURE__ */ $.createElement($e, null, /* @__PURE__ */ $.createElement("div", { style: { textAlign: "center" } }, "This app couldn’t be loaded as an embeddable widget.")), Se = ({
612
- id: t,
613
- src: s,
614
- path: c,
615
- onInit: d = () => {
554
+ `, Ae = () => /* @__PURE__ */ P.createElement(Le, null, /* @__PURE__ */ P.createElement("div", { style: { textAlign: "center" } }, "This app couldn’t be loaded as an embeddable widget.")), Ue = ({
555
+ id: r,
556
+ src: o,
557
+ path: i,
558
+ onInit: p = () => {
616
559
  },
617
- onTimeout: f,
618
- context: g = {},
619
- params: P = {},
560
+ onTimeout: m,
561
+ context: R = {},
562
+ params: v = {},
620
563
  renderUnsupported: B,
621
564
  renderTimeout: W,
622
- ...H
565
+ ...j
623
566
  }) => {
624
- if ("isConfiguring" in H)
567
+ if ("isConfiguring" in j)
625
568
  return console.error(
626
569
  "isConfiguring must be passed via the params prop to MMEmbeddableZone"
627
570
  ), null;
628
- if ("colorMode" in g)
571
+ if ("colorMode" in R)
629
572
  return console.error(
630
573
  "colorMode must be passed via the params prop to MMEmbeddableZone"
631
574
  ), null;
632
- if ("isFullScreen" in g)
575
+ if ("isFullScreen" in R)
633
576
  return console.error(
634
577
  "isFullScreen must be passed via the params prop to MMEmbeddableZone"
635
578
  ), null;
636
- const k = m(), [z, y] = O(), [U, x] = O(0), [Y, R] = O(!1), [G, v] = O(!1), M = Ie(s), L = _e(s), S = Ue(s), [C, l] = O(0), [u, o] = O(null), { registerFrame: a, unregisterFrame: T, sendMessage: p, ready: F } = V(
637
- ne
638
- ), [w, I] = O(), A = m(), D = m(f), Q = m(d), K = m(!1), j = h(() => {
639
- K.current = !1, clearTimeout(A.current), x(0), R(!1), v(!1), o(null);
579
+ const T = g(), [A, $] = L(), [_, U] = L(0), [q, I] = L(!1), [D, O] = L(!1), x = Ee(o), M = Re(o), y = we(o), [F, c] = L(0), [l, u] = L(null), { registerFrame: d, unregisterFrame: w, sendMessage: f, ready: C } = G(
580
+ ee
581
+ ), [k, z] = L(), Z = g(), H = g(m), K = g(p), e = g(!1), n = h(() => {
582
+ e.current = !1, clearTimeout(Z.current), U(0), I(!1), O(!1), u(null);
640
583
  }, []);
641
584
  b(() => {
642
- (M > 0 || C > 0) && j();
643
- }, [M, C, j]), b(() => {
644
- D.current = f;
645
- }, [f]), b(() => {
646
- Q.current = d;
647
- }, [d]), b(() => {
648
- U && p(t, "set-context", {
585
+ (x > 0 || F > 0) && n();
586
+ }, [x, F, n]), b(() => {
587
+ H.current = m;
588
+ }, [m]), b(() => {
589
+ K.current = p;
590
+ }, [p]), b(() => {
591
+ _ && f(r, "set-context", {
649
592
  context: {
650
- ...g
593
+ ...R
651
594
  }
652
595
  });
653
- }, [g, t, U]), b(() => {
654
- U && p(t, "set-params", { params: P });
655
- }, [P, t, U]), b(() => {
656
- c !== void 0 && I((c == null ? void 0 : c.indexOf("/")) === 0 ? c : `/${c}`);
657
- }, [c]), b(() => {
658
- w === void 0 || !U || p(t, "navigate", { path: w });
659
- }, [w, U, t, p]), b(() => {
660
- if (!s || !t || !k)
596
+ }, [R, r, _]), b(() => {
597
+ _ && f(r, "set-params", { params: v });
598
+ }, [v, r, _]), b(() => {
599
+ i !== void 0 && z((i == null ? void 0 : i.indexOf("/")) === 0 ? i : `/${i}`);
600
+ }, [i]), b(() => {
601
+ k === void 0 || !_ || f(r, "navigate", { path: k });
602
+ }, [k, _, r, f]), b(() => {
603
+ if (!o || !r || !T)
661
604
  return;
662
- if (!F) {
663
- j(), y(void 0);
605
+ if (!C) {
606
+ n(), $(void 0);
664
607
  return;
665
608
  }
666
- j();
667
- const r = new URL(s);
668
- return a(t, r.origin, k), Q.current(), y(Ae(r.origin, t)), () => {
669
- T(t);
609
+ n();
610
+ const a = new URL(o);
611
+ return d(r, a.origin, T), K.current(), $(_e(a.origin, r)), () => {
612
+ w(r);
670
613
  };
671
- }, [s, t, F, a, k, j]), b(() => {
672
- if (!(!z || K.current))
673
- return A.current = setTimeout(() => {
674
- R(!0), D.current && D.current();
675
- }, Le), () => clearTimeout(A.current);
676
- }, [z, s, M, C]);
677
- const q = h(() => {
678
- K.current = !0, clearTimeout(A.current), R(!1);
614
+ }, [o, r, C, d, T, n]), b(() => {
615
+ if (!(!A || e.current))
616
+ return Z.current = setTimeout(() => {
617
+ I(!0), H.current && H.current();
618
+ }, Te), () => clearTimeout(Z.current);
619
+ }, [A, o, x, F]);
620
+ const t = h(() => {
621
+ e.current = !0, clearTimeout(Z.current), I(!1);
679
622
  }, []);
680
- X(t, "init", (r) => {
681
- q(), Array.isArray(r == null ? void 0 : r.acceptsCredentials) && o(r.acceptsCredentials);
682
- }), X(t, "authorize", q), X(t, "login", q), X(t, "credential-request", () => {
683
- q(), v(!0);
623
+ X(r, "init", (a) => {
624
+ t(), Array.isArray(a == null ? void 0 : a.acceptsCredentials) && u(a.acceptsCredentials);
625
+ }), X(r, "authorize", t), X(r, "login", t), X(r, "credential-request", () => {
626
+ t(), O(!0);
684
627
  }), b(() => {
685
- if (!G || !L)
628
+ if (!D || !M)
686
629
  return;
687
- const r = u;
688
- if (Array.isArray(r) && !r.includes(L.kind))
630
+ const a = l;
631
+ if (Array.isArray(a) && !a.includes(M.kind))
689
632
  return;
690
- const n = L.kind === "access_token" ? { accessToken: L.accessToken } : {};
691
- p(t, "credential", { ...n, credential: L });
692
- }, [G, L, u, t, p]), X(t, "ready", () => {
693
- q(), x((r) => r + 1);
633
+ const Q = M.kind === "access_token" ? { accessToken: M.accessToken } : {};
634
+ f(r, "credential", { ...Q, credential: M });
635
+ }, [D, M, l, r, f]), X(r, "ready", () => {
636
+ t(), U((a) => a + 1);
694
637
  });
695
- const e = m();
696
- return X(t, "heartbeat", () => {
697
- e.current && clearTimeout(e.current), e.current = setTimeout(() => {
698
- l((r) => r + 1);
638
+ const s = g();
639
+ return X(r, "heartbeat", () => {
640
+ s.current && clearTimeout(s.current), s.current = setTimeout(() => {
641
+ c((a) => a + 1);
699
642
  }, 6e3);
700
643
  }), b(() => () => {
701
- e.current && clearTimeout(e.current);
702
- }, []), S ? B ? B(S) : /* @__PURE__ */ $.createElement(he, { entry: S }) : Y && !U ? W ? W() : /* @__PURE__ */ $.createElement(ye, null) : /* @__PURE__ */ $.createElement(
703
- Oe,
644
+ s.current && clearTimeout(s.current);
645
+ }, []), y ? B ? B(y) : /* @__PURE__ */ P.createElement(le, { entry: y }) : q && !_ ? W ? W() : /* @__PURE__ */ P.createElement(Ae, null) : /* @__PURE__ */ P.createElement(
646
+ Me,
704
647
  {
705
- key: `auth-epoch-${M}-frame-${C}`,
706
- $isReady: U,
707
- ref: k,
708
- src: z,
709
- ...H
648
+ key: `auth-epoch-${x}-frame-${F}`,
649
+ $isReady: _,
650
+ ref: T,
651
+ src: A,
652
+ ...j
710
653
  }
711
654
  );
712
655
  };
713
- Se.propTypes = {
656
+ Ue.propTypes = {
714
657
  id: E.string,
715
658
  src: E.string.isRequired,
716
659
  path: E.string,
@@ -730,18 +673,18 @@ Se.propTypes = {
730
673
  renderTimeout: E.func
731
674
  };
732
675
  export {
733
- be as CREDENTIAL_KIND_ACCESS_TOKEN,
676
+ pe as CREDENTIAL_KIND_ACCESS_TOKEN,
734
677
  J as EmbeddedAuthorizationContext,
735
- Se as MMEmbeddableZone,
736
- ne as MMEmbeddableZoneContext,
737
- Me as MMEmbeddableZoneProvider,
738
- ae as isCrossSite,
739
- ce as normalizeCredential,
740
- ke as popupAuthorizationLauncher,
741
- xe as unsupportedCopy,
742
- qe as useEmbeddedAuthorizations,
743
- _e as useEmbeddedCredential,
678
+ Ue as MMEmbeddableZone,
679
+ ee as MMEmbeddableZoneContext,
680
+ ke as MMEmbeddableZoneProvider,
681
+ ce as isCrossSite,
682
+ ne as normalizeCredential,
683
+ be as popupAuthorizationLauncher,
684
+ Ce as unsupportedCopy,
685
+ Oe as useEmbeddedAuthorizations,
686
+ Re as useEmbeddedCredential,
744
687
  X as useEmbeddedEffect,
745
- Ie as useEmbeddedOriginEpoch,
746
- Ue as useEmbeddedUnsupported
688
+ Ee as useEmbeddedOriginEpoch,
689
+ we as useEmbeddedUnsupported
747
690
  };