@weavix/sdk-react 0.0.1 → 0.0.3

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.
Files changed (33) hide show
  1. package/README.md +36 -28
  2. package/dist/index.mjs +528 -835
  3. package/dist/index.mjs.map +1 -1
  4. package/dist/plugin-sdk-react/src/__tests__/setup.d.ts +1 -0
  5. package/dist/plugin-sdk-react/src/__tests__/setup.d.ts.map +1 -0
  6. package/dist/plugin-sdk-react/src/components/ErrorBoundary.d.ts +17 -0
  7. package/dist/plugin-sdk-react/src/components/ErrorBoundary.d.ts.map +1 -0
  8. package/dist/plugin-sdk-react/src/components/PluginError.d.ts +9 -0
  9. package/dist/plugin-sdk-react/src/components/PluginError.d.ts.map +1 -0
  10. package/dist/plugin-sdk-react/src/components/PluginLoader.d.ts +6 -0
  11. package/dist/plugin-sdk-react/src/components/PluginLoader.d.ts.map +1 -0
  12. package/dist/plugin-sdk-react/src/components/PluginProvider.d.ts +107 -0
  13. package/dist/plugin-sdk-react/src/components/PluginProvider.d.ts.map +1 -0
  14. package/dist/plugin-sdk-react/src/hooks/useConfirm.d.ts +6 -0
  15. package/dist/plugin-sdk-react/src/hooks/useConfirm.d.ts.map +1 -0
  16. package/dist/plugin-sdk-react/src/hooks/useContext.d.ts +20 -0
  17. package/dist/plugin-sdk-react/src/hooks/useContext.d.ts.map +1 -0
  18. package/dist/plugin-sdk-react/src/hooks/useIsYateam.d.ts +13 -0
  19. package/dist/plugin-sdk-react/src/hooks/useIsYateam.d.ts.map +1 -0
  20. package/dist/plugin-sdk-react/src/hooks/useLanguage.d.ts +13 -0
  21. package/dist/plugin-sdk-react/src/hooks/useLanguage.d.ts.map +1 -0
  22. package/dist/plugin-sdk-react/src/hooks/useLocalizedString.d.ts +6 -0
  23. package/dist/plugin-sdk-react/src/hooks/useLocalizedString.d.ts.map +1 -0
  24. package/dist/plugin-sdk-react/src/hooks/useTheme.d.ts +14 -0
  25. package/dist/plugin-sdk-react/src/hooks/useTheme.d.ts.map +1 -0
  26. package/dist/plugin-sdk-react/src/hooks/useToaster.d.ts +8 -0
  27. package/dist/plugin-sdk-react/src/hooks/useToaster.d.ts.map +1 -0
  28. package/dist/plugin-sdk-react/src/hooks/useUserId.d.ts +13 -0
  29. package/dist/plugin-sdk-react/src/hooks/useUserId.d.ts.map +1 -0
  30. package/dist/plugin-sdk-react/src/index.d.ts +16 -0
  31. package/dist/plugin-sdk-react/src/index.d.ts.map +1 -0
  32. package/package.json +7 -13
  33. package/dist/index.d.ts +0 -265
