@ikonai/sdk-react-ui 1.0.30 → 1.0.32

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
1
  import { IkonUiCore as It, UiStreamStore as Ot } from "@ikonai/sdk-ui";
2
2
  import { UiStreamStore as Mo } from "@ikonai/sdk-ui";
3
- import _t, { useSyncExternalStore as Fe, useMemo as K, memo as W, useRef as v, useCallback as D, Fragment as Nt, useEffect as L, useState as G, createContext as ht, use as Be } from "react";
4
- import { createLogger as Re, getOrCreateDeviceId as Pt, deriveAuthUrl as Pe, parseUrlParams as Mt, clearSessionParamsFromUrl as jt, isCloudEnvironment as ze, extractUserIdFromToken as Lt, deriveBackendType as qe, IkonClient as Ut, AuthenticationError as xt, subscribeToLogEvents as Dt, isDebugModeEnabled as Ft, LogLevel as Ge, getLangParam as Bt } from "@ikonai/sdk";
3
+ import _t, { useSyncExternalStore as Fe, useMemo as K, memo as W, useRef as v, useCallback as D, Fragment as Nt, useEffect as U, useState as G, createContext as ht, use as Be } from "react";
4
+ import { createLogger as Re, getOrCreateDeviceId as Pt, deriveAuthUrl as Pe, parseUrlParams as Mt, clearSessionParamsFromUrl as jt, isCloudEnvironment as ze, extractUserIdFromToken as Ut, deriveBackendType as qe, IkonClient as Lt, AuthenticationError as xt, subscribeToLogEvents as Dt, isDebugModeEnabled as Ft, LogLevel as Ge, getLangParam as Bt } from "@ikonai/sdk";
5
5
  var pe = { exports: {} }, ie = {};
6
6
  /**
7
7
  * @license React
@@ -47,17 +47,17 @@ var ae = {};
47
47
  var Je;
48
48
  function Vt() {
49
49
  return Je || (Je = 1, process.env.NODE_ENV !== "production" && function() {
50
- function t(d) {
51
- if (d == null) return null;
52
- if (typeof d == "function")
53
- return d.$$typeof === F ? null : d.displayName || d.name || null;
54
- if (typeof d == "string") return d;
55
- switch (d) {
56
- case b:
50
+ function t(l) {
51
+ if (l == null) return null;
52
+ if (typeof l == "function")
53
+ return l.$$typeof === F ? null : l.displayName || l.name || null;
54
+ if (typeof l == "string") return l;
55
+ switch (l) {
56
+ case S:
57
57
  return "Fragment";
58
58
  case g:
59
59
  return "Profiler";
60
- case p:
60
+ case m:
61
61
  return "StrictMode";
62
62
  case M:
63
63
  return "Suspense";
@@ -66,127 +66,127 @@ function Vt() {
66
66
  case _:
67
67
  return "Activity";
68
68
  }
69
- if (typeof d == "object")
70
- switch (typeof d.tag == "number" && console.error(
69
+ if (typeof l == "object")
70
+ switch (typeof l.tag == "number" && console.error(
71
71
  "Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
72
- ), d.$$typeof) {
72
+ ), l.$$typeof) {
73
73
  case y:
74
74
  return "Portal";
75
75
  case k:
76
- return (d.displayName || "Context") + ".Provider";
76
+ return (l.displayName || "Context") + ".Provider";
77
77
  case w:
78
- return (d._context.displayName || "Context") + ".Consumer";
78
+ return (l._context.displayName || "Context") + ".Consumer";
79
79
  case O:
80
- var S = d.render;
81
- return d = d.displayName, d || (d = S.displayName || S.name || "", d = d !== "" ? "ForwardRef(" + d + ")" : "ForwardRef"), d;
80
+ var b = l.render;
81
+ return l = l.displayName, l || (l = b.displayName || b.name || "", l = l !== "" ? "ForwardRef(" + l + ")" : "ForwardRef"), l;
82
82
  case Q:
83
- return S = d.displayName || null, S !== null ? S : t(d.type) || "Memo";
83
+ return b = l.displayName || null, b !== null ? b : t(l.type) || "Memo";
84
84
  case T:
85
- S = d._payload, d = d._init;
85
+ b = l._payload, l = l._init;
86
86
  try {
87
- return t(d(S));
87
+ return t(l(b));
88
88
  } catch {
89
89
  }
90
90
  }
91
91
  return null;
92
92
  }
93
- function e(d) {
94
- return "" + d;
93
+ function e(l) {
94
+ return "" + l;
95
95
  }
96
- function r(d) {
96
+ function r(l) {
97
97
  try {
98
- e(d);
99
- var S = !1;
98
+ e(l);
99
+ var b = !1;
100
100
  } catch {
101
- S = !0;
101
+ b = !0;
102
102
  }
103
- if (S) {
104
- S = console;
105
- var R = S.error, C = typeof Symbol == "function" && Symbol.toStringTag && d[Symbol.toStringTag] || d.constructor.name || "Object";
103
+ if (b) {
104
+ b = console;
105
+ var R = b.error, C = typeof Symbol == "function" && Symbol.toStringTag && l[Symbol.toStringTag] || l.constructor.name || "Object";
106
106
  return R.call(
107
- S,
107
+ b,
108
108
  "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
109
109
  C
110
- ), e(d);
110
+ ), e(l);
111
111
  }
112
112
  }
113
- function n(d) {
114
- if (d === b) return "<>";
115
- if (typeof d == "object" && d !== null && d.$$typeof === T)
113
+ function n(l) {
114
+ if (l === S) return "<>";
115
+ if (typeof l == "object" && l !== null && l.$$typeof === T)
116
116
  return "<...>";
117
117
  try {
118
- var S = t(d);
119
- return S ? "<" + S + ">" : "<...>";
118
+ var b = t(l);
119
+ return b ? "<" + b + ">" : "<...>";
120
120
  } catch {
121
121
  return "<...>";
122
122
  }
123
123
  }
124
124
  function o() {
125
- var d = j.A;
126
- return d === null ? null : d.getOwner();
125
+ var l = j.A;
126
+ return l === null ? null : l.getOwner();
127
127
  }
128
128
  function s() {
129
129
  return Error("react-stack-top-frame");
130
130
  }
131
- function i(d) {
132
- if (U.call(d, "key")) {
133
- var S = Object.getOwnPropertyDescriptor(d, "key").get;
134
- if (S && S.isReactWarning) return !1;
131
+ function i(l) {
132
+ if (L.call(l, "key")) {
133
+ var b = Object.getOwnPropertyDescriptor(l, "key").get;
134
+ if (b && b.isReactWarning) return !1;
135
135
  }
136
- return d.key !== void 0;
136
+ return l.key !== void 0;
137
137
  }
138
- function a(d, S) {
138
+ function a(l, b) {
139
139
  function R() {
140
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
- S
142
+ b
143
143
  ));
144
144
  }
145
- R.isReactWarning = !0, Object.defineProperty(d, "key", {
145
+ R.isReactWarning = !0, Object.defineProperty(l, "key", {
146
146
  get: R,
147
147
  configurable: !0
148
148
  });
149
149
  }
150
150
  function c() {
151
- var d = t(this.type);
152
- return he[d] || (he[d] = !0, console.error(
151
+ var l = t(this.type);
152
+ return he[l] || (he[l] = !0, console.error(
153
153
  "Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
154
- )), d = this.props.ref, d !== void 0 ? d : null;
154
+ )), l = this.props.ref, l !== void 0 ? l : null;
155
155
  }
156
- function f(d, S, R, C, V, B, ee, se) {
157
- return R = B.ref, d = {
158
- $$typeof: m,
159
- type: d,
160
- key: S,
156
+ function d(l, b, R, C, V, B, ee, se) {
157
+ return R = B.ref, l = {
158
+ $$typeof: p,
159
+ type: l,
160
+ key: b,
161
161
  props: B,
162
162
  _owner: V
163
- }, (R !== void 0 ? R : null) !== null ? Object.defineProperty(d, "ref", {
163
+ }, (R !== void 0 ? R : null) !== null ? Object.defineProperty(l, "ref", {
164
164
  enumerable: !1,
165
165
  get: c
166
- }) : Object.defineProperty(d, "ref", { enumerable: !1, value: null }), d._store = {}, Object.defineProperty(d._store, "validated", {
166
+ }) : Object.defineProperty(l, "ref", { enumerable: !1, value: null }), l._store = {}, Object.defineProperty(l._store, "validated", {
167
167
  configurable: !1,
168
168
  enumerable: !1,
169
169
  writable: !0,
170
170
  value: 0
171
- }), Object.defineProperty(d, "_debugInfo", {
171
+ }), Object.defineProperty(l, "_debugInfo", {
172
172
  configurable: !1,
173
173
  enumerable: !1,
174
174
  writable: !0,
175
175
  value: null
176
- }), Object.defineProperty(d, "_debugStack", {
176
+ }), Object.defineProperty(l, "_debugStack", {
177
177
  configurable: !1,
178
178
  enumerable: !1,
179
179
  writable: !0,
180
180
  value: ee
181
- }), Object.defineProperty(d, "_debugTask", {
181
+ }), Object.defineProperty(l, "_debugTask", {
182
182
  configurable: !1,
183
183
  enumerable: !1,
184
184
  writable: !0,
185
185
  value: se
186
- }), Object.freeze && (Object.freeze(d.props), Object.freeze(d)), d;
186
+ }), Object.freeze && (Object.freeze(l.props), Object.freeze(l)), l;
187
187
  }
188
- function u(d, S, R, C, V, B, ee, se) {
189
- var N = S.children;
188
+ function u(l, b, R, C, V, B, ee, se) {
189
+ var N = b.children;
190
190
  if (N !== void 0)
191
191
  if (C)
192
192
  if (Y(N)) {
@@ -198,9 +198,9 @@ function Vt() {
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
200
  else h(N);
201
- if (U.call(S, "key")) {
202
- N = t(d);
203
- var X = Object.keys(S).filter(function(x) {
201
+ if (L.call(b, "key")) {
202
+ N = t(l);
203
+ var X = Object.keys(b).filter(function(x) {
204
204
  return x !== "key";
205
205
  });
206
206
  C = 0 < X.length ? "{key: someKey, " + X.join(": ..., ") + ": ...}" : "{key: someKey}", me[N + C] || (X = 0 < X.length ? "{" + X.join(": ..., ") + ": ...}" : "{}", console.error(
@@ -216,16 +216,16 @@ React keys must be passed directly to JSX without using spread:
216
216
  N
217
217
  ), me[N + C] = !0);
218
218
  }
219
- if (N = null, R !== void 0 && (r(R), N = "" + R), i(S) && (r(S.key), N = "" + S.key), "key" in S) {
219
+ if (N = null, R !== void 0 && (r(R), N = "" + R), i(b) && (r(b.key), N = "" + b.key), "key" in b) {
220
220
  R = {};
221
- for (var I in S)
222
- I !== "key" && (R[I] = S[I]);
223
- } else R = S;
221
+ for (var I in b)
222
+ I !== "key" && (R[I] = b[I]);
223
+ } else R = b;
224
224
  return N && a(
225
225
  R,
226
- typeof d == "function" ? d.displayName || d.name || "Unknown" : d
227
- ), f(
228
- d,
226
+ typeof l == "function" ? l.displayName || l.name || "Unknown" : l
227
+ ), d(
228
+ l,
229
229
  N,
230
230
  B,
231
231
  V,
@@ -235,44 +235,44 @@ React keys must be passed directly to JSX without using spread:
235
235
  se
236
236
  );
237
237
  }
238
- function h(d) {
239
- typeof d == "object" && d !== null && d.$$typeof === m && d._store && (d._store.validated = 1);
238
+ function h(l) {
239
+ typeof l == "object" && l !== null && l.$$typeof === p && l._store && (l._store.validated = 1);
240
240
  }
241
- var l = _t, m = Symbol.for("react.transitional.element"), y = Symbol.for("react.portal"), b = Symbol.for("react.fragment"), p = Symbol.for("react.strict_mode"), g = Symbol.for("react.profiler"), w = Symbol.for("react.consumer"), k = Symbol.for("react.context"), O = Symbol.for("react.forward_ref"), M = Symbol.for("react.suspense"), z = Symbol.for("react.suspense_list"), Q = Symbol.for("react.memo"), T = Symbol.for("react.lazy"), _ = Symbol.for("react.activity"), F = Symbol.for("react.client.reference"), j = l.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, U = Object.prototype.hasOwnProperty, Y = Array.isArray, re = console.createTask ? console.createTask : function() {
241
+ var f = _t, p = Symbol.for("react.transitional.element"), y = Symbol.for("react.portal"), S = Symbol.for("react.fragment"), m = Symbol.for("react.strict_mode"), g = Symbol.for("react.profiler"), w = Symbol.for("react.consumer"), k = Symbol.for("react.context"), O = Symbol.for("react.forward_ref"), M = Symbol.for("react.suspense"), z = Symbol.for("react.suspense_list"), Q = Symbol.for("react.memo"), T = Symbol.for("react.lazy"), _ = Symbol.for("react.activity"), F = Symbol.for("react.client.reference"), j = f.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, L = Object.prototype.hasOwnProperty, Y = Array.isArray, re = console.createTask ? console.createTask : function() {
242
242
  return null;
243
243
  };
244
- l = {
245
- "react-stack-bottom-frame": function(d) {
246
- return d();
244
+ f = {
245
+ "react-stack-bottom-frame": function(l) {
246
+ return l();
247
247
  }
248
248
  };
249
- var J, he = {}, ne = l["react-stack-bottom-frame"].bind(
250
- l,
249
+ var J, he = {}, ne = f["react-stack-bottom-frame"].bind(
250
+ f,
251
251
  s
252
252
  )(), oe = re(n(s)), me = {};
253
- ae.Fragment = b, ae.jsx = function(d, S, R, C, V) {
253
+ ae.Fragment = S, ae.jsx = function(l, b, R, C, V) {
254
254
  var B = 1e4 > j.recentlyCreatedOwnerStacks++;
255
255
  return u(
256
- d,
257
- S,
256
+ l,
257
+ b,
258
258
  R,
259
259
  !1,
260
260
  C,
261
261
  V,
262
262
  B ? Error("react-stack-top-frame") : ne,
263
- B ? re(n(d)) : oe
263
+ B ? re(n(l)) : oe
264
264
  );
265
- }, ae.jsxs = function(d, S, R, C, V) {
265
+ }, ae.jsxs = function(l, b, R, C, V) {
266
266
  var B = 1e4 > j.recentlyCreatedOwnerStacks++;
267
267
  return u(
268
- d,
269
- S,
268
+ l,
269
+ b,
270
270
  R,
271
271
  !0,
272
272
  C,
273
273
  V,
274
274
  B ? Error("react-stack-top-frame") : ne,
275
- B ? re(n(d)) : oe
275
+ B ? re(n(l)) : oe
276
276
  );
277
277
  };
278
278
  }()), ae;
@@ -354,8 +354,8 @@ const Me = W(function t({ nodeId: e, context: r }) {
354
354
  const a = r.library.resolve(n);
355
355
  if (!a)
356
356
  return Wt.warn(`No renderer for node type ${n.type}`), null;
357
- const c = qt(n), f = c.length > 0 ? c.join(" ") : void 0, u = a;
358
- return /* @__PURE__ */ A.jsx(u, { nodeId: e, context: r, className: f });
357
+ const c = qt(n), d = c.length > 0 ? c.join(" ") : void 0, u = a;
358
+ return /* @__PURE__ */ A.jsx(u, { nodeId: e, context: r, className: d });
359
359
  }, Ht);
