@ikonai/sdk-react-ui 1.0.13 → 1.0.14

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,7 +1,7 @@
1
- import { IkonUiCore as Tt, UiStreamStore as kt } from "@ikonai/sdk-ui";
2
- import { UiStreamStore as vo } from "@ikonai/sdk-ui";
3
- import Ct, { useSyncExternalStore as Ue, useMemo as Y, memo as q, useRef as E, useCallback as x, Fragment as It, useEffect as D, useState as J, createContext as ut, use as xe } from "react";
4
- import { createLogger as Se, getOrCreateDeviceId as me, deriveAuthUrl as Oe, parseUrlParams as Ot, clearSessionParamsFromUrl as _t, isCloudEnvironment as Ke, extractUserIdFromToken as Nt, deriveBackendType as Ye, IkonClient as Pt, subscribeToLogEvents as Mt, isDebugModeEnabled as jt, LogLevel as ze } from "@ikonai/sdk";
1
+ import { IkonUiCore as Ct, UiStreamStore as It } from "@ikonai/sdk-ui";
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
5
  var he = { exports: {} }, se = {};
6
6
  /**
7
7
  * @license React
@@ -12,10 +12,10 @@ var he = { exports: {} }, se = {};
12
12
  * This source code is licensed under the MIT license found in the
13
13
  * LICENSE file in the root directory of this source tree.
14
14
  */