package/dist/index.mjs CHANGED
@@ -1,121 +1,121 @@
1
- import He, { Component as Pt, useCallback as Ye, useState as D, useEffect as N, createContext as Ot, useRef as xt, useMemo as kt, useContext as jt } from "react";
2
- import { on as At, setHandler as Lt, hostApi as P, dispatchHostEvent as B } from "@weavix/sdk-core";
3
- import { METHOD_NOT_SUPPORTED as yr, MISSING_REQUIRED_SCOPE as Er, PLUGIN_ID_IS_NOT_CORRECT as br, PLUGIN_ID_OR_SLOT_NOT_PROVIDED as Rr, PluginActionError as _r, UNKNOWN_ERROR as wr, VALIDATION_ERROR as Ir, getField as Sr, getLocalizedString as Tr, hostApi as Cr, trackerApi as Pr, uiApi as Or } from "@weavix/sdk-core";
4
- class Dt extends Pt {
5
- static getDerivedStateFromError(r) {
6
- return { hasError: !0, error: r };
1
+ import Ye, { Component as Er, useState as A, useEffect as Y, createContext as Rr, useRef as xr, useMemo as Pr, useContext as Cr, useCallback as $e } from "react";
2
+ import { on as q, hostApi as m, setHandler as Tr, uiApi as le, dispatchHostEvent as V, getLocalizedString as Or } from "@weavix/sdk-core";
3
+ import { METHOD_NOT_SUPPORTED as Qr, MISSING_REQUIRED_SCOPE as Zr, PLUGIN_ID_IS_NOT_CORRECT as et, PLUGIN_ID_OR_SLOT_NOT_PROVIDED as rt, PluginActionError as tt, UNKNOWN_ERROR as nt, VALIDATION_ERROR as at, dispatchHostEvent as it, getField as ot, getLocalizedString as st, hostApi as ut, on as lt, uiApi as ct } from "@weavix/sdk-core";
4
+ class wr extends Er {
5
+ static getDerivedStateFromError(a) {
6
+ return { hasError: !0, error: a };
7
7
  }
8
- constructor(r) {
9
- super(r), this.state = { hasError: !1, error: null };
8
+ constructor(a) {
9
+ super(a), this.state = { hasError: !1, error: null };
10
10
  }
11
- componentDidCatch(r, a) {
12
- console.error("ErrorBoundary caught an error:", r, a);
11
+ componentDidCatch(a, c) {
12
+ console.error("ErrorBoundary caught an error:", a, c);
13
13
  }
14
14
  render() {
15
15
  return this.state.hasError && this.state.error ? this.props.fallback(this.state.error) : this.props.children;
16
16
  }
17
17
  }
18
- var Q = { exports: {} }, W = {};
19
- var Ue;
20
- function Mt() {
21
- if (Ue) return W;
22
- Ue = 1;
23
- var s = He, r = /* @__PURE__ */ Symbol.for("react.element"), a = /* @__PURE__ */ Symbol.for("react.fragment"), i = Object.prototype.hasOwnProperty, u = s.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, d = { key: !0, ref: !0, __self: !0, __source: !0 };
24
- function m(p, f, y) {
25
- var v, w = {}, O = null, x = null;
26
- y !== void 0 && (O = "" + y), f.key !== void 0 && (O = "" + f.key), f.ref !== void 0 && (x = f.ref);
27
- for (v in f) i.call(f, v) && !d.hasOwnProperty(v) && (w[v] = f[v]);
28
- if (p && p.defaultProps) for (v in f = p.defaultProps, f) w[v] === void 0 && (w[v] = f[v]);
29
- return { $$typeof: r, type: p, key: O, ref: x, props: w, _owner: u.current };
30
- }
31
- return W.Fragment = a, W.jsx = m, W.jsxs = m, W;
18
+ var ee = { exports: {} }, H = {};
19
+ var Le;
20
+ function Sr() {
21
+ if (Le) return H;
22
+ Le = 1;
23
+ var u = Ye, a = /* @__PURE__ */ Symbol.for("react.element"), c = /* @__PURE__ */ Symbol.for("react.fragment"), f = Object.prototype.hasOwnProperty, _ = u.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, j = { key: !0, ref: !0, __self: !0, __source: !0 };
24
+ function I(P, v, k) {
25
+ var b, O = {}, w = null, C = null;
26
+ k !== void 0 && (w = "" + k), v.key !== void 0 && (w = "" + v.key), v.ref !== void 0 && (C = v.ref);
27
+ for (b in v) f.call(v, b) && !j.hasOwnProperty(b) && (O[b] = v[b]);
28
+ if (P && P.defaultProps) for (b in v = P.defaultProps, v) O[b] === void 0 && (O[b] = v[b]);
29
+ return { $$typeof: a, type: P, key: w, ref: C, props: O, _owner: _.current };
30
+ }
31
+ return H.Fragment = c, H.jsx = I, H.jsxs = I, H;
32
32
  }
33
- var V = {};
34
- var Ne;
35
- function Ut() {
36
- return Ne || (Ne = 1, process.env.NODE_ENV !== "production" && (function() {
37
- var s = He, r = /* @__PURE__ */ Symbol.for("react.element"), a = /* @__PURE__ */ Symbol.for("react.portal"), i = /* @__PURE__ */ Symbol.for("react.fragment"), u = /* @__PURE__ */ Symbol.for("react.strict_mode"), d = /* @__PURE__ */ Symbol.for("react.profiler"), m = /* @__PURE__ */ Symbol.for("react.provider"), p = /* @__PURE__ */ Symbol.for("react.context"), f = /* @__PURE__ */ Symbol.for("react.forward_ref"), y = /* @__PURE__ */ Symbol.for("react.suspense"), v = /* @__PURE__ */ Symbol.for("react.suspense_list"), w = /* @__PURE__ */ Symbol.for("react.memo"), O = /* @__PURE__ */ Symbol.for("react.lazy"), x = /* @__PURE__ */ Symbol.for("react.offscreen"), C = Symbol.iterator, F = "@@iterator";
38
- function A(e) {
33
+ var G = {};
34
+ var Fe;
35
+ function jr() {
36
+ return Fe || (Fe = 1, process.env.NODE_ENV !== "production" && (function() {
37
+ var u = Ye, a = /* @__PURE__ */ Symbol.for("react.element"), c = /* @__PURE__ */ Symbol.for("react.portal"), f = /* @__PURE__ */ Symbol.for("react.fragment"), _ = /* @__PURE__ */ Symbol.for("react.strict_mode"), j = /* @__PURE__ */ Symbol.for("react.profiler"), I = /* @__PURE__ */ Symbol.for("react.provider"), P = /* @__PURE__ */ Symbol.for("react.context"), v = /* @__PURE__ */ Symbol.for("react.forward_ref"), k = /* @__PURE__ */ Symbol.for("react.suspense"), b = /* @__PURE__ */ Symbol.for("react.suspense_list"), O = /* @__PURE__ */ Symbol.for("react.memo"), w = /* @__PURE__ */ Symbol.for("react.lazy"), C = /* @__PURE__ */ Symbol.for("react.offscreen"), x = Symbol.iterator, $ = "@@iterator";
38
+ function S(e) {
39
39
  if (e === null || typeof e != "object")
40
40
  return null;
41
- var t = C && e[C] || e[F];
42
- return typeof t == "function" ? t : null;
41
+ var r = x && e[x] || e[$];
42
+ return typeof r == "function" ? r : null;
43
43
  }
44
- var I = s.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
45
- function R(e) {
44
+ var y = u.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
45
+ function h(e) {
46
46
  {
47
- for (var t = arguments.length, n = new Array(t > 1 ? t - 1 : 0), o = 1; o < t; o++)
48
- n[o - 1] = arguments[o];
49
- ee("error", e, n);
47
+ for (var r = arguments.length, t = new Array(r > 1 ? r - 1 : 0), n = 1; n < r; n++)
48
+ t[n - 1] = arguments[n];
49
+ L("error", e, t);
50
50
  }
51
51
  }
52
- function ee(e, t, n) {
52
+ function L(e, r, t) {
53
53
  {
54
- var o = I.ReactDebugCurrentFrame, g = o.getStackAddendum();
55
- g !== "" && (t += "%s", n = n.concat([g]));
56
- var h = n.map(function(c) {
57
- return String(c);
54
+ var n = y.ReactDebugCurrentFrame, s = n.getStackAddendum();
55
+ s !== "" && (r += "%s", t = t.concat([s]));
56
+ var l = t.map(function(o) {
57
+ return String(o);
58
58
  });
59
- h.unshift("Warning: " + t), Function.prototype.apply.call(console[e], console, h);
59
+ l.unshift("Warning: " + r), Function.prototype.apply.call(console[e], console, l);
60
60
  }
61
61
  }
62
- var te = !1, Ke = !1, Ge = !1, Xe = !1, Qe = !1, fe;
63
- fe = /* @__PURE__ */ Symbol.for("react.module.reference");
64
- function Ze(e) {
65
- return !!(typeof e == "string" || typeof e == "function" || e === i || e === d || Qe || e === u || e === y || e === v || Xe || e === x || te || Ke || Ge || typeof e == "object" && e !== null && (e.$$typeof === O || e.$$typeof === w || e.$$typeof === m || e.$$typeof === p || e.$$typeof === f || // This needs to include all possible module reference object
62
+ var F = !1, B = !1, Ve = !1, qe = !1, Be = !1, ce;
63
+ ce = /* @__PURE__ */ Symbol.for("react.module.reference");
64
+ function ze(e) {
65
+ return !!(typeof e == "string" || typeof e == "function" || e === f || e === j || Be || e === _ || e === k || e === b || qe || e === C || F || B || Ve || typeof e == "object" && e !== null && (e.$$typeof === w || e.$$typeof === O || e.$$typeof === I || e.$$typeof === P || e.$$typeof === v || // This needs to include all possible module reference object
66
66
  // types supported by any Flight configuration anywhere since
67
67
  // we don't know which Flight build this will end up being used
68
68
  // with.
69
- e.$$typeof === fe || e.getModuleId !== void 0));
69
+ e.$$typeof === ce || e.getModuleId !== void 0));
70
70
  }
71
- function et(e, t, n) {
72
- var o = e.displayName;
73
- if (o)
74
- return o;
75
- var g = t.displayName || t.name || "";
76
- return g !== "" ? n + "(" + g + ")" : n;
71
+ function Je(e, r, t) {
72
+ var n = e.displayName;
73
+ if (n)
74
+ return n;
75
+ var s = r.displayName || r.name || "";
76
+ return s !== "" ? t + "(" + s + ")" : t;
77
77
  }
78
- function ge(e) {
78
+ function fe(e) {
79
79
  return e.displayName || "Context";
80
80
  }
81
- function L(e) {
81
+ function D(e) {
82
82
  if (e == null)
83
83
  return null;
84
- if (typeof e.tag == "number" && R("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof e == "function")
84
+ if (typeof e.tag == "number" && h("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof e == "function")
85
85
  return e.displayName || e.name || null;
86
86
  if (typeof e == "string")
87
87
  return e;
88
88
  switch (e) {
89
- case i:
89
+ case f:
90
90
  return "Fragment";
91
- case a:
91
+ case c:
92
92
  return "Portal";
93
- case d:
93
+ case j:
94
94
  return "Profiler";
95
- case u:
95
+ case _:
96
96
  return "StrictMode";
97
- case y:
97
+ case k:
98
98
  return "Suspense";
99
- case v:
99
+ case b:
100
100
  return "SuspenseList";
101
101
  }
102
102
  if (typeof e == "object")
103
103
  switch (e.$$typeof) {
104
- case p:
104
+ case P:
105
+ var r = e;
106
+ return fe(r) + ".Consumer";
107
+ case I:
105
108
  var t = e;
106
- return ge(t) + ".Consumer";
107
- case m:
108
- var n = e;
109
- return ge(n._context) + ".Provider";
110
- case f:
111
- return et(e, e.render, "ForwardRef");
112
- case w:
113
- var o = e.displayName || null;
114
- return o !== null ? o : L(e.type) || "Memo";
115
- case O: {
116
- var g = e, h = g._payload, c = g._init;
109
+ return fe(t._context) + ".Provider";
110
+ case v:
111
+ return Je(e, e.render, "ForwardRef");
112
+ case O:
113
+ var n = e.displayName || null;
114
+ return n !== null ? n : D(e.type) || "Memo";
115
+ case w: {
116
+ var s = e, l = s._payload, o = s._init;
117
117
  try {
118
- return L(c(h));
118
+ return D(o(l));
119
119
  } catch {
120
120
  return null;
121
121
  }
@@ -123,18 +123,18 @@ function Ut() {
123
123
  }
124
124
  return null;
125
125
  }
126
- var M = Object.assign, H = 0, he, ve, me, pe, ye, Ee, be;
127
- function Re() {
126
+ var N = Object.assign, z = 0, de, ve, ge, he, pe, me, be;
127
+ function _e() {
128
128
  }
129
- Re.__reactDisabledLog = !0;
130
- function tt() {
129
+ _e.__reactDisabledLog = !0;
130
+ function He() {
131
131
  {
132
- if (H === 0) {
133
- he = console.log, ve = console.info, me = console.warn, pe = console.error, ye = console.group, Ee = console.groupCollapsed, be = console.groupEnd;
132
+ if (z === 0) {
133
+ de = console.log, ve = console.info, ge = console.warn, he = console.error, pe = console.group, me = console.groupCollapsed, be = console.groupEnd;
134
134
  var e = {
135
135
  configurable: !0,
136
136
  enumerable: !0,
137
- value: Re,
137
+ value: _e,
138
138
  writable: !0
139
139
  };
140
140
  Object.defineProperties(console, {
@@ -147,332 +147,332 @@ function Ut() {
147
147
  groupEnd: e
148
148
  });
149
149
  }
150
- H++;
150
+ z++;
151
151
  }
152
152
  }
153
- function rt() {
153
+ function Ge() {
154
154
  {
155
- if (H--, H === 0) {
155
+ if (z--, z === 0) {
156
156
  var e = {
157
157
  configurable: !0,
158
158
  enumerable: !0,
159
159
  writable: !0
160
160
  };
161
161
  Object.defineProperties(console, {
162
- log: M({}, e, {
163
- value: he
162
+ log: N({}, e, {
163
+ value: de
164
164
  }),
165
- info: M({}, e, {
165
+ info: N({}, e, {
166
166
  value: ve
167
167
  }),
168
- warn: M({}, e, {
169
- value: me
168
+ warn: N({}, e, {
169
+ value: ge
170
170
  }),
171
- error: M({}, e, {
172
- value: pe
171
+ error: N({}, e, {
172
+ value: he
173
173
  }),
174
- group: M({}, e, {
175
- value: ye
174
+ group: N({}, e, {
175
+ value: pe
176
176
  }),
177
- groupCollapsed: M({}, e, {
178
- value: Ee
177
+ groupCollapsed: N({}, e, {
178
+ value: me
179
179
  }),
180
- groupEnd: M({}, e, {
180
+ groupEnd: N({}, e, {
181
181
  value: be
182
182
  })
183
183
  });
184
184
  }
185
- H < 0 && R("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
185
+ z < 0 && h("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
186
186
  }
187
187
  }
188
- var re = I.ReactCurrentDispatcher, ne;
189
- function J(e, t, n) {
188
+ var re = y.ReactCurrentDispatcher, te;
189
+ function K(e, r, t) {
190
190
  {
191
- if (ne === void 0)
191
+ if (te === void 0)
192
192
  try {
193
193
  throw Error();
194
- } catch (g) {
195
- var o = g.stack.trim().match(/\n( *(at )?)/);
196
- ne = o && o[1] || "";
194
+ } catch (s) {
195
+ var n = s.stack.trim().match(/\n( *(at )?)/);
196
+ te = n && n[1] || "";
197
197
  }
198
198
  return `
199
- ` + ne + e;
199
+ ` + te + e;
200
200
  }
201
201
  }
202
- var ie = !1, K;
202
+ var ne = !1, X;
203
203
  {
204
- var nt = typeof WeakMap == "function" ? WeakMap : Map;
205
- K = new nt();
204
+ var Ke = typeof WeakMap == "function" ? WeakMap : Map;
205
+ X = new Ke();
206
206
  }
207
- function _e(e, t) {
208
- if (!e || ie)
207
+ function ye(e, r) {
208
+ if (!e || ne)
209
209
  return "";
210
210
  {
211
- var n = K.get(e);
212
- if (n !== void 0)
213
- return n;
211
+ var t = X.get(e);
212
+ if (t !== void 0)
213
+ return t;
214
214
  }
215
- var o;
216
- ie = !0;
217
- var g = Error.prepareStackTrace;
215
+ var n;
216
+ ne = !0;
217
+ var s = Error.prepareStackTrace;
218
218
  Error.prepareStackTrace = void 0;
219
- var h;
220
- h = re.current, re.current = null, tt();
219
+ var l;
220
+ l = re.current, re.current = null, He();
221
221
  try {
222
- if (t) {
223
- var c = function() {
222
+ if (r) {
223
+ var o = function() {
224
224
  throw Error();
225
225
  };
226
- if (Object.defineProperty(c.prototype, "props", {
226
+ if (Object.defineProperty(o.prototype, "props", {
227
227
  set: function() {
228
228
  throw Error();
229
229
  }
230
230
  }), typeof Reflect == "object" && Reflect.construct) {
231
231
  try {
232
- Reflect.construct(c, []);
233
- } catch (T) {
234
- o = T;
232
+ Reflect.construct(o, []);
233
+ } catch (R) {
234
+ n = R;
235
235
  }
236
- Reflect.construct(e, [], c);
236
+ Reflect.construct(e, [], o);
237
237
  } else {
238
238
  try {
239
- c.call();
240
- } catch (T) {
241
- o = T;
239
+ o.call();
240
+ } catch (R) {
241
+ n = R;
242
242
  }
243
- e.call(c.prototype);
243
+ e.call(o.prototype);
244
244
  }
245
245
  } else {
246
246
  try {
247
247
  throw Error();
248
- } catch (T) {
249
- o = T;
248
+ } catch (R) {
249
+ n = R;
250
250
  }
251
251
  e();
252
252
  }
253
- } catch (T) {
254
- if (T && o && typeof T.stack == "string") {
255
- for (var l = T.stack.split(`
256
- `), S = o.stack.split(`
257
- `), b = l.length - 1, _ = S.length - 1; b >= 1 && _ >= 0 && l[b] !== S[_]; )
258
- _--;
259
- for (; b >= 1 && _ >= 0; b--, _--)
260
- if (l[b] !== S[_]) {
261
- if (b !== 1 || _ !== 1)
253
+ } catch (R) {
254
+ if (R && n && typeof R.stack == "string") {
255
+ for (var i = R.stack.split(`
256
+ `), E = n.stack.split(`
257
+ `), g = i.length - 1, p = E.length - 1; g >= 1 && p >= 0 && i[g] !== E[p]; )
258
+ p--;
259
+ for (; g >= 1 && p >= 0; g--, p--)
260
+ if (i[g] !== E[p]) {
261
+ if (g !== 1 || p !== 1)
262
262
  do
263
- if (b--, _--, _ < 0 || l[b] !== S[_]) {
264
- var k = `
265
- ` + l[b].replace(" at new ", " at ");
266
- return e.displayName && k.includes("<anonymous>") && (k = k.replace("<anonymous>", e.displayName)), typeof e == "function" && K.set(e, k), k;
263
+ if (g--, p--, p < 0 || i[g] !== E[p]) {
264
+ var T = `
265
+ ` + i[g].replace(" at new ", " at ");
266
+ return e.displayName && T.includes("<anonymous>") && (T = T.replace("<anonymous>", e.displayName)), typeof e == "function" && X.set(e, T), T;
267
267
  }
268
- while (b >= 1 && _ >= 0);
268
+ while (g >= 1 && p >= 0);
269
269
  break;
270
270
  }
271
271
  }
272
272
  } finally {
273
- ie = !1, re.current = h, rt(), Error.prepareStackTrace = g;
273
+ ne = !1, re.current = l, Ge(), Error.prepareStackTrace = s;
274
274
  }
275
- var q = e ? e.displayName || e.name : "", U = q ? J(q) : "";
276
- return typeof e == "function" && K.set(e, U), U;
275
+ var W = e ? e.displayName || e.name : "", U = W ? K(W) : "";
276
+ return typeof e == "function" && X.set(e, U), U;
277
277
  }
278
- function it(e, t, n) {
279
- return _e(e, !1);
278
+ function Xe(e, r, t) {
279
+ return ye(e, !1);
280
280
  }
281
- function st(e) {
282
- var t = e.prototype;
283
- return !!(t && t.isReactComponent);
281
+ function Qe(e) {
282
+ var r = e.prototype;
283
+ return !!(r && r.isReactComponent);
284
284
  }
285
- function G(e, t, n) {
285
+ function Q(e, r, t) {
286
286
  if (e == null)
287
287
  return "";
288
288
  if (typeof e == "function")
289
- return _e(e, st(e));
289
+ return ye(e, Qe(e));
290
290
  if (typeof e == "string")
291
- return J(e);
291
+ return K(e);
292
292
  switch (e) {
293
- case y:
294
- return J("Suspense");
295
- case v:
296
- return J("SuspenseList");
293
+ case k:
294
+ return K("Suspense");
295
+ case b:
296
+ return K("SuspenseList");
297
297
  }
298
298
  if (typeof e == "object")
299
299
  switch (e.$$typeof) {
300
- case f:
301
- return it(e.render);
302
- case w:
303
- return G(e.type, t, n);
304
- case O: {
305
- var o = e, g = o._payload, h = o._init;
300
+ case v:
301
+ return Xe(e.render);
302
+ case O:
303
+ return Q(e.type, r, t);
304
+ case w: {
305
+ var n = e, s = n._payload, l = n._init;
306
306
  try {
307
- return G(h(g), t, n);
307
+ return Q(l(s), r, t);
308
308
  } catch {
309
309
  }
310
310
  }
311
311
  }
312
312
  return "";
313
313
  }
314
- var Y = Object.prototype.hasOwnProperty, we = {}, Ie = I.ReactDebugCurrentFrame;
315
- function X(e) {
314
+ var J = Object.prototype.hasOwnProperty, Ee = {}, Re = y.ReactDebugCurrentFrame;
315
+ function Z(e) {
316
316
  if (e) {
317
- var t = e._owner, n = G(e.type, e._source, t ? t.type : null);
318
- Ie.setExtraStackFrame(n);
317
+ var r = e._owner, t = Q(e.type, e._source, r ? r.type : null);
318
+ Re.setExtraStackFrame(t);
319
319
  } else
320
- Ie.setExtraStackFrame(null);
320
+ Re.setExtraStackFrame(null);
321
321
  }
322
- function at(e, t, n, o, g) {
322
+ function Ze(e, r, t, n, s) {
323
323
  {
324
- var h = Function.call.bind(Y);
325
- for (var c in e)
326
- if (h(e, c)) {
327
- var l = void 0;
324
+ var l = Function.call.bind(J);
325
+ for (var o in e)
326
+ if (l(e, o)) {
327
+ var i = void 0;
328
328
  try {
329
- if (typeof e[c] != "function") {
330
- var S = Error((o || "React class") + ": " + n + " type `" + c + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[c] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
331
- throw S.name = "Invariant Violation", S;
329
+ if (typeof e[o] != "function") {
330
+ var E = 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`.");
331
+ throw E.name = "Invariant Violation", E;
332
332
  }
333
- l = e[c](t, c, o, n, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
334
- } catch (b) {
335
- l = b;
333
+ i = e[o](r, o, n, t, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
334
+ } catch (g) {
335
+ i = g;
336
336
  }
337
- l && !(l instanceof Error) && (X(g), R("%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).", o || "React class", n, c, typeof l), X(null)), l instanceof Error && !(l.message in we) && (we[l.message] = !0, X(g), R("Failed %s type: %s", n, l.message), X(null));
337
+ i && !(i instanceof Error) && (Z(s), h("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", n || "React class", t, o, typeof i), Z(null)), i instanceof Error && !(i.message in Ee) && (Ee[i.message] = !0, Z(s), h("Failed %s type: %s", t, i.message), Z(null));
338
338
  }
339
339
  }
340
340
  }
341
- var ot = Array.isArray;
342
- function se(e) {
343
- return ot(e);
341
+ var er = Array.isArray;
342
+ function ae(e) {
343
+ return er(e);
344
344
  }
345
- function ut(e) {
345
+ function rr(e) {
346
346
  {
347
- var t = typeof Symbol == "function" && Symbol.toStringTag, n = t && e[Symbol.toStringTag] || e.constructor.name || "Object";
348
- return n;
347
+ var r = typeof Symbol == "function" && Symbol.toStringTag, t = r && e[Symbol.toStringTag] || e.constructor.name || "Object";
348
+ return t;
349
349
  }
350
350
  }
351
- function lt(e) {
351
+ function tr(e) {
352
352
  try {
353
- return Se(e), !1;
353
+ return xe(e), !1;
354
354
  } catch {
355
355
  return !0;
356
356
  }
357
357
  }
358
- function Se(e) {
358
+ function xe(e) {
359
359
  return "" + e;
360
360
  }
361
- function Te(e) {
362
- if (lt(e))
363
- return R("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", ut(e)), Se(e);
361
+ function Pe(e) {
362
+ if (tr(e))
363
+ return h("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", rr(e)), xe(e);
364
364
  }
365
- var Ce = I.ReactCurrentOwner, ct = {
365
+ var Ce = y.ReactCurrentOwner, nr = {
366
366
  key: !0,
367
367
  ref: !0,
368
368
  __self: !0,
369
369
  __source: !0
370
- }, Pe, Oe;
371
- function dt(e) {
372
- if (Y.call(e, "ref")) {
373
- var t = Object.getOwnPropertyDescriptor(e, "ref").get;
374
- if (t && t.isReactWarning)
370
+ }, Te, Oe;
371
+ function ar(e) {
372
+ if (J.call(e, "ref")) {
373
+ var r = Object.getOwnPropertyDescriptor(e, "ref").get;
374
+ if (r && r.isReactWarning)
375
375
  return !1;
376
376
  }
377
377
  return e.ref !== void 0;
378
378
  }
379
- function ft(e) {
380
- if (Y.call(e, "key")) {
381
- var t = Object.getOwnPropertyDescriptor(e, "key").get;
382
- if (t && t.isReactWarning)
379
+ function ir(e) {
380
+ if (J.call(e, "key")) {
381
+ var r = Object.getOwnPropertyDescriptor(e, "key").get;
382
+ if (r && r.isReactWarning)
383
383
  return !1;
384
384
  }
385
385
  return e.key !== void 0;
386
386
  }
387
- function gt(e, t) {
387
+ function or(e, r) {
388
388
  typeof e.ref == "string" && Ce.current;
389
389
  }
390
- function ht(e, t) {
390
+ function sr(e, r) {
391
391
  {
392
- var n = function() {
393
- Pe || (Pe = !0, R("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", t));
392
+ var t = function() {
393
+ Te || (Te = !0, h("%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));
394
394
  };
395
- n.isReactWarning = !0, Object.defineProperty(e, "key", {
396
- get: n,
395
+ t.isReactWarning = !0, Object.defineProperty(e, "key", {
396
+ get: t,
397
397
  configurable: !0
398
398
  });
399
399
  }
400
400
  }
401
- function vt(e, t) {
401
+ function ur(e, r) {
402
402
  {
403
- var n = function() {
404
- Oe || (Oe = !0, R("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", t));
403
+ var t = function() {
404
+ Oe || (Oe = !0, h("%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));
405
405
  };
406
- n.isReactWarning = !0, Object.defineProperty(e, "ref", {
407
- get: n,
406
+ t.isReactWarning = !0, Object.defineProperty(e, "ref", {
407
+ get: t,
408
408
  configurable: !0
409
409
  });
410
410
  }
411
411
  }
412
- var mt = function(e, t, n, o, g, h, c) {
413
- var l = {
412
+ var lr = function(e, r, t, n, s, l, o) {
413
+ var i = {
414
414
  // This tag allows us to uniquely identify this as a React Element
415
- $$typeof: r,
415
+ $$typeof: a,
416
416
  // Built-in properties that belong on the element
417
417
  type: e,
418
- key: t,
419
- ref: n,
420
- props: c,
418
+ key: r,
419
+ ref: t,
420
+ props: o,
421
421
  // Record the component responsible for creating this element.
422
- _owner: h
422
+ _owner: l
423
423
  };
424
- return l._store = {}, Object.defineProperty(l._store, "validated", {
424
+ return i._store = {}, Object.defineProperty(i._store, "validated", {
425
425
  configurable: !1,
426
426
  enumerable: !1,
427
427
  writable: !0,
428
428
  value: !1
429
- }), Object.defineProperty(l, "_self", {
429
+ }), Object.defineProperty(i, "_self", {
430
430
  configurable: !1,
431
431
  enumerable: !1,
432
432
  writable: !1,
433
- value: o
434
- }), Object.defineProperty(l, "_source", {
433
+ value: n
434
+ }), Object.defineProperty(i, "_source", {
435
435
  configurable: !1,
436
436
  enumerable: !1,
437
437
  writable: !1,
438
- value: g
439
- }), Object.freeze && (Object.freeze(l.props), Object.freeze(l)), l;
438
+ value: s
439
+ }), Object.freeze && (Object.freeze(i.props), Object.freeze(i)), i;
440
440
  };
441
- function pt(e, t, n, o, g) {
441
+ function cr(e, r, t, n, s) {
442
442
  {
443
- var h, c = {}, l = null, S = null;
444
- n !== void 0 && (Te(n), l = "" + n), ft(t) && (Te(t.key), l = "" + t.key), dt(t) && (S = t.ref, gt(t, g));
445
- for (h in t)
446
- Y.call(t, h) && !ct.hasOwnProperty(h) && (c[h] = t[h]);
443
+ var l, o = {}, i = null, E = null;
444
+ t !== void 0 && (Pe(t), i = "" + t), ir(r) && (Pe(r.key), i = "" + r.key), ar(r) && (E = r.ref, or(r, s));
445
+ for (l in r)
446
+ J.call(r, l) && !nr.hasOwnProperty(l) && (o[l] = r[l]);
447
447
  if (e && e.defaultProps) {
448
- var b = e.defaultProps;
449
- for (h in b)
450
- c[h] === void 0 && (c[h] = b[h]);
448
+ var g = e.defaultProps;
449
+ for (l in g)
450
+ o[l] === void 0 && (o[l] = g[l]);
451
451
  }
452
- if (l || S) {
453
- var _ = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
454
- l && ht(c, _), S && vt(c, _);
452
+ if (i || E) {
453
+ var p = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
454
+ i && sr(o, p), E && ur(o, p);
455
455
  }
456
- return mt(e, l, S, g, o, Ce.current, c);
456
+ return lr(e, i, E, s, n, Ce.current, o);
457
457
  }
458
458
  }
459
- var ae = I.ReactCurrentOwner, xe = I.ReactDebugCurrentFrame;
460
- function z(e) {
459
+ var ie = y.ReactCurrentOwner, we = y.ReactDebugCurrentFrame;
460
+ function M(e) {
461
461
  if (e) {
462
- var t = e._owner, n = G(e.type, e._source, t ? t.type : null);
463
- xe.setExtraStackFrame(n);
462
+ var r = e._owner, t = Q(e.type, e._source, r ? r.type : null);
463
+ we.setExtraStackFrame(t);
464
464
  } else
465
- xe.setExtraStackFrame(null);
465
+ we.setExtraStackFrame(null);
466
466
  }
467
467
  var oe;
468
468
  oe = !1;
469
- function ue(e) {
470
- return typeof e == "object" && e !== null && e.$$typeof === r;
469
+ function se(e) {
470
+ return typeof e == "object" && e !== null && e.$$typeof === a;
471
471
  }
472
- function ke() {
472
+ function Se() {
473
473
  {
474
- if (ae.current) {
475
- var e = L(ae.current.type);
474
+ if (ie.current) {
475
+ var e = D(ie.current.type);
476
476
  if (e)
477
477
  return `
478
478
 
@@ -481,154 +481,154 @@ Check the render method of \`` + e + "`.";
481
481
  return "";
482
482
  }
483
483
  }
484
- function yt(e) {
484
+ function fr(e) {
485
485
  return "";
486
486
  }
487
487
  var je = {};
488
- function Et(e) {
488
+ function dr(e) {
489
489
  {
490
- var t = ke();
491
- if (!t) {
492
- var n = typeof e == "string" ? e : e.displayName || e.name;
493
- n && (t = `
490
+ var r = Se();
491
+ if (!r) {
492
+ var t = typeof e == "string" ? e : e.displayName || e.name;
493
+ t && (r = `
494
494
 
495
- Check the top-level render call using <` + n + ">.");
495
+ Check the top-level render call using <` + t + ">.");
496
496
  }
497
- return t;
497
+ return r;
498
498
  }
499
499
  }
500
- function Ae(e, t) {
500
+ function Ie(e, r) {
501
501
  {
502
502
  if (!e._store || e._store.validated || e.key != null)
503
503
  return;
504
504
  e._store.validated = !0;
505
- var n = Et(t);
506
- if (je[n])
505
+ var t = dr(r);
506
+ if (je[t])
507
507
  return;
508
- je[n] = !0;
509
- var o = "";
510
- e && e._owner && e._owner !== ae.current && (o = " It was passed a child from " + L(e._owner.type) + "."), z(e), R('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', n, o), z(null);
508
+ je[t] = !0;
509
+ var n = "";
510
+ e && e._owner && e._owner !== ie.current && (n = " It was passed a child from " + D(e._owner.type) + "."), M(e), h('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), M(null);
511
511
  }
512
512
  }
513
- function Le(e, t) {
513
+ function ke(e, r) {
514
514
  {
515
515
  if (typeof e != "object")
516
516
  return;
517
- if (se(e))
518
- for (var n = 0; n < e.length; n++) {
519
- var o = e[n];
520
- ue(o) && Ae(o, t);
517
+ if (ae(e))
518
+ for (var t = 0; t < e.length; t++) {
519
+ var n = e[t];
520
+ se(n) && Ie(n, r);
521
521
  }
522
- else if (ue(e))
522
+ else if (se(e))
523
523
  e._store && (e._store.validated = !0);
524
524
  else if (e) {
525
- var g = A(e);
526
- if (typeof g == "function" && g !== e.entries)
527
- for (var h = g.call(e), c; !(c = h.next()).done; )
528
- ue(c.value) && Ae(c.value, t);
525
+ var s = S(e);
526
+ if (typeof s == "function" && s !== e.entries)
527
+ for (var l = s.call(e), o; !(o = l.next()).done; )
528
+ se(o.value) && Ie(o.value, r);
529
529
  }
530
530
  }
531
531
  }
532
- function bt(e) {
532
+ function vr(e) {
533
533
  {
534
- var t = e.type;
535
- if (t == null || typeof t == "string")
534
+ var r = e.type;
535
+ if (r == null || typeof r == "string")
536
536
  return;
537
- var n;
538
- if (typeof t == "function")
539
- n = t.propTypes;
540
- else if (typeof t == "object" && (t.$$typeof === f || // Note: Memo only checks outer props here.
537
+ var t;
538
+ if (typeof r == "function")
539
+ t = r.propTypes;
540
+ else if (typeof r == "object" && (r.$$typeof === v || // Note: Memo only checks outer props here.
541
541
  // Inner props are checked in the reconciler.
542
- t.$$typeof === w))
543
- n = t.propTypes;
542
+ r.$$typeof === O))
543
+ t = r.propTypes;
544
544
  else
545
545
  return;
546
- if (n) {
547
- var o = L(t);
548
- at(n, e.props, "prop", o, e);
549
- } else if (t.PropTypes !== void 0 && !oe) {
546
+ if (t) {
547
+ var n = D(r);
548
+ Ze(t, e.props, "prop", n, e);
549
+ } else if (r.PropTypes !== void 0 && !oe) {
550
550
  oe = !0;
551
- var g = L(t);
552
- R("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", g || "Unknown");
551
+ var s = D(r);
552
+ h("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", s || "Unknown");
553
553
  }
554
- typeof t.getDefaultProps == "function" && !t.getDefaultProps.isReactClassApproved && R("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
554
+ typeof r.getDefaultProps == "function" && !r.getDefaultProps.isReactClassApproved && h("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
555
555
  }
556
556
  }
557
- function Rt(e) {
557
+ function gr(e) {
558
558
  {
559
- for (var t = Object.keys(e.props), n = 0; n < t.length; n++) {
560
- var o = t[n];
561
- if (o !== "children" && o !== "key") {
562
- z(e), R("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", o), z(null);
559
+ for (var r = Object.keys(e.props), t = 0; t < r.length; t++) {
560
+ var n = r[t];
561
+ if (n !== "children" && n !== "key") {
562
+ M(e), h("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", n), M(null);
563
563
  break;
564
564
  }
565
565
  }
566
- e.ref !== null && (z(e), R("Invalid attribute `ref` supplied to `React.Fragment`."), z(null));
566
+ e.ref !== null && (M(e), h("Invalid attribute `ref` supplied to `React.Fragment`."), M(null));
567
567
  }
568
568
  }
569
569
  var De = {};
570
- function Me(e, t, n, o, g, h) {
570
+ function Ae(e, r, t, n, s, l) {
571
571
  {
572
- var c = Ze(e);
573
- if (!c) {
574
- var l = "";
575
- (e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (l += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
576
- var S = yt();
577
- S ? l += S : l += ke();
578
- var b;
579
- e === null ? b = "null" : se(e) ? b = "array" : e !== void 0 && e.$$typeof === r ? (b = "<" + (L(e.type) || "Unknown") + " />", l = " Did you accidentally export a JSX literal instead of a component?") : b = typeof e, R("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", b, l);
572
+ var o = ze(e);
573
+ if (!o) {
574
+ var i = "";
575
+ (e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (i += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
576
+ var E = fr();
577
+ E ? i += E : i += Se();
578
+ var g;
579
+ e === null ? g = "null" : ae(e) ? g = "array" : e !== void 0 && e.$$typeof === a ? (g = "<" + (D(e.type) || "Unknown") + " />", i = " Did you accidentally export a JSX literal instead of a component?") : g = typeof e, h("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", g, i);
580
580
  }
581
- var _ = pt(e, t, n, g, h);
582
- if (_ == null)
583
- return _;
584
- if (c) {
585
- var k = t.children;
586
- if (k !== void 0)
587
- if (o)
588
- if (se(k)) {
589
- for (var q = 0; q < k.length; q++)
590
- Le(k[q], e);
591
- Object.freeze && Object.freeze(k);
581
+ var p = cr(e, r, t, s, l);
582
+ if (p == null)
583
+ return p;
584
+ if (o) {
585
+ var T = r.children;
586
+ if (T !== void 0)
587
+ if (n)
588
+ if (ae(T)) {
589
+ for (var W = 0; W < T.length; W++)
590
+ ke(T[W], e);
591
+ Object.freeze && Object.freeze(T);
592
592
  } else
593
- R("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
593
+ h("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
594
594
  else
595
- Le(k, e);
595
+ ke(T, e);
596
596
  }
597
- if (Y.call(t, "key")) {
598
- var U = L(e), T = Object.keys(t).filter(function(Ct) {
599
- return Ct !== "key";
600
- }), le = T.length > 0 ? "{key: someKey, " + T.join(": ..., ") + ": ...}" : "{key: someKey}";
601
- if (!De[U + le]) {
602
- var Tt = T.length > 0 ? "{" + T.join(": ..., ") + ": ...}" : "{}";
603
- R(`A props object containing a "key" prop is being spread into JSX:
597
+ if (J.call(r, "key")) {
598
+ var U = D(e), R = Object.keys(r).filter(function(yr) {
599
+ return yr !== "key";
600
+ }), ue = R.length > 0 ? "{key: someKey, " + R.join(": ..., ") + ": ...}" : "{key: someKey}";
601
+ if (!De[U + ue]) {
602
+ var _r = R.length > 0 ? "{" + R.join(": ..., ") + ": ...}" : "{}";
603
+ h(`A props object containing a "key" prop is being spread into JSX:
604
604
  let props = %s;
605
605
  <%s {...props} />
606
606
  React keys must be passed directly to JSX without using spread:
607
607
  let props = %s;
608
- <%s key={someKey} {...props} />`, le, U, Tt, U), De[U + le] = !0;
608
+ <%s key={someKey} {...props} />`, ue, U, _r, U), De[U + ue] = !0;
609
609
  }
610
610
  }
611
- return e === i ? Rt(_) : bt(_), _;
611
+ return e === f ? gr(p) : vr(p), p;
612
612
  }
613
613
  }
614
- function _t(e, t, n) {
615
- return Me(e, t, n, !0);
614
+ function hr(e, r, t) {
615
+ return Ae(e, r, t, !0);
616
616
  }
617
- function wt(e, t, n) {
618
- return Me(e, t, n, !1);
617
+ function pr(e, r, t) {
618
+ return Ae(e, r, t, !1);
619
619
  }
620
- var It = wt, St = _t;
621
- V.Fragment = i, V.jsx = It, V.jsxs = St;
622
- })()), V;
620
+ var mr = pr, br = hr;
621
+ G.Fragment = f, G.jsx = mr, G.jsxs = br;
622
+ })()), G;
623
623
  }
624
- var Fe;
625
- function Nt() {
626
- return Fe || (Fe = 1, process.env.NODE_ENV === "production" ? Q.exports = Mt() : Q.exports = Ut()), Q.exports;
624
+ var Ne;
625
+ function Ir() {
626
+ return Ne || (Ne = 1, process.env.NODE_ENV === "production" ? ee.exports = Sr() : ee.exports = jr()), ee.exports;
627
627
  }
628
- var E = Nt();
629
- const Ft = ({ error: s }) => /* @__PURE__ */ E.jsx("div", { className: "plugin-error", children: /* @__PURE__ */ E.jsxs("div", { className: "plugin-error__container", children: [
630
- /* @__PURE__ */ E.jsxs("div", { className: "plugin-error__header", children: [
631
- /* @__PURE__ */ E.jsxs(
628
+ var d = Ir();
629
+ const kr = ({ error: u }) => /* @__PURE__ */ d.jsx("div", { className: "plugin-error", children: /* @__PURE__ */ d.jsxs("div", { className: "plugin-error__container", children: [
630
+ /* @__PURE__ */ d.jsxs("div", { className: "plugin-error__header", children: [
631
+ /* @__PURE__ */ d.jsxs(
632
632
  "svg",
633
633
  {
634
634
  className: "plugin-error__icon",
@@ -637,8 +637,8 @@ const Ft = ({ error: s }) => /* @__PURE__ */ E.jsx("div", { className: "plugin-e
637
637
  viewBox: "0 0 24 24",
638
638
  fill: "none",
639
639
  children: [
640
- /* @__PURE__ */ E.jsx("circle", { cx: "12", cy: "12", r: "10", fill: "#f44336" }),
641
- /* @__PURE__ */ E.jsx(
640
+ /* @__PURE__ */ d.jsx("circle", { cx: "12", cy: "12", r: "10", fill: "#f44336" }),
641
+ /* @__PURE__ */ d.jsx(
642
642
  "path",
643
643
  {
644
644
  d: "M12 7v6m0 4h.01",
@@ -650,549 +650,242 @@ const Ft = ({ error: s }) => /* @__PURE__ */ E.jsx("div", { className: "plugin-e
650
650
  ]
651
651
  }
652
652
  ),
653
- /* @__PURE__ */ E.jsx("h3", { className: "plugin-error__title", children: "Ошибка инициализации плагина" })
653
+ /* @__PURE__ */ d.jsx("h3", { className: "plugin-error__title", children: "Ошибка инициализации плагина" })
654
654
  ] }),
655
- /* @__PURE__ */ E.jsx("div", { className: "plugin-error__message", children: "Не удалось инициализировать плагин. Проверьте параметры запуска и попробуйте перезагрузить страницу." }),
656
- /* @__PURE__ */ E.jsxs("details", { className: "plugin-error__details", children: [
657
- /* @__PURE__ */ E.jsx("summary", { className: "plugin-error__summary", children: "Детали ошибки" }),
658
- /* @__PURE__ */ E.jsxs("pre", { className: "plugin-error__stack", children: [
659
- s.message,
660
- s.stack && `
655
+ /* @__PURE__ */ d.jsx("div", { className: "plugin-error__message", children: "Не удалось инициализировать плагин. Проверьте параметры запуска и попробуйте перезагрузить страницу." }),
656
+ /* @__PURE__ */ d.jsxs("details", { className: "plugin-error__details", children: [
657
+ /* @__PURE__ */ d.jsx("summary", { className: "plugin-error__summary", children: "Детали ошибки" }),
658
+ /* @__PURE__ */ d.jsxs("pre", { className: "plugin-error__stack", children: [
659
+ u.message,
660
+ u.stack && `
661
661
 
662
- ${s.stack}`
662
+ ${u.stack}`
663
663
  ] })
664
664
  ] })
665
- ] }) }), ze = Ft, zt = () => /* @__PURE__ */ E.jsx("div", { className: "plugin-loader", children: /* @__PURE__ */ E.jsxs("div", { className: "plugin-loader__content", children: [
666
- /* @__PURE__ */ E.jsx("div", { className: "plugin-loader__spinner" }),
667
- /* @__PURE__ */ E.jsx("div", { className: "plugin-loader__text", children: "Загрузка плагина..." })
668
- ] }) }), cr = zt, Z = /* @__PURE__ */ new Map(), ce = /* @__PURE__ */ new Map();
669
- function de(s, r) {
670
- let a = Z.get(s);
671
- a || (a = /* @__PURE__ */ new Set(), Z.set(s, a));
672
- const i = r;
673
- if (a.add(i), ce.has(s))
674
- try {
675
- i(ce.get(s));
676
- } catch (u) {
677
- console.error(`[EventBus] Error replaying cached value for "${s}":`, u);
678
- }
679
- return () => {
680
- a.delete(i), a.size === 0 && Z.delete(s);
681
- };
682
- }
683
- function qt(s) {
684
- const r = s.method;
685
- ce.set(r, s.result);
686
- const a = Z.get(r);
687
- if (a)
688
- for (const i of a)
689
- try {
690
- i(s.result);
691
- } catch (u) {
692
- console.error(`[EventBus] Error in subscriber for "${s.method}":`, u);
693
- }
694
- }
695
- const $t = {};
696
- function Ht(s) {
697
- return $t[s];
698
- }
699
- const qe = 6666;
700
- class $e extends Error {
701
- constructor(r, a, i) {
702
- super(a), this.name = "PluginActionError", this.code = r, this.errorData = i;
703
- }
704
- }
705
- class Yt {
706
- constructor(r, a, i, u, d, m) {
707
- this.pendingRequests = /* @__PURE__ */ new Map(), this.messageListener = null, this.requestTimeout = 1e4, this.pluginId = r, this.elementId = a, this.targetOrigin = d, this.entityId = u, this.entityMeta = m, this.slot = i, this.initListener();
708
- }
709
- request(r, a, i) {
710
- return new Promise((u, d) => {
711
- const m = this.generateMessageId(), p = i?.timeout ?? this.requestTimeout, f = {
712
- messageId: m,
713
- method: r,
714
- payload: a
715
- }, y = setTimeout(() => {
716
- this.pendingRequests.get(m) && (this.pendingRequests.delete(m), d(new Error(`Request timeout: ${r} exceeded ${p}ms`)));
717
- }, p);
718
- this.pendingRequests.set(m, { resolve: u, reject: d, timeoutId: y });
719
- try {
720
- this.send(f);
721
- } catch (v) {
722
- clearTimeout(y), this.pendingRequests.delete(m), d(v);
723
- }
724
- });
725
- }
726
- send(r) {
727
- window.parent.postMessage(
728
- {
729
- pluginId: this.pluginId,
730
- elementId: this.elementId,
731
- slot: this.slot,
732
- entityId: this.entityId,
733
- entityMeta: this.entityMeta,
734
- ...r
735
- },
736
- this.targetOrigin
737
- );
738
- }
739
- destroy() {
740
- this.messageListener && (window.removeEventListener("message", this.messageListener), this.messageListener = null), this.pendingRequests.forEach((r) => {
741
- clearTimeout(r.timeoutId);
742
- }), this.pendingRequests.clear();
743
- }
744
- initListener() {
745
- this.messageListener = async (r) => {
746
- if (r.origin !== this.targetOrigin) {
747
- console.info(
748
- "[Bridge] Ignored message from origin:",
749
- r.origin,
750
- "(expected:",
751
- this.targetOrigin,
752
- ")"
753
- );
754
- return;
755
- }
756
- const a = r.data;
757
- if (console.info("[Bridge] Received message:", a), a.type === "event") {
758
- console.info("[Bridge] Dispatching host event:", a.method, a.result), qt(a);
759
- return;
760
- }
761
- if (console.info("[Bridge] Received message:", r.data), !a.messageId) {
762
- console.info("[Bridge] Ignored message without messageId:", a);
763
- return;
764
- }
765
- const i = a, u = this.pendingRequests.get(i.messageId);
766
- if (!u) {
767
- if (i.type === "request") {
768
- const p = i.result.method, f = Ht(p);
769
- if (!f) {
770
- this.send({
771
- messageId: i.messageId,
772
- type: "response",
773
- result: null,
774
- errorCode: qe,
775
- error: `No handler for method ${p}`
776
- });
777
- return;
778
- }
779
- try {
780
- const y = f();
781
- this.send({
782
- messageId: i.messageId,
783
- payload: y,
784
- method: "responseData",
785
- type: "response"
786
- });
787
- } catch (y) {
788
- const v = y instanceof Error ? y : new Error(String(y)), w = v instanceof $e ? v.code : qe;
789
- this.send({
790
- messageId: i.messageId,
791
- type: "response",
792
- result: null,
793
- errorCode: w,
794
- error: v.message
795
- });
796
- }
797
- }
798
- return;
799
- }
800
- clearTimeout(u.timeoutId), this.pendingRequests.delete(i.messageId);
801
- const d = i;
802
- d.type === "response" && d.errorCode ? u.reject(
803
- new $e(
804
- d.errorCode,
805
- d.error ?? "Unknown error",
806
- d.errorData
807
- )
808
- ) : u.resolve(d.result);
809
- }, window.addEventListener("message", this.messageListener);
810
- }
811
- generateMessageId() {
812
- return crypto.randomUUID();
813
- }
814
- }
815
- let $ = null;
816
- function Bt(s, r, a, i, u, d) {
817
- return $ && $.destroy(), $ = new Yt(
818
- s,
819
- r,
820
- a,
821
- i,
822
- u,
823
- d
824
- ), $;
825
- }
826
- function Wt() {
827
- if (!$)
828
- throw new Error("Bridge not initialized. Call initBridge first.");
829
- return $;
665
+ ] }) }), Ue = kr, Dr = () => /* @__PURE__ */ d.jsx("div", { className: "plugin-loader", children: /* @__PURE__ */ d.jsxs("div", { className: "plugin-loader__content", children: [
666
+ /* @__PURE__ */ d.jsx("div", { className: "plugin-loader__spinner" }),
667
+ /* @__PURE__ */ d.jsx("div", { className: "plugin-loader__text", children: "Загрузка плагина..." })
668
+ ] }) }), qr = Dr;
669
+ function Ar() {
670
+ const [u, a] = A(() => {
671
+ let c;
672
+ return q("context.changed", (_) => {
673
+ c = _;
674
+ })(), c;
675
+ });
676
+ return Y(() => q("context.changed", (f) => {
677
+ a(f);
678
+ }), []), u;
830
679
  }
831
- function j(s, r, a) {
832
- return Wt().request(s, r, a);
833
- }
834
- const Vt = 3e5;
835
- class Jt {
836
- show(r) {
837
- return j("confirm.show", r, {
838
- timeout: Vt
839
- });
840
- }
841
- }
842
- class Kt {
843
- constructor() {
844
- this.callbackMap = /* @__PURE__ */ new Map(), this.toastActionIds = /* @__PURE__ */ new Map(), this.eventSubscribed = !1;
845
- }
846
- async add(r) {
847
- this.ensureEventSubscription();
848
- const a = [], i = r.actions?.map((m) => {
849
- const p = crypto.randomUUID();
850
- return this.callbackMap.set(p, m.onClick), a.push(p), { id: p, label: m.label };
851
- }), u = await j("toast.add", {
852
- name: r.name,
853
- title: r.title,
854
- content: r.content,
855
- theme: r.theme,
856
- autoHiding: r.autoHiding,
857
- isClosable: r.isClosable,
858
- actions: i
859
- });
860
- a.length > 0 && this.toastActionIds.set(u.name, a);
861
- const d = r.autoHiding ?? 5e3;
862
- return setTimeout(() => this.cleanupCallbacksForToast(u.name), d + 1e3), u;
863
- }
864
- ensureEventSubscription() {
865
- this.eventSubscribed || (this.eventSubscribed = !0, de("toast.action.clicked", ({ name: r, actionId: a }) => {
866
- this.callbackMap.get(a)?.(), this.cleanupCallbacksForToast(r);
867
- }));
868
- }
869
- cleanupCallbacksForToast(r) {
870
- const a = this.toastActionIds.get(r);
871
- if (a) {
872
- for (const i of a)
873
- this.callbackMap.delete(i);
874
- this.toastActionIds.delete(r);
875
- }
876
- }
877
- }
878
- class Gt {
879
- constructor() {
880
- this.toaster = new Kt(), this.confirm = new Jt();
881
- }
882
- }
883
- const Be = new Gt();
884
- function Xt(s, r, a = "ru") {
885
- if (typeof s == "string")
886
- return s;
887
- const i = (r ?? a).toLowerCase(), u = a.toLowerCase();
888
- return s[i] || s[u] || s.ru || s.en || "";
889
- }
890
- class Qt {
891
- constructor(r) {
892
- this.lastHeight = 0, this.isUpdating = !1, this.consecutiveSmallIncreases = 0, this.MAX_CONSECUTIVE_SMALL_INCREASES = 5, this.SMALL_INCREASE_THRESHOLD_PX = 10, this.resizeCallback = r;
893
- }
894
- enable() {
895
- if (!document.body) {
896
- console.error("[AutoResize] document.body does not exist yet");
897
- return;
898
- }
899
- const r = async () => {
900
- if (this.isUpdating)
901
- return;
902
- const i = document.getElementById("root"), u = window.getComputedStyle(document.body), d = parseInt(u.marginTop, 10) || 0, m = parseInt(u.marginBottom, 10) || 0, f = Math.max(
903
- document.body.scrollHeight,
904
- document.body.offsetHeight,
905
- i ? i.scrollHeight + d + m : 0
906
- ) + 4;
907
- if (f !== this.lastHeight) {
908
- if (f > this.lastHeight)
909
- if (f - this.lastHeight <= this.SMALL_INCREASE_THRESHOLD_PX) {
910
- if (this.consecutiveSmallIncreases++, this.consecutiveSmallIncreases > this.MAX_CONSECUTIVE_SMALL_INCREASES) {
911
- console.warn(
912
- "[AutoResize] Infinite loop detected. Stopping auto-resize. This may be caused by elements with viewport-relative units (vh, %)."
913
- ), this.disable();
914
- return;
915
- }
916
- } else
917
- this.consecutiveSmallIncreases = 0;
918
- else
919
- this.consecutiveSmallIncreases = 0;
920
- this.isUpdating = !0, this.lastHeight = f;
921
- try {
922
- await this.resizeCallback(f);
923
- } catch (y) {
924
- console.error("[AutoResize] Failed to update content size:", y);
925
- } finally {
926
- this.isUpdating = !1;
927
- }
928
- }
929
- }, a = () => {
930
- clearTimeout(this.resizeTimeout), this.resizeTimeout = setTimeout(r, 100);
931
- };
932
- this.resizeObserver = new ResizeObserver(a), this.resizeObserver.observe(document.body), r();
933
- }
934
- disable() {
935
- this.resizeObserver?.disconnect(), clearTimeout(this.resizeTimeout), this.isUpdating = !1, this.consecutiveSmallIncreases = 0;
936
- }
937
- }
938
- class Zt {
939
- constructor() {
940
- this.slot = null, this.service = null, this.origin = null, this.innerUrl = null, this.queryParams = null;
941
- }
942
- getTheme() {
943
- return j("theme.get");
944
- }
945
- getLanguage() {
946
- return j("language.get");
947
- }
948
- getUserId() {
949
- return j("userId.get");
950
- }
951
- getIsYateam() {
952
- return j("isYateam.get");
953
- }
954
- getContext() {
955
- return j("context.get");
956
- }
957
- updateContentSize(r) {
958
- return j("contentSize.update", r);
959
- }
960
- notifyReady() {
961
- return j("plugin.ready");
962
- }
963
- close(r) {
964
- return j("plugin.close", r);
965
- }
966
- navigate(r) {
967
- return j("navigate", r);
968
- }
969
- init(r) {
970
- const { autoResize: a = !0 } = r, i = new URLSearchParams(location.search);
971
- if (this.service = i.get("service"), this.service === null)
972
- throw new Error("Service is not defined");
973
- const u = i.get("slot");
974
- if (!u)
975
- throw new Error("Slot is not defined");
976
- const d = i.get("parentOrigin");
977
- if (!d)
978
- throw new Error("Target origin is not defined");
979
- const m = i.get("id");
980
- if (!m)
981
- throw new Error("Plugin id is not defined");
982
- const p = i.get("elementId");
983
- if (!p)
984
- throw new Error("Element id is not defined");
985
- const f = i.get("entityId"), y = i.get("entityMeta"), v = y ? JSON.parse(y) : void 0;
986
- Bt(m, p, u, f, d, v), this.slot = u, this.origin = d, this.innerUrl = i.get("innerUrl") ?? "";
987
- const w = i.get("queryParams");
988
- this.queryParams = w ? JSON.parse(decodeURIComponent(w)) : {}, a && (this.autoResizeManager = new Qt(
989
- (O) => this.updateContentSize({ height: O })
990
- ), this.autoResizeManager.enable());
991
- }
992
- getSlot() {
993
- if (this.slot === null)
994
- throw new Error("Plugin not initialized. Call init() first.");
995
- return this.slot;
996
- }
997
- getService() {
998
- if (this.service === null)
999
- throw new Error("Service not initialized. Call init() first.");
1000
- return this.service;
1001
- }
1002
- getOrigin() {
1003
- if (this.origin === null)
1004
- throw new Error("Origin not initialized. Call init() first.");
1005
- return this.origin;
1006
- }
1007
- getInnerUrl() {
1008
- if (this.innerUrl === null)
1009
- throw new Error("Plugin not initialized. Call init() first.");
1010
- return this.innerUrl;
1011
- }
1012
- getQueryParams() {
1013
- if (this.queryParams === null)
1014
- throw new Error("Plugin not initialized. Call init() first.");
1015
- return this.queryParams;
1016
- }
1017
- disableAutoResize() {
1018
- this.autoResizeManager?.disable();
1019
- }
1020
- }
1021
- const We = new Zt(), er = () => ({ show: Ye((r) => Be.confirm.show(r), []) }), dr = er;
1022
- function tr() {
1023
- const [s, r] = D(void 0);
1024
- return N(() => {
680
+ function Lr() {
681
+ const [u, a] = A(void 0);
682
+ return Y(() => {
1025
683
  (async () => {
1026
- const i = await We.getIsYateam();
1027
- r(i);
684
+ const f = await m.getIsYateam();
685
+ a(f);
1028
686
  })();
1029
- }, []), s;
687
+ }, []), u;
1030
688
  }
1031
- function Ve() {
1032
- const [s, r] = D(void 0);
1033
- return N(() => de("language.changed", (i) => {
1034
- r(i);
1035
- }), []), s;
689
+ function Me() {
690
+ const [u, a] = A(() => {
691
+ let c;
692
+ return q("language.changed", (_) => {
693
+ c = _;
694
+ })(), c;
695
+ });
696
+ return Y(() => q("language.changed", (f) => {
697
+ a(f);
698
+ }), []), u;
1036
699
  }
1037
- const rr = (s = "ru") => {
1038
- const r = Ve();
1039
- return (a) => Xt(a, r, s);
1040
- }, fr = rr;
1041
- function nr() {
1042
- const [s, r] = D(void 0);
1043
- return N(() => de("theme.changed", (i) => {
1044
- r(i);
1045
- }), []), s;
700
+ function Fr() {
701
+ const [u, a] = A(() => {
702
+ let c;
703
+ return q("theme.changed", (_) => {
704
+ c = _;
705
+ })(), c;
706
+ });
707
+ return Y(() => q("theme.changed", (f) => {
708
+ a(f);
709
+ }), []), u;
1046
710
  }
1047
- const ir = () => ({ add: Ye((r) => Be.toaster.add(r), []) }), gr = ir;
1048
- function sr() {
1049
- const [s, r] = D(void 0);
1050
- return N(() => {
711
+ function Nr() {
712
+ const [u, a] = A(void 0);
713
+ return Y(() => {
1051
714
  (async () => {
1052
- const i = await We.getUserId();
1053
- r(i);
715
+ const f = await m.getUserId();
716
+ a(f);
1054
717
  })();
1055
- }, []), s;
1056
- }
1057
- function ar() {
1058
- const [s, r] = D(void 0);
1059
- return N(() => At("context.changed", (i) => {
1060
- r(i);
1061
- }), []), s;
718
+ }, []), u;
1062
719
  }
1063
- const Je = Ot(null);
1064
- function hr() {
1065
- const s = jt(Je);
1066
- if (!s)
1067
- throw new Error("useTrackerPluginContext must be used within TrackerPluginProvider");
1068
- const r = nr(), a = Ve(), i = tr(), u = sr(), d = ar();
720
+ const We = Rr(null);
721
+ function Br(u = "basic") {
722
+ const a = Cr(We);
723
+ if (!a)
724
+ throw new Error("usePluginContext must be used within PluginProvider");
725
+ if (u === "full" && a.contextLevel !== "full")
726
+ throw new Error(
727
+ "🛑 [Security] Code requests 'full' context, but manifest declares 'basic'. Change the contextLevel in your manifest to get full access."
728
+ );
729
+ const c = Fr(), f = Me(), _ = Lr(), j = Nr(), I = Ar(), P = {
730
+ service: m.getService(),
731
+ origin: m.getOrigin(),
732
+ slot: a.slot,
733
+ innerUrl: a.innerUrl,
734
+ queryParams: a.queryParams,
735
+ registerHandler: a.registerHandler,
736
+ theme: c,
737
+ language: f,
738
+ isYateam: _,
739
+ userId: j
740
+ };
741
+ if (u === "basic") {
742
+ const v = a.entityId ? { entityId: a.entityId, ...a.entityMeta ? { entityMeta: a.entityMeta } : {} } : void 0;
743
+ return {
744
+ ...P,
745
+ contextLevel: "basic",
746
+ slotContext: v
747
+ };
748
+ }
1069
749
  return {
1070
- service: P.getService(),
1071
- origin: P.getOrigin(),
1072
- slot: s.slot,
1073
- innerUrl: s.innerUrl,
1074
- queryParams: s.queryParams,
1075
- registerHandler: s.registerHandler,
1076
- theme: r,
1077
- language: a,
1078
- slotContext: d,
1079
- isYateam: i,
1080
- userId: u
750
+ ...P,
751
+ contextLevel: "full",
752
+ slotContext: I
1081
753
  };
1082
754
  }
1083
- const or = (s) => {
755
+ const Ur = (u) => {
1084
756
  try {
1085
- return new URL(s, window.location.href).origin === window.location.origin;
757
+ return new URL(u, window.location.href).origin === window.location.origin;
1086
758
  } catch {
1087
759
  return !0;
1088
760
  }
1089
761
  };
1090
- function vr({
1091
- children: s,
1092
- autoResize: r = !0,
1093
- fallback: a,
1094
- errorFallback: i,
1095
- autoNotifyReady: u = !0
762
+ function zr({
763
+ children: u,
764
+ autoResize: a = !0,
765
+ fallback: c,
766
+ errorFallback: f,
767
+ autoNotifyReady: _ = !0
1096
768
  }) {
1097
- const d = xt(!1), [m, p] = D(!1), [f, y] = D(null), [v, w] = D(null), O = kt(() => (x, C) => Lt(x, C), []);
1098
- return N(() => {
1099
- const x = (C) => {
1100
- const A = C.target.closest("[href], [data-href]");
1101
- if (!A) return;
1102
- const I = A.getAttribute("href") || A.getAttribute("data-href");
1103
- if (!I || or(I))
769
+ const j = xr(!1), [I, P] = A(!1), [v, k] = A(null), [b, O] = A(null), w = Pr(() => (C, x) => Tr(C, x), []);
770
+ return Y(() => {
771
+ const C = (x) => {
772
+ const S = x.target.closest("[href], [data-href]");
773
+ if (!S) return;
774
+ const y = S.getAttribute("href") || S.getAttribute("data-href");
775
+ if (!y || Ur(y))
1104
776
  return;
1105
- C.preventDefault();
1106
- const ee = A.getAttribute("target") === "_blank";
1107
- P.navigate({
1108
- path: I,
777
+ x.preventDefault();
778
+ const L = S.getAttribute("target") === "_blank";
779
+ le.navigate({
780
+ path: y,
1109
781
  options: {
1110
- newTab: ee
782
+ newTab: L
1111
783
  }
1112
784
  }).then(() => {
1113
- console.info(`Navigation: ${I}`);
1114
- }).catch((te) => {
1115
- console.error("Navigation error:", te);
785
+ console.info(`Navigation: ${y}`);
786
+ }).catch((F) => {
787
+ console.error("Navigation error:", F);
1116
788
  });
1117
789
  };
1118
- return document.addEventListener("click", x), () => {
1119
- document.removeEventListener("click", x);
790
+ return document.addEventListener("click", C), () => {
791
+ document.removeEventListener("click", C);
1120
792
  };
1121
- }, []), N(() => {
1122
- if (d.current)
793
+ }, []), Y(() => {
794
+ if (j.current)
1123
795
  return;
1124
796
  (async () => {
1125
797
  try {
1126
- P.init({ autoResize: r }), d.current = !0, w({
1127
- slot: P.getSlot(),
1128
- innerUrl: P.getInnerUrl(),
1129
- queryParams: P.getQueryParams(),
1130
- registerHandler: O
1131
- }), u && await P.notifyReady();
1132
- const [C, F, A, I, R] = await Promise.allSettled([
1133
- P.getTheme(),
1134
- P.getLanguage(),
1135
- P.getContext(),
1136
- P.getIsYateam(),
1137
- P.getUserId()
798
+ m.init({ autoResize: a }), j.current = !0;
799
+ const x = m.getContextLevel(), $ = m.getEntityId(), S = m.getEntityMeta();
800
+ O({
801
+ slot: m.getSlot(),
802
+ innerUrl: m.getInnerUrl(),
803
+ queryParams: m.getQueryParams(),
804
+ contextLevel: x,
805
+ entityId: $,
806
+ entityMeta: S,
807
+ registerHandler: w
808
+ }), _ && await m.notifyReady();
809
+ const [y, h, L, F, B] = await Promise.allSettled([
810
+ m.getTheme(),
811
+ m.getLanguage(),
812
+ x === "full" ? m.getContext() : Promise.resolve(null),
813
+ m.getIsYateam(),
814
+ m.getUserId()
1138
815
  ]);
1139
- C.status === "fulfilled" && C.value && B({
816
+ y.status === "fulfilled" && y.value && V({
1140
817
  messageId: "",
1141
818
  type: "event",
1142
819
  method: "theme.changed",
1143
- result: C.value
1144
- }), F.status === "fulfilled" && F.value && B({
820
+ result: y.value
821
+ }), h.status === "fulfilled" && h.value && V({
1145
822
  messageId: "",
1146
823
  type: "event",
1147
824
  method: "language.changed",
1148
- result: F.value
1149
- }), I.status === "fulfilled" && I.value && B({
825
+ result: h.value
826
+ }), F.status === "fulfilled" && F.value && V({
1150
827
  messageId: "",
1151
828
  type: "event",
1152
829
  method: "isYateam.changed",
1153
- result: I.value
1154
- }), R.status === "fulfilled" && R.value && B({
830
+ result: F.value
831
+ }), B.status === "fulfilled" && B.value && V({
1155
832
  messageId: "",
1156
833
  type: "event",
1157
834
  method: "userId.changed",
1158
- result: R.value
1159
- }), A.status === "fulfilled" && A.value && B({
835
+ result: B.value
836
+ }), x === "basic" ? $ && V({
837
+ messageId: "",
838
+ type: "event",
839
+ method: "context.changed",
840
+ result: { entityId: $, ...S ? { entityMeta: S } : {} }
841
+ }) : L.status === "fulfilled" && L.value && V({
1160
842
  messageId: "",
1161
843
  type: "event",
1162
844
  method: "context.changed",
1163
- result: A.value
1164
- }), p(!0);
1165
- } catch (C) {
1166
- y(C);
845
+ result: L.value
846
+ }), P(!0);
847
+ } catch (x) {
848
+ k(x);
1167
849
  }
1168
850
  })();
1169
- }, [r, O, u]), f ? i ? /* @__PURE__ */ E.jsx(E.Fragment, { children: i(f) }) : /* @__PURE__ */ E.jsx(ze, { error: f }) : !m || !v ? /* @__PURE__ */ E.jsx(E.Fragment, { children: a }) : /* @__PURE__ */ E.jsx(
1170
- Dt,
851
+ }, [a, w, _]), v ? f ? /* @__PURE__ */ d.jsx(d.Fragment, { children: f(v) }) : /* @__PURE__ */ d.jsx(Ue, { error: v }) : !I || !b ? /* @__PURE__ */ d.jsx(d.Fragment, { children: c }) : /* @__PURE__ */ d.jsx(
852
+ wr,
1171
853
  {
1172
- fallback: i || ((x) => /* @__PURE__ */ E.jsx(ze, { error: x })),
1173
- children: /* @__PURE__ */ E.jsx(Je.Provider, { value: v, children: s })
854
+ fallback: f || ((C) => /* @__PURE__ */ d.jsx(Ue, { error: C })),
855
+ children: /* @__PURE__ */ d.jsx(We.Provider, { value: b, children: u })
1174
856
  }
1175
857
  );
1176
858
  }
859
+ const Yr = () => ({ show: $e((a) => le.confirm.show(a), []) }), Jr = Yr, $r = (u = "ru") => {
860
+ const a = Me();
861
+ return (c) => Or(c, a, u);
862
+ }, Hr = $r, Mr = () => ({ add: $e((a) => le.toaster.add(a), []) }), Gr = Mr;
1177
863
  export {
1178
- yr as METHOD_NOT_SUPPORTED,
1179
- Er as MISSING_REQUIRED_SCOPE,
1180
- br as PLUGIN_ID_IS_NOT_CORRECT,
1181
- Rr as PLUGIN_ID_OR_SLOT_NOT_PROVIDED,
1182
- _r as PluginActionError,
1183
- ze as PluginError,
1184
- cr as PluginLoader,
1185
- vr as TrackerPluginProvider,
1186
- wr as UNKNOWN_ERROR,
1187
- Ir as VALIDATION_ERROR,
1188
- Sr as getField,
1189
- Tr as getLocalizedString,
1190
- Cr as hostApi,
1191
- Pr as trackerApi,
1192
- Or as uiApi,
1193
- dr as useConfirm,
1194
- fr as useLocalizedString,
1195
- gr as useToaster,
1196
- hr as useTrackerPluginContext
864
+ wr as ErrorBoundary,
865
+ Qr as METHOD_NOT_SUPPORTED,
866
+ Zr as MISSING_REQUIRED_SCOPE,
867
+ et as PLUGIN_ID_IS_NOT_CORRECT,
868
+ rt as PLUGIN_ID_OR_SLOT_NOT_PROVIDED,
869
+ tt as PluginActionError,
870
+ Ue as PluginError,
871
+ qr as PluginLoader,
872
+ zr as PluginProvider,
873
+ nt as UNKNOWN_ERROR,
874
+ at as VALIDATION_ERROR,
875
+ it as dispatchHostEvent,
876
+ ot as getField,
877
+ st as getLocalizedString,
878
+ ut as hostApi,
879
+ Ur as isInternalUrl,
880
+ lt as on,
881
+ ct as uiApi,
882
+ Jr as useConfirm,
883
+ Lr as useIsYateam,
884
+ Me as useLanguage,
885
+ Hr as useLocalizedString,
886
+ Br as usePluginContext,
887
+ Fr as useTheme,
888
+ Gr as useToaster,
889
+ Nr as useUserId
1197
890
  };
1198
891
  //# sourceMappingURL=index.mjs.map