aoi-comp 1.0.6 → 1.0.8
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/dist/{BufferResource-CVU-ZRRz.js → BufferResource-DPOGqxQ8.js} +8 -6
- package/dist/{CanvasPool-C3aVgvEX.js → CanvasPool-Btji3eOu.js} +1 -1
- package/dist/{Geometry-CN7W9DnD.js → Geometry-CmoUjYuy.js} +13 -12
- package/dist/{RenderTargetSystem-D_FiZPnb.js → RenderTargetSystem-BwBGe2Se.js} +252 -252
- package/dist/{browserAll-DqFkNC6q.js → browserAll-BIc-EcPU.js} +20 -20
- package/dist/{canvasUtils-D0KM_fKp.js → canvasUtils-BZU-qDXH.js} +1 -1
- package/dist/comps.js +20774 -3227
- package/dist/{getTextureBatchBindGroup-CLFTP_Vc.js → getTextureBatchBindGroup-B9kZnBNO.js} +1 -1
- package/dist/hooks-DVVg7e1H.js +527 -0
- package/dist/hooks.js +2 -2
- package/dist/index.js +1 -1
- package/dist/{init-DVXFVLyx.js → init-W_GeGJkn.js} +54 -47
- package/dist/{init-CIaGzij5.js → init-pj0uFHxN.js} +18 -18
- package/dist/{packages-Dd2mV9Xv.js → packages-B-izsU7O.js} +985 -718
- package/dist/style.css +1 -1
- package/dist/utils.js +2 -2
- package/dist/webworkerAll-CSNhSmU-.js +2 -0
- package/package.json +5 -4
- package/dist/CanvasRenderer-CVj7HTkL.js +0 -3460
- package/dist/WebGLRenderer-CurPxJtF.js +0 -2210
- package/dist/WebGPURenderer-CfiYFIN2.js +0 -1840
- package/dist/hooks-FYdXNEDe.js +0 -452
- package/dist/rolldown-runtime-CWhphoD1.js +0 -23
- package/dist/webworkerAll-XSXRmCFC.js +0 -2
package/dist/hooks-FYdXNEDe.js
DELETED
|
@@ -1,452 +0,0 @@
|
|
|
1
|
-
import { r as e, t } from "./rolldown-runtime-CWhphoD1.js";
|
|
2
|
-
import { E as n, H as r, J as i, K as a, O as o, V as s, c, d as l, f as u, m as d, q as f, s as p, t as m, w as h, x as g } from "./packages-Dd2mV9Xv.js";
|
|
3
|
-
import { message as _ } from "antd";
|
|
4
|
-
import { createContext as v, use as y, useCallback as b, useContext as x, useEffect as S, useMemo as C, useRef as w, useState as T } from "react";
|
|
5
|
-
//#region node_modules/.pnpm/react-i18next@17.0.11_i18ne_00b880b3cd01c3819045f8a7994d0c96/node_modules/react-i18next/dist/es/utils.js
|
|
6
|
-
var E = (e, t, n, r) => {
|
|
7
|
-
let i = [n, {
|
|
8
|
-
code: t,
|
|
9
|
-
...r || {}
|
|
10
|
-
}];
|
|
11
|
-
if (e?.services?.logger?.forward) return e.services.logger.forward(i, "warn", "react-i18next::", !0);
|
|
12
|
-
N(i[0]) && (i[0] = `react-i18next:: ${i[0]}`), e?.services?.logger?.warn ? e.services.logger.warn(...i) : console?.warn && console.warn(...i);
|
|
13
|
-
}, D = {}, O = (e, t, n, r) => {
|
|
14
|
-
N(n) && D[n] || (N(n) && (D[n] = /* @__PURE__ */ new Date()), E(e, t, n, r));
|
|
15
|
-
}, k = (e, t) => () => {
|
|
16
|
-
if (e.isInitialized) t();
|
|
17
|
-
else {
|
|
18
|
-
let n = () => {
|
|
19
|
-
setTimeout(() => {
|
|
20
|
-
e.off("initialized", n);
|
|
21
|
-
}, 0), t();
|
|
22
|
-
};
|
|
23
|
-
e.on("initialized", n);
|
|
24
|
-
}
|
|
25
|
-
}, A = (e, t, n) => {
|
|
26
|
-
e.loadNamespaces(t, k(e, n));
|
|
27
|
-
}, j = (e, t, n, r) => {
|
|
28
|
-
if (N(n) && (n = [n]), e.options.preload && e.options.preload.indexOf(t) > -1) return A(e, n, r);
|
|
29
|
-
n.forEach((t) => {
|
|
30
|
-
e.options.ns.indexOf(t) < 0 && e.options.ns.push(t);
|
|
31
|
-
}), e.loadLanguages(t, k(e, r));
|
|
32
|
-
}, M = (e, t, n = {}) => !t.languages || !t.languages.length ? (O(t, "NO_LANGUAGES", "i18n.languages were undefined or empty", { languages: t.languages }), !0) : t.hasLoadedNamespace(e, {
|
|
33
|
-
lng: n.lng,
|
|
34
|
-
precheck: (t, r) => {
|
|
35
|
-
if (n.bindI18n && n.bindI18n.indexOf("languageChanging") > -1 && t.services.backendConnector.backend && t.isLanguageChangingTo && !r(t.isLanguageChangingTo, e)) return !1;
|
|
36
|
-
}
|
|
37
|
-
}), N = (e) => typeof e == "string", P = (e) => typeof e == "object" && !!e, F = v(), I = class {
|
|
38
|
-
constructor() {
|
|
39
|
-
this.usedNamespaces = {};
|
|
40
|
-
}
|
|
41
|
-
addUsedNamespaces(e) {
|
|
42
|
-
e.forEach((e) => {
|
|
43
|
-
this.usedNamespaces[e] || (this.usedNamespaces[e] = !0);
|
|
44
|
-
});
|
|
45
|
-
}
|
|
46
|
-
getUsedNamespaces() {
|
|
47
|
-
return Object.keys(this.usedNamespaces);
|
|
48
|
-
}
|
|
49
|
-
}, L = /* @__PURE__ */ t(((t) => {
|
|
50
|
-
var n = e("react");
|
|
51
|
-
function r(e, t) {
|
|
52
|
-
return e === t && (e !== 0 || 1 / e == 1 / t) || e !== e && t !== t;
|
|
53
|
-
}
|
|
54
|
-
var i = typeof Object.is == "function" ? Object.is : r, a = n.useState, o = n.useEffect, s = n.useLayoutEffect, c = n.useDebugValue;
|
|
55
|
-
function l(e, t) {
|
|
56
|
-
var n = t(), r = a({ inst: {
|
|
57
|
-
value: n,
|
|
58
|
-
getSnapshot: t
|
|
59
|
-
} }), i = r[0].inst, l = r[1];
|
|
60
|
-
return s(function() {
|
|
61
|
-
i.value = n, i.getSnapshot = t, u(i) && l({ inst: i });
|
|
62
|
-
}, [
|
|
63
|
-
e,
|
|
64
|
-
n,
|
|
65
|
-
t
|
|
66
|
-
]), o(function() {
|
|
67
|
-
return u(i) && l({ inst: i }), e(function() {
|
|
68
|
-
u(i) && l({ inst: i });
|
|
69
|
-
});
|
|
70
|
-
}, [e]), c(n), n;
|
|
71
|
-
}
|
|
72
|
-
function u(e) {
|
|
73
|
-
var t = e.getSnapshot;
|
|
74
|
-
e = e.value;
|
|
75
|
-
try {
|
|
76
|
-
var n = t();
|
|
77
|
-
return !i(e, n);
|
|
78
|
-
} catch {
|
|
79
|
-
return !0;
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
function d(e, t) {
|
|
83
|
-
return t();
|
|
84
|
-
}
|
|
85
|
-
var f = typeof window > "u" || window.document === void 0 || window.document.createElement === void 0 ? d : l;
|
|
86
|
-
t.useSyncExternalStore = n.useSyncExternalStore === void 0 ? f : n.useSyncExternalStore;
|
|
87
|
-
})), R = /* @__PURE__ */ t(((t) => {
|
|
88
|
-
process.env.NODE_ENV !== "production" && (function() {
|
|
89
|
-
function n(e, t) {
|
|
90
|
-
return e === t && (e !== 0 || 1 / e == 1 / t) || e !== e && t !== t;
|
|
91
|
-
}
|
|
92
|
-
function r(e, t) {
|
|
93
|
-
f || o.startTransition === void 0 || (f = !0, console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));
|
|
94
|
-
var n = t();
|
|
95
|
-
if (!p) {
|
|
96
|
-
var r = t();
|
|
97
|
-
s(n, r) || (console.error("The result of getSnapshot should be cached to avoid an infinite loop"), p = !0);
|
|
98
|
-
}
|
|
99
|
-
r = c({ inst: {
|
|
100
|
-
value: n,
|
|
101
|
-
getSnapshot: t
|
|
102
|
-
} });
|
|
103
|
-
var a = r[0].inst, m = r[1];
|
|
104
|
-
return u(function() {
|
|
105
|
-
a.value = n, a.getSnapshot = t, i(a) && m({ inst: a });
|
|
106
|
-
}, [
|
|
107
|
-
e,
|
|
108
|
-
n,
|
|
109
|
-
t
|
|
110
|
-
]), l(function() {
|
|
111
|
-
return i(a) && m({ inst: a }), e(function() {
|
|
112
|
-
i(a) && m({ inst: a });
|
|
113
|
-
});
|
|
114
|
-
}, [e]), d(n), n;
|
|
115
|
-
}
|
|
116
|
-
function i(e) {
|
|
117
|
-
var t = e.getSnapshot;
|
|
118
|
-
e = e.value;
|
|
119
|
-
try {
|
|
120
|
-
var n = t();
|
|
121
|
-
return !s(e, n);
|
|
122
|
-
} catch {
|
|
123
|
-
return !0;
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
function a(e, t) {
|
|
127
|
-
return t();
|
|
128
|
-
}
|
|
129
|
-
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
|
|
130
|
-
var o = e("react"), s = typeof Object.is == "function" ? Object.is : n, c = o.useState, l = o.useEffect, u = o.useLayoutEffect, d = o.useDebugValue, f = !1, p = !1, m = typeof window > "u" || window.document === void 0 || window.document.createElement === void 0 ? a : r;
|
|
131
|
-
t.useSyncExternalStore = o.useSyncExternalStore === void 0 ? m : o.useSyncExternalStore, typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
|
|
132
|
-
})();
|
|
133
|
-
})), z = (/* @__PURE__ */ t(((e, t) => {
|
|
134
|
-
process.env.NODE_ENV === "production" ? t.exports = L() : t.exports = R();
|
|
135
|
-
})))(), B = {
|
|
136
|
-
t: (e, t) => {
|
|
137
|
-
if (N(t)) return t;
|
|
138
|
-
if (P(t) && N(t.defaultValue)) return t.defaultValue;
|
|
139
|
-
if (typeof e == "function") return "";
|
|
140
|
-
if (Array.isArray(e)) {
|
|
141
|
-
let t = e[e.length - 1];
|
|
142
|
-
return typeof t == "function" ? "" : t;
|
|
143
|
-
}
|
|
144
|
-
return e;
|
|
145
|
-
},
|
|
146
|
-
ready: !1
|
|
147
|
-
}, V = () => () => {}, H = (e, t = {}) => {
|
|
148
|
-
let { i18n: n } = t, { i18n: r, defaultNS: a } = x(F) || {}, o = n || r || f();
|
|
149
|
-
o && !o.reportNamespaces && (o.reportNamespaces = new I()), o || O(o, "NO_I18NEXT_INSTANCE", "useTranslation: You will need to pass in an i18next instance by using initReactI18next or by passing it via props or context. In monorepo setups, make sure there is only one instance of react-i18next.");
|
|
150
|
-
let s = C(() => ({
|
|
151
|
-
...i(),
|
|
152
|
-
...o?.options?.react,
|
|
153
|
-
...t
|
|
154
|
-
}), [o, t]), { useSuspense: c, keyPrefix: l } = s, u = e || a || o?.options?.defaultNS, d = N(u) ? [u] : u || ["translation"], p = C(() => d, d);
|
|
155
|
-
o?.reportNamespaces?.addUsedNamespaces?.(p);
|
|
156
|
-
let m = w(0), h = b((e) => {
|
|
157
|
-
if (!o) return V;
|
|
158
|
-
let { bindI18n: t, bindI18nStore: n } = s, r = () => {
|
|
159
|
-
m.current += 1, e();
|
|
160
|
-
};
|
|
161
|
-
return t && o.on(t, r), n && o.store.on(n, r), () => {
|
|
162
|
-
t && t.split(" ").forEach((e) => o.off(e, r)), n && n.split(" ").forEach((e) => o.store.off(e, r));
|
|
163
|
-
};
|
|
164
|
-
}, [o, s]), g = w(), _ = b(() => {
|
|
165
|
-
if (!o) return B;
|
|
166
|
-
let e = !!(o.isInitialized || o.initializedStoreOnce) && p.every((e) => M(e, o, s)), n = t.lng || o.language, r = m.current, i = g.current;
|
|
167
|
-
if (i && i.ready === e && i.lng === n && i.keyPrefix === l && i.revision === r) return i;
|
|
168
|
-
let a = {
|
|
169
|
-
t: o.getFixedT(n, s.nsMode === "fallback" ? p : p[0], l, { scopeNs: p }),
|
|
170
|
-
ready: e,
|
|
171
|
-
lng: n,
|
|
172
|
-
keyPrefix: l,
|
|
173
|
-
revision: r
|
|
174
|
-
};
|
|
175
|
-
return g.current = a, a;
|
|
176
|
-
}, [
|
|
177
|
-
o,
|
|
178
|
-
p,
|
|
179
|
-
l,
|
|
180
|
-
s,
|
|
181
|
-
t.lng
|
|
182
|
-
]), [v, y] = T(0), { t: E, ready: D } = (0, z.useSyncExternalStore)(h, _, _);
|
|
183
|
-
S(() => {
|
|
184
|
-
if (o && !D && !c) {
|
|
185
|
-
let e = () => y((e) => e + 1);
|
|
186
|
-
t.lng ? j(o, t.lng, p, e) : A(o, p, e);
|
|
187
|
-
}
|
|
188
|
-
}, [
|
|
189
|
-
o,
|
|
190
|
-
t.lng,
|
|
191
|
-
p,
|
|
192
|
-
D,
|
|
193
|
-
c,
|
|
194
|
-
v
|
|
195
|
-
]);
|
|
196
|
-
let k = o || {}, P = w(null), L = w(), R = (e) => {
|
|
197
|
-
let t = Object.getOwnPropertyDescriptors(e);
|
|
198
|
-
t.__original && delete t.__original;
|
|
199
|
-
let n = Object.create(Object.getPrototypeOf(e), t);
|
|
200
|
-
if (!Object.prototype.hasOwnProperty.call(n, "__original")) try {
|
|
201
|
-
Object.defineProperty(n, "__original", {
|
|
202
|
-
value: e,
|
|
203
|
-
writable: !1,
|
|
204
|
-
enumerable: !1,
|
|
205
|
-
configurable: !1
|
|
206
|
-
});
|
|
207
|
-
} catch {}
|
|
208
|
-
return n;
|
|
209
|
-
}, H = C(() => {
|
|
210
|
-
let e = k, t = e?.language, n = e;
|
|
211
|
-
e && (P.current && P.current.__original === e && L.current === t ? n = P.current : (n = R(e), P.current = n, L.current = t));
|
|
212
|
-
let r = !D && !c ? (...e) => (O(o, "USE_T_BEFORE_READY", "useTranslation: t was called before ready. When using useSuspense: false, make sure to check the ready flag before using t."), E(...e)) : E, i = [
|
|
213
|
-
r,
|
|
214
|
-
n,
|
|
215
|
-
D
|
|
216
|
-
];
|
|
217
|
-
return i.t = r, i.i18n = n, i.ready = D, i;
|
|
218
|
-
}, [
|
|
219
|
-
E,
|
|
220
|
-
k,
|
|
221
|
-
D,
|
|
222
|
-
k.resolvedLanguage,
|
|
223
|
-
k.language,
|
|
224
|
-
k.languages
|
|
225
|
-
]);
|
|
226
|
-
if (o && c && !D) {
|
|
227
|
-
let e = !1;
|
|
228
|
-
try {
|
|
229
|
-
e = process.env.NODE_ENV !== "production";
|
|
230
|
-
} catch {}
|
|
231
|
-
throw e && O(o, "SUSPENDED_WHILE_LOADING", "useTranslation: suspended while translations are loading (useSuspense is true by default). Add a <Suspense> boundary above this component, or set react.useSuspense: false in the i18next init options. https://react.i18next.com/latest/usetranslation-hook"), new Promise((e) => {
|
|
232
|
-
let n = () => e();
|
|
233
|
-
t.lng ? j(o, t.lng, p, n) : A(o, p, n);
|
|
234
|
-
});
|
|
235
|
-
}
|
|
236
|
-
return H;
|
|
237
|
-
}, U = { app: v("app") }, W = (e = "app") => {
|
|
238
|
-
U[e] || (U[e] = v(e));
|
|
239
|
-
let t = y(U[e]);
|
|
240
|
-
if (!t) throw Error(a.use.contextErr({ key: e }));
|
|
241
|
-
return t;
|
|
242
|
-
}, G = (e) => {
|
|
243
|
-
let t = w(), n = w();
|
|
244
|
-
return t.current = e, n.current ||= (...e) => t.current(...e), n.current;
|
|
245
|
-
}, K = (e = {}) => {
|
|
246
|
-
let [t, r] = T(Object.keys(e).reduce((e, t) => (e[t] = `vast-${t}-0`, e), {})), i = w(e), a = w(!1), o = G((e) => {
|
|
247
|
-
let i = `vast-${e}-${n("-")}`;
|
|
248
|
-
r({
|
|
249
|
-
...t,
|
|
250
|
-
[e]: i
|
|
251
|
-
});
|
|
252
|
-
}), s = (t, n = e) => {
|
|
253
|
-
let r = t ? n[t] : n;
|
|
254
|
-
if (typeof r != "object" || !r) return;
|
|
255
|
-
let a = new Proxy(r, {
|
|
256
|
-
get(e, n, r) {
|
|
257
|
-
let i = h(e), a = Reflect.get(e, n, i === "map" || i === "set" ? e : r);
|
|
258
|
-
return u(a, "function") ? [
|
|
259
|
-
"add",
|
|
260
|
-
"set",
|
|
261
|
-
"delete",
|
|
262
|
-
"clear",
|
|
263
|
-
"fill",
|
|
264
|
-
"pop",
|
|
265
|
-
"push",
|
|
266
|
-
"reverse",
|
|
267
|
-
"shift",
|
|
268
|
-
"sort",
|
|
269
|
-
"splice",
|
|
270
|
-
"unshift"
|
|
271
|
-
].includes(n) ? (...r) => {
|
|
272
|
-
let i = a.apply(e, r);
|
|
273
|
-
return o(t ?? n), i;
|
|
274
|
-
} : (...t) => a.apply(e, t) : a;
|
|
275
|
-
},
|
|
276
|
-
set(e, n, r, i) {
|
|
277
|
-
if (Reflect.get(e, n, i) === r) return !0;
|
|
278
|
-
let a = Reflect.set(e, n, r, i);
|
|
279
|
-
return o(t ?? n), a;
|
|
280
|
-
},
|
|
281
|
-
deleteProperty(e, n) {
|
|
282
|
-
if (!Reflect.has(e, n)) return !0;
|
|
283
|
-
let r = Reflect.deleteProperty(e, n);
|
|
284
|
-
return o(t ?? n), r;
|
|
285
|
-
}
|
|
286
|
-
});
|
|
287
|
-
if (t) i.current[t] = a;
|
|
288
|
-
else return a;
|
|
289
|
-
};
|
|
290
|
-
if (!a.current) {
|
|
291
|
-
i.current = s();
|
|
292
|
-
for (let t in e) s(t);
|
|
293
|
-
a.current = !0;
|
|
294
|
-
}
|
|
295
|
-
return S(() => () => {
|
|
296
|
-
for (let e in i.current) delete i.current[e];
|
|
297
|
-
a.current = !1;
|
|
298
|
-
}, []), [t, i.current];
|
|
299
|
-
}, q = (e, t) => {
|
|
300
|
-
let [n, r] = T(!0), i = w({
|
|
301
|
-
isMounted: !1,
|
|
302
|
-
lastCallId: 0
|
|
303
|
-
}).current;
|
|
304
|
-
S(() => {
|
|
305
|
-
i.isMounted = !0;
|
|
306
|
-
let e = !t?.length && a();
|
|
307
|
-
return () => {
|
|
308
|
-
e?.(), i.isMounted = !1;
|
|
309
|
-
};
|
|
310
|
-
}, []);
|
|
311
|
-
let a = b((...t) => {
|
|
312
|
-
let a = ++i.lastCallId;
|
|
313
|
-
return n || r(!0), e(...t).then((e) => (i.isMounted && a === i.lastCallId && r(!1), e), (e) => (i.isMounted && a === i.lastCallId && r(!1), e));
|
|
314
|
-
}, t);
|
|
315
|
-
return [n, a];
|
|
316
|
-
}, J = (e = "simple") => {
|
|
317
|
-
let t = {
|
|
318
|
-
exe: m.exe,
|
|
319
|
-
cv: m.cv,
|
|
320
|
-
db: m.db
|
|
321
|
-
}, n = w([
|
|
322
|
-
"store",
|
|
323
|
-
"system",
|
|
324
|
-
"level",
|
|
325
|
-
"defects",
|
|
326
|
-
"running"
|
|
327
|
-
]).current, r = y(U.app);
|
|
328
|
-
switch (e) {
|
|
329
|
-
case "privatize": return Object.assign(t, r);
|
|
330
|
-
case "simple": return n.reduce((e, t) => (e[t] = r[t], e), t);
|
|
331
|
-
case "action": return [n.reduce((e, t) => (e[t] = r[t], e), t), {
|
|
332
|
-
sysAction: r.sysAction,
|
|
333
|
-
setRunning: r.setRunning
|
|
334
|
-
}];
|
|
335
|
-
default: throw Error(a.use.patternErr({ pattern: e }));
|
|
336
|
-
}
|
|
337
|
-
}, Y = (e, t, n = { immediate: !1 }) => {
|
|
338
|
-
let r = w({
|
|
339
|
-
oldValue: null,
|
|
340
|
-
isInit: n.immediate,
|
|
341
|
-
isWatch: !0
|
|
342
|
-
}).current;
|
|
343
|
-
return S(() => {
|
|
344
|
-
r.isWatch && (r.isInit ? (c(t, r.oldValue) || e(t, r.oldValue), r.oldValue = p(t)) : r.isInit = !0);
|
|
345
|
-
}, t), () => {
|
|
346
|
-
r.isWatch = !1;
|
|
347
|
-
};
|
|
348
|
-
}, X = (e = "") => {
|
|
349
|
-
if (!e) throw Error(a.use.prefixErr());
|
|
350
|
-
let { t } = H("translation", { keyPrefix: e });
|
|
351
|
-
return t;
|
|
352
|
-
}, Z = (e, t, n = !1) => {
|
|
353
|
-
let i = G(e);
|
|
354
|
-
return S(() => (n && i(), r(t, i), () => s(t, i)), []), i;
|
|
355
|
-
}, Q = (e, t) => {
|
|
356
|
-
let n = w({
|
|
357
|
-
immediate: !1,
|
|
358
|
-
fps: 17,
|
|
359
|
-
beforeFn: null
|
|
360
|
-
}).current;
|
|
361
|
-
u(t, "boolean") ? n.immediate = t : u(t, "number") ? n.fps = t : u(t, "function") ? n.beforeFn = t : u(t, "object") && (n.immediate = t.immediate, n.fps = t.fps, n.beforeFn = t.beforeFn);
|
|
362
|
-
let r = g(e, 60 * n.fps);
|
|
363
|
-
S(() => (n.beforeFn?.(), n.immediate && r(), window.addEventListener("resize", r), () => window.removeEventListener("resize", r)), []);
|
|
364
|
-
}, $ = (e = "app", t = !1) => {
|
|
365
|
-
let { context: r } = J("privatize"), [i, a] = _.useMessage(), o = w([]), s = (e, t, { key: r, duration: a = 3, onClose: s } = {}) => {
|
|
366
|
-
let c = r || `msg_${n()}`;
|
|
367
|
-
return o.current.push(c), i.open({
|
|
368
|
-
key: c,
|
|
369
|
-
type: e,
|
|
370
|
-
content: t,
|
|
371
|
-
duration: a,
|
|
372
|
-
classNames: { root: "aoi-message" },
|
|
373
|
-
onClose: () => {
|
|
374
|
-
let e = o.current.indexOf(c);
|
|
375
|
-
e !== -1 && o.current.splice(e, 1), s?.();
|
|
376
|
-
}
|
|
377
|
-
}), c;
|
|
378
|
-
}, c = (e, t = {}) => s("success", e, t), l = (e, t = {}) => s("error", e, t);
|
|
379
|
-
return S(() => (!r.msgs.has(e) && !t && r.msgs.set(e, [i, a]), () => {
|
|
380
|
-
t && r.msgs.delete(e);
|
|
381
|
-
}), []), [{
|
|
382
|
-
success: c,
|
|
383
|
-
error: l,
|
|
384
|
-
info: (e, t = {}) => s("info", e, t),
|
|
385
|
-
warning: (e, t = {}) => s("warning", e, t),
|
|
386
|
-
loading: (e, t = {}) => {
|
|
387
|
-
let n = s("loading", e, {
|
|
388
|
-
duration: 0,
|
|
389
|
-
...t
|
|
390
|
-
});
|
|
391
|
-
return {
|
|
392
|
-
key: n,
|
|
393
|
-
ok: (e) => c(e, { key: n }),
|
|
394
|
-
err: (e) => l(e, { key: n })
|
|
395
|
-
};
|
|
396
|
-
}
|
|
397
|
-
}, t ? a : void 0];
|
|
398
|
-
}, ee = (e, t = {}) => {
|
|
399
|
-
let [n, r] = T(t), i = w(u(e, "function")).current, s = () => {
|
|
400
|
-
d(e, (e) => {
|
|
401
|
-
let n = {};
|
|
402
|
-
for (let r in t) n[r] = e?.[r] ?? t[r];
|
|
403
|
-
r(n);
|
|
404
|
-
});
|
|
405
|
-
}, c = (t) => {
|
|
406
|
-
o(e, t);
|
|
407
|
-
}, l = G((t, i, o = null) => {
|
|
408
|
-
n[t] = i, r({
|
|
409
|
-
...n,
|
|
410
|
-
[t]: i
|
|
411
|
-
}), !isPath && e(t, i), o?.(a.tool.setOk());
|
|
412
|
-
});
|
|
413
|
-
S(() => {
|
|
414
|
-
i || s();
|
|
415
|
-
}, []);
|
|
416
|
-
let f = Y(([e]) => {
|
|
417
|
-
c(e);
|
|
418
|
-
}, [n]);
|
|
419
|
-
return i && f(), [n, {
|
|
420
|
-
setData: r,
|
|
421
|
-
setKey: l
|
|
422
|
-
}];
|
|
423
|
-
}, te = (e = 10) => {
|
|
424
|
-
let [t, n] = T([]), [r, i] = T(0), [a, o] = T({
|
|
425
|
-
current: 1,
|
|
426
|
-
pageSize: e
|
|
427
|
-
}), s = w([]);
|
|
428
|
-
return [t, {
|
|
429
|
-
value: s.current,
|
|
430
|
-
current: a.current,
|
|
431
|
-
pageSize: a.pageSize,
|
|
432
|
-
total: r,
|
|
433
|
-
setValue: (t, r) => {
|
|
434
|
-
let c = a.current;
|
|
435
|
-
l(r) && (c = 1, s.current = t, i(r), o({
|
|
436
|
-
...a,
|
|
437
|
-
current: c
|
|
438
|
-
}));
|
|
439
|
-
let u = (c - 1) * e, d = u + e;
|
|
440
|
-
n(t.slice(u, d));
|
|
441
|
-
},
|
|
442
|
-
onChange: (e, t) => {
|
|
443
|
-
let r = (e - 1) * t, i = r + t;
|
|
444
|
-
n(s.current.slice(r, i)), o({
|
|
445
|
-
current: e,
|
|
446
|
-
pageSize: t
|
|
447
|
-
});
|
|
448
|
-
}
|
|
449
|
-
}];
|
|
450
|
-
};
|
|
451
|
-
//#endregion
|
|
452
|
-
export { E as _, $ as a, G as c, J as d, K as f, N as g, P as h, ee as i, X as l, F as m, W as n, Z as o, Y as p, q as r, te as s, U as t, Q as u, O as v };
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
//#region \0rolldown/runtime.js
|
|
2
|
-
var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescriptor, r = Object.getOwnPropertyNames, i = Object.getPrototypeOf, a = Object.prototype.hasOwnProperty, o = (e, t) => () => (t || (e((t = { exports: {} }).exports, t), e = null), t.exports), s = (e, n) => {
|
|
3
|
-
let r = {};
|
|
4
|
-
for (var i in e) t(r, i, {
|
|
5
|
-
get: e[i],
|
|
6
|
-
enumerable: !0
|
|
7
|
-
});
|
|
8
|
-
return n || t(r, Symbol.toStringTag, { value: "Module" }), r;
|
|
9
|
-
}, c = (e, i, o, s) => {
|
|
10
|
-
if (i && typeof i == "object" || typeof i == "function") for (var c = r(i), l = 0, u = c.length, d; l < u; l++) d = c[l], !a.call(e, d) && d !== o && t(e, d, {
|
|
11
|
-
get: ((e) => i[e]).bind(null, d),
|
|
12
|
-
enumerable: !(s = n(i, d)) || s.enumerable
|
|
13
|
-
});
|
|
14
|
-
return e;
|
|
15
|
-
}, l = (n, r, a) => (a = n == null ? {} : e(i(n)), c(r || !n || !n.__esModule ? t(a, "default", {
|
|
16
|
-
value: n,
|
|
17
|
-
enumerable: !0
|
|
18
|
-
}) : a, n)), u = /* @__PURE__ */ ((e) => typeof require < "u" ? require : typeof Proxy < "u" ? new Proxy(e, { get: (e, t) => (typeof require < "u" ? require : e)[t] }) : e)(function(e) {
|
|
19
|
-
if (typeof require < "u") return require.apply(this, arguments);
|
|
20
|
-
throw Error("Calling `require` for \"" + e + "\" in an environment that doesn't expose the `require` function. See https://rolldown.rs/in-depth/bundling-cjs#require-external-modules for more details.");
|
|
21
|
-
});
|
|
22
|
-
//#endregion
|
|
23
|
-
export { l as i, s as n, u as r, o as t };
|