@tresjs/cientos 2.0.0-alpha.3 → 2.0.0-alpha.4
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/trescientos.js +221 -225
- package/dist/trescientos.umd.cjs +2 -2
- package/package.json +1 -1
package/dist/trescientos.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* name: @tresjs/cientos
|
|
3
|
-
* version: v2.0.0-alpha.
|
|
3
|
+
* version: v2.0.0-alpha.3
|
|
4
4
|
* (c) 2023
|
|
5
5
|
* description: Collection of useful helpers and fully functional, ready-made abstractions for Tres
|
|
6
6
|
* author: Alvaro Saburido <hola@alvarosaburido.dev> (https://github.com/alvarosabu/)
|
|
7
7
|
*/
|
|
8
|
-
import { inject as ia, defineComponent as Ie, ref as
|
|
8
|
+
import { inject as ia, defineComponent as Ie, ref as on, watch as Ns, unref as Je, openBlock as Be, createElementBlock as je, createCommentVNode as no, shallowRef as et, computed as Yi, onUnmounted as Ea, renderSlot as $e, getCurrentInstance as Yc, onMounted as Ca, nextTick as qc, getCurrentScope as Qc, onScopeDispose as Zc, watchEffect as Pa, shallowReactive as Wc, useSlots as Jc, withAsyncContext as ep, mergeProps as it, createElementVNode as xe } from "vue";
|
|
9
9
|
import { useTres as tp, useLogger as np, useRenderLoop as Ta, useLoader as ho } from "@tresjs/core";
|
|
10
|
-
import { Object3D as On, Raycaster as ip, Vector3 as $, Quaternion as Te, Euler as pi, Matrix4 as Ee, Color as ke, MeshBasicMaterial as
|
|
10
|
+
import { Object3D as On, Raycaster as ip, Vector3 as $, Quaternion as Te, Euler as pi, Matrix4 as Ee, Color as ke, MeshBasicMaterial as Dn, DoubleSide as mo, LineBasicMaterial as fo, CylinderGeometry as _t, BoxGeometry as Sn, BufferGeometry as zt, Float32BufferAttribute as jt, Mesh as Z, Line as pe, OctahedronGeometry as An, PlaneGeometry as Rn, TorusGeometry as Ls, SphereGeometry as sp, EventDispatcher as rp, MOUSE as ai, TOUCH as li, PerspectiveCamera as sn, Spherical as sa, Vector2 as ut, OrthographicCamera as Ki, Loader as Us, LoaderUtils as kt, FileLoader as ui, SpotLight as ka, PointLight as io, DirectionalLight as Ma, sRGBEncoding as dt, MeshPhysicalMaterial as Nn, TangentSpaceNormalMap as op, TextureLoader as Sa, ImageBitmapLoader as ap, InterleavedBuffer as lp, InterleavedBufferAttribute as cp, BufferAttribute as Fs, LinearFilter as Bs, LinearMipmapLinearFilter as Aa, RepeatWrapping as qi, PointsMaterial as pp, Material as $r, MeshStandardMaterial as vo, PropertyBinding as Qi, SkinnedMesh as La, LineSegments as up, LineLoop as hp, Points as dp, Group as $i, MathUtils as yt, InterpolateLinear as Ra, AnimationClip as Ia, Bone as so, Skeleton as Va, TriangleFanDrawMode as Da, NearestFilter as mp, NearestMipmapNearestFilter as fp, LinearMipmapNearestFilter as vp, NearestMipmapLinearFilter as bp, ClampToEdgeWrapping as ro, MirroredRepeatWrapping as gp, InterpolateDiscrete as _p, FrontSide as wp, Texture as js, TriangleStripDrawMode as yp, VectorKeyframeTrack as Oa, QuaternionKeyframeTrack as oo, NumberKeyframeTrack as Na, Box3 as xp, Sphere as Ep, Interpolant as Cp, ExtrudeGeometry as Pp, Vector4 as Gs, Curve as Tp, MeshPhongMaterial as Xr, MeshLambertMaterial as kp, EquirectangularReflectionMapping as Fa, AmbientLight as Mp, Uint16BufferAttribute as Sp, Matrix3 as Ap, ShapePath as Lp, DataTextureLoader as Rp, HalfFloatType as Rs, FloatType as Yr, DataUtils as Is, LinearEncoding as Ba, AnimationMixer as Ip, QuadraticBezierCurve3 as Vp, CubeReflectionMapping as Dp, CubeTextureLoader as Op } from "three";
|
|
11
11
|
function Np(b, i) {
|
|
12
12
|
for (var r = 0; r < i.length; r++) {
|
|
13
13
|
const s = i[r];
|
|
@@ -466,7 +466,7 @@ class tu extends On {
|
|
|
466
466
|
}
|
|
467
467
|
super.updateMatrixWorld();
|
|
468
468
|
});
|
|
469
|
-
const i = new
|
|
469
|
+
const i = new Dn({
|
|
470
470
|
depthTest: !1,
|
|
471
471
|
depthWrite: !1,
|
|
472
472
|
transparent: !0,
|
|
@@ -514,7 +514,7 @@ class tu extends On {
|
|
|
514
514
|
V.color.set(7895160);
|
|
515
515
|
const D = F.clone();
|
|
516
516
|
D.opacity = 0.25;
|
|
517
|
-
const Y = new _t(0, 0.05, 0.2, 12, 1, !1), G = new
|
|
517
|
+
const Y = new _t(0, 0.05, 0.2, 12, 1, !1), G = new Sn(0.125, 0.125, 0.125), N = new zt();
|
|
518
518
|
N.setAttribute("position", new jt([0, 0, 0, 1, 0, 0], 3));
|
|
519
519
|
const O = (fe, ae) => {
|
|
520
520
|
const ne = new zt(), be = [];
|
|
@@ -528,29 +528,29 @@ class tu extends On {
|
|
|
528
528
|
X: [[new Z(Y, c), [1, 0, 0], [0, 0, -Math.PI / 2], null, "fwd"], [new Z(Y, c), [1, 0, 0], [0, 0, Math.PI / 2], null, "bwd"], [new pe(N, C)]],
|
|
529
529
|
Y: [[new Z(Y, u), [0, 1, 0], null, null, "fwd"], [new Z(Y, u), [0, 1, 0], [Math.PI, 0, 0], null, "bwd"], [new pe(N, I), null, [0, 0, Math.PI / 2]]],
|
|
530
530
|
Z: [[new Z(Y, h), [0, 0, 1], [Math.PI / 2, 0, 0], null, "fwd"], [new Z(Y, h), [0, 0, 1], [-Math.PI / 2, 0, 0], null, "bwd"], [new pe(N, S), null, [0, -Math.PI / 2, 0]]],
|
|
531
|
-
XYZ: [[new Z(new
|
|
532
|
-
XY: [[new Z(new
|
|
533
|
-
YZ: [[new Z(new
|
|
534
|
-
XZ: [[new Z(new
|
|
531
|
+
XYZ: [[new Z(new An(0.1, 0), d.clone()), [0, 0, 0], [0, 0, 0]]],
|
|
532
|
+
XY: [[new Z(new Rn(0.295, 0.295), g.clone()), [0.15, 0.15, 0]], [new pe(N, F), [0.18, 0.3, 0], null, [0.125, 1, 1]], [new pe(N, F), [0.3, 0.18, 0], [0, 0, Math.PI / 2], [0.125, 1, 1]]],
|
|
533
|
+
YZ: [[new Z(new Rn(0.295, 0.295), w.clone()), [0, 0.15, 0.15], [0, Math.PI / 2, 0]], [new pe(N, R), [0, 0.18, 0.3], [0, 0, Math.PI / 2], [0.125, 1, 1]], [new pe(N, R), [0, 0.3, 0.18], [0, -Math.PI / 2, 0], [0.125, 1, 1]]],
|
|
534
|
+
XZ: [[new Z(new Rn(0.295, 0.295), _.clone()), [0.15, 0, 0.15], [-Math.PI / 2, 0, 0]], [new pe(N, j), [0.18, 0, 0.3], null, [0.125, 1, 1]], [new pe(N, j), [0.3, 0, 0.18], [0, -Math.PI / 2, 0], [0.125, 1, 1]]]
|
|
535
535
|
}, q = {
|
|
536
536
|
X: [[new Z(new _t(0.2, 0, 1, 4, 1, !1), s), [0.6, 0, 0], [0, 0, -Math.PI / 2]]],
|
|
537
537
|
Y: [[new Z(new _t(0.2, 0, 1, 4, 1, !1), s), [0, 0.6, 0]]],
|
|
538
538
|
Z: [[new Z(new _t(0.2, 0, 1, 4, 1, !1), s), [0, 0, 0.6], [Math.PI / 2, 0, 0]]],
|
|
539
|
-
XYZ: [[new Z(new
|
|
540
|
-
XY: [[new Z(new
|
|
541
|
-
YZ: [[new Z(new
|
|
542
|
-
XZ: [[new Z(new
|
|
539
|
+
XYZ: [[new Z(new An(0.2, 0), s)]],
|
|
540
|
+
XY: [[new Z(new Rn(0.4, 0.4), s), [0.2, 0.2, 0]]],
|
|
541
|
+
YZ: [[new Z(new Rn(0.4, 0.4), s), [0, 0.2, 0.2], [0, Math.PI / 2, 0]]],
|
|
542
|
+
XZ: [[new Z(new Rn(0.4, 0.4), s), [0.2, 0, 0.2], [-Math.PI / 2, 0, 0]]]
|
|
543
543
|
}, ue = {
|
|
544
|
-
START: [[new Z(new
|
|
545
|
-
END: [[new Z(new
|
|
544
|
+
START: [[new Z(new An(0.01, 2), a), null, null, null, "helper"]],
|
|
545
|
+
END: [[new Z(new An(0.01, 2), a), null, null, null, "helper"]],
|
|
546
546
|
DELTA: [[new pe(H(), a), null, null, null, "helper"]],
|
|
547
547
|
X: [[new pe(N, a.clone()), [-1e3, 0, 0], null, [1e6, 1, 1], "helper"]],
|
|
548
548
|
Y: [[new pe(N, a.clone()), [0, -1e3, 0], [0, 0, Math.PI / 2], [1e6, 1, 1], "helper"]],
|
|
549
549
|
Z: [[new pe(N, a.clone()), [0, 0, -1e3], [0, -Math.PI / 2, 0], [1e6, 1, 1], "helper"]]
|
|
550
550
|
}, ge = {
|
|
551
|
-
X: [[new pe(O(1, 0.5), C)], [new Z(new
|
|
552
|
-
Y: [[new pe(O(1, 0.5), I), null, [0, 0, -Math.PI / 2]], [new Z(new
|
|
553
|
-
Z: [[new pe(O(1, 0.5), S), null, [0, Math.PI / 2, 0]], [new Z(new
|
|
551
|
+
X: [[new pe(O(1, 0.5), C)], [new Z(new An(0.04, 0), c), [0, 0, 0.99], null, [1, 3, 1]]],
|
|
552
|
+
Y: [[new pe(O(1, 0.5), I), null, [0, 0, -Math.PI / 2]], [new Z(new An(0.04, 0), u), [0, 0, 0.99], null, [3, 1, 1]]],
|
|
553
|
+
Z: [[new pe(O(1, 0.5), S), null, [0, Math.PI / 2, 0]], [new Z(new An(0.04, 0), h), [0.99, 0, 0], null, [1, 3, 1]]],
|
|
554
554
|
E: [[new pe(O(1.25, 1), D), null, [0, Math.PI / 2, 0]], [new Z(new _t(0.03, 0, 0.15, 4, 1, !1), D), [1.17, 0, 0], [0, 0, -Math.PI / 2], [1, 1, 1e-3]], [new Z(new _t(0.03, 0, 0.15, 4, 1, !1), D), [-1.17, 0, 0], [0, 0, Math.PI / 2], [1, 1, 1e-3]], [new Z(new _t(0.03, 0, 0.15, 4, 1, !1), D), [0, -1.17, 0], [Math.PI, 0, 0], [1, 1, 1e-3]], [new Z(new _t(0.03, 0, 0.15, 4, 1, !1), D), [0, 1.17, 0], [0, 0, 0], [1, 1, 1e-3]]],
|
|
555
555
|
XYZE: [[new pe(O(1, 1), V), null, [0, Math.PI / 2, 0]]]
|
|
556
556
|
}, ce = {
|
|
@@ -568,9 +568,9 @@ class tu extends On {
|
|
|
568
568
|
XY: [[new Z(G, g), [0.85, 0.85, 0], null, [2, 2, 0.2]], [new pe(N, F), [0.855, 0.98, 0], null, [0.125, 1, 1]], [new pe(N, F), [0.98, 0.855, 0], [0, 0, Math.PI / 2], [0.125, 1, 1]]],
|
|
569
569
|
YZ: [[new Z(G, w), [0, 0.85, 0.85], null, [0.2, 2, 2]], [new pe(N, R), [0, 0.855, 0.98], [0, 0, Math.PI / 2], [0.125, 1, 1]], [new pe(N, R), [0, 0.98, 0.855], [0, -Math.PI / 2, 0], [0.125, 1, 1]]],
|
|
570
570
|
XZ: [[new Z(G, _), [0.85, 0, 0.85], null, [2, 0.2, 2]], [new pe(N, j), [0.855, 0, 0.98], null, [0.125, 1, 1]], [new pe(N, j), [0.98, 0, 0.855], [0, -Math.PI / 2, 0], [0.125, 1, 1]]],
|
|
571
|
-
XYZX: [[new Z(new
|
|
572
|
-
XYZY: [[new Z(new
|
|
573
|
-
XYZZ: [[new Z(new
|
|
571
|
+
XYZX: [[new Z(new Sn(0.125, 0.125, 0.125), d.clone()), [1.1, 0, 0]]],
|
|
572
|
+
XYZY: [[new Z(new Sn(0.125, 0.125, 0.125), d.clone()), [0, 1.1, 0]]],
|
|
573
|
+
XYZZ: [[new Z(new Sn(0.125, 0.125, 0.125), d.clone()), [0, 0, 1.1]]]
|
|
574
574
|
}, ee = {
|
|
575
575
|
X: [[new Z(new _t(0.2, 0, 0.8, 4, 1, !1), s), [0.5, 0, 0], [0, 0, -Math.PI / 2]]],
|
|
576
576
|
Y: [[new Z(new _t(0.2, 0, 0.8, 4, 1, !1), s), [0, 0.5, 0]]],
|
|
@@ -578,9 +578,9 @@ class tu extends On {
|
|
|
578
578
|
XY: [[new Z(G, s), [0.85, 0.85, 0], null, [3, 3, 0.2]]],
|
|
579
579
|
YZ: [[new Z(G, s), [0, 0.85, 0.85], null, [0.2, 3, 3]]],
|
|
580
580
|
XZ: [[new Z(G, s), [0.85, 0, 0.85], null, [3, 0.2, 3]]],
|
|
581
|
-
XYZX: [[new Z(new
|
|
582
|
-
XYZY: [[new Z(new
|
|
583
|
-
XYZZ: [[new Z(new
|
|
581
|
+
XYZX: [[new Z(new Sn(0.2, 0.2, 0.2), s), [1.1, 0, 0]]],
|
|
582
|
+
XYZY: [[new Z(new Sn(0.2, 0.2, 0.2), s), [0, 1.1, 0]]],
|
|
583
|
+
XYZZ: [[new Z(new Sn(0.2, 0.2, 0.2), s), [0, 0, 1.1]]]
|
|
584
584
|
}, X = {
|
|
585
585
|
X: [[new pe(N, a.clone()), [-1e3, 0, 0], null, [1e6, 1, 1], "helper"]],
|
|
586
586
|
Y: [[new pe(N, a.clone()), [0, -1e3, 0], [0, 0, Math.PI / 2], [1e6, 1, 1], "helper"]],
|
|
@@ -602,7 +602,7 @@ class tu extends On {
|
|
|
602
602
|
}
|
|
603
603
|
class nu extends Z {
|
|
604
604
|
constructor() {
|
|
605
|
-
super(new
|
|
605
|
+
super(new Rn(1e5, 1e5, 2, 2), new Dn({
|
|
606
606
|
visible: !1,
|
|
607
607
|
wireframe: !0,
|
|
608
608
|
side: mo,
|
|
@@ -709,16 +709,16 @@ class iu extends rp {
|
|
|
709
709
|
}, this.update = (() => {
|
|
710
710
|
const A = new $(), U = new Te().setFromUnitVectors(i.up, new $(0, 1, 0)), W = U.clone().invert(), ie = new $(), ye = new Te(), De = 2 * Math.PI;
|
|
711
711
|
return function() {
|
|
712
|
-
const
|
|
713
|
-
A.copy(
|
|
712
|
+
const pn = s.object.position;
|
|
713
|
+
A.copy(pn).sub(s.target), A.applyQuaternion(U), w.setFromVector3(A), s.autoRotate && d === h.NONE && ue(K()), s.enableDamping ? (w.theta += _.theta * s.dampingFactor, w.phi += _.phi * s.dampingFactor) : (w.theta += _.theta, w.phi += _.phi);
|
|
714
714
|
let Ue = s.minAzimuthAngle, Ge = s.maxAzimuthAngle;
|
|
715
|
-
return isFinite(Ue) && isFinite(Ge) && (Ue < -Math.PI ? Ue += De : Ue > Math.PI && (Ue -= De), Ge < -Math.PI ? Ge += De : Ge > Math.PI && (Ge -= De), Ue <= Ge ? w.theta = Math.max(Ue, Math.min(Ge, w.theta)) : w.theta = w.theta > (Ue + Ge) / 2 ? Math.max(Ue, w.theta) : Math.min(Ge, w.theta)), w.phi = Math.max(s.minPolarAngle, Math.min(s.maxPolarAngle, w.phi)), w.makeSafe(), w.radius *= y, w.radius = Math.max(s.minDistance, Math.min(s.maxDistance, w.radius)), s.enableDamping === !0 ? s.target.addScaledVector(C, s.dampingFactor) : s.target.add(C), A.setFromSpherical(w), A.applyQuaternion(W),
|
|
715
|
+
return isFinite(Ue) && isFinite(Ge) && (Ue < -Math.PI ? Ue += De : Ue > Math.PI && (Ue -= De), Ge < -Math.PI ? Ge += De : Ge > Math.PI && (Ge -= De), Ue <= Ge ? w.theta = Math.max(Ue, Math.min(Ge, w.theta)) : w.theta = w.theta > (Ue + Ge) / 2 ? Math.max(Ue, w.theta) : Math.min(Ge, w.theta)), w.phi = Math.max(s.minPolarAngle, Math.min(s.maxPolarAngle, w.phi)), w.makeSafe(), w.radius *= y, w.radius = Math.max(s.minDistance, Math.min(s.maxDistance, w.radius)), s.enableDamping === !0 ? s.target.addScaledVector(C, s.dampingFactor) : s.target.add(C), A.setFromSpherical(w), A.applyQuaternion(W), pn.copy(s.target).add(A), s.object.lookAt(s.target), s.enableDamping === !0 ? (_.theta *= 1 - s.dampingFactor, _.phi *= 1 - s.dampingFactor, C.multiplyScalar(1 - s.dampingFactor)) : (_.set(0, 0, 0), C.set(0, 0, 0)), y = 1, I || ie.distanceToSquared(s.object.position) > g || 8 * (1 - ye.dot(s.object.quaternion)) > g ? (s.dispatchEvent(a), ie.copy(s.object.position), ye.copy(s.object.quaternion), I = !1, !0) : !1;
|
|
716
716
|
};
|
|
717
717
|
})(), this.connect = (A) => {
|
|
718
|
-
A === document && console.error('THREE.OrbitControls: "document" should not be used as the target "domElement". Please use "renderer.domElement" instead.'), s.domElement = A, s.domElement.style.touchAction = "none", s.domElement.addEventListener("contextmenu",
|
|
718
|
+
A === document && console.error('THREE.OrbitControls: "document" should not be used as the target "domElement". Please use "renderer.domElement" instead.'), s.domElement = A, s.domElement.style.touchAction = "none", s.domElement.addEventListener("contextmenu", cn), s.domElement.addEventListener("pointerdown", rt), s.domElement.addEventListener("pointercancel", zn), s.domElement.addEventListener("wheel", Gn);
|
|
719
719
|
}, this.dispose = () => {
|
|
720
720
|
var A, U, W, ie, ye, De;
|
|
721
|
-
(A = s.domElement) === null || A === void 0 || A.removeEventListener("contextmenu",
|
|
721
|
+
(A = s.domElement) === null || A === void 0 || A.removeEventListener("contextmenu", cn), (U = s.domElement) === null || U === void 0 || U.removeEventListener("pointerdown", rt), (W = s.domElement) === null || W === void 0 || W.removeEventListener("pointercancel", zn), (ie = s.domElement) === null || ie === void 0 || ie.removeEventListener("wheel", Gn), (ye = s.domElement) === null || ye === void 0 || ye.ownerDocument.removeEventListener("pointermove", ln), (De = s.domElement) === null || De === void 0 || De.ownerDocument.removeEventListener("pointerup", ft), s._domElementKeyEvents !== null && s._domElementKeyEvents.removeEventListener("keydown", xt);
|
|
722
722
|
};
|
|
723
723
|
const s = this, a = {
|
|
724
724
|
type: "change"
|
|
@@ -861,7 +861,7 @@ class iu extends rp {
|
|
|
861
861
|
const U = s.domElement;
|
|
862
862
|
U && (ue(2 * Math.PI * j.x / U.clientHeight), ge(2 * Math.PI * j.y / U.clientHeight)), S.copy(R);
|
|
863
863
|
}
|
|
864
|
-
function
|
|
864
|
+
function an(A) {
|
|
865
865
|
if (O.length == 1)
|
|
866
866
|
V.set(A.pageX, A.pageY);
|
|
867
867
|
else {
|
|
@@ -875,7 +875,7 @@ class iu extends rp {
|
|
|
875
875
|
G.set(0, ye), N.set(0, Math.pow(G.y / Y.y, s.zoomSpeed)), ee(N.y), Y.copy(G);
|
|
876
876
|
}
|
|
877
877
|
function Mt(A) {
|
|
878
|
-
s.enableZoom && mt(A), s.enablePan &&
|
|
878
|
+
s.enableZoom && mt(A), s.enablePan && an(A);
|
|
879
879
|
}
|
|
880
880
|
function ze(A) {
|
|
881
881
|
s.enableZoom && mt(A), s.enableRotate && jn(A);
|
|
@@ -884,18 +884,18 @@ class iu extends rp {
|
|
|
884
884
|
if (s.enabled !== !1) {
|
|
885
885
|
if (O.length === 0) {
|
|
886
886
|
var U, W;
|
|
887
|
-
(U = s.domElement) === null || U === void 0 || U.ownerDocument.addEventListener("pointermove",
|
|
887
|
+
(U = s.domElement) === null || U === void 0 || U.ownerDocument.addEventListener("pointermove", ln), (W = s.domElement) === null || W === void 0 || W.ownerDocument.addEventListener("pointerup", ft);
|
|
888
888
|
}
|
|
889
889
|
Kn(A), A.pointerType === "touch" ? St(A) : hi(A);
|
|
890
890
|
}
|
|
891
891
|
}
|
|
892
|
-
function
|
|
892
|
+
function ln(A) {
|
|
893
893
|
s.enabled !== !1 && (A.pointerType === "touch" ? Hn(A) : Un(A));
|
|
894
894
|
}
|
|
895
895
|
function ft(A) {
|
|
896
896
|
if (Et(A), O.length === 0) {
|
|
897
897
|
var U, W, ie;
|
|
898
|
-
(U = s.domElement) === null || U === void 0 || U.releasePointerCapture(A.pointerId), (W = s.domElement) === null || W === void 0 || W.ownerDocument.removeEventListener("pointermove",
|
|
898
|
+
(U = s.domElement) === null || U === void 0 || U.releasePointerCapture(A.pointerId), (W = s.domElement) === null || W === void 0 || W.ownerDocument.removeEventListener("pointermove", ln), (ie = s.domElement) === null || ie === void 0 || ie.ownerDocument.removeEventListener("pointerup", ft);
|
|
899
899
|
}
|
|
900
900
|
s.dispatchEvent(u), d = h.NONE;
|
|
901
901
|
}
|
|
@@ -1025,7 +1025,7 @@ class iu extends rp {
|
|
|
1025
1025
|
case h.TOUCH_PAN:
|
|
1026
1026
|
if (s.enablePan === !1)
|
|
1027
1027
|
return;
|
|
1028
|
-
|
|
1028
|
+
an(A), s.update();
|
|
1029
1029
|
break;
|
|
1030
1030
|
case h.TOUCH_DOLLY_PAN:
|
|
1031
1031
|
if (s.enableZoom === !1 && s.enablePan === !1)
|
|
@@ -1041,7 +1041,7 @@ class iu extends rp {
|
|
|
1041
1041
|
d = h.NONE;
|
|
1042
1042
|
}
|
|
1043
1043
|
}
|
|
1044
|
-
function
|
|
1044
|
+
function cn(A) {
|
|
1045
1045
|
s.enabled !== !1 && A.preventDefault();
|
|
1046
1046
|
}
|
|
1047
1047
|
function Kn(A) {
|
|
@@ -1282,7 +1282,7 @@ class au {
|
|
|
1282
1282
|
this.name = re.KHR_MATERIALS_UNLIT;
|
|
1283
1283
|
}
|
|
1284
1284
|
getMaterialType() {
|
|
1285
|
-
return
|
|
1285
|
+
return Dn;
|
|
1286
1286
|
}
|
|
1287
1287
|
extendParams(i, r, s) {
|
|
1288
1288
|
const a = [];
|
|
@@ -1789,7 +1789,7 @@ function Hi(b, i, r) {
|
|
|
1789
1789
|
for (const s in r.extensions)
|
|
1790
1790
|
b[s] === void 0 && (i.userData.gltfExtensions = i.userData.gltfExtensions || {}, i.userData.gltfExtensions[s] = r.extensions[s]);
|
|
1791
1791
|
}
|
|
1792
|
-
function
|
|
1792
|
+
function In(b, i) {
|
|
1793
1793
|
i.extras !== void 0 && (typeof i.extras == "object" ? Object.assign(b.userData, i.extras) : console.warn("THREE.GLTFLoader: Ignoring primitive type .extras, " + i.extras));
|
|
1794
1794
|
}
|
|
1795
1795
|
function Mu(b, i, r) {
|
|
@@ -1905,7 +1905,7 @@ class Ru {
|
|
|
1905
1905
|
parser: s,
|
|
1906
1906
|
userData: {}
|
|
1907
1907
|
};
|
|
1908
|
-
Hi(c, h, a),
|
|
1908
|
+
Hi(c, h, a), In(h, a), Promise.all(s._invokeAll(function(d) {
|
|
1909
1909
|
return d.afterRoot && d.afterRoot(h);
|
|
1910
1910
|
})).then(function() {
|
|
1911
1911
|
i(h);
|
|
@@ -2249,13 +2249,13 @@ class Ru {
|
|
|
2249
2249
|
}
|
|
2250
2250
|
c.doubleSided === !0 && (h.side = mo);
|
|
2251
2251
|
const w = c.alphaMode || Zr.OPAQUE;
|
|
2252
|
-
if (w === Zr.BLEND ? (h.transparent = !0, h.depthWrite = !1) : (h.transparent = !1, w === Zr.MASK && (h.alphaTest = c.alphaCutoff !== void 0 ? c.alphaCutoff : 0.5)), c.normalTexture !== void 0 && u !==
|
|
2252
|
+
if (w === Zr.BLEND ? (h.transparent = !0, h.depthWrite = !1) : (h.transparent = !1, w === Zr.MASK && (h.alphaTest = c.alphaCutoff !== void 0 ? c.alphaCutoff : 0.5)), c.normalTexture !== void 0 && u !== Dn && (g.push(r.assignTexture(h, "normalMap", c.normalTexture)), h.normalScale = new ut(1, 1), c.normalTexture.scale !== void 0)) {
|
|
2253
2253
|
const _ = c.normalTexture.scale;
|
|
2254
2254
|
h.normalScale.set(_, _);
|
|
2255
2255
|
}
|
|
2256
|
-
return c.occlusionTexture !== void 0 && u !==
|
|
2256
|
+
return c.occlusionTexture !== void 0 && u !== Dn && (g.push(r.assignTexture(h, "aoMap", c.occlusionTexture)), c.occlusionTexture.strength !== void 0 && (h.aoMapIntensity = c.occlusionTexture.strength)), c.emissiveFactor !== void 0 && u !== Dn && (h.emissive = new ke().fromArray(c.emissiveFactor)), c.emissiveTexture !== void 0 && u !== Dn && g.push(r.assignTexture(h, "emissiveMap", c.emissiveTexture, dt)), Promise.all(g).then(function() {
|
|
2257
2257
|
let _;
|
|
2258
|
-
return u === co ? _ = a[re.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS].createMaterial(h) : _ = new u(h), c.name && (_.name = c.name),
|
|
2258
|
+
return u === co ? _ = a[re.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS].createMaterial(h) : _ = new u(h), c.name && (_.name = c.name), In(_, c), r.associations.set(_, {
|
|
2259
2259
|
materials: i
|
|
2260
2260
|
}), c.extensions && Hi(a, _, c), _;
|
|
2261
2261
|
});
|
|
@@ -2327,7 +2327,7 @@ class Ru {
|
|
|
2327
2327
|
j = new dp(S, F);
|
|
2328
2328
|
else
|
|
2329
2329
|
throw new Error("THREE.GLTFLoader: Primitive mode unsupported: " + R.mode);
|
|
2330
|
-
Object.keys(j.geometry.morphAttributes).length > 0 && Su(j, c), j.name = r.createUniqueName(c.name || "mesh_" + i),
|
|
2330
|
+
Object.keys(j.geometry.morphAttributes).length > 0 && Su(j, c), j.name = r.createUniqueName(c.name || "mesh_" + i), In(j, c), R.extensions && Hi(a, j, R), r.assignFinalMaterial(j), _.push(j);
|
|
2331
2331
|
}
|
|
2332
2332
|
for (let C = 0, I = _.length; C < I; C++)
|
|
2333
2333
|
r.associations.set(_[C], {
|
|
@@ -2357,7 +2357,7 @@ class Ru {
|
|
|
2357
2357
|
console.warn("THREE.GLTFLoader: Missing camera parameters.");
|
|
2358
2358
|
return;
|
|
2359
2359
|
}
|
|
2360
|
-
return s.type === "perspective" ? r = new sn(yt.radToDeg(a.yfov), a.aspectRatio || 1, a.znear || 1, a.zfar || 2e6) : s.type === "orthographic" && (r = new Ki(-a.xmag, a.xmag, a.ymag, -a.ymag, a.znear, a.zfar)), s.name && (r.name = this.createUniqueName(s.name)),
|
|
2360
|
+
return s.type === "perspective" ? r = new sn(yt.radToDeg(a.yfov), a.aspectRatio || 1, a.znear || 1, a.zfar || 2e6) : s.type === "orthographic" && (r = new Ki(-a.xmag, a.xmag, a.ymag, -a.ymag, a.znear, a.zfar)), s.name && (r.name = this.createUniqueName(s.name)), In(r, s), Promise.resolve(r);
|
|
2361
2361
|
}
|
|
2362
2362
|
/**
|
|
2363
2363
|
* Specification: https://github.com/KhronosGroup/glTF/tree/master/specification/2.0#skins
|
|
@@ -2461,7 +2461,7 @@ class Ru {
|
|
|
2461
2461
|
if (c.isBone === !0 ? d = new so() : h.length > 1 ? d = new $i() : h.length === 1 ? d = h[0] : d = new On(), d !== h[0])
|
|
2462
2462
|
for (let g = 0, w = h.length; g < w; g++)
|
|
2463
2463
|
d.add(h[g]);
|
|
2464
|
-
if (c.name && (d.userData.name = c.name, d.name = u),
|
|
2464
|
+
if (c.name && (d.userData.name = c.name, d.name = u), In(d, c), c.extensions && Hi(s, d, c), c.matrix !== void 0) {
|
|
2465
2465
|
const g = new Ee();
|
|
2466
2466
|
g.fromArray(c.matrix), d.applyMatrix4(g);
|
|
2467
2467
|
} else
|
|
@@ -2476,7 +2476,7 @@ class Ru {
|
|
|
2476
2476
|
*/
|
|
2477
2477
|
loadScene(i) {
|
|
2478
2478
|
const r = this.json, s = this.extensions, a = this.json.scenes[i], c = this, u = new $i();
|
|
2479
|
-
a.name && (u.name = c.createUniqueName(a.name)),
|
|
2479
|
+
a.name && (u.name = c.createUniqueName(a.name)), In(u, a), a.extensions && Hi(s, u, a);
|
|
2480
2480
|
const h = a.nodes || [], d = [];
|
|
2481
2481
|
for (let g = 0, w = h.length; g < w; g++)
|
|
2482
2482
|
d.push(Ya(h[g], u, r, c));
|
|
@@ -2591,7 +2591,7 @@ function ua(b, i, r) {
|
|
|
2591
2591
|
});
|
|
2592
2592
|
a.push(u);
|
|
2593
2593
|
}
|
|
2594
|
-
return
|
|
2594
|
+
return In(b, i), Iu(b, i, r), Promise.all(a).then(function() {
|
|
2595
2595
|
return i.targets !== void 0 ? Mu(b, i.targets, r) : b;
|
|
2596
2596
|
});
|
|
2597
2597
|
}
|
|
@@ -4766,7 +4766,7 @@ const ah = ["args"], ud = /* @__PURE__ */ Ie({
|
|
|
4766
4766
|
enableDamping: { type: Boolean }
|
|
4767
4767
|
},
|
|
4768
4768
|
setup(b) {
|
|
4769
|
-
const i = b, { state: r, setState: s, extend: a } = Fn(), c =
|
|
4769
|
+
const i = b, { state: r, setState: s, extend: a } = Fn(), c = on(null);
|
|
4770
4770
|
return a({ OrbitControls: iu }), Ns(c, (u) => {
|
|
4771
4771
|
u && i.makeDefault ? s("controls", u) : s("controls", null);
|
|
4772
4772
|
}), (u, h) => {
|
|
@@ -4881,7 +4881,7 @@ function fh(b) {
|
|
|
4881
4881
|
return (i = r == null ? void 0 : r.$el) != null ? i : r;
|
|
4882
4882
|
}
|
|
4883
4883
|
const go = tl ? window : void 0;
|
|
4884
|
-
function
|
|
4884
|
+
function Vn(...b) {
|
|
4885
4885
|
let i, r, s, a;
|
|
4886
4886
|
if (ph(b[0]) || Array.isArray(b[0]) ? ([r, s, a] = b, i = go) : [i, r, s, a] = b, !i)
|
|
4887
4887
|
return uh;
|
|
@@ -4905,7 +4905,7 @@ function vh(b = {}) {
|
|
|
4905
4905
|
initialValue: a = { x: 0, y: 0 },
|
|
4906
4906
|
window: c = go,
|
|
4907
4907
|
eventFilter: u
|
|
4908
|
-
} = b, h =
|
|
4908
|
+
} = b, h = on(a.x), d = on(a.y), g = on(null), w = (S) => {
|
|
4909
4909
|
i === "page" ? (h.value = S.pageX, d.value = S.pageY) : i === "client" ? (h.value = S.clientX, d.value = S.clientY) : i === "movement" && (h.value = S.movementX, d.value = S.movementY), g.value = "mouse";
|
|
4910
4910
|
}, _ = () => {
|
|
4911
4911
|
h.value = a.x, d.value = a.y;
|
|
@@ -4915,7 +4915,7 @@ function vh(b = {}) {
|
|
|
4915
4915
|
i === "page" ? (h.value = R.pageX, d.value = R.pageY) : i === "client" && (h.value = R.clientX, d.value = R.clientY), g.value = "touch";
|
|
4916
4916
|
}
|
|
4917
4917
|
}, C = (S) => u === void 0 ? w(S) : u(() => w(S), {}), I = (S) => u === void 0 ? y(S) : u(() => y(S), {});
|
|
4918
|
-
return c && (
|
|
4918
|
+
return c && (Vn(c, "mousemove", C, { passive: !0 }), Vn(c, "dragover", C, { passive: !0 }), r && i !== "movement" && (Vn(c, "touchstart", I, { passive: !0 }), Vn(c, "touchmove", I, { passive: !0 }), s && Vn(c, "touchend", _, { passive: !0 }))), {
|
|
4919
4919
|
x: h,
|
|
4920
4920
|
y: d,
|
|
4921
4921
|
sourceType: g
|
|
@@ -4969,10 +4969,10 @@ function xh(b = {}) {
|
|
|
4969
4969
|
initialHeight: s = 1 / 0,
|
|
4970
4970
|
listenOrientation: a = !0,
|
|
4971
4971
|
includeScrollbar: c = !0
|
|
4972
|
-
} = b, u =
|
|
4972
|
+
} = b, u = on(r), h = on(s), d = () => {
|
|
4973
4973
|
i && (c ? (u.value = i.innerWidth, h.value = i.innerHeight) : (u.value = i.document.documentElement.clientWidth, h.value = i.document.documentElement.clientHeight));
|
|
4974
4974
|
};
|
|
4975
|
-
return d(), mh(d),
|
|
4975
|
+
return d(), mh(d), Vn("resize", d, { passive: !0 }), a && Vn("orientationchange", d, { passive: !0 }), { width: u, height: h };
|
|
4976
4976
|
}
|
|
4977
4977
|
function Eh(b = !1, i = 5, r) {
|
|
4978
4978
|
const { x: s, y: a } = vh(), { logWarning: c } = np(), { width: u, height: h } = xh(), d = Yi(() => (s.value / u.value - 0.5) * i), g = Yi(() => -(a.value / h.value - 0.5) * i);
|
|
@@ -5513,7 +5513,7 @@ var zs = {}, Ch = {
|
|
|
5513
5513
|
function jn() {
|
|
5514
5514
|
return ["veryfirst", "first", "last", "verylast"];
|
|
5515
5515
|
}
|
|
5516
|
-
const
|
|
5516
|
+
const an = D(""), mt = {
|
|
5517
5517
|
veryfirst: "vfst",
|
|
5518
5518
|
first: "fst",
|
|
5519
5519
|
last: "lst",
|
|
@@ -5525,9 +5525,9 @@ var zs = {}, Ch = {
|
|
|
5525
5525
|
const t = this.view.element;
|
|
5526
5526
|
this.blade.value("positions").emitter.on("change", () => {
|
|
5527
5527
|
jn().forEach((l) => {
|
|
5528
|
-
t.classList.remove(
|
|
5528
|
+
t.classList.remove(an(void 0, mt[l]));
|
|
5529
5529
|
}), this.blade.get("positions").forEach((l) => {
|
|
5530
|
-
t.classList.add(
|
|
5530
|
+
t.classList.add(an(void 0, mt[l]));
|
|
5531
5531
|
});
|
|
5532
5532
|
}), this.viewProps.handleDispose(() => {
|
|
5533
5533
|
Ne(t);
|
|
@@ -5552,7 +5552,7 @@ var zs = {}, Ch = {
|
|
|
5552
5552
|
function rt(n) {
|
|
5553
5553
|
n.offsetHeight;
|
|
5554
5554
|
}
|
|
5555
|
-
function
|
|
5555
|
+
function ln(n, e) {
|
|
5556
5556
|
const t = n.style.transition;
|
|
5557
5557
|
n.style.transition = "none", e(), n.style.transition = t;
|
|
5558
5558
|
}
|
|
@@ -5586,7 +5586,7 @@ var zs = {}, Ch = {
|
|
|
5586
5586
|
function Hn(n) {
|
|
5587
5587
|
n.parentElement && n.parentElement.removeChild(n);
|
|
5588
5588
|
}
|
|
5589
|
-
function
|
|
5589
|
+
function cn(n) {
|
|
5590
5590
|
for (; n.children.length > 0; )
|
|
5591
5591
|
n.removeChild(n.children[0]);
|
|
5592
5592
|
}
|
|
@@ -5702,11 +5702,11 @@ var zs = {}, Ch = {
|
|
|
5702
5702
|
}
|
|
5703
5703
|
function Ut(n, e) {
|
|
5704
5704
|
let t = 0;
|
|
5705
|
-
return
|
|
5705
|
+
return ln(e, () => {
|
|
5706
5706
|
n.set("expandedHeight", null), n.set("temporaryExpanded", !0), rt(e), t = e.clientHeight, n.set("temporaryExpanded", null), rt(e);
|
|
5707
5707
|
}), t;
|
|
5708
5708
|
}
|
|
5709
|
-
function
|
|
5709
|
+
function pn(n, e) {
|
|
5710
5710
|
e.style.height = n.styleHeight;
|
|
5711
5711
|
}
|
|
5712
5712
|
function Ue(n, e) {
|
|
@@ -5717,8 +5717,8 @@ var zs = {}, Ch = {
|
|
|
5717
5717
|
}
|
|
5718
5718
|
n.set("shouldFixHeight", !0), rt(e);
|
|
5719
5719
|
}), n.emitter.on("change", () => {
|
|
5720
|
-
|
|
5721
|
-
}),
|
|
5720
|
+
pn(n, e);
|
|
5721
|
+
}), pn(n, e), e.addEventListener("transitionend", (t) => {
|
|
5722
5722
|
t.propertyName === "height" && n.cleanUpTransition();
|
|
5723
5723
|
});
|
|
5724
5724
|
}
|
|
@@ -5871,7 +5871,7 @@ var zs = {}, Ch = {
|
|
|
5871
5871
|
function ts(n) {
|
|
5872
5872
|
return n instanceof $n ? n.apiSet_ : n instanceof Ge ? n.rackApi_.apiSet_ : null;
|
|
5873
5873
|
}
|
|
5874
|
-
function
|
|
5874
|
+
function un(n, e) {
|
|
5875
5875
|
const t = n.find((l) => l.controller_ === e);
|
|
5876
5876
|
if (!t)
|
|
5877
5877
|
throw S.shouldNeverHappen();
|
|
@@ -5891,7 +5891,7 @@ var zs = {}, Ch = {
|
|
|
5891
5891
|
});
|
|
5892
5892
|
}
|
|
5893
5893
|
get children() {
|
|
5894
|
-
return this.controller_.rack.children.map((e) =>
|
|
5894
|
+
return this.controller_.rack.children.map((e) => un(this.apiSet_, e));
|
|
5895
5895
|
}
|
|
5896
5896
|
addInput(e, t, l) {
|
|
5897
5897
|
const v = l ?? {}, E = this.controller_.view.element.ownerDocument, k = this.pool_.createInput(E, ns(e, t, v.presetKey), v), B = new mi(k);
|
|
@@ -5939,19 +5939,19 @@ var zs = {}, Ch = {
|
|
|
5939
5939
|
}
|
|
5940
5940
|
onRackRemove_(e) {
|
|
5941
5941
|
if (e.isRoot) {
|
|
5942
|
-
const t =
|
|
5942
|
+
const t = un(this.apiSet_, e.bladeController);
|
|
5943
5943
|
this.apiSet_.remove(t);
|
|
5944
5944
|
}
|
|
5945
5945
|
}
|
|
5946
5946
|
onRackInputChange_(e) {
|
|
5947
5947
|
const t = e.bladeController;
|
|
5948
5948
|
if (t instanceof Fe) {
|
|
5949
|
-
const l =
|
|
5949
|
+
const l = un(this.apiSet_, t), v = t.binding;
|
|
5950
5950
|
this.emitter_.emit("change", {
|
|
5951
5951
|
event: new u(l, v.target.read(), v.target.presetKey, e.options.last)
|
|
5952
5952
|
});
|
|
5953
5953
|
} else if (t instanceof ie) {
|
|
5954
|
-
const l =
|
|
5954
|
+
const l = un(this.apiSet_, t);
|
|
5955
5955
|
this.emitter_.emit("change", {
|
|
5956
5956
|
event: new u(l, t.value.rawValue, void 0, e.options.last)
|
|
5957
5957
|
});
|
|
@@ -5960,7 +5960,7 @@ var zs = {}, Ch = {
|
|
|
5960
5960
|
onRackMonitorUpdate_(e) {
|
|
5961
5961
|
if (!(e.bladeController instanceof ot))
|
|
5962
5962
|
throw S.shouldNeverHappen();
|
|
5963
|
-
const t =
|
|
5963
|
+
const t = un(this.apiSet_, e.bladeController), l = e.bladeController.binding;
|
|
5964
5964
|
this.emitter_.emit("update", {
|
|
5965
5965
|
event: new h(t, l.target.read(), l.target.presetKey)
|
|
5966
5966
|
});
|
|
@@ -6071,7 +6071,7 @@ var zs = {}, Ch = {
|
|
|
6071
6071
|
return null;
|
|
6072
6072
|
}
|
|
6073
6073
|
function gi(n) {
|
|
6074
|
-
return n instanceof
|
|
6074
|
+
return n instanceof hn ? n.rack : n instanceof bi ? n.rackController.rack : null;
|
|
6075
6075
|
}
|
|
6076
6076
|
function Zs(n) {
|
|
6077
6077
|
const e = gi(n);
|
|
@@ -6225,7 +6225,7 @@ var zs = {}, Ch = {
|
|
|
6225
6225
|
this.updatePositions_();
|
|
6226
6226
|
}
|
|
6227
6227
|
}
|
|
6228
|
-
class
|
|
6228
|
+
class hn extends Mt {
|
|
6229
6229
|
constructor(e, t) {
|
|
6230
6230
|
super(Object.assign(Object.assign({}, t), { view: new Xs(e, {
|
|
6231
6231
|
viewName: "brk",
|
|
@@ -6269,7 +6269,7 @@ var zs = {}, Ch = {
|
|
|
6269
6269
|
class Xn extends bi {
|
|
6270
6270
|
constructor(e, t) {
|
|
6271
6271
|
var l;
|
|
6272
|
-
const v = De.create((l = t.expanded) !== null && l !== void 0 ? l : !0), E = new
|
|
6272
|
+
const v = De.create((l = t.expanded) !== null && l !== void 0 ? l : !0), E = new hn(e, {
|
|
6273
6273
|
blade: t.blade,
|
|
6274
6274
|
root: t.root,
|
|
6275
6275
|
viewProps: t.viewProps
|
|
@@ -6337,7 +6337,7 @@ var zs = {}, Ch = {
|
|
|
6337
6337
|
l.classList.add(_i("r")), this.element.appendChild(l);
|
|
6338
6338
|
}
|
|
6339
6339
|
}
|
|
6340
|
-
class
|
|
6340
|
+
class dn extends Mt {
|
|
6341
6341
|
constructor(e, t) {
|
|
6342
6342
|
super(Object.assign(Object.assign({}, t), { view: new tr(e, {
|
|
6343
6343
|
viewProps: t.viewProps
|
|
@@ -6354,13 +6354,13 @@ var zs = {}, Ch = {
|
|
|
6354
6354
|
return t ? { params: t } : null;
|
|
6355
6355
|
},
|
|
6356
6356
|
controller(n) {
|
|
6357
|
-
return new
|
|
6357
|
+
return new dn(n.document, {
|
|
6358
6358
|
blade: n.blade,
|
|
6359
6359
|
viewProps: n.viewProps
|
|
6360
6360
|
});
|
|
6361
6361
|
},
|
|
6362
6362
|
api(n) {
|
|
6363
|
-
return n.controller instanceof
|
|
6363
|
+
return n.controller instanceof dn ? new ss(n.controller) : null;
|
|
6364
6364
|
}
|
|
6365
6365
|
}, Le = D("tbi");
|
|
6366
6366
|
class ir {
|
|
@@ -6392,7 +6392,7 @@ var zs = {}, Ch = {
|
|
|
6392
6392
|
this.onItemClick_ = this.onItemClick_.bind(this), this.ic_ = new Yn(e, {
|
|
6393
6393
|
props: t.itemProps,
|
|
6394
6394
|
viewProps: Xe.create()
|
|
6395
|
-
}), this.ic_.emitter.on("click", this.onItemClick_), this.cc_ = new
|
|
6395
|
+
}), this.ic_.emitter.on("click", this.onItemClick_), this.cc_ = new hn(e, {
|
|
6396
6396
|
blade: ye(),
|
|
6397
6397
|
viewProps: Xe.create()
|
|
6398
6398
|
}), this.props = t.props, O(this.props, "selected", (l) => {
|
|
@@ -6572,9 +6572,9 @@ var zs = {}, Ch = {
|
|
|
6572
6572
|
E.classList.add(Ht("c")), this.element.appendChild(E), this.contentsElement = E;
|
|
6573
6573
|
}
|
|
6574
6574
|
}
|
|
6575
|
-
class
|
|
6575
|
+
class mn extends bi {
|
|
6576
6576
|
constructor(e, t) {
|
|
6577
|
-
const l = new
|
|
6577
|
+
const l = new hn(e, {
|
|
6578
6578
|
blade: t.blade,
|
|
6579
6579
|
viewProps: t.viewProps
|
|
6580
6580
|
}), v = new sr();
|
|
@@ -6617,7 +6617,7 @@ var zs = {}, Ch = {
|
|
|
6617
6617
|
return !t || t.pages.length === 0 ? null : { params: t };
|
|
6618
6618
|
},
|
|
6619
6619
|
controller(n) {
|
|
6620
|
-
const e = new
|
|
6620
|
+
const e = new mn(n.document, {
|
|
6621
6621
|
blade: n.blade,
|
|
6622
6622
|
viewProps: n.viewProps
|
|
6623
6623
|
});
|
|
@@ -6635,7 +6635,7 @@ var zs = {}, Ch = {
|
|
|
6635
6635
|
}), e;
|
|
6636
6636
|
},
|
|
6637
6637
|
api(n) {
|
|
6638
|
-
return n.controller instanceof
|
|
6638
|
+
return n.controller instanceof mn ? new os(n.controller, n.pool) : null;
|
|
6639
6639
|
}
|
|
6640
6640
|
};
|
|
6641
6641
|
function rr(n, e) {
|
|
@@ -6752,7 +6752,7 @@ var zs = {}, Ch = {
|
|
|
6752
6752
|
this.read();
|
|
6753
6753
|
}
|
|
6754
6754
|
}
|
|
6755
|
-
class
|
|
6755
|
+
class fn {
|
|
6756
6756
|
constructor(e) {
|
|
6757
6757
|
this.constraints = e;
|
|
6758
6758
|
}
|
|
@@ -6763,7 +6763,7 @@ var zs = {}, Ch = {
|
|
|
6763
6763
|
function tt(n, e) {
|
|
6764
6764
|
if (n instanceof e)
|
|
6765
6765
|
return n;
|
|
6766
|
-
if (n instanceof
|
|
6766
|
+
if (n instanceof fn) {
|
|
6767
6767
|
const t = n.constraints.reduce((l, v) => l || (v instanceof e ? v : null), null);
|
|
6768
6768
|
if (t)
|
|
6769
6769
|
return t;
|
|
@@ -6782,7 +6782,7 @@ var zs = {}, Ch = {
|
|
|
6782
6782
|
return Math.min(Math.max(e, l), t);
|
|
6783
6783
|
}
|
|
6784
6784
|
}
|
|
6785
|
-
class
|
|
6785
|
+
class vn {
|
|
6786
6786
|
constructor(e) {
|
|
6787
6787
|
this.values = X.fromObject({
|
|
6788
6788
|
options: e
|
|
@@ -6830,7 +6830,7 @@ var zs = {}, Ch = {
|
|
|
6830
6830
|
this.onValueChange_ = this.onValueChange_.bind(this), this.props_ = t.props, this.element = e.createElement("div"), this.element.classList.add(Yt()), t.viewProps.bindClassModifiers(this.element);
|
|
6831
6831
|
const l = e.createElement("select");
|
|
6832
6832
|
l.classList.add(Yt("s")), O(this.props_, "options", (E) => {
|
|
6833
|
-
|
|
6833
|
+
cn(l), E.forEach((k, B) => {
|
|
6834
6834
|
const Q = e.createElement("option");
|
|
6835
6835
|
Q.dataset.index = String(B), Q.textContent = k.text, Q.value = String(k.value), l.appendChild(Q);
|
|
6836
6836
|
});
|
|
@@ -6845,7 +6845,7 @@ var zs = {}, Ch = {
|
|
|
6845
6845
|
this.update_();
|
|
6846
6846
|
}
|
|
6847
6847
|
}
|
|
6848
|
-
class
|
|
6848
|
+
class bn {
|
|
6849
6849
|
constructor(e, t) {
|
|
6850
6850
|
this.onSelectChange_ = this.onSelectChange_.bind(this), this.props = t.props, this.value = t.value, this.viewProps = t.viewProps, this.view = new ps(e, {
|
|
6851
6851
|
props: this.props,
|
|
@@ -6995,19 +6995,19 @@ var zs = {}, Ch = {
|
|
|
6995
6995
|
const t = n.substr(e, 1);
|
|
6996
6996
|
return t.match(/^[1-9]$/) ? t : "";
|
|
6997
6997
|
}
|
|
6998
|
-
function
|
|
6998
|
+
function gn(n, e) {
|
|
6999
6999
|
var t;
|
|
7000
7000
|
const l = n.substr(e).match(/^[0-9]+/);
|
|
7001
7001
|
return (t = l && l[0]) !== null && t !== void 0 ? t : "";
|
|
7002
7002
|
}
|
|
7003
7003
|
function fr(n, e) {
|
|
7004
|
-
const t =
|
|
7004
|
+
const t = gn(n, e);
|
|
7005
7005
|
if (t !== "")
|
|
7006
7006
|
return t;
|
|
7007
7007
|
const l = n.substr(e, 1);
|
|
7008
7008
|
if (e += 1, l !== "-" && l !== "+")
|
|
7009
7009
|
return "";
|
|
7010
|
-
const v =
|
|
7010
|
+
const v = gn(n, e);
|
|
7011
7011
|
return v === "" ? "" : l + v;
|
|
7012
7012
|
}
|
|
7013
7013
|
function at(n, e) {
|
|
@@ -7022,7 +7022,7 @@ var zs = {}, Ch = {
|
|
|
7022
7022
|
if (t === "0")
|
|
7023
7023
|
return t;
|
|
7024
7024
|
const l = mr(n, e);
|
|
7025
|
-
return e += l.length, l === "" ? "" : l +
|
|
7025
|
+
return e += l.length, l === "" ? "" : l + gn(n, e);
|
|
7026
7026
|
}
|
|
7027
7027
|
function vr(n, e) {
|
|
7028
7028
|
const t = bs(n, e);
|
|
@@ -7031,14 +7031,14 @@ var zs = {}, Ch = {
|
|
|
7031
7031
|
const l = n.substr(e, 1);
|
|
7032
7032
|
if (e += l.length, l !== ".")
|
|
7033
7033
|
return "";
|
|
7034
|
-
const v =
|
|
7034
|
+
const v = gn(n, e);
|
|
7035
7035
|
return e += v.length, t + l + v + at(n, e);
|
|
7036
7036
|
}
|
|
7037
7037
|
function gs(n, e) {
|
|
7038
7038
|
const t = n.substr(e, 1);
|
|
7039
7039
|
if (e += t.length, t !== ".")
|
|
7040
7040
|
return "";
|
|
7041
|
-
const l =
|
|
7041
|
+
const l = gn(n, e);
|
|
7042
7042
|
return e += l.length, l === "" ? "" : t + l + at(n, e);
|
|
7043
7043
|
}
|
|
7044
7044
|
function br(n, e) {
|
|
@@ -7201,7 +7201,7 @@ var zs = {}, Ch = {
|
|
|
7201
7201
|
return (e) => e.toFixed(Math.max(Math.min(n, 20), 0));
|
|
7202
7202
|
}
|
|
7203
7203
|
const Es = Re(0);
|
|
7204
|
-
function
|
|
7204
|
+
function _n(n) {
|
|
7205
7205
|
return Es(n) + "%";
|
|
7206
7206
|
}
|
|
7207
7207
|
function Si(n) {
|
|
@@ -7236,7 +7236,7 @@ var zs = {}, Ch = {
|
|
|
7236
7236
|
const t = n * (e.altKey ? 0.1 : 1) * (e.shiftKey ? 10 : 1);
|
|
7237
7237
|
return e.upKey ? +t : e.downKey ? -t : 0;
|
|
7238
7238
|
}
|
|
7239
|
-
function
|
|
7239
|
+
function wn(n) {
|
|
7240
7240
|
return {
|
|
7241
7241
|
altKey: n.altKey,
|
|
7242
7242
|
downKey: n.key === "ArrowDown",
|
|
@@ -7403,7 +7403,7 @@ var zs = {}, Ch = {
|
|
|
7403
7403
|
this.refresh();
|
|
7404
7404
|
}
|
|
7405
7405
|
}
|
|
7406
|
-
class
|
|
7406
|
+
class yn {
|
|
7407
7407
|
constructor(e, t) {
|
|
7408
7408
|
var l;
|
|
7409
7409
|
this.originRawValue_ = 0, this.onInputChange_ = this.onInputChange_.bind(this), this.onInputKeyDown_ = this.onInputKeyDown_.bind(this), this.onInputKeyUp_ = this.onInputKeyUp_.bind(this), this.onPointerDown_ = this.onPointerDown_.bind(this), this.onPointerMove_ = this.onPointerMove_.bind(this), this.onPointerUp_ = this.onPointerUp_.bind(this), this.baseStep_ = t.baseStep, this.parser_ = t.parser, this.props = t.props, this.sliderProps_ = (l = t.sliderProps) !== null && l !== void 0 ? l : null, this.value = t.value, this.viewProps = t.viewProps, this.dragging_ = ee(null), this.view = new Ri(e, {
|
|
@@ -7427,14 +7427,14 @@ var zs = {}, Ch = {
|
|
|
7427
7427
|
_(v) || (this.value.rawValue = this.constrainValue_(v)), this.view.refresh();
|
|
7428
7428
|
}
|
|
7429
7429
|
onInputKeyDown_(e) {
|
|
7430
|
-
const t = Oe(this.baseStep_,
|
|
7430
|
+
const t = Oe(this.baseStep_, wn(e));
|
|
7431
7431
|
t !== 0 && this.value.setRawValue(this.constrainValue_(this.value.rawValue + t), {
|
|
7432
7432
|
forceEmit: !1,
|
|
7433
7433
|
last: !1
|
|
7434
7434
|
});
|
|
7435
7435
|
}
|
|
7436
7436
|
onInputKeyUp_(e) {
|
|
7437
|
-
Oe(this.baseStep_,
|
|
7437
|
+
Oe(this.baseStep_, wn(e)) !== 0 && this.value.setRawValue(this.value.rawValue, {
|
|
7438
7438
|
forceEmit: !0,
|
|
7439
7439
|
last: !0
|
|
7440
7440
|
});
|
|
@@ -7517,14 +7517,14 @@ var zs = {}, Ch = {
|
|
|
7517
7517
|
});
|
|
7518
7518
|
}
|
|
7519
7519
|
}
|
|
7520
|
-
const
|
|
7520
|
+
const xn = D("sldtxt");
|
|
7521
7521
|
class Di {
|
|
7522
7522
|
constructor(e, t) {
|
|
7523
|
-
this.element = e.createElement("div"), this.element.classList.add(
|
|
7523
|
+
this.element = e.createElement("div"), this.element.classList.add(xn());
|
|
7524
7524
|
const l = e.createElement("div");
|
|
7525
|
-
l.classList.add(
|
|
7525
|
+
l.classList.add(xn("s")), this.sliderView_ = t.sliderView, l.appendChild(this.sliderView_.element), this.element.appendChild(l);
|
|
7526
7526
|
const v = e.createElement("div");
|
|
7527
|
-
v.classList.add(
|
|
7527
|
+
v.classList.add(xn("t")), this.textView_ = t.textView, v.appendChild(this.textView_.element), this.element.appendChild(v);
|
|
7528
7528
|
}
|
|
7529
7529
|
}
|
|
7530
7530
|
class ei {
|
|
@@ -7534,7 +7534,7 @@ var zs = {}, Ch = {
|
|
|
7534
7534
|
props: t.sliderProps,
|
|
7535
7535
|
value: t.value,
|
|
7536
7536
|
viewProps: this.viewProps
|
|
7537
|
-
}), this.textC_ = new
|
|
7537
|
+
}), this.textC_ = new yn(e, {
|
|
7538
7538
|
baseStep: t.baseStep,
|
|
7539
7539
|
parser: t.parser,
|
|
7540
7540
|
props: t.textProps,
|
|
@@ -7556,7 +7556,7 @@ var zs = {}, Ch = {
|
|
|
7556
7556
|
function nt(n, e) {
|
|
7557
7557
|
n.write(e);
|
|
7558
7558
|
}
|
|
7559
|
-
function
|
|
7559
|
+
function En(n) {
|
|
7560
7560
|
const e = M;
|
|
7561
7561
|
if (Array.isArray(n))
|
|
7562
7562
|
return e.required.array(e.required.object({
|
|
@@ -7587,7 +7587,7 @@ var zs = {}, Ch = {
|
|
|
7587
7587
|
}), e;
|
|
7588
7588
|
}
|
|
7589
7589
|
function Ni(n) {
|
|
7590
|
-
return _(n) ? null : new
|
|
7590
|
+
return _(n) ? null : new vn(Ps(n));
|
|
7591
7591
|
}
|
|
7592
7592
|
function Pr(n) {
|
|
7593
7593
|
const e = n ? tt(n, Qn) : null;
|
|
@@ -7606,16 +7606,16 @@ var zs = {}, Ch = {
|
|
|
7606
7606
|
const l = n && tt(n, Qn), v = Math.abs((t = l == null ? void 0 : l.step) !== null && t !== void 0 ? t : e);
|
|
7607
7607
|
return v === 0 ? 0.1 : Math.pow(10, Math.floor(Math.log10(v)) - 1);
|
|
7608
7608
|
}
|
|
7609
|
-
const
|
|
7610
|
-
class
|
|
7609
|
+
const Cn = D("ckb");
|
|
7610
|
+
class Pn {
|
|
7611
7611
|
constructor(e, t) {
|
|
7612
|
-
this.onValueChange_ = this.onValueChange_.bind(this), this.element = e.createElement("div"), this.element.classList.add(
|
|
7612
|
+
this.onValueChange_ = this.onValueChange_.bind(this), this.element = e.createElement("div"), this.element.classList.add(Cn()), t.viewProps.bindClassModifiers(this.element);
|
|
7613
7613
|
const l = e.createElement("label");
|
|
7614
|
-
l.classList.add(
|
|
7614
|
+
l.classList.add(Cn("l")), this.element.appendChild(l);
|
|
7615
7615
|
const v = e.createElement("input");
|
|
7616
|
-
v.classList.add(
|
|
7616
|
+
v.classList.add(Cn("i")), v.type = "checkbox", l.appendChild(v), this.inputElement = v, t.viewProps.bindDisabled(this.inputElement);
|
|
7617
7617
|
const E = e.createElement("div");
|
|
7618
|
-
E.classList.add(
|
|
7618
|
+
E.classList.add(Cn("w")), l.appendChild(E);
|
|
7619
7619
|
const k = xt(e, "check");
|
|
7620
7620
|
E.appendChild(k), t.value.emitter.on("change", this.onValueChange_), this.value = t.value, this.update_();
|
|
7621
7621
|
}
|
|
@@ -7628,7 +7628,7 @@ var zs = {}, Ch = {
|
|
|
7628
7628
|
}
|
|
7629
7629
|
class Ts {
|
|
7630
7630
|
constructor(e, t) {
|
|
7631
|
-
this.onInputChange_ = this.onInputChange_.bind(this), this.value = t.value, this.viewProps = t.viewProps, this.view = new
|
|
7631
|
+
this.onInputChange_ = this.onInputChange_.bind(this), this.value = t.value, this.viewProps = t.viewProps, this.view = new Pn(e, {
|
|
7632
7632
|
value: this.value,
|
|
7633
7633
|
viewProps: this.viewProps
|
|
7634
7634
|
}), this.view.inputElement.addEventListener("change", this.onInputChange_);
|
|
@@ -7640,7 +7640,7 @@ var zs = {}, Ch = {
|
|
|
7640
7640
|
}
|
|
7641
7641
|
function ks(n) {
|
|
7642
7642
|
const e = [], t = Ni(n.options);
|
|
7643
|
-
return t && e.push(t), new
|
|
7643
|
+
return t && e.push(t), new fn(e);
|
|
7644
7644
|
}
|
|
7645
7645
|
const ni = {
|
|
7646
7646
|
id: "input-bool",
|
|
@@ -7649,7 +7649,7 @@ var zs = {}, Ch = {
|
|
|
7649
7649
|
if (typeof n != "boolean")
|
|
7650
7650
|
return null;
|
|
7651
7651
|
const l = le(e, {
|
|
7652
|
-
options: M.optional.custom(
|
|
7652
|
+
options: M.optional.custom(En)
|
|
7653
7653
|
});
|
|
7654
7654
|
return l ? {
|
|
7655
7655
|
initialValue: n,
|
|
@@ -7662,8 +7662,8 @@ var zs = {}, Ch = {
|
|
|
7662
7662
|
writer: (n) => nt
|
|
7663
7663
|
},
|
|
7664
7664
|
controller: (n) => {
|
|
7665
|
-
const e = n.document, t = n.value, l = n.constraint, v = l && tt(l,
|
|
7666
|
-
return v ? new
|
|
7665
|
+
const e = n.document, t = n.value, l = n.constraint, v = l && tt(l, vn);
|
|
7666
|
+
return v ? new bn(e, {
|
|
7667
7667
|
props: new X({
|
|
7668
7668
|
options: v.values.value("options")
|
|
7669
7669
|
}),
|
|
@@ -7873,10 +7873,10 @@ var zs = {}, Ch = {
|
|
|
7873
7873
|
picker: e.optional.custom(Oi)
|
|
7874
7874
|
});
|
|
7875
7875
|
}
|
|
7876
|
-
function
|
|
7876
|
+
function Tn(n) {
|
|
7877
7877
|
return n ? 0.1 : 1;
|
|
7878
7878
|
}
|
|
7879
|
-
function
|
|
7879
|
+
function kn(n) {
|
|
7880
7880
|
var e;
|
|
7881
7881
|
return (e = n.color) === null || e === void 0 ? void 0 : e.type;
|
|
7882
7882
|
}
|
|
@@ -8180,16 +8180,16 @@ var zs = {}, Ch = {
|
|
|
8180
8180
|
function dl(n) {
|
|
8181
8181
|
const e = [
|
|
8182
8182
|
Re(0),
|
|
8183
|
-
|
|
8184
|
-
|
|
8183
|
+
_n,
|
|
8184
|
+
_n
|
|
8185
8185
|
];
|
|
8186
8186
|
return `hsl(${p(n.getComponents("hsl")).map((l, v) => e[v](l)).join(", ")})`;
|
|
8187
8187
|
}
|
|
8188
8188
|
function ml(n) {
|
|
8189
8189
|
const e = [
|
|
8190
8190
|
Re(0),
|
|
8191
|
-
|
|
8192
|
-
|
|
8191
|
+
_n,
|
|
8192
|
+
_n,
|
|
8193
8193
|
Re(2)
|
|
8194
8194
|
];
|
|
8195
8195
|
return `hsla(${n.getComponents("hsl").map((l, v) => e[v](l)).join(", ")})`;
|
|
@@ -8350,7 +8350,7 @@ var zs = {}, Ch = {
|
|
|
8350
8350
|
});
|
|
8351
8351
|
}
|
|
8352
8352
|
onKeyDown_(e) {
|
|
8353
|
-
const t = Oe(
|
|
8353
|
+
const t = Oe(Tn(!0), ct(e));
|
|
8354
8354
|
if (t === 0)
|
|
8355
8355
|
return;
|
|
8356
8356
|
const l = this.value.rawValue, [v, E, k, B] = l.getComponents("hsv");
|
|
@@ -8360,7 +8360,7 @@ var zs = {}, Ch = {
|
|
|
8360
8360
|
});
|
|
8361
8361
|
}
|
|
8362
8362
|
onKeyUp_(e) {
|
|
8363
|
-
Oe(
|
|
8363
|
+
Oe(Tn(!0), ct(e)) !== 0 && this.value.setRawValue(this.value.rawValue, {
|
|
8364
8364
|
forceEmit: !0,
|
|
8365
8365
|
last: !0
|
|
8366
8366
|
});
|
|
@@ -8400,7 +8400,7 @@ var zs = {}, Ch = {
|
|
|
8400
8400
|
this.textViews_ = e, this.applyTextViews_();
|
|
8401
8401
|
}
|
|
8402
8402
|
applyTextViews_() {
|
|
8403
|
-
|
|
8403
|
+
cn(this.textsElem_);
|
|
8404
8404
|
const e = this.element.ownerDocument;
|
|
8405
8405
|
this.textViews_.forEach((t) => {
|
|
8406
8406
|
const l = e.createElement("div");
|
|
@@ -8419,9 +8419,9 @@ var zs = {}, Ch = {
|
|
|
8419
8419
|
});
|
|
8420
8420
|
}
|
|
8421
8421
|
function Dr(n, e, t) {
|
|
8422
|
-
return new
|
|
8422
|
+
return new yn(n, {
|
|
8423
8423
|
arrayPosition: t === 0 ? "fst" : t === 3 - 1 ? "lst" : "mid",
|
|
8424
|
-
baseStep:
|
|
8424
|
+
baseStep: Tn(!1),
|
|
8425
8425
|
parser: e.parser,
|
|
8426
8426
|
props: X.fromObject({
|
|
8427
8427
|
draggingScale: e.colorType === "float" ? 0.01 : 1,
|
|
@@ -8524,7 +8524,7 @@ var zs = {}, Ch = {
|
|
|
8524
8524
|
});
|
|
8525
8525
|
}
|
|
8526
8526
|
onKeyDown_(e) {
|
|
8527
|
-
const t = Oe(
|
|
8527
|
+
const t = Oe(Tn(!1), ct(e));
|
|
8528
8528
|
if (t === 0)
|
|
8529
8529
|
return;
|
|
8530
8530
|
const l = this.value.rawValue, [v, E, k, B] = l.getComponents("hsv");
|
|
@@ -8534,7 +8534,7 @@ var zs = {}, Ch = {
|
|
|
8534
8534
|
});
|
|
8535
8535
|
}
|
|
8536
8536
|
onKeyUp_(e) {
|
|
8537
|
-
Oe(
|
|
8537
|
+
Oe(Tn(!1), ct(e)) !== 0 && this.value.setRawValue(this.value.rawValue, {
|
|
8538
8538
|
forceEmit: !0,
|
|
8539
8539
|
last: !0
|
|
8540
8540
|
});
|
|
@@ -8556,7 +8556,7 @@ var zs = {}, Ch = {
|
|
|
8556
8556
|
const l = this.value.rawValue.getComponents("hsv"), v = this.canvasElement.width, E = this.canvasElement.height, k = e.getImageData(0, 0, v, E), B = k.data;
|
|
8557
8557
|
for (let de = 0; de < E; de++)
|
|
8558
8558
|
for (let ve = 0; ve < v; ve++) {
|
|
8559
|
-
const
|
|
8559
|
+
const Mn = _e(ve, 0, v, 0, 100), zi = _e(de, 0, E, 100, 0), Ui = Ms(l[0], Mn, zi), As = (de * v + ve) * 4;
|
|
8560
8560
|
B[As] = Ui[0], B[As + 1] = Ui[1], B[As + 2] = Ui[2], B[As + 3] = 255;
|
|
8561
8561
|
}
|
|
8562
8562
|
e.putImageData(k, 0, 0);
|
|
@@ -8602,14 +8602,14 @@ var zs = {}, Ch = {
|
|
|
8602
8602
|
}
|
|
8603
8603
|
onKeyDown_(e) {
|
|
8604
8604
|
Jn(e.key) && e.preventDefault();
|
|
8605
|
-
const [t, l, v, E] = this.value.rawValue.getComponents("hsv"), k =
|
|
8605
|
+
const [t, l, v, E] = this.value.rawValue.getComponents("hsv"), k = Tn(!1), B = Oe(k, ct(e)), Q = Oe(k, wn(e));
|
|
8606
8606
|
B === 0 && Q === 0 || this.value.setRawValue(new te([t, l + B, v + Q, E], "hsv"), {
|
|
8607
8607
|
forceEmit: !1,
|
|
8608
8608
|
last: !1
|
|
8609
8609
|
});
|
|
8610
8610
|
}
|
|
8611
8611
|
onKeyUp_(e) {
|
|
8612
|
-
const t =
|
|
8612
|
+
const t = Tn(!1), l = Oe(t, ct(e)), v = Oe(t, wn(e));
|
|
8613
8613
|
l === 0 && v === 0 || this.value.setRawValue(this.value.rawValue, {
|
|
8614
8614
|
forceEmit: !0,
|
|
8615
8615
|
last: !0
|
|
@@ -8629,7 +8629,7 @@ var zs = {}, Ch = {
|
|
|
8629
8629
|
value: this.value,
|
|
8630
8630
|
viewProps: this.viewProps
|
|
8631
8631
|
}),
|
|
8632
|
-
text: new
|
|
8632
|
+
text: new yn(e, {
|
|
8633
8633
|
parser: lt,
|
|
8634
8634
|
baseStep: 0.1,
|
|
8635
8635
|
props: X.fromObject({
|
|
@@ -8869,13 +8869,13 @@ var zs = {}, Ch = {
|
|
|
8869
8869
|
} : null;
|
|
8870
8870
|
},
|
|
8871
8871
|
binding: {
|
|
8872
|
-
reader: (n) => Yl(
|
|
8872
|
+
reader: (n) => Yl(kn(n.params)),
|
|
8873
8873
|
equals: te.equals,
|
|
8874
|
-
writer: (n) => Gl(Xl(n.initialValue),
|
|
8874
|
+
writer: (n) => Gl(Xl(n.initialValue), kn(n.params))
|
|
8875
8875
|
},
|
|
8876
8876
|
controller: (n) => {
|
|
8877
8877
|
var e;
|
|
8878
|
-
const t = te.isRgbaColorObject(n.initialValue), l = "expanded" in n.params ? n.params.expanded : void 0, v = "picker" in n.params ? n.params.picker : void 0, E = (e =
|
|
8878
|
+
const t = te.isRgbaColorObject(n.initialValue), l = "expanded" in n.params ? n.params.expanded : void 0, v = "picker" in n.params ? n.params.picker : void 0, E = (e = kn(n.params)) !== null && e !== void 0 ? e : "int";
|
|
8879
8879
|
return new Br(n.document, {
|
|
8880
8880
|
colorType: E,
|
|
8881
8881
|
expanded: l ?? !1,
|
|
@@ -8893,7 +8893,7 @@ var zs = {}, Ch = {
|
|
|
8893
8893
|
accept: (n, e) => {
|
|
8894
8894
|
if (typeof n != "string" || "view" in e && e.view === "text")
|
|
8895
8895
|
return null;
|
|
8896
|
-
const t = Lr(n,
|
|
8896
|
+
const t = Lr(n, kn(e));
|
|
8897
8897
|
if (!t || !Vr(t))
|
|
8898
8898
|
return null;
|
|
8899
8899
|
const v = Ar(e);
|
|
@@ -8905,11 +8905,11 @@ var zs = {}, Ch = {
|
|
|
8905
8905
|
binding: {
|
|
8906
8906
|
reader: (n) => {
|
|
8907
8907
|
var e;
|
|
8908
|
-
return pl((e =
|
|
8908
|
+
return pl((e = kn(n.params)) !== null && e !== void 0 ? e : "int");
|
|
8909
8909
|
},
|
|
8910
8910
|
equals: te.equals,
|
|
8911
8911
|
writer: (n) => {
|
|
8912
|
-
const e = Lr(n.initialValue,
|
|
8912
|
+
const e = Lr(n.initialValue, kn(n.params));
|
|
8913
8913
|
if (!e)
|
|
8914
8914
|
throw S.shouldNeverHappen();
|
|
8915
8915
|
const t = Bl(e);
|
|
@@ -8919,7 +8919,7 @@ var zs = {}, Ch = {
|
|
|
8919
8919
|
}
|
|
8920
8920
|
},
|
|
8921
8921
|
controller: (n) => {
|
|
8922
|
-
const e = Lr(n.initialValue,
|
|
8922
|
+
const e = Lr(n.initialValue, kn(n.params));
|
|
8923
8923
|
if (!e)
|
|
8924
8924
|
throw S.shouldNeverHappen();
|
|
8925
8925
|
const t = Vr(e);
|
|
@@ -8960,7 +8960,7 @@ var zs = {}, Ch = {
|
|
|
8960
8960
|
}
|
|
8961
8961
|
}
|
|
8962
8962
|
function Jl(n, e, t) {
|
|
8963
|
-
return new
|
|
8963
|
+
return new yn(n, {
|
|
8964
8964
|
arrayPosition: t === 0 ? "fst" : t === e.axes.length - 1 ? "lst" : "mid",
|
|
8965
8965
|
baseStep: e.axes[t].baseStep,
|
|
8966
8966
|
parser: e.parser,
|
|
@@ -9013,7 +9013,7 @@ var zs = {}, Ch = {
|
|
|
9013
9013
|
const v = Go(n);
|
|
9014
9014
|
v && t.push(v);
|
|
9015
9015
|
const E = Ni(n.options);
|
|
9016
|
-
return E && t.push(E), new
|
|
9016
|
+
return E && t.push(E), new fn(t);
|
|
9017
9017
|
}
|
|
9018
9018
|
const nc = {
|
|
9019
9019
|
id: "input-number",
|
|
@@ -9025,7 +9025,7 @@ var zs = {}, Ch = {
|
|
|
9025
9025
|
format: t.optional.function,
|
|
9026
9026
|
max: t.optional.number,
|
|
9027
9027
|
min: t.optional.number,
|
|
9028
|
-
options: t.optional.custom(
|
|
9028
|
+
options: t.optional.custom(En),
|
|
9029
9029
|
step: t.optional.number
|
|
9030
9030
|
});
|
|
9031
9031
|
return l ? {
|
|
@@ -9040,9 +9040,9 @@ var zs = {}, Ch = {
|
|
|
9040
9040
|
},
|
|
9041
9041
|
controller: (n) => {
|
|
9042
9042
|
var e;
|
|
9043
|
-
const t = n.value, l = n.constraint, v = l && tt(l,
|
|
9043
|
+
const t = n.value, l = n.constraint, v = l && tt(l, vn);
|
|
9044
9044
|
if (v)
|
|
9045
|
-
return new
|
|
9045
|
+
return new bn(n.document, {
|
|
9046
9046
|
props: new X({
|
|
9047
9047
|
options: v.values.value("options")
|
|
9048
9048
|
}),
|
|
@@ -9063,7 +9063,7 @@ var zs = {}, Ch = {
|
|
|
9063
9063
|
}),
|
|
9064
9064
|
value: t,
|
|
9065
9065
|
viewProps: n.viewProps
|
|
9066
|
-
}) : new
|
|
9066
|
+
}) : new yn(n.document, {
|
|
9067
9067
|
baseStep: Dt(l),
|
|
9068
9068
|
parser: lt,
|
|
9069
9069
|
props: X.fromObject({
|
|
@@ -9151,7 +9151,7 @@ var zs = {}, Ch = {
|
|
|
9151
9151
|
function Ko(n, e, t) {
|
|
9152
9152
|
return [
|
|
9153
9153
|
Oe(e[0], ct(n)),
|
|
9154
|
-
Oe(e[1],
|
|
9154
|
+
Oe(e[1], wn(n)) * (t ? 1 : -1)
|
|
9155
9155
|
];
|
|
9156
9156
|
}
|
|
9157
9157
|
class rc {
|
|
@@ -9443,7 +9443,7 @@ var zs = {}, Ch = {
|
|
|
9443
9443
|
};
|
|
9444
9444
|
function vc(n) {
|
|
9445
9445
|
const e = [], t = Ni(n.options);
|
|
9446
|
-
return t && e.push(t), new
|
|
9446
|
+
return t && e.push(t), new fn(e);
|
|
9447
9447
|
}
|
|
9448
9448
|
const bc = {
|
|
9449
9449
|
id: "input-string",
|
|
@@ -9452,7 +9452,7 @@ var zs = {}, Ch = {
|
|
|
9452
9452
|
if (typeof n != "string")
|
|
9453
9453
|
return null;
|
|
9454
9454
|
const l = le(e, {
|
|
9455
|
-
options: M.optional.custom(
|
|
9455
|
+
options: M.optional.custom(En)
|
|
9456
9456
|
});
|
|
9457
9457
|
return l ? {
|
|
9458
9458
|
initialValue: n,
|
|
@@ -9465,8 +9465,8 @@ var zs = {}, Ch = {
|
|
|
9465
9465
|
writer: (n) => nt
|
|
9466
9466
|
},
|
|
9467
9467
|
controller: (n) => {
|
|
9468
|
-
const e = n.document, t = n.value, l = n.constraint, v = l && tt(l,
|
|
9469
|
-
return v ? new
|
|
9468
|
+
const e = n.document, t = n.value, l = n.constraint, v = l && tt(l, vn);
|
|
9469
|
+
return v ? new bn(e, {
|
|
9470
9470
|
props: new X({
|
|
9471
9471
|
options: v.values.value("options")
|
|
9472
9472
|
}),
|
|
@@ -9587,8 +9587,8 @@ var zs = {}, Ch = {
|
|
|
9587
9587
|
this.value.rawValue.forEach((de, ve) => {
|
|
9588
9588
|
if (de === void 0)
|
|
9589
9589
|
return;
|
|
9590
|
-
const
|
|
9591
|
-
E.push([
|
|
9590
|
+
const Mn = _e(ve, 0, t, 0, e.width), zi = _e(de, l, v, e.height, 0);
|
|
9591
|
+
E.push([Mn, zi].join(","));
|
|
9592
9592
|
}), this.lineElem_.setAttributeNS(null, "points", E.join(" "));
|
|
9593
9593
|
const k = this.tooltipElem_, B = this.value.rawValue[this.cursor_.rawValue];
|
|
9594
9594
|
if (B === void 0) {
|
|
@@ -9747,7 +9747,7 @@ var zs = {}, Ch = {
|
|
|
9747
9747
|
target: e.target,
|
|
9748
9748
|
value: Q,
|
|
9749
9749
|
writer: n.binding.writer(E)
|
|
9750
|
-
}), de = v.optional.boolean(e.params.disabled).value, ve = v.optional.boolean(e.params.hidden).value,
|
|
9750
|
+
}), de = v.optional.boolean(e.params.disabled).value, ve = v.optional.boolean(e.params.hidden).value, Mn = n.controller({
|
|
9751
9751
|
constraint: B,
|
|
9752
9752
|
document: e.document,
|
|
9753
9753
|
initialValue: l.initialValue,
|
|
@@ -9764,7 +9764,7 @@ var zs = {}, Ch = {
|
|
|
9764
9764
|
props: X.fromObject({
|
|
9765
9765
|
label: "label" in e.params ? (t = v.optional.string(e.params.label).value) !== null && t !== void 0 ? t : null : e.target.key
|
|
9766
9766
|
}),
|
|
9767
|
-
valueController:
|
|
9767
|
+
valueController: Mn
|
|
9768
9768
|
});
|
|
9769
9769
|
}
|
|
9770
9770
|
function Mc(n, e) {
|
|
@@ -9784,12 +9784,12 @@ var zs = {}, Ch = {
|
|
|
9784
9784
|
target: e.target,
|
|
9785
9785
|
ticker: Mc(e.document, de),
|
|
9786
9786
|
value: cs(J)
|
|
9787
|
-
}),
|
|
9787
|
+
}), Mn = E.optional.boolean(e.params.disabled).value, zi = E.optional.boolean(e.params.hidden).value, Ui = n.controller({
|
|
9788
9788
|
document: e.document,
|
|
9789
9789
|
params: k.params,
|
|
9790
9790
|
value: ve.value,
|
|
9791
9791
|
viewProps: Xe.create({
|
|
9792
|
-
disabled:
|
|
9792
|
+
disabled: Mn,
|
|
9793
9793
|
hidden: zi
|
|
9794
9794
|
})
|
|
9795
9795
|
});
|
|
@@ -9877,7 +9877,7 @@ var zs = {}, Ch = {
|
|
|
9877
9877
|
return new mi(e);
|
|
9878
9878
|
if (e instanceof ot)
|
|
9879
9879
|
return new fi(e);
|
|
9880
|
-
if (e instanceof
|
|
9880
|
+
if (e instanceof hn)
|
|
9881
9881
|
return new $n(e, this);
|
|
9882
9882
|
const t = this.pluginsMap_.blades.reduce((l, v) => l ?? v.api({
|
|
9883
9883
|
controller: e,
|
|
@@ -9923,7 +9923,7 @@ var zs = {}, Ch = {
|
|
|
9923
9923
|
const t = [], l = Uo(n, e);
|
|
9924
9924
|
l && t.push(l);
|
|
9925
9925
|
const v = Go(n);
|
|
9926
|
-
return v && t.push(v), new
|
|
9926
|
+
return v && t.push(v), new fn(t);
|
|
9927
9927
|
}
|
|
9928
9928
|
function Vc(n, e) {
|
|
9929
9929
|
return new Zt({
|
|
@@ -10120,7 +10120,7 @@ var zs = {}, Ch = {
|
|
|
10120
10120
|
type: "blade",
|
|
10121
10121
|
accept(n) {
|
|
10122
10122
|
const e = M, t = le(n, {
|
|
10123
|
-
options: e.required.custom(
|
|
10123
|
+
options: e.required.custom(En),
|
|
10124
10124
|
value: e.required.raw,
|
|
10125
10125
|
view: e.required.constant("list"),
|
|
10126
10126
|
label: e.optional.string
|
|
@@ -10128,9 +10128,9 @@ var zs = {}, Ch = {
|
|
|
10128
10128
|
return t ? { params: t } : null;
|
|
10129
10129
|
},
|
|
10130
10130
|
controller(n) {
|
|
10131
|
-
const e = new
|
|
10131
|
+
const e = new vn(Ps(n.params.options)), t = ee(n.params.value, {
|
|
10132
10132
|
constraint: e
|
|
10133
|
-
}), l = new
|
|
10133
|
+
}), l = new bn(n.document, {
|
|
10134
10134
|
props: new X({
|
|
10135
10135
|
options: e.values.value("options")
|
|
10136
10136
|
}),
|
|
@@ -10146,7 +10146,7 @@ var zs = {}, Ch = {
|
|
|
10146
10146
|
});
|
|
10147
10147
|
},
|
|
10148
10148
|
api(n) {
|
|
10149
|
-
return !(n.controller instanceof Gt) || !(n.controller.valueController instanceof
|
|
10149
|
+
return !(n.controller instanceof Gt) || !(n.controller.valueController instanceof bn) ? null : new Jo(n.controller);
|
|
10150
10150
|
}
|
|
10151
10151
|
};
|
|
10152
10152
|
}();
|
|
@@ -10824,7 +10824,7 @@ var Ji = {}, Ph = {
|
|
|
10824
10824
|
for (; m.childNodes.length > 0; )
|
|
10825
10825
|
m.removeChild(m.childNodes[0]);
|
|
10826
10826
|
}
|
|
10827
|
-
function
|
|
10827
|
+
function an(m) {
|
|
10828
10828
|
return m.relatedTarget ? m.relatedTarget : "explicitOriginalTarget" in m ? m.explicitOriginalTarget : null;
|
|
10829
10829
|
}
|
|
10830
10830
|
const mt = y("lbl");
|
|
@@ -10855,7 +10855,7 @@ var Ji = {}, Ph = {
|
|
|
10855
10855
|
}), viewProps: f })), this.props = p.props, this.valueController = p.valueController, this.view.valueElement.appendChild(this.valueController.view.element);
|
|
10856
10856
|
}
|
|
10857
10857
|
}
|
|
10858
|
-
class
|
|
10858
|
+
class ln extends Ne {
|
|
10859
10859
|
constructor(o) {
|
|
10860
10860
|
super(o), this.value = o.value;
|
|
10861
10861
|
}
|
|
@@ -10921,7 +10921,7 @@ var Ji = {}, Ph = {
|
|
|
10921
10921
|
this.element = o.createElement("div"), this.element.classList.add(f()), p.viewProps.bindClassModifiers(this.element);
|
|
10922
10922
|
}
|
|
10923
10923
|
}
|
|
10924
|
-
class St extends
|
|
10924
|
+
class St extends ln {
|
|
10925
10925
|
constructor(o, p) {
|
|
10926
10926
|
const f = p.valueController.viewProps;
|
|
10927
10927
|
super(Object.assign(Object.assign({}, p), { value: p.valueController.value, view: new ze(o, {
|
|
@@ -10942,7 +10942,7 @@ var Ji = {}, Ph = {
|
|
|
10942
10942
|
});
|
|
10943
10943
|
}
|
|
10944
10944
|
}
|
|
10945
|
-
class
|
|
10945
|
+
class cn {
|
|
10946
10946
|
constructor(o, p) {
|
|
10947
10947
|
this.disabled_ = !1, this.timerId_ = null, this.onTick_ = this.onTick_.bind(this), this.doc_ = o, this.emitter = new w(), this.interval_ = p, this.setTimer_();
|
|
10948
10948
|
}
|
|
@@ -11073,7 +11073,7 @@ var Ji = {}, Ph = {
|
|
|
11073
11073
|
h(x) || (this.value.rawValue = x), this.view.refresh();
|
|
11074
11074
|
}
|
|
11075
11075
|
}
|
|
11076
|
-
function
|
|
11076
|
+
function pn(m) {
|
|
11077
11077
|
return m === "false" ? !1 : !!m;
|
|
11078
11078
|
}
|
|
11079
11079
|
class Ue {
|
|
@@ -11188,7 +11188,7 @@ var Ji = {}, Ph = {
|
|
|
11188
11188
|
const f = mi(m, o);
|
|
11189
11189
|
return o += f.length, f === "" ? "" : f + Fe(m, o);
|
|
11190
11190
|
}
|
|
11191
|
-
function
|
|
11191
|
+
function un(m, o) {
|
|
11192
11192
|
const p = ts(m, o);
|
|
11193
11193
|
if (o += p.length, p === "")
|
|
11194
11194
|
return "";
|
|
@@ -11210,7 +11210,7 @@ var Ji = {}, Ph = {
|
|
|
11210
11210
|
return o += p.length, p === "" ? "" : p + ot(m, o);
|
|
11211
11211
|
}
|
|
11212
11212
|
const vi = di([
|
|
11213
|
-
|
|
11213
|
+
un,
|
|
11214
11214
|
ns,
|
|
11215
11215
|
$n
|
|
11216
11216
|
]);
|
|
@@ -11258,7 +11258,7 @@ var Ji = {}, Ph = {
|
|
|
11258
11258
|
Zs,
|
|
11259
11259
|
vi
|
|
11260
11260
|
]);
|
|
11261
|
-
function
|
|
11261
|
+
function hn(m, o) {
|
|
11262
11262
|
const p = Ws(m, o);
|
|
11263
11263
|
return o += p.length, p === "" ? null : {
|
|
11264
11264
|
evaluable: new Ue(p),
|
|
@@ -11281,7 +11281,7 @@ var Ji = {}, Ph = {
|
|
|
11281
11281
|
}
|
|
11282
11282
|
function Js(m, o) {
|
|
11283
11283
|
var p;
|
|
11284
|
-
return (p =
|
|
11284
|
+
return (p = hn(m, o)) !== null && p !== void 0 ? p : is(m, o);
|
|
11285
11285
|
}
|
|
11286
11286
|
function Xn(m, o) {
|
|
11287
11287
|
const p = Js(m, o);
|
|
@@ -11343,7 +11343,7 @@ var Ji = {}, Ph = {
|
|
|
11343
11343
|
const o = _i(m, 0);
|
|
11344
11344
|
return !o || o.cursor + Lt(m, o.cursor).length !== m.length ? null : o.evaluable;
|
|
11345
11345
|
}
|
|
11346
|
-
function
|
|
11346
|
+
function dn(m) {
|
|
11347
11347
|
var o;
|
|
11348
11348
|
const p = tr(m);
|
|
11349
11349
|
return (o = p == null ? void 0 : p.evaluate()) !== null && o !== void 0 ? o : null;
|
|
@@ -11352,7 +11352,7 @@ var Ji = {}, Ph = {
|
|
|
11352
11352
|
if (typeof m == "number")
|
|
11353
11353
|
return m;
|
|
11354
11354
|
if (typeof m == "string") {
|
|
11355
|
-
const o =
|
|
11355
|
+
const o = dn(m);
|
|
11356
11356
|
if (!h(o))
|
|
11357
11357
|
return o;
|
|
11358
11358
|
}
|
|
@@ -11410,7 +11410,7 @@ var Ji = {}, Ph = {
|
|
|
11410
11410
|
const p = m * (o.altKey ? 0.1 : 1) * (o.shiftKey ? 10 : 1);
|
|
11411
11411
|
return o.upKey ? +p : o.downKey ? -p : 0;
|
|
11412
11412
|
}
|
|
11413
|
-
function
|
|
11413
|
+
function mn(m) {
|
|
11414
11414
|
return {
|
|
11415
11415
|
altKey: m.altKey,
|
|
11416
11416
|
downKey: m.key === "ArrowDown",
|
|
@@ -11574,7 +11574,7 @@ var Ji = {}, Ph = {
|
|
|
11574
11574
|
this.refresh();
|
|
11575
11575
|
}
|
|
11576
11576
|
}
|
|
11577
|
-
class
|
|
11577
|
+
class fn {
|
|
11578
11578
|
constructor(o, p) {
|
|
11579
11579
|
var f;
|
|
11580
11580
|
this.originRawValue_ = 0, this.onInputChange_ = this.onInputChange_.bind(this), this.onInputKeyDown_ = this.onInputKeyDown_.bind(this), this.onInputKeyUp_ = this.onInputKeyUp_.bind(this), this.onPointerDown_ = this.onPointerDown_.bind(this), this.onPointerMove_ = this.onPointerMove_.bind(this), this.onPointerUp_ = this.onPointerUp_.bind(this), this.baseStep_ = p.baseStep, this.parser_ = p.parser, this.props = p.props, this.sliderProps_ = (f = p.sliderProps) !== null && f !== void 0 ? f : null, this.value = p.value, this.viewProps = p.viewProps, this.dragging_ = H(null), this.view = new or(o, {
|
|
@@ -11598,14 +11598,14 @@ var Ji = {}, Ph = {
|
|
|
11598
11598
|
h(x) || (this.value.rawValue = this.constrainValue_(x)), this.view.refresh();
|
|
11599
11599
|
}
|
|
11600
11600
|
onInputKeyDown_(o) {
|
|
11601
|
-
const p = Kt(this.baseStep_,
|
|
11601
|
+
const p = Kt(this.baseStep_, mn(o));
|
|
11602
11602
|
p !== 0 && this.value.setRawValue(this.constrainValue_(this.value.rawValue + p), {
|
|
11603
11603
|
forceEmit: !1,
|
|
11604
11604
|
last: !1
|
|
11605
11605
|
});
|
|
11606
11606
|
}
|
|
11607
11607
|
onInputKeyUp_(o) {
|
|
11608
|
-
Kt(this.baseStep_,
|
|
11608
|
+
Kt(this.baseStep_, mn(o)) !== 0 && this.value.setRawValue(this.value.rawValue, {
|
|
11609
11609
|
forceEmit: !0,
|
|
11610
11610
|
last: !0
|
|
11611
11611
|
});
|
|
@@ -11641,7 +11641,7 @@ var Ji = {}, Ph = {
|
|
|
11641
11641
|
const o = m ? Et(m, A) : null;
|
|
11642
11642
|
return o ? o.step : null;
|
|
11643
11643
|
}
|
|
11644
|
-
function
|
|
11644
|
+
function vn(m, o) {
|
|
11645
11645
|
const p = m && Et(m, A);
|
|
11646
11646
|
return p ? cs(p.step) : Math.max(cs(o), 2);
|
|
11647
11647
|
}
|
|
@@ -11661,7 +11661,7 @@ var Ji = {}, Ph = {
|
|
|
11661
11661
|
const o = $t(Math.floor(m), 0, 255).toString(16);
|
|
11662
11662
|
return o.length === 1 ? `0${o}` : o;
|
|
11663
11663
|
}
|
|
11664
|
-
function
|
|
11664
|
+
function bn(m, o = "#") {
|
|
11665
11665
|
const p = Yt(m.getComponents("rgb")).map(ps).join("");
|
|
11666
11666
|
return `${o}${p}`;
|
|
11667
11667
|
}
|
|
@@ -11780,7 +11780,7 @@ var Ji = {}, Ph = {
|
|
|
11780
11780
|
}
|
|
11781
11781
|
}
|
|
11782
11782
|
function Ci(m, o, p) {
|
|
11783
|
-
return new
|
|
11783
|
+
return new fn(m, {
|
|
11784
11784
|
arrayPosition: p === 0 ? "fst" : p === o.axes.length - 1 ? "lst" : "mid",
|
|
11785
11785
|
baseStep: o.axes[p].baseStep,
|
|
11786
11786
|
parser: o.parser,
|
|
@@ -11811,7 +11811,7 @@ var Ji = {}, Ph = {
|
|
|
11811
11811
|
function mr(m, o) {
|
|
11812
11812
|
return "step" in m && !h(m.step) ? new A(m.step, o) : null;
|
|
11813
11813
|
}
|
|
11814
|
-
function
|
|
11814
|
+
function gn(m) {
|
|
11815
11815
|
return !h(m.max) && !h(m.min) ? new vt({
|
|
11816
11816
|
max: m.max,
|
|
11817
11817
|
min: m.min
|
|
@@ -12214,7 +12214,7 @@ var Ji = {}, Ph = {
|
|
|
12214
12214
|
this.refresh();
|
|
12215
12215
|
}
|
|
12216
12216
|
}
|
|
12217
|
-
const Es = 24,
|
|
12217
|
+
const Es = 24, _n = 400, Si = 1e3, Pt = y("cbzprv");
|
|
12218
12218
|
class qt {
|
|
12219
12219
|
constructor(o, p) {
|
|
12220
12220
|
this.stopped_ = !0, this.startTime_ = -1, this.onDispose_ = this.onDispose_.bind(this), this.onTimer_ = this.onTimer_.bind(this), this.onValueChange_ = this.onValueChange_.bind(this), this.element = o.createElement("div"), this.element.classList.add(Pt()), p.viewProps.bindClassModifiers(this.element);
|
|
@@ -12228,7 +12228,7 @@ var Ji = {}, Ph = {
|
|
|
12228
12228
|
});
|
|
12229
12229
|
}
|
|
12230
12230
|
play() {
|
|
12231
|
-
this.stop(), this.updateMarker_(0), this.markerElem_.classList.add(Pt("m", "a")), this.startTime_ = (/* @__PURE__ */ new Date()).getTime() +
|
|
12231
|
+
this.stop(), this.updateMarker_(0), this.markerElem_.classList.add(Pt("m", "a")), this.startTime_ = (/* @__PURE__ */ new Date()).getTime() + _n, this.stopped_ = !1, requestAnimationFrame(this.onTimer_);
|
|
12232
12232
|
}
|
|
12233
12233
|
stop() {
|
|
12234
12234
|
this.stopped_ = !0, this.markerElem_.classList.remove(Pt("m", "a"));
|
|
@@ -12252,7 +12252,7 @@ var Ji = {}, Ph = {
|
|
|
12252
12252
|
if (this.startTime_ === null)
|
|
12253
12253
|
return;
|
|
12254
12254
|
const o = (/* @__PURE__ */ new Date()).getTime() - this.startTime_, p = o / Si;
|
|
12255
|
-
this.updateMarker_(p), o > Si +
|
|
12255
|
+
this.updateMarker_(p), o > Si + _n && this.stop(), this.stopped_ || requestAnimationFrame(this.onTimer_);
|
|
12256
12256
|
}
|
|
12257
12257
|
onValueChange_() {
|
|
12258
12258
|
this.refresh(), this.play();
|
|
@@ -12262,7 +12262,7 @@ var Ji = {}, Ph = {
|
|
|
12262
12262
|
const x = p - m, P = f - o;
|
|
12263
12263
|
return Math.sqrt(x * x + P * P);
|
|
12264
12264
|
}
|
|
12265
|
-
function
|
|
12265
|
+
function wn(m, o, p, f) {
|
|
12266
12266
|
const x = Oe(m, o, p, f), P = Math.atan2(f - o, p - m), L = Math.round(P / (Math.PI / 4)) * Math.PI / 4;
|
|
12267
12267
|
return {
|
|
12268
12268
|
x: m + Math.cos(L) * x,
|
|
@@ -12288,7 +12288,7 @@ var Ji = {}, Ph = {
|
|
|
12288
12288
|
this.view.refresh(), this.prevView_.refresh(), this.prevView_.play();
|
|
12289
12289
|
}
|
|
12290
12290
|
updateValue_(o, p, f) {
|
|
12291
|
-
const x = this.sel_.rawValue, P = this.value.rawValue.toObject(), L = this.view.positionToValue(o.x, o.y), z = p ?
|
|
12291
|
+
const x = this.sel_.rawValue, P = this.value.rawValue.toObject(), L = this.view.positionToValue(o.x, o.y), z = p ? wn(x, x, L.x, L.y) : L;
|
|
12292
12292
|
P[x * 2] = z.x, P[x * 2 + 1] = z.y, this.value.setRawValue(new Ct(...P), f);
|
|
12293
12293
|
}
|
|
12294
12294
|
onPointerDown_(o) {
|
|
@@ -12318,14 +12318,14 @@ var Ji = {}, Ph = {
|
|
|
12318
12318
|
onKeyDown_(o) {
|
|
12319
12319
|
ls(o.key) && o.preventDefault();
|
|
12320
12320
|
const p = this.sel_.rawValue, f = this.value.rawValue.toObject();
|
|
12321
|
-
f[p * 2] += Kt(this.baseStep_, yi(o)), f[p * 2 + 1] += Kt(this.baseStep_,
|
|
12321
|
+
f[p * 2] += Kt(this.baseStep_, yi(o)), f[p * 2 + 1] += Kt(this.baseStep_, mn(o)), this.value.setRawValue(new Ct(...f), {
|
|
12322
12322
|
forceEmit: !1,
|
|
12323
12323
|
last: !1
|
|
12324
12324
|
});
|
|
12325
12325
|
}
|
|
12326
12326
|
onKeyUp_(o) {
|
|
12327
12327
|
ls(o.key) && o.preventDefault();
|
|
12328
|
-
const p = Kt(this.baseStep_, yi(o)), f = Kt(this.baseStep_,
|
|
12328
|
+
const p = Kt(this.baseStep_, yi(o)), f = Kt(this.baseStep_, mn(o));
|
|
12329
12329
|
p === 0 && f === 0 || this.value.setRawValue(this.value.rawValue, {
|
|
12330
12330
|
forceEmit: !0,
|
|
12331
12331
|
last: !0
|
|
@@ -12345,7 +12345,7 @@ var Ji = {}, Ph = {
|
|
|
12345
12345
|
this.tc_ = new Rt(o, {
|
|
12346
12346
|
assembly: ki,
|
|
12347
12347
|
axes: [f, x, f, x],
|
|
12348
|
-
parser:
|
|
12348
|
+
parser: dn,
|
|
12349
12349
|
value: this.value,
|
|
12350
12350
|
viewProps: this.viewProps
|
|
12351
12351
|
}), this.view.textElement.appendChild(this.tc_.view.element);
|
|
@@ -12404,7 +12404,7 @@ var Ji = {}, Ph = {
|
|
|
12404
12404
|
onPopupChildBlur_(o) {
|
|
12405
12405
|
if (!this.popC_)
|
|
12406
12406
|
return;
|
|
12407
|
-
const p = this.popC_.view.element, f =
|
|
12407
|
+
const p = this.popC_.view.element, f = an(o);
|
|
12408
12408
|
f && p.contains(f) || f && f === this.view.buttonElement && !Xe(p.ownerDocument) || (this.popC_.shows.rawValue = !1);
|
|
12409
12409
|
}
|
|
12410
12410
|
onPopupChildKeydown_(o) {
|
|
@@ -12555,8 +12555,8 @@ var Ji = {}, Ph = {
|
|
|
12555
12555
|
}
|
|
12556
12556
|
}
|
|
12557
12557
|
}
|
|
12558
|
-
function
|
|
12559
|
-
return o === 0 ? new Hn() : new
|
|
12558
|
+
function yn(m, o) {
|
|
12559
|
+
return o === 0 ? new Hn() : new cn(m, o ?? fr.monitor.defaultInterval);
|
|
12560
12560
|
}
|
|
12561
12561
|
const Ii = {
|
|
12562
12562
|
id: "fpsgraph",
|
|
@@ -12584,7 +12584,7 @@ var Ji = {}, Ph = {
|
|
|
12584
12584
|
lineCount: (p = m.params.lineCount) !== null && p !== void 0 ? p : 2,
|
|
12585
12585
|
maxValue: (f = m.params.max) !== null && f !== void 0 ? f : 90,
|
|
12586
12586
|
minValue: (x = m.params.min) !== null && x !== void 0 ? x : 0,
|
|
12587
|
-
ticker:
|
|
12587
|
+
ticker: yn(m.document, P),
|
|
12588
12588
|
value: os(80),
|
|
12589
12589
|
viewProps: m.viewProps
|
|
12590
12590
|
})
|
|
@@ -12621,7 +12621,7 @@ var Ji = {}, Ph = {
|
|
|
12621
12621
|
fromComponents: (m) => new Ke(m[0], m[1]),
|
|
12622
12622
|
toComponents: (m) => [m.min, m.max]
|
|
12623
12623
|
};
|
|
12624
|
-
class
|
|
12624
|
+
class xn {
|
|
12625
12625
|
constructor(o) {
|
|
12626
12626
|
this.edge = o;
|
|
12627
12627
|
}
|
|
@@ -12644,7 +12644,7 @@ var Ji = {}, Ph = {
|
|
|
12644
12644
|
}
|
|
12645
12645
|
}
|
|
12646
12646
|
const nt = y("rsl");
|
|
12647
|
-
class
|
|
12647
|
+
class En {
|
|
12648
12648
|
constructor(o, p) {
|
|
12649
12649
|
this.onSliderPropsChange_ = this.onSliderPropsChange_.bind(this), this.onValueChange_ = this.onValueChange_.bind(this), this.sliderProps_ = p.sliderProps, this.sliderProps_.emitter.on("change", this.onSliderPropsChange_), this.element = o.createElement("div"), this.element.classList.add(nt()), p.viewProps.bindClassModifiers(this.element), this.value_ = p.value, this.value_.emitter.on("change", this.onValueChange_);
|
|
12650
12650
|
const f = o.createElement("div");
|
|
@@ -12678,7 +12678,7 @@ var Ji = {}, Ph = {
|
|
|
12678
12678
|
}
|
|
12679
12679
|
class Oi {
|
|
12680
12680
|
constructor(o, p) {
|
|
12681
|
-
this.grabbing_ = null, this.grabOffset_ = 0, this.onPointerDown_ = this.onPointerDown_.bind(this), this.onPointerMove_ = this.onPointerMove_.bind(this), this.onPointerUp_ = this.onPointerUp_.bind(this), this.sliderProps = p.sliderProps, this.viewProps = p.viewProps, this.value = p.value, this.view = new
|
|
12681
|
+
this.grabbing_ = null, this.grabOffset_ = 0, this.onPointerDown_ = this.onPointerDown_.bind(this), this.onPointerMove_ = this.onPointerMove_.bind(this), this.onPointerUp_ = this.onPointerUp_.bind(this), this.sliderProps = p.sliderProps, this.viewProps = p.viewProps, this.value = p.value, this.view = new En(o, {
|
|
12682
12682
|
sliderProps: this.sliderProps,
|
|
12683
12683
|
value: this.value,
|
|
12684
12684
|
viewProps: p.viewProps
|
|
@@ -12762,10 +12762,10 @@ var Ji = {}, Ph = {
|
|
|
12762
12762
|
m.writeProperty("max", o.max), m.writeProperty("min", o.min);
|
|
12763
12763
|
}
|
|
12764
12764
|
function Pr(m) {
|
|
12765
|
-
const o = [], p =
|
|
12765
|
+
const o = [], p = gn(m);
|
|
12766
12766
|
p && o.push(p);
|
|
12767
12767
|
const f = mr(m);
|
|
12768
|
-
return f && o.push(f), new
|
|
12768
|
+
return f && o.push(f), new xn(new Kn(o));
|
|
12769
12769
|
}
|
|
12770
12770
|
const ti = {
|
|
12771
12771
|
id: "input-interval",
|
|
@@ -12794,16 +12794,16 @@ var Ji = {}, Ph = {
|
|
|
12794
12794
|
controller(m) {
|
|
12795
12795
|
var o;
|
|
12796
12796
|
const p = m.value, f = m.constraint;
|
|
12797
|
-
if (!(f instanceof
|
|
12797
|
+
if (!(f instanceof xn))
|
|
12798
12798
|
throw g.shouldNeverHappen();
|
|
12799
|
-
const x = (p.rawValue.min + p.rawValue.max) / 2, P = (o = m.params.format) !== null && o !== void 0 ? o : Le(
|
|
12799
|
+
const x = (p.rawValue.min + p.rawValue.max) / 2, P = (o = m.params.format) !== null && o !== void 0 ? o : Le(vn(f.edge, x)), L = f.edge && Et(f.edge, vt);
|
|
12800
12800
|
if (L)
|
|
12801
12801
|
return new gt(m.document, {
|
|
12802
12802
|
baseStep: Ei(f.edge),
|
|
12803
12803
|
constraint: f.edge,
|
|
12804
12804
|
draggingScale: Qn(f.edge, x),
|
|
12805
12805
|
formatter: P,
|
|
12806
|
-
parser:
|
|
12806
|
+
parser: dn,
|
|
12807
12807
|
sliderProps: new K({
|
|
12808
12808
|
maxValue: L.values.value("max"),
|
|
12809
12809
|
minValue: L.values.value("min")
|
|
@@ -12822,7 +12822,7 @@ var Ji = {}, Ph = {
|
|
|
12822
12822
|
return new Rt(m.document, {
|
|
12823
12823
|
assembly: Vi,
|
|
12824
12824
|
axes: [z, z],
|
|
12825
|
-
parser:
|
|
12825
|
+
parser: dn,
|
|
12826
12826
|
value: p,
|
|
12827
12827
|
viewProps: m.viewProps
|
|
12828
12828
|
});
|
|
@@ -12851,7 +12851,7 @@ var Ji = {}, Ph = {
|
|
|
12851
12851
|
super(o, x, P), this.cell = p, this.index = f;
|
|
12852
12852
|
}
|
|
12853
12853
|
}
|
|
12854
|
-
class
|
|
12854
|
+
class Cn extends s {
|
|
12855
12855
|
constructor(o) {
|
|
12856
12856
|
super(o), this.cellToApiMap_ = /* @__PURE__ */ new Map(), this.controller_.valueController.cellControllers.forEach((f) => {
|
|
12857
12857
|
const x = new Dt(f);
|
|
@@ -12879,18 +12879,18 @@ var Ji = {}, Ph = {
|
|
|
12879
12879
|
});
|
|
12880
12880
|
}
|
|
12881
12881
|
}
|
|
12882
|
-
const
|
|
12882
|
+
const Pn = y("rad");
|
|
12883
12883
|
class Ts {
|
|
12884
12884
|
constructor(o, p) {
|
|
12885
|
-
this.element = o.createElement("div"), this.element.classList.add(
|
|
12885
|
+
this.element = o.createElement("div"), this.element.classList.add(Pn()), p.viewProps.bindClassModifiers(this.element);
|
|
12886
12886
|
const f = o.createElement("label");
|
|
12887
|
-
f.classList.add(
|
|
12887
|
+
f.classList.add(Pn("l")), this.element.appendChild(f);
|
|
12888
12888
|
const x = o.createElement("input");
|
|
12889
|
-
x.classList.add(
|
|
12889
|
+
x.classList.add(Pn("i")), x.name = p.name, x.type = "radio", p.viewProps.bindDisabled(x), f.appendChild(x), this.inputElement = x;
|
|
12890
12890
|
const P = o.createElement("div");
|
|
12891
|
-
P.classList.add(
|
|
12891
|
+
P.classList.add(Pn("b")), f.appendChild(P);
|
|
12892
12892
|
const L = o.createElement("div");
|
|
12893
|
-
L.classList.add(
|
|
12893
|
+
L.classList.add(Pn("t")), P.appendChild(L), R(p.props, "title", (z) => {
|
|
12894
12894
|
L.textContent = z;
|
|
12895
12895
|
});
|
|
12896
12896
|
}
|
|
@@ -12969,7 +12969,7 @@ var Ji = {}, Ph = {
|
|
|
12969
12969
|
});
|
|
12970
12970
|
},
|
|
12971
12971
|
api(m) {
|
|
12972
|
-
return !(m.controller instanceof St) || !(m.controller.valueController instanceof ni) ? null : new
|
|
12972
|
+
return !(m.controller instanceof St) || !(m.controller.valueController instanceof ni) ? null : new Cn(m.controller);
|
|
12973
12973
|
}
|
|
12974
12974
|
};
|
|
12975
12975
|
}();
|
|
@@ -13015,7 +13015,7 @@ var Ji = {}, Ph = {
|
|
|
13015
13015
|
}), Mr = Fi({
|
|
13016
13016
|
isType: (m) => typeof m == "boolean",
|
|
13017
13017
|
binding: {
|
|
13018
|
-
reader: (m) =>
|
|
13018
|
+
reader: (m) => pn,
|
|
13019
13019
|
writer: (m) => tt
|
|
13020
13020
|
}
|
|
13021
13021
|
}), Ms = [
|
|
@@ -13028,33 +13028,33 @@ var Ji = {}, Ph = {
|
|
|
13028
13028
|
Tr,
|
|
13029
13029
|
kr
|
|
13030
13030
|
];
|
|
13031
|
-
r.ButtonCellApi = gs, r.ButtonGridApi = _s, r.ButtonGridController = Pi, r.CubicBezier = Ct, r.CubicBezierApi = ws, r.CubicBezierAssembly = ki, r.CubicBezierController = Jn, r.CubicBezierGraphController = ct, r.CubicBezierGraphView = Re, r.CubicBezierPickerController = Cs, r.CubicBezierPickerView = xs, r.CubicBezierPreviewView = qt, r.CubicBezierView = ys, r.FpsGraphBladeApi = _e, r.FpsGraphController = Ri, r.FpsView = He, r.Fpswatch = Se, r.Interval = Ke, r.IntervalAssembly = Vi, r.IntervalConstraint =
|
|
13031
|
+
r.ButtonCellApi = gs, r.ButtonGridApi = _s, r.ButtonGridController = Pi, r.CubicBezier = Ct, r.CubicBezierApi = ws, r.CubicBezierAssembly = ki, r.CubicBezierController = Jn, r.CubicBezierGraphController = ct, r.CubicBezierGraphView = Re, r.CubicBezierPickerController = Cs, r.CubicBezierPickerView = xs, r.CubicBezierPreviewView = qt, r.CubicBezierView = ys, r.FpsGraphBladeApi = _e, r.FpsGraphController = Ri, r.FpsView = He, r.Fpswatch = Se, r.Interval = Ke, r.IntervalAssembly = Vi, r.IntervalConstraint = xn, r.RadioCellApi = Dt, r.RadioController = ks, r.RadioGridApi = Cn, r.RadioGridController = ni, r.RadioView = Ts, r.RangeSliderController = Oi, r.RangeSliderTextController = gt, r.RangeSliderTextView = ei, r.RangeSliderView = En, r.TpRadioGridChangeEvent = Ot, r.plugins = Ms, Object.defineProperty(r, "__esModule", { value: !0 });
|
|
13032
13032
|
});
|
|
13033
13033
|
})(Ph, Ji);
|
|
13034
13034
|
const Th = /* @__PURE__ */ ih(Ji), kh = /* @__PURE__ */ Np({
|
|
13035
13035
|
__proto__: null,
|
|
13036
13036
|
default: Th
|
|
13037
13037
|
}, [Ji]);
|
|
13038
|
-
let
|
|
13038
|
+
let Ln, Ds;
|
|
13039
13039
|
const md = (b = "tres-container") => {
|
|
13040
|
-
|
|
13040
|
+
Ln || (Ln = new zs.Pane({
|
|
13041
13041
|
container: document.querySelector(b) || void 0
|
|
13042
|
-
}),
|
|
13042
|
+
}), Ln.registerPlugin(kh), Ds = Ln.addBlade({
|
|
13043
13043
|
view: "fpsgraph",
|
|
13044
13044
|
label: "fpsgraph"
|
|
13045
13045
|
}));
|
|
13046
13046
|
function i() {
|
|
13047
|
-
|
|
13047
|
+
Ln && Ln.dispose();
|
|
13048
13048
|
}
|
|
13049
13049
|
return Ca(() => {
|
|
13050
13050
|
const { onBeforeLoop: r, onAfterLoop: s, resume: a } = Ta();
|
|
13051
13051
|
a(), r(() => Ds.begin()), s(() => Ds.end());
|
|
13052
13052
|
}), Ea(() => {
|
|
13053
13053
|
i();
|
|
13054
|
-
}), { pane:
|
|
13054
|
+
}), { pane: Ln, fpsGraph: Ds, disposeTweakPane: i };
|
|
13055
13055
|
};
|
|
13056
13056
|
function fd(b, i) {
|
|
13057
|
-
const r =
|
|
13057
|
+
const r = on(i), s = new Ip(r.value), a = Wc({});
|
|
13058
13058
|
b.forEach((u) => {
|
|
13059
13059
|
const h = s.clipAction(u, r.value);
|
|
13060
13060
|
a[u.name] = h;
|
|
@@ -13082,14 +13082,10 @@ const vd = Ie({
|
|
|
13082
13082
|
name: "GLTFModel",
|
|
13083
13083
|
props: ["path", "draco", "decoderPath"],
|
|
13084
13084
|
async setup(b, { expose: i }) {
|
|
13085
|
-
const { state: r } = Fn();
|
|
13086
|
-
|
|
13087
|
-
|
|
13088
|
-
|
|
13089
|
-
}
|
|
13090
|
-
i({ getModel: a });
|
|
13091
|
-
const { scene: c } = await Sh(b.path, { draco: b.draco, decoderPath: b.decoderPath });
|
|
13092
|
-
return s = c, r.scene && r.scene.add(c), () => {
|
|
13085
|
+
const { state: r } = Fn(), s = on();
|
|
13086
|
+
i({ model: s });
|
|
13087
|
+
const { scene: a } = await Sh(b.path, { draco: b.draco, decoderPath: b.decoderPath });
|
|
13088
|
+
return s.value = a, r.scene && r.scene.add(a), () => {
|
|
13093
13089
|
};
|
|
13094
13090
|
}
|
|
13095
13091
|
});
|