@ikonai/sdk-react-ui 0.0.33 → 0.0.36
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/app/ConnectionStateRenderer.d.ts +56 -0
- package/app/index.d.ts +2 -0
- package/app/useIkonApp.d.ts +124 -0
- package/auth/AuthContext.d.ts +21 -0
- package/auth/auth-service.d.ts +43 -0
- package/auth/index.d.ts +5 -0
- package/auth/storage.d.ts +18 -0
- package/auth/types.d.ts +49 -0
- package/auth/useAuthGuard.d.ts +35 -0
- package/hooks/index.d.ts +1 -0
- package/hooks/useLazyFont.d.ts +18 -0
- package/i18n/i18n.d.ts +16 -0
- package/i18n/index.d.ts +1 -0
- package/index.d.ts +11 -7
- package/index.js +992 -584
- package/package.json +1 -1
- package/renderer/types.d.ts +2 -2
- package/renderer/ui-renderer.d.ts +2 -2
- package/surface.d.ts +3 -4
package/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { IkonUICore as
|
|
2
|
-
import { UiStreamStore as
|
|
3
|
-
import
|
|
4
|
-
import { createLogger as
|
|
5
|
-
var
|
|
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 = {};
|
|
6
6
|
/**
|
|
7
7
|
* @license React
|
|
8
8
|
* react-jsx-runtime.production.js
|
|
@@ -12,17 +12,17 @@ var K = { exports: {} }, F = {};
|
|
|
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
|
|
16
|
-
function
|
|
17
|
-
if (
|
|
18
|
-
|
|
15
|
+
var xe;
|
|
16
|
+
function wt() {
|
|
17
|
+
if (xe) return ee;
|
|
18
|
+
xe = 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;
|
|
22
22
|
if (s !== void 0 && (i = "" + s), o.key !== void 0 && (i = "" + o.key), "key" in o) {
|
|
23
23
|
s = {};
|
|
24
|
-
for (var
|
|
25
|
-
|
|
24
|
+
for (var a in o)
|
|
25
|
+
a !== "key" && (s[a] = o[a]);
|
|
26
26
|
} else s = o;
|
|
27
27
|
return o = s.ref, {
|
|
28
28
|
$$typeof: r,
|
|
@@ -32,9 +32,9 @@ function rt() {
|
|
|
32
32
|
props: s
|
|
33
33
|
};
|
|
34
34
|
}
|
|
35
|
-
return
|
|
35
|
+
return ee.Fragment = e, ee.jsx = t, ee.jsxs = t, ee;
|
|
36
36
|
}
|
|
37
|
-
var
|
|
37
|
+
var te = {};
|
|
38
38
|
/**
|
|
39
39
|
* @license React
|
|
40
40
|
* react-jsx-runtime.development.js
|
|
@@ -44,246 +44,246 @@ var V = {};
|
|
|
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
|
|
48
|
-
function
|
|
49
|
-
return
|
|
50
|
-
function r(
|
|
51
|
-
if (
|
|
52
|
-
if (typeof
|
|
53
|
-
return
|
|
54
|
-
if (typeof
|
|
55
|
-
switch (
|
|
56
|
-
case
|
|
47
|
+
var $e;
|
|
48
|
+
function Et() {
|
|
49
|
+
return $e || ($e = 1, process.env.NODE_ENV !== "production" && function() {
|
|
50
|
+
function r(c) {
|
|
51
|
+
if (c == null) return null;
|
|
52
|
+
if (typeof c == "function")
|
|
53
|
+
return c.$$typeof === ce ? null : c.displayName || c.name || null;
|
|
54
|
+
if (typeof c == "string") return c;
|
|
55
|
+
switch (c) {
|
|
56
|
+
case v:
|
|
57
57
|
return "Fragment";
|
|
58
|
-
case
|
|
58
|
+
case g:
|
|
59
59
|
return "Profiler";
|
|
60
|
-
case
|
|
60
|
+
case p:
|
|
61
61
|
return "StrictMode";
|
|
62
|
-
case
|
|
62
|
+
case U:
|
|
63
63
|
return "Suspense";
|
|
64
|
-
case
|
|
64
|
+
case z:
|
|
65
65
|
return "SuspenseList";
|
|
66
|
-
case
|
|
66
|
+
case ge:
|
|
67
67
|
return "Activity";
|
|
68
68
|
}
|
|
69
|
-
if (typeof
|
|
70
|
-
switch (typeof
|
|
69
|
+
if (typeof c == "object")
|
|
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
|
-
),
|
|
73
|
-
case
|
|
72
|
+
), c.$$typeof) {
|
|
73
|
+
case A:
|
|
74
74
|
return "Portal";
|
|
75
75
|
case O:
|
|
76
|
-
return (
|
|
76
|
+
return (c.displayName || "Context") + ".Provider";
|
|
77
77
|
case E:
|
|
78
|
-
return (
|
|
79
|
-
case
|
|
80
|
-
var m =
|
|
81
|
-
return
|
|
82
|
-
case
|
|
83
|
-
return m =
|
|
84
|
-
case
|
|
85
|
-
m =
|
|
78
|
+
return (c._context.displayName || "Context") + ".Consumer";
|
|
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";
|
|
84
|
+
case ae:
|
|
85
|
+
m = c._payload, c = c._init;
|
|
86
86
|
try {
|
|
87
|
-
return r(
|
|
87
|
+
return r(c(m));
|
|
88
88
|
} catch {
|
|
89
89
|
}
|
|
90
90
|
}
|
|
91
91
|
return null;
|
|
92
92
|
}
|
|
93
|
-
function e(
|
|
94
|
-
return "" +
|
|
93
|
+
function e(c) {
|
|
94
|
+
return "" + c;
|
|
95
95
|
}
|
|
96
|
-
function t(
|
|
96
|
+
function t(c) {
|
|
97
97
|
try {
|
|
98
|
-
e(
|
|
98
|
+
e(c);
|
|
99
99
|
var m = !1;
|
|
100
100
|
} catch {
|
|
101
101
|
m = !0;
|
|
102
102
|
}
|
|
103
103
|
if (m) {
|
|
104
104
|
m = console;
|
|
105
|
-
var
|
|
106
|
-
return
|
|
105
|
+
var w = m.error, N = typeof Symbol == "function" && Symbol.toStringTag && c[Symbol.toStringTag] || c.constructor.name || "Object";
|
|
106
|
+
return w.call(
|
|
107
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
|
-
|
|
110
|
-
), e(
|
|
109
|
+
N
|
|
110
|
+
), e(c);
|
|
111
111
|
}
|
|
112
112
|
}
|
|
113
|
-
function n(
|
|
114
|
-
if (
|
|
115
|
-
if (typeof
|
|
113
|
+
function n(c) {
|
|
114
|
+
if (c === v) return "<>";
|
|
115
|
+
if (typeof c == "object" && c !== null && c.$$typeof === ae)
|
|
116
116
|
return "<...>";
|
|
117
117
|
try {
|
|
118
|
-
var m = r(
|
|
118
|
+
var m = r(c);
|
|
119
119
|
return m ? "<" + m + ">" : "<...>";
|
|
120
120
|
} catch {
|
|
121
121
|
return "<...>";
|
|
122
122
|
}
|
|
123
123
|
}
|
|
124
124
|
function o() {
|
|
125
|
-
var
|
|
126
|
-
return
|
|
125
|
+
var c = Y.A;
|
|
126
|
+
return c === null ? null : c.getOwner();
|
|
127
127
|
}
|
|
128
128
|
function s() {
|
|
129
129
|
return Error("react-stack-top-frame");
|
|
130
130
|
}
|
|
131
|
-
function i(
|
|
132
|
-
if (
|
|
133
|
-
var m = Object.getOwnPropertyDescriptor(
|
|
131
|
+
function i(c) {
|
|
132
|
+
if (ue.call(c, "key")) {
|
|
133
|
+
var m = Object.getOwnPropertyDescriptor(c, "key").get;
|
|
134
134
|
if (m && m.isReactWarning) return !1;
|
|
135
135
|
}
|
|
136
|
-
return
|
|
136
|
+
return c.key !== void 0;
|
|
137
137
|
}
|
|
138
|
-
function c
|
|
139
|
-
function
|
|
140
|
-
|
|
138
|
+
function a(c, m) {
|
|
139
|
+
function w() {
|
|
140
|
+
Z || (Z = !0, console.error(
|
|
141
141
|
"%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
|
|
142
142
|
m
|
|
143
143
|
));
|
|
144
144
|
}
|
|
145
|
-
|
|
146
|
-
get:
|
|
145
|
+
w.isReactWarning = !0, Object.defineProperty(c, "key", {
|
|
146
|
+
get: w,
|
|
147
147
|
configurable: !0
|
|
148
148
|
});
|
|
149
149
|
}
|
|
150
150
|
function u() {
|
|
151
|
-
var
|
|
152
|
-
return
|
|
151
|
+
var c = r(this.type);
|
|
152
|
+
return Q[c] || (Q[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(
|
|
157
|
-
return
|
|
158
|
-
$$typeof:
|
|
159
|
-
type:
|
|
156
|
+
function d(c, m, w, N, x, _, C, I) {
|
|
157
|
+
return w = _.ref, c = {
|
|
158
|
+
$$typeof: k,
|
|
159
|
+
type: c,
|
|
160
160
|
key: m,
|
|
161
|
-
props:
|
|
162
|
-
_owner:
|
|
163
|
-
}, (
|
|
161
|
+
props: _,
|
|
162
|
+
_owner: x
|
|
163
|
+
}, (w !== void 0 ? w : null) !== null ? Object.defineProperty(c, "ref", {
|
|
164
164
|
enumerable: !1,
|
|
165
165
|
get: u
|
|
166
|
-
}) : Object.defineProperty(
|
|
166
|
+
}) : Object.defineProperty(c, "ref", { enumerable: !1, value: null }), c._store = {}, Object.defineProperty(c._store, "validated", {
|
|
167
167
|
configurable: !1,
|
|
168
168
|
enumerable: !1,
|
|
169
169
|
writable: !0,
|
|
170
170
|
value: 0
|
|
171
|
-
}), Object.defineProperty(
|
|
171
|
+
}), Object.defineProperty(c, "_debugInfo", {
|
|
172
172
|
configurable: !1,
|
|
173
173
|
enumerable: !1,
|
|
174
174
|
writable: !0,
|
|
175
175
|
value: null
|
|
176
|
-
}), Object.defineProperty(
|
|
176
|
+
}), Object.defineProperty(c, "_debugStack", {
|
|
177
177
|
configurable: !1,
|
|
178
178
|
enumerable: !1,
|
|
179
179
|
writable: !0,
|
|
180
|
-
value:
|
|
181
|
-
}), Object.defineProperty(
|
|
180
|
+
value: C
|
|
181
|
+
}), Object.defineProperty(c, "_debugTask", {
|
|
182
182
|
configurable: !1,
|
|
183
183
|
enumerable: !1,
|
|
184
184
|
writable: !0,
|
|
185
|
-
value:
|
|
186
|
-
}), Object.freeze && (Object.freeze(
|
|
185
|
+
value: I
|
|
186
|
+
}), Object.freeze && (Object.freeze(c.props), Object.freeze(c)), c;
|
|
187
187
|
}
|
|
188
|
-
function l(
|
|
189
|
-
var
|
|
190
|
-
if (
|
|
191
|
-
if (
|
|
192
|
-
if (
|
|
193
|
-
for (
|
|
194
|
-
|
|
195
|
-
Object.freeze && Object.freeze(
|
|
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);
|
|
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
|
|
201
|
-
if (
|
|
202
|
-
|
|
203
|
-
var
|
|
204
|
-
return
|
|
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";
|
|
205
205
|
});
|
|
206
|
-
|
|
206
|
+
N = 0 < J.length ? "{key: someKey, " + J.join(": ..., ") + ": ...}" : "{key: someKey}", q[y + N] || (J = 0 < J.length ? "{" + J.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
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
),
|
|
213
|
+
N,
|
|
214
|
+
y,
|
|
215
|
+
J,
|
|
216
|
+
y
|
|
217
|
+
), q[y + N] = !0);
|
|
218
218
|
}
|
|
219
|
-
if (
|
|
220
|
-
|
|
221
|
-
for (var
|
|
222
|
-
|
|
223
|
-
} else
|
|
224
|
-
return
|
|
225
|
-
|
|
226
|
-
typeof
|
|
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,
|
|
226
|
+
typeof c == "function" ? c.displayName || c.name || "Unknown" : c
|
|
227
227
|
), d(
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
A,
|
|
228
|
+
c,
|
|
229
|
+
y,
|
|
231
230
|
_,
|
|
231
|
+
x,
|
|
232
232
|
o(),
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
233
|
+
w,
|
|
234
|
+
C,
|
|
235
|
+
I
|
|
236
236
|
);
|
|
237
237
|
}
|
|
238
|
-
function
|
|
239
|
-
typeof
|
|
238
|
+
function f(c) {
|
|
239
|
+
typeof c == "object" && c !== null && c.$$typeof === k && c._store && (c._store.validated = 1);
|
|
240
240
|
}
|
|
241
|
-
var h =
|
|
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() {
|
|
242
242
|
return null;
|
|
243
243
|
};
|
|
244
244
|
h = {
|
|
245
|
-
"react-stack-bottom-frame": function(
|
|
246
|
-
return
|
|
245
|
+
"react-stack-bottom-frame": function(c) {
|
|
246
|
+
return c();
|
|
247
247
|
}
|
|
248
248
|
};
|
|
249
|
-
var
|
|
249
|
+
var Z, Q = {}, P = h["react-stack-bottom-frame"].bind(
|
|
250
250
|
h,
|
|
251
251
|
s
|
|
252
|
-
)(),
|
|
253
|
-
|
|
254
|
-
var
|
|
252
|
+
)(), B = X(n(s)), q = {};
|
|
253
|
+
te.Fragment = v, te.jsx = function(c, m, w, N, x) {
|
|
254
|
+
var _ = 1e4 > Y.recentlyCreatedOwnerStacks++;
|
|
255
255
|
return l(
|
|
256
|
-
|
|
256
|
+
c,
|
|
257
257
|
m,
|
|
258
|
-
|
|
258
|
+
w,
|
|
259
259
|
!1,
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
260
|
+
N,
|
|
261
|
+
x,
|
|
262
|
+
_ ? Error("react-stack-top-frame") : P,
|
|
263
|
+
_ ? X(n(c)) : B
|
|
264
264
|
);
|
|
265
|
-
},
|
|
266
|
-
var
|
|
265
|
+
}, te.jsxs = function(c, m, w, N, x) {
|
|
266
|
+
var _ = 1e4 > Y.recentlyCreatedOwnerStacks++;
|
|
267
267
|
return l(
|
|
268
|
-
|
|
268
|
+
c,
|
|
269
269
|
m,
|
|
270
|
-
|
|
270
|
+
w,
|
|
271
271
|
!0,
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
272
|
+
N,
|
|
273
|
+
x,
|
|
274
|
+
_ ? Error("react-stack-top-frame") : P,
|
|
275
|
+
_ ? X(n(c)) : B
|
|
276
276
|
);
|
|
277
277
|
};
|
|
278
|
-
}()),
|
|
278
|
+
}()), te;
|
|
279
279
|
}
|
|
280
|
-
var
|
|
281
|
-
function
|
|
282
|
-
return
|
|
280
|
+
var Fe;
|
|
281
|
+
function kt() {
|
|
282
|
+
return Fe || (Fe = 1, process.env.NODE_ENV === "production" ? le.exports = wt() : le.exports = Et()), le.exports;
|
|
283
283
|
}
|
|
284
|
-
var b =
|
|
285
|
-
function
|
|
286
|
-
const t =
|
|
284
|
+
var b = kt();
|
|
285
|
+
function Rt(r, e) {
|
|
286
|
+
const t = Oe(
|
|
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 st(r, e) {
|
|
|
294
294
|
return `${o ?? ""}:${s?.id ?? ""}`;
|
|
295
295
|
}
|
|
296
296
|
);
|
|
297
|
-
return
|
|
297
|
+
return M(() => {
|
|
298
298
|
const [n, o] = t.split(":");
|
|
299
299
|
return {
|
|
300
300
|
rootViewId: n || void 0,
|
|
@@ -302,16 +302,16 @@ function st(r, e) {
|
|
|
302
302
|
};
|
|
303
303
|
}, [t]);
|
|
304
304
|
}
|
|
305
|
-
function
|
|
306
|
-
const t =
|
|
305
|
+
function F(r, e) {
|
|
306
|
+
const t = Oe(
|
|
307
307
|
(n) => r.subscribeNode(e, n),
|
|
308
308
|
() => r.getNodeVersion(e),
|
|
309
309
|
() => r.getNodeVersion(e)
|
|
310
310
|
);
|
|
311
|
-
return
|
|
311
|
+
return M(() => r.getNode(e), [r, e, t]);
|
|
312
312
|
}
|
|
313
|
-
const
|
|
314
|
-
function
|
|
313
|
+
const At = me("UIRenderer");
|
|
314
|
+
function Nt(r) {
|
|
315
315
|
if (r === void 0)
|
|
316
316
|
return "{}";
|
|
317
317
|
if (typeof r == "string")
|
|
@@ -322,18 +322,18 @@ function at(r) {
|
|
|
322
322
|
return "{}";
|
|
323
323
|
}
|
|
324
324
|
}
|
|
325
|
-
function
|
|
325
|
+
function Ct(r) {
|
|
326
326
|
const e = r.styleIds;
|
|
327
327
|
return Array.isArray(e) ? e : [];
|
|
328
328
|
}
|
|
329
|
-
function
|
|
329
|
+
function It(r) {
|
|
330
330
|
const e = r.children;
|
|
331
331
|
return Array.isArray(e) ? e : [];
|
|
332
332
|
}
|
|
333
|
-
function
|
|
333
|
+
function Tt(r, e) {
|
|
334
334
|
return r.nodeId === e.nodeId && r.context === e.context;
|
|
335
335
|
}
|
|
336
|
-
function
|
|
336
|
+
function jt(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,66 +341,66 @@ function dt(r) {
|
|
|
341
341
|
e += "," + r[t].id;
|
|
342
342
|
return e;
|
|
343
343
|
}
|
|
344
|
-
const
|
|
345
|
-
const n =
|
|
346
|
-
() => o.length === 0 ? null : o.map((
|
|
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(
|
|
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]
|
|
349
349
|
);
|
|
350
350
|
if (!n)
|
|
351
351
|
return null;
|
|
352
352
|
if (n.type === "root")
|
|
353
|
-
return /* @__PURE__ */ b.jsx(
|
|
354
|
-
const
|
|
355
|
-
if (!
|
|
356
|
-
return
|
|
357
|
-
const u =
|
|
353
|
+
return /* @__PURE__ */ b.jsx(yt, { children: i }, n.id);
|
|
354
|
+
const a = t.library.resolve(n);
|
|
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;
|
|
358
358
|
return /* @__PURE__ */ b.jsx(l, { nodeId: e, context: t, className: d });
|
|
359
|
-
},
|
|
360
|
-
function
|
|
361
|
-
return !Array.isArray(r) || r.length === 0 ? null : r.map((t) => /* @__PURE__ */ b.jsx(
|
|
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
362
|
}
|
|
363
|
-
function
|
|
363
|
+
function Pt(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
|
|
367
|
-
const { rootViewId: u, rootNodeId: d } =
|
|
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);
|
|
368
368
|
l.current = s;
|
|
369
|
-
const
|
|
370
|
-
|
|
371
|
-
const h =
|
|
372
|
-
h.current =
|
|
373
|
-
const
|
|
374
|
-
if (!
|
|
369
|
+
const f = R(i);
|
|
370
|
+
f.current = i;
|
|
371
|
+
const h = R(a);
|
|
372
|
+
h.current = a;
|
|
373
|
+
const k = V((v, p) => {
|
|
374
|
+
if (!v)
|
|
375
375
|
return;
|
|
376
|
-
const
|
|
377
|
-
l.current?.(
|
|
378
|
-
}, []),
|
|
379
|
-
const
|
|
376
|
+
const g = Nt(p);
|
|
377
|
+
l.current?.(v, g);
|
|
378
|
+
}, []), A = M(() => {
|
|
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: (
|
|
385
|
-
renderChildren: (
|
|
386
|
-
renderView: (
|
|
387
|
-
const
|
|
388
|
-
return
|
|
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;
|
|
389
389
|
},
|
|
390
|
-
dispatchAction:
|
|
390
|
+
dispatchAction: k,
|
|
391
391
|
// Access client/video via refs to avoid context recreation
|
|
392
392
|
get client() {
|
|
393
|
-
return
|
|
393
|
+
return f.current;
|
|
394
394
|
},
|
|
395
395
|
get video() {
|
|
396
396
|
return h.current;
|
|
397
397
|
}
|
|
398
398
|
};
|
|
399
|
-
return
|
|
400
|
-
}, [e, t,
|
|
401
|
-
return !u || !d ? o : /* @__PURE__ */ b.jsx("div", { "data-ikon-view-id": u, style: { display: "contents" }, children: /* @__PURE__ */ b.jsx(
|
|
402
|
-
},
|
|
403
|
-
class
|
|
399
|
+
return v;
|
|
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 {
|
|
404
404
|
constructor(e, t) {
|
|
405
405
|
if (this.fallback = t, e)
|
|
406
406
|
for (const [n, o] of e)
|
|
@@ -417,60 +417,41 @@ class ht {
|
|
|
417
417
|
return this.renderers.get(e.type) ?? this.fallback;
|
|
418
418
|
}
|
|
419
419
|
}
|
|
420
|
-
function
|
|
420
|
+
function fn(r, e) {
|
|
421
421
|
const t = Object.entries(r);
|
|
422
|
-
return new
|
|
422
|
+
return new Mt(t, e);
|
|
423
423
|
}
|
|
424
|
-
function
|
|
425
|
-
return
|
|
424
|
+
function hn(r) {
|
|
425
|
+
return Oe(
|
|
426
426
|
(e) => r.subscribe(e),
|
|
427
427
|
() => r.getSnapshot(),
|
|
428
428
|
() => r.getSnapshot()
|
|
429
429
|
);
|
|
430
430
|
}
|
|
431
|
-
const
|
|
432
|
-
function
|
|
431
|
+
const Ne = "ikon-ui";
|
|
432
|
+
function Lt(r, e) {
|
|
433
433
|
return r === e;
|
|
434
434
|
}
|
|
435
|
-
const
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
video: i
|
|
442
|
-
}) {
|
|
443
|
-
const c = x(() => Array.from(e.keys()).sort().join(","), [e]), u = I(o);
|
|
444
|
-
u.current = o;
|
|
445
|
-
const d = I(s);
|
|
446
|
-
d.current = s;
|
|
447
|
-
const l = I(i);
|
|
448
|
-
l.current = i;
|
|
449
|
-
const p = x(
|
|
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);
|
|
437
|
+
a.current = o;
|
|
438
|
+
const u = R(s);
|
|
439
|
+
u.current = s;
|
|
440
|
+
const d = M(
|
|
450
441
|
() => {
|
|
451
|
-
const
|
|
452
|
-
for (const [
|
|
453
|
-
const
|
|
454
|
-
|
|
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 }));
|
|
455
446
|
}
|
|
456
|
-
return
|
|
447
|
+
return l;
|
|
457
448
|
},
|
|
458
449
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
459
|
-
[e, n,
|
|
450
|
+
[e, n, i]
|
|
460
451
|
);
|
|
461
|
-
return
|
|
462
|
-
pt,
|
|
463
|
-
{
|
|
464
|
-
store: w,
|
|
465
|
-
library: t,
|
|
466
|
-
onAction: u.current,
|
|
467
|
-
client: d.current,
|
|
468
|
-
video: l.current
|
|
469
|
-
},
|
|
470
|
-
h
|
|
471
|
-
)) });
|
|
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)) });
|
|
472
453
|
});
|
|
473
|
-
class
|
|
454
|
+
class Ut {
|
|
474
455
|
core;
|
|
475
456
|
ownsCore;
|
|
476
457
|
stores = /* @__PURE__ */ new Map();
|
|
@@ -478,7 +459,7 @@ class Ur {
|
|
|
478
459
|
unsubscribeClears;
|
|
479
460
|
unsubscribeStoreChanges;
|
|
480
461
|
constructor(e) {
|
|
481
|
-
this.core = e?.core ?? new
|
|
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();
|
|
482
463
|
}
|
|
483
464
|
dispose() {
|
|
484
465
|
this.unsubscribeClears(), this.unsubscribeStoreChanges(), this.ownsCore && this.core.dispose(), this.listeners.clear(), this.stores.clear();
|
|
@@ -525,8 +506,8 @@ class Ur {
|
|
|
525
506
|
if (t)
|
|
526
507
|
return t;
|
|
527
508
|
const n = {
|
|
528
|
-
category:
|
|
529
|
-
store: new
|
|
509
|
+
category: Ne,
|
|
510
|
+
store: new pt()
|
|
530
511
|
};
|
|
531
512
|
return this.stores.set(e, n), n;
|
|
532
513
|
}
|
|
@@ -534,7 +515,7 @@ class Ur {
|
|
|
534
515
|
const n = this.stores.get(e);
|
|
535
516
|
if (!n)
|
|
536
517
|
return !1;
|
|
537
|
-
const o = t ?? this.core.uiStore.getSnapshot(e)?.category ??
|
|
518
|
+
const o = t ?? this.core.uiStore.getSnapshot(e)?.category ?? Ne;
|
|
538
519
|
return n.category === o ? !1 : (this.stores.set(e, { ...n, category: o }), !0);
|
|
539
520
|
}
|
|
540
521
|
notify(e) {
|
|
@@ -542,7 +523,7 @@ class Ur {
|
|
|
542
523
|
t(e);
|
|
543
524
|
}
|
|
544
525
|
}
|
|
545
|
-
function
|
|
526
|
+
function G(r) {
|
|
546
527
|
if (typeof r == "string") {
|
|
547
528
|
const e = r.trim();
|
|
548
529
|
return e.length > 0 ? e : void 0;
|
|
@@ -552,7 +533,7 @@ function $(r) {
|
|
|
552
533
|
return e.length > 0 ? e.join(" ") : void 0;
|
|
553
534
|
}
|
|
554
535
|
}
|
|
555
|
-
function
|
|
536
|
+
function se(...r) {
|
|
556
537
|
let e = "";
|
|
557
538
|
for (const t of r)
|
|
558
539
|
if (t) {
|
|
@@ -561,29 +542,29 @@ function W(...r) {
|
|
|
561
542
|
}
|
|
562
543
|
return e || void 0;
|
|
563
544
|
}
|
|
564
|
-
const
|
|
565
|
-
function
|
|
545
|
+
const Be = /* @__PURE__ */ new WeakMap(), xt = {};
|
|
546
|
+
function ie(r) {
|
|
566
547
|
if (!r)
|
|
567
|
-
return
|
|
568
|
-
const e =
|
|
548
|
+
return xt;
|
|
549
|
+
const e = Be.get(r);
|
|
569
550
|
if (e)
|
|
570
551
|
return e;
|
|
571
552
|
const t = {};
|
|
572
553
|
for (const [n, o] of Object.entries(r))
|
|
573
554
|
o != null && (typeof o == "string" || typeof o == "number" || typeof o == "boolean") && (t[n] = o);
|
|
574
|
-
return
|
|
555
|
+
return Be.set(r, t), t;
|
|
575
556
|
}
|
|
576
|
-
function
|
|
577
|
-
const r =
|
|
578
|
-
const o =
|
|
579
|
-
return
|
|
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;
|
|
560
|
+
return $(() => {
|
|
580
561
|
if (typeof document > "u")
|
|
581
562
|
return;
|
|
582
563
|
const l = s.current;
|
|
583
564
|
if (!l || i && l.closest("[data-ikon-view-id]")?.getAttribute("data-ikon-view-id") !== i)
|
|
584
565
|
return;
|
|
585
|
-
const
|
|
586
|
-
if (
|
|
566
|
+
const f = u !== !0;
|
|
567
|
+
if (f && typeof l.scrollIntoView == "function")
|
|
587
568
|
try {
|
|
588
569
|
l.scrollIntoView({ behavior: "smooth", block: "nearest", inline: "nearest" });
|
|
589
570
|
} catch {
|
|
@@ -591,7 +572,7 @@ function St() {
|
|
|
591
572
|
}
|
|
592
573
|
if (typeof l.focus == "function")
|
|
593
574
|
try {
|
|
594
|
-
l.focus({ preventScroll: !
|
|
575
|
+
l.focus({ preventScroll: !f });
|
|
595
576
|
} catch {
|
|
596
577
|
l.focus();
|
|
597
578
|
}
|
|
@@ -612,31 +593,31 @@ function St() {
|
|
|
612
593
|
return r;
|
|
613
594
|
};
|
|
614
595
|
}
|
|
615
|
-
function
|
|
616
|
-
const r =
|
|
617
|
-
const s =
|
|
596
|
+
function Ft() {
|
|
597
|
+
const r = L(function({ nodeId: t, context: n, className: o }) {
|
|
598
|
+
const s = F(n.store, t);
|
|
618
599
|
if (!s)
|
|
619
600
|
return null;
|
|
620
|
-
const i =
|
|
621
|
-
return /* @__PURE__ */ b.jsx("div", { ...i, "data-ikon-node-id": s.id, className:
|
|
601
|
+
const i = ie(s.props), a = se(G(s.props?.className), o), u = s.children?.length ? n.renderChildren(s.children) : void 0;
|
|
602
|
+
return /* @__PURE__ */ b.jsx("div", { ...i, "data-ikon-node-id": s.id, className: a, children: u });
|
|
622
603
|
});
|
|
623
604
|
return ({ type: e }) => {
|
|
624
605
|
if (e === "common.div")
|
|
625
606
|
return r;
|
|
626
607
|
};
|
|
627
608
|
}
|
|
628
|
-
function
|
|
629
|
-
const r =
|
|
630
|
-
const s =
|
|
609
|
+
function Bt() {
|
|
610
|
+
const r = L(function({ nodeId: t, context: n, className: o }) {
|
|
611
|
+
const s = F(n.store, t);
|
|
631
612
|
if (!s)
|
|
632
613
|
return null;
|
|
633
|
-
const i =
|
|
614
|
+
const i = ie(s.props), a = se(G(s.props?.className), o), u = s.children?.length ? n.renderChildren(s.children) : void 0;
|
|
634
615
|
return /* @__PURE__ */ b.jsx(
|
|
635
616
|
"form",
|
|
636
617
|
{
|
|
637
618
|
...i,
|
|
638
619
|
"data-ikon-node-id": s.id,
|
|
639
|
-
className:
|
|
620
|
+
className: a,
|
|
640
621
|
onSubmit: (d) => d.preventDefault(),
|
|
641
622
|
children: u
|
|
642
623
|
}
|
|
@@ -647,12 +628,12 @@ function vt() {
|
|
|
647
628
|
return r;
|
|
648
629
|
};
|
|
649
630
|
}
|
|
650
|
-
function
|
|
651
|
-
const r =
|
|
652
|
-
const s =
|
|
631
|
+
function Vt() {
|
|
632
|
+
const r = L(function({ nodeId: t, context: n, className: o }) {
|
|
633
|
+
const s = F(n.store, t);
|
|
653
634
|
if (!s)
|
|
654
635
|
return null;
|
|
655
|
-
const i =
|
|
636
|
+
const i = ie(s.props), a = se(G(s.props?.className), o), u = s.children?.length ? n.renderChildren(s.children) : void 0;
|
|
656
637
|
return /* @__PURE__ */ b.jsx(
|
|
657
638
|
"div",
|
|
658
639
|
{
|
|
@@ -660,7 +641,7 @@ function Et() {
|
|
|
660
641
|
"data-ikon-node-id": s.id,
|
|
661
642
|
"data-ikon-view-type": "scroll-view",
|
|
662
643
|
"data-ikon-scroll-container": "true",
|
|
663
|
-
className:
|
|
644
|
+
className: a,
|
|
664
645
|
children: u
|
|
665
646
|
}
|
|
666
647
|
);
|
|
@@ -670,47 +651,47 @@ function Et() {
|
|
|
670
651
|
return r;
|
|
671
652
|
};
|
|
672
653
|
}
|
|
673
|
-
function
|
|
674
|
-
const r =
|
|
675
|
-
const s =
|
|
654
|
+
function zt() {
|
|
655
|
+
const r = L(function({ nodeId: t, context: n, className: o }) {
|
|
656
|
+
const s = F(n.store, t);
|
|
676
657
|
if (!s)
|
|
677
658
|
return null;
|
|
678
|
-
const i =
|
|
679
|
-
return /* @__PURE__ */ b.jsx("div", { ...i, "data-ikon-node-id": s.id, className:
|
|
659
|
+
const i = ie(s.props), a = se("relative", G(s.props?.className), o), u = s.children?.length ? n.renderChildren(s.children) : void 0;
|
|
660
|
+
return /* @__PURE__ */ b.jsx("div", { ...i, "data-ikon-node-id": s.id, className: a, children: u });
|
|
680
661
|
});
|
|
681
662
|
return ({ type: e }) => {
|
|
682
663
|
if (e === "common.stack")
|
|
683
664
|
return r;
|
|
684
665
|
};
|
|
685
666
|
}
|
|
686
|
-
function
|
|
687
|
-
const r =
|
|
688
|
-
const s =
|
|
667
|
+
function Dt() {
|
|
668
|
+
const r = L(function({ nodeId: t, context: n, className: o }) {
|
|
669
|
+
const s = F(n.store, t);
|
|
689
670
|
if (!s)
|
|
690
671
|
return null;
|
|
691
|
-
const i =
|
|
692
|
-
return /* @__PURE__ */ b.jsx("div", { ...i, "data-ikon-node-id": s.id, className:
|
|
672
|
+
const i = ie(s.props), a = se("absolute", G(s.props?.className), o), u = s.children?.length ? n.renderChildren(s.children) : void 0;
|
|
673
|
+
return /* @__PURE__ */ b.jsx("div", { ...i, "data-ikon-node-id": s.id, className: a, children: u });
|
|
693
674
|
});
|
|
694
675
|
return ({ type: e }) => {
|
|
695
676
|
if (e === "common.layer")
|
|
696
677
|
return r;
|
|
697
678
|
};
|
|
698
679
|
}
|
|
699
|
-
function
|
|
680
|
+
function qt() {
|
|
700
681
|
return [
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
682
|
+
Ft(),
|
|
683
|
+
Bt(),
|
|
684
|
+
Vt(),
|
|
685
|
+
zt(),
|
|
686
|
+
Dt(),
|
|
687
|
+
$t()
|
|
707
688
|
];
|
|
708
689
|
}
|
|
709
|
-
const
|
|
710
|
-
function
|
|
711
|
-
r.registerModule(
|
|
690
|
+
const Wt = "base", Yt = async () => qt();
|
|
691
|
+
function Jt(r) {
|
|
692
|
+
r.registerModule(Wt, Yt);
|
|
712
693
|
}
|
|
713
|
-
function
|
|
694
|
+
function rt(r) {
|
|
714
695
|
if (typeof r == "string") {
|
|
715
696
|
const e = r.trim();
|
|
716
697
|
return e.length > 0 ? e : void 0;
|
|
@@ -720,13 +701,13 @@ function Ve(r) {
|
|
|
720
701
|
return e.length > 0 ? e.join(" ") : void 0;
|
|
721
702
|
}
|
|
722
703
|
}
|
|
723
|
-
function
|
|
704
|
+
function nt(...r) {
|
|
724
705
|
const e = [];
|
|
725
706
|
for (const t of r)
|
|
726
707
|
t && t.trim() && e.push(t.trim());
|
|
727
708
|
return e.length > 0 ? e.join(" ") : void 0;
|
|
728
709
|
}
|
|
729
|
-
function
|
|
710
|
+
function fe(r) {
|
|
730
711
|
if (typeof r == "number" && Number.isFinite(r))
|
|
731
712
|
return Math.floor(r);
|
|
732
713
|
if (typeof r == "string" && r.trim().length > 0) {
|
|
@@ -735,43 +716,43 @@ function X(r) {
|
|
|
735
716
|
return Math.floor(e);
|
|
736
717
|
}
|
|
737
718
|
}
|
|
738
|
-
function
|
|
719
|
+
function Ce(r) {
|
|
739
720
|
if (typeof r != "string")
|
|
740
721
|
return;
|
|
741
722
|
const e = r.trim();
|
|
742
723
|
return e.length > 0 ? e : void 0;
|
|
743
724
|
}
|
|
744
|
-
const
|
|
745
|
-
function
|
|
746
|
-
const r =
|
|
747
|
-
const s =
|
|
748
|
-
return
|
|
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;
|
|
729
|
+
return $(() => {
|
|
749
730
|
const h = i.current;
|
|
750
|
-
if (!(!
|
|
751
|
-
return
|
|
752
|
-
|
|
731
|
+
if (!(!a || !h || !u))
|
|
732
|
+
return a.attachCanvas(u, h), () => {
|
|
733
|
+
a.detachCanvas(u);
|
|
753
734
|
};
|
|
754
|
-
}, [
|
|
735
|
+
}, [a, u]), s ? /* @__PURE__ */ b.jsx(
|
|
755
736
|
"canvas",
|
|
756
737
|
{
|
|
757
738
|
ref: i,
|
|
758
739
|
"data-ikon-node-id": s.id,
|
|
759
740
|
"data-ikon-video-stream-id": u,
|
|
760
|
-
className:
|
|
741
|
+
className: f,
|
|
761
742
|
...d ? { width: d } : {},
|
|
762
743
|
...l ? { height: l } : {}
|
|
763
744
|
}
|
|
764
745
|
) : null;
|
|
765
746
|
});
|
|
766
747
|
return ({ type: e }) => {
|
|
767
|
-
if (e ===
|
|
748
|
+
if (e === Kt)
|
|
768
749
|
return r;
|
|
769
750
|
};
|
|
770
751
|
}
|
|
771
|
-
function
|
|
772
|
-
return [
|
|
752
|
+
function Xt() {
|
|
753
|
+
return [Ht(), Zt()];
|
|
773
754
|
}
|
|
774
|
-
function
|
|
755
|
+
function re(r) {
|
|
775
756
|
if (typeof r == "boolean")
|
|
776
757
|
return r;
|
|
777
758
|
if (typeof r == "string") {
|
|
@@ -780,45 +761,45 @@ function B(r) {
|
|
|
780
761
|
if (e === "false") return !1;
|
|
781
762
|
}
|
|
782
763
|
}
|
|
783
|
-
function
|
|
784
|
-
const r =
|
|
764
|
+
function Zt() {
|
|
765
|
+
const r = L(function({
|
|
785
766
|
nodeId: t,
|
|
786
767
|
context: n,
|
|
787
768
|
className: o
|
|
788
769
|
}) {
|
|
789
|
-
const s =
|
|
770
|
+
const s = F(n.store, t);
|
|
790
771
|
if (!s)
|
|
791
772
|
return null;
|
|
792
|
-
const i =
|
|
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;
|
|
793
774
|
return /* @__PURE__ */ b.jsx(
|
|
794
775
|
"video",
|
|
795
776
|
{
|
|
796
|
-
src:
|
|
777
|
+
src: a,
|
|
797
778
|
poster: u,
|
|
798
779
|
...d !== void 0 ? { controls: d } : {},
|
|
799
780
|
...l !== void 0 ? { autoPlay: l } : {},
|
|
800
|
-
...
|
|
781
|
+
...f !== void 0 ? { loop: f } : {},
|
|
801
782
|
...h !== void 0 ? { muted: h } : {},
|
|
802
|
-
...
|
|
803
|
-
...
|
|
804
|
-
...
|
|
783
|
+
...k !== void 0 ? { playsInline: k } : {},
|
|
784
|
+
...A ? { width: A } : {},
|
|
785
|
+
...v ? { height: v } : {},
|
|
805
786
|
"data-ikon-node-id": s.id,
|
|
806
787
|
className: i,
|
|
807
|
-
children:
|
|
788
|
+
children: p
|
|
808
789
|
}
|
|
809
790
|
);
|
|
810
791
|
});
|
|
811
792
|
return ({ type: e }) => {
|
|
812
|
-
if (e ===
|
|
793
|
+
if (e === Gt)
|
|
813
794
|
return r;
|
|
814
795
|
};
|
|
815
796
|
}
|
|
816
|
-
const
|
|
817
|
-
function
|
|
818
|
-
r.registerModule(
|
|
797
|
+
const Qt = "media", er = async () => Xt();
|
|
798
|
+
function tr(r) {
|
|
799
|
+
r.registerModule(Qt, er);
|
|
819
800
|
}
|
|
820
|
-
const
|
|
821
|
-
class
|
|
801
|
+
const Ve = me("UIRegistry");
|
|
802
|
+
class rr {
|
|
822
803
|
baseResolvers = [];
|
|
823
804
|
moduleLoaders = /* @__PURE__ */ new Map();
|
|
824
805
|
moduleResolvers = /* @__PURE__ */ new Map();
|
|
@@ -840,15 +821,15 @@ class xt {
|
|
|
840
821
|
for (const [n, o] of this.moduleLoaders.entries())
|
|
841
822
|
if (!this.moduleResolvers.has(n))
|
|
842
823
|
try {
|
|
843
|
-
const s = await o(), i =
|
|
824
|
+
const s = await o(), i = sr(s);
|
|
844
825
|
this.moduleResolvers.set(n, i), e = !0;
|
|
845
826
|
} catch (s) {
|
|
846
|
-
|
|
827
|
+
Ve.error(`[IkonUiRegistry] Failed to load module '${n}'.`, s);
|
|
847
828
|
}
|
|
848
829
|
const t = [];
|
|
849
830
|
for (const n of this.moduleLoaders.keys())
|
|
850
831
|
this.moduleResolvers.has(n) && t.push(n);
|
|
851
|
-
return
|
|
832
|
+
return ir(t, this.activeModuleOrder) || (this.activeModuleOrder = t, e = !0), e;
|
|
852
833
|
}
|
|
853
834
|
resolve(e) {
|
|
854
835
|
for (const t of this.baseResolvers) {
|
|
@@ -858,7 +839,7 @@ class xt {
|
|
|
858
839
|
for (const t of this.activeModuleOrder) {
|
|
859
840
|
const n = this.moduleResolvers.get(t);
|
|
860
841
|
if (!n) {
|
|
861
|
-
|
|
842
|
+
Ve.warn(`Missing resolvers for module ${t}`);
|
|
862
843
|
continue;
|
|
863
844
|
}
|
|
864
845
|
for (const o of n) {
|
|
@@ -868,17 +849,17 @@ class xt {
|
|
|
868
849
|
}
|
|
869
850
|
}
|
|
870
851
|
}
|
|
871
|
-
function
|
|
872
|
-
const r = new
|
|
873
|
-
return
|
|
852
|
+
function nr() {
|
|
853
|
+
const r = new rr();
|
|
854
|
+
return Jt(r), tr(r), r.loadRegisteredModules(), r;
|
|
874
855
|
}
|
|
875
|
-
function
|
|
856
|
+
function or(r) {
|
|
876
857
|
return Array.isArray(r) ? r : [r];
|
|
877
858
|
}
|
|
878
|
-
function
|
|
879
|
-
return r ?
|
|
859
|
+
function sr(r) {
|
|
860
|
+
return r ? or(r).flatMap((e) => e ? Array.isArray(e) ? e.filter(Boolean) : [e] : []) : [];
|
|
880
861
|
}
|
|
881
|
-
function
|
|
862
|
+
function ir(r, e) {
|
|
882
863
|
if (r.length !== e.length)
|
|
883
864
|
return !1;
|
|
884
865
|
for (let t = 0; t < r.length; t += 1)
|
|
@@ -886,7 +867,7 @@ function Ft(r, e) {
|
|
|
886
867
|
return !1;
|
|
887
868
|
return !0;
|
|
888
869
|
}
|
|
889
|
-
const
|
|
870
|
+
const Se = me("MotionController"), ze = {
|
|
890
871
|
ease: [0.25, 0.1, 0.25, 1],
|
|
891
872
|
"ease-in": [0.42, 0, 1, 1],
|
|
892
873
|
"ease-out": [0, 0, 0.58, 1],
|
|
@@ -916,88 +897,88 @@ const ne = he("MotionController"), je = {
|
|
|
916
897
|
"ease-out-back": [0.175, 0.885, 0.32, 1.275],
|
|
917
898
|
"ease-in-out-back": [0.68, -0.55, 0.265, 1.55]
|
|
918
899
|
};
|
|
919
|
-
function
|
|
900
|
+
function j(r) {
|
|
920
901
|
return r <= 0 ? 0 : r >= 1 ? 1 : r;
|
|
921
902
|
}
|
|
922
|
-
function
|
|
903
|
+
function De(r) {
|
|
923
904
|
if (r == null) return;
|
|
924
905
|
const e = `${r}`.trim();
|
|
925
906
|
if (!e) return;
|
|
926
907
|
const t = Number.parseFloat(e);
|
|
927
908
|
return Number.isFinite(t) ? t : void 0;
|
|
928
909
|
}
|
|
929
|
-
function
|
|
910
|
+
function qe(r) {
|
|
930
911
|
return typeof CSS < "u" && CSS.escape ? CSS.escape(r) : r.replace(/[^a-zA-Z0-9_-]/g, (e) => `\\${e}`);
|
|
931
912
|
}
|
|
932
|
-
function
|
|
913
|
+
function We(r, e, t, n) {
|
|
933
914
|
const l = new Float32Array(11);
|
|
934
|
-
function p
|
|
935
|
-
return ((3 *
|
|
915
|
+
function f(p, g, E) {
|
|
916
|
+
return ((3 * g - 3 * E + 1) * p + (3 * E - 6 * g)) * p * p + 3 * g * p;
|
|
936
917
|
}
|
|
937
|
-
function h(
|
|
938
|
-
return 3 * (3 *
|
|
918
|
+
function h(p, g, E) {
|
|
919
|
+
return 3 * (3 * g - 3 * E + 1) * p * p + 2 * (3 * E - 6 * g) * p + 3 * g;
|
|
939
920
|
}
|
|
940
|
-
function
|
|
921
|
+
function k(p, g) {
|
|
941
922
|
for (let E = 0; E < 4; E += 1) {
|
|
942
|
-
const O = h(
|
|
923
|
+
const O = h(g, r, t);
|
|
943
924
|
if (O === 0)
|
|
944
|
-
return
|
|
945
|
-
const
|
|
946
|
-
|
|
925
|
+
return g;
|
|
926
|
+
const T = f(g, r, t) - p;
|
|
927
|
+
g -= T / O;
|
|
947
928
|
}
|
|
948
|
-
return
|
|
929
|
+
return g;
|
|
949
930
|
}
|
|
950
|
-
function
|
|
951
|
-
let O = 0,
|
|
931
|
+
function A(p, g, E) {
|
|
932
|
+
let O = 0, T = 0, U = 0;
|
|
952
933
|
do
|
|
953
|
-
|
|
954
|
-
while (Math.abs(O) > 1e-7 && ++
|
|
955
|
-
return
|
|
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);
|
|
936
|
+
return T;
|
|
956
937
|
}
|
|
957
|
-
function
|
|
958
|
-
let
|
|
938
|
+
function v(p) {
|
|
939
|
+
let g = 0, E = 1;
|
|
959
940
|
const O = 10;
|
|
960
|
-
for (; E !== O && l[E] <=
|
|
961
|
-
|
|
941
|
+
for (; E !== O && l[E] <= p; E += 1)
|
|
942
|
+
g += 0.1;
|
|
962
943
|
E -= 1;
|
|
963
|
-
const
|
|
964
|
-
return
|
|
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);
|
|
965
946
|
}
|
|
966
|
-
for (let
|
|
967
|
-
l[
|
|
968
|
-
return (
|
|
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);
|
|
969
950
|
}
|
|
970
|
-
function
|
|
951
|
+
function ar(r) {
|
|
971
952
|
const e = /steps\(\s*([0-9]+)\s*(?:,\s*([a-z-]+)\s*)?\)/i.exec(r);
|
|
972
953
|
if (!e)
|
|
973
|
-
return (o) =>
|
|
954
|
+
return (o) => j(o);
|
|
974
955
|
const t = Math.max(1, parseInt(e[1], 10)), n = (e[2] ?? "end").toLowerCase();
|
|
975
|
-
return n === "start" || n === "jump-start" ? (o) =>
|
|
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);
|
|
976
957
|
}
|
|
977
|
-
function
|
|
958
|
+
function cr(r) {
|
|
978
959
|
if (!r)
|
|
979
|
-
return (t) =>
|
|
960
|
+
return (t) => j(t);
|
|
980
961
|
const e = r.trim().toLowerCase();
|
|
981
962
|
if (!e || e === "linear")
|
|
982
|
-
return (t) =>
|
|
983
|
-
if (
|
|
984
|
-
const [t, n, o, s] =
|
|
985
|
-
return (
|
|
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)));
|
|
986
967
|
}
|
|
987
968
|
if (e.startsWith("cubic-bezier(") && e.endsWith(")")) {
|
|
988
969
|
const n = e.slice(13, -1).split(",").map((o) => Number.parseFloat(o.trim()));
|
|
989
970
|
if (n.length === 4 && n.every((o) => Number.isFinite(o))) {
|
|
990
|
-
const [o, s, i,
|
|
991
|
-
return (d) =>
|
|
971
|
+
const [o, s, i, a] = n, u = We(o, s, i, a);
|
|
972
|
+
return (d) => j(u(j(d)));
|
|
992
973
|
}
|
|
993
974
|
}
|
|
994
975
|
if (e.startsWith("steps(") && e.endsWith(")")) {
|
|
995
|
-
const t =
|
|
996
|
-
return (n) => t(
|
|
976
|
+
const t = ar(e);
|
|
977
|
+
return (n) => t(j(n));
|
|
997
978
|
}
|
|
998
|
-
return (t) =>
|
|
979
|
+
return (t) => j(t);
|
|
999
980
|
}
|
|
1000
|
-
function
|
|
981
|
+
function ur(r) {
|
|
1001
982
|
if (!r)
|
|
1002
983
|
return;
|
|
1003
984
|
const e = /(-?\d+(?:\.\d+)?)\s*\.\.\s*(-?\d+(?:\.\d+)?)\s*->\s*(-?\d+(?:\.\d+)?)\s*\.\.\s*(-?\d+(?:\.\d+)?)/.exec(r);
|
|
@@ -1007,7 +988,7 @@ function zt(r) {
|
|
|
1007
988
|
if (![t, n, o, s].some((i) => !Number.isFinite(i)))
|
|
1008
989
|
return { inStart: t, inEnd: n, outStart: o, outEnd: s };
|
|
1009
990
|
}
|
|
1010
|
-
class
|
|
991
|
+
class lr {
|
|
1011
992
|
bindingsByStyle = /* @__PURE__ */ new Map();
|
|
1012
993
|
observer;
|
|
1013
994
|
observeScheduled = !1;
|
|
@@ -1031,7 +1012,7 @@ class Dt {
|
|
|
1031
1012
|
try {
|
|
1032
1013
|
e();
|
|
1033
1014
|
} catch (t) {
|
|
1034
|
-
|
|
1015
|
+
Se.warn("Failed to cleanup binding listener", t);
|
|
1035
1016
|
}
|
|
1036
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);
|
|
1037
1018
|
}
|
|
@@ -1041,7 +1022,7 @@ class Dt {
|
|
|
1041
1022
|
const n = (JSON.parse(e).motionBindings ?? []).map((o) => this.parseBinding(o)).filter((o) => o !== void 0);
|
|
1042
1023
|
return n.length === 0 ? void 0 : { bindings: n };
|
|
1043
1024
|
} catch (t) {
|
|
1044
|
-
|
|
1025
|
+
Se.warn("Failed to parse motion metadata", t);
|
|
1045
1026
|
return;
|
|
1046
1027
|
}
|
|
1047
1028
|
}
|
|
@@ -1049,13 +1030,13 @@ class Dt {
|
|
|
1049
1030
|
const t = e.source?.trim();
|
|
1050
1031
|
if (!t)
|
|
1051
1032
|
return;
|
|
1052
|
-
const n =
|
|
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;
|
|
1053
1034
|
return Number.isNaN(n) || Number.isNaN(s) ? void 0 : {
|
|
1054
1035
|
source: t.toLowerCase(),
|
|
1055
1036
|
min: n,
|
|
1056
1037
|
max: s,
|
|
1057
1038
|
clamp: i === "freeze-start" || i === "freeze-end" || i === "unclamped" ? i : "clamp",
|
|
1058
|
-
reverse:
|
|
1039
|
+
reverse: a,
|
|
1059
1040
|
ease: u,
|
|
1060
1041
|
map: d,
|
|
1061
1042
|
targetId: l
|
|
@@ -1107,7 +1088,7 @@ class Dt {
|
|
|
1107
1088
|
const t = this.bindingsByStyle.get(e);
|
|
1108
1089
|
if (!t || typeof document > "u")
|
|
1109
1090
|
return;
|
|
1110
|
-
const n = `.${
|
|
1091
|
+
const n = `.${qe(e)}`;
|
|
1111
1092
|
document.querySelectorAll(n).forEach((s) => this.applyStyleToElement(s, e, t));
|
|
1112
1093
|
}
|
|
1113
1094
|
applyStyleToElement(e, t, n) {
|
|
@@ -1142,12 +1123,12 @@ class Dt {
|
|
|
1142
1123
|
s();
|
|
1143
1124
|
const i = new AbortController();
|
|
1144
1125
|
o.addEventListener("scroll", s, { passive: !0, signal: i.signal }), this.registerCleanup(e, t, () => i.abort());
|
|
1145
|
-
const
|
|
1146
|
-
window.addEventListener("resize",
|
|
1126
|
+
const a = () => s();
|
|
1127
|
+
window.addEventListener("resize", a), this.registerCleanup(e, t, () => window.removeEventListener("resize", a));
|
|
1147
1128
|
}
|
|
1148
1129
|
resolveScrollContainer(e, t) {
|
|
1149
1130
|
if (t.targetId) {
|
|
1150
|
-
const n = `[data-ikon-motion-source="${
|
|
1131
|
+
const n = `[data-ikon-motion-source="${qe(t.targetId)}"]`, o = typeof document < "u" ? document.querySelector(n) : null;
|
|
1151
1132
|
if (o)
|
|
1152
1133
|
return o;
|
|
1153
1134
|
}
|
|
@@ -1157,7 +1138,7 @@ class Dt {
|
|
|
1157
1138
|
const o = t.max - t.min, s = o === 0 ? n > t.min ? 1 : 0 : (n - t.min) / o;
|
|
1158
1139
|
let i = this.applyClamp(s, t.clamp);
|
|
1159
1140
|
t.reverse && (i = 1 - i);
|
|
1160
|
-
const
|
|
1141
|
+
const a = t.ease(i), u = Number.isFinite(a) ? a : 0, d = u * 100;
|
|
1161
1142
|
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) {
|
|
1162
1143
|
const l = this.applyMap(d, t.map);
|
|
1163
1144
|
l !== void 0 && e.style.setProperty("--tw-motion-bind-value", `${l}`);
|
|
@@ -1175,7 +1156,7 @@ class Dt {
|
|
|
1175
1156
|
case "unclamped":
|
|
1176
1157
|
return e;
|
|
1177
1158
|
default:
|
|
1178
|
-
return
|
|
1159
|
+
return j(e);
|
|
1179
1160
|
}
|
|
1180
1161
|
}
|
|
1181
1162
|
applyMap(e, t) {
|
|
@@ -1216,8 +1197,8 @@ class Dt {
|
|
|
1216
1197
|
for (const i of o) {
|
|
1217
1198
|
try {
|
|
1218
1199
|
i();
|
|
1219
|
-
} catch (
|
|
1220
|
-
|
|
1200
|
+
} catch (a) {
|
|
1201
|
+
Se.warn("Failed to cleanup listener", a);
|
|
1221
1202
|
}
|
|
1222
1203
|
this.globalCleanups.delete(i);
|
|
1223
1204
|
}
|
|
@@ -1262,16 +1243,16 @@ class Dt {
|
|
|
1262
1243
|
}
|
|
1263
1244
|
}
|
|
1264
1245
|
}
|
|
1265
|
-
const
|
|
1266
|
-
function
|
|
1267
|
-
const e =
|
|
1246
|
+
const Ye = new lr(), be = "ikon-ds";
|
|
1247
|
+
function dr(r) {
|
|
1248
|
+
const e = V(({ styleId: n, css: o, common: s }) => {
|
|
1268
1249
|
if (!n || typeof document > "u") return;
|
|
1269
|
-
let i = document.getElementById(
|
|
1270
|
-
i || (i = document.createElement("style"), i.id =
|
|
1271
|
-
}, []), t =
|
|
1272
|
-
typeof document < "u" && document.getElementById(
|
|
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();
|
|
1273
1254
|
}, []);
|
|
1274
|
-
return
|
|
1255
|
+
return $(() => {
|
|
1275
1256
|
if (!r) return;
|
|
1276
1257
|
for (const o of r.getUiStyles())
|
|
1277
1258
|
e(o);
|
|
@@ -1279,9 +1260,9 @@ function Fr(r) {
|
|
|
1279
1260
|
return () => {
|
|
1280
1261
|
n?.(), t();
|
|
1281
1262
|
};
|
|
1282
|
-
}, [r, t, e]),
|
|
1263
|
+
}, [r, t, e]), $(() => () => t(), [t]), { setStyle: e, reset: t };
|
|
1283
1264
|
}
|
|
1284
|
-
function
|
|
1265
|
+
function fr(r) {
|
|
1285
1266
|
const e = [];
|
|
1286
1267
|
for (const [t, n] of r) {
|
|
1287
1268
|
const o = n.store.getSnapshot(), s = o.rootViewId && o.views.has(o.rootViewId);
|
|
@@ -1289,62 +1270,62 @@ function qt(r) {
|
|
|
1289
1270
|
}
|
|
1290
1271
|
return e.sort(), e.join(",");
|
|
1291
1272
|
}
|
|
1292
|
-
function
|
|
1293
|
-
const [e, t] =
|
|
1294
|
-
return
|
|
1273
|
+
function hr(r) {
|
|
1274
|
+
const [e, t] = W(), n = R("");
|
|
1275
|
+
return $(() => {
|
|
1295
1276
|
if (!r) {
|
|
1296
1277
|
t(void 0), n.current = "";
|
|
1297
1278
|
return;
|
|
1298
1279
|
}
|
|
1299
1280
|
const o = () => {
|
|
1300
|
-
const s = r.getStores(), i =
|
|
1281
|
+
const s = r.getStores(), i = fr(s);
|
|
1301
1282
|
i !== n.current && (n.current = i, t(s));
|
|
1302
1283
|
};
|
|
1303
1284
|
return o(), r.subscribe(o);
|
|
1304
1285
|
}, [r]), e;
|
|
1305
1286
|
}
|
|
1306
|
-
var
|
|
1307
|
-
function
|
|
1308
|
-
var e =
|
|
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];
|
|
1309
1290
|
try {
|
|
1310
|
-
r[
|
|
1291
|
+
r[ne] = void 0;
|
|
1311
1292
|
var n = !0;
|
|
1312
1293
|
} catch {
|
|
1313
1294
|
}
|
|
1314
|
-
var o =
|
|
1315
|
-
return n && (e ? r[
|
|
1295
|
+
var o = Sr.call(r);
|
|
1296
|
+
return n && (e ? r[ne] = t : delete r[ne]), o;
|
|
1316
1297
|
}
|
|
1317
|
-
var
|
|
1318
|
-
function
|
|
1319
|
-
return
|
|
1298
|
+
var vr = Object.prototype, wr = vr.toString;
|
|
1299
|
+
function Er(r) {
|
|
1300
|
+
return wr.call(r);
|
|
1320
1301
|
}
|
|
1321
|
-
var
|
|
1322
|
-
function
|
|
1323
|
-
return r == null ? r === void 0 ?
|
|
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);
|
|
1324
1305
|
}
|
|
1325
|
-
function
|
|
1306
|
+
function Nr(r) {
|
|
1326
1307
|
return r != null && typeof r == "object";
|
|
1327
1308
|
}
|
|
1328
|
-
var
|
|
1329
|
-
function
|
|
1330
|
-
return typeof r == "string" || !
|
|
1309
|
+
var Cr = Array.isArray, Ir = "[object String]";
|
|
1310
|
+
function Tr(r) {
|
|
1311
|
+
return typeof r == "string" || !Cr(r) && Nr(r) && Ar(r) == Ir;
|
|
1331
1312
|
}
|
|
1332
|
-
const
|
|
1333
|
-
function
|
|
1313
|
+
const Ke = "ikonUiModules";
|
|
1314
|
+
function Ie(r) {
|
|
1334
1315
|
return typeof r == "object" && r !== null && !Array.isArray(r);
|
|
1335
1316
|
}
|
|
1336
|
-
function
|
|
1317
|
+
function jr(r) {
|
|
1337
1318
|
if (!Array.isArray(r))
|
|
1338
1319
|
return;
|
|
1339
1320
|
const e = /* @__PURE__ */ new Set();
|
|
1340
1321
|
for (const t of r) {
|
|
1341
|
-
if (!
|
|
1322
|
+
if (!Tr(t)) continue;
|
|
1342
1323
|
const n = t.trim();
|
|
1343
1324
|
n && (e.has(n) || e.add(n));
|
|
1344
1325
|
}
|
|
1345
1326
|
return Array.from(e);
|
|
1346
1327
|
}
|
|
1347
|
-
function
|
|
1328
|
+
function pn(r, e) {
|
|
1348
1329
|
if (r === e)
|
|
1349
1330
|
return !0;
|
|
1350
1331
|
if (!r || !e)
|
|
@@ -1356,19 +1337,19 @@ function Br(r, e) {
|
|
|
1356
1337
|
return !1;
|
|
1357
1338
|
return !0;
|
|
1358
1339
|
}
|
|
1359
|
-
function
|
|
1360
|
-
if (!(!
|
|
1361
|
-
return
|
|
1340
|
+
function Or(r) {
|
|
1341
|
+
if (!(!Ie(r) || !Object.prototype.hasOwnProperty.call(r, Ke)))
|
|
1342
|
+
return jr(r[Ke]);
|
|
1362
1343
|
}
|
|
1363
|
-
function
|
|
1344
|
+
function gn(...r) {
|
|
1364
1345
|
for (const e of r) {
|
|
1365
|
-
const t =
|
|
1346
|
+
const t = Or(e);
|
|
1366
1347
|
if (t !== void 0)
|
|
1367
1348
|
return t;
|
|
1368
1349
|
}
|
|
1369
1350
|
}
|
|
1370
|
-
function
|
|
1371
|
-
if (!
|
|
1351
|
+
function yn(r) {
|
|
1352
|
+
if (!Ie(r))
|
|
1372
1353
|
return;
|
|
1373
1354
|
const e = r, t = Object.keys(e).find((u) => u.toLowerCase() === "modules");
|
|
1374
1355
|
if (!t)
|
|
@@ -1381,44 +1362,44 @@ function Dr(r) {
|
|
|
1381
1362
|
const o = [], s = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Set();
|
|
1382
1363
|
for (const u of n) {
|
|
1383
1364
|
if (typeof u == "string") {
|
|
1384
|
-
const
|
|
1385
|
-
if (!
|
|
1365
|
+
const v = u.trim();
|
|
1366
|
+
if (!v || i.has(v))
|
|
1386
1367
|
continue;
|
|
1387
|
-
o.push(
|
|
1368
|
+
o.push(v), i.add(v);
|
|
1388
1369
|
continue;
|
|
1389
1370
|
}
|
|
1390
|
-
if (!
|
|
1371
|
+
if (!Ie(u))
|
|
1391
1372
|
continue;
|
|
1392
|
-
const d = u, l = Object.keys(d).find((
|
|
1373
|
+
const d = u, l = Object.keys(d).find((v) => v.toLowerCase() === "name");
|
|
1393
1374
|
if (!l)
|
|
1394
1375
|
continue;
|
|
1395
|
-
const
|
|
1396
|
-
if (typeof
|
|
1376
|
+
const f = d[l];
|
|
1377
|
+
if (typeof f != "string")
|
|
1397
1378
|
continue;
|
|
1398
|
-
const h =
|
|
1379
|
+
const h = f.trim();
|
|
1399
1380
|
if (!h)
|
|
1400
1381
|
continue;
|
|
1401
|
-
const
|
|
1402
|
-
typeof
|
|
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));
|
|
1403
1384
|
}
|
|
1404
1385
|
if (!o.length && s.size === 0)
|
|
1405
1386
|
return { modules: [] };
|
|
1406
|
-
const
|
|
1387
|
+
const a = Array.from(s.entries()).map(([u, d]) => ({
|
|
1407
1388
|
name: u,
|
|
1408
1389
|
javascript: d
|
|
1409
1390
|
}));
|
|
1410
|
-
return
|
|
1391
|
+
return a.length > 0 ? { modules: o, inlineModules: a } : { modules: o };
|
|
1411
1392
|
}
|
|
1412
|
-
const
|
|
1393
|
+
const S = {
|
|
1413
1394
|
None: 0,
|
|
1414
1395
|
Letter: 1,
|
|
1415
1396
|
Word: 2,
|
|
1416
1397
|
Line: 4,
|
|
1417
1398
|
Paragraph: 8,
|
|
1418
1399
|
Emoji: 16
|
|
1419
|
-
},
|
|
1400
|
+
}, Pr = [
|
|
1420
1401
|
{
|
|
1421
|
-
flag:
|
|
1402
|
+
flag: S.Letter,
|
|
1422
1403
|
hints: [
|
|
1423
1404
|
"[data-motion-letter]",
|
|
1424
1405
|
"[data-letter]",
|
|
@@ -1427,7 +1408,7 @@ const g = {
|
|
|
1427
1408
|
]
|
|
1428
1409
|
},
|
|
1429
1410
|
{
|
|
1430
|
-
flag:
|
|
1411
|
+
flag: S.Word,
|
|
1431
1412
|
hints: [
|
|
1432
1413
|
"[data-motion-word]",
|
|
1433
1414
|
"[data-word]",
|
|
@@ -1436,7 +1417,7 @@ const g = {
|
|
|
1436
1417
|
]
|
|
1437
1418
|
},
|
|
1438
1419
|
{
|
|
1439
|
-
flag:
|
|
1420
|
+
flag: S.Line,
|
|
1440
1421
|
hints: [
|
|
1441
1422
|
"[data-motion-line]",
|
|
1442
1423
|
"[data-line]",
|
|
@@ -1445,7 +1426,7 @@ const g = {
|
|
|
1445
1426
|
]
|
|
1446
1427
|
},
|
|
1447
1428
|
{
|
|
1448
|
-
flag:
|
|
1429
|
+
flag: S.Paragraph,
|
|
1449
1430
|
hints: [
|
|
1450
1431
|
"[data-motion-paragraph]",
|
|
1451
1432
|
"[data-paragraph]",
|
|
@@ -1456,7 +1437,7 @@ const g = {
|
|
|
1456
1437
|
]
|
|
1457
1438
|
},
|
|
1458
1439
|
{
|
|
1459
|
-
flag:
|
|
1440
|
+
flag: S.Emoji,
|
|
1460
1441
|
hints: [
|
|
1461
1442
|
":is([data-motion-emoji],[data-emoji],.tw-motion-emoji,.tw-emoji)",
|
|
1462
1443
|
"[data-motion-emoji]",
|
|
@@ -1465,42 +1446,42 @@ const g = {
|
|
|
1465
1446
|
"[data-emoji]"
|
|
1466
1447
|
]
|
|
1467
1448
|
}
|
|
1468
|
-
],
|
|
1469
|
-
function
|
|
1470
|
-
if (!r || r.length >
|
|
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)
|
|
1471
1452
|
return r;
|
|
1472
|
-
const t =
|
|
1473
|
-
if (o ===
|
|
1453
|
+
const t = Xr(e), n = K(t, S.Emoji), o = t & _r;
|
|
1454
|
+
if (o === S.None && !n)
|
|
1474
1455
|
return r;
|
|
1475
1456
|
const s = r.replace(/\r\n/g, `
|
|
1476
1457
|
`).replace(/\r/g, `
|
|
1477
1458
|
`);
|
|
1478
|
-
if (o ===
|
|
1479
|
-
return
|
|
1480
|
-
const i =
|
|
1459
|
+
if (o === S.None)
|
|
1460
|
+
return Qe(s);
|
|
1461
|
+
const i = Gr(s);
|
|
1481
1462
|
if (i.length === 0)
|
|
1482
|
-
return n ?
|
|
1483
|
-
const
|
|
1484
|
-
for (const l of
|
|
1485
|
-
const
|
|
1486
|
-
d.push(...
|
|
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 = [];
|
|
1465
|
+
for (const l of a) {
|
|
1466
|
+
const f = Lr(l, t, u);
|
|
1467
|
+
d.push(...f);
|
|
1487
1468
|
}
|
|
1488
1469
|
return d;
|
|
1489
1470
|
}
|
|
1490
|
-
function
|
|
1471
|
+
function Lr(r, e, t) {
|
|
1491
1472
|
const n = [];
|
|
1492
1473
|
for (const o of r) {
|
|
1493
|
-
const s =
|
|
1474
|
+
const s = Ur(o, e, t);
|
|
1494
1475
|
n.push(...s);
|
|
1495
1476
|
}
|
|
1496
|
-
if (
|
|
1477
|
+
if (K(e, S.Paragraph)) {
|
|
1497
1478
|
const o = t.paragraph++;
|
|
1498
1479
|
return [
|
|
1499
1480
|
/* @__PURE__ */ b.jsx(
|
|
1500
1481
|
"span",
|
|
1501
1482
|
{
|
|
1502
1483
|
"data-motion-paragraph": !0,
|
|
1503
|
-
style:
|
|
1484
|
+
style: pe(o),
|
|
1504
1485
|
children: n
|
|
1505
1486
|
},
|
|
1506
1487
|
`motion-paragraph-${o}`
|
|
@@ -1509,12 +1490,12 @@ function fr(r, e, t) {
|
|
|
1509
1490
|
}
|
|
1510
1491
|
return n;
|
|
1511
1492
|
}
|
|
1512
|
-
function
|
|
1513
|
-
const n =
|
|
1514
|
-
if (
|
|
1493
|
+
function Ur(r, e, t) {
|
|
1494
|
+
const n = xr(r.text, e, t), o = [];
|
|
1495
|
+
if (K(e, S.Line)) {
|
|
1515
1496
|
const s = t.line++;
|
|
1516
1497
|
o.push(
|
|
1517
|
-
/* @__PURE__ */ b.jsx("span", { "data-motion-line": !0, style:
|
|
1498
|
+
/* @__PURE__ */ b.jsx("span", { "data-motion-line": !0, style: pe(s), children: n }, `motion-line-${s}`)
|
|
1518
1499
|
);
|
|
1519
1500
|
} else
|
|
1520
1501
|
o.push(...n);
|
|
@@ -1522,103 +1503,103 @@ function mr(r, e, t) {
|
|
|
1522
1503
|
o.push(/* @__PURE__ */ b.jsx("br", {}, `motion-break-${t.br++}`));
|
|
1523
1504
|
return o;
|
|
1524
1505
|
}
|
|
1525
|
-
function
|
|
1506
|
+
function xr(r, e, t) {
|
|
1526
1507
|
if (!r)
|
|
1527
1508
|
return [];
|
|
1528
|
-
const n =
|
|
1529
|
-
let i = 0,
|
|
1530
|
-
for (; (
|
|
1531
|
-
if (
|
|
1532
|
-
const u = r.slice(i,
|
|
1533
|
-
o.push(
|
|
1509
|
+
const n = K(e, S.Word), o = [], s = /(\s+)/g;
|
|
1510
|
+
let i = 0, a;
|
|
1511
|
+
for (; (a = s.exec(r)) !== null; ) {
|
|
1512
|
+
if (a.index > i) {
|
|
1513
|
+
const u = r.slice(i, a.index);
|
|
1514
|
+
o.push(He(u, t, e, n));
|
|
1534
1515
|
}
|
|
1535
|
-
o.push(
|
|
1516
|
+
o.push(a[0]), i = a.index + a[0].length;
|
|
1536
1517
|
}
|
|
1537
1518
|
if (i < r.length) {
|
|
1538
1519
|
const u = r.slice(i);
|
|
1539
|
-
o.push(
|
|
1520
|
+
o.push(He(u, t, e, n));
|
|
1540
1521
|
}
|
|
1541
1522
|
return o;
|
|
1542
1523
|
}
|
|
1543
|
-
function
|
|
1544
|
-
const o = e.word++, s =
|
|
1545
|
-
return n ? /* @__PURE__ */ b.jsx("span", { "data-motion-word": !0, style:
|
|
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);
|
|
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);
|
|
1546
1527
|
}
|
|
1547
|
-
function
|
|
1548
|
-
return e ? { ...
|
|
1528
|
+
function $r(r, e) {
|
|
1529
|
+
return e ? { ...pe(r), whiteSpace: "nowrap" } : { whiteSpace: "nowrap" };
|
|
1549
1530
|
}
|
|
1550
|
-
function
|
|
1531
|
+
function Fr(r, e, t) {
|
|
1551
1532
|
if (!r)
|
|
1552
1533
|
return [];
|
|
1553
|
-
const n =
|
|
1534
|
+
const n = K(e, S.Letter), o = K(e, S.Emoji);
|
|
1554
1535
|
if (!n) {
|
|
1555
1536
|
if (!o)
|
|
1556
1537
|
return [r];
|
|
1557
|
-
const
|
|
1558
|
-
if (
|
|
1538
|
+
const a = je(r);
|
|
1539
|
+
if (a.length === 0)
|
|
1559
1540
|
return [r];
|
|
1560
|
-
const { nodes: u } =
|
|
1541
|
+
const { nodes: u } = it(a, t);
|
|
1561
1542
|
return u;
|
|
1562
1543
|
}
|
|
1563
|
-
const s = [], i =
|
|
1564
|
-
for (const
|
|
1565
|
-
const u = t.letter++, d = `motion-letter-${u}`, l =
|
|
1566
|
-
if (
|
|
1544
|
+
const s = [], i = je(r);
|
|
1545
|
+
for (const a of i) {
|
|
1546
|
+
const u = t.letter++, d = `motion-letter-${u}`, l = pe(u);
|
|
1547
|
+
if (a === `
|
|
1567
1548
|
`) {
|
|
1568
1549
|
s.push(
|
|
1569
1550
|
/* @__PURE__ */ b.jsx("span", { "data-motion-letter": !0, style: l, children: /* @__PURE__ */ b.jsx("br", {}) }, d)
|
|
1570
1551
|
);
|
|
1571
1552
|
continue;
|
|
1572
1553
|
}
|
|
1573
|
-
const h = o &&
|
|
1554
|
+
const h = o && st(a) ? { "data-motion-emoji": !0 } : void 0, k = a === " " ? " " : a;
|
|
1574
1555
|
s.push(
|
|
1575
|
-
/* @__PURE__ */ b.jsx("span", { "data-motion-letter": !0, style: l, ...h, children:
|
|
1556
|
+
/* @__PURE__ */ b.jsx("span", { "data-motion-letter": !0, style: l, ...h, children: k }, d)
|
|
1576
1557
|
);
|
|
1577
1558
|
}
|
|
1578
1559
|
return s;
|
|
1579
1560
|
}
|
|
1580
|
-
function
|
|
1561
|
+
function je(r) {
|
|
1581
1562
|
if (!r)
|
|
1582
1563
|
return [];
|
|
1583
|
-
const e =
|
|
1584
|
-
return e ? Array.from(e.segment(r), (t) => t.segment) :
|
|
1564
|
+
const e = Br();
|
|
1565
|
+
return e ? Array.from(e.segment(r), (t) => t.segment) : Vr(r);
|
|
1585
1566
|
}
|
|
1586
|
-
let
|
|
1587
|
-
function
|
|
1588
|
-
return
|
|
1567
|
+
let oe;
|
|
1568
|
+
function Br() {
|
|
1569
|
+
return oe !== void 0 || (typeof Intl < "u" && typeof Intl.Segmenter == "function" ? oe = new Intl.Segmenter(void 0, { granularity: "grapheme" }) : oe = null), oe;
|
|
1589
1570
|
}
|
|
1590
|
-
function
|
|
1571
|
+
function Vr(r) {
|
|
1591
1572
|
const e = [], t = Array.from(r);
|
|
1592
1573
|
let n = "";
|
|
1593
1574
|
for (let o = 0; o < t.length; o++) {
|
|
1594
1575
|
const s = t[o], i = t[o + 1];
|
|
1595
|
-
n += s, !(i &&
|
|
1576
|
+
n += s, !(i && zr(s, i)) && (e.push(n), n = "");
|
|
1596
1577
|
}
|
|
1597
1578
|
return n && e.push(n), e;
|
|
1598
1579
|
}
|
|
1599
|
-
function
|
|
1600
|
-
return e ? !!(
|
|
1580
|
+
function zr(r, e) {
|
|
1581
|
+
return e ? !!(Xe(r) || Xe(e) || Wr(e) || Dr(e) || qr(e) || Ze(r) && Ze(e)) : !1;
|
|
1601
1582
|
}
|
|
1602
|
-
function
|
|
1583
|
+
function Xe(r) {
|
|
1603
1584
|
return r.codePointAt(0) === 8205;
|
|
1604
1585
|
}
|
|
1605
|
-
function
|
|
1586
|
+
function Dr(r) {
|
|
1606
1587
|
const e = r.codePointAt(0);
|
|
1607
1588
|
return e === void 0 ? !1 : e >= 65024 && e <= 65039 || e >= 917760 && e <= 917999;
|
|
1608
1589
|
}
|
|
1609
|
-
function
|
|
1590
|
+
function qr(r) {
|
|
1610
1591
|
const e = r.codePointAt(0);
|
|
1611
1592
|
return e === void 0 ? !1 : e >= 127995 && e <= 127999;
|
|
1612
1593
|
}
|
|
1613
|
-
function
|
|
1594
|
+
function Ze(r) {
|
|
1614
1595
|
const e = r.codePointAt(0);
|
|
1615
1596
|
return e === void 0 ? !1 : e >= 127462 && e <= 127487;
|
|
1616
1597
|
}
|
|
1617
|
-
let
|
|
1618
|
-
function
|
|
1619
|
-
return r ? (
|
|
1598
|
+
let ve;
|
|
1599
|
+
function Wr(r) {
|
|
1600
|
+
return r ? (ve || (ve = Yr()), ve(r)) : !1;
|
|
1620
1601
|
}
|
|
1621
|
-
function
|
|
1602
|
+
function Yr() {
|
|
1622
1603
|
try {
|
|
1623
1604
|
const r = new RegExp("\\p{Mark}", "u");
|
|
1624
1605
|
return (e) => r.test(e);
|
|
@@ -1629,19 +1610,19 @@ function Rr() {
|
|
|
1629
1610
|
};
|
|
1630
1611
|
}
|
|
1631
1612
|
}
|
|
1632
|
-
let
|
|
1633
|
-
function
|
|
1634
|
-
return r ? (
|
|
1613
|
+
let we;
|
|
1614
|
+
function st(r) {
|
|
1615
|
+
return r ? (we || (we = Jr()), we(r)) : !1;
|
|
1635
1616
|
}
|
|
1636
|
-
function
|
|
1617
|
+
function Jr() {
|
|
1637
1618
|
try {
|
|
1638
1619
|
const r = new RegExp("\\p{Extended_Pictographic}", "u");
|
|
1639
1620
|
return (e) => r.test(e);
|
|
1640
1621
|
} catch {
|
|
1641
|
-
return
|
|
1622
|
+
return Kr;
|
|
1642
1623
|
}
|
|
1643
1624
|
}
|
|
1644
|
-
function
|
|
1625
|
+
function Kr(r) {
|
|
1645
1626
|
if (!r)
|
|
1646
1627
|
return !1;
|
|
1647
1628
|
for (const e of Array.from(r)) {
|
|
@@ -1651,7 +1632,7 @@ function Nr(r) {
|
|
|
1651
1632
|
}
|
|
1652
1633
|
return !1;
|
|
1653
1634
|
}
|
|
1654
|
-
function
|
|
1635
|
+
function Gr(r) {
|
|
1655
1636
|
const e = [];
|
|
1656
1637
|
let t = "", n = 0;
|
|
1657
1638
|
for (let o = 0; o < r.length; o++) {
|
|
@@ -1665,7 +1646,7 @@ function Tr(r) {
|
|
|
1665
1646
|
}
|
|
1666
1647
|
return (n > 0 || t.length > 0) && e.push({ text: t, breaks: n }), e;
|
|
1667
1648
|
}
|
|
1668
|
-
function
|
|
1649
|
+
function Hr(r) {
|
|
1669
1650
|
if (r.length === 0)
|
|
1670
1651
|
return [];
|
|
1671
1652
|
const e = [];
|
|
@@ -1674,10 +1655,10 @@ function Cr(r) {
|
|
|
1674
1655
|
t.push(n), n.breaks >= 2 && (e.push(t), t = []);
|
|
1675
1656
|
return t.length > 0 && e.push(t), e;
|
|
1676
1657
|
}
|
|
1677
|
-
function
|
|
1658
|
+
function K(r, e) {
|
|
1678
1659
|
return (r & e) === e;
|
|
1679
1660
|
}
|
|
1680
|
-
function
|
|
1661
|
+
function pe(r) {
|
|
1681
1662
|
return {
|
|
1682
1663
|
"--tw-motion-seq-index": r.toString(),
|
|
1683
1664
|
backgroundColor: "inherit",
|
|
@@ -1694,52 +1675,52 @@ function J(r) {
|
|
|
1694
1675
|
WebkitTextFillColor: "inherit"
|
|
1695
1676
|
};
|
|
1696
1677
|
}
|
|
1697
|
-
function
|
|
1678
|
+
function Qe(r) {
|
|
1698
1679
|
if (!r)
|
|
1699
1680
|
return r;
|
|
1700
|
-
const e =
|
|
1681
|
+
const e = je(r);
|
|
1701
1682
|
if (e.length === 0)
|
|
1702
1683
|
return r;
|
|
1703
|
-
const { nodes: t, sawEmoji: n } =
|
|
1684
|
+
const { nodes: t, sawEmoji: n } = it(e);
|
|
1704
1685
|
return n ? t.length === 1 ? t[0] ?? r : t : r;
|
|
1705
1686
|
}
|
|
1706
|
-
function
|
|
1687
|
+
function it(r, e) {
|
|
1707
1688
|
const t = [];
|
|
1708
1689
|
let n = "", o = !1, s = e?.emoji ?? 0;
|
|
1709
1690
|
const i = () => {
|
|
1710
1691
|
n && (t.push(n), n = "");
|
|
1711
1692
|
};
|
|
1712
|
-
for (const
|
|
1713
|
-
if (
|
|
1693
|
+
for (const a of r) {
|
|
1694
|
+
if (st(a)) {
|
|
1714
1695
|
o = !0, i();
|
|
1715
1696
|
const d = `motion-emoji-${e ? e.emoji++ : s++}`;
|
|
1716
1697
|
t.push(
|
|
1717
|
-
/* @__PURE__ */ b.jsx("span", { "data-motion-emoji": !0, children:
|
|
1698
|
+
/* @__PURE__ */ b.jsx("span", { "data-motion-emoji": !0, children: a }, d)
|
|
1718
1699
|
);
|
|
1719
1700
|
continue;
|
|
1720
1701
|
}
|
|
1721
|
-
n +=
|
|
1702
|
+
n += a;
|
|
1722
1703
|
}
|
|
1723
1704
|
return i(), o ? { nodes: t, sawEmoji: !0 } : { nodes: [r.join("")], sawEmoji: !1 };
|
|
1724
1705
|
}
|
|
1725
|
-
function
|
|
1706
|
+
function Xr(r) {
|
|
1726
1707
|
if (!r)
|
|
1727
|
-
return
|
|
1708
|
+
return S.None;
|
|
1728
1709
|
const e = r.trim();
|
|
1729
1710
|
if (!e)
|
|
1730
|
-
return
|
|
1731
|
-
const t =
|
|
1711
|
+
return S.None;
|
|
1712
|
+
const t = Ge.get(e);
|
|
1732
1713
|
if (typeof t == "number")
|
|
1733
1714
|
return t;
|
|
1734
1715
|
if (typeof document > "u")
|
|
1735
|
-
return
|
|
1716
|
+
return S.None;
|
|
1736
1717
|
const n = e.split(/\s+/).filter(Boolean);
|
|
1737
1718
|
if (n.length === 0)
|
|
1738
|
-
return
|
|
1739
|
-
const s = n.map((u) => `.${
|
|
1740
|
-
(u) => new RegExp(`(^|[^a-zA-Z0-9_-])${
|
|
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_-])`)
|
|
1741
1722
|
);
|
|
1742
|
-
let i =
|
|
1723
|
+
let i = S.None, a = !1;
|
|
1743
1724
|
for (const u of Array.from(document.styleSheets)) {
|
|
1744
1725
|
let d;
|
|
1745
1726
|
try {
|
|
@@ -1747,31 +1728,31 @@ function jr(r) {
|
|
|
1747
1728
|
} catch {
|
|
1748
1729
|
continue;
|
|
1749
1730
|
}
|
|
1750
|
-
const l =
|
|
1751
|
-
if (l.mask && (i |= l.mask, i ===
|
|
1731
|
+
const l = at(d, s);
|
|
1732
|
+
if (l.mask && (i |= l.mask, i === Te))
|
|
1752
1733
|
break;
|
|
1753
|
-
|
|
1734
|
+
a ||= l.sawStyleRule;
|
|
1754
1735
|
}
|
|
1755
|
-
return (i !==
|
|
1736
|
+
return (i !== S.None || a) && Ge.set(e, i), i;
|
|
1756
1737
|
}
|
|
1757
|
-
function
|
|
1738
|
+
function at(r, e) {
|
|
1758
1739
|
if (!r)
|
|
1759
|
-
return { mask:
|
|
1760
|
-
let t =
|
|
1740
|
+
return { mask: S.None, sawStyleRule: !1 };
|
|
1741
|
+
let t = S.None, n = !1;
|
|
1761
1742
|
for (let o = 0; o < r.length; o++) {
|
|
1762
1743
|
const s = r[o];
|
|
1763
1744
|
if (s) {
|
|
1764
1745
|
if (s.type === CSSRule.STYLE_RULE) {
|
|
1765
|
-
const
|
|
1766
|
-
if (!
|
|
1746
|
+
const a = s.selectorText ?? "";
|
|
1747
|
+
if (!a || !e.some((d) => d.test(a))) continue;
|
|
1767
1748
|
n = !0;
|
|
1768
|
-
for (const d of
|
|
1769
|
-
d.hints.some((l) =>
|
|
1770
|
-
if (t ===
|
|
1749
|
+
for (const d of Pr)
|
|
1750
|
+
d.hints.some((l) => a.includes(l)) && (t |= d.flag);
|
|
1751
|
+
if (t === Te)
|
|
1771
1752
|
return { mask: t, sawStyleRule: !0 };
|
|
1772
1753
|
} else if ("cssRules" in s) {
|
|
1773
|
-
const i =
|
|
1774
|
-
if (i.mask && (t |= i.mask, t ===
|
|
1754
|
+
const i = at(s.cssRules, e);
|
|
1755
|
+
if (i.mask && (t |= i.mask, t === Te))
|
|
1775
1756
|
return { mask: t, sawStyleRule: !0 };
|
|
1776
1757
|
n ||= i.sawStyleRule;
|
|
1777
1758
|
}
|
|
@@ -1779,42 +1760,469 @@ function We(r, e) {
|
|
|
1779
1760
|
}
|
|
1780
1761
|
return { mask: t, sawStyleRule: n };
|
|
1781
1762
|
}
|
|
1782
|
-
function
|
|
1763
|
+
function Zr(r) {
|
|
1783
1764
|
return typeof CSS < "u" && typeof CSS.escape == "function" ? CSS.escape(r) : r.replace(/[^a-zA-Z0-9_-]/g, (e) => `\\${e}`);
|
|
1784
1765
|
}
|
|
1785
|
-
function
|
|
1766
|
+
function Qr(r) {
|
|
1786
1767
|
return r.replace(/[.*+?^${}()|[\]\\]/g, (e) => `\\${e}`);
|
|
1787
1768
|
}
|
|
1769
|
+
const _e = "ikon_auth_session", en = 7 * 24 * 60 * 60 * 1e3;
|
|
1770
|
+
function ct(r) {
|
|
1771
|
+
try {
|
|
1772
|
+
localStorage.setItem(_e, JSON.stringify(r));
|
|
1773
|
+
} catch {
|
|
1774
|
+
console.warn("Failed to save auth session to localStorage");
|
|
1775
|
+
}
|
|
1776
|
+
}
|
|
1777
|
+
function ut() {
|
|
1778
|
+
try {
|
|
1779
|
+
const r = localStorage.getItem(_e);
|
|
1780
|
+
if (!r) return null;
|
|
1781
|
+
const e = JSON.parse(r);
|
|
1782
|
+
return Date.now() - e.authenticatedAt > en ? (lt(), null) : e;
|
|
1783
|
+
} catch {
|
|
1784
|
+
return console.warn("Failed to load auth session from localStorage"), null;
|
|
1785
|
+
}
|
|
1786
|
+
}
|
|
1787
|
+
function lt() {
|
|
1788
|
+
try {
|
|
1789
|
+
localStorage.removeItem(_e);
|
|
1790
|
+
} catch {
|
|
1791
|
+
console.warn("Failed to clear auth session from localStorage");
|
|
1792
|
+
}
|
|
1793
|
+
}
|
|
1794
|
+
function Ee(r) {
|
|
1795
|
+
return {
|
|
1796
|
+
id: "",
|
|
1797
|
+
provider: r.provider,
|
|
1798
|
+
token: r.token,
|
|
1799
|
+
authenticatedAt: r.authenticatedAt
|
|
1800
|
+
};
|
|
1801
|
+
}
|
|
1802
|
+
async function dt(r, e) {
|
|
1803
|
+
const t = de(), n = await fetch(`${e}/anonymous`, {
|
|
1804
|
+
method: "POST",
|
|
1805
|
+
headers: { "Content-Type": "application/json" },
|
|
1806
|
+
body: JSON.stringify({ deviceId: t, space: r })
|
|
1807
|
+
});
|
|
1808
|
+
if (!n.ok) {
|
|
1809
|
+
const i = await n.text().catch(() => "Unknown error");
|
|
1810
|
+
throw new Error(`Anonymous auth failed: ${n.status} ${i}`);
|
|
1811
|
+
}
|
|
1812
|
+
const { token: o } = await n.json(), s = {
|
|
1813
|
+
token: o,
|
|
1814
|
+
provider: "anonymous",
|
|
1815
|
+
authenticatedAt: Date.now()
|
|
1816
|
+
};
|
|
1817
|
+
return ct(s), s;
|
|
1818
|
+
}
|
|
1819
|
+
async function bn(r) {
|
|
1820
|
+
const { email: e, spaceId: t, authUrl: n, returnUrl: o = window.location.origin + window.location.pathname } = r, s = await fetch(`${n}/email/send`, {
|
|
1821
|
+
method: "POST",
|
|
1822
|
+
headers: { "Content-Type": "application/json" },
|
|
1823
|
+
body: JSON.stringify({
|
|
1824
|
+
email: e.trim(),
|
|
1825
|
+
space: t,
|
|
1826
|
+
return: o
|
|
1827
|
+
})
|
|
1828
|
+
});
|
|
1829
|
+
if (!s.ok) {
|
|
1830
|
+
const i = await s.text().catch(() => "Failed to send email");
|
|
1831
|
+
throw new Error(i);
|
|
1832
|
+
}
|
|
1833
|
+
}
|
|
1834
|
+
function tn() {
|
|
1835
|
+
const r = new URLSearchParams(window.location.search), e = r.get("ikon_token"), t = r.get("ikon_provider");
|
|
1836
|
+
return e && t ? { token: e, provider: t } : null;
|
|
1837
|
+
}
|
|
1838
|
+
function rn() {
|
|
1839
|
+
const e = new URLSearchParams(window.location.search).get("error");
|
|
1840
|
+
return e ? decodeURIComponent(e) : null;
|
|
1841
|
+
}
|
|
1842
|
+
function et() {
|
|
1843
|
+
window.history.replaceState({}, "", window.location.pathname);
|
|
1844
|
+
}
|
|
1845
|
+
function nn(r, e, t, n) {
|
|
1846
|
+
const o = n ?? window.location.origin + window.location.pathname + window.location.search;
|
|
1847
|
+
return `${t}/oauth/${r}?space=${encodeURIComponent(e)}&return=${encodeURIComponent(o)}`;
|
|
1848
|
+
}
|
|
1849
|
+
const Me = tt(null);
|
|
1850
|
+
function vn({ children: r, config: e }) {
|
|
1851
|
+
const [t, n] = W({
|
|
1852
|
+
isAuthenticated: !1,
|
|
1853
|
+
isLoading: !0,
|
|
1854
|
+
user: null,
|
|
1855
|
+
error: null
|
|
1856
|
+
});
|
|
1857
|
+
$(() => {
|
|
1858
|
+
(() => {
|
|
1859
|
+
const d = rn();
|
|
1860
|
+
if (d) {
|
|
1861
|
+
et(), n({
|
|
1862
|
+
isAuthenticated: !1,
|
|
1863
|
+
isLoading: !1,
|
|
1864
|
+
user: null,
|
|
1865
|
+
error: d
|
|
1866
|
+
});
|
|
1867
|
+
return;
|
|
1868
|
+
}
|
|
1869
|
+
const l = tn();
|
|
1870
|
+
if (l) {
|
|
1871
|
+
const h = {
|
|
1872
|
+
token: l.token,
|
|
1873
|
+
provider: l.provider,
|
|
1874
|
+
authenticatedAt: Date.now()
|
|
1875
|
+
};
|
|
1876
|
+
ct(h), et(), n({
|
|
1877
|
+
isAuthenticated: !0,
|
|
1878
|
+
isLoading: !1,
|
|
1879
|
+
user: Ee(h),
|
|
1880
|
+
error: null
|
|
1881
|
+
});
|
|
1882
|
+
return;
|
|
1883
|
+
}
|
|
1884
|
+
const f = ut();
|
|
1885
|
+
if (f) {
|
|
1886
|
+
n({
|
|
1887
|
+
isAuthenticated: !0,
|
|
1888
|
+
isLoading: !1,
|
|
1889
|
+
user: Ee(f),
|
|
1890
|
+
error: null
|
|
1891
|
+
});
|
|
1892
|
+
return;
|
|
1893
|
+
}
|
|
1894
|
+
n({
|
|
1895
|
+
isAuthenticated: !1,
|
|
1896
|
+
isLoading: !1,
|
|
1897
|
+
user: null,
|
|
1898
|
+
error: null
|
|
1899
|
+
});
|
|
1900
|
+
})();
|
|
1901
|
+
}, []);
|
|
1902
|
+
const o = V(
|
|
1903
|
+
async (u) => {
|
|
1904
|
+
if (!e.spaceId) {
|
|
1905
|
+
n((f) => ({
|
|
1906
|
+
...f,
|
|
1907
|
+
error: "Space ID is not configured"
|
|
1908
|
+
}));
|
|
1909
|
+
return;
|
|
1910
|
+
}
|
|
1911
|
+
if (u === "guest") {
|
|
1912
|
+
n((f) => ({ ...f, isLoading: !0 }));
|
|
1913
|
+
try {
|
|
1914
|
+
const f = e.authUrl ?? Re(), h = await dt(e.spaceId, f);
|
|
1915
|
+
n({
|
|
1916
|
+
isAuthenticated: !0,
|
|
1917
|
+
isLoading: !1,
|
|
1918
|
+
user: Ee(h),
|
|
1919
|
+
error: null
|
|
1920
|
+
});
|
|
1921
|
+
} catch (f) {
|
|
1922
|
+
n((h) => ({
|
|
1923
|
+
...h,
|
|
1924
|
+
isLoading: !1,
|
|
1925
|
+
error: f instanceof Error ? f.message : "Guest login failed"
|
|
1926
|
+
}));
|
|
1927
|
+
}
|
|
1928
|
+
return;
|
|
1929
|
+
}
|
|
1930
|
+
const d = e.authUrl ?? Re(), l = nn(u, e.spaceId, d);
|
|
1931
|
+
window.location.href = l;
|
|
1932
|
+
},
|
|
1933
|
+
[e.authUrl, e.spaceId]
|
|
1934
|
+
), s = V(() => {
|
|
1935
|
+
lt(), n({
|
|
1936
|
+
isAuthenticated: !1,
|
|
1937
|
+
isLoading: !1,
|
|
1938
|
+
user: null,
|
|
1939
|
+
error: null
|
|
1940
|
+
});
|
|
1941
|
+
}, []), i = V(() => t.user?.token ?? null, [t.user]), a = M(
|
|
1942
|
+
() => ({
|
|
1943
|
+
state: t,
|
|
1944
|
+
login: o,
|
|
1945
|
+
logout: s,
|
|
1946
|
+
getToken: i
|
|
1947
|
+
}),
|
|
1948
|
+
[t, o, s, i]
|
|
1949
|
+
);
|
|
1950
|
+
return /* @__PURE__ */ b.jsx(Me, { value: a, children: r });
|
|
1951
|
+
}
|
|
1952
|
+
function on() {
|
|
1953
|
+
const r = Pe(Me);
|
|
1954
|
+
if (!r)
|
|
1955
|
+
throw new Error("useAuth must be used within an AuthProvider");
|
|
1956
|
+
return r;
|
|
1957
|
+
}
|
|
1958
|
+
function wn() {
|
|
1959
|
+
return Pe(Me);
|
|
1960
|
+
}
|
|
1961
|
+
function En(r) {
|
|
1962
|
+
const { config: e, guestUrlParam: t } = r, { state: n, login: o } = on(), s = R(!1);
|
|
1963
|
+
return $(() => {
|
|
1964
|
+
if (!t || n.isAuthenticated || n.isLoading || s.current || !e.methods.includes("guest"))
|
|
1965
|
+
return;
|
|
1966
|
+
const i = new URLSearchParams(window.location.search), a = i.get(t);
|
|
1967
|
+
if (a === "true" || a === "1" || a === "") {
|
|
1968
|
+
i.delete(t);
|
|
1969
|
+
const u = i.toString(), d = window.location.pathname + (u ? `?${u}` : "");
|
|
1970
|
+
window.history.replaceState({}, "", d), s.current = !0, o("guest");
|
|
1971
|
+
}
|
|
1972
|
+
}, [t, n.isAuthenticated, n.isLoading, e.methods, o]), {
|
|
1973
|
+
shouldRenderChildren: n.isAuthenticated,
|
|
1974
|
+
isCheckingAuth: n.isLoading,
|
|
1975
|
+
isAuthenticated: n.isAuthenticated,
|
|
1976
|
+
error: n.error
|
|
1977
|
+
};
|
|
1978
|
+
}
|
|
1979
|
+
function kn({
|
|
1980
|
+
connectionState: r,
|
|
1981
|
+
error: e,
|
|
1982
|
+
isReady: t,
|
|
1983
|
+
stores: n,
|
|
1984
|
+
registry: o,
|
|
1985
|
+
client: s,
|
|
1986
|
+
onAction: i,
|
|
1987
|
+
renderIdle: a,
|
|
1988
|
+
renderConnecting: u,
|
|
1989
|
+
renderConnectingSlow: d,
|
|
1990
|
+
renderConnected: l,
|
|
1991
|
+
renderOffline: f,
|
|
1992
|
+
renderError: h
|
|
1993
|
+
}) {
|
|
1994
|
+
switch (r) {
|
|
1995
|
+
case "idle":
|
|
1996
|
+
return a();
|
|
1997
|
+
case "connecting":
|
|
1998
|
+
return u();
|
|
1999
|
+
case "connectingSlow":
|
|
2000
|
+
return d();
|
|
2001
|
+
case "connected":
|
|
2002
|
+
case "reconnecting":
|
|
2003
|
+
return !t || !n || !o ? null : l({
|
|
2004
|
+
stores: n,
|
|
2005
|
+
registry: o,
|
|
2006
|
+
client: s,
|
|
2007
|
+
onAction: i,
|
|
2008
|
+
isReconnecting: r === "reconnecting"
|
|
2009
|
+
});
|
|
2010
|
+
case "offline":
|
|
2011
|
+
return f();
|
|
2012
|
+
case "offlineError":
|
|
2013
|
+
return h(e ?? s?.lastError?.message ?? null);
|
|
2014
|
+
default:
|
|
2015
|
+
return null;
|
|
2016
|
+
}
|
|
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(() => {
|
|
2023
|
+
try {
|
|
2024
|
+
return St();
|
|
2025
|
+
} catch {
|
|
2026
|
+
return { parameters: {} };
|
|
2027
|
+
}
|
|
2028
|
+
}, []), B = M(() => e?.enabled ? ut() : null, [e?.enabled]), q = t?.enabled ?? !1, c = t?.host ?? "localhost", m = t?.httpsPort ?? 8443;
|
|
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);
|
|
2032
|
+
}).catch((I) => {
|
|
2033
|
+
ke.error("Anonymous auth failed:", I), ce(I instanceof Error ? I.message : "Anonymous auth failed");
|
|
2034
|
+
}).finally(() => {
|
|
2035
|
+
Q(!1);
|
|
2036
|
+
}));
|
|
2037
|
+
}, [q, e, D, Z]);
|
|
2038
|
+
const w = M(() => {
|
|
2039
|
+
if (q) {
|
|
2040
|
+
const C = B?.token ? bt(B.token) ?? de() : de();
|
|
2041
|
+
return {
|
|
2042
|
+
local: {
|
|
2043
|
+
host: c,
|
|
2044
|
+
httpsPort: m,
|
|
2045
|
+
userId: C
|
|
2046
|
+
}
|
|
2047
|
+
};
|
|
2048
|
+
}
|
|
2049
|
+
return B?.token && e?.spaceId ? {
|
|
2050
|
+
sessionToken: {
|
|
2051
|
+
token: B.token,
|
|
2052
|
+
spaceId: e.spaceId,
|
|
2053
|
+
backendType: Ue(),
|
|
2054
|
+
sessionId: P.sessionId,
|
|
2055
|
+
channelKey: P.channelKey,
|
|
2056
|
+
parameters: P.parameters
|
|
2057
|
+
}
|
|
2058
|
+
} : D && e?.spaceId ? {
|
|
2059
|
+
sessionToken: {
|
|
2060
|
+
token: D,
|
|
2061
|
+
spaceId: e.spaceId,
|
|
2062
|
+
backendType: Ue(),
|
|
2063
|
+
sessionId: P.sessionId,
|
|
2064
|
+
channelKey: P.channelKey,
|
|
2065
|
+
parameters: P.parameters
|
|
2066
|
+
}
|
|
2067
|
+
} : Le() ? null : {
|
|
2068
|
+
local: {
|
|
2069
|
+
host: c,
|
|
2070
|
+
httpsPort: m,
|
|
2071
|
+
userId: de()
|
|
2072
|
+
}
|
|
2073
|
+
};
|
|
2074
|
+
}, [q, c, m, B?.token, e?.spaceId, D, P.sessionId, P.channelKey, P.parameters]);
|
|
2075
|
+
dr(Y);
|
|
2076
|
+
const N = hr(Y);
|
|
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);
|
|
2084
|
+
});
|
|
2085
|
+
}
|
|
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);
|
|
2095
|
+
},
|
|
2096
|
+
onError: (y) => {
|
|
2097
|
+
ce(y.message), T.current?.(y);
|
|
2098
|
+
},
|
|
2099
|
+
onJoined: () => {
|
|
2100
|
+
const y = C.globalState?.SessionId;
|
|
2101
|
+
z.current && y && window.history.replaceState(null, "", `/s/${y}${window.location.search}`), U.current?.(y);
|
|
2102
|
+
}
|
|
2103
|
+
});
|
|
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);
|
|
2108
|
+
}), () => {
|
|
2109
|
+
C.disconnect(), h.current = null, I.dispose(), k.current = null;
|
|
2110
|
+
};
|
|
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";
|
|
2116
|
+
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: _
|
|
2127
|
+
};
|
|
2128
|
+
}
|
|
2129
|
+
function An(r) {
|
|
2130
|
+
const e = R(!1);
|
|
2131
|
+
return V(() => {
|
|
2132
|
+
if (e.current) return;
|
|
2133
|
+
e.current = !0;
|
|
2134
|
+
const t = document.createElement("link");
|
|
2135
|
+
t.rel = "stylesheet", t.href = r, document.head.appendChild(t);
|
|
2136
|
+
}, [r]);
|
|
2137
|
+
}
|
|
2138
|
+
const ft = tt(null);
|
|
2139
|
+
function sn(r, e) {
|
|
2140
|
+
return e ? r.replace(/\{(\w+)\}/g, (t, n) => e[n] ?? `{${n}}`) : r;
|
|
2141
|
+
}
|
|
2142
|
+
function an(r, e) {
|
|
2143
|
+
const n = new URLSearchParams(window.location.search).get("lang");
|
|
2144
|
+
if (n && r.includes(n))
|
|
2145
|
+
return n;
|
|
2146
|
+
const o = navigator.language.split("-")[0];
|
|
2147
|
+
return r.includes(o) ? o : e && r.includes(e) ? e : "en";
|
|
2148
|
+
}
|
|
2149
|
+
function cn(r, e, t) {
|
|
2150
|
+
return e ? an(r, t) : t && r.includes(t) ? t : "en";
|
|
2151
|
+
}
|
|
2152
|
+
function Nn({
|
|
2153
|
+
children: r,
|
|
2154
|
+
translations: e,
|
|
2155
|
+
defaultLanguage: t,
|
|
2156
|
+
detectLanguage: n = !1
|
|
2157
|
+
}) {
|
|
2158
|
+
const o = Object.keys(e), s = cn(o, n, t), i = e[s] ?? e.en, a = M(
|
|
2159
|
+
() => ({
|
|
2160
|
+
t: (u, d) => {
|
|
2161
|
+
const l = i[u];
|
|
2162
|
+
return sn(l, d);
|
|
2163
|
+
},
|
|
2164
|
+
locale: s,
|
|
2165
|
+
translations: i
|
|
2166
|
+
}),
|
|
2167
|
+
[i, s]
|
|
2168
|
+
);
|
|
2169
|
+
return /* @__PURE__ */ b.jsx(ft, { value: a, children: r });
|
|
2170
|
+
}
|
|
2171
|
+
function Cn() {
|
|
2172
|
+
const r = Pe(ft);
|
|
2173
|
+
if (!r)
|
|
2174
|
+
throw new Error("useI18n must be used within an I18nProvider");
|
|
2175
|
+
return r;
|
|
2176
|
+
}
|
|
1788
2177
|
export {
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
|
|
1796
|
-
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
|
|
1800
|
-
|
|
1801
|
-
|
|
1802
|
-
|
|
1803
|
-
|
|
1804
|
-
|
|
1805
|
-
|
|
1806
|
-
|
|
1807
|
-
|
|
1808
|
-
|
|
1809
|
-
|
|
1810
|
-
|
|
1811
|
-
|
|
1812
|
-
|
|
1813
|
-
|
|
1814
|
-
|
|
1815
|
-
|
|
1816
|
-
|
|
1817
|
-
|
|
1818
|
-
|
|
1819
|
-
|
|
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,
|
|
2226
|
+
F as useUiNode,
|
|
2227
|
+
hn as useUiStore
|
|
1820
2228
|
};
|