@ikonai/sdk-react-ui 1.0.4 → 1.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.js CHANGED
@@ -1,8 +1,8 @@
1
- import { IkonUICore as kt, UiStreamStore as Tt } from "@ikonai/sdk-ui";
2
- import { UiStreamStore as po } from "@ikonai/sdk-ui";
3
- import Ct, { useSyncExternalStore as $e, useMemo as z, memo as Y, useRef as w, useCallback as B, Fragment as It, useEffect as F, useState as ee, createContext as lt, use as Be } from "react";
4
- import { createLogger as Re, getOrCreateDeviceId as Se, deriveAuthUrl as je, parseUrlParams as Nt, isCloudEnvironment as Ye, extractUserIdFromToken as Ot, deriveBackendType as We, IkonClient as _t } from "@ikonai/sdk";
5
- var ye = { exports: {} }, ae = {};
1
+ import { IkonUiCore as kt, UiStreamStore as Tt } from "@ikonai/sdk-ui";
2
+ import { UiStreamStore as ho } from "@ikonai/sdk-ui";
3
+ import Ct, { useSyncExternalStore as De, useMemo as z, memo as q, useRef as w, useCallback as B, Fragment as It, useEffect as F, useState as ee, createContext as lt, use as Fe } from "react";
4
+ import { createLogger as be, getOrCreateDeviceId as pe, deriveAuthUrl as _e, parseUrlParams as Ot, isCloudEnvironment as Ye, extractUserIdFromToken as Nt, deriveBackendType as We, IkonClient as _t } from "@ikonai/sdk";
5
+ var me = { exports: {} }, ie = {};
6
6
  /**
7
7
  * @license React
8
8
  * react-jsx-runtime.production.js
@@ -14,7 +14,7 @@ var ye = { exports: {} }, ae = {};
14
14
  */
15
15
  var qe;
16
16
  function Pt() {
17
- if (qe) return ae;
17
+ if (qe) return ie;
18
18
  qe = 1;
19
19
  var t = Symbol.for("react.transitional.element"), e = Symbol.for("react.fragment");
20
20
  function r(n, o, s) {
@@ -32,9 +32,9 @@ function Pt() {
32
32
  props: s
33
33
  };
34
34
  }
35
- return ae.Fragment = e, ae.jsx = r, ae.jsxs = r, ae;
35
+ return ie.Fragment = e, ie.jsx = r, ie.jsxs = r, ie;
36
36
  }