15
- var We;
16
- function Lt() {
17
- if (We) return se;
18
- We = 1;
15
+ var qe;
16
+ function xt() {
17
+ if (qe) return se;
18
+ qe = 1;
19
19
  var t = Symbol.for("react.transitional.element"), e = Symbol.for("react.fragment");
20
20
  function r(n, o, s) {
21
21
  var i = null;
@@ -44,9 +44,9 @@ var ie = {};
44
44
  * This source code is licensed under the MIT license found in the
45
45
  * LICENSE file in the root directory of this source tree.
46
46
  */
47
- var qe;
48
- function Ut() {
49
- return qe || (qe = 1, process.env.NODE_ENV !== "production" && function() {
47
+ var Ge;
48
+ function Dt() {
49
+ return Ge || (Ge = 1, process.env.NODE_ENV !== "production" && function() {
50
50
  function t(l) {
51
51
  if (l == null) return null;
52
52
  if (typeof l == "function")
@@ -57,9 +57,9 @@ function Ut() {
57
57
  return "Fragment";
58
58
  case p:
59
59
  return "Profiler";
60
- case h:
60
+ case m:
61
61
  return "StrictMode";
62
- case j:
62
+ case L:
63
63
  return "Suspense";
64
64
  case G:
65
65
  return "SuspenseList";
@@ -102,11 +102,11 @@ function Ut() {
102
102
  }
103
103
  if (S) {
104
104
  S = console;
105
- var T = S.error, O = typeof Symbol == "function" && Symbol.toStringTag && l[Symbol.toStringTag] || l.constructor.name || "Object";
105
+ var T = S.error, _ = typeof Symbol == "function" && Symbol.toStringTag && l[Symbol.toStringTag] || l.constructor.name || "Object";
106
106
  return T.call(
107
107
  S,
108
108
  "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
109
- O
109
+ _
110
110
  ), e(l);
111
111
  }
112
112
  }
@@ -122,14 +122,14 @@ function Ut() {
122
122
  }
123
123
  }
124
124
  function o() {
125
- var l = M.A;
125
+ var l = j.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 (L.call(l, "key")) {
132
+ if (M.call(l, "key")) {
133
133
  var S = Object.getOwnPropertyDescriptor(l, "key").get;
134
134
  if (S && S.isReactWarning) return !1;
135
135
  }
@@ -137,7 +137,7 @@ function Ut() {
137
137
  }
138
138
  function a(l, S) {
139
139
  function T() {
140
- H || (H = !0, console.error(
140
+ J || (J = !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
142
  S
143
143
  ));
@@ -153,7 +153,7 @@ function Ut() {
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, O, V, K, ne, oe) {
156
+ function f(l, S, T, _, V, K, ne, oe) {
157
157
  return T = K.ref, l = {
158
158
  $$typeof: g,
159
159
  type: l,
@@ -185,36 +185,36 @@ function Ut() {
185
185
  value: oe
186
186
  }), Object.freeze && (Object.freeze(l.props), Object.freeze(l)), l;
187
187
  }
188
- function d(l, S, T, O, V, K, ne, oe) {
188
+ function d(l, S, T, _, V, K, ne, oe) {
189
189
  var w = S.children;
190
190
  if (w !== void 0)
191
- if (O)
191
+ if (_)
192
192
  if (z(w)) {
193
- for (O = 0; O < w.length; O++)
194
- m(w[O]);
193
+ for (_ = 0; _ < w.length; _++)
194
+ h(w[_]);
195
195
  Object.freeze && Object.freeze(w);
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 m(w);
201
- if (L.call(S, "key")) {
200
+ else h(w);
201
+ if (M.call(S, "key")) {
202
202
  w = t(l);
203
- var _ = Object.keys(S).filter(function(At) {
204
- return At !== "key";
203
+ var O = Object.keys(S).filter(function(kt) {
204
+ return kt !== "key";
205
205
  });
206
- O = 0 < _.length ? "{key: someKey, " + _.join(": ..., ") + ": ...}" : "{key: someKey}", B[w + O] || (_ = 0 < _.length ? "{" + _.join(": ..., ") + ": ...}" : "{}", console.error(
206
+ _ = 0 < O.length ? "{key: someKey, " + O.join(": ..., ") + ": ...}" : "{key: someKey}", B[w + _] || (O = 0 < O.length ? "{" + O.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
- O,
214
- w,
215
213
  _,
214
+ w,
215
+ O,
216
216
  w
217
- ), B[w + O] = !0);
217
+ ), B[w + _] = !0);
218
218
  }
219
219
  if (w = null, T !== void 0 && (r(T), w = "" + T), i(S) && (r(S.key), w = "" + S.key), "key" in S) {
220
220
  T = {};
@@ -235,10 +235,10 @@ React keys must be passed directly to JSX without using spread:
235
235
  oe
236
236
  );
237
237
  }
238
- function m(l) {
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 = Ct, g = Symbol.for("react.transitional.element"), y = Symbol.for("react.portal"), b = Symbol.for("react.fragment"), h = 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"), j = 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"), M = u.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, L = Object.prototype.hasOwnProperty, z = Array.isArray, ee = console.createTask ? console.createTask : function() {
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() {
242
242
  return null;
243
243
  };
244
244
  u = {
@@ -246,30 +246,30 @@ React keys must be passed directly to JSX without using spread:
246
246
  return l();
247
247
  }
248
248
  };
249
- var H, fe = {}, te = u["react-stack-bottom-frame"].bind(
249
+ var J, fe = {}, te = u["react-stack-bottom-frame"].bind(
250
250
  u,
251
251
  s
252
252
  )(), re = ee(n(s)), B = {};
253
- ie.Fragment = b, ie.jsx = function(l, S, T, O, V) {
254
- var K = 1e4 > M.recentlyCreatedOwnerStacks++;
253
+ ie.Fragment = b, ie.jsx = function(l, S, T, _, V) {
254
+ var K = 1e4 > j.recentlyCreatedOwnerStacks++;
255
255
  return d(
256
256
  l,
257
257
  S,
258
258
  T,
259
259
  !1,
260
- O,
260
+ _,
261
261
  V,
262
262
  K ? Error("react-stack-top-frame") : te,
263
263
  K ? ee(n(l)) : re
264
264
  );
265
- }, ie.jsxs = function(l, S, T, O, V) {
266
- var K = 1e4 > M.recentlyCreatedOwnerStacks++;
265
+ }, ie.jsxs = function(l, S, T, _, V) {
266
+ var K = 1e4 > j.recentlyCreatedOwnerStacks++;
267
267
  return d(
268
268
  l,
269
269
  S,
270
270
  T,
271
271
  !0,
272
- O,
272
+ _,
273
273
  V,
274
274
  K ? Error("react-stack-top-frame") : te,
275
275
  K ? ee(n(l)) : re
@@ -277,13 +277,13 @@ React keys must be passed directly to JSX without using spread:
277
277
  };
278
278
  }()), ie;
279
279
  }
280
- var Ge;
281
- function xt() {
282
- return Ge || (Ge = 1, process.env.NODE_ENV === "production" ? he.exports = Lt() : he.exports = Ut()), he.exports;
280
+ var He;
281
+ function Ft() {
282
+ return He || (He = 1, process.env.NODE_ENV === "production" ? he.exports = xt() : he.exports = Dt()), he.exports;
283
283
  }
284
- var A = xt();
285
- function Dt(t, e) {
286
- const r = Ue(
284
+ var A = Ft();
285
+ function Bt(t, e) {
286
+ const r = xe(
287
287
  (n) => t.subscribe(n),
288
288
  () => {
289
289
  const n = t.getSnapshot(), o = e ?? n.rootViewId, s = o ? n.views.get(o) : void 0;
@@ -302,16 +302,16 @@ function Dt(t, e) {
302
302
  };
303
303
  }, [r]);
304
304
  }
305
- function X(t, e) {
306
- const r = Ue(
305
+ function H(t, e) {
306
+ const r = xe(
307
307
  (n) => t.subscribeNode(e, n),
308
308
  () => t.getNodeVersion(e),
309
309
  () => t.getNodeVersion(e)
310
310
  );
311
311
  return Y(() => t.getNode(e), [t, e, r]);
312
312
  }
313
- const Ft = Se("UIRenderer");
314
- function Bt(t) {
313
+ const $t = be("UIRenderer");
314
+ function Vt(t) {
315
315
  if (t === void 0)
316
316
  return "{}";
317
317
  if (typeof t == "string")
@@ -322,18 +322,18 @@ function Bt(t) {
322
322
  return "{}";
323
323
  }
324
324
  }
325
- function $t(t) {
325
+ function Kt(t) {
326
326
  const e = t.styleIds;
327
327
  return Array.isArray(e) ? e : [];
328
328
  }
329
- function Vt(t) {
329
+ function Yt(t) {
330
330
  const e = t.children;
331
331
  return Array.isArray(e) ? e : [];
332
332
  }
333
- function Kt(t, e) {
333
+ function zt(t, e) {
334
334
  return t.nodeId === e.nodeId && t.context === e.context;
335
335
  }
336
- function Yt(t) {
336
+ function Wt(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,39 +341,39 @@ function Yt(t) {
341
341
  e += "," + t[r].id;
342
342
  return e;
343
343
  }
344
- const _e = q(function t({ nodeId: e, context: r }) {
345
- const n = X(r.store, e), o = n ? Vt(n) : [], s = Yt(o), i = Y(
346
- () => o.length === 0 ? null : o.map((m) => /* @__PURE__ */ A.jsx(t, { nodeId: m.id, context: r }, m.id)),
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)),
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(It, { children: i }, n.id);
353
+ return /* @__PURE__ */ A.jsx(Ot, { children: i }, n.id);
354
354
  const a = r.library.resolve(n);
355
355
  if (!a)
356
- return Ft.warn(`No renderer for node type ${n.type}`), null;
357
- const c = $t(n), f = c.length > 0 ? c.join(" ") : void 0, d = a;
356
+ return $t.warn(`No renderer for node type ${n.type}`), null;
357
+ const c = Kt(n), f = c.length > 0 ? c.join(" ") : void 0, d = a;
358
358
  return /* @__PURE__ */ A.jsx(d, { nodeId: e, context: r, className: f });
359
- }, Kt);
360
- function zt(t, e) {
361
- return !Array.isArray(t) || t.length === 0 ? null : t.map((r) => /* @__PURE__ */ A.jsx(_e, { nodeId: r.id, context: e }, r.id));
359
+ }, zt);
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));
362
362
  }
363
- function Wt(t, e) {
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 qt = q(function({ store: e, library: r, viewId: n, emptyFallback: o = null, onAction: s, client: i, video: a }) {
367
- const { rootViewId: c, rootNodeId: f } = Dt(e, n), d = E(s);
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);
368
368
  d.current = s;
369
- const m = E(i);
370
- m.current = i;
371
- const u = E(a);
369
+ const h = R(i);
370
+ h.current = i;
371
+ const u = R(a);
372
372
  u.current = a;
373
- const g = x((b, h) => {
373
+ const g = x((b, m) => {
374
374
  if (!b)
375
375
  return;
376
- const p = Bt(h);
376
+ const p = Vt(m);
377
377
  d.current?.(b, p);
378
378
  }, []), y = Y(() => {
379
379
  const b = {
@@ -381,16 +381,16 @@ const qt = q(function({ store: e, library: r, viewId: n, emptyFallback: o = null
381
381
  library: r,
382
382
  handlerCache: e.handlerCache,
383
383
  // Access payloads from store at call time, not captured snapshot
384
- getPayload: (h) => e.getSnapshot().payloads.get(h),
385
- renderChildren: (h) => zt(h, b),
386
- renderView: (h) => {
387
- const p = e.getSnapshot().views.get(h);
388
- return p ? /* @__PURE__ */ A.jsx(_e, { nodeId: p.id, context: b }) : null;
384
+ getPayload: (m) => e.getSnapshot().payloads.get(m),
385
+ renderChildren: (m) => qt(m, b),
386
+ renderView: (m) => {
387
+ const p = e.getSnapshot().views.get(m);
388
+ return p ? /* @__PURE__ */ A.jsx(Ne, { nodeId: p.id, context: b }) : null;
389
389
  },
390
390
  dispatchAction: g,
391
391
  // Access client/video via refs to avoid context recreation
392
392
  get client() {
393
- return m.current;
393
+ return h.current;
394
394
  },
395
395
  get video() {
396
396
  return u.current;
@@ -398,9 +398,9 @@ const qt = q(function({ store: e, library: r, viewId: n, emptyFallback: o = null
398
398
  };
399
399
  return b;
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(_e, { nodeId: f, context: y }) });
402
- }, Wt);
403
- class Gt {
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 }) });
402
+ }, Gt);
403
+ class Jt {
404
404
  constructor(e, r) {
405
405
  if (this.fallback = r, e)
406
406
  for (const [n, o] of e)
@@ -417,41 +417,41 @@ class Gt {
417
417
  return this.renderers.get(e.type) ?? this.fallback;
418
418
  }
419
419
  }
420
- function to(t, e) {
420
+ function ao(t, e) {
421
421
  const r = Object.entries(t);
422
- return new Gt(r, e);
422
+ return new Jt(r, e);
423
423
  }
424
- function ro(t) {
425
- return Ue(
424
+ function co(t) {
425
+ return xe(
426
426
  (e) => t.subscribe(e),
427
427
  () => t.getSnapshot(),
428
428
  () => t.getSnapshot()
429
429
  );
430
430
  }
431
- const Ne = "ikon-ui";
432
- function Ht(t, e) {
431
+ const Pe = "ikon-ui";
432
+ function Xt(t, e) {
433
433
  return t === e;
434
434
  }
435
- const no = q(function({ stores: e, registry: r, category: n = Ne, onAction: o, client: s }) {
436
- const i = Y(() => Array.from(e.keys()).sort().join(","), [e]), a = E(o);
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);
437
437
  a.current = o;
438
- const c = E(s);
438
+ const c = R(s);
439
439
  c.current = s;
440
440
  const f = Y(
441
441
  () => {
442
442
  const d = [];
443
- for (const [m, u] of e) {
443
+ for (const [h, u] of e) {
444
444
  const g = u.store.getSnapshot();
445
- Ht(u.category, n) && (!g.rootViewId || !g.views.has(g.rootViewId) || d.push({ key: m, store: u.store }));
445
+ Xt(u.category, n) && (!g.rootViewId || !g.views.has(g.rootViewId) || d.push({ key: h, store: u.store }));
446
446
  }
447
447
  return d;
448
448
  },
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: m }) => /* @__PURE__ */ A.jsx(qt, { store: m, library: r, onAction: a.current, client: c.current, video: c.current?.media?.video }, d)) });
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)) });
453
453
  });
454
- class Jt {
454
+ class Zt {
455
455
  core;
456
456
  ownsCore;
457
457
  stores = /* @__PURE__ */ new Map();
@@ -459,7 +459,7 @@ class Jt {
459
459
  unsubscribeClears;
460
460
  unsubscribeStoreChanges;
461
461
  constructor(e) {
462
- this.core = e?.core ?? new Tt({ client: e?.client }), this.ownsCore = !e?.core, this.unsubscribeClears = this.core.subscribeToUiStreamCleared(this.handleUiStreamCleared), this.unsubscribeStoreChanges = this.core.uiStore.subscribe(this.syncStreamSnapshot), this.syncAllStreams();
462
+ this.core = e?.core ?? new Ct({ client: e?.client }), this.ownsCore = !e?.core, this.unsubscribeClears = this.core.subscribeToUiStreamCleared(this.handleUiStreamCleared), this.unsubscribeStoreChanges = this.core.uiStore.subscribe(this.syncStreamSnapshot), this.syncAllStreams();
463
463
  }
464
464
  dispose() {
465
465
  this.unsubscribeClears(), this.unsubscribeStoreChanges(), this.ownsCore && this.core.dispose(), this.listeners.clear(), this.stores.clear();
@@ -509,8 +509,8 @@ class Jt {
509
509
  if (r)
510
510
  return r;
511
511
  const n = {
512
- category: Ne,
513
- store: new kt()
512
+ category: Pe,
513
+ store: new It()
514
514
  };
515
515
  return this.stores.set(e, n), n;
516
516
  }
@@ -518,7 +518,7 @@ class Jt {
518
518
  const n = this.stores.get(e);
519
519
  if (!n)
520
520
  return !1;
521
- const o = r ?? this.core.uiStore.getSnapshot(e)?.category ?? Ne;
521
+ const o = r ?? this.core.uiStore.getSnapshot(e)?.category ?? Pe;
522
522
  return n.category === o ? !1 : (this.stores.set(e, { ...n, category: o }), !0);
523
523
  }
524
524
  notify(e) {
@@ -526,7 +526,7 @@ class Jt {
526
526
  r(e);
527
527
  }
528
528
  }
529
- function Xt(t) {
529
+ function Qt(t) {
530
530
  if (typeof t == "string") {
531
531
  const e = t.trim();
532
532
  return e.length > 0 ? e : void 0;
@@ -542,7 +542,7 @@ function de(t) {
542
542
  return e.length > 0 ? e.join(" ") : void 0;
543
543
  }
544
544
  }
545
- function De(...t) {
545
+ function Fe(...t) {
546
546
  let e = "";
547
547
  for (const r of t)
548
548
  if (r) {
@@ -551,21 +551,21 @@ function De(...t) {
551
551
  }
552
552
  return e || void 0;
553
553
  }
554
- const He = /* @__PURE__ */ new WeakMap(), Zt = {};
555
- function Fe(t) {
554
+ const Je = /* @__PURE__ */ new WeakMap(), er = {};
555
+ function Be(t) {
556
556
  if (!t)
557
- return Zt;
558
- const e = He.get(t);
557
+ return er;
558
+ const e = Je.get(t);
559
559
  if (e)
560
560
  return e;
561
561
  const r = {};
562
562
  for (const [n, o] of Object.entries(t))
563
563
  o != null && (typeof o == "string" || typeof o == "number" || typeof o == "boolean") && (r[n] = o);
564
- return He.set(t, r), r;
564
+ return Je.set(t, r), r;
565
565
  }
566
- function Qt() {
567
- const t = q(function({ nodeId: r, context: n }) {
568
- const o = X(n.store, r), s = E(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;
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
569
  return D(() => {
570
570
  if (typeof document > "u")
571
571
  return;
@@ -577,8 +577,8 @@ function Qt() {
577
577
  const p = ((v) => {
578
578
  let k = v.parentElement;
579
579
  for (; k; ) {
580
- const j = window.getComputedStyle(k).overflowY;
581
- if (j === "auto" || j === "scroll" || k.hasAttribute("data-radix-scroll-area-viewport"))
580
+ const L = window.getComputedStyle(k).overflowY;
581
+ if (L === "auto" || L === "scroll" || k.hasAttribute("data-radix-scroll-area-viewport"))
582
582
  return k;
583
583
  k = k.parentElement;
584
584
  }
@@ -619,16 +619,16 @@ function Qt() {
619
619
  return t;
620
620
  };
621
621
  }
622
- function er() {
623
- const t = q(function({ nodeId: r, context: n, className: o }) {
624
- const s = X(n.store, r), i = Xt(s?.props?.onInvokeId), a = x(() => {
622
+ function rr() {
623
+ const t = W(function({ nodeId: r, context: n, className: o }) {
624
+ const s = H(n.store, r), i = Qt(s?.props?.onInvokeId), a = x(() => {
625
625
  i && n.dispatchAction(i);
626
626
  }, [i, n]);
627
627
  if (!s)
628
628
  return null;
629
- const c = Fe(s.props);
629
+ const c = Be(s.props);
630
630
  delete c.onInvokeId;
631
- const f = De(de(s.props?.className), o), d = s.children?.length ? n.renderChildren(s.children) : void 0;
631
+ const f = Fe(de(s.props?.className), o), d = s.children?.length ? n.renderChildren(s.children) : void 0;
632
632
  return /* @__PURE__ */ A.jsx(
633
633
  "div",
634
634
  {
@@ -646,12 +646,12 @@ function er() {
646
646
  return t;
647
647
  };
648
648
  }
649
- function tr() {
650
- const t = q(function({ nodeId: r, context: n, className: o }) {
651
- const s = X(n.store, r);
649
+ function nr() {
650
+ const t = W(function({ nodeId: r, context: n, className: o }) {
651
+ const s = H(n.store, r);
652
652
  if (!s)
653
653
  return null;
654
- const i = Fe(s.props), a = De("relative", de(s.props?.className), o), c = s.children?.length ? n.renderChildren(s.children) : void 0;
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
655
  return /* @__PURE__ */ A.jsx("div", { ...i, "data-ikon-node-id": s.id, className: a, children: c });
656
656
  });
657
657
  return ({ type: e }) => {
@@ -659,12 +659,12 @@ function tr() {
659
659
  return t;
660
660
  };
661
661
  }
662
- function rr() {
663
- const t = q(function({ nodeId: r, context: n, className: o }) {
664
- const s = X(n.store, r);
662
+ function or() {
663
+ const t = W(function({ nodeId: r, context: n, className: o }) {
664
+ const s = H(n.store, r);
665
665
  if (!s)
666
666
  return null;
667
- const i = Fe(s.props), a = De("absolute", de(s.props?.className), o), c = s.children?.length ? n.renderChildren(s.children) : void 0;
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
668
  return /* @__PURE__ */ A.jsx("div", { ...i, "data-ikon-node-id": s.id, className: a, children: c });
669
669
  });
670
670
  return ({ type: e }) => {
@@ -672,19 +672,19 @@ function rr() {
672
672
  return t;
673
673
  };
674
674
  }
675
- function nr() {
675
+ function sr() {
676
676
  return [
677
- er(),
678
- tr(),
679
677
  rr(),
680
- Qt()
678
+ nr(),
679
+ or(),
680
+ tr()
681
681
  ];
682
682
  }
683
- const or = "base", sr = async () => nr();
684
- function ir(t) {
685
- t.registerModule(or, sr);
683
+ const ir = "base", ar = async () => sr();
684
+ function cr(t) {
685
+ t.registerModule(ir, ar);
686
686
  }
687
- function lt(t) {
687
+ function ur(t) {
688
688
  if (typeof t == "string") {
689
689
  const e = t.trim();
690
690
  return e.length > 0 ? e : void 0;
@@ -694,13 +694,74 @@ function lt(t) {
694
694
  return e.length > 0 ? e.join(" ") : void 0;
695
695
  }
696
696
  }
697
- function dt(...t) {
697
+ function lr(...t) {
698
698
  const e = [];
699
699
  for (const r of t)
700
700
  r && r.trim() && e.push(r.trim());
701
701
  return e.length > 0 ? e.join(" ") : void 0;
702
702
  }
703
- function pe(t) {
703
+ function Xe(t) {
704
+ if (typeof t != "string")
705
+ return;
706
+ const e = t.trim();
707
+ return e.length > 0 ? e : void 0;
708
+ }
709
+ function me(t) {
710
+ if (typeof t == "boolean")
711
+ return t;
712
+ if (typeof t == "string") {
713
+ const e = t.trim().toLowerCase();
714
+ if (e === "true") return !0;
715
+ if (e === "false") return !1;
716
+ }
717
+ }
718
+ const dr = "std.audio-url-player";
719
+ function fr() {
720
+ const t = W(function({
721
+ nodeId: r,
722
+ context: n,
723
+ className: o
724
+ }) {
725
+ const s = H(n.store, r);
726
+ if (!s)
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(
730
+ "audio",
731
+ {
732
+ src: a,
733
+ ...c !== void 0 ? { preload: c } : {},
734
+ ...f !== void 0 ? { controls: f } : {},
735
+ ...d !== void 0 ? { autoPlay: d } : {},
736
+ ...h !== void 0 ? { loop: h } : {},
737
+ ...u !== void 0 ? { muted: u } : {},
738
+ "data-ikon-node-id": s.id,
739
+ className: i
740
+ }
741
+ );
742
+ });
743
+ return ({ type: e }) => {
744
+ if (e === dr)
745
+ return t;
746
+ };
747
+ }
748
+ function ft(t) {
749
+ if (typeof t == "string") {
750
+ const e = t.trim();
751
+ return e.length > 0 ? e : void 0;
752
+ }
753
+ if (Array.isArray(t)) {
754
+ const e = t.filter((r) => typeof r == "string").map((r) => r.trim()).filter(Boolean);
755
+ return e.length > 0 ? e.join(" ") : void 0;
756
+ }
757
+ }
758
+ function ht(...t) {
759
+ const e = [];
760
+ for (const r of t)
761
+ r && r.trim() && e.push(r.trim());
762
+ return e.length > 0 ? e.join(" ") : void 0;
763
+ }
764
+ function ge(t) {
704
765
  if (typeof t == "number" && Number.isFinite(t))
705
766
  return Math.floor(t);
706
767
  if (typeof t == "string" && t.trim().length > 0) {
@@ -709,16 +770,16 @@ function pe(t) {
709
770
  return Math.floor(e);
710
771
  }
711
772
  }
712
- function Pe(t) {
773
+ function je(t) {
713
774
  if (typeof t != "string")
714
775
  return;
715
776
  const e = t.trim();
716
777
  return e.length > 0 ? e : void 0;
717
778
  }
718
- const ar = "std.video-canvas", cr = "std.video-url-player";
719
- function ur() {
720
- const t = q(function({ nodeId: r, context: n, className: o }) {
721
- const s = X(n.store, r), i = E(null), a = n.video, c = s ? Pe(s.props?.streamId) : void 0, f = s ? pe(s.props?.width) : void 0, d = s ? pe(s.props?.height) : void 0, m = s ? dt(lt(s.props?.className), o) : o;
779
+ const hr = "std.video-canvas", mr = "std.video-url-player";
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;
722
783
  return D(() => {
723
784
  const u = i.current;
724
785
  if (!(!a || !u || !c))
@@ -731,7 +792,7 @@ function ur() {
731
792
  ref: i,
732
793
  "data-ikon-node-id": s.id,
733
794
  "data-ikon-video-stream-id": c,
734
- className: m,
795
+ className: h,
735
796
  ...f ? { width: f } : {},
736
797
  ...d ? { height: d } : {}
737
798
  },
@@ -739,12 +800,12 @@ function ur() {
739
800
  ) : null;
740
801
  });
741
802
  return ({ type: e }) => {
742
- if (e === ar)
803
+ if (e === hr)
743
804
  return t;
744
805
  };
745
806
  }
746
- function lr() {
747
- return [ur(), dr()];
807
+ function gr() {
808
+ return [pr(), yr(), fr()];
748
809
  }
749
810
  function ae(t) {
750
811
  if (typeof t == "boolean")
@@ -755,16 +816,16 @@ function ae(t) {
755
816
  if (e === "false") return !1;
756
817
  }
757
818
  }
758
- function dr() {
759
- const t = q(function({
819
+ function yr() {
820
+ const t = W(function({
760
821
  nodeId: r,
761
822
  context: n,
762
823
  className: o
763
824
  }) {
764
- const s = X(n.store, r);
825
+ const s = H(n.store, r);
765
826
  if (!s)
766
827
  return null;
767
- const i = dt(lt(s.props?.className), o), a = Pe(s.props?.src), c = Pe(s.props?.poster), f = ae(s.props?.controls), d = ae(s.props?.autoplay), m = ae(s.props?.loop), u = ae(s.props?.muted), g = ae(s.props?.playsInline), y = pe(s.props?.width), b = pe(s.props?.height), h = s.children?.length ? n.renderChildren(s.children) : void 0;
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;
768
829
  return /* @__PURE__ */ A.jsx(
769
830
  "video",
770
831
  {
@@ -772,39 +833,39 @@ function dr() {
772
833
  poster: c,
773
834
  ...f !== void 0 ? { controls: f } : {},
774
835
  ...d !== void 0 ? { autoPlay: d } : {},
775
- ...m !== void 0 ? { loop: m } : {},
836
+ ...h !== void 0 ? { loop: h } : {},
776
837
  ...u !== void 0 ? { muted: u } : {},
777
838
  ...g !== void 0 ? { playsInline: g } : {},
778
839
  ...y ? { width: y } : {},
779
840
  ...b ? { height: b } : {},
780
841
  "data-ikon-node-id": s.id,
781
842
  className: i,
782
- children: h
843
+ children: m
783
844
  }
784
845
  );
785
846
  });
786
847
  return ({ type: e }) => {
787
- if (e === cr)
848
+ if (e === mr)
788
849
  return t;
789
850
  };
790
851
  }
791
- const fr = "media", hr = async () => lr();
792
- function mr(t) {
793
- t.registerModule(fr, hr);
852
+ const Sr = "media", br = async () => gr();
853
+ function wr(t) {
854
+ t.registerModule(Sr, br);
794
855
  }
795
- const pr = `#version 300 es
856
+ const vr = `#version 300 es
796
857
  in vec4 a_position;
797
858
  void main() {
798
859
  gl_Position = a_position;
799
860
  }
800
861
  `;
801
- function gr(t, e) {
862
+ function Rr(t, e) {
802
863
  return new RegExp(`\\buniform\\s+\\w+\\s+${e}\\s*;`, "g").test(t);
803
864
  }
804
- function yr(t, e) {
865
+ function Er(t, e) {
805
866
  const r = [];
806
867
  for (const [n, o] of Object.entries(e)) {
807
- if (gr(t, n))
868
+ if (Rr(t, n))
808
869
  continue;
809
870
  let s;
810
871
  switch (o.type) {
@@ -857,7 +918,7 @@ void main() {
857
918
  }
858
919
  `;
859
920
  }
860
- class Sr {
921
+ class Ar {
861
922
  gl;
862
923
  program = null;
863
924
  positionBuffer = null;
@@ -893,10 +954,10 @@ class Sr {
893
954
  }
894
955
  compile(e, r = {}) {
895
956
  this.lastError = null, this.customUniforms = r, this.currentShaderSource = e;
896
- const n = this.gl, o = this.compileShader(n.VERTEX_SHADER, pr);
957
+ const n = this.gl, o = this.compileShader(n.VERTEX_SHADER, vr);
897
958
  if (!o)
898
959
  return !1;
899
- const s = yr(e, r), i = this.compileShader(n.FRAGMENT_SHADER, s);
960
+ const s = Er(e, r), i = this.compileShader(n.FRAGMENT_SHADER, s);
900
961
  if (!i)
901
962
  return n.deleteShader(o), !1;
902
963
  const a = n.createProgram();
@@ -938,8 +999,8 @@ class Sr {
938
999
  f && e.uniform1f(f, i);
939
1000
  const d = this.uniformLocations.get("iTimeDelta");
940
1001
  d && e.uniform1f(d, a);
941
- const m = this.uniformLocations.get("iFrame");
942
- m && e.uniform1i(m, this.frameCount);
1002
+ const h = this.uniformLocations.get("iFrame");
1003
+ h && e.uniform1i(h, this.frameCount);
943
1004
  const u = this.uniformLocations.get("iMouse");
944
1005
  u && e.uniform4f(u, this.mouseX, this.mouseY, this.mouseClickX, this.mouseClickY);
945
1006
  const g = this.uniformLocations.get("iDate");
@@ -948,32 +1009,32 @@ class Sr {
948
1009
  e.uniform4f(g, y.getFullYear(), y.getMonth(), y.getDate(), y.getHours() * 3600 + y.getMinutes() * 60 + y.getSeconds() + y.getMilliseconds() / 1e3);
949
1010
  }
950
1011
  for (const [y, b] of Object.entries(this.customUniforms)) {
951
- const h = this.uniformLocations.get(y);
952
- if (h)
1012
+ const m = this.uniformLocations.get(y);
1013
+ if (m)
953
1014
  switch (b.type) {
954
1015
  case "float":
955
- e.uniform1f(h, b.value);
1016
+ e.uniform1f(m, b.value);
956
1017
  break;
957
1018
  case "vec2": {
958
1019
  const p = b.value;
959
- e.uniform2f(h, p[0], p[1]);
1020
+ e.uniform2f(m, p[0], p[1]);
960
1021
  break;
961
1022
  }
962
1023
  case "vec3": {
963
1024
  const p = b.value;
964
- e.uniform3f(h, p[0], p[1], p[2]);
1025
+ e.uniform3f(m, p[0], p[1], p[2]);
965
1026
  break;
966
1027
  }
967
1028
  case "vec4": {
968
1029
  const p = b.value;
969
- e.uniform4f(h, p[0], p[1], p[2], p[3]);
1030
+ e.uniform4f(m, p[0], p[1], p[2], p[3]);
970
1031
  break;
971
1032
  }
972
1033
  case "int":
973
- e.uniform1i(h, b.value);
1034
+ e.uniform1i(m, b.value);
974
1035
  break;
975
1036
  case "bool":
976
- e.uniform1i(h, b.value ? 1 : 0);
1037
+ e.uniform1i(m, b.value ? 1 : 0);
977
1038
  break;
978
1039
  }
979
1040
  }
@@ -987,7 +1048,7 @@ class Sr {
987
1048
  this.program && (e.deleteProgram(this.program), this.program = null), this.positionBuffer && (e.deleteBuffer(this.positionBuffer), this.positionBuffer = null), this.vao && (e.deleteVertexArray(this.vao), this.vao = null), this.uniformLocations.clear();
988
1049
  }
989
1050
  }
990
- function br(t) {
1051
+ function Tr(t) {
991
1052
  if (typeof t == "string") {
992
1053
  const e = t.trim();
993
1054
  return e.length > 0 ? e : void 0;
@@ -997,13 +1058,13 @@ function br(t) {
997
1058
  return e.length > 0 ? e.join(" ") : void 0;
998
1059
  }
999
1060
  }
1000
- function wr(...t) {
1061
+ function kr(...t) {
1001
1062
  const e = [];
1002
1063
  for (const r of t)
1003
1064
  r && r.trim() && e.push(r.trim());
1004
1065
  return e.length > 0 ? e.join(" ") : void 0;
1005
1066
  }
1006
- function ve(t) {
1067
+ function Re(t) {
1007
1068
  if (typeof t == "number" && Number.isFinite(t))
1008
1069
  return Math.floor(t);
1009
1070
  if (typeof t == "string" && t.trim().length > 0) {
@@ -1012,10 +1073,10 @@ function ve(t) {
1012
1073
  return Math.floor(e);
1013
1074
  }
1014
1075
  }
1015
- function vr(t) {
1076
+ function Cr(t) {
1016
1077
  return typeof t == "string" ? t : "";
1017
1078
  }
1018
- function Er(t) {
1079
+ function Ir(t) {
1019
1080
  if (typeof t == "boolean")
1020
1081
  return t;
1021
1082
  if (typeof t == "string") {
@@ -1024,7 +1085,7 @@ function Er(t) {
1024
1085
  if (e === "false") return !1;
1025
1086
  }
1026
1087
  }
1027
- function Rr(t) {
1088
+ function _r(t) {
1028
1089
  if (!t || typeof t != "object")
1029
1090
  return {};
1030
1091
  const e = {}, r = t;
@@ -1039,7 +1100,7 @@ function Rr(t) {
1039
1100
  }
1040
1101
  return e;
1041
1102
  }
1042
- function Ar(t, e) {
1103
+ function Or(t, e) {
1043
1104
  const r = Object.keys(t), n = Object.keys(e);
1044
1105
  if (r.length !== n.length)
1045
1106
  return !1;
@@ -1060,21 +1121,21 @@ function Ar(t, e) {
1060
1121
  }
1061
1122
  return !0;
1062
1123
  }
1063
- const Tr = "std.shader-canvas";
1064
- function kr() {
1065
- const t = q(function({ nodeId: r, context: n, className: o }) {
1066
- const s = X(n.store, r), i = E(null), a = E(null), c = E(null), f = E(0), d = E(""), m = E({}), u = E({
1124
+ const Nr = "std.shader-canvas";
1125
+ 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({
1067
1128
  x: 0,
1068
1129
  y: 0,
1069
1130
  clickX: 0,
1070
1131
  clickY: 0,
1071
1132
  isDown: !1
1072
- }), g = s ? vr(s.props?.shaderSource) : "", y = s ? ve(s.props?.fps) ?? 60 : 60, b = s?.props?.uniforms, h = Y(() => Rr(b), [b]), p = s ? Er(s.props?.enableMouse) ?? !0 : !0, v = s ? ve(s.props?.width) : void 0, k = s ? ve(s.props?.height) : void 0, I = s ? wr(br(s.props?.className), o) : o;
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;
1073
1134
  D(() => {
1074
1135
  const C = i.current;
1075
1136
  if (C) {
1076
1137
  try {
1077
- const N = new Sr(C);
1138
+ const N = new Ar(C);
1078
1139
  a.current = N;
1079
1140
  } catch (N) {
1080
1141
  console.error("[ShaderRenderer] Failed to create WebGL2 context:", N);
@@ -1086,33 +1147,33 @@ function kr() {
1086
1147
  }, []), D(() => {
1087
1148
  const C = a.current;
1088
1149
  if (!(!C || !g) && d.current !== g)
1089
- if (C.compile(g, h))
1090
- d.current = g, m.current = h;
1150
+ if (C.compile(g, m))
1151
+ d.current = g, h.current = m;
1091
1152
  else {
1092
1153
  const F = C.getError();
1093
1154
  console.error("[ShaderRenderer] Shader compilation failed:", F);
1094
1155
  }
1095
- }, [g, h]), D(() => {
1156
+ }, [g, m]), D(() => {
1096
1157
  const C = a.current;
1097
- !C || !d.current || Ar(m.current, h) || (C.setCustomUniforms(h), m.current = h);
1098
- }, [h]), D(() => {
1158
+ !C || !d.current || Or(h.current, m) || (C.setCustomUniforms(m), h.current = m);
1159
+ }, [m]), D(() => {
1099
1160
  const C = a.current;
1100
1161
  if (!C || !d.current) return;
1101
- const N = 1e3 / y, F = (M) => {
1102
- const L = M - f.current;
1103
- L >= N && (f.current = M - L % N, C.draw()), c.current = requestAnimationFrame(F);
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);
1104
1165
  };
1105
1166
  return c.current = requestAnimationFrame(F), () => {
1106
1167
  c.current !== null && (cancelAnimationFrame(c.current), c.current = null);
1107
1168
  };
1108
1169
  }, [y]);
1109
- const j = x(
1170
+ const L = x(
1110
1171
  (C) => {
1111
1172
  if (!p) return;
1112
1173
  const N = i.current, F = a.current;
1113
1174
  if (!N || !F) return;
1114
- const M = N.getBoundingClientRect(), L = C.clientX - M.left, z = M.height - (C.clientY - M.top);
1115
- u.current.x = L, u.current.y = z, F.setMouse(L, z, u.current.clickX, u.current.clickY);
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);
1116
1177
  },
1117
1178
  [p]
1118
1179
  ), G = x(
@@ -1120,8 +1181,8 @@ function kr() {
1120
1181
  if (!p) return;
1121
1182
  const N = i.current, F = a.current;
1122
1183
  if (!N || !F) return;
1123
- const M = N.getBoundingClientRect(), L = C.clientX - M.left, z = M.height - (C.clientY - M.top);
1124
- u.current.isDown = !0, u.current.clickX = L, u.current.clickY = z, F.setMouse(L, z, L, z);
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);
1125
1186
  },
1126
1187
  [p]
1127
1188
  ), Z = x(() => {
@@ -1135,7 +1196,7 @@ function kr() {
1135
1196
  className: I,
1136
1197
  ...v ? { width: v } : {},
1137
1198
  ...k ? { height: k } : {},
1138
- onMouseMove: j,
1199
+ onMouseMove: L,
1139
1200
  onMouseDown: G,
1140
1201
  onMouseUp: Z,
1141
1202
  onMouseLeave: Z
@@ -1143,16 +1204,16 @@ function kr() {
1143
1204
  ) : null;
1144
1205
  });
1145
1206
  return ({ type: e }) => {
1146
- if (e === Tr)
1207
+ if (e === Nr)
1147
1208
  return t;
1148
1209
  };
1149
1210
  }
1150
- const Cr = "shader", Ir = async () => kr();
1151
- function Or(t) {
1152
- t.registerModule(Cr, Ir);
1211
+ const jr = "shader", Lr = async () => Pr();
1212
+ function Mr(t) {
1213
+ t.registerModule(jr, Lr);
1153
1214
  }
1154
- const Je = Se("UIRegistry");
1155
- class _r {
1215
+ const Ze = be("UIRegistry");
1216
+ class Ur {
1156
1217
  baseResolvers = [];
1157
1218
  moduleLoaders = /* @__PURE__ */ new Map();
1158
1219
  moduleResolvers = /* @__PURE__ */ new Map();
@@ -1174,15 +1235,15 @@ class _r {
1174
1235
  for (const [n, o] of this.moduleLoaders.entries())
1175
1236
  if (!this.moduleResolvers.has(n))
1176
1237
  try {
1177
- const s = await o(), i = Mr(s);
1238
+ const s = await o(), i = Fr(s);
1178
1239
  this.moduleResolvers.set(n, i), e = !0;
1179
1240
  } catch (s) {
1180
- Je.error(`[IkonUiRegistry] Failed to load module '${n}'.`, s);
1241
+ Ze.error(`[IkonUiRegistry] Failed to load module '${n}'.`, s);
1181
1242
  }
1182
1243
  const r = [];
1183
1244
  for (const n of this.moduleLoaders.keys())
1184
1245
  this.moduleResolvers.has(n) && r.push(n);
1185
- return jr(r, this.activeModuleOrder) || (this.activeModuleOrder = r, e = !0), e;
1246
+ return Br(r, this.activeModuleOrder) || (this.activeModuleOrder = r, e = !0), e;
1186
1247
  }
1187
1248
  resolve(e) {
1188
1249
  for (const r of this.baseResolvers) {
@@ -1192,7 +1253,7 @@ class _r {
1192
1253
  for (const r of this.activeModuleOrder) {
1193
1254
  const n = this.moduleResolvers.get(r);
1194
1255
  if (!n) {
1195
- Je.warn(`Missing resolvers for module ${r}`);
1256
+ Ze.warn(`Missing resolvers for module ${r}`);
1196
1257
  continue;
1197
1258
  }
1198
1259
  for (const o of n) {
@@ -1202,17 +1263,17 @@ class _r {
1202
1263
  }
1203
1264
  }
1204
1265
  }
1205
- function Nr() {
1206
- const t = new _r();
1207
- return ir(t), mr(t), Or(t), t.loadRegisteredModules(), t;
1266
+ function xr() {
1267
+ const t = new Ur();
1268
+ return cr(t), wr(t), Mr(t), t.loadRegisteredModules(), t;
1208
1269
  }
1209
- function Pr(t) {
1270
+ function Dr(t) {
1210
1271
  return Array.isArray(t) ? t : [t];
1211
1272
  }
1212
- function Mr(t) {
1213
- return t ? Pr(t).flatMap((e) => e ? Array.isArray(e) ? e.filter(Boolean) : [e] : []) : [];
1273
+ function Fr(t) {
1274
+ return t ? Dr(t).flatMap((e) => e ? Array.isArray(e) ? e.filter(Boolean) : [e] : []) : [];
1214
1275
  }
1215
- function jr(t, e) {
1276
+ function Br(t, e) {
1216
1277
  if (t.length !== e.length)
1217
1278
  return !1;
1218
1279
  for (let r = 0; r < t.length; r += 1)
@@ -1220,7 +1281,7 @@ function jr(t, e) {
1220
1281
  return !1;
1221
1282
  return !0;
1222
1283
  }
1223
- const Ee = Se("MotionController"), Xe = {
1284
+ const Ee = be("MotionController"), Qe = {
1224
1285
  ease: [0.25, 0.1, 0.25, 1],
1225
1286
  "ease-in": [0.42, 0, 1, 1],
1226
1287
  "ease-out": [0, 0, 0.58, 1],
@@ -1253,85 +1314,85 @@ const Ee = Se("MotionController"), Xe = {
1253
1314
  function $(t) {
1254
1315
  return t <= 0 ? 0 : t >= 1 ? 1 : t;
1255
1316
  }
1256
- function Ze(t) {
1317
+ function et(t) {
1257
1318
  if (t == null) return;
1258
1319
  const e = `${t}`.trim();
1259
1320
  if (!e) return;
1260
1321
  const r = Number.parseFloat(e);
1261
1322
  return Number.isFinite(r) ? r : void 0;
1262
1323
  }
1263
- function Qe(t) {
1324
+ function tt(t) {
1264
1325
  return typeof CSS < "u" && CSS.escape ? CSS.escape(t) : t.replace(/[^a-zA-Z0-9_-]/g, (e) => `\\${e}`);
1265
1326
  }
1266
- function et(t, e, r, n) {
1327
+ function rt(t, e, r, n) {
1267
1328
  const d = new Float32Array(11);
1268
- function m(h, p, v) {
1269
- return ((3 * p - 3 * v + 1) * h + (3 * v - 6 * p)) * h * h + 3 * p * h;
1329
+ function h(m, p, v) {
1330
+ return ((3 * p - 3 * v + 1) * m + (3 * v - 6 * p)) * m * m + 3 * p * m;
1270
1331
  }
1271
- function u(h, p, v) {
1272
- return 3 * (3 * p - 3 * v + 1) * h * h + 2 * (3 * v - 6 * p) * h + 3 * p;
1332
+ function u(m, p, v) {
1333
+ return 3 * (3 * p - 3 * v + 1) * m * m + 2 * (3 * v - 6 * p) * m + 3 * p;
1273
1334
  }
1274
- function g(h, p) {
1335
+ function g(m, p) {
1275
1336
  for (let v = 0; v < 4; v += 1) {
1276
1337
  const k = u(p, t, r);
1277
1338
  if (k === 0)
1278
1339
  return p;
1279
- const I = m(p, t, r) - h;
1340
+ const I = h(p, t, r) - m;
1280
1341
  p -= I / k;
1281
1342
  }
1282
1343
  return p;
1283
1344
  }
1284
- function y(h, p, v) {
1285
- let k = 0, I = 0, j = 0;
1345
+ function y(m, p, v) {
1346
+ let k = 0, I = 0, L = 0;
1286
1347
  do
1287
- I = p + (v - p) / 2, k = m(I, t, r) - h, k > 0 ? v = I : p = I;
1288
- while (Math.abs(k) > 1e-7 && ++j < 10);
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);
1289
1350
  return I;
1290
1351
  }
1291
- function b(h) {
1352
+ function b(m) {
1292
1353
  let p = 0, v = 1;
1293
1354
  const k = 10;
1294
- for (; v !== k && d[v] <= h; v += 1)
1355
+ for (; v !== k && d[v] <= m; v += 1)
1295
1356
  p += 0.1;
1296
1357
  v -= 1;
1297
- const I = (h - d[v]) / (d[v + 1] - d[v]), j = p + I * 0.1, G = u(j, t, r);
1298
- return G >= 1e-3 ? g(h, j) : G === 0 ? j : y(h, p, p + 0.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);
1299
1360
  }
1300
- for (let h = 0; h < 11; h += 1)
1301
- d[h] = m(h * 0.1, t, r);
1302
- return (h) => h <= 0 ? 0 : h >= 1 ? 1 : m(b(h), e, n);
1361
+ for (let m = 0; m < 11; m += 1)
1362
+ d[m] = h(m * 0.1, t, r);
1363
+ return (m) => m <= 0 ? 0 : m >= 1 ? 1 : h(b(m), e, n);
1303
1364
  }
1304
- function Lr(t) {
1365
+ function $r(t) {
1305
1366
  const e = /steps\(\s*([0-9]+)\s*(?:,\s*([a-z-]+)\s*)?\)/i.exec(t);
1306
1367
  if (!e)
1307
1368
  return (o) => $(o);
1308
1369
  const r = Math.max(1, parseInt(e[1], 10)), n = (e[2] ?? "end").toLowerCase();
1309
1370
  return n === "start" || n === "jump-start" ? (o) => $(Math.ceil(o * r) / r) : n === "none" || n === "jump-none" ? (o) => $(Math.round(o * r) / r) : n === "both" || n === "jump-both" ? (o) => $((Math.floor(o * r) + 0.5) / r) : (o) => $(Math.floor(o * r) / r);
1310
1371
  }
1311
- function Ur(t) {
1372
+ function Vr(t) {
1312
1373
  if (!t)
1313
1374
  return (r) => $(r);
1314
1375
  const e = t.trim().toLowerCase();
1315
1376
  if (!e || e === "linear")
1316
1377
  return (r) => $(r);
1317
- if (Xe[e]) {
1318
- const [r, n, o, s] = Xe[e], i = et(r, n, o, s);
1378
+ if (Qe[e]) {
1379
+ const [r, n, o, s] = Qe[e], i = rt(r, n, o, s);
1319
1380
  return (a) => $(i($(a)));
1320
1381
  }
1321
1382
  if (e.startsWith("cubic-bezier(") && e.endsWith(")")) {
1322
1383
  const n = e.slice(13, -1).split(",").map((o) => Number.parseFloat(o.trim()));
1323
1384
  if (n.length === 4 && n.every((o) => Number.isFinite(o))) {
1324
- const [o, s, i, a] = n, c = et(o, s, i, a);
1385
+ const [o, s, i, a] = n, c = rt(o, s, i, a);
1325
1386
  return (f) => $(c($(f)));
1326
1387
  }
1327
1388
  }
1328
1389
  if (e.startsWith("steps(") && e.endsWith(")")) {
1329
- const r = Lr(e);
1390
+ const r = $r(e);
1330
1391
  return (n) => r($(n));
1331
1392
  }
1332
1393
  return (r) => $(r);
1333
1394
  }
1334
- function xr(t) {
1395
+ function Kr(t) {
1335
1396
  if (!t)
1336
1397
  return;
1337
1398
  const e = /(-?\d+(?:\.\d+)?)\s*\.\.\s*(-?\d+(?:\.\d+)?)\s*->\s*(-?\d+(?:\.\d+)?)\s*\.\.\s*(-?\d+(?:\.\d+)?)/.exec(t);
@@ -1341,7 +1402,7 @@ function xr(t) {
1341
1402
  if (![r, n, o, s].some((i) => !Number.isFinite(i)))
1342
1403
  return { inStart: r, inEnd: n, outStart: o, outEnd: s };
1343
1404
  }
1344
- class Dr {
1405
+ class Yr {
1345
1406
  bindingsByStyle = /* @__PURE__ */ new Map();
1346
1407
  observer;
1347
1408
  observeScheduled = !1;
@@ -1386,7 +1447,7 @@ class Dr {
1386
1447
  const r = e.source?.trim();
1387
1448
  if (!r)
1388
1449
  return;
1389
- const n = Ze(e.min) ?? 0, o = Ze(e.max), s = o === void 0 ? n + 100 : o, i = (e.clamp ?? "clamp").trim().toLowerCase(), a = !!e.reverse, c = Ur(e.ease), f = xr(e.map), d = e.targetId?.trim() || void 0;
1450
+ const n = et(e.min) ?? 0, o = et(e.max), s = o === void 0 ? n + 100 : o, i = (e.clamp ?? "clamp").trim().toLowerCase(), a = !!e.reverse, c = Vr(e.ease), f = Kr(e.map), d = e.targetId?.trim() || void 0;
1390
1451
  return Number.isNaN(n) || Number.isNaN(s) ? void 0 : {
1391
1452
  source: r.toLowerCase(),
1392
1453
  min: n,
@@ -1444,7 +1505,7 @@ class Dr {
1444
1505
  const r = this.bindingsByStyle.get(e);
1445
1506
  if (!r || typeof document > "u")
1446
1507
  return;
1447
- const n = `.${Qe(e)}`;
1508
+ const n = `.${tt(e)}`;
1448
1509
  document.querySelectorAll(n).forEach((s) => this.applyStyleToElement(s, e, r));
1449
1510
  }
1450
1511
  applyStyleToElement(e, r, n) {
@@ -1484,7 +1545,7 @@ class Dr {
1484
1545
  }
1485
1546
  resolveScrollContainer(e, r) {
1486
1547
  if (r.targetId) {
1487
- const n = `[data-ikon-motion-source="${Qe(r.targetId)}"]`, o = typeof document < "u" ? document.querySelector(n) : null;
1548
+ const n = `[data-ikon-motion-source="${tt(r.targetId)}"]`, o = typeof document < "u" ? document.querySelector(n) : null;
1488
1549
  if (o)
1489
1550
  return o;
1490
1551
  }
@@ -1599,21 +1660,21 @@ class Dr {
1599
1660
  }
1600
1661
  }
1601
1662
  }
1602
- const Re = new Dr();
1603
- function Fr(t) {
1604
- const e = E(/* @__PURE__ */ new Map()), r = x(({ styleId: s, css: i, common: a }) => {
1663
+ const Ae = new Yr();
1664
+ function zr(t) {
1665
+ const e = R(/* @__PURE__ */ new Map()), r = x(({ styleId: s, css: i, common: a }) => {
1605
1666
  if (!(!s || typeof document > "u")) {
1606
1667
  if (i) {
1607
1668
  let c = e.current.get(s);
1608
1669
  c || (c = document.createElement("style"), c.setAttribute("data-ikon-style-id", s), document.head.appendChild(c), e.current.set(s, c)), c.textContent = i;
1609
1670
  }
1610
- Re.registerStyle(s, a);
1671
+ Ae.registerStyle(s, a);
1611
1672
  }
1612
1673
  }, []), n = x((s) => {
1613
1674
  if (!(typeof document > "u"))
1614
1675
  for (const i of s) {
1615
1676
  const a = e.current.get(i);
1616
- a && (a.remove(), e.current.delete(i)), Re.unregisterStyle(i);
1677
+ a && (a.remove(), e.current.delete(i)), Ae.unregisterStyle(i);
1617
1678
  }
1618
1679
  }, []), o = x(() => {
1619
1680
  if (typeof document < "u") {
@@ -1621,7 +1682,7 @@ function Fr(t) {
1621
1682
  s.remove();
1622
1683
  e.current.clear();
1623
1684
  }
1624
- Re.reset();
1685
+ Ae.reset();
1625
1686
  }, []);
1626
1687
  return D(() => {
1627
1688
  if (!t) return;
@@ -1633,7 +1694,7 @@ function Fr(t) {
1633
1694
  };
1634
1695
  }, [t, o, r, n]), D(() => () => o(), [o]), { setStyle: r, deleteStyles: n, reset: o };
1635
1696
  }
1636
- function Br(t) {
1697
+ function Wr(t) {
1637
1698
  const e = [];
1638
1699
  for (const [r, n] of t) {
1639
1700
  const o = n.store.getSnapshot(), s = o.rootViewId && o.views.has(o.rootViewId);
@@ -1641,62 +1702,62 @@ function Br(t) {
1641
1702
  }
1642
1703
  return e.sort(), e.join(",");
1643
1704
  }
1644
- function $r(t) {
1645
- const [e, r] = J(), n = E("");
1705
+ function qr(t) {
1706
+ const [e, r] = X(), n = R("");
1646
1707
  return D(() => {
1647
1708
  if (!t) {
1648
1709
  r(void 0), n.current = "";
1649
1710
  return;
1650
1711
  }
1651
1712
  const o = () => {
1652
- const s = t.getStores(), i = Br(s);
1713
+ const s = t.getStores(), i = Wr(s);
1653
1714
  i !== n.current && (n.current = i, r(s));
1654
1715
  };
1655
1716
  return o(), t.subscribe(o);
1656
1717
  }, [t]), e;
1657
1718
  }
1658
- var Vr = typeof global == "object" && global && global.Object === Object && global, Kr = typeof self == "object" && self && self.Object === Object && self, Yr = Vr || Kr || Function("return this")(), ge = Yr.Symbol, ft = Object.prototype, zr = ft.hasOwnProperty, Wr = ft.toString, ce = ge ? ge.toStringTag : void 0;
1659
- function qr(t) {
1660
- var e = zr.call(t, ce), r = t[ce];
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;
1720
+ function Qr(t) {
1721
+ var e = Xr.call(t, ce), r = t[ce];
1661
1722
  try {
1662
1723
  t[ce] = void 0;
1663
1724
  var n = !0;
1664
1725
  } catch {
1665
1726
  }
1666
- var o = Wr.call(t);
1727
+ var o = Zr.call(t);
1667
1728
  return n && (e ? t[ce] = r : delete t[ce]), o;
1668
1729
  }
1669
- var Gr = Object.prototype, Hr = Gr.toString;
1670
- function Jr(t) {
1671
- return Hr.call(t);
1730
+ var en = Object.prototype, tn = en.toString;
1731
+ function rn(t) {
1732
+ return tn.call(t);
1672
1733
  }
1673
- var Xr = "[object Null]", Zr = "[object Undefined]", tt = ge ? ge.toStringTag : void 0;
1674
- function Qr(t) {
1675
- return t == null ? t === void 0 ? Zr : Xr : tt && tt in Object(t) ? qr(t) : Jr(t);
1734
+ var nn = "[object Null]", on = "[object Undefined]", nt = ye ? ye.toStringTag : void 0;
1735
+ function sn(t) {
1736
+ return t == null ? t === void 0 ? on : nn : nt && nt in Object(t) ? Qr(t) : rn(t);
1676
1737
  }
1677
- function en(t) {
1738
+ function an(t) {
1678
1739
  return t != null && typeof t == "object";
1679
1740
  }
1680
- var tn = Array.isArray, rn = "[object String]";
1681
- function nn(t) {
1682
- return typeof t == "string" || !tn(t) && en(t) && Qr(t) == rn;
1741
+ var cn = Array.isArray, un = "[object String]";
1742
+ function ln(t) {
1743
+ return typeof t == "string" || !cn(t) && an(t) && sn(t) == un;
1683
1744
  }
1684
- const rt = "ikonUiModules";
1685
- function Me(t) {
1745
+ const ot = "ikonUiModules";
1746
+ function Le(t) {
1686
1747
  return typeof t == "object" && t !== null && !Array.isArray(t);
1687
1748
  }
1688
- function on(t) {
1749
+ function dn(t) {
1689
1750
  if (!Array.isArray(t))
1690
1751
  return;
1691
1752
  const e = /* @__PURE__ */ new Set();
1692
1753
  for (const r of t) {
1693
- if (!nn(r)) continue;
1754
+ if (!ln(r)) continue;
1694
1755
  const n = r.trim();
1695
1756
  n && (e.has(n) || e.add(n));
1696
1757
  }
1697
1758
  return Array.from(e);
1698
1759
  }
1699
- function oo(t, e) {
1760
+ function lo(t, e) {
1700
1761
  if (t === e)
1701
1762
  return !0;
1702
1763
  if (!t || !e)
@@ -1708,19 +1769,19 @@ function oo(t, e) {
1708
1769
  return !1;
1709
1770
  return !0;
1710
1771
  }
1711
- function sn(t) {
1712
- if (!(!Me(t) || !Object.prototype.hasOwnProperty.call(t, rt)))
1713
- return on(t[rt]);
1772
+ function fn(t) {
1773
+ if (!(!Le(t) || !Object.prototype.hasOwnProperty.call(t, ot)))
1774
+ return dn(t[ot]);
1714
1775
  }
1715
- function so(...t) {
1776
+ function fo(...t) {
1716
1777
  for (const e of t) {
1717
- const r = sn(e);
1778
+ const r = fn(e);
1718
1779
  if (r !== void 0)
1719
1780
  return r;
1720
1781
  }
1721
1782
  }
1722
- function io(t) {
1723
- if (!Me(t))
1783
+ function ho(t) {
1784
+ if (!Le(t))
1724
1785
  return;
1725
1786
  const e = t, r = Object.keys(e).find((c) => c.toLowerCase() === "modules");
1726
1787
  if (!r)
@@ -1739,15 +1800,15 @@ function io(t) {
1739
1800
  o.push(b), i.add(b);
1740
1801
  continue;
1741
1802
  }
1742
- if (!Me(c))
1803
+ if (!Le(c))
1743
1804
  continue;
1744
1805
  const f = c, d = Object.keys(f).find((b) => b.toLowerCase() === "name");
1745
1806
  if (!d)
1746
1807
  continue;
1747
- const m = f[d];
1748
- if (typeof m != "string")
1808
+ const h = f[d];
1809
+ if (typeof h != "string")
1749
1810
  continue;
1750
- const u = m.trim();
1811
+ const u = h.trim();
1751
1812
  if (!u)
1752
1813
  continue;
1753
1814
  const g = Object.keys(f).find((b) => b.toLowerCase() === "javascript"), y = g ? f[g] : void 0;
@@ -1761,16 +1822,16 @@ function io(t) {
1761
1822
  }));
1762
1823
  return a.length > 0 ? { modules: o, inlineModules: a } : { modules: o };
1763
1824
  }
1764
- const R = {
1825
+ const E = {
1765
1826
  None: 0,
1766
1827
  Letter: 1,
1767
1828
  Word: 2,
1768
1829
  Line: 4,
1769
1830
  Paragraph: 8,
1770
1831
  Emoji: 16
1771
- }, an = [
1832
+ }, hn = [
1772
1833
  {
1773
- flag: R.Letter,
1834
+ flag: E.Letter,
1774
1835
  hints: [
1775
1836
  "[data-motion-letter]",
1776
1837
  "[data-letter]",
@@ -1779,7 +1840,7 @@ const R = {
1779
1840
  ]
1780
1841
  },
1781
1842
  {
1782
- flag: R.Word,
1843
+ flag: E.Word,
1783
1844
  hints: [
1784
1845
  "[data-motion-word]",
1785
1846
  "[data-word]",
@@ -1788,7 +1849,7 @@ const R = {
1788
1849
  ]
1789
1850
  },
1790
1851
  {
1791
- flag: R.Line,
1852
+ flag: E.Line,
1792
1853
  hints: [
1793
1854
  "[data-motion-line]",
1794
1855
  "[data-line]",
@@ -1797,7 +1858,7 @@ const R = {
1797
1858
  ]
1798
1859
  },
1799
1860
  {
1800
- flag: R.Paragraph,
1861
+ flag: E.Paragraph,
1801
1862
  hints: [
1802
1863
  "[data-motion-paragraph]",
1803
1864
  "[data-paragraph]",
@@ -1808,7 +1869,7 @@ const R = {
1808
1869
  ]
1809
1870
  },
1810
1871
  {
1811
- flag: R.Emoji,
1872
+ flag: E.Emoji,
1812
1873
  hints: [
1813
1874
  ":is([data-motion-emoji],[data-emoji],.tw-motion-emoji,.tw-emoji)",
1814
1875
  "[data-motion-emoji]",
@@ -1817,42 +1878,42 @@ const R = {
1817
1878
  "[data-emoji]"
1818
1879
  ]
1819
1880
  }
1820
- ], je = R.Letter | R.Word | R.Line | R.Paragraph | R.Emoji, cn = R.Letter | R.Word | R.Line | R.Paragraph, nt = /* @__PURE__ */ new Map(), un = 16384;
1821
- function ao(t, e) {
1822
- if (!t || t.length > un)
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;
1882
+ function mo(t, e) {
1883
+ if (!t || t.length > pn)
1823
1884
  return t;
1824
- const r = kn(e), n = Q(r, R.Emoji), o = r & cn;
1825
- if (o === R.None && !n)
1885
+ const r = Pn(e), n = Q(r, E.Emoji), o = r & mn;
1886
+ if (o === E.None && !n)
1826
1887
  return t;
1827
1888
  const s = t.replace(/\r\n/g, `
1828
1889
  `).replace(/\r/g, `
1829
1890
  `);
1830
- if (o === R.None)
1831
- return at(s);
1832
- const i = An(s);
1891
+ if (o === E.None)
1892
+ return ut(s);
1893
+ const i = On(s);
1833
1894
  if (i.length === 0)
1834
- return n ? at(s) : t;
1835
- const a = Tn(i), c = { letter: 0, word: 0, line: 0, paragraph: 0, br: 0, emoji: 0 }, f = [];
1895
+ return n ? ut(s) : t;
1896
+ const a = Nn(i), c = { letter: 0, word: 0, line: 0, paragraph: 0, br: 0, emoji: 0 }, f = [];
1836
1897
  for (const d of a) {
1837
- const m = ln(d, r, c);
1838
- f.push(...m);
1898
+ const h = gn(d, r, c);
1899
+ f.push(...h);
1839
1900
  }
1840
1901
  return f;
1841
1902
  }
1842
- function ln(t, e, r) {
1903
+ function gn(t, e, r) {
1843
1904
  const n = [];
1844
1905
  for (const o of t) {
1845
- const s = dn(o, e, r);
1906
+ const s = yn(o, e, r);
1846
1907
  n.push(...s);
1847
1908
  }
1848
- if (Q(e, R.Paragraph)) {
1909
+ if (Q(e, E.Paragraph)) {
1849
1910
  const o = r.paragraph++;
1850
1911
  return [
1851
1912
  /* @__PURE__ */ A.jsx(
1852
1913
  "span",
1853
1914
  {
1854
1915
  "data-motion-paragraph": !0,
1855
- style: be(o),
1916
+ style: we(o),
1856
1917
  children: n
1857
1918
  },
1858
1919
  `motion-paragraph-${o}`
@@ -1861,12 +1922,12 @@ function ln(t, e, r) {
1861
1922
  }
1862
1923
  return n;
1863
1924
  }
1864
- function dn(t, e, r) {
1865
- const n = fn(t.text, e, r), o = [];
1866
- if (Q(e, R.Line)) {
1925
+ function yn(t, e, r) {
1926
+ const n = Sn(t.text, e, r), o = [];
1927
+ if (Q(e, E.Line)) {
1867
1928
  const s = r.line++;
1868
1929
  o.push(
1869
- /* @__PURE__ */ A.jsx("span", { "data-motion-line": !0, style: be(s), children: n }, `motion-line-${s}`)
1930
+ /* @__PURE__ */ A.jsx("span", { "data-motion-line": !0, style: we(s), children: n }, `motion-line-${s}`)
1870
1931
  );
1871
1932
  } else
1872
1933
  o.push(...n);
@@ -1874,47 +1935,47 @@ function dn(t, e, r) {
1874
1935
  o.push(/* @__PURE__ */ A.jsx("br", {}, `motion-break-${r.br++}`));
1875
1936
  return o;
1876
1937
  }
1877
- function fn(t, e, r) {
1938
+ function Sn(t, e, r) {
1878
1939
  if (!t)
1879
1940
  return [];
1880
- const n = Q(e, R.Word), o = [], s = /(\s+)/g;
1941
+ const n = Q(e, E.Word), o = [], s = /(\s+)/g;
1881
1942
  let i = 0, a;
1882
1943
  for (; (a = s.exec(t)) !== null; ) {
1883
1944
  if (a.index > i) {
1884
1945
  const c = t.slice(i, a.index);
1885
- o.push(ot(c, r, e, n));
1946
+ o.push(it(c, r, e, n));
1886
1947
  }
1887
1948
  o.push(a[0]), i = a.index + a[0].length;
1888
1949
  }
1889
1950
  if (i < t.length) {
1890
1951
  const c = t.slice(i);
1891
- o.push(ot(c, r, e, n));
1952
+ o.push(it(c, r, e, n));
1892
1953
  }
1893
1954
  return o;
1894
1955
  }
1895
- function ot(t, e, r, n) {
1896
- const o = e.word++, s = mn(t, r, e), i = `motion-word-${o}`, a = hn(o, n);
1956
+ function it(t, e, r, n) {
1957
+ const o = e.word++, s = wn(t, r, e), i = `motion-word-${o}`, a = bn(o, n);
1897
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);
1898
1959
  }
1899
- function hn(t, e) {
1900
- return e ? { ...be(t), whiteSpace: "nowrap" } : { whiteSpace: "nowrap" };
1960
+ function bn(t, e) {
1961
+ return e ? { ...we(t), whiteSpace: "nowrap" } : { whiteSpace: "nowrap" };
1901
1962
  }
1902
- function mn(t, e, r) {
1963
+ function wn(t, e, r) {
1903
1964
  if (!t)
1904
1965
  return [];
1905
- const n = Q(e, R.Letter), o = Q(e, R.Emoji);
1966
+ const n = Q(e, E.Letter), o = Q(e, E.Emoji);
1906
1967
  if (!n) {
1907
1968
  if (!o)
1908
1969
  return [t];
1909
- const a = Le(t);
1970
+ const a = Ue(t);
1910
1971
  if (a.length === 0)
1911
1972
  return [t];
1912
- const { nodes: c } = mt(a, r);
1973
+ const { nodes: c } = gt(a, r);
1913
1974
  return c;
1914
1975
  }
1915
- const s = [], i = Le(t);
1976
+ const s = [], i = Ue(t);
1916
1977
  for (const a of i) {
1917
- const c = r.letter++, f = `motion-letter-${c}`, d = be(c);
1978
+ const c = r.letter++, f = `motion-letter-${c}`, d = we(c);
1918
1979
  if (a === `
1919
1980
  `) {
1920
1981
  s.push(
@@ -1922,55 +1983,55 @@ function mn(t, e, r) {
1922
1983
  );
1923
1984
  continue;
1924
1985
  }
1925
- const u = o && ht(a) ? { "data-motion-emoji": !0 } : void 0, g = a === " " ? " " : a;
1986
+ const u = o && pt(a) ? { "data-motion-emoji": !0 } : void 0, g = a === " " ? " " : a;
1926
1987
  s.push(
1927
1988
  /* @__PURE__ */ A.jsx("span", { "data-motion-letter": !0, style: d, ...u, children: g }, f)
1928
1989
  );
1929
1990
  }
1930
1991
  return s;
1931
1992
  }
1932
- function Le(t) {
1993
+ function Ue(t) {
1933
1994
  if (!t)
1934
1995
  return [];
1935
- const e = pn();
1936
- return e ? Array.from(e.segment(t), (r) => r.segment) : gn(t);
1996
+ const e = vn();
1997
+ return e ? Array.from(e.segment(t), (r) => r.segment) : Rn(t);
1937
1998
  }
1938
1999
  let ue;
1939
- function pn() {
2000
+ function vn() {
1940
2001
  return ue !== void 0 || (typeof Intl < "u" && typeof Intl.Segmenter == "function" ? ue = new Intl.Segmenter(void 0, { granularity: "grapheme" }) : ue = null), ue;
1941
2002
  }
1942
- function gn(t) {
2003
+ function Rn(t) {
1943
2004
  const e = [], r = Array.from(t);
1944
2005
  let n = "";
1945
2006
  for (let o = 0; o < r.length; o++) {
1946
2007
  const s = r[o], i = r[o + 1];
1947
- n += s, !(i && yn(s, i)) && (e.push(n), n = "");
2008
+ n += s, !(i && En(s, i)) && (e.push(n), n = "");
1948
2009
  }
1949
2010
  return n && e.push(n), e;
1950
2011
  }
1951
- function yn(t, e) {
1952
- return e ? !!(st(t) || st(e) || wn(e) || Sn(e) || bn(e) || it(t) && it(e)) : !1;
2012
+ function En(t, e) {
2013
+ return e ? !!(at(t) || at(e) || kn(e) || An(e) || Tn(e) || ct(t) && ct(e)) : !1;
1953
2014
  }
1954
- function st(t) {
2015
+ function at(t) {
1955
2016
  return t.codePointAt(0) === 8205;
1956
2017
  }
1957
- function Sn(t) {
2018
+ function An(t) {
1958
2019
  const e = t.codePointAt(0);
1959
2020
  return e === void 0 ? !1 : e >= 65024 && e <= 65039 || e >= 917760 && e <= 917999;
1960
2021
  }
1961
- function bn(t) {
2022
+ function Tn(t) {
1962
2023
  const e = t.codePointAt(0);
1963
2024
  return e === void 0 ? !1 : e >= 127995 && e <= 127999;
1964
2025
  }
1965
- function it(t) {
2026
+ function ct(t) {
1966
2027
  const e = t.codePointAt(0);
1967
2028
  return e === void 0 ? !1 : e >= 127462 && e <= 127487;
1968
2029
  }
1969
- let Ae;
1970
- function wn(t) {
1971
- return t ? (Ae || (Ae = vn()), Ae(t)) : !1;
2030
+ let Te;
2031
+ function kn(t) {
2032
+ return t ? (Te || (Te = Cn()), Te(t)) : !1;
1972
2033
  }
1973
- function vn() {
2034
+ function Cn() {
1974
2035
  try {
1975
2036
  const t = new RegExp("\\p{Mark}", "u");
1976
2037
  return (e) => t.test(e);
@@ -1981,19 +2042,19 @@ function vn() {
1981
2042
  };
1982
2043
  }
1983
2044
  }
1984
- let Te;
1985
- function ht(t) {
1986
- return t ? (Te || (Te = En()), Te(t)) : !1;
2045
+ let ke;
2046
+ function pt(t) {
2047
+ return t ? (ke || (ke = In()), ke(t)) : !1;
1987
2048
  }
1988
- function En() {
2049
+ function In() {
1989
2050
  try {
1990
2051
  const t = new RegExp("\\p{Extended_Pictographic}", "u");
1991
2052
  return (e) => t.test(e);
1992
2053
  } catch {
1993
- return Rn;
2054
+ return _n;
1994
2055
  }
1995
2056
  }
1996
- function Rn(t) {
2057
+ function _n(t) {
1997
2058
  if (!t)
1998
2059
  return !1;
1999
2060
  for (const e of Array.from(t)) {
@@ -2003,7 +2064,7 @@ function Rn(t) {
2003
2064
  }
2004
2065
  return !1;
2005
2066
  }
2006
- function An(t) {
2067
+ function On(t) {
2007
2068
  const e = [];
2008
2069
  let r = "", n = 0;
2009
2070
  for (let o = 0; o < t.length; o++) {
@@ -2017,7 +2078,7 @@ function An(t) {
2017
2078
  }
2018
2079
  return (n > 0 || r.length > 0) && e.push({ text: r, breaks: n }), e;
2019
2080
  }
2020
- function Tn(t) {
2081
+ function Nn(t) {
2021
2082
  if (t.length === 0)
2022
2083
  return [];
2023
2084
  const e = [];
@@ -2029,7 +2090,7 @@ function Tn(t) {
2029
2090
  function Q(t, e) {
2030
2091
  return (t & e) === e;
2031
2092
  }
2032
- function be(t) {
2093
+ function we(t) {
2033
2094
  return {
2034
2095
  "--tw-motion-seq-index": t.toString(),
2035
2096
  backgroundColor: "inherit",
@@ -2046,23 +2107,23 @@ function be(t) {
2046
2107
  WebkitTextFillColor: "inherit"
2047
2108
  };
2048
2109
  }
2049
- function at(t) {
2110
+ function ut(t) {
2050
2111
  if (!t)
2051
2112
  return t;
2052
- const e = Le(t);
2113
+ const e = Ue(t);
2053
2114
  if (e.length === 0)
2054
2115
  return t;
2055
- const { nodes: r, sawEmoji: n } = mt(e);
2116
+ const { nodes: r, sawEmoji: n } = gt(e);
2056
2117
  return n ? r.length === 1 ? r[0] ?? t : r : t;
2057
2118
  }
2058
- function mt(t, e) {
2119
+ function gt(t, e) {
2059
2120
  const r = [];
2060
2121
  let n = "", o = !1, s = e?.emoji ?? 0;
2061
2122
  const i = () => {
2062
2123
  n && (r.push(n), n = "");
2063
2124
  };
2064
2125
  for (const a of t) {
2065
- if (ht(a)) {
2126
+ if (pt(a)) {
2066
2127
  o = !0, i();
2067
2128
  const f = `motion-emoji-${e ? e.emoji++ : s++}`;
2068
2129
  r.push(
@@ -2074,24 +2135,24 @@ function mt(t, e) {
2074
2135
  }
2075
2136
  return i(), o ? { nodes: r, sawEmoji: !0 } : { nodes: [t.join("")], sawEmoji: !1 };
2076
2137
  }
2077
- function kn(t) {
2138
+ function Pn(t) {
2078
2139
  if (!t)
2079
- return R.None;
2140
+ return E.None;
2080
2141
  const e = t.trim();
2081
2142
  if (!e)
2082
- return R.None;
2083
- const r = nt.get(e);
2143
+ return E.None;
2144
+ const r = st.get(e);
2084
2145
  if (typeof r == "number")
2085
2146
  return r;
2086
2147
  if (typeof document > "u")
2087
- return R.None;
2148
+ return E.None;
2088
2149
  const n = e.split(/\s+/).filter(Boolean);
2089
2150
  if (n.length === 0)
2090
- return R.None;
2091
- const s = n.map((c) => `.${Cn(c)}`).map(
2092
- (c) => new RegExp(`(^|[^a-zA-Z0-9_-])${In(c)}(?![a-zA-Z0-9_-])`)
2151
+ return E.None;
2152
+ const s = n.map((c) => `.${jn(c)}`).map(
2153
+ (c) => new RegExp(`(^|[^a-zA-Z0-9_-])${Ln(c)}(?![a-zA-Z0-9_-])`)
2093
2154
  );
2094
- let i = R.None, a = !1;
2155
+ let i = E.None, a = !1;
2095
2156
  for (const c of Array.from(document.styleSheets)) {
2096
2157
  let f;
2097
2158
  try {
@@ -2099,17 +2160,17 @@ function kn(t) {
2099
2160
  } catch {
2100
2161
  continue;
2101
2162
  }
2102
- const d = pt(f, s);
2103
- if (d.mask && (i |= d.mask, i === je))
2163
+ const d = yt(f, s);
2164
+ if (d.mask && (i |= d.mask, i === Me))
2104
2165
  break;
2105
2166
  a ||= d.sawStyleRule;
2106
2167
  }
2107
- return (i !== R.None || a) && nt.set(e, i), i;
2168
+ return (i !== E.None || a) && st.set(e, i), i;
2108
2169
  }
2109
- function pt(t, e) {
2170
+ function yt(t, e) {
2110
2171
  if (!t)
2111
- return { mask: R.None, sawStyleRule: !1 };
2112
- let r = R.None, n = !1;
2172
+ return { mask: E.None, sawStyleRule: !1 };
2173
+ let r = E.None, n = !1;
2113
2174
  for (let o = 0; o < t.length; o++) {
2114
2175
  const s = t[o];
2115
2176
  if (s) {
@@ -2117,13 +2178,13 @@ function pt(t, e) {
2117
2178
  const a = s.selectorText ?? "";
2118
2179
  if (!a || !e.some((f) => f.test(a))) continue;
2119
2180
  n = !0;
2120
- for (const f of an)
2181
+ for (const f of hn)
2121
2182
  f.hints.some((d) => a.includes(d)) && (r |= f.flag);
2122
- if (r === je)
2183
+ if (r === Me)
2123
2184
  return { mask: r, sawStyleRule: !0 };
2124
2185
  } else if ("cssRules" in s) {
2125
- const i = pt(s.cssRules, e);
2126
- if (i.mask && (r |= i.mask, r === je))
2186
+ const i = yt(s.cssRules, e);
2187
+ if (i.mask && (r |= i.mask, r === Me))
2127
2188
  return { mask: r, sawStyleRule: !0 };
2128
2189
  n ||= i.sawStyleRule;
2129
2190
  }
@@ -2131,33 +2192,33 @@ function pt(t, e) {
2131
2192
  }
2132
2193
  return { mask: r, sawStyleRule: n };
2133
2194
  }
2134
- function Cn(t) {
2195
+ function jn(t) {
2135
2196
  return typeof CSS < "u" && typeof CSS.escape == "function" ? CSS.escape(t) : t.replace(/[^a-zA-Z0-9_-]/g, (e) => `\\${e}`);
2136
2197
  }
2137
- function In(t) {
2198
+ function Ln(t) {
2138
2199
  return t.replace(/[.*+?^${}()|[\]\\]/g, (e) => `\\${e}`);
2139
2200
  }
2140
- const Be = "ikon_auth_session", On = 7 * 24 * 60 * 60 * 1e3;
2141
- function we(t) {
2201
+ const $e = "ikon_auth_session", Mn = 7 * 24 * 60 * 60 * 1e3;
2202
+ function ve(t) {
2142
2203
  try {
2143
- localStorage.setItem(Be, JSON.stringify(t));
2204
+ localStorage.setItem($e, JSON.stringify(t));
2144
2205
  } catch {
2145
2206
  console.warn("Failed to save auth session to localStorage");
2146
2207
  }
2147
2208
  }
2148
- function gt() {
2209
+ function St() {
2149
2210
  try {
2150
- const t = localStorage.getItem(Be);
2211
+ const t = localStorage.getItem($e);
2151
2212
  if (!t) return null;
2152
2213
  const e = JSON.parse(t);
2153
- return Date.now() - e.authenticatedAt > On ? (yt(), null) : e;
2214
+ return Date.now() - e.authenticatedAt > Mn ? (bt(), null) : e;
2154
2215
  } catch {
2155
2216
  return console.warn("Failed to load auth session from localStorage"), null;
2156
2217
  }
2157
2218
  }
2158
- function yt() {
2219
+ function bt() {
2159
2220
  try {
2160
- localStorage.removeItem(Be);
2221
+ localStorage.removeItem($e);
2161
2222
  } catch {
2162
2223
  console.warn("Failed to clear auth session from localStorage");
2163
2224
  }
@@ -2170,8 +2231,8 @@ function le(t) {
2170
2231
  authenticatedAt: t.authenticatedAt
2171
2232
  };
2172
2233
  }
2173
- async function St(t, e) {
2174
- const r = me(), n = await fetch(`${e}/anonymous`, {
2234
+ async function wt(t, e) {
2235
+ const r = pe(), n = await fetch(`${e}/anonymous`, {
2175
2236
  method: "POST",
2176
2237
  headers: { "Content-Type": "application/json" },
2177
2238
  body: JSON.stringify({ deviceId: r, space: t })
@@ -2185,9 +2246,9 @@ async function St(t, e) {
2185
2246
  provider: "anonymous",
2186
2247
  authenticatedAt: Date.now()
2187
2248
  };
2188
- return we(s), s;
2249
+ return ve(s), s;
2189
2250
  }
2190
- async function co(t) {
2251
+ async function po(t) {
2191
2252
  const { email: e, spaceId: r, authUrl: n, returnUrl: o = window.location.origin + window.location.pathname } = t, s = await fetch(`${n}/email/send`, {
2192
2253
  method: "POST",
2193
2254
  headers: { "Content-Type": "application/json" },
@@ -2202,22 +2263,22 @@ async function co(t) {
2202
2263
  throw new Error(i);
2203
2264
  }
2204
2265
  }
2205
- function _n() {
2266
+ function Un() {
2206
2267
  const t = new URLSearchParams(window.location.search), e = t.get("ikon_token"), r = t.get("ikon_provider");
2207
2268
  return e && r ? { token: e, provider: r } : null;
2208
2269
  }
2209
- function Nn() {
2270
+ function xn() {
2210
2271
  const e = new URLSearchParams(window.location.search).get("error");
2211
2272
  return e ? decodeURIComponent(e) : null;
2212
2273
  }
2213
- function ct() {
2274
+ function lt() {
2214
2275
  window.history.replaceState({}, "", window.location.pathname);
2215
2276
  }
2216
- function Pn(t, e, r, n) {
2277
+ function Dn(t, e, r, n) {
2217
2278
  const o = n ?? window.location.origin + window.location.pathname + window.location.search;
2218
2279
  return `${r}/oauth/${t}?space=${encodeURIComponent(e)}&return=${encodeURIComponent(o)}`;
2219
2280
  }
2220
- async function Mn(t) {
2281
+ async function Fn(t) {
2221
2282
  const e = await fetch(`${t}/passkey/registration/options`, {
2222
2283
  method: "POST",
2223
2284
  headers: { "Content-Type": "application/json" }
@@ -2228,7 +2289,7 @@ async function Mn(t) {
2228
2289
  }
2229
2290
  return e.json();
2230
2291
  }
2231
- async function jn(t, e, r) {
2292
+ async function Bn(t, e, r) {
2232
2293
  const n = await fetch(`${t}/passkey/registration/verify`, {
2233
2294
  method: "POST",
2234
2295
  headers: { "Content-Type": "application/json" },
@@ -2243,9 +2304,9 @@ async function jn(t, e, r) {
2243
2304
  provider: "passkey",
2244
2305
  authenticatedAt: Date.now()
2245
2306
  };
2246
- return we(s), s;
2307
+ return ve(s), s;
2247
2308
  }
2248
- async function Ln(t, e) {
2309
+ async function $n(t, e) {
2249
2310
  const r = await fetch(`${t}/passkey/authentication/options`, {
2250
2311
  method: "POST",
2251
2312
  headers: { "Content-Type": "application/json" },
@@ -2257,7 +2318,7 @@ async function Ln(t, e) {
2257
2318
  }
2258
2319
  return r.json();
2259
2320
  }
2260
- async function Un(t, e) {
2321
+ async function Vn(t, e) {
2261
2322
  const r = await fetch(`${t}/passkey/authentication/verify`, {
2262
2323
  method: "POST",
2263
2324
  headers: { "Content-Type": "application/json" },
@@ -2272,32 +2333,32 @@ async function Un(t, e) {
2272
2333
  provider: "passkey",
2273
2334
  authenticatedAt: Date.now()
2274
2335
  };
2275
- return we(o), o;
2336
+ return ve(o), o;
2276
2337
  }
2277
- function W(t) {
2338
+ function q(t) {
2278
2339
  const e = new Uint8Array(t);
2279
2340
  let r = "";
2280
2341
  for (const o of e)
2281
2342
  r += String.fromCharCode(o);
2282
2343
  return btoa(r).replace(/\+/g, "-").replace(/\//g, "_").replace(/=/g, "");
2283
2344
  }
2284
- function ye(t) {
2345
+ function Se(t) {
2285
2346
  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);
2286
2347
  for (let a = 0; a < o.length; a++)
2287
2348
  i[a] = o.charCodeAt(a);
2288
2349
  return s;
2289
2350
  }
2290
- function $e() {
2291
- return xn.stubThis(globalThis?.PublicKeyCredential !== void 0 && typeof globalThis.PublicKeyCredential == "function");
2351
+ function Ve() {
2352
+ return Kn.stubThis(globalThis?.PublicKeyCredential !== void 0 && typeof globalThis.PublicKeyCredential == "function");
2292
2353
  }
2293
- const xn = {
2354
+ const Kn = {
2294
2355
  stubThis: (t) => t
2295
2356
  };
2296
- function bt(t) {
2357
+ function vt(t) {
2297
2358
  const { id: e } = t;
2298
2359
  return {
2299
2360
  ...t,
2300
- id: ye(e),
2361
+ id: Se(e),
2301
2362
  /**
2302
2363
  * `descriptor.transports` is an array of our `AuthenticatorTransportFuture` that includes newer
2303
2364
  * transports that TypeScript's DOM lib is ignorant of. Convince TS that our list of transports
@@ -2306,7 +2367,7 @@ function bt(t) {
2306
2367
  transports: t.transports
2307
2368
  };
2308
2369
  }
2309
- function wt(t) {
2370
+ function Rt(t) {
2310
2371
  return (
2311
2372
  // Consider localhost valid as well since it's okay wrt Secure Contexts
2312
2373
  t === "localhost" || /^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(t)
@@ -2322,7 +2383,7 @@ class P extends Error {
2322
2383
  }), this.name = o ?? n.name, this.code = r;
2323
2384
  }
2324
2385
  }
2325
- function Dn({ error: t, options: e }) {
2386
+ function Yn({ error: t, options: e }) {
2326
2387
  const { publicKey: r } = e;
2327
2388
  if (!r)
2328
2389
  throw Error("options was missing required publicKey property");
@@ -2380,7 +2441,7 @@ function Dn({ error: t, options: e }) {
2380
2441
  });
2381
2442
  if (t.name === "SecurityError") {
2382
2443
  const n = globalThis.location.hostname;
2383
- if (wt(n)) {
2444
+ if (Rt(n)) {
2384
2445
  if (r.rp.id !== n)
2385
2446
  return new P({
2386
2447
  message: `The RP ID "${r.rp.id}" is invalid for this domain`,
@@ -2408,7 +2469,7 @@ function Dn({ error: t, options: e }) {
2408
2469
  }
2409
2470
  return t;
2410
2471
  }
2411
- class Fn {
2472
+ class zn {
2412
2473
  constructor() {
2413
2474
  Object.defineProperty(this, "controller", {
2414
2475
  enumerable: !0,
@@ -2432,89 +2493,89 @@ class Fn {
2432
2493
  }
2433
2494
  }
2434
2495
  }
2435
- const vt = new Fn(), Bn = ["cross-platform", "platform"];
2436
- function Et(t) {
2437
- if (t && !(Bn.indexOf(t) < 0))
2496
+ const Et = new zn(), Wn = ["cross-platform", "platform"];
2497
+ function At(t) {
2498
+ if (t && !(Wn.indexOf(t) < 0))
2438
2499
  return t;
2439
2500
  }
2440
- async function $n(t) {
2501
+ async function qn(t) {
2441
2502
  !t.optionsJSON && t.challenge && (console.warn("startRegistration() was not called correctly. It will try to continue with the provided options, but this call should be refactored to use the expected call structure instead. See https://simplewebauthn.dev/docs/packages/browser#typeerror-cannot-read-properties-of-undefined-reading-challenge for more information."), t = { optionsJSON: t });
2442
2503
  const { optionsJSON: e, useAutoRegister: r = !1 } = t;
2443
- if (!$e())
2504
+ if (!Ve())
2444
2505
  throw new Error("WebAuthn is not supported in this browser");
2445
2506
  const n = {
2446
2507
  ...e,
2447
- challenge: ye(e.challenge),
2508
+ challenge: Se(e.challenge),
2448
2509
  user: {
2449
2510
  ...e.user,
2450
- id: ye(e.user.id)
2511
+ id: Se(e.user.id)
2451
2512
  },
2452
- excludeCredentials: e.excludeCredentials?.map(bt)
2513
+ excludeCredentials: e.excludeCredentials?.map(vt)
2453
2514
  }, o = {};
2454
- r && (o.mediation = "conditional"), o.publicKey = n, o.signal = vt.createNewAbortSignal();
2515
+ r && (o.mediation = "conditional"), o.publicKey = n, o.signal = Et.createNewAbortSignal();
2455
2516
  let s;
2456
2517
  try {
2457
2518
  s = await navigator.credentials.create(o);
2458
2519
  } catch (y) {
2459
- throw Dn({ error: y, options: o });
2520
+ throw Yn({ error: y, options: o });
2460
2521
  }
2461
2522
  if (!s)
2462
2523
  throw new Error("Registration was not completed");
2463
2524
  const { id: i, rawId: a, response: c, type: f } = s;
2464
2525
  let d;
2465
2526
  typeof c.getTransports == "function" && (d = c.getTransports());
2466
- let m;
2527
+ let h;
2467
2528
  if (typeof c.getPublicKeyAlgorithm == "function")
2468
2529
  try {
2469
- m = c.getPublicKeyAlgorithm();
2530
+ h = c.getPublicKeyAlgorithm();
2470
2531
  } catch (y) {
2471
- ke("getPublicKeyAlgorithm()", y);
2532
+ Ce("getPublicKeyAlgorithm()", y);
2472
2533
  }
2473
2534
  let u;
2474
2535
  if (typeof c.getPublicKey == "function")
2475
2536
  try {
2476
2537
  const y = c.getPublicKey();
2477
- y !== null && (u = W(y));
2538
+ y !== null && (u = q(y));
2478
2539
  } catch (y) {
2479
- ke("getPublicKey()", y);
2540
+ Ce("getPublicKey()", y);
2480
2541
  }
2481
2542
  let g;
2482
2543
  if (typeof c.getAuthenticatorData == "function")
2483
2544
  try {
2484
- g = W(c.getAuthenticatorData());
2545
+ g = q(c.getAuthenticatorData());
2485
2546
  } catch (y) {
2486
- ke("getAuthenticatorData()", y);
2547
+ Ce("getAuthenticatorData()", y);
2487
2548
  }
2488
2549
  return {
2489
2550
  id: i,
2490
- rawId: W(a),
2551
+ rawId: q(a),
2491
2552
  response: {
2492
- attestationObject: W(c.attestationObject),
2493
- clientDataJSON: W(c.clientDataJSON),
2553
+ attestationObject: q(c.attestationObject),
2554
+ clientDataJSON: q(c.clientDataJSON),
2494
2555
  transports: d,
2495
- publicKeyAlgorithm: m,
2556
+ publicKeyAlgorithm: h,
2496
2557
  publicKey: u,
2497
2558
  authenticatorData: g
2498
2559
  },
2499
2560
  type: f,
2500
2561
  clientExtensionResults: s.getClientExtensionResults(),
2501
- authenticatorAttachment: Et(s.authenticatorAttachment)
2562
+ authenticatorAttachment: At(s.authenticatorAttachment)
2502
2563
  };
2503
2564
  }
2504
- function ke(t, e) {
2565
+ function Ce(t, e) {
2505
2566
  console.warn(`The browser extension that intercepted this WebAuthn API call incorrectly implemented ${t}. You should report this error to them.
2506
2567
  `, e);
2507
2568
  }
2508
- function Vn() {
2509
- if (!$e())
2510
- return Ce.stubThis(new Promise((e) => e(!1)));
2569
+ function Gn() {
2570
+ if (!Ve())
2571
+ return Ie.stubThis(new Promise((e) => e(!1)));
2511
2572
  const t = globalThis.PublicKeyCredential;
2512
- return t?.isConditionalMediationAvailable === void 0 ? Ce.stubThis(new Promise((e) => e(!1))) : Ce.stubThis(t.isConditionalMediationAvailable());
2573
+ return t?.isConditionalMediationAvailable === void 0 ? Ie.stubThis(new Promise((e) => e(!1))) : Ie.stubThis(t.isConditionalMediationAvailable());
2513
2574
  }
2514
- const Ce = {
2575
+ const Ie = {
2515
2576
  stubThis: (t) => t
2516
2577
  };
2517
- function Kn({ error: t, options: e }) {
2578
+ function Hn({ error: t, options: e }) {
2518
2579
  const { publicKey: r } = e;
2519
2580
  if (!r)
2520
2581
  throw Error("options was missing required publicKey property");
@@ -2534,7 +2595,7 @@ function Kn({ error: t, options: e }) {
2534
2595
  });
2535
2596
  if (t.name === "SecurityError") {
2536
2597
  const n = globalThis.location.hostname;
2537
- if (wt(n)) {
2598
+ if (Rt(n)) {
2538
2599
  if (r.rpId !== n)
2539
2600
  return new P({
2540
2601
  message: `The RP ID "${r.rpId}" is invalid for this domain`,
@@ -2555,53 +2616,53 @@ function Kn({ error: t, options: e }) {
2555
2616
  }
2556
2617
  return t;
2557
2618
  }
2558
- async function Yn(t) {
2619
+ async function Jn(t) {
2559
2620
  !t.optionsJSON && t.challenge && (console.warn("startAuthentication() was not called correctly. It will try to continue with the provided options, but this call should be refactored to use the expected call structure instead. See https://simplewebauthn.dev/docs/packages/browser#typeerror-cannot-read-properties-of-undefined-reading-challenge for more information."), t = { optionsJSON: t });
2560
2621
  const { optionsJSON: e, useBrowserAutofill: r = !1, verifyBrowserAutofillInput: n = !0 } = t;
2561
- if (!$e())
2622
+ if (!Ve())
2562
2623
  throw new Error("WebAuthn is not supported in this browser");
2563
2624
  let o;
2564
- e.allowCredentials?.length !== 0 && (o = e.allowCredentials?.map(bt));
2625
+ e.allowCredentials?.length !== 0 && (o = e.allowCredentials?.map(vt));
2565
2626
  const s = {
2566
2627
  ...e,
2567
- challenge: ye(e.challenge),
2628
+ challenge: Se(e.challenge),
2568
2629
  allowCredentials: o
2569
2630
  }, i = {};
2570
2631
  if (r) {
2571
- if (!await Vn())
2632
+ if (!await Gn())
2572
2633
  throw Error("Browser does not support WebAuthn autofill");
2573
2634
  if (document.querySelectorAll("input[autocomplete$='webauthn']").length < 1 && n)
2574
2635
  throw Error('No <input> with "webauthn" as the only or last value in its `autocomplete` attribute was detected');
2575
2636
  i.mediation = "conditional", s.allowCredentials = [];
2576
2637
  }
2577
- i.publicKey = s, i.signal = vt.createNewAbortSignal();
2638
+ i.publicKey = s, i.signal = Et.createNewAbortSignal();
2578
2639
  let a;
2579
2640
  try {
2580
2641
  a = await navigator.credentials.get(i);
2581
2642
  } catch (g) {
2582
- throw Kn({ error: g, options: i });
2643
+ throw Hn({ error: g, options: i });
2583
2644
  }
2584
2645
  if (!a)
2585
2646
  throw new Error("Authentication was not completed");
2586
- const { id: c, rawId: f, response: d, type: m } = a;
2647
+ const { id: c, rawId: f, response: d, type: h } = a;
2587
2648
  let u;
2588
- return d.userHandle && (u = W(d.userHandle)), {
2649
+ return d.userHandle && (u = q(d.userHandle)), {
2589
2650
  id: c,
2590
- rawId: W(f),
2651
+ rawId: q(f),
2591
2652
  response: {
2592
- authenticatorData: W(d.authenticatorData),
2593
- clientDataJSON: W(d.clientDataJSON),
2594
- signature: W(d.signature),
2653
+ authenticatorData: q(d.authenticatorData),
2654
+ clientDataJSON: q(d.clientDataJSON),
2655
+ signature: q(d.signature),
2595
2656
  userHandle: u
2596
2657
  },
2597
- type: m,
2658
+ type: h,
2598
2659
  clientExtensionResults: a.getClientExtensionResults(),
2599
- authenticatorAttachment: Et(a.authenticatorAttachment)
2660
+ authenticatorAttachment: At(a.authenticatorAttachment)
2600
2661
  };
2601
2662
  }
2602
- const Ve = ut(null);
2603
- function uo({ children: t, config: e }) {
2604
- const [r, n] = J({
2663
+ const Ke = dt(null);
2664
+ function go({ children: t, config: e }) {
2665
+ const [r, n] = X({
2605
2666
  isAuthenticated: !1,
2606
2667
  isLoading: !0,
2607
2668
  user: null,
@@ -2609,9 +2670,9 @@ function uo({ children: t, config: e }) {
2609
2670
  });
2610
2671
  D(() => {
2611
2672
  (() => {
2612
- const d = Nn();
2673
+ const d = xn();
2613
2674
  if (d) {
2614
- ct(), n({
2675
+ lt(), n({
2615
2676
  isAuthenticated: !1,
2616
2677
  isLoading: !1,
2617
2678
  user: null,
@@ -2619,14 +2680,14 @@ function uo({ children: t, config: e }) {
2619
2680
  });
2620
2681
  return;
2621
2682
  }
2622
- const m = _n();
2623
- if (m) {
2683
+ const h = Un();
2684
+ if (h) {
2624
2685
  const g = {
2625
- token: m.token,
2626
- provider: m.provider,
2686
+ token: h.token,
2687
+ provider: h.provider,
2627
2688
  authenticatedAt: Date.now()
2628
2689
  };
2629
- we(g), ct(), n({
2690
+ ve(g), lt(), n({
2630
2691
  isAuthenticated: !0,
2631
2692
  isLoading: !1,
2632
2693
  user: le(g),
@@ -2634,7 +2695,7 @@ function uo({ children: t, config: e }) {
2634
2695
  });
2635
2696
  return;
2636
2697
  }
2637
- const u = gt();
2698
+ const u = St();
2638
2699
  if (u) {
2639
2700
  n({
2640
2701
  isAuthenticated: !0,
@@ -2665,7 +2726,7 @@ function uo({ children: t, config: e }) {
2665
2726
  if (f === "guest") {
2666
2727
  n((u) => ({ ...u, isLoading: !0 }));
2667
2728
  try {
2668
- const u = await St(e.spaceId, d);
2729
+ const u = await wt(e.spaceId, d);
2669
2730
  n({
2670
2731
  isAuthenticated: !0,
2671
2732
  isLoading: !1,
@@ -2684,7 +2745,7 @@ function uo({ children: t, config: e }) {
2684
2745
  if (f === "passkey") {
2685
2746
  n((u) => ({ ...u, isLoading: !0, error: null }));
2686
2747
  try {
2687
- const u = await Ln(d), g = await Yn({ optionsJSON: u }), y = await Un(d, g);
2748
+ const u = await $n(d), g = await Jn({ optionsJSON: u }), y = await Vn(d, g);
2688
2749
  n({
2689
2750
  isAuthenticated: !0,
2690
2751
  isLoading: !1,
@@ -2700,12 +2761,12 @@ function uo({ children: t, config: e }) {
2700
2761
  }
2701
2762
  return;
2702
2763
  }
2703
- const m = Pn(f, e.spaceId, d);
2704
- window.location.href = m;
2764
+ const h = Dn(f, e.spaceId, d);
2765
+ window.location.href = h;
2705
2766
  },
2706
2767
  [e.authUrl, e.spaceId]
2707
2768
  ), s = x(() => {
2708
- yt(), n({
2769
+ bt(), n({
2709
2770
  isAuthenticated: !1,
2710
2771
  isLoading: !1,
2711
2772
  user: null,
@@ -2714,20 +2775,20 @@ function uo({ children: t, config: e }) {
2714
2775
  }, []), i = x(
2715
2776
  async (f) => {
2716
2777
  const d = e.authUrl ?? Oe();
2717
- n((m) => ({ ...m, isLoading: !0, error: null }));
2778
+ n((h) => ({ ...h, isLoading: !0, error: null }));
2718
2779
  try {
2719
- const m = await Mn(d), u = await $n({ optionsJSON: m }), g = await jn(d, u, f);
2780
+ const h = await Fn(d), u = await qn({ optionsJSON: h }), g = await Bn(d, u, f);
2720
2781
  n({
2721
2782
  isAuthenticated: !0,
2722
2783
  isLoading: !1,
2723
2784
  user: le(g),
2724
2785
  error: null
2725
2786
  });
2726
- } catch (m) {
2787
+ } catch (h) {
2727
2788
  n((u) => ({
2728
2789
  ...u,
2729
2790
  isLoading: !1,
2730
- error: m instanceof Error ? m.message : "Passkey registration failed"
2791
+ error: h instanceof Error ? h.message : "Passkey registration failed"
2731
2792
  }));
2732
2793
  }
2733
2794
  },
@@ -2742,19 +2803,19 @@ function uo({ children: t, config: e }) {
2742
2803
  }),
2743
2804
  [r, o, s, a, i]
2744
2805
  );
2745
- return /* @__PURE__ */ A.jsx(Ve, { value: c, children: t });
2806
+ return /* @__PURE__ */ A.jsx(Ke, { value: c, children: t });
2746
2807
  }
2747
- function zn() {
2748
- const t = xe(Ve);
2808
+ function Xn() {
2809
+ const t = De(Ke);
2749
2810
  if (!t)
2750
2811
  throw new Error("useAuth must be used within an AuthProvider");
2751
2812
  return t;
2752
2813
  }
2753
- function lo() {
2754
- return xe(Ve);
2814
+ function yo() {
2815
+ return De(Ke);
2755
2816
  }
2756
- function fo(t) {
2757
- const { config: e, guestUrlParam: r } = t, { state: n, login: o } = zn(), s = E(!1);
2817
+ function So(t) {
2818
+ const { config: e, guestUrlParam: r } = t, { state: n, login: o } = Xn(), s = R(!1);
2758
2819
  return D(() => {
2759
2820
  if (!r || n.isAuthenticated || n.isLoading || s.current || !e.methods.includes("guest"))
2760
2821
  return;
@@ -2771,7 +2832,7 @@ function fo(t) {
2771
2832
  error: n.error
2772
2833
  };
2773
2834
  }
2774
- function ho({
2835
+ function bo({
2775
2836
  connectionState: t,
2776
2837
  error: e,
2777
2838
  isReady: r,
@@ -2783,7 +2844,7 @@ function ho({
2783
2844
  renderConnecting: c,
2784
2845
  renderConnectingSlow: f,
2785
2846
  renderConnected: d,
2786
- renderOffline: m,
2847
+ renderOffline: h,
2787
2848
  renderError: u
2788
2849
  }) {
2789
2850
  switch (t) {
@@ -2803,49 +2864,49 @@ function ho({
2803
2864
  isReconnecting: t === "reconnecting"
2804
2865
  });
2805
2866
  case "offline":
2806
- return m();
2867
+ return h();
2807
2868
  case "offlineError":
2808
2869
  return u(e ?? s?.lastError?.message ?? null);
2809
2870
  default:
2810
2871
  return null;
2811
2872
  }
2812
2873
  }
2813
- const Ie = Se("useIkonApp");
2814
- function Wn() {
2874
+ const _e = be("useIkonApp");
2875
+ function Zn() {
2815
2876
  if (typeof window < "u" && window.__IKON_AUTH_CONFIG__)
2816
2877
  return window.__IKON_AUTH_CONFIG__;
2817
2878
  }
2818
- function qn() {
2879
+ function Qn() {
2819
2880
  if (typeof window < "u" && window.__IKON_LOCAL_IKON_SERVER_CONFIG__)
2820
2881
  return window.__IKON_LOCAL_IKON_SERVER_CONFIG__;
2821
2882
  }
2822
- function mo(t) {
2823
- const { authConfig: e, localServer: r, modules: n, registerModules: o, onJoined: s, onConnectionStateChange: i, onError: a, timeouts: c, audio: f, video: d, mediaSession: m } = t, u = e === void 0 ? Wn() ?? null : e, g = r ?? qn(), y = E(null), b = E(null), h = E(null), p = E(!1), v = E(f), k = E(d), I = E(m), j = E(c), G = E(i), Z = E(a), C = E(s);
2824
- v.current = f, k.current = d, I.current = m, j.current = c, G.current = i, Z.current = a, C.current = s;
2825
- const [N, F] = J("idle"), [M, L] = J(null), [z, ee] = J(null), [H, fe] = J(null), [te, re] = J(!1), B = Y(() => {
2883
+ 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(() => {
2826
2887
  try {
2827
- const w = Ot();
2828
- return (w.sessionId || w.channelKey) && _t(), w;
2888
+ const w = Nt();
2889
+ return (w.sessionId || w.channelKey) && Pt(), w;
2829
2890
  } catch {
2830
2891
  return { parameters: {} };
2831
2892
  }
2832
- }, []), l = Y(() => u?.enabled ? gt() : null, [u?.enabled]), S = g?.enabled ?? !1, T = g?.host ?? "localhost", O = g?.port ?? 8443;
2893
+ }, []), l = Y(() => u?.enabled ? St() : null, [u?.enabled]), S = g?.enabled ?? !1, T = g?.host ?? "localhost", _ = g?.port ?? 8443;
2833
2894
  D(() => {
2834
- !S && Ke() && u && !u.enabled && u.spaceId && !H && !te && (re(!0), St(u.spaceId, u.authUrl ?? Oe()).then((_) => {
2835
- fe(_.token);
2836
- }).catch((_) => {
2837
- Ie.error("Anonymous auth failed:", _), L(_ instanceof Error ? _.message : "Anonymous auth failed");
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");
2838
2899
  }).finally(() => {
2839
2900
  re(!1);
2840
2901
  }));
2841
- }, [S, u, H, te]);
2902
+ }, [S, u, J, te]);
2842
2903
  const V = Y(() => {
2843
2904
  if (S) {
2844
- const w = l?.token ? Nt(l.token) ?? me() : me();
2905
+ const w = l?.token ? jt(l.token) ?? pe() : pe();
2845
2906
  return {
2846
2907
  local: {
2847
2908
  host: T,
2848
- httpsPort: O,
2909
+ httpsPort: _,
2849
2910
  userId: w,
2850
2911
  parameters: B.parameters
2851
2912
  }
@@ -2855,45 +2916,45 @@ function mo(t) {
2855
2916
  sessionToken: {
2856
2917
  token: l.token,
2857
2918
  spaceId: u.spaceId,
2858
- backendType: Ye(),
2919
+ backendType: ze(),
2859
2920
  sessionId: B.sessionId,
2860
2921
  channelKey: B.channelKey,
2861
2922
  parameters: B.parameters
2862
2923
  }
2863
- } : H && u?.spaceId ? {
2924
+ } : J && u?.spaceId ? {
2864
2925
  sessionToken: {
2865
- token: H,
2926
+ token: J,
2866
2927
  spaceId: u.spaceId,
2867
- backendType: Ye(),
2928
+ backendType: ze(),
2868
2929
  sessionId: B.sessionId,
2869
2930
  channelKey: B.channelKey,
2870
2931
  parameters: B.parameters
2871
2932
  }
2872
- } : Ke() ? null : {
2933
+ } : Ye() ? null : {
2873
2934
  local: {
2874
2935
  host: T,
2875
- httpsPort: O,
2876
- userId: me(),
2936
+ httpsPort: _,
2937
+ userId: pe(),
2877
2938
  parameters: B.parameters
2878
2939
  }
2879
2940
  };
2880
- }, [S, T, O, l?.token, u?.spaceId, H, B.sessionId, B.channelKey, B.parameters]);
2881
- Fr(z);
2882
- const K = $r(z);
2941
+ }, [S, T, _, l?.token, u?.spaceId, J, B.sessionId, B.channelKey, B.parameters]);
2942
+ zr(z);
2943
+ const K = qr(z);
2883
2944
  D(() => {
2884
2945
  if (!p.current) {
2885
- if (p.current = !0, h.current = Nr(), n)
2946
+ if (p.current = !0, m.current = xr(), n)
2886
2947
  for (const w of n)
2887
- w(h.current);
2888
- o?.(h.current), h.current.loadRegisteredModules().catch((w) => {
2889
- Ie.error("Failed to load UI modules", w);
2948
+ w(m.current);
2949
+ o?.(m.current), m.current.loadRegisteredModules().catch((w) => {
2950
+ _e.error("Failed to load UI modules", w);
2890
2951
  });
2891
2952
  }
2892
2953
  }, []), D(() => {
2893
2954
  if (!V) return;
2894
- const w = new Pt({
2955
+ const w = new Lt({
2895
2956
  ...V,
2896
- timeouts: j.current,
2957
+ timeouts: L.current,
2897
2958
  audio: v.current,
2898
2959
  video: k.current,
2899
2960
  mediaSession: I.current,
@@ -2901,7 +2962,7 @@ function mo(t) {
2901
2962
  F(U), G.current?.(U);
2902
2963
  },
2903
2964
  onError: (U) => {
2904
- L(U.message), Z.current?.(U);
2965
+ M(U.message), Z.current?.(U);
2905
2966
  },
2906
2967
  onJoined: () => {
2907
2968
  const U = w.globalState?.SessionId;
@@ -2909,32 +2970,32 @@ function mo(t) {
2909
2970
  }
2910
2971
  });
2911
2972
  y.current = w;
2912
- const _ = new Jt({ client: w });
2913
- return b.current = _, ee(_), w.connect().catch((U) => {
2914
- Ie.error("Connection failed:", U);
2973
+ const O = new Zt({ client: w });
2974
+ return b.current = O, ee(O), w.connect().catch((U) => {
2975
+ _e.error("Connection failed:", U);
2915
2976
  }), () => {
2916
- w.disconnect(), y.current = null, _.dispose(), b.current = null;
2977
+ w.disconnect(), y.current = null, O.dispose(), b.current = null;
2917
2978
  };
2918
2979
  }, [V]);
2919
- const ne = x((w, _) => {
2920
- const U = typeof _ == "string" ? _ : JSON.stringify(_ ?? {});
2980
+ const ne = x((w, O) => {
2981
+ const U = typeof O == "string" ? O : JSON.stringify(O ?? {});
2921
2982
  y.current?.sendActionCall(w, U);
2922
2983
  }, []), oe = N === "connected" || N === "reconnecting";
2923
2984
  return {
2924
2985
  connectionState: N,
2925
- error: M,
2986
+ error: j,
2926
2987
  stores: K,
2927
2988
  client: y.current,
2928
- registry: h.current,
2989
+ registry: m.current,
2929
2990
  clientRef: y,
2930
2991
  uiRef: b,
2931
- registryRef: h,
2992
+ registryRef: m,
2932
2993
  onAction: ne,
2933
2994
  isReady: oe
2934
2995
  };
2935
2996
  }
2936
- function po(t) {
2937
- const e = E(!1);
2997
+ function vo(t) {
2998
+ const e = R(!1);
2938
2999
  return x(() => {
2939
3000
  if (e.current) return;
2940
3001
  e.current = !0;
@@ -2942,30 +3003,30 @@ function po(t) {
2942
3003
  r.rel = "stylesheet", r.href = t, document.head.appendChild(r);
2943
3004
  }, [t]);
2944
3005
  }
2945
- let Gn = 0;
2946
- function go(t = 5, e = 5e3) {
2947
- const [r, n] = J([]), o = E(/* @__PURE__ */ new Map()), s = x((i) => {
3006
+ let eo = 0;
3007
+ function Ro(t = 5, e = 5e3) {
3008
+ const [r, n] = X([]), o = R(/* @__PURE__ */ new Map()), s = x((i) => {
2948
3009
  const a = o.current.get(i);
2949
3010
  a && (clearTimeout(a), o.current.delete(i)), n((c) => c.filter((f) => f.id !== i));
2950
3011
  }, []);
2951
3012
  return D(() => {
2952
3013
  const i = o.current, a = Mt(
2953
3014
  (c) => {
2954
- if (!jt())
3015
+ if (!Ut())
2955
3016
  return;
2956
- const f = `toast-${++Gn}`, d = c.level === ze.ERROR ? "error" : "warn", m = {
3017
+ const f = `toast-${++eo}`, d = c.level === We.ERROR ? "error" : "warn", h = {
2957
3018
  id: f,
2958
3019
  level: d,
2959
3020
  message: c.message,
2960
3021
  component: c.component
2961
3022
  };
2962
- n((g) => [...g, m].slice(-t));
3023
+ n((g) => [...g, h].slice(-t));
2963
3024
  const u = setTimeout(() => {
2964
3025
  s(f);
2965
3026
  }, e);
2966
3027
  i.set(f, u);
2967
3028
  },
2968
- { minLevel: ze.WARN }
3029
+ { minLevel: We.WARN }
2969
3030
  );
2970
3031
  return () => {
2971
3032
  a();
@@ -2975,100 +3036,100 @@ function go(t = 5, e = 5e3) {
2975
3036
  };
2976
3037
  }, [t, e, s]), { toasts: r, dismissToast: s };
2977
3038
  }
2978
- const Rt = ut(null);
2979
- function Hn(t, e) {
3039
+ const Tt = dt(null);
3040
+ function to(t, e) {
2980
3041
  return e ? t.replace(/\{(\w+)\}/g, (r, n) => e[n] ?? `{${n}}`) : t;
2981
3042
  }
2982
- function Jn(t, e) {
3043
+ function ro(t, e) {
2983
3044
  const n = new URLSearchParams(window.location.search).get("lang");
2984
3045
  if (n && t.includes(n))
2985
3046
  return n;
2986
3047
  const o = navigator.language.split("-")[0];
2987
3048
  return t.includes(o) ? o : e && t.includes(e) ? e : "en";
2988
3049
  }
2989
- function Xn(t, e, r) {
2990
- return e ? Jn(t, r) : r && t.includes(r) ? r : "en";
3050
+ function no(t, e, r) {
3051
+ return e ? ro(t, r) : r && t.includes(r) ? r : "en";
2991
3052
  }
2992
- function yo({
3053
+ function Eo({
2993
3054
  children: t,
2994
3055
  translations: e,
2995
3056
  defaultLanguage: r,
2996
3057
  detectLanguage: n = !1
2997
3058
  }) {
2998
- const o = Object.keys(e), s = Xn(o, n, r), i = e[s] ?? e.en, a = Y(
3059
+ const o = Object.keys(e), s = no(o, n, r), i = e[s] ?? e.en, a = Y(
2999
3060
  () => ({
3000
3061
  t: (c, f) => {
3001
3062
  const d = i[c];
3002
- return Hn(d, f);
3063
+ return to(d, f);
3003
3064
  },
3004
3065
  locale: s,
3005
3066
  translations: i
3006
3067
  }),
3007
3068
  [i, s]
3008
3069
  );
3009
- return /* @__PURE__ */ A.jsx(Rt, { value: a, children: t });
3070
+ return /* @__PURE__ */ A.jsx(Tt, { value: a, children: t });
3010
3071
  }
3011
- function So() {
3012
- const t = xe(Rt);
3072
+ function Ao() {
3073
+ const t = De(Tt);
3013
3074
  if (!t)
3014
3075
  throw new Error("useI18n must be used within an I18nProvider");
3015
3076
  return t;
3016
3077
  }
3017
3078
  export {
3018
- uo as AuthProvider,
3019
- ho as ConnectionStateRenderer,
3020
- yo as I18nProvider,
3021
- or as IKON_UI_BASE_MODULE,
3022
- fr as IKON_UI_MEDIA_MODULE,
3023
- Cr as IKON_UI_SHADER_MODULE,
3024
- Tr as IKON_UI_SHADER_TYPE,
3025
- Ne as IKON_UI_STREAM_CATEGORY,
3026
- ar as IKON_UI_VIDEO_CANVAS_TYPE,
3027
- cr as IKON_UI_VIDEO_URL_PLAYER_TYPE,
3028
- Jt as IkonUi,
3029
- _r as IkonUiRegistry,
3030
- no as IkonUiSurface,
3031
- Gt as UiComponentRegistry,
3032
- qt as UiRenderer,
3033
- vo as UiStreamStore,
3034
- oo as areIkonUiModuleListsEqual,
3035
- St as authenticateAnonymous,
3036
- Pn as buildOAuthRedirectUrl,
3037
- yt as clearAuthSession,
3038
- ct as clearOAuthParams,
3039
- nr as createBaseResolvers,
3040
- to as createComponentLibrary,
3041
- Nr as createIkonUiRegistry,
3042
- lr as createMediaResolvers,
3043
- kr as createShaderRendererResolver,
3044
- Ht as isIkonUiCategoryMatch,
3045
- gt as loadAuthSession,
3046
- sr as loadBaseModule,
3047
- hr as loadMediaModule,
3048
- Ir as loadShaderModule,
3049
- on as normalizeIkonUiModuleList,
3050
- io as parseIkonUiInitPayload,
3051
- _n as parseOAuthCallback,
3052
- Nn as parseOAuthError,
3053
- sn as readIkonUiModules,
3054
- so as readIkonUiModulesFromSources,
3055
- ir as registerBaseModule,
3056
- mr as registerMediaModule,
3057
- Or as registerShaderModule,
3058
- zt as renderChildren,
3059
- ao as renderMotionLetters,
3060
- we as saveAuthSession,
3061
- co as sendMagicLink,
3079
+ go as AuthProvider,
3080
+ bo as ConnectionStateRenderer,
3081
+ Eo as I18nProvider,
3082
+ ir as IKON_UI_BASE_MODULE,
3083
+ Sr as IKON_UI_MEDIA_MODULE,
3084
+ jr as IKON_UI_SHADER_MODULE,
3085
+ Nr as IKON_UI_SHADER_TYPE,
3086
+ Pe as IKON_UI_STREAM_CATEGORY,
3087
+ hr as IKON_UI_VIDEO_CANVAS_TYPE,
3088
+ mr as IKON_UI_VIDEO_URL_PLAYER_TYPE,
3089
+ Zt as IkonUi,
3090
+ Ur as IkonUiRegistry,
3091
+ uo as IkonUiSurface,
3092
+ Jt as UiComponentRegistry,
3093
+ Ht as UiRenderer,
3094
+ Co as UiStreamStore,
3095
+ lo as areIkonUiModuleListsEqual,
3096
+ wt as authenticateAnonymous,
3097
+ Dn as buildOAuthRedirectUrl,
3098
+ bt as clearAuthSession,
3099
+ lt as clearOAuthParams,
3100
+ sr as createBaseResolvers,
3101
+ ao as createComponentLibrary,
3102
+ xr as createIkonUiRegistry,
3103
+ gr as createMediaResolvers,
3104
+ Pr as createShaderRendererResolver,
3105
+ Xt as isIkonUiCategoryMatch,
3106
+ St as loadAuthSession,
3107
+ ar as loadBaseModule,
3108
+ br as loadMediaModule,
3109
+ Lr as loadShaderModule,
3110
+ dn as normalizeIkonUiModuleList,
3111
+ ho as parseIkonUiInitPayload,
3112
+ Un as parseOAuthCallback,
3113
+ xn as parseOAuthError,
3114
+ fn as readIkonUiModules,
3115
+ fo as readIkonUiModulesFromSources,
3116
+ cr as registerBaseModule,
3117
+ wr as registerMediaModule,
3118
+ Mr as registerShaderModule,
3119
+ qt as renderChildren,
3120
+ mo as renderMotionLetters,
3121
+ ve as saveAuthSession,
3122
+ po as sendMagicLink,
3062
3123
  le as sessionToUser,
3063
- zn as useAuth,
3064
- fo as useAuthGuard,
3065
- lo as useAuthOptional,
3066
- So as useI18n,
3067
- mo as useIkonApp,
3068
- Fr as useIkonStyles,
3069
- $r as useIkonUiStores,
3070
- po as useLazyFont,
3071
- go as useToasts,
3072
- X as useUiNode,
3073
- ro as useUiStore
3124
+ Xn as useAuth,
3125
+ So as useAuthGuard,
3126
+ yo as useAuthOptional,
3127
+ Ao as useI18n,
3128
+ wo as useIkonApp,
3129
+ zr as useIkonStyles,
3130
+ qr as useIkonUiStores,
3131
+ vo as useLazyFont,
3132
+ Ro as useToasts,
3133
+ H as useUiNode,
3134
+ co as useUiStore
3074
3135
  };