exodeui 6.0.26 → 6.0.28
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/index.d.ts +2 -1
- package/dist/index.js +6 -6
- package/dist/index.mjs +181 -180
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -37,12 +37,12 @@ function _Q(B, A, I) {
|
|
|
37
37
|
var AA, IA;
|
|
38
38
|
const C = B.autoLayout, { direction: g, spacing: Q, padding: E, align: i, wrap: D } = C, o = g === "vertical", s = A.map((b) => {
|
|
39
39
|
const P = I(b.id), gA = b.geometry;
|
|
40
|
-
let
|
|
40
|
+
let u = (P == null ? void 0 : P.width) ?? gA.width ?? 100, q = (P == null ? void 0 : P.height) ?? gA.height ?? 100;
|
|
41
41
|
if (gA.type === "Ellipse" || gA.type === "Polygon" || gA.type === "Star") {
|
|
42
42
|
const l = (P == null ? void 0 : P.radius) ?? gA.radius ?? (P == null ? void 0 : P.outer_radius) ?? gA.outer_radius ?? 50;
|
|
43
|
-
|
|
43
|
+
u = l * 2, q = l * 2;
|
|
44
44
|
}
|
|
45
|
-
return
|
|
45
|
+
return u *= b.transform.scale_x || 1, q *= b.transform.scale_y || 1, { id: b.id, w: u, h: q, original: b };
|
|
46
46
|
});
|
|
47
47
|
let h = B.width, a = B.height;
|
|
48
48
|
const G = ((AA = B.layoutProps) == null ? void 0 : AA.width) === "hug", t = ((IA = B.layoutProps) == null ? void 0 : IA.height) === "hug", K = [];
|
|
@@ -56,13 +56,13 @@ function _Q(B, A, I) {
|
|
|
56
56
|
const H = i.toLowerCase(), QA = H === "center" || H.endsWith("-center"), L = H.endsWith("-right"), U = H === "center" || H.startsWith("center-"), T = H.startsWith("bottom-");
|
|
57
57
|
return K.forEach((b) => {
|
|
58
58
|
let P = X, gA = W;
|
|
59
|
-
o ? U ? gA = E.top + (a - E.top - E.bottom - b.height) / 2 : T && (gA = a - E.bottom - b.height) : QA ? P = E.left + (h - E.left - E.right - b.width) / 2 : L && (P = h - E.right - b.width), b.children.forEach((
|
|
59
|
+
o ? U ? gA = E.top + (a - E.top - E.bottom - b.height) / 2 : T && (gA = a - E.bottom - b.height) : QA ? P = E.left + (h - E.left - E.right - b.width) / 2 : L && (P = h - E.right - b.width), b.children.forEach((u) => {
|
|
60
60
|
let q = P, l = gA;
|
|
61
|
-
o ? QA ? q += (b.width -
|
|
62
|
-
id:
|
|
63
|
-
x: q +
|
|
64
|
-
y: l +
|
|
65
|
-
}), o ? gA +=
|
|
61
|
+
o ? QA ? q += (b.width - u.w) / 2 : L && (q += b.width - u.w) : U ? l += (b.height - u.h) / 2 : T && (l += b.height - u.h), n.push({
|
|
62
|
+
id: u.id,
|
|
63
|
+
x: q + u.w / 2 - h / 2,
|
|
64
|
+
y: l + u.h / 2 - a / 2
|
|
65
|
+
}), o ? gA += u.h + Q : P += u.w + Q;
|
|
66
66
|
}), o ? X += b.width + Q : W += b.height + Q;
|
|
67
67
|
}), { frameWidth: G ? h : void 0, frameHeight: t ? a : void 0, childUpdates: n };
|
|
68
68
|
}
|
|
@@ -81,10 +81,10 @@ function $Q(B, A, I) {
|
|
|
81
81
|
AA >= K.length && K.push(100);
|
|
82
82
|
const IA = t[T], b = K[AA];
|
|
83
83
|
let P = D.left + W + t.slice(0, T).reduce((KA, FA) => KA + FA + E, 0), gA = D.top + H + K.slice(0, AA).reduce((KA, FA) => KA + FA + i, 0);
|
|
84
|
-
const
|
|
85
|
-
let l = (
|
|
84
|
+
const u = I(L.id), q = L.geometry;
|
|
85
|
+
let l = (u == null ? void 0 : u.width) ?? q.width ?? 100, r = (u == null ? void 0 : u.height) ?? q.height ?? 100;
|
|
86
86
|
if (q.type === "Ellipse" || q.type === "Polygon" || q.type === "Star") {
|
|
87
|
-
const KA = (
|
|
87
|
+
const KA = (u == null ? void 0 : u.radius) ?? q.radius ?? (u == null ? void 0 : u.outer_radius) ?? q.outer_radius ?? 50;
|
|
88
88
|
l = KA * 2, r = KA * 2;
|
|
89
89
|
}
|
|
90
90
|
l *= L.transform.scale_x || 1, r *= L.transform.scale_y || 1;
|
|
@@ -170,7 +170,7 @@ function EI(B, A) {
|
|
|
170
170
|
const I = A(4 * B.length, 4) >>> 0;
|
|
171
171
|
return BQ().set(B, I / 4), WA = B.length, I;
|
|
172
172
|
}
|
|
173
|
-
const Bg = Object.freeze({ LinX: 0, 0: "LinX", LinY: 1, 1: "LinY", AngX: 2, 2: "AngX" }), oI = Object.freeze({ Revolute: 0, 0: "Revolute", Fixed: 1, 1: "Fixed", Prismatic: 2, 2: "Prismatic", Rope: 3, 3: "Rope", Spring: 4, 4: "Spring", Generic: 5, 5: "Generic" }),
|
|
173
|
+
const Bg = Object.freeze({ LinX: 0, 0: "LinX", LinY: 1, 1: "LinY", AngX: 2, 2: "AngX" }), oI = Object.freeze({ Revolute: 0, 0: "Revolute", Fixed: 1, 1: "Fixed", Prismatic: 2, 2: "Prismatic", Rope: 3, 3: "Rope", Spring: 4, 4: "Spring", Generic: 5, 5: "Generic" }), mA = Object.freeze({ Ball: 0, 0: "Ball", Cuboid: 1, 1: "Cuboid", Capsule: 2, 2: "Capsule", Segment: 3, 3: "Segment", Polyline: 4, 4: "Polyline", Triangle: 5, 5: "Triangle", TriMesh: 6, 6: "TriMesh", HeightField: 7, 7: "HeightField", Compound: 8, 8: "Compound", ConvexPolygon: 9, 9: "ConvexPolygon", RoundCuboid: 10, 10: "RoundCuboid", RoundTriangle: 11, 11: "RoundTriangle", RoundConvexPolygon: 12, 12: "RoundConvexPolygon", HalfSpace: 13, 13: "HalfSpace", Voxels: 14, 14: "Voxels" }), kg = typeof FinalizationRegistry > "u" ? { register: () => {
|
|
174
174
|
}, unregister: () => {
|
|
175
175
|
} } : new FinalizationRegistry((B) => w.__wbg_rawbroadphase_free(B >>> 0, 1));
|
|
176
176
|
class DI {
|
|
@@ -2047,18 +2047,18 @@ class BB {
|
|
|
2047
2047
|
return I === 0 ? void 0 : Vg.__wrap(I);
|
|
2048
2048
|
}
|
|
2049
2049
|
}
|
|
2050
|
-
const
|
|
2050
|
+
const uC = typeof FinalizationRegistry > "u" ? { register: () => {
|
|
2051
2051
|
}, unregister: () => {
|
|
2052
2052
|
} } : new FinalizationRegistry((B) => w.__wbg_rawshape_free(B >>> 0, 1));
|
|
2053
2053
|
class yA {
|
|
2054
2054
|
static __wrap(A) {
|
|
2055
2055
|
A >>>= 0;
|
|
2056
2056
|
const I = Object.create(yA.prototype);
|
|
2057
|
-
return I.__wbg_ptr = A,
|
|
2057
|
+
return I.__wbg_ptr = A, uC.register(I, I.__wbg_ptr, I), I;
|
|
2058
2058
|
}
|
|
2059
2059
|
__destroy_into_raw() {
|
|
2060
2060
|
const A = this.__wbg_ptr;
|
|
2061
|
-
return this.__wbg_ptr = 0,
|
|
2061
|
+
return this.__wbg_ptr = 0, uC.unregister(this), A;
|
|
2062
2062
|
}
|
|
2063
2063
|
free() {
|
|
2064
2064
|
const A = this.__destroy_into_raw();
|
|
@@ -2173,18 +2173,18 @@ class yA {
|
|
|
2173
2173
|
return i === 0 ? void 0 : Dg.__wrap(i);
|
|
2174
2174
|
}
|
|
2175
2175
|
}
|
|
2176
|
-
const
|
|
2176
|
+
const mC = typeof FinalizationRegistry > "u" ? { register: () => {
|
|
2177
2177
|
}, unregister: () => {
|
|
2178
2178
|
} } : new FinalizationRegistry((B) => w.__wbg_rawshapecasthit_free(B >>> 0, 1));
|
|
2179
2179
|
class wg {
|
|
2180
2180
|
static __wrap(A) {
|
|
2181
2181
|
A >>>= 0;
|
|
2182
2182
|
const I = Object.create(wg.prototype);
|
|
2183
|
-
return I.__wbg_ptr = A,
|
|
2183
|
+
return I.__wbg_ptr = A, mC.register(I, I.__wbg_ptr, I), I;
|
|
2184
2184
|
}
|
|
2185
2185
|
__destroy_into_raw() {
|
|
2186
2186
|
const A = this.__wbg_ptr;
|
|
2187
|
-
return this.__wbg_ptr = 0,
|
|
2187
|
+
return this.__wbg_ptr = 0, mC.unregister(this), A;
|
|
2188
2188
|
}
|
|
2189
2189
|
free() {
|
|
2190
2190
|
const A = this.__destroy_into_raw();
|
|
@@ -2436,11 +2436,11 @@ class nA {
|
|
|
2436
2436
|
return cA.fromAngle(A);
|
|
2437
2437
|
}
|
|
2438
2438
|
}
|
|
2439
|
-
var vA, ZA, Hg, dg, bI, cI, bA, fg, bg, _I, $I, Tg,
|
|
2439
|
+
var vA, ZA, Hg, dg, bI, cI, bA, fg, bg, _I, $I, Tg, ug, Ag, KI;
|
|
2440
2440
|
(function(B) {
|
|
2441
2441
|
B[B.Dynamic = 0] = "Dynamic", B[B.Fixed = 1] = "Fixed", B[B.KinematicPositionBased = 2] = "KinematicPositionBased", B[B.KinematicVelocityBased = 3] = "KinematicVelocityBased";
|
|
2442
2442
|
})(vA || (vA = {}));
|
|
2443
|
-
class
|
|
2443
|
+
class mg {
|
|
2444
2444
|
constructor(A, I, C) {
|
|
2445
2445
|
this.rawSet = A, this.colliderSet = I, this.handle = C;
|
|
2446
2446
|
}
|
|
@@ -2791,7 +2791,7 @@ class sg {
|
|
|
2791
2791
|
class sQ {
|
|
2792
2792
|
constructor(A) {
|
|
2793
2793
|
this.raw = A || new lA(), this.map = new sg(), A && A.forEachRigidBodyHandle((I) => {
|
|
2794
|
-
this.map.set(I, new
|
|
2794
|
+
this.map.set(I, new mg(A, null, I));
|
|
2795
2795
|
});
|
|
2796
2796
|
}
|
|
2797
2797
|
free() {
|
|
@@ -2803,7 +2803,7 @@ class sQ {
|
|
|
2803
2803
|
createRigidBody(A, I) {
|
|
2804
2804
|
let C = c.intoRaw(I.translation), g = nA.intoRaw(I.rotation), Q = c.intoRaw(I.linvel), E = c.intoRaw(I.centerOfMass), i = this.raw.createRigidBody(I.enabled, C, g, I.gravityScale, I.mass, I.massOnly, E, Q, I.angvel, I.principalAngularInertia, I.translationsEnabledX, I.translationsEnabledY, I.rotationsEnabled, I.linearDamping, I.angularDamping, I.status, I.canSleep, I.sleeping, I.softCcdPrediction, I.ccdEnabled, I.dominanceGroup, I.additionalSolverIterations);
|
|
2805
2805
|
C.free(), g.free(), Q.free(), E.free();
|
|
2806
|
-
const D = new
|
|
2806
|
+
const D = new mg(this.raw, A, i);
|
|
2807
2807
|
return D.userData = I.userData, this.map.set(i, D), D;
|
|
2808
2808
|
}
|
|
2809
2809
|
remove(A, I, C, g, Q) {
|
|
@@ -3199,13 +3199,13 @@ class EB {
|
|
|
3199
3199
|
return { x: this.origin.x + this.dir.x * A, y: this.origin.y + this.dir.y * A };
|
|
3200
3200
|
}
|
|
3201
3201
|
}
|
|
3202
|
-
class
|
|
3202
|
+
class mI {
|
|
3203
3203
|
constructor(A, I, C, g) {
|
|
3204
3204
|
this.featureType = cI.Unknown, this.featureId = void 0, this.timeOfImpact = A, this.normal = I, g !== void 0 && (this.featureId = g), C !== void 0 && (this.featureType = C);
|
|
3205
3205
|
}
|
|
3206
3206
|
static fromRaw(A) {
|
|
3207
3207
|
if (!A) return null;
|
|
3208
|
-
const I = new
|
|
3208
|
+
const I = new mI(A.time_of_impact(), c.fromRaw(A.normal()), A.featureType(), A.featureId());
|
|
3209
3209
|
return A.free(), I;
|
|
3210
3210
|
}
|
|
3211
3211
|
}
|
|
@@ -3239,13 +3239,13 @@ class xI {
|
|
|
3239
3239
|
return A.free(), I;
|
|
3240
3240
|
}
|
|
3241
3241
|
}
|
|
3242
|
-
class
|
|
3242
|
+
class uI {
|
|
3243
3243
|
constructor(A, I, C, g, Q) {
|
|
3244
3244
|
this.featureType = cI.Unknown, this.featureId = void 0, this.collider = A, this.point = I, this.isInside = C, Q !== void 0 && (this.featureId = Q), g !== void 0 && (this.featureType = g);
|
|
3245
3245
|
}
|
|
3246
3246
|
static fromRaw(A, I) {
|
|
3247
3247
|
if (!I) return null;
|
|
3248
|
-
const C = new
|
|
3248
|
+
const C = new uI(A.get(I.colliderHandle()), c.fromRaw(I.point()), I.isInside(), I.featureType(), I.featureId());
|
|
3249
3249
|
return I.free(), C;
|
|
3250
3250
|
}
|
|
3251
3251
|
}
|
|
@@ -3293,11 +3293,11 @@ class JQ {
|
|
|
3293
3293
|
return a.free(), G.free(), t.free(), K;
|
|
3294
3294
|
}
|
|
3295
3295
|
projectPoint(A, I, C, g, Q, E, i, D, o, s) {
|
|
3296
|
-
let h = c.intoRaw(g), a =
|
|
3296
|
+
let h = c.intoRaw(g), a = uI.fromRaw(C, this.raw.projectPoint(A.raw, I.raw, C.raw, h, Q, E, i, D, o, s));
|
|
3297
3297
|
return h.free(), a;
|
|
3298
3298
|
}
|
|
3299
3299
|
projectPointAndGetFeature(A, I, C, g, Q, E, i, D, o) {
|
|
3300
|
-
let s = c.intoRaw(g), h =
|
|
3300
|
+
let s = c.intoRaw(g), h = uI.fromRaw(C, this.raw.projectPointAndGetFeature(A.raw, I.raw, C.raw, s, Q, E, i, D, o));
|
|
3301
3301
|
return s.free(), h;
|
|
3302
3302
|
}
|
|
3303
3303
|
intersectionsWithPoint(A, I, C, g, Q, E, i, D, o, s) {
|
|
@@ -3418,42 +3418,42 @@ class JI {
|
|
|
3418
3418
|
return A.free(), I;
|
|
3419
3419
|
}
|
|
3420
3420
|
}
|
|
3421
|
-
class
|
|
3421
|
+
class uA {
|
|
3422
3422
|
static fromRaw(A, I) {
|
|
3423
3423
|
const C = A.coShapeType(I);
|
|
3424
3424
|
let g, Q, E, i, D, o, s;
|
|
3425
3425
|
switch (C) {
|
|
3426
|
-
case
|
|
3426
|
+
case mA.Ball:
|
|
3427
3427
|
return new AC(A.coRadius(I));
|
|
3428
|
-
case
|
|
3428
|
+
case mA.Cuboid:
|
|
3429
3429
|
return g = A.coHalfExtents(I), new gC(g.x, g.y);
|
|
3430
|
-
case
|
|
3430
|
+
case mA.RoundCuboid:
|
|
3431
3431
|
return g = A.coHalfExtents(I), Q = A.coRoundRadius(I), new CC(g.x, g.y, Q);
|
|
3432
|
-
case
|
|
3432
|
+
case mA.Capsule:
|
|
3433
3433
|
return D = A.coHalfHeight(I), o = A.coRadius(I), new QC(D, o);
|
|
3434
|
-
case
|
|
3434
|
+
case mA.Segment:
|
|
3435
3435
|
return E = A.coVertices(I), new BC(c.new(E[0], E[1]), c.new(E[2], E[3]));
|
|
3436
|
-
case
|
|
3436
|
+
case mA.Polyline:
|
|
3437
3437
|
return E = A.coVertices(I), i = A.coIndices(I), new oC(E, i);
|
|
3438
|
-
case
|
|
3438
|
+
case mA.Triangle:
|
|
3439
3439
|
return E = A.coVertices(I), new EC(c.new(E[0], E[1]), c.new(E[2], E[3]), c.new(E[4], E[5]));
|
|
3440
|
-
case
|
|
3440
|
+
case mA.RoundTriangle:
|
|
3441
3441
|
return E = A.coVertices(I), Q = A.coRoundRadius(I), new iC(c.new(E[0], E[1]), c.new(E[2], E[3]), c.new(E[4], E[5]), Q);
|
|
3442
|
-
case
|
|
3442
|
+
case mA.HalfSpace:
|
|
3443
3443
|
return s = c.fromRaw(A.coHalfspaceNormal(I)), new IC(s);
|
|
3444
|
-
case
|
|
3444
|
+
case mA.Voxels:
|
|
3445
3445
|
const h = A.coVoxelData(I), a = A.coVoxelSize(I);
|
|
3446
3446
|
return new DC(h, a);
|
|
3447
|
-
case
|
|
3447
|
+
case mA.TriMesh:
|
|
3448
3448
|
E = A.coVertices(I), i = A.coIndices(I);
|
|
3449
3449
|
const G = A.coTriMeshFlags(I);
|
|
3450
3450
|
return new wC(E, i, G);
|
|
3451
|
-
case
|
|
3451
|
+
case mA.HeightField:
|
|
3452
3452
|
const t = A.coHeightfieldScale(I), K = A.coHeightfieldHeights(I);
|
|
3453
3453
|
return new sC(K, t);
|
|
3454
|
-
case
|
|
3454
|
+
case mA.ConvexPolygon:
|
|
3455
3455
|
return E = A.coVertices(I), new Ig(E, !1);
|
|
3456
|
-
case
|
|
3456
|
+
case mA.RoundConvexPolygon:
|
|
3457
3457
|
return E = A.coVertices(I), Q = A.coRoundRadius(I), new gg(E, Q, !1);
|
|
3458
3458
|
default:
|
|
3459
3459
|
throw new Error("unknown shape type: " + C);
|
|
@@ -3488,7 +3488,7 @@ class mA {
|
|
|
3488
3488
|
return E.free(), i.free(), D.free(), o.free(), s.free(), h;
|
|
3489
3489
|
}
|
|
3490
3490
|
castRayAndGetNormal(A, I, C, g, Q) {
|
|
3491
|
-
let E = c.intoRaw(I), i = nA.intoRaw(C), D = c.intoRaw(A.origin), o = c.intoRaw(A.dir), s = this.intoRaw(), h =
|
|
3491
|
+
let E = c.intoRaw(I), i = nA.intoRaw(C), D = c.intoRaw(A.origin), o = c.intoRaw(A.dir), s = this.intoRaw(), h = mI.fromRaw(s.castRayAndGetNormal(E, i, D, o, g, Q));
|
|
3492
3492
|
return E.free(), i.free(), D.free(), o.free(), s.free(), h;
|
|
3493
3493
|
}
|
|
3494
3494
|
}
|
|
@@ -3497,7 +3497,7 @@ class mA {
|
|
|
3497
3497
|
})(bA || (bA = {})), function(B) {
|
|
3498
3498
|
B[B.DELETE_BAD_TOPOLOGY_TRIANGLES = 4] = "DELETE_BAD_TOPOLOGY_TRIANGLES", B[B.ORIENTED = 8] = "ORIENTED", B[B.MERGE_DUPLICATE_VERTICES = 16] = "MERGE_DUPLICATE_VERTICES", B[B.DELETE_DEGENERATE_TRIANGLES = 32] = "DELETE_DEGENERATE_TRIANGLES", B[B.DELETE_DUPLICATE_TRIANGLES = 64] = "DELETE_DUPLICATE_TRIANGLES", B[B.FIX_INTERNAL_EDGES = 144] = "FIX_INTERNAL_EDGES";
|
|
3499
3499
|
}(fg || (fg = {}));
|
|
3500
|
-
class AC extends
|
|
3500
|
+
class AC extends uA {
|
|
3501
3501
|
constructor(A) {
|
|
3502
3502
|
super(), this.type = bA.Ball, this.radius = A;
|
|
3503
3503
|
}
|
|
@@ -3505,7 +3505,7 @@ class AC extends mA {
|
|
|
3505
3505
|
return yA.ball(this.radius);
|
|
3506
3506
|
}
|
|
3507
3507
|
}
|
|
3508
|
-
class IC extends
|
|
3508
|
+
class IC extends uA {
|
|
3509
3509
|
constructor(A) {
|
|
3510
3510
|
super(), this.type = bA.HalfSpace, this.normal = A;
|
|
3511
3511
|
}
|
|
@@ -3514,7 +3514,7 @@ class IC extends mA {
|
|
|
3514
3514
|
return A.free(), I;
|
|
3515
3515
|
}
|
|
3516
3516
|
}
|
|
3517
|
-
class gC extends
|
|
3517
|
+
class gC extends uA {
|
|
3518
3518
|
constructor(A, I) {
|
|
3519
3519
|
super(), this.type = bA.Cuboid, this.halfExtents = c.new(A, I);
|
|
3520
3520
|
}
|
|
@@ -3522,7 +3522,7 @@ class gC extends mA {
|
|
|
3522
3522
|
return yA.cuboid(this.halfExtents.x, this.halfExtents.y);
|
|
3523
3523
|
}
|
|
3524
3524
|
}
|
|
3525
|
-
class CC extends
|
|
3525
|
+
class CC extends uA {
|
|
3526
3526
|
constructor(A, I, C) {
|
|
3527
3527
|
super(), this.type = bA.RoundCuboid, this.halfExtents = c.new(A, I), this.borderRadius = C;
|
|
3528
3528
|
}
|
|
@@ -3530,7 +3530,7 @@ class CC extends mA {
|
|
|
3530
3530
|
return yA.roundCuboid(this.halfExtents.x, this.halfExtents.y, this.borderRadius);
|
|
3531
3531
|
}
|
|
3532
3532
|
}
|
|
3533
|
-
class QC extends
|
|
3533
|
+
class QC extends uA {
|
|
3534
3534
|
constructor(A, I) {
|
|
3535
3535
|
super(), this.type = bA.Capsule, this.halfHeight = A, this.radius = I;
|
|
3536
3536
|
}
|
|
@@ -3538,7 +3538,7 @@ class QC extends mA {
|
|
|
3538
3538
|
return yA.capsule(this.halfHeight, this.radius);
|
|
3539
3539
|
}
|
|
3540
3540
|
}
|
|
3541
|
-
class BC extends
|
|
3541
|
+
class BC extends uA {
|
|
3542
3542
|
constructor(A, I) {
|
|
3543
3543
|
super(), this.type = bA.Segment, this.a = A, this.b = I;
|
|
3544
3544
|
}
|
|
@@ -3547,7 +3547,7 @@ class BC extends mA {
|
|
|
3547
3547
|
return A.free(), I.free(), C;
|
|
3548
3548
|
}
|
|
3549
3549
|
}
|
|
3550
|
-
class EC extends
|
|
3550
|
+
class EC extends uA {
|
|
3551
3551
|
constructor(A, I, C) {
|
|
3552
3552
|
super(), this.type = bA.Triangle, this.a = A, this.b = I, this.c = C;
|
|
3553
3553
|
}
|
|
@@ -3556,7 +3556,7 @@ class EC extends mA {
|
|
|
3556
3556
|
return A.free(), I.free(), C.free(), g;
|
|
3557
3557
|
}
|
|
3558
3558
|
}
|
|
3559
|
-
class iC extends
|
|
3559
|
+
class iC extends uA {
|
|
3560
3560
|
constructor(A, I, C, g) {
|
|
3561
3561
|
super(), this.type = bA.RoundTriangle, this.a = A, this.b = I, this.c = C, this.borderRadius = g;
|
|
3562
3562
|
}
|
|
@@ -3565,7 +3565,7 @@ class iC extends mA {
|
|
|
3565
3565
|
return A.free(), I.free(), C.free(), g;
|
|
3566
3566
|
}
|
|
3567
3567
|
}
|
|
3568
|
-
class oC extends
|
|
3568
|
+
class oC extends uA {
|
|
3569
3569
|
constructor(A, I) {
|
|
3570
3570
|
super(), this.type = bA.Polyline, this.vertices = A, this.indices = I ?? new Uint32Array(0);
|
|
3571
3571
|
}
|
|
@@ -3573,7 +3573,7 @@ class oC extends mA {
|
|
|
3573
3573
|
return yA.polyline(this.vertices, this.indices);
|
|
3574
3574
|
}
|
|
3575
3575
|
}
|
|
3576
|
-
class DC extends
|
|
3576
|
+
class DC extends uA {
|
|
3577
3577
|
constructor(A, I) {
|
|
3578
3578
|
super(), this.type = bA.Voxels, this.data = A, this.voxelSize = I;
|
|
3579
3579
|
}
|
|
@@ -3582,7 +3582,7 @@ class DC extends mA {
|
|
|
3582
3582
|
return A = this.data instanceof Int32Array ? yA.voxels(I, this.data) : yA.voxelsFromPoints(I, this.data), I.free(), A;
|
|
3583
3583
|
}
|
|
3584
3584
|
}
|
|
3585
|
-
class wC extends
|
|
3585
|
+
class wC extends uA {
|
|
3586
3586
|
constructor(A, I, C) {
|
|
3587
3587
|
super(), this.type = bA.TriMesh, this.vertices = A, this.indices = I, this.flags = C;
|
|
3588
3588
|
}
|
|
@@ -3590,7 +3590,7 @@ class wC extends mA {
|
|
|
3590
3590
|
return yA.trimesh(this.vertices, this.indices, this.flags);
|
|
3591
3591
|
}
|
|
3592
3592
|
}
|
|
3593
|
-
class Ig extends
|
|
3593
|
+
class Ig extends uA {
|
|
3594
3594
|
constructor(A, I) {
|
|
3595
3595
|
super(), this.type = bA.ConvexPolygon, this.vertices = A, this.skipConvexHullComputation = !!I;
|
|
3596
3596
|
}
|
|
@@ -3598,7 +3598,7 @@ class Ig extends mA {
|
|
|
3598
3598
|
return this.skipConvexHullComputation ? yA.convexPolyline(this.vertices) : yA.convexHull(this.vertices);
|
|
3599
3599
|
}
|
|
3600
3600
|
}
|
|
3601
|
-
class gg extends
|
|
3601
|
+
class gg extends uA {
|
|
3602
3602
|
constructor(A, I, C) {
|
|
3603
3603
|
super(), this.type = bA.RoundConvexPolygon, this.vertices = A, this.borderRadius = I, this.skipConvexHullComputation = !!C;
|
|
3604
3604
|
}
|
|
@@ -3606,7 +3606,7 @@ class gg extends mA {
|
|
|
3606
3606
|
return this.skipConvexHullComputation ? yA.roundConvexPolyline(this.vertices, this.borderRadius) : yA.roundConvexHull(this.vertices, this.borderRadius);
|
|
3607
3607
|
}
|
|
3608
3608
|
}
|
|
3609
|
-
class sC extends
|
|
3609
|
+
class sC extends uA {
|
|
3610
3610
|
constructor(A, I) {
|
|
3611
3611
|
super(), this.type = bA.HeightField, this.heights = A, this.scale = I;
|
|
3612
3612
|
}
|
|
@@ -4073,7 +4073,7 @@ class iB {
|
|
|
4073
4073
|
B[B.EMPTY = 0] = "EMPTY", B[B.COMPUTE_IMPULSE = 1] = "COMPUTE_IMPULSE";
|
|
4074
4074
|
}(Tg || (Tg = {})), function(B) {
|
|
4075
4075
|
B[B.EXCLUDE_FIXED = 1] = "EXCLUDE_FIXED", B[B.EXCLUDE_KINEMATIC = 2] = "EXCLUDE_KINEMATIC", B[B.EXCLUDE_DYNAMIC = 4] = "EXCLUDE_DYNAMIC", B[B.EXCLUDE_SENSORS = 8] = "EXCLUDE_SENSORS", B[B.EXCLUDE_SOLIDS = 16] = "EXCLUDE_SOLIDS", B[B.ONLY_DYNAMIC = 3] = "ONLY_DYNAMIC", B[B.ONLY_KINEMATIC = 5] = "ONLY_KINEMATIC", B[B.ONLY_FIXED = 6] = "ONLY_FIXED";
|
|
4076
|
-
}(
|
|
4076
|
+
}(ug || (ug = {})), function(B) {
|
|
4077
4077
|
B[B.DYNAMIC_DYNAMIC = 1] = "DYNAMIC_DYNAMIC", B[B.DYNAMIC_KINEMATIC = 12] = "DYNAMIC_KINEMATIC", B[B.DYNAMIC_FIXED = 2] = "DYNAMIC_FIXED", B[B.KINEMATIC_KINEMATIC = 52224] = "KINEMATIC_KINEMATIC", B[B.KINEMATIC_FIXED = 8704] = "KINEMATIC_FIXED", B[B.FIXED_FIXED = 32] = "FIXED_FIXED", B[B.DEFAULT = 15] = "DEFAULT", B[B.ALL = 60943] = "ALL";
|
|
4078
4078
|
}(Ag || (Ag = {}));
|
|
4079
4079
|
class Og {
|
|
@@ -4084,7 +4084,7 @@ class Og {
|
|
|
4084
4084
|
this.handle != null && (this._parent = A.get(this.colliderSet.raw.coParent(this.handle)));
|
|
4085
4085
|
}
|
|
4086
4086
|
ensureShapeIsCached() {
|
|
4087
|
-
this._shape || (this._shape =
|
|
4087
|
+
this._shape || (this._shape = uA.fromRaw(this.colliderSet.raw, this.handle));
|
|
4088
4088
|
}
|
|
4089
4089
|
get shape() {
|
|
4090
4090
|
return this.ensureShapeIsCached(), this._shape;
|
|
@@ -4309,7 +4309,7 @@ class Og {
|
|
|
4309
4309
|
return g.free(), Q.free(), E;
|
|
4310
4310
|
}
|
|
4311
4311
|
castRayAndGetNormal(A, I, C) {
|
|
4312
|
-
let g = c.intoRaw(A.origin), Q = c.intoRaw(A.dir), E =
|
|
4312
|
+
let g = c.intoRaw(A.origin), Q = c.intoRaw(A.dir), E = mI.fromRaw(this.colliderSet.raw.coCastRayAndGetNormal(this.handle, g, Q, I, C));
|
|
4313
4313
|
return g.free(), Q.free(), E;
|
|
4314
4314
|
}
|
|
4315
4315
|
}
|
|
@@ -4558,7 +4558,7 @@ function tB(B) {
|
|
|
4558
4558
|
jA[45] = 62, jA[95] = 63;
|
|
4559
4559
|
var OA = Object.freeze({ __proto__: null, version: GB, reserveMemory: tB, Vector2: wQ, VectorOps: c, RotationOps: nA, get RigidBodyType() {
|
|
4560
4560
|
return vA;
|
|
4561
|
-
}, RigidBody:
|
|
4561
|
+
}, RigidBody: mg, RigidBodyDesc: VA, RigidBodySet: sQ, IntegrationParameters: hQ, get JointType() {
|
|
4562
4562
|
return ZA;
|
|
4563
4563
|
}, get MotorModel() {
|
|
4564
4564
|
return Hg;
|
|
@@ -4566,7 +4566,7 @@ var OA = Object.freeze({ __proto__: null, version: GB, reserveMemory: tB, Vector
|
|
|
4566
4566
|
return dg;
|
|
4567
4567
|
}, ImpulseJoint: CI, UnitImpulseJoint: _g, FixedImpulseJoint: aQ, RopeImpulseJoint: GQ, SpringImpulseJoint: tQ, PrismaticImpulseJoint: KQ, RevoluteImpulseJoint: SQ, JointData: aI, ImpulseJointSet: yQ, MultibodyJoint: kI, UnitMultibodyJoint: $g, FixedMultibodyJoint: kQ, PrismaticMultibodyJoint: NQ, RevoluteMultibodyJoint: FQ, MultibodyJointSet: MQ, get CoefficientCombineRule() {
|
|
4568
4568
|
return bI;
|
|
4569
|
-
}, CCDSolver: eQ, IslandManager: cQ, BroadPhase: JQ, NarrowPhase: RQ, TempContactManifold: UQ, Shape:
|
|
4569
|
+
}, CCDSolver: eQ, IslandManager: cQ, BroadPhase: JQ, NarrowPhase: RQ, TempContactManifold: UQ, Shape: uA, get ShapeType() {
|
|
4570
4570
|
return bA;
|
|
4571
4571
|
}, get TriMeshFlags() {
|
|
4572
4572
|
return fg;
|
|
@@ -4576,14 +4576,14 @@ var OA = Object.freeze({ __proto__: null, version: GB, reserveMemory: tB, Vector
|
|
|
4576
4576
|
return KI;
|
|
4577
4577
|
}, ColliderDesc: dA, ColliderSet: HQ, get FeatureType() {
|
|
4578
4578
|
return cI;
|
|
4579
|
-
}, Ray: EB, RayIntersection:
|
|
4579
|
+
}, Ray: EB, RayIntersection: mI, RayColliderIntersection: TI, RayColliderHit: hg, PointProjection: xI, PointColliderProjection: uI, ShapeCastHit: RI, ColliderShapeCastHit: OI, ShapeContact: JI, World: ag, PhysicsPipeline: rQ, SerializationPipeline: xg, get ActiveEvents() {
|
|
4580
4580
|
return _I;
|
|
4581
4581
|
}, TempContactForceEvent: pQ, EventQueue: iB, get ActiveHooks() {
|
|
4582
4582
|
return $I;
|
|
4583
4583
|
}, get SolverFlags() {
|
|
4584
4584
|
return Tg;
|
|
4585
4585
|
}, DebugRenderBuffers: nQ, DebugRenderPipeline: YQ, get QueryFilterFlags() {
|
|
4586
|
-
return
|
|
4586
|
+
return ug;
|
|
4587
4587
|
}, init: aB, CharacterCollision: lQ, KinematicCharacterController: LQ, get PidAxesMask() {
|
|
4588
4588
|
return bg;
|
|
4589
4589
|
}, PidController: qQ });
|
|
@@ -5486,7 +5486,7 @@ function bB(B) {
|
|
|
5486
5486
|
function TB(B) {
|
|
5487
5487
|
return B.length === 0 ? !1 : lB.has(B[B.length - 1]);
|
|
5488
5488
|
}
|
|
5489
|
-
function
|
|
5489
|
+
function uB(B) {
|
|
5490
5490
|
if (B.length < 2 || B[0] !== " ")
|
|
5491
5491
|
return null;
|
|
5492
5492
|
const A = B.slice(1);
|
|
@@ -5502,7 +5502,7 @@ function bQ(B) {
|
|
|
5502
5502
|
}
|
|
5503
5503
|
return !1;
|
|
5504
5504
|
}
|
|
5505
|
-
function
|
|
5505
|
+
function mB(B, A) {
|
|
5506
5506
|
if (A.preserveOrdinarySpaces || A.preserveHardBreaks) {
|
|
5507
5507
|
if (B === " ")
|
|
5508
5508
|
return "preserved-space";
|
|
@@ -5518,7 +5518,7 @@ function xB(B, A, I, C) {
|
|
|
5518
5518
|
const g = [];
|
|
5519
5519
|
let Q = null, E = "", i = I, D = !1, o = 0;
|
|
5520
5520
|
for (const s of B) {
|
|
5521
|
-
const h =
|
|
5521
|
+
const h = mB(s, C), a = h === "text" && A;
|
|
5522
5522
|
if (Q !== null && h === Q && a === D) {
|
|
5523
5523
|
E += s, o += s.length;
|
|
5524
5524
|
continue;
|
|
@@ -5784,7 +5784,7 @@ function IE(B, A, I) {
|
|
|
5784
5784
|
starts: D
|
|
5785
5785
|
}), h = AE(zB(_B(VB(XB(jB(s))))));
|
|
5786
5786
|
for (let a = 0; a < h.len - 1; a++) {
|
|
5787
|
-
const G =
|
|
5787
|
+
const G = uB(h.texts[a]);
|
|
5788
5788
|
G !== null && (h.kinds[a] !== "space" && h.kinds[a] !== "preserved-space" || h.kinds[a + 1] !== "text" || !Wg(h.texts[a + 1]) || (h.texts[a] = G.space, h.isWordLike[a] = !1, h.kinds[a] = h.kinds[a] === "preserved-space" ? "preserved-space" : "space", h.texts[a + 1] = G.marks + h.texts[a + 1], h.starts[a + 1] = h.starts[a] + G.space.length));
|
|
5789
5789
|
}
|
|
5790
5790
|
return h;
|
|
@@ -5953,7 +5953,7 @@ function KE(B, A) {
|
|
|
5953
5953
|
const I = B % A;
|
|
5954
5954
|
return Math.abs(I) <= 1e-6 ? A : A - I;
|
|
5955
5955
|
}
|
|
5956
|
-
function
|
|
5956
|
+
function uQ(B, A, I, C) {
|
|
5957
5957
|
return !C || A === null ? B[I] : A[I] - (I > 0 ? A[I - 1] : 0);
|
|
5958
5958
|
}
|
|
5959
5959
|
function SE(B, A, I, C, g, Q) {
|
|
@@ -6006,7 +6006,7 @@ function yE(B, A, I) {
|
|
|
6006
6006
|
function QA(U, T) {
|
|
6007
6007
|
const AA = Q[U], IA = E[U] ?? null;
|
|
6008
6008
|
for (let b = T; b < AA.length; b++) {
|
|
6009
|
-
const P =
|
|
6009
|
+
const P = uQ(AA, IA, b, i.preferPrefixWidthsForBreakableRuns);
|
|
6010
6010
|
if (!h) {
|
|
6011
6011
|
n(U, b, P);
|
|
6012
6012
|
continue;
|
|
@@ -6087,7 +6087,7 @@ function kE(B, A, I) {
|
|
|
6087
6087
|
function P(q, l) {
|
|
6088
6088
|
const r = i[q], z = D[q] ?? null;
|
|
6089
6089
|
for (let d = l; d < r.length; d++) {
|
|
6090
|
-
const _ =
|
|
6090
|
+
const _ = uQ(r, z, d, a.preferPrefixWidthsForBreakableRuns);
|
|
6091
6091
|
if (!S) {
|
|
6092
6092
|
T(q, d, _);
|
|
6093
6093
|
continue;
|
|
@@ -6105,7 +6105,7 @@ function kE(B, A, I) {
|
|
|
6105
6105
|
const r = a.preferPrefixWidthsForBreakableRuns ? D[q] ?? l : l, z = r !== l, { fitCount: d, fittedWidth: _ } = SE(r, K, A, G, o, z);
|
|
6106
6106
|
return d === 0 ? !1 : (K = _, e = q, M = d, QA(), d === l.length ? (e = q + 1, M = 0, !0) : (L(q, d, _ + o), P(q, d), !0));
|
|
6107
6107
|
}
|
|
6108
|
-
function
|
|
6108
|
+
function u(q) {
|
|
6109
6109
|
t++, I == null || I({
|
|
6110
6110
|
startSegmentIndex: q.startSegmentIndex,
|
|
6111
6111
|
startGraphemeIndex: 0,
|
|
@@ -6117,7 +6117,7 @@ function kE(B, A, I) {
|
|
|
6117
6117
|
for (let q = 0; q < h.length; q++) {
|
|
6118
6118
|
const l = h[q];
|
|
6119
6119
|
if (l.startSegmentIndex === l.endSegmentIndex) {
|
|
6120
|
-
|
|
6120
|
+
u(l);
|
|
6121
6121
|
continue;
|
|
6122
6122
|
}
|
|
6123
6123
|
S = !1, K = 0, y = l.startSegmentIndex, F = 0, e = l.startSegmentIndex, M = 0, QA();
|
|
@@ -6167,7 +6167,7 @@ function kE(B, A, I) {
|
|
|
6167
6167
|
return t;
|
|
6168
6168
|
}
|
|
6169
6169
|
let lg = null, XC = /* @__PURE__ */ new WeakMap();
|
|
6170
|
-
function
|
|
6170
|
+
function mQ() {
|
|
6171
6171
|
return lg === null && (lg = new Intl.Segmenter(void 0, { granularity: "grapheme" })), lg;
|
|
6172
6172
|
}
|
|
6173
6173
|
function NE(B) {
|
|
@@ -6187,7 +6187,7 @@ function NE(B) {
|
|
|
6187
6187
|
};
|
|
6188
6188
|
}
|
|
6189
6189
|
function FE(B, A, I) {
|
|
6190
|
-
const C =
|
|
6190
|
+
const C = mQ(), g = Kg(), { cache: Q, emojiCorrection: E } = tE(A, DE(B.normalized)), i = tI("-", GI("-", Q), E), o = tI(" ", GI(" ", Q), E) * 8;
|
|
6191
6191
|
if (B.len === 0)
|
|
6192
6192
|
return NE();
|
|
6193
6193
|
const s = [], h = [], a = [], G = [];
|
|
@@ -6213,11 +6213,11 @@ function FE(B, A, I) {
|
|
|
6213
6213
|
}
|
|
6214
6214
|
const AA = GI(QA, Q);
|
|
6215
6215
|
if (U === "text" && AA.containsCJK) {
|
|
6216
|
-
let gA = "",
|
|
6216
|
+
let gA = "", u = 0;
|
|
6217
6217
|
for (const q of C.segment(QA)) {
|
|
6218
6218
|
const l = q.segment;
|
|
6219
6219
|
if (gA.length === 0) {
|
|
6220
|
-
gA = l,
|
|
6220
|
+
gA = l, u = q.index;
|
|
6221
6221
|
continue;
|
|
6222
6222
|
}
|
|
6223
6223
|
if (tg.has(gA) || fQ.has(l) || WI.has(l) || g.carryCJKAfterClosingQuote && SI(l) && bQ(gA)) {
|
|
@@ -6225,19 +6225,19 @@ function FE(B, A, I) {
|
|
|
6225
6225
|
continue;
|
|
6226
6226
|
}
|
|
6227
6227
|
const r = GI(gA, Q), z = tI(gA, r, E);
|
|
6228
|
-
n(gA, z, z, z, "text", T +
|
|
6228
|
+
n(gA, z, z, z, "text", T + u, null, null), gA = l, u = q.index;
|
|
6229
6229
|
}
|
|
6230
6230
|
if (gA.length > 0) {
|
|
6231
6231
|
const q = GI(gA, Q), l = tI(gA, q, E);
|
|
6232
|
-
n(gA, l, l, l, "text", T +
|
|
6232
|
+
n(gA, l, l, l, "text", T + u, null, null);
|
|
6233
6233
|
}
|
|
6234
6234
|
M[H] = s.length;
|
|
6235
6235
|
continue;
|
|
6236
6236
|
}
|
|
6237
6237
|
const IA = tI(QA, AA, E), b = U === "space" || U === "preserved-space" || U === "zero-width-break" ? 0 : IA, P = U === "space" || U === "zero-width-break" ? 0 : IA;
|
|
6238
6238
|
if (L && QA.length > 1) {
|
|
6239
|
-
const gA = aE(QA, AA, Q, E),
|
|
6240
|
-
n(QA, IA, b, P, U, T, gA,
|
|
6239
|
+
const gA = aE(QA, AA, Q, E), u = g.preferPrefixWidthsForBreakableRuns ? GE(QA, AA, Q, E) : null;
|
|
6240
|
+
n(QA, IA, b, P, U, T, gA, u);
|
|
6241
6241
|
} else
|
|
6242
6242
|
n(QA, IA, b, P, U, T, null, null);
|
|
6243
6243
|
M[H] = s.length;
|
|
@@ -6294,7 +6294,7 @@ function vC(B, A, I) {
|
|
|
6294
6294
|
if (C !== void 0)
|
|
6295
6295
|
return C;
|
|
6296
6296
|
C = [];
|
|
6297
|
-
const g =
|
|
6297
|
+
const g = mQ();
|
|
6298
6298
|
for (const Q of g.segment(A[B]))
|
|
6299
6299
|
C.push(Q.segment);
|
|
6300
6300
|
return I.set(B, C), C;
|
|
@@ -6339,7 +6339,7 @@ function YE(B, A, I) {
|
|
|
6339
6339
|
});
|
|
6340
6340
|
return { lineCount: Q, height: Q * I, lines: C };
|
|
6341
6341
|
}
|
|
6342
|
-
const xQ = (B) => B, lE = (B) => B > 0 ? 1 : 0, LE = (B) => B < 1 ? 0 : 1, PC = (B) => B * B, VC = (B) => B * (2 - B), zC = (B) => B < 0.5 ? 2 * B * B : -1 + (4 - 2 * B) * B, qE = (B) => B * B * B, pE = (B) => --B * B * B + 1, HE = (B) => B < 0.5 ? 4 * B * B * B : (B - 1) * (2 * B - 2) * (2 * B - 2) + 1, dE = (B) => B * B * B * B, fE = (B) => 1 - --B * B * B * B, bE = (B) => B < 0.5 ? 8 * B * B * B * B : 1 - 8 * --B * B * B * B, TE = (B) => B * B * B * B * B,
|
|
6342
|
+
const xQ = (B) => B, lE = (B) => B > 0 ? 1 : 0, LE = (B) => B < 1 ? 0 : 1, PC = (B) => B * B, VC = (B) => B * (2 - B), zC = (B) => B < 0.5 ? 2 * B * B : -1 + (4 - 2 * B) * B, qE = (B) => B * B * B, pE = (B) => --B * B * B + 1, HE = (B) => B < 0.5 ? 4 * B * B * B : (B - 1) * (2 * B - 2) * (2 * B - 2) + 1, dE = (B) => B * B * B * B, fE = (B) => 1 - --B * B * B * B, bE = (B) => B < 0.5 ? 8 * B * B * B * B : 1 - 8 * --B * B * B * B, TE = (B) => B * B * B * B * B, uE = (B) => 1 + --B * B * B * B * B, mE = (B) => B < 0.5 ? 16 * B * B * B * B * B : 1 + 16 * --B * B * B * B * B, xE = (B) => 1 - Math.cos(B * Math.PI / 2), OE = (B) => Math.sin(B * Math.PI / 2), WE = (B) => -(Math.cos(Math.PI * B) - 1) / 2, ZE = (B) => B === 0 ? 0 : Math.pow(2, 10 * (B - 1)), jE = (B) => B === 1 ? 1 : 1 - Math.pow(2, -10 * B), XE = (B) => B === 0 ? 0 : B === 1 ? 1 : B < 0.5 ? Math.pow(2, 20 * B - 10) / 2 : (2 - Math.pow(2, -20 * B + 10)) / 2, vE = (B) => 1 - Math.sqrt(1 - B * B), PE = (B) => Math.sqrt(1 - --B * B), VE = (B) => B < 0.5 ? (1 - Math.sqrt(1 - 4 * B * B)) / 2 : (Math.sqrt(1 - (-2 * B + 2) * (-2 * B + 2)) + 1) / 2, Sg = 1.70158, vI = Sg * 1.525, OQ = Sg + 1, zE = (B) => OQ * B * B * B - Sg * B * B, _E = (B) => 1 + OQ * Math.pow(B - 1, 3) + Sg * Math.pow(B - 1, 2), $E = (B) => B < 0.5 ? Math.pow(2 * B, 2) * ((vI + 1) * 2 * B - vI) / 2 : (Math.pow(2 * B - 2, 2) * ((vI + 1) * (B * 2 - 2) + vI) + 2) / 2, WQ = 2 * Math.PI / 3, _C = 2 * Math.PI / 4.5, Ai = (B) => B === 0 ? 0 : B === 1 ? 1 : -Math.pow(2, 10 * B - 10) * Math.sin((B * 10 - 10.75) * WQ), Ii = (B) => B === 0 ? 0 : B === 1 ? 1 : Math.pow(2, -10 * B) * Math.sin((B * 10 - 0.75) * WQ) + 1, gi = (B) => B === 0 ? 0 : B === 1 ? 1 : B < 0.5 ? -(Math.pow(2, 20 * B - 10) * Math.sin((20 * B - 11.125) * _C)) / 2 : Math.pow(2, -20 * B + 10) * Math.sin((20 * B - 11.125) * _C) / 2 + 1, Qg = (B) => B < 1 / 2.75 ? 7.5625 * B * B : B < 2 / 2.75 ? 7.5625 * (B -= 1.5 / 2.75) * B + 0.75 : B < 2.5 / 2.75 ? 7.5625 * (B -= 2.25 / 2.75) * B + 0.9375 : 7.5625 * (B -= 2.625 / 2.75) * B + 0.984375, Ci = (B) => 1 - Qg(1 - B), Qi = Qg, Bi = (B) => B < 0.5 ? (1 - Qg(1 - 2 * B)) / 2 : (1 + Qg(2 * B - 1)) / 2, Lg = /* @__PURE__ */ new Map(), HI = (B, A, I, C) => {
|
|
6343
6343
|
const g = `${B},${A},${I},${C}`;
|
|
6344
6344
|
if (Lg.has(g)) return Lg.get(g);
|
|
6345
6345
|
const Q = (s) => (1 - 3 * I + 3 * B) * s * s * s + (3 * I - 6 * B) * s * s + 3 * B * s, E = (s) => (1 - 3 * C + 3 * A) * s * s * s + (3 * C - 6 * A) * s * s + 3 * A * s, i = (s) => 3 * (1 - 3 * I + 3 * B) * s * s + 2 * (3 * I - 6 * B) * s + 3 * B, D = (s) => {
|
|
@@ -6381,8 +6381,8 @@ const xQ = (B) => B, lE = (B) => B > 0 ? 1 : 0, LE = (B) => B < 1 ? 0 : 1, PC =
|
|
|
6381
6381
|
EaseInOutQuart: bE,
|
|
6382
6382
|
// Quintic
|
|
6383
6383
|
EaseInQuint: TE,
|
|
6384
|
-
EaseOutQuint:
|
|
6385
|
-
EaseInOutQuint:
|
|
6384
|
+
EaseOutQuint: uE,
|
|
6385
|
+
EaseInOutQuint: mE,
|
|
6386
6386
|
// Sinusoidal
|
|
6387
6387
|
EaseInSine: xE,
|
|
6388
6388
|
EaseOutSine: OE,
|
|
@@ -7612,24 +7612,24 @@ class ii {
|
|
|
7612
7612
|
return 0.5;
|
|
7613
7613
|
}
|
|
7614
7614
|
renderObject(A, I, C) {
|
|
7615
|
-
var
|
|
7615
|
+
var u, q, l, r, z, d, _, hA, KA, FA, NA;
|
|
7616
7616
|
const g = this.objectStates.get(I.id);
|
|
7617
7617
|
if (!g) {
|
|
7618
7618
|
console.warn("No state for object:", I.id);
|
|
7619
7619
|
return;
|
|
7620
7620
|
}
|
|
7621
|
-
A.roundRect || (A.roundRect = (
|
|
7621
|
+
A.roundRect || (A.roundRect = (m, O, Y, R, x) => (this.drawRoundRect(A, m, O, Y, R, x), A));
|
|
7622
7622
|
const Q = g.geometry ? this.deepMerge(I.geometry, g.geometry) : I.geometry, E = g.style ? this.deepMerge(I.style, g.style) : I.style;
|
|
7623
|
-
let i = (Q == null ? void 0 : Q.width) || ((
|
|
7623
|
+
let i = (Q == null ? void 0 : Q.width) || ((u = I.geometry) == null ? void 0 : u.width) || I.width || 0, D = (Q == null ? void 0 : Q.height) || ((q = I.geometry) == null ? void 0 : q.height) || I.height || 0;
|
|
7624
7624
|
if ((i === 0 || D === 0) && (Q != null && Q.points) && Array.isArray(Q.points) && Q.points.length > 0) {
|
|
7625
|
-
let
|
|
7625
|
+
let m = 1 / 0, O = -1 / 0, Y = 1 / 0, R = -1 / 0;
|
|
7626
7626
|
Q.points.forEach((x) => {
|
|
7627
|
-
|
|
7628
|
-
}), i === 0 && (i = O -
|
|
7627
|
+
m = Math.min(m, x.x), O = Math.max(O, x.x), Y = Math.min(Y, x.y), R = Math.max(R, x.y);
|
|
7628
|
+
}), i === 0 && (i = O - m), D === 0 && (D = R - Y);
|
|
7629
7629
|
}
|
|
7630
|
-
const o = (
|
|
7631
|
-
if (
|
|
7632
|
-
return
|
|
7630
|
+
const o = (m) => {
|
|
7631
|
+
if (m)
|
|
7632
|
+
return m.corner_radius ?? m.cornerRadius;
|
|
7633
7633
|
}, s = o(g) ?? o(E) ?? o(Q) ?? o(I.style) ?? o(I.geometry) ?? 0, h = { ...Q, width: i, height: D };
|
|
7634
7634
|
if (delete h.cornerRadius, h.corner_radius = s, g.visible === !1)
|
|
7635
7635
|
return;
|
|
@@ -7650,13 +7650,13 @@ class ii {
|
|
|
7650
7650
|
hue: 0
|
|
7651
7651
|
} : e;
|
|
7652
7652
|
if (g && M && (g.geometry = g.geometry || {}, g.geometry.adjustments = { ...M }), M) {
|
|
7653
|
-
const
|
|
7653
|
+
const m = (M.exposure || 0) / 100, O = M.contrast || 0, Y = 1 + (M.saturation || 0) / 100, R = (M.temperature || 0) / 200, x = (M.tint || 0) / 200, Z = (M.highlights || 0) / 500, GA = (M.shadows || 0) / 500;
|
|
7654
7654
|
let CA = "", wA = "SourceGraphic";
|
|
7655
|
-
if (
|
|
7655
|
+
if (m !== 0 && (CA += `
|
|
7656
7656
|
<feComponentTransfer in="${wA}" result="exposure">
|
|
7657
|
-
<feFuncR type="linear" slope="1" intercept="${
|
|
7658
|
-
<feFuncG type="linear" slope="1" intercept="${
|
|
7659
|
-
<feFuncB type="linear" slope="1" intercept="${
|
|
7657
|
+
<feFuncR type="linear" slope="1" intercept="${m}"/>
|
|
7658
|
+
<feFuncG type="linear" slope="1" intercept="${m}"/>
|
|
7659
|
+
<feFuncB type="linear" slope="1" intercept="${m}"/>
|
|
7660
7660
|
</feComponentTransfer>`, wA = "exposure"), O !== 0) {
|
|
7661
7661
|
const BA = (O + 100) / 100, N = 0.5 * (1 - BA);
|
|
7662
7662
|
CA += `
|
|
@@ -7710,7 +7710,7 @@ class ii {
|
|
|
7710
7710
|
A.globalAlpha = n * X;
|
|
7711
7711
|
const W = g.compositeOperation || g.blendMode;
|
|
7712
7712
|
if (W && W !== "Normal") {
|
|
7713
|
-
const
|
|
7713
|
+
const m = W.toLowerCase();
|
|
7714
7714
|
[
|
|
7715
7715
|
"multiply",
|
|
7716
7716
|
"screen",
|
|
@@ -7740,7 +7740,7 @@ class ii {
|
|
|
7740
7740
|
"xor",
|
|
7741
7741
|
"multiply",
|
|
7742
7742
|
"screen"
|
|
7743
|
-
].includes(
|
|
7743
|
+
].includes(m) && (A.globalCompositeOperation = m);
|
|
7744
7744
|
}
|
|
7745
7745
|
const H = A, QA = g.masks || (I.maskedBy ? [{
|
|
7746
7746
|
maskId: I.maskedBy,
|
|
@@ -7751,9 +7751,9 @@ class ii {
|
|
|
7751
7751
|
isVisible: !0
|
|
7752
7752
|
}] : []);
|
|
7753
7753
|
let L = !1;
|
|
7754
|
-
const U = QA.filter((
|
|
7754
|
+
const U = QA.filter((m) => m.isVisible !== !1 && C.has(m.maskId));
|
|
7755
7755
|
if (U.length > 0) {
|
|
7756
|
-
const
|
|
7756
|
+
const m = U[0], O = C.get(m.maskId), Y = this.objectStates.get(O.id);
|
|
7757
7757
|
Y && Y.visible !== !1 && (L = !0, (!this.maskBuffer || this.maskBuffer.width !== this.canvasWidth || this.maskBuffer.height !== this.canvasHeight) && (this.maskBuffer = document.createElement("canvas"), this.maskBuffer.width = this.canvasWidth, this.maskBuffer.height = this.canvasHeight, this.maskCtx = this.maskBuffer.getContext("2d", { willReadFrequently: !0 }), this.maskCtx && (this.maskCtx.imageSmoothingEnabled = !0, this.maskCtx.imageSmoothingQuality = "high")), this.maskCtx.setTransform(1, 0, 0, 1, 0, 0), this.maskCtx.globalCompositeOperation = "source-over", this.maskCtx.globalAlpha = 1, this.maskCtx.filter = "none", this.maskCtx.clearRect(0, 0, this.maskBuffer.width, this.maskBuffer.height), this.rootTransform && this.maskCtx.setTransform(this.rootTransform), I.parentId && this.applyAbsoluteTransform(this.maskCtx, I.parentId, C), this.maskCtx.save(), this.maskCtx.globalAlpha = 1, A = this.maskCtx, A.filter = H.filter);
|
|
7758
7758
|
}
|
|
7759
7759
|
A.translate(Math.round(a), Math.round(G)), A.rotate(g.rotation * Math.PI / 180);
|
|
@@ -7764,15 +7764,15 @@ class ii {
|
|
|
7764
7764
|
);
|
|
7765
7765
|
const IA = E.shadow;
|
|
7766
7766
|
if (IA && IA.isEnabled !== !1) {
|
|
7767
|
-
let
|
|
7768
|
-
(_ = (d = this.artboard) == null ? void 0 : d.tokens) != null && _.colors && this.artboard.tokens.colors[
|
|
7767
|
+
let m = IA.color || "#000000";
|
|
7768
|
+
(_ = (d = this.artboard) == null ? void 0 : d.tokens) != null && _.colors && this.artboard.tokens.colors[m] && (m = this.artboard.tokens.colors[m]);
|
|
7769
7769
|
const O = this.normalizeOpacity(IA.opacity ?? 100), Y = IA.spread || 0, x = (IA.blur || 0) + Y * 1.5;
|
|
7770
|
-
let Z =
|
|
7771
|
-
if (
|
|
7772
|
-
const wA =
|
|
7770
|
+
let Z = m;
|
|
7771
|
+
if (m.startsWith("#")) {
|
|
7772
|
+
const wA = m.replace("#", ""), kA = parseInt(wA.substring(0, 2), 16), BA = parseInt(wA.substring(2, 4), 16), N = parseInt(wA.substring(4, 6), 16);
|
|
7773
7773
|
Z = `rgba(${kA}, ${BA}, ${N}, ${O})`;
|
|
7774
|
-
} else if (
|
|
7775
|
-
const wA =
|
|
7774
|
+
} else if (m.startsWith("rgba")) {
|
|
7775
|
+
const wA = m.match(/[\d.]+/g);
|
|
7776
7776
|
if (wA && wA.length >= 4) {
|
|
7777
7777
|
const kA = wA[0], BA = wA[1], N = wA[2], f = wA[3];
|
|
7778
7778
|
Z = `rgba(${kA}, ${BA}, ${N}, ${parseFloat(f) * O})`;
|
|
@@ -7784,10 +7784,10 @@ class ii {
|
|
|
7784
7784
|
const b = I.liquidFill || ((hA = I.style) == null ? void 0 : hA.liquidFill), P = I.artEffect || ((KA = I.style) == null ? void 0 : KA.artEffect);
|
|
7785
7785
|
if (b && b.enabled) {
|
|
7786
7786
|
A.save();
|
|
7787
|
-
const
|
|
7787
|
+
const m = b.fillLevel ?? 0.5;
|
|
7788
7788
|
A.beginPath();
|
|
7789
|
-
const O = D / 2 - D *
|
|
7790
|
-
A.rect(-i / 2, O, i, D *
|
|
7789
|
+
const O = D / 2 - D * m;
|
|
7790
|
+
A.rect(-i / 2, O, i, D * m), A.clip(), A.fillStyle = b.color || "#3b82f6", A.globalAlpha = A.globalAlpha * (b.opacity ?? 1);
|
|
7791
7791
|
}
|
|
7792
7792
|
const gA = P && P.enabled && P.type === "glitch";
|
|
7793
7793
|
if (gA) {
|
|
@@ -7798,13 +7798,13 @@ class ii {
|
|
|
7798
7798
|
if (Q.type === "Text")
|
|
7799
7799
|
this._renderText(A, I, h, E, g, i, D);
|
|
7800
7800
|
else if (Q.type === "Image") {
|
|
7801
|
-
const
|
|
7802
|
-
if (
|
|
7803
|
-
let O = this.imageCache.get(
|
|
7801
|
+
const m = Q.src;
|
|
7802
|
+
if (m) {
|
|
7803
|
+
let O = this.imageCache.get(m);
|
|
7804
7804
|
O || (O = new Image(), O.onload = () => {
|
|
7805
7805
|
}, O.onerror = () => {
|
|
7806
|
-
console.error(`[ExodeUI] Image load failed: ${
|
|
7807
|
-
}, O.src =
|
|
7806
|
+
console.error(`[ExodeUI] Image load failed: ${m.substring(0, 100)}${m.length > 100 ? "..." : ""}`);
|
|
7807
|
+
}, O.src = m, this.imageCache.set(m, O));
|
|
7808
7808
|
const Y = E.stroke && E.stroke.width > 0 && E.stroke.isEnabled !== !1, R = (((FA = E.stroke) == null ? void 0 : FA.alignment) || "center").toLowerCase();
|
|
7809
7809
|
if (Y && (R === "outside" || R === "center") && this.applyStrokeAlignment(A, E, h, i, D, s), E.fill && E.fill.type !== "None") {
|
|
7810
7810
|
A.save();
|
|
@@ -7814,8 +7814,8 @@ class ii {
|
|
|
7814
7814
|
O.complete && O.naturalWidth > 0 ? (s !== 0 ? (A.save(), this.drawRoundRect(A, -i / 2, -D / 2, i, D, s), A.clip(), A.drawImage(O, -i / 2, -D / 2, i, D), A.restore()) : A.drawImage(O, -i / 2, -D / 2, i, D), Y && R === "inside" && this.applyStrokeAlignment(A, E, h, i, D, s)) : Y && R === "inside" && this.applyStrokeAlignment(A, E, h, i, D, s);
|
|
7815
7815
|
}
|
|
7816
7816
|
} else if (Q.type === "SVG") {
|
|
7817
|
-
const
|
|
7818
|
-
if (
|
|
7817
|
+
const m = Q.svgContent;
|
|
7818
|
+
if (m) {
|
|
7819
7819
|
const O = E.palette || [], Y = E.fill, R = E.stroke, x = Y ? this.normalizeOpacity(Y.opacity ?? 100) : 1, Z = (Y == null ? void 0 : Y.type) === "Solid" && (!R || R.isEnabled === !1 || R.type === "Solid" && R.color === Y.color), GA = Y && Y.type !== "None" ? Z ? "monochrome" : Y.type === "Solid" ? (Y.color || "") + "|opacity:" + x : JSON.stringify(Y.stops || []) + "|opacity:" + x : "", CA = R && R.isEnabled !== !1 && (R.width || 0) > 0 ? Z ? [
|
|
7820
7820
|
"monochrome",
|
|
7821
7821
|
R.width || 0,
|
|
@@ -7846,7 +7846,7 @@ class ii {
|
|
|
7846
7846
|
let kA = this.imageCache.get(wA);
|
|
7847
7847
|
if (!kA) {
|
|
7848
7848
|
kA = new Image(), kA.crossOrigin = "anonymous";
|
|
7849
|
-
let N =
|
|
7849
|
+
let N = m;
|
|
7850
7850
|
if (Q.colors && Q.colors.length > 0 && O.length > 0 && Q.colors.forEach((iA, V) => {
|
|
7851
7851
|
if (O[V]) {
|
|
7852
7852
|
const $ = iA.replace(/[-\/\\^$*+?.()|[\]{}]/g, "\\$&"), DA = new RegExp($, "gi");
|
|
@@ -7908,7 +7908,7 @@ class ii {
|
|
|
7908
7908
|
const JA = Math.max(0, Math.min(1, v)), PA = Math.max(0, Math.min(1, aA));
|
|
7909
7909
|
this.frameCount % 600 === 0 && this.debugLog(`SVG Trim - Object: ${I.name || I.id}, Start: ${JA}, End: ${PA}`);
|
|
7910
7910
|
let ZI = Q.width || i || 100, jI = Q.height || D || 100;
|
|
7911
|
-
const UI =
|
|
7911
|
+
const UI = m.match(/viewBox=["']\s*0\s+0\s+([\d.]+)\s+([\d.]+)\s*["']/i);
|
|
7912
7912
|
if (UI) {
|
|
7913
7913
|
const sI = parseFloat(UI[1]), NI = parseFloat(UI[2]);
|
|
7914
7914
|
!isNaN(sI) && !isNaN(NI) && (ZI = sI, jI = NI);
|
|
@@ -7926,7 +7926,7 @@ class ii {
|
|
|
7926
7926
|
const JA = R.dashArray.join(" ");
|
|
7927
7927
|
N = N.replace(/\bstroke-dasharray\s*=\s*["'][^"']*["']/gi, `stroke-dasharray="${JA}"`), N = N.replace(/stroke-dasharray\s*:\s*[^;"')]+/gi, `stroke-dasharray:${JA}`), R.dashOffset && (N = N.replace(/\bstroke-dashoffset\s*=\s*["'][^"']*["']/gi, `stroke-dashoffset="${R.dashOffset}"`), N = N.replace(/stroke-dashoffset\s*:\s*[^;"')]+/gi, `stroke-dashoffset:${R.dashOffset}`));
|
|
7928
7928
|
}
|
|
7929
|
-
if (!/\bstroke\s*=\s*["']/i.test(
|
|
7929
|
+
if (!/\bstroke\s*=\s*["']/i.test(m) && !new RegExp("(?<![a-z-])stroke\\s*:", "i").test(m)) {
|
|
7930
7930
|
let JA = "", PA = "";
|
|
7931
7931
|
if (HA) {
|
|
7932
7932
|
const wI = Q.width || i || 100, rI = Q.height || D || 100, QI = (wI + rI) * 2, _A = Math.max(0, Math.min(1, v)), BI = Math.max(0, Math.min(1, aA)), sI = (SA % 1 + 1) % 1, NI = (UA % 1 + 1) % 1;
|
|
@@ -7968,19 +7968,19 @@ class ii {
|
|
|
7968
7968
|
this.renderLineGraph(A, h, i, D);
|
|
7969
7969
|
else if (I.type === "Shape") {
|
|
7970
7970
|
if (this.applyPath(A, h, i, D, s), A.save(), E.blur && E.blur.amount > 0 && (A.filter = `blur(${E.blur.amount}px)`), E.fill) {
|
|
7971
|
-
const
|
|
7972
|
-
O ? A.fillStyle = O : A.fillStyle = typeof E.fill == "string" ? E.fill : E.fill.color || "transparent", A.globalAlpha =
|
|
7971
|
+
const m = A.globalAlpha, O = this.createCanvasFill(A, E.fill, i, D);
|
|
7972
|
+
O ? A.fillStyle = O : A.fillStyle = typeof E.fill == "string" ? E.fill : E.fill.color || "transparent", A.globalAlpha = m * this.normalizeOpacity(E.fill.opacity ?? 100), this.applyPath(A, h, i, D, s), A.fill(), A.globalAlpha = m;
|
|
7973
7973
|
}
|
|
7974
7974
|
A.restore(), E.stroke && E.stroke.width > 0 && this.applyStrokeAlignment(A, E, h, i, D, s);
|
|
7975
7975
|
} else if (I.type === "Frame" || I.type === "Group" && !I.isStructuralGroup) {
|
|
7976
|
-
const
|
|
7977
|
-
if (A.save(), A.beginPath(), this.drawRoundRect(A, -
|
|
7978
|
-
const R = A.globalAlpha, x = this.createCanvasFill(A, E.fill,
|
|
7976
|
+
const m = g.width ?? Q.width ?? I.width ?? i, O = g.height ?? Q.height ?? I.height ?? D, Y = s;
|
|
7977
|
+
if (A.save(), A.beginPath(), this.drawRoundRect(A, -m / 2, -O / 2, m, O, Y), E.fill && E.fill.type !== "None") {
|
|
7978
|
+
const R = A.globalAlpha, x = this.createCanvasFill(A, E.fill, m, O);
|
|
7979
7979
|
A.fillStyle = x || E.fill.color || "transparent", A.globalAlpha = R * this.normalizeOpacity(E.fill.opacity ?? 100), A.fill(), A.globalAlpha = R;
|
|
7980
7980
|
}
|
|
7981
7981
|
if (A.restore(), E.stroke && E.stroke.width > 0 && E.stroke.isEnabled !== !1) {
|
|
7982
7982
|
const R = { type: "Rectangle" };
|
|
7983
|
-
this.applyStrokeAlignment(A, E, R,
|
|
7983
|
+
this.applyStrokeAlignment(A, E, R, m, O, Y);
|
|
7984
7984
|
}
|
|
7985
7985
|
} else I.type === "Group" && I.isStructuralGroup || (I.type === "Component" && I.variant === "inputbox" ? this.renderInputBox(A, I) : I.type === "Component" && I.variant === "button" ? this.renderButton(A, I) : I.type === "Component" && I.variant === "toggle_button" ? this.renderToggleButton(A, I) : I.type === "Toggle" || I.type === "Component" && I.variant === "toggle" ? this.renderToggle(A, I) : I.type === "Slider" || I.type === "Component" && I.variant === "slider" ? this.renderSlider(A, I) : I.type === "Dropdown" || I.type === "Component" && I.variant === "dropdown" ? this.renderDropdown(A, I) : (I.type === "ListView" || I.type === "Component" && I.variant === "listview") && this.renderListView(A, I));
|
|
7986
7986
|
if (gA && A.restore(), b && b.enabled && A.restore(), I.children && I.children.length > 0) {
|
|
@@ -8128,10 +8128,10 @@ class ii {
|
|
|
8128
8128
|
const T = U ? YE(U, W, X) : { height: 0, lines: [] }, AA = (T == null ? void 0 : T.height) ?? 0, IA = (T == null ? void 0 : T.lines) ?? [];
|
|
8129
8129
|
let b = AA;
|
|
8130
8130
|
const P = this.getFontLeadingFactor(C.fontFamily || "Inter"), gA = (X - K) * P;
|
|
8131
|
-
let
|
|
8132
|
-
i > 0 && (F === "top" ?
|
|
8131
|
+
let u = Math.round(-b / 2);
|
|
8132
|
+
i > 0 && (F === "top" ? u = Math.round(-i / 2) : F === "middle" || F === "center" ? u = Math.round(-b / 2) : F === "bottom" && (u = Math.round(i / 2 - b))), u += gA;
|
|
8133
8133
|
const q = (r, z, d, _, hA) => {
|
|
8134
|
-
var FA, NA,
|
|
8134
|
+
var FA, NA, m;
|
|
8135
8135
|
const KA = (!D || o) && (I.behaviors || []).some(
|
|
8136
8136
|
(O) => O.enabled && (O.type.toString().includes("Text") || ["Typewriter", "Scramble", "Wave", "Bounce", "GlitchText", "Reveal3D", "RevealSlide", "RevealBlur"].includes(O.type))
|
|
8137
8137
|
);
|
|
@@ -8302,18 +8302,18 @@ class ii {
|
|
|
8302
8302
|
const V = o ? "#000000" : this.createCanvasFill(A, g.fill, E, i);
|
|
8303
8303
|
A.fillStyle = V || g.fill.color || "#ffffff", A.fillText(oA, -iA / 2, 0);
|
|
8304
8304
|
} else _ ? A.strokeText(oA, -iA / 2, 0) : A.fillText(oA, -iA / 2, 0);
|
|
8305
|
-
A.restore(), A.globalAlpha = RA, C.enableSegments === !0 && ((
|
|
8305
|
+
A.restore(), A.globalAlpha = RA, C.enableSegments === !0 && ((m = C.segments) == null ? void 0 : m.length) > 0 && (A.font = `${G} ${this.mapFontWeight((C.fontWeight || "400").toString())} ${K}px "${C.fontFamily || "Inter"}", sans-serif`), R += A.measureText(GA).width + M;
|
|
8306
8306
|
}
|
|
8307
8307
|
}
|
|
8308
8308
|
};
|
|
8309
8309
|
if (D) {
|
|
8310
|
-
let r = 0, z =
|
|
8310
|
+
let r = 0, z = u;
|
|
8311
8311
|
(IA || []).forEach((d) => {
|
|
8312
8312
|
let _ = -E / 2;
|
|
8313
8313
|
e === "center" ? _ = 0 : e === "right" && (_ = E / 2), q(d.text, _, z, !1, r), r += (d.text || "").length + 1, z += X;
|
|
8314
8314
|
});
|
|
8315
8315
|
} else if (o) {
|
|
8316
|
-
let r = 0, z =
|
|
8316
|
+
let r = 0, z = u;
|
|
8317
8317
|
(IA || []).forEach((d) => {
|
|
8318
8318
|
let _ = -E / 2;
|
|
8319
8319
|
e === "center" ? _ = 0 : e === "right" && (_ = E / 2), q(d.text, _, z, !1, r), r += (d.text || "").length + 1, z += X;
|
|
@@ -8322,7 +8322,7 @@ class ii {
|
|
|
8322
8322
|
if (g.fill) {
|
|
8323
8323
|
const r = A.globalAlpha, z = this.createCanvasFill(A, g.fill, E, i);
|
|
8324
8324
|
A.fillStyle = z || g.fill.color || "#000000", A.globalAlpha = r * this.normalizeOpacity(g.fill.opacity ?? 100);
|
|
8325
|
-
let d = 0, _ =
|
|
8325
|
+
let d = 0, _ = u;
|
|
8326
8326
|
(IA || []).forEach((hA) => {
|
|
8327
8327
|
let KA = Math.round(-E / 2);
|
|
8328
8328
|
e === "center" ? KA = 0 : e === "right" && (KA = Math.round(E / 2)), q(hA.text, KA, _, !1, d), d += (hA.text || "").length + 1, _ += X;
|
|
@@ -8330,8 +8330,8 @@ class ii {
|
|
|
8330
8330
|
}
|
|
8331
8331
|
if (g.stroke && g.stroke.width > 0) {
|
|
8332
8332
|
const r = A.globalAlpha;
|
|
8333
|
-
A.strokeStyle = g.stroke.color, A.lineWidth = g.stroke.width, A.globalAlpha = r * this.normalizeOpacity(g.stroke.opacity ?? 100);
|
|
8334
|
-
let z = 0, d =
|
|
8333
|
+
g.fill && g.fill.type !== "None" && (A.shadowColor = "transparent", A.shadowBlur = 0, A.shadowOffsetX = 0, A.shadowOffsetY = 0), A.strokeStyle = g.stroke.color, A.lineWidth = g.stroke.width, A.globalAlpha = r * this.normalizeOpacity(g.stroke.opacity ?? 100);
|
|
8334
|
+
let z = 0, d = u;
|
|
8335
8335
|
(IA || []).forEach((_) => {
|
|
8336
8336
|
let hA = Math.round(-E / 2);
|
|
8337
8337
|
e === "center" ? hA = 0 : e === "right" && (hA = Math.round(E / 2)), q(_.text, hA, d, !0, z), z += (_.text || "").length + 1, d += X;
|
|
@@ -8342,7 +8342,7 @@ class ii {
|
|
|
8342
8342
|
applyStrokeAlignment(A, I, C, g, Q, E) {
|
|
8343
8343
|
if (!I.stroke || I.stroke.width <= 0 || I.stroke.isEnabled === !1) return;
|
|
8344
8344
|
const i = I.stroke, D = i.width, o = (i.alignment || "center").toLowerCase();
|
|
8345
|
-
if (A.save(), i.fill) {
|
|
8345
|
+
if (A.save(), I.fill && I.fill.type !== "None" && (A.shadowColor = "transparent", A.shadowBlur = 0, A.shadowOffsetX = 0, A.shadowOffsetY = 0), i.fill) {
|
|
8346
8346
|
const S = this.createCanvasFill(A, i.fill, g, Q);
|
|
8347
8347
|
S ? A.strokeStyle = S : A.strokeStyle = i.color || "#000000";
|
|
8348
8348
|
} else
|
|
@@ -8569,12 +8569,12 @@ class ii {
|
|
|
8569
8569
|
const QA = `${s}Style`, L = g[QA];
|
|
8570
8570
|
if (L ? (L.backgroundColor !== void 0 && (e = L.backgroundColor), L.borderColor !== void 0 && (M = L.borderColor), L.borderWidth !== void 0 && (n = L.borderWidth), L.color !== void 0 && (X = L.color), L.placeholderColor !== void 0 && (W = L.placeholderColor), L.fontSize !== void 0 && (H = L.fontSize)) : s === "focused" ? (M = g.focusBorderColor || "rgba(59, 130, 246, 1)", n = Math.max(n, 2)) : s === "hovered" || s === "hover" ? (M = g.hoverBorderColor || M, e = g.hoverBackgroundColor || e) : s === "disabled" ? (e = g.disabledBackgroundColor || "rgba(31, 41, 55, 0.6)", M = g.disabledBorderColor || "rgba(55, 65, 81, 0.4)") : s === "error" && (M = "rgba(239, 68, 68, 1)", n = Math.max(n, 2)), A.beginPath(), this.drawRoundRect(A, -Q / 2, -E / 2, Q, E, F), A.fillStyle = e, A.fill(), n > 0 && (A.strokeStyle = M, A.lineWidth = n, A.stroke(), s === "focused" || s === "focus")) {
|
|
8571
8571
|
A.save(), A.beginPath();
|
|
8572
|
-
const NA = F.map((
|
|
8572
|
+
const NA = F.map((m) => m + 2);
|
|
8573
8573
|
this.drawRoundRect(A, -Q / 2 - 2, -E / 2 - 2, Q + 4, E + 4, NA), A.strokeStyle = "rgba(59, 130, 246, 0.3)", A.lineWidth = 2, A.stroke(), A.restore();
|
|
8574
8574
|
}
|
|
8575
|
-
const U = (NA,
|
|
8575
|
+
const U = (NA, m) => {
|
|
8576
8576
|
if (!NA.visible || !NA.svgPath) return;
|
|
8577
|
-
const O = NA.size || 14, Y = NA.offset ?? 16, R = NA.color || "#ffffff", x =
|
|
8577
|
+
const O = NA.size || 14, Y = NA.offset ?? 16, R = NA.color || "#ffffff", x = m ? -(Q / 2) + Y : Q / 2 - Y, Z = NA.svgPath;
|
|
8578
8578
|
if (A.save(), A.translate(x, 0), !Z.startsWith("<svg")) {
|
|
8579
8579
|
const GA = new Path2D(Z), CA = O / 24;
|
|
8580
8580
|
A.scale(CA, CA), A.translate(-12, -12), A.fillStyle = R, A.fill(GA);
|
|
@@ -8582,13 +8582,13 @@ class ii {
|
|
|
8582
8582
|
A.restore();
|
|
8583
8583
|
};
|
|
8584
8584
|
U(G, !0), U(t, !1);
|
|
8585
|
-
const T = g.text || "", AA = g.placeholder || "Enter text...", IA = !T, b = T || AA, P = IA ? W : X, gA = H,
|
|
8586
|
-
A.font = `${q} ${gA}px "${
|
|
8585
|
+
const T = g.text || "", AA = g.placeholder || "Enter text...", IA = !T, b = T || AA, P = IA ? W : X, gA = H, u = g.fontFamily || "Inter", q = g.fontWeight || 400;
|
|
8586
|
+
A.font = `${q} ${gA}px "${u}", sans-serif`, A.fillStyle = P, A.textAlign = "left", A.textBaseline = K ? "top" : "middle";
|
|
8587
8587
|
const l = g.inputPadding ?? 16, r = G.visible ? (G.offset ?? 16) + (G.size || 14) / 2 + 8 : l, z = t.visible ? (t.offset ?? 16) + (t.size || 14) / 2 + 8 : l, d = -(Q / 2) + r, _ = Q - r - z, hA = g.inputType === "password" ? "•".repeat(b.length) : b;
|
|
8588
8588
|
if (A.save(), A.beginPath(), A.rect(d - 2, -E / 2 + 4, _ + 4, E - 8), A.clip(), K) {
|
|
8589
8589
|
const NA = hA.split(`
|
|
8590
8590
|
`);
|
|
8591
|
-
let
|
|
8591
|
+
let m = -E / 2 + l;
|
|
8592
8592
|
const O = gA * 1.2;
|
|
8593
8593
|
let Y = 0;
|
|
8594
8594
|
NA.forEach((R, x) => {
|
|
@@ -8596,36 +8596,36 @@ class ii {
|
|
|
8596
8596
|
let GA = "";
|
|
8597
8597
|
for (let CA = 0; CA < Z.length; CA++) {
|
|
8598
8598
|
const wA = GA + Z[CA] + " ";
|
|
8599
|
-
A.measureText(wA).width > _ && CA > 0 ? (A.fillText(GA, d,
|
|
8599
|
+
A.measureText(wA).width > _ && CA > 0 ? (A.fillText(GA, d, m), GA = Z[CA] + " ", m += O) : GA = wA;
|
|
8600
8600
|
}
|
|
8601
|
-
A.fillText(GA, d,
|
|
8602
|
-
}), i && !IA && Math.floor(performance.now() / 500) % 2 === 0 && A.fillRect(d + Y,
|
|
8601
|
+
A.fillText(GA, d, m), Y = A.measureText(GA).width, x < NA.length - 1 && (m += O, Y = 0);
|
|
8602
|
+
}), i && !IA && Math.floor(performance.now() / 500) % 2 === 0 && A.fillRect(d + Y, m, 1.5, gA);
|
|
8603
8603
|
} else {
|
|
8604
|
-
const
|
|
8604
|
+
const m = A.measureText(hA).width;
|
|
8605
8605
|
let O = 0;
|
|
8606
|
-
if (
|
|
8607
|
-
const R = d +
|
|
8606
|
+
if (m > _ && (O = m - _), A.fillText(hA, d - O, 0), i && !IA && Math.floor(performance.now() / 500) % 2 === 0) {
|
|
8607
|
+
const R = d + m - O;
|
|
8608
8608
|
A.fillRect(R, -(gA / 2), 1.5, gA);
|
|
8609
8609
|
}
|
|
8610
8610
|
}
|
|
8611
8611
|
if (A.restore(), h.visible !== !1) {
|
|
8612
|
-
const NA = h.text || "Label",
|
|
8613
|
-
A.font = `600 ${
|
|
8612
|
+
const NA = h.text || "Label", m = h.fontSize || 12, O = h.color || "rgba(156, 163, 175, 1)", Y = h.offset ?? 8;
|
|
8613
|
+
A.font = `600 ${m}px "${u}", sans-serif`, A.fillStyle = O, A.textAlign = "left", A.textBaseline = "bottom";
|
|
8614
8614
|
const R = -(Q / 2), x = -(E / 2) - Y;
|
|
8615
8615
|
A.fillText(NA, R, x);
|
|
8616
8616
|
}
|
|
8617
8617
|
if (a.visible === !0) {
|
|
8618
|
-
const NA = a.text || "Helper text",
|
|
8619
|
-
A.font = `400 ${
|
|
8618
|
+
const NA = a.text || "Helper text", m = a.fontSize || 11, O = s === "error" ? "rgba(239, 68, 68, 1)" : a.color || "rgba(156, 163, 175, 1)", Y = a.offset ?? 6;
|
|
8619
|
+
A.font = `400 ${m}px "${u}", sans-serif`, A.fillStyle = O, A.textAlign = "left", A.textBaseline = "top";
|
|
8620
8620
|
const R = -(Q / 2), x = E / 2 + Y;
|
|
8621
8621
|
A.fillText(NA, R, x);
|
|
8622
8622
|
}
|
|
8623
8623
|
}
|
|
8624
8624
|
renderSlider(A, I) {
|
|
8625
|
-
const C = this.objectStates.get(I.id), g = (C == null ? void 0 : C.geometry) || I.geometry, Q = (C == null ? void 0 : C.options) || I.options || {}, E = g.width || 200, i = Q.value ?? 50, D = Q.min ?? 0, s = (Q.max ?? 100) - D, h = s === 0 ? 0 : (i - D) / s, a = Q.trackHeight || 4, G = Q.trackRoundedness ?? 2, t = Q.trackShape ?? "Rectangle", K = Q.trackPath || "", S = Q.activeColor || "#3b82f6", y = Q.inactiveColor || "#374151", F = Q.thumbShape || "Ellipse", e = Q.thumbWidth ?? 16, M = Q.thumbHeight ?? 16, n = Q.thumbRoundedness ?? 0, X = Q.thumbColor || "#ffffff", W = Q.thumbPath || "", H = Q.thumbIcon || "", QA = Q.showValueTooltip ?? !1, L = Q.tooltipBgColor || "#333333", U = Q.tooltipColor || "#ffffff", T = Q.tooltipOffsetX ?? 0, AA = Q.tooltipOffsetY ?? -25, IA = (d, _, hA, KA, FA, NA,
|
|
8626
|
-
if ((d === "Custom" || d === "Icon") &&
|
|
8625
|
+
const C = this.objectStates.get(I.id), g = (C == null ? void 0 : C.geometry) || I.geometry, Q = (C == null ? void 0 : C.options) || I.options || {}, E = g.width || 200, i = Q.value ?? 50, D = Q.min ?? 0, s = (Q.max ?? 100) - D, h = s === 0 ? 0 : (i - D) / s, a = Q.trackHeight || 4, G = Q.trackRoundedness ?? 2, t = Q.trackShape ?? "Rectangle", K = Q.trackPath || "", S = Q.activeColor || "#3b82f6", y = Q.inactiveColor || "#374151", F = Q.thumbShape || "Ellipse", e = Q.thumbWidth ?? 16, M = Q.thumbHeight ?? 16, n = Q.thumbRoundedness ?? 0, X = Q.thumbColor || "#ffffff", W = Q.thumbPath || "", H = Q.thumbIcon || "", QA = Q.showValueTooltip ?? !1, L = Q.tooltipBgColor || "#333333", U = Q.tooltipColor || "#ffffff", T = Q.tooltipOffsetX ?? 0, AA = Q.tooltipOffsetY ?? -25, IA = (d, _, hA, KA, FA, NA, m) => {
|
|
8626
|
+
if ((d === "Custom" || d === "Icon") && m)
|
|
8627
8627
|
try {
|
|
8628
|
-
const O = new Path2D(
|
|
8628
|
+
const O = new Path2D(m);
|
|
8629
8629
|
if (A.save(), A.translate(_, hA), d === "Icon") {
|
|
8630
8630
|
const Y = Math.min(KA, FA) / 24;
|
|
8631
8631
|
A.scale(Y, Y), A.translate(-12, -12);
|
|
@@ -8663,7 +8663,7 @@ class ii {
|
|
|
8663
8663
|
A.fillStyle = y, t === "Line" ? (A.strokeStyle = y, A.lineWidth = a, A.beginPath(), A.moveTo(-E / 2, 0), A.lineTo(E / 2, 0), A.stroke()) : IA(t, 0, 0, E, a, G, K);
|
|
8664
8664
|
const b = E - e, P = -E / 2 + e / 2 + h * b, gA = P - -E / 2;
|
|
8665
8665
|
gA > 0 && (A.fillStyle = S, t === "Line" ? (A.strokeStyle = S, A.lineWidth = a, A.beginPath(), A.moveTo(-E / 2, 0), A.lineTo(P, 0), A.stroke()) : t === "Rectangle" && (A.beginPath(), this.drawRoundRect(A, -E / 2, -a / 2, gA, a, G), A.fill())), A.save(), A.translate(P, 0);
|
|
8666
|
-
const
|
|
8666
|
+
const u = A.getTransform(), q = Math.sqrt(u.a * u.a + u.b * u.b) || 1;
|
|
8667
8667
|
if (A.shadowColor = "rgba(0,0,0,0.2)", A.shadowBlur = 4 * q, A.shadowOffsetY = 1 * q, A.fillStyle = X, IA(F, 0, 0, e, M, n, F === "Icon" ? H : W), A.restore(), QA) {
|
|
8668
8668
|
A.save(), A.translate(P + T, AA);
|
|
8669
8669
|
const d = Math.round(i).toString();
|
|
@@ -8708,8 +8708,8 @@ class ii {
|
|
|
8708
8708
|
if (P) {
|
|
8709
8709
|
const gA = new Path2D(P);
|
|
8710
8710
|
A.save();
|
|
8711
|
-
const
|
|
8712
|
-
A.scale(
|
|
8711
|
+
const u = M / 24;
|
|
8712
|
+
A.scale(u, u), A.translate(-12, -12), A.fill(gA), A.restore();
|
|
8713
8713
|
}
|
|
8714
8714
|
}
|
|
8715
8715
|
A.restore();
|
|
@@ -8720,12 +8720,12 @@ class ii {
|
|
|
8720
8720
|
A.fillStyle = this.createCanvasFill(A, typeof L == "string" ? { type: "Solid", color: L } : L, Q, E) || "#333333", A.textAlign = "left", A.textBaseline = "middle";
|
|
8721
8721
|
const U = e === "none" ? 0 : M + 8, T = Q - F * 2 - U;
|
|
8722
8722
|
if (A.save(), A.beginPath(), A.rect(i + F, D, T, E), A.clip(), A.fillText(X, i + F, 0), A.restore(), a && !s) {
|
|
8723
|
-
const IA = D + E + 4, b = g.optionsList || [], P = g.itemHeight || 32, gA = g.listPadding ?? 4,
|
|
8723
|
+
const IA = D + E + 4, b = g.optionsList || [], P = g.itemHeight || 32, gA = g.listPadding ?? 4, u = b.length * P + gA * 2, q = g.listCornerRadius ?? o;
|
|
8724
8724
|
A.save();
|
|
8725
8725
|
const l = g.listShadow || {}, r = A.getTransform(), z = Math.sqrt(r.a * r.a + r.b * r.b) || 1;
|
|
8726
|
-
A.shadowColor = typeof l.color == "string" ? l.color : ((AA = l.color) == null ? void 0 : AA.color) || "rgba(0,0,0,0.15)", A.shadowBlur = (l.blur ?? 12) * z, A.shadowOffsetY = (l.offsetY ?? 6) * z, A.shadowOffsetX = (l.offsetX ?? 0) * z, A.beginPath(), this.drawRoundRect(A, i, IA, Q,
|
|
8726
|
+
A.shadowColor = typeof l.color == "string" ? l.color : ((AA = l.color) == null ? void 0 : AA.color) || "rgba(0,0,0,0.15)", A.shadowBlur = (l.blur ?? 12) * z, A.shadowOffsetY = (l.offsetY ?? 6) * z, A.shadowOffsetX = (l.offsetX ?? 0) * z, A.beginPath(), this.drawRoundRect(A, i, IA, Q, u, q), A.fillStyle = this.createCanvasFill(A, typeof g.listBackgroundColor == "string" ? { type: "Solid", color: g.listBackgroundColor } : g.listBackgroundColor || { type: "Solid", color: "#ffffff" }, Q, u) || "#ffffff", A.fill();
|
|
8727
8727
|
const d = g.listBorderWidth ?? 1;
|
|
8728
|
-
d > 0 && (A.shadowColor = "transparent", A.strokeStyle = this.createCanvasFill(A, typeof g.listBorderColor == "string" ? { type: "Solid", color: g.listBorderColor } : g.listBorderColor || { type: "Solid", color: t }, Q,
|
|
8728
|
+
d > 0 && (A.shadowColor = "transparent", A.strokeStyle = this.createCanvasFill(A, typeof g.listBorderColor == "string" ? { type: "Solid", color: g.listBorderColor } : g.listBorderColor || { type: "Solid", color: t }, Q, u) || "#e5e7eb", A.lineWidth = d, A.stroke()), A.restore();
|
|
8729
8729
|
const _ = g.itemFontSize || W, hA = g.itemFontFamily || QA;
|
|
8730
8730
|
A.font = `${H} ${_}px ${hA}`, b.forEach((KA, FA) => {
|
|
8731
8731
|
const NA = IA + gA + FA * P;
|
|
@@ -8982,16 +8982,16 @@ class ii {
|
|
|
8982
8982
|
var IA, b, P, gA;
|
|
8983
8983
|
const C = this.objectStates.get(I.id) || {}, g = C.options || I.options || {}, Q = C.width !== void 0 ? C.width : ((IA = I.geometry) == null ? void 0 : IA.width) || 200, E = C.height !== void 0 ? C.height : ((b = I.geometry) == null ? void 0 : b.height) || 300, i = -Q / 2, D = -E / 2, o = C.corner_radius !== void 0 ? C.corner_radius : g.corner_radius ?? 0, s = g.orientation || "vertical", h = g.items || [], a = g.itemGap ?? 10, G = g.itemHeight ?? 50, t = g.itemWidth ?? 200, K = g.scrollOffset ?? 0, S = g.padding ?? 0, y = g.glassEffect !== !1, F = g.accentColor || "#3b82f6", e = g.itemTextColor || "#333333", M = g.itemBackgroundColor || "#ffffff", n = g.hoveredIndex ?? null, X = g.activeItemIndex ?? null, W = g.glowIntensity ?? 0, H = g.glowColor || "#3b82f6", QA = typeof H == "string" ? H : H.color || ((gA = (P = H.stops) == null ? void 0 : P[0]) == null ? void 0 : gA.color) || "#3b82f6", L = g.opacity !== void 0 ? g.opacity : I.opacity !== void 0 ? I.opacity : 1;
|
|
8984
8984
|
if (A.save(), A.globalAlpha *= L, W > 0) {
|
|
8985
|
-
const
|
|
8985
|
+
const u = A.getTransform(), q = Math.sqrt(u.a * u.a + u.b * u.b) || 1;
|
|
8986
8986
|
A.shadowColor = QA, A.shadowBlur = W * 2 * q, A.shadowOffsetX = 0, A.shadowOffsetY = 0;
|
|
8987
8987
|
}
|
|
8988
8988
|
if (y) {
|
|
8989
|
-
const
|
|
8989
|
+
const u = g.listBackgroundColor || "rgba(31, 41, 55, 0.4)", q = this.createCanvasFill(A, u, Q, E);
|
|
8990
8990
|
A.fillStyle = q || "rgba(31, 41, 55, 0.4)", this.drawListViewRect(A, i, D, Q, E, o), A.fill();
|
|
8991
8991
|
const l = A.createLinearGradient(i, D, i + Q, D + E);
|
|
8992
8992
|
l.addColorStop(0, "rgba(255, 255, 255, 0.15)"), l.addColorStop(0.5, "rgba(255, 255, 255, 0.08)"), l.addColorStop(1, "rgba(255, 255, 255, 0.03)"), A.fillStyle = l, this.drawListViewRect(A, i, D, Q, E, o), A.fill(), A.strokeStyle = "rgba(255, 255, 255, 0.25)", A.lineWidth = 1, this.drawListViewRect(A, i, D, Q, E, o), A.stroke();
|
|
8993
8993
|
} else {
|
|
8994
|
-
const
|
|
8994
|
+
const u = g.listBackgroundColor || "transparent", q = this.createCanvasFill(A, u, Q, E);
|
|
8995
8995
|
q && (A.fillStyle = q, this.drawListViewRect(A, i, D, Q, E, o), A.fill());
|
|
8996
8996
|
const l = g.borderWidth ?? 0;
|
|
8997
8997
|
l > 0 && (A.strokeStyle = g.borderColor || "#cccccc", A.lineWidth = l, this.drawListViewRect(A, i, D, Q, E, o), A.stroke());
|
|
@@ -8999,7 +8999,7 @@ class ii {
|
|
|
8999
8999
|
A.shadowBlur = 0, A.save(), this.drawListViewRect(A, i, D, Q, E, o), A.clip();
|
|
9000
9000
|
const U = typeof S == "number" ? S : s === "vertical" ? S[0] : S[3];
|
|
9001
9001
|
let T = (s === "vertical" ? D : i) + K + U;
|
|
9002
|
-
if (A.textBaseline = "middle", h.forEach((
|
|
9002
|
+
if (A.textBaseline = "middle", h.forEach((u, q) => {
|
|
9003
9003
|
const l = s === "vertical" ? Q : t, r = s === "vertical" ? G : E, z = s === "vertical" ? i : T, d = s === "vertical" ? T : D, _ = n === q, hA = X === q;
|
|
9004
9004
|
if (hA) {
|
|
9005
9005
|
const O = this.createCanvasFill(A, F, l, r);
|
|
@@ -9018,12 +9018,12 @@ class ii {
|
|
|
9018
9018
|
}
|
|
9019
9019
|
const KA = hA ? "#ffffff" : y ? "rgba(255, 255, 255, 0.9)" : e;
|
|
9020
9020
|
A.fillStyle = KA, A.font = hA || _ ? "600 14px Inter, sans-serif" : "400 14px Inter, sans-serif";
|
|
9021
|
-
const FA = typeof
|
|
9022
|
-
s === "horizontal" ? A.textAlign = "center" : A.textAlign = "left", A.fillText(FA, NA,
|
|
9021
|
+
const FA = typeof u == "string" ? u : (u == null ? void 0 : u.label) || `Item ${q + 1}`, NA = z + (s === "vertical" ? 16 : l / 2), m = d + r / 2;
|
|
9022
|
+
s === "horizontal" ? A.textAlign = "center" : A.textAlign = "left", A.fillText(FA, NA, m), T += (s === "vertical" ? G : t) + a;
|
|
9023
9023
|
}), A.restore(), g.showScrollbar !== !1) {
|
|
9024
|
-
const
|
|
9025
|
-
if (
|
|
9026
|
-
const l = q /
|
|
9024
|
+
const u = (h.length || 0) * (s === "vertical" ? G : t) + ((h.length || 0) - 1) * a, q = s === "vertical" ? E : Q;
|
|
9025
|
+
if (u > q) {
|
|
9026
|
+
const l = q / u, r = q * l, z = -K / u * q, d = g.scrollbarColor || "rgba(255,255,255,0.3)", _ = g.scrollbarWidth || 4;
|
|
9027
9027
|
A.fillStyle = d, s === "vertical" ? A.fillRect(i + Q - _ - 2, D + z, _, r) : A.fillRect(i + z, D + E - _ - 2, r, _);
|
|
9028
9028
|
}
|
|
9029
9029
|
}
|
|
@@ -9069,7 +9069,7 @@ class ii {
|
|
|
9069
9069
|
if (!g.behaviors || g.behaviors.length === 0) return;
|
|
9070
9070
|
const Q = this.objectStates.get(g.id);
|
|
9071
9071
|
Q && g.behaviors.forEach((E) => {
|
|
9072
|
-
var a, G, t, K, S, y, F, e, M, n, X, W, H, QA, L, U, T, AA, IA, b, P, gA,
|
|
9072
|
+
var a, G, t, K, S, y, F, e, M, n, X, W, H, QA, L, U, T, AA, IA, b, P, gA, u, q, l, r, z, d, _, hA, KA, FA, NA, m, O, Y, R, x, Z, GA, CA, wA, kA, BA;
|
|
9073
9073
|
if (!E.enabled) return;
|
|
9074
9074
|
const i = E.startTime || 0, D = E.endTime || 1 / 0;
|
|
9075
9075
|
if (this.currentTime < i || this.currentTime > D) return;
|
|
@@ -9135,7 +9135,7 @@ class ii {
|
|
|
9135
9135
|
const N = ((P = E.settings) == null ? void 0 : P.factor) || 0.05, f = this.canvasHeight / 2, p = (this._lastPointerPos.y - f) * N;
|
|
9136
9136
|
Q.y += p * A * 10;
|
|
9137
9137
|
} else if (E.type === j.Noise || E.type === j.Float) {
|
|
9138
|
-
const N = (((gA = E.settings) == null ? void 0 : gA.frequency) || ((
|
|
9138
|
+
const N = (((gA = E.settings) == null ? void 0 : gA.frequency) || ((u = E.settings) == null ? void 0 : u.speed) || 1) * 2e-3, f = (((q = E.settings) == null ? void 0 : q.amplitude) || ((l = E.settings) == null ? void 0 : l.range) || 50) * (((r = E.settings) == null ? void 0 : r.strength) || 1), p = Date.now();
|
|
9139
9139
|
Q.x += Math.sin(p * N) * f * A, Q.y += Math.cos(p * N * 0.8) * f * A, Q.rotation += Math.sin(p * N * 0.5) * 5 * A;
|
|
9140
9140
|
} else if (E.type === j.Pulse) {
|
|
9141
9141
|
const N = (((z = E.settings) == null ? void 0 : z.speed) || 1) * 5e-3, f = (((d = E.settings) == null ? void 0 : d.scale) || 1.2) - 1, p = Math.sin(Date.now() * N), oA = ((_ = E.settings) == null ? void 0 : _.strength) || 1;
|
|
@@ -9147,7 +9147,7 @@ class ii {
|
|
|
9147
9147
|
this.applyBehaviorSensor(Q, TA.PositionX, oA * p, A, E.settings), this.applyBehaviorSensor(Q, TA.PositionY, oA * p, A, E.settings);
|
|
9148
9148
|
}
|
|
9149
9149
|
} else if (E.type === j.Scroll) {
|
|
9150
|
-
const N = ((FA = E.settings) == null ? void 0 : FA.axis) || "vertical", f = ((NA = E.settings) == null ? void 0 : NA.factor) || 0.5, p = ((
|
|
9150
|
+
const N = ((FA = E.settings) == null ? void 0 : FA.axis) || "vertical", f = ((NA = E.settings) == null ? void 0 : NA.factor) || 0.5, p = ((m = E.settings) == null ? void 0 : m.strength) || 1;
|
|
9151
9151
|
(N === "vertical" || N === "both") && (Q.y += this.scrollOffset.y * f * p * A), (N === "horizontal" || N === "both") && (Q.x += this.scrollOffset.x * f * p * A);
|
|
9152
9152
|
} else if (E.type === j.LookAt) {
|
|
9153
9153
|
const N = ((O = E.settings) == null ? void 0 : O.factor) || 1, f = ((Y = E.settings) == null ? void 0 : Y.strength) || 1, p = Math.atan2(-s, -o) * (180 / Math.PI), oA = Q.rotation, RA = (p - oA + 180) % 360 - 180;
|
|
@@ -9360,7 +9360,7 @@ const oi = ({ artboard: B, config: A }) => {
|
|
|
9360
9360
|
X.current || (X.current = P);
|
|
9361
9361
|
const gA = (P - X.current) / 1e3;
|
|
9362
9362
|
X.current = P, g && U.advance(gA);
|
|
9363
|
-
const
|
|
9363
|
+
const u = window.devicePixelRatio || 1, q = T.getBoundingClientRect(), l = Math.floor(q.width * u), r = Math.floor(q.height * u);
|
|
9364
9364
|
(T.width !== l || T.height !== r) && (T.width = l, T.height = r), U.render(AA, l, r), n.current = requestAnimationFrame(IA);
|
|
9365
9365
|
};
|
|
9366
9366
|
n.current = requestAnimationFrame(IA);
|
|
@@ -9434,11 +9434,12 @@ function ai() {
|
|
|
9434
9434
|
updateObjectOptions: D
|
|
9435
9435
|
};
|
|
9436
9436
|
}
|
|
9437
|
-
const Gi = "6.0.
|
|
9437
|
+
const Gi = "6.0.28";
|
|
9438
9438
|
export {
|
|
9439
9439
|
TA as BehaviorSensor,
|
|
9440
9440
|
j as BehaviorType,
|
|
9441
9441
|
zQ as ConditionOp,
|
|
9442
|
+
oi as ExodeSEO,
|
|
9442
9443
|
hi as ExodeUICanvas,
|
|
9443
9444
|
ii as ExodeUIEngine,
|
|
9444
9445
|
YI as LogicOp,
|