likec4 1.60.0 → 1.61.0
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/README.md +2 -0
- package/__app__/codegen/react.mjs +4 -10
- package/__app__/codegen/webcomponent.mjs +5 -208
- package/__app__/index.html +15 -15
- package/__app__/src/aichat/index.mjs +1 -2
- package/__app__/src/chunks/AIChat.mjs +292 -117
- package/__app__/src/chunks/ErrorComponent.mjs +444 -0
- package/__app__/src/chunks/Header.mjs +269 -0
- package/__app__/src/chunks/ViewReact.mjs +438 -0
- package/__app__/src/chunks/find.mjs +38 -0
- package/__app__/src/chunks/hooks.mjs +18 -541
- package/__app__/src/chunks/libs/@tabler/icons-react.mjs +340 -0
- package/__app__/src/chunks/libs/@tanstack-ai.mjs +11101 -1797
- package/__app__/src/chunks/libs/@tanstack.mjs +4563 -3083
- package/__app__/src/chunks/libs/fast-equals.mjs +140 -71
- package/__app__/src/chunks/{es.mjs → libs/html-to-image.mjs} +16 -22
- package/__app__/src/chunks/libs/nanostores.mjs +4 -8
- package/__app__/src/chunks/libs/react-resizable-panels.mjs +2792 -0
- package/__app__/src/chunks/react.mjs +22 -0
- package/__app__/src/chunks/rolldown-runtime.mjs +3 -32
- package/__app__/src/chunks/router.mjs +106 -0
- package/__app__/src/chunks/scope.mjs +106 -0
- package/__app__/src/chunks/searchParams.mjs +29 -0
- package/__app__/src/chunks/single-index.mjs +465 -0
- package/__app__/src/chunks/styled-system.mjs +1916 -2946
- package/__app__/src/chunks/useAsync.mjs +69 -0
- package/__app__/src/chunks/useSyncedRef.mjs +16 -0
- package/__app__/src/components/ColorSchemeToggle.mjs +124 -0
- package/__app__/src/components/CopyToClipboard.mjs +53 -0
- package/__app__/src/components/ErrorComponent.mjs +1 -0
- package/__app__/src/components/NavigationPanel.mjs +63 -0
- package/__app__/src/components/NotFound.mjs +155 -0
- package/__app__/src/components/ViewOutlet.mjs +9 -0
- package/__app__/src/components/model-diff/CompareModelProvider.mjs +44 -0
- package/__app__/src/components/model-diff/ModelDiffPanel.mjs +179 -0
- package/__app__/src/components/model-diff/compare-model.mjs +76 -0
- package/__app__/src/components/model-diff/state.mjs +45 -0
- package/__app__/src/components/search/OverviewSearch.mjs +92 -0
- package/__app__/src/components/search/OverviewSearchAdapter.mjs +94 -0
- package/__app__/src/components/sidebar/DiagramTree.css.mjs +48 -0
- package/__app__/src/components/sidebar/DiagramsTree.mjs +304 -0
- package/__app__/src/components/sidebar/Drawer.mjs +178 -0
- package/__app__/src/components/sidebar/SidebarBurger.mjs +28 -0
- package/__app__/src/components/sidebar/data.mjs +94 -0
- package/__app__/src/components/sidebar/state.mjs +16 -0
- package/__app__/src/components/view-page/Header.mjs +1 -0
- package/__app__/src/components/view-page/SelectProject.mjs +258 -0
- package/__app__/src/components/view-page/ShareModal.mjs +111 -0
- package/__app__/src/components/view-page/share-modal/AlertLocalhost.mjs +31 -0
- package/__app__/src/components/view-page/share-modal/CopyButtonChild.mjs +36 -0
- package/__app__/src/components/view-page/share-modal/EmbedPanel.mjs +100 -0
- package/__app__/src/components/view-page/share-modal/WebcomponentsPanel.mjs +264 -0
- package/__app__/src/components/view-page/state.mjs +17 -0
- package/__app__/src/context/LikeC4CustomizationContext.mjs +26 -0
- package/__app__/src/context/LikeC4IconRendererContext.mjs +29 -0
- package/__app__/src/context/LikeC4ModelContext.mjs +34 -0
- package/__app__/src/context/LikeC4ProjectsContext.mjs +40 -0
- package/__app__/src/context/ModelDiffsContext.mjs +33 -0
- package/__app__/src/context/safeCtx.mjs +14 -0
- package/__app__/src/hooks.mjs +1 -0
- package/__app__/src/main.mjs +4 -48126
- package/__app__/src/pages/EmbedPage.mjs +93 -0
- package/__app__/src/pages/ExportPage.mjs +691 -0
- package/__app__/src/pages/ProjectsOverview.mjs +23 -0
- package/__app__/src/pages/ViewAsD2.mjs +105 -0
- package/__app__/src/pages/ViewAsDot.mjs +65 -0
- package/__app__/src/pages/ViewAsMmd.mjs +109 -0
- package/__app__/src/pages/ViewAsPuml.mjs +105 -0
- package/__app__/src/pages/ViewEditor.mjs +220 -0
- package/__app__/src/pages/ViewReact.mjs +1 -0
- package/__app__/src/pages/export-layout.mjs +95 -0
- package/__app__/src/pages/export-page-params.mjs +9 -0
- package/__app__/src/pages/styles.css.mjs +23 -0
- package/__app__/src/routeTree.gen.mjs +105 -0
- package/__app__/src/router.mjs +1 -0
- package/__app__/src/routes/__root.mjs +65 -0
- package/__app__/src/routes/index.css.mjs +29 -0
- package/__app__/src/routes/index.mjs +32 -0
- package/__app__/src/routes/project._projectId/-components.mjs +100 -0
- package/__app__/src/routes/project._projectId/embed._viewId.mjs +5 -0
- package/__app__/src/routes/project._projectId/export._viewId.mjs +24 -0
- package/__app__/src/routes/project._projectId/index.mjs +14 -0
- package/__app__/src/routes/project._projectId/route.mjs +93 -0
- package/__app__/src/routes/project._projectId/view._viewId.d2.mjs +34 -0
- package/__app__/src/routes/project._projectId/view._viewId.dot.mjs +41 -0
- package/__app__/src/routes/project._projectId/view._viewId.index.mjs +7 -0
- package/__app__/src/routes/project._projectId/view._viewId.mjs +23 -0
- package/__app__/src/routes/project._projectId/view._viewId.mmd.mjs +39 -0
- package/__app__/src/routes/project._projectId/view._viewId.puml.mjs +34 -0
- package/__app__/src/routes/projects.mjs +36 -0
- package/__app__/src/routes/single-index.mjs +1 -0
- package/__app__/src/routes/webcomponent._.mjs +94 -0
- package/__app__/src/style.css +1156 -1147
- package/config/schema.json +26 -2
- package/dist/app/render-view-client.css +1 -1
- package/dist/app/render-view-client.js +375 -393
- package/dist/chunks/filenames.mjs +26 -20
- package/dist/chunks/generate-likec4.mjs +4 -4
- package/dist/chunks/index.d.mts +16 -15
- package/dist/chunks/index2.d.mts +7041 -3293
- package/dist/chunks/libs/@chenglou/pretext.mjs +9 -0
- package/dist/chunks/libs/@logtape/logtape.mjs +5 -5
- package/dist/chunks/libs/@ts-graphviz/common.d.mts +2 -4
- package/dist/chunks/libs/chevrotain.mjs +19 -19
- package/dist/chunks/libs/clone.mjs +1 -0
- package/dist/chunks/libs/eventemitter3.mjs +1 -1
- package/dist/chunks/libs/fast-equals.mjs +1 -0
- package/dist/chunks/libs/fontkit.mjs +1 -0
- package/dist/chunks/libs/langium.d.mts +80 -2933
- package/dist/chunks/libs/langium.mjs +6 -6
- package/dist/chunks/libs/pako.mjs +1 -1
- package/dist/chunks/libs/pathe.mjs +1 -1
- package/dist/chunks/libs/remeda.mjs +1 -1
- package/dist/chunks/node.mjs +110 -77
- package/dist/chunks/rolldown-runtime.mjs +1 -1
- package/dist/chunks/sequence-view.mjs +1 -1
- package/dist/chunks/vite-plugin.mjs +183 -164
- package/dist/cli/index.mjs +157 -101
- package/dist/config/index.d.mts +65 -4
- package/dist/config/index.mjs +1 -1
- package/dist/generators/likec4.d.mts +16 -64
- package/dist/index.d.mts +2 -4
- package/dist/model/index.d.mts +0 -10
- package/dist/vite-plugin/index.d.mts +83 -61
- package/dist/vite-plugin/internal/chunks/rolldown-runtime.mjs +1 -2
- package/dist/vite-plugin/internal/index.d.mts +91 -17
- package/dist/vite-plugin/internal/index.mjs +156 -110
- package/package.json +60 -55
- package/react/index.d.mts +3010 -4014
- package/react/index.mjs +170 -171
- package/react/rolldown-runtime-CfRud99p.js +1 -0
- package/skills/likec4-dsl/SKILL.md +71 -25
- package/skills/likec4-dsl/evals/evals-public.json +5 -0
- package/skills/likec4-dsl/evals/grading-spec.json +15 -1
- package/skills/likec4-dsl/references/cli.md +39 -10
- package/skills/likec4-dsl/references/configuration.md +5 -5
- package/skills/likec4-dsl/references/diffs.md +52 -0
- package/skills/likec4-dsl/references/examples.md +2 -2
- package/skills/likec4-dsl/references/identifier-validity.md +31 -31
- package/skills/likec4-dsl/references/include-predicates-wildcards.md +16 -15
- package/skills/likec4-dsl/references/model.md +42 -11
- package/skills/likec4-dsl/references/specification.md +11 -7
- package/skills/likec4-dsl/references/troubleshooting.md +47 -42
- package/skills/likec4-dsl/references/views.md +2 -2
- package/vite-plugin-modules.d.ts +126 -51
- package/__app__/src/chunks/LikeC4Styles.mjs +0 -4522
- package/__app__/src/chunks/ProjectsOverview.mjs +0 -827
- package/__app__/src/chunks/libs/@floating-ui.mjs +0 -3286
- package/__app__/src/chunks/libs/@mantine.mjs +0 -17731
- package/__app__/src/chunks/libs/@xstate/react.mjs +0 -3471
- package/__app__/src/chunks/libs/@xyflow/react.mjs +0 -7927
- package/__app__/src/chunks/libs/bezier-js.mjs +0 -1593
- package/__app__/src/chunks/libs/d3.mjs +0 -4531
- package/__app__/src/chunks/libs/framer.mjs +0 -11331
- package/__app__/src/chunks/libs/zod.mjs +0 -5404
- package/dist/chunks/libs/@chevrotain/types.d.mts +0 -111
- package/react/rolldown-runtime-DnkiqaRY.js +0 -1
|
@@ -1,4531 +0,0 @@
|
|
|
1
|
-
import { i as __name } from "../rolldown-runtime.mjs";
|
|
2
|
-
//#region ../../node_modules/.pnpm/d3-dispatch@3.0.1/node_modules/d3-dispatch/src/dispatch.js
|
|
3
|
-
var noop = { value: () => {} };
|
|
4
|
-
function dispatch() {
|
|
5
|
-
for (var i = 0, n = arguments.length, _ = {}, t; i < n; ++i) {
|
|
6
|
-
if (!(t = arguments[i] + "") || t in _ || /[\s.]/.test(t)) throw new Error("illegal type: " + t);
|
|
7
|
-
_[t] = [];
|
|
8
|
-
}
|
|
9
|
-
return new Dispatch(_);
|
|
10
|
-
}
|
|
11
|
-
function Dispatch(_) {
|
|
12
|
-
this._ = _;
|
|
13
|
-
}
|
|
14
|
-
function parseTypenames$1(typenames, types) {
|
|
15
|
-
return typenames.trim().split(/^|\s+/).map(function(t) {
|
|
16
|
-
var name = "";
|
|
17
|
-
var i = t.indexOf(".");
|
|
18
|
-
if (i >= 0) name = t.slice(i + 1), t = t.slice(0, i);
|
|
19
|
-
if (t && !types.hasOwnProperty(t)) throw new Error("unknown type: " + t);
|
|
20
|
-
return {
|
|
21
|
-
type: t,
|
|
22
|
-
name
|
|
23
|
-
};
|
|
24
|
-
});
|
|
25
|
-
}
|
|
26
|
-
__name(parseTypenames$1, "parseTypenames");
|
|
27
|
-
Dispatch.prototype = dispatch.prototype = {
|
|
28
|
-
constructor: Dispatch,
|
|
29
|
-
on: function(typename, callback) {
|
|
30
|
-
var _ = this._;
|
|
31
|
-
var T = parseTypenames$1(typename + "", _);
|
|
32
|
-
var t;
|
|
33
|
-
var i = -1;
|
|
34
|
-
var n = T.length;
|
|
35
|
-
if (arguments.length < 2) {
|
|
36
|
-
while (++i < n) if ((t = (typename = T[i]).type) && (t = get$1(_[t], typename.name))) return t;
|
|
37
|
-
return;
|
|
38
|
-
}
|
|
39
|
-
if (callback != null && typeof callback !== "function") throw new Error("invalid callback: " + callback);
|
|
40
|
-
while (++i < n) if (t = (typename = T[i]).type) _[t] = set$1(_[t], typename.name, callback);
|
|
41
|
-
else if (callback == null) for (t in _) _[t] = set$1(_[t], typename.name, null);
|
|
42
|
-
return this;
|
|
43
|
-
},
|
|
44
|
-
copy: function() {
|
|
45
|
-
var copy = {};
|
|
46
|
-
var _ = this._;
|
|
47
|
-
for (var t in _) copy[t] = _[t].slice();
|
|
48
|
-
return new Dispatch(copy);
|
|
49
|
-
},
|
|
50
|
-
call: function(type, that) {
|
|
51
|
-
if ((n = arguments.length - 2) > 0) for (var args = new Array(n), i = 0, n, t; i < n; ++i) args[i] = arguments[i + 2];
|
|
52
|
-
if (!this._.hasOwnProperty(type)) throw new Error("unknown type: " + type);
|
|
53
|
-
for (t = this._[type], i = 0, n = t.length; i < n; ++i) t[i].value.apply(that, args);
|
|
54
|
-
},
|
|
55
|
-
apply: function(type, that, args) {
|
|
56
|
-
if (!this._.hasOwnProperty(type)) throw new Error("unknown type: " + type);
|
|
57
|
-
for (var t = this._[type], i = 0, n = t.length; i < n; ++i) t[i].value.apply(that, args);
|
|
58
|
-
}
|
|
59
|
-
};
|
|
60
|
-
function get$1(type, name) {
|
|
61
|
-
for (var i = 0, n = type.length, c; i < n; ++i) if ((c = type[i]).name === name) return c.value;
|
|
62
|
-
}
|
|
63
|
-
__name(get$1, "get");
|
|
64
|
-
function set$1(type, name, callback) {
|
|
65
|
-
for (var i = 0, n = type.length; i < n; ++i) if (type[i].name === name) {
|
|
66
|
-
type[i] = noop, type = type.slice(0, i).concat(type.slice(i + 1));
|
|
67
|
-
break;
|
|
68
|
-
}
|
|
69
|
-
if (callback != null) type.push({
|
|
70
|
-
name,
|
|
71
|
-
value: callback
|
|
72
|
-
});
|
|
73
|
-
return type;
|
|
74
|
-
}
|
|
75
|
-
__name(set$1, "set");
|
|
76
|
-
var namespaces_default = {
|
|
77
|
-
svg: "http://www.w3.org/2000/svg",
|
|
78
|
-
xhtml: "http://www.w3.org/1999/xhtml",
|
|
79
|
-
xlink: "http://www.w3.org/1999/xlink",
|
|
80
|
-
xml: "http://www.w3.org/XML/1998/namespace",
|
|
81
|
-
xmlns: "http://www.w3.org/2000/xmlns/"
|
|
82
|
-
};
|
|
83
|
-
//#endregion
|
|
84
|
-
//#region ../../node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/namespace.js
|
|
85
|
-
function namespace_default(name) {
|
|
86
|
-
var prefix = name += "";
|
|
87
|
-
var i = prefix.indexOf(":");
|
|
88
|
-
if (i >= 0 && (prefix = name.slice(0, i)) !== "xmlns") name = name.slice(i + 1);
|
|
89
|
-
return namespaces_default.hasOwnProperty(prefix) ? {
|
|
90
|
-
space: namespaces_default[prefix],
|
|
91
|
-
local: name
|
|
92
|
-
} : name;
|
|
93
|
-
}
|
|
94
|
-
__name(namespace_default, "default");
|
|
95
|
-
//#endregion
|
|
96
|
-
//#region ../../node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/creator.js
|
|
97
|
-
function creatorInherit(name) {
|
|
98
|
-
return function() {
|
|
99
|
-
var document = this.ownerDocument;
|
|
100
|
-
var uri = this.namespaceURI;
|
|
101
|
-
return uri === "http://www.w3.org/1999/xhtml" && document.documentElement.namespaceURI === "http://www.w3.org/1999/xhtml" ? document.createElement(name) : document.createElementNS(uri, name);
|
|
102
|
-
};
|
|
103
|
-
}
|
|
104
|
-
function creatorFixed(fullname) {
|
|
105
|
-
return function() {
|
|
106
|
-
return this.ownerDocument.createElementNS(fullname.space, fullname.local);
|
|
107
|
-
};
|
|
108
|
-
}
|
|
109
|
-
function creator_default(name) {
|
|
110
|
-
var fullname = namespace_default(name);
|
|
111
|
-
return (fullname.local ? creatorFixed : creatorInherit)(fullname);
|
|
112
|
-
}
|
|
113
|
-
__name(creator_default, "default");
|
|
114
|
-
//#endregion
|
|
115
|
-
//#region ../../node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selector.js
|
|
116
|
-
function none() {}
|
|
117
|
-
function selector_default(selector) {
|
|
118
|
-
return selector == null ? none : function() {
|
|
119
|
-
return this.querySelector(selector);
|
|
120
|
-
};
|
|
121
|
-
}
|
|
122
|
-
__name(selector_default, "default");
|
|
123
|
-
//#endregion
|
|
124
|
-
//#region ../../node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/select.js
|
|
125
|
-
function select_default$2(select) {
|
|
126
|
-
if (typeof select !== "function") select = selector_default(select);
|
|
127
|
-
for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) for (var group = groups[j], n = group.length, subgroup = subgroups[j] = new Array(n), node, subnode, i = 0; i < n; ++i) if ((node = group[i]) && (subnode = select.call(node, node.__data__, i, group))) {
|
|
128
|
-
if ("__data__" in node) subnode.__data__ = node.__data__;
|
|
129
|
-
subgroup[i] = subnode;
|
|
130
|
-
}
|
|
131
|
-
return new Selection$1(subgroups, this._parents);
|
|
132
|
-
}
|
|
133
|
-
__name(select_default$2, "default");
|
|
134
|
-
//#endregion
|
|
135
|
-
//#region ../../node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/array.js
|
|
136
|
-
function array(x) {
|
|
137
|
-
return x == null ? [] : Array.isArray(x) ? x : Array.from(x);
|
|
138
|
-
}
|
|
139
|
-
//#endregion
|
|
140
|
-
//#region ../../node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selectorAll.js
|
|
141
|
-
function empty() {
|
|
142
|
-
return [];
|
|
143
|
-
}
|
|
144
|
-
function selectorAll_default(selector) {
|
|
145
|
-
return selector == null ? empty : function() {
|
|
146
|
-
return this.querySelectorAll(selector);
|
|
147
|
-
};
|
|
148
|
-
}
|
|
149
|
-
__name(selectorAll_default, "default");
|
|
150
|
-
//#endregion
|
|
151
|
-
//#region ../../node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/selectAll.js
|
|
152
|
-
function arrayAll(select) {
|
|
153
|
-
return function() {
|
|
154
|
-
return array(select.apply(this, arguments));
|
|
155
|
-
};
|
|
156
|
-
}
|
|
157
|
-
function selectAll_default$1(select) {
|
|
158
|
-
if (typeof select === "function") select = arrayAll(select);
|
|
159
|
-
else select = selectorAll_default(select);
|
|
160
|
-
for (var groups = this._groups, m = groups.length, subgroups = [], parents = [], j = 0; j < m; ++j) for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) if (node = group[i]) {
|
|
161
|
-
subgroups.push(select.call(node, node.__data__, i, group));
|
|
162
|
-
parents.push(node);
|
|
163
|
-
}
|
|
164
|
-
return new Selection$1(subgroups, parents);
|
|
165
|
-
}
|
|
166
|
-
__name(selectAll_default$1, "default");
|
|
167
|
-
//#endregion
|
|
168
|
-
//#region ../../node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/matcher.js
|
|
169
|
-
function matcher_default(selector) {
|
|
170
|
-
return function() {
|
|
171
|
-
return this.matches(selector);
|
|
172
|
-
};
|
|
173
|
-
}
|
|
174
|
-
__name(matcher_default, "default");
|
|
175
|
-
function childMatcher(selector) {
|
|
176
|
-
return function(node) {
|
|
177
|
-
return node.matches(selector);
|
|
178
|
-
};
|
|
179
|
-
}
|
|
180
|
-
//#endregion
|
|
181
|
-
//#region ../../node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/selectChild.js
|
|
182
|
-
var find$1 = Array.prototype.find;
|
|
183
|
-
function childFind(match) {
|
|
184
|
-
return function() {
|
|
185
|
-
return find$1.call(this.children, match);
|
|
186
|
-
};
|
|
187
|
-
}
|
|
188
|
-
function childFirst() {
|
|
189
|
-
return this.firstElementChild;
|
|
190
|
-
}
|
|
191
|
-
function selectChild_default(match) {
|
|
192
|
-
return this.select(match == null ? childFirst : childFind(typeof match === "function" ? match : childMatcher(match)));
|
|
193
|
-
}
|
|
194
|
-
__name(selectChild_default, "default");
|
|
195
|
-
//#endregion
|
|
196
|
-
//#region ../../node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/selectChildren.js
|
|
197
|
-
var filter = Array.prototype.filter;
|
|
198
|
-
function children() {
|
|
199
|
-
return Array.from(this.children);
|
|
200
|
-
}
|
|
201
|
-
function childrenFilter(match) {
|
|
202
|
-
return function() {
|
|
203
|
-
return filter.call(this.children, match);
|
|
204
|
-
};
|
|
205
|
-
}
|
|
206
|
-
function selectChildren_default(match) {
|
|
207
|
-
return this.selectAll(match == null ? children : childrenFilter(typeof match === "function" ? match : childMatcher(match)));
|
|
208
|
-
}
|
|
209
|
-
__name(selectChildren_default, "default");
|
|
210
|
-
//#endregion
|
|
211
|
-
//#region ../../node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/filter.js
|
|
212
|
-
function filter_default$1(match) {
|
|
213
|
-
if (typeof match !== "function") match = matcher_default(match);
|
|
214
|
-
for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) for (var group = groups[j], n = group.length, subgroup = subgroups[j] = [], node, i = 0; i < n; ++i) if ((node = group[i]) && match.call(node, node.__data__, i, group)) subgroup.push(node);
|
|
215
|
-
return new Selection$1(subgroups, this._parents);
|
|
216
|
-
}
|
|
217
|
-
__name(filter_default$1, "default");
|
|
218
|
-
//#endregion
|
|
219
|
-
//#region ../../node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/sparse.js
|
|
220
|
-
function sparse_default(update) {
|
|
221
|
-
return new Array(update.length);
|
|
222
|
-
}
|
|
223
|
-
__name(sparse_default, "default");
|
|
224
|
-
//#endregion
|
|
225
|
-
//#region ../../node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/enter.js
|
|
226
|
-
function enter_default() {
|
|
227
|
-
return new Selection$1(this._enter || this._groups.map(sparse_default), this._parents);
|
|
228
|
-
}
|
|
229
|
-
__name(enter_default, "default");
|
|
230
|
-
function EnterNode(parent, datum) {
|
|
231
|
-
this.ownerDocument = parent.ownerDocument;
|
|
232
|
-
this.namespaceURI = parent.namespaceURI;
|
|
233
|
-
this._next = null;
|
|
234
|
-
this._parent = parent;
|
|
235
|
-
this.__data__ = datum;
|
|
236
|
-
}
|
|
237
|
-
EnterNode.prototype = {
|
|
238
|
-
constructor: EnterNode,
|
|
239
|
-
appendChild: function(child) {
|
|
240
|
-
return this._parent.insertBefore(child, this._next);
|
|
241
|
-
},
|
|
242
|
-
insertBefore: function(child, next) {
|
|
243
|
-
return this._parent.insertBefore(child, next);
|
|
244
|
-
},
|
|
245
|
-
querySelector: function(selector) {
|
|
246
|
-
return this._parent.querySelector(selector);
|
|
247
|
-
},
|
|
248
|
-
querySelectorAll: function(selector) {
|
|
249
|
-
return this._parent.querySelectorAll(selector);
|
|
250
|
-
}
|
|
251
|
-
};
|
|
252
|
-
//#endregion
|
|
253
|
-
//#region ../../node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/constant.js
|
|
254
|
-
function constant_default$5(x) {
|
|
255
|
-
return function() {
|
|
256
|
-
return x;
|
|
257
|
-
};
|
|
258
|
-
}
|
|
259
|
-
__name(constant_default$5, "default");
|
|
260
|
-
//#endregion
|
|
261
|
-
//#region ../../node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/data.js
|
|
262
|
-
function bindIndex(parent, group, enter, update, exit, data) {
|
|
263
|
-
var i = 0;
|
|
264
|
-
var node;
|
|
265
|
-
var groupLength = group.length;
|
|
266
|
-
var dataLength = data.length;
|
|
267
|
-
for (; i < dataLength; ++i) if (node = group[i]) {
|
|
268
|
-
node.__data__ = data[i];
|
|
269
|
-
update[i] = node;
|
|
270
|
-
} else enter[i] = new EnterNode(parent, data[i]);
|
|
271
|
-
for (; i < groupLength; ++i) if (node = group[i]) exit[i] = node;
|
|
272
|
-
}
|
|
273
|
-
function bindKey(parent, group, enter, update, exit, data, key) {
|
|
274
|
-
var i;
|
|
275
|
-
var node;
|
|
276
|
-
var nodeByKeyValue = /* @__PURE__ */ new Map();
|
|
277
|
-
var groupLength = group.length;
|
|
278
|
-
var dataLength = data.length;
|
|
279
|
-
var keyValues = new Array(groupLength);
|
|
280
|
-
var keyValue;
|
|
281
|
-
for (i = 0; i < groupLength; ++i) if (node = group[i]) {
|
|
282
|
-
keyValues[i] = keyValue = key.call(node, node.__data__, i, group) + "";
|
|
283
|
-
if (nodeByKeyValue.has(keyValue)) exit[i] = node;
|
|
284
|
-
else nodeByKeyValue.set(keyValue, node);
|
|
285
|
-
}
|
|
286
|
-
for (i = 0; i < dataLength; ++i) {
|
|
287
|
-
keyValue = key.call(parent, data[i], i, data) + "";
|
|
288
|
-
if (node = nodeByKeyValue.get(keyValue)) {
|
|
289
|
-
update[i] = node;
|
|
290
|
-
node.__data__ = data[i];
|
|
291
|
-
nodeByKeyValue.delete(keyValue);
|
|
292
|
-
} else enter[i] = new EnterNode(parent, data[i]);
|
|
293
|
-
}
|
|
294
|
-
for (i = 0; i < groupLength; ++i) if ((node = group[i]) && nodeByKeyValue.get(keyValues[i]) === node) exit[i] = node;
|
|
295
|
-
}
|
|
296
|
-
function datum(node) {
|
|
297
|
-
return node.__data__;
|
|
298
|
-
}
|
|
299
|
-
function data_default$1(value, key) {
|
|
300
|
-
if (!arguments.length) return Array.from(this, datum);
|
|
301
|
-
var bind = key ? bindKey : bindIndex;
|
|
302
|
-
var parents = this._parents;
|
|
303
|
-
var groups = this._groups;
|
|
304
|
-
if (typeof value !== "function") value = constant_default$5(value);
|
|
305
|
-
for (var m = groups.length, update = new Array(m), enter = new Array(m), exit = new Array(m), j = 0; j < m; ++j) {
|
|
306
|
-
var parent = parents[j];
|
|
307
|
-
var group = groups[j];
|
|
308
|
-
var groupLength = group.length;
|
|
309
|
-
var data = arraylike(value.call(parent, parent && parent.__data__, j, parents));
|
|
310
|
-
var dataLength = data.length;
|
|
311
|
-
var enterGroup = enter[j] = new Array(dataLength);
|
|
312
|
-
var updateGroup = update[j] = new Array(dataLength);
|
|
313
|
-
bind(parent, group, enterGroup, updateGroup, exit[j] = new Array(groupLength), data, key);
|
|
314
|
-
for (var i0 = 0, i1 = 0, previous, next; i0 < dataLength; ++i0) if (previous = enterGroup[i0]) {
|
|
315
|
-
if (i0 >= i1) i1 = i0 + 1;
|
|
316
|
-
while (!(next = updateGroup[i1]) && ++i1 < dataLength);
|
|
317
|
-
previous._next = next || null;
|
|
318
|
-
}
|
|
319
|
-
}
|
|
320
|
-
update = new Selection$1(update, parents);
|
|
321
|
-
update._enter = enter;
|
|
322
|
-
update._exit = exit;
|
|
323
|
-
return update;
|
|
324
|
-
}
|
|
325
|
-
__name(data_default$1, "default");
|
|
326
|
-
function arraylike(data) {
|
|
327
|
-
return typeof data === "object" && "length" in data ? data : Array.from(data);
|
|
328
|
-
}
|
|
329
|
-
//#endregion
|
|
330
|
-
//#region ../../node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/exit.js
|
|
331
|
-
function exit_default() {
|
|
332
|
-
return new Selection$1(this._exit || this._groups.map(sparse_default), this._parents);
|
|
333
|
-
}
|
|
334
|
-
__name(exit_default, "default");
|
|
335
|
-
//#endregion
|
|
336
|
-
//#region ../../node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/join.js
|
|
337
|
-
function join_default(onenter, onupdate, onexit) {
|
|
338
|
-
var enter = this.enter();
|
|
339
|
-
var update = this;
|
|
340
|
-
var exit = this.exit();
|
|
341
|
-
if (typeof onenter === "function") {
|
|
342
|
-
enter = onenter(enter);
|
|
343
|
-
if (enter) enter = enter.selection();
|
|
344
|
-
} else enter = enter.append(onenter + "");
|
|
345
|
-
if (onupdate != null) {
|
|
346
|
-
update = onupdate(update);
|
|
347
|
-
if (update) update = update.selection();
|
|
348
|
-
}
|
|
349
|
-
if (onexit == null) exit.remove();
|
|
350
|
-
else onexit(exit);
|
|
351
|
-
return enter && update ? enter.merge(update).order() : update;
|
|
352
|
-
}
|
|
353
|
-
__name(join_default, "default");
|
|
354
|
-
//#endregion
|
|
355
|
-
//#region ../../node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/merge.js
|
|
356
|
-
function merge_default$1(context) {
|
|
357
|
-
var selection = context.selection ? context.selection() : context;
|
|
358
|
-
for (var groups0 = this._groups, groups1 = selection._groups, m0 = groups0.length, m1 = groups1.length, m = Math.min(m0, m1), merges = new Array(m0), j = 0; j < m; ++j) for (var group0 = groups0[j], group1 = groups1[j], n = group0.length, merge = merges[j] = new Array(n), node, i = 0; i < n; ++i) if (node = group0[i] || group1[i]) merge[i] = node;
|
|
359
|
-
for (; j < m0; ++j) merges[j] = groups0[j];
|
|
360
|
-
return new Selection$1(merges, this._parents);
|
|
361
|
-
}
|
|
362
|
-
__name(merge_default$1, "default");
|
|
363
|
-
//#endregion
|
|
364
|
-
//#region ../../node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/order.js
|
|
365
|
-
function order_default() {
|
|
366
|
-
for (var groups = this._groups, j = -1, m = groups.length; ++j < m;) for (var group = groups[j], i = group.length - 1, next = group[i], node; --i >= 0;) if (node = group[i]) {
|
|
367
|
-
if (next && node.compareDocumentPosition(next) ^ 4) next.parentNode.insertBefore(node, next);
|
|
368
|
-
next = node;
|
|
369
|
-
}
|
|
370
|
-
return this;
|
|
371
|
-
}
|
|
372
|
-
__name(order_default, "default");
|
|
373
|
-
//#endregion
|
|
374
|
-
//#region ../../node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/sort.js
|
|
375
|
-
function sort_default(compare) {
|
|
376
|
-
if (!compare) compare = ascending;
|
|
377
|
-
function compareNode(a, b) {
|
|
378
|
-
return a && b ? compare(a.__data__, b.__data__) : !a - !b;
|
|
379
|
-
}
|
|
380
|
-
for (var groups = this._groups, m = groups.length, sortgroups = new Array(m), j = 0; j < m; ++j) {
|
|
381
|
-
for (var group = groups[j], n = group.length, sortgroup = sortgroups[j] = new Array(n), node, i = 0; i < n; ++i) if (node = group[i]) sortgroup[i] = node;
|
|
382
|
-
sortgroup.sort(compareNode);
|
|
383
|
-
}
|
|
384
|
-
return new Selection$1(sortgroups, this._parents).order();
|
|
385
|
-
}
|
|
386
|
-
__name(sort_default, "default");
|
|
387
|
-
function ascending(a, b) {
|
|
388
|
-
return a < b ? -1 : a > b ? 1 : a >= b ? 0 : NaN;
|
|
389
|
-
}
|
|
390
|
-
//#endregion
|
|
391
|
-
//#region ../../node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/call.js
|
|
392
|
-
function call_default() {
|
|
393
|
-
var callback = arguments[0];
|
|
394
|
-
arguments[0] = this;
|
|
395
|
-
callback.apply(null, arguments);
|
|
396
|
-
return this;
|
|
397
|
-
}
|
|
398
|
-
__name(call_default, "default");
|
|
399
|
-
//#endregion
|
|
400
|
-
//#region ../../node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/nodes.js
|
|
401
|
-
function nodes_default() {
|
|
402
|
-
return Array.from(this);
|
|
403
|
-
}
|
|
404
|
-
__name(nodes_default, "default");
|
|
405
|
-
//#endregion
|
|
406
|
-
//#region ../../node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/node.js
|
|
407
|
-
function node_default() {
|
|
408
|
-
for (var groups = this._groups, j = 0, m = groups.length; j < m; ++j) for (var group = groups[j], i = 0, n = group.length; i < n; ++i) {
|
|
409
|
-
var node = group[i];
|
|
410
|
-
if (node) return node;
|
|
411
|
-
}
|
|
412
|
-
return null;
|
|
413
|
-
}
|
|
414
|
-
__name(node_default, "default");
|
|
415
|
-
//#endregion
|
|
416
|
-
//#region ../../node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/size.js
|
|
417
|
-
function size_default$1() {
|
|
418
|
-
let size = 0;
|
|
419
|
-
for (const node of this) ++size;
|
|
420
|
-
return size;
|
|
421
|
-
}
|
|
422
|
-
__name(size_default$1, "default");
|
|
423
|
-
//#endregion
|
|
424
|
-
//#region ../../node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/empty.js
|
|
425
|
-
function empty_default() {
|
|
426
|
-
return !this.node();
|
|
427
|
-
}
|
|
428
|
-
__name(empty_default, "default");
|
|
429
|
-
//#endregion
|
|
430
|
-
//#region ../../node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/each.js
|
|
431
|
-
function each_default(callback) {
|
|
432
|
-
for (var groups = this._groups, j = 0, m = groups.length; j < m; ++j) for (var group = groups[j], i = 0, n = group.length, node; i < n; ++i) if (node = group[i]) callback.call(node, node.__data__, i, group);
|
|
433
|
-
return this;
|
|
434
|
-
}
|
|
435
|
-
__name(each_default, "default");
|
|
436
|
-
//#endregion
|
|
437
|
-
//#region ../../node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/attr.js
|
|
438
|
-
function attrRemove$1(name) {
|
|
439
|
-
return function() {
|
|
440
|
-
this.removeAttribute(name);
|
|
441
|
-
};
|
|
442
|
-
}
|
|
443
|
-
__name(attrRemove$1, "attrRemove");
|
|
444
|
-
function attrRemoveNS$1(fullname) {
|
|
445
|
-
return function() {
|
|
446
|
-
this.removeAttributeNS(fullname.space, fullname.local);
|
|
447
|
-
};
|
|
448
|
-
}
|
|
449
|
-
__name(attrRemoveNS$1, "attrRemoveNS");
|
|
450
|
-
function attrConstant$1(name, value) {
|
|
451
|
-
return function() {
|
|
452
|
-
this.setAttribute(name, value);
|
|
453
|
-
};
|
|
454
|
-
}
|
|
455
|
-
__name(attrConstant$1, "attrConstant");
|
|
456
|
-
function attrConstantNS$1(fullname, value) {
|
|
457
|
-
return function() {
|
|
458
|
-
this.setAttributeNS(fullname.space, fullname.local, value);
|
|
459
|
-
};
|
|
460
|
-
}
|
|
461
|
-
__name(attr_default$1, "default");
|
|
462
|
-
__name(attrConstantNS$1, "attrConstantNS");
|
|
463
|
-
function attrFunction$1(name, value) {
|
|
464
|
-
return function() {
|
|
465
|
-
var v = value.apply(this, arguments);
|
|
466
|
-
if (v == null) this.removeAttribute(name);
|
|
467
|
-
else this.setAttribute(name, v);
|
|
468
|
-
};
|
|
469
|
-
}
|
|
470
|
-
__name(attrFunction$1, "attrFunction");
|
|
471
|
-
function attrFunctionNS$1(fullname, value) {
|
|
472
|
-
return function() {
|
|
473
|
-
var v = value.apply(this, arguments);
|
|
474
|
-
if (v == null) this.removeAttributeNS(fullname.space, fullname.local);
|
|
475
|
-
else this.setAttributeNS(fullname.space, fullname.local, v);
|
|
476
|
-
};
|
|
477
|
-
}
|
|
478
|
-
__name(attrFunctionNS$1, "attrFunctionNS");
|
|
479
|
-
function attr_default$1(name, value) {
|
|
480
|
-
var fullname = namespace_default(name);
|
|
481
|
-
if (arguments.length < 2) {
|
|
482
|
-
var node = this.node();
|
|
483
|
-
return fullname.local ? node.getAttributeNS(fullname.space, fullname.local) : node.getAttribute(fullname);
|
|
484
|
-
}
|
|
485
|
-
return this.each((value == null ? fullname.local ? attrRemoveNS$1 : attrRemove$1 : typeof value === "function" ? fullname.local ? attrFunctionNS$1 : attrFunction$1 : fullname.local ? attrConstantNS$1 : attrConstant$1)(fullname, value));
|
|
486
|
-
}
|
|
487
|
-
//#endregion
|
|
488
|
-
//#region ../../node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/window.js
|
|
489
|
-
function window_default(node) {
|
|
490
|
-
return node.ownerDocument && node.ownerDocument.defaultView || node.document && node || node.defaultView;
|
|
491
|
-
}
|
|
492
|
-
__name(window_default, "default");
|
|
493
|
-
//#endregion
|
|
494
|
-
//#region ../../node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/style.js
|
|
495
|
-
function styleRemove$1(name) {
|
|
496
|
-
return function() {
|
|
497
|
-
this.style.removeProperty(name);
|
|
498
|
-
};
|
|
499
|
-
}
|
|
500
|
-
__name(styleRemove$1, "styleRemove");
|
|
501
|
-
function styleConstant$1(name, value, priority) {
|
|
502
|
-
return function() {
|
|
503
|
-
this.style.setProperty(name, value, priority);
|
|
504
|
-
};
|
|
505
|
-
}
|
|
506
|
-
__name(styleConstant$1, "styleConstant");
|
|
507
|
-
__name(style_default$1, "default");
|
|
508
|
-
function styleFunction$1(name, value, priority) {
|
|
509
|
-
return function() {
|
|
510
|
-
var v = value.apply(this, arguments);
|
|
511
|
-
if (v == null) this.style.removeProperty(name);
|
|
512
|
-
else this.style.setProperty(name, v, priority);
|
|
513
|
-
};
|
|
514
|
-
}
|
|
515
|
-
__name(styleFunction$1, "styleFunction");
|
|
516
|
-
function style_default$1(name, value, priority) {
|
|
517
|
-
return arguments.length > 1 ? this.each((value == null ? styleRemove$1 : typeof value === "function" ? styleFunction$1 : styleConstant$1)(name, value, priority == null ? "" : priority)) : styleValue(this.node(), name);
|
|
518
|
-
}
|
|
519
|
-
function styleValue(node, name) {
|
|
520
|
-
return node.style.getPropertyValue(name) || window_default(node).getComputedStyle(node, null).getPropertyValue(name);
|
|
521
|
-
}
|
|
522
|
-
//#endregion
|
|
523
|
-
//#region ../../node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/property.js
|
|
524
|
-
function propertyRemove(name) {
|
|
525
|
-
return function() {
|
|
526
|
-
delete this[name];
|
|
527
|
-
};
|
|
528
|
-
}
|
|
529
|
-
function propertyConstant(name, value) {
|
|
530
|
-
return function() {
|
|
531
|
-
this[name] = value;
|
|
532
|
-
};
|
|
533
|
-
}
|
|
534
|
-
function propertyFunction(name, value) {
|
|
535
|
-
return function() {
|
|
536
|
-
var v = value.apply(this, arguments);
|
|
537
|
-
if (v == null) delete this[name];
|
|
538
|
-
else this[name] = v;
|
|
539
|
-
};
|
|
540
|
-
}
|
|
541
|
-
function property_default(name, value) {
|
|
542
|
-
return arguments.length > 1 ? this.each((value == null ? propertyRemove : typeof value === "function" ? propertyFunction : propertyConstant)(name, value)) : this.node()[name];
|
|
543
|
-
}
|
|
544
|
-
__name(property_default, "default");
|
|
545
|
-
//#endregion
|
|
546
|
-
//#region ../../node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/classed.js
|
|
547
|
-
function classArray(string) {
|
|
548
|
-
return string.trim().split(/^|\s+/);
|
|
549
|
-
}
|
|
550
|
-
function classList(node) {
|
|
551
|
-
return node.classList || new ClassList(node);
|
|
552
|
-
}
|
|
553
|
-
function ClassList(node) {
|
|
554
|
-
this._node = node;
|
|
555
|
-
this._names = classArray(node.getAttribute("class") || "");
|
|
556
|
-
}
|
|
557
|
-
ClassList.prototype = {
|
|
558
|
-
add: function(name) {
|
|
559
|
-
if (this._names.indexOf(name) < 0) {
|
|
560
|
-
this._names.push(name);
|
|
561
|
-
this._node.setAttribute("class", this._names.join(" "));
|
|
562
|
-
}
|
|
563
|
-
},
|
|
564
|
-
remove: function(name) {
|
|
565
|
-
var i = this._names.indexOf(name);
|
|
566
|
-
if (i >= 0) {
|
|
567
|
-
this._names.splice(i, 1);
|
|
568
|
-
this._node.setAttribute("class", this._names.join(" "));
|
|
569
|
-
}
|
|
570
|
-
},
|
|
571
|
-
contains: function(name) {
|
|
572
|
-
return this._names.indexOf(name) >= 0;
|
|
573
|
-
}
|
|
574
|
-
};
|
|
575
|
-
function classedAdd(node, names) {
|
|
576
|
-
var list = classList(node);
|
|
577
|
-
var i = -1;
|
|
578
|
-
var n = names.length;
|
|
579
|
-
while (++i < n) list.add(names[i]);
|
|
580
|
-
}
|
|
581
|
-
function classedRemove(node, names) {
|
|
582
|
-
var list = classList(node);
|
|
583
|
-
var i = -1;
|
|
584
|
-
var n = names.length;
|
|
585
|
-
while (++i < n) list.remove(names[i]);
|
|
586
|
-
}
|
|
587
|
-
function classedTrue(names) {
|
|
588
|
-
return function() {
|
|
589
|
-
classedAdd(this, names);
|
|
590
|
-
};
|
|
591
|
-
}
|
|
592
|
-
function classedFalse(names) {
|
|
593
|
-
return function() {
|
|
594
|
-
classedRemove(this, names);
|
|
595
|
-
};
|
|
596
|
-
}
|
|
597
|
-
function classedFunction(names, value) {
|
|
598
|
-
return function() {
|
|
599
|
-
(value.apply(this, arguments) ? classedAdd : classedRemove)(this, names);
|
|
600
|
-
};
|
|
601
|
-
}
|
|
602
|
-
function classed_default(name, value) {
|
|
603
|
-
var names = classArray(name + "");
|
|
604
|
-
if (arguments.length < 2) {
|
|
605
|
-
var list = classList(this.node());
|
|
606
|
-
var i = -1;
|
|
607
|
-
var n = names.length;
|
|
608
|
-
while (++i < n) if (!list.contains(names[i])) return false;
|
|
609
|
-
return true;
|
|
610
|
-
}
|
|
611
|
-
return this.each((typeof value === "function" ? classedFunction : value ? classedTrue : classedFalse)(names, value));
|
|
612
|
-
}
|
|
613
|
-
__name(classed_default, "default");
|
|
614
|
-
//#endregion
|
|
615
|
-
//#region ../../node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/text.js
|
|
616
|
-
function textRemove() {
|
|
617
|
-
this.textContent = "";
|
|
618
|
-
}
|
|
619
|
-
function textConstant$1(value) {
|
|
620
|
-
return function() {
|
|
621
|
-
this.textContent = value;
|
|
622
|
-
};
|
|
623
|
-
}
|
|
624
|
-
__name(textConstant$1, "textConstant");
|
|
625
|
-
function textFunction$1(value) {
|
|
626
|
-
return function() {
|
|
627
|
-
var v = value.apply(this, arguments);
|
|
628
|
-
this.textContent = v == null ? "" : v;
|
|
629
|
-
};
|
|
630
|
-
}
|
|
631
|
-
__name(text_default$1, "default");
|
|
632
|
-
__name(textFunction$1, "textFunction");
|
|
633
|
-
function text_default$1(value) {
|
|
634
|
-
return arguments.length ? this.each(value == null ? textRemove : (typeof value === "function" ? textFunction$1 : textConstant$1)(value)) : this.node().textContent;
|
|
635
|
-
}
|
|
636
|
-
//#endregion
|
|
637
|
-
//#region ../../node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/html.js
|
|
638
|
-
function htmlRemove() {
|
|
639
|
-
this.innerHTML = "";
|
|
640
|
-
}
|
|
641
|
-
function htmlConstant(value) {
|
|
642
|
-
return function() {
|
|
643
|
-
this.innerHTML = value;
|
|
644
|
-
};
|
|
645
|
-
}
|
|
646
|
-
function htmlFunction(value) {
|
|
647
|
-
return function() {
|
|
648
|
-
var v = value.apply(this, arguments);
|
|
649
|
-
this.innerHTML = v == null ? "" : v;
|
|
650
|
-
};
|
|
651
|
-
}
|
|
652
|
-
function html_default(value) {
|
|
653
|
-
return arguments.length ? this.each(value == null ? htmlRemove : (typeof value === "function" ? htmlFunction : htmlConstant)(value)) : this.node().innerHTML;
|
|
654
|
-
}
|
|
655
|
-
__name(html_default, "default");
|
|
656
|
-
//#endregion
|
|
657
|
-
//#region ../../node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/raise.js
|
|
658
|
-
function raise() {
|
|
659
|
-
if (this.nextSibling) this.parentNode.appendChild(this);
|
|
660
|
-
}
|
|
661
|
-
function raise_default() {
|
|
662
|
-
return this.each(raise);
|
|
663
|
-
}
|
|
664
|
-
__name(raise_default, "default");
|
|
665
|
-
//#endregion
|
|
666
|
-
//#region ../../node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/lower.js
|
|
667
|
-
function lower() {
|
|
668
|
-
if (this.previousSibling) this.parentNode.insertBefore(this, this.parentNode.firstChild);
|
|
669
|
-
}
|
|
670
|
-
function lower_default() {
|
|
671
|
-
return this.each(lower);
|
|
672
|
-
}
|
|
673
|
-
__name(lower_default, "default");
|
|
674
|
-
//#endregion
|
|
675
|
-
//#region ../../node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/append.js
|
|
676
|
-
function append_default(name) {
|
|
677
|
-
var create = typeof name === "function" ? name : creator_default(name);
|
|
678
|
-
return this.select(function() {
|
|
679
|
-
return this.appendChild(create.apply(this, arguments));
|
|
680
|
-
});
|
|
681
|
-
}
|
|
682
|
-
__name(append_default, "default");
|
|
683
|
-
//#endregion
|
|
684
|
-
//#region ../../node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/insert.js
|
|
685
|
-
function constantNull() {
|
|
686
|
-
return null;
|
|
687
|
-
}
|
|
688
|
-
function insert_default(name, before) {
|
|
689
|
-
var create = typeof name === "function" ? name : creator_default(name);
|
|
690
|
-
var select = before == null ? constantNull : typeof before === "function" ? before : selector_default(before);
|
|
691
|
-
return this.select(function() {
|
|
692
|
-
return this.insertBefore(create.apply(this, arguments), select.apply(this, arguments) || null);
|
|
693
|
-
});
|
|
694
|
-
}
|
|
695
|
-
__name(insert_default, "default");
|
|
696
|
-
//#endregion
|
|
697
|
-
//#region ../../node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/remove.js
|
|
698
|
-
function remove() {
|
|
699
|
-
var parent = this.parentNode;
|
|
700
|
-
if (parent) parent.removeChild(this);
|
|
701
|
-
}
|
|
702
|
-
function remove_default$2() {
|
|
703
|
-
return this.each(remove);
|
|
704
|
-
}
|
|
705
|
-
__name(remove_default$2, "default");
|
|
706
|
-
//#endregion
|
|
707
|
-
//#region ../../node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/clone.js
|
|
708
|
-
function selection_cloneShallow() {
|
|
709
|
-
var clone = this.cloneNode(false);
|
|
710
|
-
var parent = this.parentNode;
|
|
711
|
-
return parent ? parent.insertBefore(clone, this.nextSibling) : clone;
|
|
712
|
-
}
|
|
713
|
-
function selection_cloneDeep() {
|
|
714
|
-
var clone = this.cloneNode(true);
|
|
715
|
-
var parent = this.parentNode;
|
|
716
|
-
return parent ? parent.insertBefore(clone, this.nextSibling) : clone;
|
|
717
|
-
}
|
|
718
|
-
function clone_default(deep) {
|
|
719
|
-
return this.select(deep ? selection_cloneDeep : selection_cloneShallow);
|
|
720
|
-
}
|
|
721
|
-
__name(clone_default, "default");
|
|
722
|
-
//#endregion
|
|
723
|
-
//#region ../../node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/datum.js
|
|
724
|
-
function datum_default(value) {
|
|
725
|
-
return arguments.length ? this.property("__data__", value) : this.node().__data__;
|
|
726
|
-
}
|
|
727
|
-
__name(datum_default, "default");
|
|
728
|
-
//#endregion
|
|
729
|
-
//#region ../../node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/on.js
|
|
730
|
-
function contextListener(listener) {
|
|
731
|
-
return function(event) {
|
|
732
|
-
listener.call(this, event, this.__data__);
|
|
733
|
-
};
|
|
734
|
-
}
|
|
735
|
-
function parseTypenames(typenames) {
|
|
736
|
-
return typenames.trim().split(/^|\s+/).map(function(t) {
|
|
737
|
-
var name = "";
|
|
738
|
-
var i = t.indexOf(".");
|
|
739
|
-
if (i >= 0) name = t.slice(i + 1), t = t.slice(0, i);
|
|
740
|
-
return {
|
|
741
|
-
type: t,
|
|
742
|
-
name
|
|
743
|
-
};
|
|
744
|
-
});
|
|
745
|
-
}
|
|
746
|
-
function onRemove(typename) {
|
|
747
|
-
return function() {
|
|
748
|
-
var on = this.__on;
|
|
749
|
-
if (!on) return;
|
|
750
|
-
for (var j = 0, i = -1, m = on.length, o; j < m; ++j) if (o = on[j], (!typename.type || o.type === typename.type) && o.name === typename.name) this.removeEventListener(o.type, o.listener, o.options);
|
|
751
|
-
else on[++i] = o;
|
|
752
|
-
if (++i) on.length = i;
|
|
753
|
-
else delete this.__on;
|
|
754
|
-
};
|
|
755
|
-
}
|
|
756
|
-
function onAdd(typename, value, options) {
|
|
757
|
-
return function() {
|
|
758
|
-
var on = this.__on;
|
|
759
|
-
var o;
|
|
760
|
-
var listener = contextListener(value);
|
|
761
|
-
if (on) {
|
|
762
|
-
for (var j = 0, m = on.length; j < m; ++j) if ((o = on[j]).type === typename.type && o.name === typename.name) {
|
|
763
|
-
this.removeEventListener(o.type, o.listener, o.options);
|
|
764
|
-
this.addEventListener(o.type, o.listener = listener, o.options = options);
|
|
765
|
-
o.value = value;
|
|
766
|
-
return;
|
|
767
|
-
}
|
|
768
|
-
}
|
|
769
|
-
this.addEventListener(typename.type, listener, options);
|
|
770
|
-
o = {
|
|
771
|
-
type: typename.type,
|
|
772
|
-
name: typename.name,
|
|
773
|
-
value,
|
|
774
|
-
listener,
|
|
775
|
-
options
|
|
776
|
-
};
|
|
777
|
-
if (!on) this.__on = [o];
|
|
778
|
-
else on.push(o);
|
|
779
|
-
};
|
|
780
|
-
}
|
|
781
|
-
function on_default$1(typename, value, options) {
|
|
782
|
-
var typenames = parseTypenames(typename + "");
|
|
783
|
-
var i;
|
|
784
|
-
var n = typenames.length;
|
|
785
|
-
var t;
|
|
786
|
-
if (arguments.length < 2) {
|
|
787
|
-
var on = this.node().__on;
|
|
788
|
-
if (on) {
|
|
789
|
-
for (var j = 0, m = on.length, o; j < m; ++j) for (i = 0, o = on[j]; i < n; ++i) if ((t = typenames[i]).type === o.type && t.name === o.name) return o.value;
|
|
790
|
-
}
|
|
791
|
-
return;
|
|
792
|
-
}
|
|
793
|
-
on = value ? onAdd : onRemove;
|
|
794
|
-
for (i = 0; i < n; ++i) this.each(on(typenames[i], value, options));
|
|
795
|
-
return this;
|
|
796
|
-
}
|
|
797
|
-
__name(on_default$1, "default");
|
|
798
|
-
//#endregion
|
|
799
|
-
//#region ../../node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/dispatch.js
|
|
800
|
-
function dispatchEvent(node, type, params) {
|
|
801
|
-
var window = window_default(node);
|
|
802
|
-
var event = window.CustomEvent;
|
|
803
|
-
if (typeof event === "function") event = new event(type, params);
|
|
804
|
-
else {
|
|
805
|
-
event = window.document.createEvent("Event");
|
|
806
|
-
if (params) event.initEvent(type, params.bubbles, params.cancelable), event.detail = params.detail;
|
|
807
|
-
else event.initEvent(type, false, false);
|
|
808
|
-
}
|
|
809
|
-
node.dispatchEvent(event);
|
|
810
|
-
}
|
|
811
|
-
function dispatchConstant(type, params) {
|
|
812
|
-
return function() {
|
|
813
|
-
return dispatchEvent(this, type, params);
|
|
814
|
-
};
|
|
815
|
-
}
|
|
816
|
-
function dispatchFunction(type, params) {
|
|
817
|
-
return function() {
|
|
818
|
-
return dispatchEvent(this, type, params.apply(this, arguments));
|
|
819
|
-
};
|
|
820
|
-
}
|
|
821
|
-
function dispatch_default(type, params) {
|
|
822
|
-
return this.each((typeof params === "function" ? dispatchFunction : dispatchConstant)(type, params));
|
|
823
|
-
}
|
|
824
|
-
__name(dispatch_default, "default");
|
|
825
|
-
//#endregion
|
|
826
|
-
//#region ../../node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/iterator.js
|
|
827
|
-
function* iterator_default() {
|
|
828
|
-
for (var groups = this._groups, j = 0, m = groups.length; j < m; ++j) for (var group = groups[j], i = 0, n = group.length, node; i < n; ++i) if (node = group[i]) yield node;
|
|
829
|
-
}
|
|
830
|
-
__name(iterator_default, "default");
|
|
831
|
-
//#endregion
|
|
832
|
-
//#region ../../node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/index.js
|
|
833
|
-
var root = [null];
|
|
834
|
-
function Selection$1(groups, parents) {
|
|
835
|
-
this._groups = groups;
|
|
836
|
-
this._parents = parents;
|
|
837
|
-
}
|
|
838
|
-
__name(Selection$1, "Selection");
|
|
839
|
-
function selection() {
|
|
840
|
-
return new Selection$1([[document.documentElement]], root);
|
|
841
|
-
}
|
|
842
|
-
function selection_selection() {
|
|
843
|
-
return this;
|
|
844
|
-
}
|
|
845
|
-
Selection$1.prototype = selection.prototype = {
|
|
846
|
-
constructor: Selection$1,
|
|
847
|
-
select: select_default$2,
|
|
848
|
-
selectAll: selectAll_default$1,
|
|
849
|
-
selectChild: selectChild_default,
|
|
850
|
-
selectChildren: selectChildren_default,
|
|
851
|
-
filter: filter_default$1,
|
|
852
|
-
data: data_default$1,
|
|
853
|
-
enter: enter_default,
|
|
854
|
-
exit: exit_default,
|
|
855
|
-
join: join_default,
|
|
856
|
-
merge: merge_default$1,
|
|
857
|
-
selection: selection_selection,
|
|
858
|
-
order: order_default,
|
|
859
|
-
sort: sort_default,
|
|
860
|
-
call: call_default,
|
|
861
|
-
nodes: nodes_default,
|
|
862
|
-
node: node_default,
|
|
863
|
-
size: size_default$1,
|
|
864
|
-
empty: empty_default,
|
|
865
|
-
each: each_default,
|
|
866
|
-
attr: attr_default$1,
|
|
867
|
-
style: style_default$1,
|
|
868
|
-
property: property_default,
|
|
869
|
-
classed: classed_default,
|
|
870
|
-
text: text_default$1,
|
|
871
|
-
html: html_default,
|
|
872
|
-
raise: raise_default,
|
|
873
|
-
lower: lower_default,
|
|
874
|
-
append: append_default,
|
|
875
|
-
insert: insert_default,
|
|
876
|
-
remove: remove_default$2,
|
|
877
|
-
clone: clone_default,
|
|
878
|
-
datum: datum_default,
|
|
879
|
-
on: on_default$1,
|
|
880
|
-
dispatch: dispatch_default,
|
|
881
|
-
[Symbol.iterator]: iterator_default
|
|
882
|
-
};
|
|
883
|
-
//#endregion
|
|
884
|
-
//#region ../../node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/select.js
|
|
885
|
-
function select_default$1(selector) {
|
|
886
|
-
return typeof selector === "string" ? new Selection$1([[document.querySelector(selector)]], [document.documentElement]) : new Selection$1([[selector]], root);
|
|
887
|
-
}
|
|
888
|
-
__name(select_default$1, "default");
|
|
889
|
-
//#endregion
|
|
890
|
-
//#region ../../node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/sourceEvent.js
|
|
891
|
-
function sourceEvent_default(event) {
|
|
892
|
-
let sourceEvent;
|
|
893
|
-
while (sourceEvent = event.sourceEvent) event = sourceEvent;
|
|
894
|
-
return event;
|
|
895
|
-
}
|
|
896
|
-
__name(sourceEvent_default, "default");
|
|
897
|
-
//#endregion
|
|
898
|
-
//#region ../../node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/pointer.js
|
|
899
|
-
function pointer_default(event, node) {
|
|
900
|
-
event = sourceEvent_default(event);
|
|
901
|
-
if (node === void 0) node = event.currentTarget;
|
|
902
|
-
if (node) {
|
|
903
|
-
var svg = node.ownerSVGElement || node;
|
|
904
|
-
if (svg.createSVGPoint) {
|
|
905
|
-
var point = svg.createSVGPoint();
|
|
906
|
-
point.x = event.clientX, point.y = event.clientY;
|
|
907
|
-
point = point.matrixTransform(node.getScreenCTM().inverse());
|
|
908
|
-
return [point.x, point.y];
|
|
909
|
-
}
|
|
910
|
-
if (node.getBoundingClientRect) {
|
|
911
|
-
var rect = node.getBoundingClientRect();
|
|
912
|
-
return [event.clientX - rect.left - node.clientLeft, event.clientY - rect.top - node.clientTop];
|
|
913
|
-
}
|
|
914
|
-
}
|
|
915
|
-
return [event.pageX, event.pageY];
|
|
916
|
-
}
|
|
917
|
-
__name(pointer_default, "default");
|
|
918
|
-
//#endregion
|
|
919
|
-
//#region ../../node_modules/.pnpm/d3-drag@3.0.0/node_modules/d3-drag/src/noevent.js
|
|
920
|
-
var nonpassive = { passive: false };
|
|
921
|
-
var nonpassivecapture = {
|
|
922
|
-
capture: true,
|
|
923
|
-
passive: false
|
|
924
|
-
};
|
|
925
|
-
function nopropagation$1(event) {
|
|
926
|
-
event.stopImmediatePropagation();
|
|
927
|
-
}
|
|
928
|
-
__name(nopropagation$1, "nopropagation");
|
|
929
|
-
__name(noevent_default$1, "default");
|
|
930
|
-
function noevent_default$1(event) {
|
|
931
|
-
event.preventDefault();
|
|
932
|
-
event.stopImmediatePropagation();
|
|
933
|
-
}
|
|
934
|
-
//#endregion
|
|
935
|
-
//#region ../../node_modules/.pnpm/d3-drag@3.0.0/node_modules/d3-drag/src/nodrag.js
|
|
936
|
-
function nodrag_default(view) {
|
|
937
|
-
var root = view.document.documentElement;
|
|
938
|
-
var selection = select_default$1(view).on("dragstart.drag", noevent_default$1, nonpassivecapture);
|
|
939
|
-
if ("onselectstart" in root) selection.on("selectstart.drag", noevent_default$1, nonpassivecapture);
|
|
940
|
-
else {
|
|
941
|
-
root.__noselect = root.style.MozUserSelect;
|
|
942
|
-
root.style.MozUserSelect = "none";
|
|
943
|
-
}
|
|
944
|
-
}
|
|
945
|
-
__name(nodrag_default, "default");
|
|
946
|
-
function yesdrag(view, noclick) {
|
|
947
|
-
var root = view.document.documentElement;
|
|
948
|
-
var selection = select_default$1(view).on("dragstart.drag", null);
|
|
949
|
-
if (noclick) {
|
|
950
|
-
selection.on("click.drag", noevent_default$1, nonpassivecapture);
|
|
951
|
-
setTimeout(function() {
|
|
952
|
-
selection.on("click.drag", null);
|
|
953
|
-
}, 0);
|
|
954
|
-
}
|
|
955
|
-
if ("onselectstart" in root) selection.on("selectstart.drag", null);
|
|
956
|
-
else {
|
|
957
|
-
root.style.MozUserSelect = root.__noselect;
|
|
958
|
-
delete root.__noselect;
|
|
959
|
-
}
|
|
960
|
-
}
|
|
961
|
-
//#endregion
|
|
962
|
-
//#region ../../node_modules/.pnpm/d3-drag@3.0.0/node_modules/d3-drag/src/constant.js
|
|
963
|
-
var constant_default$4 = /* @__PURE__ */ __name((x) => () => x, "default");
|
|
964
|
-
//#endregion
|
|
965
|
-
//#region ../../node_modules/.pnpm/d3-drag@3.0.0/node_modules/d3-drag/src/event.js
|
|
966
|
-
function DragEvent(type, { sourceEvent, subject, target, identifier, active, x, y, dx, dy, dispatch }) {
|
|
967
|
-
Object.defineProperties(this, {
|
|
968
|
-
type: {
|
|
969
|
-
value: type,
|
|
970
|
-
enumerable: true,
|
|
971
|
-
configurable: true
|
|
972
|
-
},
|
|
973
|
-
sourceEvent: {
|
|
974
|
-
value: sourceEvent,
|
|
975
|
-
enumerable: true,
|
|
976
|
-
configurable: true
|
|
977
|
-
},
|
|
978
|
-
subject: {
|
|
979
|
-
value: subject,
|
|
980
|
-
enumerable: true,
|
|
981
|
-
configurable: true
|
|
982
|
-
},
|
|
983
|
-
target: {
|
|
984
|
-
value: target,
|
|
985
|
-
enumerable: true,
|
|
986
|
-
configurable: true
|
|
987
|
-
},
|
|
988
|
-
identifier: {
|
|
989
|
-
value: identifier,
|
|
990
|
-
enumerable: true,
|
|
991
|
-
configurable: true
|
|
992
|
-
},
|
|
993
|
-
active: {
|
|
994
|
-
value: active,
|
|
995
|
-
enumerable: true,
|
|
996
|
-
configurable: true
|
|
997
|
-
},
|
|
998
|
-
x: {
|
|
999
|
-
value: x,
|
|
1000
|
-
enumerable: true,
|
|
1001
|
-
configurable: true
|
|
1002
|
-
},
|
|
1003
|
-
y: {
|
|
1004
|
-
value: y,
|
|
1005
|
-
enumerable: true,
|
|
1006
|
-
configurable: true
|
|
1007
|
-
},
|
|
1008
|
-
dx: {
|
|
1009
|
-
value: dx,
|
|
1010
|
-
enumerable: true,
|
|
1011
|
-
configurable: true
|
|
1012
|
-
},
|
|
1013
|
-
dy: {
|
|
1014
|
-
value: dy,
|
|
1015
|
-
enumerable: true,
|
|
1016
|
-
configurable: true
|
|
1017
|
-
},
|
|
1018
|
-
_: { value: dispatch }
|
|
1019
|
-
});
|
|
1020
|
-
}
|
|
1021
|
-
DragEvent.prototype.on = function() {
|
|
1022
|
-
var value = this._.on.apply(this._, arguments);
|
|
1023
|
-
return value === this._ ? this : value;
|
|
1024
|
-
};
|
|
1025
|
-
//#endregion
|
|
1026
|
-
//#region ../../node_modules/.pnpm/d3-drag@3.0.0/node_modules/d3-drag/src/drag.js
|
|
1027
|
-
function defaultFilter$1(event) {
|
|
1028
|
-
return !event.ctrlKey && !event.button;
|
|
1029
|
-
}
|
|
1030
|
-
__name(defaultFilter$1, "defaultFilter");
|
|
1031
|
-
function defaultContainer() {
|
|
1032
|
-
return this.parentNode;
|
|
1033
|
-
}
|
|
1034
|
-
function defaultSubject(event, d) {
|
|
1035
|
-
return d == null ? {
|
|
1036
|
-
x: event.x,
|
|
1037
|
-
y: event.y
|
|
1038
|
-
} : d;
|
|
1039
|
-
}
|
|
1040
|
-
function defaultTouchable$1() {
|
|
1041
|
-
return navigator.maxTouchPoints || "ontouchstart" in this;
|
|
1042
|
-
}
|
|
1043
|
-
__name(drag_default, "default");
|
|
1044
|
-
__name(defaultTouchable$1, "defaultTouchable");
|
|
1045
|
-
function drag_default() {
|
|
1046
|
-
var filter = defaultFilter$1;
|
|
1047
|
-
var container = defaultContainer;
|
|
1048
|
-
var subject = defaultSubject;
|
|
1049
|
-
var touchable = defaultTouchable$1;
|
|
1050
|
-
var gestures = {};
|
|
1051
|
-
var listeners = dispatch("start", "drag", "end");
|
|
1052
|
-
var active = 0;
|
|
1053
|
-
var mousedownx;
|
|
1054
|
-
var mousedowny;
|
|
1055
|
-
var mousemoving;
|
|
1056
|
-
var touchending;
|
|
1057
|
-
var clickDistance2 = 0;
|
|
1058
|
-
function drag(selection) {
|
|
1059
|
-
selection.on("mousedown.drag", mousedowned).filter(touchable).on("touchstart.drag", touchstarted).on("touchmove.drag", touchmoved, nonpassive).on("touchend.drag touchcancel.drag", touchended).style("touch-action", "none").style("-webkit-tap-highlight-color", "rgba(0,0,0,0)");
|
|
1060
|
-
}
|
|
1061
|
-
function mousedowned(event, d) {
|
|
1062
|
-
if (touchending || !filter.call(this, event, d)) return;
|
|
1063
|
-
var gesture = beforestart(this, container.call(this, event, d), event, d, "mouse");
|
|
1064
|
-
if (!gesture) return;
|
|
1065
|
-
select_default$1(event.view).on("mousemove.drag", mousemoved, nonpassivecapture).on("mouseup.drag", mouseupped, nonpassivecapture);
|
|
1066
|
-
nodrag_default(event.view);
|
|
1067
|
-
nopropagation$1(event);
|
|
1068
|
-
mousemoving = false;
|
|
1069
|
-
mousedownx = event.clientX;
|
|
1070
|
-
mousedowny = event.clientY;
|
|
1071
|
-
gesture("start", event);
|
|
1072
|
-
}
|
|
1073
|
-
function mousemoved(event) {
|
|
1074
|
-
noevent_default$1(event);
|
|
1075
|
-
if (!mousemoving) {
|
|
1076
|
-
var dx = event.clientX - mousedownx;
|
|
1077
|
-
var dy = event.clientY - mousedowny;
|
|
1078
|
-
mousemoving = dx * dx + dy * dy > clickDistance2;
|
|
1079
|
-
}
|
|
1080
|
-
gestures.mouse("drag", event);
|
|
1081
|
-
}
|
|
1082
|
-
function mouseupped(event) {
|
|
1083
|
-
select_default$1(event.view).on("mousemove.drag mouseup.drag", null);
|
|
1084
|
-
yesdrag(event.view, mousemoving);
|
|
1085
|
-
noevent_default$1(event);
|
|
1086
|
-
gestures.mouse("end", event);
|
|
1087
|
-
}
|
|
1088
|
-
function touchstarted(event, d) {
|
|
1089
|
-
if (!filter.call(this, event, d)) return;
|
|
1090
|
-
var touches = event.changedTouches;
|
|
1091
|
-
var c = container.call(this, event, d);
|
|
1092
|
-
var n = touches.length;
|
|
1093
|
-
var i = 0;
|
|
1094
|
-
var gesture;
|
|
1095
|
-
for (; i < n; ++i) if (gesture = beforestart(this, c, event, d, touches[i].identifier, touches[i])) {
|
|
1096
|
-
nopropagation$1(event);
|
|
1097
|
-
gesture("start", event, touches[i]);
|
|
1098
|
-
}
|
|
1099
|
-
}
|
|
1100
|
-
function touchmoved(event) {
|
|
1101
|
-
var touches = event.changedTouches;
|
|
1102
|
-
var n = touches.length;
|
|
1103
|
-
var i = 0;
|
|
1104
|
-
var gesture;
|
|
1105
|
-
for (; i < n; ++i) if (gesture = gestures[touches[i].identifier]) {
|
|
1106
|
-
noevent_default$1(event);
|
|
1107
|
-
gesture("drag", event, touches[i]);
|
|
1108
|
-
}
|
|
1109
|
-
}
|
|
1110
|
-
function touchended(event) {
|
|
1111
|
-
var touches = event.changedTouches;
|
|
1112
|
-
var n = touches.length;
|
|
1113
|
-
var i;
|
|
1114
|
-
var gesture;
|
|
1115
|
-
if (touchending) clearTimeout(touchending);
|
|
1116
|
-
touchending = setTimeout(function() {
|
|
1117
|
-
touchending = null;
|
|
1118
|
-
}, 500);
|
|
1119
|
-
for (i = 0; i < n; ++i) if (gesture = gestures[touches[i].identifier]) {
|
|
1120
|
-
nopropagation$1(event);
|
|
1121
|
-
gesture("end", event, touches[i]);
|
|
1122
|
-
}
|
|
1123
|
-
}
|
|
1124
|
-
function beforestart(that, container, event, d, identifier, touch) {
|
|
1125
|
-
var dispatch = listeners.copy();
|
|
1126
|
-
var p = pointer_default(touch || event, container);
|
|
1127
|
-
var dx;
|
|
1128
|
-
var dy;
|
|
1129
|
-
var s;
|
|
1130
|
-
if ((s = subject.call(that, new DragEvent("beforestart", {
|
|
1131
|
-
sourceEvent: event,
|
|
1132
|
-
target: drag,
|
|
1133
|
-
identifier,
|
|
1134
|
-
active,
|
|
1135
|
-
x: p[0],
|
|
1136
|
-
y: p[1],
|
|
1137
|
-
dx: 0,
|
|
1138
|
-
dy: 0,
|
|
1139
|
-
dispatch
|
|
1140
|
-
}), d)) == null) return;
|
|
1141
|
-
dx = s.x - p[0] || 0;
|
|
1142
|
-
dy = s.y - p[1] || 0;
|
|
1143
|
-
return function gesture(type, event, touch) {
|
|
1144
|
-
var p0 = p;
|
|
1145
|
-
var n;
|
|
1146
|
-
switch (type) {
|
|
1147
|
-
case "start":
|
|
1148
|
-
gestures[identifier] = gesture, n = active++;
|
|
1149
|
-
break;
|
|
1150
|
-
case "end": delete gestures[identifier], --active;
|
|
1151
|
-
case "drag": p = pointer_default(touch || event, container), n = active;
|
|
1152
|
-
}
|
|
1153
|
-
dispatch.call(type, that, new DragEvent(type, {
|
|
1154
|
-
sourceEvent: event,
|
|
1155
|
-
subject: s,
|
|
1156
|
-
target: drag,
|
|
1157
|
-
identifier,
|
|
1158
|
-
active: n,
|
|
1159
|
-
x: p[0] + dx,
|
|
1160
|
-
y: p[1] + dy,
|
|
1161
|
-
dx: p[0] - p0[0],
|
|
1162
|
-
dy: p[1] - p0[1],
|
|
1163
|
-
dispatch
|
|
1164
|
-
}), d);
|
|
1165
|
-
};
|
|
1166
|
-
}
|
|
1167
|
-
drag.filter = function(_) {
|
|
1168
|
-
return arguments.length ? (filter = typeof _ === "function" ? _ : constant_default$4(!!_), drag) : filter;
|
|
1169
|
-
};
|
|
1170
|
-
drag.container = function(_) {
|
|
1171
|
-
return arguments.length ? (container = typeof _ === "function" ? _ : constant_default$4(_), drag) : container;
|
|
1172
|
-
};
|
|
1173
|
-
drag.subject = function(_) {
|
|
1174
|
-
return arguments.length ? (subject = typeof _ === "function" ? _ : constant_default$4(_), drag) : subject;
|
|
1175
|
-
};
|
|
1176
|
-
drag.touchable = function(_) {
|
|
1177
|
-
return arguments.length ? (touchable = typeof _ === "function" ? _ : constant_default$4(!!_), drag) : touchable;
|
|
1178
|
-
};
|
|
1179
|
-
drag.on = function() {
|
|
1180
|
-
var value = listeners.on.apply(listeners, arguments);
|
|
1181
|
-
return value === listeners ? drag : value;
|
|
1182
|
-
};
|
|
1183
|
-
drag.clickDistance = function(_) {
|
|
1184
|
-
return arguments.length ? (clickDistance2 = (_ = +_) * _, drag) : Math.sqrt(clickDistance2);
|
|
1185
|
-
};
|
|
1186
|
-
return drag;
|
|
1187
|
-
}
|
|
1188
|
-
//#endregion
|
|
1189
|
-
//#region ../../node_modules/.pnpm/d3-color@3.1.0/node_modules/d3-color/src/define.js
|
|
1190
|
-
function define_default(constructor, factory, prototype) {
|
|
1191
|
-
constructor.prototype = factory.prototype = prototype;
|
|
1192
|
-
prototype.constructor = constructor;
|
|
1193
|
-
}
|
|
1194
|
-
__name(define_default, "default");
|
|
1195
|
-
function extend(parent, definition) {
|
|
1196
|
-
var prototype = Object.create(parent.prototype);
|
|
1197
|
-
for (var key in definition) prototype[key] = definition[key];
|
|
1198
|
-
return prototype;
|
|
1199
|
-
}
|
|
1200
|
-
//#endregion
|
|
1201
|
-
//#region ../../node_modules/.pnpm/d3-color@3.1.0/node_modules/d3-color/src/color.js
|
|
1202
|
-
function Color() {}
|
|
1203
|
-
var darker = .7;
|
|
1204
|
-
var brighter = 1 / darker;
|
|
1205
|
-
var reI = "\\s*([+-]?\\d+)\\s*";
|
|
1206
|
-
var reN = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*";
|
|
1207
|
-
var reP = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*";
|
|
1208
|
-
var reHex = /^#([0-9a-f]{3,8})$/;
|
|
1209
|
-
var reRgbInteger = new RegExp(`^rgb\\(${reI},${reI},${reI}\\)$`);
|
|
1210
|
-
var reRgbPercent = new RegExp(`^rgb\\(${reP},${reP},${reP}\\)$`);
|
|
1211
|
-
var reRgbaInteger = new RegExp(`^rgba\\(${reI},${reI},${reI},${reN}\\)$`);
|
|
1212
|
-
var reRgbaPercent = new RegExp(`^rgba\\(${reP},${reP},${reP},${reN}\\)$`);
|
|
1213
|
-
var reHslPercent = new RegExp(`^hsl\\(${reN},${reP},${reP}\\)$`);
|
|
1214
|
-
var reHslaPercent = new RegExp(`^hsla\\(${reN},${reP},${reP},${reN}\\)$`);
|
|
1215
|
-
var named = {
|
|
1216
|
-
aliceblue: 15792383,
|
|
1217
|
-
antiquewhite: 16444375,
|
|
1218
|
-
aqua: 65535,
|
|
1219
|
-
aquamarine: 8388564,
|
|
1220
|
-
azure: 15794175,
|
|
1221
|
-
beige: 16119260,
|
|
1222
|
-
bisque: 16770244,
|
|
1223
|
-
black: 0,
|
|
1224
|
-
blanchedalmond: 16772045,
|
|
1225
|
-
blue: 255,
|
|
1226
|
-
blueviolet: 9055202,
|
|
1227
|
-
brown: 10824234,
|
|
1228
|
-
burlywood: 14596231,
|
|
1229
|
-
cadetblue: 6266528,
|
|
1230
|
-
chartreuse: 8388352,
|
|
1231
|
-
chocolate: 13789470,
|
|
1232
|
-
coral: 16744272,
|
|
1233
|
-
cornflowerblue: 6591981,
|
|
1234
|
-
cornsilk: 16775388,
|
|
1235
|
-
crimson: 14423100,
|
|
1236
|
-
cyan: 65535,
|
|
1237
|
-
darkblue: 139,
|
|
1238
|
-
darkcyan: 35723,
|
|
1239
|
-
darkgoldenrod: 12092939,
|
|
1240
|
-
darkgray: 11119017,
|
|
1241
|
-
darkgreen: 25600,
|
|
1242
|
-
darkgrey: 11119017,
|
|
1243
|
-
darkkhaki: 12433259,
|
|
1244
|
-
darkmagenta: 9109643,
|
|
1245
|
-
darkolivegreen: 5597999,
|
|
1246
|
-
darkorange: 16747520,
|
|
1247
|
-
darkorchid: 10040012,
|
|
1248
|
-
darkred: 9109504,
|
|
1249
|
-
darksalmon: 15308410,
|
|
1250
|
-
darkseagreen: 9419919,
|
|
1251
|
-
darkslateblue: 4734347,
|
|
1252
|
-
darkslategray: 3100495,
|
|
1253
|
-
darkslategrey: 3100495,
|
|
1254
|
-
darkturquoise: 52945,
|
|
1255
|
-
darkviolet: 9699539,
|
|
1256
|
-
deeppink: 16716947,
|
|
1257
|
-
deepskyblue: 49151,
|
|
1258
|
-
dimgray: 6908265,
|
|
1259
|
-
dimgrey: 6908265,
|
|
1260
|
-
dodgerblue: 2003199,
|
|
1261
|
-
firebrick: 11674146,
|
|
1262
|
-
floralwhite: 16775920,
|
|
1263
|
-
forestgreen: 2263842,
|
|
1264
|
-
fuchsia: 16711935,
|
|
1265
|
-
gainsboro: 14474460,
|
|
1266
|
-
ghostwhite: 16316671,
|
|
1267
|
-
gold: 16766720,
|
|
1268
|
-
goldenrod: 14329120,
|
|
1269
|
-
gray: 8421504,
|
|
1270
|
-
green: 32768,
|
|
1271
|
-
greenyellow: 11403055,
|
|
1272
|
-
grey: 8421504,
|
|
1273
|
-
honeydew: 15794160,
|
|
1274
|
-
hotpink: 16738740,
|
|
1275
|
-
indianred: 13458524,
|
|
1276
|
-
indigo: 4915330,
|
|
1277
|
-
ivory: 16777200,
|
|
1278
|
-
khaki: 15787660,
|
|
1279
|
-
lavender: 15132410,
|
|
1280
|
-
lavenderblush: 16773365,
|
|
1281
|
-
lawngreen: 8190976,
|
|
1282
|
-
lemonchiffon: 16775885,
|
|
1283
|
-
lightblue: 11393254,
|
|
1284
|
-
lightcoral: 15761536,
|
|
1285
|
-
lightcyan: 14745599,
|
|
1286
|
-
lightgoldenrodyellow: 16448210,
|
|
1287
|
-
lightgray: 13882323,
|
|
1288
|
-
lightgreen: 9498256,
|
|
1289
|
-
lightgrey: 13882323,
|
|
1290
|
-
lightpink: 16758465,
|
|
1291
|
-
lightsalmon: 16752762,
|
|
1292
|
-
lightseagreen: 2142890,
|
|
1293
|
-
lightskyblue: 8900346,
|
|
1294
|
-
lightslategray: 7833753,
|
|
1295
|
-
lightslategrey: 7833753,
|
|
1296
|
-
lightsteelblue: 11584734,
|
|
1297
|
-
lightyellow: 16777184,
|
|
1298
|
-
lime: 65280,
|
|
1299
|
-
limegreen: 3329330,
|
|
1300
|
-
linen: 16445670,
|
|
1301
|
-
magenta: 16711935,
|
|
1302
|
-
maroon: 8388608,
|
|
1303
|
-
mediumaquamarine: 6737322,
|
|
1304
|
-
mediumblue: 205,
|
|
1305
|
-
mediumorchid: 12211667,
|
|
1306
|
-
mediumpurple: 9662683,
|
|
1307
|
-
mediumseagreen: 3978097,
|
|
1308
|
-
mediumslateblue: 8087790,
|
|
1309
|
-
mediumspringgreen: 64154,
|
|
1310
|
-
mediumturquoise: 4772300,
|
|
1311
|
-
mediumvioletred: 13047173,
|
|
1312
|
-
midnightblue: 1644912,
|
|
1313
|
-
mintcream: 16121850,
|
|
1314
|
-
mistyrose: 16770273,
|
|
1315
|
-
moccasin: 16770229,
|
|
1316
|
-
navajowhite: 16768685,
|
|
1317
|
-
navy: 128,
|
|
1318
|
-
oldlace: 16643558,
|
|
1319
|
-
olive: 8421376,
|
|
1320
|
-
olivedrab: 7048739,
|
|
1321
|
-
orange: 16753920,
|
|
1322
|
-
orangered: 16729344,
|
|
1323
|
-
orchid: 14315734,
|
|
1324
|
-
palegoldenrod: 15657130,
|
|
1325
|
-
palegreen: 10025880,
|
|
1326
|
-
paleturquoise: 11529966,
|
|
1327
|
-
palevioletred: 14381203,
|
|
1328
|
-
papayawhip: 16773077,
|
|
1329
|
-
peachpuff: 16767673,
|
|
1330
|
-
peru: 13468991,
|
|
1331
|
-
pink: 16761035,
|
|
1332
|
-
plum: 14524637,
|
|
1333
|
-
powderblue: 11591910,
|
|
1334
|
-
purple: 8388736,
|
|
1335
|
-
rebeccapurple: 6697881,
|
|
1336
|
-
red: 16711680,
|
|
1337
|
-
rosybrown: 12357519,
|
|
1338
|
-
royalblue: 4286945,
|
|
1339
|
-
saddlebrown: 9127187,
|
|
1340
|
-
salmon: 16416882,
|
|
1341
|
-
sandybrown: 16032864,
|
|
1342
|
-
seagreen: 3050327,
|
|
1343
|
-
seashell: 16774638,
|
|
1344
|
-
sienna: 10506797,
|
|
1345
|
-
silver: 12632256,
|
|
1346
|
-
skyblue: 8900331,
|
|
1347
|
-
slateblue: 6970061,
|
|
1348
|
-
slategray: 7372944,
|
|
1349
|
-
slategrey: 7372944,
|
|
1350
|
-
snow: 16775930,
|
|
1351
|
-
springgreen: 65407,
|
|
1352
|
-
steelblue: 4620980,
|
|
1353
|
-
tan: 13808780,
|
|
1354
|
-
teal: 32896,
|
|
1355
|
-
thistle: 14204888,
|
|
1356
|
-
tomato: 16737095,
|
|
1357
|
-
turquoise: 4251856,
|
|
1358
|
-
violet: 15631086,
|
|
1359
|
-
wheat: 16113331,
|
|
1360
|
-
white: 16777215,
|
|
1361
|
-
whitesmoke: 16119285,
|
|
1362
|
-
yellow: 16776960,
|
|
1363
|
-
yellowgreen: 10145074
|
|
1364
|
-
};
|
|
1365
|
-
define_default(Color, color, {
|
|
1366
|
-
copy(channels) {
|
|
1367
|
-
return Object.assign(new this.constructor(), this, channels);
|
|
1368
|
-
},
|
|
1369
|
-
displayable() {
|
|
1370
|
-
return this.rgb().displayable();
|
|
1371
|
-
},
|
|
1372
|
-
hex: color_formatHex,
|
|
1373
|
-
formatHex: color_formatHex,
|
|
1374
|
-
formatHex8: color_formatHex8,
|
|
1375
|
-
formatHsl: color_formatHsl,
|
|
1376
|
-
formatRgb: color_formatRgb,
|
|
1377
|
-
toString: color_formatRgb
|
|
1378
|
-
});
|
|
1379
|
-
function color_formatHex() {
|
|
1380
|
-
return this.rgb().formatHex();
|
|
1381
|
-
}
|
|
1382
|
-
function color_formatHex8() {
|
|
1383
|
-
return this.rgb().formatHex8();
|
|
1384
|
-
}
|
|
1385
|
-
function color_formatHsl() {
|
|
1386
|
-
return hslConvert(this).formatHsl();
|
|
1387
|
-
}
|
|
1388
|
-
function color_formatRgb() {
|
|
1389
|
-
return this.rgb().formatRgb();
|
|
1390
|
-
}
|
|
1391
|
-
function color(format) {
|
|
1392
|
-
var m;
|
|
1393
|
-
var l;
|
|
1394
|
-
format = (format + "").trim().toLowerCase();
|
|
1395
|
-
return (m = reHex.exec(format)) ? (l = m[1].length, m = parseInt(m[1], 16), l === 6 ? rgbn(m) : l === 3 ? new Rgb(m >> 8 & 15 | m >> 4 & 240, m >> 4 & 15 | m & 240, (m & 15) << 4 | m & 15, 1) : l === 8 ? rgba(m >> 24 & 255, m >> 16 & 255, m >> 8 & 255, (m & 255) / 255) : l === 4 ? rgba(m >> 12 & 15 | m >> 8 & 240, m >> 8 & 15 | m >> 4 & 240, m >> 4 & 15 | m & 240, ((m & 15) << 4 | m & 15) / 255) : null) : (m = reRgbInteger.exec(format)) ? new Rgb(m[1], m[2], m[3], 1) : (m = reRgbPercent.exec(format)) ? new Rgb(m[1] * 255 / 100, m[2] * 255 / 100, m[3] * 255 / 100, 1) : (m = reRgbaInteger.exec(format)) ? rgba(m[1], m[2], m[3], m[4]) : (m = reRgbaPercent.exec(format)) ? rgba(m[1] * 255 / 100, m[2] * 255 / 100, m[3] * 255 / 100, m[4]) : (m = reHslPercent.exec(format)) ? hsla(m[1], m[2] / 100, m[3] / 100, 1) : (m = reHslaPercent.exec(format)) ? hsla(m[1], m[2] / 100, m[3] / 100, m[4]) : named.hasOwnProperty(format) ? rgbn(named[format]) : format === "transparent" ? new Rgb(NaN, NaN, NaN, 0) : null;
|
|
1396
|
-
}
|
|
1397
|
-
function rgbn(n) {
|
|
1398
|
-
return new Rgb(n >> 16 & 255, n >> 8 & 255, n & 255, 1);
|
|
1399
|
-
}
|
|
1400
|
-
function rgba(r, g, b, a) {
|
|
1401
|
-
if (a <= 0) r = g = b = NaN;
|
|
1402
|
-
return new Rgb(r, g, b, a);
|
|
1403
|
-
}
|
|
1404
|
-
function rgbConvert(o) {
|
|
1405
|
-
if (!(o instanceof Color)) o = color(o);
|
|
1406
|
-
if (!o) return new Rgb();
|
|
1407
|
-
o = o.rgb();
|
|
1408
|
-
return new Rgb(o.r, o.g, o.b, o.opacity);
|
|
1409
|
-
}
|
|
1410
|
-
function rgb(r, g, b, opacity) {
|
|
1411
|
-
return arguments.length === 1 ? rgbConvert(r) : new Rgb(r, g, b, opacity == null ? 1 : opacity);
|
|
1412
|
-
}
|
|
1413
|
-
function Rgb(r, g, b, opacity) {
|
|
1414
|
-
this.r = +r;
|
|
1415
|
-
this.g = +g;
|
|
1416
|
-
this.b = +b;
|
|
1417
|
-
this.opacity = +opacity;
|
|
1418
|
-
}
|
|
1419
|
-
define_default(Rgb, rgb, extend(Color, {
|
|
1420
|
-
brighter(k) {
|
|
1421
|
-
k = k == null ? brighter : Math.pow(brighter, k);
|
|
1422
|
-
return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity);
|
|
1423
|
-
},
|
|
1424
|
-
darker(k) {
|
|
1425
|
-
k = k == null ? darker : Math.pow(darker, k);
|
|
1426
|
-
return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity);
|
|
1427
|
-
},
|
|
1428
|
-
rgb() {
|
|
1429
|
-
return this;
|
|
1430
|
-
},
|
|
1431
|
-
clamp() {
|
|
1432
|
-
return new Rgb(clampi(this.r), clampi(this.g), clampi(this.b), clampa(this.opacity));
|
|
1433
|
-
},
|
|
1434
|
-
displayable() {
|
|
1435
|
-
return -.5 <= this.r && this.r < 255.5 && -.5 <= this.g && this.g < 255.5 && -.5 <= this.b && this.b < 255.5 && 0 <= this.opacity && this.opacity <= 1;
|
|
1436
|
-
},
|
|
1437
|
-
hex: rgb_formatHex,
|
|
1438
|
-
formatHex: rgb_formatHex,
|
|
1439
|
-
formatHex8: rgb_formatHex8,
|
|
1440
|
-
formatRgb: rgb_formatRgb,
|
|
1441
|
-
toString: rgb_formatRgb
|
|
1442
|
-
}));
|
|
1443
|
-
function rgb_formatHex() {
|
|
1444
|
-
return `#${hex(this.r)}${hex(this.g)}${hex(this.b)}`;
|
|
1445
|
-
}
|
|
1446
|
-
function rgb_formatHex8() {
|
|
1447
|
-
return `#${hex(this.r)}${hex(this.g)}${hex(this.b)}${hex((isNaN(this.opacity) ? 1 : this.opacity) * 255)}`;
|
|
1448
|
-
}
|
|
1449
|
-
function rgb_formatRgb() {
|
|
1450
|
-
const a = clampa(this.opacity);
|
|
1451
|
-
return `${a === 1 ? "rgb(" : "rgba("}${clampi(this.r)}, ${clampi(this.g)}, ${clampi(this.b)}${a === 1 ? ")" : `, ${a})`}`;
|
|
1452
|
-
}
|
|
1453
|
-
function clampa(opacity) {
|
|
1454
|
-
return isNaN(opacity) ? 1 : Math.max(0, Math.min(1, opacity));
|
|
1455
|
-
}
|
|
1456
|
-
function clampi(value) {
|
|
1457
|
-
return Math.max(0, Math.min(255, Math.round(value) || 0));
|
|
1458
|
-
}
|
|
1459
|
-
function hex(value) {
|
|
1460
|
-
value = clampi(value);
|
|
1461
|
-
return (value < 16 ? "0" : "") + value.toString(16);
|
|
1462
|
-
}
|
|
1463
|
-
function hsla(h, s, l, a) {
|
|
1464
|
-
if (a <= 0) h = s = l = NaN;
|
|
1465
|
-
else if (l <= 0 || l >= 1) h = s = NaN;
|
|
1466
|
-
else if (s <= 0) h = NaN;
|
|
1467
|
-
return new Hsl(h, s, l, a);
|
|
1468
|
-
}
|
|
1469
|
-
function hslConvert(o) {
|
|
1470
|
-
if (o instanceof Hsl) return new Hsl(o.h, o.s, o.l, o.opacity);
|
|
1471
|
-
if (!(o instanceof Color)) o = color(o);
|
|
1472
|
-
if (!o) return new Hsl();
|
|
1473
|
-
if (o instanceof Hsl) return o;
|
|
1474
|
-
o = o.rgb();
|
|
1475
|
-
var r = o.r / 255;
|
|
1476
|
-
var g = o.g / 255;
|
|
1477
|
-
var b = o.b / 255;
|
|
1478
|
-
var min = Math.min(r, g, b);
|
|
1479
|
-
var max = Math.max(r, g, b);
|
|
1480
|
-
var h = NaN;
|
|
1481
|
-
var s = max - min;
|
|
1482
|
-
var l = (max + min) / 2;
|
|
1483
|
-
if (s) {
|
|
1484
|
-
if (r === max) h = (g - b) / s + (g < b) * 6;
|
|
1485
|
-
else if (g === max) h = (b - r) / s + 2;
|
|
1486
|
-
else h = (r - g) / s + 4;
|
|
1487
|
-
s /= l < .5 ? max + min : 2 - max - min;
|
|
1488
|
-
h *= 60;
|
|
1489
|
-
} else s = l > 0 && l < 1 ? 0 : h;
|
|
1490
|
-
return new Hsl(h, s, l, o.opacity);
|
|
1491
|
-
}
|
|
1492
|
-
function hsl(h, s, l, opacity) {
|
|
1493
|
-
return arguments.length === 1 ? hslConvert(h) : new Hsl(h, s, l, opacity == null ? 1 : opacity);
|
|
1494
|
-
}
|
|
1495
|
-
function Hsl(h, s, l, opacity) {
|
|
1496
|
-
this.h = +h;
|
|
1497
|
-
this.s = +s;
|
|
1498
|
-
this.l = +l;
|
|
1499
|
-
this.opacity = +opacity;
|
|
1500
|
-
}
|
|
1501
|
-
define_default(Hsl, hsl, extend(Color, {
|
|
1502
|
-
brighter(k) {
|
|
1503
|
-
k = k == null ? brighter : Math.pow(brighter, k);
|
|
1504
|
-
return new Hsl(this.h, this.s, this.l * k, this.opacity);
|
|
1505
|
-
},
|
|
1506
|
-
darker(k) {
|
|
1507
|
-
k = k == null ? darker : Math.pow(darker, k);
|
|
1508
|
-
return new Hsl(this.h, this.s, this.l * k, this.opacity);
|
|
1509
|
-
},
|
|
1510
|
-
rgb() {
|
|
1511
|
-
var h = this.h % 360 + (this.h < 0) * 360;
|
|
1512
|
-
var s = isNaN(h) || isNaN(this.s) ? 0 : this.s;
|
|
1513
|
-
var l = this.l;
|
|
1514
|
-
var m2 = l + (l < .5 ? l : 1 - l) * s;
|
|
1515
|
-
var m1 = 2 * l - m2;
|
|
1516
|
-
return new Rgb(hsl2rgb(h >= 240 ? h - 240 : h + 120, m1, m2), hsl2rgb(h, m1, m2), hsl2rgb(h < 120 ? h + 240 : h - 120, m1, m2), this.opacity);
|
|
1517
|
-
},
|
|
1518
|
-
clamp() {
|
|
1519
|
-
return new Hsl(clamph(this.h), clampt(this.s), clampt(this.l), clampa(this.opacity));
|
|
1520
|
-
},
|
|
1521
|
-
displayable() {
|
|
1522
|
-
return (0 <= this.s && this.s <= 1 || isNaN(this.s)) && 0 <= this.l && this.l <= 1 && 0 <= this.opacity && this.opacity <= 1;
|
|
1523
|
-
},
|
|
1524
|
-
formatHsl() {
|
|
1525
|
-
const a = clampa(this.opacity);
|
|
1526
|
-
return `${a === 1 ? "hsl(" : "hsla("}${clamph(this.h)}, ${clampt(this.s) * 100}%, ${clampt(this.l) * 100}%${a === 1 ? ")" : `, ${a})`}`;
|
|
1527
|
-
}
|
|
1528
|
-
}));
|
|
1529
|
-
function clamph(value) {
|
|
1530
|
-
value = (value || 0) % 360;
|
|
1531
|
-
return value < 0 ? value + 360 : value;
|
|
1532
|
-
}
|
|
1533
|
-
function clampt(value) {
|
|
1534
|
-
return Math.max(0, Math.min(1, value || 0));
|
|
1535
|
-
}
|
|
1536
|
-
function hsl2rgb(h, m1, m2) {
|
|
1537
|
-
return (h < 60 ? m1 + (m2 - m1) * h / 60 : h < 180 ? m2 : h < 240 ? m1 + (m2 - m1) * (240 - h) / 60 : m1) * 255;
|
|
1538
|
-
}
|
|
1539
|
-
//#endregion
|
|
1540
|
-
//#region ../../node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/basis.js
|
|
1541
|
-
function basis(t1, v0, v1, v2, v3) {
|
|
1542
|
-
var t2 = t1 * t1;
|
|
1543
|
-
var t3 = t2 * t1;
|
|
1544
|
-
return ((1 - 3 * t1 + 3 * t2 - t3) * v0 + (4 - 6 * t2 + 3 * t3) * v1 + (1 + 3 * t1 + 3 * t2 - 3 * t3) * v2 + t3 * v3) / 6;
|
|
1545
|
-
}
|
|
1546
|
-
function basis_default(values) {
|
|
1547
|
-
var n = values.length - 1;
|
|
1548
|
-
return function(t) {
|
|
1549
|
-
var i = t <= 0 ? t = 0 : t >= 1 ? (t = 1, n - 1) : Math.floor(t * n);
|
|
1550
|
-
var v1 = values[i];
|
|
1551
|
-
var v2 = values[i + 1];
|
|
1552
|
-
var v0 = i > 0 ? values[i - 1] : 2 * v1 - v2;
|
|
1553
|
-
var v3 = i < n - 1 ? values[i + 2] : 2 * v2 - v1;
|
|
1554
|
-
return basis((t - i / n) * n, v0, v1, v2, v3);
|
|
1555
|
-
};
|
|
1556
|
-
}
|
|
1557
|
-
__name(basis_default, "default");
|
|
1558
|
-
//#endregion
|
|
1559
|
-
//#region ../../node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/basisClosed.js
|
|
1560
|
-
function basisClosed_default(values) {
|
|
1561
|
-
var n = values.length;
|
|
1562
|
-
return function(t) {
|
|
1563
|
-
var i = Math.floor(((t %= 1) < 0 ? ++t : t) * n);
|
|
1564
|
-
var v0 = values[(i + n - 1) % n];
|
|
1565
|
-
var v1 = values[i % n];
|
|
1566
|
-
var v2 = values[(i + 1) % n];
|
|
1567
|
-
var v3 = values[(i + 2) % n];
|
|
1568
|
-
return basis((t - i / n) * n, v0, v1, v2, v3);
|
|
1569
|
-
};
|
|
1570
|
-
}
|
|
1571
|
-
__name(basisClosed_default, "default");
|
|
1572
|
-
//#endregion
|
|
1573
|
-
//#region ../../node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/constant.js
|
|
1574
|
-
var constant_default$3 = /* @__PURE__ */ __name((x) => () => x, "default");
|
|
1575
|
-
//#endregion
|
|
1576
|
-
//#region ../../node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/color.js
|
|
1577
|
-
function linear(a, d) {
|
|
1578
|
-
return function(t) {
|
|
1579
|
-
return a + t * d;
|
|
1580
|
-
};
|
|
1581
|
-
}
|
|
1582
|
-
function exponential(a, b, y) {
|
|
1583
|
-
return a = Math.pow(a, y), b = Math.pow(b, y) - a, y = 1 / y, function(t) {
|
|
1584
|
-
return Math.pow(a + t * b, y);
|
|
1585
|
-
};
|
|
1586
|
-
}
|
|
1587
|
-
function gamma(y) {
|
|
1588
|
-
return (y = +y) === 1 ? nogamma : function(a, b) {
|
|
1589
|
-
return b - a ? exponential(a, b, y) : constant_default$3(isNaN(a) ? b : a);
|
|
1590
|
-
};
|
|
1591
|
-
}
|
|
1592
|
-
function nogamma(a, b) {
|
|
1593
|
-
var d = b - a;
|
|
1594
|
-
return d ? linear(a, d) : constant_default$3(isNaN(a) ? b : a);
|
|
1595
|
-
}
|
|
1596
|
-
//#endregion
|
|
1597
|
-
//#region ../../node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/rgb.js
|
|
1598
|
-
var rgb_default = (function rgbGamma(y) {
|
|
1599
|
-
var color = gamma(y);
|
|
1600
|
-
function rgb$1(start, end) {
|
|
1601
|
-
var r = color((start = rgb(start)).r, (end = rgb(end)).r);
|
|
1602
|
-
var g = color(start.g, end.g);
|
|
1603
|
-
var b = color(start.b, end.b);
|
|
1604
|
-
var opacity = nogamma(start.opacity, end.opacity);
|
|
1605
|
-
return function(t) {
|
|
1606
|
-
start.r = r(t);
|
|
1607
|
-
start.g = g(t);
|
|
1608
|
-
start.b = b(t);
|
|
1609
|
-
start.opacity = opacity(t);
|
|
1610
|
-
return start + "";
|
|
1611
|
-
};
|
|
1612
|
-
}
|
|
1613
|
-
__name(rgb$1, "rgb");
|
|
1614
|
-
rgb$1.gamma = rgbGamma;
|
|
1615
|
-
return rgb$1;
|
|
1616
|
-
})(1);
|
|
1617
|
-
//#endregion
|
|
1618
|
-
//#region ../../node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/numberArray.js
|
|
1619
|
-
function numberArray_default(a, b) {
|
|
1620
|
-
if (!b) b = [];
|
|
1621
|
-
var n = a ? Math.min(b.length, a.length) : 0;
|
|
1622
|
-
var c = b.slice();
|
|
1623
|
-
var i;
|
|
1624
|
-
return function(t) {
|
|
1625
|
-
for (i = 0; i < n; ++i) c[i] = a[i] * (1 - t) + b[i] * t;
|
|
1626
|
-
return c;
|
|
1627
|
-
};
|
|
1628
|
-
}
|
|
1629
|
-
__name(numberArray_default, "default");
|
|
1630
|
-
function isNumberArray(x) {
|
|
1631
|
-
return ArrayBuffer.isView(x) && !(x instanceof DataView);
|
|
1632
|
-
}
|
|
1633
|
-
//#endregion
|
|
1634
|
-
//#region ../../node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/array.js
|
|
1635
|
-
function genericArray(a, b) {
|
|
1636
|
-
var nb = b ? b.length : 0;
|
|
1637
|
-
var na = a ? Math.min(nb, a.length) : 0;
|
|
1638
|
-
var x = new Array(na);
|
|
1639
|
-
var c = new Array(nb);
|
|
1640
|
-
var i = 0;
|
|
1641
|
-
for (; i < na; ++i) x[i] = value_default(a[i], b[i]);
|
|
1642
|
-
for (; i < nb; ++i) c[i] = b[i];
|
|
1643
|
-
return function(t) {
|
|
1644
|
-
for (i = 0; i < na; ++i) c[i] = x[i](t);
|
|
1645
|
-
return c;
|
|
1646
|
-
};
|
|
1647
|
-
}
|
|
1648
|
-
//#endregion
|
|
1649
|
-
//#region ../../node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/date.js
|
|
1650
|
-
function date_default(a, b) {
|
|
1651
|
-
var d = /* @__PURE__ */ new Date();
|
|
1652
|
-
return a = +a, b = +b, function(t) {
|
|
1653
|
-
return d.setTime(a * (1 - t) + b * t), d;
|
|
1654
|
-
};
|
|
1655
|
-
}
|
|
1656
|
-
__name(date_default, "default");
|
|
1657
|
-
//#endregion
|
|
1658
|
-
//#region ../../node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/number.js
|
|
1659
|
-
function number_default(a, b) {
|
|
1660
|
-
return a = +a, b = +b, function(t) {
|
|
1661
|
-
return a * (1 - t) + b * t;
|
|
1662
|
-
};
|
|
1663
|
-
}
|
|
1664
|
-
__name(number_default, "default");
|
|
1665
|
-
//#endregion
|
|
1666
|
-
//#region ../../node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/object.js
|
|
1667
|
-
function object_default(a, b) {
|
|
1668
|
-
var i = {};
|
|
1669
|
-
var c = {};
|
|
1670
|
-
var k;
|
|
1671
|
-
if (a === null || typeof a !== "object") a = {};
|
|
1672
|
-
if (b === null || typeof b !== "object") b = {};
|
|
1673
|
-
for (k in b) if (k in a) i[k] = value_default(a[k], b[k]);
|
|
1674
|
-
else c[k] = b[k];
|
|
1675
|
-
return function(t) {
|
|
1676
|
-
for (k in i) c[k] = i[k](t);
|
|
1677
|
-
return c;
|
|
1678
|
-
};
|
|
1679
|
-
}
|
|
1680
|
-
__name(object_default, "default");
|
|
1681
|
-
//#endregion
|
|
1682
|
-
//#region ../../node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/string.js
|
|
1683
|
-
var reA = /[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g;
|
|
1684
|
-
var reB = new RegExp(reA.source, "g");
|
|
1685
|
-
function zero(b) {
|
|
1686
|
-
return function() {
|
|
1687
|
-
return b;
|
|
1688
|
-
};
|
|
1689
|
-
}
|
|
1690
|
-
function one(b) {
|
|
1691
|
-
return function(t) {
|
|
1692
|
-
return b(t) + "";
|
|
1693
|
-
};
|
|
1694
|
-
}
|
|
1695
|
-
function string_default(a, b) {
|
|
1696
|
-
var bi = reA.lastIndex = reB.lastIndex = 0;
|
|
1697
|
-
var am;
|
|
1698
|
-
var bm;
|
|
1699
|
-
var bs;
|
|
1700
|
-
var i = -1;
|
|
1701
|
-
var s = [];
|
|
1702
|
-
var q = [];
|
|
1703
|
-
a = a + "", b = b + "";
|
|
1704
|
-
while ((am = reA.exec(a)) && (bm = reB.exec(b))) {
|
|
1705
|
-
if ((bs = bm.index) > bi) {
|
|
1706
|
-
bs = b.slice(bi, bs);
|
|
1707
|
-
if (s[i]) s[i] += bs;
|
|
1708
|
-
else s[++i] = bs;
|
|
1709
|
-
}
|
|
1710
|
-
if ((am = am[0]) === (bm = bm[0])) {
|
|
1711
|
-
if (s[i]) s[i] += bm;
|
|
1712
|
-
else s[++i] = bm;
|
|
1713
|
-
} else {
|
|
1714
|
-
s[++i] = null;
|
|
1715
|
-
q.push({
|
|
1716
|
-
i,
|
|
1717
|
-
x: number_default(am, bm)
|
|
1718
|
-
});
|
|
1719
|
-
}
|
|
1720
|
-
bi = reB.lastIndex;
|
|
1721
|
-
}
|
|
1722
|
-
if (bi < b.length) {
|
|
1723
|
-
bs = b.slice(bi);
|
|
1724
|
-
if (s[i]) s[i] += bs;
|
|
1725
|
-
else s[++i] = bs;
|
|
1726
|
-
}
|
|
1727
|
-
return s.length < 2 ? q[0] ? one(q[0].x) : zero(b) : (b = q.length, function(t) {
|
|
1728
|
-
for (var i = 0, o; i < b; ++i) s[(o = q[i]).i] = o.x(t);
|
|
1729
|
-
return s.join("");
|
|
1730
|
-
});
|
|
1731
|
-
}
|
|
1732
|
-
__name(string_default, "default");
|
|
1733
|
-
//#endregion
|
|
1734
|
-
//#region ../../node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/value.js
|
|
1735
|
-
function value_default(a, b) {
|
|
1736
|
-
var t = typeof b;
|
|
1737
|
-
var c;
|
|
1738
|
-
return b == null || t === "boolean" ? constant_default$3(b) : (t === "number" ? number_default : t === "string" ? (c = color(b)) ? (b = c, rgb_default) : string_default : b instanceof color ? rgb_default : b instanceof Date ? date_default : isNumberArray(b) ? numberArray_default : Array.isArray(b) ? genericArray : typeof b.valueOf !== "function" && typeof b.toString !== "function" || isNaN(b) ? object_default : number_default)(a, b);
|
|
1739
|
-
}
|
|
1740
|
-
__name(value_default, "default");
|
|
1741
|
-
//#endregion
|
|
1742
|
-
//#region ../../node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/transform/decompose.js
|
|
1743
|
-
var degrees = 180 / Math.PI;
|
|
1744
|
-
var identity$1 = {
|
|
1745
|
-
translateX: 0,
|
|
1746
|
-
translateY: 0,
|
|
1747
|
-
rotate: 0,
|
|
1748
|
-
skewX: 0,
|
|
1749
|
-
scaleX: 1,
|
|
1750
|
-
scaleY: 1
|
|
1751
|
-
};
|
|
1752
|
-
function decompose_default(a, b, c, d, e, f) {
|
|
1753
|
-
var scaleX;
|
|
1754
|
-
var scaleY;
|
|
1755
|
-
var skewX;
|
|
1756
|
-
if (scaleX = Math.sqrt(a * a + b * b)) a /= scaleX, b /= scaleX;
|
|
1757
|
-
if (skewX = a * c + b * d) c -= a * skewX, d -= b * skewX;
|
|
1758
|
-
if (scaleY = Math.sqrt(c * c + d * d)) c /= scaleY, d /= scaleY, skewX /= scaleY;
|
|
1759
|
-
if (a * d < b * c) a = -a, b = -b, skewX = -skewX, scaleX = -scaleX;
|
|
1760
|
-
return {
|
|
1761
|
-
translateX: e,
|
|
1762
|
-
translateY: f,
|
|
1763
|
-
rotate: Math.atan2(b, a) * degrees,
|
|
1764
|
-
skewX: Math.atan(skewX) * degrees,
|
|
1765
|
-
scaleX,
|
|
1766
|
-
scaleY
|
|
1767
|
-
};
|
|
1768
|
-
}
|
|
1769
|
-
__name(decompose_default, "default");
|
|
1770
|
-
//#endregion
|
|
1771
|
-
//#region ../../node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/transform/parse.js
|
|
1772
|
-
var svgNode;
|
|
1773
|
-
function parseCss(value) {
|
|
1774
|
-
const m = new (typeof DOMMatrix === "function" ? DOMMatrix : WebKitCSSMatrix)(value + "");
|
|
1775
|
-
return m.isIdentity ? identity$1 : decompose_default(m.a, m.b, m.c, m.d, m.e, m.f);
|
|
1776
|
-
}
|
|
1777
|
-
function parseSvg(value) {
|
|
1778
|
-
if (value == null) return identity$1;
|
|
1779
|
-
if (!svgNode) svgNode = document.createElementNS("http://www.w3.org/2000/svg", "g");
|
|
1780
|
-
svgNode.setAttribute("transform", value);
|
|
1781
|
-
if (!(value = svgNode.transform.baseVal.consolidate())) return identity$1;
|
|
1782
|
-
value = value.matrix;
|
|
1783
|
-
return decompose_default(value.a, value.b, value.c, value.d, value.e, value.f);
|
|
1784
|
-
}
|
|
1785
|
-
//#endregion
|
|
1786
|
-
//#region ../../node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/transform/index.js
|
|
1787
|
-
function interpolateTransform(parse, pxComma, pxParen, degParen) {
|
|
1788
|
-
function pop(s) {
|
|
1789
|
-
return s.length ? s.pop() + " " : "";
|
|
1790
|
-
}
|
|
1791
|
-
function translate(xa, ya, xb, yb, s, q) {
|
|
1792
|
-
if (xa !== xb || ya !== yb) {
|
|
1793
|
-
var i = s.push("translate(", null, pxComma, null, pxParen);
|
|
1794
|
-
q.push({
|
|
1795
|
-
i: i - 4,
|
|
1796
|
-
x: number_default(xa, xb)
|
|
1797
|
-
}, {
|
|
1798
|
-
i: i - 2,
|
|
1799
|
-
x: number_default(ya, yb)
|
|
1800
|
-
});
|
|
1801
|
-
} else if (xb || yb) s.push("translate(" + xb + pxComma + yb + pxParen);
|
|
1802
|
-
}
|
|
1803
|
-
function rotate(a, b, s, q) {
|
|
1804
|
-
if (a !== b) {
|
|
1805
|
-
if (a - b > 180) b += 360;
|
|
1806
|
-
else if (b - a > 180) a += 360;
|
|
1807
|
-
q.push({
|
|
1808
|
-
i: s.push(pop(s) + "rotate(", null, degParen) - 2,
|
|
1809
|
-
x: number_default(a, b)
|
|
1810
|
-
});
|
|
1811
|
-
} else if (b) s.push(pop(s) + "rotate(" + b + degParen);
|
|
1812
|
-
}
|
|
1813
|
-
function skewX(a, b, s, q) {
|
|
1814
|
-
if (a !== b) q.push({
|
|
1815
|
-
i: s.push(pop(s) + "skewX(", null, degParen) - 2,
|
|
1816
|
-
x: number_default(a, b)
|
|
1817
|
-
});
|
|
1818
|
-
else if (b) s.push(pop(s) + "skewX(" + b + degParen);
|
|
1819
|
-
}
|
|
1820
|
-
function scale(xa, ya, xb, yb, s, q) {
|
|
1821
|
-
if (xa !== xb || ya !== yb) {
|
|
1822
|
-
var i = s.push(pop(s) + "scale(", null, ",", null, ")");
|
|
1823
|
-
q.push({
|
|
1824
|
-
i: i - 4,
|
|
1825
|
-
x: number_default(xa, xb)
|
|
1826
|
-
}, {
|
|
1827
|
-
i: i - 2,
|
|
1828
|
-
x: number_default(ya, yb)
|
|
1829
|
-
});
|
|
1830
|
-
} else if (xb !== 1 || yb !== 1) s.push(pop(s) + "scale(" + xb + "," + yb + ")");
|
|
1831
|
-
}
|
|
1832
|
-
return function(a, b) {
|
|
1833
|
-
var s = [];
|
|
1834
|
-
var q = [];
|
|
1835
|
-
a = parse(a), b = parse(b);
|
|
1836
|
-
translate(a.translateX, a.translateY, b.translateX, b.translateY, s, q);
|
|
1837
|
-
rotate(a.rotate, b.rotate, s, q);
|
|
1838
|
-
skewX(a.skewX, b.skewX, s, q);
|
|
1839
|
-
scale(a.scaleX, a.scaleY, b.scaleX, b.scaleY, s, q);
|
|
1840
|
-
a = b = null;
|
|
1841
|
-
return function(t) {
|
|
1842
|
-
var i = -1;
|
|
1843
|
-
var n = q.length;
|
|
1844
|
-
var o;
|
|
1845
|
-
while (++i < n) s[(o = q[i]).i] = o.x(t);
|
|
1846
|
-
return s.join("");
|
|
1847
|
-
};
|
|
1848
|
-
};
|
|
1849
|
-
}
|
|
1850
|
-
var interpolateTransformCss = interpolateTransform(parseCss, "px, ", "px)", "deg)");
|
|
1851
|
-
var interpolateTransformSvg = interpolateTransform(parseSvg, ", ", ")", ")");
|
|
1852
|
-
//#endregion
|
|
1853
|
-
//#region ../../node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/zoom.js
|
|
1854
|
-
var epsilon2 = 1e-12;
|
|
1855
|
-
function cosh(x) {
|
|
1856
|
-
return ((x = Math.exp(x)) + 1 / x) / 2;
|
|
1857
|
-
}
|
|
1858
|
-
function sinh(x) {
|
|
1859
|
-
return ((x = Math.exp(x)) - 1 / x) / 2;
|
|
1860
|
-
}
|
|
1861
|
-
function tanh(x) {
|
|
1862
|
-
return ((x = Math.exp(2 * x)) - 1) / (x + 1);
|
|
1863
|
-
}
|
|
1864
|
-
var zoom_default$1 = (function zoomRho(rho, rho2, rho4) {
|
|
1865
|
-
function zoom(p0, p1) {
|
|
1866
|
-
var ux0 = p0[0];
|
|
1867
|
-
var uy0 = p0[1];
|
|
1868
|
-
var w0 = p0[2];
|
|
1869
|
-
var ux1 = p1[0];
|
|
1870
|
-
var uy1 = p1[1];
|
|
1871
|
-
var w1 = p1[2];
|
|
1872
|
-
var dx = ux1 - ux0;
|
|
1873
|
-
var dy = uy1 - uy0;
|
|
1874
|
-
var d2 = dx * dx + dy * dy;
|
|
1875
|
-
var i;
|
|
1876
|
-
var S;
|
|
1877
|
-
if (d2 < epsilon2) {
|
|
1878
|
-
S = Math.log(w1 / w0) / rho;
|
|
1879
|
-
i = function(t) {
|
|
1880
|
-
return [
|
|
1881
|
-
ux0 + t * dx,
|
|
1882
|
-
uy0 + t * dy,
|
|
1883
|
-
w0 * Math.exp(rho * t * S)
|
|
1884
|
-
];
|
|
1885
|
-
};
|
|
1886
|
-
} else {
|
|
1887
|
-
var d1 = Math.sqrt(d2);
|
|
1888
|
-
var b0 = (w1 * w1 - w0 * w0 + rho4 * d2) / (2 * w0 * rho2 * d1);
|
|
1889
|
-
var b1 = (w1 * w1 - w0 * w0 - rho4 * d2) / (2 * w1 * rho2 * d1);
|
|
1890
|
-
var r0 = Math.log(Math.sqrt(b0 * b0 + 1) - b0);
|
|
1891
|
-
S = (Math.log(Math.sqrt(b1 * b1 + 1) - b1) - r0) / rho;
|
|
1892
|
-
i = function(t) {
|
|
1893
|
-
var s = t * S;
|
|
1894
|
-
var coshr0 = cosh(r0);
|
|
1895
|
-
var u = w0 / (rho2 * d1) * (coshr0 * tanh(rho * s + r0) - sinh(r0));
|
|
1896
|
-
return [
|
|
1897
|
-
ux0 + u * dx,
|
|
1898
|
-
uy0 + u * dy,
|
|
1899
|
-
w0 * coshr0 / cosh(rho * s + r0)
|
|
1900
|
-
];
|
|
1901
|
-
};
|
|
1902
|
-
}
|
|
1903
|
-
i.duration = S * 1e3 * rho / Math.SQRT2;
|
|
1904
|
-
return i;
|
|
1905
|
-
}
|
|
1906
|
-
zoom.rho = function(_) {
|
|
1907
|
-
var _1 = Math.max(.001, +_);
|
|
1908
|
-
var _2 = _1 * _1;
|
|
1909
|
-
return zoomRho(_1, _2, _2 * _2);
|
|
1910
|
-
};
|
|
1911
|
-
return zoom;
|
|
1912
|
-
})(Math.SQRT2, 2, 4);
|
|
1913
|
-
//#endregion
|
|
1914
|
-
//#region ../../node_modules/.pnpm/d3-timer@3.0.1/node_modules/d3-timer/src/timer.js
|
|
1915
|
-
var frame = 0;
|
|
1916
|
-
var timeout = 0;
|
|
1917
|
-
var interval = 0;
|
|
1918
|
-
var pokeDelay = 1e3;
|
|
1919
|
-
var taskHead;
|
|
1920
|
-
var taskTail;
|
|
1921
|
-
var clockLast = 0;
|
|
1922
|
-
var clockNow = 0;
|
|
1923
|
-
var clockSkew = 0;
|
|
1924
|
-
var clock = typeof performance === "object" && performance.now ? performance : Date;
|
|
1925
|
-
var setFrame = typeof window === "object" && window.requestAnimationFrame ? window.requestAnimationFrame.bind(window) : function(f) {
|
|
1926
|
-
setTimeout(f, 17);
|
|
1927
|
-
};
|
|
1928
|
-
function now() {
|
|
1929
|
-
return clockNow || (setFrame(clearNow), clockNow = clock.now() + clockSkew);
|
|
1930
|
-
}
|
|
1931
|
-
function clearNow() {
|
|
1932
|
-
clockNow = 0;
|
|
1933
|
-
}
|
|
1934
|
-
function Timer() {
|
|
1935
|
-
this._call = this._time = this._next = null;
|
|
1936
|
-
}
|
|
1937
|
-
Timer.prototype = timer.prototype = {
|
|
1938
|
-
constructor: Timer,
|
|
1939
|
-
restart: function(callback, delay, time) {
|
|
1940
|
-
if (typeof callback !== "function") throw new TypeError("callback is not a function");
|
|
1941
|
-
time = (time == null ? now() : +time) + (delay == null ? 0 : +delay);
|
|
1942
|
-
if (!this._next && taskTail !== this) {
|
|
1943
|
-
if (taskTail) taskTail._next = this;
|
|
1944
|
-
else taskHead = this;
|
|
1945
|
-
taskTail = this;
|
|
1946
|
-
}
|
|
1947
|
-
this._call = callback;
|
|
1948
|
-
this._time = time;
|
|
1949
|
-
sleep();
|
|
1950
|
-
},
|
|
1951
|
-
stop: function() {
|
|
1952
|
-
if (this._call) {
|
|
1953
|
-
this._call = null;
|
|
1954
|
-
this._time = Infinity;
|
|
1955
|
-
sleep();
|
|
1956
|
-
}
|
|
1957
|
-
}
|
|
1958
|
-
};
|
|
1959
|
-
function timer(callback, delay, time) {
|
|
1960
|
-
var t = new Timer();
|
|
1961
|
-
t.restart(callback, delay, time);
|
|
1962
|
-
return t;
|
|
1963
|
-
}
|
|
1964
|
-
function timerFlush() {
|
|
1965
|
-
now();
|
|
1966
|
-
++frame;
|
|
1967
|
-
var t = taskHead;
|
|
1968
|
-
var e;
|
|
1969
|
-
while (t) {
|
|
1970
|
-
if ((e = clockNow - t._time) >= 0) t._call.call(void 0, e);
|
|
1971
|
-
t = t._next;
|
|
1972
|
-
}
|
|
1973
|
-
--frame;
|
|
1974
|
-
}
|
|
1975
|
-
function wake() {
|
|
1976
|
-
clockNow = (clockLast = clock.now()) + clockSkew;
|
|
1977
|
-
frame = timeout = 0;
|
|
1978
|
-
try {
|
|
1979
|
-
timerFlush();
|
|
1980
|
-
} finally {
|
|
1981
|
-
frame = 0;
|
|
1982
|
-
nap();
|
|
1983
|
-
clockNow = 0;
|
|
1984
|
-
}
|
|
1985
|
-
}
|
|
1986
|
-
function poke() {
|
|
1987
|
-
var now = clock.now();
|
|
1988
|
-
var delay = now - clockLast;
|
|
1989
|
-
if (delay > pokeDelay) clockSkew -= delay, clockLast = now;
|
|
1990
|
-
}
|
|
1991
|
-
function nap() {
|
|
1992
|
-
var t0;
|
|
1993
|
-
var t1 = taskHead;
|
|
1994
|
-
var t2;
|
|
1995
|
-
var time = Infinity;
|
|
1996
|
-
while (t1) if (t1._call) {
|
|
1997
|
-
if (time > t1._time) time = t1._time;
|
|
1998
|
-
t0 = t1, t1 = t1._next;
|
|
1999
|
-
} else {
|
|
2000
|
-
t2 = t1._next, t1._next = null;
|
|
2001
|
-
t1 = t0 ? t0._next = t2 : taskHead = t2;
|
|
2002
|
-
}
|
|
2003
|
-
taskTail = t0;
|
|
2004
|
-
sleep(time);
|
|
2005
|
-
}
|
|
2006
|
-
function sleep(time) {
|
|
2007
|
-
if (frame) return;
|
|
2008
|
-
if (timeout) timeout = clearTimeout(timeout);
|
|
2009
|
-
if (time - clockNow > 24) {
|
|
2010
|
-
if (time < Infinity) timeout = setTimeout(wake, time - clock.now() - clockSkew);
|
|
2011
|
-
if (interval) interval = clearInterval(interval);
|
|
2012
|
-
} else {
|
|
2013
|
-
if (!interval) clockLast = clock.now(), interval = setInterval(poke, pokeDelay);
|
|
2014
|
-
frame = 1, setFrame(wake);
|
|
2015
|
-
}
|
|
2016
|
-
}
|
|
2017
|
-
//#endregion
|
|
2018
|
-
//#region ../../node_modules/.pnpm/d3-timer@3.0.1/node_modules/d3-timer/src/timeout.js
|
|
2019
|
-
function timeout_default(callback, delay, time) {
|
|
2020
|
-
var t = new Timer();
|
|
2021
|
-
delay = delay == null ? 0 : +delay;
|
|
2022
|
-
t.restart((elapsed) => {
|
|
2023
|
-
t.stop();
|
|
2024
|
-
callback(elapsed + delay);
|
|
2025
|
-
}, delay, time);
|
|
2026
|
-
return t;
|
|
2027
|
-
}
|
|
2028
|
-
__name(timeout_default, "default");
|
|
2029
|
-
//#endregion
|
|
2030
|
-
//#region ../../node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/schedule.js
|
|
2031
|
-
var emptyOn = dispatch("start", "end", "cancel", "interrupt");
|
|
2032
|
-
var emptyTween = [];
|
|
2033
|
-
function schedule_default(node, name, id, index, group, timing) {
|
|
2034
|
-
var schedules = node.__transition;
|
|
2035
|
-
if (!schedules) node.__transition = {};
|
|
2036
|
-
else if (id in schedules) return;
|
|
2037
|
-
create(node, id, {
|
|
2038
|
-
name,
|
|
2039
|
-
index,
|
|
2040
|
-
group,
|
|
2041
|
-
on: emptyOn,
|
|
2042
|
-
tween: emptyTween,
|
|
2043
|
-
time: timing.time,
|
|
2044
|
-
delay: timing.delay,
|
|
2045
|
-
duration: timing.duration,
|
|
2046
|
-
ease: timing.ease,
|
|
2047
|
-
timer: null,
|
|
2048
|
-
state: 0
|
|
2049
|
-
});
|
|
2050
|
-
}
|
|
2051
|
-
__name(schedule_default, "default");
|
|
2052
|
-
function init(node, id) {
|
|
2053
|
-
var schedule = get(node, id);
|
|
2054
|
-
if (schedule.state > 0) throw new Error("too late; already scheduled");
|
|
2055
|
-
return schedule;
|
|
2056
|
-
}
|
|
2057
|
-
function set(node, id) {
|
|
2058
|
-
var schedule = get(node, id);
|
|
2059
|
-
if (schedule.state > 3) throw new Error("too late; already running");
|
|
2060
|
-
return schedule;
|
|
2061
|
-
}
|
|
2062
|
-
function get(node, id) {
|
|
2063
|
-
var schedule = node.__transition;
|
|
2064
|
-
if (!schedule || !(schedule = schedule[id])) throw new Error("transition not found");
|
|
2065
|
-
return schedule;
|
|
2066
|
-
}
|
|
2067
|
-
function create(node, id, self) {
|
|
2068
|
-
var schedules = node.__transition;
|
|
2069
|
-
var tween;
|
|
2070
|
-
schedules[id] = self;
|
|
2071
|
-
self.timer = timer(schedule, 0, self.time);
|
|
2072
|
-
function schedule(elapsed) {
|
|
2073
|
-
self.state = 1;
|
|
2074
|
-
self.timer.restart(start, self.delay, self.time);
|
|
2075
|
-
if (self.delay <= elapsed) start(elapsed - self.delay);
|
|
2076
|
-
}
|
|
2077
|
-
function start(elapsed) {
|
|
2078
|
-
var i;
|
|
2079
|
-
var j;
|
|
2080
|
-
var n;
|
|
2081
|
-
var o;
|
|
2082
|
-
if (self.state !== 1) return stop();
|
|
2083
|
-
for (i in schedules) {
|
|
2084
|
-
o = schedules[i];
|
|
2085
|
-
if (o.name !== self.name) continue;
|
|
2086
|
-
if (o.state === 3) return timeout_default(start);
|
|
2087
|
-
if (o.state === 4) {
|
|
2088
|
-
o.state = 6;
|
|
2089
|
-
o.timer.stop();
|
|
2090
|
-
o.on.call("interrupt", node, node.__data__, o.index, o.group);
|
|
2091
|
-
delete schedules[i];
|
|
2092
|
-
} else if (+i < id) {
|
|
2093
|
-
o.state = 6;
|
|
2094
|
-
o.timer.stop();
|
|
2095
|
-
o.on.call("cancel", node, node.__data__, o.index, o.group);
|
|
2096
|
-
delete schedules[i];
|
|
2097
|
-
}
|
|
2098
|
-
}
|
|
2099
|
-
timeout_default(function() {
|
|
2100
|
-
if (self.state === 3) {
|
|
2101
|
-
self.state = 4;
|
|
2102
|
-
self.timer.restart(tick, self.delay, self.time);
|
|
2103
|
-
tick(elapsed);
|
|
2104
|
-
}
|
|
2105
|
-
});
|
|
2106
|
-
self.state = 2;
|
|
2107
|
-
self.on.call("start", node, node.__data__, self.index, self.group);
|
|
2108
|
-
if (self.state !== 2) return;
|
|
2109
|
-
self.state = 3;
|
|
2110
|
-
tween = new Array(n = self.tween.length);
|
|
2111
|
-
for (i = 0, j = -1; i < n; ++i) if (o = self.tween[i].value.call(node, node.__data__, self.index, self.group)) tween[++j] = o;
|
|
2112
|
-
tween.length = j + 1;
|
|
2113
|
-
}
|
|
2114
|
-
function tick(elapsed) {
|
|
2115
|
-
var t = elapsed < self.duration ? self.ease.call(null, elapsed / self.duration) : (self.timer.restart(stop), self.state = 5, 1);
|
|
2116
|
-
var i = -1;
|
|
2117
|
-
var n = tween.length;
|
|
2118
|
-
while (++i < n) tween[i].call(node, t);
|
|
2119
|
-
if (self.state === 5) {
|
|
2120
|
-
self.on.call("end", node, node.__data__, self.index, self.group);
|
|
2121
|
-
stop();
|
|
2122
|
-
}
|
|
2123
|
-
}
|
|
2124
|
-
function stop() {
|
|
2125
|
-
self.state = 6;
|
|
2126
|
-
self.timer.stop();
|
|
2127
|
-
delete schedules[id];
|
|
2128
|
-
for (var i in schedules) return;
|
|
2129
|
-
delete node.__transition;
|
|
2130
|
-
}
|
|
2131
|
-
}
|
|
2132
|
-
//#endregion
|
|
2133
|
-
//#region ../../node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/interrupt.js
|
|
2134
|
-
function interrupt_default$1(node, name) {
|
|
2135
|
-
var schedules = node.__transition;
|
|
2136
|
-
var schedule;
|
|
2137
|
-
var active;
|
|
2138
|
-
var empty = true;
|
|
2139
|
-
var i;
|
|
2140
|
-
if (!schedules) return;
|
|
2141
|
-
name = name == null ? null : name + "";
|
|
2142
|
-
for (i in schedules) {
|
|
2143
|
-
if ((schedule = schedules[i]).name !== name) {
|
|
2144
|
-
empty = false;
|
|
2145
|
-
continue;
|
|
2146
|
-
}
|
|
2147
|
-
active = schedule.state > 2 && schedule.state < 5;
|
|
2148
|
-
schedule.state = 6;
|
|
2149
|
-
schedule.timer.stop();
|
|
2150
|
-
schedule.on.call(active ? "interrupt" : "cancel", node, node.__data__, schedule.index, schedule.group);
|
|
2151
|
-
delete schedules[i];
|
|
2152
|
-
}
|
|
2153
|
-
if (empty) delete node.__transition;
|
|
2154
|
-
}
|
|
2155
|
-
__name(interrupt_default$1, "default");
|
|
2156
|
-
//#endregion
|
|
2157
|
-
//#region ../../node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/selection/interrupt.js
|
|
2158
|
-
function interrupt_default(name) {
|
|
2159
|
-
return this.each(function() {
|
|
2160
|
-
interrupt_default$1(this, name);
|
|
2161
|
-
});
|
|
2162
|
-
}
|
|
2163
|
-
__name(interrupt_default, "default");
|
|
2164
|
-
//#endregion
|
|
2165
|
-
//#region ../../node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/tween.js
|
|
2166
|
-
function tweenRemove(id, name) {
|
|
2167
|
-
var tween0;
|
|
2168
|
-
var tween1;
|
|
2169
|
-
return function() {
|
|
2170
|
-
var schedule = set(this, id);
|
|
2171
|
-
var tween = schedule.tween;
|
|
2172
|
-
if (tween !== tween0) {
|
|
2173
|
-
tween1 = tween0 = tween;
|
|
2174
|
-
for (var i = 0, n = tween1.length; i < n; ++i) if (tween1[i].name === name) {
|
|
2175
|
-
tween1 = tween1.slice();
|
|
2176
|
-
tween1.splice(i, 1);
|
|
2177
|
-
break;
|
|
2178
|
-
}
|
|
2179
|
-
}
|
|
2180
|
-
schedule.tween = tween1;
|
|
2181
|
-
};
|
|
2182
|
-
}
|
|
2183
|
-
function tweenFunction(id, name, value) {
|
|
2184
|
-
var tween0;
|
|
2185
|
-
var tween1;
|
|
2186
|
-
if (typeof value !== "function") throw new Error();
|
|
2187
|
-
return function() {
|
|
2188
|
-
var schedule = set(this, id);
|
|
2189
|
-
var tween = schedule.tween;
|
|
2190
|
-
if (tween !== tween0) {
|
|
2191
|
-
tween1 = (tween0 = tween).slice();
|
|
2192
|
-
for (var t = {
|
|
2193
|
-
name,
|
|
2194
|
-
value
|
|
2195
|
-
}, i = 0, n = tween1.length; i < n; ++i) if (tween1[i].name === name) {
|
|
2196
|
-
tween1[i] = t;
|
|
2197
|
-
break;
|
|
2198
|
-
}
|
|
2199
|
-
if (i === n) tween1.push(t);
|
|
2200
|
-
}
|
|
2201
|
-
schedule.tween = tween1;
|
|
2202
|
-
};
|
|
2203
|
-
}
|
|
2204
|
-
function tween_default(name, value) {
|
|
2205
|
-
var id = this._id;
|
|
2206
|
-
name += "";
|
|
2207
|
-
if (arguments.length < 2) {
|
|
2208
|
-
var tween = get(this.node(), id).tween;
|
|
2209
|
-
for (var i = 0, n = tween.length, t; i < n; ++i) if ((t = tween[i]).name === name) return t.value;
|
|
2210
|
-
return null;
|
|
2211
|
-
}
|
|
2212
|
-
return this.each((value == null ? tweenRemove : tweenFunction)(id, name, value));
|
|
2213
|
-
}
|
|
2214
|
-
__name(tween_default, "default");
|
|
2215
|
-
function tweenValue(transition, name, value) {
|
|
2216
|
-
var id = transition._id;
|
|
2217
|
-
transition.each(function() {
|
|
2218
|
-
var schedule = set(this, id);
|
|
2219
|
-
(schedule.value || (schedule.value = {}))[name] = value.apply(this, arguments);
|
|
2220
|
-
});
|
|
2221
|
-
return function(node) {
|
|
2222
|
-
return get(node, id).value[name];
|
|
2223
|
-
};
|
|
2224
|
-
}
|
|
2225
|
-
//#endregion
|
|
2226
|
-
//#region ../../node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/interpolate.js
|
|
2227
|
-
function interpolate_default(a, b) {
|
|
2228
|
-
var c;
|
|
2229
|
-
return (typeof b === "number" ? number_default : b instanceof color ? rgb_default : (c = color(b)) ? (b = c, rgb_default) : string_default)(a, b);
|
|
2230
|
-
}
|
|
2231
|
-
__name(interpolate_default, "default");
|
|
2232
|
-
//#endregion
|
|
2233
|
-
//#region ../../node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/attr.js
|
|
2234
|
-
function attrRemove(name) {
|
|
2235
|
-
return function() {
|
|
2236
|
-
this.removeAttribute(name);
|
|
2237
|
-
};
|
|
2238
|
-
}
|
|
2239
|
-
function attrRemoveNS(fullname) {
|
|
2240
|
-
return function() {
|
|
2241
|
-
this.removeAttributeNS(fullname.space, fullname.local);
|
|
2242
|
-
};
|
|
2243
|
-
}
|
|
2244
|
-
function attrConstant(name, interpolate, value1) {
|
|
2245
|
-
var string00;
|
|
2246
|
-
var string1 = value1 + "";
|
|
2247
|
-
var interpolate0;
|
|
2248
|
-
return function() {
|
|
2249
|
-
var string0 = this.getAttribute(name);
|
|
2250
|
-
return string0 === string1 ? null : string0 === string00 ? interpolate0 : interpolate0 = interpolate(string00 = string0, value1);
|
|
2251
|
-
};
|
|
2252
|
-
}
|
|
2253
|
-
function attrConstantNS(fullname, interpolate, value1) {
|
|
2254
|
-
var string00;
|
|
2255
|
-
var string1 = value1 + "";
|
|
2256
|
-
var interpolate0;
|
|
2257
|
-
return function() {
|
|
2258
|
-
var string0 = this.getAttributeNS(fullname.space, fullname.local);
|
|
2259
|
-
return string0 === string1 ? null : string0 === string00 ? interpolate0 : interpolate0 = interpolate(string00 = string0, value1);
|
|
2260
|
-
};
|
|
2261
|
-
}
|
|
2262
|
-
function attrFunction(name, interpolate, value) {
|
|
2263
|
-
var string00;
|
|
2264
|
-
var string10;
|
|
2265
|
-
var interpolate0;
|
|
2266
|
-
return function() {
|
|
2267
|
-
var string0;
|
|
2268
|
-
var value1 = value(this);
|
|
2269
|
-
var string1;
|
|
2270
|
-
if (value1 == null) return void this.removeAttribute(name);
|
|
2271
|
-
string0 = this.getAttribute(name);
|
|
2272
|
-
string1 = value1 + "";
|
|
2273
|
-
return string0 === string1 ? null : string0 === string00 && string1 === string10 ? interpolate0 : (string10 = string1, interpolate0 = interpolate(string00 = string0, value1));
|
|
2274
|
-
};
|
|
2275
|
-
}
|
|
2276
|
-
function attrFunctionNS(fullname, interpolate, value) {
|
|
2277
|
-
var string00;
|
|
2278
|
-
var string10;
|
|
2279
|
-
var interpolate0;
|
|
2280
|
-
return function() {
|
|
2281
|
-
var string0;
|
|
2282
|
-
var value1 = value(this);
|
|
2283
|
-
var string1;
|
|
2284
|
-
if (value1 == null) return void this.removeAttributeNS(fullname.space, fullname.local);
|
|
2285
|
-
string0 = this.getAttributeNS(fullname.space, fullname.local);
|
|
2286
|
-
string1 = value1 + "";
|
|
2287
|
-
return string0 === string1 ? null : string0 === string00 && string1 === string10 ? interpolate0 : (string10 = string1, interpolate0 = interpolate(string00 = string0, value1));
|
|
2288
|
-
};
|
|
2289
|
-
}
|
|
2290
|
-
function attr_default(name, value) {
|
|
2291
|
-
var fullname = namespace_default(name);
|
|
2292
|
-
var i = fullname === "transform" ? interpolateTransformSvg : interpolate_default;
|
|
2293
|
-
return this.attrTween(name, typeof value === "function" ? (fullname.local ? attrFunctionNS : attrFunction)(fullname, i, tweenValue(this, "attr." + name, value)) : value == null ? (fullname.local ? attrRemoveNS : attrRemove)(fullname) : (fullname.local ? attrConstantNS : attrConstant)(fullname, i, value));
|
|
2294
|
-
}
|
|
2295
|
-
__name(attr_default, "default");
|
|
2296
|
-
//#endregion
|
|
2297
|
-
//#region ../../node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/attrTween.js
|
|
2298
|
-
function attrInterpolate(name, i) {
|
|
2299
|
-
return function(t) {
|
|
2300
|
-
this.setAttribute(name, i.call(this, t));
|
|
2301
|
-
};
|
|
2302
|
-
}
|
|
2303
|
-
function attrInterpolateNS(fullname, i) {
|
|
2304
|
-
return function(t) {
|
|
2305
|
-
this.setAttributeNS(fullname.space, fullname.local, i.call(this, t));
|
|
2306
|
-
};
|
|
2307
|
-
}
|
|
2308
|
-
function attrTweenNS(fullname, value) {
|
|
2309
|
-
var t0;
|
|
2310
|
-
var i0;
|
|
2311
|
-
function tween() {
|
|
2312
|
-
var i = value.apply(this, arguments);
|
|
2313
|
-
if (i !== i0) t0 = (i0 = i) && attrInterpolateNS(fullname, i);
|
|
2314
|
-
return t0;
|
|
2315
|
-
}
|
|
2316
|
-
tween._value = value;
|
|
2317
|
-
return tween;
|
|
2318
|
-
}
|
|
2319
|
-
function attrTween(name, value) {
|
|
2320
|
-
var t0;
|
|
2321
|
-
var i0;
|
|
2322
|
-
function tween() {
|
|
2323
|
-
var i = value.apply(this, arguments);
|
|
2324
|
-
if (i !== i0) t0 = (i0 = i) && attrInterpolate(name, i);
|
|
2325
|
-
return t0;
|
|
2326
|
-
}
|
|
2327
|
-
tween._value = value;
|
|
2328
|
-
return tween;
|
|
2329
|
-
}
|
|
2330
|
-
function attrTween_default(name, value) {
|
|
2331
|
-
var key = "attr." + name;
|
|
2332
|
-
if (arguments.length < 2) return (key = this.tween(key)) && key._value;
|
|
2333
|
-
if (value == null) return this.tween(key, null);
|
|
2334
|
-
if (typeof value !== "function") throw new Error();
|
|
2335
|
-
var fullname = namespace_default(name);
|
|
2336
|
-
return this.tween(key, (fullname.local ? attrTweenNS : attrTween)(fullname, value));
|
|
2337
|
-
}
|
|
2338
|
-
__name(attrTween_default, "default");
|
|
2339
|
-
//#endregion
|
|
2340
|
-
//#region ../../node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/delay.js
|
|
2341
|
-
function delayFunction(id, value) {
|
|
2342
|
-
return function() {
|
|
2343
|
-
init(this, id).delay = +value.apply(this, arguments);
|
|
2344
|
-
};
|
|
2345
|
-
}
|
|
2346
|
-
function delayConstant(id, value) {
|
|
2347
|
-
return value = +value, function() {
|
|
2348
|
-
init(this, id).delay = value;
|
|
2349
|
-
};
|
|
2350
|
-
}
|
|
2351
|
-
function delay_default(value) {
|
|
2352
|
-
var id = this._id;
|
|
2353
|
-
return arguments.length ? this.each((typeof value === "function" ? delayFunction : delayConstant)(id, value)) : get(this.node(), id).delay;
|
|
2354
|
-
}
|
|
2355
|
-
__name(delay_default, "default");
|
|
2356
|
-
//#endregion
|
|
2357
|
-
//#region ../../node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/duration.js
|
|
2358
|
-
function durationFunction(id, value) {
|
|
2359
|
-
return function() {
|
|
2360
|
-
set(this, id).duration = +value.apply(this, arguments);
|
|
2361
|
-
};
|
|
2362
|
-
}
|
|
2363
|
-
function durationConstant(id, value) {
|
|
2364
|
-
return value = +value, function() {
|
|
2365
|
-
set(this, id).duration = value;
|
|
2366
|
-
};
|
|
2367
|
-
}
|
|
2368
|
-
function duration_default(value) {
|
|
2369
|
-
var id = this._id;
|
|
2370
|
-
return arguments.length ? this.each((typeof value === "function" ? durationFunction : durationConstant)(id, value)) : get(this.node(), id).duration;
|
|
2371
|
-
}
|
|
2372
|
-
__name(duration_default, "default");
|
|
2373
|
-
//#endregion
|
|
2374
|
-
//#region ../../node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/ease.js
|
|
2375
|
-
function easeConstant(id, value) {
|
|
2376
|
-
if (typeof value !== "function") throw new Error();
|
|
2377
|
-
return function() {
|
|
2378
|
-
set(this, id).ease = value;
|
|
2379
|
-
};
|
|
2380
|
-
}
|
|
2381
|
-
function ease_default(value) {
|
|
2382
|
-
var id = this._id;
|
|
2383
|
-
return arguments.length ? this.each(easeConstant(id, value)) : get(this.node(), id).ease;
|
|
2384
|
-
}
|
|
2385
|
-
__name(ease_default, "default");
|
|
2386
|
-
//#endregion
|
|
2387
|
-
//#region ../../node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/easeVarying.js
|
|
2388
|
-
function easeVarying(id, value) {
|
|
2389
|
-
return function() {
|
|
2390
|
-
var v = value.apply(this, arguments);
|
|
2391
|
-
if (typeof v !== "function") throw new Error();
|
|
2392
|
-
set(this, id).ease = v;
|
|
2393
|
-
};
|
|
2394
|
-
}
|
|
2395
|
-
function easeVarying_default(value) {
|
|
2396
|
-
if (typeof value !== "function") throw new Error();
|
|
2397
|
-
return this.each(easeVarying(this._id, value));
|
|
2398
|
-
}
|
|
2399
|
-
__name(easeVarying_default, "default");
|
|
2400
|
-
//#endregion
|
|
2401
|
-
//#region ../../node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/filter.js
|
|
2402
|
-
function filter_default(match) {
|
|
2403
|
-
if (typeof match !== "function") match = matcher_default(match);
|
|
2404
|
-
for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) for (var group = groups[j], n = group.length, subgroup = subgroups[j] = [], node, i = 0; i < n; ++i) if ((node = group[i]) && match.call(node, node.__data__, i, group)) subgroup.push(node);
|
|
2405
|
-
return new Transition(subgroups, this._parents, this._name, this._id);
|
|
2406
|
-
}
|
|
2407
|
-
__name(filter_default, "default");
|
|
2408
|
-
//#endregion
|
|
2409
|
-
//#region ../../node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/merge.js
|
|
2410
|
-
function merge_default(transition) {
|
|
2411
|
-
if (transition._id !== this._id) throw new Error();
|
|
2412
|
-
for (var groups0 = this._groups, groups1 = transition._groups, m0 = groups0.length, m1 = groups1.length, m = Math.min(m0, m1), merges = new Array(m0), j = 0; j < m; ++j) for (var group0 = groups0[j], group1 = groups1[j], n = group0.length, merge = merges[j] = new Array(n), node, i = 0; i < n; ++i) if (node = group0[i] || group1[i]) merge[i] = node;
|
|
2413
|
-
for (; j < m0; ++j) merges[j] = groups0[j];
|
|
2414
|
-
return new Transition(merges, this._parents, this._name, this._id);
|
|
2415
|
-
}
|
|
2416
|
-
__name(merge_default, "default");
|
|
2417
|
-
//#endregion
|
|
2418
|
-
//#region ../../node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/on.js
|
|
2419
|
-
function start(name) {
|
|
2420
|
-
return (name + "").trim().split(/^|\s+/).every(function(t) {
|
|
2421
|
-
var i = t.indexOf(".");
|
|
2422
|
-
if (i >= 0) t = t.slice(0, i);
|
|
2423
|
-
return !t || t === "start";
|
|
2424
|
-
});
|
|
2425
|
-
}
|
|
2426
|
-
function onFunction(id, name, listener) {
|
|
2427
|
-
var on0;
|
|
2428
|
-
var on1;
|
|
2429
|
-
var sit = start(name) ? init : set;
|
|
2430
|
-
return function() {
|
|
2431
|
-
var schedule = sit(this, id);
|
|
2432
|
-
var on = schedule.on;
|
|
2433
|
-
if (on !== on0) (on1 = (on0 = on).copy()).on(name, listener);
|
|
2434
|
-
schedule.on = on1;
|
|
2435
|
-
};
|
|
2436
|
-
}
|
|
2437
|
-
function on_default(name, listener) {
|
|
2438
|
-
var id = this._id;
|
|
2439
|
-
return arguments.length < 2 ? get(this.node(), id).on.on(name) : this.each(onFunction(id, name, listener));
|
|
2440
|
-
}
|
|
2441
|
-
__name(on_default, "default");
|
|
2442
|
-
//#endregion
|
|
2443
|
-
//#region ../../node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/remove.js
|
|
2444
|
-
function removeFunction(id) {
|
|
2445
|
-
return function() {
|
|
2446
|
-
var parent = this.parentNode;
|
|
2447
|
-
for (var i in this.__transition) if (+i !== id) return;
|
|
2448
|
-
if (parent) parent.removeChild(this);
|
|
2449
|
-
};
|
|
2450
|
-
}
|
|
2451
|
-
function remove_default$1() {
|
|
2452
|
-
return this.on("end.remove", removeFunction(this._id));
|
|
2453
|
-
}
|
|
2454
|
-
__name(remove_default$1, "default");
|
|
2455
|
-
//#endregion
|
|
2456
|
-
//#region ../../node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/select.js
|
|
2457
|
-
function select_default(select) {
|
|
2458
|
-
var name = this._name;
|
|
2459
|
-
var id = this._id;
|
|
2460
|
-
if (typeof select !== "function") select = selector_default(select);
|
|
2461
|
-
for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) for (var group = groups[j], n = group.length, subgroup = subgroups[j] = new Array(n), node, subnode, i = 0; i < n; ++i) if ((node = group[i]) && (subnode = select.call(node, node.__data__, i, group))) {
|
|
2462
|
-
if ("__data__" in node) subnode.__data__ = node.__data__;
|
|
2463
|
-
subgroup[i] = subnode;
|
|
2464
|
-
schedule_default(subgroup[i], name, id, i, subgroup, get(node, id));
|
|
2465
|
-
}
|
|
2466
|
-
return new Transition(subgroups, this._parents, name, id);
|
|
2467
|
-
}
|
|
2468
|
-
__name(select_default, "default");
|
|
2469
|
-
//#endregion
|
|
2470
|
-
//#region ../../node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/selectAll.js
|
|
2471
|
-
function selectAll_default(select) {
|
|
2472
|
-
var name = this._name;
|
|
2473
|
-
var id = this._id;
|
|
2474
|
-
if (typeof select !== "function") select = selectorAll_default(select);
|
|
2475
|
-
for (var groups = this._groups, m = groups.length, subgroups = [], parents = [], j = 0; j < m; ++j) for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) if (node = group[i]) {
|
|
2476
|
-
for (var children = select.call(node, node.__data__, i, group), child, inherit = get(node, id), k = 0, l = children.length; k < l; ++k) if (child = children[k]) schedule_default(child, name, id, k, children, inherit);
|
|
2477
|
-
subgroups.push(children);
|
|
2478
|
-
parents.push(node);
|
|
2479
|
-
}
|
|
2480
|
-
return new Transition(subgroups, parents, name, id);
|
|
2481
|
-
}
|
|
2482
|
-
__name(selectAll_default, "default");
|
|
2483
|
-
//#endregion
|
|
2484
|
-
//#region ../../node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/selection.js
|
|
2485
|
-
var Selection = selection.prototype.constructor;
|
|
2486
|
-
function selection_default() {
|
|
2487
|
-
return new Selection(this._groups, this._parents);
|
|
2488
|
-
}
|
|
2489
|
-
__name(selection_default, "default");
|
|
2490
|
-
//#endregion
|
|
2491
|
-
//#region ../../node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/style.js
|
|
2492
|
-
function styleNull(name, interpolate) {
|
|
2493
|
-
var string00;
|
|
2494
|
-
var string10;
|
|
2495
|
-
var interpolate0;
|
|
2496
|
-
return function() {
|
|
2497
|
-
var string0 = styleValue(this, name);
|
|
2498
|
-
var string1 = (this.style.removeProperty(name), styleValue(this, name));
|
|
2499
|
-
return string0 === string1 ? null : string0 === string00 && string1 === string10 ? interpolate0 : interpolate0 = interpolate(string00 = string0, string10 = string1);
|
|
2500
|
-
};
|
|
2501
|
-
}
|
|
2502
|
-
function styleRemove(name) {
|
|
2503
|
-
return function() {
|
|
2504
|
-
this.style.removeProperty(name);
|
|
2505
|
-
};
|
|
2506
|
-
}
|
|
2507
|
-
function styleConstant(name, interpolate, value1) {
|
|
2508
|
-
var string00;
|
|
2509
|
-
var string1 = value1 + "";
|
|
2510
|
-
var interpolate0;
|
|
2511
|
-
return function() {
|
|
2512
|
-
var string0 = styleValue(this, name);
|
|
2513
|
-
return string0 === string1 ? null : string0 === string00 ? interpolate0 : interpolate0 = interpolate(string00 = string0, value1);
|
|
2514
|
-
};
|
|
2515
|
-
}
|
|
2516
|
-
function styleFunction(name, interpolate, value) {
|
|
2517
|
-
var string00;
|
|
2518
|
-
var string10;
|
|
2519
|
-
var interpolate0;
|
|
2520
|
-
return function() {
|
|
2521
|
-
var string0 = styleValue(this, name);
|
|
2522
|
-
var value1 = value(this);
|
|
2523
|
-
var string1 = value1 + "";
|
|
2524
|
-
if (value1 == null) string1 = value1 = (this.style.removeProperty(name), styleValue(this, name));
|
|
2525
|
-
return string0 === string1 ? null : string0 === string00 && string1 === string10 ? interpolate0 : (string10 = string1, interpolate0 = interpolate(string00 = string0, value1));
|
|
2526
|
-
};
|
|
2527
|
-
}
|
|
2528
|
-
function styleMaybeRemove(id, name) {
|
|
2529
|
-
var on0;
|
|
2530
|
-
var on1;
|
|
2531
|
-
var listener0;
|
|
2532
|
-
var key = "style." + name;
|
|
2533
|
-
var event = "end." + key;
|
|
2534
|
-
var remove;
|
|
2535
|
-
return function() {
|
|
2536
|
-
var schedule = set(this, id);
|
|
2537
|
-
var on = schedule.on;
|
|
2538
|
-
var listener = schedule.value[key] == null ? remove || (remove = styleRemove(name)) : void 0;
|
|
2539
|
-
if (on !== on0 || listener0 !== listener) (on1 = (on0 = on).copy()).on(event, listener0 = listener);
|
|
2540
|
-
schedule.on = on1;
|
|
2541
|
-
};
|
|
2542
|
-
}
|
|
2543
|
-
function style_default(name, value, priority) {
|
|
2544
|
-
var i = (name += "") === "transform" ? interpolateTransformCss : interpolate_default;
|
|
2545
|
-
return value == null ? this.styleTween(name, styleNull(name, i)).on("end.style." + name, styleRemove(name)) : typeof value === "function" ? this.styleTween(name, styleFunction(name, i, tweenValue(this, "style." + name, value))).each(styleMaybeRemove(this._id, name)) : this.styleTween(name, styleConstant(name, i, value), priority).on("end.style." + name, null);
|
|
2546
|
-
}
|
|
2547
|
-
__name(style_default, "default");
|
|
2548
|
-
//#endregion
|
|
2549
|
-
//#region ../../node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/styleTween.js
|
|
2550
|
-
function styleInterpolate(name, i, priority) {
|
|
2551
|
-
return function(t) {
|
|
2552
|
-
this.style.setProperty(name, i.call(this, t), priority);
|
|
2553
|
-
};
|
|
2554
|
-
}
|
|
2555
|
-
function styleTween(name, value, priority) {
|
|
2556
|
-
var t;
|
|
2557
|
-
var i0;
|
|
2558
|
-
function tween() {
|
|
2559
|
-
var i = value.apply(this, arguments);
|
|
2560
|
-
if (i !== i0) t = (i0 = i) && styleInterpolate(name, i, priority);
|
|
2561
|
-
return t;
|
|
2562
|
-
}
|
|
2563
|
-
tween._value = value;
|
|
2564
|
-
return tween;
|
|
2565
|
-
}
|
|
2566
|
-
function styleTween_default(name, value, priority) {
|
|
2567
|
-
var key = "style." + (name += "");
|
|
2568
|
-
if (arguments.length < 2) return (key = this.tween(key)) && key._value;
|
|
2569
|
-
if (value == null) return this.tween(key, null);
|
|
2570
|
-
if (typeof value !== "function") throw new Error();
|
|
2571
|
-
return this.tween(key, styleTween(name, value, priority == null ? "" : priority));
|
|
2572
|
-
}
|
|
2573
|
-
__name(styleTween_default, "default");
|
|
2574
|
-
//#endregion
|
|
2575
|
-
//#region ../../node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/text.js
|
|
2576
|
-
function textConstant(value) {
|
|
2577
|
-
return function() {
|
|
2578
|
-
this.textContent = value;
|
|
2579
|
-
};
|
|
2580
|
-
}
|
|
2581
|
-
function textFunction(value) {
|
|
2582
|
-
return function() {
|
|
2583
|
-
var value1 = value(this);
|
|
2584
|
-
this.textContent = value1 == null ? "" : value1;
|
|
2585
|
-
};
|
|
2586
|
-
}
|
|
2587
|
-
function text_default(value) {
|
|
2588
|
-
return this.tween("text", typeof value === "function" ? textFunction(tweenValue(this, "text", value)) : textConstant(value == null ? "" : value + ""));
|
|
2589
|
-
}
|
|
2590
|
-
__name(text_default, "default");
|
|
2591
|
-
//#endregion
|
|
2592
|
-
//#region ../../node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/textTween.js
|
|
2593
|
-
function textInterpolate(i) {
|
|
2594
|
-
return function(t) {
|
|
2595
|
-
this.textContent = i.call(this, t);
|
|
2596
|
-
};
|
|
2597
|
-
}
|
|
2598
|
-
function textTween(value) {
|
|
2599
|
-
var t0;
|
|
2600
|
-
var i0;
|
|
2601
|
-
function tween() {
|
|
2602
|
-
var i = value.apply(this, arguments);
|
|
2603
|
-
if (i !== i0) t0 = (i0 = i) && textInterpolate(i);
|
|
2604
|
-
return t0;
|
|
2605
|
-
}
|
|
2606
|
-
tween._value = value;
|
|
2607
|
-
return tween;
|
|
2608
|
-
}
|
|
2609
|
-
function textTween_default(value) {
|
|
2610
|
-
var key = "text";
|
|
2611
|
-
if (arguments.length < 1) return (key = this.tween(key)) && key._value;
|
|
2612
|
-
if (value == null) return this.tween(key, null);
|
|
2613
|
-
if (typeof value !== "function") throw new Error();
|
|
2614
|
-
return this.tween(key, textTween(value));
|
|
2615
|
-
}
|
|
2616
|
-
__name(textTween_default, "default");
|
|
2617
|
-
//#endregion
|
|
2618
|
-
//#region ../../node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/transition.js
|
|
2619
|
-
function transition_default$1() {
|
|
2620
|
-
var name = this._name;
|
|
2621
|
-
var id0 = this._id;
|
|
2622
|
-
var id1 = newId();
|
|
2623
|
-
for (var groups = this._groups, m = groups.length, j = 0; j < m; ++j) for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) if (node = group[i]) {
|
|
2624
|
-
var inherit = get(node, id0);
|
|
2625
|
-
schedule_default(node, name, id1, i, group, {
|
|
2626
|
-
time: inherit.time + inherit.delay + inherit.duration,
|
|
2627
|
-
delay: 0,
|
|
2628
|
-
duration: inherit.duration,
|
|
2629
|
-
ease: inherit.ease
|
|
2630
|
-
});
|
|
2631
|
-
}
|
|
2632
|
-
return new Transition(groups, this._parents, name, id1);
|
|
2633
|
-
}
|
|
2634
|
-
__name(transition_default$1, "default");
|
|
2635
|
-
//#endregion
|
|
2636
|
-
//#region ../../node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/end.js
|
|
2637
|
-
function end_default() {
|
|
2638
|
-
var on0;
|
|
2639
|
-
var on1;
|
|
2640
|
-
var that = this;
|
|
2641
|
-
var id = that._id;
|
|
2642
|
-
var size = that.size();
|
|
2643
|
-
return new Promise(function(resolve, reject) {
|
|
2644
|
-
var cancel = { value: reject };
|
|
2645
|
-
var end = { value: function() {
|
|
2646
|
-
if (--size === 0) resolve();
|
|
2647
|
-
} };
|
|
2648
|
-
that.each(function() {
|
|
2649
|
-
var schedule = set(this, id);
|
|
2650
|
-
var on = schedule.on;
|
|
2651
|
-
if (on !== on0) {
|
|
2652
|
-
on1 = (on0 = on).copy();
|
|
2653
|
-
on1._.cancel.push(cancel);
|
|
2654
|
-
on1._.interrupt.push(cancel);
|
|
2655
|
-
on1._.end.push(end);
|
|
2656
|
-
}
|
|
2657
|
-
schedule.on = on1;
|
|
2658
|
-
});
|
|
2659
|
-
if (size === 0) resolve();
|
|
2660
|
-
});
|
|
2661
|
-
}
|
|
2662
|
-
__name(end_default, "default");
|
|
2663
|
-
//#endregion
|
|
2664
|
-
//#region ../../node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/index.js
|
|
2665
|
-
var id = 0;
|
|
2666
|
-
function Transition(groups, parents, name, id) {
|
|
2667
|
-
this._groups = groups;
|
|
2668
|
-
this._parents = parents;
|
|
2669
|
-
this._name = name;
|
|
2670
|
-
this._id = id;
|
|
2671
|
-
}
|
|
2672
|
-
function transition(name) {
|
|
2673
|
-
return selection().transition(name);
|
|
2674
|
-
}
|
|
2675
|
-
function newId() {
|
|
2676
|
-
return ++id;
|
|
2677
|
-
}
|
|
2678
|
-
var selection_prototype = selection.prototype;
|
|
2679
|
-
Transition.prototype = transition.prototype = {
|
|
2680
|
-
constructor: Transition,
|
|
2681
|
-
select: select_default,
|
|
2682
|
-
selectAll: selectAll_default,
|
|
2683
|
-
selectChild: selection_prototype.selectChild,
|
|
2684
|
-
selectChildren: selection_prototype.selectChildren,
|
|
2685
|
-
filter: filter_default,
|
|
2686
|
-
merge: merge_default,
|
|
2687
|
-
selection: selection_default,
|
|
2688
|
-
transition: transition_default$1,
|
|
2689
|
-
call: selection_prototype.call,
|
|
2690
|
-
nodes: selection_prototype.nodes,
|
|
2691
|
-
node: selection_prototype.node,
|
|
2692
|
-
size: selection_prototype.size,
|
|
2693
|
-
empty: selection_prototype.empty,
|
|
2694
|
-
each: selection_prototype.each,
|
|
2695
|
-
on: on_default,
|
|
2696
|
-
attr: attr_default,
|
|
2697
|
-
attrTween: attrTween_default,
|
|
2698
|
-
style: style_default,
|
|
2699
|
-
styleTween: styleTween_default,
|
|
2700
|
-
text: text_default,
|
|
2701
|
-
textTween: textTween_default,
|
|
2702
|
-
remove: remove_default$1,
|
|
2703
|
-
tween: tween_default,
|
|
2704
|
-
delay: delay_default,
|
|
2705
|
-
duration: duration_default,
|
|
2706
|
-
ease: ease_default,
|
|
2707
|
-
easeVarying: easeVarying_default,
|
|
2708
|
-
end: end_default,
|
|
2709
|
-
[Symbol.iterator]: selection_prototype[Symbol.iterator]
|
|
2710
|
-
};
|
|
2711
|
-
//#endregion
|
|
2712
|
-
//#region ../../node_modules/.pnpm/d3-ease@3.0.1/node_modules/d3-ease/src/cubic.js
|
|
2713
|
-
function cubicInOut(t) {
|
|
2714
|
-
return ((t *= 2) <= 1 ? t * t * t : (t -= 2) * t * t + 2) / 2;
|
|
2715
|
-
}
|
|
2716
|
-
//#endregion
|
|
2717
|
-
//#region ../../node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/selection/transition.js
|
|
2718
|
-
var defaultTiming = {
|
|
2719
|
-
time: null,
|
|
2720
|
-
delay: 0,
|
|
2721
|
-
duration: 250,
|
|
2722
|
-
ease: cubicInOut
|
|
2723
|
-
};
|
|
2724
|
-
function inherit(node, id) {
|
|
2725
|
-
var timing;
|
|
2726
|
-
while (!(timing = node.__transition) || !(timing = timing[id])) if (!(node = node.parentNode)) throw new Error(`transition ${id} not found`);
|
|
2727
|
-
return timing;
|
|
2728
|
-
}
|
|
2729
|
-
function transition_default(name) {
|
|
2730
|
-
var id;
|
|
2731
|
-
var timing;
|
|
2732
|
-
if (name instanceof Transition) id = name._id, name = name._name;
|
|
2733
|
-
else id = newId(), (timing = defaultTiming).time = now(), name = name == null ? null : name + "";
|
|
2734
|
-
for (var groups = this._groups, m = groups.length, j = 0; j < m; ++j) for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) if (node = group[i]) schedule_default(node, name, id, i, group, timing || inherit(node, id));
|
|
2735
|
-
return new Transition(groups, this._parents, name, id);
|
|
2736
|
-
}
|
|
2737
|
-
__name(transition_default, "default");
|
|
2738
|
-
//#endregion
|
|
2739
|
-
//#region ../../node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/selection/index.js
|
|
2740
|
-
selection.prototype.interrupt = interrupt_default;
|
|
2741
|
-
selection.prototype.transition = transition_default;
|
|
2742
|
-
//#endregion
|
|
2743
|
-
//#region ../../node_modules/.pnpm/d3-zoom@3.0.0/node_modules/d3-zoom/src/constant.js
|
|
2744
|
-
var constant_default$2 = /* @__PURE__ */ __name((x) => () => x, "default");
|
|
2745
|
-
//#endregion
|
|
2746
|
-
//#region ../../node_modules/.pnpm/d3-zoom@3.0.0/node_modules/d3-zoom/src/event.js
|
|
2747
|
-
function ZoomEvent(type, { sourceEvent, target, transform, dispatch }) {
|
|
2748
|
-
Object.defineProperties(this, {
|
|
2749
|
-
type: {
|
|
2750
|
-
value: type,
|
|
2751
|
-
enumerable: true,
|
|
2752
|
-
configurable: true
|
|
2753
|
-
},
|
|
2754
|
-
sourceEvent: {
|
|
2755
|
-
value: sourceEvent,
|
|
2756
|
-
enumerable: true,
|
|
2757
|
-
configurable: true
|
|
2758
|
-
},
|
|
2759
|
-
target: {
|
|
2760
|
-
value: target,
|
|
2761
|
-
enumerable: true,
|
|
2762
|
-
configurable: true
|
|
2763
|
-
},
|
|
2764
|
-
transform: {
|
|
2765
|
-
value: transform,
|
|
2766
|
-
enumerable: true,
|
|
2767
|
-
configurable: true
|
|
2768
|
-
},
|
|
2769
|
-
_: { value: dispatch }
|
|
2770
|
-
});
|
|
2771
|
-
}
|
|
2772
|
-
//#endregion
|
|
2773
|
-
//#region ../../node_modules/.pnpm/d3-zoom@3.0.0/node_modules/d3-zoom/src/transform.js
|
|
2774
|
-
function Transform(k, x, y) {
|
|
2775
|
-
this.k = k;
|
|
2776
|
-
this.x = x;
|
|
2777
|
-
this.y = y;
|
|
2778
|
-
}
|
|
2779
|
-
Transform.prototype = {
|
|
2780
|
-
constructor: Transform,
|
|
2781
|
-
scale: function(k) {
|
|
2782
|
-
return k === 1 ? this : new Transform(this.k * k, this.x, this.y);
|
|
2783
|
-
},
|
|
2784
|
-
translate: function(x, y) {
|
|
2785
|
-
return x === 0 & y === 0 ? this : new Transform(this.k, this.x + this.k * x, this.y + this.k * y);
|
|
2786
|
-
},
|
|
2787
|
-
apply: function(point) {
|
|
2788
|
-
return [point[0] * this.k + this.x, point[1] * this.k + this.y];
|
|
2789
|
-
},
|
|
2790
|
-
applyX: function(x) {
|
|
2791
|
-
return x * this.k + this.x;
|
|
2792
|
-
},
|
|
2793
|
-
applyY: function(y) {
|
|
2794
|
-
return y * this.k + this.y;
|
|
2795
|
-
},
|
|
2796
|
-
invert: function(location) {
|
|
2797
|
-
return [(location[0] - this.x) / this.k, (location[1] - this.y) / this.k];
|
|
2798
|
-
},
|
|
2799
|
-
invertX: function(x) {
|
|
2800
|
-
return (x - this.x) / this.k;
|
|
2801
|
-
},
|
|
2802
|
-
invertY: function(y) {
|
|
2803
|
-
return (y - this.y) / this.k;
|
|
2804
|
-
},
|
|
2805
|
-
rescaleX: function(x) {
|
|
2806
|
-
return x.copy().domain(x.range().map(this.invertX, this).map(x.invert, x));
|
|
2807
|
-
},
|
|
2808
|
-
rescaleY: function(y) {
|
|
2809
|
-
return y.copy().domain(y.range().map(this.invertY, this).map(y.invert, y));
|
|
2810
|
-
},
|
|
2811
|
-
toString: function() {
|
|
2812
|
-
return "translate(" + this.x + "," + this.y + ") scale(" + this.k + ")";
|
|
2813
|
-
}
|
|
2814
|
-
};
|
|
2815
|
-
var identity = new Transform(1, 0, 0);
|
|
2816
|
-
transform.prototype = Transform.prototype;
|
|
2817
|
-
function transform(node) {
|
|
2818
|
-
while (!node.__zoom) if (!(node = node.parentNode)) return identity;
|
|
2819
|
-
return node.__zoom;
|
|
2820
|
-
}
|
|
2821
|
-
//#endregion
|
|
2822
|
-
//#region ../../node_modules/.pnpm/d3-zoom@3.0.0/node_modules/d3-zoom/src/noevent.js
|
|
2823
|
-
function nopropagation(event) {
|
|
2824
|
-
event.stopImmediatePropagation();
|
|
2825
|
-
}
|
|
2826
|
-
function noevent_default(event) {
|
|
2827
|
-
event.preventDefault();
|
|
2828
|
-
event.stopImmediatePropagation();
|
|
2829
|
-
}
|
|
2830
|
-
__name(noevent_default, "default");
|
|
2831
|
-
//#endregion
|
|
2832
|
-
//#region ../../node_modules/.pnpm/d3-zoom@3.0.0/node_modules/d3-zoom/src/zoom.js
|
|
2833
|
-
function defaultFilter(event) {
|
|
2834
|
-
return (!event.ctrlKey || event.type === "wheel") && !event.button;
|
|
2835
|
-
}
|
|
2836
|
-
function defaultExtent() {
|
|
2837
|
-
var e = this;
|
|
2838
|
-
if (e instanceof SVGElement) {
|
|
2839
|
-
e = e.ownerSVGElement || e;
|
|
2840
|
-
if (e.hasAttribute("viewBox")) {
|
|
2841
|
-
e = e.viewBox.baseVal;
|
|
2842
|
-
return [[e.x, e.y], [e.x + e.width, e.y + e.height]];
|
|
2843
|
-
}
|
|
2844
|
-
return [[0, 0], [e.width.baseVal.value, e.height.baseVal.value]];
|
|
2845
|
-
}
|
|
2846
|
-
return [[0, 0], [e.clientWidth, e.clientHeight]];
|
|
2847
|
-
}
|
|
2848
|
-
function defaultTransform() {
|
|
2849
|
-
return this.__zoom || identity;
|
|
2850
|
-
}
|
|
2851
|
-
function defaultWheelDelta(event) {
|
|
2852
|
-
return -event.deltaY * (event.deltaMode === 1 ? .05 : event.deltaMode ? 1 : .002) * (event.ctrlKey ? 10 : 1);
|
|
2853
|
-
}
|
|
2854
|
-
function defaultTouchable() {
|
|
2855
|
-
return navigator.maxTouchPoints || "ontouchstart" in this;
|
|
2856
|
-
}
|
|
2857
|
-
function defaultConstrain(transform, extent, translateExtent) {
|
|
2858
|
-
var dx0 = transform.invertX(extent[0][0]) - translateExtent[0][0];
|
|
2859
|
-
var dx1 = transform.invertX(extent[1][0]) - translateExtent[1][0];
|
|
2860
|
-
var dy0 = transform.invertY(extent[0][1]) - translateExtent[0][1];
|
|
2861
|
-
var dy1 = transform.invertY(extent[1][1]) - translateExtent[1][1];
|
|
2862
|
-
return transform.translate(dx1 > dx0 ? (dx0 + dx1) / 2 : Math.min(0, dx0) || Math.max(0, dx1), dy1 > dy0 ? (dy0 + dy1) / 2 : Math.min(0, dy0) || Math.max(0, dy1));
|
|
2863
|
-
}
|
|
2864
|
-
function zoom_default() {
|
|
2865
|
-
var filter = defaultFilter;
|
|
2866
|
-
var extent = defaultExtent;
|
|
2867
|
-
var constrain = defaultConstrain;
|
|
2868
|
-
var wheelDelta = defaultWheelDelta;
|
|
2869
|
-
var touchable = defaultTouchable;
|
|
2870
|
-
var scaleExtent = [0, Infinity];
|
|
2871
|
-
var translateExtent = [[-Infinity, -Infinity], [Infinity, Infinity]];
|
|
2872
|
-
var duration = 250;
|
|
2873
|
-
var interpolate = zoom_default$1;
|
|
2874
|
-
var listeners = dispatch("start", "zoom", "end");
|
|
2875
|
-
var touchstarting;
|
|
2876
|
-
var touchfirst;
|
|
2877
|
-
var touchending;
|
|
2878
|
-
var touchDelay = 500;
|
|
2879
|
-
var wheelDelay = 150;
|
|
2880
|
-
var clickDistance2 = 0;
|
|
2881
|
-
var tapDistance = 10;
|
|
2882
|
-
function zoom(selection) {
|
|
2883
|
-
selection.property("__zoom", defaultTransform).on("wheel.zoom", wheeled, { passive: false }).on("mousedown.zoom", mousedowned).on("dblclick.zoom", dblclicked).filter(touchable).on("touchstart.zoom", touchstarted).on("touchmove.zoom", touchmoved).on("touchend.zoom touchcancel.zoom", touchended).style("-webkit-tap-highlight-color", "rgba(0,0,0,0)");
|
|
2884
|
-
}
|
|
2885
|
-
zoom.transform = function(collection, transform, point, event) {
|
|
2886
|
-
var selection = collection.selection ? collection.selection() : collection;
|
|
2887
|
-
selection.property("__zoom", defaultTransform);
|
|
2888
|
-
if (collection !== selection) schedule(collection, transform, point, event);
|
|
2889
|
-
else selection.interrupt().each(function() {
|
|
2890
|
-
gesture(this, arguments).event(event).start().zoom(null, typeof transform === "function" ? transform.apply(this, arguments) : transform).end();
|
|
2891
|
-
});
|
|
2892
|
-
};
|
|
2893
|
-
zoom.scaleBy = function(selection, k, p, event) {
|
|
2894
|
-
zoom.scaleTo(selection, function() {
|
|
2895
|
-
return this.__zoom.k * (typeof k === "function" ? k.apply(this, arguments) : k);
|
|
2896
|
-
}, p, event);
|
|
2897
|
-
};
|
|
2898
|
-
zoom.scaleTo = function(selection, k, p, event) {
|
|
2899
|
-
zoom.transform(selection, function() {
|
|
2900
|
-
var e = extent.apply(this, arguments);
|
|
2901
|
-
var t0 = this.__zoom;
|
|
2902
|
-
var p0 = p == null ? centroid(e) : typeof p === "function" ? p.apply(this, arguments) : p;
|
|
2903
|
-
var p1 = t0.invert(p0);
|
|
2904
|
-
var k1 = typeof k === "function" ? k.apply(this, arguments) : k;
|
|
2905
|
-
return constrain(translate(scale(t0, k1), p0, p1), e, translateExtent);
|
|
2906
|
-
}, p, event);
|
|
2907
|
-
};
|
|
2908
|
-
zoom.translateBy = function(selection, x, y, event) {
|
|
2909
|
-
zoom.transform(selection, function() {
|
|
2910
|
-
return constrain(this.__zoom.translate(typeof x === "function" ? x.apply(this, arguments) : x, typeof y === "function" ? y.apply(this, arguments) : y), extent.apply(this, arguments), translateExtent);
|
|
2911
|
-
}, null, event);
|
|
2912
|
-
};
|
|
2913
|
-
zoom.translateTo = function(selection, x, y, p, event) {
|
|
2914
|
-
zoom.transform(selection, function() {
|
|
2915
|
-
var e = extent.apply(this, arguments);
|
|
2916
|
-
var t = this.__zoom;
|
|
2917
|
-
var p0 = p == null ? centroid(e) : typeof p === "function" ? p.apply(this, arguments) : p;
|
|
2918
|
-
return constrain(identity.translate(p0[0], p0[1]).scale(t.k).translate(typeof x === "function" ? -x.apply(this, arguments) : -x, typeof y === "function" ? -y.apply(this, arguments) : -y), e, translateExtent);
|
|
2919
|
-
}, p, event);
|
|
2920
|
-
};
|
|
2921
|
-
function scale(transform, k) {
|
|
2922
|
-
k = Math.max(scaleExtent[0], Math.min(scaleExtent[1], k));
|
|
2923
|
-
return k === transform.k ? transform : new Transform(k, transform.x, transform.y);
|
|
2924
|
-
}
|
|
2925
|
-
function translate(transform, p0, p1) {
|
|
2926
|
-
var x = p0[0] - p1[0] * transform.k;
|
|
2927
|
-
var y = p0[1] - p1[1] * transform.k;
|
|
2928
|
-
return x === transform.x && y === transform.y ? transform : new Transform(transform.k, x, y);
|
|
2929
|
-
}
|
|
2930
|
-
function centroid(extent) {
|
|
2931
|
-
return [(+extent[0][0] + +extent[1][0]) / 2, (+extent[0][1] + +extent[1][1]) / 2];
|
|
2932
|
-
}
|
|
2933
|
-
function schedule(transition, transform, point, event) {
|
|
2934
|
-
transition.on("start.zoom", function() {
|
|
2935
|
-
gesture(this, arguments).event(event).start();
|
|
2936
|
-
}).on("interrupt.zoom end.zoom", function() {
|
|
2937
|
-
gesture(this, arguments).event(event).end();
|
|
2938
|
-
}).tween("zoom", function() {
|
|
2939
|
-
var that = this;
|
|
2940
|
-
var args = arguments;
|
|
2941
|
-
var g = gesture(that, args).event(event);
|
|
2942
|
-
var e = extent.apply(that, args);
|
|
2943
|
-
var p = point == null ? centroid(e) : typeof point === "function" ? point.apply(that, args) : point;
|
|
2944
|
-
var w = Math.max(e[1][0] - e[0][0], e[1][1] - e[0][1]);
|
|
2945
|
-
var a = that.__zoom;
|
|
2946
|
-
var b = typeof transform === "function" ? transform.apply(that, args) : transform;
|
|
2947
|
-
var i = interpolate(a.invert(p).concat(w / a.k), b.invert(p).concat(w / b.k));
|
|
2948
|
-
return function(t) {
|
|
2949
|
-
if (t === 1) t = b;
|
|
2950
|
-
else {
|
|
2951
|
-
var l = i(t);
|
|
2952
|
-
var k = w / l[2];
|
|
2953
|
-
t = new Transform(k, p[0] - l[0] * k, p[1] - l[1] * k);
|
|
2954
|
-
}
|
|
2955
|
-
g.zoom(null, t);
|
|
2956
|
-
};
|
|
2957
|
-
});
|
|
2958
|
-
}
|
|
2959
|
-
function gesture(that, args, clean) {
|
|
2960
|
-
return !clean && that.__zooming || new Gesture(that, args);
|
|
2961
|
-
}
|
|
2962
|
-
function Gesture(that, args) {
|
|
2963
|
-
this.that = that;
|
|
2964
|
-
this.args = args;
|
|
2965
|
-
this.active = 0;
|
|
2966
|
-
this.sourceEvent = null;
|
|
2967
|
-
this.extent = extent.apply(that, args);
|
|
2968
|
-
this.taps = 0;
|
|
2969
|
-
}
|
|
2970
|
-
Gesture.prototype = {
|
|
2971
|
-
event: function(event) {
|
|
2972
|
-
if (event) this.sourceEvent = event;
|
|
2973
|
-
return this;
|
|
2974
|
-
},
|
|
2975
|
-
start: function() {
|
|
2976
|
-
if (++this.active === 1) {
|
|
2977
|
-
this.that.__zooming = this;
|
|
2978
|
-
this.emit("start");
|
|
2979
|
-
}
|
|
2980
|
-
return this;
|
|
2981
|
-
},
|
|
2982
|
-
zoom: function(key, transform) {
|
|
2983
|
-
if (this.mouse && key !== "mouse") this.mouse[1] = transform.invert(this.mouse[0]);
|
|
2984
|
-
if (this.touch0 && key !== "touch") this.touch0[1] = transform.invert(this.touch0[0]);
|
|
2985
|
-
if (this.touch1 && key !== "touch") this.touch1[1] = transform.invert(this.touch1[0]);
|
|
2986
|
-
this.that.__zoom = transform;
|
|
2987
|
-
this.emit("zoom");
|
|
2988
|
-
return this;
|
|
2989
|
-
},
|
|
2990
|
-
end: function() {
|
|
2991
|
-
if (--this.active === 0) {
|
|
2992
|
-
delete this.that.__zooming;
|
|
2993
|
-
this.emit("end");
|
|
2994
|
-
}
|
|
2995
|
-
return this;
|
|
2996
|
-
},
|
|
2997
|
-
emit: function(type) {
|
|
2998
|
-
var d = select_default$1(this.that).datum();
|
|
2999
|
-
listeners.call(type, this.that, new ZoomEvent(type, {
|
|
3000
|
-
sourceEvent: this.sourceEvent,
|
|
3001
|
-
target: zoom,
|
|
3002
|
-
type,
|
|
3003
|
-
transform: this.that.__zoom,
|
|
3004
|
-
dispatch: listeners
|
|
3005
|
-
}), d);
|
|
3006
|
-
}
|
|
3007
|
-
};
|
|
3008
|
-
function wheeled(event, ...args) {
|
|
3009
|
-
if (!filter.apply(this, arguments)) return;
|
|
3010
|
-
var g = gesture(this, args).event(event);
|
|
3011
|
-
var t = this.__zoom;
|
|
3012
|
-
var k = Math.max(scaleExtent[0], Math.min(scaleExtent[1], t.k * Math.pow(2, wheelDelta.apply(this, arguments))));
|
|
3013
|
-
var p = pointer_default(event);
|
|
3014
|
-
if (g.wheel) {
|
|
3015
|
-
if (g.mouse[0][0] !== p[0] || g.mouse[0][1] !== p[1]) g.mouse[1] = t.invert(g.mouse[0] = p);
|
|
3016
|
-
clearTimeout(g.wheel);
|
|
3017
|
-
} else if (t.k === k) return;
|
|
3018
|
-
else {
|
|
3019
|
-
g.mouse = [p, t.invert(p)];
|
|
3020
|
-
interrupt_default$1(this);
|
|
3021
|
-
g.start();
|
|
3022
|
-
}
|
|
3023
|
-
noevent_default(event);
|
|
3024
|
-
g.wheel = setTimeout(wheelidled, wheelDelay);
|
|
3025
|
-
g.zoom("mouse", constrain(translate(scale(t, k), g.mouse[0], g.mouse[1]), g.extent, translateExtent));
|
|
3026
|
-
function wheelidled() {
|
|
3027
|
-
g.wheel = null;
|
|
3028
|
-
g.end();
|
|
3029
|
-
}
|
|
3030
|
-
}
|
|
3031
|
-
function mousedowned(event, ...args) {
|
|
3032
|
-
if (touchending || !filter.apply(this, arguments)) return;
|
|
3033
|
-
var currentTarget = event.currentTarget;
|
|
3034
|
-
var g = gesture(this, args, true).event(event);
|
|
3035
|
-
var v = select_default$1(event.view).on("mousemove.zoom", mousemoved, true).on("mouseup.zoom", mouseupped, true);
|
|
3036
|
-
var p = pointer_default(event, currentTarget);
|
|
3037
|
-
var x0 = event.clientX;
|
|
3038
|
-
var y0 = event.clientY;
|
|
3039
|
-
nodrag_default(event.view);
|
|
3040
|
-
nopropagation(event);
|
|
3041
|
-
g.mouse = [p, this.__zoom.invert(p)];
|
|
3042
|
-
interrupt_default$1(this);
|
|
3043
|
-
g.start();
|
|
3044
|
-
function mousemoved(event) {
|
|
3045
|
-
noevent_default(event);
|
|
3046
|
-
if (!g.moved) {
|
|
3047
|
-
var dx = event.clientX - x0;
|
|
3048
|
-
var dy = event.clientY - y0;
|
|
3049
|
-
g.moved = dx * dx + dy * dy > clickDistance2;
|
|
3050
|
-
}
|
|
3051
|
-
g.event(event).zoom("mouse", constrain(translate(g.that.__zoom, g.mouse[0] = pointer_default(event, currentTarget), g.mouse[1]), g.extent, translateExtent));
|
|
3052
|
-
}
|
|
3053
|
-
function mouseupped(event) {
|
|
3054
|
-
v.on("mousemove.zoom mouseup.zoom", null);
|
|
3055
|
-
yesdrag(event.view, g.moved);
|
|
3056
|
-
noevent_default(event);
|
|
3057
|
-
g.event(event).end();
|
|
3058
|
-
}
|
|
3059
|
-
}
|
|
3060
|
-
function dblclicked(event, ...args) {
|
|
3061
|
-
if (!filter.apply(this, arguments)) return;
|
|
3062
|
-
var t0 = this.__zoom;
|
|
3063
|
-
var p0 = pointer_default(event.changedTouches ? event.changedTouches[0] : event, this);
|
|
3064
|
-
var p1 = t0.invert(p0);
|
|
3065
|
-
var k1 = t0.k * (event.shiftKey ? .5 : 2);
|
|
3066
|
-
var t1 = constrain(translate(scale(t0, k1), p0, p1), extent.apply(this, args), translateExtent);
|
|
3067
|
-
noevent_default(event);
|
|
3068
|
-
if (duration > 0) select_default$1(this).transition().duration(duration).call(schedule, t1, p0, event);
|
|
3069
|
-
else select_default$1(this).call(zoom.transform, t1, p0, event);
|
|
3070
|
-
}
|
|
3071
|
-
function touchstarted(event, ...args) {
|
|
3072
|
-
if (!filter.apply(this, arguments)) return;
|
|
3073
|
-
var touches = event.touches;
|
|
3074
|
-
var n = touches.length;
|
|
3075
|
-
var g = gesture(this, args, event.changedTouches.length === n).event(event);
|
|
3076
|
-
var started;
|
|
3077
|
-
var i;
|
|
3078
|
-
var t;
|
|
3079
|
-
var p;
|
|
3080
|
-
nopropagation(event);
|
|
3081
|
-
for (i = 0; i < n; ++i) {
|
|
3082
|
-
t = touches[i], p = pointer_default(t, this);
|
|
3083
|
-
p = [
|
|
3084
|
-
p,
|
|
3085
|
-
this.__zoom.invert(p),
|
|
3086
|
-
t.identifier
|
|
3087
|
-
];
|
|
3088
|
-
if (!g.touch0) g.touch0 = p, started = true, g.taps = 1 + !!touchstarting;
|
|
3089
|
-
else if (!g.touch1 && g.touch0[2] !== p[2]) g.touch1 = p, g.taps = 0;
|
|
3090
|
-
}
|
|
3091
|
-
if (touchstarting) touchstarting = clearTimeout(touchstarting);
|
|
3092
|
-
if (started) {
|
|
3093
|
-
if (g.taps < 2) touchfirst = p[0], touchstarting = setTimeout(function() {
|
|
3094
|
-
touchstarting = null;
|
|
3095
|
-
}, touchDelay);
|
|
3096
|
-
interrupt_default$1(this);
|
|
3097
|
-
g.start();
|
|
3098
|
-
}
|
|
3099
|
-
}
|
|
3100
|
-
function touchmoved(event, ...args) {
|
|
3101
|
-
if (!this.__zooming) return;
|
|
3102
|
-
var g = gesture(this, args).event(event);
|
|
3103
|
-
var touches = event.changedTouches;
|
|
3104
|
-
var n = touches.length;
|
|
3105
|
-
var i;
|
|
3106
|
-
var t;
|
|
3107
|
-
var p;
|
|
3108
|
-
var l;
|
|
3109
|
-
noevent_default(event);
|
|
3110
|
-
for (i = 0; i < n; ++i) {
|
|
3111
|
-
t = touches[i], p = pointer_default(t, this);
|
|
3112
|
-
if (g.touch0 && g.touch0[2] === t.identifier) g.touch0[0] = p;
|
|
3113
|
-
else if (g.touch1 && g.touch1[2] === t.identifier) g.touch1[0] = p;
|
|
3114
|
-
}
|
|
3115
|
-
t = g.that.__zoom;
|
|
3116
|
-
if (g.touch1) {
|
|
3117
|
-
var p0 = g.touch0[0];
|
|
3118
|
-
var l0 = g.touch0[1];
|
|
3119
|
-
var p1 = g.touch1[0];
|
|
3120
|
-
var l1 = g.touch1[1];
|
|
3121
|
-
var dp = (dp = p1[0] - p0[0]) * dp + (dp = p1[1] - p0[1]) * dp;
|
|
3122
|
-
var dl = (dl = l1[0] - l0[0]) * dl + (dl = l1[1] - l0[1]) * dl;
|
|
3123
|
-
t = scale(t, Math.sqrt(dp / dl));
|
|
3124
|
-
p = [(p0[0] + p1[0]) / 2, (p0[1] + p1[1]) / 2];
|
|
3125
|
-
l = [(l0[0] + l1[0]) / 2, (l0[1] + l1[1]) / 2];
|
|
3126
|
-
} else if (g.touch0) p = g.touch0[0], l = g.touch0[1];
|
|
3127
|
-
else return;
|
|
3128
|
-
g.zoom("touch", constrain(translate(t, p, l), g.extent, translateExtent));
|
|
3129
|
-
}
|
|
3130
|
-
function touchended(event, ...args) {
|
|
3131
|
-
if (!this.__zooming) return;
|
|
3132
|
-
var g = gesture(this, args).event(event);
|
|
3133
|
-
var touches = event.changedTouches;
|
|
3134
|
-
var n = touches.length;
|
|
3135
|
-
var i;
|
|
3136
|
-
var t;
|
|
3137
|
-
nopropagation(event);
|
|
3138
|
-
if (touchending) clearTimeout(touchending);
|
|
3139
|
-
touchending = setTimeout(function() {
|
|
3140
|
-
touchending = null;
|
|
3141
|
-
}, touchDelay);
|
|
3142
|
-
for (i = 0; i < n; ++i) {
|
|
3143
|
-
t = touches[i];
|
|
3144
|
-
if (g.touch0 && g.touch0[2] === t.identifier) delete g.touch0;
|
|
3145
|
-
else if (g.touch1 && g.touch1[2] === t.identifier) delete g.touch1;
|
|
3146
|
-
}
|
|
3147
|
-
if (g.touch1 && !g.touch0) g.touch0 = g.touch1, delete g.touch1;
|
|
3148
|
-
if (g.touch0) g.touch0[1] = this.__zoom.invert(g.touch0[0]);
|
|
3149
|
-
else {
|
|
3150
|
-
g.end();
|
|
3151
|
-
if (g.taps === 2) {
|
|
3152
|
-
t = pointer_default(t, this);
|
|
3153
|
-
if (Math.hypot(touchfirst[0] - t[0], touchfirst[1] - t[1]) < tapDistance) {
|
|
3154
|
-
var p = select_default$1(this).on("dblclick.zoom");
|
|
3155
|
-
if (p) p.apply(this, arguments);
|
|
3156
|
-
}
|
|
3157
|
-
}
|
|
3158
|
-
}
|
|
3159
|
-
}
|
|
3160
|
-
zoom.wheelDelta = function(_) {
|
|
3161
|
-
return arguments.length ? (wheelDelta = typeof _ === "function" ? _ : constant_default$2(+_), zoom) : wheelDelta;
|
|
3162
|
-
};
|
|
3163
|
-
zoom.filter = function(_) {
|
|
3164
|
-
return arguments.length ? (filter = typeof _ === "function" ? _ : constant_default$2(!!_), zoom) : filter;
|
|
3165
|
-
};
|
|
3166
|
-
zoom.touchable = function(_) {
|
|
3167
|
-
return arguments.length ? (touchable = typeof _ === "function" ? _ : constant_default$2(!!_), zoom) : touchable;
|
|
3168
|
-
};
|
|
3169
|
-
zoom.extent = function(_) {
|
|
3170
|
-
return arguments.length ? (extent = typeof _ === "function" ? _ : constant_default$2([[+_[0][0], +_[0][1]], [+_[1][0], +_[1][1]]]), zoom) : extent;
|
|
3171
|
-
};
|
|
3172
|
-
zoom.scaleExtent = function(_) {
|
|
3173
|
-
return arguments.length ? (scaleExtent[0] = +_[0], scaleExtent[1] = +_[1], zoom) : [scaleExtent[0], scaleExtent[1]];
|
|
3174
|
-
};
|
|
3175
|
-
zoom.translateExtent = function(_) {
|
|
3176
|
-
return arguments.length ? (translateExtent[0][0] = +_[0][0], translateExtent[1][0] = +_[1][0], translateExtent[0][1] = +_[0][1], translateExtent[1][1] = +_[1][1], zoom) : [[translateExtent[0][0], translateExtent[0][1]], [translateExtent[1][0], translateExtent[1][1]]];
|
|
3177
|
-
};
|
|
3178
|
-
zoom.constrain = function(_) {
|
|
3179
|
-
return arguments.length ? (constrain = _, zoom) : constrain;
|
|
3180
|
-
};
|
|
3181
|
-
zoom.duration = function(_) {
|
|
3182
|
-
return arguments.length ? (duration = +_, zoom) : duration;
|
|
3183
|
-
};
|
|
3184
|
-
zoom.interpolate = function(_) {
|
|
3185
|
-
return arguments.length ? (interpolate = _, zoom) : interpolate;
|
|
3186
|
-
};
|
|
3187
|
-
zoom.on = function() {
|
|
3188
|
-
var value = listeners.on.apply(listeners, arguments);
|
|
3189
|
-
return value === listeners ? zoom : value;
|
|
3190
|
-
};
|
|
3191
|
-
zoom.clickDistance = function(_) {
|
|
3192
|
-
return arguments.length ? (clickDistance2 = (_ = +_) * _, zoom) : Math.sqrt(clickDistance2);
|
|
3193
|
-
};
|
|
3194
|
-
zoom.tapDistance = function(_) {
|
|
3195
|
-
return arguments.length ? (tapDistance = +_, zoom) : tapDistance;
|
|
3196
|
-
};
|
|
3197
|
-
return zoom;
|
|
3198
|
-
}
|
|
3199
|
-
__name(zoom_default, "default");
|
|
3200
|
-
//#endregion
|
|
3201
|
-
//#region ../../node_modules/.pnpm/d3-shape@3.2.0/node_modules/d3-shape/src/constant.js
|
|
3202
|
-
function constant_default$1(x) {
|
|
3203
|
-
return function constant() {
|
|
3204
|
-
return x;
|
|
3205
|
-
};
|
|
3206
|
-
}
|
|
3207
|
-
__name(constant_default$1, "default");
|
|
3208
|
-
var pi$1 = Math.PI;
|
|
3209
|
-
pi$1 / 2;
|
|
3210
|
-
2 * pi$1;
|
|
3211
|
-
//#endregion
|
|
3212
|
-
//#region ../../node_modules/.pnpm/d3-path@3.1.0/node_modules/d3-path/src/path.js
|
|
3213
|
-
var pi = Math.PI;
|
|
3214
|
-
var tau = 2 * pi;
|
|
3215
|
-
var epsilon = 1e-6;
|
|
3216
|
-
var tauEpsilon = tau - epsilon;
|
|
3217
|
-
function append(strings) {
|
|
3218
|
-
this._ += strings[0];
|
|
3219
|
-
for (let i = 1, n = strings.length; i < n; ++i) this._ += arguments[i] + strings[i];
|
|
3220
|
-
}
|
|
3221
|
-
function appendRound(digits) {
|
|
3222
|
-
let d = Math.floor(digits);
|
|
3223
|
-
if (!(d >= 0)) throw new Error(`invalid digits: ${digits}`);
|
|
3224
|
-
if (d > 15) return append;
|
|
3225
|
-
const k = 10 ** d;
|
|
3226
|
-
return function(strings) {
|
|
3227
|
-
this._ += strings[0];
|
|
3228
|
-
for (let i = 1, n = strings.length; i < n; ++i) this._ += Math.round(arguments[i] * k) / k + strings[i];
|
|
3229
|
-
};
|
|
3230
|
-
}
|
|
3231
|
-
var Path = class {
|
|
3232
|
-
constructor(digits) {
|
|
3233
|
-
this._x0 = this._y0 = this._x1 = this._y1 = null;
|
|
3234
|
-
this._ = "";
|
|
3235
|
-
this._append = digits == null ? append : appendRound(digits);
|
|
3236
|
-
}
|
|
3237
|
-
moveTo(x, y) {
|
|
3238
|
-
this._append`M${this._x0 = this._x1 = +x},${this._y0 = this._y1 = +y}`;
|
|
3239
|
-
}
|
|
3240
|
-
closePath() {
|
|
3241
|
-
if (this._x1 !== null) {
|
|
3242
|
-
this._x1 = this._x0, this._y1 = this._y0;
|
|
3243
|
-
this._append`Z`;
|
|
3244
|
-
}
|
|
3245
|
-
}
|
|
3246
|
-
lineTo(x, y) {
|
|
3247
|
-
this._append`L${this._x1 = +x},${this._y1 = +y}`;
|
|
3248
|
-
}
|
|
3249
|
-
quadraticCurveTo(x1, y1, x, y) {
|
|
3250
|
-
this._append`Q${+x1},${+y1},${this._x1 = +x},${this._y1 = +y}`;
|
|
3251
|
-
}
|
|
3252
|
-
bezierCurveTo(x1, y1, x2, y2, x, y) {
|
|
3253
|
-
this._append`C${+x1},${+y1},${+x2},${+y2},${this._x1 = +x},${this._y1 = +y}`;
|
|
3254
|
-
}
|
|
3255
|
-
arcTo(x1, y1, x2, y2, r) {
|
|
3256
|
-
x1 = +x1, y1 = +y1, x2 = +x2, y2 = +y2, r = +r;
|
|
3257
|
-
if (r < 0) throw new Error(`negative radius: ${r}`);
|
|
3258
|
-
let x0 = this._x1;
|
|
3259
|
-
let y0 = this._y1;
|
|
3260
|
-
let x21 = x2 - x1;
|
|
3261
|
-
let y21 = y2 - y1;
|
|
3262
|
-
let x01 = x0 - x1;
|
|
3263
|
-
let y01 = y0 - y1;
|
|
3264
|
-
let l01_2 = x01 * x01 + y01 * y01;
|
|
3265
|
-
if (this._x1 === null) this._append`M${this._x1 = x1},${this._y1 = y1}`;
|
|
3266
|
-
else if (!(l01_2 > epsilon));
|
|
3267
|
-
else if (!(Math.abs(y01 * x21 - y21 * x01) > epsilon) || !r) this._append`L${this._x1 = x1},${this._y1 = y1}`;
|
|
3268
|
-
else {
|
|
3269
|
-
let x20 = x2 - x0;
|
|
3270
|
-
let y20 = y2 - y0;
|
|
3271
|
-
let l21_2 = x21 * x21 + y21 * y21;
|
|
3272
|
-
let l20_2 = x20 * x20 + y20 * y20;
|
|
3273
|
-
let l21 = Math.sqrt(l21_2);
|
|
3274
|
-
let l01 = Math.sqrt(l01_2);
|
|
3275
|
-
let l = r * Math.tan((pi - Math.acos((l21_2 + l01_2 - l20_2) / (2 * l21 * l01))) / 2);
|
|
3276
|
-
let t01 = l / l01;
|
|
3277
|
-
let t21 = l / l21;
|
|
3278
|
-
if (Math.abs(t01 - 1) > epsilon) this._append`L${x1 + t01 * x01},${y1 + t01 * y01}`;
|
|
3279
|
-
this._append`A${r},${r},0,0,${+(y01 * x20 > x01 * y20)},${this._x1 = x1 + t21 * x21},${this._y1 = y1 + t21 * y21}`;
|
|
3280
|
-
}
|
|
3281
|
-
}
|
|
3282
|
-
arc(x, y, r, a0, a1, ccw) {
|
|
3283
|
-
x = +x, y = +y, r = +r, ccw = !!ccw;
|
|
3284
|
-
if (r < 0) throw new Error(`negative radius: ${r}`);
|
|
3285
|
-
let dx = r * Math.cos(a0);
|
|
3286
|
-
let dy = r * Math.sin(a0);
|
|
3287
|
-
let x0 = x + dx;
|
|
3288
|
-
let y0 = y + dy;
|
|
3289
|
-
let cw = 1 ^ ccw;
|
|
3290
|
-
let da = ccw ? a0 - a1 : a1 - a0;
|
|
3291
|
-
if (this._x1 === null) this._append`M${x0},${y0}`;
|
|
3292
|
-
else if (Math.abs(this._x1 - x0) > epsilon || Math.abs(this._y1 - y0) > epsilon) this._append`L${x0},${y0}`;
|
|
3293
|
-
if (!r) return;
|
|
3294
|
-
if (da < 0) da = da % tau + tau;
|
|
3295
|
-
if (da > tauEpsilon) this._append`A${r},${r},0,1,${cw},${x - dx},${y - dy}A${r},${r},0,1,${cw},${this._x1 = x0},${this._y1 = y0}`;
|
|
3296
|
-
else if (da > epsilon) this._append`A${r},${r},0,${+(da >= pi)},${cw},${this._x1 = x + r * Math.cos(a1)},${this._y1 = y + r * Math.sin(a1)}`;
|
|
3297
|
-
}
|
|
3298
|
-
rect(x, y, w, h) {
|
|
3299
|
-
this._append`M${this._x0 = this._x1 = +x},${this._y0 = this._y1 = +y}h${w = +w}v${+h}h${-w}Z`;
|
|
3300
|
-
}
|
|
3301
|
-
toString() {
|
|
3302
|
-
return this._;
|
|
3303
|
-
}
|
|
3304
|
-
};
|
|
3305
|
-
function path() {
|
|
3306
|
-
return new Path();
|
|
3307
|
-
}
|
|
3308
|
-
path.prototype = Path.prototype;
|
|
3309
|
-
//#endregion
|
|
3310
|
-
//#region ../../node_modules/.pnpm/d3-shape@3.2.0/node_modules/d3-shape/src/path.js
|
|
3311
|
-
function withPath(shape) {
|
|
3312
|
-
let digits = 3;
|
|
3313
|
-
shape.digits = function(_) {
|
|
3314
|
-
if (!arguments.length) return digits;
|
|
3315
|
-
if (_ == null) digits = null;
|
|
3316
|
-
else {
|
|
3317
|
-
const d = Math.floor(_);
|
|
3318
|
-
if (!(d >= 0)) throw new RangeError(`invalid digits: ${_}`);
|
|
3319
|
-
digits = d;
|
|
3320
|
-
}
|
|
3321
|
-
return shape;
|
|
3322
|
-
};
|
|
3323
|
-
return () => new Path(digits);
|
|
3324
|
-
}
|
|
3325
|
-
Array.prototype.slice;
|
|
3326
|
-
function array_default(x) {
|
|
3327
|
-
return typeof x === "object" && "length" in x ? x : Array.from(x);
|
|
3328
|
-
}
|
|
3329
|
-
__name(array_default, "default");
|
|
3330
|
-
//#endregion
|
|
3331
|
-
//#region ../../node_modules/.pnpm/d3-shape@3.2.0/node_modules/d3-shape/src/curve/linear.js
|
|
3332
|
-
function Linear(context) {
|
|
3333
|
-
this._context = context;
|
|
3334
|
-
}
|
|
3335
|
-
Linear.prototype = {
|
|
3336
|
-
areaStart: function() {
|
|
3337
|
-
this._line = 0;
|
|
3338
|
-
},
|
|
3339
|
-
areaEnd: function() {
|
|
3340
|
-
this._line = NaN;
|
|
3341
|
-
},
|
|
3342
|
-
lineStart: function() {
|
|
3343
|
-
this._point = 0;
|
|
3344
|
-
},
|
|
3345
|
-
lineEnd: function() {
|
|
3346
|
-
if (this._line || this._line !== 0 && this._point === 1) this._context.closePath();
|
|
3347
|
-
this._line = 1 - this._line;
|
|
3348
|
-
},
|
|
3349
|
-
point: function(x, y) {
|
|
3350
|
-
x = +x, y = +y;
|
|
3351
|
-
switch (this._point) {
|
|
3352
|
-
case 0:
|
|
3353
|
-
this._point = 1;
|
|
3354
|
-
this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y);
|
|
3355
|
-
break;
|
|
3356
|
-
case 1: this._point = 2;
|
|
3357
|
-
default: this._context.lineTo(x, y);
|
|
3358
|
-
}
|
|
3359
|
-
}
|
|
3360
|
-
};
|
|
3361
|
-
function linear_default(context) {
|
|
3362
|
-
return new Linear(context);
|
|
3363
|
-
}
|
|
3364
|
-
__name(linear_default, "default");
|
|
3365
|
-
//#endregion
|
|
3366
|
-
//#region ../../node_modules/.pnpm/d3-shape@3.2.0/node_modules/d3-shape/src/point.js
|
|
3367
|
-
function x$2(p) {
|
|
3368
|
-
return p[0];
|
|
3369
|
-
}
|
|
3370
|
-
__name(x$2, "x");
|
|
3371
|
-
function y$2(p) {
|
|
3372
|
-
return p[1];
|
|
3373
|
-
}
|
|
3374
|
-
__name(y$2, "y");
|
|
3375
|
-
//#endregion
|
|
3376
|
-
//#region ../../node_modules/.pnpm/d3-shape@3.2.0/node_modules/d3-shape/src/line.js
|
|
3377
|
-
function line_default(x, y) {
|
|
3378
|
-
var defined = constant_default$1(true);
|
|
3379
|
-
var context = null;
|
|
3380
|
-
var curve = linear_default;
|
|
3381
|
-
var output = null;
|
|
3382
|
-
var path = withPath(line);
|
|
3383
|
-
x = typeof x === "function" ? x : x === void 0 ? x$2 : constant_default$1(x);
|
|
3384
|
-
y = typeof y === "function" ? y : y === void 0 ? y$2 : constant_default$1(y);
|
|
3385
|
-
function line(data) {
|
|
3386
|
-
var i;
|
|
3387
|
-
var n = (data = array_default(data)).length;
|
|
3388
|
-
var d;
|
|
3389
|
-
var defined0 = false;
|
|
3390
|
-
var buffer;
|
|
3391
|
-
if (context == null) output = curve(buffer = path());
|
|
3392
|
-
for (i = 0; i <= n; ++i) {
|
|
3393
|
-
if (!(i < n && defined(d = data[i], i, data)) === defined0) {
|
|
3394
|
-
if (defined0 = !defined0) output.lineStart();
|
|
3395
|
-
else output.lineEnd();
|
|
3396
|
-
}
|
|
3397
|
-
if (defined0) output.point(+x(d, i, data), +y(d, i, data));
|
|
3398
|
-
}
|
|
3399
|
-
if (buffer) return output = null, buffer + "" || null;
|
|
3400
|
-
}
|
|
3401
|
-
line.x = function(_) {
|
|
3402
|
-
return arguments.length ? (x = typeof _ === "function" ? _ : constant_default$1(+_), line) : x;
|
|
3403
|
-
};
|
|
3404
|
-
line.y = function(_) {
|
|
3405
|
-
return arguments.length ? (y = typeof _ === "function" ? _ : constant_default$1(+_), line) : y;
|
|
3406
|
-
};
|
|
3407
|
-
line.defined = function(_) {
|
|
3408
|
-
return arguments.length ? (defined = typeof _ === "function" ? _ : constant_default$1(!!_), line) : defined;
|
|
3409
|
-
};
|
|
3410
|
-
line.curve = function(_) {
|
|
3411
|
-
return arguments.length ? (curve = _, context != null && (output = curve(context)), line) : curve;
|
|
3412
|
-
};
|
|
3413
|
-
line.context = function(_) {
|
|
3414
|
-
return arguments.length ? (_ == null ? context = output = null : output = curve(context = _), line) : context;
|
|
3415
|
-
};
|
|
3416
|
-
return line;
|
|
3417
|
-
}
|
|
3418
|
-
__name(line_default, "default");
|
|
3419
|
-
//#endregion
|
|
3420
|
-
//#region ../../node_modules/.pnpm/d3-shape@3.2.0/node_modules/d3-shape/src/curve/cardinal.js
|
|
3421
|
-
function point$1(that, x, y) {
|
|
3422
|
-
that._context.bezierCurveTo(that._x1 + that._k * (that._x2 - that._x0), that._y1 + that._k * (that._y2 - that._y0), that._x2 + that._k * (that._x1 - x), that._y2 + that._k * (that._y1 - y), that._x2, that._y2);
|
|
3423
|
-
}
|
|
3424
|
-
__name(point$1, "point");
|
|
3425
|
-
function Cardinal(context, tension) {
|
|
3426
|
-
this._context = context;
|
|
3427
|
-
this._k = (1 - tension) / 6;
|
|
3428
|
-
}
|
|
3429
|
-
Cardinal.prototype = {
|
|
3430
|
-
areaStart: function() {
|
|
3431
|
-
this._line = 0;
|
|
3432
|
-
},
|
|
3433
|
-
areaEnd: function() {
|
|
3434
|
-
this._line = NaN;
|
|
3435
|
-
},
|
|
3436
|
-
lineStart: function() {
|
|
3437
|
-
this._x0 = this._x1 = this._x2 = this._y0 = this._y1 = this._y2 = NaN;
|
|
3438
|
-
this._point = 0;
|
|
3439
|
-
},
|
|
3440
|
-
lineEnd: function() {
|
|
3441
|
-
switch (this._point) {
|
|
3442
|
-
case 2:
|
|
3443
|
-
this._context.lineTo(this._x2, this._y2);
|
|
3444
|
-
break;
|
|
3445
|
-
case 3: point$1(this, this._x1, this._y1);
|
|
3446
|
-
}
|
|
3447
|
-
if (this._line || this._line !== 0 && this._point === 1) this._context.closePath();
|
|
3448
|
-
this._line = 1 - this._line;
|
|
3449
|
-
},
|
|
3450
|
-
point: function(x, y) {
|
|
3451
|
-
x = +x, y = +y;
|
|
3452
|
-
switch (this._point) {
|
|
3453
|
-
case 0:
|
|
3454
|
-
this._point = 1;
|
|
3455
|
-
this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y);
|
|
3456
|
-
break;
|
|
3457
|
-
case 1:
|
|
3458
|
-
this._point = 2;
|
|
3459
|
-
this._x1 = x, this._y1 = y;
|
|
3460
|
-
break;
|
|
3461
|
-
case 2: this._point = 3;
|
|
3462
|
-
default: point$1(this, x, y);
|
|
3463
|
-
}
|
|
3464
|
-
this._x0 = this._x1, this._x1 = this._x2, this._x2 = x;
|
|
3465
|
-
this._y0 = this._y1, this._y1 = this._y2, this._y2 = y;
|
|
3466
|
-
}
|
|
3467
|
-
};
|
|
3468
|
-
(function custom(tension) {
|
|
3469
|
-
function cardinal(context) {
|
|
3470
|
-
return new Cardinal(context, tension);
|
|
3471
|
-
}
|
|
3472
|
-
cardinal.tension = function(tension) {
|
|
3473
|
-
return custom(+tension);
|
|
3474
|
-
};
|
|
3475
|
-
return cardinal;
|
|
3476
|
-
})(0);
|
|
3477
|
-
//#endregion
|
|
3478
|
-
//#region ../../node_modules/.pnpm/d3-shape@3.2.0/node_modules/d3-shape/src/curve/cardinalOpen.js
|
|
3479
|
-
function CardinalOpen(context, tension) {
|
|
3480
|
-
this._context = context;
|
|
3481
|
-
this._k = (1 - tension) / 6;
|
|
3482
|
-
}
|
|
3483
|
-
CardinalOpen.prototype = {
|
|
3484
|
-
areaStart: function() {
|
|
3485
|
-
this._line = 0;
|
|
3486
|
-
},
|
|
3487
|
-
areaEnd: function() {
|
|
3488
|
-
this._line = NaN;
|
|
3489
|
-
},
|
|
3490
|
-
lineStart: function() {
|
|
3491
|
-
this._x0 = this._x1 = this._x2 = this._y0 = this._y1 = this._y2 = NaN;
|
|
3492
|
-
this._point = 0;
|
|
3493
|
-
},
|
|
3494
|
-
lineEnd: function() {
|
|
3495
|
-
if (this._line || this._line !== 0 && this._point === 3) this._context.closePath();
|
|
3496
|
-
this._line = 1 - this._line;
|
|
3497
|
-
},
|
|
3498
|
-
point: function(x, y) {
|
|
3499
|
-
x = +x, y = +y;
|
|
3500
|
-
switch (this._point) {
|
|
3501
|
-
case 0:
|
|
3502
|
-
this._point = 1;
|
|
3503
|
-
break;
|
|
3504
|
-
case 1:
|
|
3505
|
-
this._point = 2;
|
|
3506
|
-
break;
|
|
3507
|
-
case 2:
|
|
3508
|
-
this._point = 3;
|
|
3509
|
-
this._line ? this._context.lineTo(this._x2, this._y2) : this._context.moveTo(this._x2, this._y2);
|
|
3510
|
-
break;
|
|
3511
|
-
case 3: this._point = 4;
|
|
3512
|
-
default: point$1(this, x, y);
|
|
3513
|
-
}
|
|
3514
|
-
this._x0 = this._x1, this._x1 = this._x2, this._x2 = x;
|
|
3515
|
-
this._y0 = this._y1, this._y1 = this._y2, this._y2 = y;
|
|
3516
|
-
}
|
|
3517
|
-
};
|
|
3518
|
-
(function custom(tension) {
|
|
3519
|
-
function cardinal(context) {
|
|
3520
|
-
return new CardinalOpen(context, tension);
|
|
3521
|
-
}
|
|
3522
|
-
cardinal.tension = function(tension) {
|
|
3523
|
-
return custom(+tension);
|
|
3524
|
-
};
|
|
3525
|
-
return cardinal;
|
|
3526
|
-
})(0);
|
|
3527
|
-
//#endregion
|
|
3528
|
-
//#region ../../node_modules/.pnpm/d3-shape@3.2.0/node_modules/d3-shape/src/curve/catmullRom.js
|
|
3529
|
-
function point(that, x, y) {
|
|
3530
|
-
var x1 = that._x1;
|
|
3531
|
-
var y1 = that._y1;
|
|
3532
|
-
var x2 = that._x2;
|
|
3533
|
-
var y2 = that._y2;
|
|
3534
|
-
if (that._l01_a > 1e-12) {
|
|
3535
|
-
var a = 2 * that._l01_2a + 3 * that._l01_a * that._l12_a + that._l12_2a;
|
|
3536
|
-
var n = 3 * that._l01_a * (that._l01_a + that._l12_a);
|
|
3537
|
-
x1 = (x1 * a - that._x0 * that._l12_2a + that._x2 * that._l01_2a) / n;
|
|
3538
|
-
y1 = (y1 * a - that._y0 * that._l12_2a + that._y2 * that._l01_2a) / n;
|
|
3539
|
-
}
|
|
3540
|
-
if (that._l23_a > 1e-12) {
|
|
3541
|
-
var b = 2 * that._l23_2a + 3 * that._l23_a * that._l12_a + that._l12_2a;
|
|
3542
|
-
var m = 3 * that._l23_a * (that._l23_a + that._l12_a);
|
|
3543
|
-
x2 = (x2 * b + that._x1 * that._l23_2a - x * that._l12_2a) / m;
|
|
3544
|
-
y2 = (y2 * b + that._y1 * that._l23_2a - y * that._l12_2a) / m;
|
|
3545
|
-
}
|
|
3546
|
-
that._context.bezierCurveTo(x1, y1, x2, y2, that._x2, that._y2);
|
|
3547
|
-
}
|
|
3548
|
-
function CatmullRom(context, alpha) {
|
|
3549
|
-
this._context = context;
|
|
3550
|
-
this._alpha = alpha;
|
|
3551
|
-
}
|
|
3552
|
-
CatmullRom.prototype = {
|
|
3553
|
-
areaStart: function() {
|
|
3554
|
-
this._line = 0;
|
|
3555
|
-
},
|
|
3556
|
-
areaEnd: function() {
|
|
3557
|
-
this._line = NaN;
|
|
3558
|
-
},
|
|
3559
|
-
lineStart: function() {
|
|
3560
|
-
this._x0 = this._x1 = this._x2 = this._y0 = this._y1 = this._y2 = NaN;
|
|
3561
|
-
this._l01_a = this._l12_a = this._l23_a = this._l01_2a = this._l12_2a = this._l23_2a = this._point = 0;
|
|
3562
|
-
},
|
|
3563
|
-
lineEnd: function() {
|
|
3564
|
-
switch (this._point) {
|
|
3565
|
-
case 2:
|
|
3566
|
-
this._context.lineTo(this._x2, this._y2);
|
|
3567
|
-
break;
|
|
3568
|
-
case 3: this.point(this._x2, this._y2);
|
|
3569
|
-
}
|
|
3570
|
-
if (this._line || this._line !== 0 && this._point === 1) this._context.closePath();
|
|
3571
|
-
this._line = 1 - this._line;
|
|
3572
|
-
},
|
|
3573
|
-
point: function(x, y) {
|
|
3574
|
-
x = +x, y = +y;
|
|
3575
|
-
if (this._point) {
|
|
3576
|
-
var x23 = this._x2 - x;
|
|
3577
|
-
var y23 = this._y2 - y;
|
|
3578
|
-
this._l23_a = Math.sqrt(this._l23_2a = Math.pow(x23 * x23 + y23 * y23, this._alpha));
|
|
3579
|
-
}
|
|
3580
|
-
switch (this._point) {
|
|
3581
|
-
case 0:
|
|
3582
|
-
this._point = 1;
|
|
3583
|
-
this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y);
|
|
3584
|
-
break;
|
|
3585
|
-
case 1:
|
|
3586
|
-
this._point = 2;
|
|
3587
|
-
break;
|
|
3588
|
-
case 2: this._point = 3;
|
|
3589
|
-
default: point(this, x, y);
|
|
3590
|
-
}
|
|
3591
|
-
this._l01_a = this._l12_a, this._l12_a = this._l23_a;
|
|
3592
|
-
this._l01_2a = this._l12_2a, this._l12_2a = this._l23_2a;
|
|
3593
|
-
this._x0 = this._x1, this._x1 = this._x2, this._x2 = x;
|
|
3594
|
-
this._y0 = this._y1, this._y1 = this._y2, this._y2 = y;
|
|
3595
|
-
}
|
|
3596
|
-
};
|
|
3597
|
-
(function custom(alpha) {
|
|
3598
|
-
function catmullRom(context) {
|
|
3599
|
-
return alpha ? new CatmullRom(context, alpha) : new Cardinal(context, 0);
|
|
3600
|
-
}
|
|
3601
|
-
catmullRom.alpha = function(alpha) {
|
|
3602
|
-
return custom(+alpha);
|
|
3603
|
-
};
|
|
3604
|
-
return catmullRom;
|
|
3605
|
-
})(.5);
|
|
3606
|
-
//#endregion
|
|
3607
|
-
//#region ../../node_modules/.pnpm/d3-shape@3.2.0/node_modules/d3-shape/src/curve/catmullRomOpen.js
|
|
3608
|
-
function CatmullRomOpen(context, alpha) {
|
|
3609
|
-
this._context = context;
|
|
3610
|
-
this._alpha = alpha;
|
|
3611
|
-
}
|
|
3612
|
-
CatmullRomOpen.prototype = {
|
|
3613
|
-
areaStart: function() {
|
|
3614
|
-
this._line = 0;
|
|
3615
|
-
},
|
|
3616
|
-
areaEnd: function() {
|
|
3617
|
-
this._line = NaN;
|
|
3618
|
-
},
|
|
3619
|
-
lineStart: function() {
|
|
3620
|
-
this._x0 = this._x1 = this._x2 = this._y0 = this._y1 = this._y2 = NaN;
|
|
3621
|
-
this._l01_a = this._l12_a = this._l23_a = this._l01_2a = this._l12_2a = this._l23_2a = this._point = 0;
|
|
3622
|
-
},
|
|
3623
|
-
lineEnd: function() {
|
|
3624
|
-
if (this._line || this._line !== 0 && this._point === 3) this._context.closePath();
|
|
3625
|
-
this._line = 1 - this._line;
|
|
3626
|
-
},
|
|
3627
|
-
point: function(x, y) {
|
|
3628
|
-
x = +x, y = +y;
|
|
3629
|
-
if (this._point) {
|
|
3630
|
-
var x23 = this._x2 - x;
|
|
3631
|
-
var y23 = this._y2 - y;
|
|
3632
|
-
this._l23_a = Math.sqrt(this._l23_2a = Math.pow(x23 * x23 + y23 * y23, this._alpha));
|
|
3633
|
-
}
|
|
3634
|
-
switch (this._point) {
|
|
3635
|
-
case 0:
|
|
3636
|
-
this._point = 1;
|
|
3637
|
-
break;
|
|
3638
|
-
case 1:
|
|
3639
|
-
this._point = 2;
|
|
3640
|
-
break;
|
|
3641
|
-
case 2:
|
|
3642
|
-
this._point = 3;
|
|
3643
|
-
this._line ? this._context.lineTo(this._x2, this._y2) : this._context.moveTo(this._x2, this._y2);
|
|
3644
|
-
break;
|
|
3645
|
-
case 3: this._point = 4;
|
|
3646
|
-
default: point(this, x, y);
|
|
3647
|
-
}
|
|
3648
|
-
this._l01_a = this._l12_a, this._l12_a = this._l23_a;
|
|
3649
|
-
this._l01_2a = this._l12_2a, this._l12_2a = this._l23_2a;
|
|
3650
|
-
this._x0 = this._x1, this._x1 = this._x2, this._x2 = x;
|
|
3651
|
-
this._y0 = this._y1, this._y1 = this._y2, this._y2 = y;
|
|
3652
|
-
}
|
|
3653
|
-
};
|
|
3654
|
-
var catmullRomOpen_default = (function custom(alpha) {
|
|
3655
|
-
function catmullRom(context) {
|
|
3656
|
-
return alpha ? new CatmullRomOpen(context, alpha) : new CardinalOpen(context, 0);
|
|
3657
|
-
}
|
|
3658
|
-
catmullRom.alpha = function(alpha) {
|
|
3659
|
-
return custom(+alpha);
|
|
3660
|
-
};
|
|
3661
|
-
return catmullRom;
|
|
3662
|
-
})(.5);
|
|
3663
|
-
//#endregion
|
|
3664
|
-
//#region ../../node_modules/.pnpm/d3-quadtree@3.0.1/node_modules/d3-quadtree/src/add.js
|
|
3665
|
-
function add_default(d) {
|
|
3666
|
-
const x = +this._x.call(null, d);
|
|
3667
|
-
const y = +this._y.call(null, d);
|
|
3668
|
-
return add(this.cover(x, y), x, y, d);
|
|
3669
|
-
}
|
|
3670
|
-
__name(add_default, "default");
|
|
3671
|
-
function add(tree, x, y, d) {
|
|
3672
|
-
if (isNaN(x) || isNaN(y)) return tree;
|
|
3673
|
-
var parent;
|
|
3674
|
-
var node = tree._root;
|
|
3675
|
-
var leaf = { data: d };
|
|
3676
|
-
var x0 = tree._x0;
|
|
3677
|
-
var y0 = tree._y0;
|
|
3678
|
-
var x1 = tree._x1;
|
|
3679
|
-
var y1 = tree._y1;
|
|
3680
|
-
var xm;
|
|
3681
|
-
var ym;
|
|
3682
|
-
var xp;
|
|
3683
|
-
var yp;
|
|
3684
|
-
var right;
|
|
3685
|
-
var bottom;
|
|
3686
|
-
var i;
|
|
3687
|
-
var j;
|
|
3688
|
-
if (!node) return tree._root = leaf, tree;
|
|
3689
|
-
while (node.length) {
|
|
3690
|
-
if (right = x >= (xm = (x0 + x1) / 2)) x0 = xm;
|
|
3691
|
-
else x1 = xm;
|
|
3692
|
-
if (bottom = y >= (ym = (y0 + y1) / 2)) y0 = ym;
|
|
3693
|
-
else y1 = ym;
|
|
3694
|
-
if (parent = node, !(node = node[i = bottom << 1 | right])) return parent[i] = leaf, tree;
|
|
3695
|
-
}
|
|
3696
|
-
xp = +tree._x.call(null, node.data);
|
|
3697
|
-
yp = +tree._y.call(null, node.data);
|
|
3698
|
-
if (x === xp && y === yp) return leaf.next = node, parent ? parent[i] = leaf : tree._root = leaf, tree;
|
|
3699
|
-
do {
|
|
3700
|
-
parent = parent ? parent[i] = new Array(4) : tree._root = new Array(4);
|
|
3701
|
-
if (right = x >= (xm = (x0 + x1) / 2)) x0 = xm;
|
|
3702
|
-
else x1 = xm;
|
|
3703
|
-
if (bottom = y >= (ym = (y0 + y1) / 2)) y0 = ym;
|
|
3704
|
-
else y1 = ym;
|
|
3705
|
-
} while ((i = bottom << 1 | right) === (j = (yp >= ym) << 1 | xp >= xm));
|
|
3706
|
-
return parent[j] = node, parent[i] = leaf, tree;
|
|
3707
|
-
}
|
|
3708
|
-
function addAll(data) {
|
|
3709
|
-
var d;
|
|
3710
|
-
var i;
|
|
3711
|
-
var n = data.length;
|
|
3712
|
-
var x;
|
|
3713
|
-
var y;
|
|
3714
|
-
var xz = new Array(n);
|
|
3715
|
-
var yz = new Array(n);
|
|
3716
|
-
var x0 = Infinity;
|
|
3717
|
-
var y0 = Infinity;
|
|
3718
|
-
var x1 = -Infinity;
|
|
3719
|
-
var y1 = -Infinity;
|
|
3720
|
-
for (i = 0; i < n; ++i) {
|
|
3721
|
-
if (isNaN(x = +this._x.call(null, d = data[i])) || isNaN(y = +this._y.call(null, d))) continue;
|
|
3722
|
-
xz[i] = x;
|
|
3723
|
-
yz[i] = y;
|
|
3724
|
-
if (x < x0) x0 = x;
|
|
3725
|
-
if (x > x1) x1 = x;
|
|
3726
|
-
if (y < y0) y0 = y;
|
|
3727
|
-
if (y > y1) y1 = y;
|
|
3728
|
-
}
|
|
3729
|
-
if (x0 > x1 || y0 > y1) return this;
|
|
3730
|
-
this.cover(x0, y0).cover(x1, y1);
|
|
3731
|
-
for (i = 0; i < n; ++i) add(this, xz[i], yz[i], data[i]);
|
|
3732
|
-
return this;
|
|
3733
|
-
}
|
|
3734
|
-
//#endregion
|
|
3735
|
-
//#region ../../node_modules/.pnpm/d3-quadtree@3.0.1/node_modules/d3-quadtree/src/cover.js
|
|
3736
|
-
function cover_default(x, y) {
|
|
3737
|
-
if (isNaN(x = +x) || isNaN(y = +y)) return this;
|
|
3738
|
-
var x0 = this._x0;
|
|
3739
|
-
var y0 = this._y0;
|
|
3740
|
-
var x1 = this._x1;
|
|
3741
|
-
var y1 = this._y1;
|
|
3742
|
-
if (isNaN(x0)) {
|
|
3743
|
-
x1 = (x0 = Math.floor(x)) + 1;
|
|
3744
|
-
y1 = (y0 = Math.floor(y)) + 1;
|
|
3745
|
-
} else {
|
|
3746
|
-
var z = x1 - x0 || 1;
|
|
3747
|
-
var node = this._root;
|
|
3748
|
-
var parent;
|
|
3749
|
-
var i;
|
|
3750
|
-
while (x0 > x || x >= x1 || y0 > y || y >= y1) {
|
|
3751
|
-
i = (y < y0) << 1 | x < x0;
|
|
3752
|
-
parent = new Array(4), parent[i] = node, node = parent, z *= 2;
|
|
3753
|
-
switch (i) {
|
|
3754
|
-
case 0:
|
|
3755
|
-
x1 = x0 + z, y1 = y0 + z;
|
|
3756
|
-
break;
|
|
3757
|
-
case 1:
|
|
3758
|
-
x0 = x1 - z, y1 = y0 + z;
|
|
3759
|
-
break;
|
|
3760
|
-
case 2:
|
|
3761
|
-
x1 = x0 + z, y0 = y1 - z;
|
|
3762
|
-
break;
|
|
3763
|
-
case 3: x0 = x1 - z, y0 = y1 - z;
|
|
3764
|
-
}
|
|
3765
|
-
}
|
|
3766
|
-
if (this._root && this._root.length) this._root = node;
|
|
3767
|
-
}
|
|
3768
|
-
this._x0 = x0;
|
|
3769
|
-
this._y0 = y0;
|
|
3770
|
-
this._x1 = x1;
|
|
3771
|
-
this._y1 = y1;
|
|
3772
|
-
return this;
|
|
3773
|
-
}
|
|
3774
|
-
__name(cover_default, "default");
|
|
3775
|
-
//#endregion
|
|
3776
|
-
//#region ../../node_modules/.pnpm/d3-quadtree@3.0.1/node_modules/d3-quadtree/src/data.js
|
|
3777
|
-
function data_default() {
|
|
3778
|
-
var data = [];
|
|
3779
|
-
this.visit(function(node) {
|
|
3780
|
-
if (!node.length) do
|
|
3781
|
-
data.push(node.data);
|
|
3782
|
-
while (node = node.next);
|
|
3783
|
-
});
|
|
3784
|
-
return data;
|
|
3785
|
-
}
|
|
3786
|
-
__name(data_default, "default");
|
|
3787
|
-
//#endregion
|
|
3788
|
-
//#region ../../node_modules/.pnpm/d3-quadtree@3.0.1/node_modules/d3-quadtree/src/extent.js
|
|
3789
|
-
function extent_default(_) {
|
|
3790
|
-
return arguments.length ? this.cover(+_[0][0], +_[0][1]).cover(+_[1][0], +_[1][1]) : isNaN(this._x0) ? void 0 : [[this._x0, this._y0], [this._x1, this._y1]];
|
|
3791
|
-
}
|
|
3792
|
-
__name(extent_default, "default");
|
|
3793
|
-
//#endregion
|
|
3794
|
-
//#region ../../node_modules/.pnpm/d3-quadtree@3.0.1/node_modules/d3-quadtree/src/quad.js
|
|
3795
|
-
function quad_default(node, x0, y0, x1, y1) {
|
|
3796
|
-
this.node = node;
|
|
3797
|
-
this.x0 = x0;
|
|
3798
|
-
this.y0 = y0;
|
|
3799
|
-
this.x1 = x1;
|
|
3800
|
-
this.y1 = y1;
|
|
3801
|
-
}
|
|
3802
|
-
__name(quad_default, "default");
|
|
3803
|
-
//#endregion
|
|
3804
|
-
//#region ../../node_modules/.pnpm/d3-quadtree@3.0.1/node_modules/d3-quadtree/src/find.js
|
|
3805
|
-
function find_default(x, y, radius) {
|
|
3806
|
-
var data;
|
|
3807
|
-
var x0 = this._x0;
|
|
3808
|
-
var y0 = this._y0;
|
|
3809
|
-
var x1;
|
|
3810
|
-
var y1;
|
|
3811
|
-
var x2;
|
|
3812
|
-
var y2;
|
|
3813
|
-
var x3 = this._x1;
|
|
3814
|
-
var y3 = this._y1;
|
|
3815
|
-
var quads = [];
|
|
3816
|
-
var node = this._root;
|
|
3817
|
-
var q;
|
|
3818
|
-
var i;
|
|
3819
|
-
if (node) quads.push(new quad_default(node, x0, y0, x3, y3));
|
|
3820
|
-
if (radius == null) radius = Infinity;
|
|
3821
|
-
else {
|
|
3822
|
-
x0 = x - radius, y0 = y - radius;
|
|
3823
|
-
x3 = x + radius, y3 = y + radius;
|
|
3824
|
-
radius *= radius;
|
|
3825
|
-
}
|
|
3826
|
-
while (q = quads.pop()) {
|
|
3827
|
-
if (!(node = q.node) || (x1 = q.x0) > x3 || (y1 = q.y0) > y3 || (x2 = q.x1) < x0 || (y2 = q.y1) < y0) continue;
|
|
3828
|
-
if (node.length) {
|
|
3829
|
-
var xm = (x1 + x2) / 2;
|
|
3830
|
-
var ym = (y1 + y2) / 2;
|
|
3831
|
-
quads.push(new quad_default(node[3], xm, ym, x2, y2), new quad_default(node[2], x1, ym, xm, y2), new quad_default(node[1], xm, y1, x2, ym), new quad_default(node[0], x1, y1, xm, ym));
|
|
3832
|
-
if (i = (y >= ym) << 1 | x >= xm) {
|
|
3833
|
-
q = quads[quads.length - 1];
|
|
3834
|
-
quads[quads.length - 1] = quads[quads.length - 1 - i];
|
|
3835
|
-
quads[quads.length - 1 - i] = q;
|
|
3836
|
-
}
|
|
3837
|
-
} else {
|
|
3838
|
-
var dx = x - +this._x.call(null, node.data);
|
|
3839
|
-
var dy = y - +this._y.call(null, node.data);
|
|
3840
|
-
var d2 = dx * dx + dy * dy;
|
|
3841
|
-
if (d2 < radius) {
|
|
3842
|
-
var d = Math.sqrt(radius = d2);
|
|
3843
|
-
x0 = x - d, y0 = y - d;
|
|
3844
|
-
x3 = x + d, y3 = y + d;
|
|
3845
|
-
data = node.data;
|
|
3846
|
-
}
|
|
3847
|
-
}
|
|
3848
|
-
}
|
|
3849
|
-
return data;
|
|
3850
|
-
}
|
|
3851
|
-
__name(find_default, "default");
|
|
3852
|
-
//#endregion
|
|
3853
|
-
//#region ../../node_modules/.pnpm/d3-quadtree@3.0.1/node_modules/d3-quadtree/src/remove.js
|
|
3854
|
-
function remove_default(d) {
|
|
3855
|
-
if (isNaN(x = +this._x.call(null, d)) || isNaN(y = +this._y.call(null, d))) return this;
|
|
3856
|
-
var parent;
|
|
3857
|
-
var node = this._root;
|
|
3858
|
-
var retainer;
|
|
3859
|
-
var previous;
|
|
3860
|
-
var next;
|
|
3861
|
-
var x0 = this._x0;
|
|
3862
|
-
var y0 = this._y0;
|
|
3863
|
-
var x1 = this._x1;
|
|
3864
|
-
var y1 = this._y1;
|
|
3865
|
-
var x;
|
|
3866
|
-
var y;
|
|
3867
|
-
var xm;
|
|
3868
|
-
var ym;
|
|
3869
|
-
var right;
|
|
3870
|
-
var bottom;
|
|
3871
|
-
var i;
|
|
3872
|
-
var j;
|
|
3873
|
-
if (!node) return this;
|
|
3874
|
-
if (node.length) while (true) {
|
|
3875
|
-
if (right = x >= (xm = (x0 + x1) / 2)) x0 = xm;
|
|
3876
|
-
else x1 = xm;
|
|
3877
|
-
if (bottom = y >= (ym = (y0 + y1) / 2)) y0 = ym;
|
|
3878
|
-
else y1 = ym;
|
|
3879
|
-
if (!(parent = node, node = node[i = bottom << 1 | right])) return this;
|
|
3880
|
-
if (!node.length) break;
|
|
3881
|
-
if (parent[i + 1 & 3] || parent[i + 2 & 3] || parent[i + 3 & 3]) retainer = parent, j = i;
|
|
3882
|
-
}
|
|
3883
|
-
while (node.data !== d) if (!(previous = node, node = node.next)) return this;
|
|
3884
|
-
if (next = node.next) delete node.next;
|
|
3885
|
-
if (previous) return next ? previous.next = next : delete previous.next, this;
|
|
3886
|
-
if (!parent) return this._root = next, this;
|
|
3887
|
-
next ? parent[i] = next : delete parent[i];
|
|
3888
|
-
if ((node = parent[0] || parent[1] || parent[2] || parent[3]) && node === (parent[3] || parent[2] || parent[1] || parent[0]) && !node.length) {
|
|
3889
|
-
if (retainer) retainer[j] = node;
|
|
3890
|
-
else this._root = node;
|
|
3891
|
-
}
|
|
3892
|
-
return this;
|
|
3893
|
-
}
|
|
3894
|
-
__name(remove_default, "default");
|
|
3895
|
-
function removeAll(data) {
|
|
3896
|
-
for (var i = 0, n = data.length; i < n; ++i) this.remove(data[i]);
|
|
3897
|
-
return this;
|
|
3898
|
-
}
|
|
3899
|
-
//#endregion
|
|
3900
|
-
//#region ../../node_modules/.pnpm/d3-quadtree@3.0.1/node_modules/d3-quadtree/src/root.js
|
|
3901
|
-
function root_default() {
|
|
3902
|
-
return this._root;
|
|
3903
|
-
}
|
|
3904
|
-
__name(root_default, "default");
|
|
3905
|
-
//#endregion
|
|
3906
|
-
//#region ../../node_modules/.pnpm/d3-quadtree@3.0.1/node_modules/d3-quadtree/src/size.js
|
|
3907
|
-
function size_default() {
|
|
3908
|
-
var size = 0;
|
|
3909
|
-
this.visit(function(node) {
|
|
3910
|
-
if (!node.length) do
|
|
3911
|
-
++size;
|
|
3912
|
-
while (node = node.next);
|
|
3913
|
-
});
|
|
3914
|
-
return size;
|
|
3915
|
-
}
|
|
3916
|
-
__name(size_default, "default");
|
|
3917
|
-
//#endregion
|
|
3918
|
-
//#region ../../node_modules/.pnpm/d3-quadtree@3.0.1/node_modules/d3-quadtree/src/visit.js
|
|
3919
|
-
function visit_default(callback) {
|
|
3920
|
-
var quads = [];
|
|
3921
|
-
var q;
|
|
3922
|
-
var node = this._root;
|
|
3923
|
-
var child;
|
|
3924
|
-
var x0;
|
|
3925
|
-
var y0;
|
|
3926
|
-
var x1;
|
|
3927
|
-
var y1;
|
|
3928
|
-
if (node) quads.push(new quad_default(node, this._x0, this._y0, this._x1, this._y1));
|
|
3929
|
-
while (q = quads.pop()) if (!callback(node = q.node, x0 = q.x0, y0 = q.y0, x1 = q.x1, y1 = q.y1) && node.length) {
|
|
3930
|
-
var xm = (x0 + x1) / 2;
|
|
3931
|
-
var ym = (y0 + y1) / 2;
|
|
3932
|
-
if (child = node[3]) quads.push(new quad_default(child, xm, ym, x1, y1));
|
|
3933
|
-
if (child = node[2]) quads.push(new quad_default(child, x0, ym, xm, y1));
|
|
3934
|
-
if (child = node[1]) quads.push(new quad_default(child, xm, y0, x1, ym));
|
|
3935
|
-
if (child = node[0]) quads.push(new quad_default(child, x0, y0, xm, ym));
|
|
3936
|
-
}
|
|
3937
|
-
return this;
|
|
3938
|
-
}
|
|
3939
|
-
__name(visit_default, "default");
|
|
3940
|
-
//#endregion
|
|
3941
|
-
//#region ../../node_modules/.pnpm/d3-quadtree@3.0.1/node_modules/d3-quadtree/src/visitAfter.js
|
|
3942
|
-
function visitAfter_default(callback) {
|
|
3943
|
-
var quads = [];
|
|
3944
|
-
var next = [];
|
|
3945
|
-
var q;
|
|
3946
|
-
if (this._root) quads.push(new quad_default(this._root, this._x0, this._y0, this._x1, this._y1));
|
|
3947
|
-
while (q = quads.pop()) {
|
|
3948
|
-
var node = q.node;
|
|
3949
|
-
if (node.length) {
|
|
3950
|
-
var child;
|
|
3951
|
-
var x0 = q.x0;
|
|
3952
|
-
var y0 = q.y0;
|
|
3953
|
-
var x1 = q.x1;
|
|
3954
|
-
var y1 = q.y1;
|
|
3955
|
-
var xm = (x0 + x1) / 2;
|
|
3956
|
-
var ym = (y0 + y1) / 2;
|
|
3957
|
-
if (child = node[0]) quads.push(new quad_default(child, x0, y0, xm, ym));
|
|
3958
|
-
if (child = node[1]) quads.push(new quad_default(child, xm, y0, x1, ym));
|
|
3959
|
-
if (child = node[2]) quads.push(new quad_default(child, x0, ym, xm, y1));
|
|
3960
|
-
if (child = node[3]) quads.push(new quad_default(child, xm, ym, x1, y1));
|
|
3961
|
-
}
|
|
3962
|
-
next.push(q);
|
|
3963
|
-
}
|
|
3964
|
-
while (q = next.pop()) callback(q.node, q.x0, q.y0, q.x1, q.y1);
|
|
3965
|
-
return this;
|
|
3966
|
-
}
|
|
3967
|
-
__name(visitAfter_default, "default");
|
|
3968
|
-
//#endregion
|
|
3969
|
-
//#region ../../node_modules/.pnpm/d3-quadtree@3.0.1/node_modules/d3-quadtree/src/x.js
|
|
3970
|
-
function defaultX(d) {
|
|
3971
|
-
return d[0];
|
|
3972
|
-
}
|
|
3973
|
-
function x_default$1(_) {
|
|
3974
|
-
return arguments.length ? (this._x = _, this) : this._x;
|
|
3975
|
-
}
|
|
3976
|
-
__name(x_default$1, "default");
|
|
3977
|
-
//#endregion
|
|
3978
|
-
//#region ../../node_modules/.pnpm/d3-quadtree@3.0.1/node_modules/d3-quadtree/src/y.js
|
|
3979
|
-
function defaultY(d) {
|
|
3980
|
-
return d[1];
|
|
3981
|
-
}
|
|
3982
|
-
function y_default$1(_) {
|
|
3983
|
-
return arguments.length ? (this._y = _, this) : this._y;
|
|
3984
|
-
}
|
|
3985
|
-
__name(y_default$1, "default");
|
|
3986
|
-
//#endregion
|
|
3987
|
-
//#region ../../node_modules/.pnpm/d3-quadtree@3.0.1/node_modules/d3-quadtree/src/quadtree.js
|
|
3988
|
-
function quadtree(nodes, x, y) {
|
|
3989
|
-
var tree = new Quadtree(x == null ? defaultX : x, y == null ? defaultY : y, NaN, NaN, NaN, NaN);
|
|
3990
|
-
return nodes == null ? tree : tree.addAll(nodes);
|
|
3991
|
-
}
|
|
3992
|
-
function Quadtree(x, y, x0, y0, x1, y1) {
|
|
3993
|
-
this._x = x;
|
|
3994
|
-
this._y = y;
|
|
3995
|
-
this._x0 = x0;
|
|
3996
|
-
this._y0 = y0;
|
|
3997
|
-
this._x1 = x1;
|
|
3998
|
-
this._y1 = y1;
|
|
3999
|
-
this._root = void 0;
|
|
4000
|
-
}
|
|
4001
|
-
function leaf_copy(leaf) {
|
|
4002
|
-
var copy = { data: leaf.data };
|
|
4003
|
-
var next = copy;
|
|
4004
|
-
while (leaf = leaf.next) next = next.next = { data: leaf.data };
|
|
4005
|
-
return copy;
|
|
4006
|
-
}
|
|
4007
|
-
var treeProto = quadtree.prototype = Quadtree.prototype;
|
|
4008
|
-
treeProto.copy = function() {
|
|
4009
|
-
var copy = new Quadtree(this._x, this._y, this._x0, this._y0, this._x1, this._y1);
|
|
4010
|
-
var node = this._root;
|
|
4011
|
-
var nodes;
|
|
4012
|
-
var child;
|
|
4013
|
-
if (!node) return copy;
|
|
4014
|
-
if (!node.length) return copy._root = leaf_copy(node), copy;
|
|
4015
|
-
nodes = [{
|
|
4016
|
-
source: node,
|
|
4017
|
-
target: copy._root = new Array(4)
|
|
4018
|
-
}];
|
|
4019
|
-
while (node = nodes.pop()) for (var i = 0; i < 4; ++i) if (child = node.source[i]) {
|
|
4020
|
-
if (child.length) nodes.push({
|
|
4021
|
-
source: child,
|
|
4022
|
-
target: node.target[i] = new Array(4)
|
|
4023
|
-
});
|
|
4024
|
-
else node.target[i] = leaf_copy(child);
|
|
4025
|
-
}
|
|
4026
|
-
return copy;
|
|
4027
|
-
};
|
|
4028
|
-
treeProto.add = add_default;
|
|
4029
|
-
treeProto.addAll = addAll;
|
|
4030
|
-
treeProto.cover = cover_default;
|
|
4031
|
-
treeProto.data = data_default;
|
|
4032
|
-
treeProto.extent = extent_default;
|
|
4033
|
-
treeProto.find = find_default;
|
|
4034
|
-
treeProto.remove = remove_default;
|
|
4035
|
-
treeProto.removeAll = removeAll;
|
|
4036
|
-
treeProto.root = root_default;
|
|
4037
|
-
treeProto.size = size_default;
|
|
4038
|
-
treeProto.visit = visit_default;
|
|
4039
|
-
treeProto.visitAfter = visitAfter_default;
|
|
4040
|
-
treeProto.x = x_default$1;
|
|
4041
|
-
treeProto.y = y_default$1;
|
|
4042
|
-
//#endregion
|
|
4043
|
-
//#region ../../node_modules/.pnpm/d3-force@3.0.0/node_modules/d3-force/src/constant.js
|
|
4044
|
-
function constant_default(x) {
|
|
4045
|
-
return function() {
|
|
4046
|
-
return x;
|
|
4047
|
-
};
|
|
4048
|
-
}
|
|
4049
|
-
__name(constant_default, "default");
|
|
4050
|
-
//#endregion
|
|
4051
|
-
//#region ../../node_modules/.pnpm/d3-force@3.0.0/node_modules/d3-force/src/jiggle.js
|
|
4052
|
-
function jiggle_default(random) {
|
|
4053
|
-
return (random() - .5) * 1e-6;
|
|
4054
|
-
}
|
|
4055
|
-
__name(jiggle_default, "default");
|
|
4056
|
-
//#endregion
|
|
4057
|
-
//#region ../../node_modules/.pnpm/d3-force@3.0.0/node_modules/d3-force/src/collide.js
|
|
4058
|
-
function x$1(d) {
|
|
4059
|
-
return d.x + d.vx;
|
|
4060
|
-
}
|
|
4061
|
-
__name(x$1, "x");
|
|
4062
|
-
function y$1(d) {
|
|
4063
|
-
return d.y + d.vy;
|
|
4064
|
-
}
|
|
4065
|
-
__name(collide_default, "default");
|
|
4066
|
-
__name(y$1, "y");
|
|
4067
|
-
function collide_default(radius) {
|
|
4068
|
-
var nodes;
|
|
4069
|
-
var radii;
|
|
4070
|
-
var random;
|
|
4071
|
-
var strength = 1;
|
|
4072
|
-
var iterations = 1;
|
|
4073
|
-
if (typeof radius !== "function") radius = constant_default(radius == null ? 1 : +radius);
|
|
4074
|
-
function force() {
|
|
4075
|
-
var i;
|
|
4076
|
-
var n = nodes.length;
|
|
4077
|
-
var tree;
|
|
4078
|
-
var node;
|
|
4079
|
-
var xi;
|
|
4080
|
-
var yi;
|
|
4081
|
-
var ri;
|
|
4082
|
-
var ri2;
|
|
4083
|
-
for (var k = 0; k < iterations; ++k) {
|
|
4084
|
-
tree = quadtree(nodes, x$1, y$1).visitAfter(prepare);
|
|
4085
|
-
for (i = 0; i < n; ++i) {
|
|
4086
|
-
node = nodes[i];
|
|
4087
|
-
ri = radii[node.index], ri2 = ri * ri;
|
|
4088
|
-
xi = node.x + node.vx;
|
|
4089
|
-
yi = node.y + node.vy;
|
|
4090
|
-
tree.visit(apply);
|
|
4091
|
-
}
|
|
4092
|
-
}
|
|
4093
|
-
function apply(quad, x0, y0, x1, y1) {
|
|
4094
|
-
var data = quad.data;
|
|
4095
|
-
var rj = quad.r;
|
|
4096
|
-
var r = ri + rj;
|
|
4097
|
-
if (data) {
|
|
4098
|
-
if (data.index > node.index) {
|
|
4099
|
-
var x = xi - data.x - data.vx;
|
|
4100
|
-
var y = yi - data.y - data.vy;
|
|
4101
|
-
var l = x * x + y * y;
|
|
4102
|
-
if (l < r * r) {
|
|
4103
|
-
if (x === 0) x = jiggle_default(random), l += x * x;
|
|
4104
|
-
if (y === 0) y = jiggle_default(random), l += y * y;
|
|
4105
|
-
l = (r - (l = Math.sqrt(l))) / l * strength;
|
|
4106
|
-
node.vx += (x *= l) * (r = (rj *= rj) / (ri2 + rj));
|
|
4107
|
-
node.vy += (y *= l) * r;
|
|
4108
|
-
data.vx -= x * (r = 1 - r);
|
|
4109
|
-
data.vy -= y * r;
|
|
4110
|
-
}
|
|
4111
|
-
}
|
|
4112
|
-
return;
|
|
4113
|
-
}
|
|
4114
|
-
return x0 > xi + r || x1 < xi - r || y0 > yi + r || y1 < yi - r;
|
|
4115
|
-
}
|
|
4116
|
-
}
|
|
4117
|
-
function prepare(quad) {
|
|
4118
|
-
if (quad.data) return quad.r = radii[quad.data.index];
|
|
4119
|
-
for (var i = quad.r = 0; i < 4; ++i) if (quad[i] && quad[i].r > quad.r) quad.r = quad[i].r;
|
|
4120
|
-
}
|
|
4121
|
-
function initialize() {
|
|
4122
|
-
if (!nodes) return;
|
|
4123
|
-
var i;
|
|
4124
|
-
var n = nodes.length;
|
|
4125
|
-
var node;
|
|
4126
|
-
radii = new Array(n);
|
|
4127
|
-
for (i = 0; i < n; ++i) node = nodes[i], radii[node.index] = +radius(node, i, nodes);
|
|
4128
|
-
}
|
|
4129
|
-
force.initialize = function(_nodes, _random) {
|
|
4130
|
-
nodes = _nodes;
|
|
4131
|
-
random = _random;
|
|
4132
|
-
initialize();
|
|
4133
|
-
};
|
|
4134
|
-
force.iterations = function(_) {
|
|
4135
|
-
return arguments.length ? (iterations = +_, force) : iterations;
|
|
4136
|
-
};
|
|
4137
|
-
force.strength = function(_) {
|
|
4138
|
-
return arguments.length ? (strength = +_, force) : strength;
|
|
4139
|
-
};
|
|
4140
|
-
force.radius = function(_) {
|
|
4141
|
-
return arguments.length ? (radius = typeof _ === "function" ? _ : constant_default(+_), initialize(), force) : radius;
|
|
4142
|
-
};
|
|
4143
|
-
return force;
|
|
4144
|
-
}
|
|
4145
|
-
//#endregion
|
|
4146
|
-
//#region ../../node_modules/.pnpm/d3-force@3.0.0/node_modules/d3-force/src/link.js
|
|
4147
|
-
function index(d) {
|
|
4148
|
-
return d.index;
|
|
4149
|
-
}
|
|
4150
|
-
function find(nodeById, nodeId) {
|
|
4151
|
-
var node = nodeById.get(nodeId);
|
|
4152
|
-
if (!node) throw new Error("node not found: " + nodeId);
|
|
4153
|
-
return node;
|
|
4154
|
-
}
|
|
4155
|
-
function link_default(links) {
|
|
4156
|
-
var id = index;
|
|
4157
|
-
var strength = defaultStrength;
|
|
4158
|
-
var strengths;
|
|
4159
|
-
var distance = constant_default(30);
|
|
4160
|
-
var distances;
|
|
4161
|
-
var nodes;
|
|
4162
|
-
var count;
|
|
4163
|
-
var bias;
|
|
4164
|
-
var random;
|
|
4165
|
-
var iterations = 1;
|
|
4166
|
-
if (links == null) links = [];
|
|
4167
|
-
function defaultStrength(link) {
|
|
4168
|
-
return 1 / Math.min(count[link.source.index], count[link.target.index]);
|
|
4169
|
-
}
|
|
4170
|
-
function force(alpha) {
|
|
4171
|
-
for (var k = 0, n = links.length; k < iterations; ++k) for (var i = 0, link, source, target, x, y, l, b; i < n; ++i) {
|
|
4172
|
-
link = links[i], source = link.source, target = link.target;
|
|
4173
|
-
x = target.x + target.vx - source.x - source.vx || jiggle_default(random);
|
|
4174
|
-
y = target.y + target.vy - source.y - source.vy || jiggle_default(random);
|
|
4175
|
-
l = Math.sqrt(x * x + y * y);
|
|
4176
|
-
l = (l - distances[i]) / l * alpha * strengths[i];
|
|
4177
|
-
x *= l, y *= l;
|
|
4178
|
-
target.vx -= x * (b = bias[i]);
|
|
4179
|
-
target.vy -= y * b;
|
|
4180
|
-
source.vx += x * (b = 1 - b);
|
|
4181
|
-
source.vy += y * b;
|
|
4182
|
-
}
|
|
4183
|
-
}
|
|
4184
|
-
function initialize() {
|
|
4185
|
-
if (!nodes) return;
|
|
4186
|
-
var i;
|
|
4187
|
-
var n = nodes.length;
|
|
4188
|
-
var m = links.length;
|
|
4189
|
-
var nodeById = new Map(nodes.map((d, i) => [id(d, i, nodes), d]));
|
|
4190
|
-
var link;
|
|
4191
|
-
for (i = 0, count = new Array(n); i < m; ++i) {
|
|
4192
|
-
link = links[i], link.index = i;
|
|
4193
|
-
if (typeof link.source !== "object") link.source = find(nodeById, link.source);
|
|
4194
|
-
if (typeof link.target !== "object") link.target = find(nodeById, link.target);
|
|
4195
|
-
count[link.source.index] = (count[link.source.index] || 0) + 1;
|
|
4196
|
-
count[link.target.index] = (count[link.target.index] || 0) + 1;
|
|
4197
|
-
}
|
|
4198
|
-
for (i = 0, bias = new Array(m); i < m; ++i) link = links[i], bias[i] = count[link.source.index] / (count[link.source.index] + count[link.target.index]);
|
|
4199
|
-
strengths = new Array(m), initializeStrength();
|
|
4200
|
-
distances = new Array(m), initializeDistance();
|
|
4201
|
-
}
|
|
4202
|
-
function initializeStrength() {
|
|
4203
|
-
if (!nodes) return;
|
|
4204
|
-
for (var i = 0, n = links.length; i < n; ++i) strengths[i] = +strength(links[i], i, links);
|
|
4205
|
-
}
|
|
4206
|
-
function initializeDistance() {
|
|
4207
|
-
if (!nodes) return;
|
|
4208
|
-
for (var i = 0, n = links.length; i < n; ++i) distances[i] = +distance(links[i], i, links);
|
|
4209
|
-
}
|
|
4210
|
-
force.initialize = function(_nodes, _random) {
|
|
4211
|
-
nodes = _nodes;
|
|
4212
|
-
random = _random;
|
|
4213
|
-
initialize();
|
|
4214
|
-
};
|
|
4215
|
-
force.links = function(_) {
|
|
4216
|
-
return arguments.length ? (links = _, initialize(), force) : links;
|
|
4217
|
-
};
|
|
4218
|
-
force.id = function(_) {
|
|
4219
|
-
return arguments.length ? (id = _, force) : id;
|
|
4220
|
-
};
|
|
4221
|
-
force.iterations = function(_) {
|
|
4222
|
-
return arguments.length ? (iterations = +_, force) : iterations;
|
|
4223
|
-
};
|
|
4224
|
-
force.strength = function(_) {
|
|
4225
|
-
return arguments.length ? (strength = typeof _ === "function" ? _ : constant_default(+_), initializeStrength(), force) : strength;
|
|
4226
|
-
};
|
|
4227
|
-
force.distance = function(_) {
|
|
4228
|
-
return arguments.length ? (distance = typeof _ === "function" ? _ : constant_default(+_), initializeDistance(), force) : distance;
|
|
4229
|
-
};
|
|
4230
|
-
return force;
|
|
4231
|
-
}
|
|
4232
|
-
__name(link_default, "default");
|
|
4233
|
-
//#endregion
|
|
4234
|
-
//#region ../../node_modules/.pnpm/d3-force@3.0.0/node_modules/d3-force/src/lcg.js
|
|
4235
|
-
var a = 1664525;
|
|
4236
|
-
var c = 1013904223;
|
|
4237
|
-
var m = 4294967296;
|
|
4238
|
-
function lcg_default() {
|
|
4239
|
-
let s = 1;
|
|
4240
|
-
return () => (s = (a * s + c) % m) / m;
|
|
4241
|
-
}
|
|
4242
|
-
__name(lcg_default, "default");
|
|
4243
|
-
//#endregion
|
|
4244
|
-
//#region ../../node_modules/.pnpm/d3-force@3.0.0/node_modules/d3-force/src/simulation.js
|
|
4245
|
-
function x(d) {
|
|
4246
|
-
return d.x;
|
|
4247
|
-
}
|
|
4248
|
-
function y(d) {
|
|
4249
|
-
return d.y;
|
|
4250
|
-
}
|
|
4251
|
-
var initialRadius = 10;
|
|
4252
|
-
var initialAngle = Math.PI * (3 - Math.sqrt(5));
|
|
4253
|
-
function simulation_default(nodes) {
|
|
4254
|
-
var simulation;
|
|
4255
|
-
var alpha = 1;
|
|
4256
|
-
var alphaMin = .001;
|
|
4257
|
-
var alphaDecay = 1 - Math.pow(alphaMin, 1 / 300);
|
|
4258
|
-
var alphaTarget = 0;
|
|
4259
|
-
var velocityDecay = .6;
|
|
4260
|
-
var forces = /* @__PURE__ */ new Map();
|
|
4261
|
-
var stepper = timer(step);
|
|
4262
|
-
var event = dispatch("tick", "end");
|
|
4263
|
-
var random = lcg_default();
|
|
4264
|
-
if (nodes == null) nodes = [];
|
|
4265
|
-
function step() {
|
|
4266
|
-
tick();
|
|
4267
|
-
event.call("tick", simulation);
|
|
4268
|
-
if (alpha < alphaMin) {
|
|
4269
|
-
stepper.stop();
|
|
4270
|
-
event.call("end", simulation);
|
|
4271
|
-
}
|
|
4272
|
-
}
|
|
4273
|
-
function tick(iterations) {
|
|
4274
|
-
var i;
|
|
4275
|
-
var n = nodes.length;
|
|
4276
|
-
var node;
|
|
4277
|
-
if (iterations === void 0) iterations = 1;
|
|
4278
|
-
for (var k = 0; k < iterations; ++k) {
|
|
4279
|
-
alpha += (alphaTarget - alpha) * alphaDecay;
|
|
4280
|
-
forces.forEach(function(force) {
|
|
4281
|
-
force(alpha);
|
|
4282
|
-
});
|
|
4283
|
-
for (i = 0; i < n; ++i) {
|
|
4284
|
-
node = nodes[i];
|
|
4285
|
-
if (node.fx == null) node.x += node.vx *= velocityDecay;
|
|
4286
|
-
else node.x = node.fx, node.vx = 0;
|
|
4287
|
-
if (node.fy == null) node.y += node.vy *= velocityDecay;
|
|
4288
|
-
else node.y = node.fy, node.vy = 0;
|
|
4289
|
-
}
|
|
4290
|
-
}
|
|
4291
|
-
return simulation;
|
|
4292
|
-
}
|
|
4293
|
-
function initializeNodes() {
|
|
4294
|
-
for (var i = 0, n = nodes.length, node; i < n; ++i) {
|
|
4295
|
-
node = nodes[i], node.index = i;
|
|
4296
|
-
if (node.fx != null) node.x = node.fx;
|
|
4297
|
-
if (node.fy != null) node.y = node.fy;
|
|
4298
|
-
if (isNaN(node.x) || isNaN(node.y)) {
|
|
4299
|
-
var radius = initialRadius * Math.sqrt(.5 + i);
|
|
4300
|
-
var angle = i * initialAngle;
|
|
4301
|
-
node.x = radius * Math.cos(angle);
|
|
4302
|
-
node.y = radius * Math.sin(angle);
|
|
4303
|
-
}
|
|
4304
|
-
if (isNaN(node.vx) || isNaN(node.vy)) node.vx = node.vy = 0;
|
|
4305
|
-
}
|
|
4306
|
-
}
|
|
4307
|
-
function initializeForce(force) {
|
|
4308
|
-
if (force.initialize) force.initialize(nodes, random);
|
|
4309
|
-
return force;
|
|
4310
|
-
}
|
|
4311
|
-
initializeNodes();
|
|
4312
|
-
return simulation = {
|
|
4313
|
-
tick,
|
|
4314
|
-
restart: function() {
|
|
4315
|
-
return stepper.restart(step), simulation;
|
|
4316
|
-
},
|
|
4317
|
-
stop: function() {
|
|
4318
|
-
return stepper.stop(), simulation;
|
|
4319
|
-
},
|
|
4320
|
-
nodes: function(_) {
|
|
4321
|
-
return arguments.length ? (nodes = _, initializeNodes(), forces.forEach(initializeForce), simulation) : nodes;
|
|
4322
|
-
},
|
|
4323
|
-
alpha: function(_) {
|
|
4324
|
-
return arguments.length ? (alpha = +_, simulation) : alpha;
|
|
4325
|
-
},
|
|
4326
|
-
alphaMin: function(_) {
|
|
4327
|
-
return arguments.length ? (alphaMin = +_, simulation) : alphaMin;
|
|
4328
|
-
},
|
|
4329
|
-
alphaDecay: function(_) {
|
|
4330
|
-
return arguments.length ? (alphaDecay = +_, simulation) : +alphaDecay;
|
|
4331
|
-
},
|
|
4332
|
-
alphaTarget: function(_) {
|
|
4333
|
-
return arguments.length ? (alphaTarget = +_, simulation) : alphaTarget;
|
|
4334
|
-
},
|
|
4335
|
-
velocityDecay: function(_) {
|
|
4336
|
-
return arguments.length ? (velocityDecay = 1 - _, simulation) : 1 - velocityDecay;
|
|
4337
|
-
},
|
|
4338
|
-
randomSource: function(_) {
|
|
4339
|
-
return arguments.length ? (random = _, forces.forEach(initializeForce), simulation) : random;
|
|
4340
|
-
},
|
|
4341
|
-
force: function(name, _) {
|
|
4342
|
-
return arguments.length > 1 ? (_ == null ? forces.delete(name) : forces.set(name, initializeForce(_)), simulation) : forces.get(name);
|
|
4343
|
-
},
|
|
4344
|
-
find: function(x, y, radius) {
|
|
4345
|
-
var i = 0;
|
|
4346
|
-
var n = nodes.length;
|
|
4347
|
-
var dx;
|
|
4348
|
-
var dy;
|
|
4349
|
-
var d2;
|
|
4350
|
-
var node;
|
|
4351
|
-
var closest;
|
|
4352
|
-
if (radius == null) radius = Infinity;
|
|
4353
|
-
else radius *= radius;
|
|
4354
|
-
for (i = 0; i < n; ++i) {
|
|
4355
|
-
node = nodes[i];
|
|
4356
|
-
dx = x - node.x;
|
|
4357
|
-
dy = y - node.y;
|
|
4358
|
-
d2 = dx * dx + dy * dy;
|
|
4359
|
-
if (d2 < radius) closest = node, radius = d2;
|
|
4360
|
-
}
|
|
4361
|
-
return closest;
|
|
4362
|
-
},
|
|
4363
|
-
on: function(name, _) {
|
|
4364
|
-
return arguments.length > 1 ? (event.on(name, _), simulation) : event.on(name);
|
|
4365
|
-
}
|
|
4366
|
-
};
|
|
4367
|
-
}
|
|
4368
|
-
__name(simulation_default, "default");
|
|
4369
|
-
//#endregion
|
|
4370
|
-
//#region ../../node_modules/.pnpm/d3-force@3.0.0/node_modules/d3-force/src/manyBody.js
|
|
4371
|
-
function manyBody_default() {
|
|
4372
|
-
var nodes;
|
|
4373
|
-
var node;
|
|
4374
|
-
var random;
|
|
4375
|
-
var alpha;
|
|
4376
|
-
var strength = constant_default(-30);
|
|
4377
|
-
var strengths;
|
|
4378
|
-
var distanceMin2 = 1;
|
|
4379
|
-
var distanceMax2 = Infinity;
|
|
4380
|
-
var theta2 = .81;
|
|
4381
|
-
function force(_) {
|
|
4382
|
-
var i;
|
|
4383
|
-
var n = nodes.length;
|
|
4384
|
-
var tree = quadtree(nodes, x, y).visitAfter(accumulate);
|
|
4385
|
-
for (alpha = _, i = 0; i < n; ++i) node = nodes[i], tree.visit(apply);
|
|
4386
|
-
}
|
|
4387
|
-
function initialize() {
|
|
4388
|
-
if (!nodes) return;
|
|
4389
|
-
var i;
|
|
4390
|
-
var n = nodes.length;
|
|
4391
|
-
var node;
|
|
4392
|
-
strengths = new Array(n);
|
|
4393
|
-
for (i = 0; i < n; ++i) node = nodes[i], strengths[node.index] = +strength(node, i, nodes);
|
|
4394
|
-
}
|
|
4395
|
-
function accumulate(quad) {
|
|
4396
|
-
var strength = 0;
|
|
4397
|
-
var q;
|
|
4398
|
-
var c;
|
|
4399
|
-
var weight = 0;
|
|
4400
|
-
var x;
|
|
4401
|
-
var y;
|
|
4402
|
-
var i;
|
|
4403
|
-
if (quad.length) {
|
|
4404
|
-
for (x = y = i = 0; i < 4; ++i) if ((q = quad[i]) && (c = Math.abs(q.value))) strength += q.value, weight += c, x += c * q.x, y += c * q.y;
|
|
4405
|
-
quad.x = x / weight;
|
|
4406
|
-
quad.y = y / weight;
|
|
4407
|
-
} else {
|
|
4408
|
-
q = quad;
|
|
4409
|
-
q.x = q.data.x;
|
|
4410
|
-
q.y = q.data.y;
|
|
4411
|
-
do
|
|
4412
|
-
strength += strengths[q.data.index];
|
|
4413
|
-
while (q = q.next);
|
|
4414
|
-
}
|
|
4415
|
-
quad.value = strength;
|
|
4416
|
-
}
|
|
4417
|
-
function apply(quad, x1, _, x2) {
|
|
4418
|
-
if (!quad.value) return true;
|
|
4419
|
-
var x = quad.x - node.x;
|
|
4420
|
-
var y = quad.y - node.y;
|
|
4421
|
-
var w = x2 - x1;
|
|
4422
|
-
var l = x * x + y * y;
|
|
4423
|
-
if (w * w / theta2 < l) {
|
|
4424
|
-
if (l < distanceMax2) {
|
|
4425
|
-
if (x === 0) x = jiggle_default(random), l += x * x;
|
|
4426
|
-
if (y === 0) y = jiggle_default(random), l += y * y;
|
|
4427
|
-
if (l < distanceMin2) l = Math.sqrt(distanceMin2 * l);
|
|
4428
|
-
node.vx += x * quad.value * alpha / l;
|
|
4429
|
-
node.vy += y * quad.value * alpha / l;
|
|
4430
|
-
}
|
|
4431
|
-
return true;
|
|
4432
|
-
} else if (quad.length || l >= distanceMax2) return;
|
|
4433
|
-
if (quad.data !== node || quad.next) {
|
|
4434
|
-
if (x === 0) x = jiggle_default(random), l += x * x;
|
|
4435
|
-
if (y === 0) y = jiggle_default(random), l += y * y;
|
|
4436
|
-
if (l < distanceMin2) l = Math.sqrt(distanceMin2 * l);
|
|
4437
|
-
}
|
|
4438
|
-
do
|
|
4439
|
-
if (quad.data !== node) {
|
|
4440
|
-
w = strengths[quad.data.index] * alpha / l;
|
|
4441
|
-
node.vx += x * w;
|
|
4442
|
-
node.vy += y * w;
|
|
4443
|
-
}
|
|
4444
|
-
while (quad = quad.next);
|
|
4445
|
-
}
|
|
4446
|
-
force.initialize = function(_nodes, _random) {
|
|
4447
|
-
nodes = _nodes;
|
|
4448
|
-
random = _random;
|
|
4449
|
-
initialize();
|
|
4450
|
-
};
|
|
4451
|
-
force.strength = function(_) {
|
|
4452
|
-
return arguments.length ? (strength = typeof _ === "function" ? _ : constant_default(+_), initialize(), force) : strength;
|
|
4453
|
-
};
|
|
4454
|
-
force.distanceMin = function(_) {
|
|
4455
|
-
return arguments.length ? (distanceMin2 = _ * _, force) : Math.sqrt(distanceMin2);
|
|
4456
|
-
};
|
|
4457
|
-
force.distanceMax = function(_) {
|
|
4458
|
-
return arguments.length ? (distanceMax2 = _ * _, force) : Math.sqrt(distanceMax2);
|
|
4459
|
-
};
|
|
4460
|
-
force.theta = function(_) {
|
|
4461
|
-
return arguments.length ? (theta2 = _ * _, force) : Math.sqrt(theta2);
|
|
4462
|
-
};
|
|
4463
|
-
return force;
|
|
4464
|
-
}
|
|
4465
|
-
__name(manyBody_default, "default");
|
|
4466
|
-
//#endregion
|
|
4467
|
-
//#region ../../node_modules/.pnpm/d3-force@3.0.0/node_modules/d3-force/src/x.js
|
|
4468
|
-
function x_default(x) {
|
|
4469
|
-
var strength = constant_default(.1);
|
|
4470
|
-
var nodes;
|
|
4471
|
-
var strengths;
|
|
4472
|
-
var xz;
|
|
4473
|
-
if (typeof x !== "function") x = constant_default(x == null ? 0 : +x);
|
|
4474
|
-
function force(alpha) {
|
|
4475
|
-
for (var i = 0, n = nodes.length, node; i < n; ++i) node = nodes[i], node.vx += (xz[i] - node.x) * strengths[i] * alpha;
|
|
4476
|
-
}
|
|
4477
|
-
function initialize() {
|
|
4478
|
-
if (!nodes) return;
|
|
4479
|
-
var i;
|
|
4480
|
-
var n = nodes.length;
|
|
4481
|
-
strengths = new Array(n);
|
|
4482
|
-
xz = new Array(n);
|
|
4483
|
-
for (i = 0; i < n; ++i) strengths[i] = isNaN(xz[i] = +x(nodes[i], i, nodes)) ? 0 : +strength(nodes[i], i, nodes);
|
|
4484
|
-
}
|
|
4485
|
-
force.initialize = function(_) {
|
|
4486
|
-
nodes = _;
|
|
4487
|
-
initialize();
|
|
4488
|
-
};
|
|
4489
|
-
force.strength = function(_) {
|
|
4490
|
-
return arguments.length ? (strength = typeof _ === "function" ? _ : constant_default(+_), initialize(), force) : strength;
|
|
4491
|
-
};
|
|
4492
|
-
force.x = function(_) {
|
|
4493
|
-
return arguments.length ? (x = typeof _ === "function" ? _ : constant_default(+_), initialize(), force) : x;
|
|
4494
|
-
};
|
|
4495
|
-
return force;
|
|
4496
|
-
}
|
|
4497
|
-
__name(x_default, "default");
|
|
4498
|
-
//#endregion
|
|
4499
|
-
//#region ../../node_modules/.pnpm/d3-force@3.0.0/node_modules/d3-force/src/y.js
|
|
4500
|
-
function y_default(y) {
|
|
4501
|
-
var strength = constant_default(.1);
|
|
4502
|
-
var nodes;
|
|
4503
|
-
var strengths;
|
|
4504
|
-
var yz;
|
|
4505
|
-
if (typeof y !== "function") y = constant_default(y == null ? 0 : +y);
|
|
4506
|
-
function force(alpha) {
|
|
4507
|
-
for (var i = 0, n = nodes.length, node; i < n; ++i) node = nodes[i], node.vy += (yz[i] - node.y) * strengths[i] * alpha;
|
|
4508
|
-
}
|
|
4509
|
-
function initialize() {
|
|
4510
|
-
if (!nodes) return;
|
|
4511
|
-
var i;
|
|
4512
|
-
var n = nodes.length;
|
|
4513
|
-
strengths = new Array(n);
|
|
4514
|
-
yz = new Array(n);
|
|
4515
|
-
for (i = 0; i < n; ++i) strengths[i] = isNaN(yz[i] = +y(nodes[i], i, nodes)) ? 0 : +strength(nodes[i], i, nodes);
|
|
4516
|
-
}
|
|
4517
|
-
force.initialize = function(_) {
|
|
4518
|
-
nodes = _;
|
|
4519
|
-
initialize();
|
|
4520
|
-
};
|
|
4521
|
-
force.strength = function(_) {
|
|
4522
|
-
return arguments.length ? (strength = typeof _ === "function" ? _ : constant_default(+_), initialize(), force) : strength;
|
|
4523
|
-
};
|
|
4524
|
-
force.y = function(_) {
|
|
4525
|
-
return arguments.length ? (y = typeof _ === "function" ? _ : constant_default(+_), initialize(), force) : y;
|
|
4526
|
-
};
|
|
4527
|
-
return force;
|
|
4528
|
-
}
|
|
4529
|
-
__name(y_default, "default");
|
|
4530
|
-
//#endregion
|
|
4531
|
-
export { link_default as a, line_default as c, transform as d, zoom_default$1 as f, select_default$1 as g, pointer_default as h, simulation_default as i, zoom_default as l, drag_default as m, x_default as n, collide_default as o, value_default as p, manyBody_default as r, catmullRomOpen_default as s, y_default as t, identity as u };
|