@ikonai/sdk-react-ui 1.0.16 → 1.0.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.js CHANGED
@@ -1,8 +1,8 @@
1
1
  import { IkonUiCore as Ct, UiStreamStore as It } from "@ikonai/sdk-ui";
2
2
  import { UiStreamStore as Co } from "@ikonai/sdk-ui";
3
- import _t, { useSyncExternalStore as xe, useMemo as Y, memo as W, useRef as R, useCallback as x, Fragment as Ot, useEffect as D, useState as X, createContext as dt, use as De } from "react";
4
- import { createLogger as be, getOrCreateDeviceId as pe, deriveAuthUrl as Oe, parseUrlParams as Nt, clearSessionParamsFromUrl as Pt, isCloudEnvironment as Ye, extractUserIdFromToken as jt, deriveBackendType as ze, IkonClient as Lt, subscribeToLogEvents as Mt, isDebugModeEnabled as Ut, LogLevel as We } from "@ikonai/sdk";
5
- var he = { exports: {} }, se = {};
3
+ import Ot, { useSyncExternalStore as xe, useMemo as K, memo as z, useRef as A, useCallback as x, Fragment as _t, useEffect as M, useState as Y, createContext as dt, use as De } from "react";
4
+ import { createLogger as ye, getOrCreateDeviceId as he, deriveAuthUrl as _e, parseUrlParams as Nt, clearSessionParamsFromUrl as Pt, isCloudEnvironment as We, extractUserIdFromToken as jt, deriveBackendType as Ye, IkonClient as Lt, subscribeToLogEvents as Mt, isDebugModeEnabled as Ut, LogLevel as ze } from "@ikonai/sdk";
5
+ var de = { exports: {} }, oe = {};
6
6
  /**
7
7
  * @license React
8
8
  * react-jsx-runtime.production.js
@@ -14,7 +14,7 @@ var he = { exports: {} }, se = {};
14
14
  */
15
15
  var qe;
16
16
  function xt() {
17
- if (qe) return se;
17
+ if (qe) return oe;
18
18
  qe = 1;
19
19
  var t = Symbol.for("react.transitional.element"), e = Symbol.for("react.fragment");
20
20
  function r(n, o, s) {
@@ -32,9 +32,9 @@ function xt() {
32
32
  props: s
33
33
  };
34
34
  }
35
- return se.Fragment = e, se.jsx = r, se.jsxs = r, se;
35
+ return oe.Fragment = e, oe.jsx = r, oe.jsxs = r, oe;
36
36
  }
37
- var ie = {};
37
+ var se = {};
38
38
  /**
39
39
  * @license React
40
40
  * react-jsx-runtime.development.js
@@ -50,20 +50,20 @@ function Dt() {
50
50
  function t(l) {
51
51
  if (l == null) return null;
52
52
  if (typeof l == "function")
53
- return l.$$typeof === F ? null : l.displayName || l.name || null;
53
+ return l.$$typeof === U ? null : l.displayName || l.name || null;
54
54
  if (typeof l == "string") return l;
55
55
  switch (l) {
56
- case b:
56
+ case S:
57
57
  return "Fragment";
58
58
  case p:
59
59
  return "Profiler";
60
60
  case m:
61
61
  return "StrictMode";
62
- case L:
62
+ case D:
63
63
  return "Suspense";
64
64
  case G:
65
65
  return "SuspenseList";
66
- case N:
66
+ case P:
67
67
  return "Activity";
68
68
  }
69
69
  if (typeof l == "object")
@@ -72,19 +72,19 @@ function Dt() {
72
72
  ), l.$$typeof) {
73
73
  case y:
74
74
  return "Portal";
75
- case k:
75
+ case T:
76
76
  return (l.displayName || "Context") + ".Provider";
77
- case v:
77
+ case w:
78
78
  return (l._context.displayName || "Context") + ".Consumer";
79
- case I:
80
- var S = l.render;
81
- return l = l.displayName, l || (l = S.displayName || S.name || "", l = l !== "" ? "ForwardRef(" + l + ")" : "ForwardRef"), l;
79
+ case _:
80
+ var b = l.render;
81
+ return l = l.displayName, l || (l = b.displayName || b.name || "", l = l !== "" ? "ForwardRef(" + l + ")" : "ForwardRef"), l;
82
82
  case Z:
83
- return S = l.displayName || null, S !== null ? S : t(l.type) || "Memo";
83
+ return b = l.displayName || null, b !== null ? b : t(l.type) || "Memo";
84
84
  case C:
85
- S = l._payload, l = l._init;
85
+ b = l._payload, l = l._init;
86
86
  try {
87
- return t(l(S));
87
+ return t(l(b));
88
88
  } catch {
89
89
  }
90
90
  }
@@ -96,71 +96,71 @@ function Dt() {
96
96
  function r(l) {
97
97
  try {
98
98
  e(l);
99
- var S = !1;
99
+ var b = !1;
100
100
  } catch {
101
- S = !0;
101
+ b = !0;
102
102
  }
103
- if (S) {
104
- S = console;
105
- var T = S.error, _ = typeof Symbol == "function" && Symbol.toStringTag && l[Symbol.toStringTag] || l.constructor.name || "Object";
106
- return T.call(
107
- S,
103
+ if (b) {
104
+ b = console;
105
+ var k = b.error, N = typeof Symbol == "function" && Symbol.toStringTag && l[Symbol.toStringTag] || l.constructor.name || "Object";
106
+ return k.call(
107
+ b,
108
108
  "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
109
- _
109
+ N
110
110
  ), e(l);
111
111
  }
112
112
  }
113
113
  function n(l) {
114
- if (l === b) return "<>";
114
+ if (l === S) return "<>";
115
115
  if (typeof l == "object" && l !== null && l.$$typeof === C)
116
116
  return "<...>";
117
117
  try {
118
- var S = t(l);
119
- return S ? "<" + S + ">" : "<...>";
118
+ var b = t(l);
119
+ return b ? "<" + b + ">" : "<...>";
120
120
  } catch {
121
121
  return "<...>";
122
122
  }
123
123
  }
124
124
  function o() {
125
- var l = j.A;
125
+ var l = O.A;
126
126
  return l === null ? null : l.getOwner();
127
127
  }
128
128
  function s() {
129
129
  return Error("react-stack-top-frame");
130
130
  }
131
131
  function i(l) {
132
- if (M.call(l, "key")) {
133
- var S = Object.getOwnPropertyDescriptor(l, "key").get;
134
- if (S && S.isReactWarning) return !1;
132
+ if (F.call(l, "key")) {
133
+ var b = Object.getOwnPropertyDescriptor(l, "key").get;
134
+ if (b && b.isReactWarning) return !1;
135
135
  }
136
136
  return l.key !== void 0;
137
137
  }
138
- function a(l, S) {
139
- function T() {
140
- J || (J = !0, console.error(
138
+ function a(l, b) {
139
+ function k() {
140
+ B || (B = !0, console.error(
141
141
  "%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://react.dev/link/special-props)",
142
- S
142
+ b
143
143
  ));
144
144
  }
145
- T.isReactWarning = !0, Object.defineProperty(l, "key", {
146
- get: T,
145
+ k.isReactWarning = !0, Object.defineProperty(l, "key", {
146
+ get: k,
147
147
  configurable: !0
148
148
  });
149
149
  }
150
150
  function c() {
151
151
  var l = t(this.type);
152
- return fe[l] || (fe[l] = !0, console.error(
152
+ return J[l] || (J[l] = !0, console.error(
153
153
  "Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
154
154
  )), l = this.props.ref, l !== void 0 ? l : null;
155
155
  }
156
- function f(l, S, T, _, V, K, ne, oe) {
157
- return T = K.ref, l = {
156
+ function f(l, b, k, N, E, I, V, we) {
157
+ return k = I.ref, l = {
158
158
  $$typeof: g,
159
159
  type: l,
160
- key: S,
161
- props: K,
162
- _owner: V
163
- }, (T !== void 0 ? T : null) !== null ? Object.defineProperty(l, "ref", {
160
+ key: b,
161
+ props: I,
162
+ _owner: E
163
+ }, (k !== void 0 ? k : null) !== null ? Object.defineProperty(l, "ref", {
164
164
  enumerable: !1,
165
165
  get: c
166
166
  }) : Object.defineProperty(l, "ref", { enumerable: !1, value: null }), l._store = {}, Object.defineProperty(l._store, "validated", {
@@ -177,68 +177,68 @@ function Dt() {
177
177
  configurable: !1,
178
178
  enumerable: !1,
179
179
  writable: !0,
180
- value: ne
180
+ value: V
181
181
  }), Object.defineProperty(l, "_debugTask", {
182
182
  configurable: !1,
183
183
  enumerable: !1,
184
184
  writable: !0,
185
- value: oe
185
+ value: we
186
186
  }), Object.freeze && (Object.freeze(l.props), Object.freeze(l)), l;
187
187
  }
188
- function d(l, S, T, _, V, K, ne, oe) {
189
- var w = S.children;
190
- if (w !== void 0)
191
- if (_)
192
- if (z(w)) {
193
- for (_ = 0; _ < w.length; _++)
194
- h(w[_]);
195
- Object.freeze && Object.freeze(w);
188
+ function d(l, b, k, N, E, I, V, we) {
189
+ var L = b.children;
190
+ if (L !== void 0)
191
+ if (N)
192
+ if (W(L)) {
193
+ for (N = 0; N < L.length; N++)
194
+ h(L[N]);
195
+ Object.freeze && Object.freeze(L);
196
196
  } else
197
197
  console.error(
198
198
  "React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
199
199
  );
200
- else h(w);
201
- if (M.call(S, "key")) {
202
- w = t(l);
203
- var O = Object.keys(S).filter(function(kt) {
200
+ else h(L);
201
+ if (F.call(b, "key")) {
202
+ L = t(l);
203
+ var re = Object.keys(b).filter(function(kt) {
204
204
  return kt !== "key";
205
205
  });
206
- _ = 0 < O.length ? "{key: someKey, " + O.join(": ..., ") + ": ...}" : "{key: someKey}", B[w + _] || (O = 0 < O.length ? "{" + O.join(": ..., ") + ": ...}" : "{}", console.error(
206
+ N = 0 < re.length ? "{key: someKey, " + re.join(": ..., ") + ": ...}" : "{key: someKey}", te[L + N] || (re = 0 < re.length ? "{" + re.join(": ..., ") + ": ...}" : "{}", console.error(
207
207
  `A props object containing a "key" prop is being spread into JSX:
208
208
  let props = %s;
209
209
  <%s {...props} />
210
210
  React keys must be passed directly to JSX without using spread:
211
211
  let props = %s;
212
212
  <%s key={someKey} {...props} />`,
213
- _,
214
- w,
215
- O,
216
- w
217
- ), B[w + _] = !0);
213
+ N,
214
+ L,
215
+ re,
216
+ L
217
+ ), te[L + N] = !0);
218
218
  }
219
- if (w = null, T !== void 0 && (r(T), w = "" + T), i(S) && (r(S.key), w = "" + S.key), "key" in S) {
220
- T = {};
221
- for (var U in S)
222
- U !== "key" && (T[U] = S[U]);
223
- } else T = S;
224
- return w && a(
225
- T,
219
+ if (L = null, k !== void 0 && (r(k), L = "" + k), i(b) && (r(b.key), L = "" + b.key), "key" in b) {
220
+ k = {};
221
+ for (var ve in b)
222
+ ve !== "key" && (k[ve] = b[ve]);
223
+ } else k = b;
224
+ return L && a(
225
+ k,
226
226
  typeof l == "function" ? l.displayName || l.name || "Unknown" : l
227
227
  ), f(
228
228
  l,
229
- w,
230
- K,
231
- V,
229
+ L,
230
+ I,
231
+ E,
232
232
  o(),
233
- T,
234
- ne,
235
- oe
233
+ k,
234
+ V,
235
+ we
236
236
  );
237
237
  }
238
238
  function h(l) {
239
239
  typeof l == "object" && l !== null && l.$$typeof === g && l._store && (l._store.validated = 1);
240
240
  }
241
- var u = _t, g = Symbol.for("react.transitional.element"), y = Symbol.for("react.portal"), b = Symbol.for("react.fragment"), m = Symbol.for("react.strict_mode"), p = Symbol.for("react.profiler"), v = Symbol.for("react.consumer"), k = Symbol.for("react.context"), I = Symbol.for("react.forward_ref"), L = Symbol.for("react.suspense"), G = Symbol.for("react.suspense_list"), Z = Symbol.for("react.memo"), C = Symbol.for("react.lazy"), N = Symbol.for("react.activity"), F = Symbol.for("react.client.reference"), j = u.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, M = Object.prototype.hasOwnProperty, z = Array.isArray, ee = console.createTask ? console.createTask : function() {
241
+ var u = Ot, g = Symbol.for("react.transitional.element"), y = Symbol.for("react.portal"), S = Symbol.for("react.fragment"), m = Symbol.for("react.strict_mode"), p = Symbol.for("react.profiler"), w = Symbol.for("react.consumer"), T = Symbol.for("react.context"), _ = Symbol.for("react.forward_ref"), D = Symbol.for("react.suspense"), G = Symbol.for("react.suspense_list"), Z = Symbol.for("react.memo"), C = Symbol.for("react.lazy"), P = Symbol.for("react.activity"), U = Symbol.for("react.client.reference"), O = u.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, F = Object.prototype.hasOwnProperty, W = Array.isArray, Q = console.createTask ? console.createTask : function() {
242
242
  return null;
243
243
  };
244
244
  u = {
@@ -246,42 +246,42 @@ React keys must be passed directly to JSX without using spread:
246
246
  return l();
247
247
  }
248
248
  };
249
- var J, fe = {}, te = u["react-stack-bottom-frame"].bind(
249
+ var B, J = {}, X = u["react-stack-bottom-frame"].bind(
250
250
  u,
251
251
  s
252
- )(), re = ee(n(s)), B = {};
253
- ie.Fragment = b, ie.jsx = function(l, S, T, _, V) {
254
- var K = 1e4 > j.recentlyCreatedOwnerStacks++;
252
+ )(), ee = Q(n(s)), te = {};
253
+ se.Fragment = S, se.jsx = function(l, b, k, N, E) {
254
+ var I = 1e4 > O.recentlyCreatedOwnerStacks++;
255
255
  return d(
256
256
  l,
257
- S,
258
- T,
257
+ b,
258
+ k,
259
259
  !1,
260
- _,
261
- V,
262
- K ? Error("react-stack-top-frame") : te,
263
- K ? ee(n(l)) : re
260
+ N,
261
+ E,
262
+ I ? Error("react-stack-top-frame") : X,
263
+ I ? Q(n(l)) : ee
264
264
  );
265
- }, ie.jsxs = function(l, S, T, _, V) {
266
- var K = 1e4 > j.recentlyCreatedOwnerStacks++;
265
+ }, se.jsxs = function(l, b, k, N, E) {
266
+ var I = 1e4 > O.recentlyCreatedOwnerStacks++;
267
267
  return d(
268
268
  l,
269
- S,
270
- T,
269
+ b,
270
+ k,
271
271
  !0,
272
- _,
273
- V,
274
- K ? Error("react-stack-top-frame") : te,
275
- K ? ee(n(l)) : re
272
+ N,
273
+ E,
274
+ I ? Error("react-stack-top-frame") : X,
275
+ I ? Q(n(l)) : ee
276
276
  );
277
277
  };
278
- }()), ie;
278
+ }()), se;
279
279
  }
280
280
  var He;
281
281
  function Ft() {
282
- return He || (He = 1, process.env.NODE_ENV === "production" ? he.exports = xt() : he.exports = Dt()), he.exports;
282
+ return He || (He = 1, process.env.NODE_ENV === "production" ? de.exports = xt() : de.exports = Dt()), de.exports;
283
283
  }
284
- var A = Ft();
284
+ var R = Ft();
285
285
  function Bt(t, e) {
286
286
  const r = xe(
287
287
  (n) => t.subscribe(n),
@@ -294,7 +294,7 @@ function Bt(t, e) {
294
294
  return `${o ?? ""}:${s?.id ?? ""}`;
295
295
  }
296
296
  );
297
- return Y(() => {
297
+ return K(() => {
298
298
  const [n, o] = r.split(":");
299
299
  return {
300
300
  rootViewId: n || void 0,
@@ -308,9 +308,9 @@ function H(t, e) {
308
308
  () => t.getNodeVersion(e),
309
309
  () => t.getNodeVersion(e)
310
310
  );
311
- return Y(() => t.getNode(e), [t, e, r]);
311
+ return K(() => t.getNode(e), [t, e, r]);
312
312
  }
313
- const $t = be("UIRenderer");
313
+ const $t = ye("UIRenderer");
314
314
  function Vt(t) {
315
315
  if (t === void 0)
316
316
  return "{}";
@@ -326,14 +326,14 @@ function Kt(t) {
326
326
  const e = t.styleIds;
327
327
  return Array.isArray(e) ? e : [];
328
328
  }
329
- function Yt(t) {
329
+ function Wt(t) {
330
330
  const e = t.children;
331
331
  return Array.isArray(e) ? e : [];
332
332
  }
333
- function zt(t, e) {
333
+ function Yt(t, e) {
334
334
  return t.nodeId === e.nodeId && t.context === e.context;
335
335
  }
336
- function Wt(t) {
336
+ function zt(t) {
337
337
  if (t.length === 0) return "";
338
338
  if (t.length === 1) return t[0].id;
339
339
  let e = t[0].id;
@@ -341,51 +341,51 @@ function Wt(t) {
341
341
  e += "," + t[r].id;
342
342
  return e;
343
343
  }
344
- const Ne = W(function t({ nodeId: e, context: r }) {
345
- const n = H(r.store, e), o = n ? Yt(n) : [], s = Wt(o), i = Y(
346
- () => o.length === 0 ? null : o.map((h) => /* @__PURE__ */ A.jsx(t, { nodeId: h.id, context: r }, h.id)),
344
+ const Ne = z(function t({ nodeId: e, context: r }) {
345
+ const n = H(r.store, e), o = n ? Wt(n) : [], s = zt(o), i = K(
346
+ () => o.length === 0 ? null : o.map((h) => /* @__PURE__ */ R.jsx(t, { nodeId: h.id, context: r }, h.id)),
347
347
  // eslint-disable-next-line react-hooks/exhaustive-deps
348
348
  [s, r]
349
349
  );
350
350
  if (!n)
351
351
  return null;
352
352
  if (n.type === "root")
353
- return /* @__PURE__ */ A.jsx(Ot, { children: i }, n.id);
353
+ return /* @__PURE__ */ R.jsx(_t, { children: i }, n.id);
354
354
  const a = r.library.resolve(n);
355
355
  if (!a)
356
356
  return $t.warn(`No renderer for node type ${n.type}`), null;
357
357
  const c = Kt(n), f = c.length > 0 ? c.join(" ") : void 0, d = a;
358
- return /* @__PURE__ */ A.jsx(d, { nodeId: e, context: r, className: f });
359
- }, zt);
358
+ return /* @__PURE__ */ R.jsx(d, { nodeId: e, context: r, className: f });
359
+ }, Yt);
360
360
  function qt(t, e) {
361
- return !Array.isArray(t) || t.length === 0 ? null : t.map((r) => /* @__PURE__ */ A.jsx(Ne, { nodeId: r.id, context: e }, r.id));
361
+ return !Array.isArray(t) || t.length === 0 ? null : t.map((r) => /* @__PURE__ */ R.jsx(Ne, { nodeId: r.id, context: e }, r.id));
362
362
  }
