@ikonai/sdk-react-ui 0.0.36 → 0.0.38

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 mt, UiStreamStore as pt } from "@ikonai/sdk-ui";
2
- import { UiStreamStore as jn } from "@ikonai/sdk-ui";
3
- import gt, { useSyncExternalStore as Oe, useMemo as M, memo as L, useRef as R, useCallback as V, Fragment as yt, useEffect as $, useState as W, createContext as tt, use as Pe } from "react";
4
- import { createLogger as me, getOrCreateDeviceId as de, deriveAuthUrl as Re, parseUrlParams as St, isCloudEnvironment as Le, extractUserIdFromToken as bt, deriveBackendType as Ue, IkonClient as vt } from "@ikonai/sdk";
5
- var le = { exports: {} }, ee = {};
1
+ import { IkonUICore as pt, UiStreamStore as gt } from "@ikonai/sdk-ui";
2
+ import { UiStreamStore as On } from "@ikonai/sdk-ui";
3
+ import yt, { useSyncExternalStore as _e, useMemo as L, memo as U, useRef as E, useCallback as z, Fragment as St, useEffect as $, useState as Y, createContext as nt, use as Me } from "react";
4
+ import { createLogger as ye, getOrCreateDeviceId as me, deriveAuthUrl as Ne, parseUrlParams as bt, isCloudEnvironment as xe, extractUserIdFromToken as vt, deriveBackendType as $e, IkonClient as wt } from "@ikonai/sdk";
5
+ var he = { exports: {} }, ee = {};
6
6
  /**
7
7
  * @license React
8
8
  * react-jsx-runtime.production.js
@@ -12,10 +12,10 @@ var le = { exports: {} }, ee = {};
12
12
  * This source code is licensed under the MIT license found in the
13
13
  * LICENSE file in the root directory of this source tree.
14
14
  */