360
360
  function Xt(t, e) {
361
361
  return !Array.isArray(t) || t.length === 0 ? null : t.map((r) => /* @__PURE__ */ A.jsx(Me, { nodeId: r.id, context: e }, r.id));
@@ -364,41 +364,41 @@ function Zt(t, e) {
364
364
  return t.store === e.store && t.library === e.library && t.viewId === e.viewId && t.emptyFallback === e.emptyFallback;
365
365
  }
366
366
  const Qt = W(function({ store: e, library: r, viewId: n, emptyFallback: o = null, onAction: s, client: i, video: a }) {
367
- const { rootViewId: c, rootNodeId: f } = Yt(e, n), u = v(s);
367
+ const { rootViewId: c, rootNodeId: d } = Yt(e, n), u = v(s);
368
368
  u.current = s;
369
369
  const h = v(i);
370
370
  h.current = i;
371
- const l = v(a);
372
- l.current = a;
373
- const m = D((b, p) => {
374
- if (!b)
371
+ const f = v(a);
372
+ f.current = a;
373
+ const p = D((S, m) => {
374
+ if (!S)
375
375
  return;
376
- const g = zt(p);
377
- u.current?.(b, g);
376
+ const g = zt(m);
377
+ u.current?.(S, g);
378
378
  }, []), y = K(() => {
379
- const b = {
379
+ const S = {
380
380
  store: e,
381
381
  library: r,
382
382
  handlerCache: e.handlerCache,
383
383
  // Access payloads from store at call time, not captured snapshot
384
- getPayload: (p) => e.getSnapshot().payloads.get(p),
385
- renderChildren: (p) => Xt(p, b),
386
- renderView: (p) => {
387
- const g = e.getSnapshot().views.get(p);
388
- return g ? /* @__PURE__ */ A.jsx(Me, { nodeId: g.id, context: b }) : null;
384
+ getPayload: (m) => e.getSnapshot().payloads.get(m),
385
+ renderChildren: (m) => Xt(m, S),
386
+ renderView: (m) => {
387
+ const g = e.getSnapshot().views.get(m);
388
+ return g ? /* @__PURE__ */ A.jsx(Me, { nodeId: g.id, context: S }) : null;
389
389
  },
390
- dispatchAction: m,
390
+ dispatchAction: p,
391
391
  // Access client/video via refs to avoid context recreation
392
392
  get client() {
393
393
  return h.current;
394
394
  },
395
395
  get video() {
396
- return l.current;
396
+ return f.current;
397
397
  }
398
398
  };
399
- return b;
400
- }, [e, r, m]);
401
- return !c || !f ? o : /* @__PURE__ */ A.jsx("div", { "data-ikon-view-id": c, style: { display: "contents" }, children: /* @__PURE__ */ A.jsx(Me, { nodeId: f, context: y }) });
399
+ return S;
400
+ }, [e, r, p]);
401
+ return !c || !d ? o : /* @__PURE__ */ A.jsx("div", { "data-ikon-view-id": c, style: { display: "contents" }, children: /* @__PURE__ */ A.jsx(Me, { nodeId: d, context: y }) });
402
402
  }, Zt);
403
403
  class er {
404
404
  constructor(e, r) {
@@ -437,19 +437,19 @@ const yo = W(function({ stores: e, registry: r, category: n = je, onAction: o, c
437
437
  a.current = o;
438
438
  const c = v(s);
439
439
  c.current = s;
440
- const f = K(
440
+ const d = K(
441
441
  () => {
442
442
  const u = [];
443
- for (const [h, l] of e) {
444
- const m = l.store.getSnapshot();
445
- tr(l.category, n) && (!m.rootViewId || !m.views.has(m.rootViewId) || u.push({ key: h, store: l.store }));
443
+ for (const [h, f] of e) {
444
+ const p = f.store.getSnapshot();
445
+ tr(f.category, n) && (!p.rootViewId || !p.views.has(p.rootViewId) || u.push({ key: h, store: f.store }));
446
446
  }
447
447
  return u;
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: u, store: h }) => /* @__PURE__ */ A.jsx(Qt, { store: h, library: r, onAction: a.current, client: c.current, video: c.current?.media?.video }, u)) });
452
+ return d.length === 0 ? null : /* @__PURE__ */ A.jsx(A.Fragment, { children: d.map(({ key: u, store: h }) => /* @__PURE__ */ A.jsx(Qt, { store: h, library: r, onAction: a.current, client: c.current, video: c.current?.media?.video }, u)) });
453
453
  });
454
454
  class rr {
455
455
  core;
@@ -565,15 +565,15 @@ function Ve(t) {
565
565
  }
566
566
  function sr() {
567
567
  const t = W(function({ nodeId: r, context: n }) {
568
- const o = H(n.store, r), s = v(null), i = fe(o?.props?.targetViewId), a = o?.props?.focusOnly, c = typeof a == "boolean" ? a : void 0, f = fe(o?.props?.key), u = o?.props?.preciseGeneratedAt;
569
- return L(() => {
568
+ const o = H(n.store, r), s = v(null), i = fe(o?.props?.targetViewId), a = o?.props?.focusOnly, c = typeof a == "boolean" ? a : void 0, d = fe(o?.props?.key), u = o?.props?.preciseGeneratedAt;
569
+ return U(() => {
570
570
  if (typeof document > "u")
571
571
  return;
572
- const l = s.current;
573
- if (!l || i && l.closest("[data-ikon-view-id]")?.getAttribute("data-ikon-view-id") !== i)
572
+ const f = s.current;
573
+ if (!f || i && f.closest("[data-ikon-view-id]")?.getAttribute("data-ikon-view-id") !== i)
574
574
  return;
575
- const m = c !== !0;
576
- if (m) {
575
+ const p = c !== !0;
576
+ if (p) {
577
577
  const g = ((w) => {
578
578
  let k = w.parentElement;
579
579
  for (; k; ) {
@@ -583,26 +583,26 @@ function sr() {
583
583
  k = k.parentElement;
584
584
  }
585
585
  return null;
586
- })(l);
586
+ })(f);
587
587
  g ? requestAnimationFrame(() => {
588
- const w = g.getBoundingClientRect(), k = l.getBoundingClientRect(), O = g.scrollTop + (k.bottom - w.bottom) + 16;
588
+ const w = g.getBoundingClientRect(), k = f.getBoundingClientRect(), O = g.scrollTop + (k.bottom - w.bottom) + 16;
589
589
  "scrollBehavior" in document.documentElement.style ? g.scrollTo({ top: O, behavior: "smooth" }) : g.scrollTop = O;
590
- }) : typeof l.scrollIntoView == "function" && requestAnimationFrame(() => {
590
+ }) : typeof f.scrollIntoView == "function" && requestAnimationFrame(() => {
591
591
  try {
592
- l.scrollIntoView({ behavior: "smooth", block: "end", inline: "nearest" });
592
+ f.scrollIntoView({ behavior: "smooth", block: "end", inline: "nearest" });
593
593
  } catch {
594
- l.scrollIntoView(!1);
594
+ f.scrollIntoView(!1);
595
595
  }
596
596
  });
597
597
  }
598
598
  const y = document.activeElement;
599
- if (!(y instanceof HTMLInputElement || y instanceof HTMLTextAreaElement || y?.getAttribute("contenteditable") === "true") && typeof l.focus == "function")
599
+ if (!(y instanceof HTMLInputElement || y instanceof HTMLTextAreaElement || y?.getAttribute("contenteditable") === "true") && typeof f.focus == "function")
600
600
  try {
601
- l.focus({ preventScroll: !m });
601
+ f.focus({ preventScroll: !p });
602
602
  } catch {
603
- l.focus();
603
+ f.focus();
604
604
  }
605
- }, [c, i, f, u]), o ? /* @__PURE__ */ A.jsx(
605
+ }, [c, i, d, u]), o ? /* @__PURE__ */ A.jsx(
606
606
  "span",
607
607
  {
608
608
  ref: s,
@@ -628,13 +628,13 @@ function ir() {
628
628
  return null;
629
629
  const c = Ve(s.props);
630
630
  delete c.onInvokeId;
631
- const f = $e(fe(s.props?.className), o), u = s.children?.length ? n.renderChildren(s.children) : void 0;
631
+ const d = $e(fe(s.props?.className), o), u = s.children?.length ? n.renderChildren(s.children) : void 0;
632
632
  return /* @__PURE__ */ A.jsx(
633
633
  "div",
634
634
  {
635
635
  ...c,
636
636
  "data-ikon-node-id": s.id,
637
- className: f,
637
+ className: d,
638
638
  onClick: i ? a : void 0,
639
639
  style: i ? { cursor: "pointer" } : void 0,
640
640
  children: u
@@ -725,16 +725,16 @@ function gr() {
725
725
  const s = H(n.store, r);
726
726
  if (!s)
727
727
  return null;
728
- const i = mr(hr(s.props?.className), o), a = Qe(s.props?.src), c = Qe(s.props?.preload), f = ge(s.props?.controls), u = ge(s.props?.autoplay), h = ge(s.props?.loop), l = ge(s.props?.muted);
728
+ const i = mr(hr(s.props?.className), o), a = Qe(s.props?.src), c = Qe(s.props?.preload), d = ge(s.props?.controls), u = ge(s.props?.autoplay), h = ge(s.props?.loop), f = ge(s.props?.muted);
729
729
  return /* @__PURE__ */ A.jsx(
730
730
  "audio",
731
731
  {
732
732
  src: a,
733
733
  ...c !== void 0 ? { preload: c } : {},
734
- ...f !== void 0 ? { controls: f } : {},
734
+ ...d !== void 0 ? { controls: d } : {},
735
735
  ...u !== void 0 ? { autoPlay: u } : {},
736
736
  ...h !== void 0 ? { loop: h } : {},
737
- ...l !== void 0 ? { muted: l } : {},
737
+ ...f !== void 0 ? { muted: f } : {},
738
738
  "data-ikon-node-id": s.id,
739
739
  className: i
740
740
  }
@@ -761,7 +761,7 @@ function pt(...t) {
761
761
  r && r.trim() && e.push(r.trim());
762
762
  return e.length > 0 ? e.join(" ") : void 0;
763
763
  }
764
- function Se(t) {
764
+ function be(t) {
765
765
  if (typeof t == "number" && Number.isFinite(t))
766
766
  return Math.floor(t);
767
767
  if (typeof t == "string" && t.trim().length > 0) {
@@ -770,27 +770,27 @@ function Se(t) {
770
770
  return Math.floor(e);
771
771
  }
772
772
  }
773
- function Le(t) {
773
+ function Ue(t) {
774
774
  if (typeof t != "string")
775
775
  return;
776
776
  const e = t.trim();
777
777
  return e.length > 0 ? e : void 0;
778
778
  }
779
- const yr = "std.video-canvas", Sr = "std.video-url-player";
780
- function br() {
779
+ const yr = "std.video-canvas", br = "std.video-url-player";
780
+ function Sr() {
781
781
  const t = W(function({ nodeId: r, context: n, className: o }) {
782
- const s = H(n.store, r), i = v(null), a = v(null), c = n.video, f = n.client, u = s ? Le(s.props?.streamId) : void 0, h = s ? Se(s.props?.width) : void 0, l = s ? Se(s.props?.height) : void 0, m = s ? pt(mt(s.props?.className), o) : o, y = f?.isWebRtcEnabled && u ? f.getWebRtcVideoStreamByStreamId(u) : null;
783
- return L(() => {
784
- const b = i.current;
785
- if (!(!c || !b || !u || y))
786
- return c.attachCanvas(u, b), () => {
782
+ const s = H(n.store, r), i = v(null), a = v(null), c = n.video, d = n.client, u = s ? Ue(s.props?.streamId) : void 0, h = s ? be(s.props?.width) : void 0, f = s ? be(s.props?.height) : void 0, p = s ? pt(mt(s.props?.className), o) : o, y = d?.isWebRtcEnabled && u ? d.getWebRtcVideoStreamByStreamId(u) : null;
783
+ return U(() => {
784
+ const S = i.current;
785
+ if (!(!c || !S || !u || y))
786
+ return c.attachCanvas(u, S), () => {
787
787
  c.detachCanvas(u);
788
788
  };
789
- }, [c, u, y]), L(() => {
790
- const b = a.current;
791
- if (!(!b || !y))
792
- return b.srcObject = y, () => {
793
- b.srcObject = null;
789
+ }, [c, u, y]), U(() => {
790
+ const S = a.current;
791
+ if (!(!S || !y))
792
+ return S.srcObject = y, () => {
793
+ S.srcObject = null;
794
794
  };
795
795
  }, [y]), s ? y ? /* @__PURE__ */ A.jsx(
796
796
  "video",
@@ -801,9 +801,9 @@ function br() {
801
801
  muted: !0,
802
802
  "data-ikon-node-id": s.id,
803
803
  "data-ikon-video-stream-id": u,
804
- className: m,
804
+ className: p,
805
805
  ...h ? { width: h } : {},
806
- ...l ? { height: l } : {}
806
+ ...f ? { height: f } : {}
807
807
  },
808
808
  u
809
809
  ) : /* @__PURE__ */ A.jsx(
@@ -812,9 +812,9 @@ function br() {
812
812
  ref: i,
813
813
  "data-ikon-node-id": s.id,
814
814
  "data-ikon-video-stream-id": u,
815
- className: m,
815
+ className: p,
816
816
  ...h ? { width: h } : {},
817
- ...l ? { height: l } : {}
817
+ ...f ? { height: f } : {}
818
818
  },
819
819
  u
820
820
  ) : null;
@@ -825,7 +825,7 @@ function br() {
825
825
  };
826
826
  }
827
827
  function wr() {
828
- return [br(), vr(), gr()];
828
+ return [Sr(), vr(), gr()];
829
829
  }
830
830
  function ce(t) {
831
831
  if (typeof t == "boolean")
@@ -845,27 +845,27 @@ function vr() {
845
845
  const s = H(n.store, r);
846
846
  if (!s)
847
847
  return null;
848
- const i = pt(mt(s.props?.className), o), a = Le(s.props?.src), c = Le(s.props?.poster), f = ce(s.props?.controls), u = ce(s.props?.autoplay), h = ce(s.props?.loop), l = ce(s.props?.muted), m = ce(s.props?.playsInline), y = Se(s.props?.width), b = Se(s.props?.height), p = s.children?.length ? n.renderChildren(s.children) : void 0;
848
+ const i = pt(mt(s.props?.className), o), a = Ue(s.props?.src), c = Ue(s.props?.poster), d = ce(s.props?.controls), u = ce(s.props?.autoplay), h = ce(s.props?.loop), f = ce(s.props?.muted), p = ce(s.props?.playsInline), y = be(s.props?.width), S = be(s.props?.height), m = s.children?.length ? n.renderChildren(s.children) : void 0;
849
849
  return /* @__PURE__ */ A.jsx(
850
850
  "video",
851
851
  {
852
852
  src: a,
853
853
  poster: c,
854
- ...f !== void 0 ? { controls: f } : {},
854
+ ...d !== void 0 ? { controls: d } : {},
855
855
  ...u !== void 0 ? { autoPlay: u } : {},
856
856
  ...h !== void 0 ? { loop: h } : {},
857
- ...l !== void 0 ? { muted: l } : {},
858
- ...m !== void 0 ? { playsInline: m } : {},
857
+ ...f !== void 0 ? { muted: f } : {},
858
+ ...p !== void 0 ? { playsInline: p } : {},
859
859
  ...y ? { width: y } : {},
860
- ...b ? { height: b } : {},
860
+ ...S ? { height: S } : {},
861
861
  "data-ikon-node-id": s.id,
862
862
  className: i,
863
- children: p
863
+ children: m
864
864
  }
865
865
  );
866
866
  });
867
867
  return ({ type: e }) => {
868
- if (e === Sr)
868
+ if (e === br)
869
869
  return t;
870
870
  };
871
871
  }
@@ -1015,46 +1015,46 @@ class Ir {
1015
1015
  this.lastFrameTime = s, this.frameCount++, e.clearColor(0, 0, 0, 1), e.clear(e.COLOR_BUFFER_BIT), e.useProgram(this.program), e.bindVertexArray(this.vao);
1016
1016
  const c = this.uniformLocations.get("iResolution");
1017
1017
  c && e.uniform3f(c, n, o, 1);
1018
- const f = this.uniformLocations.get("iTime");
1019
- f && e.uniform1f(f, i);
1018
+ const d = this.uniformLocations.get("iTime");
1019
+ d && e.uniform1f(d, i);
1020
1020
  const u = this.uniformLocations.get("iTimeDelta");
1021
1021
  u && e.uniform1f(u, a);
1022
1022
  const h = this.uniformLocations.get("iFrame");
1023
1023
  h && e.uniform1i(h, this.frameCount);
1024
- const l = this.uniformLocations.get("iMouse");
1025
- l && e.uniform4f(l, this.mouseX, this.mouseY, this.mouseClickX, this.mouseClickY);
1026
- const m = this.uniformLocations.get("iDate");
1027
- if (m) {
1024
+ const f = this.uniformLocations.get("iMouse");
1025
+ f && e.uniform4f(f, this.mouseX, this.mouseY, this.mouseClickX, this.mouseClickY);
1026
+ const p = this.uniformLocations.get("iDate");
1027
+ if (p) {
1028
1028
  const y = /* @__PURE__ */ new Date();
1029
- e.uniform4f(m, y.getFullYear(), y.getMonth(), y.getDate(), y.getHours() * 3600 + y.getMinutes() * 60 + y.getSeconds() + y.getMilliseconds() / 1e3);
1029
+ e.uniform4f(p, y.getFullYear(), y.getMonth(), y.getDate(), y.getHours() * 3600 + y.getMinutes() * 60 + y.getSeconds() + y.getMilliseconds() / 1e3);
1030
1030
  }
1031
- for (const [y, b] of Object.entries(this.customUniforms)) {
1032
- const p = this.uniformLocations.get(y);
1033
- if (p)
1034
- switch (b.type) {
1031
+ for (const [y, S] of Object.entries(this.customUniforms)) {
1032
+ const m = this.uniformLocations.get(y);
1033
+ if (m)
1034
+ switch (S.type) {
1035
1035
  case "float":
1036
- e.uniform1f(p, b.value);
1036
+ e.uniform1f(m, S.value);
1037
1037
  break;
1038
1038
  case "vec2": {
1039
- const g = b.value;
1040
- e.uniform2f(p, g[0], g[1]);
1039
+ const g = S.value;
1040
+ e.uniform2f(m, g[0], g[1]);
1041
1041
  break;
1042
1042
  }
1043
1043
  case "vec3": {
1044
- const g = b.value;
1045
- e.uniform3f(p, g[0], g[1], g[2]);
1044
+ const g = S.value;
1045
+ e.uniform3f(m, g[0], g[1], g[2]);
1046
1046
  break;
1047
1047
  }
1048
1048
  case "vec4": {
1049
- const g = b.value;
1050
- e.uniform4f(p, g[0], g[1], g[2], g[3]);
1049
+ const g = S.value;
1050
+ e.uniform4f(m, g[0], g[1], g[2], g[3]);
1051
1051
  break;
1052
1052
  }
1053
1053
  case "int":
1054
- e.uniform1i(p, b.value);
1054
+ e.uniform1i(m, S.value);
1055
1055
  break;
1056
1056
  case "bool":
1057
- e.uniform1i(p, b.value ? 1 : 0);
1057
+ e.uniform1i(m, S.value ? 1 : 0);
1058
1058
  break;
1059
1059
  }
1060
1060
  }
@@ -1141,17 +1141,17 @@ function jr(t, e) {
1141
1141
  }
1142
1142
  return !0;
1143
1143
  }
1144
- const Lr = "std.shadertoy-canvas";
1145
- function Ur() {
1144
+ const Ur = "std.shadertoy-canvas";
1145
+ function Lr() {
1146
1146
  const t = W(function({ nodeId: r, context: n, className: o }) {
1147
- const s = H(n.store, r), i = v(null), a = v(null), c = v(null), f = v(0), u = v(""), h = v({}), l = v({
1147
+ const s = H(n.store, r), i = v(null), a = v(null), c = v(null), d = v(0), u = v(""), h = v({}), f = v({
1148
1148
  x: 0,
1149
1149
  y: 0,
1150
1150
  clickX: 0,
1151
1151
  clickY: 0,
1152
1152
  isDown: !1
1153
- }), m = s ? Nr(s.props?.shaderSource) : "", y = s ? ke(s.props?.fps) ?? 60 : 60, b = s?.props?.uniforms, p = K(() => Mr(b), [b]), g = s ? Pr(s.props?.enableMouse) ?? !0 : !0, w = s ? ke(s.props?.width) : void 0, k = s ? ke(s.props?.height) : void 0, O = s ? _r(Or(s.props?.className), o) : o;
1154
- L(() => {
1153
+ }), p = s ? Nr(s.props?.shaderSource) : "", y = s ? ke(s.props?.fps) ?? 60 : 60, S = s?.props?.uniforms, m = K(() => Mr(S), [S]), g = s ? Pr(s.props?.enableMouse) ?? !0 : !0, w = s ? ke(s.props?.width) : void 0, k = s ? ke(s.props?.height) : void 0, O = s ? _r(Or(s.props?.className), o) : o;
1154
+ U(() => {
1155
1155
  const T = i.current;
1156
1156
  if (T) {
1157
1157
  try {
@@ -1164,24 +1164,24 @@ function Ur() {
1164
1164
  a.current && (a.current.destroy(), a.current = null);
1165
1165
  };
1166
1166
  }
1167
- }, []), L(() => {
1167
+ }, []), U(() => {
1168
1168
  const T = a.current;
1169
- if (!(!T || !m) && u.current !== m)
1170
- if (T.compile(m, p))
1171
- u.current = m, h.current = p;
1169
+ if (!(!T || !p) && u.current !== p)
1170
+ if (T.compile(p, m))
1171
+ u.current = p, h.current = m;
1172
1172
  else {
1173
1173
  const F = T.getError();
1174
1174
  console.error("[ShadertoyRenderer] Shader compilation failed:", F);
1175
1175
  }
1176
- }, [m, p]), L(() => {
1176
+ }, [p, m]), U(() => {
1177
1177
  const T = a.current;
1178
- !T || !u.current || jr(h.current, p) || (T.setCustomUniforms(p), h.current = p);
1179
- }, [p]), L(() => {
1178
+ !T || !u.current || jr(h.current, m) || (T.setCustomUniforms(m), h.current = m);
1179
+ }, [m]), U(() => {
1180
1180
  const T = a.current;
1181
1181
  if (!T || !u.current) return;
1182
1182
  const _ = 1e3 / y, F = (j) => {
1183
- const U = j - f.current;
1184
- U >= _ && (f.current = j - U % _, T.draw()), c.current = requestAnimationFrame(F);
1183
+ const L = j - d.current;
1184
+ L >= _ && (d.current = j - L % _, T.draw()), c.current = requestAnimationFrame(F);
1185
1185
  };
1186
1186
  return c.current = requestAnimationFrame(F), () => {
1187
1187
  c.current !== null && (cancelAnimationFrame(c.current), c.current = null);
@@ -1192,8 +1192,8 @@ function Ur() {
1192
1192
  if (!g) return;
1193
1193
  const _ = i.current, F = a.current;
1194
1194
  if (!_ || !F) return;
1195
- const j = _.getBoundingClientRect(), U = T.clientX - j.left, Y = j.height - (T.clientY - j.top);
1196
- l.current.x = U, l.current.y = Y, F.setMouse(U, Y, l.current.clickX, l.current.clickY);
1195
+ const j = _.getBoundingClientRect(), L = T.clientX - j.left, Y = j.height - (T.clientY - j.top);
1196
+ f.current.x = L, f.current.y = Y, F.setMouse(L, Y, f.current.clickX, f.current.clickY);
1197
1197
  },
1198
1198
  [g]
1199
1199
  ), z = D(
@@ -1201,12 +1201,12 @@ function Ur() {
1201
1201
  if (!g) return;
1202
1202
  const _ = i.current, F = a.current;
1203
1203
  if (!_ || !F) return;
1204
- const j = _.getBoundingClientRect(), U = T.clientX - j.left, Y = j.height - (T.clientY - j.top);
1205
- l.current.isDown = !0, l.current.clickX = U, l.current.clickY = Y, F.setMouse(U, Y, U, Y);
1204
+ const j = _.getBoundingClientRect(), L = T.clientX - j.left, Y = j.height - (T.clientY - j.top);
1205
+ f.current.isDown = !0, f.current.clickX = L, f.current.clickY = Y, F.setMouse(L, Y, L, Y);
1206
1206
  },
1207
1207
  [g]
1208
1208
  ), Q = D(() => {
1209
- g && (l.current.isDown = !1, l.current.clickX = -Math.abs(l.current.clickX));
1209
+ g && (f.current.isDown = !1, f.current.clickX = -Math.abs(f.current.clickX));
1210
1210
  }, [g]);
1211
1211
  return s ? /* @__PURE__ */ A.jsx(
1212
1212
  "canvas",
@@ -1224,11 +1224,11 @@ function Ur() {
1224
1224
  ) : null;
1225
1225
  });
1226
1226
  return ({ type: e }) => {
1227
- if (e === Lr)
1227
+ if (e === Ur)
1228
1228
  return t;
1229
1229
  };
1230
1230
  }
1231
- const xr = "shadertoy", Dr = async () => Ur();
1231
+ const xr = "shadertoy", Dr = async () => Lr();
1232
1232
  function Fr(t) {
1233
1233
  t.registerModule(xr, Dr);
1234
1234
  }
@@ -1346,41 +1346,41 @@ function nt(t) {
1346
1346
  }
1347
1347
  function ot(t, e, r, n) {
1348
1348
  const u = new Float32Array(11);
1349
- function h(p, g, w) {
1350
- return ((3 * g - 3 * w + 1) * p + (3 * w - 6 * g)) * p * p + 3 * g * p;
1349
+ function h(m, g, w) {
1350
+ return ((3 * g - 3 * w + 1) * m + (3 * w - 6 * g)) * m * m + 3 * g * m;
1351
1351
  }
1352
- function l(p, g, w) {
1353
- return 3 * (3 * g - 3 * w + 1) * p * p + 2 * (3 * w - 6 * g) * p + 3 * g;
1352
+ function f(m, g, w) {
1353
+ return 3 * (3 * g - 3 * w + 1) * m * m + 2 * (3 * w - 6 * g) * m + 3 * g;
1354
1354
  }
1355
- function m(p, g) {
1355
+ function p(m, g) {
1356
1356
  for (let w = 0; w < 4; w += 1) {
1357
- const k = l(g, t, r);
1357
+ const k = f(g, t, r);
1358
1358
  if (k === 0)
1359
1359
  return g;
1360
- const O = h(g, t, r) - p;
1360
+ const O = h(g, t, r) - m;
1361
1361
  g -= O / k;
1362
1362
  }
1363
1363
  return g;
1364
1364
  }
1365
- function y(p, g, w) {
1365
+ function y(m, g, w) {
1366
1366
  let k = 0, O = 0, M = 0;
1367
1367
  do
1368
- O = g + (w - g) / 2, k = h(O, t, r) - p, k > 0 ? w = O : g = O;
1368
+ O = g + (w - g) / 2, k = h(O, t, r) - m, k > 0 ? w = O : g = O;
1369
1369
  while (Math.abs(k) > 1e-7 && ++M < 10);
1370
1370
  return O;
1371
1371
  }
1372
- function b(p) {
1372
+ function S(m) {
1373
1373
  let g = 0, w = 1;
1374
1374
  const k = 10;
1375
- for (; w !== k && u[w] <= p; w += 1)
1375
+ for (; w !== k && u[w] <= m; w += 1)
1376
1376
  g += 0.1;
1377
1377
  w -= 1;
1378
- const O = (p - u[w]) / (u[w + 1] - u[w]), M = g + O * 0.1, z = l(M, t, r);
1379
- return z >= 1e-3 ? m(p, M) : z === 0 ? M : y(p, g, g + 0.1);
1378
+ const O = (m - u[w]) / (u[w + 1] - u[w]), M = g + O * 0.1, z = f(M, t, r);
1379
+ return z >= 1e-3 ? p(m, M) : z === 0 ? M : y(m, g, g + 0.1);
1380
1380
  }
1381
- for (let p = 0; p < 11; p += 1)
1382
- u[p] = h(p * 0.1, t, r);
1383
- return (p) => p <= 0 ? 0 : p >= 1 ? 1 : h(b(p), e, n);
1381
+ for (let m = 0; m < 11; m += 1)
1382
+ u[m] = h(m * 0.1, t, r);
1383
+ return (m) => m <= 0 ? 0 : m >= 1 ? 1 : h(S(m), e, n);
1384
1384
  }
1385
1385
  function Wr(t) {
1386
1386
  const e = /steps\(\s*([0-9]+)\s*(?:,\s*([a-z-]+)\s*)?\)/i.exec(t);
@@ -1403,7 +1403,7 @@ function zr(t) {
1403
1403
  const n = e.slice(13, -1).split(",").map((o) => Number.parseFloat(o.trim()));
1404
1404
  if (n.length === 4 && n.every((o) => Number.isFinite(o))) {
1405
1405
  const [o, s, i, a] = n, c = ot(o, s, i, a);
1406
- return (f) => $(c($(f)));
1406
+ return (d) => $(c($(d)));
1407
1407
  }
1408
1408
  }
1409
1409
  if (e.startsWith("steps(") && e.endsWith(")")) {
@@ -1467,7 +1467,7 @@ class Gr {
1467
1467
  const r = e.source?.trim();
1468
1468
  if (!r)
1469
1469
  return;
1470
- const n = rt(e.min) ?? 0, o = rt(e.max), s = o === void 0 ? n + 100 : o, i = (e.clamp ?? "clamp").trim().toLowerCase(), a = !!e.reverse, c = zr(e.ease), f = qr(e.map), u = e.targetId?.trim() || void 0;
1470
+ const n = rt(e.min) ?? 0, o = rt(e.max), s = o === void 0 ? n + 100 : o, i = (e.clamp ?? "clamp").trim().toLowerCase(), a = !!e.reverse, c = zr(e.ease), d = qr(e.map), u = e.targetId?.trim() || void 0;
1471
1471
  return Number.isNaN(n) || Number.isNaN(s) ? void 0 : {
1472
1472
  source: r.toLowerCase(),
1473
1473
  min: n,
@@ -1475,7 +1475,7 @@ class Gr {
1475
1475
  clamp: i === "freeze-start" || i === "freeze-end" || i === "unclamped" ? i : "clamp",
1476
1476
  reverse: a,
1477
1477
  ease: c,
1478
- map: f,
1478
+ map: d,
1479
1479
  targetId: u
1480
1480
  };
1481
1481
  }
@@ -1575,9 +1575,9 @@ class Gr {
1575
1575
  const o = r.max - r.min, s = o === 0 ? n > r.min ? 1 : 0 : (n - r.min) / o;
1576
1576
  let i = this.applyClamp(s, r.clamp);
1577
1577
  r.reverse && (i = 1 - i);
1578
- const a = r.ease(i), c = Number.isFinite(a) ? a : 0, f = c * 100;
1579
- if (e.style.setProperty("--tw-motion-bind-source-value", `${n}`), e.style.setProperty("--tw-motion-bind-progress-ratio", `${c}`), e.style.setProperty("--tw-motion-bind-progress", `${f}`), r.map) {
1580
- const u = this.applyMap(f, r.map);
1578
+ const a = r.ease(i), c = Number.isFinite(a) ? a : 0, d = c * 100;
1579
+ if (e.style.setProperty("--tw-motion-bind-source-value", `${n}`), e.style.setProperty("--tw-motion-bind-progress-ratio", `${c}`), e.style.setProperty("--tw-motion-bind-progress", `${d}`), r.map) {
1580
+ const u = this.applyMap(d, r.map);
1581
1581
  u !== void 0 && e.style.setProperty("--tw-motion-bind-value", `${u}`);
1582
1582
  } else
1583
1583
  e.style.removeProperty("--tw-motion-bind-value");
@@ -1704,7 +1704,7 @@ function Hr(t) {
1704
1704
  }
1705
1705
  Ce.reset();
1706
1706
  }, []);
1707
- return L(() => {
1707
+ return U(() => {
1708
1708
  if (!t) return;
1709
1709
  for (const a of t.getUiStyles())
1710
1710
  r(a);
@@ -1712,7 +1712,7 @@ function Hr(t) {
1712
1712
  return () => {
1713
1713
  s?.(), i?.(), o();
1714
1714
  };
1715
- }, [t, o, r, n]), L(() => () => o(), [o]), { setStyle: r, deleteStyles: n, reset: o };
1715
+ }, [t, o, r, n]), U(() => () => o(), [o]), { setStyle: r, deleteStyles: n, reset: o };
1716
1716
  }
1717
1717
  function Jr(t) {
1718
1718
  const e = [];
@@ -1724,7 +1724,7 @@ function Jr(t) {
1724
1724
  }
1725
1725
  function Xr(t) {
1726
1726
  const [e, r] = G(), n = v("");
1727
- return L(() => {
1727
+ return U(() => {
1728
1728
  if (!t) {
1729
1729
  r(void 0), n.current = "";
1730
1730
  return;
@@ -1736,7 +1736,7 @@ function Xr(t) {
1736
1736
  return o(), t.subscribe(o);
1737
1737
  }, [t]), e;
1738
1738
  }
1739
- var Zr = typeof global == "object" && global && global.Object === Object && global, Qr = typeof self == "object" && self && self.Object === Object && self, en = Zr || Qr || Function("return this")(), be = en.Symbol, gt = Object.prototype, tn = gt.hasOwnProperty, rn = gt.toString, ue = be ? be.toStringTag : void 0;
1739
+ var Zr = typeof global == "object" && global && global.Object === Object && global, Qr = typeof self == "object" && self && self.Object === Object && self, en = Zr || Qr || Function("return this")(), Se = en.Symbol, gt = Object.prototype, tn = gt.hasOwnProperty, rn = gt.toString, ue = Se ? Se.toStringTag : void 0;
1740
1740
  function nn(t) {
1741
1741
  var e = tn.call(t, ue), r = t[ue];
1742
1742
  try {
@@ -1751,7 +1751,7 @@ var on = Object.prototype, sn = on.toString;
1751
1751
  function an(t) {
1752
1752
  return sn.call(t);
1753
1753
  }
1754
- var cn = "[object Null]", un = "[object Undefined]", st = be ? be.toStringTag : void 0;
1754
+ var cn = "[object Null]", un = "[object Undefined]", st = Se ? Se.toStringTag : void 0;
1755
1755
  function ln(t) {
1756
1756
  return t == null ? t === void 0 ? un : cn : st && st in Object(t) ? nn(t) : an(t);
1757
1757
  }
@@ -1763,7 +1763,7 @@ function mn(t) {
1763
1763
  return typeof t == "string" || !fn(t) && dn(t) && ln(t) == hn;
1764
1764
  }
1765
1765
  const it = "ikonUiModules";
1766
- function Ue(t) {
1766
+ function Le(t) {
1767
1767
  return typeof t == "object" && t !== null && !Array.isArray(t);
1768
1768
  }
1769
1769
  function pn(t) {
@@ -1777,7 +1777,7 @@ function pn(t) {
1777
1777
  }
1778
1778
  return Array.from(e);
1779
1779
  }
1780
- function So(t, e) {
1780
+ function bo(t, e) {
1781
1781
  if (t === e)
1782
1782
  return !0;
1783
1783
  if (!t || !e)
@@ -1790,10 +1790,10 @@ function So(t, e) {
1790
1790
  return !0;
1791
1791
  }
1792
1792
  function gn(t) {
1793
- if (!(!Ue(t) || !Object.prototype.hasOwnProperty.call(t, it)))
1793
+ if (!(!Le(t) || !Object.prototype.hasOwnProperty.call(t, it)))
1794
1794
  return pn(t[it]);
1795
1795
  }
1796
- function bo(...t) {
1796
+ function So(...t) {
1797
1797
  for (const e of t) {
1798
1798
  const r = gn(e);
1799
1799
  if (r !== void 0)
@@ -1801,7 +1801,7 @@ function bo(...t) {
1801
1801
  }
1802
1802
  }
1803
1803
  function wo(t) {
1804
- if (!Ue(t))
1804
+ if (!Le(t))
1805
1805
  return;
1806
1806
  const e = t, r = Object.keys(e).find((c) => c.toLowerCase() === "modules");
1807
1807
  if (!r)
@@ -1814,31 +1814,31 @@ function wo(t) {
1814
1814
  const o = [], s = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Set();
1815
1815
  for (const c of n) {
1816
1816
  if (typeof c == "string") {
1817
- const b = c.trim();
1818
- if (!b || i.has(b))
1817
+ const S = c.trim();
1818
+ if (!S || i.has(S))
1819
1819
  continue;
1820
- o.push(b), i.add(b);
1820
+ o.push(S), i.add(S);
1821
1821
  continue;
1822
1822
  }
1823
- if (!Ue(c))
1823
+ if (!Le(c))
1824
1824
  continue;
1825
- const f = c, u = Object.keys(f).find((b) => b.toLowerCase() === "name");
1825
+ const d = c, u = Object.keys(d).find((S) => S.toLowerCase() === "name");
1826
1826
  if (!u)
1827
1827
  continue;
1828
- const h = f[u];
1828
+ const h = d[u];
1829
1829
  if (typeof h != "string")
1830
1830
  continue;
1831
- const l = h.trim();
1832
- if (!l)
1831
+ const f = h.trim();
1832
+ if (!f)
1833
1833
  continue;
1834
- const m = Object.keys(f).find((b) => b.toLowerCase() === "javascript"), y = m ? f[m] : void 0;
1835
- typeof y == "string" && s.set(l, y), i.has(l) || (o.push(l), i.add(l));
1834
+ const p = Object.keys(d).find((S) => S.toLowerCase() === "javascript"), y = p ? d[p] : void 0;
1835
+ typeof y == "string" && s.set(f, y), i.has(f) || (o.push(f), i.add(f));
1836
1836
  }
1837
1837
  if (!o.length && s.size === 0)
1838
1838
  return { modules: [] };
1839
- const a = Array.from(s.entries()).map(([c, f]) => ({
1839
+ const a = Array.from(s.entries()).map(([c, d]) => ({
1840
1840
  name: c,
1841
- javascript: f
1841
+ javascript: d
1842
1842
  }));
1843
1843
  return a.length > 0 ? { modules: o, inlineModules: a } : { modules: o };
1844
1844
  }
@@ -1898,11 +1898,11 @@ const E = {
1898
1898
  "[data-emoji]"
1899
1899
  ]
1900
1900
  }
1901
- ], xe = E.Letter | E.Word | E.Line | E.Paragraph | E.Emoji, Sn = E.Letter | E.Word | E.Line | E.Paragraph, at = /* @__PURE__ */ new Map(), bn = 16384;
1901
+ ], xe = E.Letter | E.Word | E.Line | E.Paragraph | E.Emoji, bn = E.Letter | E.Word | E.Line | E.Paragraph, at = /* @__PURE__ */ new Map(), Sn = 16384;
1902
1902
  function vo(t, e) {
1903
- if (!t || t.length > bn)
1903
+ if (!t || t.length > Sn)
1904
1904
  return t;
1905
- const r = Un(e), n = te(r, E.Emoji), o = r & Sn;
1905
+ const r = Ln(e), n = te(r, E.Emoji), o = r & bn;
1906
1906
  if (o === E.None && !n)
1907
1907
  return t;
1908
1908
  const s = t.replace(/\r\n/g, `
@@ -1913,12 +1913,12 @@ function vo(t, e) {
1913
1913
  const i = jn(s);
1914
1914
  if (i.length === 0)
1915
1915
  return n ? dt(s) : t;
1916
- const a = Ln(i), c = { letter: 0, word: 0, line: 0, paragraph: 0, br: 0, emoji: 0 }, f = [];
1916
+ const a = Un(i), c = { letter: 0, word: 0, line: 0, paragraph: 0, br: 0, emoji: 0 }, d = [];
1917
1917
  for (const u of a) {
1918
1918
  const h = wn(u, r, c);
1919
- f.push(...h);
1919
+ d.push(...h);
1920
1920
  }
1921
- return f;
1921
+ return d;
1922
1922
  }
1923
1923
  function wn(t, e, r) {
1924
1924
  const n = [];
@@ -1990,22 +1990,22 @@ function An(t, e, r) {
1990
1990
  const a = De(t);
1991
1991
  if (a.length === 0)
1992
1992
  return [t];
1993
- const { nodes: c } = St(a, r);
1993
+ const { nodes: c } = bt(a, r);
1994
1994
  return c;
1995
1995
  }
1996
1996
  const s = [], i = De(t);
1997
1997
  for (const a of i) {
1998
- const c = r.letter++, f = `motion-letter-${c}`, u = Ee(c);
1998
+ const c = r.letter++, d = `motion-letter-${c}`, u = Ee(c);
1999
1999
  if (a === `
2000
2000
  `) {
2001
2001
  s.push(
2002
- /* @__PURE__ */ A.jsx("span", { "data-motion-letter": !0, style: u, children: /* @__PURE__ */ A.jsx("br", {}) }, f)
2002
+ /* @__PURE__ */ A.jsx("span", { "data-motion-letter": !0, style: u, children: /* @__PURE__ */ A.jsx("br", {}) }, d)
2003
2003
  );
2004
2004
  continue;
2005
2005
  }
2006
- const l = o && yt(a) ? { "data-motion-emoji": !0 } : void 0, m = a === " " ? " " : a;
2006
+ const f = o && yt(a) ? { "data-motion-emoji": !0 } : void 0, p = a === " " ? " " : a;
2007
2007
  s.push(
2008
- /* @__PURE__ */ A.jsx("span", { "data-motion-letter": !0, style: u, ...l, children: m }, f)
2008
+ /* @__PURE__ */ A.jsx("span", { "data-motion-letter": !0, style: u, ...f, children: p }, d)
2009
2009
  );
2010
2010
  }
2011
2011
  return s;
@@ -2098,7 +2098,7 @@ function jn(t) {
2098
2098
  }
2099
2099
  return (n > 0 || r.length > 0) && e.push({ text: r, breaks: n }), e;
2100
2100
  }
2101
- function Ln(t) {
2101
+ function Un(t) {
2102
2102
  if (t.length === 0)
2103
2103
  return [];
2104
2104
  const e = [];
@@ -2133,10 +2133,10 @@ function dt(t) {
2133
2133
  const e = De(t);
2134
2134
  if (e.length === 0)
2135
2135
  return t;
2136
- const { nodes: r, sawEmoji: n } = St(e);
2136
+ const { nodes: r, sawEmoji: n } = bt(e);
2137
2137
  return n ? r.length === 1 ? r[0] ?? t : r : t;
2138
2138
  }
2139
- function St(t, e) {
2139
+ function bt(t, e) {
2140
2140
  const r = [];
2141
2141
  let n = "", o = !1, s = e?.emoji ?? 0;
2142
2142
  const i = () => {
@@ -2145,9 +2145,9 @@ function St(t, e) {
2145
2145
  for (const a of t) {
2146
2146
  if (yt(a)) {
2147
2147
  o = !0, i();
2148
- const f = `motion-emoji-${e ? e.emoji++ : s++}`;
2148
+ const d = `motion-emoji-${e ? e.emoji++ : s++}`;
2149
2149
  r.push(
2150
- /* @__PURE__ */ A.jsx("span", { "data-motion-emoji": !0, children: a }, f)
2150
+ /* @__PURE__ */ A.jsx("span", { "data-motion-emoji": !0, children: a }, d)
2151
2151
  );
2152
2152
  continue;
2153
2153
  }
@@ -2155,7 +2155,7 @@ function St(t, e) {
2155
2155
  }
2156
2156
  return i(), o ? { nodes: r, sawEmoji: !0 } : { nodes: [t.join("")], sawEmoji: !1 };
2157
2157
  }
2158
- function Un(t) {
2158
+ function Ln(t) {
2159
2159
  if (!t)
2160
2160
  return E.None;
2161
2161
  const e = t.trim();
@@ -2174,20 +2174,20 @@ function Un(t) {
2174
2174
  );
2175
2175
  let i = E.None, a = !1;
2176
2176
  for (const c of Array.from(document.styleSheets)) {
2177
- let f;
2177
+ let d;
2178
2178
  try {
2179
- f = c.cssRules;
2179
+ d = c.cssRules;
2180
2180
  } catch {
2181
2181
  continue;
2182
2182
  }
2183
- const u = bt(f, s);
2183
+ const u = St(d, s);
2184
2184
  if (u.mask && (i |= u.mask, i === xe))
2185
2185
  break;
2186
2186
  a ||= u.sawStyleRule;
2187
2187
  }
2188
2188
  return (i !== E.None || a) && at.set(e, i), i;
2189
2189
  }
2190
- function bt(t, e) {
2190
+ function St(t, e) {
2191
2191
  if (!t)
2192
2192
  return { mask: E.None, sawStyleRule: !1 };
2193
2193
  let r = E.None, n = !1;
@@ -2196,14 +2196,14 @@ function bt(t, e) {
2196
2196
  if (s) {
2197
2197
  if (s.type === CSSRule.STYLE_RULE) {
2198
2198
  const a = s.selectorText ?? "";
2199
- if (!a || !e.some((f) => f.test(a))) continue;
2199
+ if (!a || !e.some((d) => d.test(a))) continue;
2200
2200
  n = !0;
2201
- for (const f of yn)
2202
- f.hints.some((u) => a.includes(u)) && (r |= f.flag);
2201
+ for (const d of yn)
2202
+ d.hints.some((u) => a.includes(u)) && (r |= d.flag);
2203
2203
  if (r === xe)
2204
2204
  return { mask: r, sawStyleRule: !0 };
2205
2205
  } else if ("cssRules" in s) {
2206
- const i = bt(s.cssRules, e);
2206
+ const i = St(s.cssRules, e);
2207
2207
  if (i.mask && (r |= i.mask, r === xe))
2208
2208
  return { mask: r, sawStyleRule: !0 };
2209
2209
  n ||= i.sawStyleRule;
@@ -2551,7 +2551,7 @@ async function Qn(t) {
2551
2551
  }
2552
2552
  if (!s)
2553
2553
  throw new Error("Registration was not completed");
2554
- const { id: i, rawId: a, response: c, type: f } = s;
2554
+ const { id: i, rawId: a, response: c, type: d } = s;
2555
2555
  let u;
2556
2556
  typeof c.getTransports == "function" && (u = c.getTransports());
2557
2557
  let h;
@@ -2561,18 +2561,18 @@ async function Qn(t) {
2561
2561
  } catch (y) {
2562
2562
  _e("getPublicKeyAlgorithm()", y);
2563
2563
  }
2564
- let l;
2564
+ let f;
2565
2565
  if (typeof c.getPublicKey == "function")
2566
2566
  try {
2567
2567
  const y = c.getPublicKey();
2568
- y !== null && (l = q(y));
2568
+ y !== null && (f = q(y));
2569
2569
  } catch (y) {
2570
2570
  _e("getPublicKey()", y);
2571
2571
  }
2572
- let m;
2572
+ let p;
2573
2573
  if (typeof c.getAuthenticatorData == "function")
2574
2574
  try {
2575
- m = q(c.getAuthenticatorData());
2575
+ p = q(c.getAuthenticatorData());
2576
2576
  } catch (y) {
2577
2577
  _e("getAuthenticatorData()", y);
2578
2578
  }
@@ -2584,10 +2584,10 @@ async function Qn(t) {
2584
2584
  clientDataJSON: q(c.clientDataJSON),
2585
2585
  transports: u,
2586
2586
  publicKeyAlgorithm: h,
2587
- publicKey: l,
2588
- authenticatorData: m
2587
+ publicKey: f,
2588
+ authenticatorData: p
2589
2589
  },
2590
- type: f,
2590
+ type: d,
2591
2591
  clientExtensionResults: s.getClientExtensionResults(),
2592
2592
  authenticatorAttachment: kt(s.authenticatorAttachment)
2593
2593
  };
@@ -2669,21 +2669,21 @@ async function ro(t) {
2669
2669
  let a;
2670
2670
  try {
2671
2671
  a = await navigator.credentials.get(i);
2672
- } catch (m) {
2673
- throw to({ error: m, options: i });
2672
+ } catch (p) {
2673
+ throw to({ error: p, options: i });
2674
2674
  }
2675
2675
  if (!a)
2676
2676
  throw new Error("Authentication was not completed");
2677
- const { id: c, rawId: f, response: u, type: h } = a;
2678
- let l;
2679
- return u.userHandle && (l = q(u.userHandle)), {
2677
+ const { id: c, rawId: d, response: u, type: h } = a;
2678
+ let f;
2679
+ return u.userHandle && (f = q(u.userHandle)), {
2680
2680
  id: c,
2681
- rawId: q(f),
2681
+ rawId: q(d),
2682
2682
  response: {
2683
2683
  authenticatorData: q(u.authenticatorData),
2684
2684
  clientDataJSON: q(u.clientDataJSON),
2685
2685
  signature: q(u.signature),
2686
- userHandle: l
2686
+ userHandle: f
2687
2687
  },
2688
2688
  type: h,
2689
2689
  clientExtensionResults: a.getClientExtensionResults(),
@@ -2698,7 +2698,7 @@ function Eo({ children: t, config: e }) {
2698
2698
  user: null,
2699
2699
  error: null
2700
2700
  });
2701
- L(() => {
2701
+ U(() => {
2702
2702
  (() => {
2703
2703
  const u = Kn();
2704
2704
  if (u) {
@@ -2712,25 +2712,25 @@ function Eo({ children: t, config: e }) {
2712
2712
  }
2713
2713
  const h = Vn();
2714
2714
  if (h) {
2715
- const m = {
2715
+ const p = {
2716
2716
  token: h.token,
2717
2717
  provider: h.provider,
2718
2718
  authenticatedAt: Date.now()
2719
2719
  };
2720
- Ae(m), ft(), n({
2720
+ Ae(p), ft(), n({
2721
2721
  isAuthenticated: !0,
2722
2722
  isLoading: !1,
2723
- user: de(m),
2723
+ user: de(p),
2724
2724
  error: null
2725
2725
  });
2726
2726
  return;
2727
2727
  }
2728
- const l = wt();
2729
- if (l) {
2728
+ const f = wt();
2729
+ if (f) {
2730
2730
  n({
2731
2731
  isAuthenticated: !0,
2732
2732
  isLoading: !1,
2733
- user: de(l),
2733
+ user: de(f),
2734
2734
  error: null
2735
2735
  });
2736
2736
  return;
@@ -2744,55 +2744,54 @@ function Eo({ children: t, config: e }) {
2744
2744
  })();
2745
2745
  }, []);
2746
2746
  const o = D(
2747
- async (f) => {
2747
+ async (d) => {
2748
2748
  if (!e.spaceId) {
2749
- n((l) => ({
2750
- ...l,
2749
+ n((h) => ({
2750
+ ...h,
2751
2751
  error: "Space ID is not configured"
2752
2752
  }));
2753
2753
  return;
2754
2754
  }
2755
- const u = e.authUrl ?? Pe();
2756
- if (f === "guest") {
2757
- n((l) => ({ ...l, isLoading: !0 }));
2755
+ const u = Pe(e.authUrl);
2756
+ if (d === "guest") {
2757
+ n((h) => ({ ...h, isLoading: !0 }));
2758
2758
  try {
2759
- const l = await vt(e.spaceId, u);
2759
+ const h = await vt(e.spaceId, u);
2760
2760
  n({
2761
2761
  isAuthenticated: !0,
2762
2762
  isLoading: !1,
2763
- user: de(l),
2763
+ user: de(h),
2764
2764
  error: null
2765
2765
  });
2766
- } catch (l) {
2767
- n((m) => ({
2768
- ...m,
2766
+ } catch (h) {
2767
+ n((f) => ({
2768
+ ...f,
2769
2769
  isLoading: !1,
2770
- error: l instanceof Error ? l.message : "Guest login failed"
2770
+ error: h instanceof Error ? h.message : "Guest login failed"
2771
2771
  }));
2772
2772
  }
2773
2773
  return;
2774
2774
  }
2775
- if (f === "passkey") {
2776
- n((l) => ({ ...l, isLoading: !0, error: null }));
2775
+ if (d === "passkey") {
2776
+ n((h) => ({ ...h, isLoading: !0, error: null }));
2777
2777
  try {
2778
- const l = await qn(u), m = await ro({ optionsJSON: l }), y = await Gn(u, m);
2778
+ const h = await qn(u), f = await ro({ optionsJSON: h }), p = await Gn(u, f);
2779
2779
  n({
2780
2780
  isAuthenticated: !0,
2781
2781
  isLoading: !1,
2782
- user: de(y),
2782
+ user: de(p),
2783
2783
  error: null
2784
2784
  });
2785
- } catch (l) {
2786
- n((m) => ({
2787
- ...m,
2785
+ } catch (h) {
2786
+ n((f) => ({
2787
+ ...f,
2788
2788
  isLoading: !1,
2789
- error: l instanceof Error ? l.message : "Passkey login failed"
2789
+ error: h instanceof Error ? h.message : "Passkey login failed"
2790
2790
  }));
2791
2791
  }
2792
2792
  return;
2793
2793
  }
2794
- const h = Yn(f, e.spaceId, u);
2795
- window.location.href = h;
2794
+ window.location.href = Yn(d, e.spaceId, u);
2796
2795
  },
2797
2796
  [e.authUrl, e.spaceId]
2798
2797
  ), s = D(() => {
@@ -2803,20 +2802,20 @@ function Eo({ children: t, config: e }) {
2803
2802
  error: null
2804
2803
  });
2805
2804
  }, []), i = D(
2806
- async (f) => {
2807
- const u = e.authUrl ?? Pe();
2805
+ async (d) => {
2806
+ const u = Pe(e.authUrl);
2808
2807
  n((h) => ({ ...h, isLoading: !0, error: null }));
2809
2808
  try {
2810
- const h = await Wn(u), l = await Qn({ optionsJSON: h }), m = await zn(u, l, f);
2809
+ const h = await Wn(u), f = await Qn({ optionsJSON: h }), p = await zn(u, f, d);
2811
2810
  n({
2812
2811
  isAuthenticated: !0,
2813
2812
  isLoading: !1,
2814
- user: de(m),
2813
+ user: de(p),
2815
2814
  error: null
2816
2815
  });
2817
2816
  } catch (h) {
2818
- n((l) => ({
2819
- ...l,
2817
+ n((f) => ({
2818
+ ...f,
2820
2819
  isLoading: !1,
2821
2820
  error: h instanceof Error ? h.message : "Passkey registration failed"
2822
2821
  }));
@@ -2846,14 +2845,14 @@ function oo() {
2846
2845
  }
2847
2846
  function Ao(t) {
2848
2847
  const { config: e, guestUrlParam: r } = t, { state: n, login: o } = no(), s = v(!1);
2849
- return L(() => {
2848
+ return U(() => {
2850
2849
  if (!r || n.isAuthenticated || n.isLoading || s.current || !e.methods.includes("guest"))
2851
2850
  return;
2852
2851
  const i = new URLSearchParams(window.location.search), a = i.get(r);
2853
2852
  if (a === "true" || a === "1" || a === "") {
2854
2853
  i.delete(r);
2855
- const c = i.toString(), f = window.location.pathname + (c ? `?${c}` : "");
2856
- window.history.replaceState({}, "", f), s.current = !0, o("guest");
2854
+ const c = i.toString(), d = window.location.pathname + (c ? `?${c}` : "");
2855
+ window.history.replaceState({}, "", d), s.current = !0, o("guest");
2857
2856
  }
2858
2857
  }, [r, n.isAuthenticated, n.isLoading, e.methods, o]), {
2859
2858
  shouldRenderChildren: n.isAuthenticated,
@@ -2872,10 +2871,10 @@ function ko({
2872
2871
  onAction: i,
2873
2872
  renderIdle: a,
2874
2873
  renderConnecting: c,
2875
- renderConnectingSlow: f,
2874
+ renderConnectingSlow: d,
2876
2875
  renderConnected: u,
2877
2876
  renderOffline: h,
2878
- renderError: l
2877
+ renderError: f
2879
2878
  }) {
2880
2879
  switch (t) {
2881
2880
  case "idle":
@@ -2883,7 +2882,7 @@ function ko({
2883
2882
  case "connecting":
2884
2883
  return c();
2885
2884
  case "connectingSlow":
2886
- return f();
2885
+ return d();
2887
2886
  case "connected":
2888
2887
  case "reconnecting":
2889
2888
  return !r || !n || !o ? null : u({
@@ -2896,7 +2895,7 @@ function ko({
2896
2895
  case "offline":
2897
2896
  return h();
2898
2897
  case "offlineError":
2899
- return l(e ?? s?.lastError?.message ?? null);
2898
+ return f(e ?? s?.lastError?.message ?? null);
2900
2899
  default:
2901
2900
  return null;
2902
2901
  }
@@ -2911,9 +2910,9 @@ function io() {
2911
2910
  return window.__IKON_LOCAL_IKON_SERVER_CONFIG__;
2912
2911
  }
2913
2912
  function To(t) {
2914
- const { authConfig: e, modules: r, timeouts: n, backgroundAudio: o, webRtc: s, audio: i, video: a, websocket: c, webtransport: f } = t, u = e === void 0 ? so() ?? null : e, h = io(), l = oo(), m = v(null), y = v(null), b = v(null), p = v(!1), g = v(!1), w = v(o), k = v(n), O = v(s), M = v(i), z = v(a), Q = v(c), T = v(f);
2915
- w.current = o, k.current = n, O.current = s, M.current = i, z.current = a, Q.current = c, T.current = f;
2916
- const [_, F] = G("idle"), [j, U] = G(null), [Y, re] = G(null), [J, he] = G(null), [ne, oe] = G(!1), [me, d] = G(0), S = K(() => {
2913
+ const { authConfig: e, modules: r, timeouts: n, backgroundAudio: o, webRtc: s, audio: i, video: a, websocket: c, webtransport: d } = t, u = e === void 0 ? so() ?? null : e, h = io(), f = oo(), p = v(null), y = v(null), S = v(null), m = v(!1), g = v(!1), w = v(o), k = v(n), O = v(s), M = v(i), z = v(a), Q = v(c), T = v(d);
2914
+ w.current = o, k.current = n, O.current = s, M.current = i, z.current = a, Q.current = c, T.current = d;
2915
+ const [_, F] = G("idle"), [j, L] = G(null), [Y, re] = G(null), [J, he] = G(null), [ne, oe] = G(!1), [me, l] = G(0), b = K(() => {
2917
2916
  try {
2918
2917
  const I = Mt();
2919
2918
  return (I.sessionId || I.channelKey) && jt(), I;
@@ -2921,18 +2920,18 @@ function To(t) {
2921
2920
  return { parameters: {} };
2922
2921
  }
2923
2922
  }, []), R = K(() => u?.enabled ? wt() : null, [u?.enabled, me]), C = h?.enabled ?? !1, V = h?.host ?? "localhost", B = h?.port ?? 8443;
2924
- L(() => {
2925
- !C && ze() && u && !u.enabled && u.spaceId && !J && !ne && (oe(!0), vt(u.spaceId, u.authUrl ?? Pe()).then((x) => {
2923
+ U(() => {
2924
+ !C && ze() && u && !u.enabled && u.spaceId && !J && !ne && (oe(!0), vt(u.spaceId, Pe(u.authUrl)).then((x) => {
2926
2925
  he(x.token);
2927
2926
  }).catch((x) => {
2928
- ye.error("Anonymous auth failed:", x), U(x instanceof Error ? x.message : "Anonymous auth failed");
2927
+ ye.error("Anonymous auth failed:", x), L(x instanceof Error ? x.message : "Anonymous auth failed");
2929
2928
  }).finally(() => {
2930
2929
  oe(!1);
2931
2930
  }));
2932
2931
  }, [C, u, J, ne]);
2933
2932
  const ee = K(() => {
2934
2933
  if (C) {
2935
- const I = R?.token ? Lt(R.token) ?? void 0 : void 0;
2934
+ const I = R?.token ? Ut(R.token) ?? void 0 : void 0;
2936
2935
  return {
2937
2936
  local: {
2938
2937
  host: V,
@@ -2940,7 +2939,9 @@ function To(t) {
2940
2939
  userId: I,
2941
2940
  token: R?.token ?? void 0,
2942
2941
  spaceId: u?.spaceId,
2943
- parameters: S.parameters
2942
+ backendUrl: u?.backendUrl,
2943
+ authUrl: u?.authUrl,
2944
+ parameters: b.parameters
2944
2945
  }
2945
2946
  };
2946
2947
  }
@@ -2949,42 +2950,44 @@ function To(t) {
2949
2950
  token: R.token,
2950
2951
  spaceId: u.spaceId,
2951
2952
  backendType: qe(),
2952
- sessionId: S.sessionId,
2953
- channelKey: S.channelKey,
2954
- parameters: S.parameters
2953
+ sessionId: b.sessionId,
2954
+ channelKey: b.channelKey,
2955
+ parameters: b.parameters
2955
2956
  }
2956
2957
  } : J && u?.spaceId ? {
2957
2958
  sessionToken: {
2958
2959
  token: J,
2959
2960
  spaceId: u.spaceId,
2960
2961
  backendType: qe(),
2961
- sessionId: S.sessionId,
2962
- channelKey: S.channelKey,
2963
- parameters: S.parameters
2962
+ sessionId: b.sessionId,
2963
+ channelKey: b.channelKey,
2964
+ parameters: b.parameters
2964
2965
  }
2965
2966
  } : ze() ? null : {
2966
2967
  local: {
2967
2968
  host: V,
2968
2969
  httpsPort: B,
2969
2970
  spaceId: u?.spaceId,
2970
- parameters: S.parameters
2971
+ backendUrl: u?.backendUrl,
2972
+ authUrl: u?.authUrl,
2973
+ parameters: b.parameters
2971
2974
  }
2972
2975
  };
2973
- }, [C, V, B, R?.token, u?.spaceId, J, S.sessionId, S.channelKey, S.parameters]);
2976
+ }, [C, V, B, R?.token, u?.spaceId, u?.backendUrl, u?.authUrl, J, b.sessionId, b.channelKey, b.parameters]);
2974
2977
  Hr(Y);
2975
2978
  const se = Xr(Y);
2976
- L(() => {
2977
- if (!p.current) {
2978
- if (p.current = !0, b.current = $r(), r)
2979
+ U(() => {
2980
+ if (!m.current) {
2981
+ if (m.current = !0, S.current = $r(), r)
2979
2982
  for (const I of r)
2980
- I(b.current);
2981
- b.current.loadRegisteredModules().catch((I) => {
2983
+ I(S.current);
2984
+ S.current.loadRegisteredModules().catch((I) => {
2982
2985
  ye.error("Failed to load UI modules", I);
2983
2986
  });
2984
2987
  }
2985
- }, []), L(() => {
2988
+ }, []), U(() => {
2986
2989
  if (!ee) return;
2987
- const I = new Ut({
2990
+ const I = new Lt({
2988
2991
  ...ee,
2989
2992
  timeouts: k.current,
2990
2993
  audio: M.current !== void 0 || w.current ? {
@@ -3000,34 +3003,34 @@ function To(t) {
3000
3003
  F(Z);
3001
3004
  },
3002
3005
  onError: (Z) => {
3003
- U(Z.message);
3006
+ L(Z.message);
3004
3007
  }
3005
3008
  });
3006
- m.current = I;
3009
+ p.current = I;
3007
3010
  const x = new rr({ client: I });
3008
3011
  return y.current = x, re(x), I.connect().catch((Z) => {
3009
- ye.error("Connection failed:", Z), Z instanceof xt && !g.current && (g.current = !0, ye.warn("Auth session appears stale, clearing and retrying"), l ? l.logout() : (we(), d((Ct) => Ct + 1)));
3012
+ ye.error("Connection failed:", Z), Z instanceof xt && !g.current && (g.current = !0, ye.warn("Auth session appears stale, clearing and retrying"), f ? f.logout() : (we(), l((Ct) => Ct + 1)));
3010
3013
  }), () => {
3011
- I.disconnect(), m.current = null, x.dispose(), y.current = null;
3014
+ I.disconnect(), p.current = null, x.dispose(), y.current = null;
3012
3015
  };
3013
3016
  }, [ee]);
3014
3017
  const N = D((I, x) => {
3015
3018
  const Z = typeof x == "string" ? x : JSON.stringify(x ?? {});
3016
- m.current?.sendActionCall(I, Z);
3019
+ p.current?.sendActionCall(I, Z);
3017
3020
  }, []), X = _ === "connected" || _ === "reconnecting";
3018
3021
  return {
3019
3022
  connectionState: _,
3020
3023
  error: j,
3021
3024
  stores: se,
3022
- client: m.current,
3023
- registry: b.current,
3024
- clientRef: m,
3025
+ client: p.current,
3026
+ registry: S.current,
3027
+ clientRef: p,
3025
3028
  uiRef: y,
3026
- registryRef: b,
3029
+ registryRef: S,
3027
3030
  onAction: N,
3028
3031
  isReady: X,
3029
- webRtcVideoStreams: m.current?.webRtcVideoStreams ?? /* @__PURE__ */ new Map(),
3030
- webRtcTrackMap: m.current?.webRtcTrackMap ?? /* @__PURE__ */ new Map()
3032
+ webRtcVideoStreams: p.current?.webRtcVideoStreams ?? /* @__PURE__ */ new Map(),
3033
+ webRtcTrackMap: p.current?.webRtcTrackMap ?? /* @__PURE__ */ new Map()
3031
3034
  };
3032
3035
  }
3033
3036
  function Co(t) {
@@ -3043,24 +3046,24 @@ let ao = 0;
3043
3046
  function Io(t = 5, e = 5e3) {
3044
3047
  const [r, n] = G([]), o = v(/* @__PURE__ */ new Map()), s = D((i) => {
3045
3048
  const a = o.current.get(i);
3046
- a && (clearTimeout(a), o.current.delete(i)), n((c) => c.filter((f) => f.id !== i));
3049
+ a && (clearTimeout(a), o.current.delete(i)), n((c) => c.filter((d) => d.id !== i));
3047
3050
  }, []);
3048
- return L(() => {
3051
+ return U(() => {
3049
3052
  const i = o.current, a = Dt(
3050
3053
  (c) => {
3051
3054
  if (!Ft())
3052
3055
  return;
3053
- const f = `toast-${++ao}`, u = c.level === Ge.ERROR ? "error" : "warn", h = {
3054
- id: f,
3056
+ const d = `toast-${++ao}`, u = c.level === Ge.ERROR ? "error" : "warn", h = {
3057
+ id: d,
3055
3058
  level: u,
3056
3059
  message: c.message,
3057
3060
  component: c.component
3058
3061
  };
3059
- n((m) => [...m, h].slice(-t));
3060
- const l = setTimeout(() => {
3061
- s(f);
3062
+ n((p) => [...p, h].slice(-t));
3063
+ const f = setTimeout(() => {
3064
+ s(d);
3062
3065
  }, e);
3063
- i.set(f, l);
3066
+ i.set(d, f);
3064
3067
  },
3065
3068
  { minLevel: Ge.WARN }
3066
3069
  );
@@ -3094,9 +3097,9 @@ function Oo({
3094
3097
  }) {
3095
3098
  const o = Object.keys(e), s = lo(o, n, r), i = e[s] ?? e.en, a = K(
3096
3099
  () => ({
3097
- t: (c, f) => {
3100
+ t: (c, d) => {
3098
3101
  const u = i[c];
3099
- return co(u, f);
3102
+ return co(u, d);
3100
3103
  },
3101
3104
  locale: s,
3102
3105
  translations: i
@@ -3118,17 +3121,17 @@ export {
3118
3121
  lr as IKON_UI_BASE_MODULE,
3119
3122
  Rr as IKON_UI_MEDIA_MODULE,
3120
3123
  xr as IKON_UI_SHADERTOY_MODULE,
3121
- Lr as IKON_UI_SHADERTOY_TYPE,
3124
+ Ur as IKON_UI_SHADERTOY_TYPE,
3122
3125
  je as IKON_UI_STREAM_CATEGORY,
3123
3126
  yr as IKON_UI_VIDEO_CANVAS_TYPE,
3124
- Sr as IKON_UI_VIDEO_URL_PLAYER_TYPE,
3127
+ br as IKON_UI_VIDEO_URL_PLAYER_TYPE,
3125
3128
  rr as IkonUi,
3126
3129
  Br as IkonUiRegistry,
3127
3130
  yo as IkonUiSurface,
3128
3131
  er as UiComponentRegistry,
3129
3132
  Qt as UiRenderer,
3130
3133
  Mo as UiStreamStore,
3131
- So as areIkonUiModuleListsEqual,
3134
+ bo as areIkonUiModuleListsEqual,
3132
3135
  vt as authenticateAnonymous,
3133
3136
  Yn as buildOAuthRedirectUrl,
3134
3137
  we as clearAuthSession,
@@ -3137,7 +3140,7 @@ export {
3137
3140
  po as createComponentLibrary,
3138
3141
  $r as createIkonUiRegistry,
3139
3142
  wr as createMediaResolvers,
3140
- Ur as createShadertoyRendererResolver,
3143
+ Lr as createShadertoyRendererResolver,
3141
3144
  tr as isIkonUiCategoryMatch,
3142
3145
  wt as loadAuthSession,
3143
3146
  dr as loadBaseModule,
@@ -3148,7 +3151,7 @@ export {
3148
3151
  Vn as parseOAuthCallback,
3149
3152
  Kn as parseOAuthError,
3150
3153
  gn as readIkonUiModules,
3151
- bo as readIkonUiModulesFromSources,
3154
+ So as readIkonUiModulesFromSources,
3152
3155
  fr as registerBaseModule,
3153
3156
  Ar as registerMediaModule,
3154
3157
  Fr as registerShadertoyModule,