@xiping/react-components 1.0.20 → 1.0.21
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/cjs/components/confetti-button/index.d.ts +24 -0
- package/dist/cjs/components/confetti-button/index.js +1 -0
- package/dist/cjs/components/txt-editor/TxtEditor.js +1 -1
- package/dist/cjs/hooks/useStayTimeReport.d.ts +6 -0
- package/dist/cjs/hooks/useStayTimeReport.js +1 -0
- package/dist/cjs/index.d.ts +2 -0
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/node_modules/.pnpm/3d-force-graph@1.78.2/node_modules/3d-force-graph/dist/3d-force-graph.js +28 -0
- package/dist/cjs/node_modules/.pnpm/@tweenjs_tween.js@25.0.0/node_modules/@tweenjs/tween.js/dist/tween.esm.js +1 -0
- package/dist/cjs/node_modules/.pnpm/bowser@2.11.0/node_modules/bowser/src/bowser.js +6 -0
- package/dist/cjs/node_modules/.pnpm/bowser@2.11.0/node_modules/bowser/src/constants.js +1 -0
- package/dist/cjs/node_modules/.pnpm/bowser@2.11.0/node_modules/bowser/src/parser-browsers.js +1 -0
- package/dist/cjs/node_modules/.pnpm/bowser@2.11.0/node_modules/bowser/src/parser-engines.js +1 -0
- package/dist/cjs/node_modules/.pnpm/bowser@2.11.0/node_modules/bowser/src/parser-os.js +1 -0
- package/dist/cjs/node_modules/.pnpm/bowser@2.11.0/node_modules/bowser/src/parser-platforms.js +1 -0
- package/dist/cjs/node_modules/.pnpm/bowser@2.11.0/node_modules/bowser/src/parser.js +1 -0
- package/dist/cjs/node_modules/.pnpm/bowser@2.11.0/node_modules/bowser/src/utils.js +1 -0
- package/dist/cjs/node_modules/.pnpm/canvas-confetti@1.9.3/node_modules/canvas-confetti/dist/confetti.module.js +2 -0
- package/dist/cjs/node_modules/.pnpm/d3-array@3.2.4/node_modules/d3-array/src/max.js +1 -0
- package/dist/cjs/node_modules/.pnpm/d3-array@3.2.4/node_modules/d3-array/src/min.js +1 -0
- package/dist/cjs/node_modules/.pnpm/react-force-graph-3d@1.28.0_react@19.1.0/node_modules/react-force-graph-3d/dist/react-force-graph-3d.js +1 -0
- package/dist/cjs/node_modules/.pnpm/three-forcegraph@1.43.0_three@0.178.0/node_modules/three-forcegraph/dist/three-forcegraph.js +3 -0
- package/dist/cjs/node_modules/.pnpm/three-render-objects@1.40.3_three@0.178.0/node_modules/three-render-objects/dist/three-render-objects.js +18 -0
- package/dist/cjs/node_modules/.pnpm/three@0.178.0/node_modules/three/build/three.core.js +44 -0
- package/dist/cjs/node_modules/.pnpm/three@0.178.0/node_modules/three/build/three.module.js +3784 -0
- package/dist/cjs/node_modules/.pnpm/three@0.178.0/node_modules/three/build/three.webgpu.js +392 -0
- package/dist/cjs/node_modules/.pnpm/three@0.178.0/node_modules/three/examples/jsm/controls/DragControls.js +1 -0
- package/dist/cjs/node_modules/.pnpm/three@0.178.0/node_modules/three/examples/jsm/controls/FlyControls.js +1 -0
- package/dist/cjs/node_modules/.pnpm/three@0.178.0/node_modules/three/examples/jsm/controls/OrbitControls.js +1 -0
- package/dist/cjs/node_modules/.pnpm/three@0.178.0/node_modules/three/examples/jsm/controls/TrackballControls.js +1 -0
- package/dist/cjs/node_modules/.pnpm/three@0.178.0/node_modules/three/examples/jsm/postprocessing/ShaderPass.js +1 -0
- package/dist/cjs/react-components.css +1 -1
- package/dist/es/components/confetti-button/index.d.ts +24 -0
- package/dist/es/components/confetti-button/index.js +77 -0
- package/dist/es/components/txt-editor/TxtEditor.js +1 -1
- package/dist/es/hooks/useStayTimeReport.d.ts +6 -0
- package/dist/es/hooks/useStayTimeReport.js +31 -0
- package/dist/es/index.d.ts +2 -0
- package/dist/es/index.js +31 -26
- package/dist/es/node_modules/.pnpm/{3d-force-graph@1.77.0 → 3d-force-graph@1.78.2}/node_modules/3d-force-graph/dist/3d-force-graph.js +10 -10
- package/dist/es/node_modules/.pnpm/@tweenjs_tween.js@25.0.0/node_modules/@tweenjs/tween.js/dist/tween.esm.js +396 -0
- package/dist/es/node_modules/.pnpm/bowser@2.11.0/node_modules/bowser/src/bowser.js +55 -0
- package/dist/es/node_modules/.pnpm/bowser@2.11.0/node_modules/bowser/src/constants.js +113 -0
- package/dist/es/node_modules/.pnpm/bowser@2.11.0/node_modules/bowser/src/parser-browsers.js +404 -0
- package/dist/es/node_modules/.pnpm/bowser@2.11.0/node_modules/bowser/src/parser-engines.js +78 -0
- package/dist/es/node_modules/.pnpm/bowser@2.11.0/node_modules/bowser/src/parser-os.js +159 -0
- package/dist/es/node_modules/.pnpm/bowser@2.11.0/node_modules/bowser/src/parser-platforms.js +238 -0
- package/dist/es/node_modules/.pnpm/bowser@2.11.0/node_modules/bowser/src/parser.js +303 -0
- package/dist/es/node_modules/.pnpm/bowser@2.11.0/node_modules/bowser/src/utils.js +280 -0
- package/dist/es/node_modules/.pnpm/canvas-confetti@1.9.3/node_modules/canvas-confetti/dist/confetti.module.js +409 -0
- package/dist/es/node_modules/.pnpm/d3-array@3.2.4/node_modules/d3-array/src/max.js +15 -0
- package/dist/es/node_modules/.pnpm/d3-array@3.2.4/node_modules/d3-array/src/min.js +15 -0
- package/dist/es/node_modules/.pnpm/{react-force-graph-3d@1.27.0_react@18.3.1 → react-force-graph-3d@1.28.0_react@19.1.0}/node_modules/react-force-graph-3d/dist/react-force-graph-3d.js +5 -2
- package/dist/es/node_modules/.pnpm/three-forcegraph@1.43.0_three@0.178.0/node_modules/three-forcegraph/dist/three-forcegraph.js +1037 -0
- package/dist/es/node_modules/.pnpm/{three-render-objects@1.40.2_three@0.171.0 → three-render-objects@1.40.3_three@0.178.0}/node_modules/three-render-objects/dist/three-render-objects.js +10 -10
- package/dist/es/node_modules/.pnpm/three@0.178.0/node_modules/three/build/three.core.js +13236 -0
- package/dist/es/node_modules/.pnpm/{three@0.171.0 → three@0.178.0}/node_modules/three/build/three.module.js +3379 -3325
- package/dist/es/node_modules/.pnpm/three@0.178.0/node_modules/three/build/three.webgpu.js +24475 -0
- package/dist/es/node_modules/.pnpm/{three@0.171.0 → three@0.178.0}/node_modules/three/examples/jsm/controls/DragControls.js +15 -8
- package/dist/es/node_modules/.pnpm/{three@0.171.0 → three@0.178.0}/node_modules/three/examples/jsm/controls/FlyControls.js +26 -20
- package/dist/es/node_modules/.pnpm/{three@0.171.0 → three@0.178.0}/node_modules/three/examples/jsm/controls/OrbitControls.js +47 -10
- package/dist/es/node_modules/.pnpm/{three@0.171.0 → three@0.178.0}/node_modules/three/examples/jsm/controls/TrackballControls.js +16 -4
- package/dist/es/node_modules/.pnpm/{three@0.171.0 → three@0.178.0}/node_modules/three/examples/jsm/postprocessing/EffectComposer.js +62 -0
- package/dist/es/node_modules/.pnpm/{three@0.171.0 → three@0.178.0}/node_modules/three/examples/jsm/postprocessing/MaskPass.js +31 -0
- package/dist/es/node_modules/.pnpm/three@0.178.0/node_modules/three/examples/jsm/postprocessing/Pass.js +89 -0
- package/dist/es/node_modules/.pnpm/{three@0.171.0 → three@0.178.0}/node_modules/three/examples/jsm/postprocessing/RenderPass.js +21 -0
- package/dist/es/node_modules/.pnpm/three@0.178.0/node_modules/three/examples/jsm/postprocessing/ShaderPass.js +46 -0
- package/dist/es/react-components.css +1 -1
- package/package.json +29 -27
- package/dist/cjs/node_modules/.pnpm/3d-force-graph@1.77.0/node_modules/3d-force-graph/dist/3d-force-graph.js +0 -28
- package/dist/cjs/node_modules/.pnpm/@tweenjs_tween.js@23.1.3/node_modules/@tweenjs/tween.js/dist/tween.esm.js +0 -1
- package/dist/cjs/node_modules/.pnpm/d3-array@1.2.4/node_modules/d3-array/src/ascending.js +0 -1
- package/dist/cjs/node_modules/.pnpm/d3-array@1.2.4/node_modules/d3-array/src/bisect.js +0 -1
- package/dist/cjs/node_modules/.pnpm/d3-array@1.2.4/node_modules/d3-array/src/bisector.js +0 -1
- package/dist/cjs/node_modules/.pnpm/d3-array@1.2.4/node_modules/d3-array/src/max.js +0 -1
- package/dist/cjs/node_modules/.pnpm/d3-array@1.2.4/node_modules/d3-array/src/min.js +0 -1
- package/dist/cjs/node_modules/.pnpm/react-force-graph-3d@1.27.0_react@18.3.1/node_modules/react-force-graph-3d/dist/react-force-graph-3d.js +0 -1
- package/dist/cjs/node_modules/.pnpm/three-forcegraph@1.42.13_three@0.171.0/node_modules/three-forcegraph/dist/three-forcegraph.js +0 -3
- package/dist/cjs/node_modules/.pnpm/three-render-objects@1.40.2_three@0.171.0/node_modules/three-render-objects/dist/three-render-objects.js +0 -18
- package/dist/cjs/node_modules/.pnpm/three@0.171.0/node_modules/three/build/three.core.js +0 -44
- package/dist/cjs/node_modules/.pnpm/three@0.171.0/node_modules/three/build/three.module.js +0 -3789
- package/dist/cjs/node_modules/.pnpm/three@0.171.0/node_modules/three/build/three.webgpu.js +0 -373
- package/dist/cjs/node_modules/.pnpm/three@0.171.0/node_modules/three/examples/jsm/controls/DragControls.js +0 -1
- package/dist/cjs/node_modules/.pnpm/three@0.171.0/node_modules/three/examples/jsm/controls/FlyControls.js +0 -1
- package/dist/cjs/node_modules/.pnpm/three@0.171.0/node_modules/three/examples/jsm/controls/OrbitControls.js +0 -1
- package/dist/cjs/node_modules/.pnpm/three@0.171.0/node_modules/three/examples/jsm/controls/TrackballControls.js +0 -1
- package/dist/cjs/node_modules/.pnpm/three@0.171.0/node_modules/three/examples/jsm/postprocessing/ShaderPass.js +0 -1
- package/dist/es/node_modules/.pnpm/@tweenjs_tween.js@23.1.3/node_modules/@tweenjs/tween.js/dist/tween.esm.js +0 -379
- package/dist/es/node_modules/.pnpm/d3-array@1.2.4/node_modules/d3-array/src/ascending.js +0 -6
- package/dist/es/node_modules/.pnpm/d3-array@1.2.4/node_modules/d3-array/src/bisect.js +0 -3
- package/dist/es/node_modules/.pnpm/d3-array@1.2.4/node_modules/d3-array/src/bisector.js +0 -27
- package/dist/es/node_modules/.pnpm/d3-array@1.2.4/node_modules/d3-array/src/max.js +0 -17
- package/dist/es/node_modules/.pnpm/d3-array@1.2.4/node_modules/d3-array/src/min.js +0 -17
- package/dist/es/node_modules/.pnpm/three-forcegraph@1.42.13_three@0.171.0/node_modules/three-forcegraph/dist/three-forcegraph.js +0 -1020
- package/dist/es/node_modules/.pnpm/three@0.171.0/node_modules/three/build/three.core.js +0 -6662
- package/dist/es/node_modules/.pnpm/three@0.171.0/node_modules/three/build/three.webgpu.js +0 -13421
- package/dist/es/node_modules/.pnpm/three@0.171.0/node_modules/three/examples/jsm/postprocessing/Pass.js +0 -42
- package/dist/es/node_modules/.pnpm/three@0.171.0/node_modules/three/examples/jsm/postprocessing/ShaderPass.js +0 -23
- /package/dist/cjs/node_modules/.pnpm/{@monaco-editor_react@4.7.0_monaco-editor@0.52.2_react-dom@18.3.1_react@18.3.1__react@18.3.1 → @monaco-editor_react@4.7.0_monaco-editor@0.52.2_react-dom@19.1.0_react@19.1.0__react@19.1.0}/node_modules/@monaco-editor/react/dist/index.js +0 -0
- /package/dist/cjs/node_modules/.pnpm/{react-kapsule@2.5.7_react@18.3.1 → react-kapsule@2.5.7_react@19.1.0}/node_modules/react-kapsule/dist/react-kapsule.js +0 -0
- /package/dist/cjs/node_modules/.pnpm/{three@0.171.0 → three@0.178.0}/node_modules/three/examples/jsm/postprocessing/EffectComposer.js +0 -0
- /package/dist/cjs/node_modules/.pnpm/{three@0.171.0 → three@0.178.0}/node_modules/three/examples/jsm/postprocessing/MaskPass.js +0 -0
- /package/dist/cjs/node_modules/.pnpm/{three@0.171.0 → three@0.178.0}/node_modules/three/examples/jsm/postprocessing/Pass.js +0 -0
- /package/dist/cjs/node_modules/.pnpm/{three@0.171.0 → three@0.178.0}/node_modules/three/examples/jsm/postprocessing/RenderPass.js +0 -0
- /package/dist/cjs/node_modules/.pnpm/{three@0.171.0 → three@0.178.0}/node_modules/three/examples/jsm/shaders/CopyShader.js +0 -0
- /package/dist/es/node_modules/.pnpm/{@monaco-editor_react@4.7.0_monaco-editor@0.52.2_react-dom@18.3.1_react@18.3.1__react@18.3.1 → @monaco-editor_react@4.7.0_monaco-editor@0.52.2_react-dom@19.1.0_react@19.1.0__react@19.1.0}/node_modules/@monaco-editor/react/dist/index.js +0 -0
- /package/dist/es/node_modules/.pnpm/{react-kapsule@2.5.7_react@18.3.1 → react-kapsule@2.5.7_react@19.1.0}/node_modules/react-kapsule/dist/react-kapsule.js +0 -0
- /package/dist/es/node_modules/.pnpm/{three@0.171.0 → three@0.178.0}/node_modules/three/examples/jsm/shaders/CopyShader.js +0 -0
|
@@ -1,1020 +0,0 @@
|
|
|
1
|
-
import "../../../../three@0.171.0/node_modules/three/build/three.module.js";
|
|
2
|
-
import Fe from "../../../../../../_virtual/index4.js";
|
|
3
|
-
import Ue from "../../../../../../_virtual/index5.js";
|
|
4
|
-
import Ie from "../../../../kapsule@1.16.3/node_modules/kapsule/dist/kapsule.js";
|
|
5
|
-
import w from "../../../../accessor-fn@1.5.3/node_modules/accessor-fn/dist/accessor-fn.js";
|
|
6
|
-
import "../../../../d3-array@1.2.4/node_modules/d3-array/src/bisect.js";
|
|
7
|
-
import Ge from "../../../../d3-array@1.2.4/node_modules/d3-array/src/max.js";
|
|
8
|
-
import Ve from "../../../../d3-array@1.2.4/node_modules/d3-array/src/min.js";
|
|
9
|
-
import He from "../../../../data-bind-mapper@1.0.3/node_modules/data-bind-mapper/dist/data-bind-mapper.js";
|
|
10
|
-
import Oe from "../../../../tinycolor2@1.6.0/node_modules/tinycolor2/esm/tinycolor.js";
|
|
11
|
-
import { Group as ke, Mesh as Ne, SphereGeometry as We, Color as $e, MeshLambertMaterial as qe, BufferGeometry as Ke, BufferAttribute as Je, Line as Qe, CylinderGeometry as Xe, Matrix4 as Ye, Box3 as Ze, CubicBezierCurve3 as er, QuadraticBezierCurve3 as rr, LineBasicMaterial as nr, ConeGeometry as tr, TubeGeometry as or, Vector3 as ar } from "../../../../three@0.171.0/node_modules/three/build/three.core.js";
|
|
12
|
-
import ir from "../../../../d3-force-3d@3.0.6/node_modules/d3-force-3d/src/radial.js";
|
|
13
|
-
import lr from "../../../../d3-force-3d@3.0.6/node_modules/d3-force-3d/src/simulation.js";
|
|
14
|
-
import ur from "../../../../d3-force-3d@3.0.6/node_modules/d3-force-3d/src/link.js";
|
|
15
|
-
import cr from "../../../../d3-force-3d@3.0.6/node_modules/d3-force-3d/src/manyBody.js";
|
|
16
|
-
import fr from "../../../../d3-force-3d@3.0.6/node_modules/d3-force-3d/src/center.js";
|
|
17
|
-
import dr from "../../../../d3-scale@4.0.2/node_modules/d3-scale/src/ordinal.js";
|
|
18
|
-
import pr from "../../../../d3-scale-chromatic@3.1.0/node_modules/d3-scale-chromatic/src/categorical/Paired.js";
|
|
19
|
-
function fe(r, e) {
|
|
20
|
-
(e == null || e > r.length) && (e = r.length);
|
|
21
|
-
for (var n = 0, t = Array(e); n < e; n++) t[n] = r[n];
|
|
22
|
-
return t;
|
|
23
|
-
}
|
|
24
|
-
function sr(r) {
|
|
25
|
-
if (Array.isArray(r)) return r;
|
|
26
|
-
}
|
|
27
|
-
function hr(r) {
|
|
28
|
-
if (Array.isArray(r)) return fe(r);
|
|
29
|
-
}
|
|
30
|
-
function De(r, e, n) {
|
|
31
|
-
if (typeof r == "function" ? r === e : r.has(e)) return arguments.length < 3 ? e : n;
|
|
32
|
-
throw new TypeError("Private element is not present on this object");
|
|
33
|
-
}
|
|
34
|
-
function gr(r) {
|
|
35
|
-
if (r === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
36
|
-
return r;
|
|
37
|
-
}
|
|
38
|
-
function Pe(r, e, n) {
|
|
39
|
-
return e = q(e), kr(r, ge() ? Reflect.construct(e, n || [], q(r).constructor) : e.apply(r, n));
|
|
40
|
-
}
|
|
41
|
-
function yr(r, e) {
|
|
42
|
-
if (e.has(r)) throw new TypeError("Cannot initialize the same private elements twice on an object");
|
|
43
|
-
}
|
|
44
|
-
function Ce(r, e) {
|
|
45
|
-
if (!(r instanceof e)) throw new TypeError("Cannot call a class as a function");
|
|
46
|
-
}
|
|
47
|
-
function ae(r, e) {
|
|
48
|
-
return r.get(De(r, e));
|
|
49
|
-
}
|
|
50
|
-
function ve(r, e, n) {
|
|
51
|
-
yr(r, e), e.set(r, n);
|
|
52
|
-
}
|
|
53
|
-
function me(r, e, n) {
|
|
54
|
-
return r.set(De(r, e), n), n;
|
|
55
|
-
}
|
|
56
|
-
function Me(r, e, n) {
|
|
57
|
-
if (ge()) return Reflect.construct.apply(null, arguments);
|
|
58
|
-
var t = [null];
|
|
59
|
-
t.push.apply(t, e);
|
|
60
|
-
var i = new (r.bind.apply(r, t))();
|
|
61
|
-
return i;
|
|
62
|
-
}
|
|
63
|
-
function vr(r, e) {
|
|
64
|
-
for (var n = 0; n < e.length; n++) {
|
|
65
|
-
var t = e[n];
|
|
66
|
-
t.enumerable = t.enumerable || !1, t.configurable = !0, "value" in t && (t.writable = !0), Object.defineProperty(r, Te(t.key), t);
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
function xe(r, e, n) {
|
|
70
|
-
return e && vr(r.prototype, e), Object.defineProperty(r, "prototype", {
|
|
71
|
-
writable: !1
|
|
72
|
-
}), r;
|
|
73
|
-
}
|
|
74
|
-
function te(r, e, n) {
|
|
75
|
-
return (e = Te(e)) in r ? Object.defineProperty(r, e, {
|
|
76
|
-
value: n,
|
|
77
|
-
enumerable: !0,
|
|
78
|
-
configurable: !0,
|
|
79
|
-
writable: !0
|
|
80
|
-
}) : r[e] = n, r;
|
|
81
|
-
}
|
|
82
|
-
function de() {
|
|
83
|
-
return de = typeof Reflect < "u" && Reflect.get ? Reflect.get.bind() : function(r, e, n) {
|
|
84
|
-
var t = Dr(r, e);
|
|
85
|
-
if (t) {
|
|
86
|
-
var i = Object.getOwnPropertyDescriptor(t, e);
|
|
87
|
-
return i.get ? i.get.call(arguments.length < 3 ? r : n) : i.value;
|
|
88
|
-
}
|
|
89
|
-
}, de.apply(null, arguments);
|
|
90
|
-
}
|
|
91
|
-
function q(r) {
|
|
92
|
-
return q = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(e) {
|
|
93
|
-
return e.__proto__ || Object.getPrototypeOf(e);
|
|
94
|
-
}, q(r);
|
|
95
|
-
}
|
|
96
|
-
function Ae(r, e) {
|
|
97
|
-
if (typeof e != "function" && e !== null) throw new TypeError("Super expression must either be null or a function");
|
|
98
|
-
r.prototype = Object.create(e && e.prototype, {
|
|
99
|
-
constructor: {
|
|
100
|
-
value: r,
|
|
101
|
-
writable: !0,
|
|
102
|
-
configurable: !0
|
|
103
|
-
}
|
|
104
|
-
}), Object.defineProperty(r, "prototype", {
|
|
105
|
-
writable: !1
|
|
106
|
-
}), e && pe(r, e);
|
|
107
|
-
}
|
|
108
|
-
function ge() {
|
|
109
|
-
try {
|
|
110
|
-
var r = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
|
|
111
|
-
}));
|
|
112
|
-
} catch {
|
|
113
|
-
}
|
|
114
|
-
return (ge = function() {
|
|
115
|
-
return !!r;
|
|
116
|
-
})();
|
|
117
|
-
}
|
|
118
|
-
function mr(r) {
|
|
119
|
-
if (typeof Symbol < "u" && r[Symbol.iterator] != null || r["@@iterator"] != null) return Array.from(r);
|
|
120
|
-
}
|
|
121
|
-
function br(r, e) {
|
|
122
|
-
var n = r == null ? null : typeof Symbol < "u" && r[Symbol.iterator] || r["@@iterator"];
|
|
123
|
-
if (n != null) {
|
|
124
|
-
var t, i, c, p, h = [], P = !0, _ = !1;
|
|
125
|
-
try {
|
|
126
|
-
if (c = (n = n.call(r)).next, e !== 0) for (; !(P = (t = c.call(n)).done) && (h.push(t.value), h.length !== e); P = !0) ;
|
|
127
|
-
} catch (T) {
|
|
128
|
-
_ = !0, i = T;
|
|
129
|
-
} finally {
|
|
130
|
-
try {
|
|
131
|
-
if (!P && n.return != null && (p = n.return(), Object(p) !== p)) return;
|
|
132
|
-
} finally {
|
|
133
|
-
if (_) throw i;
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
return h;
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
function _r() {
|
|
140
|
-
throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
141
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
142
|
-
}
|
|
143
|
-
function wr() {
|
|
144
|
-
throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
145
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
146
|
-
}
|
|
147
|
-
function be(r, e) {
|
|
148
|
-
var n = Object.keys(r);
|
|
149
|
-
if (Object.getOwnPropertySymbols) {
|
|
150
|
-
var t = Object.getOwnPropertySymbols(r);
|
|
151
|
-
e && (t = t.filter(function(i) {
|
|
152
|
-
return Object.getOwnPropertyDescriptor(r, i).enumerable;
|
|
153
|
-
})), n.push.apply(n, t);
|
|
154
|
-
}
|
|
155
|
-
return n;
|
|
156
|
-
}
|
|
157
|
-
function Or(r) {
|
|
158
|
-
for (var e = 1; e < arguments.length; e++) {
|
|
159
|
-
var n = arguments[e] != null ? arguments[e] : {};
|
|
160
|
-
e % 2 ? be(Object(n), !0).forEach(function(t) {
|
|
161
|
-
te(r, t, n[t]);
|
|
162
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(r, Object.getOwnPropertyDescriptors(n)) : be(Object(n)).forEach(function(t) {
|
|
163
|
-
Object.defineProperty(r, t, Object.getOwnPropertyDescriptor(n, t));
|
|
164
|
-
});
|
|
165
|
-
}
|
|
166
|
-
return r;
|
|
167
|
-
}
|
|
168
|
-
function kr(r, e) {
|
|
169
|
-
if (e && (typeof e == "object" || typeof e == "function")) return e;
|
|
170
|
-
if (e !== void 0) throw new TypeError("Derived constructors may only return object or undefined");
|
|
171
|
-
return gr(r);
|
|
172
|
-
}
|
|
173
|
-
function pe(r, e) {
|
|
174
|
-
return pe = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(n, t) {
|
|
175
|
-
return n.__proto__ = t, n;
|
|
176
|
-
}, pe(r, e);
|
|
177
|
-
}
|
|
178
|
-
function X(r, e) {
|
|
179
|
-
return sr(r) || br(r, e) || je(r, e) || _r();
|
|
180
|
-
}
|
|
181
|
-
function Dr(r, e) {
|
|
182
|
-
for (; !{}.hasOwnProperty.call(r, e) && (r = q(r)) !== null; ) ;
|
|
183
|
-
return r;
|
|
184
|
-
}
|
|
185
|
-
function ie(r, e, n, t) {
|
|
186
|
-
var i = de(q(r.prototype), e, n);
|
|
187
|
-
return typeof i == "function" ? function(c) {
|
|
188
|
-
return i.apply(n, c);
|
|
189
|
-
} : i;
|
|
190
|
-
}
|
|
191
|
-
function U(r) {
|
|
192
|
-
return hr(r) || mr(r) || je(r) || wr();
|
|
193
|
-
}
|
|
194
|
-
function Pr(r, e) {
|
|
195
|
-
if (typeof r != "object" || !r) return r;
|
|
196
|
-
var n = r[Symbol.toPrimitive];
|
|
197
|
-
if (n !== void 0) {
|
|
198
|
-
var t = n.call(r, e);
|
|
199
|
-
if (typeof t != "object") return t;
|
|
200
|
-
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
201
|
-
}
|
|
202
|
-
return (e === "string" ? String : Number)(r);
|
|
203
|
-
}
|
|
204
|
-
function Te(r) {
|
|
205
|
-
var e = Pr(r, "string");
|
|
206
|
-
return typeof e == "symbol" ? e : e + "";
|
|
207
|
-
}
|
|
208
|
-
function se(r) {
|
|
209
|
-
"@babel/helpers - typeof";
|
|
210
|
-
return se = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
|
|
211
|
-
return typeof e;
|
|
212
|
-
} : function(e) {
|
|
213
|
-
return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
|
|
214
|
-
}, se(r);
|
|
215
|
-
}
|
|
216
|
-
function je(r, e) {
|
|
217
|
-
if (r) {
|
|
218
|
-
if (typeof r == "string") return fe(r, e);
|
|
219
|
-
var n = {}.toString.call(r).slice(8, -1);
|
|
220
|
-
return n === "Object" && r.constructor && (n = r.constructor.name), n === "Map" || n === "Set" ? Array.from(r) : n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n) ? fe(r, e) : void 0;
|
|
221
|
-
}
|
|
222
|
-
}
|
|
223
|
-
var Re = function(e) {
|
|
224
|
-
e instanceof Array ? e.forEach(Re) : (e.map && e.map.dispose(), e.dispose());
|
|
225
|
-
}, Ee = function(e) {
|
|
226
|
-
e.geometry && e.geometry.dispose(), e.material && Re(e.material), e.texture && e.texture.dispose(), e.children && e.children.forEach(Ee);
|
|
227
|
-
}, he = function(e) {
|
|
228
|
-
for (; e.children.length; ) {
|
|
229
|
-
var n = e.children[0];
|
|
230
|
-
e.remove(n), Ee(n);
|
|
231
|
-
}
|
|
232
|
-
}, le = /* @__PURE__ */ new WeakMap(), re = /* @__PURE__ */ new WeakMap(), J = /* @__PURE__ */ function(r) {
|
|
233
|
-
function e(n) {
|
|
234
|
-
var t, i = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, c = i.dataBindAttr, p = c === void 0 ? "__data" : c, h = i.objBindAttr, P = h === void 0 ? "__threeObj" : h;
|
|
235
|
-
return Ce(this, e), t = Pe(this, e), te(t, "scene", void 0), ve(t, le, void 0), ve(t, re, void 0), t.scene = n, me(le, t, p), me(re, t, P), t.onRemoveObj(function() {
|
|
236
|
-
}), t;
|
|
237
|
-
}
|
|
238
|
-
return Ae(e, r), xe(e, [{
|
|
239
|
-
key: "onCreateObj",
|
|
240
|
-
value: function(t) {
|
|
241
|
-
var i = this;
|
|
242
|
-
return ie(e, "onCreateObj", this)([function(c) {
|
|
243
|
-
var p = t(c);
|
|
244
|
-
return c[ae(re, i)] = p, p[ae(le, i)] = c, i.scene.add(p), p;
|
|
245
|
-
}]), this;
|
|
246
|
-
}
|
|
247
|
-
}, {
|
|
248
|
-
key: "onRemoveObj",
|
|
249
|
-
value: function(t) {
|
|
250
|
-
var i = this;
|
|
251
|
-
return ie(e, "onRemoveObj", this)([function(c, p) {
|
|
252
|
-
var h = ie(e, "getData", i)([c]);
|
|
253
|
-
t(c, p), i.scene.remove(c), he(c), delete h[ae(re, i)];
|
|
254
|
-
}]), this;
|
|
255
|
-
}
|
|
256
|
-
}]);
|
|
257
|
-
}(He), Q = function(e) {
|
|
258
|
-
return isNaN(e) ? parseInt(Oe(e).toHex(), 16) : e;
|
|
259
|
-
}, ue = function(e) {
|
|
260
|
-
return isNaN(e) ? Oe(e).getAlpha() : 1;
|
|
261
|
-
}, Cr = dr(pr);
|
|
262
|
-
function _e(r, e, n) {
|
|
263
|
-
!e || typeof n != "string" || r.filter(function(t) {
|
|
264
|
-
return !t[n];
|
|
265
|
-
}).forEach(function(t) {
|
|
266
|
-
t[n] = Cr(e(t));
|
|
267
|
-
});
|
|
268
|
-
}
|
|
269
|
-
function Mr(r, e) {
|
|
270
|
-
var n = r.nodes, t = r.links, i = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, c = i.nodeFilter, p = c === void 0 ? function() {
|
|
271
|
-
return !0;
|
|
272
|
-
} : c, h = i.onLoopError, P = h === void 0 ? function(g) {
|
|
273
|
-
throw "Invalid DAG structure! Found cycle in node path: ".concat(g.join(" -> "), ".");
|
|
274
|
-
} : h, _ = {};
|
|
275
|
-
n.forEach(function(g) {
|
|
276
|
-
return _[e(g)] = {
|
|
277
|
-
data: g,
|
|
278
|
-
out: [],
|
|
279
|
-
depth: -1,
|
|
280
|
-
skip: !p(g)
|
|
281
|
-
};
|
|
282
|
-
}), t.forEach(function(g) {
|
|
283
|
-
var u = g.source, f = g.target, k = m(u), a = m(f);
|
|
284
|
-
if (!_.hasOwnProperty(k)) throw "Missing source node with id: ".concat(k);
|
|
285
|
-
if (!_.hasOwnProperty(a)) throw "Missing target node with id: ".concat(a);
|
|
286
|
-
var v = _[k], L = _[a];
|
|
287
|
-
v.out.push(L);
|
|
288
|
-
function m(D) {
|
|
289
|
-
return se(D) === "object" ? e(D) : D;
|
|
290
|
-
}
|
|
291
|
-
});
|
|
292
|
-
var T = [];
|
|
293
|
-
O(Object.values(_));
|
|
294
|
-
var A = Object.assign.apply(Object, [{}].concat(U(Object.entries(_).filter(function(g) {
|
|
295
|
-
var u = X(g, 2), f = u[1];
|
|
296
|
-
return !f.skip;
|
|
297
|
-
}).map(function(g) {
|
|
298
|
-
var u = X(g, 2), f = u[0], k = u[1];
|
|
299
|
-
return te({}, f, k.depth);
|
|
300
|
-
}))));
|
|
301
|
-
return A;
|
|
302
|
-
function O(g) {
|
|
303
|
-
for (var u = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [], f = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 0, k = function() {
|
|
304
|
-
var m = g[a];
|
|
305
|
-
if (u.indexOf(m) !== -1) {
|
|
306
|
-
var D = [].concat(U(u.slice(u.indexOf(m))), [m]).map(function(s) {
|
|
307
|
-
return e(s.data);
|
|
308
|
-
});
|
|
309
|
-
return T.some(function(s) {
|
|
310
|
-
return s.length === D.length && s.every(function(M, S) {
|
|
311
|
-
return M === D[S];
|
|
312
|
-
});
|
|
313
|
-
}) || (T.push(D), P(D)), 1;
|
|
314
|
-
}
|
|
315
|
-
f > m.depth && (m.depth = f, O(m.out, [].concat(U(u), [m]), f + (m.skip ? 0 : 1)));
|
|
316
|
-
}, a = 0, v = g.length; a < v; a++)
|
|
317
|
-
k();
|
|
318
|
-
}
|
|
319
|
-
}
|
|
320
|
-
var l = window.THREE ? window.THREE : {
|
|
321
|
-
Group: ke,
|
|
322
|
-
Mesh: Ne,
|
|
323
|
-
MeshLambertMaterial: qe,
|
|
324
|
-
Color: $e,
|
|
325
|
-
BufferGeometry: Ke,
|
|
326
|
-
BufferAttribute: Je,
|
|
327
|
-
Matrix4: Ye,
|
|
328
|
-
Vector3: ar,
|
|
329
|
-
SphereGeometry: We,
|
|
330
|
-
CylinderGeometry: Xe,
|
|
331
|
-
TubeGeometry: or,
|
|
332
|
-
ConeGeometry: tr,
|
|
333
|
-
Line: Qe,
|
|
334
|
-
LineBasicMaterial: nr,
|
|
335
|
-
QuadraticBezierCurve3: rr,
|
|
336
|
-
CubicBezierCurve3: er,
|
|
337
|
-
Box3: Ze
|
|
338
|
-
}, we = {
|
|
339
|
-
graph: Fe,
|
|
340
|
-
forcelayout: Ue
|
|
341
|
-
}, xr = 2, ce = new l.BufferGeometry().setAttribute ? "setAttribute" : "addAttribute", ne = new l.BufferGeometry().applyMatrix4 ? "applyMatrix4" : "applyMatrix", Ar = Ie({
|
|
342
|
-
props: {
|
|
343
|
-
jsonUrl: {
|
|
344
|
-
onChange: function(e, n) {
|
|
345
|
-
var t = this;
|
|
346
|
-
e && !n.fetchingJson && (n.fetchingJson = !0, n.onLoading(), fetch(e).then(function(i) {
|
|
347
|
-
return i.json();
|
|
348
|
-
}).then(function(i) {
|
|
349
|
-
n.fetchingJson = !1, n.onFinishLoading(i), t.graphData(i);
|
|
350
|
-
}));
|
|
351
|
-
},
|
|
352
|
-
triggerUpdate: !1
|
|
353
|
-
},
|
|
354
|
-
graphData: {
|
|
355
|
-
default: {
|
|
356
|
-
nodes: [],
|
|
357
|
-
links: []
|
|
358
|
-
},
|
|
359
|
-
onChange: function(e, n) {
|
|
360
|
-
n.engineRunning = !1;
|
|
361
|
-
}
|
|
362
|
-
},
|
|
363
|
-
numDimensions: {
|
|
364
|
-
default: 3,
|
|
365
|
-
onChange: function(e, n) {
|
|
366
|
-
var t = n.d3ForceLayout.force("charge");
|
|
367
|
-
t && t.strength(e > 2 ? -60 : -30), e < 3 && i(n.graphData.nodes, "z"), e < 2 && i(n.graphData.nodes, "y");
|
|
368
|
-
function i(c, p) {
|
|
369
|
-
c.forEach(function(h) {
|
|
370
|
-
delete h[p], delete h["v".concat(p)];
|
|
371
|
-
});
|
|
372
|
-
}
|
|
373
|
-
}
|
|
374
|
-
},
|
|
375
|
-
dagMode: {
|
|
376
|
-
onChange: function(e, n) {
|
|
377
|
-
!e && n.forceEngine === "d3" && (n.graphData.nodes || []).forEach(function(t) {
|
|
378
|
-
return t.fx = t.fy = t.fz = void 0;
|
|
379
|
-
});
|
|
380
|
-
}
|
|
381
|
-
},
|
|
382
|
-
dagLevelDistance: {},
|
|
383
|
-
dagNodeFilter: {
|
|
384
|
-
default: function(e) {
|
|
385
|
-
return !0;
|
|
386
|
-
}
|
|
387
|
-
},
|
|
388
|
-
onDagError: {
|
|
389
|
-
triggerUpdate: !1
|
|
390
|
-
},
|
|
391
|
-
nodeRelSize: {
|
|
392
|
-
default: 4
|
|
393
|
-
},
|
|
394
|
-
// volume per val unit
|
|
395
|
-
nodeId: {
|
|
396
|
-
default: "id"
|
|
397
|
-
},
|
|
398
|
-
nodeVal: {
|
|
399
|
-
default: "val"
|
|
400
|
-
},
|
|
401
|
-
nodeResolution: {
|
|
402
|
-
default: 8
|
|
403
|
-
},
|
|
404
|
-
// how many slice segments in the sphere's circumference
|
|
405
|
-
nodeColor: {
|
|
406
|
-
default: "color"
|
|
407
|
-
},
|
|
408
|
-
nodeAutoColorBy: {},
|
|
409
|
-
nodeOpacity: {
|
|
410
|
-
default: 0.75
|
|
411
|
-
},
|
|
412
|
-
nodeVisibility: {
|
|
413
|
-
default: !0
|
|
414
|
-
},
|
|
415
|
-
nodeThreeObject: {},
|
|
416
|
-
nodeThreeObjectExtend: {
|
|
417
|
-
default: !1
|
|
418
|
-
},
|
|
419
|
-
nodePositionUpdate: {
|
|
420
|
-
triggerUpdate: !1
|
|
421
|
-
},
|
|
422
|
-
// custom function to call for updating the node's position. Signature: (threeObj, { x, y, z}, node). If the function returns a truthy value, the regular node position update will not run.
|
|
423
|
-
linkSource: {
|
|
424
|
-
default: "source"
|
|
425
|
-
},
|
|
426
|
-
linkTarget: {
|
|
427
|
-
default: "target"
|
|
428
|
-
},
|
|
429
|
-
linkVisibility: {
|
|
430
|
-
default: !0
|
|
431
|
-
},
|
|
432
|
-
linkColor: {
|
|
433
|
-
default: "color"
|
|
434
|
-
},
|
|
435
|
-
linkAutoColorBy: {},
|
|
436
|
-
linkOpacity: {
|
|
437
|
-
default: 0.2
|
|
438
|
-
},
|
|
439
|
-
linkWidth: {},
|
|
440
|
-
// Rounded to nearest decimal. For falsy values use dimensionless line with 1px regardless of distance.
|
|
441
|
-
linkResolution: {
|
|
442
|
-
default: 6
|
|
443
|
-
},
|
|
444
|
-
// how many radial segments in each line tube's geometry
|
|
445
|
-
linkCurvature: {
|
|
446
|
-
default: 0,
|
|
447
|
-
triggerUpdate: !1
|
|
448
|
-
},
|
|
449
|
-
// line curvature radius (0: straight, 1: semi-circle)
|
|
450
|
-
linkCurveRotation: {
|
|
451
|
-
default: 0,
|
|
452
|
-
triggerUpdate: !1
|
|
453
|
-
},
|
|
454
|
-
// line curve rotation along the line axis (0: interection with XY plane, PI: upside down)
|
|
455
|
-
linkMaterial: {},
|
|
456
|
-
linkThreeObject: {},
|
|
457
|
-
linkThreeObjectExtend: {
|
|
458
|
-
default: !1
|
|
459
|
-
},
|
|
460
|
-
linkPositionUpdate: {
|
|
461
|
-
triggerUpdate: !1
|
|
462
|
-
},
|
|
463
|
-
// custom function to call for updating the link's position. Signature: (threeObj, { start: { x, y, z}, end: { x, y, z }}, link). If the function returns a truthy value, the regular link position update will not run.
|
|
464
|
-
linkDirectionalArrowLength: {
|
|
465
|
-
default: 0
|
|
466
|
-
},
|
|
467
|
-
linkDirectionalArrowColor: {},
|
|
468
|
-
linkDirectionalArrowRelPos: {
|
|
469
|
-
default: 0.5,
|
|
470
|
-
triggerUpdate: !1
|
|
471
|
-
},
|
|
472
|
-
// value between 0<>1 indicating the relative pos along the (exposed) line
|
|
473
|
-
linkDirectionalArrowResolution: {
|
|
474
|
-
default: 8
|
|
475
|
-
},
|
|
476
|
-
// how many slice segments in the arrow's conic circumference
|
|
477
|
-
linkDirectionalParticles: {
|
|
478
|
-
default: 0
|
|
479
|
-
},
|
|
480
|
-
// animate photons travelling in the link direction
|
|
481
|
-
linkDirectionalParticleSpeed: {
|
|
482
|
-
default: 0.01,
|
|
483
|
-
triggerUpdate: !1
|
|
484
|
-
},
|
|
485
|
-
// in link length ratio per frame
|
|
486
|
-
linkDirectionalParticleWidth: {
|
|
487
|
-
default: 0.5
|
|
488
|
-
},
|
|
489
|
-
linkDirectionalParticleColor: {},
|
|
490
|
-
linkDirectionalParticleResolution: {
|
|
491
|
-
default: 4
|
|
492
|
-
},
|
|
493
|
-
// how many slice segments in the particle sphere's circumference
|
|
494
|
-
forceEngine: {
|
|
495
|
-
default: "d3"
|
|
496
|
-
},
|
|
497
|
-
// d3 or ngraph
|
|
498
|
-
d3AlphaMin: {
|
|
499
|
-
default: 0
|
|
500
|
-
},
|
|
501
|
-
d3AlphaDecay: {
|
|
502
|
-
default: 0.0228,
|
|
503
|
-
triggerUpdate: !1,
|
|
504
|
-
onChange: function(e, n) {
|
|
505
|
-
n.d3ForceLayout.alphaDecay(e);
|
|
506
|
-
}
|
|
507
|
-
},
|
|
508
|
-
d3AlphaTarget: {
|
|
509
|
-
default: 0,
|
|
510
|
-
triggerUpdate: !1,
|
|
511
|
-
onChange: function(e, n) {
|
|
512
|
-
n.d3ForceLayout.alphaTarget(e);
|
|
513
|
-
}
|
|
514
|
-
},
|
|
515
|
-
d3VelocityDecay: {
|
|
516
|
-
default: 0.4,
|
|
517
|
-
triggerUpdate: !1,
|
|
518
|
-
onChange: function(e, n) {
|
|
519
|
-
n.d3ForceLayout.velocityDecay(e);
|
|
520
|
-
}
|
|
521
|
-
},
|
|
522
|
-
ngraphPhysics: {
|
|
523
|
-
default: {
|
|
524
|
-
// defaults from https://github.com/anvaka/ngraph.physics.simulator/blob/master/index.js
|
|
525
|
-
timeStep: 20,
|
|
526
|
-
gravity: -1.2,
|
|
527
|
-
theta: 0.8,
|
|
528
|
-
springLength: 30,
|
|
529
|
-
springCoefficient: 8e-4,
|
|
530
|
-
dragCoefficient: 0.02
|
|
531
|
-
}
|
|
532
|
-
},
|
|
533
|
-
warmupTicks: {
|
|
534
|
-
default: 0,
|
|
535
|
-
triggerUpdate: !1
|
|
536
|
-
},
|
|
537
|
-
// how many times to tick the force engine at init before starting to render
|
|
538
|
-
cooldownTicks: {
|
|
539
|
-
default: 1 / 0,
|
|
540
|
-
triggerUpdate: !1
|
|
541
|
-
},
|
|
542
|
-
cooldownTime: {
|
|
543
|
-
default: 15e3,
|
|
544
|
-
triggerUpdate: !1
|
|
545
|
-
},
|
|
546
|
-
// ms
|
|
547
|
-
onLoading: {
|
|
548
|
-
default: function() {
|
|
549
|
-
},
|
|
550
|
-
triggerUpdate: !1
|
|
551
|
-
},
|
|
552
|
-
onFinishLoading: {
|
|
553
|
-
default: function() {
|
|
554
|
-
},
|
|
555
|
-
triggerUpdate: !1
|
|
556
|
-
},
|
|
557
|
-
onUpdate: {
|
|
558
|
-
default: function() {
|
|
559
|
-
},
|
|
560
|
-
triggerUpdate: !1
|
|
561
|
-
},
|
|
562
|
-
onFinishUpdate: {
|
|
563
|
-
default: function() {
|
|
564
|
-
},
|
|
565
|
-
triggerUpdate: !1
|
|
566
|
-
},
|
|
567
|
-
onEngineTick: {
|
|
568
|
-
default: function() {
|
|
569
|
-
},
|
|
570
|
-
triggerUpdate: !1
|
|
571
|
-
},
|
|
572
|
-
onEngineStop: {
|
|
573
|
-
default: function() {
|
|
574
|
-
},
|
|
575
|
-
triggerUpdate: !1
|
|
576
|
-
}
|
|
577
|
-
},
|
|
578
|
-
methods: {
|
|
579
|
-
refresh: function(e) {
|
|
580
|
-
return e._flushObjects = !0, e._rerender(), this;
|
|
581
|
-
},
|
|
582
|
-
// Expose d3 forces for external manipulation
|
|
583
|
-
d3Force: function(e, n, t) {
|
|
584
|
-
return t === void 0 ? e.d3ForceLayout.force(n) : (e.d3ForceLayout.force(n, t), this);
|
|
585
|
-
},
|
|
586
|
-
d3ReheatSimulation: function(e) {
|
|
587
|
-
return e.d3ForceLayout.alpha(1), this.resetCountdown(), this;
|
|
588
|
-
},
|
|
589
|
-
// reset cooldown state
|
|
590
|
-
resetCountdown: function(e) {
|
|
591
|
-
return e.cntTicks = 0, e.startTickTime = /* @__PURE__ */ new Date(), e.engineRunning = !0, this;
|
|
592
|
-
},
|
|
593
|
-
tickFrame: function(e) {
|
|
594
|
-
var n = e.forceEngine !== "ngraph";
|
|
595
|
-
return e.engineRunning && t(), i(), c(), this;
|
|
596
|
-
function t() {
|
|
597
|
-
++e.cntTicks > e.cooldownTicks || /* @__PURE__ */ new Date() - e.startTickTime > e.cooldownTime || n && e.d3AlphaMin > 0 && e.d3ForceLayout.alpha() < e.d3AlphaMin ? (e.engineRunning = !1, e.onEngineStop()) : (e.layout[n ? "tick" : "step"](), e.onEngineTick());
|
|
598
|
-
var p = w(e.nodeThreeObjectExtend);
|
|
599
|
-
e.nodeDataMapper.entries().forEach(function(O) {
|
|
600
|
-
var g = X(O, 2), u = g[0], f = g[1];
|
|
601
|
-
if (f) {
|
|
602
|
-
var k = n ? u : e.layout.getNodePosition(u[e.nodeId]), a = p(u);
|
|
603
|
-
(!e.nodePositionUpdate || !e.nodePositionUpdate(a ? f.children[0] : f, {
|
|
604
|
-
x: k.x,
|
|
605
|
-
y: k.y,
|
|
606
|
-
z: k.z
|
|
607
|
-
}, u) || a) && (f.position.x = k.x, f.position.y = k.y || 0, f.position.z = k.z || 0);
|
|
608
|
-
}
|
|
609
|
-
});
|
|
610
|
-
var h = w(e.linkWidth), P = w(e.linkCurvature), _ = w(e.linkCurveRotation), T = w(e.linkThreeObjectExtend);
|
|
611
|
-
e.linkDataMapper.entries().forEach(function(O) {
|
|
612
|
-
var g = X(O, 2), u = g[0], f = g[1];
|
|
613
|
-
if (f) {
|
|
614
|
-
var k = n ? u : e.layout.getLinkPosition(e.layout.graph.getLink(u.source, u.target).id), a = k[n ? "source" : "from"], v = k[n ? "target" : "to"];
|
|
615
|
-
if (!(!a || !v || !a.hasOwnProperty("x") || !v.hasOwnProperty("x"))) {
|
|
616
|
-
A(u);
|
|
617
|
-
var L = T(u);
|
|
618
|
-
if (!(e.linkPositionUpdate && e.linkPositionUpdate(
|
|
619
|
-
L ? f.children[1] : f,
|
|
620
|
-
// pass child custom object if extending the default
|
|
621
|
-
{
|
|
622
|
-
start: {
|
|
623
|
-
x: a.x,
|
|
624
|
-
y: a.y,
|
|
625
|
-
z: a.z
|
|
626
|
-
},
|
|
627
|
-
end: {
|
|
628
|
-
x: v.x,
|
|
629
|
-
y: v.y,
|
|
630
|
-
z: v.z
|
|
631
|
-
}
|
|
632
|
-
},
|
|
633
|
-
u
|
|
634
|
-
) && !L)) {
|
|
635
|
-
var m = 30, D = u.__curve, s = f.children.length ? f.children[0] : f;
|
|
636
|
-
if (s.type === "Line") {
|
|
637
|
-
if (D) {
|
|
638
|
-
var S = D.getPoints(m);
|
|
639
|
-
s.geometry.getAttribute("position").array.length !== S.length * 3 && s.geometry[ce]("position", new l.BufferAttribute(new Float32Array(S.length * 3), 3)), s.geometry.setFromPoints(S);
|
|
640
|
-
} else {
|
|
641
|
-
var M = s.geometry.getAttribute("position");
|
|
642
|
-
(!M || !M.array || M.array.length !== 6) && s.geometry[ce]("position", M = new l.BufferAttribute(new Float32Array(2 * 3), 3)), M.array[0] = a.x, M.array[1] = a.y || 0, M.array[2] = a.z || 0, M.array[3] = v.x, M.array[4] = v.y || 0, M.array[5] = v.z || 0, M.needsUpdate = !0;
|
|
643
|
-
}
|
|
644
|
-
s.geometry.computeBoundingSphere();
|
|
645
|
-
} else if (s.type === "Mesh")
|
|
646
|
-
if (D) {
|
|
647
|
-
s.geometry.type.match(/^Tube(Buffer)?Geometry$/) || (s.position.set(0, 0, 0), s.rotation.set(0, 0, 0), s.scale.set(1, 1, 1));
|
|
648
|
-
var N = Math.ceil(h(u) * 10) / 10, W = N / 2, Y = new l.TubeGeometry(D, m, W, e.linkResolution, !1);
|
|
649
|
-
s.geometry.dispose(), s.geometry = Y;
|
|
650
|
-
} else {
|
|
651
|
-
if (!s.geometry.type.match(/^Cylinder(Buffer)?Geometry$/)) {
|
|
652
|
-
var G = Math.ceil(h(u) * 10) / 10, C = G / 2, E = new l.CylinderGeometry(C, C, 1, e.linkResolution, 1, !1);
|
|
653
|
-
E[ne](new l.Matrix4().makeTranslation(0, 1 / 2, 0)), E[ne](new l.Matrix4().makeRotationX(Math.PI / 2)), s.geometry.dispose(), s.geometry = E;
|
|
654
|
-
}
|
|
655
|
-
var z = new l.Vector3(a.x, a.y || 0, a.z || 0), B = new l.Vector3(v.x, v.y || 0, v.z || 0), H = z.distanceTo(B);
|
|
656
|
-
s.position.x = z.x, s.position.y = z.y, s.position.z = z.z, s.scale.z = H, s.parent.localToWorld(B), s.lookAt(B);
|
|
657
|
-
}
|
|
658
|
-
}
|
|
659
|
-
}
|
|
660
|
-
}
|
|
661
|
-
});
|
|
662
|
-
function A(O) {
|
|
663
|
-
var g = n ? O : e.layout.getLinkPosition(e.layout.graph.getLink(O.source, O.target).id), u = g[n ? "source" : "from"], f = g[n ? "target" : "to"];
|
|
664
|
-
if (!(!u || !f || !u.hasOwnProperty("x") || !f.hasOwnProperty("x"))) {
|
|
665
|
-
var k = P(O);
|
|
666
|
-
if (!k)
|
|
667
|
-
O.__curve = null;
|
|
668
|
-
else {
|
|
669
|
-
var a = new l.Vector3(u.x, u.y || 0, u.z || 0), v = new l.Vector3(f.x, f.y || 0, f.z || 0), L = a.distanceTo(v), m, D = _(O);
|
|
670
|
-
if (L > 0) {
|
|
671
|
-
var s = f.x - u.x, M = f.y - u.y || 0, S = new l.Vector3().subVectors(v, a), G = S.clone().multiplyScalar(k).cross(s !== 0 || M !== 0 ? new l.Vector3(0, 0, 1) : new l.Vector3(0, 1, 0)).applyAxisAngle(S.normalize(), D).add(new l.Vector3().addVectors(a, v).divideScalar(2));
|
|
672
|
-
m = new l.QuadraticBezierCurve3(a, G, v);
|
|
673
|
-
} else {
|
|
674
|
-
var C = k * 70, E = -D, z = E + Math.PI / 2;
|
|
675
|
-
m = new l.CubicBezierCurve3(a, new l.Vector3(C * Math.cos(z), C * Math.sin(z), 0).add(a), new l.Vector3(C * Math.cos(E), C * Math.sin(E), 0).add(a), v);
|
|
676
|
-
}
|
|
677
|
-
O.__curve = m;
|
|
678
|
-
}
|
|
679
|
-
}
|
|
680
|
-
}
|
|
681
|
-
}
|
|
682
|
-
function i() {
|
|
683
|
-
var p = w(e.linkDirectionalArrowRelPos), h = w(e.linkDirectionalArrowLength), P = w(e.nodeVal);
|
|
684
|
-
e.arrowDataMapper.entries().forEach(function(_) {
|
|
685
|
-
var T = X(_, 2), A = T[0], O = T[1];
|
|
686
|
-
if (O) {
|
|
687
|
-
var g = n ? A : e.layout.getLinkPosition(e.layout.graph.getLink(A.source, A.target).id), u = g[n ? "source" : "from"], f = g[n ? "target" : "to"];
|
|
688
|
-
if (!(!u || !f || !u.hasOwnProperty("x") || !f.hasOwnProperty("x"))) {
|
|
689
|
-
var k = Math.cbrt(Math.max(0, P(u) || 1)) * e.nodeRelSize, a = Math.cbrt(Math.max(0, P(f) || 1)) * e.nodeRelSize, v = h(A), L = p(A), m = A.__curve ? function(C) {
|
|
690
|
-
return A.__curve.getPoint(C);
|
|
691
|
-
} : function(C) {
|
|
692
|
-
var E = function(B, H, N, W) {
|
|
693
|
-
return H[B] + (N[B] - H[B]) * W || 0;
|
|
694
|
-
};
|
|
695
|
-
return {
|
|
696
|
-
x: E("x", u, f, C),
|
|
697
|
-
y: E("y", u, f, C),
|
|
698
|
-
z: E("z", u, f, C)
|
|
699
|
-
};
|
|
700
|
-
}, D = A.__curve ? A.__curve.getLength() : Math.sqrt(["x", "y", "z"].map(function(C) {
|
|
701
|
-
return Math.pow((f[C] || 0) - (u[C] || 0), 2);
|
|
702
|
-
}).reduce(function(C, E) {
|
|
703
|
-
return C + E;
|
|
704
|
-
}, 0)), s = k + v + (D - k - a - v) * L, M = m(s / D), S = m((s - v) / D);
|
|
705
|
-
["x", "y", "z"].forEach(function(C) {
|
|
706
|
-
return O.position[C] = S[C];
|
|
707
|
-
});
|
|
708
|
-
var G = Me(l.Vector3, U(["x", "y", "z"].map(function(C) {
|
|
709
|
-
return M[C];
|
|
710
|
-
})));
|
|
711
|
-
O.parent.localToWorld(G), O.lookAt(G);
|
|
712
|
-
}
|
|
713
|
-
}
|
|
714
|
-
});
|
|
715
|
-
}
|
|
716
|
-
function c() {
|
|
717
|
-
var p = w(e.linkDirectionalParticleSpeed);
|
|
718
|
-
e.graphData.links.forEach(function(h) {
|
|
719
|
-
var P = e.particlesDataMapper.getObj(h), _ = P && P.children, T = h.__singleHopPhotonsObj && h.__singleHopPhotonsObj.children;
|
|
720
|
-
if (!((!T || !T.length) && (!_ || !_.length))) {
|
|
721
|
-
var A = n ? h : e.layout.getLinkPosition(e.layout.graph.getLink(h.source, h.target).id), O = A[n ? "source" : "from"], g = A[n ? "target" : "to"];
|
|
722
|
-
if (!(!O || !g || !O.hasOwnProperty("x") || !g.hasOwnProperty("x"))) {
|
|
723
|
-
var u = p(h), f = h.__curve ? function(a) {
|
|
724
|
-
return h.__curve.getPoint(a);
|
|
725
|
-
} : function(a) {
|
|
726
|
-
var v = function(m, D, s, M) {
|
|
727
|
-
return D[m] + (s[m] - D[m]) * M || 0;
|
|
728
|
-
};
|
|
729
|
-
return {
|
|
730
|
-
x: v("x", O, g, a),
|
|
731
|
-
y: v("y", O, g, a),
|
|
732
|
-
z: v("z", O, g, a)
|
|
733
|
-
};
|
|
734
|
-
}, k = [].concat(U(_ || []), U(T || []));
|
|
735
|
-
k.forEach(function(a, v) {
|
|
736
|
-
var L = a.parent.__linkThreeObjType === "singleHopPhotons";
|
|
737
|
-
if (a.hasOwnProperty("__progressRatio") || (a.__progressRatio = L ? 0 : v / _.length), a.__progressRatio += u, a.__progressRatio >= 1)
|
|
738
|
-
if (!L)
|
|
739
|
-
a.__progressRatio = a.__progressRatio % 1;
|
|
740
|
-
else {
|
|
741
|
-
a.parent.remove(a), he(a);
|
|
742
|
-
return;
|
|
743
|
-
}
|
|
744
|
-
var m = a.__progressRatio, D = f(m);
|
|
745
|
-
["x", "y", "z"].forEach(function(s) {
|
|
746
|
-
return a.position[s] = D[s];
|
|
747
|
-
});
|
|
748
|
-
});
|
|
749
|
-
}
|
|
750
|
-
}
|
|
751
|
-
});
|
|
752
|
-
}
|
|
753
|
-
},
|
|
754
|
-
emitParticle: function(e, n) {
|
|
755
|
-
if (n && e.graphData.links.includes(n)) {
|
|
756
|
-
if (!n.__singleHopPhotonsObj) {
|
|
757
|
-
var t = new l.Group();
|
|
758
|
-
t.__linkThreeObjType = "singleHopPhotons", n.__singleHopPhotonsObj = t, e.graphScene.add(t);
|
|
759
|
-
}
|
|
760
|
-
var i = w(e.linkDirectionalParticleWidth), c = Math.ceil(i(n) * 10) / 10 / 2, p = e.linkDirectionalParticleResolution, h = new l.SphereGeometry(c, p, p), P = w(e.linkColor), _ = w(e.linkDirectionalParticleColor), T = _(n) || P(n) || "#f0f0f0", A = new l.Color(Q(T)), O = e.linkOpacity * 3, g = new l.MeshLambertMaterial({
|
|
761
|
-
color: A,
|
|
762
|
-
transparent: !0,
|
|
763
|
-
opacity: O
|
|
764
|
-
});
|
|
765
|
-
n.__singleHopPhotonsObj.add(new l.Mesh(h, g));
|
|
766
|
-
}
|
|
767
|
-
return this;
|
|
768
|
-
},
|
|
769
|
-
getGraphBbox: function(e) {
|
|
770
|
-
var n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : function() {
|
|
771
|
-
return !0;
|
|
772
|
-
};
|
|
773
|
-
if (!e.initialised) return null;
|
|
774
|
-
var t = function i(c) {
|
|
775
|
-
var p = [];
|
|
776
|
-
if (c.geometry) {
|
|
777
|
-
c.geometry.computeBoundingBox();
|
|
778
|
-
var h = new l.Box3();
|
|
779
|
-
h.copy(c.geometry.boundingBox).applyMatrix4(c.matrixWorld), p.push(h);
|
|
780
|
-
}
|
|
781
|
-
return p.concat.apply(p, U((c.children || []).filter(
|
|
782
|
-
function(P) {
|
|
783
|
-
return !P.hasOwnProperty("__graphObjType") || P.__graphObjType === "node" && n(P.__data);
|
|
784
|
-
}
|
|
785
|
-
// exclude filtered out nodes
|
|
786
|
-
).map(i)));
|
|
787
|
-
}(e.graphScene);
|
|
788
|
-
return t.length ? Object.assign.apply(Object, U(["x", "y", "z"].map(function(i) {
|
|
789
|
-
return te({}, i, [Ve(t, function(c) {
|
|
790
|
-
return c.min[i];
|
|
791
|
-
}), Ge(t, function(c) {
|
|
792
|
-
return c.max[i];
|
|
793
|
-
})]);
|
|
794
|
-
}))) : null;
|
|
795
|
-
}
|
|
796
|
-
},
|
|
797
|
-
stateInit: function() {
|
|
798
|
-
return {
|
|
799
|
-
d3ForceLayout: lr().force("link", ur()).force("charge", cr()).force("center", fr()).force("dagRadial", null).stop(),
|
|
800
|
-
engineRunning: !1
|
|
801
|
-
};
|
|
802
|
-
},
|
|
803
|
-
init: function(e, n) {
|
|
804
|
-
n.graphScene = e, n.nodeDataMapper = new J(e, {
|
|
805
|
-
objBindAttr: "__threeObj"
|
|
806
|
-
}), n.linkDataMapper = new J(e, {
|
|
807
|
-
objBindAttr: "__lineObj"
|
|
808
|
-
}), n.arrowDataMapper = new J(e, {
|
|
809
|
-
objBindAttr: "__arrowObj"
|
|
810
|
-
}), n.particlesDataMapper = new J(e, {
|
|
811
|
-
objBindAttr: "__photonsObj"
|
|
812
|
-
});
|
|
813
|
-
},
|
|
814
|
-
update: function(e, n) {
|
|
815
|
-
var t = function(d) {
|
|
816
|
-
return d.some(function(b) {
|
|
817
|
-
return n.hasOwnProperty(b);
|
|
818
|
-
});
|
|
819
|
-
};
|
|
820
|
-
if (e.engineRunning = !1, typeof e.onUpdate == "function" && e.onUpdate(), e.nodeAutoColorBy !== null && t(["nodeAutoColorBy", "graphData", "nodeColor"]) && _e(e.graphData.nodes, w(e.nodeAutoColorBy), e.nodeColor), e.linkAutoColorBy !== null && t(["linkAutoColorBy", "graphData", "linkColor"]) && _e(e.graphData.links, w(e.linkAutoColorBy), e.linkColor), e._flushObjects || t(["graphData", "nodeThreeObject", "nodeThreeObjectExtend", "nodeVal", "nodeColor", "nodeVisibility", "nodeRelSize", "nodeResolution", "nodeOpacity"])) {
|
|
821
|
-
var i = w(e.nodeThreeObject), c = w(e.nodeThreeObjectExtend), p = w(e.nodeVal), h = w(e.nodeColor), P = w(e.nodeVisibility), _ = {}, T = {};
|
|
822
|
-
(e._flushObjects || t([
|
|
823
|
-
// recreate objects if any of these props have changed
|
|
824
|
-
"nodeThreeObject",
|
|
825
|
-
"nodeThreeObjectExtend"
|
|
826
|
-
])) && e.nodeDataMapper.clear(), e.nodeDataMapper.onCreateObj(function(o) {
|
|
827
|
-
var d = i(o), b = c(o);
|
|
828
|
-
d && e.nodeThreeObject === d && (d = d.clone());
|
|
829
|
-
var y;
|
|
830
|
-
return d && !b ? y = d : (y = new l.Mesh(), y.__graphDefaultObj = !0, d && b && y.add(d)), y.__graphObjType = "node", y;
|
|
831
|
-
}).onUpdateObj(function(o, d) {
|
|
832
|
-
if (o.__graphDefaultObj) {
|
|
833
|
-
var b = p(d) || 1, y = Math.cbrt(b) * e.nodeRelSize, j = e.nodeResolution;
|
|
834
|
-
(!o.geometry.type.match(/^Sphere(Buffer)?Geometry$/) || o.geometry.parameters.radius !== y || o.geometry.parameters.widthSegments !== j) && (_.hasOwnProperty(b) || (_[b] = new l.SphereGeometry(y, j, j)), o.geometry.dispose(), o.geometry = _[b]);
|
|
835
|
-
var R = h(d), x = new l.Color(Q(R || "#ffffaa")), F = e.nodeOpacity * ue(R);
|
|
836
|
-
(o.material.type !== "MeshLambertMaterial" || !o.material.color.equals(x) || o.material.opacity !== F) && (T.hasOwnProperty(R) || (T[R] = new l.MeshLambertMaterial({
|
|
837
|
-
color: x,
|
|
838
|
-
transparent: !0,
|
|
839
|
-
opacity: F
|
|
840
|
-
})), o.material.dispose(), o.material = T[R]);
|
|
841
|
-
}
|
|
842
|
-
}).digest(e.graphData.nodes.filter(P));
|
|
843
|
-
}
|
|
844
|
-
if (e._flushObjects || t(["graphData", "linkThreeObject", "linkThreeObjectExtend", "linkMaterial", "linkColor", "linkWidth", "linkVisibility", "linkResolution", "linkOpacity", "linkDirectionalArrowLength", "linkDirectionalArrowColor", "linkDirectionalArrowResolution", "linkDirectionalParticles", "linkDirectionalParticleWidth", "linkDirectionalParticleColor", "linkDirectionalParticleResolution"])) {
|
|
845
|
-
var A = w(e.linkThreeObject), O = w(e.linkThreeObjectExtend), g = w(e.linkMaterial), u = w(e.linkVisibility), f = w(e.linkColor), k = w(e.linkWidth), a = {}, v = {}, L = {}, m = e.graphData.links.filter(u);
|
|
846
|
-
if ((e._flushObjects || t([
|
|
847
|
-
// recreate objects if any of these props have changed
|
|
848
|
-
"linkThreeObject",
|
|
849
|
-
"linkThreeObjectExtend",
|
|
850
|
-
"linkWidth"
|
|
851
|
-
])) && e.linkDataMapper.clear(), e.linkDataMapper.onRemoveObj(function(o) {
|
|
852
|
-
var d = o.__data && o.__data.__singleHopPhotonsObj;
|
|
853
|
-
d && (d.parent.remove(d), he(d), delete o.__data.__singleHopPhotonsObj);
|
|
854
|
-
}).onCreateObj(function(o) {
|
|
855
|
-
var d = A(o), b = O(o);
|
|
856
|
-
d && e.linkThreeObject === d && (d = d.clone());
|
|
857
|
-
var y;
|
|
858
|
-
if (!d || b) {
|
|
859
|
-
var j = !!k(o);
|
|
860
|
-
if (j)
|
|
861
|
-
y = new l.Mesh();
|
|
862
|
-
else {
|
|
863
|
-
var R = new l.BufferGeometry();
|
|
864
|
-
R[ce]("position", new l.BufferAttribute(new Float32Array(2 * 3), 3)), y = new l.Line(R);
|
|
865
|
-
}
|
|
866
|
-
}
|
|
867
|
-
var x;
|
|
868
|
-
return d ? b ? (x = new l.Group(), x.__graphDefaultObj = !0, x.add(y), x.add(d)) : x = d : (x = y, x.__graphDefaultObj = !0), x.renderOrder = 10, x.__graphObjType = "link", x;
|
|
869
|
-
}).onUpdateObj(function(o, d) {
|
|
870
|
-
if (o.__graphDefaultObj) {
|
|
871
|
-
var b = o.children.length ? o.children[0] : o, y = Math.ceil(k(d) * 10) / 10, j = !!y;
|
|
872
|
-
if (j) {
|
|
873
|
-
var R = y / 2, x = e.linkResolution;
|
|
874
|
-
if (!b.geometry.type.match(/^Cylinder(Buffer)?Geometry$/) || b.geometry.parameters.radiusTop !== R || b.geometry.parameters.radialSegments !== x) {
|
|
875
|
-
if (!a.hasOwnProperty(y)) {
|
|
876
|
-
var F = new l.CylinderGeometry(R, R, 1, x, 1, !1);
|
|
877
|
-
F[ne](new l.Matrix4().makeTranslation(0, 1 / 2, 0)), F[ne](new l.Matrix4().makeRotationX(Math.PI / 2)), a[y] = F;
|
|
878
|
-
}
|
|
879
|
-
b.geometry.dispose(), b.geometry = a[y];
|
|
880
|
-
}
|
|
881
|
-
}
|
|
882
|
-
var K = g(d);
|
|
883
|
-
if (K)
|
|
884
|
-
b.material = K;
|
|
885
|
-
else {
|
|
886
|
-
var V = f(d), $ = new l.Color(Q(V || "#f0f0f0")), I = e.linkOpacity * ue(V), ee = j ? "MeshLambertMaterial" : "LineBasicMaterial";
|
|
887
|
-
if (b.material.type !== ee || !b.material.color.equals($) || b.material.opacity !== I) {
|
|
888
|
-
var oe = j ? v : L;
|
|
889
|
-
oe.hasOwnProperty(V) || (oe[V] = new l[ee]({
|
|
890
|
-
color: $,
|
|
891
|
-
transparent: I < 1,
|
|
892
|
-
opacity: I,
|
|
893
|
-
depthWrite: I >= 1
|
|
894
|
-
// Prevent transparency issues
|
|
895
|
-
})), b.material.dispose(), b.material = oe[V];
|
|
896
|
-
}
|
|
897
|
-
}
|
|
898
|
-
}
|
|
899
|
-
}).digest(m), e.linkDirectionalArrowLength || n.hasOwnProperty("linkDirectionalArrowLength")) {
|
|
900
|
-
var D = w(e.linkDirectionalArrowLength), s = w(e.linkDirectionalArrowColor);
|
|
901
|
-
e.arrowDataMapper.onCreateObj(function() {
|
|
902
|
-
var o = new l.Mesh(void 0, new l.MeshLambertMaterial({
|
|
903
|
-
transparent: !0
|
|
904
|
-
}));
|
|
905
|
-
return o.__linkThreeObjType = "arrow", o;
|
|
906
|
-
}).onUpdateObj(function(o, d) {
|
|
907
|
-
var b = D(d), y = e.linkDirectionalArrowResolution;
|
|
908
|
-
if (!o.geometry.type.match(/^Cone(Buffer)?Geometry$/) || o.geometry.parameters.height !== b || o.geometry.parameters.radialSegments !== y) {
|
|
909
|
-
var j = new l.ConeGeometry(b * 0.25, b, y);
|
|
910
|
-
j.translate(0, b / 2, 0), j.rotateX(Math.PI / 2), o.geometry.dispose(), o.geometry = j;
|
|
911
|
-
}
|
|
912
|
-
var R = s(d) || f(d) || "#f0f0f0";
|
|
913
|
-
o.material.color = new l.Color(Q(R)), o.material.opacity = e.linkOpacity * 3 * ue(R);
|
|
914
|
-
}).digest(m.filter(D));
|
|
915
|
-
}
|
|
916
|
-
if (e.linkDirectionalParticles || n.hasOwnProperty("linkDirectionalParticles")) {
|
|
917
|
-
var M = w(e.linkDirectionalParticles), S = w(e.linkDirectionalParticleWidth), G = w(e.linkDirectionalParticleColor), C = {}, E = {};
|
|
918
|
-
e.particlesDataMapper.onCreateObj(function() {
|
|
919
|
-
var o = new l.Group();
|
|
920
|
-
return o.__linkThreeObjType = "photons", o.__photonDataMapper = new J(o), o;
|
|
921
|
-
}).onUpdateObj(function(o, d) {
|
|
922
|
-
var b = Math.round(Math.abs(M(d))), y = !!o.children.length && o.children[0], j = Math.ceil(S(d) * 10) / 10 / 2, R = e.linkDirectionalParticleResolution, x;
|
|
923
|
-
y && y.geometry.parameters.radius === j && y.geometry.parameters.widthSegments === R ? x = y.geometry : (E.hasOwnProperty(j) || (E[j] = new l.SphereGeometry(j, R, R)), x = E[j], y && y.geometry.dispose());
|
|
924
|
-
var F = G(d) || f(d) || "#f0f0f0", K = new l.Color(Q(F)), V = e.linkOpacity * 3, $;
|
|
925
|
-
y && y.material.color.equals(K) && y.material.opacity === V ? $ = y.material : (C.hasOwnProperty(F) || (C[F] = new l.MeshLambertMaterial({
|
|
926
|
-
color: K,
|
|
927
|
-
transparent: !0,
|
|
928
|
-
opacity: V
|
|
929
|
-
})), $ = C[F], y && y.material.dispose()), o.__photonDataMapper.id(function(I) {
|
|
930
|
-
return I.idx;
|
|
931
|
-
}).onCreateObj(function() {
|
|
932
|
-
return new l.Mesh(x, $);
|
|
933
|
-
}).onUpdateObj(function(I) {
|
|
934
|
-
I.geometry = x, I.material = $;
|
|
935
|
-
}).digest(U(new Array(b)).map(function(I, ee) {
|
|
936
|
-
return {
|
|
937
|
-
idx: ee
|
|
938
|
-
};
|
|
939
|
-
}));
|
|
940
|
-
}).digest(m.filter(M));
|
|
941
|
-
}
|
|
942
|
-
}
|
|
943
|
-
if (e._flushObjects = !1, t(["graphData", "nodeId", "linkSource", "linkTarget", "numDimensions", "forceEngine", "dagMode", "dagNodeFilter", "dagLevelDistance"])) {
|
|
944
|
-
e.engineRunning = !1, e.graphData.links.forEach(function(o) {
|
|
945
|
-
o.source = o[e.linkSource], o.target = o[e.linkTarget];
|
|
946
|
-
});
|
|
947
|
-
var z = e.forceEngine !== "ngraph", B;
|
|
948
|
-
if (z) {
|
|
949
|
-
(B = e.d3ForceLayout).stop().alpha(1).numDimensions(e.numDimensions).nodes(e.graphData.nodes);
|
|
950
|
-
var H = e.d3ForceLayout.force("link");
|
|
951
|
-
H && H.id(function(o) {
|
|
952
|
-
return o[e.nodeId];
|
|
953
|
-
}).links(e.graphData.links);
|
|
954
|
-
var N = e.dagMode && Mr(e.graphData, function(o) {
|
|
955
|
-
return o[e.nodeId];
|
|
956
|
-
}, {
|
|
957
|
-
nodeFilter: e.dagNodeFilter,
|
|
958
|
-
onLoopError: e.onDagError || void 0
|
|
959
|
-
}), W = Math.max.apply(Math, U(Object.values(N || []))), Y = e.dagLevelDistance || e.graphData.nodes.length / (W || 1) * xr * (["radialin", "radialout"].indexOf(e.dagMode) !== -1 ? 0.7 : 1);
|
|
960
|
-
if (["lr", "rl", "td", "bu", "zin", "zout"].includes(n.dagMode)) {
|
|
961
|
-
var Le = ["lr", "rl"].includes(n.dagMode) ? "fx" : ["td", "bu"].includes(n.dagMode) ? "fy" : "fz";
|
|
962
|
-
e.graphData.nodes.filter(e.dagNodeFilter).forEach(function(o) {
|
|
963
|
-
return delete o[Le];
|
|
964
|
-
});
|
|
965
|
-
}
|
|
966
|
-
if (["lr", "rl", "td", "bu", "zin", "zout"].includes(e.dagMode)) {
|
|
967
|
-
var Be = ["rl", "td", "zout"].includes(e.dagMode), Se = function(d) {
|
|
968
|
-
return (N[d[e.nodeId]] - W / 2) * Y * (Be ? -1 : 1);
|
|
969
|
-
}, ze = ["lr", "rl"].includes(e.dagMode) ? "fx" : ["td", "bu"].includes(e.dagMode) ? "fy" : "fz";
|
|
970
|
-
e.graphData.nodes.filter(e.dagNodeFilter).forEach(function(o) {
|
|
971
|
-
return o[ze] = Se(o);
|
|
972
|
-
});
|
|
973
|
-
}
|
|
974
|
-
e.d3ForceLayout.force("dagRadial", ["radialin", "radialout"].indexOf(e.dagMode) !== -1 ? ir(function(o) {
|
|
975
|
-
var d = N[o[e.nodeId]] || -1;
|
|
976
|
-
return (e.dagMode === "radialin" ? W - d : d) * Y;
|
|
977
|
-
}).strength(function(o) {
|
|
978
|
-
return e.dagNodeFilter(o) ? 1 : 0;
|
|
979
|
-
}) : null);
|
|
980
|
-
} else {
|
|
981
|
-
var Z = we.graph();
|
|
982
|
-
e.graphData.nodes.forEach(function(o) {
|
|
983
|
-
Z.addNode(o[e.nodeId]);
|
|
984
|
-
}), e.graphData.links.forEach(function(o) {
|
|
985
|
-
Z.addLink(o.source, o.target);
|
|
986
|
-
}), B = we.forcelayout(Z, Or({
|
|
987
|
-
dimensions: e.numDimensions
|
|
988
|
-
}, e.ngraphPhysics)), B.graph = Z;
|
|
989
|
-
}
|
|
990
|
-
for (var ye = 0; ye < e.warmupTicks && !(z && e.d3AlphaMin > 0 && e.d3ForceLayout.alpha() < e.d3AlphaMin); ye++)
|
|
991
|
-
B[z ? "tick" : "step"]();
|
|
992
|
-
e.layout = B, this.resetCountdown();
|
|
993
|
-
}
|
|
994
|
-
e.engineRunning = !0, e.onFinishUpdate();
|
|
995
|
-
}
|
|
996
|
-
});
|
|
997
|
-
function Tr(r) {
|
|
998
|
-
var e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : Object, n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !1, t = /* @__PURE__ */ function(i) {
|
|
999
|
-
function c() {
|
|
1000
|
-
var p;
|
|
1001
|
-
Ce(this, c);
|
|
1002
|
-
for (var h = arguments.length, P = new Array(h), _ = 0; _ < h; _++)
|
|
1003
|
-
P[_] = arguments[_];
|
|
1004
|
-
return p = Pe(this, c, [].concat(P)), p.__kapsuleInstance = Me(r, [].concat(U(n ? [p] : []), P)), p;
|
|
1005
|
-
}
|
|
1006
|
-
return Ae(c, i), xe(c);
|
|
1007
|
-
}(e);
|
|
1008
|
-
return Object.keys(r()).forEach(function(i) {
|
|
1009
|
-
return t.prototype[i] = function() {
|
|
1010
|
-
var c, p = (c = this.__kapsuleInstance)[i].apply(c, arguments);
|
|
1011
|
-
return p === this.__kapsuleInstance ? this : p;
|
|
1012
|
-
};
|
|
1013
|
-
}), t;
|
|
1014
|
-
}
|
|
1015
|
-
var jr = window.THREE ? window.THREE : {
|
|
1016
|
-
Group: ke
|
|
1017
|
-
}, Qr = Tr(Ar, jr.Group, !0);
|
|
1018
|
-
export {
|
|
1019
|
-
Qr as default
|
|
1020
|
-
};
|