15
- var xe;
16
- function wt() {
17
- if (xe) return ee;
18
- xe = 1;
15
+ var Fe;
16
+ function Et() {
17
+ if (Fe) return ee;
18
+ Fe = 1;
19
19
  var r = Symbol.for("react.transitional.element"), e = Symbol.for("react.fragment");
20
20
  function t(n, o, s) {
21
21
  var i = null;
@@ -44,47 +44,47 @@ var te = {};
44
44
  * This source code is licensed under the MIT license found in the
45
45
  * LICENSE file in the root directory of this source tree.
46
46
  */
47
- var $e;
48
- function Et() {
49
- return $e || ($e = 1, process.env.NODE_ENV !== "production" && function() {
47
+ var Be;
48
+ function kt() {
49
+ return Be || (Be = 1, process.env.NODE_ENV !== "production" && function() {
50
50
  function r(c) {
51
51
  if (c == null) return null;
52
52
  if (typeof c == "function")
53
- return c.$$typeof === ce ? null : c.displayName || c.name || null;
53
+ return c.$$typeof === ue ? null : c.displayName || c.name || null;
54
54
  if (typeof c == "string") return c;
55
55
  switch (c) {
56
56
  case v:
57
57
  return "Fragment";
58
58
  case g:
59
59
  return "Profiler";
60
- case p:
60
+ case m:
61
61
  return "StrictMode";
62
- case U:
62
+ case x:
63
63
  return "Suspense";
64
- case z:
64
+ case D:
65
65
  return "SuspenseList";
66
- case ge:
66
+ case ce:
67
67
  return "Activity";
68
68
  }
69
69
  if (typeof c == "object")
70
70
  switch (typeof c.tag == "number" && console.error(
71
71
  "Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
72
72
  ), c.$$typeof) {
73
- case A:
73
+ case C:
74
74
  return "Portal";
75
- case O:
75
+ case P:
76
76
  return (c.displayName || "Context") + ".Provider";
77
- case E:
77
+ case w:
78
78
  return (c._context.displayName || "Context") + ".Consumer";
79
79
  case T:
80
- var m = c.render;
81
- return c = c.displayName, c || (c = m.displayName || m.name || "", c = c !== "" ? "ForwardRef(" + c + ")" : "ForwardRef"), c;
82
- case H:
83
- return m = c.displayName || null, m !== null ? m : r(c.type) || "Memo";
80
+ var h = c.render;
81
+ return c = c.displayName, c || (c = h.displayName || h.name || "", c = c !== "" ? "ForwardRef(" + c + ")" : "ForwardRef"), c;
84
82
  case ae:
85
- m = c._payload, c = c._init;
83
+ return h = c.displayName || null, h !== null ? h : r(c.type) || "Memo";
84
+ case H:
85
+ h = c._payload, c = c._init;
86
86
  try {
87
- return r(c(m));
87
+ return r(c(h));
88
88
  } catch {
89
89
  }
90
90
  }
@@ -96,71 +96,71 @@ function Et() {
96
96
  function t(c) {
97
97
  try {
98
98
  e(c);
99
- var m = !1;
99
+ var h = !1;
100
100
  } catch {
101
- m = !0;
101
+ h = !0;
102
102
  }
103
- if (m) {
104
- m = console;
105
- var w = m.error, N = typeof Symbol == "function" && Symbol.toStringTag && c[Symbol.toStringTag] || c.constructor.name || "Object";
106
- return w.call(
107
- m,
103
+ if (h) {
104
+ h = console;
105
+ var S = h.error, R = typeof Symbol == "function" && Symbol.toStringTag && c[Symbol.toStringTag] || c.constructor.name || "Object";
106
+ return S.call(
107
+ h,
108
108
  "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
109
- N
109
+ R
110
110
  ), e(c);
111
111
  }
112
112
  }
113
113
  function n(c) {
114
114
  if (c === v) return "<>";
115
- if (typeof c == "object" && c !== null && c.$$typeof === ae)
115
+ if (typeof c == "object" && c !== null && c.$$typeof === H)
116
116
  return "<...>";
117
117
  try {
118
- var m = r(c);
119
- return m ? "<" + m + ">" : "<...>";
118
+ var h = r(c);
119
+ return h ? "<" + h + ">" : "<...>";
120
120
  } catch {
121
121
  return "<...>";
122
122
  }
123
123
  }
124
124
  function o() {
125
- var c = Y.A;
125
+ var c = q.A;
126
126
  return c === null ? null : c.getOwner();
127
127
  }
128
128
  function s() {
129
129
  return Error("react-stack-top-frame");
130
130
  }
131
131
  function i(c) {
132
- if (ue.call(c, "key")) {
133
- var m = Object.getOwnPropertyDescriptor(c, "key").get;
134
- if (m && m.isReactWarning) return !1;
132
+ if (le.call(c, "key")) {
133
+ var h = Object.getOwnPropertyDescriptor(c, "key").get;
134
+ if (h && h.isReactWarning) return !1;
135
135
  }
136
136
  return c.key !== void 0;
137
137
  }
138
- function a(c, m) {
139
- function w() {
140
- Z || (Z = !0, console.error(
138
+ function a(c, h) {
139
+ function S() {
140
+ X || (X = !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
- m
142
+ h
143
143
  ));
144
144
  }
145
- w.isReactWarning = !0, Object.defineProperty(c, "key", {
146
- get: w,
145
+ S.isReactWarning = !0, Object.defineProperty(c, "key", {
146
+ get: S,
147
147
  configurable: !0
148
148
  });
149
149
  }
150
150
  function u() {
151
151
  var c = r(this.type);
152
- return Q[c] || (Q[c] = !0, console.error(
152
+ return de[c] || (de[c] = !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
  )), c = this.props.ref, c !== void 0 ? c : null;
155
155
  }
156
- function d(c, m, w, N, x, _, C, I) {
157
- return w = _.ref, c = {
156
+ function d(c, h, S, R, M, j, W, Q) {
157
+ return S = j.ref, c = {
158
158
  $$typeof: k,
159
159
  type: c,
160
- key: m,
161
- props: _,
162
- _owner: x
163
- }, (w !== void 0 ? w : null) !== null ? Object.defineProperty(c, "ref", {
160
+ key: h,
161
+ props: j,
162
+ _owner: M
163
+ }, (S !== void 0 ? S : null) !== null ? Object.defineProperty(c, "ref", {
164
164
  enumerable: !1,
165
165
  get: u
166
166
  }) : Object.defineProperty(c, "ref", { enumerable: !1, value: null }), c._store = {}, Object.defineProperty(c._store, "validated", {
@@ -177,113 +177,113 @@ function Et() {
177
177
  configurable: !1,
178
178
  enumerable: !1,
179
179
  writable: !0,
180
- value: C
180
+ value: W
181
181
  }), Object.defineProperty(c, "_debugTask", {
182
182
  configurable: !1,
183
183
  enumerable: !1,
184
184
  writable: !0,
185
- value: I
185
+ value: Q
186
186
  }), Object.freeze && (Object.freeze(c.props), Object.freeze(c)), c;
187
187
  }
188
- function l(c, m, w, N, x, _, C, I) {
189
- var y = m.children;
190
- if (y !== void 0)
191
- if (N)
192
- if (D(y)) {
193
- for (N = 0; N < y.length; N++)
194
- f(y[N]);
195
- Object.freeze && Object.freeze(y);
188
+ function l(c, h, S, R, M, j, W, Q) {
189
+ var A = h.children;
190
+ if (A !== void 0)
191
+ if (R)
192
+ if (be(A)) {
193
+ for (R = 0; R < A.length; R++)
194
+ f(A[R]);
195
+ Object.freeze && Object.freeze(A);
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 f(y);
201
- if (ue.call(m, "key")) {
202
- y = r(c);
203
- var J = Object.keys(m).filter(function(ht) {
204
- return ht !== "key";
200
+ else f(A);
201
+ if (le.call(h, "key")) {
202
+ A = r(c);
203
+ var V = Object.keys(h).filter(function(I) {
204
+ return I !== "key";
205
205
  });
206
- N = 0 < J.length ? "{key: someKey, " + J.join(": ..., ") + ": ...}" : "{key: someKey}", q[y + N] || (J = 0 < J.length ? "{" + J.join(": ..., ") + ": ...}" : "{}", console.error(
206
+ R = 0 < V.length ? "{key: someKey, " + V.join(": ..., ") + ": ...}" : "{key: someKey}", Z[A + R] || (V = 0 < V.length ? "{" + V.join(": ..., ") + ": ...}" : "{}", console.error(
207
207
  `A props object containing a "key" prop is being spread into JSX:
208
208
  let props = %s;
209
209
  <%s {...props} />
210
210
  React keys must be passed directly to JSX without using spread:
211
211
  let props = %s;
212
212
  <%s key={someKey} {...props} />`,
213
- N,
214
- y,
215
- J,
216
- y
217
- ), q[y + N] = !0);
213
+ R,
214
+ A,
215
+ V,
216
+ A
217
+ ), Z[A + R] = !0);
218
218
  }
219
- if (y = null, w !== void 0 && (t(w), y = "" + w), i(m) && (t(m.key), y = "" + m.key), "key" in m) {
220
- w = {};
221
- for (var ye in m)
222
- ye !== "key" && (w[ye] = m[ye]);
223
- } else w = m;
224
- return y && a(
225
- w,
219
+ if (A = null, S !== void 0 && (t(S), A = "" + S), i(h) && (t(h.key), A = "" + h.key), "key" in h) {
220
+ S = {};
221
+ for (var N in h)
222
+ N !== "key" && (S[N] = h[N]);
223
+ } else S = h;
224
+ return A && a(
225
+ S,
226
226
  typeof c == "function" ? c.displayName || c.name || "Unknown" : c
227
227
  ), d(
228
228
  c,
229
- y,
230
- _,
231
- x,
229
+ A,
230
+ j,
231
+ M,
232
232
  o(),
233
- w,
234
- C,
235
- I
233
+ S,
234
+ W,
235
+ Q
236
236
  );
237
237
  }
238
238
  function f(c) {
239
239
  typeof c == "object" && c !== null && c.$$typeof === k && c._store && (c._store.validated = 1);
240
240
  }
241
- var h = gt, k = Symbol.for("react.transitional.element"), A = Symbol.for("react.portal"), v = Symbol.for("react.fragment"), p = Symbol.for("react.strict_mode"), g = Symbol.for("react.profiler"), E = Symbol.for("react.consumer"), O = Symbol.for("react.context"), T = Symbol.for("react.forward_ref"), U = Symbol.for("react.suspense"), z = Symbol.for("react.suspense_list"), H = Symbol.for("react.memo"), ae = Symbol.for("react.lazy"), ge = Symbol.for("react.activity"), ce = Symbol.for("react.client.reference"), Y = h.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, ue = Object.prototype.hasOwnProperty, D = Array.isArray, X = console.createTask ? console.createTask : function() {
241
+ var p = yt, k = Symbol.for("react.transitional.element"), C = Symbol.for("react.portal"), v = Symbol.for("react.fragment"), m = Symbol.for("react.strict_mode"), g = Symbol.for("react.profiler"), w = Symbol.for("react.consumer"), P = Symbol.for("react.context"), T = Symbol.for("react.forward_ref"), x = Symbol.for("react.suspense"), D = Symbol.for("react.suspense_list"), ae = Symbol.for("react.memo"), H = Symbol.for("react.lazy"), ce = Symbol.for("react.activity"), ue = Symbol.for("react.client.reference"), q = p.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, le = Object.prototype.hasOwnProperty, be = Array.isArray, J = console.createTask ? console.createTask : function() {
242
242
  return null;
243
243
  };
244
- h = {
244
+ p = {
245
245
  "react-stack-bottom-frame": function(c) {
246
246
  return c();
247
247
  }
248
248
  };
249
- var Z, Q = {}, P = h["react-stack-bottom-frame"].bind(
250
- h,
249
+ var X, de = {}, B = p["react-stack-bottom-frame"].bind(
250
+ p,
251
251
  s
252
- )(), B = X(n(s)), q = {};
253
- te.Fragment = v, te.jsx = function(c, m, w, N, x) {
254
- var _ = 1e4 > Y.recentlyCreatedOwnerStacks++;
252
+ )(), fe = J(n(s)), Z = {};
253
+ te.Fragment = v, te.jsx = function(c, h, S, R, M) {
254
+ var j = 1e4 > q.recentlyCreatedOwnerStacks++;
255
255
  return l(
256
256
  c,
257
- m,
258
- w,
257
+ h,
258
+ S,
259
259
  !1,
260
- N,
261
- x,
262
- _ ? Error("react-stack-top-frame") : P,
263
- _ ? X(n(c)) : B
260
+ R,
261
+ M,
262
+ j ? Error("react-stack-top-frame") : B,
263
+ j ? J(n(c)) : fe
264
264
  );
265
- }, te.jsxs = function(c, m, w, N, x) {
266
- var _ = 1e4 > Y.recentlyCreatedOwnerStacks++;
265
+ }, te.jsxs = function(c, h, S, R, M) {
266
+ var j = 1e4 > q.recentlyCreatedOwnerStacks++;
267
267
  return l(
268
268
  c,
269
- m,
270
- w,
269
+ h,
270
+ S,
271
271
  !0,
272
- N,
273
- x,
274
- _ ? Error("react-stack-top-frame") : P,
275
- _ ? X(n(c)) : B
272
+ R,
273
+ M,
274
+ j ? Error("react-stack-top-frame") : B,
275
+ j ? J(n(c)) : fe
276
276
  );
277
277
  };
278
278
  }()), te;
279
279
  }
280
- var Fe;
281
- function kt() {
282
- return Fe || (Fe = 1, process.env.NODE_ENV === "production" ? le.exports = wt() : le.exports = Et()), le.exports;
280
+ var Ve;
281
+ function Rt() {
282
+ return Ve || (Ve = 1, process.env.NODE_ENV === "production" ? he.exports = Et() : he.exports = kt()), he.exports;
283
283
  }
284
- var b = kt();
285
- function Rt(r, e) {
286
- const t = Oe(
284
+ var b = Rt();
285
+ function At(r, e) {
286
+ const t = _e(
287
287
  (n) => r.subscribe(n),
288
288
  () => {
289
289
  const n = r.getSnapshot(), o = e ?? n.rootViewId, s = o ? n.views.get(o) : void 0;
@@ -294,7 +294,7 @@ function Rt(r, e) {
294
294
  return `${o ?? ""}:${s?.id ?? ""}`;
295
295
  }
296
296
  );
297
- return M(() => {
297
+ return L(() => {
298
298
  const [n, o] = t.split(":");
299
299
  return {
300
300
  rootViewId: n || void 0,
@@ -303,15 +303,15 @@ function Rt(r, e) {
303
303
  }, [t]);
304
304
  }
305
305
  function F(r, e) {
306
- const t = Oe(
306
+ const t = _e(
307
307
  (n) => r.subscribeNode(e, n),
308
308
  () => r.getNodeVersion(e),
309
309
  () => r.getNodeVersion(e)
310
310
  );
311
- return M(() => r.getNode(e), [r, e, t]);
311
+ return L(() => r.getNode(e), [r, e, t]);
312
312
  }
313
- const At = me("UIRenderer");
314
- function Nt(r) {
313
+ const Nt = ye("UIRenderer");
314
+ function Ct(r) {
315
315
  if (r === void 0)
316
316
  return "{}";
317
317
  if (typeof r == "string")
@@ -322,18 +322,18 @@ function Nt(r) {
322
322
  return "{}";
323
323
  }
324
324
  }
325
- function Ct(r) {
325
+ function It(r) {
326
326
  const e = r.styleIds;
327
327
  return Array.isArray(e) ? e : [];
328
328
  }
329
- function It(r) {
329
+ function Tt(r) {
330
330
  const e = r.children;
331
331
  return Array.isArray(e) ? e : [];
332
332
  }
333
- function Tt(r, e) {
333
+ function jt(r, e) {
334
334
  return r.nodeId === e.nodeId && r.context === e.context;
335
335
  }
336
- function jt(r) {
336
+ function Ot(r) {
337
337
  if (r.length === 0) return "";
338
338
  if (r.length === 1) return r[0].id;
339
339
  let e = r[0].id;
@@ -341,8 +341,8 @@ function jt(r) {
341
341
  e += "," + r[t].id;
342
342
  return e;
343
343
  }
344
- const Ae = L(function r({ nodeId: e, context: t }) {
345
- const n = F(t.store, e), o = n ? It(n) : [], s = jt(o), i = M(
344
+ const Ce = U(function r({ nodeId: e, context: t }) {
345
+ const n = F(t.store, e), o = n ? Tt(n) : [], s = Ot(o), i = L(
346
346
  () => o.length === 0 ? null : o.map((f) => /* @__PURE__ */ b.jsx(r, { nodeId: f.id, context: t }, f.id)),
347
347
  // eslint-disable-next-line react-hooks/exhaustive-deps
348
348
  [s, t]
@@ -350,42 +350,42 @@ const Ae = L(function r({ nodeId: e, context: t }) {
350
350
  if (!n)
351
351
  return null;
352
352
  if (n.type === "root")
353
- return /* @__PURE__ */ b.jsx(yt, { children: i }, n.id);
353
+ return /* @__PURE__ */ b.jsx(St, { children: i }, n.id);
354
354
  const a = t.library.resolve(n);
355
355
  if (!a)
356
- return At.warn(`No renderer for node type ${n.type}`), null;
357
- const u = Ct(n), d = u.length > 0 ? u.join(" ") : void 0, l = a;
356
+ return Nt.warn(`No renderer for node type ${n.type}`), null;
357
+ const u = It(n), d = u.length > 0 ? u.join(" ") : void 0, l = a;
358
358
  return /* @__PURE__ */ b.jsx(l, { nodeId: e, context: t, className: d });
359
- }, Tt);
360
- function Ot(r, e) {
361
- return !Array.isArray(r) || r.length === 0 ? null : r.map((t) => /* @__PURE__ */ b.jsx(Ae, { nodeId: t.id, context: e }, t.id));
362
- }
359
+ }, jt);
363
360
  function Pt(r, e) {
361
+ return !Array.isArray(r) || r.length === 0 ? null : r.map((t) => /* @__PURE__ */ b.jsx(Ce, { nodeId: t.id, context: e }, t.id));
362
+ }
363
+ function _t(r, e) {
364
364
  return r.store === e.store && r.library === e.library && r.viewId === e.viewId && r.emptyFallback === e.emptyFallback;
365
365
  }
366
- const _t = L(function({ store: e, library: t, viewId: n, emptyFallback: o = null, onAction: s, client: i, video: a }) {
367
- const { rootViewId: u, rootNodeId: d } = Rt(e, n), l = R(s);
366
+ const Mt = U(function({ store: e, library: t, viewId: n, emptyFallback: o = null, onAction: s, client: i, video: a }) {
367
+ const { rootViewId: u, rootNodeId: d } = At(e, n), l = E(s);
368
368
  l.current = s;
369
- const f = R(i);
369
+ const f = E(i);
370
370
  f.current = i;
371
- const h = R(a);
372
- h.current = a;
373
- const k = V((v, p) => {
371
+ const p = E(a);
372
+ p.current = a;
373
+ const k = z((v, m) => {
374
374
  if (!v)
375
375
  return;
376
- const g = Nt(p);
376
+ const g = Ct(m);
377
377
  l.current?.(v, g);
378
- }, []), A = M(() => {
378
+ }, []), C = L(() => {
379
379
  const v = {
380
380
  store: e,
381
381
  library: t,
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) => Ot(p, v),
386
- renderView: (p) => {
387
- const g = e.getSnapshot().views.get(p);
388
- return g ? /* @__PURE__ */ b.jsx(Ae, { nodeId: g.id, context: v }) : null;
384
+ getPayload: (m) => e.getSnapshot().payloads.get(m),
385
+ renderChildren: (m) => Pt(m, v),
386
+ renderView: (m) => {
387
+ const g = e.getSnapshot().views.get(m);
388
+ return g ? /* @__PURE__ */ b.jsx(Ce, { nodeId: g.id, context: v }) : null;
389
389
  },
390
390
  dispatchAction: k,
391
391
  // Access client/video via refs to avoid context recreation
@@ -393,14 +393,14 @@ const _t = L(function({ store: e, library: t, viewId: n, emptyFallback: o = null
393
393
  return f.current;
394
394
  },
395
395
  get video() {
396
- return h.current;
396
+ return p.current;
397
397
  }
398
398
  };
399
399
  return v;
400
400
  }, [e, t, k]);
401
- return !u || !d ? o : /* @__PURE__ */ b.jsx("div", { "data-ikon-view-id": u, style: { display: "contents" }, children: /* @__PURE__ */ b.jsx(Ae, { nodeId: d, context: A }) });
402
- }, Pt);
403
- class Mt {
401
+ return !u || !d ? o : /* @__PURE__ */ b.jsx("div", { "data-ikon-view-id": u, style: { display: "contents" }, children: /* @__PURE__ */ b.jsx(Ce, { nodeId: d, context: C }) });
402
+ }, _t);
403
+ class Lt {
404
404
  constructor(e, t) {
405
405
  if (this.fallback = t, e)
406
406
  for (const [n, o] of e)
@@ -417,41 +417,41 @@ class Mt {
417
417
  return this.renderers.get(e.type) ?? this.fallback;
418
418
  }
419
419
  }
420
- function fn(r, e) {
420
+ function hn(r, e) {
421
421
  const t = Object.entries(r);
422
- return new Mt(t, e);
422
+ return new Lt(t, e);
423
423
  }
424
- function hn(r) {
425
- return Oe(
424
+ function mn(r) {
425
+ return _e(
426
426
  (e) => r.subscribe(e),
427
427
  () => r.getSnapshot(),
428
428
  () => r.getSnapshot()
429
429
  );
430
430
  }
431
- const Ne = "ikon-ui";
432
- function Lt(r, e) {
431
+ const Ie = "ikon-ui";
432
+ function Ut(r, e) {
433
433
  return r === e;
434
434
  }
435
- const mn = L(function({ stores: e, registry: t, category: n = Ne, onAction: o, client: s }) {
436
- const i = M(() => Array.from(e.keys()).sort().join(","), [e]), a = R(o);
435
+ const pn = U(function({ stores: e, registry: t, category: n = Ie, onAction: o, client: s }) {
436
+ const i = L(() => Array.from(e.keys()).sort().join(","), [e]), a = E(o);
437
437
  a.current = o;
438
- const u = R(s);
438
+ const u = E(s);
439
439
  u.current = s;
440
- const d = M(
440
+ const d = L(
441
441
  () => {
442
442
  const l = [];
443
- for (const [f, h] of e) {
444
- const k = h.store.getSnapshot();
445
- Lt(h.category, n) && (!k.rootViewId || !k.views.has(k.rootViewId) || l.push({ key: f, store: h.store }));
443
+ for (const [f, p] of e) {
444
+ const k = p.store.getSnapshot();
445
+ Ut(p.category, n) && (!k.rootViewId || !k.views.has(k.rootViewId) || l.push({ key: f, store: p.store }));
446
446
  }
447
447
  return l;
448
448
  },
449
449
  // eslint-disable-next-line react-hooks/exhaustive-deps
450
450
  [e, n, i]
451
451
  );
452
- return d.length === 0 ? null : /* @__PURE__ */ b.jsx(b.Fragment, { children: d.map(({ key: l, store: f }) => /* @__PURE__ */ b.jsx(_t, { store: f, library: t, onAction: a.current, client: u.current, video: u.current?.media?.video }, l)) });
452
+ return d.length === 0 ? null : /* @__PURE__ */ b.jsx(b.Fragment, { children: d.map(({ key: l, store: f }) => /* @__PURE__ */ b.jsx(Mt, { store: f, library: t, onAction: a.current, client: u.current, video: u.current?.media?.video }, l)) });
453
453
  });
454
- class Ut {
454
+ class xt {
455
455
  core;
456
456
  ownsCore;
457
457
  stores = /* @__PURE__ */ new Map();
@@ -459,7 +459,7 @@ class Ut {
459
459
  unsubscribeClears;
460
460
  unsubscribeStoreChanges;
461
461
  constructor(e) {
462
- this.core = e?.core ?? new mt({ client: e?.client }), this.ownsCore = !e?.core, this.unsubscribeClears = this.core.subscribeToUiStreamCleared(this.handleUiStreamCleared), this.unsubscribeStoreChanges = this.core.uiStore.subscribe(this.syncStreamSnapshot), this.syncAllStreams();
462
+ this.core = e?.core ?? new pt({ client: e?.client }), this.ownsCore = !e?.core, this.unsubscribeClears = this.core.subscribeToUiStreamCleared(this.handleUiStreamCleared), this.unsubscribeStoreChanges = this.core.uiStore.subscribe(this.syncStreamSnapshot), this.syncAllStreams();
463
463
  }
464
464
  dispose() {
465
465
  this.unsubscribeClears(), this.unsubscribeStoreChanges(), this.ownsCore && this.core.dispose(), this.listeners.clear(), this.stores.clear();
@@ -506,8 +506,8 @@ class Ut {
506
506
  if (t)
507
507
  return t;
508
508
  const n = {
509
- category: Ne,
510
- store: new pt()
509
+ category: Ie,
510
+ store: new gt()
511
511
  };
512
512
  return this.stores.set(e, n), n;
513
513
  }
@@ -515,7 +515,7 @@ class Ut {
515
515
  const n = this.stores.get(e);
516
516
  if (!n)
517
517
  return !1;
518
- const o = t ?? this.core.uiStore.getSnapshot(e)?.category ?? Ne;
518
+ const o = t ?? this.core.uiStore.getSnapshot(e)?.category ?? Ie;
519
519
  return n.category === o ? !1 : (this.stores.set(e, { ...n, category: o }), !0);
520
520
  }
521
521
  notify(e) {
@@ -542,21 +542,21 @@ function se(...r) {
542
542
  }
543
543
  return e || void 0;
544
544
  }
545
- const Be = /* @__PURE__ */ new WeakMap(), xt = {};
545
+ const ze = /* @__PURE__ */ new WeakMap(), $t = {};
546
546
  function ie(r) {
547
547
  if (!r)
548
- return xt;
549
- const e = Be.get(r);
548
+ return $t;
549
+ const e = ze.get(r);
550
550
  if (e)
551
551
  return e;
552
552
  const t = {};
553
553
  for (const [n, o] of Object.entries(r))
554
554
  o != null && (typeof o == "string" || typeof o == "number" || typeof o == "boolean") && (t[n] = o);
555
- return Be.set(r, t), t;
555
+ return ze.set(r, t), t;
556
556
  }
557
- function $t() {
558
- const r = L(function({ nodeId: t, context: n }) {
559
- const o = F(n.store, t), s = R(null), i = G(o?.props?.targetViewId), a = o?.props?.focusOnly, u = typeof a == "boolean" ? a : void 0;
557
+ function Ft() {
558
+ const r = U(function({ nodeId: t, context: n }) {
559
+ const o = F(n.store, t), s = E(null), i = G(o?.props?.targetViewId), a = o?.props?.focusOnly, u = typeof a == "boolean" ? a : void 0;
560
560
  return $(() => {
561
561
  if (typeof document > "u")
562
562
  return;
@@ -593,8 +593,8 @@ function $t() {
593
593
  return r;
594
594
  };
595
595
  }
596
- function Ft() {
597
- const r = L(function({ nodeId: t, context: n, className: o }) {
596
+ function Bt() {
597
+ const r = U(function({ nodeId: t, context: n, className: o }) {
598
598
  const s = F(n.store, t);
599
599
  if (!s)
600
600
  return null;
@@ -606,8 +606,8 @@ function Ft() {
606
606
  return r;
607
607
  };
608
608
  }
609
- function Bt() {
610
- const r = L(function({ nodeId: t, context: n, className: o }) {
609
+ function Vt() {
610
+ const r = U(function({ nodeId: t, context: n, className: o }) {
611
611
  const s = F(n.store, t);
612
612
  if (!s)
613
613
  return null;
@@ -628,8 +628,8 @@ function Bt() {
628
628
  return r;
629
629
  };
630
630
  }
631
- function Vt() {
632
- const r = L(function({ nodeId: t, context: n, className: o }) {
631
+ function zt() {
632
+ const r = U(function({ nodeId: t, context: n, className: o }) {
633
633
  const s = F(n.store, t);
634
634
  if (!s)
635
635
  return null;
@@ -651,8 +651,8 @@ function Vt() {
651
651
  return r;
652
652
  };
653
653
  }
654
- function zt() {
655
- const r = L(function({ nodeId: t, context: n, className: o }) {
654
+ function Dt() {
655
+ const r = U(function({ nodeId: t, context: n, className: o }) {
656
656
  const s = F(n.store, t);
657
657
  if (!s)
658
658
  return null;
@@ -664,8 +664,8 @@ function zt() {
664
664
  return r;
665
665
  };
666
666
  }
667
- function Dt() {
668
- const r = L(function({ nodeId: t, context: n, className: o }) {
667
+ function qt() {
668
+ const r = U(function({ nodeId: t, context: n, className: o }) {
669
669
  const s = F(n.store, t);
670
670
  if (!s)
671
671
  return null;
@@ -677,21 +677,21 @@ function Dt() {
677
677
  return r;
678
678
  };
679
679
  }
680
- function qt() {
680
+ function Wt() {
681
681
  return [
682
- Ft(),
683
682
  Bt(),
684
683
  Vt(),
685
684
  zt(),
686
685
  Dt(),
687
- $t()
686
+ qt(),
687
+ Ft()
688
688
  ];
689
689
  }
690
- const Wt = "base", Yt = async () => qt();
691
- function Jt(r) {
692
- r.registerModule(Wt, Yt);
690
+ const Yt = "base", Jt = async () => Wt();
691
+ function Kt(r) {
692
+ r.registerModule(Yt, Jt);
693
693
  }
694
- function rt(r) {
694
+ function ot(r) {
695
695
  if (typeof r == "string") {
696
696
  const e = r.trim();
697
697
  return e.length > 0 ? e : void 0;
@@ -701,13 +701,13 @@ function rt(r) {
701
701
  return e.length > 0 ? e.join(" ") : void 0;
702
702
  }
703
703
  }
704
- function nt(...r) {
704
+ function st(...r) {
705
705
  const e = [];
706
706
  for (const t of r)
707
707
  t && t.trim() && e.push(t.trim());
708
708
  return e.length > 0 ? e.join(" ") : void 0;
709
709
  }
710
- function fe(r) {
710
+ function pe(r) {
711
711
  if (typeof r == "number" && Number.isFinite(r))
712
712
  return Math.floor(r);
713
713
  if (typeof r == "string" && r.trim().length > 0) {
@@ -716,20 +716,20 @@ function fe(r) {
716
716
  return Math.floor(e);
717
717
  }
718
718
  }
719
- function Ce(r) {
719
+ function Te(r) {
720
720
  if (typeof r != "string")
721
721
  return;
722
722
  const e = r.trim();
723
723
  return e.length > 0 ? e : void 0;
724
724
  }
725
- const Kt = "media.video-canvas", Gt = "media.video-url-player";
726
- function Ht() {
727
- const r = L(function({ nodeId: t, context: n, className: o }) {
728
- const s = F(n.store, t), i = R(null), a = n.video, u = s ? Ce(s.props?.streamId) : void 0, d = s ? fe(s.props?.width) : void 0, l = s ? fe(s.props?.height) : void 0, f = s ? nt(rt(s.props?.className), o) : o;
725
+ const Gt = "media.video-canvas", Ht = "media.video-url-player";
726
+ function Xt() {
727
+ const r = U(function({ nodeId: t, context: n, className: o }) {
728
+ const s = F(n.store, t), i = E(null), a = n.video, u = s ? Te(s.props?.streamId) : void 0, d = s ? pe(s.props?.width) : void 0, l = s ? pe(s.props?.height) : void 0, f = s ? st(ot(s.props?.className), o) : o;
729
729
  return $(() => {
730
- const h = i.current;
731
- if (!(!a || !h || !u))
732
- return a.attachCanvas(u, h), () => {
730
+ const p = i.current;
731
+ if (!(!a || !p || !u))
732
+ return a.attachCanvas(u, p), () => {
733
733
  a.detachCanvas(u);
734
734
  };
735
735
  }, [a, u]), s ? /* @__PURE__ */ b.jsx(
@@ -745,12 +745,12 @@ function Ht() {
745
745
  ) : null;
746
746
  });
747
747
  return ({ type: e }) => {
748
- if (e === Kt)
748
+ if (e === Gt)
749
749
  return r;
750
750
  };
751
751
  }
752
- function Xt() {
753
- return [Ht(), Zt()];
752
+ function Zt() {
753
+ return [Xt(), Qt()];
754
754
  }
755
755
  function re(r) {
756
756
  if (typeof r == "boolean")
@@ -761,8 +761,8 @@ function re(r) {
761
761
  if (e === "false") return !1;
762
762
  }
763
763
  }
764
- function Zt() {
765
- const r = L(function({
764
+ function Qt() {
765
+ const r = U(function({
766
766
  nodeId: t,
767
767
  context: n,
768
768
  className: o
@@ -770,7 +770,7 @@ function Zt() {
770
770
  const s = F(n.store, t);
771
771
  if (!s)
772
772
  return null;
773
- const i = nt(rt(s.props?.className), o), a = Ce(s.props?.src), u = Ce(s.props?.poster), d = re(s.props?.controls), l = re(s.props?.autoplay), f = re(s.props?.loop), h = re(s.props?.muted), k = re(s.props?.playsInline), A = fe(s.props?.width), v = fe(s.props?.height), p = s.children?.length ? n.renderChildren(s.children) : void 0;
773
+ const i = st(ot(s.props?.className), o), a = Te(s.props?.src), u = Te(s.props?.poster), d = re(s.props?.controls), l = re(s.props?.autoplay), f = re(s.props?.loop), p = re(s.props?.muted), k = re(s.props?.playsInline), C = pe(s.props?.width), v = pe(s.props?.height), m = s.children?.length ? n.renderChildren(s.children) : void 0;
774
774
  return /* @__PURE__ */ b.jsx(
775
775
  "video",
776
776
  {
@@ -779,27 +779,27 @@ function Zt() {
779
779
  ...d !== void 0 ? { controls: d } : {},
780
780
  ...l !== void 0 ? { autoPlay: l } : {},
781
781
  ...f !== void 0 ? { loop: f } : {},
782
- ...h !== void 0 ? { muted: h } : {},
782
+ ...p !== void 0 ? { muted: p } : {},
783
783
  ...k !== void 0 ? { playsInline: k } : {},
784
- ...A ? { width: A } : {},
784
+ ...C ? { width: C } : {},
785
785
  ...v ? { height: v } : {},
786
786
  "data-ikon-node-id": s.id,
787
787
  className: i,
788
- children: p
788
+ children: m
789
789
  }
790
790
  );
791
791
  });
792
792
  return ({ type: e }) => {
793
- if (e === Gt)
793
+ if (e === Ht)
794
794
  return r;
795
795
  };
796
796
  }
797
- const Qt = "media", er = async () => Xt();
798
- function tr(r) {
799
- r.registerModule(Qt, er);
797
+ const er = "media", tr = async () => Zt();
798
+ function rr(r) {
799
+ r.registerModule(er, tr);
800
800
  }
801
- const Ve = me("UIRegistry");
802
- class rr {
801
+ const De = ye("UIRegistry");
802
+ class nr {
803
803
  baseResolvers = [];
804
804
  moduleLoaders = /* @__PURE__ */ new Map();
805
805
  moduleResolvers = /* @__PURE__ */ new Map();
@@ -821,15 +821,15 @@ class rr {
821
821
  for (const [n, o] of this.moduleLoaders.entries())
822
822
  if (!this.moduleResolvers.has(n))
823
823
  try {
824
- const s = await o(), i = sr(s);
824
+ const s = await o(), i = ir(s);
825
825
  this.moduleResolvers.set(n, i), e = !0;
826
826
  } catch (s) {
827
- Ve.error(`[IkonUiRegistry] Failed to load module '${n}'.`, s);
827
+ De.error(`[IkonUiRegistry] Failed to load module '${n}'.`, s);
828
828
  }
829
829
  const t = [];
830
830
  for (const n of this.moduleLoaders.keys())
831
831
  this.moduleResolvers.has(n) && t.push(n);
832
- return ir(t, this.activeModuleOrder) || (this.activeModuleOrder = t, e = !0), e;
832
+ return ar(t, this.activeModuleOrder) || (this.activeModuleOrder = t, e = !0), e;
833
833
  }
834
834
  resolve(e) {
835
835
  for (const t of this.baseResolvers) {
@@ -839,7 +839,7 @@ class rr {
839
839
  for (const t of this.activeModuleOrder) {
840
840
  const n = this.moduleResolvers.get(t);
841
841
  if (!n) {
842
- Ve.warn(`Missing resolvers for module ${t}`);
842
+ De.warn(`Missing resolvers for module ${t}`);
843
843
  continue;
844
844
  }
845
845
  for (const o of n) {
@@ -849,17 +849,17 @@ class rr {
849
849
  }
850
850
  }
851
851
  }
852
- function nr() {
853
- const r = new rr();
854
- return Jt(r), tr(r), r.loadRegisteredModules(), r;
852
+ function or() {
853
+ const r = new nr();
854
+ return Kt(r), rr(r), r.loadRegisteredModules(), r;
855
855
  }
856
- function or(r) {
856
+ function sr(r) {
857
857
  return Array.isArray(r) ? r : [r];
858
858
  }
859
- function sr(r) {
860
- return r ? or(r).flatMap((e) => e ? Array.isArray(e) ? e.filter(Boolean) : [e] : []) : [];
859
+ function ir(r) {
860
+ return r ? sr(r).flatMap((e) => e ? Array.isArray(e) ? e.filter(Boolean) : [e] : []) : [];
861
861
  }
862
- function ir(r, e) {
862
+ function ar(r, e) {
863
863
  if (r.length !== e.length)
864
864
  return !1;
865
865
  for (let t = 0; t < r.length; t += 1)
@@ -867,7 +867,7 @@ function ir(r, e) {
867
867
  return !1;
868
868
  return !0;
869
869
  }
870
- const Se = me("MotionController"), ze = {
870
+ const ve = ye("MotionController"), qe = {
871
871
  ease: [0.25, 0.1, 0.25, 1],
872
872
  "ease-in": [0.42, 0, 1, 1],
873
873
  "ease-out": [0, 0, 0.58, 1],
@@ -897,88 +897,88 @@ const Se = me("MotionController"), ze = {
897
897
  "ease-out-back": [0.175, 0.885, 0.32, 1.275],
898
898
  "ease-in-out-back": [0.68, -0.55, 0.265, 1.55]
899
899
  };
900
- function j(r) {
900
+ function O(r) {
901
901
  return r <= 0 ? 0 : r >= 1 ? 1 : r;
902
902
  }
903
- function De(r) {
903
+ function We(r) {
904
904
  if (r == null) return;
905
905
  const e = `${r}`.trim();
906
906
  if (!e) return;
907
907
  const t = Number.parseFloat(e);
908
908
  return Number.isFinite(t) ? t : void 0;
909
909
  }
910
- function qe(r) {
910
+ function Ye(r) {
911
911
  return typeof CSS < "u" && CSS.escape ? CSS.escape(r) : r.replace(/[^a-zA-Z0-9_-]/g, (e) => `\\${e}`);
912
912
  }
913
- function We(r, e, t, n) {
913
+ function Je(r, e, t, n) {
914
914
  const l = new Float32Array(11);
915
- function f(p, g, E) {
916
- return ((3 * g - 3 * E + 1) * p + (3 * E - 6 * g)) * p * p + 3 * g * p;
915
+ function f(m, g, w) {
916
+ return ((3 * g - 3 * w + 1) * m + (3 * w - 6 * g)) * m * m + 3 * g * m;
917
917
  }
918
- function h(p, g, E) {
919
- return 3 * (3 * g - 3 * E + 1) * p * p + 2 * (3 * E - 6 * g) * p + 3 * g;
918
+ function p(m, g, w) {
919
+ return 3 * (3 * g - 3 * w + 1) * m * m + 2 * (3 * w - 6 * g) * m + 3 * g;
920
920
  }
921
- function k(p, g) {
922
- for (let E = 0; E < 4; E += 1) {
923
- const O = h(g, r, t);
924
- if (O === 0)
921
+ function k(m, g) {
922
+ for (let w = 0; w < 4; w += 1) {
923
+ const P = p(g, r, t);
924
+ if (P === 0)
925
925
  return g;
926
- const T = f(g, r, t) - p;
927
- g -= T / O;
926
+ const T = f(g, r, t) - m;
927
+ g -= T / P;
928
928
  }
929
929
  return g;
930
930
  }
931
- function A(p, g, E) {
932
- let O = 0, T = 0, U = 0;
931
+ function C(m, g, w) {
932
+ let P = 0, T = 0, x = 0;
933
933
  do
934
- T = g + (E - g) / 2, O = f(T, r, t) - p, O > 0 ? E = T : g = T;
935
- while (Math.abs(O) > 1e-7 && ++U < 10);
934
+ T = g + (w - g) / 2, P = f(T, r, t) - m, P > 0 ? w = T : g = T;
935
+ while (Math.abs(P) > 1e-7 && ++x < 10);
936
936
  return T;
937
937
  }
938
- function v(p) {
939
- let g = 0, E = 1;
940
- const O = 10;
941
- for (; E !== O && l[E] <= p; E += 1)
938
+ function v(m) {
939
+ let g = 0, w = 1;
940
+ const P = 10;
941
+ for (; w !== P && l[w] <= m; w += 1)
942
942
  g += 0.1;
943
- E -= 1;
944
- const T = (p - l[E]) / (l[E + 1] - l[E]), U = g + T * 0.1, z = h(U, r, t);
945
- return z >= 1e-3 ? k(p, U) : z === 0 ? U : A(p, g, g + 0.1);
943
+ w -= 1;
944
+ const T = (m - l[w]) / (l[w + 1] - l[w]), x = g + T * 0.1, D = p(x, r, t);
945
+ return D >= 1e-3 ? k(m, x) : D === 0 ? x : C(m, g, g + 0.1);
946
946
  }
947
- for (let p = 0; p < 11; p += 1)
948
- l[p] = f(p * 0.1, r, t);
949
- return (p) => p <= 0 ? 0 : p >= 1 ? 1 : f(v(p), e, n);
947
+ for (let m = 0; m < 11; m += 1)
948
+ l[m] = f(m * 0.1, r, t);
949
+ return (m) => m <= 0 ? 0 : m >= 1 ? 1 : f(v(m), e, n);
950
950
  }
951
- function ar(r) {
951
+ function cr(r) {
952
952
  const e = /steps\(\s*([0-9]+)\s*(?:,\s*([a-z-]+)\s*)?\)/i.exec(r);
953
953
  if (!e)
954
- return (o) => j(o);
954
+ return (o) => O(o);
955
955
  const t = Math.max(1, parseInt(e[1], 10)), n = (e[2] ?? "end").toLowerCase();
956
- return n === "start" || n === "jump-start" ? (o) => j(Math.ceil(o * t) / t) : n === "none" || n === "jump-none" ? (o) => j(Math.round(o * t) / t) : n === "both" || n === "jump-both" ? (o) => j((Math.floor(o * t) + 0.5) / t) : (o) => j(Math.floor(o * t) / t);
956
+ return n === "start" || n === "jump-start" ? (o) => O(Math.ceil(o * t) / t) : n === "none" || n === "jump-none" ? (o) => O(Math.round(o * t) / t) : n === "both" || n === "jump-both" ? (o) => O((Math.floor(o * t) + 0.5) / t) : (o) => O(Math.floor(o * t) / t);
957
957
  }
958
- function cr(r) {
958
+ function ur(r) {
959
959
  if (!r)
960
- return (t) => j(t);
960
+ return (t) => O(t);
961
961
  const e = r.trim().toLowerCase();
962
962
  if (!e || e === "linear")
963
- return (t) => j(t);
964
- if (ze[e]) {
965
- const [t, n, o, s] = ze[e], i = We(t, n, o, s);
966
- return (a) => j(i(j(a)));
963
+ return (t) => O(t);
964
+ if (qe[e]) {
965
+ const [t, n, o, s] = qe[e], i = Je(t, n, o, s);
966
+ return (a) => O(i(O(a)));
967
967
  }
968
968
  if (e.startsWith("cubic-bezier(") && e.endsWith(")")) {
969
969
  const n = e.slice(13, -1).split(",").map((o) => Number.parseFloat(o.trim()));
970
970
  if (n.length === 4 && n.every((o) => Number.isFinite(o))) {
971
- const [o, s, i, a] = n, u = We(o, s, i, a);
972
- return (d) => j(u(j(d)));
971
+ const [o, s, i, a] = n, u = Je(o, s, i, a);
972
+ return (d) => O(u(O(d)));
973
973
  }
974
974
  }
975
975
  if (e.startsWith("steps(") && e.endsWith(")")) {
976
- const t = ar(e);
977
- return (n) => t(j(n));
976
+ const t = cr(e);
977
+ return (n) => t(O(n));
978
978
  }
979
- return (t) => j(t);
979
+ return (t) => O(t);
980
980
  }
981
- function ur(r) {
981
+ function lr(r) {
982
982
  if (!r)
983
983
  return;
984
984
  const e = /(-?\d+(?:\.\d+)?)\s*\.\.\s*(-?\d+(?:\.\d+)?)\s*->\s*(-?\d+(?:\.\d+)?)\s*\.\.\s*(-?\d+(?:\.\d+)?)/.exec(r);
@@ -988,7 +988,7 @@ function ur(r) {
988
988
  if (![t, n, o, s].some((i) => !Number.isFinite(i)))
989
989
  return { inStart: t, inEnd: n, outStart: o, outEnd: s };
990
990
  }
991
- class lr {
991
+ class dr {
992
992
  bindingsByStyle = /* @__PURE__ */ new Map();
993
993
  observer;
994
994
  observeScheduled = !1;
@@ -1012,7 +1012,7 @@ class lr {
1012
1012
  try {
1013
1013
  e();
1014
1014
  } catch (t) {
1015
- Se.warn("Failed to cleanup binding listener", t);
1015
+ ve.warn("Failed to cleanup binding listener", t);
1016
1016
  }
1017
1017
  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);
1018
1018
  }
@@ -1022,7 +1022,7 @@ class lr {
1022
1022
  const n = (JSON.parse(e).motionBindings ?? []).map((o) => this.parseBinding(o)).filter((o) => o !== void 0);
1023
1023
  return n.length === 0 ? void 0 : { bindings: n };
1024
1024
  } catch (t) {
1025
- Se.warn("Failed to parse motion metadata", t);
1025
+ ve.warn("Failed to parse motion metadata", t);
1026
1026
  return;
1027
1027
  }
1028
1028
  }
@@ -1030,7 +1030,7 @@ class lr {
1030
1030
  const t = e.source?.trim();
1031
1031
  if (!t)
1032
1032
  return;
1033
- const n = De(e.min) ?? 0, o = De(e.max), s = o === void 0 ? n + 100 : o, i = (e.clamp ?? "clamp").trim().toLowerCase(), a = !!e.reverse, u = cr(e.ease), d = ur(e.map), l = e.targetId?.trim() || void 0;
1033
+ const n = We(e.min) ?? 0, o = We(e.max), s = o === void 0 ? n + 100 : o, i = (e.clamp ?? "clamp").trim().toLowerCase(), a = !!e.reverse, u = ur(e.ease), d = lr(e.map), l = e.targetId?.trim() || void 0;
1034
1034
  return Number.isNaN(n) || Number.isNaN(s) ? void 0 : {
1035
1035
  source: t.toLowerCase(),
1036
1036
  min: n,
@@ -1088,7 +1088,7 @@ class lr {
1088
1088
  const t = this.bindingsByStyle.get(e);
1089
1089
  if (!t || typeof document > "u")
1090
1090
  return;
1091
- const n = `.${qe(e)}`;
1091
+ const n = `.${Ye(e)}`;
1092
1092
  document.querySelectorAll(n).forEach((s) => this.applyStyleToElement(s, e, t));
1093
1093
  }
1094
1094
  applyStyleToElement(e, t, n) {
@@ -1128,7 +1128,7 @@ class lr {
1128
1128
  }
1129
1129
  resolveScrollContainer(e, t) {
1130
1130
  if (t.targetId) {
1131
- const n = `[data-ikon-motion-source="${qe(t.targetId)}"]`, o = typeof document < "u" ? document.querySelector(n) : null;
1131
+ const n = `[data-ikon-motion-source="${Ye(t.targetId)}"]`, o = typeof document < "u" ? document.querySelector(n) : null;
1132
1132
  if (o)
1133
1133
  return o;
1134
1134
  }
@@ -1156,7 +1156,7 @@ class lr {
1156
1156
  case "unclamped":
1157
1157
  return e;
1158
1158
  default:
1159
- return j(e);
1159
+ return O(e);
1160
1160
  }
1161
1161
  }
1162
1162
  applyMap(e, t) {
@@ -1198,7 +1198,7 @@ class lr {
1198
1198
  try {
1199
1199
  i();
1200
1200
  } catch (a) {
1201
- Se.warn("Failed to cleanup listener", a);
1201
+ ve.warn("Failed to cleanup listener", a);
1202
1202
  }
1203
1203
  this.globalCleanups.delete(i);
1204
1204
  }
@@ -1243,14 +1243,14 @@ class lr {
1243
1243
  }
1244
1244
  }
1245
1245
  }
1246
- const Ye = new lr(), be = "ikon-ds";
1247
- function dr(r) {
1248
- const e = V(({ styleId: n, css: o, common: s }) => {
1246
+ const Ke = new dr(), we = "ikon-ds";
1247
+ function fr(r) {
1248
+ const e = z(({ styleId: n, css: o, common: s }) => {
1249
1249
  if (!n || typeof document > "u") return;
1250
- let i = document.getElementById(be);
1251
- i || (i = document.createElement("style"), i.id = be, document.head.appendChild(i)), o && (i.innerHTML += o), Ye.registerStyle(n, s);
1252
- }, []), t = V(() => {
1253
- typeof document < "u" && document.getElementById(be)?.remove(), Ye.reset();
1250
+ let i = document.getElementById(we);
1251
+ i || (i = document.createElement("style"), i.id = we, document.head.appendChild(i)), o && (i.innerHTML += o), Ke.registerStyle(n, s);
1252
+ }, []), t = z(() => {
1253
+ typeof document < "u" && document.getElementById(we)?.remove(), Ke.reset();
1254
1254
  }, []);
1255
1255
  return $(() => {
1256
1256
  if (!r) return;
@@ -1262,7 +1262,7 @@ function dr(r) {
1262
1262
  };
1263
1263
  }, [r, t, e]), $(() => () => t(), [t]), { setStyle: e, reset: t };
1264
1264
  }
1265
- function fr(r) {
1265
+ function hr(r) {
1266
1266
  const e = [];
1267
1267
  for (const [t, n] of r) {
1268
1268
  const o = n.store.getSnapshot(), s = o.rootViewId && o.views.has(o.rootViewId);
@@ -1270,62 +1270,62 @@ function fr(r) {
1270
1270
  }
1271
1271
  return e.sort(), e.join(",");
1272
1272
  }
1273
- function hr(r) {
1274
- const [e, t] = W(), n = R("");
1273
+ function mr(r) {
1274
+ const [e, t] = Y(), n = E("");
1275
1275
  return $(() => {
1276
1276
  if (!r) {
1277
1277
  t(void 0), n.current = "";
1278
1278
  return;
1279
1279
  }
1280
1280
  const o = () => {
1281
- const s = r.getStores(), i = fr(s);
1281
+ const s = r.getStores(), i = hr(s);
1282
1282
  i !== n.current && (n.current = i, t(s));
1283
1283
  };
1284
1284
  return o(), r.subscribe(o);
1285
1285
  }, [r]), e;
1286
1286
  }
1287
- var mr = typeof global == "object" && global && global.Object === Object && global, pr = typeof self == "object" && self && self.Object === Object && self, gr = mr || pr || Function("return this")(), he = gr.Symbol, ot = Object.prototype, yr = ot.hasOwnProperty, Sr = ot.toString, ne = he ? he.toStringTag : void 0;
1288
- function br(r) {
1289
- var e = yr.call(r, ne), t = r[ne];
1287
+ var pr = typeof global == "object" && global && global.Object === Object && global, gr = typeof self == "object" && self && self.Object === Object && self, yr = pr || gr || Function("return this")(), ge = yr.Symbol, it = Object.prototype, Sr = it.hasOwnProperty, br = it.toString, ne = ge ? ge.toStringTag : void 0;
1288
+ function vr(r) {
1289
+ var e = Sr.call(r, ne), t = r[ne];
1290
1290
  try {
1291
1291
  r[ne] = void 0;
1292
1292
  var n = !0;
1293
1293
  } catch {
1294
1294
  }
1295
- var o = Sr.call(r);
1295
+ var o = br.call(r);
1296
1296
  return n && (e ? r[ne] = t : delete r[ne]), o;
1297
1297
  }
1298
- var vr = Object.prototype, wr = vr.toString;
1299
- function Er(r) {
1300
- return wr.call(r);
1301
- }
1302
- var kr = "[object Null]", Rr = "[object Undefined]", Je = he ? he.toStringTag : void 0;
1303
- function Ar(r) {
1304
- return r == null ? r === void 0 ? Rr : kr : Je && Je in Object(r) ? br(r) : Er(r);
1298
+ var wr = Object.prototype, Er = wr.toString;
1299
+ function kr(r) {
1300
+ return Er.call(r);
1305
1301
  }
1302
+ var Rr = "[object Null]", Ar = "[object Undefined]", Ge = ge ? ge.toStringTag : void 0;
1306
1303
  function Nr(r) {
1304
+ return r == null ? r === void 0 ? Ar : Rr : Ge && Ge in Object(r) ? vr(r) : kr(r);
1305
+ }
1306
+ function Cr(r) {
1307
1307
  return r != null && typeof r == "object";
1308
1308
  }
1309
- var Cr = Array.isArray, Ir = "[object String]";
1310
- function Tr(r) {
1311
- return typeof r == "string" || !Cr(r) && Nr(r) && Ar(r) == Ir;
1309
+ var Ir = Array.isArray, Tr = "[object String]";
1310
+ function jr(r) {
1311
+ return typeof r == "string" || !Ir(r) && Cr(r) && Nr(r) == Tr;
1312
1312
  }
1313
- const Ke = "ikonUiModules";
1314
- function Ie(r) {
1313
+ const He = "ikonUiModules";
1314
+ function je(r) {
1315
1315
  return typeof r == "object" && r !== null && !Array.isArray(r);
1316
1316
  }
1317
- function jr(r) {
1317
+ function Or(r) {
1318
1318
  if (!Array.isArray(r))
1319
1319
  return;
1320
1320
  const e = /* @__PURE__ */ new Set();
1321
1321
  for (const t of r) {
1322
- if (!Tr(t)) continue;
1322
+ if (!jr(t)) continue;
1323
1323
  const n = t.trim();
1324
1324
  n && (e.has(n) || e.add(n));
1325
1325
  }
1326
1326
  return Array.from(e);
1327
1327
  }
1328
- function pn(r, e) {
1328
+ function gn(r, e) {
1329
1329
  if (r === e)
1330
1330
  return !0;
1331
1331
  if (!r || !e)
@@ -1337,19 +1337,19 @@ function pn(r, e) {
1337
1337
  return !1;
1338
1338
  return !0;
1339
1339
  }
1340
- function Or(r) {
1341
- if (!(!Ie(r) || !Object.prototype.hasOwnProperty.call(r, Ke)))
1342
- return jr(r[Ke]);
1340
+ function Pr(r) {
1341
+ if (!(!je(r) || !Object.prototype.hasOwnProperty.call(r, He)))
1342
+ return Or(r[He]);
1343
1343
  }
1344
- function gn(...r) {
1344
+ function yn(...r) {
1345
1345
  for (const e of r) {
1346
- const t = Or(e);
1346
+ const t = Pr(e);
1347
1347
  if (t !== void 0)
1348
1348
  return t;
1349
1349
  }
1350
1350
  }
1351
- function yn(r) {
1352
- if (!Ie(r))
1351
+ function Sn(r) {
1352
+ if (!je(r))
1353
1353
  return;
1354
1354
  const e = r, t = Object.keys(e).find((u) => u.toLowerCase() === "modules");
1355
1355
  if (!t)
@@ -1368,7 +1368,7 @@ function yn(r) {
1368
1368
  o.push(v), i.add(v);
1369
1369
  continue;
1370
1370
  }
1371
- if (!Ie(u))
1371
+ if (!je(u))
1372
1372
  continue;
1373
1373
  const d = u, l = Object.keys(d).find((v) => v.toLowerCase() === "name");
1374
1374
  if (!l)
@@ -1376,11 +1376,11 @@ function yn(r) {
1376
1376
  const f = d[l];
1377
1377
  if (typeof f != "string")
1378
1378
  continue;
1379
- const h = f.trim();
1380
- if (!h)
1379
+ const p = f.trim();
1380
+ if (!p)
1381
1381
  continue;
1382
- const k = Object.keys(d).find((v) => v.toLowerCase() === "javascript"), A = k ? d[k] : void 0;
1383
- typeof A == "string" && s.set(h, A), i.has(h) || (o.push(h), i.add(h));
1382
+ const k = Object.keys(d).find((v) => v.toLowerCase() === "javascript"), C = k ? d[k] : void 0;
1383
+ typeof C == "string" && s.set(p, C), i.has(p) || (o.push(p), i.add(p));
1384
1384
  }
1385
1385
  if (!o.length && s.size === 0)
1386
1386
  return { modules: [] };
@@ -1390,16 +1390,16 @@ function yn(r) {
1390
1390
  }));
1391
1391
  return a.length > 0 ? { modules: o, inlineModules: a } : { modules: o };
1392
1392
  }
1393
- const S = {
1393
+ const y = {
1394
1394
  None: 0,
1395
1395
  Letter: 1,
1396
1396
  Word: 2,
1397
1397
  Line: 4,
1398
1398
  Paragraph: 8,
1399
1399
  Emoji: 16
1400
- }, Pr = [
1400
+ }, _r = [
1401
1401
  {
1402
- flag: S.Letter,
1402
+ flag: y.Letter,
1403
1403
  hints: [
1404
1404
  "[data-motion-letter]",
1405
1405
  "[data-letter]",
@@ -1408,7 +1408,7 @@ const S = {
1408
1408
  ]
1409
1409
  },
1410
1410
  {
1411
- flag: S.Word,
1411
+ flag: y.Word,
1412
1412
  hints: [
1413
1413
  "[data-motion-word]",
1414
1414
  "[data-word]",
@@ -1417,7 +1417,7 @@ const S = {
1417
1417
  ]
1418
1418
  },
1419
1419
  {
1420
- flag: S.Line,
1420
+ flag: y.Line,
1421
1421
  hints: [
1422
1422
  "[data-motion-line]",
1423
1423
  "[data-line]",
@@ -1426,7 +1426,7 @@ const S = {
1426
1426
  ]
1427
1427
  },
1428
1428
  {
1429
- flag: S.Paragraph,
1429
+ flag: y.Paragraph,
1430
1430
  hints: [
1431
1431
  "[data-motion-paragraph]",
1432
1432
  "[data-paragraph]",
@@ -1437,7 +1437,7 @@ const S = {
1437
1437
  ]
1438
1438
  },
1439
1439
  {
1440
- flag: S.Emoji,
1440
+ flag: y.Emoji,
1441
1441
  hints: [
1442
1442
  ":is([data-motion-emoji],[data-emoji],.tw-motion-emoji,.tw-emoji)",
1443
1443
  "[data-motion-emoji]",
@@ -1446,42 +1446,42 @@ const S = {
1446
1446
  "[data-emoji]"
1447
1447
  ]
1448
1448
  }
1449
- ], Te = S.Letter | S.Word | S.Line | S.Paragraph | S.Emoji, _r = S.Letter | S.Word | S.Line | S.Paragraph, Ge = /* @__PURE__ */ new Map(), Mr = 16384;
1450
- function Sn(r, e) {
1451
- if (!r || r.length > Mr)
1449
+ ], Oe = y.Letter | y.Word | y.Line | y.Paragraph | y.Emoji, Mr = y.Letter | y.Word | y.Line | y.Paragraph, Xe = /* @__PURE__ */ new Map(), Lr = 16384;
1450
+ function bn(r, e) {
1451
+ if (!r || r.length > Lr)
1452
1452
  return r;
1453
- const t = Xr(e), n = K(t, S.Emoji), o = t & _r;
1454
- if (o === S.None && !n)
1453
+ const t = Zr(e), n = K(t, y.Emoji), o = t & Mr;
1454
+ if (o === y.None && !n)
1455
1455
  return r;
1456
1456
  const s = r.replace(/\r\n/g, `
1457
1457
  `).replace(/\r/g, `
1458
1458
  `);
1459
- if (o === S.None)
1460
- return Qe(s);
1461
- const i = Gr(s);
1459
+ if (o === y.None)
1460
+ return tt(s);
1461
+ const i = Hr(s);
1462
1462
  if (i.length === 0)
1463
- return n ? Qe(s) : r;
1464
- const a = Hr(i), u = { letter: 0, word: 0, line: 0, paragraph: 0, br: 0, emoji: 0 }, d = [];
1463
+ return n ? tt(s) : r;
1464
+ const a = Xr(i), u = { letter: 0, word: 0, line: 0, paragraph: 0, br: 0, emoji: 0 }, d = [];
1465
1465
  for (const l of a) {
1466
- const f = Lr(l, t, u);
1466
+ const f = Ur(l, t, u);
1467
1467
  d.push(...f);
1468
1468
  }
1469
1469
  return d;
1470
1470
  }
1471
- function Lr(r, e, t) {
1471
+ function Ur(r, e, t) {
1472
1472
  const n = [];
1473
1473
  for (const o of r) {
1474
- const s = Ur(o, e, t);
1474
+ const s = xr(o, e, t);
1475
1475
  n.push(...s);
1476
1476
  }
1477
- if (K(e, S.Paragraph)) {
1477
+ if (K(e, y.Paragraph)) {
1478
1478
  const o = t.paragraph++;
1479
1479
  return [
1480
1480
  /* @__PURE__ */ b.jsx(
1481
1481
  "span",
1482
1482
  {
1483
1483
  "data-motion-paragraph": !0,
1484
- style: pe(o),
1484
+ style: Se(o),
1485
1485
  children: n
1486
1486
  },
1487
1487
  `motion-paragraph-${o}`
@@ -1490,12 +1490,12 @@ function Lr(r, e, t) {
1490
1490
  }
1491
1491
  return n;
1492
1492
  }
1493
- function Ur(r, e, t) {
1494
- const n = xr(r.text, e, t), o = [];
1495
- if (K(e, S.Line)) {
1493
+ function xr(r, e, t) {
1494
+ const n = $r(r.text, e, t), o = [];
1495
+ if (K(e, y.Line)) {
1496
1496
  const s = t.line++;
1497
1497
  o.push(
1498
- /* @__PURE__ */ b.jsx("span", { "data-motion-line": !0, style: pe(s), children: n }, `motion-line-${s}`)
1498
+ /* @__PURE__ */ b.jsx("span", { "data-motion-line": !0, style: Se(s), children: n }, `motion-line-${s}`)
1499
1499
  );
1500
1500
  } else
1501
1501
  o.push(...n);
@@ -1503,47 +1503,47 @@ function Ur(r, e, t) {
1503
1503
  o.push(/* @__PURE__ */ b.jsx("br", {}, `motion-break-${t.br++}`));
1504
1504
  return o;
1505
1505
  }
1506
- function xr(r, e, t) {
1506
+ function $r(r, e, t) {
1507
1507
  if (!r)
1508
1508
  return [];
1509
- const n = K(e, S.Word), o = [], s = /(\s+)/g;
1509
+ const n = K(e, y.Word), o = [], s = /(\s+)/g;
1510
1510
  let i = 0, a;
1511
1511
  for (; (a = s.exec(r)) !== null; ) {
1512
1512
  if (a.index > i) {
1513
1513
  const u = r.slice(i, a.index);
1514
- o.push(He(u, t, e, n));
1514
+ o.push(Ze(u, t, e, n));
1515
1515
  }
1516
1516
  o.push(a[0]), i = a.index + a[0].length;
1517
1517
  }
1518
1518
  if (i < r.length) {
1519
1519
  const u = r.slice(i);
1520
- o.push(He(u, t, e, n));
1520
+ o.push(Ze(u, t, e, n));
1521
1521
  }
1522
1522
  return o;
1523
1523
  }
1524
- function He(r, e, t, n) {
1525
- const o = e.word++, s = Fr(r, t, e), i = `motion-word-${o}`, a = $r(o, n);
1524
+ function Ze(r, e, t, n) {
1525
+ const o = e.word++, s = Br(r, t, e), i = `motion-word-${o}`, a = Fr(o, n);
1526
1526
  return n ? /* @__PURE__ */ b.jsx("span", { "data-motion-word": !0, style: a, children: s }, i) : /* @__PURE__ */ b.jsx("span", { style: a, children: s }, i);
1527
1527
  }
1528
- function $r(r, e) {
1529
- return e ? { ...pe(r), whiteSpace: "nowrap" } : { whiteSpace: "nowrap" };
1528
+ function Fr(r, e) {
1529
+ return e ? { ...Se(r), whiteSpace: "nowrap" } : { whiteSpace: "nowrap" };
1530
1530
  }
1531
- function Fr(r, e, t) {
1531
+ function Br(r, e, t) {
1532
1532
  if (!r)
1533
1533
  return [];
1534
- const n = K(e, S.Letter), o = K(e, S.Emoji);
1534
+ const n = K(e, y.Letter), o = K(e, y.Emoji);
1535
1535
  if (!n) {
1536
1536
  if (!o)
1537
1537
  return [r];
1538
- const a = je(r);
1538
+ const a = Pe(r);
1539
1539
  if (a.length === 0)
1540
1540
  return [r];
1541
- const { nodes: u } = it(a, t);
1541
+ const { nodes: u } = ct(a, t);
1542
1542
  return u;
1543
1543
  }
1544
- const s = [], i = je(r);
1544
+ const s = [], i = Pe(r);
1545
1545
  for (const a of i) {
1546
- const u = t.letter++, d = `motion-letter-${u}`, l = pe(u);
1546
+ const u = t.letter++, d = `motion-letter-${u}`, l = Se(u);
1547
1547
  if (a === `
1548
1548
  `) {
1549
1549
  s.push(
@@ -1551,55 +1551,55 @@ function Fr(r, e, t) {
1551
1551
  );
1552
1552
  continue;
1553
1553
  }
1554
- const h = o && st(a) ? { "data-motion-emoji": !0 } : void 0, k = a === " " ? " " : a;
1554
+ const p = o && at(a) ? { "data-motion-emoji": !0 } : void 0, k = a === " " ? " " : a;
1555
1555
  s.push(
1556
- /* @__PURE__ */ b.jsx("span", { "data-motion-letter": !0, style: l, ...h, children: k }, d)
1556
+ /* @__PURE__ */ b.jsx("span", { "data-motion-letter": !0, style: l, ...p, children: k }, d)
1557
1557
  );
1558
1558
  }
1559
1559
  return s;
1560
1560
  }
1561
- function je(r) {
1561
+ function Pe(r) {
1562
1562
  if (!r)
1563
1563
  return [];
1564
- const e = Br();
1565
- return e ? Array.from(e.segment(r), (t) => t.segment) : Vr(r);
1564
+ const e = Vr();
1565
+ return e ? Array.from(e.segment(r), (t) => t.segment) : zr(r);
1566
1566
  }
1567
1567
  let oe;
1568
- function Br() {
1568
+ function Vr() {
1569
1569
  return oe !== void 0 || (typeof Intl < "u" && typeof Intl.Segmenter == "function" ? oe = new Intl.Segmenter(void 0, { granularity: "grapheme" }) : oe = null), oe;
1570
1570
  }
1571
- function Vr(r) {
1571
+ function zr(r) {
1572
1572
  const e = [], t = Array.from(r);
1573
1573
  let n = "";
1574
1574
  for (let o = 0; o < t.length; o++) {
1575
1575
  const s = t[o], i = t[o + 1];
1576
- n += s, !(i && zr(s, i)) && (e.push(n), n = "");
1576
+ n += s, !(i && Dr(s, i)) && (e.push(n), n = "");
1577
1577
  }
1578
1578
  return n && e.push(n), e;
1579
1579
  }
1580
- function zr(r, e) {
1581
- return e ? !!(Xe(r) || Xe(e) || Wr(e) || Dr(e) || qr(e) || Ze(r) && Ze(e)) : !1;
1580
+ function Dr(r, e) {
1581
+ return e ? !!(Qe(r) || Qe(e) || Yr(e) || qr(e) || Wr(e) || et(r) && et(e)) : !1;
1582
1582
  }
1583
- function Xe(r) {
1583
+ function Qe(r) {
1584
1584
  return r.codePointAt(0) === 8205;
1585
1585
  }
1586
- function Dr(r) {
1586
+ function qr(r) {
1587
1587
  const e = r.codePointAt(0);
1588
1588
  return e === void 0 ? !1 : e >= 65024 && e <= 65039 || e >= 917760 && e <= 917999;
1589
1589
  }
1590
- function qr(r) {
1590
+ function Wr(r) {
1591
1591
  const e = r.codePointAt(0);
1592
1592
  return e === void 0 ? !1 : e >= 127995 && e <= 127999;
1593
1593
  }
1594
- function Ze(r) {
1594
+ function et(r) {
1595
1595
  const e = r.codePointAt(0);
1596
1596
  return e === void 0 ? !1 : e >= 127462 && e <= 127487;
1597
1597
  }
1598
- let ve;
1599
- function Wr(r) {
1600
- return r ? (ve || (ve = Yr()), ve(r)) : !1;
1598
+ let Ee;
1599
+ function Yr(r) {
1600
+ return r ? (Ee || (Ee = Jr()), Ee(r)) : !1;
1601
1601
  }
1602
- function Yr() {
1602
+ function Jr() {
1603
1603
  try {
1604
1604
  const r = new RegExp("\\p{Mark}", "u");
1605
1605
  return (e) => r.test(e);
@@ -1610,19 +1610,19 @@ function Yr() {
1610
1610
  };
1611
1611
  }
1612
1612
  }
1613
- let we;
1614
- function st(r) {
1615
- return r ? (we || (we = Jr()), we(r)) : !1;
1613
+ let ke;
1614
+ function at(r) {
1615
+ return r ? (ke || (ke = Kr()), ke(r)) : !1;
1616
1616
  }
1617
- function Jr() {
1617
+ function Kr() {
1618
1618
  try {
1619
1619
  const r = new RegExp("\\p{Extended_Pictographic}", "u");
1620
1620
  return (e) => r.test(e);
1621
1621
  } catch {
1622
- return Kr;
1622
+ return Gr;
1623
1623
  }
1624
1624
  }
1625
- function Kr(r) {
1625
+ function Gr(r) {
1626
1626
  if (!r)
1627
1627
  return !1;
1628
1628
  for (const e of Array.from(r)) {
@@ -1632,7 +1632,7 @@ function Kr(r) {
1632
1632
  }
1633
1633
  return !1;
1634
1634
  }
1635
- function Gr(r) {
1635
+ function Hr(r) {
1636
1636
  const e = [];
1637
1637
  let t = "", n = 0;
1638
1638
  for (let o = 0; o < r.length; o++) {
@@ -1646,7 +1646,7 @@ function Gr(r) {
1646
1646
  }
1647
1647
  return (n > 0 || t.length > 0) && e.push({ text: t, breaks: n }), e;
1648
1648
  }
1649
- function Hr(r) {
1649
+ function Xr(r) {
1650
1650
  if (r.length === 0)
1651
1651
  return [];
1652
1652
  const e = [];
@@ -1658,7 +1658,7 @@ function Hr(r) {
1658
1658
  function K(r, e) {
1659
1659
  return (r & e) === e;
1660
1660
  }
1661
- function pe(r) {
1661
+ function Se(r) {
1662
1662
  return {
1663
1663
  "--tw-motion-seq-index": r.toString(),
1664
1664
  backgroundColor: "inherit",
@@ -1675,23 +1675,23 @@ function pe(r) {
1675
1675
  WebkitTextFillColor: "inherit"
1676
1676
  };
1677
1677
  }
1678
- function Qe(r) {
1678
+ function tt(r) {
1679
1679
  if (!r)
1680
1680
  return r;
1681
- const e = je(r);
1681
+ const e = Pe(r);
1682
1682
  if (e.length === 0)
1683
1683
  return r;
1684
- const { nodes: t, sawEmoji: n } = it(e);
1684
+ const { nodes: t, sawEmoji: n } = ct(e);
1685
1685
  return n ? t.length === 1 ? t[0] ?? r : t : r;
1686
1686
  }
1687
- function it(r, e) {
1687
+ function ct(r, e) {
1688
1688
  const t = [];
1689
1689
  let n = "", o = !1, s = e?.emoji ?? 0;
1690
1690
  const i = () => {
1691
1691
  n && (t.push(n), n = "");
1692
1692
  };
1693
1693
  for (const a of r) {
1694
- if (st(a)) {
1694
+ if (at(a)) {
1695
1695
  o = !0, i();
1696
1696
  const d = `motion-emoji-${e ? e.emoji++ : s++}`;
1697
1697
  t.push(
@@ -1703,24 +1703,24 @@ function it(r, e) {
1703
1703
  }
1704
1704
  return i(), o ? { nodes: t, sawEmoji: !0 } : { nodes: [r.join("")], sawEmoji: !1 };
1705
1705
  }
1706
- function Xr(r) {
1706
+ function Zr(r) {
1707
1707
  if (!r)
1708
- return S.None;
1708
+ return y.None;
1709
1709
  const e = r.trim();
1710
1710
  if (!e)
1711
- return S.None;
1712
- const t = Ge.get(e);
1711
+ return y.None;
1712
+ const t = Xe.get(e);
1713
1713
  if (typeof t == "number")
1714
1714
  return t;
1715
1715
  if (typeof document > "u")
1716
- return S.None;
1716
+ return y.None;
1717
1717
  const n = e.split(/\s+/).filter(Boolean);
1718
1718
  if (n.length === 0)
1719
- return S.None;
1720
- const s = n.map((u) => `.${Zr(u)}`).map(
1721
- (u) => new RegExp(`(^|[^a-zA-Z0-9_-])${Qr(u)}(?![a-zA-Z0-9_-])`)
1719
+ return y.None;
1720
+ const s = n.map((u) => `.${Qr(u)}`).map(
1721
+ (u) => new RegExp(`(^|[^a-zA-Z0-9_-])${en(u)}(?![a-zA-Z0-9_-])`)
1722
1722
  );
1723
- let i = S.None, a = !1;
1723
+ let i = y.None, a = !1;
1724
1724
  for (const u of Array.from(document.styleSheets)) {
1725
1725
  let d;
1726
1726
  try {
@@ -1728,17 +1728,17 @@ function Xr(r) {
1728
1728
  } catch {
1729
1729
  continue;
1730
1730
  }
1731
- const l = at(d, s);
1732
- if (l.mask && (i |= l.mask, i === Te))
1731
+ const l = ut(d, s);
1732
+ if (l.mask && (i |= l.mask, i === Oe))
1733
1733
  break;
1734
1734
  a ||= l.sawStyleRule;
1735
1735
  }
1736
- return (i !== S.None || a) && Ge.set(e, i), i;
1736
+ return (i !== y.None || a) && Xe.set(e, i), i;
1737
1737
  }
1738
- function at(r, e) {
1738
+ function ut(r, e) {
1739
1739
  if (!r)
1740
- return { mask: S.None, sawStyleRule: !1 };
1741
- let t = S.None, n = !1;
1740
+ return { mask: y.None, sawStyleRule: !1 };
1741
+ let t = y.None, n = !1;
1742
1742
  for (let o = 0; o < r.length; o++) {
1743
1743
  const s = r[o];
1744
1744
  if (s) {
@@ -1746,13 +1746,13 @@ function at(r, e) {
1746
1746
  const a = s.selectorText ?? "";
1747
1747
  if (!a || !e.some((d) => d.test(a))) continue;
1748
1748
  n = !0;
1749
- for (const d of Pr)
1749
+ for (const d of _r)
1750
1750
  d.hints.some((l) => a.includes(l)) && (t |= d.flag);
1751
- if (t === Te)
1751
+ if (t === Oe)
1752
1752
  return { mask: t, sawStyleRule: !0 };
1753
1753
  } else if ("cssRules" in s) {
1754
- const i = at(s.cssRules, e);
1755
- if (i.mask && (t |= i.mask, t === Te))
1754
+ const i = ut(s.cssRules, e);
1755
+ if (i.mask && (t |= i.mask, t === Oe))
1756
1756
  return { mask: t, sawStyleRule: !0 };
1757
1757
  n ||= i.sawStyleRule;
1758
1758
  }
@@ -1760,38 +1760,38 @@ function at(r, e) {
1760
1760
  }
1761
1761
  return { mask: t, sawStyleRule: n };
1762
1762
  }
1763
- function Zr(r) {
1763
+ function Qr(r) {
1764
1764
  return typeof CSS < "u" && typeof CSS.escape == "function" ? CSS.escape(r) : r.replace(/[^a-zA-Z0-9_-]/g, (e) => `\\${e}`);
1765
1765
  }
1766
- function Qr(r) {
1766
+ function en(r) {
1767
1767
  return r.replace(/[.*+?^${}()|[\]\\]/g, (e) => `\\${e}`);
1768
1768
  }
1769
- const _e = "ikon_auth_session", en = 7 * 24 * 60 * 60 * 1e3;
1770
- function ct(r) {
1769
+ const Le = "ikon_auth_session", tn = 7 * 24 * 60 * 60 * 1e3;
1770
+ function lt(r) {
1771
1771
  try {
1772
- localStorage.setItem(_e, JSON.stringify(r));
1772
+ localStorage.setItem(Le, JSON.stringify(r));
1773
1773
  } catch {
1774
1774
  console.warn("Failed to save auth session to localStorage");
1775
1775
  }
1776
1776
  }
1777
- function ut() {
1777
+ function dt() {
1778
1778
  try {
1779
- const r = localStorage.getItem(_e);
1779
+ const r = localStorage.getItem(Le);
1780
1780
  if (!r) return null;
1781
1781
  const e = JSON.parse(r);
1782
- return Date.now() - e.authenticatedAt > en ? (lt(), null) : e;
1782
+ return Date.now() - e.authenticatedAt > tn ? (ft(), null) : e;
1783
1783
  } catch {
1784
1784
  return console.warn("Failed to load auth session from localStorage"), null;
1785
1785
  }
1786
1786
  }
1787
- function lt() {
1787
+ function ft() {
1788
1788
  try {
1789
- localStorage.removeItem(_e);
1789
+ localStorage.removeItem(Le);
1790
1790
  } catch {
1791
1791
  console.warn("Failed to clear auth session from localStorage");
1792
1792
  }
1793
1793
  }
1794
- function Ee(r) {
1794
+ function Re(r) {
1795
1795
  return {
1796
1796
  id: "",
1797
1797
  provider: r.provider,
@@ -1799,8 +1799,8 @@ function Ee(r) {
1799
1799
  authenticatedAt: r.authenticatedAt
1800
1800
  };
1801
1801
  }
1802
- async function dt(r, e) {
1803
- const t = de(), n = await fetch(`${e}/anonymous`, {
1802
+ async function ht(r, e) {
1803
+ const t = me(), n = await fetch(`${e}/anonymous`, {
1804
1804
  method: "POST",
1805
1805
  headers: { "Content-Type": "application/json" },
1806
1806
  body: JSON.stringify({ deviceId: t, space: r })
@@ -1814,9 +1814,9 @@ async function dt(r, e) {
1814
1814
  provider: "anonymous",
1815
1815
  authenticatedAt: Date.now()
1816
1816
  };
1817
- return ct(s), s;
1817
+ return lt(s), s;
1818
1818
  }
1819
- async function bn(r) {
1819
+ async function vn(r) {
1820
1820
  const { email: e, spaceId: t, authUrl: n, returnUrl: o = window.location.origin + window.location.pathname } = r, s = await fetch(`${n}/email/send`, {
1821
1821
  method: "POST",
1822
1822
  headers: { "Content-Type": "application/json" },
@@ -1831,24 +1831,24 @@ async function bn(r) {
1831
1831
  throw new Error(i);
1832
1832
  }
1833
1833
  }
1834
- function tn() {
1834
+ function rn() {
1835
1835
  const r = new URLSearchParams(window.location.search), e = r.get("ikon_token"), t = r.get("ikon_provider");
1836
1836
  return e && t ? { token: e, provider: t } : null;
1837
1837
  }
1838
- function rn() {
1838
+ function nn() {
1839
1839
  const e = new URLSearchParams(window.location.search).get("error");
1840
1840
  return e ? decodeURIComponent(e) : null;
1841
1841
  }
1842
- function et() {
1842
+ function rt() {
1843
1843
  window.history.replaceState({}, "", window.location.pathname);
1844
1844
  }
1845
- function nn(r, e, t, n) {
1845
+ function on(r, e, t, n) {
1846
1846
  const o = n ?? window.location.origin + window.location.pathname + window.location.search;
1847
1847
  return `${t}/oauth/${r}?space=${encodeURIComponent(e)}&return=${encodeURIComponent(o)}`;
1848
1848
  }
1849
- const Me = tt(null);
1850
- function vn({ children: r, config: e }) {
1851
- const [t, n] = W({
1849
+ const Ue = nt(null);
1850
+ function wn({ children: r, config: e }) {
1851
+ const [t, n] = Y({
1852
1852
  isAuthenticated: !1,
1853
1853
  isLoading: !0,
1854
1854
  user: null,
@@ -1856,9 +1856,9 @@ function vn({ children: r, config: e }) {
1856
1856
  });
1857
1857
  $(() => {
1858
1858
  (() => {
1859
- const d = rn();
1859
+ const d = nn();
1860
1860
  if (d) {
1861
- et(), n({
1861
+ rt(), n({
1862
1862
  isAuthenticated: !1,
1863
1863
  isLoading: !1,
1864
1864
  user: null,
@@ -1866,27 +1866,27 @@ function vn({ children: r, config: e }) {
1866
1866
  });
1867
1867
  return;
1868
1868
  }
1869
- const l = tn();
1869
+ const l = rn();
1870
1870
  if (l) {
1871
- const h = {
1871
+ const p = {
1872
1872
  token: l.token,
1873
1873
  provider: l.provider,
1874
1874
  authenticatedAt: Date.now()
1875
1875
  };
1876
- ct(h), et(), n({
1876
+ lt(p), rt(), n({
1877
1877
  isAuthenticated: !0,
1878
1878
  isLoading: !1,
1879
- user: Ee(h),
1879
+ user: Re(p),
1880
1880
  error: null
1881
1881
  });
1882
1882
  return;
1883
1883
  }
1884
- const f = ut();
1884
+ const f = dt();
1885
1885
  if (f) {
1886
1886
  n({
1887
1887
  isAuthenticated: !0,
1888
1888
  isLoading: !1,
1889
- user: Ee(f),
1889
+ user: Re(f),
1890
1890
  error: null
1891
1891
  });
1892
1892
  return;
@@ -1899,7 +1899,7 @@ function vn({ children: r, config: e }) {
1899
1899
  });
1900
1900
  })();
1901
1901
  }, []);
1902
- const o = V(
1902
+ const o = z(
1903
1903
  async (u) => {
1904
1904
  if (!e.spaceId) {
1905
1905
  n((f) => ({
@@ -1911,34 +1911,34 @@ function vn({ children: r, config: e }) {
1911
1911
  if (u === "guest") {
1912
1912
  n((f) => ({ ...f, isLoading: !0 }));
1913
1913
  try {
1914
- const f = e.authUrl ?? Re(), h = await dt(e.spaceId, f);
1914
+ const f = e.authUrl ?? Ne(), p = await ht(e.spaceId, f);
1915
1915
  n({
1916
1916
  isAuthenticated: !0,
1917
1917
  isLoading: !1,
1918
- user: Ee(h),
1918
+ user: Re(p),
1919
1919
  error: null
1920
1920
  });
1921
1921
  } catch (f) {
1922
- n((h) => ({
1923
- ...h,
1922
+ n((p) => ({
1923
+ ...p,
1924
1924
  isLoading: !1,
1925
1925
  error: f instanceof Error ? f.message : "Guest login failed"
1926
1926
  }));
1927
1927
  }
1928
1928
  return;
1929
1929
  }
1930
- const d = e.authUrl ?? Re(), l = nn(u, e.spaceId, d);
1930
+ const d = e.authUrl ?? Ne(), l = on(u, e.spaceId, d);
1931
1931
  window.location.href = l;
1932
1932
  },
1933
1933
  [e.authUrl, e.spaceId]
1934
- ), s = V(() => {
1935
- lt(), n({
1934
+ ), s = z(() => {
1935
+ ft(), n({
1936
1936
  isAuthenticated: !1,
1937
1937
  isLoading: !1,
1938
1938
  user: null,
1939
1939
  error: null
1940
1940
  });
1941
- }, []), i = V(() => t.user?.token ?? null, [t.user]), a = M(
1941
+ }, []), i = z(() => t.user?.token ?? null, [t.user]), a = L(
1942
1942
  () => ({
1943
1943
  state: t,
1944
1944
  login: o,
@@ -1947,19 +1947,19 @@ function vn({ children: r, config: e }) {
1947
1947
  }),
1948
1948
  [t, o, s, i]
1949
1949
  );
1950
- return /* @__PURE__ */ b.jsx(Me, { value: a, children: r });
1950
+ return /* @__PURE__ */ b.jsx(Ue, { value: a, children: r });
1951
1951
  }
1952
- function on() {
1953
- const r = Pe(Me);
1952
+ function sn() {
1953
+ const r = Me(Ue);
1954
1954
  if (!r)
1955
1955
  throw new Error("useAuth must be used within an AuthProvider");
1956
1956
  return r;
1957
1957
  }
1958
- function wn() {
1959
- return Pe(Me);
1958
+ function En() {
1959
+ return Me(Ue);
1960
1960
  }
1961
- function En(r) {
1962
- const { config: e, guestUrlParam: t } = r, { state: n, login: o } = on(), s = R(!1);
1961
+ function kn(r) {
1962
+ const { config: e, guestUrlParam: t } = r, { state: n, login: o } = sn(), s = E(!1);
1963
1963
  return $(() => {
1964
1964
  if (!t || n.isAuthenticated || n.isLoading || s.current || !e.methods.includes("guest"))
1965
1965
  return;
@@ -1976,7 +1976,7 @@ function En(r) {
1976
1976
  error: n.error
1977
1977
  };
1978
1978
  }
1979
- function kn({
1979
+ function Rn({
1980
1980
  connectionState: r,
1981
1981
  error: e,
1982
1982
  isReady: t,
@@ -1989,7 +1989,7 @@ function kn({
1989
1989
  renderConnectingSlow: d,
1990
1990
  renderConnected: l,
1991
1991
  renderOffline: f,
1992
- renderError: h
1992
+ renderError: p
1993
1993
  }) {
1994
1994
  switch (r) {
1995
1995
  case "idle":
@@ -2010,219 +2010,221 @@ function kn({
2010
2010
  case "offline":
2011
2011
  return f();
2012
2012
  case "offlineError":
2013
- return h(e ?? s?.lastError?.message ?? null);
2013
+ return p(e ?? s?.lastError?.message ?? null);
2014
2014
  default:
2015
2015
  return null;
2016
2016
  }
2017
2017
  }
2018
- const ke = me("useIkonApp");
2019
- function Rn(r) {
2020
- const { authConfig: e, localServer: t, modules: n, registerModules: o, onJoined: s, onConnectionStateChange: i, onError: a, updateUrlOnJoin: u = !0, timeouts: d, media: l, debug: f } = r, h = R(null), k = R(null), A = R(null), v = R(!1), p = R(l), g = R(f), E = R(d), O = R(i), T = R(a), U = R(s), z = R(u);
2021
- p.current = l, g.current = f, E.current = d, O.current = i, T.current = a, U.current = s, z.current = u;
2022
- const [H, ae] = W("idle"), [ge, ce] = W(null), [Y, ue] = W(null), [D, X] = W(null), [Z, Q] = W(!1), P = M(() => {
2018
+ const Ae = ye("useIkonApp");
2019
+ function An(r) {
2020
+ const { authConfig: e, localServer: t, modules: n, registerModules: o, onJoined: s, onConnectionStateChange: i, onError: a, updateUrlOnJoin: u = !0, timeouts: d, audio: l, video: f, mediaSession: p, debug: k } = r, C = E(null), v = E(null), m = E(null), g = E(!1), w = E(l), P = E(f), T = E(p), x = E(k), D = E(d), ae = E(i), H = E(a), ce = E(s), ue = E(u);
2021
+ w.current = l, P.current = f, T.current = p, x.current = k, D.current = d, ae.current = i, H.current = a, ce.current = s, ue.current = u;
2022
+ const [q, le] = Y("idle"), [be, J] = Y(null), [X, de] = Y(null), [B, fe] = Y(null), [Z, c] = Y(!1), h = L(() => {
2023
2023
  try {
2024
- return St();
2024
+ return bt();
2025
2025
  } catch {
2026
2026
  return { parameters: {} };
2027
2027
  }
2028
- }, []), B = M(() => e?.enabled ? ut() : null, [e?.enabled]), q = t?.enabled ?? !1, c = t?.host ?? "localhost", m = t?.httpsPort ?? 8443;
2028
+ }, []), S = L(() => e?.enabled ? dt() : null, [e?.enabled]), R = t?.enabled ?? !1, M = t?.host ?? "localhost", j = t?.httpsPort ?? 8443;
2029
2029
  $(() => {
2030
- !q && Le() && e && !e.enabled && e.spaceId && !D && !Z && (Q(!0), dt(e.spaceId, e.authUrl ?? Re()).then((I) => {
2031
- X(I.token);
2030
+ !R && xe() && e && !e.enabled && e.spaceId && !B && !Z && (c(!0), ht(e.spaceId, e.authUrl ?? Ne()).then((I) => {
2031
+ fe(I.token);
2032
2032
  }).catch((I) => {
2033
- ke.error("Anonymous auth failed:", I), ce(I instanceof Error ? I.message : "Anonymous auth failed");
2033
+ Ae.error("Anonymous auth failed:", I), J(I instanceof Error ? I.message : "Anonymous auth failed");
2034
2034
  }).finally(() => {
2035
- Q(!1);
2035
+ c(!1);
2036
2036
  }));
2037
- }, [q, e, D, Z]);
2038
- const w = M(() => {
2039
- if (q) {
2040
- const C = B?.token ? bt(B.token) ?? de() : de();
2037
+ }, [R, e, B, Z]);
2038
+ const W = L(() => {
2039
+ if (R) {
2040
+ const N = S?.token ? vt(S.token) ?? me() : me();
2041
2041
  return {
2042
2042
  local: {
2043
- host: c,
2044
- httpsPort: m,
2045
- userId: C
2043
+ host: M,
2044
+ httpsPort: j,
2045
+ userId: N
2046
2046
  }
2047
2047
  };
2048
2048
  }
2049
- return B?.token && e?.spaceId ? {
2049
+ return S?.token && e?.spaceId ? {
2050
2050
  sessionToken: {
2051
- token: B.token,
2051
+ token: S.token,
2052
2052
  spaceId: e.spaceId,
2053
- backendType: Ue(),
2054
- sessionId: P.sessionId,
2055
- channelKey: P.channelKey,
2056
- parameters: P.parameters
2053
+ backendType: $e(),
2054
+ sessionId: h.sessionId,
2055
+ channelKey: h.channelKey,
2056
+ parameters: h.parameters
2057
2057
  }
2058
- } : D && e?.spaceId ? {
2058
+ } : B && e?.spaceId ? {
2059
2059
  sessionToken: {
2060
- token: D,
2060
+ token: B,
2061
2061
  spaceId: e.spaceId,
2062
- backendType: Ue(),
2063
- sessionId: P.sessionId,
2064
- channelKey: P.channelKey,
2065
- parameters: P.parameters
2062
+ backendType: $e(),
2063
+ sessionId: h.sessionId,
2064
+ channelKey: h.channelKey,
2065
+ parameters: h.parameters
2066
2066
  }
2067
- } : Le() ? null : {
2067
+ } : xe() ? null : {
2068
2068
  local: {
2069
- host: c,
2070
- httpsPort: m,
2071
- userId: de()
2069
+ host: M,
2070
+ httpsPort: j,
2071
+ userId: me()
2072
2072
  }
2073
2073
  };
2074
- }, [q, c, m, B?.token, e?.spaceId, D, P.sessionId, P.channelKey, P.parameters]);
2075
- dr(Y);
2076
- const N = hr(Y);
2074
+ }, [R, M, j, S?.token, e?.spaceId, B, h.sessionId, h.channelKey, h.parameters]);
2075
+ fr(X);
2076
+ const Q = mr(X);
2077
2077
  $(() => {
2078
- if (!v.current) {
2079
- if (v.current = !0, A.current = nr(), n)
2080
- for (const C of n)
2081
- C(A.current);
2082
- o?.(A.current), A.current.loadRegisteredModules().catch((C) => {
2083
- ke.error("Failed to load UI modules", C);
2078
+ if (!g.current) {
2079
+ if (g.current = !0, m.current = or(), n)
2080
+ for (const N of n)
2081
+ N(m.current);
2082
+ o?.(m.current), m.current.loadRegisteredModules().catch((N) => {
2083
+ Ae.error("Failed to load UI modules", N);
2084
2084
  });
2085
2085
  }
2086
2086
  }, []), $(() => {
2087
- if (!w) return;
2088
- const C = new vt({
2089
- ...w,
2090
- debug: g.current,
2091
- timeouts: E.current,
2092
- media: p.current,
2093
- onConnectionStateChange: (y) => {
2094
- ae(y), O.current?.(y);
2087
+ if (!W) return;
2088
+ const N = new wt({
2089
+ ...W,
2090
+ debug: x.current,
2091
+ timeouts: D.current,
2092
+ audio: w.current,
2093
+ video: P.current,
2094
+ mediaSession: T.current,
2095
+ onConnectionStateChange: (_) => {
2096
+ le(_), ae.current?.(_);
2095
2097
  },
2096
- onError: (y) => {
2097
- ce(y.message), T.current?.(y);
2098
+ onError: (_) => {
2099
+ J(_.message), H.current?.(_);
2098
2100
  },
2099
2101
  onJoined: () => {
2100
- const y = C.globalState?.SessionId;
2101
- z.current && y && window.history.replaceState(null, "", `/s/${y}${window.location.search}`), U.current?.(y);
2102
+ const _ = N.globalState?.SessionId;
2103
+ ue.current && _ && window.history.replaceState(null, "", `/s/${_}${window.location.search}`), ce.current?.(_);
2102
2104
  }
2103
2105
  });
2104
- h.current = C;
2105
- const I = new Ut({ client: C });
2106
- return k.current = I, ue(I), C.connect().catch((y) => {
2107
- ke.error("Connection failed:", y);
2106
+ C.current = N;
2107
+ const I = new xt({ client: N });
2108
+ return v.current = I, de(I), N.connect().catch((_) => {
2109
+ Ae.error("Connection failed:", _);
2108
2110
  }), () => {
2109
- C.disconnect(), h.current = null, I.dispose(), k.current = null;
2111
+ N.disconnect(), C.current = null, I.dispose(), v.current = null;
2110
2112
  };
2111
- }, [w]);
2112
- const x = V((C, I) => {
2113
- const y = typeof I == "string" ? I : JSON.stringify(I ?? {});
2114
- h.current?.sendActionCall(C, y);
2115
- }, []), _ = H === "connected" || H === "reconnecting";
2113
+ }, [W]);
2114
+ const A = z((N, I) => {
2115
+ const _ = typeof I == "string" ? I : JSON.stringify(I ?? {});
2116
+ C.current?.sendActionCall(N, _);
2117
+ }, []), V = q === "connected" || q === "reconnecting";
2116
2118
  return {
2117
- connectionState: H,
2118
- error: ge,
2119
- stores: N,
2120
- client: h.current,
2121
- registry: A.current,
2122
- clientRef: h,
2123
- uiRef: k,
2124
- registryRef: A,
2125
- onAction: x,
2126
- isReady: _
2119
+ connectionState: q,
2120
+ error: be,
2121
+ stores: Q,
2122
+ client: C.current,
2123
+ registry: m.current,
2124
+ clientRef: C,
2125
+ uiRef: v,
2126
+ registryRef: m,
2127
+ onAction: A,
2128
+ isReady: V
2127
2129
  };
2128
2130
  }
2129
- function An(r) {
2130
- const e = R(!1);
2131
- return V(() => {
2131
+ function Nn(r) {
2132
+ const e = E(!1);
2133
+ return z(() => {
2132
2134
  if (e.current) return;
2133
2135
  e.current = !0;
2134
2136
  const t = document.createElement("link");
2135
2137
  t.rel = "stylesheet", t.href = r, document.head.appendChild(t);
2136
2138
  }, [r]);
2137
2139
  }
2138
- const ft = tt(null);
2139
- function sn(r, e) {
2140
+ const mt = nt(null);
2141
+ function an(r, e) {
2140
2142
  return e ? r.replace(/\{(\w+)\}/g, (t, n) => e[n] ?? `{${n}}`) : r;
2141
2143
  }
2142
- function an(r, e) {
2144
+ function cn(r, e) {
2143
2145
  const n = new URLSearchParams(window.location.search).get("lang");
2144
2146
  if (n && r.includes(n))
2145
2147
  return n;
2146
2148
  const o = navigator.language.split("-")[0];
2147
2149
  return r.includes(o) ? o : e && r.includes(e) ? e : "en";
2148
2150
  }
2149
- function cn(r, e, t) {
2150
- return e ? an(r, t) : t && r.includes(t) ? t : "en";
2151
+ function un(r, e, t) {
2152
+ return e ? cn(r, t) : t && r.includes(t) ? t : "en";
2151
2153
  }
2152
- function Nn({
2154
+ function Cn({
2153
2155
  children: r,
2154
2156
  translations: e,
2155
2157
  defaultLanguage: t,
2156
2158
  detectLanguage: n = !1
2157
2159
  }) {
2158
- const o = Object.keys(e), s = cn(o, n, t), i = e[s] ?? e.en, a = M(
2160
+ const o = Object.keys(e), s = un(o, n, t), i = e[s] ?? e.en, a = L(
2159
2161
  () => ({
2160
2162
  t: (u, d) => {
2161
2163
  const l = i[u];
2162
- return sn(l, d);
2164
+ return an(l, d);
2163
2165
  },
2164
2166
  locale: s,
2165
2167
  translations: i
2166
2168
  }),
2167
2169
  [i, s]
2168
2170
  );
2169
- return /* @__PURE__ */ b.jsx(ft, { value: a, children: r });
2171
+ return /* @__PURE__ */ b.jsx(mt, { value: a, children: r });
2170
2172
  }
2171
- function Cn() {
2172
- const r = Pe(ft);
2173
+ function In() {
2174
+ const r = Me(mt);
2173
2175
  if (!r)
2174
2176
  throw new Error("useI18n must be used within an I18nProvider");
2175
2177
  return r;
2176
2178
  }
2177
2179
  export {
2178
- vn as AuthProvider,
2179
- kn as ConnectionStateRenderer,
2180
- Nn as I18nProvider,
2181
- Wt as IKON_UI_BASE_MODULE,
2182
- Qt as IKON_UI_MEDIA_MODULE,
2183
- Ne as IKON_UI_STREAM_CATEGORY,
2184
- Kt as IKON_UI_VIDEO_CANVAS_TYPE,
2185
- Gt as IKON_UI_VIDEO_URL_PLAYER_TYPE,
2186
- Ut as IkonUi,
2187
- rr as IkonUiRegistry,
2188
- mn as IkonUiSurface,
2189
- Mt as UiComponentRegistry,
2190
- _t as UiRenderer,
2191
- jn as UiStreamStore,
2192
- pn as areIkonUiModuleListsEqual,
2193
- dt as authenticateAnonymous,
2194
- nn as buildOAuthRedirectUrl,
2195
- lt as clearAuthSession,
2196
- et as clearOAuthParams,
2197
- qt as createBaseResolvers,
2198
- fn as createComponentLibrary,
2199
- nr as createIkonUiRegistry,
2200
- Xt as createMediaResolvers,
2201
- Lt as isIkonUiCategoryMatch,
2202
- ut as loadAuthSession,
2203
- Yt as loadBaseModule,
2204
- er as loadMediaModule,
2205
- jr as normalizeIkonUiModuleList,
2206
- yn as parseIkonUiInitPayload,
2207
- tn as parseOAuthCallback,
2208
- rn as parseOAuthError,
2209
- Or as readIkonUiModules,
2210
- gn as readIkonUiModulesFromSources,
2211
- Jt as registerBaseModule,
2212
- tr as registerMediaModule,
2213
- Ot as renderChildren,
2214
- Sn as renderMotionLetters,
2215
- ct as saveAuthSession,
2216
- bn as sendMagicLink,
2217
- Ee as sessionToUser,
2218
- on as useAuth,
2219
- En as useAuthGuard,
2220
- wn as useAuthOptional,
2221
- Cn as useI18n,
2222
- Rn as useIkonApp,
2223
- dr as useIkonStyles,
2224
- hr as useIkonUiStores,
2225
- An as useLazyFont,
2180
+ wn as AuthProvider,
2181
+ Rn as ConnectionStateRenderer,
2182
+ Cn as I18nProvider,
2183
+ Yt as IKON_UI_BASE_MODULE,
2184
+ er as IKON_UI_MEDIA_MODULE,
2185
+ Ie as IKON_UI_STREAM_CATEGORY,
2186
+ Gt as IKON_UI_VIDEO_CANVAS_TYPE,
2187
+ Ht as IKON_UI_VIDEO_URL_PLAYER_TYPE,
2188
+ xt as IkonUi,
2189
+ nr as IkonUiRegistry,
2190
+ pn as IkonUiSurface,
2191
+ Lt as UiComponentRegistry,
2192
+ Mt as UiRenderer,
2193
+ On as UiStreamStore,
2194
+ gn as areIkonUiModuleListsEqual,
2195
+ ht as authenticateAnonymous,
2196
+ on as buildOAuthRedirectUrl,
2197
+ ft as clearAuthSession,
2198
+ rt as clearOAuthParams,
2199
+ Wt as createBaseResolvers,
2200
+ hn as createComponentLibrary,
2201
+ or as createIkonUiRegistry,
2202
+ Zt as createMediaResolvers,
2203
+ Ut as isIkonUiCategoryMatch,
2204
+ dt as loadAuthSession,
2205
+ Jt as loadBaseModule,
2206
+ tr as loadMediaModule,
2207
+ Or as normalizeIkonUiModuleList,
2208
+ Sn as parseIkonUiInitPayload,
2209
+ rn as parseOAuthCallback,
2210
+ nn as parseOAuthError,
2211
+ Pr as readIkonUiModules,
2212
+ yn as readIkonUiModulesFromSources,
2213
+ Kt as registerBaseModule,
2214
+ rr as registerMediaModule,
2215
+ Pt as renderChildren,
2216
+ bn as renderMotionLetters,
2217
+ lt as saveAuthSession,
2218
+ vn as sendMagicLink,
2219
+ Re as sessionToUser,
2220
+ sn as useAuth,
2221
+ kn as useAuthGuard,
2222
+ En as useAuthOptional,
2223
+ In as useI18n,
2224
+ An as useIkonApp,
2225
+ fr as useIkonStyles,
2226
+ mr as useIkonUiStores,
2227
+ Nn as useLazyFont,
2226
2228
  F as useUiNode,
2227
- hn as useUiStore
2229
+ mn as useUiStore
2228
2230
  };