@ikonai/sdk-react-ui 1.0.66 → 1.0.68
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/use-ikon-app.d.ts +19 -0
- package/ikon-ui.d.ts +6 -1
- package/index.js +1102 -1085
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { IkonUiCore as
|
|
2
|
-
import { UiStreamStore as
|
|
3
|
-
import
|
|
4
|
-
import { createLogger as
|
|
5
|
-
import { randomUuid as
|
|
6
|
-
var
|
|
1
|
+
import { IkonUiCore as Rn, UiStreamStore as An, LiveSnapshotCache as Bt, prefetchBootSnapshot as Tn } from "@ikonai/sdk-ui";
|
|
2
|
+
import { UiStreamStore as ui } from "@ikonai/sdk-ui";
|
|
3
|
+
import kn, { useSyncExternalStore as at, useMemo as W, memo as Y, useRef as E, useCallback as D, Fragment as Cn, useEffect as C, useState as N, use as ct, createContext as Ft, useReducer as In } from "react";
|
|
4
|
+
import { createLogger as re, isInspectModeEnabled as _n, getOrCreateDeviceId as On, getSameOriginAuthUrl as Nn, abortSignalTimeout as Vt, deriveAuthUrl as ve, getDebugOverlayParam as xn, subscribeToLogEvents as Wt, LogLevel as Qe, parseUrlParams as Pn, clearSessionParamsFromUrl as Ln, isCloudEnvironment as gt, extractUserIdFromToken as yt, deriveBackendType as bt, IkonClient as Un, AccessDeniedError as Mn, ServerFullError as jn, AuthenticationError as Dn, isDebugModeEnabled as Kt, getLangParam as $n } from "@ikonai/sdk";
|
|
5
|
+
import { randomUuid as fi } from "@ikonai/sdk";
|
|
6
|
+
var Ie = { exports: {} }, me = {};
|
|
7
7
|
/**
|
|
8
8
|
* @license React
|
|
9
9
|
* react-jsx-runtime.production.js
|
|
@@ -13,10 +13,10 @@ var Re = { exports: {} }, de = {};
|
|
|
13
13
|
* This source code is licensed under the MIT license found in the
|
|
14
14
|
* LICENSE file in the root directory of this source tree.
|
|
15
15
|
*/
|
|
16
|
-
var
|
|
17
|
-
function
|
|
18
|
-
if (
|
|
19
|
-
|
|
16
|
+
var St;
|
|
17
|
+
function Bn() {
|
|
18
|
+
if (St) return me;
|
|
19
|
+
St = 1;
|
|
20
20
|
var t = Symbol.for("react.transitional.element"), e = Symbol.for("react.fragment");
|
|
21
21
|
function n(r, o, s) {
|
|
22
22
|
var i = null;
|
|
@@ -33,9 +33,9 @@ function En() {
|
|
|
33
33
|
props: s
|
|
34
34
|
};
|
|
35
35
|
}
|
|
36
|
-
return
|
|
36
|
+
return me.Fragment = e, me.jsx = n, me.jsxs = n, me;
|
|
37
37
|
}
|
|
38
|
-
var
|
|
38
|
+
var ge = {};
|
|
39
39
|
/**
|
|
40
40
|
* @license React
|
|
41
41
|
* react-jsx-runtime.development.js
|
|
@@ -45,47 +45,47 @@ var fe = {};
|
|
|
45
45
|
* This source code is licensed under the MIT license found in the
|
|
46
46
|
* LICENSE file in the root directory of this source tree.
|
|
47
47
|
*/
|
|
48
|
-
var
|
|
49
|
-
function
|
|
50
|
-
return
|
|
48
|
+
var wt;
|
|
49
|
+
function Fn() {
|
|
50
|
+
return wt || (wt = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
51
51
|
function t(f) {
|
|
52
52
|
if (f == null) return null;
|
|
53
53
|
if (typeof f == "function")
|
|
54
|
-
return f.$$typeof ===
|
|
54
|
+
return f.$$typeof === L ? null : f.displayName || f.name || null;
|
|
55
55
|
if (typeof f == "string") return f;
|
|
56
56
|
switch (f) {
|
|
57
|
-
case
|
|
57
|
+
case p:
|
|
58
58
|
return "Fragment";
|
|
59
|
-
case w:
|
|
60
|
-
return "Profiler";
|
|
61
59
|
case b:
|
|
60
|
+
return "Profiler";
|
|
61
|
+
case S:
|
|
62
62
|
return "StrictMode";
|
|
63
|
-
case
|
|
63
|
+
case U:
|
|
64
64
|
return "Suspense";
|
|
65
|
-
case
|
|
65
|
+
case ee:
|
|
66
66
|
return "SuspenseList";
|
|
67
|
-
case
|
|
67
|
+
case _:
|
|
68
68
|
return "Activity";
|
|
69
69
|
}
|
|
70
70
|
if (typeof f == "object")
|
|
71
71
|
switch (typeof f.tag == "number" && console.error(
|
|
72
72
|
"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
|
|
73
73
|
), f.$$typeof) {
|
|
74
|
-
case
|
|
74
|
+
case g:
|
|
75
75
|
return "Portal";
|
|
76
|
-
case E:
|
|
77
|
-
return f.displayName || "Context";
|
|
78
76
|
case v:
|
|
77
|
+
return f.displayName || "Context";
|
|
78
|
+
case R:
|
|
79
79
|
return (f._context.displayName || "Context") + ".Consumer";
|
|
80
80
|
case T:
|
|
81
|
-
var
|
|
82
|
-
return f = f.displayName, f || (f =
|
|
83
|
-
case
|
|
84
|
-
return
|
|
85
|
-
case
|
|
86
|
-
|
|
81
|
+
var A = f.render;
|
|
82
|
+
return f = f.displayName, f || (f = A.displayName || A.name || "", f = f !== "" ? "ForwardRef(" + f + ")" : "ForwardRef"), f;
|
|
83
|
+
case te:
|
|
84
|
+
return A = f.displayName || null, A !== null ? A : t(f.type) || "Memo";
|
|
85
|
+
case z:
|
|
86
|
+
A = f._payload, f = f._init;
|
|
87
87
|
try {
|
|
88
|
-
return t(f(
|
|
88
|
+
return t(f(A));
|
|
89
89
|
} catch {
|
|
90
90
|
}
|
|
91
91
|
}
|
|
@@ -97,72 +97,72 @@ function vn() {
|
|
|
97
97
|
function n(f) {
|
|
98
98
|
try {
|
|
99
99
|
e(f);
|
|
100
|
-
var
|
|
100
|
+
var A = !1;
|
|
101
101
|
} catch {
|
|
102
|
-
|
|
102
|
+
A = !0;
|
|
103
103
|
}
|
|
104
|
-
if (
|
|
105
|
-
|
|
106
|
-
var
|
|
107
|
-
return
|
|
108
|
-
|
|
104
|
+
if (A) {
|
|
105
|
+
A = console;
|
|
106
|
+
var O = A.error, x = typeof Symbol == "function" && Symbol.toStringTag && f[Symbol.toStringTag] || f.constructor.name || "Object";
|
|
107
|
+
return O.call(
|
|
108
|
+
A,
|
|
109
109
|
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
|
110
|
-
|
|
110
|
+
x
|
|
111
111
|
), e(f);
|
|
112
112
|
}
|
|
113
113
|
}
|
|
114
114
|
function r(f) {
|
|
115
|
-
if (f ===
|
|
116
|
-
if (typeof f == "object" && f !== null && f.$$typeof ===
|
|
115
|
+
if (f === p) return "<>";
|
|
116
|
+
if (typeof f == "object" && f !== null && f.$$typeof === z)
|
|
117
117
|
return "<...>";
|
|
118
118
|
try {
|
|
119
|
-
var
|
|
120
|
-
return
|
|
119
|
+
var A = t(f);
|
|
120
|
+
return A ? "<" + A + ">" : "<...>";
|
|
121
121
|
} catch {
|
|
122
122
|
return "<...>";
|
|
123
123
|
}
|
|
124
124
|
}
|
|
125
125
|
function o() {
|
|
126
|
-
var f =
|
|
126
|
+
var f = M.A;
|
|
127
127
|
return f === null ? null : f.getOwner();
|
|
128
128
|
}
|
|
129
129
|
function s() {
|
|
130
130
|
return Error("react-stack-top-frame");
|
|
131
131
|
}
|
|
132
132
|
function i(f) {
|
|
133
|
-
if (
|
|
134
|
-
var
|
|
135
|
-
if (
|
|
133
|
+
if (B.call(f, "key")) {
|
|
134
|
+
var A = Object.getOwnPropertyDescriptor(f, "key").get;
|
|
135
|
+
if (A && A.isReactWarning) return !1;
|
|
136
136
|
}
|
|
137
137
|
return f.key !== void 0;
|
|
138
138
|
}
|
|
139
|
-
function a(f,
|
|
140
|
-
function
|
|
141
|
-
|
|
139
|
+
function a(f, A) {
|
|
140
|
+
function O() {
|
|
141
|
+
K || (K = !0, console.error(
|
|
142
142
|
"%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)",
|
|
143
|
-
|
|
143
|
+
A
|
|
144
144
|
));
|
|
145
145
|
}
|
|
146
|
-
|
|
147
|
-
get:
|
|
146
|
+
O.isReactWarning = !0, Object.defineProperty(f, "key", {
|
|
147
|
+
get: O,
|
|
148
148
|
configurable: !0
|
|
149
149
|
});
|
|
150
150
|
}
|
|
151
151
|
function l() {
|
|
152
152
|
var f = t(this.type);
|
|
153
|
-
return
|
|
153
|
+
return H[f] || (H[f] = !0, console.error(
|
|
154
154
|
"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."
|
|
155
155
|
)), f = this.props.ref, f !== void 0 ? f : null;
|
|
156
156
|
}
|
|
157
|
-
function d(f,
|
|
158
|
-
var
|
|
157
|
+
function d(f, A, O, x, oe, pe) {
|
|
158
|
+
var P = O.ref;
|
|
159
159
|
return f = {
|
|
160
160
|
$$typeof: u,
|
|
161
161
|
type: f,
|
|
162
|
-
key:
|
|
163
|
-
props:
|
|
164
|
-
_owner:
|
|
165
|
-
}, (
|
|
162
|
+
key: A,
|
|
163
|
+
props: O,
|
|
164
|
+
_owner: x
|
|
165
|
+
}, (P !== void 0 ? P : null) !== null ? Object.defineProperty(f, "ref", {
|
|
166
166
|
enumerable: !1,
|
|
167
167
|
get: l
|
|
168
168
|
}) : Object.defineProperty(f, "ref", { enumerable: !1, value: null }), f._store = {}, Object.defineProperty(f._store, "validated", {
|
|
@@ -179,69 +179,69 @@ function vn() {
|
|
|
179
179
|
configurable: !1,
|
|
180
180
|
enumerable: !1,
|
|
181
181
|
writable: !0,
|
|
182
|
-
value:
|
|
182
|
+
value: oe
|
|
183
183
|
}), Object.defineProperty(f, "_debugTask", {
|
|
184
184
|
configurable: !1,
|
|
185
185
|
enumerable: !1,
|
|
186
186
|
writable: !0,
|
|
187
|
-
value:
|
|
187
|
+
value: pe
|
|
188
188
|
}), Object.freeze && (Object.freeze(f.props), Object.freeze(f)), f;
|
|
189
189
|
}
|
|
190
|
-
function h(f,
|
|
191
|
-
var
|
|
192
|
-
if (
|
|
193
|
-
if (
|
|
194
|
-
if (
|
|
195
|
-
for (
|
|
196
|
-
|
|
197
|
-
Object.freeze && Object.freeze(
|
|
190
|
+
function h(f, A, O, x, oe, pe) {
|
|
191
|
+
var P = A.children;
|
|
192
|
+
if (P !== void 0)
|
|
193
|
+
if (x)
|
|
194
|
+
if ($(P)) {
|
|
195
|
+
for (x = 0; x < P.length; x++)
|
|
196
|
+
y(P[x]);
|
|
197
|
+
Object.freeze && Object.freeze(P);
|
|
198
198
|
} else
|
|
199
199
|
console.error(
|
|
200
200
|
"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
|
|
201
201
|
);
|
|
202
|
-
else
|
|
203
|
-
if (
|
|
204
|
-
|
|
205
|
-
var
|
|
206
|
-
return
|
|
202
|
+
else y(P);
|
|
203
|
+
if (B.call(A, "key")) {
|
|
204
|
+
P = t(f);
|
|
205
|
+
var Q = Object.keys(A).filter(function(De) {
|
|
206
|
+
return De !== "key";
|
|
207
207
|
});
|
|
208
|
-
|
|
208
|
+
x = 0 < Q.length ? "{key: someKey, " + Q.join(": ..., ") + ": ...}" : "{key: someKey}", he[P + x] || (Q = 0 < Q.length ? "{" + Q.join(": ..., ") + ": ...}" : "{}", console.error(
|
|
209
209
|
`A props object containing a "key" prop is being spread into JSX:
|
|
210
210
|
let props = %s;
|
|
211
211
|
<%s {...props} />
|
|
212
212
|
React keys must be passed directly to JSX without using spread:
|
|
213
213
|
let props = %s;
|
|
214
214
|
<%s key={someKey} {...props} />`,
|
|
215
|
+
x,
|
|
215
216
|
P,
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
), ve[L + P] = !0);
|
|
217
|
+
Q,
|
|
218
|
+
P
|
|
219
|
+
), he[P + x] = !0);
|
|
220
220
|
}
|
|
221
|
-
if (
|
|
222
|
-
|
|
223
|
-
for (var
|
|
224
|
-
|
|
225
|
-
} else
|
|
226
|
-
return
|
|
227
|
-
|
|
221
|
+
if (P = null, O !== void 0 && (n(O), P = "" + O), i(A) && (n(A.key), P = "" + A.key), "key" in A) {
|
|
222
|
+
O = {};
|
|
223
|
+
for (var se in A)
|
|
224
|
+
se !== "key" && (O[se] = A[se]);
|
|
225
|
+
} else O = A;
|
|
226
|
+
return P && a(
|
|
227
|
+
O,
|
|
228
228
|
typeof f == "function" ? f.displayName || f.name || "Unknown" : f
|
|
229
229
|
), d(
|
|
230
230
|
f,
|
|
231
|
-
|
|
232
|
-
|
|
231
|
+
P,
|
|
232
|
+
O,
|
|
233
233
|
o(),
|
|
234
|
-
|
|
235
|
-
|
|
234
|
+
oe,
|
|
235
|
+
pe
|
|
236
236
|
);
|
|
237
237
|
}
|
|
238
|
-
function
|
|
239
|
-
m(f) ? f._store && (f._store.validated = 1) : typeof f == "object" && f !== null && f.$$typeof ===
|
|
238
|
+
function y(f) {
|
|
239
|
+
m(f) ? f._store && (f._store.validated = 1) : typeof f == "object" && f !== null && f.$$typeof === z && (f._payload.status === "fulfilled" ? m(f._payload.value) && f._payload.value._store && (f._payload.value._store.validated = 1) : f._store && (f._store.validated = 1));
|
|
240
240
|
}
|
|
241
241
|
function m(f) {
|
|
242
242
|
return typeof f == "object" && f !== null && f.$$typeof === u;
|
|
243
243
|
}
|
|
244
|
-
var c =
|
|
244
|
+
var c = kn, u = Symbol.for("react.transitional.element"), g = Symbol.for("react.portal"), p = Symbol.for("react.fragment"), S = Symbol.for("react.strict_mode"), b = Symbol.for("react.profiler"), R = Symbol.for("react.consumer"), v = Symbol.for("react.context"), T = Symbol.for("react.forward_ref"), U = Symbol.for("react.suspense"), ee = Symbol.for("react.suspense_list"), te = Symbol.for("react.memo"), z = Symbol.for("react.lazy"), _ = Symbol.for("react.activity"), L = Symbol.for("react.client.reference"), M = c.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, B = Object.prototype.hasOwnProperty, $ = Array.isArray, V = console.createTask ? console.createTask : function() {
|
|
245
245
|
return null;
|
|
246
246
|
};
|
|
247
247
|
c = {
|
|
@@ -249,40 +249,40 @@ React keys must be passed directly to JSX without using spread:
|
|
|
249
249
|
return f();
|
|
250
250
|
}
|
|
251
251
|
};
|
|
252
|
-
var
|
|
252
|
+
var K, H = {}, Re = c.react_stack_bottom_frame.bind(
|
|
253
253
|
c,
|
|
254
254
|
s
|
|
255
|
-
)(),
|
|
256
|
-
|
|
257
|
-
var
|
|
255
|
+
)(), Ae = V(r(s)), he = {};
|
|
256
|
+
ge.Fragment = p, ge.jsx = function(f, A, O) {
|
|
257
|
+
var x = 1e4 > M.recentlyCreatedOwnerStacks++;
|
|
258
258
|
return h(
|
|
259
259
|
f,
|
|
260
|
-
|
|
261
|
-
|
|
260
|
+
A,
|
|
261
|
+
O,
|
|
262
262
|
!1,
|
|
263
|
-
|
|
264
|
-
|
|
263
|
+
x ? Error("react-stack-top-frame") : Re,
|
|
264
|
+
x ? V(r(f)) : Ae
|
|
265
265
|
);
|
|
266
|
-
},
|
|
267
|
-
var
|
|
266
|
+
}, ge.jsxs = function(f, A, O) {
|
|
267
|
+
var x = 1e4 > M.recentlyCreatedOwnerStacks++;
|
|
268
268
|
return h(
|
|
269
269
|
f,
|
|
270
|
-
|
|
271
|
-
|
|
270
|
+
A,
|
|
271
|
+
O,
|
|
272
272
|
!0,
|
|
273
|
-
|
|
274
|
-
|
|
273
|
+
x ? Error("react-stack-top-frame") : Re,
|
|
274
|
+
x ? V(r(f)) : Ae
|
|
275
275
|
);
|
|
276
276
|
};
|
|
277
|
-
})()),
|
|
277
|
+
})()), ge;
|
|
278
278
|
}
|
|
279
|
-
var
|
|
280
|
-
function
|
|
281
|
-
return
|
|
279
|
+
var vt;
|
|
280
|
+
function Vn() {
|
|
281
|
+
return vt || (vt = 1, process.env.NODE_ENV === "production" ? Ie.exports = Bn() : Ie.exports = Fn()), Ie.exports;
|
|
282
282
|
}
|
|
283
|
-
var
|
|
284
|
-
function
|
|
285
|
-
const n =
|
|
283
|
+
var w = Vn();
|
|
284
|
+
function Wn(t, e) {
|
|
285
|
+
const n = at(
|
|
286
286
|
(r) => t.subscribe(r),
|
|
287
287
|
() => {
|
|
288
288
|
const r = t.getSnapshot(), o = e ?? r.rootViewId, s = o ? r.views.get(o) : void 0;
|
|
@@ -302,15 +302,15 @@ function An(t, e) {
|
|
|
302
302
|
}, [n]);
|
|
303
303
|
}
|
|
304
304
|
function Z(t, e) {
|
|
305
|
-
const n =
|
|
305
|
+
const n = at(
|
|
306
306
|
(r) => t.subscribeNode(e, r),
|
|
307
307
|
() => t.getNodeVersion(e),
|
|
308
308
|
() => t.getNodeVersion(e)
|
|
309
309
|
);
|
|
310
310
|
return W(() => t.getNode(e), [t, e, n]);
|
|
311
311
|
}
|
|
312
|
-
const
|
|
313
|
-
function
|
|
312
|
+
const Kn = re("UIRenderer");
|
|
313
|
+
function Gn(t) {
|
|
314
314
|
if (t === void 0)
|
|
315
315
|
return "{}";
|
|
316
316
|
if (typeof t == "string")
|
|
@@ -321,18 +321,18 @@ function kn(t) {
|
|
|
321
321
|
return "{}";
|
|
322
322
|
}
|
|
323
323
|
}
|
|
324
|
-
function
|
|
324
|
+
function Yn(t) {
|
|
325
325
|
const e = t.styleIds;
|
|
326
326
|
return Array.isArray(e) ? e : [];
|
|
327
327
|
}
|
|
328
|
-
function
|
|
328
|
+
function zn(t) {
|
|
329
329
|
const e = t.children;
|
|
330
330
|
return Array.isArray(e) ? e : [];
|
|
331
331
|
}
|
|
332
|
-
function
|
|
332
|
+
function Xn(t, e) {
|
|
333
333
|
return t.nodeId === e.nodeId && t.context === e.context;
|
|
334
334
|
}
|
|
335
|
-
function
|
|
335
|
+
function Hn(t) {
|
|
336
336
|
if (t.length === 0) return "";
|
|
337
337
|
if (t.length === 1) return t[0].id;
|
|
338
338
|
let e = t[0].id;
|
|
@@ -340,66 +340,66 @@ function On(t) {
|
|
|
340
340
|
e += "," + t[n].id;
|
|
341
341
|
return e;
|
|
342
342
|
}
|
|
343
|
-
const
|
|
344
|
-
const r = Z(n.store, e), o = r ?
|
|
345
|
-
() => o.length === 0 ? null : o.map((
|
|
343
|
+
const et = Y(function t({ nodeId: e, context: n }) {
|
|
344
|
+
const r = Z(n.store, e), o = r ? zn(r) : [], s = Hn(o), i = W(
|
|
345
|
+
() => o.length === 0 ? null : o.map((y) => /* @__PURE__ */ w.jsx(t, { nodeId: y.id, context: n }, y.id)),
|
|
346
346
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
347
347
|
[s, n]
|
|
348
348
|
);
|
|
349
349
|
if (!r)
|
|
350
350
|
return null;
|
|
351
351
|
if (r.type === "root")
|
|
352
|
-
return /* @__PURE__ */
|
|
352
|
+
return /* @__PURE__ */ w.jsx(Cn, { children: i }, r.id);
|
|
353
353
|
const a = n.library.resolve(r);
|
|
354
354
|
if (!a)
|
|
355
|
-
return
|
|
356
|
-
const l =
|
|
357
|
-
return /* @__PURE__ */
|
|
358
|
-
},
|
|
359
|
-
function
|
|
360
|
-
return !Array.isArray(t) || t.length === 0 ? null : t.map((n) => /* @__PURE__ */
|
|
361
|
-
}
|
|
362
|
-
function
|
|
355
|
+
return Kn.warn(`No renderer for node type ${r.type}`), null;
|
|
356
|
+
const l = Yn(r), d = l.length > 0 ? l.join(" ") : void 0, h = a;
|
|
357
|
+
return /* @__PURE__ */ w.jsx(h, { nodeId: e, context: n, className: d });
|
|
358
|
+
}, Xn);
|
|
359
|
+
function qn(t, e) {
|
|
360
|
+
return !Array.isArray(t) || t.length === 0 ? null : t.map((n) => /* @__PURE__ */ w.jsx(et, { nodeId: n.id, context: e }, n.id));
|
|
361
|
+
}
|
|
362
|
+
function Jn(t, e) {
|
|
363
363
|
return t.store === e.store && t.library === e.library && t.viewId === e.viewId && t.emptyFallback === e.emptyFallback;
|
|
364
364
|
}
|
|
365
|
-
const
|
|
366
|
-
const { rootViewId: l, rootNodeId: d } =
|
|
365
|
+
const Zn = Y(function({ store: e, library: n, viewId: r, emptyFallback: o = null, onAction: s, client: i, video: a }) {
|
|
366
|
+
const { rootViewId: l, rootNodeId: d } = Wn(e, r), h = E(s);
|
|
367
367
|
h.current = s;
|
|
368
|
-
const
|
|
369
|
-
|
|
370
|
-
const m =
|
|
368
|
+
const y = E(i);
|
|
369
|
+
y.current = i;
|
|
370
|
+
const m = E(a);
|
|
371
371
|
m.current = a;
|
|
372
|
-
const c = D((
|
|
373
|
-
if (!
|
|
372
|
+
const c = D((g, p) => {
|
|
373
|
+
if (!g)
|
|
374
374
|
return;
|
|
375
|
-
const
|
|
376
|
-
h.current?.(
|
|
375
|
+
const S = Gn(p);
|
|
376
|
+
h.current?.(g, S);
|
|
377
377
|
}, []), u = W(() => {
|
|
378
|
-
const
|
|
378
|
+
const g = {
|
|
379
379
|
store: e,
|
|
380
380
|
library: n,
|
|
381
381
|
handlerCache: e.handlerCache,
|
|
382
382
|
// Access payloads from store at call time, not captured snapshot
|
|
383
|
-
getPayload: (
|
|
384
|
-
renderChildren: (
|
|
385
|
-
renderView: (
|
|
386
|
-
const
|
|
387
|
-
return
|
|
383
|
+
getPayload: (p) => e.getSnapshot().payloads.get(p),
|
|
384
|
+
renderChildren: (p) => qn(p, g),
|
|
385
|
+
renderView: (p) => {
|
|
386
|
+
const S = e.getSnapshot().views.get(p);
|
|
387
|
+
return S ? /* @__PURE__ */ w.jsx(et, { nodeId: S.id, context: g }) : null;
|
|
388
388
|
},
|
|
389
389
|
dispatchAction: c,
|
|
390
390
|
// Access client/video via refs to avoid context recreation
|
|
391
391
|
get client() {
|
|
392
|
-
return
|
|
392
|
+
return y.current;
|
|
393
393
|
},
|
|
394
394
|
get video() {
|
|
395
395
|
return m.current;
|
|
396
396
|
}
|
|
397
397
|
};
|
|
398
|
-
return
|
|
398
|
+
return g;
|
|
399
399
|
}, [e, n, c]);
|
|
400
|
-
return !l || !d ? o : /* @__PURE__ */
|
|
401
|
-
},
|
|
402
|
-
class
|
|
400
|
+
return !l || !d ? o : /* @__PURE__ */ w.jsx("div", { "data-ikon-view-id": l, style: { display: "contents" }, children: /* @__PURE__ */ w.jsx(et, { nodeId: d, context: u }) });
|
|
401
|
+
}, Jn);
|
|
402
|
+
class Qn {
|
|
403
403
|
constructor(e, n) {
|
|
404
404
|
if (this.fallback = n, e)
|
|
405
405
|
for (const [r, o] of e)
|
|
@@ -416,20 +416,20 @@ class Ln {
|
|
|
416
416
|
return this.renderers.get(e.type) ?? this.fallback;
|
|
417
417
|
}
|
|
418
418
|
}
|
|
419
|
-
function
|
|
419
|
+
function Ys(t, e) {
|
|
420
420
|
const n = Object.entries(t);
|
|
421
|
-
return new
|
|
421
|
+
return new Qn(n, e);
|
|
422
422
|
}
|
|
423
|
-
function
|
|
424
|
-
return
|
|
423
|
+
function zs(t) {
|
|
424
|
+
return at(
|
|
425
425
|
(e) => t.subscribe(e),
|
|
426
426
|
() => t.getSnapshot(),
|
|
427
427
|
() => t.getSnapshot()
|
|
428
428
|
);
|
|
429
429
|
}
|
|
430
|
-
function
|
|
431
|
-
const t =
|
|
432
|
-
return
|
|
430
|
+
function er() {
|
|
431
|
+
const t = _n();
|
|
432
|
+
return C(() => {
|
|
433
433
|
if (!t)
|
|
434
434
|
return;
|
|
435
435
|
let e = window.parent === window, n = null, r = [];
|
|
@@ -439,13 +439,13 @@ function Mn() {
|
|
|
439
439
|
n && !r.includes(n) && (n.style.outline = "", n.style.outlineOffset = ""), n = null, o.style.display = "none";
|
|
440
440
|
}
|
|
441
441
|
function i(c) {
|
|
442
|
-
for (const
|
|
443
|
-
|
|
442
|
+
for (const g of r)
|
|
443
|
+
g !== n && (g.style.outline = "", g.style.outlineOffset = "");
|
|
444
444
|
r = [];
|
|
445
445
|
const u = new Set(c);
|
|
446
|
-
for (const
|
|
447
|
-
const
|
|
448
|
-
u.has(
|
|
446
|
+
for (const g of Array.from(document.querySelectorAll("[data-ikon-source]"))) {
|
|
447
|
+
const p = g.getAttribute("data-ikon-source") ?? "";
|
|
448
|
+
u.has(p) && (g.style.outline = "2px solid #a6e3a1", g.style.outlineOffset = "1px", r.push(g));
|
|
449
449
|
}
|
|
450
450
|
}
|
|
451
451
|
function a(c) {
|
|
@@ -455,10 +455,10 @@ function Mn() {
|
|
|
455
455
|
if (!u || u === n)
|
|
456
456
|
return;
|
|
457
457
|
s(), n = u, n.style.outline = "2px solid #89b4fa", n.style.outlineOffset = "1px";
|
|
458
|
-
const
|
|
459
|
-
o.textContent =
|
|
460
|
-
const
|
|
461
|
-
o.style.left = `${
|
|
458
|
+
const g = u.getAttribute("data-ikon-source") ?? "";
|
|
459
|
+
o.textContent = g, o.style.display = "block";
|
|
460
|
+
const p = u.getBoundingClientRect();
|
|
461
|
+
o.style.left = `${p.left}px`, o.style.top = `${Math.max(0, p.top - 24)}px`;
|
|
462
462
|
}
|
|
463
463
|
function l(c) {
|
|
464
464
|
if (!e)
|
|
@@ -472,24 +472,24 @@ function Mn() {
|
|
|
472
472
|
if (!u)
|
|
473
473
|
return;
|
|
474
474
|
c.preventDefault(), c.stopPropagation();
|
|
475
|
-
const
|
|
475
|
+
const g = {
|
|
476
476
|
sourceMarker: u.getAttribute("data-ikon-source") ?? "",
|
|
477
477
|
tagName: u.tagName.toLowerCase(),
|
|
478
478
|
textContent: (u.textContent ?? "").trim().substring(0, 200)
|
|
479
479
|
};
|
|
480
|
-
window.dispatchEvent(new CustomEvent("ikon-inspect-select", { detail:
|
|
480
|
+
window.dispatchEvent(new CustomEvent("ikon-inspect-select", { detail: g })), window.parent.postMessage({ type: "ikon-element-selected", payload: g }, "*");
|
|
481
481
|
}
|
|
482
482
|
function h(c, u) {
|
|
483
483
|
return document.elementFromPoint(c, u)?.closest?.("[data-ikon-source]");
|
|
484
484
|
}
|
|
485
|
-
function
|
|
485
|
+
function y(c) {
|
|
486
486
|
if (c === n || (s(), !c))
|
|
487
487
|
return;
|
|
488
488
|
n = c, n.style.outline = `2px solid ${r.includes(c) ? "#a6e3a1" : "#89b4fa"}`, n.style.outlineOffset = "1px";
|
|
489
489
|
const u = c.getAttribute("data-ikon-source") ?? "";
|
|
490
490
|
o.textContent = u, o.style.display = "block";
|
|
491
|
-
const
|
|
492
|
-
o.style.left = `${
|
|
491
|
+
const g = c.getBoundingClientRect();
|
|
492
|
+
o.style.left = `${g.left}px`, o.style.top = `${Math.max(0, g.top - 24)}px`;
|
|
493
493
|
}
|
|
494
494
|
function m(c) {
|
|
495
495
|
if (c.data?.type === "ikon-inspect-mode") {
|
|
@@ -499,51 +499,51 @@ function Mn() {
|
|
|
499
499
|
}
|
|
500
500
|
if (c.data?.type === "ikon-inspect-at") {
|
|
501
501
|
const u = h(c.data.x, c.data.y);
|
|
502
|
-
|
|
503
|
-
const
|
|
502
|
+
y(u);
|
|
503
|
+
const g = u?.getAttribute("data-ikon-source") ?? "";
|
|
504
504
|
window.parent.postMessage({
|
|
505
505
|
type: "ikon-inspect-hover-result",
|
|
506
|
-
payload: { sourceMarker:
|
|
506
|
+
payload: { sourceMarker: g }
|
|
507
507
|
}, "*");
|
|
508
508
|
}
|
|
509
509
|
if (c.data?.type === "ikon-inspect-click") {
|
|
510
510
|
const u = h(c.data.x, c.data.y);
|
|
511
511
|
if (u) {
|
|
512
|
-
const
|
|
512
|
+
const g = {
|
|
513
513
|
sourceMarker: u.getAttribute("data-ikon-source") ?? "",
|
|
514
514
|
tagName: u.tagName.toLowerCase(),
|
|
515
515
|
textContent: (u.textContent ?? "").trim().substring(0, 200)
|
|
516
516
|
};
|
|
517
|
-
window.dispatchEvent(new CustomEvent("ikon-inspect-select", { detail:
|
|
517
|
+
window.dispatchEvent(new CustomEvent("ikon-inspect-select", { detail: g })), window.parent.postMessage({ type: "ikon-element-selected", payload: g }, "*");
|
|
518
518
|
}
|
|
519
519
|
}
|
|
520
520
|
if (c.data?.type === "ikon-inspect-click-add") {
|
|
521
521
|
const u = h(c.data.x, c.data.y);
|
|
522
522
|
if (u) {
|
|
523
|
-
const
|
|
523
|
+
const g = {
|
|
524
524
|
sourceMarker: u.getAttribute("data-ikon-source") ?? "",
|
|
525
525
|
tagName: u.tagName.toLowerCase(),
|
|
526
526
|
textContent: (u.textContent ?? "").trim().substring(0, 200)
|
|
527
527
|
};
|
|
528
528
|
window.parent.postMessage({
|
|
529
529
|
type: "ikon-inspect-rect-result",
|
|
530
|
-
payload: { elements: [
|
|
530
|
+
payload: { elements: [g], append: !0 }
|
|
531
531
|
}, "*");
|
|
532
532
|
}
|
|
533
533
|
}
|
|
534
534
|
if (c.data?.type === "ikon-inspect-rect") {
|
|
535
|
-
const { x1: u, y1:
|
|
536
|
-
for (const T of Array.from(
|
|
537
|
-
const
|
|
538
|
-
|
|
535
|
+
const { x1: u, y1: g, x2: p, y2: S, append: b } = c.data, R = document.querySelectorAll("[data-ikon-source]"), v = [];
|
|
536
|
+
for (const T of Array.from(R)) {
|
|
537
|
+
const U = T.getBoundingClientRect();
|
|
538
|
+
U.right > u && U.left < p && U.bottom > g && U.top < S && v.push({
|
|
539
539
|
sourceMarker: T.getAttribute("data-ikon-source") ?? "",
|
|
540
540
|
tagName: T.tagName.toLowerCase(),
|
|
541
541
|
textContent: (T.textContent ?? "").trim().substring(0, 200)
|
|
542
542
|
});
|
|
543
543
|
}
|
|
544
|
-
|
|
544
|
+
v.length > 0 && window.parent.postMessage({
|
|
545
545
|
type: "ikon-inspect-rect-result",
|
|
546
|
-
payload: { elements:
|
|
546
|
+
payload: { elements: v, append: b ?? !1 }
|
|
547
547
|
}, "*");
|
|
548
548
|
}
|
|
549
549
|
c.data?.type === "ikon-inspect-highlight" && i(c.data.markers ?? []), c.data?.type === "ikon-inspect-clear" && s();
|
|
@@ -553,35 +553,35 @@ function Mn() {
|
|
|
553
553
|
};
|
|
554
554
|
}, [t]), null;
|
|
555
555
|
}
|
|
556
|
-
const
|
|
557
|
-
function
|
|
556
|
+
const tr = re("IkonUiSurface"), tt = "ikon-ui";
|
|
557
|
+
function nr(t, e) {
|
|
558
558
|
return t === e;
|
|
559
559
|
}
|
|
560
|
-
const
|
|
561
|
-
const i = W(() => Array.from(e.keys()).sort().join(","), [e]), a =
|
|
560
|
+
const Gt = Y(function({ stores: e, registry: n, category: r = tt, onAction: o, client: s }) {
|
|
561
|
+
const i = W(() => Array.from(e.keys()).sort().join(","), [e]), a = E(o);
|
|
562
562
|
a.current = o;
|
|
563
|
-
const l =
|
|
563
|
+
const l = E(s);
|
|
564
564
|
l.current = s;
|
|
565
565
|
const d = W(
|
|
566
566
|
() => {
|
|
567
567
|
const m = [];
|
|
568
568
|
for (const [c, u] of e) {
|
|
569
|
-
const
|
|
570
|
-
|
|
569
|
+
const g = u.store.getSnapshot();
|
|
570
|
+
nr(u.category, r) && (!g.rootViewId || !g.views.has(g.rootViewId) || m.push({ key: c, store: u.store }));
|
|
571
571
|
}
|
|
572
572
|
return m;
|
|
573
573
|
},
|
|
574
574
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
575
575
|
[e, r, i]
|
|
576
|
-
), h =
|
|
577
|
-
return
|
|
578
|
-
|
|
579
|
-
}, [
|
|
580
|
-
/* @__PURE__ */
|
|
581
|
-
d.map(({ key: m, store: c }) => /* @__PURE__ */
|
|
576
|
+
), h = E(!1), y = d.length > 0;
|
|
577
|
+
return C(() => {
|
|
578
|
+
y && !h.current && (h.current = !0, tr.debug("First UI render"));
|
|
579
|
+
}, [y]), y ? /* @__PURE__ */ w.jsxs(w.Fragment, { children: [
|
|
580
|
+
/* @__PURE__ */ w.jsx(er, {}),
|
|
581
|
+
d.map(({ key: m, store: c }) => /* @__PURE__ */ w.jsx(Zn, { store: c, library: n, onAction: a.current, client: l.current, video: l.current?.media?.video }, m))
|
|
582
582
|
] }) : null;
|
|
583
583
|
});
|
|
584
|
-
class
|
|
584
|
+
class rr {
|
|
585
585
|
core;
|
|
586
586
|
ownsCore;
|
|
587
587
|
stores = /* @__PURE__ */ new Map();
|
|
@@ -589,7 +589,7 @@ class Dn {
|
|
|
589
589
|
unsubscribeClears;
|
|
590
590
|
unsubscribeStoreChanges;
|
|
591
591
|
constructor(e) {
|
|
592
|
-
this.core = e?.core ?? new
|
|
592
|
+
this.core = e?.core ?? new Rn({ client: e?.client, liveSnapshot: e?.liveSnapshot, bootSnapshot: e?.bootSnapshot }), this.ownsCore = !e?.core, this.unsubscribeClears = this.core.subscribeToUiStreamCleared(this.handleUiStreamCleared), this.unsubscribeStoreChanges = this.core.uiStore.subscribe(this.syncStreamSnapshot), this.syncAllStreams();
|
|
593
593
|
}
|
|
594
594
|
dispose() {
|
|
595
595
|
this.unsubscribeClears(), this.unsubscribeStoreChanges(), this.ownsCore && this.core.dispose(), this.listeners.clear(), this.stores.clear();
|
|
@@ -605,6 +605,12 @@ class Dn {
|
|
|
605
605
|
this.listeners.delete(e);
|
|
606
606
|
};
|
|
607
607
|
}
|
|
608
|
+
// Fires only for live server UI updates, never for the seeded boot snapshot or live snapshot
|
|
609
|
+
// (those bypass the update pipeline). The first call therefore marks the moment the live tree
|
|
610
|
+
// supersedes the pre-rendered one.
|
|
611
|
+
subscribeToUiUpdates(e) {
|
|
612
|
+
return this.core.subscribeToUiUpdates(e);
|
|
613
|
+
}
|
|
608
614
|
subscribeToStyles(e) {
|
|
609
615
|
return this.core.subscribeToUiStyles(e);
|
|
610
616
|
}
|
|
@@ -639,8 +645,8 @@ class Dn {
|
|
|
639
645
|
if (n)
|
|
640
646
|
return n;
|
|
641
647
|
const r = {
|
|
642
|
-
category:
|
|
643
|
-
store: new
|
|
648
|
+
category: tt,
|
|
649
|
+
store: new An()
|
|
644
650
|
};
|
|
645
651
|
return this.stores.set(e, r), r;
|
|
646
652
|
}
|
|
@@ -648,7 +654,7 @@ class Dn {
|
|
|
648
654
|
const r = this.stores.get(e);
|
|
649
655
|
if (!r)
|
|
650
656
|
return !1;
|
|
651
|
-
const o = n ?? this.core.uiStore.getSnapshot(e)?.category ??
|
|
657
|
+
const o = n ?? this.core.uiStore.getSnapshot(e)?.category ?? tt;
|
|
652
658
|
return r.category === o ? !1 : (this.stores.set(e, { ...r, category: o }), !0);
|
|
653
659
|
}
|
|
654
660
|
notify(e) {
|
|
@@ -656,13 +662,13 @@ class Dn {
|
|
|
656
662
|
n(e);
|
|
657
663
|
}
|
|
658
664
|
}
|
|
659
|
-
function
|
|
665
|
+
function or(t) {
|
|
660
666
|
if (typeof t == "string") {
|
|
661
667
|
const e = t.trim();
|
|
662
668
|
return e.length > 0 ? e : void 0;
|
|
663
669
|
}
|
|
664
670
|
}
|
|
665
|
-
function
|
|
671
|
+
function de(t) {
|
|
666
672
|
if (typeof t == "string") {
|
|
667
673
|
const e = t.trim();
|
|
668
674
|
return e.length > 0 ? e : void 0;
|
|
@@ -672,7 +678,7 @@ function ae(t) {
|
|
|
672
678
|
return e.length > 0 ? e.join(" ") : void 0;
|
|
673
679
|
}
|
|
674
680
|
}
|
|
675
|
-
function
|
|
681
|
+
function lt(...t) {
|
|
676
682
|
let e = "";
|
|
677
683
|
for (const n of t)
|
|
678
684
|
if (n) {
|
|
@@ -681,19 +687,19 @@ function Qe(...t) {
|
|
|
681
687
|
}
|
|
682
688
|
return e || void 0;
|
|
683
689
|
}
|
|
684
|
-
const
|
|
685
|
-
function
|
|
690
|
+
const Et = /* @__PURE__ */ new WeakMap(), sr = {};
|
|
691
|
+
function ut(t) {
|
|
686
692
|
if (!t)
|
|
687
|
-
return
|
|
688
|
-
const e =
|
|
693
|
+
return sr;
|
|
694
|
+
const e = Et.get(t);
|
|
689
695
|
if (e)
|
|
690
696
|
return e;
|
|
691
697
|
const n = {};
|
|
692
698
|
for (const [r, o] of Object.entries(t))
|
|
693
699
|
o != null && (typeof o == "string" || typeof o == "number" || typeof o == "boolean") && (n[r] = o);
|
|
694
|
-
return
|
|
700
|
+
return Et.set(t, n), n;
|
|
695
701
|
}
|
|
696
|
-
function
|
|
702
|
+
function ir(t) {
|
|
697
703
|
let e = t.parentElement;
|
|
698
704
|
for (; e; ) {
|
|
699
705
|
const r = window.getComputedStyle(e).overflowY;
|
|
@@ -703,32 +709,32 @@ function Fn(t) {
|
|
|
703
709
|
}
|
|
704
710
|
return null;
|
|
705
711
|
}
|
|
706
|
-
const
|
|
707
|
-
function
|
|
712
|
+
const Yt = 1.5;
|
|
713
|
+
function zt(t, e) {
|
|
708
714
|
requestAnimationFrame(() => {
|
|
709
|
-
const n = t.getBoundingClientRect(), r = e.getBoundingClientRect(), o = t.scrollTop + (r.bottom - n.bottom) + 16, i = Math.abs(o - t.scrollTop) > t.clientHeight *
|
|
715
|
+
const n = t.getBoundingClientRect(), r = e.getBoundingClientRect(), o = t.scrollTop + (r.bottom - n.bottom) + 16, i = Math.abs(o - t.scrollTop) > t.clientHeight * Yt ? "auto" : "smooth";
|
|
710
716
|
"scrollBehavior" in document.documentElement.style ? t.scrollTo({ top: o, behavior: i }) : t.scrollTop = o;
|
|
711
717
|
});
|
|
712
718
|
}
|
|
713
|
-
const
|
|
714
|
-
function
|
|
715
|
-
return Math.max(t.clientHeight *
|
|
719
|
+
const nt = "data-ikon-scroll-indicator", ar = 0.15, xe = "data-ikon-at-bottom";
|
|
720
|
+
function Xt(t) {
|
|
721
|
+
return Math.max(t.clientHeight * ar, 20);
|
|
716
722
|
}
|
|
717
|
-
function
|
|
718
|
-
return t.getAttribute(
|
|
723
|
+
function cr(t) {
|
|
724
|
+
return t.getAttribute(xe) !== "false";
|
|
719
725
|
}
|
|
720
|
-
function
|
|
721
|
-
t.getAttribute(
|
|
722
|
-
const { scrollTop: e, scrollHeight: n, clientHeight: r } = t, s = n - e - r <=
|
|
723
|
-
t.setAttribute(
|
|
726
|
+
function lr(t) {
|
|
727
|
+
t.getAttribute(xe) === null && (t.setAttribute(xe, "true"), t.addEventListener("scroll", () => {
|
|
728
|
+
const { scrollTop: e, scrollHeight: n, clientHeight: r } = t, s = n - e - r <= Xt(t);
|
|
729
|
+
t.setAttribute(xe, s ? "true" : "false");
|
|
724
730
|
}, { passive: !0 }));
|
|
725
731
|
}
|
|
726
|
-
function
|
|
727
|
-
const e = t.parentElement ?? t, n = e.querySelector(`[${
|
|
732
|
+
function ur(t) {
|
|
733
|
+
const e = t.parentElement ?? t, n = e.querySelector(`[${nt}]`);
|
|
728
734
|
if (n)
|
|
729
735
|
return n;
|
|
730
736
|
const r = document.createElement("button");
|
|
731
|
-
return r.setAttribute(
|
|
737
|
+
return r.setAttribute(nt, "true"), r.setAttribute("aria-label", "Scroll to latest"), r.textContent = "↓", Object.assign(r.style, {
|
|
732
738
|
position: "absolute",
|
|
733
739
|
bottom: "12px",
|
|
734
740
|
left: "50%",
|
|
@@ -756,23 +762,23 @@ function Gn(t) {
|
|
|
756
762
|
r.style.opacity = "0.9";
|
|
757
763
|
}), e.appendChild(r), r;
|
|
758
764
|
}
|
|
759
|
-
function
|
|
760
|
-
const n =
|
|
765
|
+
function dr(t, e) {
|
|
766
|
+
const n = ur(t);
|
|
761
767
|
n.style.display = "flex";
|
|
762
768
|
const r = () => {
|
|
763
|
-
|
|
769
|
+
zt(t, e), n.style.display = "none";
|
|
764
770
|
}, o = () => {
|
|
765
771
|
const { scrollTop: s, scrollHeight: i, clientHeight: a } = t;
|
|
766
|
-
i - s - a <=
|
|
772
|
+
i - s - a <= Xt(t) && (n.style.display = "none");
|
|
767
773
|
};
|
|
768
774
|
return n.addEventListener("click", r), t.addEventListener("scroll", o, { passive: !0 }), () => {
|
|
769
775
|
n.removeEventListener("click", r), t.removeEventListener("scroll", o);
|
|
770
776
|
};
|
|
771
777
|
}
|
|
772
|
-
function
|
|
773
|
-
const t =
|
|
774
|
-
const o = Z(r.store, n), s =
|
|
775
|
-
return
|
|
778
|
+
function fr() {
|
|
779
|
+
const t = Y(function({ nodeId: n, context: r }) {
|
|
780
|
+
const o = Z(r.store, n), s = E(null), i = de(o?.props?.targetViewId), a = o?.props?.focusOnly, l = typeof a == "boolean" ? a : void 0, d = de(o?.props?.priority), h = de(o?.props?.key), y = o?.props?.preciseGeneratedAt;
|
|
781
|
+
return C(() => {
|
|
776
782
|
if (typeof document > "u")
|
|
777
783
|
return;
|
|
778
784
|
const c = s.current;
|
|
@@ -780,16 +786,16 @@ function zn() {
|
|
|
780
786
|
return;
|
|
781
787
|
let u;
|
|
782
788
|
if (l !== !0) {
|
|
783
|
-
const
|
|
784
|
-
if (
|
|
785
|
-
if (
|
|
786
|
-
u =
|
|
789
|
+
const b = ir(c);
|
|
790
|
+
if (b)
|
|
791
|
+
if (lr(b), d === "Polite" && !cr(b))
|
|
792
|
+
u = dr(b, c);
|
|
787
793
|
else {
|
|
788
|
-
const
|
|
789
|
-
|
|
794
|
+
const U = (b.parentElement ?? b).querySelector(`[${nt}]`);
|
|
795
|
+
U && (U.style.display = "none"), zt(b, c);
|
|
790
796
|
}
|
|
791
797
|
else typeof c.scrollIntoView == "function" && requestAnimationFrame(() => {
|
|
792
|
-
const
|
|
798
|
+
const R = c.getBoundingClientRect().top, v = typeof window < "u" ? window.innerHeight : 0, T = Math.abs(R) > v * Yt ? "auto" : "smooth";
|
|
793
799
|
try {
|
|
794
800
|
c.scrollIntoView({ behavior: T, block: "end", inline: "nearest" });
|
|
795
801
|
} catch {
|
|
@@ -797,15 +803,15 @@ function zn() {
|
|
|
797
803
|
}
|
|
798
804
|
});
|
|
799
805
|
}
|
|
800
|
-
const
|
|
801
|
-
if (!(
|
|
806
|
+
const p = document.activeElement;
|
|
807
|
+
if (!(p instanceof HTMLInputElement || p instanceof HTMLTextAreaElement || p?.getAttribute("contenteditable") === "true") && typeof c.focus == "function")
|
|
802
808
|
try {
|
|
803
809
|
c.focus({ preventScroll: !0 });
|
|
804
810
|
} catch {
|
|
805
811
|
c.focus();
|
|
806
812
|
}
|
|
807
813
|
return u;
|
|
808
|
-
}, [l, d, i, h,
|
|
814
|
+
}, [l, d, i, h, y]), o ? /* @__PURE__ */ w.jsx(
|
|
809
815
|
"span",
|
|
810
816
|
{
|
|
811
817
|
ref: s,
|
|
@@ -822,17 +828,17 @@ function zn() {
|
|
|
822
828
|
return t;
|
|
823
829
|
};
|
|
824
830
|
}
|
|
825
|
-
function
|
|
826
|
-
const t =
|
|
827
|
-
const s = Z(r.store, n), i =
|
|
831
|
+
function hr() {
|
|
832
|
+
const t = Y(function({ nodeId: n, context: r, className: o }) {
|
|
833
|
+
const s = Z(r.store, n), i = or(s?.props?.onInvokeId), a = D(() => {
|
|
828
834
|
i && r.dispatchAction(i);
|
|
829
835
|
}, [i, r]);
|
|
830
836
|
if (!s)
|
|
831
837
|
return null;
|
|
832
|
-
const l =
|
|
838
|
+
const l = ut(s.props);
|
|
833
839
|
delete l.onInvokeId;
|
|
834
|
-
const d =
|
|
835
|
-
return /* @__PURE__ */
|
|
840
|
+
const d = lt(de(s.props?.className), o), h = s.children?.length ? r.renderChildren(s.children) : void 0;
|
|
841
|
+
return /* @__PURE__ */ w.jsx(
|
|
836
842
|
"div",
|
|
837
843
|
{
|
|
838
844
|
...l,
|
|
@@ -850,45 +856,45 @@ function Xn() {
|
|
|
850
856
|
return t;
|
|
851
857
|
};
|
|
852
858
|
}
|
|
853
|
-
function
|
|
854
|
-
const t =
|
|
859
|
+
function pr() {
|
|
860
|
+
const t = Y(function({ nodeId: n, context: r, className: o }) {
|
|
855
861
|
const s = Z(r.store, n);
|
|
856
862
|
if (!s)
|
|
857
863
|
return null;
|
|
858
|
-
const i =
|
|
859
|
-
return /* @__PURE__ */
|
|
864
|
+
const i = ut(s.props), a = lt("relative", de(s.props?.className), o), l = s.children?.length ? r.renderChildren(s.children) : void 0;
|
|
865
|
+
return /* @__PURE__ */ w.jsx("div", { ...i, "data-ikon-node-id": s.id, "data-ikon-source": s.sourceMarker, className: a, children: l });
|
|
860
866
|
});
|
|
861
867
|
return ({ type: e }) => {
|
|
862
868
|
if (e === "std.stack")
|
|
863
869
|
return t;
|
|
864
870
|
};
|
|
865
871
|
}
|
|
866
|
-
function
|
|
867
|
-
const t =
|
|
872
|
+
function mr() {
|
|
873
|
+
const t = Y(function({ nodeId: n, context: r, className: o }) {
|
|
868
874
|
const s = Z(r.store, n);
|
|
869
875
|
if (!s)
|
|
870
876
|
return null;
|
|
871
|
-
const i =
|
|
872
|
-
return /* @__PURE__ */
|
|
877
|
+
const i = ut(s.props), a = lt("absolute", de(s.props?.className), o), l = s.children?.length ? r.renderChildren(s.children) : void 0;
|
|
878
|
+
return /* @__PURE__ */ w.jsx("div", { ...i, "data-ikon-node-id": s.id, "data-ikon-source": s.sourceMarker, className: a, children: l });
|
|
873
879
|
});
|
|
874
880
|
return ({ type: e }) => {
|
|
875
881
|
if (e === "std.layer")
|
|
876
882
|
return t;
|
|
877
883
|
};
|
|
878
884
|
}
|
|
879
|
-
function
|
|
885
|
+
function gr() {
|
|
880
886
|
return [
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
887
|
+
hr(),
|
|
888
|
+
pr(),
|
|
889
|
+
mr(),
|
|
890
|
+
fr()
|
|
885
891
|
];
|
|
886
892
|
}
|
|
887
|
-
const
|
|
888
|
-
function
|
|
889
|
-
t.registerModule(
|
|
893
|
+
const yr = "base", br = async () => gr();
|
|
894
|
+
function Sr(t) {
|
|
895
|
+
t.registerModule(yr, br);
|
|
890
896
|
}
|
|
891
|
-
function
|
|
897
|
+
function wr(t) {
|
|
892
898
|
if (typeof t == "string") {
|
|
893
899
|
const e = t.trim();
|
|
894
900
|
return e.length > 0 ? e : void 0;
|
|
@@ -898,19 +904,19 @@ function tr(t) {
|
|
|
898
904
|
return e.length > 0 ? e.join(" ") : void 0;
|
|
899
905
|
}
|
|
900
906
|
}
|
|
901
|
-
function
|
|
907
|
+
function vr(...t) {
|
|
902
908
|
const e = [];
|
|
903
909
|
for (const n of t)
|
|
904
910
|
n && n.trim() && e.push(n.trim());
|
|
905
911
|
return e.length > 0 ? e.join(" ") : void 0;
|
|
906
912
|
}
|
|
907
|
-
function
|
|
913
|
+
function Rt(t) {
|
|
908
914
|
if (typeof t != "string")
|
|
909
915
|
return;
|
|
910
916
|
const e = t.trim();
|
|
911
917
|
return e.length > 0 ? e : void 0;
|
|
912
918
|
}
|
|
913
|
-
function
|
|
919
|
+
function _e(t) {
|
|
914
920
|
if (typeof t == "boolean")
|
|
915
921
|
return t;
|
|
916
922
|
if (typeof t == "string") {
|
|
@@ -919,27 +925,27 @@ function Ae(t) {
|
|
|
919
925
|
if (e === "false") return !1;
|
|
920
926
|
}
|
|
921
927
|
}
|
|
922
|
-
const
|
|
923
|
-
function
|
|
924
|
-
const t =
|
|
928
|
+
const Er = "std.audio-url-player";
|
|
929
|
+
function Rr() {
|
|
930
|
+
const t = Y(function({
|
|
925
931
|
nodeId: n,
|
|
926
932
|
context: r,
|
|
927
933
|
className: o
|
|
928
934
|
}) {
|
|
929
|
-
const s = Z(r.store, n), i =
|
|
930
|
-
if (
|
|
935
|
+
const s = Z(r.store, n), i = E(null), a = s ? _e(s.props?.autoplay) : void 0, l = s ? Rt(s.props?.src) : void 0;
|
|
936
|
+
if (C(() => {
|
|
931
937
|
a && i.current && i.current.play().catch(() => {
|
|
932
938
|
});
|
|
933
939
|
}, [a, l]), !s)
|
|
934
940
|
return null;
|
|
935
|
-
const d =
|
|
936
|
-
return /* @__PURE__ */
|
|
941
|
+
const d = vr(wr(s.props?.className), o), h = Rt(s.props?.preload), y = _e(s.props?.controls), m = _e(s.props?.loop), c = _e(s.props?.muted);
|
|
942
|
+
return /* @__PURE__ */ w.jsx(
|
|
937
943
|
"audio",
|
|
938
944
|
{
|
|
939
945
|
ref: i,
|
|
940
946
|
src: l,
|
|
941
947
|
...h !== void 0 ? { preload: h } : {},
|
|
942
|
-
...
|
|
948
|
+
...y !== void 0 ? { controls: y } : {},
|
|
943
949
|
...a !== void 0 ? { autoPlay: a } : {},
|
|
944
950
|
...m !== void 0 ? { loop: m } : {},
|
|
945
951
|
...c !== void 0 ? { muted: c } : {},
|
|
@@ -950,11 +956,11 @@ function or() {
|
|
|
950
956
|
);
|
|
951
957
|
});
|
|
952
958
|
return ({ type: e }) => {
|
|
953
|
-
if (e ===
|
|
959
|
+
if (e === Er)
|
|
954
960
|
return t;
|
|
955
961
|
};
|
|
956
962
|
}
|
|
957
|
-
function
|
|
963
|
+
function Ht(t) {
|
|
958
964
|
if (typeof t == "string") {
|
|
959
965
|
const e = t.trim();
|
|
960
966
|
return e.length > 0 ? e : void 0;
|
|
@@ -964,13 +970,13 @@ function Mt(t) {
|
|
|
964
970
|
return e.length > 0 ? e.join(" ") : void 0;
|
|
965
971
|
}
|
|
966
972
|
}
|
|
967
|
-
function
|
|
973
|
+
function qt(...t) {
|
|
968
974
|
const e = [];
|
|
969
975
|
for (const n of t)
|
|
970
976
|
n && n.trim() && e.push(n.trim());
|
|
971
977
|
return e.length > 0 ? e.join(" ") : void 0;
|
|
972
978
|
}
|
|
973
|
-
function
|
|
979
|
+
function Pe(t) {
|
|
974
980
|
if (typeof t == "number" && Number.isFinite(t))
|
|
975
981
|
return Math.floor(t);
|
|
976
982
|
if (typeof t == "string" && t.trim().length > 0) {
|
|
@@ -979,39 +985,39 @@ function _e(t) {
|
|
|
979
985
|
return Math.floor(e);
|
|
980
986
|
}
|
|
981
987
|
}
|
|
982
|
-
function
|
|
988
|
+
function rt(t) {
|
|
983
989
|
if (typeof t != "string")
|
|
984
990
|
return;
|
|
985
991
|
const e = t.trim();
|
|
986
992
|
return e.length > 0 ? e : void 0;
|
|
987
993
|
}
|
|
988
|
-
const
|
|
989
|
-
function
|
|
990
|
-
const t =
|
|
991
|
-
const s = Z(r.store, n), i =
|
|
992
|
-
|
|
994
|
+
const Ar = "std.video-canvas", Tr = "std.video-url-player";
|
|
995
|
+
function kr() {
|
|
996
|
+
const t = Y(function({ nodeId: n, context: r, className: o }) {
|
|
997
|
+
const s = Z(r.store, n), i = E(null), a = E(null), l = r.video, d = r.client, h = s ? rt(s.props?.streamId) : void 0, y = s ? Pe(s.props?.width) : void 0, m = s ? Pe(s.props?.height) : void 0, c = s ? qt(Ht(s.props?.className), o) : o, [, u] = N(0);
|
|
998
|
+
C(() => {
|
|
993
999
|
if (!d?.isWebRtcEnabled) return;
|
|
994
|
-
const
|
|
995
|
-
return d.onWebRtcTrackMapChanged = (
|
|
996
|
-
|
|
1000
|
+
const p = d.onWebRtcTrackMapChanged;
|
|
1001
|
+
return d.onWebRtcTrackMapChanged = (S) => {
|
|
1002
|
+
p?.(S), S.kind === "video" && u((b) => b + 1);
|
|
997
1003
|
}, () => {
|
|
998
|
-
d.onWebRtcTrackMapChanged =
|
|
1004
|
+
d.onWebRtcTrackMapChanged = p;
|
|
999
1005
|
};
|
|
1000
1006
|
}, [d]);
|
|
1001
|
-
const
|
|
1002
|
-
return
|
|
1003
|
-
const
|
|
1004
|
-
if (!(!l || !
|
|
1005
|
-
return l.attachCanvas(h,
|
|
1007
|
+
const g = d?.isWebRtcEnabled && h ? d.getWebRtcVideoStreamByStreamId(h) : null;
|
|
1008
|
+
return C(() => {
|
|
1009
|
+
const p = i.current;
|
|
1010
|
+
if (!(!l || !p || !h || g))
|
|
1011
|
+
return l.attachCanvas(h, p), () => {
|
|
1006
1012
|
l.detachCanvas(h);
|
|
1007
1013
|
};
|
|
1008
|
-
}, [l, h,
|
|
1009
|
-
const
|
|
1010
|
-
if (!(!
|
|
1011
|
-
return
|
|
1012
|
-
|
|
1014
|
+
}, [l, h, g]), C(() => {
|
|
1015
|
+
const p = a.current;
|
|
1016
|
+
if (!(!p || !g))
|
|
1017
|
+
return p.srcObject = g, () => {
|
|
1018
|
+
p.srcObject = null;
|
|
1013
1019
|
};
|
|
1014
|
-
}, [
|
|
1020
|
+
}, [g]), s ? g ? /* @__PURE__ */ w.jsx(
|
|
1015
1021
|
"video",
|
|
1016
1022
|
{
|
|
1017
1023
|
ref: a,
|
|
@@ -1022,11 +1028,11 @@ function ar() {
|
|
|
1022
1028
|
"data-ikon-source": s.sourceMarker,
|
|
1023
1029
|
"data-ikon-video-stream-id": h,
|
|
1024
1030
|
className: c,
|
|
1025
|
-
...
|
|
1031
|
+
...y ? { width: y } : {},
|
|
1026
1032
|
...m ? { height: m } : {}
|
|
1027
1033
|
},
|
|
1028
1034
|
h
|
|
1029
|
-
) : /* @__PURE__ */
|
|
1035
|
+
) : /* @__PURE__ */ w.jsx(
|
|
1030
1036
|
"canvas",
|
|
1031
1037
|
{
|
|
1032
1038
|
ref: i,
|
|
@@ -1034,21 +1040,21 @@ function ar() {
|
|
|
1034
1040
|
"data-ikon-source": s.sourceMarker,
|
|
1035
1041
|
"data-ikon-video-stream-id": h,
|
|
1036
1042
|
className: c,
|
|
1037
|
-
...
|
|
1043
|
+
...y ? { width: y } : {},
|
|
1038
1044
|
...m ? { height: m } : {}
|
|
1039
1045
|
},
|
|
1040
1046
|
h
|
|
1041
1047
|
) : null;
|
|
1042
1048
|
});
|
|
1043
1049
|
return ({ type: e }) => {
|
|
1044
|
-
if (e ===
|
|
1050
|
+
if (e === Ar)
|
|
1045
1051
|
return t;
|
|
1046
1052
|
};
|
|
1047
1053
|
}
|
|
1048
|
-
function
|
|
1049
|
-
return [
|
|
1054
|
+
function Cr() {
|
|
1055
|
+
return [kr(), Ir(), Rr()];
|
|
1050
1056
|
}
|
|
1051
|
-
function
|
|
1057
|
+
function ye(t) {
|
|
1052
1058
|
if (typeof t == "boolean")
|
|
1053
1059
|
return t;
|
|
1054
1060
|
if (typeof t == "string") {
|
|
@@ -1057,61 +1063,61 @@ function he(t) {
|
|
|
1057
1063
|
if (e === "false") return !1;
|
|
1058
1064
|
}
|
|
1059
1065
|
}
|
|
1060
|
-
function
|
|
1061
|
-
const t =
|
|
1066
|
+
function Ir() {
|
|
1067
|
+
const t = Y(function({
|
|
1062
1068
|
nodeId: n,
|
|
1063
1069
|
context: r,
|
|
1064
1070
|
className: o
|
|
1065
1071
|
}) {
|
|
1066
|
-
const s = Z(r.store, n), i =
|
|
1067
|
-
if (
|
|
1072
|
+
const s = Z(r.store, n), i = E(null), a = s ? ye(s.props?.autoplay) : void 0, l = s ? rt(s.props?.src) : void 0;
|
|
1073
|
+
if (C(() => {
|
|
1068
1074
|
a && i.current && i.current.play().catch(() => {
|
|
1069
1075
|
});
|
|
1070
1076
|
}, [a, l]), !s)
|
|
1071
1077
|
return null;
|
|
1072
|
-
const d =
|
|
1073
|
-
return /* @__PURE__ */
|
|
1078
|
+
const d = qt(Ht(s.props?.className), o), h = rt(s.props?.poster), y = ye(s.props?.controls), m = ye(s.props?.loop), c = ye(s.props?.muted), u = ye(s.props?.playsInline), g = Pe(s.props?.width), p = Pe(s.props?.height), S = s.children?.length ? r.renderChildren(s.children) : void 0;
|
|
1079
|
+
return /* @__PURE__ */ w.jsx(
|
|
1074
1080
|
"video",
|
|
1075
1081
|
{
|
|
1076
1082
|
ref: i,
|
|
1077
1083
|
src: l,
|
|
1078
1084
|
poster: h,
|
|
1079
|
-
...
|
|
1085
|
+
...y !== void 0 ? { controls: y } : {},
|
|
1080
1086
|
...a !== void 0 ? { autoPlay: a } : {},
|
|
1081
1087
|
...m !== void 0 ? { loop: m } : {},
|
|
1082
1088
|
...c !== void 0 ? { muted: c } : {},
|
|
1083
1089
|
...u !== void 0 ? { playsInline: u } : {},
|
|
1084
|
-
...
|
|
1085
|
-
...
|
|
1090
|
+
...g ? { width: g } : {},
|
|
1091
|
+
...p ? { height: p } : {},
|
|
1086
1092
|
"data-ikon-node-id": s.id,
|
|
1087
1093
|
"data-ikon-source": s.sourceMarker,
|
|
1088
1094
|
className: d,
|
|
1089
|
-
children:
|
|
1095
|
+
children: S
|
|
1090
1096
|
}
|
|
1091
1097
|
);
|
|
1092
1098
|
});
|
|
1093
1099
|
return ({ type: e }) => {
|
|
1094
|
-
if (e ===
|
|
1100
|
+
if (e === Tr)
|
|
1095
1101
|
return t;
|
|
1096
1102
|
};
|
|
1097
1103
|
}
|
|
1098
|
-
const
|
|
1099
|
-
function
|
|
1100
|
-
t.registerModule(
|
|
1104
|
+
const _r = "media", Or = async () => Cr();
|
|
1105
|
+
function Nr(t) {
|
|
1106
|
+
t.registerModule(_r, Or);
|
|
1101
1107
|
}
|
|
1102
|
-
const
|
|
1108
|
+
const xr = `#version 300 es
|
|
1103
1109
|
in vec4 a_position;
|
|
1104
1110
|
void main() {
|
|
1105
1111
|
gl_Position = a_position;
|
|
1106
1112
|
}
|
|
1107
|
-
`,
|
|
1108
|
-
function
|
|
1113
|
+
`, ce = 4;
|
|
1114
|
+
function Pr(t, e) {
|
|
1109
1115
|
return new RegExp(`\\buniform\\s+\\w+\\s+${e}\\s*;`, "g").test(t);
|
|
1110
1116
|
}
|
|
1111
|
-
function
|
|
1117
|
+
function Lr(t, e) {
|
|
1112
1118
|
const n = [];
|
|
1113
1119
|
for (const [r, o] of Object.entries(e)) {
|
|
1114
|
-
if (
|
|
1120
|
+
if (Pr(t, r))
|
|
1115
1121
|
continue;
|
|
1116
1122
|
let s;
|
|
1117
1123
|
switch (o.type) {
|
|
@@ -1172,7 +1178,7 @@ void main() {
|
|
|
1172
1178
|
}
|
|
1173
1179
|
`;
|
|
1174
1180
|
}
|
|
1175
|
-
class
|
|
1181
|
+
class Ur {
|
|
1176
1182
|
gl;
|
|
1177
1183
|
program = null;
|
|
1178
1184
|
positionBuffer = null;
|
|
@@ -1187,8 +1193,8 @@ class gr {
|
|
|
1187
1193
|
mouseClickX = 0;
|
|
1188
1194
|
mouseClickY = 0;
|
|
1189
1195
|
channels = [];
|
|
1190
|
-
channelResolution = new Float32Array(
|
|
1191
|
-
channelTime = new Float32Array(
|
|
1196
|
+
channelResolution = new Float32Array(ce * 3);
|
|
1197
|
+
channelTime = new Float32Array(ce);
|
|
1192
1198
|
lastError = null;
|
|
1193
1199
|
currentShaderSource = "";
|
|
1194
1200
|
constructor(e) {
|
|
@@ -1211,7 +1217,7 @@ class gr {
|
|
|
1211
1217
|
}
|
|
1212
1218
|
initializeChannels() {
|
|
1213
1219
|
const e = this.gl;
|
|
1214
|
-
for (let n = 0; n <
|
|
1220
|
+
for (let n = 0; n < ce; n++) {
|
|
1215
1221
|
const r = e.createTexture();
|
|
1216
1222
|
e.bindTexture(e.TEXTURE_2D, r), e.texImage2D(e.TEXTURE_2D, 0, e.RGBA, 1, 1, 0, e.RGBA, e.UNSIGNED_BYTE, new Uint8Array([0, 0, 0, 255])), e.texParameteri(e.TEXTURE_2D, e.TEXTURE_WRAP_S, e.CLAMP_TO_EDGE), e.texParameteri(e.TEXTURE_2D, e.TEXTURE_WRAP_T, e.CLAMP_TO_EDGE), e.texParameteri(e.TEXTURE_2D, e.TEXTURE_MIN_FILTER, e.LINEAR), e.texParameteri(e.TEXTURE_2D, e.TEXTURE_MAG_FILTER, e.LINEAR), this.channels.push({ texture: r, width: 0, height: 0, url: null });
|
|
1217
1223
|
}
|
|
@@ -1221,7 +1227,7 @@ class gr {
|
|
|
1221
1227
|
// settings (vflip on, repeat wrap, mipmap filtering) so copy-pasted ShaderToy texture shaders render
|
|
1222
1228
|
// the same way. Only channels whose URL changed are reloaded.
|
|
1223
1229
|
setChannels(e) {
|
|
1224
|
-
for (let n = 0; n <
|
|
1230
|
+
for (let n = 0; n < ce; n++) {
|
|
1225
1231
|
const r = e[n] ?? null, o = this.channels[n];
|
|
1226
1232
|
if (o.url !== r) {
|
|
1227
1233
|
if (o.url = r, !r) {
|
|
@@ -1247,10 +1253,10 @@ class gr {
|
|
|
1247
1253
|
}
|
|
1248
1254
|
compile(e, n = {}) {
|
|
1249
1255
|
this.lastError = null, this.customUniforms = n, this.currentShaderSource = e;
|
|
1250
|
-
const r = this.gl, o = this.compileShader(r.VERTEX_SHADER,
|
|
1256
|
+
const r = this.gl, o = this.compileShader(r.VERTEX_SHADER, xr);
|
|
1251
1257
|
if (!o)
|
|
1252
1258
|
return !1;
|
|
1253
|
-
const s =
|
|
1259
|
+
const s = Lr(e, n), i = this.compileShader(r.FRAGMENT_SHADER, s);
|
|
1254
1260
|
if (!i)
|
|
1255
1261
|
return r.deleteShader(o), !1;
|
|
1256
1262
|
const a = r.createProgram();
|
|
@@ -1270,7 +1276,7 @@ class gr {
|
|
|
1270
1276
|
const n = ["iResolution", "iTime", "iTimeDelta", "iFrame", "iMouse", "iDate"];
|
|
1271
1277
|
for (const r of n)
|
|
1272
1278
|
this.uniformLocations.set(r, e.getUniformLocation(this.program, r));
|
|
1273
|
-
for (let r = 0; r <
|
|
1279
|
+
for (let r = 0; r < ce; r++)
|
|
1274
1280
|
this.uniformLocations.set(`iChannel${r}`, e.getUniformLocation(this.program, `iChannel${r}`));
|
|
1275
1281
|
this.uniformLocations.set("iChannelResolution", e.getUniformLocation(this.program, "iChannelResolution[0]")), this.uniformLocations.set("iChannelTime", e.getUniformLocation(this.program, "iChannelTime[0]"));
|
|
1276
1282
|
for (const r of Object.keys(this.customUniforms))
|
|
@@ -1293,53 +1299,53 @@ class gr {
|
|
|
1293
1299
|
d && e.uniform3f(d, o, s, 1);
|
|
1294
1300
|
const h = this.uniformLocations.get("iTime");
|
|
1295
1301
|
h && e.uniform1f(h, a);
|
|
1296
|
-
const
|
|
1297
|
-
|
|
1302
|
+
const y = this.uniformLocations.get("iTimeDelta");
|
|
1303
|
+
y && e.uniform1f(y, l);
|
|
1298
1304
|
const m = this.uniformLocations.get("iFrame");
|
|
1299
1305
|
m && e.uniform1i(m, this.frameCount);
|
|
1300
1306
|
const c = this.uniformLocations.get("iMouse");
|
|
1301
1307
|
c && e.uniform4f(c, this.mouseX, this.mouseY, this.mouseClickX, this.mouseClickY);
|
|
1302
1308
|
const u = this.uniformLocations.get("iDate");
|
|
1303
1309
|
if (u) {
|
|
1304
|
-
const
|
|
1305
|
-
e.uniform4f(u,
|
|
1306
|
-
}
|
|
1307
|
-
for (let
|
|
1308
|
-
e.activeTexture(e.TEXTURE0 +
|
|
1309
|
-
const
|
|
1310
|
-
|
|
1311
|
-
}
|
|
1312
|
-
const
|
|
1313
|
-
|
|
1314
|
-
const
|
|
1315
|
-
|
|
1316
|
-
for (const [
|
|
1317
|
-
const
|
|
1318
|
-
if (
|
|
1319
|
-
switch (
|
|
1310
|
+
const S = /* @__PURE__ */ new Date();
|
|
1311
|
+
e.uniform4f(u, S.getFullYear(), S.getMonth(), S.getDate(), S.getHours() * 3600 + S.getMinutes() * 60 + S.getSeconds() + S.getMilliseconds() / 1e3);
|
|
1312
|
+
}
|
|
1313
|
+
for (let S = 0; S < ce; S++) {
|
|
1314
|
+
e.activeTexture(e.TEXTURE0 + S), e.bindTexture(e.TEXTURE_2D, this.channels[S].texture);
|
|
1315
|
+
const b = this.uniformLocations.get(`iChannel${S}`);
|
|
1316
|
+
b && e.uniform1i(b, S);
|
|
1317
|
+
}
|
|
1318
|
+
const g = this.uniformLocations.get("iChannelResolution");
|
|
1319
|
+
g && e.uniform3fv(g, this.channelResolution);
|
|
1320
|
+
const p = this.uniformLocations.get("iChannelTime");
|
|
1321
|
+
p && e.uniform1fv(p, this.channelTime);
|
|
1322
|
+
for (const [S, b] of Object.entries(this.customUniforms)) {
|
|
1323
|
+
const R = this.uniformLocations.get(S);
|
|
1324
|
+
if (R)
|
|
1325
|
+
switch (b.type) {
|
|
1320
1326
|
case "float":
|
|
1321
|
-
e.uniform1f(
|
|
1327
|
+
e.uniform1f(R, b.value);
|
|
1322
1328
|
break;
|
|
1323
1329
|
case "vec2": {
|
|
1324
|
-
const
|
|
1325
|
-
e.uniform2f(
|
|
1330
|
+
const v = b.value;
|
|
1331
|
+
e.uniform2f(R, v[0], v[1]);
|
|
1326
1332
|
break;
|
|
1327
1333
|
}
|
|
1328
1334
|
case "vec3": {
|
|
1329
|
-
const
|
|
1330
|
-
e.uniform3f(
|
|
1335
|
+
const v = b.value;
|
|
1336
|
+
e.uniform3f(R, v[0], v[1], v[2]);
|
|
1331
1337
|
break;
|
|
1332
1338
|
}
|
|
1333
1339
|
case "vec4": {
|
|
1334
|
-
const
|
|
1335
|
-
e.uniform4f(
|
|
1340
|
+
const v = b.value;
|
|
1341
|
+
e.uniform4f(R, v[0], v[1], v[2], v[3]);
|
|
1336
1342
|
break;
|
|
1337
1343
|
}
|
|
1338
1344
|
case "int":
|
|
1339
|
-
e.uniform1i(
|
|
1345
|
+
e.uniform1i(R, b.value);
|
|
1340
1346
|
break;
|
|
1341
1347
|
case "bool":
|
|
1342
|
-
e.uniform1i(
|
|
1348
|
+
e.uniform1i(R, b.value ? 1 : 0);
|
|
1343
1349
|
break;
|
|
1344
1350
|
}
|
|
1345
1351
|
}
|
|
@@ -1356,7 +1362,7 @@ class gr {
|
|
|
1356
1362
|
this.channels = [], this.uniformLocations.clear();
|
|
1357
1363
|
}
|
|
1358
1364
|
}
|
|
1359
|
-
function
|
|
1365
|
+
function Mr(t) {
|
|
1360
1366
|
if (typeof t == "string") {
|
|
1361
1367
|
const e = t.trim();
|
|
1362
1368
|
return e.length > 0 ? e : void 0;
|
|
@@ -1366,13 +1372,13 @@ function yr(t) {
|
|
|
1366
1372
|
return e.length > 0 ? e.join(" ") : void 0;
|
|
1367
1373
|
}
|
|
1368
1374
|
}
|
|
1369
|
-
function
|
|
1375
|
+
function jr(...t) {
|
|
1370
1376
|
const e = [];
|
|
1371
1377
|
for (const n of t)
|
|
1372
1378
|
n && n.trim() && e.push(n.trim());
|
|
1373
1379
|
return e.length > 0 ? e.join(" ") : void 0;
|
|
1374
1380
|
}
|
|
1375
|
-
function
|
|
1381
|
+
function Ye(t) {
|
|
1376
1382
|
if (typeof t == "number" && Number.isFinite(t))
|
|
1377
1383
|
return Math.floor(t);
|
|
1378
1384
|
if (typeof t == "string" && t.trim().length > 0) {
|
|
@@ -1381,10 +1387,10 @@ function Ue(t) {
|
|
|
1381
1387
|
return Math.floor(e);
|
|
1382
1388
|
}
|
|
1383
1389
|
}
|
|
1384
|
-
function
|
|
1390
|
+
function Dr(t) {
|
|
1385
1391
|
return typeof t == "string" ? t : "";
|
|
1386
1392
|
}
|
|
1387
|
-
function
|
|
1393
|
+
function $r(t) {
|
|
1388
1394
|
if (typeof t == "boolean")
|
|
1389
1395
|
return t;
|
|
1390
1396
|
if (typeof t == "string") {
|
|
@@ -1393,7 +1399,7 @@ function Sr(t) {
|
|
|
1393
1399
|
if (e === "false") return !1;
|
|
1394
1400
|
}
|
|
1395
1401
|
}
|
|
1396
|
-
function
|
|
1402
|
+
function Br(t) {
|
|
1397
1403
|
if (!t || typeof t != "object")
|
|
1398
1404
|
return {};
|
|
1399
1405
|
const e = {}, n = t;
|
|
@@ -1408,10 +1414,10 @@ function Er(t) {
|
|
|
1408
1414
|
}
|
|
1409
1415
|
return e;
|
|
1410
1416
|
}
|
|
1411
|
-
function
|
|
1417
|
+
function Fr(t) {
|
|
1412
1418
|
return Array.isArray(t) ? t.map((e) => typeof e == "string" ? e : null) : [];
|
|
1413
1419
|
}
|
|
1414
|
-
function
|
|
1420
|
+
function Vr(t, e) {
|
|
1415
1421
|
const n = Object.keys(t), r = Object.keys(e);
|
|
1416
1422
|
if (n.length !== r.length)
|
|
1417
1423
|
return !1;
|
|
@@ -1432,103 +1438,103 @@ function Rr(t, e) {
|
|
|
1432
1438
|
}
|
|
1433
1439
|
return !0;
|
|
1434
1440
|
}
|
|
1435
|
-
const
|
|
1436
|
-
function
|
|
1437
|
-
const t =
|
|
1438
|
-
const s = Z(r.store, n), i =
|
|
1441
|
+
const Wr = "std.shadertoy-canvas";
|
|
1442
|
+
function Kr() {
|
|
1443
|
+
const t = Y(function({ nodeId: n, context: r, className: o }) {
|
|
1444
|
+
const s = Z(r.store, n), i = E(null), a = E(null), l = E(null), d = E(0), h = E(""), y = E({}), m = E({
|
|
1439
1445
|
x: 0,
|
|
1440
1446
|
y: 0,
|
|
1441
1447
|
clickX: 0,
|
|
1442
1448
|
clickY: 0,
|
|
1443
1449
|
isDown: !1
|
|
1444
|
-
}), c = s ?
|
|
1445
|
-
|
|
1446
|
-
const
|
|
1447
|
-
if (
|
|
1450
|
+
}), c = s ? Dr(s.props?.shaderSource) : "", u = s ? Ye(s.props?.fps) ?? 60 : 60, g = s?.props?.uniforms, p = W(() => Br(g), [g]), S = s?.props?.channels, b = W(() => Fr(S), [S]), R = s ? $r(s.props?.enableMouse) ?? !0 : !0, v = s ? Ye(s.props?.width) : void 0, T = s ? Ye(s.props?.height) : void 0, U = s ? jr(Mr(s.props?.className), o) : o;
|
|
1451
|
+
C(() => {
|
|
1452
|
+
const _ = i.current;
|
|
1453
|
+
if (_) {
|
|
1448
1454
|
try {
|
|
1449
|
-
const
|
|
1450
|
-
a.current =
|
|
1451
|
-
} catch (
|
|
1452
|
-
console.error("[ShadertoyRenderer] Failed to create WebGL2 context:",
|
|
1455
|
+
const L = new Ur(_);
|
|
1456
|
+
a.current = L;
|
|
1457
|
+
} catch (L) {
|
|
1458
|
+
console.error("[ShadertoyRenderer] Failed to create WebGL2 context:", L);
|
|
1453
1459
|
}
|
|
1454
1460
|
return () => {
|
|
1455
1461
|
a.current && (a.current.destroy(), a.current = null);
|
|
1456
1462
|
};
|
|
1457
1463
|
}
|
|
1458
|
-
}, []),
|
|
1459
|
-
const
|
|
1460
|
-
if (!(!
|
|
1461
|
-
if (
|
|
1462
|
-
h.current = c,
|
|
1464
|
+
}, []), C(() => {
|
|
1465
|
+
const _ = a.current;
|
|
1466
|
+
if (!(!_ || !c) && h.current !== c)
|
|
1467
|
+
if (_.compile(c, p))
|
|
1468
|
+
h.current = c, y.current = p;
|
|
1463
1469
|
else {
|
|
1464
|
-
const
|
|
1465
|
-
console.error("[ShadertoyRenderer] Shader compilation failed:",
|
|
1470
|
+
const M = _.getError();
|
|
1471
|
+
console.error("[ShadertoyRenderer] Shader compilation failed:", M);
|
|
1466
1472
|
}
|
|
1467
|
-
}, [c,
|
|
1468
|
-
const
|
|
1469
|
-
!
|
|
1470
|
-
}, [
|
|
1471
|
-
const
|
|
1472
|
-
|
|
1473
|
-
}, [
|
|
1474
|
-
const
|
|
1475
|
-
if (!
|
|
1476
|
-
const
|
|
1477
|
-
const
|
|
1478
|
-
|
|
1473
|
+
}, [c, p]), C(() => {
|
|
1474
|
+
const _ = a.current;
|
|
1475
|
+
!_ || !h.current || Vr(y.current, p) || (_.setCustomUniforms(p), y.current = p);
|
|
1476
|
+
}, [p]), C(() => {
|
|
1477
|
+
const _ = a.current;
|
|
1478
|
+
_ && _.setChannels(b);
|
|
1479
|
+
}, [b]), C(() => {
|
|
1480
|
+
const _ = a.current;
|
|
1481
|
+
if (!_ || !h.current) return;
|
|
1482
|
+
const L = 1e3 / u, M = (B) => {
|
|
1483
|
+
const $ = B - d.current;
|
|
1484
|
+
$ >= L && (d.current = B - $ % L, _.draw()), l.current = requestAnimationFrame(M);
|
|
1479
1485
|
};
|
|
1480
|
-
return l.current = requestAnimationFrame(
|
|
1486
|
+
return l.current = requestAnimationFrame(M), () => {
|
|
1481
1487
|
l.current !== null && (cancelAnimationFrame(l.current), l.current = null);
|
|
1482
1488
|
};
|
|
1483
1489
|
}, [u]);
|
|
1484
|
-
const
|
|
1485
|
-
(
|
|
1486
|
-
if (!
|
|
1487
|
-
const
|
|
1488
|
-
if (!
|
|
1489
|
-
const
|
|
1490
|
-
m.current.x =
|
|
1490
|
+
const ee = D(
|
|
1491
|
+
(_) => {
|
|
1492
|
+
if (!R) return;
|
|
1493
|
+
const L = i.current, M = a.current;
|
|
1494
|
+
if (!L || !M) return;
|
|
1495
|
+
const B = window.devicePixelRatio || 1, $ = L.getBoundingClientRect(), V = (_.clientX - $.left) * B, K = ($.height - (_.clientY - $.top)) * B;
|
|
1496
|
+
m.current.x = V, m.current.y = K, M.setMouse(V, K, m.current.clickX, m.current.clickY);
|
|
1491
1497
|
},
|
|
1492
|
-
[
|
|
1493
|
-
),
|
|
1494
|
-
(
|
|
1495
|
-
if (!
|
|
1496
|
-
const
|
|
1497
|
-
if (!
|
|
1498
|
-
const
|
|
1499
|
-
m.current.isDown = !0, m.current.clickX =
|
|
1498
|
+
[R]
|
|
1499
|
+
), te = D(
|
|
1500
|
+
(_) => {
|
|
1501
|
+
if (!R) return;
|
|
1502
|
+
const L = i.current, M = a.current;
|
|
1503
|
+
if (!L || !M) return;
|
|
1504
|
+
const B = window.devicePixelRatio || 1, $ = L.getBoundingClientRect(), V = (_.clientX - $.left) * B, K = ($.height - (_.clientY - $.top)) * B;
|
|
1505
|
+
m.current.isDown = !0, m.current.clickX = V, m.current.clickY = K, M.setMouse(V, K, V, K);
|
|
1500
1506
|
},
|
|
1501
|
-
[
|
|
1502
|
-
),
|
|
1503
|
-
|
|
1504
|
-
}, [
|
|
1505
|
-
return s ? /* @__PURE__ */
|
|
1507
|
+
[R]
|
|
1508
|
+
), z = D(() => {
|
|
1509
|
+
R && (m.current.isDown = !1, m.current.clickX = -Math.abs(m.current.clickX));
|
|
1510
|
+
}, [R]);
|
|
1511
|
+
return s ? /* @__PURE__ */ w.jsx(
|
|
1506
1512
|
"canvas",
|
|
1507
1513
|
{
|
|
1508
1514
|
ref: i,
|
|
1509
1515
|
"data-ikon-node-id": s.id,
|
|
1510
1516
|
"data-ikon-source": s.sourceMarker,
|
|
1511
|
-
className:
|
|
1512
|
-
...
|
|
1517
|
+
className: U,
|
|
1518
|
+
...v ? { width: v } : {},
|
|
1513
1519
|
...T ? { height: T } : {},
|
|
1514
|
-
onMouseMove:
|
|
1515
|
-
onMouseDown:
|
|
1516
|
-
onMouseUp:
|
|
1517
|
-
onMouseLeave:
|
|
1520
|
+
onMouseMove: ee,
|
|
1521
|
+
onMouseDown: te,
|
|
1522
|
+
onMouseUp: z,
|
|
1523
|
+
onMouseLeave: z
|
|
1518
1524
|
}
|
|
1519
1525
|
) : null;
|
|
1520
1526
|
});
|
|
1521
1527
|
return ({ type: e }) => {
|
|
1522
|
-
if (e ===
|
|
1528
|
+
if (e === Wr)
|
|
1523
1529
|
return t;
|
|
1524
1530
|
};
|
|
1525
1531
|
}
|
|
1526
|
-
const
|
|
1527
|
-
function
|
|
1528
|
-
t.registerModule(
|
|
1532
|
+
const Gr = "shadertoy", Yr = async () => Kr();
|
|
1533
|
+
function zr(t) {
|
|
1534
|
+
t.registerModule(Gr, Yr);
|
|
1529
1535
|
}
|
|
1530
|
-
const
|
|
1531
|
-
class
|
|
1536
|
+
const At = re("UIRegistry");
|
|
1537
|
+
class Xr {
|
|
1532
1538
|
baseResolvers = [];
|
|
1533
1539
|
moduleLoaders = /* @__PURE__ */ new Map();
|
|
1534
1540
|
moduleResolvers = /* @__PURE__ */ new Map();
|
|
@@ -1550,15 +1556,15 @@ class Ir {
|
|
|
1550
1556
|
for (const [r, o] of this.moduleLoaders.entries())
|
|
1551
1557
|
if (!this.moduleResolvers.has(r))
|
|
1552
1558
|
try {
|
|
1553
|
-
const s = await o(), i =
|
|
1559
|
+
const s = await o(), i = Jr(s);
|
|
1554
1560
|
this.moduleResolvers.set(r, i), e = !0;
|
|
1555
1561
|
} catch (s) {
|
|
1556
|
-
|
|
1562
|
+
At.error(`[IkonUiRegistry] Failed to load module '${r}'.`, s);
|
|
1557
1563
|
}
|
|
1558
1564
|
const n = [];
|
|
1559
1565
|
for (const r of this.moduleLoaders.keys())
|
|
1560
1566
|
this.moduleResolvers.has(r) && n.push(r);
|
|
1561
|
-
return
|
|
1567
|
+
return Zr(n, this.activeModuleOrder) || (this.activeModuleOrder = n, e = !0), e;
|
|
1562
1568
|
}
|
|
1563
1569
|
resolve(e) {
|
|
1564
1570
|
for (const n of this.baseResolvers) {
|
|
@@ -1568,7 +1574,7 @@ class Ir {
|
|
|
1568
1574
|
for (const n of this.activeModuleOrder) {
|
|
1569
1575
|
const r = this.moduleResolvers.get(n);
|
|
1570
1576
|
if (!r) {
|
|
1571
|
-
|
|
1577
|
+
At.warn(`Missing resolvers for module ${n}`);
|
|
1572
1578
|
continue;
|
|
1573
1579
|
}
|
|
1574
1580
|
for (const o of r) {
|
|
@@ -1578,17 +1584,17 @@ class Ir {
|
|
|
1578
1584
|
}
|
|
1579
1585
|
}
|
|
1580
1586
|
}
|
|
1581
|
-
function
|
|
1582
|
-
const t = new
|
|
1583
|
-
return
|
|
1587
|
+
function Hr() {
|
|
1588
|
+
const t = new Xr();
|
|
1589
|
+
return Sr(t), Nr(t), zr(t), t.loadRegisteredModules(), t;
|
|
1584
1590
|
}
|
|
1585
|
-
function
|
|
1591
|
+
function qr(t) {
|
|
1586
1592
|
return Array.isArray(t) ? t : [t];
|
|
1587
1593
|
}
|
|
1588
|
-
function
|
|
1589
|
-
return t ?
|
|
1594
|
+
function Jr(t) {
|
|
1595
|
+
return t ? qr(t).flatMap((e) => e ? Array.isArray(e) ? e.filter(Boolean) : [e] : []) : [];
|
|
1590
1596
|
}
|
|
1591
|
-
function
|
|
1597
|
+
function Zr(t, e) {
|
|
1592
1598
|
if (t.length !== e.length)
|
|
1593
1599
|
return !1;
|
|
1594
1600
|
for (let n = 0; n < t.length; n += 1)
|
|
@@ -1596,9 +1602,9 @@ function Pr(t, e) {
|
|
|
1596
1602
|
return !1;
|
|
1597
1603
|
return !0;
|
|
1598
1604
|
}
|
|
1599
|
-
function
|
|
1600
|
-
return /* @__PURE__ */
|
|
1601
|
-
|
|
1605
|
+
function Xs({ mount: t, stores: e, registry: n, client: r, onAction: o }) {
|
|
1606
|
+
return /* @__PURE__ */ w.jsx(
|
|
1607
|
+
Gt,
|
|
1602
1608
|
{
|
|
1603
1609
|
stores: e,
|
|
1604
1610
|
registry: n,
|
|
@@ -1608,7 +1614,7 @@ function Is({ mount: t, stores: e, registry: n, client: r, onAction: o }) {
|
|
|
1608
1614
|
}
|
|
1609
1615
|
);
|
|
1610
1616
|
}
|
|
1611
|
-
const
|
|
1617
|
+
const ze = re("MotionController"), Tt = {
|
|
1612
1618
|
ease: [0.25, 0.1, 0.25, 1],
|
|
1613
1619
|
"ease-in": [0.42, 0, 1, 1],
|
|
1614
1620
|
"ease-out": [0, 0, 0.58, 1],
|
|
@@ -1641,85 +1647,85 @@ const je = ne("MotionController"), ft = {
|
|
|
1641
1647
|
function F(t) {
|
|
1642
1648
|
return t <= 0 ? 0 : t >= 1 ? 1 : t;
|
|
1643
1649
|
}
|
|
1644
|
-
function
|
|
1650
|
+
function kt(t) {
|
|
1645
1651
|
if (t == null) return;
|
|
1646
1652
|
const e = `${t}`.trim();
|
|
1647
1653
|
if (!e) return;
|
|
1648
1654
|
const n = Number.parseFloat(e);
|
|
1649
1655
|
return Number.isFinite(n) ? n : void 0;
|
|
1650
1656
|
}
|
|
1651
|
-
function
|
|
1657
|
+
function Ct(t) {
|
|
1652
1658
|
return typeof CSS < "u" && CSS.escape ? CSS.escape(t) : t.replace(/[^a-zA-Z0-9_-]/g, (e) => `\\${e}`);
|
|
1653
1659
|
}
|
|
1654
|
-
function
|
|
1660
|
+
function It(t, e, n, r) {
|
|
1655
1661
|
const h = new Float32Array(11);
|
|
1656
|
-
function p
|
|
1657
|
-
return ((3 *
|
|
1662
|
+
function y(p, S, b) {
|
|
1663
|
+
return ((3 * S - 3 * b + 1) * p + (3 * b - 6 * S)) * p * p + 3 * S * p;
|
|
1658
1664
|
}
|
|
1659
|
-
function m(
|
|
1660
|
-
return 3 * (3 *
|
|
1665
|
+
function m(p, S, b) {
|
|
1666
|
+
return 3 * (3 * S - 3 * b + 1) * p * p + 2 * (3 * b - 6 * S) * p + 3 * S;
|
|
1661
1667
|
}
|
|
1662
|
-
function c(
|
|
1663
|
-
for (let
|
|
1664
|
-
const
|
|
1665
|
-
if (
|
|
1666
|
-
return
|
|
1667
|
-
const
|
|
1668
|
-
|
|
1668
|
+
function c(p, S) {
|
|
1669
|
+
for (let b = 0; b < 4; b += 1) {
|
|
1670
|
+
const R = m(S, t, n);
|
|
1671
|
+
if (R === 0)
|
|
1672
|
+
return S;
|
|
1673
|
+
const v = y(S, t, n) - p;
|
|
1674
|
+
S -= v / R;
|
|
1669
1675
|
}
|
|
1670
|
-
return
|
|
1676
|
+
return S;
|
|
1671
1677
|
}
|
|
1672
|
-
function u(
|
|
1673
|
-
let
|
|
1678
|
+
function u(p, S, b) {
|
|
1679
|
+
let R = 0, v = 0, T = 0;
|
|
1674
1680
|
do
|
|
1675
|
-
|
|
1676
|
-
while (Math.abs(
|
|
1677
|
-
return
|
|
1678
|
-
}
|
|
1679
|
-
function
|
|
1680
|
-
let
|
|
1681
|
-
const
|
|
1682
|
-
for (;
|
|
1683
|
-
|
|
1684
|
-
|
|
1685
|
-
const
|
|
1686
|
-
return
|
|
1687
|
-
}
|
|
1688
|
-
for (let
|
|
1689
|
-
h[
|
|
1690
|
-
return (
|
|
1691
|
-
}
|
|
1692
|
-
function
|
|
1681
|
+
v = S + (b - S) / 2, R = y(v, t, n) - p, R > 0 ? b = v : S = v;
|
|
1682
|
+
while (Math.abs(R) > 1e-7 && ++T < 10);
|
|
1683
|
+
return v;
|
|
1684
|
+
}
|
|
1685
|
+
function g(p) {
|
|
1686
|
+
let S = 0, b = 1;
|
|
1687
|
+
const R = 10;
|
|
1688
|
+
for (; b !== R && h[b] <= p; b += 1)
|
|
1689
|
+
S += 0.1;
|
|
1690
|
+
b -= 1;
|
|
1691
|
+
const v = (p - h[b]) / (h[b + 1] - h[b]), T = S + v * 0.1, U = m(T, t, n);
|
|
1692
|
+
return U >= 1e-3 ? c(p, T) : U === 0 ? T : u(p, S, S + 0.1);
|
|
1693
|
+
}
|
|
1694
|
+
for (let p = 0; p < 11; p += 1)
|
|
1695
|
+
h[p] = y(p * 0.1, t, n);
|
|
1696
|
+
return (p) => p <= 0 ? 0 : p >= 1 ? 1 : y(g(p), e, r);
|
|
1697
|
+
}
|
|
1698
|
+
function Qr(t) {
|
|
1693
1699
|
const e = /steps\(\s*([0-9]+)\s*(?:,\s*([a-z-]+)\s*)?\)/i.exec(t);
|
|
1694
1700
|
if (!e)
|
|
1695
1701
|
return (o) => F(o);
|
|
1696
1702
|
const n = Math.max(1, parseInt(e[1], 10)), r = (e[2] ?? "end").toLowerCase();
|
|
1697
1703
|
return r === "start" || r === "jump-start" ? (o) => F(Math.ceil(o * n) / n) : r === "none" || r === "jump-none" ? (o) => F(Math.round(o * n) / n) : r === "both" || r === "jump-both" ? (o) => F((Math.floor(o * n) + 0.5) / n) : (o) => F(Math.floor(o * n) / n);
|
|
1698
1704
|
}
|
|
1699
|
-
function
|
|
1705
|
+
function eo(t) {
|
|
1700
1706
|
if (!t)
|
|
1701
1707
|
return (n) => F(n);
|
|
1702
1708
|
const e = t.trim().toLowerCase();
|
|
1703
1709
|
if (!e || e === "linear")
|
|
1704
1710
|
return (n) => F(n);
|
|
1705
|
-
if (
|
|
1706
|
-
const [n, r, o, s] =
|
|
1711
|
+
if (Tt[e]) {
|
|
1712
|
+
const [n, r, o, s] = Tt[e], i = It(n, r, o, s);
|
|
1707
1713
|
return (a) => F(i(F(a)));
|
|
1708
1714
|
}
|
|
1709
1715
|
if (e.startsWith("cubic-bezier(") && e.endsWith(")")) {
|
|
1710
1716
|
const r = e.slice(13, -1).split(",").map((o) => Number.parseFloat(o.trim()));
|
|
1711
1717
|
if (r.length === 4 && r.every((o) => Number.isFinite(o))) {
|
|
1712
|
-
const [o, s, i, a] = r, l =
|
|
1718
|
+
const [o, s, i, a] = r, l = It(o, s, i, a);
|
|
1713
1719
|
return (d) => F(l(F(d)));
|
|
1714
1720
|
}
|
|
1715
1721
|
}
|
|
1716
1722
|
if (e.startsWith("steps(") && e.endsWith(")")) {
|
|
1717
|
-
const n =
|
|
1723
|
+
const n = Qr(e);
|
|
1718
1724
|
return (r) => n(F(r));
|
|
1719
1725
|
}
|
|
1720
1726
|
return (n) => F(n);
|
|
1721
1727
|
}
|
|
1722
|
-
function
|
|
1728
|
+
function to(t) {
|
|
1723
1729
|
if (!t)
|
|
1724
1730
|
return;
|
|
1725
1731
|
const e = /(-?\d+(?:\.\d+)?)\s*\.\.\s*(-?\d+(?:\.\d+)?)\s*->\s*(-?\d+(?:\.\d+)?)\s*\.\.\s*(-?\d+(?:\.\d+)?)/.exec(t);
|
|
@@ -1729,7 +1735,7 @@ function Ur(t) {
|
|
|
1729
1735
|
if (![n, r, o, s].some((i) => !Number.isFinite(i)))
|
|
1730
1736
|
return { inStart: n, inEnd: r, outStart: o, outEnd: s };
|
|
1731
1737
|
}
|
|
1732
|
-
class
|
|
1738
|
+
class no {
|
|
1733
1739
|
bindingsByStyle = /* @__PURE__ */ new Map();
|
|
1734
1740
|
observer;
|
|
1735
1741
|
observeScheduled = !1;
|
|
@@ -1756,7 +1762,7 @@ class jr {
|
|
|
1756
1762
|
try {
|
|
1757
1763
|
e();
|
|
1758
1764
|
} catch (n) {
|
|
1759
|
-
|
|
1765
|
+
ze.warn("Failed to cleanup binding listener", n);
|
|
1760
1766
|
}
|
|
1761
1767
|
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);
|
|
1762
1768
|
}
|
|
@@ -1766,7 +1772,7 @@ class jr {
|
|
|
1766
1772
|
const r = (JSON.parse(e).motionBindings ?? []).map((o) => this.parseBinding(o)).filter((o) => o !== void 0);
|
|
1767
1773
|
return r.length === 0 ? void 0 : { bindings: r };
|
|
1768
1774
|
} catch (n) {
|
|
1769
|
-
|
|
1775
|
+
ze.warn("Failed to parse motion metadata", n);
|
|
1770
1776
|
return;
|
|
1771
1777
|
}
|
|
1772
1778
|
}
|
|
@@ -1774,7 +1780,7 @@ class jr {
|
|
|
1774
1780
|
const n = e.source?.trim();
|
|
1775
1781
|
if (!n)
|
|
1776
1782
|
return;
|
|
1777
|
-
const r =
|
|
1783
|
+
const r = kt(e.min) ?? 0, o = kt(e.max), s = o === void 0 ? r + 100 : o, i = (e.clamp ?? "clamp").trim().toLowerCase(), a = !!e.reverse, l = eo(e.ease), d = to(e.map), h = e.targetId?.trim() || void 0;
|
|
1778
1784
|
return Number.isNaN(r) || Number.isNaN(s) ? void 0 : {
|
|
1779
1785
|
source: n.toLowerCase(),
|
|
1780
1786
|
min: r,
|
|
@@ -1832,7 +1838,7 @@ class jr {
|
|
|
1832
1838
|
const n = this.bindingsByStyle.get(e);
|
|
1833
1839
|
if (!n || typeof document > "u")
|
|
1834
1840
|
return;
|
|
1835
|
-
const r = `.${
|
|
1841
|
+
const r = `.${Ct(e)}`;
|
|
1836
1842
|
document.querySelectorAll(r).forEach((s) => this.applyStyleToElement(s, e, n));
|
|
1837
1843
|
}
|
|
1838
1844
|
applyStyleToElement(e, n, r) {
|
|
@@ -1872,7 +1878,7 @@ class jr {
|
|
|
1872
1878
|
}
|
|
1873
1879
|
resolveScrollContainer(e, n) {
|
|
1874
1880
|
if (n.targetId) {
|
|
1875
|
-
const r = `[data-ikon-motion-source="${
|
|
1881
|
+
const r = `[data-ikon-motion-source="${Ct(n.targetId)}"]`, o = typeof document < "u" ? document.querySelector(r) : null;
|
|
1876
1882
|
if (o)
|
|
1877
1883
|
return o;
|
|
1878
1884
|
}
|
|
@@ -1942,7 +1948,7 @@ class jr {
|
|
|
1942
1948
|
try {
|
|
1943
1949
|
i();
|
|
1944
1950
|
} catch (a) {
|
|
1945
|
-
|
|
1951
|
+
ze.warn("Failed to cleanup listener", a);
|
|
1946
1952
|
}
|
|
1947
1953
|
this.globalCleanups.delete(i);
|
|
1948
1954
|
}
|
|
@@ -1987,21 +1993,21 @@ class jr {
|
|
|
1987
1993
|
}
|
|
1988
1994
|
}
|
|
1989
1995
|
}
|
|
1990
|
-
const
|
|
1991
|
-
function
|
|
1992
|
-
const e =
|
|
1996
|
+
const Xe = new no();
|
|
1997
|
+
function ro(t) {
|
|
1998
|
+
const e = E(/* @__PURE__ */ new Map()), n = D(({ styleId: s, css: i, common: a }) => {
|
|
1993
1999
|
if (!(!s || typeof document > "u")) {
|
|
1994
2000
|
if (i) {
|
|
1995
2001
|
let l = e.current.get(s);
|
|
1996
2002
|
l || (l = document.createElement("style"), l.setAttribute("data-ikon-style-id", s), document.head.appendChild(l), e.current.set(s, l)), l.textContent = i;
|
|
1997
2003
|
}
|
|
1998
|
-
|
|
2004
|
+
Xe.registerStyle(s, a);
|
|
1999
2005
|
}
|
|
2000
2006
|
}, []), r = D((s) => {
|
|
2001
2007
|
if (!(typeof document > "u"))
|
|
2002
2008
|
for (const i of s) {
|
|
2003
2009
|
const a = e.current.get(i);
|
|
2004
|
-
a && (a.remove(), e.current.delete(i)),
|
|
2010
|
+
a && (a.remove(), e.current.delete(i)), Xe.unregisterStyle(i);
|
|
2005
2011
|
}
|
|
2006
2012
|
}, []), o = D(() => {
|
|
2007
2013
|
if (typeof document < "u") {
|
|
@@ -2009,9 +2015,9 @@ function Dr(t) {
|
|
|
2009
2015
|
s.remove();
|
|
2010
2016
|
e.current.clear();
|
|
2011
2017
|
}
|
|
2012
|
-
|
|
2018
|
+
Xe.reset();
|
|
2013
2019
|
}, []);
|
|
2014
|
-
return
|
|
2020
|
+
return C(() => {
|
|
2015
2021
|
if (!t) return;
|
|
2016
2022
|
for (const a of t.getUiStyles())
|
|
2017
2023
|
n(a);
|
|
@@ -2019,9 +2025,9 @@ function Dr(t) {
|
|
|
2019
2025
|
return () => {
|
|
2020
2026
|
s?.(), i?.(), o();
|
|
2021
2027
|
};
|
|
2022
|
-
}, [t, o, n, r]),
|
|
2028
|
+
}, [t, o, n, r]), C(() => () => o(), [o]), { setStyle: n, deleteStyles: r, reset: o };
|
|
2023
2029
|
}
|
|
2024
|
-
function
|
|
2030
|
+
function oo(t) {
|
|
2025
2031
|
const e = [];
|
|
2026
2032
|
for (const [n, r] of t) {
|
|
2027
2033
|
const o = r.store.getSnapshot(), s = o.rootViewId && o.views.has(o.rootViewId);
|
|
@@ -2029,62 +2035,62 @@ function $r(t) {
|
|
|
2029
2035
|
}
|
|
2030
2036
|
return e.sort(), e.join(",");
|
|
2031
2037
|
}
|
|
2032
|
-
function
|
|
2033
|
-
const [e, n] = N(), r =
|
|
2034
|
-
return
|
|
2038
|
+
function so(t) {
|
|
2039
|
+
const [e, n] = N(), r = E("");
|
|
2040
|
+
return C(() => {
|
|
2035
2041
|
if (!t) {
|
|
2036
2042
|
n(void 0), r.current = "";
|
|
2037
2043
|
return;
|
|
2038
2044
|
}
|
|
2039
2045
|
const o = () => {
|
|
2040
|
-
const s = t.getStores(), i =
|
|
2046
|
+
const s = t.getStores(), i = oo(s);
|
|
2041
2047
|
i !== r.current && (r.current = i, n(s));
|
|
2042
2048
|
};
|
|
2043
2049
|
return o(), t.subscribe(o);
|
|
2044
2050
|
}, [t]), e;
|
|
2045
2051
|
}
|
|
2046
|
-
var
|
|
2047
|
-
function
|
|
2048
|
-
var e =
|
|
2052
|
+
var io = typeof global == "object" && global && global.Object === Object && global, ao = typeof self == "object" && self && self.Object === Object && self, co = io || ao || Function("return this")(), Le = co.Symbol, Jt = Object.prototype, lo = Jt.hasOwnProperty, uo = Jt.toString, be = Le ? Le.toStringTag : void 0;
|
|
2053
|
+
function fo(t) {
|
|
2054
|
+
var e = lo.call(t, be), n = t[be];
|
|
2049
2055
|
try {
|
|
2050
|
-
t[
|
|
2056
|
+
t[be] = void 0;
|
|
2051
2057
|
var r = !0;
|
|
2052
2058
|
} catch {
|
|
2053
2059
|
}
|
|
2054
|
-
var o =
|
|
2055
|
-
return r && (e ? t[
|
|
2060
|
+
var o = uo.call(t);
|
|
2061
|
+
return r && (e ? t[be] = n : delete t[be]), o;
|
|
2056
2062
|
}
|
|
2057
|
-
var
|
|
2058
|
-
function
|
|
2059
|
-
return
|
|
2063
|
+
var ho = Object.prototype, po = ho.toString;
|
|
2064
|
+
function mo(t) {
|
|
2065
|
+
return po.call(t);
|
|
2060
2066
|
}
|
|
2061
|
-
var
|
|
2062
|
-
function
|
|
2063
|
-
return t == null ? t === void 0 ?
|
|
2067
|
+
var go = "[object Null]", yo = "[object Undefined]", _t = Le ? Le.toStringTag : void 0;
|
|
2068
|
+
function bo(t) {
|
|
2069
|
+
return t == null ? t === void 0 ? yo : go : _t && _t in Object(t) ? fo(t) : mo(t);
|
|
2064
2070
|
}
|
|
2065
|
-
function
|
|
2071
|
+
function So(t) {
|
|
2066
2072
|
return t != null && typeof t == "object";
|
|
2067
2073
|
}
|
|
2068
|
-
var
|
|
2069
|
-
function
|
|
2070
|
-
return typeof t == "string" || !
|
|
2074
|
+
var wo = Array.isArray, vo = "[object String]";
|
|
2075
|
+
function Eo(t) {
|
|
2076
|
+
return typeof t == "string" || !wo(t) && So(t) && bo(t) == vo;
|
|
2071
2077
|
}
|
|
2072
|
-
const
|
|
2073
|
-
function
|
|
2078
|
+
const Ot = "ikonUiModules";
|
|
2079
|
+
function ot(t) {
|
|
2074
2080
|
return typeof t == "object" && t !== null && !Array.isArray(t);
|
|
2075
2081
|
}
|
|
2076
|
-
function
|
|
2082
|
+
function Ro(t) {
|
|
2077
2083
|
if (!Array.isArray(t))
|
|
2078
2084
|
return;
|
|
2079
2085
|
const e = /* @__PURE__ */ new Set();
|
|
2080
2086
|
for (const n of t) {
|
|
2081
|
-
if (!
|
|
2087
|
+
if (!Eo(n)) continue;
|
|
2082
2088
|
const r = n.trim();
|
|
2083
2089
|
r && (e.has(r) || e.add(r));
|
|
2084
2090
|
}
|
|
2085
2091
|
return Array.from(e);
|
|
2086
2092
|
}
|
|
2087
|
-
function
|
|
2093
|
+
function Hs(t, e) {
|
|
2088
2094
|
if (t === e)
|
|
2089
2095
|
return !0;
|
|
2090
2096
|
if (!t || !e)
|
|
@@ -2096,19 +2102,19 @@ function Os(t, e) {
|
|
|
2096
2102
|
return !1;
|
|
2097
2103
|
return !0;
|
|
2098
2104
|
}
|
|
2099
|
-
function
|
|
2100
|
-
if (!(!
|
|
2101
|
-
return
|
|
2105
|
+
function Ao(t) {
|
|
2106
|
+
if (!(!ot(t) || !Object.prototype.hasOwnProperty.call(t, Ot)))
|
|
2107
|
+
return Ro(t[Ot]);
|
|
2102
2108
|
}
|
|
2103
|
-
function
|
|
2109
|
+
function qs(...t) {
|
|
2104
2110
|
for (const e of t) {
|
|
2105
|
-
const n =
|
|
2111
|
+
const n = Ao(e);
|
|
2106
2112
|
if (n !== void 0)
|
|
2107
2113
|
return n;
|
|
2108
2114
|
}
|
|
2109
2115
|
}
|
|
2110
|
-
function
|
|
2111
|
-
if (!
|
|
2116
|
+
function Js(t) {
|
|
2117
|
+
if (!ot(t))
|
|
2112
2118
|
return;
|
|
2113
2119
|
const e = t, n = Object.keys(e).find((l) => l.toLowerCase() === "modules");
|
|
2114
2120
|
if (!n)
|
|
@@ -2121,24 +2127,24 @@ function xs(t) {
|
|
|
2121
2127
|
const o = [], s = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Set();
|
|
2122
2128
|
for (const l of r) {
|
|
2123
2129
|
if (typeof l == "string") {
|
|
2124
|
-
const
|
|
2125
|
-
if (!
|
|
2130
|
+
const g = l.trim();
|
|
2131
|
+
if (!g || i.has(g))
|
|
2126
2132
|
continue;
|
|
2127
|
-
o.push(
|
|
2133
|
+
o.push(g), i.add(g);
|
|
2128
2134
|
continue;
|
|
2129
2135
|
}
|
|
2130
|
-
if (!
|
|
2136
|
+
if (!ot(l))
|
|
2131
2137
|
continue;
|
|
2132
|
-
const d = l, h = Object.keys(d).find((
|
|
2138
|
+
const d = l, h = Object.keys(d).find((g) => g.toLowerCase() === "name");
|
|
2133
2139
|
if (!h)
|
|
2134
2140
|
continue;
|
|
2135
|
-
const
|
|
2136
|
-
if (typeof
|
|
2141
|
+
const y = d[h];
|
|
2142
|
+
if (typeof y != "string")
|
|
2137
2143
|
continue;
|
|
2138
|
-
const m =
|
|
2144
|
+
const m = y.trim();
|
|
2139
2145
|
if (!m)
|
|
2140
2146
|
continue;
|
|
2141
|
-
const c = Object.keys(d).find((
|
|
2147
|
+
const c = Object.keys(d).find((g) => g.toLowerCase() === "javascript"), u = c ? d[c] : void 0;
|
|
2142
2148
|
typeof u == "string" && s.set(m, u), i.has(m) || (o.push(m), i.add(m));
|
|
2143
2149
|
}
|
|
2144
2150
|
if (!o.length && s.size === 0)
|
|
@@ -2156,7 +2162,7 @@ const k = {
|
|
|
2156
2162
|
Line: 4,
|
|
2157
2163
|
Paragraph: 8,
|
|
2158
2164
|
Emoji: 16
|
|
2159
|
-
},
|
|
2165
|
+
}, To = [
|
|
2160
2166
|
{
|
|
2161
2167
|
flag: k.Letter,
|
|
2162
2168
|
hints: [
|
|
@@ -2205,42 +2211,42 @@ const k = {
|
|
|
2205
2211
|
"[data-emoji]"
|
|
2206
2212
|
]
|
|
2207
2213
|
}
|
|
2208
|
-
],
|
|
2209
|
-
function
|
|
2210
|
-
if (!t || t.length >
|
|
2214
|
+
], st = k.Letter | k.Word | k.Line | k.Paragraph | k.Emoji, ko = k.Letter | k.Word | k.Line | k.Paragraph, Nt = /* @__PURE__ */ new Map(), Co = 16384;
|
|
2215
|
+
function Zs(t, e) {
|
|
2216
|
+
if (!t || t.length > Co)
|
|
2211
2217
|
return t;
|
|
2212
|
-
const n =
|
|
2218
|
+
const n = Ko(e), r = fe(n, k.Emoji), o = n & ko;
|
|
2213
2219
|
if (o === k.None && !r)
|
|
2214
2220
|
return t;
|
|
2215
2221
|
const s = t.replace(/\r\n/g, `
|
|
2216
2222
|
`).replace(/\r/g, `
|
|
2217
2223
|
`);
|
|
2218
2224
|
if (o === k.None)
|
|
2219
|
-
return
|
|
2220
|
-
const i =
|
|
2225
|
+
return Ut(s);
|
|
2226
|
+
const i = Vo(s);
|
|
2221
2227
|
if (i.length === 0)
|
|
2222
|
-
return r ?
|
|
2223
|
-
const a =
|
|
2228
|
+
return r ? Ut(s) : t;
|
|
2229
|
+
const a = Wo(i), l = { letter: 0, word: 0, line: 0, paragraph: 0, br: 0, emoji: 0 }, d = [];
|
|
2224
2230
|
for (const h of a) {
|
|
2225
|
-
const
|
|
2226
|
-
d.push(...
|
|
2231
|
+
const y = Io(h, n, l);
|
|
2232
|
+
d.push(...y);
|
|
2227
2233
|
}
|
|
2228
2234
|
return d;
|
|
2229
2235
|
}
|
|
2230
|
-
function
|
|
2236
|
+
function Io(t, e, n) {
|
|
2231
2237
|
const r = [];
|
|
2232
2238
|
for (const o of t) {
|
|
2233
|
-
const s =
|
|
2239
|
+
const s = _o(o, e, n);
|
|
2234
2240
|
r.push(...s);
|
|
2235
2241
|
}
|
|
2236
|
-
if (
|
|
2242
|
+
if (fe(e, k.Paragraph)) {
|
|
2237
2243
|
const o = n.paragraph++;
|
|
2238
2244
|
return [
|
|
2239
|
-
/* @__PURE__ */
|
|
2245
|
+
/* @__PURE__ */ w.jsx(
|
|
2240
2246
|
"span",
|
|
2241
2247
|
{
|
|
2242
2248
|
"data-motion-paragraph": !0,
|
|
2243
|
-
style:
|
|
2249
|
+
style: je(o),
|
|
2244
2250
|
children: r
|
|
2245
2251
|
},
|
|
2246
2252
|
`motion-paragraph-${o}`
|
|
@@ -2249,116 +2255,116 @@ function co(t, e, n) {
|
|
|
2249
2255
|
}
|
|
2250
2256
|
return r;
|
|
2251
2257
|
}
|
|
2252
|
-
function
|
|
2253
|
-
const r =
|
|
2254
|
-
if (
|
|
2258
|
+
function _o(t, e, n) {
|
|
2259
|
+
const r = Oo(t.text, e, n), o = [];
|
|
2260
|
+
if (fe(e, k.Line)) {
|
|
2255
2261
|
const s = n.line++;
|
|
2256
2262
|
o.push(
|
|
2257
|
-
/* @__PURE__ */
|
|
2263
|
+
/* @__PURE__ */ w.jsx("span", { "data-motion-line": !0, style: je(s), children: r }, `motion-line-${s}`)
|
|
2258
2264
|
);
|
|
2259
2265
|
} else
|
|
2260
2266
|
o.push(...r);
|
|
2261
2267
|
for (let s = 0; s < t.breaks; s++)
|
|
2262
|
-
o.push(/* @__PURE__ */
|
|
2268
|
+
o.push(/* @__PURE__ */ w.jsx("br", {}, `motion-break-${n.br++}`));
|
|
2263
2269
|
return o;
|
|
2264
2270
|
}
|
|
2265
|
-
function
|
|
2271
|
+
function Oo(t, e, n) {
|
|
2266
2272
|
if (!t)
|
|
2267
2273
|
return [];
|
|
2268
|
-
const r =
|
|
2274
|
+
const r = fe(e, k.Word), o = [], s = /(\s+)/g;
|
|
2269
2275
|
let i = 0, a;
|
|
2270
2276
|
for (; (a = s.exec(t)) !== null; ) {
|
|
2271
2277
|
if (a.index > i) {
|
|
2272
2278
|
const l = t.slice(i, a.index);
|
|
2273
|
-
o.push(
|
|
2279
|
+
o.push(xt(l, n, e, r));
|
|
2274
2280
|
}
|
|
2275
2281
|
o.push(a[0]), i = a.index + a[0].length;
|
|
2276
2282
|
}
|
|
2277
2283
|
if (i < t.length) {
|
|
2278
2284
|
const l = t.slice(i);
|
|
2279
|
-
o.push(
|
|
2285
|
+
o.push(xt(l, n, e, r));
|
|
2280
2286
|
}
|
|
2281
2287
|
return o;
|
|
2282
2288
|
}
|
|
2283
|
-
function
|
|
2284
|
-
const o = e.word++, s =
|
|
2285
|
-
return r ? /* @__PURE__ */
|
|
2289
|
+
function xt(t, e, n, r) {
|
|
2290
|
+
const o = e.word++, s = xo(t, n, e), i = `motion-word-${o}`, a = No(o, r);
|
|
2291
|
+
return r ? /* @__PURE__ */ w.jsx("span", { "data-motion-word": !0, style: a, children: s }, i) : /* @__PURE__ */ w.jsx("span", { style: a, children: s }, i);
|
|
2286
2292
|
}
|
|
2287
|
-
function
|
|
2288
|
-
return e ? { ...
|
|
2293
|
+
function No(t, e) {
|
|
2294
|
+
return e ? { ...je(t), whiteSpace: "nowrap" } : { whiteSpace: "nowrap" };
|
|
2289
2295
|
}
|
|
2290
|
-
function
|
|
2296
|
+
function xo(t, e, n) {
|
|
2291
2297
|
if (!t)
|
|
2292
2298
|
return [];
|
|
2293
|
-
const r =
|
|
2299
|
+
const r = fe(e, k.Letter), o = fe(e, k.Emoji);
|
|
2294
2300
|
if (!r) {
|
|
2295
2301
|
if (!o)
|
|
2296
2302
|
return [t];
|
|
2297
|
-
const a =
|
|
2303
|
+
const a = it(t);
|
|
2298
2304
|
if (a.length === 0)
|
|
2299
2305
|
return [t];
|
|
2300
|
-
const { nodes: l } =
|
|
2306
|
+
const { nodes: l } = Qt(a, n);
|
|
2301
2307
|
return l;
|
|
2302
2308
|
}
|
|
2303
|
-
const s = [], i =
|
|
2309
|
+
const s = [], i = it(t);
|
|
2304
2310
|
for (const a of i) {
|
|
2305
|
-
const l = n.letter++, d = `motion-letter-${l}`, h =
|
|
2311
|
+
const l = n.letter++, d = `motion-letter-${l}`, h = je(l);
|
|
2306
2312
|
if (a === `
|
|
2307
2313
|
`) {
|
|
2308
2314
|
s.push(
|
|
2309
|
-
/* @__PURE__ */
|
|
2315
|
+
/* @__PURE__ */ w.jsx("span", { "data-motion-letter": !0, style: h, children: /* @__PURE__ */ w.jsx("br", {}) }, d)
|
|
2310
2316
|
);
|
|
2311
2317
|
continue;
|
|
2312
2318
|
}
|
|
2313
|
-
const m = o &&
|
|
2319
|
+
const m = o && Zt(a) ? { "data-motion-emoji": !0 } : void 0, c = a === " " ? " " : a;
|
|
2314
2320
|
s.push(
|
|
2315
|
-
/* @__PURE__ */
|
|
2321
|
+
/* @__PURE__ */ w.jsx("span", { "data-motion-letter": !0, style: h, ...m, children: c }, d)
|
|
2316
2322
|
);
|
|
2317
2323
|
}
|
|
2318
2324
|
return s;
|
|
2319
2325
|
}
|
|
2320
|
-
function
|
|
2326
|
+
function it(t) {
|
|
2321
2327
|
if (!t)
|
|
2322
2328
|
return [];
|
|
2323
|
-
const e =
|
|
2324
|
-
return e ? Array.from(e.segment(t), (n) => n.segment) :
|
|
2329
|
+
const e = Po();
|
|
2330
|
+
return e ? Array.from(e.segment(t), (n) => n.segment) : Lo(t);
|
|
2325
2331
|
}
|
|
2326
|
-
let
|
|
2327
|
-
function
|
|
2328
|
-
return
|
|
2332
|
+
let Se;
|
|
2333
|
+
function Po() {
|
|
2334
|
+
return Se !== void 0 || (typeof Intl < "u" && typeof Intl.Segmenter == "function" ? Se = new Intl.Segmenter(void 0, { granularity: "grapheme" }) : Se = null), Se;
|
|
2329
2335
|
}
|
|
2330
|
-
function
|
|
2336
|
+
function Lo(t) {
|
|
2331
2337
|
const e = [], n = Array.from(t);
|
|
2332
2338
|
let r = "";
|
|
2333
2339
|
for (let o = 0; o < n.length; o++) {
|
|
2334
2340
|
const s = n[o], i = n[o + 1];
|
|
2335
|
-
r += s, !(i &&
|
|
2341
|
+
r += s, !(i && Uo(s, i)) && (e.push(r), r = "");
|
|
2336
2342
|
}
|
|
2337
2343
|
return r && e.push(r), e;
|
|
2338
2344
|
}
|
|
2339
|
-
function
|
|
2340
|
-
return e ? !!(
|
|
2345
|
+
function Uo(t, e) {
|
|
2346
|
+
return e ? !!(Pt(t) || Pt(e) || Do(e) || Mo(e) || jo(e) || Lt(t) && Lt(e)) : !1;
|
|
2341
2347
|
}
|
|
2342
|
-
function
|
|
2348
|
+
function Pt(t) {
|
|
2343
2349
|
return t.codePointAt(0) === 8205;
|
|
2344
2350
|
}
|
|
2345
|
-
function
|
|
2351
|
+
function Mo(t) {
|
|
2346
2352
|
const e = t.codePointAt(0);
|
|
2347
2353
|
return e === void 0 ? !1 : e >= 65024 && e <= 65039 || e >= 917760 && e <= 917999;
|
|
2348
2354
|
}
|
|
2349
|
-
function
|
|
2355
|
+
function jo(t) {
|
|
2350
2356
|
const e = t.codePointAt(0);
|
|
2351
2357
|
return e === void 0 ? !1 : e >= 127995 && e <= 127999;
|
|
2352
2358
|
}
|
|
2353
|
-
function
|
|
2359
|
+
function Lt(t) {
|
|
2354
2360
|
const e = t.codePointAt(0);
|
|
2355
2361
|
return e === void 0 ? !1 : e >= 127462 && e <= 127487;
|
|
2356
2362
|
}
|
|
2357
|
-
let
|
|
2358
|
-
function
|
|
2359
|
-
return t ? (
|
|
2363
|
+
let He;
|
|
2364
|
+
function Do(t) {
|
|
2365
|
+
return t ? (He || (He = $o()), He(t)) : !1;
|
|
2360
2366
|
}
|
|
2361
|
-
function
|
|
2367
|
+
function $o() {
|
|
2362
2368
|
try {
|
|
2363
2369
|
const t = new RegExp("\\p{Mark}", "u");
|
|
2364
2370
|
return (e) => t.test(e);
|
|
@@ -2369,19 +2375,19 @@ function So() {
|
|
|
2369
2375
|
};
|
|
2370
2376
|
}
|
|
2371
2377
|
}
|
|
2372
|
-
let
|
|
2373
|
-
function
|
|
2374
|
-
return t ? (
|
|
2378
|
+
let qe;
|
|
2379
|
+
function Zt(t) {
|
|
2380
|
+
return t ? (qe || (qe = Bo()), qe(t)) : !1;
|
|
2375
2381
|
}
|
|
2376
|
-
function
|
|
2382
|
+
function Bo() {
|
|
2377
2383
|
try {
|
|
2378
2384
|
const t = new RegExp("\\p{Extended_Pictographic}", "u");
|
|
2379
2385
|
return (e) => t.test(e);
|
|
2380
2386
|
} catch {
|
|
2381
|
-
return
|
|
2387
|
+
return Fo;
|
|
2382
2388
|
}
|
|
2383
2389
|
}
|
|
2384
|
-
function
|
|
2390
|
+
function Fo(t) {
|
|
2385
2391
|
if (!t)
|
|
2386
2392
|
return !1;
|
|
2387
2393
|
for (const e of Array.from(t)) {
|
|
@@ -2391,7 +2397,7 @@ function vo(t) {
|
|
|
2391
2397
|
}
|
|
2392
2398
|
return !1;
|
|
2393
2399
|
}
|
|
2394
|
-
function
|
|
2400
|
+
function Vo(t) {
|
|
2395
2401
|
const e = [];
|
|
2396
2402
|
let n = "", r = 0;
|
|
2397
2403
|
for (let o = 0; o < t.length; o++) {
|
|
@@ -2405,7 +2411,7 @@ function Ro(t) {
|
|
|
2405
2411
|
}
|
|
2406
2412
|
return (r > 0 || n.length > 0) && e.push({ text: n, breaks: r }), e;
|
|
2407
2413
|
}
|
|
2408
|
-
function
|
|
2414
|
+
function Wo(t) {
|
|
2409
2415
|
if (t.length === 0)
|
|
2410
2416
|
return [];
|
|
2411
2417
|
const e = [];
|
|
@@ -2414,10 +2420,10 @@ function Ao(t) {
|
|
|
2414
2420
|
n.push(r), r.breaks >= 2 && (e.push(n), n = []);
|
|
2415
2421
|
return n.length > 0 && e.push(n), e;
|
|
2416
2422
|
}
|
|
2417
|
-
function
|
|
2423
|
+
function fe(t, e) {
|
|
2418
2424
|
return (t & e) === e;
|
|
2419
2425
|
}
|
|
2420
|
-
function
|
|
2426
|
+
function je(t) {
|
|
2421
2427
|
return {
|
|
2422
2428
|
"--tw-motion-seq-index": t.toString(),
|
|
2423
2429
|
backgroundColor: "inherit",
|
|
@@ -2434,27 +2440,27 @@ function xe(t) {
|
|
|
2434
2440
|
WebkitTextFillColor: "inherit"
|
|
2435
2441
|
};
|
|
2436
2442
|
}
|
|
2437
|
-
function
|
|
2443
|
+
function Ut(t) {
|
|
2438
2444
|
if (!t)
|
|
2439
2445
|
return t;
|
|
2440
|
-
const e =
|
|
2446
|
+
const e = it(t);
|
|
2441
2447
|
if (e.length === 0)
|
|
2442
2448
|
return t;
|
|
2443
|
-
const { nodes: n, sawEmoji: r } =
|
|
2449
|
+
const { nodes: n, sawEmoji: r } = Qt(e);
|
|
2444
2450
|
return r ? n.length === 1 ? n[0] ?? t : n : t;
|
|
2445
2451
|
}
|
|
2446
|
-
function
|
|
2452
|
+
function Qt(t, e) {
|
|
2447
2453
|
const n = [];
|
|
2448
2454
|
let r = "", o = !1, s = e?.emoji ?? 0;
|
|
2449
2455
|
const i = () => {
|
|
2450
2456
|
r && (n.push(r), r = "");
|
|
2451
2457
|
};
|
|
2452
2458
|
for (const a of t) {
|
|
2453
|
-
if (
|
|
2459
|
+
if (Zt(a)) {
|
|
2454
2460
|
o = !0, i();
|
|
2455
2461
|
const d = `motion-emoji-${e ? e.emoji++ : s++}`;
|
|
2456
2462
|
n.push(
|
|
2457
|
-
/* @__PURE__ */
|
|
2463
|
+
/* @__PURE__ */ w.jsx("span", { "data-motion-emoji": !0, children: a }, d)
|
|
2458
2464
|
);
|
|
2459
2465
|
continue;
|
|
2460
2466
|
}
|
|
@@ -2462,13 +2468,13 @@ function $t(t, e) {
|
|
|
2462
2468
|
}
|
|
2463
2469
|
return i(), o ? { nodes: n, sawEmoji: !0 } : { nodes: [t.join("")], sawEmoji: !1 };
|
|
2464
2470
|
}
|
|
2465
|
-
function
|
|
2471
|
+
function Ko(t) {
|
|
2466
2472
|
if (!t)
|
|
2467
2473
|
return k.None;
|
|
2468
2474
|
const e = t.trim();
|
|
2469
2475
|
if (!e)
|
|
2470
2476
|
return k.None;
|
|
2471
|
-
const n =
|
|
2477
|
+
const n = Nt.get(e);
|
|
2472
2478
|
if (typeof n == "number")
|
|
2473
2479
|
return n;
|
|
2474
2480
|
if (typeof document > "u")
|
|
@@ -2476,8 +2482,8 @@ function To(t) {
|
|
|
2476
2482
|
const r = e.split(/\s+/).filter(Boolean);
|
|
2477
2483
|
if (r.length === 0)
|
|
2478
2484
|
return k.None;
|
|
2479
|
-
const s = r.map((l) => `.${
|
|
2480
|
-
(l) => new RegExp(`(^|[^a-zA-Z0-9_-])${
|
|
2485
|
+
const s = r.map((l) => `.${Go(l)}`).map(
|
|
2486
|
+
(l) => new RegExp(`(^|[^a-zA-Z0-9_-])${Yo(l)}(?![a-zA-Z0-9_-])`)
|
|
2481
2487
|
);
|
|
2482
2488
|
let i = k.None, a = !1;
|
|
2483
2489
|
for (const l of Array.from(document.styleSheets)) {
|
|
@@ -2487,14 +2493,14 @@ function To(t) {
|
|
|
2487
2493
|
} catch {
|
|
2488
2494
|
continue;
|
|
2489
2495
|
}
|
|
2490
|
-
const h =
|
|
2491
|
-
if (h.mask && (i |= h.mask, i ===
|
|
2496
|
+
const h = en(d, s);
|
|
2497
|
+
if (h.mask && (i |= h.mask, i === st))
|
|
2492
2498
|
break;
|
|
2493
2499
|
a ||= h.sawStyleRule;
|
|
2494
2500
|
}
|
|
2495
|
-
return (i !== k.None || a) &&
|
|
2501
|
+
return (i !== k.None || a) && Nt.set(e, i), i;
|
|
2496
2502
|
}
|
|
2497
|
-
function
|
|
2503
|
+
function en(t, e) {
|
|
2498
2504
|
if (!t)
|
|
2499
2505
|
return { mask: k.None, sawStyleRule: !1 };
|
|
2500
2506
|
let n = k.None, r = !1;
|
|
@@ -2505,13 +2511,13 @@ function Bt(t, e) {
|
|
|
2505
2511
|
const a = s.selectorText ?? "";
|
|
2506
2512
|
if (!a || !e.some((d) => d.test(a))) continue;
|
|
2507
2513
|
r = !0;
|
|
2508
|
-
for (const d of
|
|
2514
|
+
for (const d of To)
|
|
2509
2515
|
d.hints.some((h) => a.includes(h)) && (n |= d.flag);
|
|
2510
|
-
if (n ===
|
|
2516
|
+
if (n === st)
|
|
2511
2517
|
return { mask: n, sawStyleRule: !0 };
|
|
2512
2518
|
} else if ("cssRules" in s) {
|
|
2513
|
-
const i =
|
|
2514
|
-
if (i.mask && (n |= i.mask, n ===
|
|
2519
|
+
const i = en(s.cssRules, e);
|
|
2520
|
+
if (i.mask && (n |= i.mask, n === st))
|
|
2515
2521
|
return { mask: n, sawStyleRule: !0 };
|
|
2516
2522
|
r ||= i.sawStyleRule;
|
|
2517
2523
|
}
|
|
@@ -2519,48 +2525,48 @@ function Bt(t, e) {
|
|
|
2519
2525
|
}
|
|
2520
2526
|
return { mask: n, sawStyleRule: r };
|
|
2521
2527
|
}
|
|
2522
|
-
function
|
|
2528
|
+
function Go(t) {
|
|
2523
2529
|
return typeof CSS < "u" && typeof CSS.escape == "function" ? CSS.escape(t) : t.replace(/[^a-zA-Z0-9_-]/g, (e) => `\\${e}`);
|
|
2524
2530
|
}
|
|
2525
|
-
function
|
|
2531
|
+
function Yo(t) {
|
|
2526
2532
|
return t.replace(/[.*+?^${}()|[\]\\]/g, (e) => `\\${e}`);
|
|
2527
2533
|
}
|
|
2528
|
-
const
|
|
2529
|
-
function
|
|
2534
|
+
const dt = "ikon_auth_session", zo = 10080 * 60 * 1e3, Xo = 60 * 1e3;
|
|
2535
|
+
function Ho(t) {
|
|
2530
2536
|
try {
|
|
2531
2537
|
const e = t.split(".");
|
|
2532
2538
|
if (e.length !== 3) return !0;
|
|
2533
2539
|
const n = e[1].replace(/-/g, "+").replace(/_/g, "/"), r = n + "=".repeat((4 - n.length % 4) % 4), o = JSON.parse(atob(r));
|
|
2534
|
-
return typeof o.exp != "number" ? !1 : Date.now() >= o.exp * 1e3 -
|
|
2540
|
+
return typeof o.exp != "number" ? !1 : Date.now() >= o.exp * 1e3 - Xo;
|
|
2535
2541
|
} catch {
|
|
2536
2542
|
return !0;
|
|
2537
2543
|
}
|
|
2538
2544
|
}
|
|
2539
|
-
function
|
|
2545
|
+
function Ee(t) {
|
|
2540
2546
|
try {
|
|
2541
|
-
localStorage.setItem(
|
|
2547
|
+
localStorage.setItem(dt, JSON.stringify(t));
|
|
2542
2548
|
} catch {
|
|
2543
2549
|
console.warn("Failed to save auth session to localStorage");
|
|
2544
2550
|
}
|
|
2545
2551
|
}
|
|
2546
|
-
function
|
|
2552
|
+
function tn() {
|
|
2547
2553
|
try {
|
|
2548
|
-
const t = localStorage.getItem(
|
|
2554
|
+
const t = localStorage.getItem(dt);
|
|
2549
2555
|
if (!t) return null;
|
|
2550
2556
|
const e = JSON.parse(t);
|
|
2551
|
-
return Date.now() - e.authenticatedAt >
|
|
2557
|
+
return Date.now() - e.authenticatedAt > zo || Ho(e.token) ? (Ue(), null) : e;
|
|
2552
2558
|
} catch {
|
|
2553
2559
|
return console.warn("Failed to load auth session from localStorage"), null;
|
|
2554
2560
|
}
|
|
2555
2561
|
}
|
|
2556
|
-
function
|
|
2562
|
+
function Ue() {
|
|
2557
2563
|
try {
|
|
2558
|
-
localStorage.removeItem(
|
|
2564
|
+
localStorage.removeItem(dt);
|
|
2559
2565
|
} catch {
|
|
2560
2566
|
console.warn("Failed to clear auth session from localStorage");
|
|
2561
2567
|
}
|
|
2562
2568
|
}
|
|
2563
|
-
function
|
|
2569
|
+
function le(t) {
|
|
2564
2570
|
return {
|
|
2565
2571
|
id: "",
|
|
2566
2572
|
provider: t.provider,
|
|
@@ -2568,51 +2574,51 @@ function se(t) {
|
|
|
2568
2574
|
authenticatedAt: t.authenticatedAt
|
|
2569
2575
|
};
|
|
2570
2576
|
}
|
|
2571
|
-
const
|
|
2572
|
-
async function
|
|
2577
|
+
const nn = 15e3, we = re("AuthService");
|
|
2578
|
+
async function Mt(t) {
|
|
2573
2579
|
try {
|
|
2574
2580
|
return await fetch(t, { method: "GET", mode: "no-cors" }), "no-cors probe SUCCEEDED → origin is reachable; the failure is most likely CORS (missing/!allowed Access-Control headers)";
|
|
2575
2581
|
} catch (e) {
|
|
2576
2582
|
return `no-cors probe ALSO FAILED (${e instanceof Error ? e.name : "Error"}) → origin is unreachable: TLS handshake / certificate, DNS, or network (old browser may not trust this host's cert)`;
|
|
2577
2583
|
}
|
|
2578
2584
|
}
|
|
2579
|
-
async function
|
|
2580
|
-
const n =
|
|
2585
|
+
async function rn(t, e) {
|
|
2586
|
+
const n = On(), r = {
|
|
2581
2587
|
method: "POST",
|
|
2582
2588
|
headers: { "Content-Type": "application/json" },
|
|
2583
2589
|
body: JSON.stringify({ deviceId: n, space: t })
|
|
2584
2590
|
}, o = typeof window < "u" ? window.location.origin : "?", s = `${e}/anonymous`;
|
|
2585
|
-
|
|
2591
|
+
we.info(`Anonymous auth: POST ${s} (space=${t}, origin=${o})`);
|
|
2586
2592
|
let i;
|
|
2587
2593
|
try {
|
|
2588
2594
|
i = await fetch(s, r);
|
|
2589
2595
|
} catch (d) {
|
|
2590
|
-
const h = d instanceof Error ? `${d.name}: ${d.message}` : String(d),
|
|
2596
|
+
const h = d instanceof Error ? `${d.name}: ${d.message}` : String(d), y = Nn(), m = y ? `${y}/anonymous` : null;
|
|
2591
2597
|
if (m && m !== s) {
|
|
2592
|
-
|
|
2598
|
+
we.warn(`Anonymous auth could not reach ${s} (${h}); falling back to same-origin ${m}`);
|
|
2593
2599
|
try {
|
|
2594
2600
|
i = await fetch(m, r);
|
|
2595
2601
|
} catch (c) {
|
|
2596
|
-
const u = c instanceof Error ? `${c.name}: ${c.message}` : String(c),
|
|
2597
|
-
throw
|
|
2602
|
+
const u = c instanceof Error ? `${c.name}: ${c.message}` : String(c), g = await Mt(e);
|
|
2603
|
+
throw we.error(`Anonymous auth failed on both direct (${s}: ${h}) and same-origin (${m}: ${u}). ${g}`), new Error(`Anonymous auth unreachable: direct ${s} (${h}) and same-origin ${m} (${u})`);
|
|
2598
2604
|
}
|
|
2599
2605
|
} else {
|
|
2600
|
-
const c = await
|
|
2601
|
-
throw
|
|
2606
|
+
const c = await Mt(e);
|
|
2607
|
+
throw we.error(`Anonymous auth fetch threw for ${s} — ${h}. ${c}`), new Error(`Anonymous auth could not reach ${s} (${h}). ${c}`);
|
|
2602
2608
|
}
|
|
2603
2609
|
}
|
|
2604
2610
|
if (!i.ok) {
|
|
2605
2611
|
const d = await i.text().catch(() => "Unknown error");
|
|
2606
|
-
throw
|
|
2612
|
+
throw we.error(`Anonymous auth HTTP ${i.status} from ${i.url}: ${d}`), new Error(`Anonymous auth failed: ${i.status} ${d}`);
|
|
2607
2613
|
}
|
|
2608
2614
|
const { token: a } = await i.json(), l = {
|
|
2609
2615
|
token: a,
|
|
2610
2616
|
provider: "anonymous",
|
|
2611
2617
|
authenticatedAt: Date.now()
|
|
2612
2618
|
};
|
|
2613
|
-
return
|
|
2619
|
+
return Ee(l), l;
|
|
2614
2620
|
}
|
|
2615
|
-
async function
|
|
2621
|
+
async function qo({ email: t, spaceId: e, authUrl: n }) {
|
|
2616
2622
|
const r = await fetch(`${n}/email/send`, {
|
|
2617
2623
|
method: "POST",
|
|
2618
2624
|
headers: { "Content-Type": "application/json" },
|
|
@@ -2620,14 +2626,14 @@ async function No({ email: t, spaceId: e, authUrl: n }) {
|
|
|
2620
2626
|
email: t.trim(),
|
|
2621
2627
|
space: e
|
|
2622
2628
|
}),
|
|
2623
|
-
signal:
|
|
2629
|
+
signal: Vt(nn)
|
|
2624
2630
|
});
|
|
2625
2631
|
if (!r.ok) {
|
|
2626
2632
|
const o = await r.text().catch(() => "Failed to send login code");
|
|
2627
2633
|
throw new Error(o);
|
|
2628
2634
|
}
|
|
2629
2635
|
}
|
|
2630
|
-
async function
|
|
2636
|
+
async function Jo({ email: t, code: e, authUrl: n }) {
|
|
2631
2637
|
const r = await fetch(`${n}/email/code`, {
|
|
2632
2638
|
method: "POST",
|
|
2633
2639
|
headers: { "Content-Type": "application/json" },
|
|
@@ -2635,7 +2641,7 @@ async function xo({ email: t, code: e, authUrl: n }) {
|
|
|
2635
2641
|
email: t.trim(),
|
|
2636
2642
|
code: e.trim()
|
|
2637
2643
|
}),
|
|
2638
|
-
signal:
|
|
2644
|
+
signal: Vt(nn)
|
|
2639
2645
|
});
|
|
2640
2646
|
if (!r.ok) {
|
|
2641
2647
|
const i = await r.text().catch(() => "Invalid code");
|
|
@@ -2646,23 +2652,23 @@ async function xo({ email: t, code: e, authUrl: n }) {
|
|
|
2646
2652
|
provider: "email",
|
|
2647
2653
|
authenticatedAt: Date.now()
|
|
2648
2654
|
};
|
|
2649
|
-
return
|
|
2655
|
+
return Ee(s), s;
|
|
2650
2656
|
}
|
|
2651
|
-
function
|
|
2657
|
+
function Zo() {
|
|
2652
2658
|
const t = new URLSearchParams(window.location.search), e = t.get("ikon_token"), n = t.get("ikon_provider");
|
|
2653
2659
|
return e && n ? { token: e, provider: n } : null;
|
|
2654
2660
|
}
|
|
2655
|
-
function
|
|
2661
|
+
function Qo() {
|
|
2656
2662
|
return new URLSearchParams(window.location.search).get("error");
|
|
2657
2663
|
}
|
|
2658
|
-
function
|
|
2664
|
+
function jt() {
|
|
2659
2665
|
window.history.replaceState({}, "", window.location.pathname);
|
|
2660
2666
|
}
|
|
2661
|
-
function
|
|
2667
|
+
function es(t, e, n, r) {
|
|
2662
2668
|
const o = r ?? window.location.origin + window.location.pathname + window.location.search;
|
|
2663
2669
|
return `${n}/oauth/${t}?space=${encodeURIComponent(e)}&return=${encodeURIComponent(o)}`;
|
|
2664
2670
|
}
|
|
2665
|
-
async function
|
|
2671
|
+
async function ts(t) {
|
|
2666
2672
|
const e = await fetch(`${t}/passkey/registration/options`, {
|
|
2667
2673
|
method: "POST",
|
|
2668
2674
|
headers: { "Content-Type": "application/json" }
|
|
@@ -2673,7 +2679,7 @@ async function Uo(t) {
|
|
|
2673
2679
|
}
|
|
2674
2680
|
return e.json();
|
|
2675
2681
|
}
|
|
2676
|
-
async function
|
|
2682
|
+
async function ns(t, e, n) {
|
|
2677
2683
|
const r = await fetch(`${t}/passkey/registration/verify`, {
|
|
2678
2684
|
method: "POST",
|
|
2679
2685
|
headers: { "Content-Type": "application/json" },
|
|
@@ -2688,9 +2694,9 @@ async function jo(t, e, n) {
|
|
|
2688
2694
|
provider: "passkey",
|
|
2689
2695
|
authenticatedAt: Date.now()
|
|
2690
2696
|
};
|
|
2691
|
-
return
|
|
2697
|
+
return Ee(s), s;
|
|
2692
2698
|
}
|
|
2693
|
-
async function
|
|
2699
|
+
async function rs(t, e) {
|
|
2694
2700
|
const n = await fetch(`${t}/passkey/authentication/options`, {
|
|
2695
2701
|
method: "POST",
|
|
2696
2702
|
headers: { "Content-Type": "application/json" },
|
|
@@ -2702,7 +2708,7 @@ async function Do(t, e) {
|
|
|
2702
2708
|
}
|
|
2703
2709
|
return n.json();
|
|
2704
2710
|
}
|
|
2705
|
-
async function
|
|
2711
|
+
async function os(t, e) {
|
|
2706
2712
|
const n = await fetch(`${t}/passkey/authentication/verify`, {
|
|
2707
2713
|
method: "POST",
|
|
2708
2714
|
headers: { "Content-Type": "application/json" },
|
|
@@ -2717,32 +2723,32 @@ async function $o(t, e) {
|
|
|
2717
2723
|
provider: "passkey",
|
|
2718
2724
|
authenticatedAt: Date.now()
|
|
2719
2725
|
};
|
|
2720
|
-
return
|
|
2726
|
+
return Ee(o), o;
|
|
2721
2727
|
}
|
|
2722
|
-
function
|
|
2728
|
+
function X(t) {
|
|
2723
2729
|
const e = new Uint8Array(t);
|
|
2724
2730
|
let n = "";
|
|
2725
2731
|
for (const o of e)
|
|
2726
2732
|
n += String.fromCharCode(o);
|
|
2727
2733
|
return btoa(n).replace(/\+/g, "-").replace(/\//g, "_").replace(/=/g, "");
|
|
2728
2734
|
}
|
|
2729
|
-
function
|
|
2735
|
+
function Me(t) {
|
|
2730
2736
|
const e = t.replace(/-/g, "+").replace(/_/g, "/"), n = (4 - e.length % 4) % 4, r = e.padEnd(e.length + n, "="), o = atob(r), s = new ArrayBuffer(o.length), i = new Uint8Array(s);
|
|
2731
2737
|
for (let a = 0; a < o.length; a++)
|
|
2732
2738
|
i[a] = o.charCodeAt(a);
|
|
2733
2739
|
return s;
|
|
2734
2740
|
}
|
|
2735
|
-
function
|
|
2736
|
-
return
|
|
2741
|
+
function ft() {
|
|
2742
|
+
return ss.stubThis(globalThis?.PublicKeyCredential !== void 0 && typeof globalThis.PublicKeyCredential == "function");
|
|
2737
2743
|
}
|
|
2738
|
-
const
|
|
2744
|
+
const ss = {
|
|
2739
2745
|
stubThis: (t) => t
|
|
2740
2746
|
};
|
|
2741
|
-
function
|
|
2747
|
+
function on(t) {
|
|
2742
2748
|
const { id: e } = t;
|
|
2743
2749
|
return {
|
|
2744
2750
|
...t,
|
|
2745
|
-
id:
|
|
2751
|
+
id: Me(e),
|
|
2746
2752
|
/**
|
|
2747
2753
|
* `descriptor.transports` is an array of our `AuthenticatorTransportFuture` that includes newer
|
|
2748
2754
|
* transports that TypeScript's DOM lib is ignorant of. Convince TS that our list of transports
|
|
@@ -2751,7 +2757,7 @@ function Kt(t) {
|
|
|
2751
2757
|
transports: t.transports
|
|
2752
2758
|
};
|
|
2753
2759
|
}
|
|
2754
|
-
function
|
|
2760
|
+
function sn(t) {
|
|
2755
2761
|
return (
|
|
2756
2762
|
// Consider localhost valid as well since it's okay wrt Secure Contexts
|
|
2757
2763
|
t === "localhost" || // Support punycode (ACE) or ascii labels and domains
|
|
@@ -2768,7 +2774,7 @@ class j extends Error {
|
|
|
2768
2774
|
}), this.name = o ?? r.name, this.code = n;
|
|
2769
2775
|
}
|
|
2770
2776
|
}
|
|
2771
|
-
function
|
|
2777
|
+
function is({ error: t, options: e }) {
|
|
2772
2778
|
const { publicKey: n } = e;
|
|
2773
2779
|
if (!n)
|
|
2774
2780
|
throw Error("options was missing required publicKey property");
|
|
@@ -2826,7 +2832,7 @@ function Fo({ error: t, options: e }) {
|
|
|
2826
2832
|
});
|
|
2827
2833
|
if (t.name === "SecurityError") {
|
|
2828
2834
|
const r = globalThis.location.hostname;
|
|
2829
|
-
if (
|
|
2835
|
+
if (sn(r)) {
|
|
2830
2836
|
if (n.rp.id !== r)
|
|
2831
2837
|
return new j({
|
|
2832
2838
|
message: `The RP ID "${n.rp.id}" is invalid for this domain`,
|
|
@@ -2854,7 +2860,7 @@ function Fo({ error: t, options: e }) {
|
|
|
2854
2860
|
}
|
|
2855
2861
|
return t;
|
|
2856
2862
|
}
|
|
2857
|
-
class
|
|
2863
|
+
class as {
|
|
2858
2864
|
constructor() {
|
|
2859
2865
|
Object.defineProperty(this, "controller", {
|
|
2860
2866
|
enumerable: !0,
|
|
@@ -2878,89 +2884,89 @@ class Vo {
|
|
|
2878
2884
|
}
|
|
2879
2885
|
}
|
|
2880
2886
|
}
|
|
2881
|
-
const
|
|
2882
|
-
function
|
|
2883
|
-
if (t && !(
|
|
2887
|
+
const an = new as(), cs = ["cross-platform", "platform"];
|
|
2888
|
+
function cn(t) {
|
|
2889
|
+
if (t && !(cs.indexOf(t) < 0))
|
|
2884
2890
|
return t;
|
|
2885
2891
|
}
|
|
2886
|
-
async function
|
|
2892
|
+
async function ls(t) {
|
|
2887
2893
|
!t.optionsJSON && t.challenge && (console.warn("startRegistration() was not called correctly. It will try to continue with the provided options, but this call should be refactored to use the expected call structure instead. See https://simplewebauthn.dev/docs/packages/browser#typeerror-cannot-read-properties-of-undefined-reading-challenge for more information."), t = { optionsJSON: t });
|
|
2888
2894
|
const { optionsJSON: e, useAutoRegister: n = !1 } = t;
|
|
2889
|
-
if (!
|
|
2895
|
+
if (!ft())
|
|
2890
2896
|
throw new Error("WebAuthn is not supported in this browser");
|
|
2891
2897
|
const r = {
|
|
2892
2898
|
...e,
|
|
2893
|
-
challenge:
|
|
2899
|
+
challenge: Me(e.challenge),
|
|
2894
2900
|
user: {
|
|
2895
2901
|
...e.user,
|
|
2896
|
-
id:
|
|
2902
|
+
id: Me(e.user.id)
|
|
2897
2903
|
},
|
|
2898
|
-
excludeCredentials: e.excludeCredentials?.map(
|
|
2904
|
+
excludeCredentials: e.excludeCredentials?.map(on)
|
|
2899
2905
|
}, o = {};
|
|
2900
|
-
n && (o.mediation = "conditional"), o.publicKey = r, o.signal =
|
|
2906
|
+
n && (o.mediation = "conditional"), o.publicKey = r, o.signal = an.createNewAbortSignal();
|
|
2901
2907
|
let s;
|
|
2902
2908
|
try {
|
|
2903
2909
|
s = await navigator.credentials.create(o);
|
|
2904
2910
|
} catch (u) {
|
|
2905
|
-
throw
|
|
2911
|
+
throw is({ error: u, options: o });
|
|
2906
2912
|
}
|
|
2907
2913
|
if (!s)
|
|
2908
2914
|
throw new Error("Registration was not completed");
|
|
2909
2915
|
const { id: i, rawId: a, response: l, type: d } = s;
|
|
2910
2916
|
let h;
|
|
2911
2917
|
typeof l.getTransports == "function" && (h = l.getTransports());
|
|
2912
|
-
let
|
|
2918
|
+
let y;
|
|
2913
2919
|
if (typeof l.getPublicKeyAlgorithm == "function")
|
|
2914
2920
|
try {
|
|
2915
|
-
|
|
2921
|
+
y = l.getPublicKeyAlgorithm();
|
|
2916
2922
|
} catch (u) {
|
|
2917
|
-
|
|
2923
|
+
Je("getPublicKeyAlgorithm()", u);
|
|
2918
2924
|
}
|
|
2919
2925
|
let m;
|
|
2920
2926
|
if (typeof l.getPublicKey == "function")
|
|
2921
2927
|
try {
|
|
2922
2928
|
const u = l.getPublicKey();
|
|
2923
|
-
u !== null && (m =
|
|
2929
|
+
u !== null && (m = X(u));
|
|
2924
2930
|
} catch (u) {
|
|
2925
|
-
|
|
2931
|
+
Je("getPublicKey()", u);
|
|
2926
2932
|
}
|
|
2927
2933
|
let c;
|
|
2928
2934
|
if (typeof l.getAuthenticatorData == "function")
|
|
2929
2935
|
try {
|
|
2930
|
-
c =
|
|
2936
|
+
c = X(l.getAuthenticatorData());
|
|
2931
2937
|
} catch (u) {
|
|
2932
|
-
|
|
2938
|
+
Je("getAuthenticatorData()", u);
|
|
2933
2939
|
}
|
|
2934
2940
|
return {
|
|
2935
2941
|
id: i,
|
|
2936
|
-
rawId:
|
|
2942
|
+
rawId: X(a),
|
|
2937
2943
|
response: {
|
|
2938
|
-
attestationObject:
|
|
2939
|
-
clientDataJSON:
|
|
2944
|
+
attestationObject: X(l.attestationObject),
|
|
2945
|
+
clientDataJSON: X(l.clientDataJSON),
|
|
2940
2946
|
transports: h,
|
|
2941
|
-
publicKeyAlgorithm:
|
|
2947
|
+
publicKeyAlgorithm: y,
|
|
2942
2948
|
publicKey: m,
|
|
2943
2949
|
authenticatorData: c
|
|
2944
2950
|
},
|
|
2945
2951
|
type: d,
|
|
2946
2952
|
clientExtensionResults: s.getClientExtensionResults(),
|
|
2947
|
-
authenticatorAttachment:
|
|
2953
|
+
authenticatorAttachment: cn(s.authenticatorAttachment)
|
|
2948
2954
|
};
|
|
2949
2955
|
}
|
|
2950
|
-
function
|
|
2956
|
+
function Je(t, e) {
|
|
2951
2957
|
console.warn(`The browser extension that intercepted this WebAuthn API call incorrectly implemented ${t}. You should report this error to them.
|
|
2952
2958
|
`, e);
|
|
2953
2959
|
}
|
|
2954
|
-
function
|
|
2955
|
-
if (!
|
|
2956
|
-
return
|
|
2960
|
+
function us() {
|
|
2961
|
+
if (!ft())
|
|
2962
|
+
return Ze.stubThis(new Promise((e) => e(!1)));
|
|
2957
2963
|
const t = globalThis.PublicKeyCredential;
|
|
2958
|
-
return t?.isConditionalMediationAvailable === void 0 ?
|
|
2964
|
+
return t?.isConditionalMediationAvailable === void 0 ? Ze.stubThis(new Promise((e) => e(!1))) : Ze.stubThis(t.isConditionalMediationAvailable());
|
|
2959
2965
|
}
|
|
2960
|
-
const
|
|
2966
|
+
const Ze = {
|
|
2961
2967
|
stubThis: (t) => t
|
|
2962
2968
|
};
|
|
2963
|
-
function
|
|
2969
|
+
function ds({ error: t, options: e }) {
|
|
2964
2970
|
const { publicKey: n } = e;
|
|
2965
2971
|
if (!n)
|
|
2966
2972
|
throw Error("options was missing required publicKey property");
|
|
@@ -2980,7 +2986,7 @@ function Yo({ error: t, options: e }) {
|
|
|
2980
2986
|
});
|
|
2981
2987
|
if (t.name === "SecurityError") {
|
|
2982
2988
|
const r = globalThis.location.hostname;
|
|
2983
|
-
if (
|
|
2989
|
+
if (sn(r)) {
|
|
2984
2990
|
if (n.rpId !== r)
|
|
2985
2991
|
return new j({
|
|
2986
2992
|
message: `The RP ID "${n.rpId}" is invalid for this domain`,
|
|
@@ -3001,63 +3007,63 @@ function Yo({ error: t, options: e }) {
|
|
|
3001
3007
|
}
|
|
3002
3008
|
return t;
|
|
3003
3009
|
}
|
|
3004
|
-
async function
|
|
3010
|
+
async function fs(t) {
|
|
3005
3011
|
!t.optionsJSON && t.challenge && (console.warn("startAuthentication() was not called correctly. It will try to continue with the provided options, but this call should be refactored to use the expected call structure instead. See https://simplewebauthn.dev/docs/packages/browser#typeerror-cannot-read-properties-of-undefined-reading-challenge for more information."), t = { optionsJSON: t });
|
|
3006
3012
|
const { optionsJSON: e, useBrowserAutofill: n = !1, verifyBrowserAutofillInput: r = !0 } = t;
|
|
3007
|
-
if (!
|
|
3013
|
+
if (!ft())
|
|
3008
3014
|
throw new Error("WebAuthn is not supported in this browser");
|
|
3009
3015
|
let o;
|
|
3010
|
-
e.allowCredentials?.length !== 0 && (o = e.allowCredentials?.map(
|
|
3016
|
+
e.allowCredentials?.length !== 0 && (o = e.allowCredentials?.map(on));
|
|
3011
3017
|
const s = {
|
|
3012
3018
|
...e,
|
|
3013
|
-
challenge:
|
|
3019
|
+
challenge: Me(e.challenge),
|
|
3014
3020
|
allowCredentials: o
|
|
3015
3021
|
}, i = {};
|
|
3016
3022
|
if (n) {
|
|
3017
|
-
if (!await
|
|
3023
|
+
if (!await us())
|
|
3018
3024
|
throw Error("Browser does not support WebAuthn autofill");
|
|
3019
3025
|
if (document.querySelectorAll("input[autocomplete$='webauthn']").length < 1 && r)
|
|
3020
3026
|
throw Error('No <input> with "webauthn" as the only or last value in its `autocomplete` attribute was detected');
|
|
3021
3027
|
i.mediation = "conditional", s.allowCredentials = [];
|
|
3022
3028
|
}
|
|
3023
|
-
i.publicKey = s, i.signal =
|
|
3029
|
+
i.publicKey = s, i.signal = an.createNewAbortSignal();
|
|
3024
3030
|
let a;
|
|
3025
3031
|
try {
|
|
3026
3032
|
a = await navigator.credentials.get(i);
|
|
3027
3033
|
} catch (c) {
|
|
3028
|
-
throw
|
|
3034
|
+
throw ds({ error: c, options: i });
|
|
3029
3035
|
}
|
|
3030
3036
|
if (!a)
|
|
3031
3037
|
throw new Error("Authentication was not completed");
|
|
3032
|
-
const { id: l, rawId: d, response: h, type:
|
|
3038
|
+
const { id: l, rawId: d, response: h, type: y } = a;
|
|
3033
3039
|
let m;
|
|
3034
|
-
return h.userHandle && (m =
|
|
3040
|
+
return h.userHandle && (m = X(h.userHandle)), {
|
|
3035
3041
|
id: l,
|
|
3036
|
-
rawId:
|
|
3042
|
+
rawId: X(d),
|
|
3037
3043
|
response: {
|
|
3038
|
-
authenticatorData:
|
|
3039
|
-
clientDataJSON:
|
|
3040
|
-
signature:
|
|
3044
|
+
authenticatorData: X(h.authenticatorData),
|
|
3045
|
+
clientDataJSON: X(h.clientDataJSON),
|
|
3046
|
+
signature: X(h.signature),
|
|
3041
3047
|
userHandle: m
|
|
3042
3048
|
},
|
|
3043
|
-
type:
|
|
3049
|
+
type: y,
|
|
3044
3050
|
clientExtensionResults: a.getClientExtensionResults(),
|
|
3045
|
-
authenticatorAttachment:
|
|
3051
|
+
authenticatorAttachment: cn(a.authenticatorAttachment)
|
|
3046
3052
|
};
|
|
3047
3053
|
}
|
|
3048
|
-
const
|
|
3049
|
-
function
|
|
3054
|
+
const ht = Ft(null);
|
|
3055
|
+
function Qs({ children: t, config: e }) {
|
|
3050
3056
|
const [n, r] = N({
|
|
3051
3057
|
isAuthenticated: !1,
|
|
3052
3058
|
isLoading: !0,
|
|
3053
3059
|
user: null,
|
|
3054
3060
|
error: null
|
|
3055
3061
|
});
|
|
3056
|
-
|
|
3062
|
+
C(() => {
|
|
3057
3063
|
(() => {
|
|
3058
|
-
const m =
|
|
3064
|
+
const m = Qo();
|
|
3059
3065
|
if (m) {
|
|
3060
|
-
|
|
3066
|
+
jt(), r({
|
|
3061
3067
|
isAuthenticated: !1,
|
|
3062
3068
|
isLoading: !1,
|
|
3063
3069
|
user: null,
|
|
@@ -3065,27 +3071,27 @@ function Ls({ children: t, config: e }) {
|
|
|
3065
3071
|
});
|
|
3066
3072
|
return;
|
|
3067
3073
|
}
|
|
3068
|
-
const c =
|
|
3074
|
+
const c = Zo();
|
|
3069
3075
|
if (c) {
|
|
3070
|
-
const
|
|
3076
|
+
const g = {
|
|
3071
3077
|
token: c.token,
|
|
3072
3078
|
provider: c.provider,
|
|
3073
3079
|
authenticatedAt: Date.now()
|
|
3074
3080
|
};
|
|
3075
|
-
|
|
3081
|
+
Ee(g), jt(), r({
|
|
3076
3082
|
isAuthenticated: !0,
|
|
3077
3083
|
isLoading: !1,
|
|
3078
|
-
user:
|
|
3084
|
+
user: le(g),
|
|
3079
3085
|
error: null
|
|
3080
3086
|
});
|
|
3081
3087
|
return;
|
|
3082
3088
|
}
|
|
3083
|
-
const u =
|
|
3089
|
+
const u = tn();
|
|
3084
3090
|
if (u) {
|
|
3085
3091
|
r({
|
|
3086
3092
|
isAuthenticated: !0,
|
|
3087
3093
|
isLoading: !1,
|
|
3088
|
-
user:
|
|
3094
|
+
user: le(u),
|
|
3089
3095
|
error: null
|
|
3090
3096
|
});
|
|
3091
3097
|
return;
|
|
@@ -3099,7 +3105,7 @@ function Ls({ children: t, config: e }) {
|
|
|
3099
3105
|
})();
|
|
3100
3106
|
}, []);
|
|
3101
3107
|
const o = D(
|
|
3102
|
-
async (
|
|
3108
|
+
async (y) => {
|
|
3103
3109
|
if (!e.spaceId) {
|
|
3104
3110
|
r((c) => ({
|
|
3105
3111
|
...c,
|
|
@@ -3107,15 +3113,15 @@ function Ls({ children: t, config: e }) {
|
|
|
3107
3113
|
}));
|
|
3108
3114
|
return;
|
|
3109
3115
|
}
|
|
3110
|
-
const m = await
|
|
3111
|
-
if (
|
|
3116
|
+
const m = await ve(e.authUrl);
|
|
3117
|
+
if (y === "guest") {
|
|
3112
3118
|
r((c) => ({ ...c, isLoading: !0 }));
|
|
3113
3119
|
try {
|
|
3114
|
-
const c = await
|
|
3120
|
+
const c = await rn(e.spaceId, m);
|
|
3115
3121
|
r({
|
|
3116
3122
|
isAuthenticated: !0,
|
|
3117
3123
|
isLoading: !1,
|
|
3118
|
-
user:
|
|
3124
|
+
user: le(c),
|
|
3119
3125
|
error: null
|
|
3120
3126
|
});
|
|
3121
3127
|
} catch (c) {
|
|
@@ -3127,14 +3133,14 @@ function Ls({ children: t, config: e }) {
|
|
|
3127
3133
|
}
|
|
3128
3134
|
return;
|
|
3129
3135
|
}
|
|
3130
|
-
if (
|
|
3136
|
+
if (y === "passkey") {
|
|
3131
3137
|
r((c) => ({ ...c, isLoading: !0, error: null }));
|
|
3132
3138
|
try {
|
|
3133
|
-
const c = await
|
|
3139
|
+
const c = await rs(m), u = await fs({ optionsJSON: c }), g = await os(m, u);
|
|
3134
3140
|
r({
|
|
3135
3141
|
isAuthenticated: !0,
|
|
3136
3142
|
isLoading: !1,
|
|
3137
|
-
user:
|
|
3143
|
+
user: le(g),
|
|
3138
3144
|
error: null
|
|
3139
3145
|
});
|
|
3140
3146
|
} catch (c) {
|
|
@@ -3146,53 +3152,53 @@ function Ls({ children: t, config: e }) {
|
|
|
3146
3152
|
}
|
|
3147
3153
|
return;
|
|
3148
3154
|
}
|
|
3149
|
-
if (
|
|
3155
|
+
if (y === "email")
|
|
3150
3156
|
throw new Error("login('email') is not supported. Use requestEmailCode()/submitEmailCode() from useAuth() instead.");
|
|
3151
|
-
window.location.href =
|
|
3157
|
+
window.location.href = es(y, e.spaceId, m);
|
|
3152
3158
|
},
|
|
3153
3159
|
[e.authUrl, e.spaceId]
|
|
3154
3160
|
), s = D(
|
|
3155
|
-
async (
|
|
3161
|
+
async (y) => {
|
|
3156
3162
|
if (!e.spaceId)
|
|
3157
3163
|
throw r((c) => ({ ...c, error: "Space ID is not configured" })), new Error("Space ID is not configured");
|
|
3158
|
-
const m = await
|
|
3159
|
-
await
|
|
3164
|
+
const m = await ve(e.authUrl);
|
|
3165
|
+
await qo({ email: y, spaceId: e.spaceId, authUrl: m });
|
|
3160
3166
|
},
|
|
3161
3167
|
[e.authUrl, e.spaceId]
|
|
3162
3168
|
), i = D(
|
|
3163
|
-
async (
|
|
3169
|
+
async (y, m) => {
|
|
3164
3170
|
r((c) => ({ ...c, isLoading: !0, error: null }));
|
|
3165
3171
|
try {
|
|
3166
|
-
const c = await
|
|
3172
|
+
const c = await ve(e.authUrl), u = await Jo({ email: y, code: m, authUrl: c });
|
|
3167
3173
|
r({
|
|
3168
3174
|
isAuthenticated: !0,
|
|
3169
3175
|
isLoading: !1,
|
|
3170
|
-
user:
|
|
3176
|
+
user: le(u),
|
|
3171
3177
|
error: null
|
|
3172
3178
|
});
|
|
3173
3179
|
} catch (c) {
|
|
3174
3180
|
const u = c instanceof Error ? c.message : "Code verification failed";
|
|
3175
|
-
throw r((
|
|
3181
|
+
throw r((g) => ({ ...g, isLoading: !1, error: u })), c;
|
|
3176
3182
|
}
|
|
3177
3183
|
},
|
|
3178
3184
|
[e.authUrl]
|
|
3179
3185
|
), a = D(() => {
|
|
3180
|
-
|
|
3186
|
+
Ue(), Bt.clearAll(), r({
|
|
3181
3187
|
isAuthenticated: !1,
|
|
3182
3188
|
isLoading: !1,
|
|
3183
3189
|
user: null,
|
|
3184
3190
|
error: null
|
|
3185
3191
|
});
|
|
3186
3192
|
}, []), l = D(
|
|
3187
|
-
async (
|
|
3188
|
-
const m = await
|
|
3193
|
+
async (y) => {
|
|
3194
|
+
const m = await ve(e.authUrl);
|
|
3189
3195
|
r((c) => ({ ...c, isLoading: !0, error: null }));
|
|
3190
3196
|
try {
|
|
3191
|
-
const c = await
|
|
3197
|
+
const c = await ts(m), u = await ls({ optionsJSON: c }), g = await ns(m, u, y);
|
|
3192
3198
|
r({
|
|
3193
3199
|
isAuthenticated: !0,
|
|
3194
3200
|
isLoading: !1,
|
|
3195
|
-
user:
|
|
3201
|
+
user: le(g),
|
|
3196
3202
|
error: null
|
|
3197
3203
|
});
|
|
3198
3204
|
} catch (c) {
|
|
@@ -3216,20 +3222,20 @@ function Ls({ children: t, config: e }) {
|
|
|
3216
3222
|
}),
|
|
3217
3223
|
[n, o, a, d, l, s, i]
|
|
3218
3224
|
);
|
|
3219
|
-
return /* @__PURE__ */
|
|
3225
|
+
return /* @__PURE__ */ w.jsx(ht, { value: h, children: t });
|
|
3220
3226
|
}
|
|
3221
|
-
function
|
|
3222
|
-
const t =
|
|
3227
|
+
function hs() {
|
|
3228
|
+
const t = ct(ht);
|
|
3223
3229
|
if (!t)
|
|
3224
3230
|
throw new Error("useAuth must be used within an AuthProvider");
|
|
3225
3231
|
return t;
|
|
3226
3232
|
}
|
|
3227
|
-
function
|
|
3228
|
-
return
|
|
3233
|
+
function ps() {
|
|
3234
|
+
return ct(ht);
|
|
3229
3235
|
}
|
|
3230
|
-
function
|
|
3231
|
-
const { config: e, guestUrlParam: n } = t, { state: r, login: o } =
|
|
3232
|
-
return
|
|
3236
|
+
function ei(t) {
|
|
3237
|
+
const { config: e, guestUrlParam: n } = t, { state: r, login: o } = hs(), s = E(!1);
|
|
3238
|
+
return C(() => {
|
|
3233
3239
|
if (!n || r.isAuthenticated || r.isLoading || s.current || !e.methods.includes("guest"))
|
|
3234
3240
|
return;
|
|
3235
3241
|
const i = new URLSearchParams(window.location.search), a = i.get(n);
|
|
@@ -3245,17 +3251,17 @@ function Ms(t) {
|
|
|
3245
3251
|
error: r.error
|
|
3246
3252
|
};
|
|
3247
3253
|
}
|
|
3248
|
-
const
|
|
3254
|
+
const ln = (() => {
|
|
3249
3255
|
try {
|
|
3250
|
-
return
|
|
3256
|
+
return xn();
|
|
3251
3257
|
} catch {
|
|
3252
3258
|
return !1;
|
|
3253
3259
|
}
|
|
3254
|
-
})(),
|
|
3255
|
-
function
|
|
3256
|
-
|
|
3260
|
+
})(), un = Date.now(), ne = [], ms = 300;
|
|
3261
|
+
function Oe(t) {
|
|
3262
|
+
ne.push(`[+${((Date.now() - un) / 1e3).toFixed(1)}s] ${t}`), ne.length > ms && ne.shift();
|
|
3257
3263
|
}
|
|
3258
|
-
function
|
|
3264
|
+
function Dt(t) {
|
|
3259
3265
|
if (typeof t == "string")
|
|
3260
3266
|
return t;
|
|
3261
3267
|
if (t instanceof Error)
|
|
@@ -3266,30 +3272,30 @@ function Tt(t) {
|
|
|
3266
3272
|
return String(t);
|
|
3267
3273
|
}
|
|
3268
3274
|
}
|
|
3269
|
-
let
|
|
3270
|
-
function
|
|
3271
|
-
if (
|
|
3275
|
+
let $t = !1;
|
|
3276
|
+
function dn() {
|
|
3277
|
+
if ($t || typeof window > "u")
|
|
3272
3278
|
return;
|
|
3273
|
-
|
|
3279
|
+
$t = !0, window.addEventListener("error", (e) => Oe(`window.error: ${e.message} @ ${e.filename ?? "?"}:${e.lineno ?? "?"}:${e.colno ?? "?"}`)), window.addEventListener("unhandledrejection", (e) => Oe(`unhandledRejection: ${Dt(e.reason)}`));
|
|
3274
3280
|
const t = console;
|
|
3275
3281
|
for (const e of ["error", "warn", "log", "info"]) {
|
|
3276
3282
|
const n = t[e]?.bind(console) ?? (() => {
|
|
3277
3283
|
});
|
|
3278
3284
|
t[e] = (...r) => {
|
|
3279
3285
|
try {
|
|
3280
|
-
|
|
3286
|
+
Oe(`console.${e}: ${r.map(Dt).join(" ")}`);
|
|
3281
3287
|
} catch {
|
|
3282
3288
|
}
|
|
3283
3289
|
n(...r);
|
|
3284
3290
|
};
|
|
3285
3291
|
}
|
|
3286
3292
|
try {
|
|
3287
|
-
|
|
3293
|
+
Wt((e) => Oe(`${e.levelName} [${e.component}] ${e.message}`), { minLevel: Qe.DEBUG });
|
|
3288
3294
|
} catch {
|
|
3289
3295
|
}
|
|
3290
3296
|
}
|
|
3291
|
-
|
|
3292
|
-
function
|
|
3297
|
+
ln && dn();
|
|
3298
|
+
function gs() {
|
|
3293
3299
|
let t = !1;
|
|
3294
3300
|
try {
|
|
3295
3301
|
const e = URL.createObjectURL(new Blob([""]));
|
|
@@ -3300,11 +3306,11 @@ function Jo() {
|
|
|
3300
3306
|
}
|
|
3301
3307
|
return t;
|
|
3302
3308
|
}
|
|
3303
|
-
function
|
|
3309
|
+
function ys() {
|
|
3304
3310
|
const t = globalThis;
|
|
3305
3311
|
return [
|
|
3306
3312
|
`Worker=${typeof Worker < "u"}`,
|
|
3307
|
-
`moduleWorker=${
|
|
3313
|
+
`moduleWorker=${gs()}`,
|
|
3308
3314
|
`WebSocket=${typeof WebSocket < "u"}`,
|
|
3309
3315
|
`WebTransport=${typeof t.WebTransport < "u"}`,
|
|
3310
3316
|
`RTCPeerConnection=${typeof RTCPeerConnection < "u"}`,
|
|
@@ -3317,21 +3323,21 @@ function Zo() {
|
|
|
3317
3323
|
`online=${typeof navigator < "u" ? navigator.onLine : "?"}`
|
|
3318
3324
|
].join(" ");
|
|
3319
3325
|
}
|
|
3320
|
-
function
|
|
3326
|
+
function bs(t) {
|
|
3321
3327
|
return /ERROR|error:|Rejection/.test(t) ? "#f88" : /WARN|warn:/.test(t) ? "#fc6" : "#9d9";
|
|
3322
3328
|
}
|
|
3323
|
-
function
|
|
3324
|
-
const n =
|
|
3325
|
-
if (
|
|
3329
|
+
function fn({ state: t = "", forceVisible: e = !1 }) {
|
|
3330
|
+
const n = ln || e, r = t === "connected" || t === "reconnecting", [, o] = In((l) => l + 1, 0), [s, i] = N(!0);
|
|
3331
|
+
if (C(() => {
|
|
3326
3332
|
if (!n)
|
|
3327
3333
|
return;
|
|
3328
|
-
|
|
3334
|
+
dn();
|
|
3329
3335
|
const l = setInterval(o, 1e3);
|
|
3330
3336
|
return () => clearInterval(l);
|
|
3331
3337
|
}, [n]), !n)
|
|
3332
3338
|
return null;
|
|
3333
3339
|
if (r && s)
|
|
3334
|
-
return /* @__PURE__ */
|
|
3340
|
+
return /* @__PURE__ */ w.jsxs(
|
|
3335
3341
|
"button",
|
|
3336
3342
|
{
|
|
3337
3343
|
type: "button",
|
|
@@ -3339,31 +3345,31 @@ function Jt({ state: t = "", forceVisible: e = !1 }) {
|
|
|
3339
3345
|
style: { position: "fixed", bottom: 8, left: 8, zIndex: 2147483647, background: "#000", color: "#0f0", font: "13px monospace", padding: "6px 10px", border: "1px solid #0f0", borderRadius: 6 },
|
|
3340
3346
|
children: [
|
|
3341
3347
|
"🐞 debug (",
|
|
3342
|
-
|
|
3348
|
+
ne.length,
|
|
3343
3349
|
")"
|
|
3344
3350
|
]
|
|
3345
3351
|
}
|
|
3346
3352
|
);
|
|
3347
3353
|
const a = r ? { position: "fixed", bottom: 0, left: 0, right: 0, maxHeight: "45vh", borderTop: "2px solid #0f0" } : { position: "fixed", inset: 0 };
|
|
3348
|
-
return /* @__PURE__ */
|
|
3349
|
-
/* @__PURE__ */
|
|
3354
|
+
return /* @__PURE__ */ w.jsxs("div", { style: { ...a, background: "rgba(0,0,0,0.92)", color: "#0f0", font: "14px/1.45 monospace", padding: "16px", overflow: "auto", zIndex: 2147483647 }, children: [
|
|
3355
|
+
/* @__PURE__ */ w.jsxs("div", { style: { color: "#fff", fontSize: "18px", marginBottom: "6px" }, children: [
|
|
3350
3356
|
"Ikon debug overlay — state: ",
|
|
3351
3357
|
t || "?",
|
|
3352
3358
|
", +",
|
|
3353
|
-
Math.round((Date.now() -
|
|
3359
|
+
Math.round((Date.now() - un) / 1e3),
|
|
3354
3360
|
"s, ",
|
|
3355
|
-
|
|
3361
|
+
ne.length,
|
|
3356
3362
|
" entries",
|
|
3357
|
-
r && /* @__PURE__ */
|
|
3363
|
+
r && /* @__PURE__ */ w.jsx("button", { type: "button", onClick: () => i(!0), style: { marginLeft: 12, font: "12px monospace", background: "#0f0", color: "#000", border: "none", borderRadius: 4, padding: "2px 8px" }, children: "hide" })
|
|
3358
3364
|
] }),
|
|
3359
|
-
/* @__PURE__ */
|
|
3360
|
-
/* @__PURE__ */
|
|
3361
|
-
/* @__PURE__ */
|
|
3362
|
-
/* @__PURE__ */
|
|
3363
|
-
/* @__PURE__ */
|
|
3365
|
+
/* @__PURE__ */ w.jsx("div", { style: { color: "#9cf", wordBreak: "break-all", marginBottom: "4px" }, children: typeof window < "u" ? window.location.href : "" }),
|
|
3366
|
+
/* @__PURE__ */ w.jsx("div", { style: { color: "#ff0", wordBreak: "break-all", marginBottom: "4px" }, children: typeof navigator < "u" ? navigator.userAgent : "no navigator" }),
|
|
3367
|
+
/* @__PURE__ */ w.jsx("div", { style: { color: "#8cf", marginBottom: "4px" }, children: ys() }),
|
|
3368
|
+
/* @__PURE__ */ w.jsx("div", { style: { color: "#8cf", marginBottom: "10px" }, children: typeof window < "u" ? `viewport=${window.innerWidth}x${window.innerHeight} dpr=${window.devicePixelRatio}` : "" }),
|
|
3369
|
+
/* @__PURE__ */ w.jsx("div", { children: ne.length === 0 ? "(nothing captured yet)" : ne.map((l, d) => /* @__PURE__ */ w.jsx("div", { style: { color: bs(l), wordBreak: "break-all" }, children: l }, d)) })
|
|
3364
3370
|
] });
|
|
3365
3371
|
}
|
|
3366
|
-
function
|
|
3372
|
+
function ti({
|
|
3367
3373
|
connectionState: t,
|
|
3368
3374
|
error: e,
|
|
3369
3375
|
isReady: n,
|
|
@@ -3377,11 +3383,11 @@ function Us({
|
|
|
3377
3383
|
renderIdle: l,
|
|
3378
3384
|
renderConnecting: d,
|
|
3379
3385
|
renderConnectingSlow: h,
|
|
3380
|
-
renderConnected:
|
|
3386
|
+
renderConnected: y,
|
|
3381
3387
|
renderOffline: m,
|
|
3382
3388
|
renderError: c
|
|
3383
3389
|
}) {
|
|
3384
|
-
const u =
|
|
3390
|
+
const u = E(!1), g = (() => {
|
|
3385
3391
|
switch (t) {
|
|
3386
3392
|
case "waitingForExternalConnectUrl":
|
|
3387
3393
|
case "connecting":
|
|
@@ -3390,19 +3396,19 @@ function Us({
|
|
|
3390
3396
|
case "reconnecting": {
|
|
3391
3397
|
if (!n || !o || !s) return null;
|
|
3392
3398
|
t === "reconnecting" && (u.current = !0);
|
|
3393
|
-
const
|
|
3394
|
-
return
|
|
3399
|
+
const p = o.size > 0;
|
|
3400
|
+
return p && (u.current = !1), y({
|
|
3395
3401
|
stores: o,
|
|
3396
3402
|
registry: s,
|
|
3397
3403
|
client: i,
|
|
3398
3404
|
onAction: a,
|
|
3399
|
-
isReconnecting: t === "reconnecting" || u.current && !
|
|
3405
|
+
isReconnecting: t === "reconnecting" || u.current && !p
|
|
3400
3406
|
});
|
|
3401
3407
|
}
|
|
3402
3408
|
case "offline": {
|
|
3403
3409
|
u.current = !1;
|
|
3404
|
-
const
|
|
3405
|
-
return
|
|
3410
|
+
const p = e ?? i?.lastError?.message ?? null;
|
|
3411
|
+
return p ? c(p) : m();
|
|
3406
3412
|
}
|
|
3407
3413
|
// 'idle' / 'connectingSlow' / 'offlineError' remain in the type union for back-compat
|
|
3408
3414
|
// string-equality checks in caller code but are no longer emitted — no case needed.
|
|
@@ -3410,164 +3416,175 @@ function Us({
|
|
|
3410
3416
|
return null;
|
|
3411
3417
|
}
|
|
3412
3418
|
})();
|
|
3413
|
-
return /* @__PURE__ */
|
|
3414
|
-
|
|
3415
|
-
/* @__PURE__ */
|
|
3419
|
+
return /* @__PURE__ */ w.jsxs(w.Fragment, { children: [
|
|
3420
|
+
g,
|
|
3421
|
+
/* @__PURE__ */ w.jsx(fn, { state: t })
|
|
3416
3422
|
] });
|
|
3417
3423
|
}
|
|
3418
|
-
const
|
|
3419
|
-
function
|
|
3424
|
+
const Ne = re("useIkonApp");
|
|
3425
|
+
function Ss() {
|
|
3420
3426
|
if (typeof window < "u" && window.__IKON_AUTH_CONFIG__)
|
|
3421
3427
|
return window.__IKON_AUTH_CONFIG__;
|
|
3422
3428
|
}
|
|
3423
|
-
function
|
|
3429
|
+
function ws() {
|
|
3424
3430
|
if (typeof window < "u" && window.__IKON_LOCAL_IKON_SERVER_CONFIG__)
|
|
3425
3431
|
return window.__IKON_LOCAL_IKON_SERVER_CONFIG__;
|
|
3426
3432
|
}
|
|
3427
|
-
function
|
|
3428
|
-
const { authConfig: e, modules: n, timeouts: r, backgroundAudio: o, webRtc: s, audio: i, video: a, websocket: l, webtransport: d, proxy: h } = t,
|
|
3429
|
-
|
|
3430
|
-
const [
|
|
3433
|
+
function ni(t) {
|
|
3434
|
+
const { authConfig: e, modules: n, timeouts: r, backgroundAudio: o, webRtc: s, audio: i, video: a, websocket: l, webtransport: d, proxy: h, liveSnapshot: y, bootSnapshot: m } = t, c = e === void 0 ? Ss() ?? null : e, u = ws(), g = ps(), p = E(null), S = E(null), b = E(null), R = E(!1), v = E(!1), T = E(o), U = E(r), ee = E(s), te = E(i), z = E(a), _ = E(l), L = E(d), M = E(h), B = E(y), $ = E(m), V = E("local"), K = E(void 0);
|
|
3435
|
+
T.current = o, U.current = r, ee.current = s, te.current = i, z.current = a, _.current = l, L.current = d, M.current = h, B.current = y, $.current = m;
|
|
3436
|
+
const [H, Re] = N("connecting"), [Ae, he] = N(!1), [f, A] = N(!1), [O, x] = N(null), [oe, pe] = N(null), [P, Q] = N(!1), [se, De] = N(null), [ie, pn] = N(null), [$e, pt] = N(!1), Be = E(!1), [mn, gn] = N(0), G = W(() => {
|
|
3431
3437
|
try {
|
|
3432
|
-
const
|
|
3433
|
-
return (
|
|
3438
|
+
const I = Pn();
|
|
3439
|
+
return (I.sessionId || I.channelKey) && Ln(), I;
|
|
3434
3440
|
} catch {
|
|
3435
3441
|
return { parameters: {} };
|
|
3436
3442
|
}
|
|
3437
|
-
}, [])
|
|
3438
|
-
|
|
3439
|
-
|
|
3440
|
-
|
|
3441
|
-
|
|
3443
|
+
}, []);
|
|
3444
|
+
m !== !1 && Tn();
|
|
3445
|
+
const ae = W(() => c?.enabled ? tn() : null, [c?.enabled, mn]), Te = u?.enabled ?? !1, Fe = u?.host ?? "localhost", Ve = u?.port ?? 8443, We = !!c && !c.enabled && !!c.spaceId && (gt() || Te);
|
|
3446
|
+
We && !ie && !$e && !Be.current && (Be.current = !0, ve(c.authUrl).then((I) => rn(c.spaceId, I)).then((I) => {
|
|
3447
|
+
pn(I.token), pt(!0);
|
|
3448
|
+
}).catch((I) => {
|
|
3449
|
+
Ne.error("Anonymous auth failed:", I), Be.current = !1, Te ? pt(!0) : x(I instanceof Error ? I.message : "Anonymous auth failed");
|
|
3442
3450
|
}));
|
|
3443
|
-
const
|
|
3444
|
-
if (
|
|
3445
|
-
|
|
3451
|
+
const Ke = W(() => {
|
|
3452
|
+
if (Te) {
|
|
3453
|
+
if (We && !$e)
|
|
3454
|
+
return null;
|
|
3455
|
+
const I = ae?.token ?? ie ?? void 0, q = I ? yt(I) ?? void 0 : void 0;
|
|
3446
3456
|
return {
|
|
3447
3457
|
local: {
|
|
3448
|
-
host:
|
|
3449
|
-
httpsPort:
|
|
3450
|
-
userId:
|
|
3451
|
-
token:
|
|
3452
|
-
spaceId:
|
|
3453
|
-
backendUrl:
|
|
3454
|
-
authUrl:
|
|
3455
|
-
parameters:
|
|
3458
|
+
host: Fe,
|
|
3459
|
+
httpsPort: Ve,
|
|
3460
|
+
userId: q,
|
|
3461
|
+
token: ae?.token ?? void 0,
|
|
3462
|
+
spaceId: c?.spaceId,
|
|
3463
|
+
backendUrl: c?.backendUrl,
|
|
3464
|
+
authUrl: c?.authUrl,
|
|
3465
|
+
parameters: G.parameters
|
|
3456
3466
|
}
|
|
3457
3467
|
};
|
|
3458
3468
|
}
|
|
3459
|
-
return
|
|
3469
|
+
return ae?.token && c?.spaceId ? {
|
|
3460
3470
|
sessionToken: {
|
|
3461
|
-
token:
|
|
3462
|
-
spaceId:
|
|
3463
|
-
backendType:
|
|
3464
|
-
sessionId:
|
|
3465
|
-
channelKey:
|
|
3466
|
-
parameters:
|
|
3471
|
+
token: ae.token,
|
|
3472
|
+
spaceId: c.spaceId,
|
|
3473
|
+
backendType: bt(),
|
|
3474
|
+
sessionId: G.sessionId,
|
|
3475
|
+
channelKey: G.channelKey,
|
|
3476
|
+
parameters: G.parameters
|
|
3467
3477
|
}
|
|
3468
|
-
} :
|
|
3478
|
+
} : ie && c?.spaceId ? {
|
|
3469
3479
|
sessionToken: {
|
|
3470
|
-
token:
|
|
3471
|
-
spaceId:
|
|
3472
|
-
backendType:
|
|
3473
|
-
sessionId:
|
|
3474
|
-
channelKey:
|
|
3475
|
-
parameters:
|
|
3480
|
+
token: ie,
|
|
3481
|
+
spaceId: c.spaceId,
|
|
3482
|
+
backendType: bt(),
|
|
3483
|
+
sessionId: G.sessionId,
|
|
3484
|
+
channelKey: G.channelKey,
|
|
3485
|
+
parameters: G.parameters
|
|
3476
3486
|
}
|
|
3477
|
-
} :
|
|
3487
|
+
} : gt() ? null : {
|
|
3478
3488
|
local: {
|
|
3479
|
-
host:
|
|
3480
|
-
httpsPort:
|
|
3481
|
-
spaceId:
|
|
3482
|
-
backendUrl:
|
|
3483
|
-
authUrl:
|
|
3484
|
-
parameters:
|
|
3489
|
+
host: Fe,
|
|
3490
|
+
httpsPort: Ve,
|
|
3491
|
+
spaceId: c?.spaceId,
|
|
3492
|
+
backendUrl: c?.backendUrl,
|
|
3493
|
+
authUrl: c?.authUrl,
|
|
3494
|
+
parameters: G.parameters
|
|
3485
3495
|
}
|
|
3486
3496
|
};
|
|
3487
|
-
}, [
|
|
3488
|
-
|
|
3489
|
-
const
|
|
3490
|
-
|
|
3491
|
-
if (!
|
|
3492
|
-
if (
|
|
3493
|
-
for (const
|
|
3494
|
-
|
|
3495
|
-
|
|
3496
|
-
|
|
3497
|
+
}, [Te, Fe, Ve, ae?.token, c?.spaceId, c?.backendUrl, c?.authUrl, ie, We, $e, G.sessionId, G.channelKey, G.parameters]);
|
|
3498
|
+
V.current = c?.spaceId ?? "local", K.current = ae?.token ?? ie ?? void 0, ro(se);
|
|
3499
|
+
const yn = so(se);
|
|
3500
|
+
C(() => {
|
|
3501
|
+
if (!R.current) {
|
|
3502
|
+
if (R.current = !0, b.current = Hr(), n)
|
|
3503
|
+
for (const I of n)
|
|
3504
|
+
I(b.current);
|
|
3505
|
+
b.current.loadRegisteredModules().catch((I) => {
|
|
3506
|
+
Ne.error("Failed to load UI modules", I);
|
|
3497
3507
|
});
|
|
3498
3508
|
}
|
|
3499
|
-
}, []),
|
|
3500
|
-
if (!
|
|
3501
|
-
const
|
|
3502
|
-
...
|
|
3503
|
-
timeouts:
|
|
3504
|
-
audio:
|
|
3505
|
-
enabled:
|
|
3506
|
-
...
|
|
3509
|
+
}, []), C(() => {
|
|
3510
|
+
if (!Ke) return;
|
|
3511
|
+
const I = new Un({
|
|
3512
|
+
...Ke,
|
|
3513
|
+
timeouts: U.current,
|
|
3514
|
+
audio: te.current !== void 0 || T.current ? {
|
|
3515
|
+
enabled: te.current,
|
|
3516
|
+
...T.current ? { background: { allowOnDesktop: !0, allowOnMobile: !0 } } : {}
|
|
3507
3517
|
} : void 0,
|
|
3508
|
-
video:
|
|
3518
|
+
video: z.current !== void 0 ? { enabled: z.current } : void 0,
|
|
3509
3519
|
mediaSession: { title: document.title || void 0, artist: document.title || void 0 },
|
|
3510
|
-
webRtc:
|
|
3511
|
-
websocket:
|
|
3512
|
-
webtransport:
|
|
3513
|
-
proxy:
|
|
3514
|
-
onConnectionStateChange: (
|
|
3515
|
-
|
|
3520
|
+
webRtc: ee.current === !1 ? { enabled: !1 } : void 0,
|
|
3521
|
+
websocket: _.current,
|
|
3522
|
+
webtransport: L.current,
|
|
3523
|
+
proxy: M.current,
|
|
3524
|
+
onConnectionStateChange: (J) => {
|
|
3525
|
+
Re(J);
|
|
3516
3526
|
},
|
|
3517
|
-
onError: (
|
|
3518
|
-
|
|
3527
|
+
onError: (J) => {
|
|
3528
|
+
x(J.message);
|
|
3519
3529
|
}
|
|
3520
3530
|
});
|
|
3521
|
-
|
|
3522
|
-
const
|
|
3523
|
-
|
|
3524
|
-
|
|
3525
|
-
|
|
3531
|
+
p.current = I;
|
|
3532
|
+
const q = B.current ?? !0, ke = K.current, mt = ke ? yt(ke) ?? null : null, wn = q && mt ? { enabled: !0, appId: V.current, userId: mt } : void 0, Ce = new rr({ client: I, liveSnapshot: wn, bootSnapshot: $.current });
|
|
3533
|
+
S.current = Ce, De(Ce), A(!1);
|
|
3534
|
+
const vn = Ce.subscribeToUiUpdates(() => {
|
|
3535
|
+
A(!0);
|
|
3536
|
+
});
|
|
3537
|
+
return I.connect().catch((J) => {
|
|
3538
|
+
if (Ne.error("Connection failed:", J), J instanceof Mn) {
|
|
3539
|
+
pe(J.reason);
|
|
3526
3540
|
return;
|
|
3527
3541
|
}
|
|
3528
|
-
if (
|
|
3529
|
-
|
|
3542
|
+
if (J instanceof jn) {
|
|
3543
|
+
Q(!0);
|
|
3530
3544
|
return;
|
|
3531
3545
|
}
|
|
3532
|
-
|
|
3546
|
+
J instanceof Dn && !v.current && (v.current = !0, Ne.warn("Auth session appears stale, clearing and retrying"), Bt.clearAll(), g ? g.logout() : (Ue(), gn((En) => En + 1)));
|
|
3533
3547
|
}), () => {
|
|
3534
|
-
|
|
3548
|
+
vn(), I.disconnect(), p.current = null, Ce.dispose(), S.current = null;
|
|
3535
3549
|
};
|
|
3536
|
-
}, [
|
|
3537
|
-
const
|
|
3538
|
-
const
|
|
3539
|
-
|
|
3550
|
+
}, [Ke]);
|
|
3551
|
+
const bn = D((I, q) => {
|
|
3552
|
+
const ke = typeof q == "string" ? q : JSON.stringify(q ?? {});
|
|
3553
|
+
p.current?.sendActionCall(I, ke);
|
|
3540
3554
|
}, []);
|
|
3541
|
-
|
|
3542
|
-
if (
|
|
3543
|
-
|
|
3555
|
+
C(() => {
|
|
3556
|
+
if (H !== "connecting") {
|
|
3557
|
+
he(!1);
|
|
3544
3558
|
return;
|
|
3545
3559
|
}
|
|
3546
|
-
const
|
|
3547
|
-
return () => clearTimeout(
|
|
3548
|
-
}, [
|
|
3549
|
-
const
|
|
3550
|
-
return {
|
|
3551
|
-
|
|
3552
|
-
|
|
3553
|
-
|
|
3554
|
-
|
|
3555
|
-
|
|
3556
|
-
|
|
3557
|
-
|
|
3558
|
-
|
|
3559
|
-
|
|
3560
|
-
|
|
3561
|
-
|
|
3562
|
-
|
|
3563
|
-
|
|
3564
|
-
|
|
3565
|
-
|
|
3566
|
-
|
|
3560
|
+
const I = p.current?.slowConnectionThresholdMs ?? 5e3, q = setTimeout(() => he(!0), I);
|
|
3561
|
+
return () => clearTimeout(q);
|
|
3562
|
+
}, [H]);
|
|
3563
|
+
const Sn = H === "connected" || H === "reconnecting", Ge = f && H !== "offline";
|
|
3564
|
+
return C(() => {
|
|
3565
|
+
typeof document > "u" || (document.documentElement.dataset.ikonLive = String(Ge));
|
|
3566
|
+
}, [Ge]), {
|
|
3567
|
+
connectionState: H,
|
|
3568
|
+
error: O,
|
|
3569
|
+
accessDeniedReason: oe,
|
|
3570
|
+
isServerFull: P,
|
|
3571
|
+
stores: yn,
|
|
3572
|
+
client: p.current,
|
|
3573
|
+
registry: b.current,
|
|
3574
|
+
clientRef: p,
|
|
3575
|
+
uiRef: S,
|
|
3576
|
+
registryRef: b,
|
|
3577
|
+
onAction: bn,
|
|
3578
|
+
isReady: Sn,
|
|
3579
|
+
isLive: Ge,
|
|
3580
|
+
brandingRequired: p.current?.brandingRequired ?? !1,
|
|
3581
|
+
isConnectingSlow: Ae,
|
|
3582
|
+
webRtcVideoStreams: p.current?.webRtcVideoStreams ?? /* @__PURE__ */ new Map(),
|
|
3583
|
+
webRtcTrackMap: p.current?.webRtcTrackMap ?? /* @__PURE__ */ new Map()
|
|
3567
3584
|
};
|
|
3568
3585
|
}
|
|
3569
|
-
function
|
|
3570
|
-
const e =
|
|
3586
|
+
function ri(t) {
|
|
3587
|
+
const e = E(!1);
|
|
3571
3588
|
return D(() => {
|
|
3572
3589
|
if (e.current) return;
|
|
3573
3590
|
e.current = !0;
|
|
@@ -3575,30 +3592,30 @@ function Ds(t) {
|
|
|
3575
3592
|
n.rel = "stylesheet", n.href = t, document.head.appendChild(n);
|
|
3576
3593
|
}, [t]);
|
|
3577
3594
|
}
|
|
3578
|
-
let
|
|
3579
|
-
function
|
|
3580
|
-
const [n, r] = N([]), o =
|
|
3595
|
+
let vs = 0;
|
|
3596
|
+
function Es(t = 5, e = 5e3) {
|
|
3597
|
+
const [n, r] = N([]), o = E(/* @__PURE__ */ new Map()), s = D((i) => {
|
|
3581
3598
|
const a = o.current.get(i);
|
|
3582
3599
|
a && (clearTimeout(a), o.current.delete(i)), r((l) => l.filter((d) => d.id !== i));
|
|
3583
3600
|
}, []);
|
|
3584
|
-
return
|
|
3585
|
-
const i = o.current, a =
|
|
3601
|
+
return C(() => {
|
|
3602
|
+
const i = o.current, a = Wt(
|
|
3586
3603
|
(l) => {
|
|
3587
|
-
if (!
|
|
3604
|
+
if (!Kt())
|
|
3588
3605
|
return;
|
|
3589
|
-
const d = `toast-${++
|
|
3606
|
+
const d = `toast-${++vs}`, h = l.level === Qe.ERROR ? "error" : "warn", y = {
|
|
3590
3607
|
id: d,
|
|
3591
3608
|
level: h,
|
|
3592
3609
|
message: l.message,
|
|
3593
3610
|
component: l.component
|
|
3594
3611
|
};
|
|
3595
|
-
r((c) => [...c,
|
|
3612
|
+
r((c) => [...c, y].slice(-t));
|
|
3596
3613
|
const m = setTimeout(() => {
|
|
3597
3614
|
s(d);
|
|
3598
3615
|
}, e);
|
|
3599
3616
|
i.set(d, m);
|
|
3600
3617
|
},
|
|
3601
|
-
{ minLevel:
|
|
3618
|
+
{ minLevel: Qe.WARN }
|
|
3602
3619
|
);
|
|
3603
3620
|
return () => {
|
|
3604
3621
|
a();
|
|
@@ -3608,9 +3625,9 @@ function rs(t = 5, e = 5e3) {
|
|
|
3608
3625
|
};
|
|
3609
3626
|
}, [t, e, s]), { toasts: n, dismissToast: s };
|
|
3610
3627
|
}
|
|
3611
|
-
function
|
|
3628
|
+
function Rs(t, e, n) {
|
|
3612
3629
|
const [r, o] = N(n);
|
|
3613
|
-
return
|
|
3630
|
+
return C(() => {
|
|
3614
3631
|
if (!t)
|
|
3615
3632
|
return;
|
|
3616
3633
|
let s = !0, i = null;
|
|
@@ -3625,9 +3642,9 @@ function os(t, e, n) {
|
|
|
3625
3642
|
};
|
|
3626
3643
|
}, [t, e]), r;
|
|
3627
3644
|
}
|
|
3628
|
-
function
|
|
3645
|
+
function oi(t, e, n) {
|
|
3629
3646
|
const [r, o] = N(null);
|
|
3630
|
-
return
|
|
3647
|
+
return C(() => {
|
|
3631
3648
|
if (!t)
|
|
3632
3649
|
return;
|
|
3633
3650
|
let s = !0;
|
|
@@ -3638,58 +3655,58 @@ function $s(t, e, n) {
|
|
|
3638
3655
|
}), () => {
|
|
3639
3656
|
s = !1;
|
|
3640
3657
|
};
|
|
3641
|
-
}, [t, e]),
|
|
3658
|
+
}, [t, e]), Rs(r ? t : null, r ?? "", n);
|
|
3642
3659
|
}
|
|
3643
|
-
const
|
|
3660
|
+
const ue = re("IkonDebug"), As = {
|
|
3644
3661
|
Digit1: "connecting",
|
|
3645
3662
|
Digit2: "connected",
|
|
3646
3663
|
Digit3: "reconnecting",
|
|
3647
3664
|
Digit4: "offline",
|
|
3648
3665
|
Digit5: "offline",
|
|
3649
3666
|
Digit0: "clear"
|
|
3650
|
-
},
|
|
3651
|
-
function
|
|
3652
|
-
const e =
|
|
3653
|
-
return
|
|
3667
|
+
}, Ts = "Digit5", ks = "Digit6", Cs = "Synthetic debug error (Ctrl+Shift+5)", Is = "Synthetic debug access-denied (Ctrl+Shift+6)", _s = 5e3;
|
|
3668
|
+
function Os(t) {
|
|
3669
|
+
const e = Kt(), [n, r] = N(null), [o, s] = N(!1), [i, a] = N(null), [l, d] = N(null), [h, y] = N(!1), [m, c] = N(!1), [u, g] = N(!1);
|
|
3670
|
+
return C(() => {
|
|
3654
3671
|
if (!e)
|
|
3655
3672
|
return;
|
|
3656
|
-
const
|
|
3657
|
-
if (!
|
|
3673
|
+
const S = (b) => {
|
|
3674
|
+
if (!b.ctrlKey || !b.shiftKey)
|
|
3658
3675
|
return;
|
|
3659
|
-
if (
|
|
3660
|
-
|
|
3676
|
+
if (b.code === "KeyE") {
|
|
3677
|
+
b.preventDefault(), y((T) => (ue.warn(`Empty-stores override: ${T ? "off" : "on"}`), !T));
|
|
3661
3678
|
return;
|
|
3662
3679
|
}
|
|
3663
|
-
if (
|
|
3664
|
-
|
|
3680
|
+
if (b.code === "Digit7") {
|
|
3681
|
+
b.preventDefault(), c((T) => (ue.warn(`Branding-banner override: ${T ? "off" : "on"}`), !T));
|
|
3665
3682
|
return;
|
|
3666
3683
|
}
|
|
3667
|
-
if (
|
|
3668
|
-
|
|
3684
|
+
if (b.code === "Digit8") {
|
|
3685
|
+
b.preventDefault(), g((T) => (ue.warn(`Debug-overlay override: ${T ? "off" : "on"}`), !T));
|
|
3669
3686
|
return;
|
|
3670
3687
|
}
|
|
3671
|
-
if (
|
|
3672
|
-
|
|
3688
|
+
if (b.code === ks) {
|
|
3689
|
+
b.preventDefault(), d(Is), r(null), a(null), ue.warn("Forced access denied");
|
|
3673
3690
|
return;
|
|
3674
3691
|
}
|
|
3675
|
-
const
|
|
3676
|
-
if (
|
|
3692
|
+
const R = As[b.code];
|
|
3693
|
+
if (R === void 0)
|
|
3677
3694
|
return;
|
|
3678
|
-
if (
|
|
3679
|
-
r(null), a(null), d(null),
|
|
3695
|
+
if (b.preventDefault(), R === "clear") {
|
|
3696
|
+
r(null), a(null), d(null), ue.warn("Cleared forced state");
|
|
3680
3697
|
return;
|
|
3681
3698
|
}
|
|
3682
|
-
const
|
|
3683
|
-
r(
|
|
3699
|
+
const v = b.code === Ts;
|
|
3700
|
+
r(R), a(v ? Cs : null), d(null), ue.warn(`Forced state: ${R}${v ? " (with error)" : ""}`);
|
|
3684
3701
|
};
|
|
3685
|
-
return window.addEventListener("keydown",
|
|
3686
|
-
}, [e]),
|
|
3702
|
+
return window.addEventListener("keydown", S), () => window.removeEventListener("keydown", S);
|
|
3703
|
+
}, [e]), C(() => {
|
|
3687
3704
|
if (n !== "connecting") {
|
|
3688
3705
|
s(!1);
|
|
3689
3706
|
return;
|
|
3690
3707
|
}
|
|
3691
|
-
const
|
|
3692
|
-
return () => clearTimeout(
|
|
3708
|
+
const S = setTimeout(() => s(!0), _s);
|
|
3709
|
+
return () => clearTimeout(S);
|
|
3693
3710
|
}, [n]), !e || n === null && !h && l === null && !m && !u ? { app: t, forcedState: null, emptyStores: !1, forcedError: null, forcedAccessDenied: null, forcedBranding: !1, forcedDebugOverlay: !1, debugEnabled: e } : { app: {
|
|
3694
3711
|
...t,
|
|
3695
3712
|
connectionState: n ?? t.connectionState,
|
|
@@ -3699,61 +3716,61 @@ function ds(t) {
|
|
|
3699
3716
|
accessDeniedReason: l ?? t.accessDeniedReason
|
|
3700
3717
|
}, forcedState: n, emptyStores: h, forcedError: i, forcedAccessDenied: l, forcedBranding: m, forcedDebugOverlay: u, debugEnabled: e };
|
|
3701
3718
|
}
|
|
3702
|
-
function
|
|
3719
|
+
function Ns(t, e) {
|
|
3703
3720
|
return t === void 0 ? null : typeof t == "function" ? t(e) : t;
|
|
3704
3721
|
}
|
|
3705
|
-
function
|
|
3722
|
+
function xs(t) {
|
|
3706
3723
|
return t === void 0 ? null : typeof t == "function" ? t() : t;
|
|
3707
3724
|
}
|
|
3708
|
-
function
|
|
3725
|
+
function Ps(t, e) {
|
|
3709
3726
|
return t === void 0 ? null : typeof t == "function" ? t(e) : t;
|
|
3710
3727
|
}
|
|
3711
|
-
function
|
|
3728
|
+
function Ls(t, e) {
|
|
3712
3729
|
return t === void 0 ? null : typeof t == "function" ? t(e) : t;
|
|
3713
3730
|
}
|
|
3714
|
-
function
|
|
3715
|
-
const { connectingOverlay: e, reconnectingOverlay: n, offlineOverlay: r, accessDeniedScreen: o, ...s } = t, i =
|
|
3716
|
-
if (
|
|
3717
|
-
return
|
|
3718
|
-
const
|
|
3731
|
+
function si(t) {
|
|
3732
|
+
const { connectingOverlay: e, reconnectingOverlay: n, offlineOverlay: r, accessDeniedScreen: o, ...s } = t, i = Os(s), { app: a } = i, { connectionState: l, isConnectingSlow: d, stores: h, registry: y, client: m, onAction: c, isReady: u, error: g, accessDeniedReason: p, brandingRequired: S } = a, b = S || i.forcedBranding, R = E(null);
|
|
3733
|
+
if (h && y && (u || h.size > 0) && (R.current = { stores: h, registry: y, client: m }), p)
|
|
3734
|
+
return Ls(o, p);
|
|
3735
|
+
const v = R.current;
|
|
3719
3736
|
let T = null;
|
|
3720
3737
|
switch (l) {
|
|
3721
3738
|
case "waitingForExternalConnectUrl":
|
|
3722
3739
|
case "connecting":
|
|
3723
|
-
T =
|
|
3740
|
+
T = Ns(e, d);
|
|
3724
3741
|
break;
|
|
3725
3742
|
case "reconnecting":
|
|
3726
|
-
T =
|
|
3743
|
+
T = xs(n);
|
|
3727
3744
|
break;
|
|
3728
3745
|
case "offline":
|
|
3729
|
-
T =
|
|
3746
|
+
T = Ps(r, g);
|
|
3730
3747
|
break;
|
|
3731
3748
|
default:
|
|
3732
3749
|
T = null;
|
|
3733
3750
|
}
|
|
3734
|
-
return /* @__PURE__ */
|
|
3735
|
-
|
|
3736
|
-
|
|
3751
|
+
return /* @__PURE__ */ w.jsxs(w.Fragment, { children: [
|
|
3752
|
+
v && /* @__PURE__ */ w.jsx(
|
|
3753
|
+
Gt,
|
|
3737
3754
|
{
|
|
3738
|
-
stores:
|
|
3739
|
-
registry:
|
|
3740
|
-
client:
|
|
3755
|
+
stores: v.stores,
|
|
3756
|
+
registry: v.registry,
|
|
3757
|
+
client: v.client,
|
|
3741
3758
|
onAction: c
|
|
3742
3759
|
}
|
|
3743
3760
|
),
|
|
3744
3761
|
T,
|
|
3745
|
-
|
|
3746
|
-
/* @__PURE__ */
|
|
3747
|
-
/* @__PURE__ */
|
|
3762
|
+
b && /* @__PURE__ */ w.jsx(Ms, {}),
|
|
3763
|
+
/* @__PURE__ */ w.jsx(js, {}),
|
|
3764
|
+
/* @__PURE__ */ w.jsx(fn, { state: l, forceVisible: i.forcedDebugOverlay })
|
|
3748
3765
|
] });
|
|
3749
3766
|
}
|
|
3750
|
-
const
|
|
3751
|
-
function
|
|
3752
|
-
return /* @__PURE__ */
|
|
3767
|
+
const Us = "https://ikonai.com";
|
|
3768
|
+
function Ms() {
|
|
3769
|
+
return /* @__PURE__ */ w.jsxs(
|
|
3753
3770
|
"a",
|
|
3754
3771
|
{
|
|
3755
3772
|
className: "ikon-branding-banner",
|
|
3756
|
-
href:
|
|
3773
|
+
href: Us,
|
|
3757
3774
|
target: "_blank",
|
|
3758
3775
|
rel: "noopener noreferrer",
|
|
3759
3776
|
style: {
|
|
@@ -3775,141 +3792,141 @@ function ys() {
|
|
|
3775
3792
|
pointerEvents: "auto"
|
|
3776
3793
|
},
|
|
3777
3794
|
children: [
|
|
3778
|
-
/* @__PURE__ */
|
|
3779
|
-
/* @__PURE__ */
|
|
3795
|
+
/* @__PURE__ */ w.jsx("span", { style: { opacity: 0.75 }, children: "Powered by" }),
|
|
3796
|
+
/* @__PURE__ */ w.jsx("span", { style: { fontWeight: 700 }, children: "Ikon" })
|
|
3780
3797
|
]
|
|
3781
3798
|
}
|
|
3782
3799
|
);
|
|
3783
3800
|
}
|
|
3784
|
-
function
|
|
3785
|
-
const { toasts: t, dismissToast: e } =
|
|
3786
|
-
return t.length === 0 ? null : /* @__PURE__ */
|
|
3801
|
+
function js() {
|
|
3802
|
+
const { toasts: t, dismissToast: e } = Es();
|
|
3803
|
+
return t.length === 0 ? null : /* @__PURE__ */ w.jsx("div", { className: "ikon-toast-overlay", children: t.map((n) => /* @__PURE__ */ w.jsx(Ds, { toast: n, onDismiss: e }, n.id)) });
|
|
3787
3804
|
}
|
|
3788
|
-
function
|
|
3789
|
-
return /* @__PURE__ */
|
|
3805
|
+
function Ds({ toast: t, onDismiss: e }) {
|
|
3806
|
+
return /* @__PURE__ */ w.jsxs(
|
|
3790
3807
|
"div",
|
|
3791
3808
|
{
|
|
3792
3809
|
className: `ikon-toast-overlay-chip ikon-toast-overlay-chip--${t.level}`,
|
|
3793
3810
|
onClick: () => e(t.id),
|
|
3794
3811
|
role: "alert",
|
|
3795
3812
|
children: [
|
|
3796
|
-
/* @__PURE__ */
|
|
3797
|
-
/* @__PURE__ */
|
|
3798
|
-
/* @__PURE__ */
|
|
3813
|
+
/* @__PURE__ */ w.jsx("span", { className: "ikon-toast-overlay-icon", children: t.level === "error" ? "🚨" : "⚠️" }),
|
|
3814
|
+
/* @__PURE__ */ w.jsxs("div", { className: "ikon-toast-overlay-content", children: [
|
|
3815
|
+
/* @__PURE__ */ w.jsxs("span", { className: "ikon-toast-overlay-component", children: [
|
|
3799
3816
|
"[",
|
|
3800
3817
|
t.component,
|
|
3801
3818
|
"]"
|
|
3802
3819
|
] }),
|
|
3803
|
-
/* @__PURE__ */
|
|
3820
|
+
/* @__PURE__ */ w.jsx("span", { className: "ikon-toast-overlay-message", children: t.message })
|
|
3804
3821
|
] })
|
|
3805
3822
|
]
|
|
3806
3823
|
}
|
|
3807
3824
|
);
|
|
3808
3825
|
}
|
|
3809
|
-
const
|
|
3810
|
-
function
|
|
3826
|
+
const hn = Ft(null);
|
|
3827
|
+
function $s(t, e) {
|
|
3811
3828
|
return e ? t.replace(/\{(\w+)\}/g, (n, r) => e[r] ?? `{${r}}`) : t;
|
|
3812
3829
|
}
|
|
3813
|
-
function
|
|
3814
|
-
const n =
|
|
3830
|
+
function Bs(t, e) {
|
|
3831
|
+
const n = $n();
|
|
3815
3832
|
if (n && t.includes(n))
|
|
3816
3833
|
return n;
|
|
3817
3834
|
const r = navigator.language.split("-")[0];
|
|
3818
3835
|
return t.includes(r) ? r : e && t.includes(e) ? e : "en";
|
|
3819
3836
|
}
|
|
3820
|
-
function
|
|
3821
|
-
return e ?
|
|
3837
|
+
function Fs(t, e, n) {
|
|
3838
|
+
return e ? Bs(t, n) : n && t.includes(n) ? n : "en";
|
|
3822
3839
|
}
|
|
3823
|
-
function
|
|
3840
|
+
function ii({
|
|
3824
3841
|
children: t,
|
|
3825
3842
|
translations: e,
|
|
3826
3843
|
defaultLanguage: n,
|
|
3827
3844
|
detectLanguage: r = !1
|
|
3828
3845
|
}) {
|
|
3829
|
-
const o = Object.keys(e), s =
|
|
3846
|
+
const o = Object.keys(e), s = Fs(o, r, n), i = e[s] ?? e.en, a = W(
|
|
3830
3847
|
() => ({
|
|
3831
3848
|
t: (l, d) => {
|
|
3832
3849
|
const h = i[l];
|
|
3833
|
-
return
|
|
3850
|
+
return $s(h, d);
|
|
3834
3851
|
},
|
|
3835
3852
|
locale: s,
|
|
3836
3853
|
translations: i
|
|
3837
3854
|
}),
|
|
3838
3855
|
[i, s]
|
|
3839
3856
|
);
|
|
3840
|
-
return /* @__PURE__ */
|
|
3857
|
+
return /* @__PURE__ */ w.jsx(hn, { value: a, children: t });
|
|
3841
3858
|
}
|
|
3842
|
-
function
|
|
3843
|
-
const t =
|
|
3859
|
+
function ai() {
|
|
3860
|
+
const t = ct(hn);
|
|
3844
3861
|
if (!t)
|
|
3845
3862
|
throw new Error("useI18n must be used within an I18nProvider");
|
|
3846
3863
|
return t;
|
|
3847
3864
|
}
|
|
3848
3865
|
export {
|
|
3849
|
-
|
|
3850
|
-
|
|
3851
|
-
|
|
3852
|
-
|
|
3853
|
-
|
|
3854
|
-
|
|
3855
|
-
|
|
3856
|
-
|
|
3857
|
-
|
|
3858
|
-
|
|
3859
|
-
|
|
3860
|
-
|
|
3861
|
-
|
|
3862
|
-
|
|
3863
|
-
|
|
3864
|
-
|
|
3865
|
-
|
|
3866
|
-
|
|
3867
|
-
|
|
3868
|
-
|
|
3869
|
-
|
|
3870
|
-
|
|
3871
|
-
|
|
3872
|
-
|
|
3873
|
-
|
|
3874
|
-
|
|
3875
|
-
|
|
3876
|
-
|
|
3877
|
-
|
|
3878
|
-
|
|
3879
|
-
|
|
3880
|
-
|
|
3881
|
-
|
|
3882
|
-
|
|
3883
|
-
|
|
3884
|
-
|
|
3885
|
-
|
|
3886
|
-
|
|
3887
|
-
|
|
3888
|
-
|
|
3889
|
-
|
|
3890
|
-
|
|
3891
|
-
|
|
3892
|
-
|
|
3893
|
-
|
|
3894
|
-
|
|
3895
|
-
|
|
3896
|
-
|
|
3897
|
-
|
|
3898
|
-
|
|
3899
|
-
|
|
3900
|
-
|
|
3901
|
-
|
|
3902
|
-
|
|
3903
|
-
|
|
3904
|
-
|
|
3905
|
-
|
|
3906
|
-
|
|
3907
|
-
|
|
3908
|
-
|
|
3909
|
-
|
|
3910
|
-
|
|
3911
|
-
|
|
3866
|
+
Qs as AuthProvider,
|
|
3867
|
+
ti as ConnectionStateRenderer,
|
|
3868
|
+
ln as DEBUG_OVERLAY_ENABLED,
|
|
3869
|
+
fn as DebugOverlay,
|
|
3870
|
+
ii as I18nProvider,
|
|
3871
|
+
yr as IKON_UI_BASE_MODULE,
|
|
3872
|
+
_r as IKON_UI_MEDIA_MODULE,
|
|
3873
|
+
Gr as IKON_UI_SHADERTOY_MODULE,
|
|
3874
|
+
Wr as IKON_UI_SHADERTOY_TYPE,
|
|
3875
|
+
tt as IKON_UI_STREAM_CATEGORY,
|
|
3876
|
+
Ar as IKON_UI_VIDEO_CANVAS_TYPE,
|
|
3877
|
+
Tr as IKON_UI_VIDEO_URL_PLAYER_TYPE,
|
|
3878
|
+
si as IkonApp,
|
|
3879
|
+
rr as IkonUi,
|
|
3880
|
+
Xr as IkonUiRegistry,
|
|
3881
|
+
Gt as IkonUiSurface,
|
|
3882
|
+
er as InspectOverlay,
|
|
3883
|
+
Xs as ParallaxView,
|
|
3884
|
+
Qn as UiComponentRegistry,
|
|
3885
|
+
Zn as UiRenderer,
|
|
3886
|
+
ui as UiStreamStore,
|
|
3887
|
+
Hs as areIkonUiModuleListsEqual,
|
|
3888
|
+
rn as authenticateAnonymous,
|
|
3889
|
+
es as buildOAuthRedirectUrl,
|
|
3890
|
+
Ue as clearAuthSession,
|
|
3891
|
+
jt as clearOAuthParams,
|
|
3892
|
+
gr as createBaseResolvers,
|
|
3893
|
+
Ys as createComponentLibrary,
|
|
3894
|
+
Hr as createIkonUiRegistry,
|
|
3895
|
+
Cr as createMediaResolvers,
|
|
3896
|
+
Kr as createShadertoyRendererResolver,
|
|
3897
|
+
nr as isIkonUiCategoryMatch,
|
|
3898
|
+
tn as loadAuthSession,
|
|
3899
|
+
br as loadBaseModule,
|
|
3900
|
+
Or as loadMediaModule,
|
|
3901
|
+
Yr as loadShadertoyModule,
|
|
3902
|
+
Ro as normalizeIkonUiModuleList,
|
|
3903
|
+
Js as parseIkonUiInitPayload,
|
|
3904
|
+
Zo as parseOAuthCallback,
|
|
3905
|
+
Qo as parseOAuthError,
|
|
3906
|
+
fi as randomUuid,
|
|
3907
|
+
Ao as readIkonUiModules,
|
|
3908
|
+
qs as readIkonUiModulesFromSources,
|
|
3909
|
+
Sr as registerBaseModule,
|
|
3910
|
+
Nr as registerMediaModule,
|
|
3911
|
+
zr as registerShadertoyModule,
|
|
3912
|
+
qn as renderChildren,
|
|
3913
|
+
Zs as renderMotionLetters,
|
|
3914
|
+
Ee as saveAuthSession,
|
|
3915
|
+
qo as sendLoginCode,
|
|
3916
|
+
le as sessionToUser,
|
|
3917
|
+
hs as useAuth,
|
|
3918
|
+
ei as useAuthGuard,
|
|
3919
|
+
ps as useAuthOptional,
|
|
3920
|
+
ai as useI18n,
|
|
3921
|
+
ni as useIkonApp,
|
|
3922
|
+
Os as useIkonDebug,
|
|
3923
|
+
Rs as useIkonReactive,
|
|
3924
|
+
ro as useIkonStyles,
|
|
3925
|
+
so as useIkonUiStores,
|
|
3926
|
+
ri as useLazyFont,
|
|
3927
|
+
oi as useReactive,
|
|
3928
|
+
Es as useToasts,
|
|
3912
3929
|
Z as useUiNode,
|
|
3913
|
-
|
|
3914
|
-
|
|
3930
|
+
zs as useUiStore,
|
|
3931
|
+
Jo as verifyLoginCode
|
|
3915
3932
|
};
|