37
- var ce = {};
37
+ var ae = {};
38
38
  /**
39
39
  * @license React
40
40
  * react-jsx-runtime.development.js
@@ -61,7 +61,7 @@ function jt() {
61
61
  return "StrictMode";
62
62
  case V:
63
63
  return "Suspense";
64
- case G:
64
+ case J:
65
65
  return "SuspenseList";
66
66
  case C:
67
67
  return "Activity";
@@ -102,8 +102,8 @@ function jt() {
102
102
  }
103
103
  if (g) {
104
104
  g = console;
105
- var E = g.error, T = typeof Symbol == "function" && Symbol.toStringTag && u[Symbol.toStringTag] || u.constructor.name || "Object";
106
- return E.call(
105
+ var R = g.error, T = typeof Symbol == "function" && Symbol.toStringTag && u[Symbol.toStringTag] || u.constructor.name || "Object";
106
+ return R.call(
107
107
  g,
108
108
  "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
109
109
  T
@@ -136,31 +136,31 @@ function jt() {
136
136
  return u.key !== void 0;
137
137
  }
138
138
  function a(u, g) {
139
- function E() {
140
- oe || (oe = !0, console.error(
139
+ function R() {
140
+ ne || (ne = !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
  g
143
143
  ));
144
144
  }
145
- E.isReactWarning = !0, Object.defineProperty(u, "key", {
146
- get: E,
145
+ R.isReactWarning = !0, Object.defineProperty(u, "key", {
146
+ get: R,
147
147
  configurable: !0
148
148
  });
149
149
  }
150
150
  function c() {
151
151
  var u = t(this.type);
152
- return pe[u] || (pe[u] = !0, console.error(
152
+ return fe[u] || (fe[u] = !0, console.error(
153
153
  "Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
154
154
  )), u = this.props.ref, u !== void 0 ? u : null;
155
155
  }
156
- function f(u, g, E, T, K, x, Q, ie) {
157
- return E = x.ref, u = {
156
+ function f(u, g, R, T, K, x, Q, se) {
157
+ return R = x.ref, u = {
158
158
  $$typeof: y,
159
159
  type: u,
160
160
  key: g,
161
161
  props: x,
162
162
  _owner: K
163
- }, (E !== void 0 ? E : null) !== null ? Object.defineProperty(u, "ref", {
163
+ }, (R !== void 0 ? R : null) !== null ? Object.defineProperty(u, "ref", {
164
164
  enumerable: !1,
165
165
  get: c
166
166
  }) : Object.defineProperty(u, "ref", { enumerable: !1, value: null }), u._store = {}, Object.defineProperty(u._store, "validated", {
@@ -182,28 +182,28 @@ function jt() {
182
182
  configurable: !1,
183
183
  enumerable: !1,
184
184
  writable: !0,
185
- value: ie
185
+ value: se
186
186
  }), Object.freeze && (Object.freeze(u.props), Object.freeze(u)), u;
187
187
  }
188
- function l(u, g, E, T, K, x, Q, ie) {
189
- var N = g.children;
190
- if (N !== void 0)
188
+ function l(u, g, R, T, K, x, Q, se) {
189
+ var O = g.children;
190
+ if (O !== void 0)
191
191
  if (T)
192
- if (W(N)) {
193
- for (T = 0; T < N.length; T++)
194
- h(N[T]);
195
- Object.freeze && Object.freeze(N);
192
+ if (Y(O)) {
193
+ for (T = 0; T < O.length; T++)
194
+ h(O[T]);
195
+ Object.freeze && Object.freeze(O);
196
196
  } else
197
197
  console.error(
198
198
  "React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
199
199
  );
200
- else h(N);
200
+ else h(O);
201
201
  if (L.call(g, "key")) {
202
- N = t(u);
203
- var X = Object.keys(g).filter(function(U) {
202
+ O = t(u);
203
+ var H = Object.keys(g).filter(function(U) {
204
204
  return U !== "key";
205
205
  });
206
- T = 0 < X.length ? "{key: someKey, " + X.join(": ..., ") + ": ...}" : "{key: someKey}", se[N + T] || (X = 0 < X.length ? "{" + X.join(": ..., ") + ": ...}" : "{}", console.error(
206
+ T = 0 < H.length ? "{key: someKey, " + H.join(": ..., ") + ": ...}" : "{key: someKey}", oe[O + T] || (H = 0 < H.length ? "{" + H.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} />
@@ -211,34 +211,34 @@ React keys must be passed directly to JSX without using spread:
211
211
  let props = %s;
212
212
  <%s key={someKey} {...props} />`,
213
213
  T,
214
- N,
215
- X,
216
- N
217
- ), se[N + T] = !0);
214
+ O,
215
+ H,
216
+ O
217
+ ), oe[O + T] = !0);
218
218
  }
219
- if (N = null, E !== void 0 && (r(E), N = "" + E), i(g) && (r(g.key), N = "" + g.key), "key" in g) {
220
- E = {};
221
- for (var O in g)
222
- O !== "key" && (E[O] = g[O]);
223
- } else E = g;
224
- return N && a(
225
- E,
219
+ if (O = null, R !== void 0 && (r(R), O = "" + R), i(g) && (r(g.key), O = "" + g.key), "key" in g) {
220
+ R = {};
221
+ for (var N in g)
222
+ N !== "key" && (R[N] = g[N]);
223
+ } else R = g;
224
+ return O && a(
225
+ R,
226
226
  typeof u == "function" ? u.displayName || u.name || "Unknown" : u
227
227
  ), f(
228
228
  u,
229
- N,
229
+ O,
230
230
  x,
231
231
  K,
232
232
  o(),
233
- E,
233
+ R,
234
234
  Q,
235
- ie
235
+ se
236
236
  );
237
237
  }
238
238
  function h(u) {
239
239
  typeof u == "object" && u !== null && u.$$typeof === y && u._store && (u._store.validated = 1);
240
240
  }
241
- var d = Ct, y = Symbol.for("react.transitional.element"), S = Symbol.for("react.portal"), b = Symbol.for("react.fragment"), m = Symbol.for("react.strict_mode"), p = Symbol.for("react.profiler"), A = Symbol.for("react.consumer"), P = Symbol.for("react.context"), j = Symbol.for("react.forward_ref"), V = Symbol.for("react.suspense"), G = Symbol.for("react.suspense_list"), Z = Symbol.for("react.memo"), k = Symbol.for("react.lazy"), C = Symbol.for("react.activity"), M = Symbol.for("react.client.reference"), I = d.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, L = Object.prototype.hasOwnProperty, W = Array.isArray, te = console.createTask ? console.createTask : function() {
241
+ var d = Ct, y = Symbol.for("react.transitional.element"), S = Symbol.for("react.portal"), b = Symbol.for("react.fragment"), m = Symbol.for("react.strict_mode"), p = Symbol.for("react.profiler"), A = Symbol.for("react.consumer"), P = Symbol.for("react.context"), j = Symbol.for("react.forward_ref"), V = Symbol.for("react.suspense"), J = Symbol.for("react.suspense_list"), Z = Symbol.for("react.memo"), k = Symbol.for("react.lazy"), C = Symbol.for("react.activity"), M = Symbol.for("react.client.reference"), I = d.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, L = Object.prototype.hasOwnProperty, Y = Array.isArray, te = console.createTask ? console.createTask : function() {
242
242
  return null;
243
243
  };
244
244
  d = {
@@ -246,44 +246,44 @@ React keys must be passed directly to JSX without using spread:
246
246
  return u();
247
247
  }
248
248
  };
249
- var oe, pe = {}, H = d["react-stack-bottom-frame"].bind(
249
+ var ne, fe = {}, G = d["react-stack-bottom-frame"].bind(
250
250
  d,
251
251
  s
252
- )(), ge = te(n(s)), se = {};
253
- ce.Fragment = b, ce.jsx = function(u, g, E, T, K) {
252
+ )(), he = te(n(s)), oe = {};
253
+ ae.Fragment = b, ae.jsx = function(u, g, R, T, K) {
254
254
  var x = 1e4 > I.recentlyCreatedOwnerStacks++;
255
255
  return l(
256
256
  u,
257
257
  g,
258
- E,
258
+ R,
259
259
  !1,
260
260
  T,
261
261
  K,
262
- x ? Error("react-stack-top-frame") : H,
263
- x ? te(n(u)) : ge
262
+ x ? Error("react-stack-top-frame") : G,
263
+ x ? te(n(u)) : he
264
264
  );
265
- }, ce.jsxs = function(u, g, E, T, K) {
265
+ }, ae.jsxs = function(u, g, R, T, K) {
266
266
  var x = 1e4 > I.recentlyCreatedOwnerStacks++;
267
267
  return l(
268
268
  u,
269
269
  g,
270
- E,
270
+ R,
271
271
  !0,
272
272
  T,
273
273
  K,
274
- x ? Error("react-stack-top-frame") : H,
275
- x ? te(n(u)) : ge
274
+ x ? Error("react-stack-top-frame") : G,
275
+ x ? te(n(u)) : he
276
276
  );
277
277
  };
278
- }()), ce;
278
+ }()), ae;
279
279
  }
280
280
  var Ge;
281
281
  function Mt() {
282
- return Ge || (Ge = 1, process.env.NODE_ENV === "production" ? ye.exports = Pt() : ye.exports = jt()), ye.exports;
282
+ return Ge || (Ge = 1, process.env.NODE_ENV === "production" ? me.exports = Pt() : me.exports = jt()), me.exports;
283
283
  }
284
- var R = Mt();
284
+ var E = Mt();
285
285
  function Ut(t, e) {
286
- const r = $e(
286
+ const r = De(
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,15 +302,15 @@ function Ut(t, e) {
302
302
  };
303
303
  }, [r]);
304
304
  }
305
- function J(t, e) {
306
- const r = $e(
305
+ function X(t, e) {
306
+ const r = De(
307
307
  (n) => t.subscribeNode(e, n),
308
308
  () => t.getNodeVersion(e),
309
309
  () => t.getNodeVersion(e)
310
310
  );
311
311
  return z(() => t.getNode(e), [t, e, r]);
312
312
  }
313
- const Lt = Re("UIRenderer");
313
+ const Lt = be("UIRenderer");
314
314
  function xt(t) {
315
315
  if (t === void 0)
316
316
  return "{}";
@@ -341,29 +341,29 @@ function Bt(t) {
341
341
  e += "," + t[r].id;
342
342
  return e;
343
343
  }
344
- const Me = Y(function t({ nodeId: e, context: r }) {
345
- const n = J(r.store, e), o = n ? Ft(n) : [], s = Bt(o), i = z(
346
- () => o.length === 0 ? null : o.map((h) => /* @__PURE__ */ R.jsx(t, { nodeId: h.id, context: r }, h.id)),
344
+ const Pe = q(function t({ nodeId: e, context: r }) {
345
+ const n = X(r.store, e), o = n ? Ft(n) : [], s = Bt(o), i = z(
346
+ () => o.length === 0 ? null : o.map((h) => /* @__PURE__ */ E.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__ */ R.jsx(It, { children: i }, n.id);
353
+ return /* @__PURE__ */ E.jsx(It, { children: i }, n.id);
354
354
  const a = r.library.resolve(n);
355
355
  if (!a)
356
356
  return Lt.warn(`No renderer for node type ${n.type}`), null;
357
357
  const c = Dt(n), f = c.length > 0 ? c.join(" ") : void 0, l = a;
358
- return /* @__PURE__ */ R.jsx(l, { nodeId: e, context: r, className: f });
358
+ return /* @__PURE__ */ E.jsx(l, { nodeId: e, context: r, className: f });
359
359
  }, $t);
360
360
  function Vt(t, e) {
361
- return !Array.isArray(t) || t.length === 0 ? null : t.map((r) => /* @__PURE__ */ R.jsx(Me, { nodeId: r.id, context: e }, r.id));
361
+ return !Array.isArray(t) || t.length === 0 ? null : t.map((r) => /* @__PURE__ */ E.jsx(Pe, { nodeId: r.id, context: e }, r.id));
362
362
  }
363
363
  function Kt(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 zt = Y(function({ store: e, library: r, viewId: n, emptyFallback: o = null, onAction: s, client: i, video: a }) {
366
+ const zt = q(function({ store: e, library: r, viewId: n, emptyFallback: o = null, onAction: s, client: i, video: a }) {
367
367
  const { rootViewId: c, rootNodeId: f } = Ut(e, n), l = w(s);
368
368
  l.current = s;
369
369
  const h = w(i);
@@ -385,7 +385,7 @@ const zt = Y(function({ store: e, library: r, viewId: n, emptyFallback: o = null
385
385
  renderChildren: (m) => Vt(m, b),
386
386
  renderView: (m) => {
387
387
  const p = e.getSnapshot().views.get(m);
388
- return p ? /* @__PURE__ */ R.jsx(Me, { nodeId: p.id, context: b }) : null;
388
+ return p ? /* @__PURE__ */ E.jsx(Pe, { nodeId: p.id, context: b }) : null;
389
389
  },
390
390
  dispatchAction: y,
391
391
  // Access client/video via refs to avoid context recreation
@@ -398,7 +398,7 @@ const zt = Y(function({ store: e, library: r, viewId: n, emptyFallback: o = null
398
398
  };
399
399
  return b;
400
400
  }, [e, r, y]);
401
- return !c || !f ? o : /* @__PURE__ */ R.jsx("div", { "data-ikon-view-id": c, style: { display: "contents" }, children: /* @__PURE__ */ R.jsx(Me, { nodeId: f, context: S }) });
401
+ return !c || !f ? o : /* @__PURE__ */ E.jsx("div", { "data-ikon-view-id": c, style: { display: "contents" }, children: /* @__PURE__ */ E.jsx(Pe, { nodeId: f, context: S }) });
402
402
  }, Kt);
403
403
  class Yt {
404
404
  constructor(e, r) {
@@ -417,22 +417,22 @@ class Yt {
417
417
  return this.renderers.get(e.type) ?? this.fallback;
418
418
  }
419
419
  }
420
- function Hn(t, e) {
420
+ function Jn(t, e) {
421
421
  const r = Object.entries(t);
422
422
  return new Yt(r, e);
423
423
  }
424
- function Xn(t) {
425
- return $e(
424
+ function Gn(t) {
425
+ return De(
426
426
  (e) => t.subscribe(e),
427
427
  () => t.getSnapshot(),
428
428
  () => t.getSnapshot()
429
429
  );
430
430
  }
431
- const Ue = "ikon-ui";
431
+ const je = "ikon-ui";
432
432
  function Wt(t, e) {
433
433
  return t === e;
434
434
  }
435
- const Zn = Y(function({ stores: e, registry: r, category: n = Ue, onAction: o, client: s }) {
435
+ const Hn = q(function({ stores: e, registry: r, category: n = je, onAction: o, client: s }) {
436
436
  const i = z(() => Array.from(e.keys()).sort().join(","), [e]), a = w(o);
437
437
  a.current = o;
438
438
  const c = w(s);
@@ -449,7 +449,7 @@ const Zn = Y(function({ stores: e, registry: r, category: n = Ue, onAction: o, c
449
449
  // eslint-disable-next-line react-hooks/exhaustive-deps
450
450
  [e, n, i]
451
451
  );
452
- return f.length === 0 ? null : /* @__PURE__ */ R.jsx(R.Fragment, { children: f.map(({ key: l, store: h }) => /* @__PURE__ */ R.jsx(zt, { store: h, library: r, onAction: a.current, client: c.current, video: c.current?.media?.video }, l)) });
452
+ return f.length === 0 ? null : /* @__PURE__ */ E.jsx(E.Fragment, { children: f.map(({ key: l, store: h }) => /* @__PURE__ */ E.jsx(zt, { store: h, library: r, onAction: a.current, client: c.current, video: c.current?.media?.video }, l)) });
453
453
  });
454
454
  class qt {
455
455
  core;
@@ -509,7 +509,7 @@ class qt {
509
509
  if (r)
510
510
  return r;
511
511
  const n = {
512
- category: Ue,
512
+ category: je,
513
513
  store: new Tt()
514
514
  };
515
515
  return this.stores.set(e, n), n;
@@ -518,7 +518,7 @@ class qt {
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 ?? Ue;
521
+ const o = r ?? this.core.uiStore.getSnapshot(e)?.category ?? je;
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 qt {
526
526
  r(e);
527
527
  }
528
528
  }
529
- function ne(t) {
529
+ function we(t) {
530
530
  if (typeof t == "string") {
531
531
  const e = t.trim();
532
532
  return e.length > 0 ? e : void 0;
@@ -536,7 +536,7 @@ function ne(t) {
536
536
  return e.length > 0 ? e.join(" ") : void 0;
537
537
  }
538
538
  }
539
- function he(...t) {
539
+ function $e(...t) {
540
540
  let e = "";
541
541
  for (const r of t)
542
542
  if (r) {
@@ -546,7 +546,7 @@ function he(...t) {
546
546
  return e || void 0;
547
547
  }
548
548
  const He = /* @__PURE__ */ new WeakMap(), Jt = {};
549
- function me(t) {
549
+ function Be(t) {
550
550
  if (!t)
551
551
  return Jt;
552
552
  const e = He.get(t);
@@ -558,8 +558,8 @@ function me(t) {
558
558
  return He.set(t, r), r;
559
559
  }
560
560
  function Gt() {
561
- const t = Y(function({ nodeId: r, context: n }) {
562
- const o = J(n.store, r), s = w(null), i = ne(o?.props?.targetViewId), a = o?.props?.focusOnly, c = typeof a == "boolean" ? a : void 0;
561
+ const t = q(function({ nodeId: r, context: n }) {
562
+ const o = X(n.store, r), s = w(null), i = we(o?.props?.targetViewId), a = o?.props?.focusOnly, c = typeof a == "boolean" ? a : void 0;
563
563
  return F(() => {
564
564
  if (typeof document > "u")
565
565
  return;
@@ -579,7 +579,7 @@ function Gt() {
579
579
  } catch {
580
580
  l.focus();
581
581
  }
582
- }, [c, i]), o ? /* @__PURE__ */ R.jsx(
582
+ }, [c, i]), o ? /* @__PURE__ */ E.jsx(
583
583
  "span",
584
584
  {
585
585
  ref: s,
@@ -592,107 +592,60 @@ function Gt() {
592
592
  ) : null;
593
593
  });
594
594
  return ({ type: e }) => {
595
- if (e === "common.focus-hint")
595
+ if (e === "std.focus-hint")
596
596
  return t;
597
597
  };
598
598
  }
599
599
  function Ht() {
600
- const t = Y(function({ nodeId: r, context: n, className: o }) {
601
- const s = J(n.store, r);
600
+ const t = q(function({ nodeId: r, context: n, className: o }) {
601
+ const s = X(n.store, r);
602
602
  if (!s)
603
603
  return null;
604
- const i = me(s.props), a = he(ne(s.props?.className), o), c = s.children?.length ? n.renderChildren(s.children) : void 0;
605
- return /* @__PURE__ */ R.jsx("div", { ...i, "data-ikon-node-id": s.id, className: a, children: c });
604
+ const i = Be(s.props), a = $e(we(s.props?.className), o), c = s.children?.length ? n.renderChildren(s.children) : void 0;
605
+ return /* @__PURE__ */ E.jsx("div", { ...i, "data-ikon-node-id": s.id, className: a, children: c });
606
606
  });
607
607
  return ({ type: e }) => {
608
- if (e === "common.div")
608
+ if (e === "std.div")
609
609
  return t;
610
610
  };
611
611
  }
612
612
  function Xt() {
613
- const t = Y(function({ nodeId: r, context: n, className: o }) {
614
- const s = J(n.store, r);
613
+ const t = q(function({ nodeId: r, context: n, className: o }) {
614
+ const s = X(n.store, r);
615
615
  if (!s)
616
616
  return null;
617
- const i = me(s.props), a = he(ne(s.props?.className), o), c = s.children?.length ? n.renderChildren(s.children) : void 0;
618
- return /* @__PURE__ */ R.jsx(
619
- "form",
620
- {
621
- ...i,
622
- "data-ikon-node-id": s.id,
623
- className: a,
624
- onSubmit: (f) => f.preventDefault(),
625
- children: c
626
- }
627
- );
617
+ const i = Be(s.props), a = $e("relative", we(s.props?.className), o), c = s.children?.length ? n.renderChildren(s.children) : void 0;
618
+ return /* @__PURE__ */ E.jsx("div", { ...i, "data-ikon-node-id": s.id, className: a, children: c });
628
619
  });
629
620
  return ({ type: e }) => {
630
- if (e === "common.form")
621
+ if (e === "std.stack")
631
622
  return t;
632
623
  };
633
624
  }
634
625
  function Zt() {
635
- const t = Y(function({ nodeId: r, context: n, className: o }) {
636
- const s = J(n.store, r);
626
+ const t = q(function({ nodeId: r, context: n, className: o }) {
627
+ const s = X(n.store, r);
637
628
  if (!s)
638
629
  return null;
639
- const i = me(s.props), a = he(ne(s.props?.className), o), c = s.children?.length ? n.renderChildren(s.children) : void 0;
640
- return /* @__PURE__ */ R.jsx(
641
- "div",
642
- {
643
- ...i,
644
- "data-ikon-node-id": s.id,
645
- "data-ikon-view-type": "scroll-view",
646
- "data-ikon-scroll-container": "true",
647
- className: a,
648
- children: c
649
- }
650
- );
630
+ const i = Be(s.props), a = $e("absolute", we(s.props?.className), o), c = s.children?.length ? n.renderChildren(s.children) : void 0;
631
+ return /* @__PURE__ */ E.jsx("div", { ...i, "data-ikon-node-id": s.id, className: a, children: c });
651
632
  });
652
633
  return ({ type: e }) => {
653
- if (e === "common.scroll-view")
634
+ if (e === "std.layer")
654
635
  return t;
655
636
  };
656
637
  }
657
638
  function Qt() {
658
- const t = Y(function({ nodeId: r, context: n, className: o }) {
659
- const s = J(n.store, r);
660
- if (!s)
661
- return null;
662
- const i = me(s.props), a = he("relative", ne(s.props?.className), o), c = s.children?.length ? n.renderChildren(s.children) : void 0;
663
- return /* @__PURE__ */ R.jsx("div", { ...i, "data-ikon-node-id": s.id, className: a, children: c });
664
- });
665
- return ({ type: e }) => {
666
- if (e === "common.stack")
667
- return t;
668
- };
669
- }
670
- function er() {
671
- const t = Y(function({ nodeId: r, context: n, className: o }) {
672
- const s = J(n.store, r);
673
- if (!s)
674
- return null;
675
- const i = me(s.props), a = he("absolute", ne(s.props?.className), o), c = s.children?.length ? n.renderChildren(s.children) : void 0;
676
- return /* @__PURE__ */ R.jsx("div", { ...i, "data-ikon-node-id": s.id, className: a, children: c });
677
- });
678
- return ({ type: e }) => {
679
- if (e === "common.layer")
680
- return t;
681
- };
682
- }
683
- function tr() {
684
639
  return [
685
640
  Ht(),
686
641
  Xt(),
687
642
  Zt(),
688
- Qt(),
689
- er(),
690
643
  Gt()
691
644
  ];
692
645
  }
693
- const rr = "base", nr = async () => tr();
694
- function or(t) {
695
- t.registerModule(rr, nr);
646
+ const er = "base", tr = async () => Qt();
647
+ function rr(t) {
648
+ t.registerModule(er, tr);
696
649
  }
697
650
  function dt(t) {
698
651
  if (typeof t == "string") {
@@ -710,7 +663,7 @@ function ft(...t) {
710
663
  r && r.trim() && e.push(r.trim());
711
664
  return e.length > 0 ? e.join(" ") : void 0;
712
665
  }
713
- function be(t) {
666
+ function ge(t) {
714
667
  if (typeof t == "number" && Number.isFinite(t))
715
668
  return Math.floor(t);
716
669
  if (typeof t == "string" && t.trim().length > 0) {
@@ -719,23 +672,23 @@ function be(t) {
719
672
  return Math.floor(e);
720
673
  }
721
674
  }
722
- function Le(t) {
675
+ function Me(t) {
723
676
  if (typeof t != "string")
724
677
  return;
725
678
  const e = t.trim();
726
679
  return e.length > 0 ? e : void 0;
727
680
  }
728
- const sr = "media.video-canvas", ir = "media.video-url-player";
729
- function ar() {
730
- const t = Y(function({ nodeId: r, context: n, className: o }) {
731
- const s = J(n.store, r), i = w(null), a = n.video, c = s ? Le(s.props?.streamId) : void 0, f = s ? be(s.props?.width) : void 0, l = s ? be(s.props?.height) : void 0, h = s ? ft(dt(s.props?.className), o) : o;
681
+ const nr = "std.video-canvas", or = "std.video-url-player";
682
+ function sr() {
683
+ const t = q(function({ nodeId: r, context: n, className: o }) {
684
+ const s = X(n.store, r), i = w(null), a = n.video, c = s ? Me(s.props?.streamId) : void 0, f = s ? ge(s.props?.width) : void 0, l = s ? ge(s.props?.height) : void 0, h = s ? ft(dt(s.props?.className), o) : o;
732
685
  return F(() => {
733
686
  const d = i.current;
734
687
  if (!(!a || !d || !c))
735
688
  return a.attachCanvas(c, d), () => {
736
689
  a.detachCanvas(c);
737
690
  };
738
- }, [a, c]), s ? /* @__PURE__ */ R.jsx(
691
+ }, [a, c]), s ? /* @__PURE__ */ E.jsx(
739
692
  "canvas",
740
693
  {
741
694
  ref: i,
@@ -749,14 +702,14 @@ function ar() {
749
702
  ) : null;
750
703
  });
751
704
  return ({ type: e }) => {
752
- if (e === sr)
705
+ if (e === nr)
753
706
  return t;
754
707
  };
755
708
  }
756
- function cr() {
757
- return [ar(), ur()];
709
+ function ir() {
710
+ return [sr(), ar()];
758
711
  }
759
- function ue(t) {
712
+ function ce(t) {
760
713
  if (typeof t == "boolean")
761
714
  return t;
762
715
  if (typeof t == "string") {
@@ -765,17 +718,17 @@ function ue(t) {
765
718
  if (e === "false") return !1;
766
719
  }
767
720
  }
768
- function ur() {
769
- const t = Y(function({
721
+ function ar() {
722
+ const t = q(function({
770
723
  nodeId: r,
771
724
  context: n,
772
725
  className: o
773
726
  }) {
774
- const s = J(n.store, r);
727
+ const s = X(n.store, r);
775
728
  if (!s)
776
729
  return null;
777
- const i = ft(dt(s.props?.className), o), a = Le(s.props?.src), c = Le(s.props?.poster), f = ue(s.props?.controls), l = ue(s.props?.autoplay), h = ue(s.props?.loop), d = ue(s.props?.muted), y = ue(s.props?.playsInline), S = be(s.props?.width), b = be(s.props?.height), m = s.children?.length ? n.renderChildren(s.children) : void 0;
778
- return /* @__PURE__ */ R.jsx(
730
+ const i = ft(dt(s.props?.className), o), a = Me(s.props?.src), c = Me(s.props?.poster), f = ce(s.props?.controls), l = ce(s.props?.autoplay), h = ce(s.props?.loop), d = ce(s.props?.muted), y = ce(s.props?.playsInline), S = ge(s.props?.width), b = ge(s.props?.height), m = s.children?.length ? n.renderChildren(s.children) : void 0;
731
+ return /* @__PURE__ */ E.jsx(
779
732
  "video",
780
733
  {
781
734
  src: a,
@@ -794,27 +747,27 @@ function ur() {
794
747
  );
795
748
  });
796
749
  return ({ type: e }) => {
797
- if (e === ir)
750
+ if (e === or)
798
751
  return t;
799
752
  };
800
753
  }
801
- const lr = "media", dr = async () => cr();
802
- function fr(t) {
803
- t.registerModule(lr, dr);
754
+ const cr = "media", ur = async () => ir();
755
+ function lr(t) {
756
+ t.registerModule(cr, ur);
804
757
  }
805
- const hr = `#version 300 es
758
+ const dr = `#version 300 es
806
759
  in vec4 a_position;
807
760
  void main() {
808
761
  gl_Position = a_position;
809
762
  }
810
763
  `;
811
- function mr(t, e) {
764
+ function fr(t, e) {
812
765
  return new RegExp(`\\buniform\\s+\\w+\\s+${e}\\s*;`, "g").test(t);
813
766
  }
814
- function pr(t, e) {
767
+ function hr(t, e) {
815
768
  const r = [];
816
769
  for (const [n, o] of Object.entries(e)) {
817
- if (mr(t, n))
770
+ if (fr(t, n))
818
771
  continue;
819
772
  let s;
820
773
  switch (o.type) {
@@ -867,7 +820,7 @@ void main() {
867
820
  }
868
821
  `;
869
822
  }
870
- class gr {
823
+ class mr {
871
824
  gl;
872
825
  program = null;
873
826
  positionBuffer = null;
@@ -903,10 +856,10 @@ class gr {
903
856
  }
904
857
  compile(e, r = {}) {
905
858
  this.lastError = null, this.customUniforms = r, this.currentShaderSource = e;
906
- const n = this.gl, o = this.compileShader(n.VERTEX_SHADER, hr);
859
+ const n = this.gl, o = this.compileShader(n.VERTEX_SHADER, dr);
907
860
  if (!o)
908
861
  return !1;
909
- const s = pr(e, r), i = this.compileShader(n.FRAGMENT_SHADER, s);
862
+ const s = hr(e, r), i = this.compileShader(n.FRAGMENT_SHADER, s);
910
863
  if (!i)
911
864
  return n.deleteShader(o), !1;
912
865
  const a = n.createProgram();
@@ -997,7 +950,7 @@ class gr {
997
950
  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();
998
951
  }
999
952
  }
1000
- function yr(t) {
953
+ function pr(t) {
1001
954
  if (typeof t == "string") {
1002
955
  const e = t.trim();
1003
956
  return e.length > 0 ? e : void 0;
@@ -1007,13 +960,13 @@ function yr(t) {
1007
960
  return e.length > 0 ? e.join(" ") : void 0;
1008
961
  }
1009
962
  }
1010
- function Sr(...t) {
963
+ function gr(...t) {
1011
964
  const e = [];
1012
965
  for (const r of t)
1013
966
  r && r.trim() && e.push(r.trim());
1014
967
  return e.length > 0 ? e.join(" ") : void 0;
1015
968
  }
1016
- function ke(t) {
969
+ function Ee(t) {
1017
970
  if (typeof t == "number" && Number.isFinite(t))
1018
971
  return Math.floor(t);
1019
972
  if (typeof t == "string" && t.trim().length > 0) {
@@ -1022,10 +975,10 @@ function ke(t) {
1022
975
  return Math.floor(e);
1023
976
  }
1024
977
  }
1025
- function br(t) {
978
+ function yr(t) {
1026
979
  return typeof t == "string" ? t : "";
1027
980
  }
1028
- function wr(t) {
981
+ function Sr(t) {
1029
982
  if (typeof t == "boolean")
1030
983
  return t;
1031
984
  if (typeof t == "string") {
@@ -1034,7 +987,7 @@ function wr(t) {
1034
987
  if (e === "false") return !1;
1035
988
  }
1036
989
  }
1037
- function vr(t) {
990
+ function br(t) {
1038
991
  if (!t || typeof t != "object")
1039
992
  return {};
1040
993
  const e = {}, r = t;
@@ -1049,7 +1002,7 @@ function vr(t) {
1049
1002
  }
1050
1003
  return e;
1051
1004
  }
1052
- function Rr(t, e) {
1005
+ function wr(t, e) {
1053
1006
  const r = Object.keys(t), n = Object.keys(e);
1054
1007
  if (r.length !== n.length)
1055
1008
  return !1;
@@ -1070,21 +1023,21 @@ function Rr(t, e) {
1070
1023
  }
1071
1024
  return !0;
1072
1025
  }
1073
- const Er = "shader.shader";
1074
- function Ar() {
1075
- const t = Y(function({ nodeId: r, context: n, className: o }) {
1076
- const s = J(n.store, r), i = w(null), a = w(null), c = w(null), f = w(0), l = w(""), h = w({}), d = w({
1026
+ const vr = "std.shader-canvas";
1027
+ function Rr() {
1028
+ const t = q(function({ nodeId: r, context: n, className: o }) {
1029
+ const s = X(n.store, r), i = w(null), a = w(null), c = w(null), f = w(0), l = w(""), h = w({}), d = w({
1077
1030
  x: 0,
1078
1031
  y: 0,
1079
1032
  clickX: 0,
1080
1033
  clickY: 0,
1081
1034
  isDown: !1
1082
- }), y = s ? br(s.props?.shaderSource) : "", S = s ? ke(s.props?.fps) ?? 60 : 60, b = s?.props?.uniforms, m = z(() => vr(b), [b]), p = s ? wr(s.props?.enableMouse) ?? !0 : !0, A = s ? ke(s.props?.width) : void 0, P = s ? ke(s.props?.height) : void 0, j = s ? Sr(yr(s.props?.className), o) : o;
1035
+ }), y = s ? yr(s.props?.shaderSource) : "", S = s ? Ee(s.props?.fps) ?? 60 : 60, b = s?.props?.uniforms, m = z(() => br(b), [b]), p = s ? Sr(s.props?.enableMouse) ?? !0 : !0, A = s ? Ee(s.props?.width) : void 0, P = s ? Ee(s.props?.height) : void 0, j = s ? gr(pr(s.props?.className), o) : o;
1083
1036
  F(() => {
1084
1037
  const k = i.current;
1085
1038
  if (k) {
1086
1039
  try {
1087
- const C = new gr(k);
1040
+ const C = new mr(k);
1088
1041
  a.current = C;
1089
1042
  } catch (C) {
1090
1043
  console.error("[ShaderRenderer] Failed to create WebGL2 context:", C);
@@ -1104,7 +1057,7 @@ function Ar() {
1104
1057
  }
1105
1058
  }, [y, m]), F(() => {
1106
1059
  const k = a.current;
1107
- !k || !l.current || Rr(h.current, m) || (k.setCustomUniforms(m), h.current = m);
1060
+ !k || !l.current || wr(h.current, m) || (k.setCustomUniforms(m), h.current = m);
1108
1061
  }, [m]), F(() => {
1109
1062
  const k = a.current;
1110
1063
  if (!k || !l.current) return;
@@ -1121,23 +1074,23 @@ function Ar() {
1121
1074
  if (!p) return;
1122
1075
  const C = i.current, M = a.current;
1123
1076
  if (!C || !M) return;
1124
- const I = C.getBoundingClientRect(), L = k.clientX - I.left, W = I.height - (k.clientY - I.top);
1125
- d.current.x = L, d.current.y = W, M.setMouse(L, W, d.current.clickX, d.current.clickY);
1077
+ const I = C.getBoundingClientRect(), L = k.clientX - I.left, Y = I.height - (k.clientY - I.top);
1078
+ d.current.x = L, d.current.y = Y, M.setMouse(L, Y, d.current.clickX, d.current.clickY);
1126
1079
  },
1127
1080
  [p]
1128
- ), G = B(
1081
+ ), J = B(
1129
1082
  (k) => {
1130
1083
  if (!p) return;
1131
1084
  const C = i.current, M = a.current;
1132
1085
  if (!C || !M) return;
1133
- const I = C.getBoundingClientRect(), L = k.clientX - I.left, W = I.height - (k.clientY - I.top);
1134
- d.current.isDown = !0, d.current.clickX = L, d.current.clickY = W, M.setMouse(L, W, L, W);
1086
+ const I = C.getBoundingClientRect(), L = k.clientX - I.left, Y = I.height - (k.clientY - I.top);
1087
+ d.current.isDown = !0, d.current.clickX = L, d.current.clickY = Y, M.setMouse(L, Y, L, Y);
1135
1088
  },
1136
1089
  [p]
1137
1090
  ), Z = B(() => {
1138
1091
  p && (d.current.isDown = !1, d.current.clickX = -Math.abs(d.current.clickX));
1139
1092
  }, [p]);
1140
- return s ? /* @__PURE__ */ R.jsx(
1093
+ return s ? /* @__PURE__ */ E.jsx(
1141
1094
  "canvas",
1142
1095
  {
1143
1096
  ref: i,
@@ -1146,23 +1099,23 @@ function Ar() {
1146
1099
  ...A ? { width: A } : {},
1147
1100
  ...P ? { height: P } : {},
1148
1101
  onMouseMove: V,
1149
- onMouseDown: G,
1102
+ onMouseDown: J,
1150
1103
  onMouseUp: Z,
1151
1104
  onMouseLeave: Z
1152
1105
  }
1153
1106
  ) : null;
1154
1107
  });
1155
1108
  return ({ type: e }) => {
1156
- if (e === Er)
1109
+ if (e === vr)
1157
1110
  return t;
1158
1111
  };
1159
1112
  }
1160
- const kr = "shader", Tr = async () => Ar();
1161
- function Cr(t) {
1162
- t.registerModule(kr, Tr);
1113
+ const Er = "shader", Ar = async () => Rr();
1114
+ function kr(t) {
1115
+ t.registerModule(Er, Ar);
1163
1116
  }
1164
- const Xe = Re("UIRegistry");
1165
- class Ir {
1117
+ const Xe = be("UIRegistry");
1118
+ class Tr {
1166
1119
  baseResolvers = [];
1167
1120
  moduleLoaders = /* @__PURE__ */ new Map();
1168
1121
  moduleResolvers = /* @__PURE__ */ new Map();
@@ -1184,7 +1137,7 @@ class Ir {
1184
1137
  for (const [n, o] of this.moduleLoaders.entries())
1185
1138
  if (!this.moduleResolvers.has(n))
1186
1139
  try {
1187
- const s = await o(), i = _r(s);
1140
+ const s = await o(), i = Or(s);
1188
1141
  this.moduleResolvers.set(n, i), e = !0;
1189
1142
  } catch (s) {
1190
1143
  Xe.error(`[IkonUiRegistry] Failed to load module '${n}'.`, s);
@@ -1192,7 +1145,7 @@ class Ir {
1192
1145
  const r = [];
1193
1146
  for (const n of this.moduleLoaders.keys())
1194
1147
  this.moduleResolvers.has(n) && r.push(n);
1195
- return Pr(r, this.activeModuleOrder) || (this.activeModuleOrder = r, e = !0), e;
1148
+ return Nr(r, this.activeModuleOrder) || (this.activeModuleOrder = r, e = !0), e;
1196
1149
  }
1197
1150
  resolve(e) {
1198
1151
  for (const r of this.baseResolvers) {
@@ -1212,17 +1165,17 @@ class Ir {
1212
1165
  }
1213
1166
  }
1214
1167
  }
1215
- function Nr() {
1216
- const t = new Ir();
1217
- return or(t), fr(t), Cr(t), t.loadRegisteredModules(), t;
1168
+ function Cr() {
1169
+ const t = new Tr();
1170
+ return rr(t), lr(t), kr(t), t.loadRegisteredModules(), t;
1218
1171
  }
1219
- function Or(t) {
1172
+ function Ir(t) {
1220
1173
  return Array.isArray(t) ? t : [t];
1221
1174
  }
1222
- function _r(t) {
1223
- return t ? Or(t).flatMap((e) => e ? Array.isArray(e) ? e.filter(Boolean) : [e] : []) : [];
1175
+ function Or(t) {
1176
+ return t ? Ir(t).flatMap((e) => e ? Array.isArray(e) ? e.filter(Boolean) : [e] : []) : [];
1224
1177
  }
1225
- function Pr(t, e) {
1178
+ function Nr(t, e) {
1226
1179
  if (t.length !== e.length)
1227
1180
  return !1;
1228
1181
  for (let r = 0; r < t.length; r += 1)
@@ -1230,7 +1183,7 @@ function Pr(t, e) {
1230
1183
  return !1;
1231
1184
  return !0;
1232
1185
  }
1233
- const Te = Re("MotionController"), Ze = {
1186
+ const Ae = be("MotionController"), Ze = {
1234
1187
  ease: [0.25, 0.1, 0.25, 1],
1235
1188
  "ease-in": [0.42, 0, 1, 1],
1236
1189
  "ease-out": [0, 0, 0.58, 1],
@@ -1304,21 +1257,21 @@ function tt(t, e, r, n) {
1304
1257
  for (; A !== P && l[A] <= m; A += 1)
1305
1258
  p += 0.1;
1306
1259
  A -= 1;
1307
- const j = (m - l[A]) / (l[A + 1] - l[A]), V = p + j * 0.1, G = d(V, t, r);
1308
- return G >= 1e-3 ? y(m, V) : G === 0 ? V : S(m, p, p + 0.1);
1260
+ const j = (m - l[A]) / (l[A + 1] - l[A]), V = p + j * 0.1, J = d(V, t, r);
1261
+ return J >= 1e-3 ? y(m, V) : J === 0 ? V : S(m, p, p + 0.1);
1309
1262
  }
1310
1263
  for (let m = 0; m < 11; m += 1)
1311
1264
  l[m] = h(m * 0.1, t, r);
1312
1265
  return (m) => m <= 0 ? 0 : m >= 1 ? 1 : h(b(m), e, n);
1313
1266
  }
1314
- function jr(t) {
1267
+ function _r(t) {
1315
1268
  const e = /steps\(\s*([0-9]+)\s*(?:,\s*([a-z-]+)\s*)?\)/i.exec(t);
1316
1269
  if (!e)
1317
1270
  return (o) => D(o);
1318
1271
  const r = Math.max(1, parseInt(e[1], 10)), n = (e[2] ?? "end").toLowerCase();
1319
1272
  return n === "start" || n === "jump-start" ? (o) => D(Math.ceil(o * r) / r) : n === "none" || n === "jump-none" ? (o) => D(Math.round(o * r) / r) : n === "both" || n === "jump-both" ? (o) => D((Math.floor(o * r) + 0.5) / r) : (o) => D(Math.floor(o * r) / r);
1320
1273
  }
1321
- function Mr(t) {
1274
+ function Pr(t) {
1322
1275
  if (!t)
1323
1276
  return (r) => D(r);
1324
1277
  const e = t.trim().toLowerCase();
@@ -1336,12 +1289,12 @@ function Mr(t) {
1336
1289
  }
1337
1290
  }
1338
1291
  if (e.startsWith("steps(") && e.endsWith(")")) {
1339
- const r = jr(e);
1292
+ const r = _r(e);
1340
1293
  return (n) => r(D(n));
1341
1294
  }
1342
1295
  return (r) => D(r);
1343
1296
  }
1344
- function Ur(t) {
1297
+ function jr(t) {
1345
1298
  if (!t)
1346
1299
  return;
1347
1300
  const e = /(-?\d+(?:\.\d+)?)\s*\.\.\s*(-?\d+(?:\.\d+)?)\s*->\s*(-?\d+(?:\.\d+)?)\s*\.\.\s*(-?\d+(?:\.\d+)?)/.exec(t);
@@ -1351,7 +1304,7 @@ function Ur(t) {
1351
1304
  if (![r, n, o, s].some((i) => !Number.isFinite(i)))
1352
1305
  return { inStart: r, inEnd: n, outStart: o, outEnd: s };
1353
1306
  }
1354
- class Lr {
1307
+ class Mr {
1355
1308
  bindingsByStyle = /* @__PURE__ */ new Map();
1356
1309
  observer;
1357
1310
  observeScheduled = !1;
@@ -1378,7 +1331,7 @@ class Lr {
1378
1331
  try {
1379
1332
  e();
1380
1333
  } catch (r) {
1381
- Te.warn("Failed to cleanup binding listener", r);
1334
+ Ae.warn("Failed to cleanup binding listener", r);
1382
1335
  }
1383
1336
  this.globalCleanups.clear(), this.elementStates.clear(), this.styleToElements.clear(), this.bindingsByStyle.clear(), this.pendingScanStyles.clear(), this.scanScheduled = !1, this.observer && (this.observer.disconnect(), this.observer = void 0);
1384
1337
  }
@@ -1388,7 +1341,7 @@ class Lr {
1388
1341
  const n = (JSON.parse(e).motionBindings ?? []).map((o) => this.parseBinding(o)).filter((o) => o !== void 0);
1389
1342
  return n.length === 0 ? void 0 : { bindings: n };
1390
1343
  } catch (r) {
1391
- Te.warn("Failed to parse motion metadata", r);
1344
+ Ae.warn("Failed to parse motion metadata", r);
1392
1345
  return;
1393
1346
  }
1394
1347
  }
@@ -1396,7 +1349,7 @@ class Lr {
1396
1349
  const r = e.source?.trim();
1397
1350
  if (!r)
1398
1351
  return;
1399
- const n = Qe(e.min) ?? 0, o = Qe(e.max), s = o === void 0 ? n + 100 : o, i = (e.clamp ?? "clamp").trim().toLowerCase(), a = !!e.reverse, c = Mr(e.ease), f = Ur(e.map), l = e.targetId?.trim() || void 0;
1352
+ const n = Qe(e.min) ?? 0, o = Qe(e.max), s = o === void 0 ? n + 100 : o, i = (e.clamp ?? "clamp").trim().toLowerCase(), a = !!e.reverse, c = Pr(e.ease), f = jr(e.map), l = e.targetId?.trim() || void 0;
1400
1353
  return Number.isNaN(n) || Number.isNaN(s) ? void 0 : {
1401
1354
  source: r.toLowerCase(),
1402
1355
  min: n,
@@ -1564,7 +1517,7 @@ class Lr {
1564
1517
  try {
1565
1518
  i();
1566
1519
  } catch (a) {
1567
- Te.warn("Failed to cleanup listener", a);
1520
+ Ae.warn("Failed to cleanup listener", a);
1568
1521
  }
1569
1522
  this.globalCleanups.delete(i);
1570
1523
  }
@@ -1609,21 +1562,21 @@ class Lr {
1609
1562
  }
1610
1563
  }
1611
1564
  }
1612
- const Ce = new Lr();
1613
- function xr(t) {
1565
+ const ke = new Mr();
1566
+ function Ur(t) {
1614
1567
  const e = w(/* @__PURE__ */ new Map()), r = B(({ styleId: s, css: i, common: a }) => {
1615
1568
  if (!(!s || typeof document > "u")) {
1616
1569
  if (i) {
1617
1570
  let c = e.current.get(s);
1618
1571
  c || (c = document.createElement("style"), c.setAttribute("data-ikon-style-id", s), document.head.appendChild(c), e.current.set(s, c)), c.textContent = i;
1619
1572
  }
1620
- Ce.registerStyle(s, a);
1573
+ ke.registerStyle(s, a);
1621
1574
  }
1622
1575
  }, []), n = B((s) => {
1623
1576
  if (!(typeof document > "u"))
1624
1577
  for (const i of s) {
1625
1578
  const a = e.current.get(i);
1626
- a && (a.remove(), e.current.delete(i)), Ce.unregisterStyle(i);
1579
+ a && (a.remove(), e.current.delete(i)), ke.unregisterStyle(i);
1627
1580
  }
1628
1581
  }, []), o = B(() => {
1629
1582
  if (typeof document < "u") {
@@ -1631,7 +1584,7 @@ function xr(t) {
1631
1584
  s.remove();
1632
1585
  e.current.clear();
1633
1586
  }
1634
- Ce.reset();
1587
+ ke.reset();
1635
1588
  }, []);
1636
1589
  return F(() => {
1637
1590
  if (!t) return;
@@ -1643,7 +1596,7 @@ function xr(t) {
1643
1596
  };
1644
1597
  }, [t, o, r, n]), F(() => () => o(), [o]), { setStyle: r, deleteStyles: n, reset: o };
1645
1598
  }
1646
- function Dr(t) {
1599
+ function Lr(t) {
1647
1600
  const e = [];
1648
1601
  for (const [r, n] of t) {
1649
1602
  const o = n.store.getSnapshot(), s = o.rootViewId && o.views.has(o.rootViewId);
@@ -1651,7 +1604,7 @@ function Dr(t) {
1651
1604
  }
1652
1605
  return e.sort(), e.join(",");
1653
1606
  }
1654
- function Fr(t) {
1607
+ function xr(t) {
1655
1608
  const [e, r] = ee(), n = w("");
1656
1609
  return F(() => {
1657
1610
  if (!t) {
@@ -1659,54 +1612,54 @@ function Fr(t) {
1659
1612
  return;
1660
1613
  }
1661
1614
  const o = () => {
1662
- const s = t.getStores(), i = Dr(s);
1615
+ const s = t.getStores(), i = Lr(s);
1663
1616
  i !== n.current && (n.current = i, r(s));
1664
1617
  };
1665
1618
  return o(), t.subscribe(o);
1666
1619
  }, [t]), e;
1667
1620
  }
1668
- var $r = typeof global == "object" && global && global.Object === Object && global, Br = typeof self == "object" && self && self.Object === Object && self, Vr = $r || Br || Function("return this")(), we = Vr.Symbol, ht = Object.prototype, Kr = ht.hasOwnProperty, zr = ht.toString, le = we ? we.toStringTag : void 0;
1669
- function Yr(t) {
1670
- var e = Kr.call(t, le), r = t[le];
1621
+ var Dr = typeof global == "object" && global && global.Object === Object && global, Fr = typeof self == "object" && self && self.Object === Object && self, $r = Dr || Fr || Function("return this")(), ye = $r.Symbol, ht = Object.prototype, Br = ht.hasOwnProperty, Vr = ht.toString, ue = ye ? ye.toStringTag : void 0;
1622
+ function Kr(t) {
1623
+ var e = Br.call(t, ue), r = t[ue];
1671
1624
  try {
1672
- t[le] = void 0;
1625
+ t[ue] = void 0;
1673
1626
  var n = !0;
1674
1627
  } catch {
1675
1628
  }
1676
- var o = zr.call(t);
1677
- return n && (e ? t[le] = r : delete t[le]), o;
1629
+ var o = Vr.call(t);
1630
+ return n && (e ? t[ue] = r : delete t[ue]), o;
1678
1631
  }
1679
- var Wr = Object.prototype, qr = Wr.toString;
1680
- function Jr(t) {
1681
- return qr.call(t);
1632
+ var zr = Object.prototype, Yr = zr.toString;
1633
+ function Wr(t) {
1634
+ return Yr.call(t);
1682
1635
  }
1683
- var Gr = "[object Null]", Hr = "[object Undefined]", rt = we ? we.toStringTag : void 0;
1684
- function Xr(t) {
1685
- return t == null ? t === void 0 ? Hr : Gr : rt && rt in Object(t) ? Yr(t) : Jr(t);
1636
+ var qr = "[object Null]", Jr = "[object Undefined]", rt = ye ? ye.toStringTag : void 0;
1637
+ function Gr(t) {
1638
+ return t == null ? t === void 0 ? Jr : qr : rt && rt in Object(t) ? Kr(t) : Wr(t);
1686
1639
  }
1687
- function Zr(t) {
1640
+ function Hr(t) {
1688
1641
  return t != null && typeof t == "object";
1689
1642
  }
1690
- var Qr = Array.isArray, en = "[object String]";
1691
- function tn(t) {
1692
- return typeof t == "string" || !Qr(t) && Zr(t) && Xr(t) == en;
1643
+ var Xr = Array.isArray, Zr = "[object String]";
1644
+ function Qr(t) {
1645
+ return typeof t == "string" || !Xr(t) && Hr(t) && Gr(t) == Zr;
1693
1646
  }
1694
1647
  const nt = "ikonUiModules";
1695
- function xe(t) {
1648
+ function Ue(t) {
1696
1649
  return typeof t == "object" && t !== null && !Array.isArray(t);
1697
1650
  }
1698
- function rn(t) {
1651
+ function en(t) {
1699
1652
  if (!Array.isArray(t))
1700
1653
  return;
1701
1654
  const e = /* @__PURE__ */ new Set();
1702
1655
  for (const r of t) {
1703
- if (!tn(r)) continue;
1656
+ if (!Qr(r)) continue;
1704
1657
  const n = r.trim();
1705
1658
  n && (e.has(n) || e.add(n));
1706
1659
  }
1707
1660
  return Array.from(e);
1708
1661
  }
1709
- function Qn(t, e) {
1662
+ function Xn(t, e) {
1710
1663
  if (t === e)
1711
1664
  return !0;
1712
1665
  if (!t || !e)
@@ -1718,19 +1671,19 @@ function Qn(t, e) {
1718
1671
  return !1;
1719
1672
  return !0;
1720
1673
  }
1721
- function nn(t) {
1722
- if (!(!xe(t) || !Object.prototype.hasOwnProperty.call(t, nt)))
1723
- return rn(t[nt]);
1674
+ function tn(t) {
1675
+ if (!(!Ue(t) || !Object.prototype.hasOwnProperty.call(t, nt)))
1676
+ return en(t[nt]);
1724
1677
  }
1725
- function eo(...t) {
1678
+ function Zn(...t) {
1726
1679
  for (const e of t) {
1727
- const r = nn(e);
1680
+ const r = tn(e);
1728
1681
  if (r !== void 0)
1729
1682
  return r;
1730
1683
  }
1731
1684
  }
1732
- function to(t) {
1733
- if (!xe(t))
1685
+ function Qn(t) {
1686
+ if (!Ue(t))
1734
1687
  return;
1735
1688
  const e = t, r = Object.keys(e).find((c) => c.toLowerCase() === "modules");
1736
1689
  if (!r)
@@ -1749,7 +1702,7 @@ function to(t) {
1749
1702
  o.push(b), i.add(b);
1750
1703
  continue;
1751
1704
  }
1752
- if (!xe(c))
1705
+ if (!Ue(c))
1753
1706
  continue;
1754
1707
  const f = c, l = Object.keys(f).find((b) => b.toLowerCase() === "name");
1755
1708
  if (!l)
@@ -1778,7 +1731,7 @@ const v = {
1778
1731
  Line: 4,
1779
1732
  Paragraph: 8,
1780
1733
  Emoji: 16
1781
- }, on = [
1734
+ }, rn = [
1782
1735
  {
1783
1736
  flag: v.Letter,
1784
1737
  hints: [
@@ -1827,11 +1780,11 @@ const v = {
1827
1780
  "[data-emoji]"
1828
1781
  ]
1829
1782
  }
1830
- ], De = v.Letter | v.Word | v.Line | v.Paragraph | v.Emoji, sn = v.Letter | v.Word | v.Line | v.Paragraph, ot = /* @__PURE__ */ new Map(), an = 16384;
1831
- function ro(t, e) {
1832
- if (!t || t.length > an)
1783
+ ], Le = v.Letter | v.Word | v.Line | v.Paragraph | v.Emoji, nn = v.Letter | v.Word | v.Line | v.Paragraph, ot = /* @__PURE__ */ new Map(), on = 16384;
1784
+ function eo(t, e) {
1785
+ if (!t || t.length > on)
1833
1786
  return t;
1834
- const r = An(e), n = re(r, v.Emoji), o = r & sn;
1787
+ const r = Rn(e), n = re(r, v.Emoji), o = r & nn;
1835
1788
  if (o === v.None && !n)
1836
1789
  return t;
1837
1790
  const s = t.replace(/\r\n/g, `
@@ -1839,30 +1792,30 @@ function ro(t, e) {
1839
1792
  `);
1840
1793
  if (o === v.None)
1841
1794
  return ct(s);
1842
- const i = Rn(s);
1795
+ const i = wn(s);
1843
1796
  if (i.length === 0)
1844
1797
  return n ? ct(s) : t;
1845
- const a = En(i), c = { letter: 0, word: 0, line: 0, paragraph: 0, br: 0, emoji: 0 }, f = [];
1798
+ const a = vn(i), c = { letter: 0, word: 0, line: 0, paragraph: 0, br: 0, emoji: 0 }, f = [];
1846
1799
  for (const l of a) {
1847
- const h = cn(l, r, c);
1800
+ const h = sn(l, r, c);
1848
1801
  f.push(...h);
1849
1802
  }
1850
1803
  return f;
1851
1804
  }
1852
- function cn(t, e, r) {
1805
+ function sn(t, e, r) {
1853
1806
  const n = [];
1854
1807
  for (const o of t) {
1855
- const s = un(o, e, r);
1808
+ const s = an(o, e, r);
1856
1809
  n.push(...s);
1857
1810
  }
1858
1811
  if (re(e, v.Paragraph)) {
1859
1812
  const o = r.paragraph++;
1860
1813
  return [
1861
- /* @__PURE__ */ R.jsx(
1814
+ /* @__PURE__ */ E.jsx(
1862
1815
  "span",
1863
1816
  {
1864
1817
  "data-motion-paragraph": !0,
1865
- style: Ee(o),
1818
+ style: ve(o),
1866
1819
  children: n
1867
1820
  },
1868
1821
  `motion-paragraph-${o}`
@@ -1871,20 +1824,20 @@ function cn(t, e, r) {
1871
1824
  }
1872
1825
  return n;
1873
1826
  }
1874
- function un(t, e, r) {
1875
- const n = ln(t.text, e, r), o = [];
1827
+ function an(t, e, r) {
1828
+ const n = cn(t.text, e, r), o = [];
1876
1829
  if (re(e, v.Line)) {
1877
1830
  const s = r.line++;
1878
1831
  o.push(
1879
- /* @__PURE__ */ R.jsx("span", { "data-motion-line": !0, style: Ee(s), children: n }, `motion-line-${s}`)
1832
+ /* @__PURE__ */ E.jsx("span", { "data-motion-line": !0, style: ve(s), children: n }, `motion-line-${s}`)
1880
1833
  );
1881
1834
  } else
1882
1835
  o.push(...n);
1883
1836
  for (let s = 0; s < t.breaks; s++)
1884
- o.push(/* @__PURE__ */ R.jsx("br", {}, `motion-break-${r.br++}`));
1837
+ o.push(/* @__PURE__ */ E.jsx("br", {}, `motion-break-${r.br++}`));
1885
1838
  return o;
1886
1839
  }
1887
- function ln(t, e, r) {
1840
+ function cn(t, e, r) {
1888
1841
  if (!t)
1889
1842
  return [];
1890
1843
  const n = re(e, v.Word), o = [], s = /(\s+)/g;
@@ -1903,72 +1856,72 @@ function ln(t, e, r) {
1903
1856
  return o;
1904
1857
  }
1905
1858
  function st(t, e, r, n) {
1906
- const o = e.word++, s = fn(t, r, e), i = `motion-word-${o}`, a = dn(o, n);
1907
- return n ? /* @__PURE__ */ R.jsx("span", { "data-motion-word": !0, style: a, children: s }, i) : /* @__PURE__ */ R.jsx("span", { style: a, children: s }, i);
1859
+ const o = e.word++, s = ln(t, r, e), i = `motion-word-${o}`, a = un(o, n);
1860
+ return n ? /* @__PURE__ */ E.jsx("span", { "data-motion-word": !0, style: a, children: s }, i) : /* @__PURE__ */ E.jsx("span", { style: a, children: s }, i);
1908
1861
  }
1909
- function dn(t, e) {
1910
- return e ? { ...Ee(t), whiteSpace: "nowrap" } : { whiteSpace: "nowrap" };
1862
+ function un(t, e) {
1863
+ return e ? { ...ve(t), whiteSpace: "nowrap" } : { whiteSpace: "nowrap" };
1911
1864
  }
1912
- function fn(t, e, r) {
1865
+ function ln(t, e, r) {
1913
1866
  if (!t)
1914
1867
  return [];
1915
1868
  const n = re(e, v.Letter), o = re(e, v.Emoji);
1916
1869
  if (!n) {
1917
1870
  if (!o)
1918
1871
  return [t];
1919
- const a = Fe(t);
1872
+ const a = xe(t);
1920
1873
  if (a.length === 0)
1921
1874
  return [t];
1922
1875
  const { nodes: c } = pt(a, r);
1923
1876
  return c;
1924
1877
  }
1925
- const s = [], i = Fe(t);
1878
+ const s = [], i = xe(t);
1926
1879
  for (const a of i) {
1927
- const c = r.letter++, f = `motion-letter-${c}`, l = Ee(c);
1880
+ const c = r.letter++, f = `motion-letter-${c}`, l = ve(c);
1928
1881
  if (a === `
1929
1882
  `) {
1930
1883
  s.push(
1931
- /* @__PURE__ */ R.jsx("span", { "data-motion-letter": !0, style: l, children: /* @__PURE__ */ R.jsx("br", {}) }, f)
1884
+ /* @__PURE__ */ E.jsx("span", { "data-motion-letter": !0, style: l, children: /* @__PURE__ */ E.jsx("br", {}) }, f)
1932
1885
  );
1933
1886
  continue;
1934
1887
  }
1935
1888
  const d = o && mt(a) ? { "data-motion-emoji": !0 } : void 0, y = a === " " ? " " : a;
1936
1889
  s.push(
1937
- /* @__PURE__ */ R.jsx("span", { "data-motion-letter": !0, style: l, ...d, children: y }, f)
1890
+ /* @__PURE__ */ E.jsx("span", { "data-motion-letter": !0, style: l, ...d, children: y }, f)
1938
1891
  );
1939
1892
  }
1940
1893
  return s;
1941
1894
  }
1942
- function Fe(t) {
1895
+ function xe(t) {
1943
1896
  if (!t)
1944
1897
  return [];
1945
- const e = hn();
1946
- return e ? Array.from(e.segment(t), (r) => r.segment) : mn(t);
1898
+ const e = dn();
1899
+ return e ? Array.from(e.segment(t), (r) => r.segment) : fn(t);
1947
1900
  }
1948
- let de;
1949
- function hn() {
1950
- return de !== void 0 || (typeof Intl < "u" && typeof Intl.Segmenter == "function" ? de = new Intl.Segmenter(void 0, { granularity: "grapheme" }) : de = null), de;
1901
+ let le;
1902
+ function dn() {
1903
+ return le !== void 0 || (typeof Intl < "u" && typeof Intl.Segmenter == "function" ? le = new Intl.Segmenter(void 0, { granularity: "grapheme" }) : le = null), le;
1951
1904
  }
1952
- function mn(t) {
1905
+ function fn(t) {
1953
1906
  const e = [], r = Array.from(t);
1954
1907
  let n = "";
1955
1908
  for (let o = 0; o < r.length; o++) {
1956
1909
  const s = r[o], i = r[o + 1];
1957
- n += s, !(i && pn(s, i)) && (e.push(n), n = "");
1910
+ n += s, !(i && hn(s, i)) && (e.push(n), n = "");
1958
1911
  }
1959
1912
  return n && e.push(n), e;
1960
1913
  }
1961
- function pn(t, e) {
1962
- return e ? !!(it(t) || it(e) || Sn(e) || gn(e) || yn(e) || at(t) && at(e)) : !1;
1914
+ function hn(t, e) {
1915
+ return e ? !!(it(t) || it(e) || gn(e) || mn(e) || pn(e) || at(t) && at(e)) : !1;
1963
1916
  }
1964
1917
  function it(t) {
1965
1918
  return t.codePointAt(0) === 8205;
1966
1919
  }
1967
- function gn(t) {
1920
+ function mn(t) {
1968
1921
  const e = t.codePointAt(0);
1969
1922
  return e === void 0 ? !1 : e >= 65024 && e <= 65039 || e >= 917760 && e <= 917999;
1970
1923
  }
1971
- function yn(t) {
1924
+ function pn(t) {
1972
1925
  const e = t.codePointAt(0);
1973
1926
  return e === void 0 ? !1 : e >= 127995 && e <= 127999;
1974
1927
  }
@@ -1976,11 +1929,11 @@ function at(t) {
1976
1929
  const e = t.codePointAt(0);
1977
1930
  return e === void 0 ? !1 : e >= 127462 && e <= 127487;
1978
1931
  }
1979
- let Ie;
1980
- function Sn(t) {
1981
- return t ? (Ie || (Ie = bn()), Ie(t)) : !1;
1932
+ let Te;
1933
+ function gn(t) {
1934
+ return t ? (Te || (Te = yn()), Te(t)) : !1;
1982
1935
  }
1983
- function bn() {
1936
+ function yn() {
1984
1937
  try {
1985
1938
  const t = new RegExp("\\p{Mark}", "u");
1986
1939
  return (e) => t.test(e);
@@ -1991,19 +1944,19 @@ function bn() {
1991
1944
  };
1992
1945
  }
1993
1946
  }
1994
- let Ne;
1947
+ let Ce;
1995
1948
  function mt(t) {
1996
- return t ? (Ne || (Ne = wn()), Ne(t)) : !1;
1949
+ return t ? (Ce || (Ce = Sn()), Ce(t)) : !1;
1997
1950
  }
1998
- function wn() {
1951
+ function Sn() {
1999
1952
  try {
2000
1953
  const t = new RegExp("\\p{Extended_Pictographic}", "u");
2001
1954
  return (e) => t.test(e);
2002
1955
  } catch {
2003
- return vn;
1956
+ return bn;
2004
1957
  }
2005
1958
  }
2006
- function vn(t) {
1959
+ function bn(t) {
2007
1960
  if (!t)
2008
1961
  return !1;
2009
1962
  for (const e of Array.from(t)) {
@@ -2013,7 +1966,7 @@ function vn(t) {
2013
1966
  }
2014
1967
  return !1;
2015
1968
  }
2016
- function Rn(t) {
1969
+ function wn(t) {
2017
1970
  const e = [];
2018
1971
  let r = "", n = 0;
2019
1972
  for (let o = 0; o < t.length; o++) {
@@ -2027,7 +1980,7 @@ function Rn(t) {
2027
1980
  }
2028
1981
  return (n > 0 || r.length > 0) && e.push({ text: r, breaks: n }), e;
2029
1982
  }
2030
- function En(t) {
1983
+ function vn(t) {
2031
1984
  if (t.length === 0)
2032
1985
  return [];
2033
1986
  const e = [];
@@ -2039,7 +1992,7 @@ function En(t) {
2039
1992
  function re(t, e) {
2040
1993
  return (t & e) === e;
2041
1994
  }
2042
- function Ee(t) {
1995
+ function ve(t) {
2043
1996
  return {
2044
1997
  "--tw-motion-seq-index": t.toString(),
2045
1998
  backgroundColor: "inherit",
@@ -2059,7 +2012,7 @@ function Ee(t) {
2059
2012
  function ct(t) {
2060
2013
  if (!t)
2061
2014
  return t;
2062
- const e = Fe(t);
2015
+ const e = xe(t);
2063
2016
  if (e.length === 0)
2064
2017
  return t;
2065
2018
  const { nodes: r, sawEmoji: n } = pt(e);
@@ -2076,7 +2029,7 @@ function pt(t, e) {
2076
2029
  o = !0, i();
2077
2030
  const f = `motion-emoji-${e ? e.emoji++ : s++}`;
2078
2031
  r.push(
2079
- /* @__PURE__ */ R.jsx("span", { "data-motion-emoji": !0, children: a }, f)
2032
+ /* @__PURE__ */ E.jsx("span", { "data-motion-emoji": !0, children: a }, f)
2080
2033
  );
2081
2034
  continue;
2082
2035
  }
@@ -2084,7 +2037,7 @@ function pt(t, e) {
2084
2037
  }
2085
2038
  return i(), o ? { nodes: r, sawEmoji: !0 } : { nodes: [t.join("")], sawEmoji: !1 };
2086
2039
  }
2087
- function An(t) {
2040
+ function Rn(t) {
2088
2041
  if (!t)
2089
2042
  return v.None;
2090
2043
  const e = t.trim();
@@ -2098,8 +2051,8 @@ function An(t) {
2098
2051
  const n = e.split(/\s+/).filter(Boolean);
2099
2052
  if (n.length === 0)
2100
2053
  return v.None;
2101
- const s = n.map((c) => `.${kn(c)}`).map(
2102
- (c) => new RegExp(`(^|[^a-zA-Z0-9_-])${Tn(c)}(?![a-zA-Z0-9_-])`)
2054
+ const s = n.map((c) => `.${En(c)}`).map(
2055
+ (c) => new RegExp(`(^|[^a-zA-Z0-9_-])${An(c)}(?![a-zA-Z0-9_-])`)
2103
2056
  );
2104
2057
  let i = v.None, a = !1;
2105
2058
  for (const c of Array.from(document.styleSheets)) {
@@ -2110,7 +2063,7 @@ function An(t) {
2110
2063
  continue;
2111
2064
  }
2112
2065
  const l = gt(f, s);
2113
- if (l.mask && (i |= l.mask, i === De))
2066
+ if (l.mask && (i |= l.mask, i === Le))
2114
2067
  break;
2115
2068
  a ||= l.sawStyleRule;
2116
2069
  }
@@ -2127,13 +2080,13 @@ function gt(t, e) {
2127
2080
  const a = s.selectorText ?? "";
2128
2081
  if (!a || !e.some((f) => f.test(a))) continue;
2129
2082
  n = !0;
2130
- for (const f of on)
2083
+ for (const f of rn)
2131
2084
  f.hints.some((l) => a.includes(l)) && (r |= f.flag);
2132
- if (r === De)
2085
+ if (r === Le)
2133
2086
  return { mask: r, sawStyleRule: !0 };
2134
2087
  } else if ("cssRules" in s) {
2135
2088
  const i = gt(s.cssRules, e);
2136
- if (i.mask && (r |= i.mask, r === De))
2089
+ if (i.mask && (r |= i.mask, r === Le))
2137
2090
  return { mask: r, sawStyleRule: !0 };
2138
2091
  n ||= i.sawStyleRule;
2139
2092
  }
@@ -2141,14 +2094,14 @@ function gt(t, e) {
2141
2094
  }
2142
2095
  return { mask: r, sawStyleRule: n };
2143
2096
  }
2144
- function kn(t) {
2097
+ function En(t) {
2145
2098
  return typeof CSS < "u" && typeof CSS.escape == "function" ? CSS.escape(t) : t.replace(/[^a-zA-Z0-9_-]/g, (e) => `\\${e}`);
2146
2099
  }
2147
- function Tn(t) {
2100
+ function An(t) {
2148
2101
  return t.replace(/[.*+?^${}()|[\]\\]/g, (e) => `\\${e}`);
2149
2102
  }
2150
- const Ve = "ikon_auth_session", Cn = 7 * 24 * 60 * 60 * 1e3;
2151
- function Ae(t) {
2103
+ const Ve = "ikon_auth_session", kn = 7 * 24 * 60 * 60 * 1e3;
2104
+ function Re(t) {
2152
2105
  try {
2153
2106
  localStorage.setItem(Ve, JSON.stringify(t));
2154
2107
  } catch {
@@ -2160,7 +2113,7 @@ function yt() {
2160
2113
  const t = localStorage.getItem(Ve);
2161
2114
  if (!t) return null;
2162
2115
  const e = JSON.parse(t);
2163
- return Date.now() - e.authenticatedAt > Cn ? (St(), null) : e;
2116
+ return Date.now() - e.authenticatedAt > kn ? (St(), null) : e;
2164
2117
  } catch {
2165
2118
  return console.warn("Failed to load auth session from localStorage"), null;
2166
2119
  }
@@ -2172,7 +2125,7 @@ function St() {
2172
2125
  console.warn("Failed to clear auth session from localStorage");
2173
2126
  }
2174
2127
  }
2175
- function fe(t) {
2128
+ function de(t) {
2176
2129
  return {
2177
2130
  id: "",
2178
2131
  provider: t.provider,
@@ -2181,7 +2134,7 @@ function fe(t) {
2181
2134
  };
2182
2135
  }
2183
2136
  async function bt(t, e) {
2184
- const r = Se(), n = await fetch(`${e}/anonymous`, {
2137
+ const r = pe(), n = await fetch(`${e}/anonymous`, {
2185
2138
  method: "POST",
2186
2139
  headers: { "Content-Type": "application/json" },
2187
2140
  body: JSON.stringify({ deviceId: r, space: t })
@@ -2195,9 +2148,9 @@ async function bt(t, e) {
2195
2148
  provider: "anonymous",
2196
2149
  authenticatedAt: Date.now()
2197
2150
  };
2198
- return Ae(s), s;
2151
+ return Re(s), s;
2199
2152
  }
2200
- async function no(t) {
2153
+ async function to(t) {
2201
2154
  const { email: e, spaceId: r, authUrl: n, returnUrl: o = window.location.origin + window.location.pathname } = t, s = await fetch(`${n}/email/send`, {
2202
2155
  method: "POST",
2203
2156
  headers: { "Content-Type": "application/json" },
@@ -2212,22 +2165,22 @@ async function no(t) {
2212
2165
  throw new Error(i);
2213
2166
  }
2214
2167
  }
2215
- function In() {
2168
+ function Tn() {
2216
2169
  const t = new URLSearchParams(window.location.search), e = t.get("ikon_token"), r = t.get("ikon_provider");
2217
2170
  return e && r ? { token: e, provider: r } : null;
2218
2171
  }
2219
- function Nn() {
2172
+ function Cn() {
2220
2173
  const e = new URLSearchParams(window.location.search).get("error");
2221
2174
  return e ? decodeURIComponent(e) : null;
2222
2175
  }
2223
2176
  function ut() {
2224
2177
  window.history.replaceState({}, "", window.location.pathname);
2225
2178
  }
2226
- function On(t, e, r, n) {
2179
+ function In(t, e, r, n) {
2227
2180
  const o = n ?? window.location.origin + window.location.pathname + window.location.search;
2228
2181
  return `${r}/oauth/${t}?space=${encodeURIComponent(e)}&return=${encodeURIComponent(o)}`;
2229
2182
  }
2230
- async function _n(t) {
2183
+ async function On(t) {
2231
2184
  const e = await fetch(`${t}/passkey/registration/options`, {
2232
2185
  method: "POST",
2233
2186
  headers: { "Content-Type": "application/json" }
@@ -2238,7 +2191,7 @@ async function _n(t) {
2238
2191
  }
2239
2192
  return e.json();
2240
2193
  }
2241
- async function Pn(t, e, r) {
2194
+ async function Nn(t, e, r) {
2242
2195
  const n = await fetch(`${t}/passkey/registration/verify`, {
2243
2196
  method: "POST",
2244
2197
  headers: { "Content-Type": "application/json" },
@@ -2253,9 +2206,9 @@ async function Pn(t, e, r) {
2253
2206
  provider: "passkey",
2254
2207
  authenticatedAt: Date.now()
2255
2208
  };
2256
- return Ae(s), s;
2209
+ return Re(s), s;
2257
2210
  }
2258
- async function jn(t, e) {
2211
+ async function _n(t, e) {
2259
2212
  const r = await fetch(`${t}/passkey/authentication/options`, {
2260
2213
  method: "POST",
2261
2214
  headers: { "Content-Type": "application/json" },
@@ -2267,7 +2220,7 @@ async function jn(t, e) {
2267
2220
  }
2268
2221
  return r.json();
2269
2222
  }
2270
- async function Mn(t, e) {
2223
+ async function Pn(t, e) {
2271
2224
  const r = await fetch(`${t}/passkey/authentication/verify`, {
2272
2225
  method: "POST",
2273
2226
  headers: { "Content-Type": "application/json" },
@@ -2282,32 +2235,32 @@ async function Mn(t, e) {
2282
2235
  provider: "passkey",
2283
2236
  authenticatedAt: Date.now()
2284
2237
  };
2285
- return Ae(o), o;
2238
+ return Re(o), o;
2286
2239
  }
2287
- function q(t) {
2240
+ function W(t) {
2288
2241
  const e = new Uint8Array(t);
2289
2242
  let r = "";
2290
2243
  for (const o of e)
2291
2244
  r += String.fromCharCode(o);
2292
2245
  return btoa(r).replace(/\+/g, "-").replace(/\//g, "_").replace(/=/g, "");
2293
2246
  }
2294
- function ve(t) {
2247
+ function Se(t) {
2295
2248
  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);
2296
2249
  for (let a = 0; a < o.length; a++)
2297
2250
  i[a] = o.charCodeAt(a);
2298
2251
  return s;
2299
2252
  }
2300
2253
  function Ke() {
2301
- return Un.stubThis(globalThis?.PublicKeyCredential !== void 0 && typeof globalThis.PublicKeyCredential == "function");
2254
+ return jn.stubThis(globalThis?.PublicKeyCredential !== void 0 && typeof globalThis.PublicKeyCredential == "function");
2302
2255
  }
2303
- const Un = {
2256
+ const jn = {
2304
2257
  stubThis: (t) => t
2305
2258
  };
2306
2259
  function wt(t) {
2307
2260
  const { id: e } = t;
2308
2261
  return {
2309
2262
  ...t,
2310
- id: ve(e),
2263
+ id: Se(e),
2311
2264
  /**
2312
2265
  * `descriptor.transports` is an array of our `AuthenticatorTransportFuture` that includes newer
2313
2266
  * transports that TypeScript's DOM lib is ignorant of. Convince TS that our list of transports
@@ -2332,7 +2285,7 @@ class _ extends Error {
2332
2285
  }), this.name = o ?? n.name, this.code = r;
2333
2286
  }
2334
2287
  }
2335
- function Ln({ error: t, options: e }) {
2288
+ function Mn({ error: t, options: e }) {
2336
2289
  const { publicKey: r } = e;
2337
2290
  if (!r)
2338
2291
  throw Error("options was missing required publicKey property");
@@ -2418,7 +2371,7 @@ function Ln({ error: t, options: e }) {
2418
2371
  }
2419
2372
  return t;
2420
2373
  }
2421
- class xn {
2374
+ class Un {
2422
2375
  constructor() {
2423
2376
  Object.defineProperty(this, "controller", {
2424
2377
  enumerable: !0,
@@ -2442,22 +2395,22 @@ class xn {
2442
2395
  }
2443
2396
  }
2444
2397
  }
2445
- const Rt = new xn(), Dn = ["cross-platform", "platform"];
2398
+ const Rt = new Un(), Ln = ["cross-platform", "platform"];
2446
2399
  function Et(t) {
2447
- if (t && !(Dn.indexOf(t) < 0))
2400
+ if (t && !(Ln.indexOf(t) < 0))
2448
2401
  return t;
2449
2402
  }
2450
- async function Fn(t) {
2403
+ async function xn(t) {
2451
2404
  !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 });
2452
2405
  const { optionsJSON: e, useAutoRegister: r = !1 } = t;
2453
2406
  if (!Ke())
2454
2407
  throw new Error("WebAuthn is not supported in this browser");
2455
2408
  const n = {
2456
2409
  ...e,
2457
- challenge: ve(e.challenge),
2410
+ challenge: Se(e.challenge),
2458
2411
  user: {
2459
2412
  ...e.user,
2460
- id: ve(e.user.id)
2413
+ id: Se(e.user.id)
2461
2414
  },
2462
2415
  excludeCredentials: e.excludeCredentials?.map(wt)
2463
2416
  }, o = {};
@@ -2466,7 +2419,7 @@ async function Fn(t) {
2466
2419
  try {
2467
2420
  s = await navigator.credentials.create(o);
2468
2421
  } catch (S) {
2469
- throw Ln({ error: S, options: o });
2422
+ throw Mn({ error: S, options: o });
2470
2423
  }
2471
2424
  if (!s)
2472
2425
  throw new Error("Registration was not completed");
@@ -2478,29 +2431,29 @@ async function Fn(t) {
2478
2431
  try {
2479
2432
  h = c.getPublicKeyAlgorithm();
2480
2433
  } catch (S) {
2481
- Oe("getPublicKeyAlgorithm()", S);
2434
+ Ie("getPublicKeyAlgorithm()", S);
2482
2435
  }
2483
2436
  let d;
2484
2437
  if (typeof c.getPublicKey == "function")
2485
2438
  try {
2486
2439
  const S = c.getPublicKey();
2487
- S !== null && (d = q(S));
2440
+ S !== null && (d = W(S));
2488
2441
  } catch (S) {
2489
- Oe("getPublicKey()", S);
2442
+ Ie("getPublicKey()", S);
2490
2443
  }
2491
2444
  let y;
2492
2445
  if (typeof c.getAuthenticatorData == "function")
2493
2446
  try {
2494
- y = q(c.getAuthenticatorData());
2447
+ y = W(c.getAuthenticatorData());
2495
2448
  } catch (S) {
2496
- Oe("getAuthenticatorData()", S);
2449
+ Ie("getAuthenticatorData()", S);
2497
2450
  }
2498
2451
  return {
2499
2452
  id: i,
2500
- rawId: q(a),
2453
+ rawId: W(a),
2501
2454
  response: {
2502
- attestationObject: q(c.attestationObject),
2503
- clientDataJSON: q(c.clientDataJSON),
2455
+ attestationObject: W(c.attestationObject),
2456
+ clientDataJSON: W(c.clientDataJSON),
2504
2457
  transports: l,
2505
2458
  publicKeyAlgorithm: h,
2506
2459
  publicKey: d,
@@ -2511,20 +2464,20 @@ async function Fn(t) {
2511
2464
  authenticatorAttachment: Et(s.authenticatorAttachment)
2512
2465
  };
2513
2466
  }
2514
- function Oe(t, e) {
2467
+ function Ie(t, e) {
2515
2468
  console.warn(`The browser extension that intercepted this WebAuthn API call incorrectly implemented ${t}. You should report this error to them.
2516
2469
  `, e);
2517
2470
  }
2518
- function $n() {
2471
+ function Dn() {
2519
2472
  if (!Ke())
2520
- return _e.stubThis(new Promise((e) => e(!1)));
2473
+ return Oe.stubThis(new Promise((e) => e(!1)));
2521
2474
  const t = globalThis.PublicKeyCredential;
2522
- return t?.isConditionalMediationAvailable === void 0 ? _e.stubThis(new Promise((e) => e(!1))) : _e.stubThis(t.isConditionalMediationAvailable());
2475
+ return t?.isConditionalMediationAvailable === void 0 ? Oe.stubThis(new Promise((e) => e(!1))) : Oe.stubThis(t.isConditionalMediationAvailable());
2523
2476
  }
2524
- const _e = {
2477
+ const Oe = {
2525
2478
  stubThis: (t) => t
2526
2479
  };
2527
- function Bn({ error: t, options: e }) {
2480
+ function Fn({ error: t, options: e }) {
2528
2481
  const { publicKey: r } = e;
2529
2482
  if (!r)
2530
2483
  throw Error("options was missing required publicKey property");
@@ -2565,7 +2518,7 @@ function Bn({ error: t, options: e }) {
2565
2518
  }
2566
2519
  return t;
2567
2520
  }
2568
- async function Vn(t) {
2521
+ async function $n(t) {
2569
2522
  !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 });
2570
2523
  const { optionsJSON: e, useBrowserAutofill: r = !1, verifyBrowserAutofillInput: n = !0 } = t;
2571
2524
  if (!Ke())
@@ -2574,11 +2527,11 @@ async function Vn(t) {
2574
2527
  e.allowCredentials?.length !== 0 && (o = e.allowCredentials?.map(wt));
2575
2528
  const s = {
2576
2529
  ...e,
2577
- challenge: ve(e.challenge),
2530
+ challenge: Se(e.challenge),
2578
2531
  allowCredentials: o
2579
2532
  }, i = {};
2580
2533
  if (r) {
2581
- if (!await $n())
2534
+ if (!await Dn())
2582
2535
  throw Error("Browser does not support WebAuthn autofill");
2583
2536
  if (document.querySelectorAll("input[autocomplete$='webauthn']").length < 1 && n)
2584
2537
  throw Error('No <input> with "webauthn" as the only or last value in its `autocomplete` attribute was detected');
@@ -2589,19 +2542,19 @@ async function Vn(t) {
2589
2542
  try {
2590
2543
  a = await navigator.credentials.get(i);
2591
2544
  } catch (y) {
2592
- throw Bn({ error: y, options: i });
2545
+ throw Fn({ error: y, options: i });
2593
2546
  }
2594
2547
  if (!a)
2595
2548
  throw new Error("Authentication was not completed");
2596
2549
  const { id: c, rawId: f, response: l, type: h } = a;
2597
2550
  let d;
2598
- return l.userHandle && (d = q(l.userHandle)), {
2551
+ return l.userHandle && (d = W(l.userHandle)), {
2599
2552
  id: c,
2600
- rawId: q(f),
2553
+ rawId: W(f),
2601
2554
  response: {
2602
- authenticatorData: q(l.authenticatorData),
2603
- clientDataJSON: q(l.clientDataJSON),
2604
- signature: q(l.signature),
2555
+ authenticatorData: W(l.authenticatorData),
2556
+ clientDataJSON: W(l.clientDataJSON),
2557
+ signature: W(l.signature),
2605
2558
  userHandle: d
2606
2559
  },
2607
2560
  type: h,
@@ -2610,7 +2563,7 @@ async function Vn(t) {
2610
2563
  };
2611
2564
  }
2612
2565
  const ze = lt(null);
2613
- function oo({ children: t, config: e }) {
2566
+ function ro({ children: t, config: e }) {
2614
2567
  const [r, n] = ee({
2615
2568
  isAuthenticated: !1,
2616
2569
  isLoading: !0,
@@ -2619,7 +2572,7 @@ function oo({ children: t, config: e }) {
2619
2572
  });
2620
2573
  F(() => {
2621
2574
  (() => {
2622
- const l = Nn();
2575
+ const l = Cn();
2623
2576
  if (l) {
2624
2577
  ut(), n({
2625
2578
  isAuthenticated: !1,
@@ -2629,17 +2582,17 @@ function oo({ children: t, config: e }) {
2629
2582
  });
2630
2583
  return;
2631
2584
  }
2632
- const h = In();
2585
+ const h = Tn();
2633
2586
  if (h) {
2634
2587
  const y = {
2635
2588
  token: h.token,
2636
2589
  provider: h.provider,
2637
2590
  authenticatedAt: Date.now()
2638
2591
  };
2639
- Ae(y), ut(), n({
2592
+ Re(y), ut(), n({
2640
2593
  isAuthenticated: !0,
2641
2594
  isLoading: !1,
2642
- user: fe(y),
2595
+ user: de(y),
2643
2596
  error: null
2644
2597
  });
2645
2598
  return;
@@ -2649,7 +2602,7 @@ function oo({ children: t, config: e }) {
2649
2602
  n({
2650
2603
  isAuthenticated: !0,
2651
2604
  isLoading: !1,
2652
- user: fe(d),
2605
+ user: de(d),
2653
2606
  error: null
2654
2607
  });
2655
2608
  return;
@@ -2671,7 +2624,7 @@ function oo({ children: t, config: e }) {
2671
2624
  }));
2672
2625
  return;
2673
2626
  }
2674
- const l = e.authUrl ?? je();
2627
+ const l = e.authUrl ?? _e();
2675
2628
  if (f === "guest") {
2676
2629
  n((d) => ({ ...d, isLoading: !0 }));
2677
2630
  try {
@@ -2679,7 +2632,7 @@ function oo({ children: t, config: e }) {
2679
2632
  n({
2680
2633
  isAuthenticated: !0,
2681
2634
  isLoading: !1,
2682
- user: fe(d),
2635
+ user: de(d),
2683
2636
  error: null
2684
2637
  });
2685
2638
  } catch (d) {
@@ -2694,11 +2647,11 @@ function oo({ children: t, config: e }) {
2694
2647
  if (f === "passkey") {
2695
2648
  n((d) => ({ ...d, isLoading: !0, error: null }));
2696
2649
  try {
2697
- const d = await jn(l), y = await Vn({ optionsJSON: d }), S = await Mn(l, y);
2650
+ const d = await _n(l), y = await $n({ optionsJSON: d }), S = await Pn(l, y);
2698
2651
  n({
2699
2652
  isAuthenticated: !0,
2700
2653
  isLoading: !1,
2701
- user: fe(S),
2654
+ user: de(S),
2702
2655
  error: null
2703
2656
  });
2704
2657
  } catch (d) {
@@ -2710,7 +2663,7 @@ function oo({ children: t, config: e }) {
2710
2663
  }
2711
2664
  return;
2712
2665
  }
2713
- const h = On(f, e.spaceId, l);
2666
+ const h = In(f, e.spaceId, l);
2714
2667
  window.location.href = h;
2715
2668
  },
2716
2669
  [e.authUrl, e.spaceId]
@@ -2723,14 +2676,14 @@ function oo({ children: t, config: e }) {
2723
2676
  });
2724
2677
  }, []), i = B(
2725
2678
  async (f) => {
2726
- const l = e.authUrl ?? je();
2679
+ const l = e.authUrl ?? _e();
2727
2680
  n((h) => ({ ...h, isLoading: !0, error: null }));
2728
2681
  try {
2729
- const h = await _n(l), d = await Fn({ optionsJSON: h }), y = await Pn(l, d, f);
2682
+ const h = await On(l), d = await xn({ optionsJSON: h }), y = await Nn(l, d, f);
2730
2683
  n({
2731
2684
  isAuthenticated: !0,
2732
2685
  isLoading: !1,
2733
- user: fe(y),
2686
+ user: de(y),
2734
2687
  error: null
2735
2688
  });
2736
2689
  } catch (h) {
@@ -2752,19 +2705,19 @@ function oo({ children: t, config: e }) {
2752
2705
  }),
2753
2706
  [r, o, s, a, i]
2754
2707
  );
2755
- return /* @__PURE__ */ R.jsx(ze, { value: c, children: t });
2708
+ return /* @__PURE__ */ E.jsx(ze, { value: c, children: t });
2756
2709
  }
2757
- function Kn() {
2758
- const t = Be(ze);
2710
+ function Bn() {
2711
+ const t = Fe(ze);
2759
2712
  if (!t)
2760
2713
  throw new Error("useAuth must be used within an AuthProvider");
2761
2714
  return t;
2762
2715
  }
2763
- function so() {
2764
- return Be(ze);
2716
+ function no() {
2717
+ return Fe(ze);
2765
2718
  }
2766
- function io(t) {
2767
- const { config: e, guestUrlParam: r } = t, { state: n, login: o } = Kn(), s = w(!1);
2719
+ function oo(t) {
2720
+ const { config: e, guestUrlParam: r } = t, { state: n, login: o } = Bn(), s = w(!1);
2768
2721
  return F(() => {
2769
2722
  if (!r || n.isAuthenticated || n.isLoading || s.current || !e.methods.includes("guest"))
2770
2723
  return;
@@ -2781,7 +2734,7 @@ function io(t) {
2781
2734
  error: n.error
2782
2735
  };
2783
2736
  }
2784
- function ao({
2737
+ function so({
2785
2738
  connectionState: t,
2786
2739
  error: e,
2787
2740
  isReady: r,
@@ -2820,50 +2773,50 @@ function ao({
2820
2773
  return null;
2821
2774
  }
2822
2775
  }
2823
- const Pe = Re("useIkonApp");
2824
- function co(t) {
2825
- const { authConfig: e, localServer: r, modules: n, registerModules: o, onJoined: s, onConnectionStateChange: i, onError: a, updateUrlOnJoin: c = !0, timeouts: f, audio: l, video: h, mediaSession: d, debug: y } = t, S = w(null), b = w(null), m = w(null), p = w(!1), A = w(l), P = w(h), j = w(d), V = w(y), G = w(f), Z = w(i), k = w(a), C = w(s), M = w(c);
2826
- A.current = l, P.current = h, j.current = d, V.current = y, G.current = f, Z.current = i, k.current = a, C.current = s, M.current = c;
2827
- const [I, L] = ee("idle"), [W, te] = ee(null), [oe, pe] = ee(null), [H, ge] = ee(null), [se, u] = ee(!1), g = z(() => {
2776
+ const Ne = be("useIkonApp");
2777
+ function io(t) {
2778
+ const { authConfig: e, localServer: r, modules: n, registerModules: o, onJoined: s, onConnectionStateChange: i, onError: a, updateUrlOnJoin: c = !0, timeouts: f, audio: l, video: h, mediaSession: d, debug: y } = t, S = w(null), b = w(null), m = w(null), p = w(!1), A = w(l), P = w(h), j = w(d), V = w(y), J = w(f), Z = w(i), k = w(a), C = w(s), M = w(c);
2779
+ A.current = l, P.current = h, j.current = d, V.current = y, J.current = f, Z.current = i, k.current = a, C.current = s, M.current = c;
2780
+ const [I, L] = ee("idle"), [Y, te] = ee(null), [ne, fe] = ee(null), [G, he] = ee(null), [oe, u] = ee(!1), g = z(() => {
2828
2781
  try {
2829
- return Nt();
2782
+ return Ot();
2830
2783
  } catch {
2831
2784
  return { parameters: {} };
2832
2785
  }
2833
- }, []), E = z(() => e?.enabled ? yt() : null, [e?.enabled]), T = r?.enabled ?? !1, K = r?.host ?? "localhost", x = r?.httpsPort ?? 8443;
2786
+ }, []), R = z(() => e?.enabled ? yt() : null, [e?.enabled]), T = r?.enabled ?? !1, K = r?.host ?? "localhost", x = r?.httpsPort ?? 8443;
2834
2787
  F(() => {
2835
- !T && Ye() && e && !e.enabled && e.spaceId && !H && !se && (u(!0), bt(e.spaceId, e.authUrl ?? je()).then((U) => {
2836
- ge(U.token);
2788
+ !T && Ye() && e && !e.enabled && e.spaceId && !G && !oe && (u(!0), bt(e.spaceId, e.authUrl ?? _e()).then((U) => {
2789
+ he(U.token);
2837
2790
  }).catch((U) => {
2838
- Pe.error("Anonymous auth failed:", U), te(U instanceof Error ? U.message : "Anonymous auth failed");
2791
+ Ne.error("Anonymous auth failed:", U), te(U instanceof Error ? U.message : "Anonymous auth failed");
2839
2792
  }).finally(() => {
2840
2793
  u(!1);
2841
2794
  }));
2842
- }, [T, e, H, se]);
2795
+ }, [T, e, G, oe]);
2843
2796
  const Q = z(() => {
2844
2797
  if (T) {
2845
- const O = E?.token ? Ot(E.token) ?? Se() : Se();
2798
+ const N = R?.token ? Nt(R.token) ?? pe() : pe();
2846
2799
  return {
2847
2800
  local: {
2848
2801
  host: K,
2849
2802
  httpsPort: x,
2850
- userId: O,
2803
+ userId: N,
2851
2804
  parameters: g.parameters
2852
2805
  }
2853
2806
  };
2854
2807
  }
2855
- return E?.token && e?.spaceId ? {
2808
+ return R?.token && e?.spaceId ? {
2856
2809
  sessionToken: {
2857
- token: E.token,
2810
+ token: R.token,
2858
2811
  spaceId: e.spaceId,
2859
2812
  backendType: We(),
2860
2813
  sessionId: g.sessionId,
2861
2814
  channelKey: g.channelKey,
2862
2815
  parameters: g.parameters
2863
2816
  }
2864
- } : H && e?.spaceId ? {
2817
+ } : G && e?.spaceId ? {
2865
2818
  sessionToken: {
2866
- token: H,
2819
+ token: G,
2867
2820
  spaceId: e.spaceId,
2868
2821
  backendType: We(),
2869
2822
  sessionId: g.sessionId,
@@ -2874,28 +2827,28 @@ function co(t) {
2874
2827
  local: {
2875
2828
  host: K,
2876
2829
  httpsPort: x,
2877
- userId: Se(),
2830
+ userId: pe(),
2878
2831
  parameters: g.parameters
2879
2832
  }
2880
2833
  };
2881
- }, [T, K, x, E?.token, e?.spaceId, H, g.sessionId, g.channelKey, g.parameters]);
2882
- xr(oe);
2883
- const ie = Fr(oe);
2834
+ }, [T, K, x, R?.token, e?.spaceId, G, g.sessionId, g.channelKey, g.parameters]);
2835
+ Ur(ne);
2836
+ const se = xr(ne);
2884
2837
  F(() => {
2885
2838
  if (!p.current) {
2886
- if (p.current = !0, m.current = Nr(), n)
2887
- for (const O of n)
2888
- O(m.current);
2889
- o?.(m.current), m.current.loadRegisteredModules().catch((O) => {
2890
- Pe.error("Failed to load UI modules", O);
2839
+ if (p.current = !0, m.current = Cr(), n)
2840
+ for (const N of n)
2841
+ N(m.current);
2842
+ o?.(m.current), m.current.loadRegisteredModules().catch((N) => {
2843
+ Ne.error("Failed to load UI modules", N);
2891
2844
  });
2892
2845
  }
2893
2846
  }, []), F(() => {
2894
2847
  if (!Q) return;
2895
- const O = new _t({
2848
+ const N = new _t({
2896
2849
  ...Q,
2897
2850
  debug: V.current,
2898
- timeouts: G.current,
2851
+ timeouts: J.current,
2899
2852
  audio: A.current,
2900
2853
  video: P.current,
2901
2854
  mediaSession: j.current,
@@ -2906,36 +2859,36 @@ function co(t) {
2906
2859
  te($.message), k.current?.($);
2907
2860
  },
2908
2861
  onJoined: () => {
2909
- const $ = O.globalState?.SessionId;
2862
+ const $ = N.globalState?.SessionId;
2910
2863
  M.current && $ && window.history.replaceState(null, "", `/s/${$}${window.location.search}`), C.current?.($);
2911
2864
  }
2912
2865
  });
2913
- S.current = O;
2914
- const U = new qt({ client: O });
2915
- return b.current = U, pe(U), O.connect().catch(($) => {
2916
- Pe.error("Connection failed:", $);
2866
+ S.current = N;
2867
+ const U = new qt({ client: N });
2868
+ return b.current = U, fe(U), N.connect().catch(($) => {
2869
+ Ne.error("Connection failed:", $);
2917
2870
  }), () => {
2918
- O.disconnect(), S.current = null, U.dispose(), b.current = null;
2871
+ N.disconnect(), S.current = null, U.dispose(), b.current = null;
2919
2872
  };
2920
2873
  }, [Q]);
2921
- const N = B((O, U) => {
2874
+ const O = B((N, U) => {
2922
2875
  const $ = typeof U == "string" ? U : JSON.stringify(U ?? {});
2923
- S.current?.sendActionCall(O, $);
2924
- }, []), X = I === "connected" || I === "reconnecting";
2876
+ S.current?.sendActionCall(N, $);
2877
+ }, []), H = I === "connected" || I === "reconnecting";
2925
2878
  return {
2926
2879
  connectionState: I,
2927
- error: W,
2928
- stores: ie,
2880
+ error: Y,
2881
+ stores: se,
2929
2882
  client: S.current,
2930
2883
  registry: m.current,
2931
2884
  clientRef: S,
2932
2885
  uiRef: b,
2933
2886
  registryRef: m,
2934
- onAction: N,
2935
- isReady: X
2887
+ onAction: O,
2888
+ isReady: H
2936
2889
  };
2937
2890
  }
2938
- function uo(t) {
2891
+ function ao(t) {
2939
2892
  const e = w(!1);
2940
2893
  return B(() => {
2941
2894
  if (e.current) return;
@@ -2945,98 +2898,98 @@ function uo(t) {
2945
2898
  }, [t]);
2946
2899
  }
2947
2900
  const At = lt(null);
2948
- function zn(t, e) {
2901
+ function Vn(t, e) {
2949
2902
  return e ? t.replace(/\{(\w+)\}/g, (r, n) => e[n] ?? `{${n}}`) : t;
2950
2903
  }
2951
- function Yn(t, e) {
2904
+ function Kn(t, e) {
2952
2905
  const n = new URLSearchParams(window.location.search).get("lang");
2953
2906
  if (n && t.includes(n))
2954
2907
  return n;
2955
2908
  const o = navigator.language.split("-")[0];
2956
2909
  return t.includes(o) ? o : e && t.includes(e) ? e : "en";
2957
2910
  }
2958
- function Wn(t, e, r) {
2959
- return e ? Yn(t, r) : r && t.includes(r) ? r : "en";
2911
+ function zn(t, e, r) {
2912
+ return e ? Kn(t, r) : r && t.includes(r) ? r : "en";
2960
2913
  }
2961
- function lo({
2914
+ function co({
2962
2915
  children: t,
2963
2916
  translations: e,
2964
2917
  defaultLanguage: r,
2965
2918
  detectLanguage: n = !1
2966
2919
  }) {
2967
- const o = Object.keys(e), s = Wn(o, n, r), i = e[s] ?? e.en, a = z(
2920
+ const o = Object.keys(e), s = zn(o, n, r), i = e[s] ?? e.en, a = z(
2968
2921
  () => ({
2969
2922
  t: (c, f) => {
2970
2923
  const l = i[c];
2971
- return zn(l, f);
2924
+ return Vn(l, f);
2972
2925
  },
2973
2926
  locale: s,
2974
2927
  translations: i
2975
2928
  }),
2976
2929
  [i, s]
2977
2930
  );
2978
- return /* @__PURE__ */ R.jsx(At, { value: a, children: t });
2931
+ return /* @__PURE__ */ E.jsx(At, { value: a, children: t });
2979
2932
  }
2980
- function fo() {
2981
- const t = Be(At);
2933
+ function uo() {
2934
+ const t = Fe(At);
2982
2935
  if (!t)
2983
2936
  throw new Error("useI18n must be used within an I18nProvider");
2984
2937
  return t;
2985
2938
  }
2986
2939
  export {
2987
- oo as AuthProvider,
2988
- ao as ConnectionStateRenderer,
2989
- lo as I18nProvider,
2990
- rr as IKON_UI_BASE_MODULE,
2991
- lr as IKON_UI_MEDIA_MODULE,
2992
- kr as IKON_UI_SHADER_MODULE,
2993
- Er as IKON_UI_SHADER_TYPE,
2994
- Ue as IKON_UI_STREAM_CATEGORY,
2995
- sr as IKON_UI_VIDEO_CANVAS_TYPE,
2996
- ir as IKON_UI_VIDEO_URL_PLAYER_TYPE,
2940
+ ro as AuthProvider,
2941
+ so as ConnectionStateRenderer,
2942
+ co as I18nProvider,
2943
+ er as IKON_UI_BASE_MODULE,
2944
+ cr as IKON_UI_MEDIA_MODULE,
2945
+ Er as IKON_UI_SHADER_MODULE,
2946
+ vr as IKON_UI_SHADER_TYPE,
2947
+ je as IKON_UI_STREAM_CATEGORY,
2948
+ nr as IKON_UI_VIDEO_CANVAS_TYPE,
2949
+ or as IKON_UI_VIDEO_URL_PLAYER_TYPE,
2997
2950
  qt as IkonUi,
2998
- Ir as IkonUiRegistry,
2999
- Zn as IkonUiSurface,
2951
+ Tr as IkonUiRegistry,
2952
+ Hn as IkonUiSurface,
3000
2953
  Yt as UiComponentRegistry,
3001
2954
  zt as UiRenderer,
3002
- po as UiStreamStore,
3003
- Qn as areIkonUiModuleListsEqual,
2955
+ ho as UiStreamStore,
2956
+ Xn as areIkonUiModuleListsEqual,
3004
2957
  bt as authenticateAnonymous,
3005
- On as buildOAuthRedirectUrl,
2958
+ In as buildOAuthRedirectUrl,
3006
2959
  St as clearAuthSession,
3007
2960
  ut as clearOAuthParams,
3008
- tr as createBaseResolvers,
3009
- Hn as createComponentLibrary,
3010
- Nr as createIkonUiRegistry,
3011
- cr as createMediaResolvers,
3012
- Ar as createShaderRendererResolver,
2961
+ Qt as createBaseResolvers,
2962
+ Jn as createComponentLibrary,
2963
+ Cr as createIkonUiRegistry,
2964
+ ir as createMediaResolvers,
2965
+ Rr as createShaderRendererResolver,
3013
2966
  Wt as isIkonUiCategoryMatch,
3014
2967
  yt as loadAuthSession,
3015
- nr as loadBaseModule,
3016
- dr as loadMediaModule,
3017
- Tr as loadShaderModule,
3018
- rn as normalizeIkonUiModuleList,
3019
- to as parseIkonUiInitPayload,
3020
- In as parseOAuthCallback,
3021
- Nn as parseOAuthError,
3022
- nn as readIkonUiModules,
3023
- eo as readIkonUiModulesFromSources,
3024
- or as registerBaseModule,
3025
- fr as registerMediaModule,
3026
- Cr as registerShaderModule,
2968
+ tr as loadBaseModule,
2969
+ ur as loadMediaModule,
2970
+ Ar as loadShaderModule,
2971
+ en as normalizeIkonUiModuleList,
2972
+ Qn as parseIkonUiInitPayload,
2973
+ Tn as parseOAuthCallback,
2974
+ Cn as parseOAuthError,
2975
+ tn as readIkonUiModules,
2976
+ Zn as readIkonUiModulesFromSources,
2977
+ rr as registerBaseModule,
2978
+ lr as registerMediaModule,
2979
+ kr as registerShaderModule,
3027
2980
  Vt as renderChildren,
3028
- ro as renderMotionLetters,
3029
- Ae as saveAuthSession,
3030
- no as sendMagicLink,
3031
- fe as sessionToUser,
3032
- Kn as useAuth,
3033
- io as useAuthGuard,
3034
- so as useAuthOptional,
3035
- fo as useI18n,
3036
- co as useIkonApp,
3037
- xr as useIkonStyles,
3038
- Fr as useIkonUiStores,
3039
- uo as useLazyFont,
3040
- J as useUiNode,
3041
- Xn as useUiStore
2981
+ eo as renderMotionLetters,
2982
+ Re as saveAuthSession,
2983
+ to as sendMagicLink,
2984
+ de as sessionToUser,
2985
+ Bn as useAuth,
2986
+ oo as useAuthGuard,
2987
+ no as useAuthOptional,
2988
+ uo as useI18n,
2989
+ io as useIkonApp,
2990
+ Ur as useIkonStyles,
2991
+ xr as useIkonUiStores,
2992
+ ao as useLazyFont,
2993
+ X as useUiNode,
2994
+ Gn as useUiStore
3042
2995
  };