@ikonai/sdk-react-ui 0.0.28 → 0.0.29

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 Xe, UiStreamStore as He } from "@ikonai/sdk-ui";
2
- import { UiStreamStore as zr } from "@ikonai/sdk-ui";
3
- import Je, { useSyncExternalStore as Ke, Fragment as Ze, useMemo as Qe, memo as _, useRef as Le, useEffect as Y, useCallback as Se } from "react";
4
- import { createLogger as ue } from "@ikonai/sdk";
5
- var q = { exports: {} }, x = {};
1
+ import { IkonUICore as He, UiStreamStore as Je } from "@ikonai/sdk-ui";
2
+ import { UiStreamStore as qr } from "@ikonai/sdk-ui";
3
+ import Ze, { useSyncExternalStore as pe, useMemo as q, memo as C, useRef as I, useCallback as ae, Fragment as Qe, useEffect as D, useState as et } from "react";
4
+ import { createLogger as he } from "@ikonai/sdk";
5
+ var K = { exports: {} }, F = {};
6
6
  /**
7
7
  * @license React
8
8
  * react-jsx-runtime.production.js
@@ -12,10 +12,10 @@ var q = { exports: {} }, x = {};
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 be;
16
- function et() {
17
- if (be) return x;
18
- be = 1;
15
+ var Re;
16
+ function tt() {
17
+ if (Re) return F;
18
+ Re = 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;
@@ -32,9 +32,9 @@ function et() {
32
32
  props: s
33
33
  };
34
34
  }
35
- return x.Fragment = e, x.jsx = t, x.jsxs = t, x;
35
+ return F.Fragment = e, F.jsx = t, F.jsxs = t, F;
36
36
  }
37
- var U = {};
37
+ var $ = {};
38
38
  /**
39
39
  * @license React
40
40
  * react-jsx-runtime.development.js
@@ -44,47 +44,47 @@ var U = {};
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 ve;
48
- function tt() {
49
- return ve || (ve = 1, process.env.NODE_ENV !== "production" && function() {
47
+ var ke;
48
+ function rt() {
49
+ return ke || (ke = 1, process.env.NODE_ENV !== "production" && function() {
50
50
  function r(a) {
51
51
  if (a == null) return null;
52
52
  if (typeof a == "function")
53
- return a.$$typeof === qe ? null : a.displayName || a.name || null;
53
+ return a.$$typeof === Ge ? null : a.displayName || a.name || null;
54
54
  if (typeof a == "string") return a;
55
55
  switch (a) {
56
- case E:
56
+ case S:
57
57
  return "Fragment";
58
58
  case y:
59
59
  return "Profiler";
60
- case h:
60
+ case f:
61
61
  return "StrictMode";
62
- case M:
62
+ case P:
63
63
  return "Suspense";
64
- case W:
64
+ case G:
65
65
  return "SuspenseList";
66
- case We:
66
+ case Ye:
67
67
  return "Activity";
68
68
  }
69
69
  if (typeof a == "object")
70
70
  switch (typeof a.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
  ), a.$$typeof) {
73
- case A:
73
+ case N:
74
74
  return "Portal";
75
- case C:
75
+ case A:
76
76
  return (a.displayName || "Context") + ".Provider";
77
- case v:
77
+ case E:
78
78
  return (a._context.displayName || "Context") + ".Consumer";
79
- case T:
80
- var f = a.render;
81
- return a = a.displayName, a || (a = f.displayName || f.name || "", a = a !== "" ? "ForwardRef(" + a + ")" : "ForwardRef"), a;
82
- case De:
83
- return f = a.displayName || null, f !== null ? f : r(a.type) || "Memo";
84
- case de:
85
- f = a._payload, a = a._init;
79
+ case j:
80
+ var m = a.render;
81
+ return a = a.displayName, a || (a = m.displayName || m.name || "", a = a !== "" ? "ForwardRef(" + a + ")" : "ForwardRef"), a;
82
+ case We:
83
+ return m = a.displayName || null, m !== null ? m : r(a.type) || "Memo";
84
+ case ge:
85
+ m = a._payload, a = a._init;
86
86
  try {
87
- return r(a(f));
87
+ return r(a(m));
88
88
  } catch {
89
89
  }
90
90
  }
@@ -96,73 +96,73 @@ function tt() {
96
96
  function t(a) {
97
97
  try {
98
98
  e(a);
99
- var f = !1;
99
+ var m = !1;
100
100
  } catch {
101
- f = !0;
101
+ m = !0;
102
102
  }
103
- if (f) {
104
- f = console;
105
- var b = f.error, w = typeof Symbol == "function" && Symbol.toStringTag && a[Symbol.toStringTag] || a.constructor.name || "Object";
106
- return b.call(
107
- f,
103
+ if (m) {
104
+ m = console;
105
+ var v = m.error, R = typeof Symbol == "function" && Symbol.toStringTag && a[Symbol.toStringTag] || a.constructor.name || "Object";
106
+ return v.call(
107
+ m,
108
108
  "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
109
- w
109
+ R
110
110
  ), e(a);
111
111
  }
112
112
  }
113
113
  function n(a) {
114
- if (a === E) return "<>";
115
- if (typeof a == "object" && a !== null && a.$$typeof === de)
114
+ if (a === S) return "<>";
115
+ if (typeof a == "object" && a !== null && a.$$typeof === ge)
116
116
  return "<...>";
117
117
  try {
118
- var f = r(a);
119
- return f ? "<" + f + ">" : "<...>";
118
+ var m = r(a);
119
+ return m ? "<" + m + ">" : "<...>";
120
120
  } catch {
121
121
  return "<...>";
122
122
  }
123
123
  }
124
124
  function o() {
125
- var a = J.A;
125
+ var a = Z.A;
126
126
  return a === null ? null : a.getOwner();
127
127
  }
128
128
  function s() {
129
129
  return Error("react-stack-top-frame");
130
130
  }
131
131
  function i(a) {
132
- if (fe.call(a, "key")) {
133
- var f = Object.getOwnPropertyDescriptor(a, "key").get;
134
- if (f && f.isReactWarning) return !1;
132
+ if (ye.call(a, "key")) {
133
+ var m = Object.getOwnPropertyDescriptor(a, "key").get;
134
+ if (m && m.isReactWarning) return !1;
135
135
  }
136
136
  return a.key !== void 0;
137
137
  }
138
- function c(a, f) {
139
- function b() {
140
- me || (me = !0, console.error(
138
+ function c(a, m) {
139
+ function v() {
140
+ Se || (Se = !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
- f
142
+ m
143
143
  ));
144
144
  }
145
- b.isReactWarning = !0, Object.defineProperty(a, "key", {
146
- get: b,
145
+ v.isReactWarning = !0, Object.defineProperty(a, "key", {
146
+ get: v,
147
147
  configurable: !0
148
148
  });
149
149
  }
150
- function l() {
150
+ function u() {
151
151
  var a = r(this.type);
152
- return pe[a] || (pe[a] = !0, console.error(
152
+ return be[a] || (be[a] = !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
  )), a = this.props.ref, a !== void 0 ? a : null;
155
155
  }
156
- function u(a, f, b, w, O, j, Z, Q) {
157
- return b = j.ref, a = {
158
- $$typeof: k,
156
+ function d(a, m, v, R, M, O, ee, te) {
157
+ return v = O.ref, a = {
158
+ $$typeof: w,
159
159
  type: a,
160
- key: f,
161
- props: j,
162
- _owner: O
163
- }, (b !== void 0 ? b : null) !== null ? Object.defineProperty(a, "ref", {
160
+ key: m,
161
+ props: O,
162
+ _owner: M
163
+ }, (v !== void 0 ? v : null) !== null ? Object.defineProperty(a, "ref", {
164
164
  enumerable: !1,
165
- get: l
165
+ get: u
166
166
  }) : Object.defineProperty(a, "ref", { enumerable: !1, value: null }), a._store = {}, Object.defineProperty(a._store, "validated", {
167
167
  configurable: !1,
168
168
  enumerable: !1,
@@ -177,120 +177,141 @@ function tt() {
177
177
  configurable: !1,
178
178
  enumerable: !1,
179
179
  writable: !0,
180
- value: Z
180
+ value: ee
181
181
  }), Object.defineProperty(a, "_debugTask", {
182
182
  configurable: !1,
183
183
  enumerable: !1,
184
184
  writable: !0,
185
- value: Q
185
+ value: te
186
186
  }), Object.freeze && (Object.freeze(a.props), Object.freeze(a)), a;
187
187
  }
188
- function d(a, f, b, w, O, j, Z, Q) {
189
- var R = f.children;
190
- if (R !== void 0)
191
- if (w)
192
- if (Ye(R)) {
193
- for (w = 0; w < R.length; w++)
194
- m(R[w]);
195
- Object.freeze && Object.freeze(R);
188
+ function l(a, m, v, R, M, O, ee, te) {
189
+ var k = m.children;
190
+ if (k !== void 0)
191
+ if (R)
192
+ if (Ke(k)) {
193
+ for (R = 0; R < k.length; R++)
194
+ p(k[R]);
195
+ Object.freeze && Object.freeze(k);
196
196
  } else
197
197
  console.error(
198
198
  "React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
199
199
  );
200
- else m(R);
201
- if (fe.call(f, "key")) {
202
- R = r(a);
203
- var I = Object.keys(f).filter(function(Ge) {
204
- return Ge !== "key";
200
+ else p(k);
201
+ if (ye.call(m, "key")) {
202
+ k = r(a);
203
+ var L = Object.keys(m).filter(function(Xe) {
204
+ return Xe !== "key";
205
205
  });
206
- w = 0 < I.length ? "{key: someKey, " + I.join(": ..., ") + ": ...}" : "{key: someKey}", ye[R + w] || (I = 0 < I.length ? "{" + I.join(": ..., ") + ": ...}" : "{}", console.error(
206
+ R = 0 < L.length ? "{key: someKey, " + L.join(": ..., ") + ": ...}" : "{key: someKey}", we[k + R] || (L = 0 < L.length ? "{" + L.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
- w,
214
213
  R,
215
- I,
216
- R
217
- ), ye[R + w] = !0);
214
+ k,
215
+ L,
216
+ k
217
+ ), we[k + R] = !0);
218
218
  }
219
- if (R = null, b !== void 0 && (t(b), R = "" + b), i(f) && (t(f.key), R = "" + f.key), "key" in f) {
220
- b = {};
221
- for (var ee in f)
222
- ee !== "key" && (b[ee] = f[ee]);
223
- } else b = f;
224
- return R && c(
225
- b,
219
+ if (k = null, v !== void 0 && (t(v), k = "" + v), i(m) && (t(m.key), k = "" + m.key), "key" in m) {
220
+ v = {};
221
+ for (var re in m)
222
+ re !== "key" && (v[re] = m[re]);
223
+ } else v = m;
224
+ return k && c(
225
+ v,
226
226
  typeof a == "function" ? a.displayName || a.name || "Unknown" : a
227
- ), u(
227
+ ), d(
228
228
  a,
229
- R,
230
- j,
229
+ k,
231
230
  O,
231
+ M,
232
232
  o(),
233
- b,
234
- Z,
235
- Q
233
+ v,
234
+ ee,
235
+ te
236
236
  );
237
237
  }
238
- function m(a) {
239
- typeof a == "object" && a !== null && a.$$typeof === k && a._store && (a._store.validated = 1);
238
+ function p(a) {
239
+ typeof a == "object" && a !== null && a.$$typeof === w && a._store && (a._store.validated = 1);
240
240
  }
241
- var g = Je, k = Symbol.for("react.transitional.element"), A = Symbol.for("react.portal"), E = Symbol.for("react.fragment"), h = Symbol.for("react.strict_mode"), y = Symbol.for("react.profiler"), v = Symbol.for("react.consumer"), C = Symbol.for("react.context"), T = Symbol.for("react.forward_ref"), M = Symbol.for("react.suspense"), W = Symbol.for("react.suspense_list"), De = Symbol.for("react.memo"), de = Symbol.for("react.lazy"), We = Symbol.for("react.activity"), qe = Symbol.for("react.client.reference"), J = g.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, fe = Object.prototype.hasOwnProperty, Ye = Array.isArray, K = console.createTask ? console.createTask : function() {
241
+ var h = Ze, w = Symbol.for("react.transitional.element"), N = Symbol.for("react.portal"), S = Symbol.for("react.fragment"), f = Symbol.for("react.strict_mode"), y = Symbol.for("react.profiler"), E = Symbol.for("react.consumer"), A = Symbol.for("react.context"), j = Symbol.for("react.forward_ref"), P = Symbol.for("react.suspense"), G = Symbol.for("react.suspense_list"), We = Symbol.for("react.memo"), ge = Symbol.for("react.lazy"), Ye = Symbol.for("react.activity"), Ge = Symbol.for("react.client.reference"), Z = h.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, ye = Object.prototype.hasOwnProperty, Ke = Array.isArray, Q = console.createTask ? console.createTask : function() {
242
242
  return null;
243
243
  };
244
- g = {
244
+ h = {
245
245
  "react-stack-bottom-frame": function(a) {
246
246
  return a();
247
247
  }
248
248
  };
249
- var me, pe = {}, he = g["react-stack-bottom-frame"].bind(
250
- g,
249
+ var Se, be = {}, ve = h["react-stack-bottom-frame"].bind(
250
+ h,
251
251
  s
252
- )(), ge = K(n(s)), ye = {};
253
- U.Fragment = E, U.jsx = function(a, f, b, w, O) {
254
- var j = 1e4 > J.recentlyCreatedOwnerStacks++;
255
- return d(
252
+ )(), Ee = Q(n(s)), we = {};
253
+ $.Fragment = S, $.jsx = function(a, m, v, R, M) {
254
+ var O = 1e4 > Z.recentlyCreatedOwnerStacks++;
255
+ return l(
256
256
  a,
257
- f,
258
- b,
257
+ m,
258
+ v,
259
259
  !1,
260
- w,
261
- O,
262
- j ? Error("react-stack-top-frame") : he,
263
- j ? K(n(a)) : ge
260
+ R,
261
+ M,
262
+ O ? Error("react-stack-top-frame") : ve,
263
+ O ? Q(n(a)) : Ee
264
264
  );
265
- }, U.jsxs = function(a, f, b, w, O) {
266
- var j = 1e4 > J.recentlyCreatedOwnerStacks++;
267
- return d(
265
+ }, $.jsxs = function(a, m, v, R, M) {
266
+ var O = 1e4 > Z.recentlyCreatedOwnerStacks++;
267
+ return l(
268
268
  a,
269
- f,
270
- b,
269
+ m,
270
+ v,
271
271
  !0,
272
- w,
273
- O,
274
- j ? Error("react-stack-top-frame") : he,
275
- j ? K(n(a)) : ge
272
+ R,
273
+ M,
274
+ O ? Error("react-stack-top-frame") : ve,
275
+ O ? Q(n(a)) : Ee
276
276
  );
277
277
  };
278
- }()), U;
279
- }
280
- var Ee;
281
- function rt() {
282
- return Ee || (Ee = 1, process.env.NODE_ENV === "production" ? q.exports = et() : q.exports = tt()), q.exports;
278
+ }()), $;
279
+ }
280
+ var Ne;
281
+ function nt() {
282
+ return Ne || (Ne = 1, process.env.NODE_ENV === "production" ? K.exports = tt() : K.exports = rt()), K.exports;
283
+ }
284
+ var b = nt();
285
+ function ot(r, e) {
286
+ const t = pe(
287
+ (n) => r.subscribe(n),
288
+ () => {
289
+ const n = r.getSnapshot(), o = e ?? n.rootViewId, s = o ? n.views.get(o) : void 0;
290
+ return `${o ?? ""}:${s?.id ?? ""}`;
291
+ },
292
+ () => {
293
+ const n = r.getSnapshot(), o = e ?? n.rootViewId, s = o ? n.views.get(o) : void 0;
294
+ return `${o ?? ""}:${s?.id ?? ""}`;
295
+ }
296
+ );
297
+ return q(() => {
298
+ const [n, o] = t.split(":");
299
+ return {
300
+ rootViewId: n || void 0,
301
+ rootNodeId: o || void 0
302
+ };
303
+ }, [t]);
283
304
  }
284
- var S = rt();
285
- function nt(r) {
286
- return Ke(
287
- (e) => r.subscribe(e),
288
- () => r.getSnapshot(),
289
- () => r.getSnapshot()
305
+ function _(r, e) {
306
+ const t = pe(
307
+ (n) => r.subscribeNode(e, n),
308
+ () => r.getNodeVersion(e),
309
+ () => r.getNodeVersion(e)
290
310
  );
311
+ return q(() => r.getNode(e), [r, e, t]);
291
312
  }
292
- const ot = ue("UIRenderer");
293
- function st(r) {
313
+ const st = he("UIRenderer");
314
+ function it(r) {
294
315
  if (r === void 0)
295
316
  return "{}";
296
317
  if (typeof r == "string")
@@ -301,79 +322,76 @@ function st(r) {
301
322
  return "{}";
302
323
  }
303
324
  }
304
- function xe(r) {
305
- const e = at(r), t = it(r);
306
- return e === r.children && t === r.styleIds ? r : {
307
- ...r,
308
- ...e !== r.children ? { children: e } : {},
309
- ...t !== r.styleIds ? { styleIds: t } : {}
310
- };
311
- }
312
- function it(r) {
325
+ function at(r) {
313
326
  const e = r.styleIds;
314
327
  return Array.isArray(e) ? e : [];
315
328
  }
316
- function at(r) {
329
+ function ct(r) {
317
330
  const e = r.children;
318
331
  return Array.isArray(e) ? e : [];
319
332
  }
320
- function ct({ node: r, renderer: e, library: t, context: n, className: o }) {
321
- const s = xe(r), i = s.children.map((l) => $(l, t, n)), c = e;
322
- return /* @__PURE__ */ S.jsx(
323
- c,
324
- {
325
- node: s,
326
- context: n,
327
- children: i,
328
- className: o,
329
- styleIds: s.styleIds
330
- }
331
- );
332
- }
333
- function $(r, e, t) {
334
- const n = xe(r), o = n.children;
335
- if (n.type === "root")
336
- return /* @__PURE__ */ S.jsx(Ze, { children: o.map((l) => $(l, e, t)) }, n.id);
337
- const s = e.resolve(n);
338
- if (!s)
339
- return ot.warn(`No renderer for node type ${n.type}`), null;
340
- const i = n.styleIds, c = i.length > 0 ? i.join(" ") : void 0;
341
- return /* @__PURE__ */ S.jsx(
342
- ct,
343
- {
344
- node: n,
345
- renderer: s,
346
- library: e,
347
- context: t,
348
- className: c
349
- },
350
- n.id
351
- );
333
+ function ut(r, e) {
334
+ return r.nodeId === e.nodeId && r.context === e.context;
352
335
  }
353
- function lt({ store: r, library: e, viewId: t, emptyFallback: n = null, onAction: o, client: s, video: i }) {
354
- const c = nt(r), l = t ?? c.rootViewId;
355
- if (!l) return n;
356
- const u = c.views.get(l);
357
- if (!u) return n;
358
- const d = {
359
- getPayload: (m) => c.payloads.get(m),
360
- renderChildren: (m) => Array.isArray(m) ? m.map((g) => $(g, e, d)) : [],
361
- renderView: (m) => {
362
- const g = c.views.get(m);
363
- return g ? $(g, e, d) : null;
364
- },
365
- dispatchAction: (m, g) => {
366
- if (!m)
367
- return;
368
- const k = st(g);
369
- o?.(m, k);
370
- },
371
- client: s,
372
- video: i
373
- };
374
- return /* @__PURE__ */ S.jsx("div", { "data-ikon-view-id": l, style: { display: "contents" }, children: $(u, e, d) });
336
+ function lt(r) {
337
+ return r.length === 0 ? "" : r.length === 1 ? r[0].id : r.map((e) => e.id).join(",");
375
338
  }
376
- class ut {
339
+ const ce = C(function r({ nodeId: e, context: t }) {
340
+ const n = _(t.store, e), o = n ? ct(n) : [], s = lt(o), i = q(() => o.length === 0 ? null : o.map((p) => /* @__PURE__ */ b.jsx(r, { nodeId: p.id, context: t }, p.id)), [s, t]);
341
+ if (!n)
342
+ return null;
343
+ if (n.type === "root")
344
+ return /* @__PURE__ */ b.jsx(Qe, { children: i }, n.id);
345
+ const c = t.library.resolve(n);
346
+ if (!c)
347
+ return st.warn(`No renderer for node type ${n.type}`), null;
348
+ const u = at(n), d = u.length > 0 ? u.join(" ") : void 0, l = c;
349
+ return /* @__PURE__ */ b.jsx(l, { nodeId: e, context: t, className: d });
350
+ }, ut);
351
+ function dt(r, e) {
352
+ return !Array.isArray(r) || r.length === 0 ? null : r.map((t) => /* @__PURE__ */ b.jsx(ce, { nodeId: t.id, context: e }, t.id));
353
+ }
354
+ function ft(r, e) {
355
+ return r.store === e.store && r.library === e.library && r.viewId === e.viewId && r.emptyFallback === e.emptyFallback;
356
+ }
357
+ const mt = C(function({ store: e, library: t, viewId: n, emptyFallback: o = null, onAction: s, client: i, video: c }) {
358
+ const { rootViewId: u, rootNodeId: d } = ot(e, n), l = I(s);
359
+ l.current = s;
360
+ const p = I(i);
361
+ p.current = i;
362
+ const h = I(c);
363
+ h.current = c;
364
+ const w = ae((S, f) => {
365
+ if (!S)
366
+ return;
367
+ const y = it(f);
368
+ l.current?.(S, y);
369
+ }, []), N = q(() => {
370
+ const S = {
371
+ store: e,
372
+ library: t,
373
+ handlerCache: e.handlerCache,
374
+ // Access payloads from store at call time, not captured snapshot
375
+ getPayload: (f) => e.getSnapshot().payloads.get(f),
376
+ renderChildren: (f) => dt(f, S),
377
+ renderView: (f) => {
378
+ const y = e.getSnapshot().views.get(f);
379
+ return y ? /* @__PURE__ */ b.jsx(ce, { nodeId: y.id, context: S }) : null;
380
+ },
381
+ dispatchAction: w,
382
+ // Access client/video via refs to avoid context recreation
383
+ get client() {
384
+ return p.current;
385
+ },
386
+ get video() {
387
+ return h.current;
388
+ }
389
+ };
390
+ return S;
391
+ }, [e, t, w]);
392
+ return !u || !d ? o : /* @__PURE__ */ b.jsx("div", { "data-ikon-view-id": u, style: { display: "contents" }, children: /* @__PURE__ */ b.jsx(ce, { nodeId: d, context: N }) });
393
+ }, ft);
394
+ class pt {
377
395
  constructor(e, t) {
378
396
  if (this.fallback = t, e)
379
397
  for (const [n, o] of e)
@@ -390,28 +408,56 @@ class ut {
390
408
  return this.renderers.get(e.type) ?? this.fallback;
391
409
  }
392
410
  }
393
- function Cr(r, e) {
411
+ function Ir(r, e) {
394
412
  const t = Object.entries(r);
395
- return new ut(t, e);
413
+ return new pt(t, e);
396
414
  }
397
- const se = "ikon-ui";
398
- function dt(r, e) {
415
+ function _r(r) {
416
+ return pe(
417
+ (e) => r.subscribe(e),
418
+ () => r.getSnapshot(),
419
+ () => r.getSnapshot()
420
+ );
421
+ }
422
+ const ue = "ikon-ui";
423
+ function ht(r, e) {
399
424
  return r === e;
400
425
  }
401
- function jr({ stores: r, library: e, category: t = se, version: n, onAction: o, client: s, video: i }) {
402
- const c = Qe(() => {
403
- const l = [];
404
- for (const [u, d] of r) {
405
- if (!dt(d.category, t))
406
- continue;
407
- const m = d.store.getSnapshot();
408
- !m.rootViewId || !m.views.has(m.rootViewId) || l.push({ key: u, store: d.store });
426
+ const Mr = C(function({
427
+ stores: e,
428
+ library: t,
429
+ category: n = ue,
430
+ onAction: o,
431
+ client: s,
432
+ video: i
433
+ }) {
434
+ const c = Array.from(e.keys()).sort().join(","), u = I(o);
435
+ u.current = o;
436
+ const d = I(s);
437
+ d.current = s;
438
+ const l = I(i);
439
+ l.current = i;
440
+ const p = q(() => {
441
+ const h = [];
442
+ for (const [w, N] of e) {
443
+ const S = N.store.getSnapshot();
444
+ ht(N.category, n) && (!S.rootViewId || !S.views.has(S.rootViewId) || h.push({ key: w, store: N.store }));
409
445
  }
410
- return l;
411
- }, [r, t, n]);
412
- return c.length === 0 ? null : /* @__PURE__ */ S.jsx(S.Fragment, { children: c.map(({ key: l, store: u }) => /* @__PURE__ */ S.jsx(lt, { store: u, library: e, onAction: o, client: s, video: i }, l)) });
413
- }
414
- class Ar {
446
+ return h;
447
+ }, [e, n, c]);
448
+ return p.length === 0 ? null : /* @__PURE__ */ b.jsx(b.Fragment, { children: p.map(({ key: h, store: w }) => /* @__PURE__ */ b.jsx(
449
+ mt,
450
+ {
451
+ store: w,
452
+ library: t,
453
+ onAction: u.current,
454
+ client: d.current,
455
+ video: l.current
456
+ },
457
+ h
458
+ )) });
459
+ });
460
+ class Pr {
415
461
  core;
416
462
  ownsCore;
417
463
  stores = /* @__PURE__ */ new Map();
@@ -419,7 +465,7 @@ class Ar {
419
465
  unsubscribeClears;
420
466
  unsubscribeStoreChanges;
421
467
  constructor(e) {
422
- this.core = e?.core ?? new Xe({ client: e?.client }), this.ownsCore = !e?.core, this.unsubscribeClears = this.core.subscribeToUiStreamCleared(this.handleUiStreamCleared), this.unsubscribeStoreChanges = this.core.uiStore.subscribe(this.syncStreamSnapshot), this.syncAllStreams();
468
+ this.core = e?.core ?? new He({ client: e?.client }), this.ownsCore = !e?.core, this.unsubscribeClears = this.core.subscribeToUiStreamCleared(this.handleUiStreamCleared), this.unsubscribeStoreChanges = this.core.uiStore.subscribe(this.syncStreamSnapshot), this.syncAllStreams();
423
469
  }
424
470
  dispose() {
425
471
  this.unsubscribeClears(), this.unsubscribeStoreChanges(), this.ownsCore && this.core.dispose(), this.listeners.clear(), this.stores.clear();
@@ -466,8 +512,8 @@ class Ar {
466
512
  if (t)
467
513
  return t;
468
514
  const n = {
469
- category: se,
470
- store: new He()
515
+ category: ue,
516
+ store: new Je()
471
517
  };
472
518
  return this.stores.set(e, n), n;
473
519
  }
@@ -475,7 +521,7 @@ class Ar {
475
521
  const n = this.stores.get(e);
476
522
  if (!n)
477
523
  return !1;
478
- const o = t ?? this.core.uiStore.getSnapshot(e)?.category ?? se;
524
+ const o = t ?? this.core.uiStore.getSnapshot(e)?.category ?? ue;
479
525
  return n.category === o ? !1 : (this.stores.set(e, { ...n, category: o }), !0);
480
526
  }
481
527
  notify(e) {
@@ -483,7 +529,7 @@ class Ar {
483
529
  t(e);
484
530
  }
485
531
  }
486
- function L(r) {
532
+ function U(r) {
487
533
  if (typeof r == "string") {
488
534
  const e = r.trim();
489
535
  return e.length > 0 ? e : void 0;
@@ -493,13 +539,13 @@ function L(r) {
493
539
  return e.length > 0 ? e.join(" ") : void 0;
494
540
  }
495
541
  }
496
- function V(...r) {
542
+ function W(...r) {
497
543
  const e = [];
498
544
  for (const t of r)
499
545
  t && t.trim() && e.push(t.trim());
500
546
  return e.length > 0 ? e.join(" ") : void 0;
501
547
  }
502
- function D(r) {
548
+ function Y(r) {
503
549
  if (!r)
504
550
  return {};
505
551
  const e = {};
@@ -507,17 +553,17 @@ function D(r) {
507
553
  n != null && (typeof n == "string" || typeof n == "number" || typeof n == "boolean") && (e[t] = n);
508
554
  return e;
509
555
  }
510
- function ft() {
511
- const r = _(function({ node: t }) {
512
- const n = L(t.props?.targetViewId), o = t.props?.focusOnly, s = typeof o == "boolean" ? o : void 0, i = Le(null);
513
- return Y(() => {
556
+ function gt() {
557
+ const r = C(function({ nodeId: t, context: n }) {
558
+ const o = _(n.store, t), s = I(null), i = U(o?.props?.targetViewId), c = o?.props?.focusOnly, u = typeof c == "boolean" ? c : void 0;
559
+ return D(() => {
514
560
  if (typeof document > "u")
515
561
  return;
516
- const l = i.current;
517
- if (!l || n && l.closest("[data-ikon-view-id]")?.getAttribute("data-ikon-view-id") !== n)
562
+ const l = s.current;
563
+ if (!l || i && l.closest("[data-ikon-view-id]")?.getAttribute("data-ikon-view-id") !== i)
518
564
  return;
519
- const u = s !== !0;
520
- if (u && typeof l.scrollIntoView == "function")
565
+ const p = u !== !0;
566
+ if (p && typeof l.scrollIntoView == "function")
521
567
  try {
522
568
  l.scrollIntoView({ behavior: "smooth", block: "nearest", inline: "nearest" });
523
569
  } catch {
@@ -525,48 +571,54 @@ function ft() {
525
571
  }
526
572
  if (typeof l.focus == "function")
527
573
  try {
528
- l.focus({ preventScroll: !u });
574
+ l.focus({ preventScroll: !p });
529
575
  } catch {
530
576
  l.focus();
531
577
  }
532
- }, [s, n]), /* @__PURE__ */ S.jsx(
578
+ }, [u, i]), o ? /* @__PURE__ */ b.jsx(
533
579
  "span",
534
580
  {
535
- ref: i,
581
+ ref: s,
536
582
  "aria-hidden": "true",
537
- "data-ikon-node-id": t.id,
583
+ "data-ikon-node-id": o.id,
538
584
  "data-ikon-focus-hint": "true",
539
585
  tabIndex: -1,
540
586
  style: { display: "block", width: 0, height: 0, overflow: "hidden" }
541
587
  }
542
- );
588
+ ) : null;
543
589
  });
544
590
  return ({ type: e }) => {
545
591
  if (e === "common.focus-hint")
546
592
  return r;
547
593
  };
548
594
  }
549
- function mt() {
550
- const r = _(function({ node: t, context: n, className: o }) {
551
- const s = D(t.props), i = V(L(t.props?.className), o), c = t.children?.length ? n.renderChildren(t.children) : void 0;
552
- return /* @__PURE__ */ S.jsx("div", { ...s, "data-ikon-node-id": t.id, className: i, children: c });
595
+ function yt() {
596
+ const r = C(function({ nodeId: t, context: n, className: o }) {
597
+ const s = _(n.store, t);
598
+ if (!s)
599
+ return null;
600
+ const i = Y(s.props), c = W(U(s.props?.className), o), u = s.children?.length ? n.renderChildren(s.children) : void 0;
601
+ return /* @__PURE__ */ b.jsx("div", { ...i, "data-ikon-node-id": s.id, className: c, children: u });
553
602
  });
554
603
  return ({ type: e }) => {
555
604
  if (e === "common.div")
556
605
  return r;
557
606
  };
558
607
  }
559
- function pt() {
560
- const r = _(function({ node: t, context: n, className: o }) {
561
- const s = D(t.props), i = V(L(t.props?.className), o), c = t.children?.length ? n.renderChildren(t.children) : void 0;
562
- return /* @__PURE__ */ S.jsx(
608
+ function St() {
609
+ const r = C(function({ nodeId: t, context: n, className: o }) {
610
+ const s = _(n.store, t);
611
+ if (!s)
612
+ return null;
613
+ const i = Y(s.props), c = W(U(s.props?.className), o), u = s.children?.length ? n.renderChildren(s.children) : void 0;
614
+ return /* @__PURE__ */ b.jsx(
563
615
  "form",
564
616
  {
565
- ...s,
566
- "data-ikon-node-id": t.id,
567
- className: i,
568
- onSubmit: (l) => l.preventDefault(),
569
- children: c
617
+ ...i,
618
+ "data-ikon-node-id": s.id,
619
+ className: c,
620
+ onSubmit: (d) => d.preventDefault(),
621
+ children: u
570
622
  }
571
623
  );
572
624
  });
@@ -575,18 +627,21 @@ function pt() {
575
627
  return r;
576
628
  };
577
629
  }
578
- function ht() {
579
- const r = _(function({ node: t, context: n, className: o }) {
580
- const s = D(t.props), i = V(L(t.props?.className), o), c = t.children?.length ? n.renderChildren(t.children) : void 0;
581
- return /* @__PURE__ */ S.jsx(
630
+ function bt() {
631
+ const r = C(function({ nodeId: t, context: n, className: o }) {
632
+ const s = _(n.store, t);
633
+ if (!s)
634
+ return null;
635
+ const i = Y(s.props), c = W(U(s.props?.className), o), u = s.children?.length ? n.renderChildren(s.children) : void 0;
636
+ return /* @__PURE__ */ b.jsx(
582
637
  "div",
583
638
  {
584
- ...s,
585
- "data-ikon-node-id": t.id,
639
+ ...i,
640
+ "data-ikon-node-id": s.id,
586
641
  "data-ikon-view-type": "scroll-view",
587
642
  "data-ikon-scroll-container": "true",
588
- className: i,
589
- children: c
643
+ className: c,
644
+ children: u
590
645
  }
591
646
  );
592
647
  });
@@ -595,41 +650,47 @@ function ht() {
595
650
  return r;
596
651
  };
597
652
  }
598
- function gt() {
599
- const r = _(function({ node: t, context: n, className: o }) {
600
- const s = D(t.props), i = V("relative", L(t.props?.className), o), c = t.children?.length ? n.renderChildren(t.children) : void 0;
601
- return /* @__PURE__ */ S.jsx("div", { ...s, "data-ikon-node-id": t.id, className: i, children: c });
653
+ function vt() {
654
+ const r = C(function({ nodeId: t, context: n, className: o }) {
655
+ const s = _(n.store, t);
656
+ if (!s)
657
+ return null;
658
+ const i = Y(s.props), c = W("relative", U(s.props?.className), o), u = s.children?.length ? n.renderChildren(s.children) : void 0;
659
+ return /* @__PURE__ */ b.jsx("div", { ...i, "data-ikon-node-id": s.id, className: c, children: u });
602
660
  });
603
661
  return ({ type: e }) => {
604
662
  if (e === "common.stack")
605
663
  return r;
606
664
  };
607
665
  }
608
- function yt() {
609
- const r = _(function({ node: t, context: n, className: o }) {
610
- const s = D(t.props), i = V("absolute", L(t.props?.className), o), c = t.children?.length ? n.renderChildren(t.children) : void 0;
611
- return /* @__PURE__ */ S.jsx("div", { ...s, "data-ikon-node-id": t.id, className: i, children: c });
666
+ function Et() {
667
+ const r = C(function({ nodeId: t, context: n, className: o }) {
668
+ const s = _(n.store, t);
669
+ if (!s)
670
+ return null;
671
+ const i = Y(s.props), c = W("absolute", U(s.props?.className), o), u = s.children?.length ? n.renderChildren(s.children) : void 0;
672
+ return /* @__PURE__ */ b.jsx("div", { ...i, "data-ikon-node-id": s.id, className: c, children: u });
612
673
  });
613
674
  return ({ type: e }) => {
614
675
  if (e === "common.layer")
615
676
  return r;
616
677
  };
617
678
  }
618
- function St() {
679
+ function wt() {
619
680
  return [
620
- mt(),
621
- pt(),
622
- ht(),
623
- gt(),
624
681
  yt(),
625
- ft()
682
+ St(),
683
+ bt(),
684
+ vt(),
685
+ Et(),
686
+ gt()
626
687
  ];
627
688
  }
628
- const bt = "base", vt = async () => St();
629
- function Et(r) {
630
- r.registerModule(bt, vt);
689
+ const Rt = "base", kt = async () => wt();
690
+ function Nt(r) {
691
+ r.registerModule(Rt, kt);
631
692
  }
632
- function Ue(r) {
693
+ function $e(r) {
633
694
  if (typeof r == "string") {
634
695
  const e = r.trim();
635
696
  return e.length > 0 ? e : void 0;
@@ -639,13 +700,13 @@ function Ue(r) {
639
700
  return e.length > 0 ? e.join(" ") : void 0;
640
701
  }
641
702
  }
642
- function ze(...r) {
703
+ function Be(...r) {
643
704
  const e = [];
644
705
  for (const t of r)
645
706
  t && t.trim() && e.push(t.trim());
646
707
  return e.length > 0 ? e.join(" ") : void 0;
647
708
  }
648
- function G(r) {
709
+ function X(r) {
649
710
  if (typeof r == "number" && Number.isFinite(r))
650
711
  return Math.floor(r);
651
712
  if (typeof r == "string" && r.trim().length > 0) {
@@ -654,43 +715,43 @@ function G(r) {
654
715
  return Math.floor(e);
655
716
  }
656
717
  }
657
- function ie(r) {
718
+ function le(r) {
658
719
  if (typeof r != "string")
659
720
  return;
660
721
  const e = r.trim();
661
722
  return e.length > 0 ? e : void 0;
662
723
  }
663
- const wt = "media.video-canvas", Rt = "media.video-url-player";
664
- function kt() {
665
- const r = _(function({ node: t, context: n, className: o }) {
666
- const s = ie(t.props?.streamId), i = G(t.props?.width), c = G(t.props?.height), l = ze(Ue(t.props?.className), o), u = Le(null), d = n.video;
667
- return Y(() => {
668
- const m = u.current;
669
- if (!(!d || !m || !s))
670
- return d.attachCanvas(s, m), () => {
671
- d.detachCanvas(s);
724
+ const Tt = "media.video-canvas", jt = "media.video-url-player";
725
+ function Ct() {
726
+ const r = C(function({ nodeId: t, context: n, className: o }) {
727
+ const s = _(n.store, t), i = I(null), c = n.video, u = s ? le(s.props?.streamId) : void 0, d = s ? X(s.props?.width) : void 0, l = s ? X(s.props?.height) : void 0, p = s ? Be($e(s.props?.className), o) : o;
728
+ return D(() => {
729
+ const h = i.current;
730
+ if (!(!c || !h || !u))
731
+ return c.attachCanvas(u, h), () => {
732
+ c.detachCanvas(u);
672
733
  };
673
- }, [d, s]), /* @__PURE__ */ S.jsx(
734
+ }, [c, u]), s ? /* @__PURE__ */ b.jsx(
674
735
  "canvas",
675
736
  {
676
- ref: u,
677
- "data-ikon-node-id": t.id,
678
- "data-ikon-video-stream-id": s,
679
- className: l,
680
- ...i ? { width: i } : {},
681
- ...c ? { height: c } : {}
737
+ ref: i,
738
+ "data-ikon-node-id": s.id,
739
+ "data-ikon-video-stream-id": u,
740
+ className: p,
741
+ ...d ? { width: d } : {},
742
+ ...l ? { height: l } : {}
682
743
  }
683
- );
744
+ ) : null;
684
745
  });
685
746
  return ({ type: e }) => {
686
- if (e === wt)
747
+ if (e === Tt)
687
748
  return r;
688
749
  };
689
750
  }
690
- function Nt() {
691
- return [kt(), Tt()];
751
+ function At() {
752
+ return [Ct(), Ot()];
692
753
  }
693
- function z(r) {
754
+ function B(r) {
694
755
  if (typeof r == "boolean")
695
756
  return r;
696
757
  if (typeof r == "string") {
@@ -699,42 +760,45 @@ function z(r) {
699
760
  if (e === "false") return !1;
700
761
  }
701
762
  }
702
- function Tt() {
703
- const r = _(function({
704
- node: t,
763
+ function Ot() {
764
+ const r = C(function({
765
+ nodeId: t,
705
766
  context: n,
706
767
  className: o
707
768
  }) {
708
- const s = ze(Ue(t.props?.className), o), i = ie(t.props?.src), c = ie(t.props?.poster), l = z(t.props?.controls), u = z(t.props?.autoplay), d = z(t.props?.loop), m = z(t.props?.muted), g = z(t.props?.playsInline), k = G(t.props?.width), A = G(t.props?.height), E = t.children?.length ? n.renderChildren(t.children) : void 0;
709
- return /* @__PURE__ */ S.jsx(
769
+ const s = _(n.store, t);
770
+ if (!s)
771
+ return null;
772
+ const i = Be($e(s.props?.className), o), c = le(s.props?.src), u = le(s.props?.poster), d = B(s.props?.controls), l = B(s.props?.autoplay), p = B(s.props?.loop), h = B(s.props?.muted), w = B(s.props?.playsInline), N = X(s.props?.width), S = X(s.props?.height), f = s.children?.length ? n.renderChildren(s.children) : void 0;
773
+ return /* @__PURE__ */ b.jsx(
710
774
  "video",
711
775
  {
712
- src: i,
713
- poster: c,
714
- ...l !== void 0 ? { controls: l } : {},
715
- ...u !== void 0 ? { autoPlay: u } : {},
716
- ...d !== void 0 ? { loop: d } : {},
717
- ...m !== void 0 ? { muted: m } : {},
718
- ...g !== void 0 ? { playsInline: g } : {},
719
- ...k ? { width: k } : {},
720
- ...A ? { height: A } : {},
721
- "data-ikon-node-id": t.id,
722
- className: s,
723
- children: E
776
+ src: c,
777
+ poster: u,
778
+ ...d !== void 0 ? { controls: d } : {},
779
+ ...l !== void 0 ? { autoPlay: l } : {},
780
+ ...p !== void 0 ? { loop: p } : {},
781
+ ...h !== void 0 ? { muted: h } : {},
782
+ ...w !== void 0 ? { playsInline: w } : {},
783
+ ...N ? { width: N } : {},
784
+ ...S ? { height: S } : {},
785
+ "data-ikon-node-id": s.id,
786
+ className: i,
787
+ children: f
724
788
  }
725
789
  );
726
790
  });
727
791
  return ({ type: e }) => {
728
- if (e === Rt)
792
+ if (e === jt)
729
793
  return r;
730
794
  };
731
795
  }
732
- const Ct = "media", jt = async () => Nt();
733
- function At(r) {
734
- r.registerModule(Ct, jt);
796
+ const It = "media", _t = async () => At();
797
+ function Mt(r) {
798
+ r.registerModule(It, _t);
735
799
  }
736
- const we = ue("UIRegistry");
737
- class Ot {
800
+ const Te = he("UIRegistry");
801
+ class Pt {
738
802
  baseResolvers = [];
739
803
  moduleLoaders = /* @__PURE__ */ new Map();
740
804
  moduleResolvers = /* @__PURE__ */ new Map();
@@ -756,15 +820,15 @@ class Ot {
756
820
  for (const [n, o] of this.moduleLoaders.entries())
757
821
  if (!this.moduleResolvers.has(n))
758
822
  try {
759
- const s = await o(), i = Mt(s);
823
+ const s = await o(), i = xt(s);
760
824
  this.moduleResolvers.set(n, i), e = !0;
761
825
  } catch (s) {
762
- we.error(`[IkonUiRegistry] Failed to load module '${n}'.`, s);
826
+ Te.error(`[IkonUiRegistry] Failed to load module '${n}'.`, s);
763
827
  }
764
828
  const t = [];
765
829
  for (const n of this.moduleLoaders.keys())
766
830
  this.moduleResolvers.has(n) && t.push(n);
767
- return It(t, this.activeModuleOrder) || (this.activeModuleOrder = t, e = !0), e;
831
+ return Ut(t, this.activeModuleOrder) || (this.activeModuleOrder = t, e = !0), e;
768
832
  }
769
833
  resolve(e) {
770
834
  for (const t of this.baseResolvers) {
@@ -774,7 +838,7 @@ class Ot {
774
838
  for (const t of this.activeModuleOrder) {
775
839
  const n = this.moduleResolvers.get(t);
776
840
  if (!n) {
777
- we.warn(`Missing resolvers for module ${t}`);
841
+ Te.warn(`Missing resolvers for module ${t}`);
778
842
  continue;
779
843
  }
780
844
  for (const o of n) {
@@ -784,17 +848,17 @@ class Ot {
784
848
  }
785
849
  }
786
850
  }
787
- function Or() {
788
- const r = new Ot();
789
- return Et(r), At(r), r.loadRegisteredModules(), r;
851
+ function Lr() {
852
+ const r = new Pt();
853
+ return Nt(r), Mt(r), r.loadRegisteredModules(), r;
790
854
  }
791
- function _t(r) {
855
+ function Lt(r) {
792
856
  return Array.isArray(r) ? r : [r];
793
857
  }
794
- function Mt(r) {
795
- return r ? _t(r).flatMap((e) => e ? Array.isArray(e) ? e.filter(Boolean) : [e] : []) : [];
858
+ function xt(r) {
859
+ return r ? Lt(r).flatMap((e) => e ? Array.isArray(e) ? e.filter(Boolean) : [e] : []) : [];
796
860
  }
797
- function It(r, e) {
861
+ function Ut(r, e) {
798
862
  if (r.length !== e.length)
799
863
  return !1;
800
864
  for (let t = 0; t < r.length; t += 1)
@@ -802,7 +866,7 @@ function It(r, e) {
802
866
  return !1;
803
867
  return !0;
804
868
  }
805
- const te = ue("MotionController"), Re = {
869
+ const ne = he("MotionController"), je = {
806
870
  ease: [0.25, 0.1, 0.25, 1],
807
871
  "ease-in": [0.42, 0, 1, 1],
808
872
  "ease-out": [0, 0, 0.58, 1],
@@ -832,88 +896,88 @@ const te = ue("MotionController"), Re = {
832
896
  "ease-out-back": [0.175, 0.885, 0.32, 1.275],
833
897
  "ease-in-out-back": [0.68, -0.55, 0.265, 1.55]
834
898
  };
835
- function N(r) {
899
+ function T(r) {
836
900
  return r <= 0 ? 0 : r >= 1 ? 1 : r;
837
901
  }
838
- function ke(r) {
902
+ function Ce(r) {
839
903
  if (r == null) return;
840
904
  const e = `${r}`.trim();
841
905
  if (!e) return;
842
906
  const t = Number.parseFloat(e);
843
907
  return Number.isFinite(t) ? t : void 0;
844
908
  }
845
- function Ne(r) {
909
+ function Ae(r) {
846
910
  return typeof CSS < "u" && CSS.escape ? CSS.escape(r) : r.replace(/[^a-zA-Z0-9_-]/g, (e) => `\\${e}`);
847
911
  }
848
- function Te(r, e, t, n) {
849
- const d = new Float32Array(11);
850
- function m(h, y, v) {
851
- return ((3 * y - 3 * v + 1) * h + (3 * v - 6 * y)) * h * h + 3 * y * h;
912
+ function Oe(r, e, t, n) {
913
+ const l = new Float32Array(11);
914
+ function p(f, y, E) {
915
+ return ((3 * y - 3 * E + 1) * f + (3 * E - 6 * y)) * f * f + 3 * y * f;
852
916
  }
853
- function g(h, y, v) {
854
- return 3 * (3 * y - 3 * v + 1) * h * h + 2 * (3 * v - 6 * y) * h + 3 * y;
917
+ function h(f, y, E) {
918
+ return 3 * (3 * y - 3 * E + 1) * f * f + 2 * (3 * E - 6 * y) * f + 3 * y;
855
919
  }
856
- function k(h, y) {
857
- for (let v = 0; v < 4; v += 1) {
858
- const C = g(y, r, t);
859
- if (C === 0)
920
+ function w(f, y) {
921
+ for (let E = 0; E < 4; E += 1) {
922
+ const A = h(y, r, t);
923
+ if (A === 0)
860
924
  return y;
861
- const T = m(y, r, t) - h;
862
- y -= T / C;
925
+ const j = p(y, r, t) - f;
926
+ y -= j / A;
863
927
  }
864
928
  return y;
865
929
  }
866
- function A(h, y, v) {
867
- let C = 0, T = 0, M = 0;
930
+ function N(f, y, E) {
931
+ let A = 0, j = 0, P = 0;
868
932
  do
869
- T = y + (v - y) / 2, C = m(T, r, t) - h, C > 0 ? v = T : y = T;
870
- while (Math.abs(C) > 1e-7 && ++M < 10);
871
- return T;
872
- }
873
- function E(h) {
874
- let y = 0, v = 1;
875
- const C = 10;
876
- for (; v !== C && d[v] <= h; v += 1)
933
+ j = y + (E - y) / 2, A = p(j, r, t) - f, A > 0 ? E = j : y = j;
934
+ while (Math.abs(A) > 1e-7 && ++P < 10);
935
+ return j;
936
+ }
937
+ function S(f) {
938
+ let y = 0, E = 1;
939
+ const A = 10;
940
+ for (; E !== A && l[E] <= f; E += 1)
877
941
  y += 0.1;
878
- v -= 1;
879
- const T = (h - d[v]) / (d[v + 1] - d[v]), M = y + T * 0.1, W = g(M, r, t);
880
- return W >= 1e-3 ? k(h, M) : W === 0 ? M : A(h, y, y + 0.1);
942
+ E -= 1;
943
+ const j = (f - l[E]) / (l[E + 1] - l[E]), P = y + j * 0.1, G = h(P, r, t);
944
+ return G >= 1e-3 ? w(f, P) : G === 0 ? P : N(f, y, y + 0.1);
881
945
  }
882
- for (let h = 0; h < 11; h += 1)
883
- d[h] = m(h * 0.1, r, t);
884
- return (h) => h <= 0 ? 0 : h >= 1 ? 1 : m(E(h), e, n);
946
+ for (let f = 0; f < 11; f += 1)
947
+ l[f] = p(f * 0.1, r, t);
948
+ return (f) => f <= 0 ? 0 : f >= 1 ? 1 : p(S(f), e, n);
885
949
  }
886
- function Pt(r) {
950
+ function Ft(r) {
887
951
  const e = /steps\(\s*([0-9]+)\s*(?:,\s*([a-z-]+)\s*)?\)/i.exec(r);
888
952
  if (!e)
889
- return (o) => N(o);
953
+ return (o) => T(o);
890
954
  const t = Math.max(1, parseInt(e[1], 10)), n = (e[2] ?? "end").toLowerCase();
891
- return n === "start" || n === "jump-start" ? (o) => N(Math.ceil(o * t) / t) : n === "none" || n === "jump-none" ? (o) => N(Math.round(o * t) / t) : n === "both" || n === "jump-both" ? (o) => N((Math.floor(o * t) + 0.5) / t) : (o) => N(Math.floor(o * t) / t);
955
+ return n === "start" || n === "jump-start" ? (o) => T(Math.ceil(o * t) / t) : n === "none" || n === "jump-none" ? (o) => T(Math.round(o * t) / t) : n === "both" || n === "jump-both" ? (o) => T((Math.floor(o * t) + 0.5) / t) : (o) => T(Math.floor(o * t) / t);
892
956
  }
893
- function Lt(r) {
957
+ function $t(r) {
894
958
  if (!r)
895
- return (t) => N(t);
959
+ return (t) => T(t);
896
960
  const e = r.trim().toLowerCase();
897
961
  if (!e || e === "linear")
898
- return (t) => N(t);
899
- if (Re[e]) {
900
- const [t, n, o, s] = Re[e], i = Te(t, n, o, s);
901
- return (c) => N(i(N(c)));
962
+ return (t) => T(t);
963
+ if (je[e]) {
964
+ const [t, n, o, s] = je[e], i = Oe(t, n, o, s);
965
+ return (c) => T(i(T(c)));
902
966
  }
903
967
  if (e.startsWith("cubic-bezier(") && e.endsWith(")")) {
904
968
  const n = e.slice(13, -1).split(",").map((o) => Number.parseFloat(o.trim()));
905
969
  if (n.length === 4 && n.every((o) => Number.isFinite(o))) {
906
- const [o, s, i, c] = n, l = Te(o, s, i, c);
907
- return (u) => N(l(N(u)));
970
+ const [o, s, i, c] = n, u = Oe(o, s, i, c);
971
+ return (d) => T(u(T(d)));
908
972
  }
909
973
  }
910
974
  if (e.startsWith("steps(") && e.endsWith(")")) {
911
- const t = Pt(e);
912
- return (n) => t(N(n));
975
+ const t = Ft(e);
976
+ return (n) => t(T(n));
913
977
  }
914
- return (t) => N(t);
978
+ return (t) => T(t);
915
979
  }
916
- function xt(r) {
980
+ function Bt(r) {
917
981
  if (!r)
918
982
  return;
919
983
  const e = /(-?\d+(?:\.\d+)?)\s*\.\.\s*(-?\d+(?:\.\d+)?)\s*->\s*(-?\d+(?:\.\d+)?)\s*\.\.\s*(-?\d+(?:\.\d+)?)/.exec(r);
@@ -923,7 +987,7 @@ function xt(r) {
923
987
  if (![t, n, o, s].some((i) => !Number.isFinite(i)))
924
988
  return { inStart: t, inEnd: n, outStart: o, outEnd: s };
925
989
  }
926
- class Ut {
990
+ class Vt {
927
991
  bindingsByStyle = /* @__PURE__ */ new Map();
928
992
  observer;
929
993
  observeScheduled = !1;
@@ -947,7 +1011,7 @@ class Ut {
947
1011
  try {
948
1012
  e();
949
1013
  } catch (t) {
950
- te.warn("Failed to cleanup binding listener", t);
1014
+ ne.warn("Failed to cleanup binding listener", t);
951
1015
  }
952
1016
  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);
953
1017
  }
@@ -957,7 +1021,7 @@ class Ut {
957
1021
  const n = (JSON.parse(e).motionBindings ?? []).map((o) => this.parseBinding(o)).filter((o) => o !== void 0);
958
1022
  return n.length === 0 ? void 0 : { bindings: n };
959
1023
  } catch (t) {
960
- te.warn("Failed to parse motion metadata", t);
1024
+ ne.warn("Failed to parse motion metadata", t);
961
1025
  return;
962
1026
  }
963
1027
  }
@@ -965,16 +1029,16 @@ class Ut {
965
1029
  const t = e.source?.trim();
966
1030
  if (!t)
967
1031
  return;
968
- const n = ke(e.min) ?? 0, o = ke(e.max), s = o === void 0 ? n + 100 : o, i = (e.clamp ?? "clamp").trim().toLowerCase(), c = !!e.reverse, l = Lt(e.ease), u = xt(e.map), d = e.targetId?.trim() || void 0;
1032
+ const n = Ce(e.min) ?? 0, o = Ce(e.max), s = o === void 0 ? n + 100 : o, i = (e.clamp ?? "clamp").trim().toLowerCase(), c = !!e.reverse, u = $t(e.ease), d = Bt(e.map), l = e.targetId?.trim() || void 0;
969
1033
  return Number.isNaN(n) || Number.isNaN(s) ? void 0 : {
970
1034
  source: t.toLowerCase(),
971
1035
  min: n,
972
1036
  max: s,
973
1037
  clamp: i === "freeze-start" || i === "freeze-end" || i === "unclamped" ? i : "clamp",
974
1038
  reverse: c,
975
- ease: l,
976
- map: u,
977
- targetId: d
1039
+ ease: u,
1040
+ map: d,
1041
+ targetId: l
978
1042
  };
979
1043
  }
980
1044
  ensureObserver() {
@@ -1023,7 +1087,7 @@ class Ut {
1023
1087
  const t = this.bindingsByStyle.get(e);
1024
1088
  if (!t || typeof document > "u")
1025
1089
  return;
1026
- const n = `.${Ne(e)}`;
1090
+ const n = `.${Ae(e)}`;
1027
1091
  document.querySelectorAll(n).forEach((s) => this.applyStyleToElement(s, e, t));
1028
1092
  }
1029
1093
  applyStyleToElement(e, t, n) {
@@ -1063,7 +1127,7 @@ class Ut {
1063
1127
  }
1064
1128
  resolveScrollContainer(e, t) {
1065
1129
  if (t.targetId) {
1066
- const n = `[data-ikon-motion-source="${Ne(t.targetId)}"]`, o = typeof document < "u" ? document.querySelector(n) : null;
1130
+ const n = `[data-ikon-motion-source="${Ae(t.targetId)}"]`, o = typeof document < "u" ? document.querySelector(n) : null;
1067
1131
  if (o)
1068
1132
  return o;
1069
1133
  }
@@ -1073,10 +1137,10 @@ class Ut {
1073
1137
  const o = t.max - t.min, s = o === 0 ? n > t.min ? 1 : 0 : (n - t.min) / o;
1074
1138
  let i = this.applyClamp(s, t.clamp);
1075
1139
  t.reverse && (i = 1 - i);
1076
- const c = t.ease(i), l = Number.isFinite(c) ? c : 0, u = l * 100;
1077
- if (e.style.setProperty("--tw-motion-bind-source-value", `${n}`), e.style.setProperty("--tw-motion-bind-progress-ratio", `${l}`), e.style.setProperty("--tw-motion-bind-progress", `${u}`), t.map) {
1078
- const d = this.applyMap(u, t.map);
1079
- d !== void 0 && e.style.setProperty("--tw-motion-bind-value", `${d}`);
1140
+ const c = t.ease(i), u = Number.isFinite(c) ? c : 0, d = u * 100;
1141
+ if (e.style.setProperty("--tw-motion-bind-source-value", `${n}`), e.style.setProperty("--tw-motion-bind-progress-ratio", `${u}`), e.style.setProperty("--tw-motion-bind-progress", `${d}`), t.map) {
1142
+ const l = this.applyMap(d, t.map);
1143
+ l !== void 0 && e.style.setProperty("--tw-motion-bind-value", `${l}`);
1080
1144
  } else
1081
1145
  e.style.removeProperty("--tw-motion-bind-value");
1082
1146
  }
@@ -1091,7 +1155,7 @@ class Ut {
1091
1155
  case "unclamped":
1092
1156
  return e;
1093
1157
  default:
1094
- return N(e);
1158
+ return T(e);
1095
1159
  }
1096
1160
  }
1097
1161
  applyMap(e, t) {
@@ -1133,7 +1197,7 @@ class Ut {
1133
1197
  try {
1134
1198
  i();
1135
1199
  } catch (c) {
1136
- te.warn("Failed to cleanup listener", c);
1200
+ ne.warn("Failed to cleanup listener", c);
1137
1201
  }
1138
1202
  this.globalCleanups.delete(i);
1139
1203
  }
@@ -1177,16 +1241,16 @@ class Ut {
1177
1241
  }
1178
1242
  }
1179
1243
  }
1180
- const Ce = new Ut(), re = "ikon-ds";
1181
- function _r(r) {
1182
- const e = Se(({ styleId: n, css: o, common: s }) => {
1244
+ const Ie = new Vt(), oe = "ikon-ds";
1245
+ function xr(r) {
1246
+ const e = ae(({ styleId: n, css: o, common: s }) => {
1183
1247
  if (!n || typeof document > "u") return;
1184
- let i = document.getElementById(re);
1185
- i || (i = document.createElement("style"), i.id = re, document.head.appendChild(i)), o && (i.innerHTML += o), Ce.registerStyle(n, s);
1186
- }, []), t = Se(() => {
1187
- typeof document < "u" && document.getElementById(re)?.remove(), Ce.reset();
1248
+ let i = document.getElementById(oe);
1249
+ i || (i = document.createElement("style"), i.id = oe, document.head.appendChild(i)), o && (i.innerHTML += o), Ie.registerStyle(n, s);
1250
+ }, []), t = ae(() => {
1251
+ typeof document < "u" && document.getElementById(oe)?.remove(), Ie.reset();
1188
1252
  }, []);
1189
- return Y(() => {
1253
+ return D(() => {
1190
1254
  if (!r) return;
1191
1255
  for (const o of r.getUiStyles())
1192
1256
  e(o);
@@ -1194,50 +1258,64 @@ function _r(r) {
1194
1258
  return () => {
1195
1259
  n?.(), t();
1196
1260
  };
1197
- }, [r, t, e]), Y(() => () => t(), [t]), { setStyle: e, reset: t };
1261
+ }, [r, t, e]), D(() => () => t(), [t]), { setStyle: e, reset: t };
1198
1262
  }
1199
- var zt = typeof global == "object" && global && global.Object === Object && global, Bt = typeof self == "object" && self && self.Object === Object && self, Ft = zt || Bt || Function("return this")(), X = Ft.Symbol, Be = Object.prototype, $t = Be.hasOwnProperty, Vt = Be.toString, B = X ? X.toStringTag : void 0;
1200
- function Dt(r) {
1201
- var e = $t.call(r, B), t = r[B];
1263
+ function Ur(r) {
1264
+ const [e, t] = et(), n = I("");
1265
+ return D(() => {
1266
+ if (!r) {
1267
+ t(void 0), n.current = "";
1268
+ return;
1269
+ }
1270
+ const o = () => {
1271
+ const s = r.getStores(), i = Array.from(s.keys()).sort().join(",");
1272
+ i !== n.current && (n.current = i, t(s));
1273
+ };
1274
+ return o(), r.subscribe(o);
1275
+ }, [r]), e;
1276
+ }
1277
+ var zt = typeof global == "object" && global && global.Object === Object && global, Dt = typeof self == "object" && self && self.Object === Object && self, qt = zt || Dt || Function("return this")(), H = qt.Symbol, Ve = Object.prototype, Wt = Ve.hasOwnProperty, Yt = Ve.toString, V = H ? H.toStringTag : void 0;
1278
+ function Gt(r) {
1279
+ var e = Wt.call(r, V), t = r[V];
1202
1280
  try {
1203
- r[B] = void 0;
1281
+ r[V] = void 0;
1204
1282
  var n = !0;
1205
1283
  } catch {
1206
1284
  }
1207
- var o = Vt.call(r);
1208
- return n && (e ? r[B] = t : delete r[B]), o;
1209
- }
1210
- var Wt = Object.prototype, qt = Wt.toString;
1211
- function Yt(r) {
1212
- return qt.call(r);
1285
+ var o = Yt.call(r);
1286
+ return n && (e ? r[V] = t : delete r[V]), o;
1213
1287
  }
1214
- var Gt = "[object Null]", Xt = "[object Undefined]", je = X ? X.toStringTag : void 0;
1288
+ var Kt = Object.prototype, Xt = Kt.toString;
1215
1289
  function Ht(r) {
1216
- return r == null ? r === void 0 ? Xt : Gt : je && je in Object(r) ? Dt(r) : Yt(r);
1290
+ return Xt.call(r);
1217
1291
  }
1218
- function Jt(r) {
1292
+ var Jt = "[object Null]", Zt = "[object Undefined]", _e = H ? H.toStringTag : void 0;
1293
+ function Qt(r) {
1294
+ return r == null ? r === void 0 ? Zt : Jt : _e && _e in Object(r) ? Gt(r) : Ht(r);
1295
+ }
1296
+ function er(r) {
1219
1297
  return r != null && typeof r == "object";
1220
1298
  }
1221
- var Kt = Array.isArray, Zt = "[object String]";
1222
- function Qt(r) {
1223
- return typeof r == "string" || !Kt(r) && Jt(r) && Ht(r) == Zt;
1299
+ var tr = Array.isArray, rr = "[object String]";
1300
+ function nr(r) {
1301
+ return typeof r == "string" || !tr(r) && er(r) && Qt(r) == rr;
1224
1302
  }
1225
- const Ae = "ikonUiModules";
1226
- function ae(r) {
1303
+ const Me = "ikonUiModules";
1304
+ function de(r) {
1227
1305
  return typeof r == "object" && r !== null && !Array.isArray(r);
1228
1306
  }
1229
- function er(r) {
1307
+ function or(r) {
1230
1308
  if (!Array.isArray(r))
1231
1309
  return;
1232
1310
  const e = /* @__PURE__ */ new Set();
1233
1311
  for (const t of r) {
1234
- if (!Qt(t)) continue;
1312
+ if (!nr(t)) continue;
1235
1313
  const n = t.trim();
1236
1314
  n && (e.has(n) || e.add(n));
1237
1315
  }
1238
1316
  return Array.from(e);
1239
1317
  }
1240
- function Mr(r, e) {
1318
+ function Fr(r, e) {
1241
1319
  if (r === e)
1242
1320
  return !0;
1243
1321
  if (!r || !e)
@@ -1249,21 +1327,21 @@ function Mr(r, e) {
1249
1327
  return !1;
1250
1328
  return !0;
1251
1329
  }
1252
- function tr(r) {
1253
- if (!(!ae(r) || !Object.prototype.hasOwnProperty.call(r, Ae)))
1254
- return er(r[Ae]);
1330
+ function sr(r) {
1331
+ if (!(!de(r) || !Object.prototype.hasOwnProperty.call(r, Me)))
1332
+ return or(r[Me]);
1255
1333
  }
1256
- function Ir(...r) {
1334
+ function $r(...r) {
1257
1335
  for (const e of r) {
1258
- const t = tr(e);
1336
+ const t = sr(e);
1259
1337
  if (t !== void 0)
1260
1338
  return t;
1261
1339
  }
1262
1340
  }
1263
- function Pr(r) {
1264
- if (!ae(r))
1341
+ function Br(r) {
1342
+ if (!de(r))
1265
1343
  return;
1266
- const e = r, t = Object.keys(e).find((l) => l.toLowerCase() === "modules");
1344
+ const e = r, t = Object.keys(e).find((u) => u.toLowerCase() === "modules");
1267
1345
  if (!t)
1268
1346
  return;
1269
1347
  const n = e[t];
@@ -1272,46 +1350,46 @@ function Pr(r) {
1272
1350
  if (!Array.isArray(n))
1273
1351
  return;
1274
1352
  const o = [], s = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Set();
1275
- for (const l of n) {
1276
- if (typeof l == "string") {
1277
- const E = l.trim();
1278
- if (!E || i.has(E))
1353
+ for (const u of n) {
1354
+ if (typeof u == "string") {
1355
+ const S = u.trim();
1356
+ if (!S || i.has(S))
1279
1357
  continue;
1280
- o.push(E), i.add(E);
1358
+ o.push(S), i.add(S);
1281
1359
  continue;
1282
1360
  }
1283
- if (!ae(l))
1361
+ if (!de(u))
1284
1362
  continue;
1285
- const u = l, d = Object.keys(u).find((E) => E.toLowerCase() === "name");
1286
- if (!d)
1363
+ const d = u, l = Object.keys(d).find((S) => S.toLowerCase() === "name");
1364
+ if (!l)
1287
1365
  continue;
1288
- const m = u[d];
1289
- if (typeof m != "string")
1366
+ const p = d[l];
1367
+ if (typeof p != "string")
1290
1368
  continue;
1291
- const g = m.trim();
1292
- if (!g)
1369
+ const h = p.trim();
1370
+ if (!h)
1293
1371
  continue;
1294
- const k = Object.keys(u).find((E) => E.toLowerCase() === "javascript"), A = k ? u[k] : void 0;
1295
- typeof A == "string" && s.set(g, A), i.has(g) || (o.push(g), i.add(g));
1372
+ const w = Object.keys(d).find((S) => S.toLowerCase() === "javascript"), N = w ? d[w] : void 0;
1373
+ typeof N == "string" && s.set(h, N), i.has(h) || (o.push(h), i.add(h));
1296
1374
  }
1297
1375
  if (!o.length && s.size === 0)
1298
1376
  return { modules: [] };
1299
- const c = Array.from(s.entries()).map(([l, u]) => ({
1300
- name: l,
1301
- javascript: u
1377
+ const c = Array.from(s.entries()).map(([u, d]) => ({
1378
+ name: u,
1379
+ javascript: d
1302
1380
  }));
1303
1381
  return c.length > 0 ? { modules: o, inlineModules: c } : { modules: o };
1304
1382
  }
1305
- const p = {
1383
+ const g = {
1306
1384
  None: 0,
1307
1385
  Letter: 1,
1308
1386
  Word: 2,
1309
1387
  Line: 4,
1310
1388
  Paragraph: 8,
1311
1389
  Emoji: 16
1312
- }, rr = [
1390
+ }, ir = [
1313
1391
  {
1314
- flag: p.Letter,
1392
+ flag: g.Letter,
1315
1393
  hints: [
1316
1394
  "[data-motion-letter]",
1317
1395
  "[data-letter]",
@@ -1320,7 +1398,7 @@ const p = {
1320
1398
  ]
1321
1399
  },
1322
1400
  {
1323
- flag: p.Word,
1401
+ flag: g.Word,
1324
1402
  hints: [
1325
1403
  "[data-motion-word]",
1326
1404
  "[data-word]",
@@ -1329,7 +1407,7 @@ const p = {
1329
1407
  ]
1330
1408
  },
1331
1409
  {
1332
- flag: p.Line,
1410
+ flag: g.Line,
1333
1411
  hints: [
1334
1412
  "[data-motion-line]",
1335
1413
  "[data-line]",
@@ -1338,7 +1416,7 @@ const p = {
1338
1416
  ]
1339
1417
  },
1340
1418
  {
1341
- flag: p.Paragraph,
1419
+ flag: g.Paragraph,
1342
1420
  hints: [
1343
1421
  "[data-motion-paragraph]",
1344
1422
  "[data-paragraph]",
@@ -1349,7 +1427,7 @@ const p = {
1349
1427
  ]
1350
1428
  },
1351
1429
  {
1352
- flag: p.Emoji,
1430
+ flag: g.Emoji,
1353
1431
  hints: [
1354
1432
  ":is([data-motion-emoji],[data-emoji],.tw-motion-emoji,.tw-emoji)",
1355
1433
  "[data-motion-emoji]",
@@ -1358,42 +1436,42 @@ const p = {
1358
1436
  "[data-emoji]"
1359
1437
  ]
1360
1438
  }
1361
- ], ce = p.Letter | p.Word | p.Line | p.Paragraph | p.Emoji, nr = p.Letter | p.Word | p.Line | p.Paragraph, Oe = /* @__PURE__ */ new Map(), or = 16384;
1362
- function Lr(r, e) {
1363
- if (!r || r.length > or)
1439
+ ], fe = g.Letter | g.Word | g.Line | g.Paragraph | g.Emoji, ar = g.Letter | g.Word | g.Line | g.Paragraph, Pe = /* @__PURE__ */ new Map(), cr = 16384;
1440
+ function Vr(r, e) {
1441
+ if (!r || r.length > cr)
1364
1442
  return r;
1365
- const t = Er(e), n = P(t, p.Emoji), o = t & nr;
1366
- if (o === p.None && !n)
1443
+ const t = Nr(e), n = x(t, g.Emoji), o = t & ar;
1444
+ if (o === g.None && !n)
1367
1445
  return r;
1368
1446
  const s = r.replace(/\r\n/g, `
1369
1447
  `).replace(/\r/g, `
1370
1448
  `);
1371
- if (o === p.None)
1372
- return Pe(s);
1373
- const i = br(s);
1449
+ if (o === g.None)
1450
+ return Fe(s);
1451
+ const i = Rr(s);
1374
1452
  if (i.length === 0)
1375
- return n ? Pe(s) : r;
1376
- const c = vr(i), l = { letter: 0, word: 0, line: 0, paragraph: 0, br: 0, emoji: 0 }, u = [];
1377
- for (const d of c) {
1378
- const m = sr(d, t, l);
1379
- u.push(...m);
1453
+ return n ? Fe(s) : r;
1454
+ const c = kr(i), u = { letter: 0, word: 0, line: 0, paragraph: 0, br: 0, emoji: 0 }, d = [];
1455
+ for (const l of c) {
1456
+ const p = ur(l, t, u);
1457
+ d.push(...p);
1380
1458
  }
1381
- return u;
1459
+ return d;
1382
1460
  }
1383
- function sr(r, e, t) {
1461
+ function ur(r, e, t) {
1384
1462
  const n = [];
1385
1463
  for (const o of r) {
1386
- const s = ir(o, e, t);
1464
+ const s = lr(o, e, t);
1387
1465
  n.push(...s);
1388
1466
  }
1389
- if (P(e, p.Paragraph)) {
1467
+ if (x(e, g.Paragraph)) {
1390
1468
  const o = t.paragraph++;
1391
1469
  return [
1392
- /* @__PURE__ */ S.jsx(
1470
+ /* @__PURE__ */ b.jsx(
1393
1471
  "span",
1394
1472
  {
1395
1473
  "data-motion-paragraph": !0,
1396
- style: H(o),
1474
+ style: J(o),
1397
1475
  children: n
1398
1476
  },
1399
1477
  `motion-paragraph-${o}`
@@ -1402,116 +1480,116 @@ function sr(r, e, t) {
1402
1480
  }
1403
1481
  return n;
1404
1482
  }
1405
- function ir(r, e, t) {
1406
- const n = ar(r.text, e, t), o = [];
1407
- if (P(e, p.Line)) {
1483
+ function lr(r, e, t) {
1484
+ const n = dr(r.text, e, t), o = [];
1485
+ if (x(e, g.Line)) {
1408
1486
  const s = t.line++;
1409
1487
  o.push(
1410
- /* @__PURE__ */ S.jsx("span", { "data-motion-line": !0, style: H(s), children: n }, `motion-line-${s}`)
1488
+ /* @__PURE__ */ b.jsx("span", { "data-motion-line": !0, style: J(s), children: n }, `motion-line-${s}`)
1411
1489
  );
1412
1490
  } else
1413
1491
  o.push(...n);
1414
1492
  for (let s = 0; s < r.breaks; s++)
1415
- o.push(/* @__PURE__ */ S.jsx("br", {}, `motion-break-${t.br++}`));
1493
+ o.push(/* @__PURE__ */ b.jsx("br", {}, `motion-break-${t.br++}`));
1416
1494
  return o;
1417
1495
  }
1418
- function ar(r, e, t) {
1496
+ function dr(r, e, t) {
1419
1497
  if (!r)
1420
1498
  return [];
1421
- const n = P(e, p.Word), o = [], s = /(\s+)/g;
1499
+ const n = x(e, g.Word), o = [], s = /(\s+)/g;
1422
1500
  let i = 0, c;
1423
1501
  for (; (c = s.exec(r)) !== null; ) {
1424
1502
  if (c.index > i) {
1425
- const l = r.slice(i, c.index);
1426
- o.push(_e(l, t, e, n));
1503
+ const u = r.slice(i, c.index);
1504
+ o.push(Le(u, t, e, n));
1427
1505
  }
1428
1506
  o.push(c[0]), i = c.index + c[0].length;
1429
1507
  }
1430
1508
  if (i < r.length) {
1431
- const l = r.slice(i);
1432
- o.push(_e(l, t, e, n));
1509
+ const u = r.slice(i);
1510
+ o.push(Le(u, t, e, n));
1433
1511
  }
1434
1512
  return o;
1435
1513
  }
1436
- function _e(r, e, t, n) {
1437
- const o = e.word++, s = lr(r, t, e), i = `motion-word-${o}`, c = cr(o, n);
1438
- return n ? /* @__PURE__ */ S.jsx("span", { "data-motion-word": !0, style: c, children: s }, i) : /* @__PURE__ */ S.jsx("span", { style: c, children: s }, i);
1514
+ function Le(r, e, t, n) {
1515
+ const o = e.word++, s = mr(r, t, e), i = `motion-word-${o}`, c = fr(o, n);
1516
+ return n ? /* @__PURE__ */ b.jsx("span", { "data-motion-word": !0, style: c, children: s }, i) : /* @__PURE__ */ b.jsx("span", { style: c, children: s }, i);
1439
1517
  }
1440
- function cr(r, e) {
1441
- return e ? { ...H(r), whiteSpace: "nowrap" } : { whiteSpace: "nowrap" };
1518
+ function fr(r, e) {
1519
+ return e ? { ...J(r), whiteSpace: "nowrap" } : { whiteSpace: "nowrap" };
1442
1520
  }
1443
- function lr(r, e, t) {
1521
+ function mr(r, e, t) {
1444
1522
  if (!r)
1445
1523
  return [];
1446
- const n = P(e, p.Letter), o = P(e, p.Emoji);
1524
+ const n = x(e, g.Letter), o = x(e, g.Emoji);
1447
1525
  if (!n) {
1448
1526
  if (!o)
1449
1527
  return [r];
1450
- const c = le(r);
1528
+ const c = me(r);
1451
1529
  if (c.length === 0)
1452
1530
  return [r];
1453
- const { nodes: l } = $e(c, t);
1454
- return l;
1531
+ const { nodes: u } = De(c, t);
1532
+ return u;
1455
1533
  }
1456
- const s = [], i = le(r);
1534
+ const s = [], i = me(r);
1457
1535
  for (const c of i) {
1458
- const l = t.letter++, u = `motion-letter-${l}`, d = H(l);
1536
+ const u = t.letter++, d = `motion-letter-${u}`, l = J(u);
1459
1537
  if (c === `
1460
1538
  `) {
1461
1539
  s.push(
1462
- /* @__PURE__ */ S.jsx("span", { "data-motion-letter": !0, style: d, children: /* @__PURE__ */ S.jsx("br", {}) }, u)
1540
+ /* @__PURE__ */ b.jsx("span", { "data-motion-letter": !0, style: l, children: /* @__PURE__ */ b.jsx("br", {}) }, d)
1463
1541
  );
1464
1542
  continue;
1465
1543
  }
1466
- const g = o && Fe(c) ? { "data-motion-emoji": !0 } : void 0, k = c === " " ? " " : c;
1544
+ const h = o && ze(c) ? { "data-motion-emoji": !0 } : void 0, w = c === " " ? " " : c;
1467
1545
  s.push(
1468
- /* @__PURE__ */ S.jsx("span", { "data-motion-letter": !0, style: d, ...g, children: k }, u)
1546
+ /* @__PURE__ */ b.jsx("span", { "data-motion-letter": !0, style: l, ...h, children: w }, d)
1469
1547
  );
1470
1548
  }
1471
1549
  return s;
1472
1550
  }
1473
- function le(r) {
1551
+ function me(r) {
1474
1552
  if (!r)
1475
1553
  return [];
1476
- const e = ur();
1477
- return e ? Array.from(e.segment(r), (t) => t.segment) : dr(r);
1554
+ const e = pr();
1555
+ return e ? Array.from(e.segment(r), (t) => t.segment) : hr(r);
1478
1556
  }
1479
- let F;
1480
- function ur() {
1481
- return F !== void 0 || (typeof Intl < "u" && typeof Intl.Segmenter == "function" ? F = new Intl.Segmenter(void 0, { granularity: "grapheme" }) : F = null), F;
1557
+ let z;
1558
+ function pr() {
1559
+ return z !== void 0 || (typeof Intl < "u" && typeof Intl.Segmenter == "function" ? z = new Intl.Segmenter(void 0, { granularity: "grapheme" }) : z = null), z;
1482
1560
  }
1483
- function dr(r) {
1561
+ function hr(r) {
1484
1562
  const e = [], t = Array.from(r);
1485
1563
  let n = "";
1486
1564
  for (let o = 0; o < t.length; o++) {
1487
1565
  const s = t[o], i = t[o + 1];
1488
- n += s, !(i && fr(s, i)) && (e.push(n), n = "");
1566
+ n += s, !(i && gr(s, i)) && (e.push(n), n = "");
1489
1567
  }
1490
1568
  return n && e.push(n), e;
1491
1569
  }
1492
- function fr(r, e) {
1493
- return e ? !!(Me(r) || Me(e) || hr(e) || mr(e) || pr(e) || Ie(r) && Ie(e)) : !1;
1570
+ function gr(r, e) {
1571
+ return e ? !!(xe(r) || xe(e) || br(e) || yr(e) || Sr(e) || Ue(r) && Ue(e)) : !1;
1494
1572
  }
1495
- function Me(r) {
1573
+ function xe(r) {
1496
1574
  return r.codePointAt(0) === 8205;
1497
1575
  }
1498
- function mr(r) {
1576
+ function yr(r) {
1499
1577
  const e = r.codePointAt(0);
1500
1578
  return e === void 0 ? !1 : e >= 65024 && e <= 65039 || e >= 917760 && e <= 917999;
1501
1579
  }
1502
- function pr(r) {
1580
+ function Sr(r) {
1503
1581
  const e = r.codePointAt(0);
1504
1582
  return e === void 0 ? !1 : e >= 127995 && e <= 127999;
1505
1583
  }
1506
- function Ie(r) {
1584
+ function Ue(r) {
1507
1585
  const e = r.codePointAt(0);
1508
1586
  return e === void 0 ? !1 : e >= 127462 && e <= 127487;
1509
1587
  }
1510
- let ne;
1511
- function hr(r) {
1512
- return r ? (ne || (ne = gr()), ne(r)) : !1;
1588
+ let se;
1589
+ function br(r) {
1590
+ return r ? (se || (se = vr()), se(r)) : !1;
1513
1591
  }
1514
- function gr() {
1592
+ function vr() {
1515
1593
  try {
1516
1594
  const r = new RegExp("\\p{Mark}", "u");
1517
1595
  return (e) => r.test(e);
@@ -1522,19 +1600,19 @@ function gr() {
1522
1600
  };
1523
1601
  }
1524
1602
  }
1525
- let oe;
1526
- function Fe(r) {
1527
- return r ? (oe || (oe = yr()), oe(r)) : !1;
1603
+ let ie;
1604
+ function ze(r) {
1605
+ return r ? (ie || (ie = Er()), ie(r)) : !1;
1528
1606
  }
1529
- function yr() {
1607
+ function Er() {
1530
1608
  try {
1531
1609
  const r = new RegExp("\\p{Extended_Pictographic}", "u");
1532
1610
  return (e) => r.test(e);
1533
1611
  } catch {
1534
- return Sr;
1612
+ return wr;
1535
1613
  }
1536
1614
  }
1537
- function Sr(r) {
1615
+ function wr(r) {
1538
1616
  if (!r)
1539
1617
  return !1;
1540
1618
  for (const e of Array.from(r)) {
@@ -1544,7 +1622,7 @@ function Sr(r) {
1544
1622
  }
1545
1623
  return !1;
1546
1624
  }
1547
- function br(r) {
1625
+ function Rr(r) {
1548
1626
  const e = [];
1549
1627
  let t = "", n = 0;
1550
1628
  for (let o = 0; o < r.length; o++) {
@@ -1558,7 +1636,7 @@ function br(r) {
1558
1636
  }
1559
1637
  return (n > 0 || t.length > 0) && e.push({ text: t, breaks: n }), e;
1560
1638
  }
1561
- function vr(r) {
1639
+ function kr(r) {
1562
1640
  if (r.length === 0)
1563
1641
  return [];
1564
1642
  const e = [];
@@ -1567,10 +1645,10 @@ function vr(r) {
1567
1645
  t.push(n), n.breaks >= 2 && (e.push(t), t = []);
1568
1646
  return t.length > 0 && e.push(t), e;
1569
1647
  }
1570
- function P(r, e) {
1648
+ function x(r, e) {
1571
1649
  return (r & e) === e;
1572
1650
  }
1573
- function H(r) {
1651
+ function J(r) {
1574
1652
  return {
1575
1653
  "--tw-motion-seq-index": r.toString(),
1576
1654
  backgroundColor: "inherit",
@@ -1587,27 +1665,27 @@ function H(r) {
1587
1665
  WebkitTextFillColor: "inherit"
1588
1666
  };
1589
1667
  }
1590
- function Pe(r) {
1668
+ function Fe(r) {
1591
1669
  if (!r)
1592
1670
  return r;
1593
- const e = le(r);
1671
+ const e = me(r);
1594
1672
  if (e.length === 0)
1595
1673
  return r;
1596
- const { nodes: t, sawEmoji: n } = $e(e);
1674
+ const { nodes: t, sawEmoji: n } = De(e);
1597
1675
  return n ? t.length === 1 ? t[0] ?? r : t : r;
1598
1676
  }
1599
- function $e(r, e) {
1677
+ function De(r, e) {
1600
1678
  const t = [];
1601
1679
  let n = "", o = !1, s = e?.emoji ?? 0;
1602
1680
  const i = () => {
1603
1681
  n && (t.push(n), n = "");
1604
1682
  };
1605
1683
  for (const c of r) {
1606
- if (Fe(c)) {
1684
+ if (ze(c)) {
1607
1685
  o = !0, i();
1608
- const u = `motion-emoji-${e ? e.emoji++ : s++}`;
1686
+ const d = `motion-emoji-${e ? e.emoji++ : s++}`;
1609
1687
  t.push(
1610
- /* @__PURE__ */ S.jsx("span", { "data-motion-emoji": !0, children: c }, u)
1688
+ /* @__PURE__ */ b.jsx("span", { "data-motion-emoji": !0, children: c }, d)
1611
1689
  );
1612
1690
  continue;
1613
1691
  }
@@ -1615,56 +1693,56 @@ function $e(r, e) {
1615
1693
  }
1616
1694
  return i(), o ? { nodes: t, sawEmoji: !0 } : { nodes: [r.join("")], sawEmoji: !1 };
1617
1695
  }
1618
- function Er(r) {
1696
+ function Nr(r) {
1619
1697
  if (!r)
1620
- return p.None;
1698
+ return g.None;
1621
1699
  const e = r.trim();
1622
1700
  if (!e)
1623
- return p.None;
1624
- const t = Oe.get(e);
1701
+ return g.None;
1702
+ const t = Pe.get(e);
1625
1703
  if (typeof t == "number")
1626
1704
  return t;
1627
1705
  if (typeof document > "u")
1628
- return p.None;
1706
+ return g.None;
1629
1707
  const n = e.split(/\s+/).filter(Boolean);
1630
1708
  if (n.length === 0)
1631
- return p.None;
1632
- const s = n.map((l) => `.${wr(l)}`).map(
1633
- (l) => new RegExp(`(^|[^a-zA-Z0-9_-])${Rr(l)}(?![a-zA-Z0-9_-])`)
1709
+ return g.None;
1710
+ const s = n.map((u) => `.${Tr(u)}`).map(
1711
+ (u) => new RegExp(`(^|[^a-zA-Z0-9_-])${jr(u)}(?![a-zA-Z0-9_-])`)
1634
1712
  );
1635
- let i = p.None, c = !1;
1636
- for (const l of Array.from(document.styleSheets)) {
1637
- let u;
1713
+ let i = g.None, c = !1;
1714
+ for (const u of Array.from(document.styleSheets)) {
1715
+ let d;
1638
1716
  try {
1639
- u = l.cssRules;
1717
+ d = u.cssRules;
1640
1718
  } catch {
1641
1719
  continue;
1642
1720
  }
1643
- const d = Ve(u, s);
1644
- if (d.mask && (i |= d.mask, i === ce))
1721
+ const l = qe(d, s);
1722
+ if (l.mask && (i |= l.mask, i === fe))
1645
1723
  break;
1646
- c ||= d.sawStyleRule;
1724
+ c ||= l.sawStyleRule;
1647
1725
  }
1648
- return (i !== p.None || c) && Oe.set(e, i), i;
1726
+ return (i !== g.None || c) && Pe.set(e, i), i;
1649
1727
  }
1650
- function Ve(r, e) {
1728
+ function qe(r, e) {
1651
1729
  if (!r)
1652
- return { mask: p.None, sawStyleRule: !1 };
1653
- let t = p.None, n = !1;
1730
+ return { mask: g.None, sawStyleRule: !1 };
1731
+ let t = g.None, n = !1;
1654
1732
  for (let o = 0; o < r.length; o++) {
1655
1733
  const s = r[o];
1656
1734
  if (s) {
1657
1735
  if (s.type === CSSRule.STYLE_RULE) {
1658
1736
  const c = s.selectorText ?? "";
1659
- if (!c || !e.some((u) => u.test(c))) continue;
1737
+ if (!c || !e.some((d) => d.test(c))) continue;
1660
1738
  n = !0;
1661
- for (const u of rr)
1662
- u.hints.some((d) => c.includes(d)) && (t |= u.flag);
1663
- if (t === ce)
1739
+ for (const d of ir)
1740
+ d.hints.some((l) => c.includes(l)) && (t |= d.flag);
1741
+ if (t === fe)
1664
1742
  return { mask: t, sawStyleRule: !0 };
1665
1743
  } else if ("cssRules" in s) {
1666
- const i = Ve(s.cssRules, e);
1667
- if (i.mask && (t |= i.mask, t === ce))
1744
+ const i = qe(s.cssRules, e);
1745
+ if (i.mask && (t |= i.mask, t === fe))
1668
1746
  return { mask: t, sawStyleRule: !0 };
1669
1747
  n ||= i.sawStyleRule;
1670
1748
  }
@@ -1672,39 +1750,42 @@ function Ve(r, e) {
1672
1750
  }
1673
1751
  return { mask: t, sawStyleRule: n };
1674
1752
  }
1675
- function wr(r) {
1753
+ function Tr(r) {
1676
1754
  return typeof CSS < "u" && typeof CSS.escape == "function" ? CSS.escape(r) : r.replace(/[^a-zA-Z0-9_-]/g, (e) => `\\${e}`);
1677
1755
  }
1678
- function Rr(r) {
1756
+ function jr(r) {
1679
1757
  return r.replace(/[.*+?^${}()|[\]\\]/g, (e) => `\\${e}`);
1680
1758
  }
1681
1759
  export {
1682
- bt as IKON_UI_BASE_MODULE,
1683
- Ct as IKON_UI_MEDIA_MODULE,
1684
- se as IKON_UI_STREAM_CATEGORY,
1685
- wt as IKON_UI_VIDEO_CANVAS_TYPE,
1686
- Rt as IKON_UI_VIDEO_URL_PLAYER_TYPE,
1687
- Ar as IkonUi,
1688
- Ot as IkonUiRegistry,
1689
- jr as IkonUiSurface,
1690
- ut as UiComponentRegistry,
1691
- lt as UiRenderer,
1692
- zr as UiStreamStore,
1693
- Mr as areIkonUiModuleListsEqual,
1694
- St as createBaseResolvers,
1695
- Cr as createComponentLibrary,
1696
- Or as createIkonUiRegistry,
1697
- Nt as createMediaResolvers,
1698
- dt as isIkonUiCategoryMatch,
1699
- vt as loadBaseModule,
1700
- jt as loadMediaModule,
1701
- er as normalizeIkonUiModuleList,
1702
- Pr as parseIkonUiInitPayload,
1703
- tr as readIkonUiModules,
1704
- Ir as readIkonUiModulesFromSources,
1705
- Et as registerBaseModule,
1706
- At as registerMediaModule,
1707
- Lr as renderMotionLetters,
1708
- _r as useIkonStyles,
1709
- nt as useUiStore
1760
+ Rt as IKON_UI_BASE_MODULE,
1761
+ It as IKON_UI_MEDIA_MODULE,
1762
+ ue as IKON_UI_STREAM_CATEGORY,
1763
+ Tt as IKON_UI_VIDEO_CANVAS_TYPE,
1764
+ jt as IKON_UI_VIDEO_URL_PLAYER_TYPE,
1765
+ Pr as IkonUi,
1766
+ Pt as IkonUiRegistry,
1767
+ Mr as IkonUiSurface,
1768
+ pt as UiComponentRegistry,
1769
+ mt as UiRenderer,
1770
+ qr as UiStreamStore,
1771
+ Fr as areIkonUiModuleListsEqual,
1772
+ wt as createBaseResolvers,
1773
+ Ir as createComponentLibrary,
1774
+ Lr as createIkonUiRegistry,
1775
+ At as createMediaResolvers,
1776
+ ht as isIkonUiCategoryMatch,
1777
+ kt as loadBaseModule,
1778
+ _t as loadMediaModule,
1779
+ or as normalizeIkonUiModuleList,
1780
+ Br as parseIkonUiInitPayload,
1781
+ sr as readIkonUiModules,
1782
+ $r as readIkonUiModulesFromSources,
1783
+ Nt as registerBaseModule,
1784
+ Mt as registerMediaModule,
1785
+ dt as renderChildren,
1786
+ Vr as renderMotionLetters,
1787
+ xr as useIkonStyles,
1788
+ Ur as useIkonUiStores,
1789
+ _ as useUiNode,
1790
+ _r as useUiStore
1710
1791
  };