363
363
  function Gt(t, e) {
364
364
  return t.store === e.store && t.library === e.library && t.viewId === e.viewId && t.emptyFallback === e.emptyFallback;
365
365
  }
366
- const Ht = W(function({ store: e, library: r, viewId: n, emptyFallback: o = null, onAction: s, client: i, video: a }) {
367
- const { rootViewId: c, rootNodeId: f } = Bt(e, n), d = R(s);
366
+ const Ht = z(function({ store: e, library: r, viewId: n, emptyFallback: o = null, onAction: s, client: i, video: a }) {
367
+ const { rootViewId: c, rootNodeId: f } = Bt(e, n), d = A(s);
368
368
  d.current = s;
369
- const h = R(i);
369
+ const h = A(i);
370
370
  h.current = i;
371
- const u = R(a);
371
+ const u = A(a);
372
372
  u.current = a;
373
- const g = x((b, m) => {
374
- if (!b)
373
+ const g = x((S, m) => {
374
+ if (!S)
375
375
  return;
376
376
  const p = Vt(m);
377
- d.current?.(b, p);
378
- }, []), y = Y(() => {
379
- const b = {
377
+ d.current?.(S, p);
378
+ }, []), y = K(() => {
379
+ const S = {
380
380
  store: e,
381
381
  library: r,
382
382
  handlerCache: e.handlerCache,
383
383
  // Access payloads from store at call time, not captured snapshot
384
384
  getPayload: (m) => e.getSnapshot().payloads.get(m),
385
- renderChildren: (m) => qt(m, b),
385
+ renderChildren: (m) => qt(m, S),
386
386
  renderView: (m) => {
387
387
  const p = e.getSnapshot().views.get(m);
388
- return p ? /* @__PURE__ */ A.jsx(Ne, { nodeId: p.id, context: b }) : null;
388
+ return p ? /* @__PURE__ */ R.jsx(Ne, { nodeId: p.id, context: S }) : null;
389
389
  },
390
390
  dispatchAction: g,
391
391
  // Access client/video via refs to avoid context recreation
@@ -396,9 +396,9 @@ const Ht = W(function({ store: e, library: r, viewId: n, emptyFallback: o = null
396
396
  return u.current;
397
397
  }
398
398
  };
399
- return b;
399
+ return S;
400
400
  }, [e, r, g]);
401
- return !c || !f ? o : /* @__PURE__ */ A.jsx("div", { "data-ikon-view-id": c, style: { display: "contents" }, children: /* @__PURE__ */ A.jsx(Ne, { nodeId: f, context: y }) });
401
+ return !c || !f ? o : /* @__PURE__ */ R.jsx("div", { "data-ikon-view-id": c, style: { display: "contents" }, children: /* @__PURE__ */ R.jsx(Ne, { nodeId: f, context: y }) });
402
402
  }, Gt);
403
403
  class Jt {
404
404
  constructor(e, r) {
@@ -432,12 +432,12 @@ const Pe = "ikon-ui";
432
432
  function Xt(t, e) {
433
433
  return t === e;
434
434
  }
435
- const uo = W(function({ stores: e, registry: r, category: n = Pe, onAction: o, client: s }) {
436
- const i = Y(() => Array.from(e.keys()).sort().join(","), [e]), a = R(o);
435
+ const uo = z(function({ stores: e, registry: r, category: n = Pe, onAction: o, client: s }) {
436
+ const i = K(() => Array.from(e.keys()).sort().join(","), [e]), a = A(o);
437
437
  a.current = o;
438
- const c = R(s);
438
+ const c = A(s);
439
439
  c.current = s;
440
- const f = Y(
440
+ const f = K(
441
441
  () => {
442
442
  const d = [];
443
443
  for (const [h, u] of e) {
@@ -449,7 +449,7 @@ const uo = W(function({ stores: e, registry: r, category: n = Pe, onAction: o, c
449
449
  // eslint-disable-next-line react-hooks/exhaustive-deps
450
450
  [e, n, i]
451
451
  );
452
- return f.length === 0 ? null : /* @__PURE__ */ A.jsx(A.Fragment, { children: f.map(({ key: d, store: h }) => /* @__PURE__ */ A.jsx(Ht, { store: h, library: r, onAction: a.current, client: c.current, video: c.current?.media?.video }, d)) });
452
+ return f.length === 0 ? null : /* @__PURE__ */ R.jsx(R.Fragment, { children: f.map(({ key: d, store: h }) => /* @__PURE__ */ R.jsx(Ht, { store: h, library: r, onAction: a.current, client: c.current, video: c.current?.media?.video }, d)) });
453
453
  });
454
454
  class Zt {
455
455
  core;
@@ -532,7 +532,7 @@ function Qt(t) {
532
532
  return e.length > 0 ? e : void 0;
533
533
  }
534
534
  }
535
- function de(t) {
535
+ function le(t) {
536
536
  if (typeof t == "string") {
537
537
  const e = t.trim();
538
538
  return e.length > 0 ? e : void 0;
@@ -564,9 +564,9 @@ function Be(t) {
564
564
  return Je.set(t, r), r;
565
565
  }
566
566
  function tr() {
567
- const t = W(function({ nodeId: r, context: n }) {
568
- const o = H(n.store, r), s = R(null), i = de(o?.props?.targetViewId), a = o?.props?.focusOnly, c = typeof a == "boolean" ? a : void 0, f = de(o?.props?.key), d = o?.props?.preciseGeneratedAt;
569
- return D(() => {
567
+ const t = z(function({ nodeId: r, context: n }) {
568
+ const o = H(n.store, r), s = A(null), i = le(o?.props?.targetViewId), a = o?.props?.focusOnly, c = typeof a == "boolean" ? a : void 0, f = le(o?.props?.key), d = o?.props?.preciseGeneratedAt;
569
+ return M(() => {
570
570
  if (typeof document > "u")
571
571
  return;
572
572
  const u = s.current;
@@ -574,19 +574,19 @@ function tr() {
574
574
  return;
575
575
  const g = c !== !0;
576
576
  if (g) {
577
- const p = ((v) => {
578
- let k = v.parentElement;
579
- for (; k; ) {
580
- const L = window.getComputedStyle(k).overflowY;
581
- if (L === "auto" || L === "scroll" || k.hasAttribute("data-radix-scroll-area-viewport"))
582
- return k;
583
- k = k.parentElement;
577
+ const p = ((w) => {
578
+ let T = w.parentElement;
579
+ for (; T; ) {
580
+ const D = window.getComputedStyle(T).overflowY;
581
+ if (D === "auto" || D === "scroll" || T.hasAttribute("data-radix-scroll-area-viewport"))
582
+ return T;
583
+ T = T.parentElement;
584
584
  }
585
585
  return null;
586
586
  })(u);
587
587
  p ? requestAnimationFrame(() => {
588
- const v = p.getBoundingClientRect(), k = u.getBoundingClientRect(), I = p.scrollTop + (k.bottom - v.bottom) + 16;
589
- "scrollBehavior" in document.documentElement.style ? p.scrollTo({ top: I, behavior: "smooth" }) : p.scrollTop = I;
588
+ const w = p.getBoundingClientRect(), T = u.getBoundingClientRect(), _ = p.scrollTop + (T.bottom - w.bottom) + 16;
589
+ "scrollBehavior" in document.documentElement.style ? p.scrollTo({ top: _, behavior: "smooth" }) : p.scrollTop = _;
590
590
  }) : typeof u.scrollIntoView == "function" && requestAnimationFrame(() => {
591
591
  try {
592
592
  u.scrollIntoView({ behavior: "smooth", block: "end", inline: "nearest" });
@@ -602,7 +602,7 @@ function tr() {
602
602
  } catch {
603
603
  u.focus();
604
604
  }
605
- }, [c, i, f, d]), o ? /* @__PURE__ */ A.jsx(
605
+ }, [c, i, f, d]), o ? /* @__PURE__ */ R.jsx(
606
606
  "span",
607
607
  {
608
608
  ref: s,
@@ -620,7 +620,7 @@ function tr() {
620
620
  };
621
621
  }
622
622
  function rr() {
623
- const t = W(function({ nodeId: r, context: n, className: o }) {
623
+ const t = z(function({ nodeId: r, context: n, className: o }) {
624
624
  const s = H(n.store, r), i = Qt(s?.props?.onInvokeId), a = x(() => {
625
625
  i && n.dispatchAction(i);
626
626
  }, [i, n]);
@@ -628,8 +628,8 @@ function rr() {
628
628
  return null;
629
629
  const c = Be(s.props);
630
630
  delete c.onInvokeId;
631
- const f = Fe(de(s.props?.className), o), d = s.children?.length ? n.renderChildren(s.children) : void 0;
632
- return /* @__PURE__ */ A.jsx(
631
+ const f = Fe(le(s.props?.className), o), d = s.children?.length ? n.renderChildren(s.children) : void 0;
632
+ return /* @__PURE__ */ R.jsx(
633
633
  "div",
634
634
  {
635
635
  ...c,
@@ -647,12 +647,12 @@ function rr() {
647
647
  };
648
648
  }
649
649
  function nr() {
650
- const t = W(function({ nodeId: r, context: n, className: o }) {
650
+ const t = z(function({ nodeId: r, context: n, className: o }) {
651
651
  const s = H(n.store, r);
652
652
  if (!s)
653
653
  return null;
654
- const i = Be(s.props), a = Fe("relative", de(s.props?.className), o), c = s.children?.length ? n.renderChildren(s.children) : void 0;
655
- return /* @__PURE__ */ A.jsx("div", { ...i, "data-ikon-node-id": s.id, className: a, children: c });
654
+ const i = Be(s.props), a = Fe("relative", le(s.props?.className), o), c = s.children?.length ? n.renderChildren(s.children) : void 0;
655
+ return /* @__PURE__ */ R.jsx("div", { ...i, "data-ikon-node-id": s.id, className: a, children: c });
656
656
  });
657
657
  return ({ type: e }) => {
658
658
  if (e === "std.stack")
@@ -660,12 +660,12 @@ function nr() {
660
660
  };
661
661
  }
662
662
  function or() {
663
- const t = W(function({ nodeId: r, context: n, className: o }) {
663
+ const t = z(function({ nodeId: r, context: n, className: o }) {
664
664
  const s = H(n.store, r);
665
665
  if (!s)
666
666
  return null;
667
- const i = Be(s.props), a = Fe("absolute", de(s.props?.className), o), c = s.children?.length ? n.renderChildren(s.children) : void 0;
668
- return /* @__PURE__ */ A.jsx("div", { ...i, "data-ikon-node-id": s.id, className: a, children: c });
667
+ const i = Be(s.props), a = Fe("absolute", le(s.props?.className), o), c = s.children?.length ? n.renderChildren(s.children) : void 0;
668
+ return /* @__PURE__ */ R.jsx("div", { ...i, "data-ikon-node-id": s.id, className: a, children: c });
669
669
  });
670
670
  return ({ type: e }) => {
671
671
  if (e === "std.layer")
@@ -706,7 +706,7 @@ function Xe(t) {
706
706
  const e = t.trim();
707
707
  return e.length > 0 ? e : void 0;
708
708
  }
709
- function me(t) {
709
+ function fe(t) {
710
710
  if (typeof t == "boolean")
711
711
  return t;
712
712
  if (typeof t == "string") {
@@ -717,7 +717,7 @@ function me(t) {
717
717
  }
718
718
  const dr = "std.audio-url-player";
719
719
  function fr() {
720
- const t = W(function({
720
+ const t = z(function({
721
721
  nodeId: r,
722
722
  context: n,
723
723
  className: o
@@ -725,8 +725,8 @@ function fr() {
725
725
  const s = H(n.store, r);
726
726
  if (!s)
727
727
  return null;
728
- const i = lr(ur(s.props?.className), o), a = Xe(s.props?.src), c = Xe(s.props?.preload), f = me(s.props?.controls), d = me(s.props?.autoplay), h = me(s.props?.loop), u = me(s.props?.muted);
729
- return /* @__PURE__ */ A.jsx(
728
+ const i = lr(ur(s.props?.className), o), a = Xe(s.props?.src), c = Xe(s.props?.preload), f = fe(s.props?.controls), d = fe(s.props?.autoplay), h = fe(s.props?.loop), u = fe(s.props?.muted);
729
+ return /* @__PURE__ */ R.jsx(
730
730
  "audio",
731
731
  {
732
732
  src: a,
@@ -761,7 +761,7 @@ function ht(...t) {
761
761
  r && r.trim() && e.push(r.trim());
762
762
  return e.length > 0 ? e.join(" ") : void 0;
763
763
  }
764
- function ge(t) {
764
+ function me(t) {
765
765
  if (typeof t == "number" && Number.isFinite(t))
766
766
  return Math.floor(t);
767
767
  if (typeof t == "string" && t.trim().length > 0) {
@@ -778,25 +778,45 @@ function je(t) {
778
778
  }
779
779
  const hr = "std.video-canvas", mr = "std.video-url-player";
780
780
  function pr() {
781
- const t = W(function({ nodeId: r, context: n, className: o }) {
782
- const s = H(n.store, r), i = R(null), a = n.video, c = s ? je(s.props?.streamId) : void 0, f = s ? ge(s.props?.width) : void 0, d = s ? ge(s.props?.height) : void 0, h = s ? ht(ft(s.props?.className), o) : o;
783
- return D(() => {
784
- const u = i.current;
785
- if (!(!a || !u || !c))
786
- return a.attachCanvas(c, u), () => {
787
- a.detachCanvas(c);
781
+ const t = z(function({ nodeId: r, context: n, className: o }) {
782
+ const s = H(n.store, r), i = A(null), a = A(null), c = n.video, f = n.client, d = f?.isWebRtcEnabled ? f.webRtcVideoStream : null, h = f?.isWebRtcEnabled ? f.webRtcScreenStream : null, u = s ? je(s.props?.streamId) : void 0, g = s ? me(s.props?.width) : void 0, y = s ? me(s.props?.height) : void 0, S = s ? ht(ft(s.props?.className), o) : o, m = u?.includes("screen") ? h : d;
783
+ return M(() => {
784
+ const p = i.current;
785
+ if (!(!c || !p || !u || m))
786
+ return c.attachCanvas(u, p), () => {
787
+ c.detachCanvas(u);
788
788
  };
789
- }, [a, c]), s ? /* @__PURE__ */ A.jsx(
789
+ }, [c, u, m]), M(() => {
790
+ const p = a.current;
791
+ if (!(!p || !m))
792
+ return p.srcObject = m, () => {
793
+ p.srcObject = null;
794
+ };
795
+ }, [m]), s ? m ? /* @__PURE__ */ R.jsx(
796
+ "video",
797
+ {
798
+ ref: a,
799
+ autoPlay: !0,
800
+ playsInline: !0,
801
+ muted: !0,
802
+ "data-ikon-node-id": s.id,
803
+ "data-ikon-video-stream-id": u,
804
+ className: S,
805
+ ...g ? { width: g } : {},
806
+ ...y ? { height: y } : {}
807
+ },
808
+ u
809
+ ) : /* @__PURE__ */ R.jsx(
790
810
  "canvas",
791
811
  {
792
812
  ref: i,
793
813
  "data-ikon-node-id": s.id,
794
- "data-ikon-video-stream-id": c,
795
- className: h,
796
- ...f ? { width: f } : {},
797
- ...d ? { height: d } : {}
814
+ "data-ikon-video-stream-id": u,
815
+ className: S,
816
+ ...g ? { width: g } : {},
817
+ ...y ? { height: y } : {}
798
818
  },
799
- c
819
+ u
800
820
  ) : null;
801
821
  });
802
822
  return ({ type: e }) => {
@@ -807,7 +827,7 @@ function pr() {
807
827
  function gr() {
808
828
  return [pr(), yr(), fr()];
809
829
  }
810
- function ae(t) {
830
+ function ie(t) {
811
831
  if (typeof t == "boolean")
812
832
  return t;
813
833
  if (typeof t == "string") {
@@ -817,7 +837,7 @@ function ae(t) {
817
837
  }
818
838
  }
819
839
  function yr() {
820
- const t = W(function({
840
+ const t = z(function({
821
841
  nodeId: r,
822
842
  context: n,
823
843
  className: o
@@ -825,8 +845,8 @@ function yr() {
825
845
  const s = H(n.store, r);
826
846
  if (!s)
827
847
  return null;
828
- const i = ht(ft(s.props?.className), o), a = je(s.props?.src), c = je(s.props?.poster), f = ae(s.props?.controls), d = ae(s.props?.autoplay), h = ae(s.props?.loop), u = ae(s.props?.muted), g = ae(s.props?.playsInline), y = ge(s.props?.width), b = ge(s.props?.height), m = s.children?.length ? n.renderChildren(s.children) : void 0;
829
- return /* @__PURE__ */ A.jsx(
848
+ const i = ht(ft(s.props?.className), o), a = je(s.props?.src), c = je(s.props?.poster), f = ie(s.props?.controls), d = ie(s.props?.autoplay), h = ie(s.props?.loop), u = ie(s.props?.muted), g = ie(s.props?.playsInline), y = me(s.props?.width), S = me(s.props?.height), m = s.children?.length ? n.renderChildren(s.children) : void 0;
849
+ return /* @__PURE__ */ R.jsx(
830
850
  "video",
831
851
  {
832
852
  src: a,
@@ -837,7 +857,7 @@ function yr() {
837
857
  ...u !== void 0 ? { muted: u } : {},
838
858
  ...g !== void 0 ? { playsInline: g } : {},
839
859
  ...y ? { width: y } : {},
840
- ...b ? { height: b } : {},
860
+ ...S ? { height: S } : {},
841
861
  "data-ikon-node-id": s.id,
842
862
  className: i,
843
863
  children: m
@@ -1008,33 +1028,33 @@ class Ar {
1008
1028
  const y = /* @__PURE__ */ new Date();
1009
1029
  e.uniform4f(g, y.getFullYear(), y.getMonth(), y.getDate(), y.getHours() * 3600 + y.getMinutes() * 60 + y.getSeconds() + y.getMilliseconds() / 1e3);
1010
1030
  }
1011
- for (const [y, b] of Object.entries(this.customUniforms)) {
1031
+ for (const [y, S] of Object.entries(this.customUniforms)) {
1012
1032
  const m = this.uniformLocations.get(y);
1013
1033
  if (m)
1014
- switch (b.type) {
1034
+ switch (S.type) {
1015
1035
  case "float":
1016
- e.uniform1f(m, b.value);
1036
+ e.uniform1f(m, S.value);
1017
1037
  break;
1018
1038
  case "vec2": {
1019
- const p = b.value;
1039
+ const p = S.value;
1020
1040
  e.uniform2f(m, p[0], p[1]);
1021
1041
  break;
1022
1042
  }
1023
1043
  case "vec3": {
1024
- const p = b.value;
1044
+ const p = S.value;
1025
1045
  e.uniform3f(m, p[0], p[1], p[2]);
1026
1046
  break;
1027
1047
  }
1028
1048
  case "vec4": {
1029
- const p = b.value;
1049
+ const p = S.value;
1030
1050
  e.uniform4f(m, p[0], p[1], p[2], p[3]);
1031
1051
  break;
1032
1052
  }
1033
1053
  case "int":
1034
- e.uniform1i(m, b.value);
1054
+ e.uniform1i(m, S.value);
1035
1055
  break;
1036
1056
  case "bool":
1037
- e.uniform1i(m, b.value ? 1 : 0);
1057
+ e.uniform1i(m, S.value ? 1 : 0);
1038
1058
  break;
1039
1059
  }
1040
1060
  }
@@ -1085,7 +1105,7 @@ function Ir(t) {
1085
1105
  if (e === "false") return !1;
1086
1106
  }
1087
1107
  }
1088
- function _r(t) {
1108
+ function Or(t) {
1089
1109
  if (!t || typeof t != "object")
1090
1110
  return {};
1091
1111
  const e = {}, r = t;
@@ -1100,7 +1120,7 @@ function _r(t) {
1100
1120
  }
1101
1121
  return e;
1102
1122
  }
1103
- function Or(t, e) {
1123
+ function _r(t, e) {
1104
1124
  const r = Object.keys(t), n = Object.keys(e);
1105
1125
  if (r.length !== n.length)
1106
1126
  return !1;
@@ -1123,80 +1143,80 @@ function Or(t, e) {
1123
1143
  }
1124
1144
  const Nr = "std.shader-canvas";
1125
1145
  function Pr() {
1126
- const t = W(function({ nodeId: r, context: n, className: o }) {
1127
- const s = H(n.store, r), i = R(null), a = R(null), c = R(null), f = R(0), d = R(""), h = R({}), u = R({
1146
+ const t = z(function({ nodeId: r, context: n, className: o }) {
1147
+ const s = H(n.store, r), i = A(null), a = A(null), c = A(null), f = A(0), d = A(""), h = A({}), u = A({
1128
1148
  x: 0,
1129
1149
  y: 0,
1130
1150
  clickX: 0,
1131
1151
  clickY: 0,
1132
1152
  isDown: !1
1133
- }), g = s ? Cr(s.props?.shaderSource) : "", y = s ? Re(s.props?.fps) ?? 60 : 60, b = s?.props?.uniforms, m = Y(() => _r(b), [b]), p = s ? Ir(s.props?.enableMouse) ?? !0 : !0, v = s ? Re(s.props?.width) : void 0, k = s ? Re(s.props?.height) : void 0, I = s ? kr(Tr(s.props?.className), o) : o;
1134
- D(() => {
1153
+ }), g = s ? Cr(s.props?.shaderSource) : "", y = s ? Re(s.props?.fps) ?? 60 : 60, S = s?.props?.uniforms, m = K(() => Or(S), [S]), p = s ? Ir(s.props?.enableMouse) ?? !0 : !0, w = s ? Re(s.props?.width) : void 0, T = s ? Re(s.props?.height) : void 0, _ = s ? kr(Tr(s.props?.className), o) : o;
1154
+ M(() => {
1135
1155
  const C = i.current;
1136
1156
  if (C) {
1137
1157
  try {
1138
- const N = new Ar(C);
1139
- a.current = N;
1140
- } catch (N) {
1141
- console.error("[ShaderRenderer] Failed to create WebGL2 context:", N);
1158
+ const P = new Ar(C);
1159
+ a.current = P;
1160
+ } catch (P) {
1161
+ console.error("[ShaderRenderer] Failed to create WebGL2 context:", P);
1142
1162
  }
1143
1163
  return () => {
1144
1164
  a.current && (a.current.destroy(), a.current = null);
1145
1165
  };
1146
1166
  }
1147
- }, []), D(() => {
1167
+ }, []), M(() => {
1148
1168
  const C = a.current;
1149
1169
  if (!(!C || !g) && d.current !== g)
1150
1170
  if (C.compile(g, m))
1151
1171
  d.current = g, h.current = m;
1152
1172
  else {
1153
- const F = C.getError();
1154
- console.error("[ShaderRenderer] Shader compilation failed:", F);
1173
+ const U = C.getError();
1174
+ console.error("[ShaderRenderer] Shader compilation failed:", U);
1155
1175
  }
1156
- }, [g, m]), D(() => {
1176
+ }, [g, m]), M(() => {
1157
1177
  const C = a.current;
1158
- !C || !d.current || Or(h.current, m) || (C.setCustomUniforms(m), h.current = m);
1159
- }, [m]), D(() => {
1178
+ !C || !d.current || _r(h.current, m) || (C.setCustomUniforms(m), h.current = m);
1179
+ }, [m]), M(() => {
1160
1180
  const C = a.current;
1161
1181
  if (!C || !d.current) return;
1162
- const N = 1e3 / y, F = (j) => {
1163
- const M = j - f.current;
1164
- M >= N && (f.current = j - M % N, C.draw()), c.current = requestAnimationFrame(F);
1182
+ const P = 1e3 / y, U = (O) => {
1183
+ const F = O - f.current;
1184
+ F >= P && (f.current = O - F % P, C.draw()), c.current = requestAnimationFrame(U);
1165
1185
  };
1166
- return c.current = requestAnimationFrame(F), () => {
1186
+ return c.current = requestAnimationFrame(U), () => {
1167
1187
  c.current !== null && (cancelAnimationFrame(c.current), c.current = null);
1168
1188
  };
1169
1189
  }, [y]);
1170
- const L = x(
1190
+ const D = x(
1171
1191
  (C) => {
1172
1192
  if (!p) return;
1173
- const N = i.current, F = a.current;
1174
- if (!N || !F) return;
1175
- const j = N.getBoundingClientRect(), M = C.clientX - j.left, z = j.height - (C.clientY - j.top);
1176
- u.current.x = M, u.current.y = z, F.setMouse(M, z, u.current.clickX, u.current.clickY);
1193
+ const P = i.current, U = a.current;
1194
+ if (!P || !U) return;
1195
+ const O = P.getBoundingClientRect(), F = C.clientX - O.left, W = O.height - (C.clientY - O.top);
1196
+ u.current.x = F, u.current.y = W, U.setMouse(F, W, u.current.clickX, u.current.clickY);
1177
1197
  },
1178
1198
  [p]
1179
1199
  ), G = x(
1180
1200
  (C) => {
1181
1201
  if (!p) return;
1182
- const N = i.current, F = a.current;
1183
- if (!N || !F) return;
1184
- const j = N.getBoundingClientRect(), M = C.clientX - j.left, z = j.height - (C.clientY - j.top);
1185
- u.current.isDown = !0, u.current.clickX = M, u.current.clickY = z, F.setMouse(M, z, M, z);
1202
+ const P = i.current, U = a.current;
1203
+ if (!P || !U) return;
1204
+ const O = P.getBoundingClientRect(), F = C.clientX - O.left, W = O.height - (C.clientY - O.top);
1205
+ u.current.isDown = !0, u.current.clickX = F, u.current.clickY = W, U.setMouse(F, W, F, W);
1186
1206
  },
1187
1207
  [p]
1188
1208
  ), Z = x(() => {
1189
1209
  p && (u.current.isDown = !1, u.current.clickX = -Math.abs(u.current.clickX));
1190
1210
  }, [p]);
1191
- return s ? /* @__PURE__ */ A.jsx(
1211
+ return s ? /* @__PURE__ */ R.jsx(
1192
1212
  "canvas",
1193
1213
  {
1194
1214
  ref: i,
1195
1215
  "data-ikon-node-id": s.id,
1196
- className: I,
1197
- ...v ? { width: v } : {},
1198
- ...k ? { height: k } : {},
1199
- onMouseMove: L,
1216
+ className: _,
1217
+ ...w ? { width: w } : {},
1218
+ ...T ? { height: T } : {},
1219
+ onMouseMove: D,
1200
1220
  onMouseDown: G,
1201
1221
  onMouseUp: Z,
1202
1222
  onMouseLeave: Z
@@ -1212,7 +1232,7 @@ const jr = "shader", Lr = async () => Pr();
1212
1232
  function Mr(t) {
1213
1233
  t.registerModule(jr, Lr);
1214
1234
  }
1215
- const Ze = be("UIRegistry");
1235
+ const Ze = ye("UIRegistry");
1216
1236
  class Ur {
1217
1237
  baseResolvers = [];
1218
1238
  moduleLoaders = /* @__PURE__ */ new Map();
@@ -1281,7 +1301,7 @@ function Br(t, e) {
1281
1301
  return !1;
1282
1302
  return !0;
1283
1303
  }
1284
- const Ee = be("MotionController"), Qe = {
1304
+ const Ee = ye("MotionController"), Qe = {
1285
1305
  ease: [0.25, 0.1, 0.25, 1],
1286
1306
  "ease-in": [0.42, 0, 1, 1],
1287
1307
  "ease-out": [0, 0, 0.58, 1],
@@ -1326,41 +1346,41 @@ function tt(t) {
1326
1346
  }
1327
1347
  function rt(t, e, r, n) {
1328
1348
  const d = new Float32Array(11);
1329
- function h(m, p, v) {
1330
- return ((3 * p - 3 * v + 1) * m + (3 * v - 6 * p)) * m * m + 3 * p * m;
1349
+ function h(m, p, w) {
1350
+ return ((3 * p - 3 * w + 1) * m + (3 * w - 6 * p)) * m * m + 3 * p * m;
1331
1351
  }
1332
- function u(m, p, v) {
1333
- return 3 * (3 * p - 3 * v + 1) * m * m + 2 * (3 * v - 6 * p) * m + 3 * p;
1352
+ function u(m, p, w) {
1353
+ return 3 * (3 * p - 3 * w + 1) * m * m + 2 * (3 * w - 6 * p) * m + 3 * p;
1334
1354
  }
1335
1355
  function g(m, p) {
1336
- for (let v = 0; v < 4; v += 1) {
1337
- const k = u(p, t, r);
1338
- if (k === 0)
1356
+ for (let w = 0; w < 4; w += 1) {
1357
+ const T = u(p, t, r);
1358
+ if (T === 0)
1339
1359
  return p;
1340
- const I = h(p, t, r) - m;
1341
- p -= I / k;
1360
+ const _ = h(p, t, r) - m;
1361
+ p -= _ / T;
1342
1362
  }
1343
1363
  return p;
1344
1364
  }
1345
- function y(m, p, v) {
1346
- let k = 0, I = 0, L = 0;
1365
+ function y(m, p, w) {
1366
+ let T = 0, _ = 0, D = 0;
1347
1367
  do
1348
- I = p + (v - p) / 2, k = h(I, t, r) - m, k > 0 ? v = I : p = I;
1349
- while (Math.abs(k) > 1e-7 && ++L < 10);
1350
- return I;
1351
- }
1352
- function b(m) {
1353
- let p = 0, v = 1;
1354
- const k = 10;
1355
- for (; v !== k && d[v] <= m; v += 1)
1368
+ _ = p + (w - p) / 2, T = h(_, t, r) - m, T > 0 ? w = _ : p = _;
1369
+ while (Math.abs(T) > 1e-7 && ++D < 10);
1370
+ return _;
1371
+ }
1372
+ function S(m) {
1373
+ let p = 0, w = 1;
1374
+ const T = 10;
1375
+ for (; w !== T && d[w] <= m; w += 1)
1356
1376
  p += 0.1;
1357
- v -= 1;
1358
- const I = (m - d[v]) / (d[v + 1] - d[v]), L = p + I * 0.1, G = u(L, t, r);
1359
- return G >= 1e-3 ? g(m, L) : G === 0 ? L : y(m, p, p + 0.1);
1377
+ w -= 1;
1378
+ const _ = (m - d[w]) / (d[w + 1] - d[w]), D = p + _ * 0.1, G = u(D, t, r);
1379
+ return G >= 1e-3 ? g(m, D) : G === 0 ? D : y(m, p, p + 0.1);
1360
1380
  }
1361
1381
  for (let m = 0; m < 11; m += 1)
1362
1382
  d[m] = h(m * 0.1, t, r);
1363
- return (m) => m <= 0 ? 0 : m >= 1 ? 1 : h(b(m), e, n);
1383
+ return (m) => m <= 0 ? 0 : m >= 1 ? 1 : h(S(m), e, n);
1364
1384
  }
1365
1385
  function $r(t) {
1366
1386
  const e = /steps\(\s*([0-9]+)\s*(?:,\s*([a-z-]+)\s*)?\)/i.exec(t);
@@ -1402,7 +1422,7 @@ function Kr(t) {
1402
1422
  if (![r, n, o, s].some((i) => !Number.isFinite(i)))
1403
1423
  return { inStart: r, inEnd: n, outStart: o, outEnd: s };
1404
1424
  }
1405
- class Yr {
1425
+ class Wr {
1406
1426
  bindingsByStyle = /* @__PURE__ */ new Map();
1407
1427
  observer;
1408
1428
  observeScheduled = !1;
@@ -1660,9 +1680,9 @@ class Yr {
1660
1680
  }
1661
1681
  }
1662
1682
  }
1663
- const Ae = new Yr();
1664
- function zr(t) {
1665
- const e = R(/* @__PURE__ */ new Map()), r = x(({ styleId: s, css: i, common: a }) => {
1683
+ const Ae = new Wr();
1684
+ function Yr(t) {
1685
+ const e = A(/* @__PURE__ */ new Map()), r = x(({ styleId: s, css: i, common: a }) => {
1666
1686
  if (!(!s || typeof document > "u")) {
1667
1687
  if (i) {
1668
1688
  let c = e.current.get(s);
@@ -1684,7 +1704,7 @@ function zr(t) {
1684
1704
  }
1685
1705
  Ae.reset();
1686
1706
  }, []);
1687
- return D(() => {
1707
+ return M(() => {
1688
1708
  if (!t) return;
1689
1709
  for (const a of t.getUiStyles())
1690
1710
  r(a);
@@ -1692,9 +1712,9 @@ function zr(t) {
1692
1712
  return () => {
1693
1713
  s?.(), i?.(), o();
1694
1714
  };
1695
- }, [t, o, r, n]), D(() => () => o(), [o]), { setStyle: r, deleteStyles: n, reset: o };
1715
+ }, [t, o, r, n]), M(() => () => o(), [o]), { setStyle: r, deleteStyles: n, reset: o };
1696
1716
  }
1697
- function Wr(t) {
1717
+ function zr(t) {
1698
1718
  const e = [];
1699
1719
  for (const [r, n] of t) {
1700
1720
  const o = n.store.getSnapshot(), s = o.rootViewId && o.views.has(o.rootViewId);
@@ -1703,35 +1723,35 @@ function Wr(t) {
1703
1723
  return e.sort(), e.join(",");
1704
1724
  }
1705
1725
  function qr(t) {
1706
- const [e, r] = X(), n = R("");
1707
- return D(() => {
1726
+ const [e, r] = Y(), n = A("");
1727
+ return M(() => {
1708
1728
  if (!t) {
1709
1729
  r(void 0), n.current = "";
1710
1730
  return;
1711
1731
  }
1712
1732
  const o = () => {
1713
- const s = t.getStores(), i = Wr(s);
1733
+ const s = t.getStores(), i = zr(s);
1714
1734
  i !== n.current && (n.current = i, r(s));
1715
1735
  };
1716
1736
  return o(), t.subscribe(o);
1717
1737
  }, [t]), e;
1718
1738
  }
1719
- var Gr = typeof global == "object" && global && global.Object === Object && global, Hr = typeof self == "object" && self && self.Object === Object && self, Jr = Gr || Hr || Function("return this")(), ye = Jr.Symbol, mt = Object.prototype, Xr = mt.hasOwnProperty, Zr = mt.toString, ce = ye ? ye.toStringTag : void 0;
1739
+ var Gr = typeof global == "object" && global && global.Object === Object && global, Hr = typeof self == "object" && self && self.Object === Object && self, Jr = Gr || Hr || Function("return this")(), pe = Jr.Symbol, mt = Object.prototype, Xr = mt.hasOwnProperty, Zr = mt.toString, ae = pe ? pe.toStringTag : void 0;
1720
1740
  function Qr(t) {
1721
- var e = Xr.call(t, ce), r = t[ce];
1741
+ var e = Xr.call(t, ae), r = t[ae];
1722
1742
  try {
1723
- t[ce] = void 0;
1743
+ t[ae] = void 0;
1724
1744
  var n = !0;
1725
1745
  } catch {
1726
1746
  }
1727
1747
  var o = Zr.call(t);
1728
- return n && (e ? t[ce] = r : delete t[ce]), o;
1748
+ return n && (e ? t[ae] = r : delete t[ae]), o;
1729
1749
  }
1730
1750
  var en = Object.prototype, tn = en.toString;
1731
1751
  function rn(t) {
1732
1752
  return tn.call(t);
1733
1753
  }
1734
- var nn = "[object Null]", on = "[object Undefined]", nt = ye ? ye.toStringTag : void 0;
1754
+ var nn = "[object Null]", on = "[object Undefined]", nt = pe ? pe.toStringTag : void 0;
1735
1755
  function sn(t) {
1736
1756
  return t == null ? t === void 0 ? on : nn : nt && nt in Object(t) ? Qr(t) : rn(t);
1737
1757
  }
@@ -1794,15 +1814,15 @@ function ho(t) {
1794
1814
  const o = [], s = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Set();
1795
1815
  for (const c of n) {
1796
1816
  if (typeof c == "string") {
1797
- const b = c.trim();
1798
- if (!b || i.has(b))
1817
+ const S = c.trim();
1818
+ if (!S || i.has(S))
1799
1819
  continue;
1800
- o.push(b), i.add(b);
1820
+ o.push(S), i.add(S);
1801
1821
  continue;
1802
1822
  }
1803
1823
  if (!Le(c))
1804
1824
  continue;
1805
- const f = c, d = Object.keys(f).find((b) => b.toLowerCase() === "name");
1825
+ const f = c, d = Object.keys(f).find((S) => S.toLowerCase() === "name");
1806
1826
  if (!d)
1807
1827
  continue;
1808
1828
  const h = f[d];
@@ -1811,7 +1831,7 @@ function ho(t) {
1811
1831
  const u = h.trim();
1812
1832
  if (!u)
1813
1833
  continue;
1814
- const g = Object.keys(f).find((b) => b.toLowerCase() === "javascript"), y = g ? f[g] : void 0;
1834
+ const g = Object.keys(f).find((S) => S.toLowerCase() === "javascript"), y = g ? f[g] : void 0;
1815
1835
  typeof y == "string" && s.set(u, y), i.has(u) || (o.push(u), i.add(u));
1816
1836
  }
1817
1837
  if (!o.length && s.size === 0)
@@ -1822,7 +1842,7 @@ function ho(t) {
1822
1842
  }));
1823
1843
  return a.length > 0 ? { modules: o, inlineModules: a } : { modules: o };
1824
1844
  }
1825
- const E = {
1845
+ const v = {
1826
1846
  None: 0,
1827
1847
  Letter: 1,
1828
1848
  Word: 2,
@@ -1831,7 +1851,7 @@ const E = {
1831
1851
  Emoji: 16
1832
1852
  }, hn = [
1833
1853
  {
1834
- flag: E.Letter,
1854
+ flag: v.Letter,
1835
1855
  hints: [
1836
1856
  "[data-motion-letter]",
1837
1857
  "[data-letter]",
@@ -1840,7 +1860,7 @@ const E = {
1840
1860
  ]
1841
1861
  },
1842
1862
  {
1843
- flag: E.Word,
1863
+ flag: v.Word,
1844
1864
  hints: [
1845
1865
  "[data-motion-word]",
1846
1866
  "[data-word]",
@@ -1849,7 +1869,7 @@ const E = {
1849
1869
  ]
1850
1870
  },
1851
1871
  {
1852
- flag: E.Line,
1872
+ flag: v.Line,
1853
1873
  hints: [
1854
1874
  "[data-motion-line]",
1855
1875
  "[data-line]",
@@ -1858,7 +1878,7 @@ const E = {
1858
1878
  ]
1859
1879
  },
1860
1880
  {
1861
- flag: E.Paragraph,
1881
+ flag: v.Paragraph,
1862
1882
  hints: [
1863
1883
  "[data-motion-paragraph]",
1864
1884
  "[data-paragraph]",
@@ -1869,7 +1889,7 @@ const E = {
1869
1889
  ]
1870
1890
  },
1871
1891
  {
1872
- flag: E.Emoji,
1892
+ flag: v.Emoji,
1873
1893
  hints: [
1874
1894
  ":is([data-motion-emoji],[data-emoji],.tw-motion-emoji,.tw-emoji)",
1875
1895
  "[data-motion-emoji]",
@@ -1878,19 +1898,19 @@ const E = {
1878
1898
  "[data-emoji]"
1879
1899
  ]
1880
1900
  }
1881
- ], Me = E.Letter | E.Word | E.Line | E.Paragraph | E.Emoji, mn = E.Letter | E.Word | E.Line | E.Paragraph, st = /* @__PURE__ */ new Map(), pn = 16384;
1901
+ ], Me = v.Letter | v.Word | v.Line | v.Paragraph | v.Emoji, mn = v.Letter | v.Word | v.Line | v.Paragraph, st = /* @__PURE__ */ new Map(), pn = 16384;
1882
1902
  function mo(t, e) {
1883
1903
  if (!t || t.length > pn)
1884
1904
  return t;
1885
- const r = Pn(e), n = Q(r, E.Emoji), o = r & mn;
1886
- if (o === E.None && !n)
1905
+ const r = Pn(e), n = ne(r, v.Emoji), o = r & mn;
1906
+ if (o === v.None && !n)
1887
1907
  return t;
1888
1908
  const s = t.replace(/\r\n/g, `
1889
1909
  `).replace(/\r/g, `
1890
1910
  `);
1891
- if (o === E.None)
1911
+ if (o === v.None)
1892
1912
  return ut(s);
1893
- const i = On(s);
1913
+ const i = _n(s);
1894
1914
  if (i.length === 0)
1895
1915
  return n ? ut(s) : t;
1896
1916
  const a = Nn(i), c = { letter: 0, word: 0, line: 0, paragraph: 0, br: 0, emoji: 0 }, f = [];
@@ -1906,14 +1926,14 @@ function gn(t, e, r) {
1906
1926
  const s = yn(o, e, r);
1907
1927
  n.push(...s);
1908
1928
  }
1909
- if (Q(e, E.Paragraph)) {
1929
+ if (ne(e, v.Paragraph)) {
1910
1930
  const o = r.paragraph++;
1911
1931
  return [
1912
- /* @__PURE__ */ A.jsx(
1932
+ /* @__PURE__ */ R.jsx(
1913
1933
  "span",
1914
1934
  {
1915
1935
  "data-motion-paragraph": !0,
1916
- style: we(o),
1936
+ style: Se(o),
1917
1937
  children: n
1918
1938
  },
1919
1939
  `motion-paragraph-${o}`
@@ -1924,21 +1944,21 @@ function gn(t, e, r) {
1924
1944
  }
1925
1945
  function yn(t, e, r) {
1926
1946
  const n = Sn(t.text, e, r), o = [];
1927
- if (Q(e, E.Line)) {
1947
+ if (ne(e, v.Line)) {
1928
1948
  const s = r.line++;
1929
1949
  o.push(
1930
- /* @__PURE__ */ A.jsx("span", { "data-motion-line": !0, style: we(s), children: n }, `motion-line-${s}`)
1950
+ /* @__PURE__ */ R.jsx("span", { "data-motion-line": !0, style: Se(s), children: n }, `motion-line-${s}`)
1931
1951
  );
1932
1952
  } else
1933
1953
  o.push(...n);
1934
1954
  for (let s = 0; s < t.breaks; s++)
1935
- o.push(/* @__PURE__ */ A.jsx("br", {}, `motion-break-${r.br++}`));
1955
+ o.push(/* @__PURE__ */ R.jsx("br", {}, `motion-break-${r.br++}`));
1936
1956
  return o;
1937
1957
  }
1938
1958
  function Sn(t, e, r) {
1939
1959
  if (!t)
1940
1960
  return [];
1941
- const n = Q(e, E.Word), o = [], s = /(\s+)/g;
1961
+ const n = ne(e, v.Word), o = [], s = /(\s+)/g;
1942
1962
  let i = 0, a;
1943
1963
  for (; (a = s.exec(t)) !== null; ) {
1944
1964
  if (a.index > i) {
@@ -1955,15 +1975,15 @@ function Sn(t, e, r) {
1955
1975
  }
1956
1976
  function it(t, e, r, n) {
1957
1977
  const o = e.word++, s = wn(t, r, e), i = `motion-word-${o}`, a = bn(o, n);
1958
- return n ? /* @__PURE__ */ A.jsx("span", { "data-motion-word": !0, style: a, children: s }, i) : /* @__PURE__ */ A.jsx("span", { style: a, children: s }, i);
1978
+ return n ? /* @__PURE__ */ R.jsx("span", { "data-motion-word": !0, style: a, children: s }, i) : /* @__PURE__ */ R.jsx("span", { style: a, children: s }, i);
1959
1979
  }
1960
1980
  function bn(t, e) {
1961
- return e ? { ...we(t), whiteSpace: "nowrap" } : { whiteSpace: "nowrap" };
1981
+ return e ? { ...Se(t), whiteSpace: "nowrap" } : { whiteSpace: "nowrap" };
1962
1982
  }
1963
1983
  function wn(t, e, r) {
1964
1984
  if (!t)
1965
1985
  return [];
1966
- const n = Q(e, E.Letter), o = Q(e, E.Emoji);
1986
+ const n = ne(e, v.Letter), o = ne(e, v.Emoji);
1967
1987
  if (!n) {
1968
1988
  if (!o)
1969
1989
  return [t];
@@ -1975,17 +1995,17 @@ function wn(t, e, r) {
1975
1995
  }
1976
1996
  const s = [], i = Ue(t);
1977
1997
  for (const a of i) {
1978
- const c = r.letter++, f = `motion-letter-${c}`, d = we(c);
1998
+ const c = r.letter++, f = `motion-letter-${c}`, d = Se(c);
1979
1999
  if (a === `
1980
2000
  `) {
1981
2001
  s.push(
1982
- /* @__PURE__ */ A.jsx("span", { "data-motion-letter": !0, style: d, children: /* @__PURE__ */ A.jsx("br", {}) }, f)
2002
+ /* @__PURE__ */ R.jsx("span", { "data-motion-letter": !0, style: d, children: /* @__PURE__ */ R.jsx("br", {}) }, f)
1983
2003
  );
1984
2004
  continue;
1985
2005
  }
1986
2006
  const u = o && pt(a) ? { "data-motion-emoji": !0 } : void 0, g = a === " " ? " " : a;
1987
2007
  s.push(
1988
- /* @__PURE__ */ A.jsx("span", { "data-motion-letter": !0, style: d, ...u, children: g }, f)
2008
+ /* @__PURE__ */ R.jsx("span", { "data-motion-letter": !0, style: d, ...u, children: g }, f)
1989
2009
  );
1990
2010
  }
1991
2011
  return s;
@@ -1996,9 +2016,9 @@ function Ue(t) {
1996
2016
  const e = vn();
1997
2017
  return e ? Array.from(e.segment(t), (r) => r.segment) : Rn(t);
1998
2018
  }
1999
- let ue;
2019
+ let ce;
2000
2020
  function vn() {
2001
- return ue !== void 0 || (typeof Intl < "u" && typeof Intl.Segmenter == "function" ? ue = new Intl.Segmenter(void 0, { granularity: "grapheme" }) : ue = null), ue;
2021
+ return ce !== void 0 || (typeof Intl < "u" && typeof Intl.Segmenter == "function" ? ce = new Intl.Segmenter(void 0, { granularity: "grapheme" }) : ce = null), ce;
2002
2022
  }
2003
2023
  function Rn(t) {
2004
2024
  const e = [], r = Array.from(t);
@@ -2051,10 +2071,10 @@ function In() {
2051
2071
  const t = new RegExp("\\p{Extended_Pictographic}", "u");
2052
2072
  return (e) => t.test(e);
2053
2073
  } catch {
2054
- return _n;
2074
+ return On;
2055
2075
  }
2056
2076
  }
2057
- function _n(t) {
2077
+ function On(t) {
2058
2078
  if (!t)
2059
2079
  return !1;
2060
2080
  for (const e of Array.from(t)) {
@@ -2064,7 +2084,7 @@ function _n(t) {
2064
2084
  }
2065
2085
  return !1;
2066
2086
  }
2067
- function On(t) {
2087
+ function _n(t) {
2068
2088
  const e = [];
2069
2089
  let r = "", n = 0;
2070
2090
  for (let o = 0; o < t.length; o++) {
@@ -2087,10 +2107,10 @@ function Nn(t) {
2087
2107
  r.push(n), n.breaks >= 2 && (e.push(r), r = []);
2088
2108
  return r.length > 0 && e.push(r), e;
2089
2109
  }
2090
- function Q(t, e) {
2110
+ function ne(t, e) {
2091
2111
  return (t & e) === e;
2092
2112
  }
2093
- function we(t) {
2113
+ function Se(t) {
2094
2114
  return {
2095
2115
  "--tw-motion-seq-index": t.toString(),
2096
2116
  backgroundColor: "inherit",
@@ -2127,7 +2147,7 @@ function gt(t, e) {
2127
2147
  o = !0, i();
2128
2148
  const f = `motion-emoji-${e ? e.emoji++ : s++}`;
2129
2149
  r.push(
2130
- /* @__PURE__ */ A.jsx("span", { "data-motion-emoji": !0, children: a }, f)
2150
+ /* @__PURE__ */ R.jsx("span", { "data-motion-emoji": !0, children: a }, f)
2131
2151
  );
2132
2152
  continue;
2133
2153
  }
@@ -2137,22 +2157,22 @@ function gt(t, e) {
2137
2157
  }
2138
2158
  function Pn(t) {
2139
2159
  if (!t)
2140
- return E.None;
2160
+ return v.None;
2141
2161
  const e = t.trim();
2142
2162
  if (!e)
2143
- return E.None;
2163
+ return v.None;
2144
2164
  const r = st.get(e);
2145
2165
  if (typeof r == "number")
2146
2166
  return r;
2147
2167
  if (typeof document > "u")
2148
- return E.None;
2168
+ return v.None;
2149
2169
  const n = e.split(/\s+/).filter(Boolean);
2150
2170
  if (n.length === 0)
2151
- return E.None;
2171
+ return v.None;
2152
2172
  const s = n.map((c) => `.${jn(c)}`).map(
2153
2173
  (c) => new RegExp(`(^|[^a-zA-Z0-9_-])${Ln(c)}(?![a-zA-Z0-9_-])`)
2154
2174
  );
2155
- let i = E.None, a = !1;
2175
+ let i = v.None, a = !1;
2156
2176
  for (const c of Array.from(document.styleSheets)) {
2157
2177
  let f;
2158
2178
  try {
@@ -2165,12 +2185,12 @@ function Pn(t) {
2165
2185
  break;
2166
2186
  a ||= d.sawStyleRule;
2167
2187
  }
2168
- return (i !== E.None || a) && st.set(e, i), i;
2188
+ return (i !== v.None || a) && st.set(e, i), i;
2169
2189
  }
2170
2190
  function yt(t, e) {
2171
2191
  if (!t)
2172
- return { mask: E.None, sawStyleRule: !1 };
2173
- let r = E.None, n = !1;
2192
+ return { mask: v.None, sawStyleRule: !1 };
2193
+ let r = v.None, n = !1;
2174
2194
  for (let o = 0; o < t.length; o++) {
2175
2195
  const s = t[o];
2176
2196
  if (s) {
@@ -2199,7 +2219,7 @@ function Ln(t) {
2199
2219
  return t.replace(/[.*+?^${}()|[\]\\]/g, (e) => `\\${e}`);
2200
2220
  }
2201
2221
  const $e = "ikon_auth_session", Mn = 7 * 24 * 60 * 60 * 1e3;
2202
- function ve(t) {
2222
+ function be(t) {
2203
2223
  try {
2204
2224
  localStorage.setItem($e, JSON.stringify(t));
2205
2225
  } catch {
@@ -2223,7 +2243,7 @@ function bt() {
2223
2243
  console.warn("Failed to clear auth session from localStorage");
2224
2244
  }
2225
2245
  }
2226
- function le(t) {
2246
+ function ue(t) {
2227
2247
  return {
2228
2248
  id: "",
2229
2249
  provider: t.provider,
@@ -2232,7 +2252,7 @@ function le(t) {
2232
2252
  };
2233
2253
  }
2234
2254
  async function wt(t, e) {
2235
- const r = pe(), n = await fetch(`${e}/anonymous`, {
2255
+ const r = he(), n = await fetch(`${e}/anonymous`, {
2236
2256
  method: "POST",
2237
2257
  headers: { "Content-Type": "application/json" },
2238
2258
  body: JSON.stringify({ deviceId: r, space: t })
@@ -2246,7 +2266,7 @@ async function wt(t, e) {
2246
2266
  provider: "anonymous",
2247
2267
  authenticatedAt: Date.now()
2248
2268
  };
2249
- return ve(s), s;
2269
+ return be(s), s;
2250
2270
  }
2251
2271
  async function po(t) {
2252
2272
  const { email: e, spaceId: r, authUrl: n, returnUrl: o = window.location.origin + window.location.pathname } = t, s = await fetch(`${n}/email/send`, {
@@ -2304,7 +2324,7 @@ async function Bn(t, e, r) {
2304
2324
  provider: "passkey",
2305
2325
  authenticatedAt: Date.now()
2306
2326
  };
2307
- return ve(s), s;
2327
+ return be(s), s;
2308
2328
  }
2309
2329
  async function $n(t, e) {
2310
2330
  const r = await fetch(`${t}/passkey/authentication/options`, {
@@ -2333,7 +2353,7 @@ async function Vn(t, e) {
2333
2353
  provider: "passkey",
2334
2354
  authenticatedAt: Date.now()
2335
2355
  };
2336
- return ve(o), o;
2356
+ return be(o), o;
2337
2357
  }
2338
2358
  function q(t) {
2339
2359
  const e = new Uint8Array(t);
@@ -2342,7 +2362,7 @@ function q(t) {
2342
2362
  r += String.fromCharCode(o);
2343
2363
  return btoa(r).replace(/\+/g, "-").replace(/\//g, "_").replace(/=/g, "");
2344
2364
  }
2345
- function Se(t) {
2365
+ function ge(t) {
2346
2366
  const e = t.replace(/-/g, "+").replace(/_/g, "/"), r = (4 - e.length % 4) % 4, n = e.padEnd(e.length + r, "="), o = atob(n), s = new ArrayBuffer(o.length), i = new Uint8Array(s);
2347
2367
  for (let a = 0; a < o.length; a++)
2348
2368
  i[a] = o.charCodeAt(a);
@@ -2358,7 +2378,7 @@ function vt(t) {
2358
2378
  const { id: e } = t;
2359
2379
  return {
2360
2380
  ...t,
2361
- id: Se(e),
2381
+ id: ge(e),
2362
2382
  /**
2363
2383
  * `descriptor.transports` is an array of our `AuthenticatorTransportFuture` that includes newer
2364
2384
  * transports that TypeScript's DOM lib is ignorant of. Convince TS that our list of transports
@@ -2373,7 +2393,7 @@ function Rt(t) {
2373
2393
  t === "localhost" || /^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(t)
2374
2394
  );
2375
2395
  }
2376
- class P extends Error {
2396
+ class j extends Error {
2377
2397
  constructor({ message: e, code: r, cause: n, name: o }) {
2378
2398
  super(e, { cause: n }), Object.defineProperty(this, "code", {
2379
2399
  enumerable: !0,
@@ -2383,20 +2403,20 @@ class P extends Error {
2383
2403
  }), this.name = o ?? n.name, this.code = r;
2384
2404
  }
2385
2405
  }
2386
- function Yn({ error: t, options: e }) {
2406
+ function Wn({ error: t, options: e }) {
2387
2407
  const { publicKey: r } = e;
2388
2408
  if (!r)
2389
2409
  throw Error("options was missing required publicKey property");
2390
2410
  if (t.name === "AbortError") {
2391
2411
  if (e.signal instanceof AbortSignal)
2392
- return new P({
2412
+ return new j({
2393
2413
  message: "Registration ceremony was sent an abort signal",
2394
2414
  code: "ERROR_CEREMONY_ABORTED",
2395
2415
  cause: t
2396
2416
  });
2397
2417
  } else if (t.name === "ConstraintError") {
2398
2418
  if (r.authenticatorSelection?.requireResidentKey === !0)
2399
- return new P({
2419
+ return new j({
2400
2420
  message: "Discoverable credentials were required but no available authenticator supported it",
2401
2421
  code: "ERROR_AUTHENTICATOR_MISSING_DISCOVERABLE_CREDENTIAL_SUPPORT",
2402
2422
  cause: t
@@ -2405,36 +2425,36 @@ function Yn({ error: t, options: e }) {
2405
2425
  // @ts-ignore: `mediation` doesn't yet exist on CredentialCreationOptions but it's possible as of Sept 2024
2406
2426
  e.mediation === "conditional" && r.authenticatorSelection?.userVerification === "required"
2407
2427
  )
2408
- return new P({
2428
+ return new j({
2409
2429
  message: "User verification was required during automatic registration but it could not be performed",
2410
2430
  code: "ERROR_AUTO_REGISTER_USER_VERIFICATION_FAILURE",
2411
2431
  cause: t
2412
2432
  });
2413
2433
  if (r.authenticatorSelection?.userVerification === "required")
2414
- return new P({
2434
+ return new j({
2415
2435
  message: "User verification was required but no available authenticator supported it",
2416
2436
  code: "ERROR_AUTHENTICATOR_MISSING_USER_VERIFICATION_SUPPORT",
2417
2437
  cause: t
2418
2438
  });
2419
2439
  } else {
2420
2440
  if (t.name === "InvalidStateError")
2421
- return new P({
2441
+ return new j({
2422
2442
  message: "The authenticator was previously registered",
2423
2443
  code: "ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED",
2424
2444
  cause: t
2425
2445
  });
2426
2446
  if (t.name === "NotAllowedError")
2427
- return new P({
2447
+ return new j({
2428
2448
  message: t.message,
2429
2449
  code: "ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",
2430
2450
  cause: t
2431
2451
  });
2432
2452
  if (t.name === "NotSupportedError")
2433
- return r.pubKeyCredParams.filter((o) => o.type === "public-key").length === 0 ? new P({
2453
+ return r.pubKeyCredParams.filter((o) => o.type === "public-key").length === 0 ? new j({
2434
2454
  message: 'No entry in pubKeyCredParams was of type "public-key"',
2435
2455
  code: "ERROR_MALFORMED_PUBKEYCREDPARAMS",
2436
2456
  cause: t
2437
- }) : new P({
2457
+ }) : new j({
2438
2458
  message: "No available authenticator supported any of the specified pubKeyCredParams algorithms",
2439
2459
  code: "ERROR_AUTHENTICATOR_NO_SUPPORTED_PUBKEYCREDPARAMS_ALG",
2440
2460
  cause: t
@@ -2443,25 +2463,25 @@ function Yn({ error: t, options: e }) {
2443
2463
  const n = globalThis.location.hostname;
2444
2464
  if (Rt(n)) {
2445
2465
  if (r.rp.id !== n)
2446
- return new P({
2466
+ return new j({
2447
2467
  message: `The RP ID "${r.rp.id}" is invalid for this domain`,
2448
2468
  code: "ERROR_INVALID_RP_ID",
2449
2469
  cause: t
2450
2470
  });
2451
- } else return new P({
2471
+ } else return new j({
2452
2472
  message: `${globalThis.location.hostname} is an invalid domain`,
2453
2473
  code: "ERROR_INVALID_DOMAIN",
2454
2474
  cause: t
2455
2475
  });
2456
2476
  } else if (t.name === "TypeError") {
2457
2477
  if (r.user.id.byteLength < 1 || r.user.id.byteLength > 64)
2458
- return new P({
2478
+ return new j({
2459
2479
  message: "User ID was not between 1 and 64 characters",
2460
2480
  code: "ERROR_INVALID_USER_ID_LENGTH",
2461
2481
  cause: t
2462
2482
  });
2463
2483
  } else if (t.name === "UnknownError")
2464
- return new P({
2484
+ return new j({
2465
2485
  message: "The authenticator was unable to process the specified options, or could not create a new credential",
2466
2486
  code: "ERROR_AUTHENTICATOR_GENERAL_ERROR",
2467
2487
  cause: t
@@ -2469,7 +2489,7 @@ function Yn({ error: t, options: e }) {
2469
2489
  }
2470
2490
  return t;
2471
2491
  }
2472
- class zn {
2492
+ class Yn {
2473
2493
  constructor() {
2474
2494
  Object.defineProperty(this, "controller", {
2475
2495
  enumerable: !0,
@@ -2493,9 +2513,9 @@ class zn {
2493
2513
  }
2494
2514
  }
2495
2515
  }
2496
- const Et = new zn(), Wn = ["cross-platform", "platform"];
2516
+ const Et = new Yn(), zn = ["cross-platform", "platform"];
2497
2517
  function At(t) {
2498
- if (t && !(Wn.indexOf(t) < 0))
2518
+ if (t && !(zn.indexOf(t) < 0))
2499
2519
  return t;
2500
2520
  }
2501
2521
  async function qn(t) {
@@ -2505,10 +2525,10 @@ async function qn(t) {
2505
2525
  throw new Error("WebAuthn is not supported in this browser");
2506
2526
  const n = {
2507
2527
  ...e,
2508
- challenge: Se(e.challenge),
2528
+ challenge: ge(e.challenge),
2509
2529
  user: {
2510
2530
  ...e.user,
2511
- id: Se(e.user.id)
2531
+ id: ge(e.user.id)
2512
2532
  },
2513
2533
  excludeCredentials: e.excludeCredentials?.map(vt)
2514
2534
  }, o = {};
@@ -2517,7 +2537,7 @@ async function qn(t) {
2517
2537
  try {
2518
2538
  s = await navigator.credentials.create(o);
2519
2539
  } catch (y) {
2520
- throw Yn({ error: y, options: o });
2540
+ throw Wn({ error: y, options: o });
2521
2541
  }
2522
2542
  if (!s)
2523
2543
  throw new Error("Registration was not completed");
@@ -2581,14 +2601,14 @@ function Hn({ error: t, options: e }) {
2581
2601
  throw Error("options was missing required publicKey property");
2582
2602
  if (t.name === "AbortError") {
2583
2603
  if (e.signal instanceof AbortSignal)
2584
- return new P({
2604
+ return new j({
2585
2605
  message: "Authentication ceremony was sent an abort signal",
2586
2606
  code: "ERROR_CEREMONY_ABORTED",
2587
2607
  cause: t
2588
2608
  });
2589
2609
  } else {
2590
2610
  if (t.name === "NotAllowedError")
2591
- return new P({
2611
+ return new j({
2592
2612
  message: t.message,
2593
2613
  code: "ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",
2594
2614
  cause: t
@@ -2597,18 +2617,18 @@ function Hn({ error: t, options: e }) {
2597
2617
  const n = globalThis.location.hostname;
2598
2618
  if (Rt(n)) {
2599
2619
  if (r.rpId !== n)
2600
- return new P({
2620
+ return new j({
2601
2621
  message: `The RP ID "${r.rpId}" is invalid for this domain`,
2602
2622
  code: "ERROR_INVALID_RP_ID",
2603
2623
  cause: t
2604
2624
  });
2605
- } else return new P({
2625
+ } else return new j({
2606
2626
  message: `${globalThis.location.hostname} is an invalid domain`,
2607
2627
  code: "ERROR_INVALID_DOMAIN",
2608
2628
  cause: t
2609
2629
  });
2610
2630
  } else if (t.name === "UnknownError")
2611
- return new P({
2631
+ return new j({
2612
2632
  message: "The authenticator was unable to process the specified options, or could not create a new assertion signature",
2613
2633
  code: "ERROR_AUTHENTICATOR_GENERAL_ERROR",
2614
2634
  cause: t
@@ -2625,7 +2645,7 @@ async function Jn(t) {
2625
2645
  e.allowCredentials?.length !== 0 && (o = e.allowCredentials?.map(vt));
2626
2646
  const s = {
2627
2647
  ...e,
2628
- challenge: Se(e.challenge),
2648
+ challenge: ge(e.challenge),
2629
2649
  allowCredentials: o
2630
2650
  }, i = {};
2631
2651
  if (r) {
@@ -2662,13 +2682,13 @@ async function Jn(t) {
2662
2682
  }
2663
2683
  const Ke = dt(null);
2664
2684
  function go({ children: t, config: e }) {
2665
- const [r, n] = X({
2685
+ const [r, n] = Y({
2666
2686
  isAuthenticated: !1,
2667
2687
  isLoading: !0,
2668
2688
  user: null,
2669
2689
  error: null
2670
2690
  });
2671
- D(() => {
2691
+ M(() => {
2672
2692
  (() => {
2673
2693
  const d = xn();
2674
2694
  if (d) {
@@ -2687,10 +2707,10 @@ function go({ children: t, config: e }) {
2687
2707
  provider: h.provider,
2688
2708
  authenticatedAt: Date.now()
2689
2709
  };
2690
- ve(g), lt(), n({
2710
+ be(g), lt(), n({
2691
2711
  isAuthenticated: !0,
2692
2712
  isLoading: !1,
2693
- user: le(g),
2713
+ user: ue(g),
2694
2714
  error: null
2695
2715
  });
2696
2716
  return;
@@ -2700,7 +2720,7 @@ function go({ children: t, config: e }) {
2700
2720
  n({
2701
2721
  isAuthenticated: !0,
2702
2722
  isLoading: !1,
2703
- user: le(u),
2723
+ user: ue(u),
2704
2724
  error: null
2705
2725
  });
2706
2726
  return;
@@ -2722,7 +2742,7 @@ function go({ children: t, config: e }) {
2722
2742
  }));
2723
2743
  return;
2724
2744
  }
2725
- const d = e.authUrl ?? Oe();
2745
+ const d = e.authUrl ?? _e();
2726
2746
  if (f === "guest") {
2727
2747
  n((u) => ({ ...u, isLoading: !0 }));
2728
2748
  try {
@@ -2730,7 +2750,7 @@ function go({ children: t, config: e }) {
2730
2750
  n({
2731
2751
  isAuthenticated: !0,
2732
2752
  isLoading: !1,
2733
- user: le(u),
2753
+ user: ue(u),
2734
2754
  error: null
2735
2755
  });
2736
2756
  } catch (u) {
@@ -2749,7 +2769,7 @@ function go({ children: t, config: e }) {
2749
2769
  n({
2750
2770
  isAuthenticated: !0,
2751
2771
  isLoading: !1,
2752
- user: le(y),
2772
+ user: ue(y),
2753
2773
  error: null
2754
2774
  });
2755
2775
  } catch (u) {
@@ -2774,14 +2794,14 @@ function go({ children: t, config: e }) {
2774
2794
  });
2775
2795
  }, []), i = x(
2776
2796
  async (f) => {
2777
- const d = e.authUrl ?? Oe();
2797
+ const d = e.authUrl ?? _e();
2778
2798
  n((h) => ({ ...h, isLoading: !0, error: null }));
2779
2799
  try {
2780
2800
  const h = await Fn(d), u = await qn({ optionsJSON: h }), g = await Bn(d, u, f);
2781
2801
  n({
2782
2802
  isAuthenticated: !0,
2783
2803
  isLoading: !1,
2784
- user: le(g),
2804
+ user: ue(g),
2785
2805
  error: null
2786
2806
  });
2787
2807
  } catch (h) {
@@ -2793,7 +2813,7 @@ function go({ children: t, config: e }) {
2793
2813
  }
2794
2814
  },
2795
2815
  [e.authUrl]
2796
- ), a = x(() => r.user?.token ?? null, [r.user]), c = Y(
2816
+ ), a = x(() => r.user?.token ?? null, [r.user]), c = K(
2797
2817
  () => ({
2798
2818
  state: r,
2799
2819
  login: o,
@@ -2803,7 +2823,7 @@ function go({ children: t, config: e }) {
2803
2823
  }),
2804
2824
  [r, o, s, a, i]
2805
2825
  );
2806
- return /* @__PURE__ */ A.jsx(Ke, { value: c, children: t });
2826
+ return /* @__PURE__ */ R.jsx(Ke, { value: c, children: t });
2807
2827
  }
2808
2828
  function Xn() {
2809
2829
  const t = De(Ke);
@@ -2815,8 +2835,8 @@ function yo() {
2815
2835
  return De(Ke);
2816
2836
  }
2817
2837
  function So(t) {
2818
- const { config: e, guestUrlParam: r } = t, { state: n, login: o } = Xn(), s = R(!1);
2819
- return D(() => {
2838
+ const { config: e, guestUrlParam: r } = t, { state: n, login: o } = Xn(), s = A(!1);
2839
+ return M(() => {
2820
2840
  if (!r || n.isAuthenticated || n.isLoading || s.current || !e.methods.includes("guest"))
2821
2841
  return;
2822
2842
  const i = new URLSearchParams(window.location.search), a = i.get(r);
@@ -2871,7 +2891,7 @@ function bo({
2871
2891
  return null;
2872
2892
  }
2873
2893
  }
2874
- const _e = be("useIkonApp");
2894
+ const Oe = ye("useIkonApp");
2875
2895
  function Zn() {
2876
2896
  if (typeof window < "u" && window.__IKON_AUTH_CONFIG__)
2877
2897
  return window.__IKON_AUTH_CONFIG__;
@@ -2881,121 +2901,120 @@ function Qn() {
2881
2901
  return window.__IKON_LOCAL_IKON_SERVER_CONFIG__;
2882
2902
  }
2883
2903
  function wo(t) {
2884
- const { authConfig: e, localServer: r, modules: n, registerModules: o, onJoined: s, onConnectionStateChange: i, onError: a, timeouts: c, audio: f, video: d, mediaSession: h } = t, u = e === void 0 ? Zn() ?? null : e, g = r ?? Qn(), y = R(null), b = R(null), m = R(null), p = R(!1), v = R(f), k = R(d), I = R(h), L = R(c), G = R(i), Z = R(a), C = R(s);
2885
- v.current = f, k.current = d, I.current = h, L.current = c, G.current = i, Z.current = a, C.current = s;
2886
- const [N, F] = X("idle"), [j, M] = X(null), [z, ee] = X(null), [J, fe] = X(null), [te, re] = X(!1), B = Y(() => {
2904
+ const { authConfig: e, modules: r, timeouts: n, backgroundAudio: o, webRtc: s } = t, i = e === void 0 ? Zn() ?? null : e, a = Qn(), c = A(null), f = A(null), d = A(null), h = A(!1), u = A(o), g = A(n), y = A(s);
2905
+ u.current = o, g.current = n, y.current = s;
2906
+ const [S, m] = Y("idle"), [p, w] = Y(null), [T, _] = Y(null), [D, G] = Y(null), [Z, C] = Y(null), [P, U] = Y(null), [O, F] = Y(null), [W, Q] = Y(!1), B = K(() => {
2887
2907
  try {
2888
- const w = Nt();
2889
- return (w.sessionId || w.channelKey) && Pt(), w;
2908
+ const E = Nt();
2909
+ return (E.sessionId || E.channelKey) && Pt(), E;
2890
2910
  } catch {
2891
2911
  return { parameters: {} };
2892
2912
  }
2893
- }, []), l = Y(() => u?.enabled ? St() : null, [u?.enabled]), S = g?.enabled ?? !1, T = g?.host ?? "localhost", _ = g?.port ?? 8443;
2894
- D(() => {
2895
- !S && Ye() && u && !u.enabled && u.spaceId && !J && !te && (re(!0), wt(u.spaceId, u.authUrl ?? Oe()).then((O) => {
2896
- fe(O.token);
2897
- }).catch((O) => {
2898
- _e.error("Anonymous auth failed:", O), M(O instanceof Error ? O.message : "Anonymous auth failed");
2913
+ }, []), J = K(() => i?.enabled ? St() : null, [i?.enabled]), X = a?.enabled ?? !1, ee = a?.host ?? "localhost", te = a?.port ?? 8443;
2914
+ M(() => {
2915
+ !X && We() && i && !i.enabled && i.spaceId && !O && !W && (Q(!0), wt(i.spaceId, i.authUrl ?? _e()).then((I) => {
2916
+ F(I.token);
2917
+ }).catch((I) => {
2918
+ Oe.error("Anonymous auth failed:", I), w(I instanceof Error ? I.message : "Anonymous auth failed");
2899
2919
  }).finally(() => {
2900
- re(!1);
2920
+ Q(!1);
2901
2921
  }));
2902
- }, [S, u, J, te]);
2903
- const V = Y(() => {
2904
- if (S) {
2905
- const w = l?.token ? jt(l.token) ?? pe() : pe();
2922
+ }, [X, i, O, W]);
2923
+ const l = K(() => {
2924
+ if (X) {
2925
+ const E = J?.token ? jt(J.token) ?? he() : he();
2906
2926
  return {
2907
2927
  local: {
2908
- host: T,
2909
- httpsPort: _,
2910
- userId: w,
2928
+ host: ee,
2929
+ httpsPort: te,
2930
+ userId: E,
2911
2931
  parameters: B.parameters
2912
2932
  }
2913
2933
  };
2914
2934
  }
2915
- return l?.token && u?.spaceId ? {
2935
+ return J?.token && i?.spaceId ? {
2916
2936
  sessionToken: {
2917
- token: l.token,
2918
- spaceId: u.spaceId,
2919
- backendType: ze(),
2937
+ token: J.token,
2938
+ spaceId: i.spaceId,
2939
+ backendType: Ye(),
2920
2940
  sessionId: B.sessionId,
2921
2941
  channelKey: B.channelKey,
2922
2942
  parameters: B.parameters
2923
2943
  }
2924
- } : J && u?.spaceId ? {
2944
+ } : O && i?.spaceId ? {
2925
2945
  sessionToken: {
2926
- token: J,
2927
- spaceId: u.spaceId,
2928
- backendType: ze(),
2946
+ token: O,
2947
+ spaceId: i.spaceId,
2948
+ backendType: Ye(),
2929
2949
  sessionId: B.sessionId,
2930
2950
  channelKey: B.channelKey,
2931
2951
  parameters: B.parameters
2932
2952
  }
2933
- } : Ye() ? null : {
2953
+ } : We() ? null : {
2934
2954
  local: {
2935
- host: T,
2936
- httpsPort: _,
2937
- userId: pe(),
2955
+ host: ee,
2956
+ httpsPort: te,
2957
+ userId: he(),
2938
2958
  parameters: B.parameters
2939
2959
  }
2940
2960
  };
2941
- }, [S, T, _, l?.token, u?.spaceId, J, B.sessionId, B.channelKey, B.parameters]);
2942
- zr(z);
2943
- const K = qr(z);
2944
- D(() => {
2945
- if (!p.current) {
2946
- if (p.current = !0, m.current = xr(), n)
2947
- for (const w of n)
2948
- w(m.current);
2949
- o?.(m.current), m.current.loadRegisteredModules().catch((w) => {
2950
- _e.error("Failed to load UI modules", w);
2961
+ }, [X, ee, te, J?.token, i?.spaceId, O, B.sessionId, B.channelKey, B.parameters]);
2962
+ Yr(T);
2963
+ const b = qr(T);
2964
+ M(() => {
2965
+ if (!h.current) {
2966
+ if (h.current = !0, d.current = xr(), r)
2967
+ for (const E of r)
2968
+ E(d.current);
2969
+ d.current.loadRegisteredModules().catch((E) => {
2970
+ Oe.error("Failed to load UI modules", E);
2951
2971
  });
2952
2972
  }
2953
- }, []), D(() => {
2954
- if (!V) return;
2955
- const w = new Lt({
2956
- ...V,
2957
- timeouts: L.current,
2958
- audio: v.current,
2959
- video: k.current,
2960
- mediaSession: I.current,
2961
- onConnectionStateChange: (U) => {
2962
- F(U), G.current?.(U);
2963
- },
2964
- onError: (U) => {
2965
- M(U.message), Z.current?.(U);
2973
+ }, []), M(() => {
2974
+ if (!l) return;
2975
+ const E = new Lt({
2976
+ ...l,
2977
+ timeouts: g.current,
2978
+ audio: u.current ? { background: { allowOnDesktop: !0, allowOnMobile: !0 } } : void 0,
2979
+ mediaSession: { title: document.title || void 0, artist: document.title || void 0 },
2980
+ webRtc: y.current ? { enabled: !0 } : void 0,
2981
+ onConnectionStateChange: (V) => {
2982
+ m(V), y.current && V === "connected" && (G(E.webRtcAudioStream), C(E.webRtcVideoStream), U(E.webRtcScreenStream));
2966
2983
  },
2967
- onJoined: () => {
2968
- const U = w.globalState?.SessionId;
2969
- C.current?.(U);
2984
+ onError: (V) => {
2985
+ w(V.message);
2970
2986
  }
2971
2987
  });
2972
- y.current = w;
2973
- const O = new Zt({ client: w });
2974
- return b.current = O, ee(O), w.connect().catch((U) => {
2975
- _e.error("Connection failed:", U);
2988
+ c.current = E;
2989
+ const I = new Zt({ client: E });
2990
+ return f.current = I, _(I), E.connect().catch((V) => {
2991
+ Oe.error("Connection failed:", V);
2976
2992
  }), () => {
2977
- w.disconnect(), y.current = null, O.dispose(), b.current = null;
2993
+ E.disconnect(), c.current = null, I.dispose(), f.current = null, G(null), C(null), U(null);
2978
2994
  };
2979
- }, [V]);
2980
- const ne = x((w, O) => {
2981
- const U = typeof O == "string" ? O : JSON.stringify(O ?? {});
2982
- y.current?.sendActionCall(w, U);
2983
- }, []), oe = N === "connected" || N === "reconnecting";
2995
+ }, [l]);
2996
+ const k = x((E, I) => {
2997
+ const V = typeof I == "string" ? I : JSON.stringify(I ?? {});
2998
+ c.current?.sendActionCall(E, V);
2999
+ }, []), N = S === "connected" || S === "reconnecting";
2984
3000
  return {
2985
- connectionState: N,
2986
- error: j,
2987
- stores: K,
2988
- client: y.current,
2989
- registry: m.current,
2990
- clientRef: y,
2991
- uiRef: b,
2992
- registryRef: m,
2993
- onAction: ne,
2994
- isReady: oe
3001
+ connectionState: S,
3002
+ error: p,
3003
+ stores: b,
3004
+ client: c.current,
3005
+ registry: d.current,
3006
+ clientRef: c,
3007
+ uiRef: f,
3008
+ registryRef: d,
3009
+ onAction: k,
3010
+ isReady: N,
3011
+ webRtcAudioStream: D,
3012
+ webRtcVideoStream: Z,
3013
+ webRtcScreenStream: P
2995
3014
  };
2996
3015
  }
2997
3016
  function vo(t) {
2998
- const e = R(!1);
3017
+ const e = A(!1);
2999
3018
  return x(() => {
3000
3019
  if (e.current) return;
3001
3020
  e.current = !0;
@@ -3005,16 +3024,16 @@ function vo(t) {
3005
3024
  }
3006
3025
  let eo = 0;
3007
3026
  function Ro(t = 5, e = 5e3) {
3008
- const [r, n] = X([]), o = R(/* @__PURE__ */ new Map()), s = x((i) => {
3027
+ const [r, n] = Y([]), o = A(/* @__PURE__ */ new Map()), s = x((i) => {
3009
3028
  const a = o.current.get(i);
3010
3029
  a && (clearTimeout(a), o.current.delete(i)), n((c) => c.filter((f) => f.id !== i));
3011
3030
  }, []);
3012
- return D(() => {
3031
+ return M(() => {
3013
3032
  const i = o.current, a = Mt(
3014
3033
  (c) => {
3015
3034
  if (!Ut())
3016
3035
  return;
3017
- const f = `toast-${++eo}`, d = c.level === We.ERROR ? "error" : "warn", h = {
3036
+ const f = `toast-${++eo}`, d = c.level === ze.ERROR ? "error" : "warn", h = {
3018
3037
  id: f,
3019
3038
  level: d,
3020
3039
  message: c.message,
@@ -3026,7 +3045,7 @@ function Ro(t = 5, e = 5e3) {
3026
3045
  }, e);
3027
3046
  i.set(f, u);
3028
3047
  },
3029
- { minLevel: We.WARN }
3048
+ { minLevel: ze.WARN }
3030
3049
  );
3031
3050
  return () => {
3032
3051
  a();
@@ -3056,7 +3075,7 @@ function Eo({
3056
3075
  defaultLanguage: r,
3057
3076
  detectLanguage: n = !1
3058
3077
  }) {
3059
- const o = Object.keys(e), s = no(o, n, r), i = e[s] ?? e.en, a = Y(
3078
+ const o = Object.keys(e), s = no(o, n, r), i = e[s] ?? e.en, a = K(
3060
3079
  () => ({
3061
3080
  t: (c, f) => {
3062
3081
  const d = i[c];
@@ -3067,7 +3086,7 @@ function Eo({
3067
3086
  }),
3068
3087
  [i, s]
3069
3088
  );
3070
- return /* @__PURE__ */ A.jsx(Tt, { value: a, children: t });
3089
+ return /* @__PURE__ */ R.jsx(Tt, { value: a, children: t });
3071
3090
  }
3072
3091
  function Ao() {
3073
3092
  const t = De(Tt);
@@ -3118,15 +3137,15 @@ export {
3118
3137
  Mr as registerShaderModule,
3119
3138
  qt as renderChildren,
3120
3139
  mo as renderMotionLetters,
3121
- ve as saveAuthSession,
3140
+ be as saveAuthSession,
3122
3141
  po as sendMagicLink,
3123
- le as sessionToUser,
3142
+ ue as sessionToUser,
3124
3143
  Xn as useAuth,
3125
3144
  So as useAuthGuard,
3126
3145
  yo as useAuthOptional,
3127
3146
  Ao as useI18n,
3128
3147
  wo as useIkonApp,
3129
- zr as useIkonStyles,
3148
+ Yr as useIkonStyles,
3130
3149
  qr as useIkonUiStores,
3131
3150
  vo as useLazyFont,
3132
3151
  Ro as useToasts,