@hpcc-js/react 3.4.0 → 3.4.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,1593 +1,42 @@
1
- import { HTMLWidget, Palette, SVGWidget, Utility } from "@hpcc-js/common";
2
-
3
- //#region rolldown:runtime
4
- var __defProp = Object.defineProperty;
5
- var __export = (all) => {
6
- let target = {};
7
- for (var name in all) __defProp(target, name, {
8
- get: all[name],
9
- enumerable: true
10
- });
11
- return target;
12
- };
13
-
14
- //#endregion
15
- //#region src/__package__.ts
16
- const PKG_NAME = "@hpcc-js/react";
17
- const PKG_VERSION = "3.4.0";
18
- const BUILD_VERSION = "3.15.0";
19
-
20
- //#endregion
21
- //#region ../../node_modules/preact/dist/preact.module.js
22
- var n, l, u$2, t$1, i$2, r$1, o$2, e$1, f$2, c$1, s$1, a$1, h$1, p$1 = {}, v$1 = [], y$1 = /acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i, w$1 = Array.isArray;
23
- function d$1(n$1, l$2) {
24
- for (var u$3 in l$2) n$1[u$3] = l$2[u$3];
25
- return n$1;
26
- }
27
- function g$1(n$1) {
28
- n$1 && n$1.parentNode && n$1.parentNode.removeChild(n$1);
29
- }
30
- function _(l$2, u$3, t$2) {
31
- var i$3, r$2, o$3, e$2 = {};
32
- for (o$3 in u$3) "key" == o$3 ? i$3 = u$3[o$3] : "ref" == o$3 ? r$2 = u$3[o$3] : e$2[o$3] = u$3[o$3];
33
- if (arguments.length > 2 && (e$2.children = arguments.length > 3 ? n.call(arguments, 2) : t$2), "function" == typeof l$2 && null != l$2.defaultProps) for (o$3 in l$2.defaultProps) void 0 === e$2[o$3] && (e$2[o$3] = l$2.defaultProps[o$3]);
34
- return m$1(l$2, e$2, i$3, r$2, null);
35
- }
36
- function m$1(n$1, t$2, i$3, r$2, o$3) {
37
- var e$2 = {
38
- type: n$1,
39
- props: t$2,
40
- key: i$3,
41
- ref: r$2,
42
- __k: null,
43
- __: null,
44
- __b: 0,
45
- __e: null,
46
- __c: null,
47
- constructor: void 0,
48
- __v: null == o$3 ? ++u$2 : o$3,
49
- __i: -1,
50
- __u: 0
51
- };
52
- return null == o$3 && null != l.vnode && l.vnode(e$2), e$2;
53
- }
54
- function k(n$1) {
55
- return n$1.children;
56
- }
57
- function x(n$1, l$2) {
58
- this.props = n$1, this.context = l$2;
59
- }
60
- function S(n$1, l$2) {
61
- if (null == l$2) return n$1.__ ? S(n$1.__, n$1.__i + 1) : null;
62
- for (var u$3; l$2 < n$1.__k.length; l$2++) if (null != (u$3 = n$1.__k[l$2]) && null != u$3.__e) return u$3.__e;
63
- return "function" == typeof n$1.type ? S(n$1) : null;
64
- }
65
- function C$1(n$1) {
66
- var l$2, u$3;
67
- if (null != (n$1 = n$1.__) && null != n$1.__c) {
68
- for (n$1.__e = n$1.__c.base = null, l$2 = 0; l$2 < n$1.__k.length; l$2++) if (null != (u$3 = n$1.__k[l$2]) && null != u$3.__e) {
69
- n$1.__e = n$1.__c.base = u$3.__e;
70
- break;
71
- }
72
- return C$1(n$1);
73
- }
74
- }
75
- function M(n$1) {
76
- (!n$1.__d && (n$1.__d = !0) && i$2.push(n$1) && !$.__r++ || r$1 != l.debounceRendering) && ((r$1 = l.debounceRendering) || o$2)($);
77
- }
78
- function $() {
79
- for (var n$1, u$3, t$2, r$2, o$3, f$3, c$2, s$2 = 1; i$2.length;) i$2.length > s$2 && i$2.sort(e$1), n$1 = i$2.shift(), s$2 = i$2.length, n$1.__d && (t$2 = void 0, r$2 = void 0, o$3 = (r$2 = (u$3 = n$1).__v).__e, f$3 = [], c$2 = [], u$3.__P && ((t$2 = d$1({}, r$2)).__v = r$2.__v + 1, l.vnode && l.vnode(t$2), O$1(u$3.__P, t$2, r$2, u$3.__n, u$3.__P.namespaceURI, 32 & r$2.__u ? [o$3] : null, f$3, null == o$3 ? S(r$2) : o$3, !!(32 & r$2.__u), c$2), t$2.__v = r$2.__v, t$2.__.__k[t$2.__i] = t$2, N$1(f$3, t$2, c$2), r$2.__e = r$2.__ = null, t$2.__e != o$3 && C$1(t$2)));
80
- $.__r = 0;
81
- }
82
- function I(n$1, l$2, u$3, t$2, i$3, r$2, o$3, e$2, f$3, c$2, s$2) {
83
- var a$2, h$2, y$2, w$2, d$2, g$2, _$2, m$2 = t$2 && t$2.__k || v$1, b$1 = l$2.length;
84
- for (f$3 = P$1(u$3, l$2, m$2, f$3, b$1), a$2 = 0; a$2 < b$1; a$2++) null != (y$2 = u$3.__k[a$2]) && (h$2 = -1 == y$2.__i ? p$1 : m$2[y$2.__i] || p$1, y$2.__i = a$2, g$2 = O$1(n$1, y$2, h$2, i$3, r$2, o$3, e$2, f$3, c$2, s$2), w$2 = y$2.__e, y$2.ref && h$2.ref != y$2.ref && (h$2.ref && B$2(h$2.ref, null, y$2), s$2.push(y$2.ref, y$2.__c || w$2, y$2)), null == d$2 && null != w$2 && (d$2 = w$2), (_$2 = !!(4 & y$2.__u)) || h$2.__k === y$2.__k ? f$3 = A$1(y$2, f$3, n$1, _$2) : "function" == typeof y$2.type && void 0 !== g$2 ? f$3 = g$2 : w$2 && (f$3 = w$2.nextSibling), y$2.__u &= -7);
85
- return u$3.__e = d$2, f$3;
86
- }
87
- function P$1(n$1, l$2, u$3, t$2, i$3) {
88
- var r$2, o$3, e$2, f$3, c$2, s$2 = u$3.length, a$2 = s$2, h$2 = 0;
89
- for (n$1.__k = new Array(i$3), r$2 = 0; r$2 < i$3; r$2++) null != (o$3 = l$2[r$2]) && "boolean" != typeof o$3 && "function" != typeof o$3 ? (f$3 = r$2 + h$2, (o$3 = n$1.__k[r$2] = "string" == typeof o$3 || "number" == typeof o$3 || "bigint" == typeof o$3 || o$3.constructor == String ? m$1(null, o$3, null, null, null) : w$1(o$3) ? m$1(k, { children: o$3 }, null, null, null) : null == o$3.constructor && o$3.__b > 0 ? m$1(o$3.type, o$3.props, o$3.key, o$3.ref ? o$3.ref : null, o$3.__v) : o$3).__ = n$1, o$3.__b = n$1.__b + 1, e$2 = null, -1 != (c$2 = o$3.__i = L$1(o$3, u$3, f$3, a$2)) && (a$2--, (e$2 = u$3[c$2]) && (e$2.__u |= 2)), null == e$2 || null == e$2.__v ? (-1 == c$2 && (i$3 > s$2 ? h$2-- : i$3 < s$2 && h$2++), "function" != typeof o$3.type && (o$3.__u |= 4)) : c$2 != f$3 && (c$2 == f$3 - 1 ? h$2-- : c$2 == f$3 + 1 ? h$2++ : (c$2 > f$3 ? h$2-- : h$2++, o$3.__u |= 4))) : n$1.__k[r$2] = null;
90
- if (a$2) for (r$2 = 0; r$2 < s$2; r$2++) null != (e$2 = u$3[r$2]) && 0 == (2 & e$2.__u) && (e$2.__e == t$2 && (t$2 = S(e$2)), D$1(e$2, e$2));
91
- return t$2;
92
- }
93
- function A$1(n$1, l$2, u$3, t$2) {
94
- var i$3, r$2;
95
- if ("function" == typeof n$1.type) {
96
- for (i$3 = n$1.__k, r$2 = 0; i$3 && r$2 < i$3.length; r$2++) i$3[r$2] && (i$3[r$2].__ = n$1, l$2 = A$1(i$3[r$2], l$2, u$3, t$2));
97
- return l$2;
98
- }
99
- n$1.__e != l$2 && (t$2 && (l$2 && n$1.type && !l$2.parentNode && (l$2 = S(n$1)), u$3.insertBefore(n$1.__e, l$2 || null)), l$2 = n$1.__e);
100
- do
101
- l$2 = l$2 && l$2.nextSibling;
102
- while (null != l$2 && 8 == l$2.nodeType);
103
- return l$2;
104
- }
105
- function H(n$1, l$2) {
106
- return l$2 = l$2 || [], null == n$1 || "boolean" == typeof n$1 || (w$1(n$1) ? n$1.some(function(n$2) {
107
- H(n$2, l$2);
108
- }) : l$2.push(n$1)), l$2;
109
- }
110
- function L$1(n$1, l$2, u$3, t$2) {
111
- var i$3, r$2, o$3, e$2 = n$1.key, f$3 = n$1.type, c$2 = l$2[u$3], s$2 = null != c$2 && 0 == (2 & c$2.__u);
112
- if (null === c$2 && null == n$1.key || s$2 && e$2 == c$2.key && f$3 == c$2.type) return u$3;
113
- if (t$2 > (s$2 ? 1 : 0)) {
114
- for (i$3 = u$3 - 1, r$2 = u$3 + 1; i$3 >= 0 || r$2 < l$2.length;) if (null != (c$2 = l$2[o$3 = i$3 >= 0 ? i$3-- : r$2++]) && 0 == (2 & c$2.__u) && e$2 == c$2.key && f$3 == c$2.type) return o$3;
115
- }
116
- return -1;
117
- }
118
- function T$2(n$1, l$2, u$3) {
119
- "-" == l$2[0] ? n$1.setProperty(l$2, null == u$3 ? "" : u$3) : n$1[l$2] = null == u$3 ? "" : "number" != typeof u$3 || y$1.test(l$2) ? u$3 : u$3 + "px";
120
- }
121
- function j$2(n$1, l$2, u$3, t$2, i$3) {
122
- var r$2, o$3;
123
- n: if ("style" == l$2) if ("string" == typeof u$3) n$1.style.cssText = u$3;
124
- else {
125
- if ("string" == typeof t$2 && (n$1.style.cssText = t$2 = ""), t$2) for (l$2 in t$2) u$3 && l$2 in u$3 || T$2(n$1.style, l$2, "");
126
- if (u$3) for (l$2 in u$3) t$2 && u$3[l$2] == t$2[l$2] || T$2(n$1.style, l$2, u$3[l$2]);
127
- }
128
- else if ("o" == l$2[0] && "n" == l$2[1]) r$2 = l$2 != (l$2 = l$2.replace(f$2, "$1")), o$3 = l$2.toLowerCase(), l$2 = o$3 in n$1 || "onFocusOut" == l$2 || "onFocusIn" == l$2 ? o$3.slice(2) : l$2.slice(2), n$1.l || (n$1.l = {}), n$1.l[l$2 + r$2] = u$3, u$3 ? t$2 ? u$3.u = t$2.u : (u$3.u = c$1, n$1.addEventListener(l$2, r$2 ? a$1 : s$1, r$2)) : n$1.removeEventListener(l$2, r$2 ? a$1 : s$1, r$2);
129
- else {
130
- if ("http://www.w3.org/2000/svg" == i$3) l$2 = l$2.replace(/xlink(H|:h)/, "h").replace(/sName$/, "s");
131
- else if ("width" != l$2 && "height" != l$2 && "href" != l$2 && "list" != l$2 && "form" != l$2 && "tabIndex" != l$2 && "download" != l$2 && "rowSpan" != l$2 && "colSpan" != l$2 && "role" != l$2 && "popover" != l$2 && l$2 in n$1) try {
132
- n$1[l$2] = null == u$3 ? "" : u$3;
133
- break n;
134
- } catch (n$2) {}
135
- "function" == typeof u$3 || (null == u$3 || !1 === u$3 && "-" != l$2[4] ? n$1.removeAttribute(l$2) : n$1.setAttribute(l$2, "popover" == l$2 && 1 == u$3 ? "" : u$3));
136
- }
137
- }
138
- function F$1(n$1) {
139
- return function(u$3) {
140
- if (this.l) {
141
- var t$2 = this.l[u$3.type + n$1];
142
- if (null == u$3.t) u$3.t = c$1++;
143
- else if (u$3.t < t$2.u) return;
144
- return t$2(l.event ? l.event(u$3) : u$3);
145
- }
146
- };
147
- }
148
- function O$1(n$1, u$3, t$2, i$3, r$2, o$3, e$2, f$3, c$2, s$2) {
149
- var a$2, h$2, p$2, v$2, y$2, _$2, m$2, b$1, S$1, C$2, M$1, $$1, P$2, A$2, H$2, L$2, T$3, j$3 = u$3.type;
150
- if (null != u$3.constructor) return null;
151
- 128 & t$2.__u && (c$2 = !!(32 & t$2.__u), o$3 = [f$3 = u$3.__e = t$2.__e]), (a$2 = l.__b) && a$2(u$3);
152
- n: if ("function" == typeof j$3) try {
153
- if (b$1 = u$3.props, S$1 = "prototype" in j$3 && j$3.prototype.render, C$2 = (a$2 = j$3.contextType) && i$3[a$2.__c], M$1 = a$2 ? C$2 ? C$2.props.value : a$2.__ : i$3, t$2.__c ? m$2 = (h$2 = u$3.__c = t$2.__c).__ = h$2.__E : (S$1 ? u$3.__c = h$2 = new j$3(b$1, M$1) : (u$3.__c = h$2 = new x(b$1, M$1), h$2.constructor = j$3, h$2.render = E$1), C$2 && C$2.sub(h$2), h$2.props = b$1, h$2.state || (h$2.state = {}), h$2.context = M$1, h$2.__n = i$3, p$2 = h$2.__d = !0, h$2.__h = [], h$2._sb = []), S$1 && null == h$2.__s && (h$2.__s = h$2.state), S$1 && null != j$3.getDerivedStateFromProps && (h$2.__s == h$2.state && (h$2.__s = d$1({}, h$2.__s)), d$1(h$2.__s, j$3.getDerivedStateFromProps(b$1, h$2.__s))), v$2 = h$2.props, y$2 = h$2.state, h$2.__v = u$3, p$2) S$1 && null == j$3.getDerivedStateFromProps && null != h$2.componentWillMount && h$2.componentWillMount(), S$1 && null != h$2.componentDidMount && h$2.__h.push(h$2.componentDidMount);
154
- else {
155
- if (S$1 && null == j$3.getDerivedStateFromProps && b$1 !== v$2 && null != h$2.componentWillReceiveProps && h$2.componentWillReceiveProps(b$1, M$1), !h$2.__e && null != h$2.shouldComponentUpdate && !1 === h$2.shouldComponentUpdate(b$1, h$2.__s, M$1) || u$3.__v == t$2.__v) {
156
- for (u$3.__v != t$2.__v && (h$2.props = b$1, h$2.state = h$2.__s, h$2.__d = !1), u$3.__e = t$2.__e, u$3.__k = t$2.__k, u$3.__k.some(function(n$2) {
157
- n$2 && (n$2.__ = u$3);
158
- }), $$1 = 0; $$1 < h$2._sb.length; $$1++) h$2.__h.push(h$2._sb[$$1]);
159
- h$2._sb = [], h$2.__h.length && e$2.push(h$2);
160
- break n;
161
- }
162
- null != h$2.componentWillUpdate && h$2.componentWillUpdate(b$1, h$2.__s, M$1), S$1 && null != h$2.componentDidUpdate && h$2.__h.push(function() {
163
- h$2.componentDidUpdate(v$2, y$2, _$2);
164
- });
165
- }
166
- if (h$2.context = M$1, h$2.props = b$1, h$2.__P = n$1, h$2.__e = !1, P$2 = l.__r, A$2 = 0, S$1) {
167
- for (h$2.state = h$2.__s, h$2.__d = !1, P$2 && P$2(u$3), a$2 = h$2.render(h$2.props, h$2.state, h$2.context), H$2 = 0; H$2 < h$2._sb.length; H$2++) h$2.__h.push(h$2._sb[H$2]);
168
- h$2._sb = [];
169
- } else do
170
- h$2.__d = !1, P$2 && P$2(u$3), a$2 = h$2.render(h$2.props, h$2.state, h$2.context), h$2.state = h$2.__s;
171
- while (h$2.__d && ++A$2 < 25);
172
- h$2.state = h$2.__s, null != h$2.getChildContext && (i$3 = d$1(d$1({}, i$3), h$2.getChildContext())), S$1 && !p$2 && null != h$2.getSnapshotBeforeUpdate && (_$2 = h$2.getSnapshotBeforeUpdate(v$2, y$2)), L$2 = a$2, null != a$2 && a$2.type === k && null == a$2.key && (L$2 = V$1(a$2.props.children)), f$3 = I(n$1, w$1(L$2) ? L$2 : [L$2], u$3, t$2, i$3, r$2, o$3, e$2, f$3, c$2, s$2), h$2.base = u$3.__e, u$3.__u &= -161, h$2.__h.length && e$2.push(h$2), m$2 && (h$2.__E = h$2.__ = null);
173
- } catch (n$2) {
174
- if (u$3.__v = null, c$2 || null != o$3) if (n$2.then) {
175
- for (u$3.__u |= c$2 ? 160 : 128; f$3 && 8 == f$3.nodeType && f$3.nextSibling;) f$3 = f$3.nextSibling;
176
- o$3[o$3.indexOf(f$3)] = null, u$3.__e = f$3;
177
- } else {
178
- for (T$3 = o$3.length; T$3--;) g$1(o$3[T$3]);
179
- z$1(u$3);
180
- }
181
- else u$3.__e = t$2.__e, u$3.__k = t$2.__k, n$2.then || z$1(u$3);
182
- l.__e(n$2, u$3, t$2);
183
- }
184
- else null == o$3 && u$3.__v == t$2.__v ? (u$3.__k = t$2.__k, u$3.__e = t$2.__e) : f$3 = u$3.__e = q$2(t$2.__e, u$3, t$2, i$3, r$2, o$3, e$2, c$2, s$2);
185
- return (a$2 = l.diffed) && a$2(u$3), 128 & u$3.__u ? void 0 : f$3;
186
- }
187
- function z$1(n$1) {
188
- n$1 && n$1.__c && (n$1.__c.__e = !0), n$1 && n$1.__k && n$1.__k.forEach(z$1);
189
- }
190
- function N$1(n$1, u$3, t$2) {
191
- for (var i$3 = 0; i$3 < t$2.length; i$3++) B$2(t$2[i$3], t$2[++i$3], t$2[++i$3]);
192
- l.__c && l.__c(u$3, n$1), n$1.some(function(u$4) {
193
- try {
194
- n$1 = u$4.__h, u$4.__h = [], n$1.some(function(n$2) {
195
- n$2.call(u$4);
196
- });
197
- } catch (n$2) {
198
- l.__e(n$2, u$4.__v);
199
- }
200
- });
201
- }
202
- function V$1(n$1) {
203
- return "object" != typeof n$1 || null == n$1 || n$1.__b && n$1.__b > 0 ? n$1 : w$1(n$1) ? n$1.map(V$1) : d$1({}, n$1);
204
- }
205
- function q$2(u$3, t$2, i$3, r$2, o$3, e$2, f$3, c$2, s$2) {
206
- var a$2, h$2, v$2, y$2, d$2, _$2, m$2, b$1 = i$3.props, k$2 = t$2.props, x$1 = t$2.type;
207
- if ("svg" == x$1 ? o$3 = "http://www.w3.org/2000/svg" : "math" == x$1 ? o$3 = "http://www.w3.org/1998/Math/MathML" : o$3 || (o$3 = "http://www.w3.org/1999/xhtml"), null != e$2) {
208
- for (a$2 = 0; a$2 < e$2.length; a$2++) if ((d$2 = e$2[a$2]) && "setAttribute" in d$2 == !!x$1 && (x$1 ? d$2.localName == x$1 : 3 == d$2.nodeType)) {
209
- u$3 = d$2, e$2[a$2] = null;
210
- break;
211
- }
212
- }
213
- if (null == u$3) {
214
- if (null == x$1) return document.createTextNode(k$2);
215
- u$3 = document.createElementNS(o$3, x$1, k$2.is && k$2), c$2 && (l.__m && l.__m(t$2, e$2), c$2 = !1), e$2 = null;
216
- }
217
- if (null == x$1) b$1 === k$2 || c$2 && u$3.data == k$2 || (u$3.data = k$2);
218
- else {
219
- if (e$2 = e$2 && n.call(u$3.childNodes), b$1 = i$3.props || p$1, !c$2 && null != e$2) for (b$1 = {}, a$2 = 0; a$2 < u$3.attributes.length; a$2++) b$1[(d$2 = u$3.attributes[a$2]).name] = d$2.value;
220
- for (a$2 in b$1) if (d$2 = b$1[a$2], "children" == a$2);
221
- else if ("dangerouslySetInnerHTML" == a$2) v$2 = d$2;
222
- else if (!(a$2 in k$2)) {
223
- if ("value" == a$2 && "defaultValue" in k$2 || "checked" == a$2 && "defaultChecked" in k$2) continue;
224
- j$2(u$3, a$2, null, d$2, o$3);
225
- }
226
- for (a$2 in k$2) d$2 = k$2[a$2], "children" == a$2 ? y$2 = d$2 : "dangerouslySetInnerHTML" == a$2 ? h$2 = d$2 : "value" == a$2 ? _$2 = d$2 : "checked" == a$2 ? m$2 = d$2 : c$2 && "function" != typeof d$2 || b$1[a$2] === d$2 || j$2(u$3, a$2, d$2, b$1[a$2], o$3);
227
- if (h$2) c$2 || v$2 && (h$2.__html == v$2.__html || h$2.__html == u$3.innerHTML) || (u$3.innerHTML = h$2.__html), t$2.__k = [];
228
- else if (v$2 && (u$3.innerHTML = ""), I("template" == t$2.type ? u$3.content : u$3, w$1(y$2) ? y$2 : [y$2], t$2, i$3, r$2, "foreignObject" == x$1 ? "http://www.w3.org/1999/xhtml" : o$3, e$2, f$3, e$2 ? e$2[0] : i$3.__k && S(i$3, 0), c$2, s$2), null != e$2) for (a$2 = e$2.length; a$2--;) g$1(e$2[a$2]);
229
- c$2 || (a$2 = "value", "progress" == x$1 && null == _$2 ? u$3.removeAttribute("value") : null != _$2 && (_$2 !== u$3[a$2] || "progress" == x$1 && !_$2 || "option" == x$1 && _$2 != b$1[a$2]) && j$2(u$3, a$2, _$2, b$1[a$2], o$3), a$2 = "checked", null != m$2 && m$2 != u$3[a$2] && j$2(u$3, a$2, m$2, b$1[a$2], o$3));
230
- }
231
- return u$3;
232
- }
233
- function B$2(n$1, u$3, t$2) {
234
- try {
235
- if ("function" == typeof n$1) {
236
- var i$3 = "function" == typeof n$1.__u;
237
- i$3 && n$1.__u(), i$3 && null == u$3 || (n$1.__u = n$1(u$3));
238
- } else n$1.current = u$3;
239
- } catch (n$2) {
240
- l.__e(n$2, t$2);
241
- }
242
- }
243
- function D$1(n$1, u$3, t$2) {
244
- var i$3, r$2;
245
- if (l.unmount && l.unmount(n$1), (i$3 = n$1.ref) && (i$3.current && i$3.current != n$1.__e || B$2(i$3, null, u$3)), null != (i$3 = n$1.__c)) {
246
- if (i$3.componentWillUnmount) try {
247
- i$3.componentWillUnmount();
248
- } catch (n$2) {
249
- l.__e(n$2, u$3);
250
- }
251
- i$3.base = i$3.__P = null;
252
- }
253
- if (i$3 = n$1.__k) for (r$2 = 0; r$2 < i$3.length; r$2++) i$3[r$2] && D$1(i$3[r$2], u$3, t$2 || "function" != typeof n$1.type);
254
- t$2 || g$1(n$1.__e), n$1.__c = n$1.__ = n$1.__e = void 0;
255
- }
256
- function E$1(n$1, l$2, u$3) {
257
- return this.constructor(n$1, u$3);
258
- }
259
- function G(u$3, t$2, i$3) {
260
- var r$2, o$3, e$2, f$3;
261
- t$2 == document && (t$2 = document.documentElement), l.__ && l.__(u$3, t$2), o$3 = (r$2 = "function" == typeof i$3) ? null : i$3 && i$3.__k || t$2.__k, e$2 = [], f$3 = [], O$1(t$2, u$3 = (!r$2 && i$3 || t$2).__k = _(k, null, [u$3]), o$3 || p$1, p$1, t$2.namespaceURI, !r$2 && i$3 ? [i$3] : o$3 ? null : t$2.firstChild ? n.call(t$2.childNodes) : null, e$2, !r$2 && i$3 ? i$3 : o$3 ? o$3.__e : t$2.firstChild, r$2, f$3), N$1(e$2, u$3, f$3);
262
- }
263
- n = v$1.slice, l = { __e: function(n$1, l$2, u$3, t$2) {
264
- for (var i$3, r$2, o$3; l$2 = l$2.__;) if ((i$3 = l$2.__c) && !i$3.__) try {
265
- if ((r$2 = i$3.constructor) && null != r$2.getDerivedStateFromError && (i$3.setState(r$2.getDerivedStateFromError(n$1)), o$3 = i$3.__d), null != i$3.componentDidCatch && (i$3.componentDidCatch(n$1, t$2 || {}), o$3 = i$3.__d), o$3) return i$3.__E = i$3;
266
- } catch (l$3) {
267
- n$1 = l$3;
268
- }
269
- throw n$1;
270
- } }, u$2 = 0, t$1 = function(n$1) {
271
- return null != n$1 && null == n$1.constructor;
272
- }, x.prototype.setState = function(n$1, l$2) {
273
- var u$3 = null != this.__s && this.__s != this.state ? this.__s : this.__s = d$1({}, this.state);
274
- "function" == typeof n$1 && (n$1 = n$1(d$1({}, u$3), this.props)), n$1 && d$1(u$3, n$1), null != n$1 && this.__v && (l$2 && this._sb.push(l$2), M(this));
275
- }, x.prototype.forceUpdate = function(n$1) {
276
- this.__v && (this.__e = !0, n$1 && this.__h.push(n$1), M(this));
277
- }, x.prototype.render = k, i$2 = [], o$2 = "function" == typeof Promise ? Promise.prototype.then.bind(Promise.resolve()) : setTimeout, e$1 = function(n$1, l$2) {
278
- return n$1.__v.__b - l$2.__v.__b;
279
- }, $.__r = 0, f$2 = /(PointerCapture)$|Capture$/i, c$1 = 0, s$1 = F$1(!1), a$1 = F$1(!0), h$1 = 0;
280
-
281
- //#endregion
282
- //#region ../../node_modules/preact/hooks/dist/hooks.module.js
283
- var t, r, u$1, i$1, o$1 = 0, f$1 = [], c = l, e = c.__b, a = c.__r, v = c.diffed, l$1 = c.__c, m = c.unmount, s = c.__;
284
- function p(n$1, t$2) {
285
- c.__h && c.__h(r, n$1, o$1 || t$2), o$1 = 0;
286
- var u$3 = r.__H || (r.__H = {
287
- __: [],
288
- __h: []
289
- });
290
- return n$1 >= u$3.__.length && u$3.__.push({}), u$3.__[n$1];
291
- }
292
- function d(n$1) {
293
- return o$1 = 1, h(D, n$1);
294
- }
295
- function h(n$1, u$3, i$3) {
296
- var o$3 = p(t++, 2);
297
- if (o$3.t = n$1, !o$3.__c && (o$3.__ = [i$3 ? i$3(u$3) : D(void 0, u$3), function(n$2) {
298
- var t$2 = o$3.__N ? o$3.__N[0] : o$3.__[0], r$2 = o$3.t(t$2, n$2);
299
- t$2 !== r$2 && (o$3.__N = [r$2, o$3.__[1]], o$3.__c.setState({}));
300
- }], o$3.__c = r, !r.__f)) {
301
- var f$3 = function(n$2, t$2, r$2) {
302
- if (!o$3.__c.__H) return !0;
303
- var u$4 = o$3.__c.__H.__.filter(function(n$3) {
304
- return !!n$3.__c;
305
- });
306
- if (u$4.every(function(n$3) {
307
- return !n$3.__N;
308
- })) return !c$2 || c$2.call(this, n$2, t$2, r$2);
309
- var i$4 = o$3.__c.props !== n$2;
310
- return u$4.forEach(function(n$3) {
311
- if (n$3.__N) {
312
- var t$3 = n$3.__[0];
313
- n$3.__ = n$3.__N, n$3.__N = void 0, t$3 !== n$3.__[0] && (i$4 = !0);
314
- }
315
- }), c$2 && c$2.call(this, n$2, t$2, r$2) || i$4;
316
- };
317
- r.__f = !0;
318
- var c$2 = r.shouldComponentUpdate, e$2 = r.componentWillUpdate;
319
- r.componentWillUpdate = function(n$2, t$2, r$2) {
320
- if (this.__e) {
321
- var u$4 = c$2;
322
- c$2 = void 0, f$3(n$2, t$2, r$2), c$2 = u$4;
323
- }
324
- e$2 && e$2.call(this, n$2, t$2, r$2);
325
- }, r.shouldComponentUpdate = f$3;
326
- }
327
- return o$3.__N || o$3.__;
328
- }
329
- function y(n$1, u$3) {
330
- var i$3 = p(t++, 3);
331
- !c.__s && C(i$3.__H, u$3) && (i$3.__ = n$1, i$3.u = u$3, r.__H.__h.push(i$3));
332
- }
333
- function _$1(n$1, u$3) {
334
- var i$3 = p(t++, 4);
335
- !c.__s && C(i$3.__H, u$3) && (i$3.__ = n$1, i$3.u = u$3, r.__h.push(i$3));
336
- }
337
- function T(n$1, r$2) {
338
- var u$3 = p(t++, 7);
339
- return C(u$3.__H, r$2) && (u$3.__ = n$1(), u$3.__H = r$2, u$3.__h = n$1), u$3.__;
340
- }
341
- function q(n$1, t$2) {
342
- return o$1 = 8, T(function() {
343
- return n$1;
344
- }, t$2);
345
- }
346
- function j$1() {
347
- for (var n$1; n$1 = f$1.shift();) if (n$1.__P && n$1.__H) try {
348
- n$1.__H.__h.forEach(z), n$1.__H.__h.forEach(B$1), n$1.__H.__h = [];
349
- } catch (t$2) {
350
- n$1.__H.__h = [], c.__e(t$2, n$1.__v);
351
- }
352
- }
353
- c.__b = function(n$1) {
354
- r = null, e && e(n$1);
355
- }, c.__ = function(n$1, t$2) {
356
- n$1 && t$2.__k && t$2.__k.__m && (n$1.__m = t$2.__k.__m), s && s(n$1, t$2);
357
- }, c.__r = function(n$1) {
358
- a && a(n$1), t = 0;
359
- var i$3 = (r = n$1.__c).__H;
360
- i$3 && (u$1 === r ? (i$3.__h = [], r.__h = [], i$3.__.forEach(function(n$2) {
361
- n$2.__N && (n$2.__ = n$2.__N), n$2.u = n$2.__N = void 0;
362
- })) : (i$3.__h.forEach(z), i$3.__h.forEach(B$1), i$3.__h = [], t = 0)), u$1 = r;
363
- }, c.diffed = function(n$1) {
364
- v && v(n$1);
365
- var t$2 = n$1.__c;
366
- t$2 && t$2.__H && (t$2.__H.__h.length && (1 !== f$1.push(t$2) && i$1 === c.requestAnimationFrame || ((i$1 = c.requestAnimationFrame) || w)(j$1)), t$2.__H.__.forEach(function(n$2) {
367
- n$2.u && (n$2.__H = n$2.u), n$2.u = void 0;
368
- })), u$1 = r = null;
369
- }, c.__c = function(n$1, t$2) {
370
- t$2.some(function(n$2) {
371
- try {
372
- n$2.__h.forEach(z), n$2.__h = n$2.__h.filter(function(n$3) {
373
- return !n$3.__ || B$1(n$3);
374
- });
375
- } catch (r$2) {
376
- t$2.some(function(n$3) {
377
- n$3.__h && (n$3.__h = []);
378
- }), t$2 = [], c.__e(r$2, n$2.__v);
379
- }
380
- }), l$1 && l$1(n$1, t$2);
381
- }, c.unmount = function(n$1) {
382
- m && m(n$1);
383
- var t$2, r$2 = n$1.__c;
384
- r$2 && r$2.__H && (r$2.__H.__.forEach(function(n$2) {
385
- try {
386
- z(n$2);
387
- } catch (n$3) {
388
- t$2 = n$3;
389
- }
390
- }), r$2.__H = void 0, t$2 && c.__e(t$2, r$2.__v));
391
- };
392
- var k$1 = "function" == typeof requestAnimationFrame;
393
- function w(n$1) {
394
- var t$2, r$2 = function() {
395
- clearTimeout(u$3), k$1 && cancelAnimationFrame(t$2), setTimeout(n$1);
396
- }, u$3 = setTimeout(r$2, 35);
397
- k$1 && (t$2 = requestAnimationFrame(r$2));
398
- }
399
- function z(n$1) {
400
- var t$2 = r, u$3 = n$1.__c;
401
- "function" == typeof u$3 && (n$1.__c = void 0, u$3()), r = t$2;
402
- }
403
- function B$1(n$1) {
404
- var t$2 = r;
405
- n$1.__c = n$1.__(), r = t$2;
406
- }
407
- function C(n$1, t$2) {
408
- return !n$1 || n$1.length !== t$2.length || t$2.some(function(t$3, r$2) {
409
- return t$3 !== n$1[r$2];
410
- });
411
- }
412
- function D(n$1, t$2) {
413
- return "function" == typeof t$2 ? t$2(n$1) : t$2;
414
- }
415
-
416
- //#endregion
417
- //#region ../../node_modules/preact/compat/dist/compat.module.js
418
- function g(n$1, t$2) {
419
- for (var e$2 in t$2) n$1[e$2] = t$2[e$2];
420
- return n$1;
421
- }
422
- function E(n$1, t$2) {
423
- for (var e$2 in n$1) if ("__source" !== e$2 && !(e$2 in t$2)) return !0;
424
- for (var r$2 in t$2) if ("__source" !== r$2 && n$1[r$2] !== t$2[r$2]) return !0;
425
- return !1;
426
- }
427
- function N(n$1, t$2) {
428
- this.props = n$1, this.context = t$2;
429
- }
430
- (N.prototype = new x()).isPureReactComponent = !0, N.prototype.shouldComponentUpdate = function(n$1, t$2) {
431
- return E(this.props, n$1) || E(this.state, t$2);
432
- };
433
- var T$1 = l.__b;
434
- l.__b = function(n$1) {
435
- n$1.type && n$1.type.__f && n$1.ref && (n$1.props.ref = n$1.ref, n$1.ref = null), T$1 && T$1(n$1);
436
- };
437
- var A = "undefined" != typeof Symbol && Symbol.for && Symbol.for("react.forward_ref") || 3911;
438
- var L = function(n$1, t$2) {
439
- return null == n$1 ? null : H(H(n$1).map(t$2));
440
- }, O = {
441
- map: L,
442
- forEach: L,
443
- count: function(n$1) {
444
- return n$1 ? H(n$1).length : 0;
445
- },
446
- only: function(n$1) {
447
- var t$2 = H(n$1);
448
- if (1 !== t$2.length) throw "Children.only";
449
- return t$2[0];
450
- },
451
- toArray: H
452
- }, F = l.__e;
453
- l.__e = function(n$1, t$2, e$2, r$2) {
454
- if (n$1.then) {
455
- for (var u$3, o$3 = t$2; o$3 = o$3.__;) if ((u$3 = o$3.__c) && u$3.__c) return t$2.__e ?? (t$2.__e = e$2.__e, t$2.__k = e$2.__k), u$3.__c(n$1, t$2);
456
- }
457
- F(n$1, t$2, e$2, r$2);
458
- };
459
- var U = l.unmount;
460
- function V(n$1, t$2, e$2) {
461
- return n$1 && (n$1.__c && n$1.__c.__H && (n$1.__c.__H.__.forEach(function(n$2) {
462
- "function" == typeof n$2.__c && n$2.__c();
463
- }), n$1.__c.__H = null), null != (n$1 = g({}, n$1)).__c && (n$1.__c.__P === e$2 && (n$1.__c.__P = t$2), n$1.__c.__e = !0, n$1.__c = null), n$1.__k = n$1.__k && n$1.__k.map(function(n$2) {
464
- return V(n$2, t$2, e$2);
465
- })), n$1;
466
- }
467
- function W(n$1, t$2, e$2) {
468
- return n$1 && e$2 && (n$1.__v = null, n$1.__k = n$1.__k && n$1.__k.map(function(n$2) {
469
- return W(n$2, t$2, e$2);
470
- }), n$1.__c && n$1.__c.__P === t$2 && (n$1.__e && e$2.appendChild(n$1.__e), n$1.__c.__e = !0, n$1.__c.__P = e$2)), n$1;
471
- }
472
- function P() {
473
- this.__u = 0, this.o = null, this.__b = null;
474
- }
475
- function j(n$1) {
476
- var t$2 = n$1.__.__c;
477
- return t$2 && t$2.__a && t$2.__a(n$1);
478
- }
479
- function B() {
480
- this.i = null, this.l = null;
481
- }
482
- l.unmount = function(n$1) {
483
- var t$2 = n$1.__c;
484
- t$2 && t$2.__R && t$2.__R(), t$2 && 32 & n$1.__u && (n$1.type = null), U && U(n$1);
485
- }, (P.prototype = new x()).__c = function(n$1, t$2) {
486
- var e$2 = t$2.__c, r$2 = this;
487
- r$2.o ??= [], r$2.o.push(e$2);
488
- var u$3 = j(r$2.__v), o$3 = !1, i$3 = function() {
489
- o$3 || (o$3 = !0, e$2.__R = null, u$3 ? u$3(l$2) : l$2());
490
- };
491
- e$2.__R = i$3;
492
- var l$2 = function() {
493
- if (!--r$2.__u) {
494
- if (r$2.state.__a) {
495
- var n$2 = r$2.state.__a;
496
- r$2.__v.__k[0] = W(n$2, n$2.__c.__P, n$2.__c.__O);
497
- }
498
- var t$3;
499
- for (r$2.setState({ __a: r$2.__b = null }); t$3 = r$2.o.pop();) t$3.forceUpdate();
500
- }
501
- };
502
- r$2.__u++ || 32 & t$2.__u || r$2.setState({ __a: r$2.__b = r$2.__v.__k[0] }), n$1.then(i$3, i$3);
503
- }, P.prototype.componentWillUnmount = function() {
504
- this.o = [];
505
- }, P.prototype.render = function(n$1, e$2) {
506
- if (this.__b) {
507
- if (this.__v.__k) {
508
- var r$2 = document.createElement("div"), o$3 = this.__v.__k[0].__c;
509
- this.__v.__k[0] = V(this.__b, r$2, o$3.__O = o$3.__P);
510
- }
511
- this.__b = null;
512
- }
513
- var i$3 = e$2.__a && _(k, null, n$1.fallback);
514
- return i$3 && (i$3.__u &= -33), [_(k, null, e$2.__a ? null : n$1.children), i$3];
515
- };
516
- var H$1 = function(n$1, t$2, e$2) {
517
- if (++e$2[1] === e$2[0] && n$1.l.delete(t$2), n$1.props.revealOrder && ("t" !== n$1.props.revealOrder[0] || !n$1.l.size)) for (e$2 = n$1.i; e$2;) {
518
- for (; e$2.length > 3;) e$2.pop()();
519
- if (e$2[1] < e$2[0]) break;
520
- n$1.i = e$2 = e$2[2];
521
- }
522
- };
523
- (B.prototype = new x()).__a = function(n$1) {
524
- var t$2 = this, e$2 = j(t$2.__v), r$2 = t$2.l.get(n$1);
525
- return r$2[0]++, function(u$3) {
526
- var o$3 = function() {
527
- t$2.props.revealOrder ? (r$2.push(u$3), H$1(t$2, n$1, r$2)) : u$3();
528
- };
529
- e$2 ? e$2(o$3) : o$3();
530
- };
531
- }, B.prototype.render = function(n$1) {
532
- this.i = null, this.l = /* @__PURE__ */ new Map();
533
- var t$2 = H(n$1.children);
534
- n$1.revealOrder && "b" === n$1.revealOrder[0] && t$2.reverse();
535
- for (var e$2 = t$2.length; e$2--;) this.l.set(t$2[e$2], this.i = [
536
- 1,
537
- 0,
538
- this.i
539
- ]);
540
- return n$1.children;
541
- }, B.prototype.componentDidUpdate = B.prototype.componentDidMount = function() {
542
- var n$1 = this;
543
- this.l.forEach(function(t$2, e$2) {
544
- H$1(n$1, e$2, t$2);
545
- });
546
- };
547
- var q$1 = "undefined" != typeof Symbol && Symbol.for && Symbol.for("react.element") || 60103, G$1 = /^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/, J$1 = /^on(Ani|Tra|Tou|BeforeInp|Compo)/, K$1 = /[A-Z0-9]/g, Q$1 = "undefined" != typeof document, X = function(n$1) {
548
- return ("undefined" != typeof Symbol && "symbol" == typeof Symbol() ? /fil|che|rad/ : /fil|che|ra/).test(n$1);
549
- };
550
- x.prototype.isReactComponent = {}, [
551
- "componentWillMount",
552
- "componentWillReceiveProps",
553
- "componentWillUpdate"
554
- ].forEach(function(t$2) {
555
- Object.defineProperty(x.prototype, t$2, {
556
- configurable: !0,
557
- get: function() {
558
- return this["UNSAFE_" + t$2];
559
- },
560
- set: function(n$1) {
561
- Object.defineProperty(this, t$2, {
562
- configurable: !0,
563
- writable: !0,
564
- value: n$1
565
- });
566
- }
567
- });
568
- });
569
- var en = l.event;
570
- function rn() {}
571
- function un() {
572
- return this.cancelBubble;
573
- }
574
- function on() {
575
- return this.defaultPrevented;
576
- }
577
- l.event = function(n$1) {
578
- return en && (n$1 = en(n$1)), n$1.persist = rn, n$1.isPropagationStopped = un, n$1.isDefaultPrevented = on, n$1.nativeEvent = n$1;
579
- };
580
- var ln, cn = {
581
- enumerable: !1,
582
- configurable: !0,
583
- get: function() {
584
- return this.class;
585
- }
586
- }, fn = l.vnode;
587
- l.vnode = function(n$1) {
588
- "string" == typeof n$1.type && function(n$2) {
589
- var t$2 = n$2.props, e$2 = n$2.type, u$3 = {}, o$3 = -1 === e$2.indexOf("-");
590
- for (var i$3 in t$2) {
591
- var l$2 = t$2[i$3];
592
- if (!("value" === i$3 && "defaultValue" in t$2 && null == l$2 || Q$1 && "children" === i$3 && "noscript" === e$2 || "class" === i$3 || "className" === i$3)) {
593
- var c$2 = i$3.toLowerCase();
594
- "defaultValue" === i$3 && "value" in t$2 && null == t$2.value ? i$3 = "value" : "download" === i$3 && !0 === l$2 ? l$2 = "" : "translate" === c$2 && "no" === l$2 ? l$2 = !1 : "o" === c$2[0] && "n" === c$2[1] ? "ondoubleclick" === c$2 ? i$3 = "ondblclick" : "onchange" !== c$2 || "input" !== e$2 && "textarea" !== e$2 || X(t$2.type) ? "onfocus" === c$2 ? i$3 = "onfocusin" : "onblur" === c$2 ? i$3 = "onfocusout" : J$1.test(i$3) && (i$3 = c$2) : c$2 = i$3 = "oninput" : o$3 && G$1.test(i$3) ? i$3 = i$3.replace(K$1, "-$&").toLowerCase() : null === l$2 && (l$2 = void 0), "oninput" === c$2 && u$3[i$3 = c$2] && (i$3 = "oninputCapture"), u$3[i$3] = l$2;
595
- }
596
- }
597
- "select" == e$2 && u$3.multiple && Array.isArray(u$3.value) && (u$3.value = H(t$2.children).forEach(function(n$3) {
598
- n$3.props.selected = -1 != u$3.value.indexOf(n$3.props.value);
599
- })), "select" == e$2 && null != u$3.defaultValue && (u$3.value = H(t$2.children).forEach(function(n$3) {
600
- n$3.props.selected = u$3.multiple ? -1 != u$3.defaultValue.indexOf(n$3.props.value) : u$3.defaultValue == n$3.props.value;
601
- })), t$2.class && !t$2.className ? (u$3.class = t$2.class, Object.defineProperty(u$3, "className", cn)) : (t$2.className && !t$2.class || t$2.class && t$2.className) && (u$3.class = u$3.className = t$2.className), n$2.props = u$3;
602
- }(n$1), n$1.$$typeof = q$1, fn && fn(n$1);
603
- };
604
- var an = l.__r;
605
- l.__r = function(n$1) {
606
- an && an(n$1), ln = n$1.__c;
607
- };
608
- var sn = l.diffed;
609
- l.diffed = function(n$1) {
610
- sn && sn(n$1);
611
- var t$2 = n$1.props, e$2 = n$1.__e;
612
- null != e$2 && "textarea" === n$1.type && "value" in t$2 && t$2.value !== e$2.value && (e$2.value = null == t$2.value ? "" : t$2.value), ln = null;
613
- };
614
- function bn(n$1) {
615
- return !!n$1.__k && (G(null, n$1), !0);
616
- }
617
-
618
- //#endregion
619
- //#region src/preact-shim.ts
620
- var preact_shim_exports = /* @__PURE__ */ __export({
621
- Component: () => x,
622
- Fragment: () => k,
623
- createElement: () => _,
624
- h: () => _,
625
- render: () => G,
626
- unmountComponentAtNode: () => bn,
627
- useCallback: () => q,
628
- useEffect: () => y,
629
- useLayoutEffect: () => _$1,
630
- useMemo: () => T,
631
- useReducer: () => h,
632
- useState: () => d
633
- });
634
-
635
- //#endregion
636
- //#region ../../node_modules/preact/jsx-runtime/dist/jsxRuntime.module.js
637
- var o = /acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i, f = 0, i = Array.isArray;
638
- function u(e$2, t$2, n$1, o$3, i$3, u$3) {
639
- t$2 || (t$2 = {});
640
- var a$2, c$2, p$2 = t$2;
641
- if ("ref" in p$2) for (c$2 in p$2 = {}, t$2) "ref" == c$2 ? a$2 = t$2[c$2] : p$2[c$2] = t$2[c$2];
642
- var l$2 = {
643
- type: e$2,
644
- props: p$2,
645
- key: n$1,
646
- ref: a$2,
647
- __k: null,
648
- __: null,
649
- __b: 0,
650
- __e: null,
651
- __c: null,
652
- constructor: void 0,
653
- __v: --f,
654
- __i: -1,
655
- __u: 0,
656
- __source: i$3,
657
- __self: u$3
658
- };
659
- if ("function" == typeof e$2 && (a$2 = e$2.defaultProps)) for (c$2 in a$2) void 0 === p$2[c$2] && (p$2[c$2] = a$2[c$2]);
660
- return l.vnode && l.vnode(l$2), l$2;
661
- }
662
-
663
- //#endregion
664
- //#region src/image.tsx
665
- const Image = ({ href, x: x$1, y: y$2 = 0, height = 12 }) => {
666
- return /* @__PURE__ */ u("image", {
667
- xlinkHref: href,
668
- x: x$1 - height / 2,
669
- y: y$2 - height / 2,
670
- width: height,
671
- height
672
- });
673
- };
674
-
675
- //#endregion
676
- //#region src/ImageChar.tsx
677
- const ImageChar = ({ x: x$1, y: y$2 = 0, height = 12, fill, stroke, fontFamily = "FontAwesome", char = "", fontWeight }) => {
678
- const renderChar = T(() => {
679
- return fontFamily === "FontAwesome" ? Utility.faChar(char) : char;
680
- }, [char, fontFamily]);
681
- return /* @__PURE__ */ u("text", {
682
- x: x$1,
683
- y: y$2,
684
- fill,
685
- stroke,
686
- fontFamily,
687
- fontSize: `${height}px`,
688
- fontWeight,
689
- dominantBaseline: "middle",
690
- style: {
691
- textAnchor: "middle",
692
- alignmentBaseline: "middle"
693
- },
694
- children: renderChar
695
- });
696
- };
697
-
698
- //#endregion
699
- //#region src/shape.tsx
700
- const Circle = ({ radius = 32, fill = "navy", stroke = fill, strokeWidth = 1, shapeRendering }) => /* @__PURE__ */ u("circle", {
701
- r: radius,
702
- fill,
703
- stroke,
704
- strokeWidth,
705
- shapeRendering
706
- });
707
- const Square = ({ radius = 30, cornerRadius = 0, fill = "white", stroke, strokeWidth = 1, shapeRendering }) => /* @__PURE__ */ u("rect", {
708
- x: -radius,
709
- y: -radius,
710
- rx: cornerRadius,
711
- ry: cornerRadius,
712
- width: radius * 2,
713
- height: radius * 2,
714
- fill,
715
- stroke: stroke || fill,
716
- strokeWidth,
717
- shapeRendering
718
- });
719
- const Rectangle = ({ width = 30, height = 30, cornerRadius = 0, fill = "white", stroke = "black", strokeWidth = 1, shapeRendering }) => {
720
- return /* @__PURE__ */ u("rect", {
721
- x: -width / 2,
722
- y: -height / 2,
723
- rx: cornerRadius,
724
- ry: cornerRadius,
725
- width,
726
- height,
727
- fill,
728
- stroke: stroke || fill,
729
- strokeWidth,
730
- shapeRendering
731
- });
732
- };
733
- const Shape = ({ shape = "circle", height = 128, width, fill, stroke, strokeWidth = 1, shapeRendering, cornerRadius }) => {
734
- switch (shape) {
735
- case "square": return /* @__PURE__ */ u(Square, {
736
- radius: height / 2,
737
- fill,
738
- stroke,
739
- strokeWidth,
740
- shapeRendering,
741
- cornerRadius
742
- });
743
- case "rectangle": return /* @__PURE__ */ u(Rectangle, {
744
- width: width ?? height,
745
- height,
746
- fill,
747
- stroke,
748
- strokeWidth,
749
- shapeRendering,
750
- cornerRadius
751
- });
752
- case "circle":
753
- default: return /* @__PURE__ */ u(Circle, {
754
- radius: height / 2,
755
- fill,
756
- stroke,
757
- strokeWidth,
758
- shapeRendering
759
- });
760
- }
761
- };
762
-
763
- //#endregion
764
- //#region src/icon.tsx
765
- const Icon = ({ shape = "circle", width, height = 32, fill, stroke, strokeWidth = 0, imageUrl = "", imageFontFamily = "FontAwesome", imageChar = "", imageCharFill = Palette.textColor(fill), padding = height / 5, xOffset = 0, yOffset = 0, cornerRadius, shapeRendering }) => {
766
- return /* @__PURE__ */ u(k, { children: [/* @__PURE__ */ u(Shape, {
767
- shape,
768
- width,
769
- height,
770
- fill,
771
- stroke,
772
- strokeWidth,
773
- shapeRendering,
774
- cornerRadius
775
- }), imageUrl ? /* @__PURE__ */ u(Image, {
776
- href: imageUrl,
777
- x: xOffset,
778
- y: yOffset,
779
- height: height - padding
780
- }) : /* @__PURE__ */ u(ImageChar, {
781
- x: xOffset,
782
- y: yOffset,
783
- height: height - padding,
784
- fontFamily: imageFontFamily,
785
- char: imageChar,
786
- fill: imageCharFill,
787
- fontWeight: 400
788
- })] });
789
- };
790
- const Icons = ({ icons = [] }) => {
791
- return /* @__PURE__ */ u(k, { children: icons.map((cat) => {
792
- return /* @__PURE__ */ u("g", {
793
- id: cat.id,
794
- children: /* @__PURE__ */ u(Icon, { ...cat })
795
- }, cat.id);
796
- }) });
797
- };
798
-
799
- //#endregion
800
- //#region src/text.tsx
801
- const TextLine = ({ text, height = 12, anchor = "middle", baseline = "middle", fontFamily = "Verdana", fill = "black" }) => {
802
- return /* @__PURE__ */ u("text", {
803
- "font-family": fontFamily,
804
- "font-size": `${height}px`,
805
- "text-anchor": anchor,
806
- "dominant-baseline": baseline,
807
- fill,
808
- children: text
809
- });
810
- };
811
- const Text = ({ text, height = 12, fontFamily = "Verdana", fill = "black", onSizeUpdate }) => {
812
- const [totalWidth, setTotalWidth] = d(0);
813
- const [totalHeight, setTotalHeight] = d(0);
814
- y(() => {
815
- if (onSizeUpdate) onSizeUpdate({
816
- width: totalWidth,
817
- height: totalHeight
818
- });
819
- }, [
820
- totalWidth,
821
- totalHeight,
822
- onSizeUpdate
823
- ]);
824
- const parts = T(() => {
825
- return text.split("\n");
826
- }, [text]);
827
- _$1(() => {
828
- const size = Utility.textSize(parts, fontFamily, height);
829
- setTotalWidth(size.width);
830
- setTotalHeight(size.height);
831
- }, [
832
- fontFamily,
833
- height,
834
- parts
835
- ]);
836
- return /* @__PURE__ */ u("g", { children: T(() => {
837
- const yOffset = -(totalHeight / 2) + height / 2;
838
- return parts.map((p$2, i$3) => {
839
- return /* @__PURE__ */ u("g", {
840
- transform: `translate(0 ${yOffset + i$3 * (height + 2)})`,
841
- children: /* @__PURE__ */ u(TextLine, {
842
- text: p$2,
843
- height,
844
- fontFamily,
845
- fill
846
- })
847
- }, `key-${i$3}`);
848
- });
849
- }, [
850
- parts,
851
- totalHeight,
852
- height,
853
- fontFamily,
854
- fill
855
- ]) });
856
- };
857
- const TextBox = ({ text, height = 12, fontFamily = "Verdana", padding = 4, fill = "whitesmoke", stroke = "lightgray", textFill = "black", strokeWidth = 1, cornerRadius = 0, onSizeUpdate }) => {
858
- const [textWidth, setTextWidthUpdate] = d(0);
859
- const [textHeight, setTextHeightUpdate] = d(0);
860
- y(() => {
861
- if (onSizeUpdate) onSizeUpdate({
862
- width: textWidth,
863
- height: textHeight
864
- });
865
- }, [
866
- textWidth,
867
- textHeight,
868
- onSizeUpdate
869
- ]);
870
- const onTextSizeUpdate = q((size) => {
871
- setTextWidthUpdate(size.width);
872
- setTextHeightUpdate(size.height);
873
- }, []);
874
- const w$2 = textWidth + padding * 2 + strokeWidth;
875
- const h$2 = textHeight + padding * 2 + strokeWidth;
876
- const textOffsetY = Math.floor(height / 10);
877
- return /* @__PURE__ */ u(k, { children: [/* @__PURE__ */ u(Rectangle, {
878
- width: w$2,
879
- height: h$2,
880
- fill,
881
- stroke,
882
- strokeWidth,
883
- cornerRadius
884
- }), /* @__PURE__ */ u("g", {
885
- transform: `translate(0 ${textOffsetY})`,
886
- children: /* @__PURE__ */ u(Text, {
887
- text,
888
- fontFamily,
889
- height,
890
- fill: textFill,
891
- onSizeUpdate: onTextSizeUpdate
892
- })
893
- })] });
894
- };
895
- const LabelledRect = ({ text, height = 12, width = 12, fontFamily = "Verdana", fontSize = 10, padding = 3, fill = "whitesmoke", stroke = "lightgray", textFill = "black", strokeWidth = 1, cornerRadius = 0, onSizeUpdate }) => {
896
- const [actualWidth, setActualWidthUpdate] = d(width);
897
- const [actualHeight, setActualHeightUpdate] = d(height);
898
- _$1(() => {
899
- const size = Utility.textSize(text, fontFamily, fontSize);
900
- setActualWidthUpdate(size.width + padding * 2);
901
- setActualHeightUpdate(size.height + padding * 2);
902
- }, [
903
- text,
904
- fontFamily,
905
- fontSize,
906
- padding
907
- ]);
908
- _$1(() => {
909
- if (onSizeUpdate) onSizeUpdate({
910
- width: actualWidth,
911
- height: actualHeight
912
- });
913
- }, [
914
- actualWidth,
915
- actualHeight,
916
- padding,
917
- onSizeUpdate
918
- ]);
919
- return /* @__PURE__ */ u(k, { children: [/* @__PURE__ */ u(Rectangle, {
920
- width,
921
- height,
922
- fill,
923
- stroke,
924
- strokeWidth,
925
- cornerRadius
926
- }), /* @__PURE__ */ u("g", {
927
- transform: `translate(${-(width / 2) + padding} ${-(height / 2) + padding})`,
928
- children: /* @__PURE__ */ u(TextLine, {
929
- text,
930
- fontFamily,
931
- height: fontSize,
932
- fill: textFill,
933
- anchor: "start",
934
- baseline: "hanging"
935
- })
936
- })] });
937
- };
938
- const IconLabelledRect = ({ icon, iconFontFamily, text, height = 12, width = 12, fontFamily = "Verdana", fontSize = 10, padding = 3, fill = "whitesmoke", stroke = "lightgray", textFill = "black", strokeWidth = 1, cornerRadius = 0 }) => {
939
- return /* @__PURE__ */ u(k, { children: [
940
- /* @__PURE__ */ u(Rectangle, {
941
- width,
942
- height,
943
- fill,
944
- stroke,
945
- strokeWidth,
946
- cornerRadius
947
- }),
948
- /* @__PURE__ */ u("g", {
949
- transform: `translate(${-(width / 2) + padding} ${-(height / 2) + padding})`,
950
- children: /* @__PURE__ */ u(Icon, {
951
- shape: "square",
952
- imageFontFamily: iconFontFamily,
953
- imageChar: icon,
954
- height,
955
- fill,
956
- imageCharFill: textFill
957
- })
958
- }),
959
- /* @__PURE__ */ u("g", {
960
- transform: `translate(${-(width / 2) + padding * 2 + height} ${-(height / 2) + padding})`,
961
- children: /* @__PURE__ */ u(TextLine, {
962
- text,
963
- fontFamily,
964
- height: fontSize,
965
- fill: textFill,
966
- anchor: "start",
967
- baseline: "hanging"
968
- })
969
- })
970
- ] });
971
- };
972
-
973
- //#endregion
974
- //#region src/edge.tsx
975
- const Edge = ({ label, labelPos, labelFill = "black", labelHeight = 12, path, stroke, strokeWidth, strokeDasharray }) => {
976
- return /* @__PURE__ */ u(k, { children: [/* @__PURE__ */ u("path", {
977
- d: path,
978
- stroke,
979
- style: {
980
- strokeWidth,
981
- strokeDasharray
982
- }
983
- }), label && labelPos && labelPos.length === 2 ? /* @__PURE__ */ u("g", {
984
- transform: `translate(${labelPos[0]} ${labelPos[1]})`,
985
- children: /* @__PURE__ */ u(Text, {
986
- text: label,
987
- fill: labelFill,
988
- height: labelHeight
989
- })
990
- }) : void 0] });
991
- };
992
-
993
- //#endregion
994
- //#region src/render.ts
995
- function render(C$2, props, parent, replaceNode) {
996
- G(_(C$2, props), parent, replaceNode);
997
- }
998
- function svgRender(C$2, props, parent, replaceNode) {
999
- G(_("svg", null, _(C$2, props)), parent, replaceNode);
1000
- }
1001
- var HTMLAdapter = class extends HTMLWidget {
1002
- props(_$2) {
1003
- if (!arguments.length) return this._props;
1004
- this._props = {
1005
- ...this._props,
1006
- ..._$2
1007
- };
1008
- return this;
1009
- }
1010
- prop(_$2, value) {
1011
- if (arguments.length === 1) return this._props[_$2];
1012
- this._props[_$2] = value;
1013
- return this;
1014
- }
1015
- constructor(_component) {
1016
- super();
1017
- this._component = _component;
1018
- }
1019
- update(domNode, element) {
1020
- super.update(domNode, element);
1021
- render(this._component, this._props, domNode);
1022
- }
1023
- };
1024
- HTMLAdapter.prototype._class += " react_HTMLAdapter";
1025
- HTMLAdapter.prototype.publish("props", {}, "object", "Properties");
1026
- var SVGAdapter = class extends SVGWidget {
1027
- props(_$2) {
1028
- if (!arguments.length) return this._props;
1029
- this._props = {
1030
- ...this._props,
1031
- ..._$2
1032
- };
1033
- return this;
1034
- }
1035
- prop(_$2, value) {
1036
- if (arguments.length === 1) return this._props[_$2];
1037
- this._props[_$2] = value;
1038
- return this;
1039
- }
1040
- constructor(_component) {
1041
- super();
1042
- this._component = _component;
1043
- }
1044
- update(domNode, element) {
1045
- super.update(domNode, element);
1046
- render(this._component, this._props, domNode);
1047
- }
1048
- };
1049
- SVGAdapter.prototype._class += " react_SVGAdapter";
1050
- SVGAdapter.prototype.publish("props", {}, "object", "Properties");
1051
-
1052
- //#endregion
1053
- //#region src/span.tsx
1054
- const Span = ({ text }) => /* @__PURE__ */ u("span", { children: text });
1055
-
1056
- //#endregion
1057
- //#region src/vertex.tsx
1058
- const Annotations = ({ x: x$1, y: y$2, annotationIDs = [], stepSize = -16 }) => {
1059
- return /* @__PURE__ */ u(k, { children: annotationIDs.map((id, i$3) => /* @__PURE__ */ u("g", {
1060
- transform: `translate(${x$1 + i$3 * stepSize} ${y$2})`,
1061
- children: /* @__PURE__ */ u("use", { xlinkHref: "#" + id })
1062
- }, id)) });
1063
- };
1064
- const Vertex = ({ categoryID = "", text = "", textHeight = 12, textPadding = 4, icon = {}, annotationsHeight = 12, annotationIDs = [], textFill, textboxFill, textboxStroke, textFontFamily, onSizeUpdate, showLabel = true, scale = 1 }) => {
1065
- icon = {
1066
- imageChar: "fa-question",
1067
- height: 32,
1068
- fill: "transparent",
1069
- ...icon
1070
- };
1071
- const [textBoxWidth, setTextBoxWidthUpdate] = d(0);
1072
- const [textBoxHeight, setTextBoxHeightUpdate] = d(0);
1073
- y(() => {
1074
- if (onSizeUpdate) onSizeUpdate({
1075
- width: 0,
1076
- height: 0
1077
- });
1078
- }, [
1079
- textBoxWidth,
1080
- textBoxHeight,
1081
- onSizeUpdate
1082
- ]);
1083
- let width = textBoxWidth;
1084
- width += 4;
1085
- let offsetY = -(icon.height * 2 / 6 + textHeight + 8) / 2;
1086
- const textboxOffsetY = icon.height / 3 + textBoxHeight / 2 + textPadding;
1087
- let annotationOffsetY = icon.height / 3 + textBoxHeight + textPadding + annotationsHeight / 3;
1088
- if (!showLabel) {
1089
- offsetY += (textHeight + 8) / 2;
1090
- annotationOffsetY -= textBoxHeight + textPadding;
1091
- }
1092
- const onTextBoxSizeUpdate = q((size) => {
1093
- setTextBoxWidthUpdate(size.width);
1094
- setTextBoxHeightUpdate(size.height);
1095
- }, []);
1096
- const label = showLabel ? /* @__PURE__ */ u("g", {
1097
- transform: `translate(0 ${textboxOffsetY})`,
1098
- children: /* @__PURE__ */ u(TextBox, {
1099
- text,
1100
- height: textHeight,
1101
- padding: textPadding,
1102
- onSizeUpdate: onTextBoxSizeUpdate,
1103
- textFill,
1104
- fill: textboxFill,
1105
- stroke: textboxStroke,
1106
- fontFamily: textFontFamily
1107
- })
1108
- }) : void 0;
1109
- return categoryID ? /* @__PURE__ */ u("g", {
1110
- transform: `translate(0 ${offsetY}) scale(${scale})`,
1111
- children: [
1112
- /* @__PURE__ */ u("use", { xlinkHref: "#" + categoryID }),
1113
- label,
1114
- /* @__PURE__ */ u(Annotations, {
1115
- x: width / 2,
1116
- y: annotationOffsetY,
1117
- annotationIDs
1118
- })
1119
- ]
1120
- }) : /* @__PURE__ */ u("g", {
1121
- transform: `translate(0 ${offsetY}) scale(${scale})`,
1122
- children: [/* @__PURE__ */ u(Icon, { ...icon }), label]
1123
- });
1124
- };
1125
-
1126
- //#endregion
1127
- //#region src/vertex2.tsx
1128
- const Vertex2 = ({ categoryID = "", text = "", textHeight = 12, textPadding = 4, icon = {}, textFill = "black", textboxFill = "white", textboxStroke = "black", textFontFamily, annotationsHeight = 12, annotationIDs = [] }) => {
1129
- icon = {
1130
- imageChar: "fa-question",
1131
- imageCharFill: "white",
1132
- height: 32,
1133
- fill: "black",
1134
- shape: "square",
1135
- ...icon
1136
- };
1137
- const textBoxHeight = textHeight + textPadding * 2;
1138
- const { width } = T(() => {
1139
- return Utility.textSize(text, textFontFamily, textHeight, false);
1140
- }, [
1141
- text,
1142
- textFontFamily,
1143
- textHeight
1144
- ]);
1145
- const stepSize = annotationsHeight;
1146
- const textboxStrokeWidth = 1;
1147
- const halfTextboxHeight = textBoxHeight / 2;
1148
- const offsetX = 0;
1149
- const offsetY = -(icon.height * 2 / 6 + textHeight + 8) / 2;
1150
- const iconOffsetX = -icon.height / 2;
1151
- const iconOffsetY = 0;
1152
- const textboxOffsetX = Math.ceil(width / 2 + textPadding);
1153
- const textboxOffsetY = halfTextboxHeight - icon.height / 2;
1154
- const annotationOffsetX = stepSize / 2;
1155
- const annotationOffsetY = halfTextboxHeight;
1156
- return categoryID ? /* @__PURE__ */ u("g", {
1157
- transform: `translate(${offsetX} ${offsetY})`,
1158
- children: [
1159
- /* @__PURE__ */ u("g", {
1160
- transform: `translate(${iconOffsetX} ${iconOffsetY})`,
1161
- children: /* @__PURE__ */ u("use", { xlinkHref: "#" + categoryID })
1162
- }),
1163
- /* @__PURE__ */ u("g", {
1164
- transform: `translate(${textboxOffsetX} ${textboxOffsetY})`,
1165
- children: /* @__PURE__ */ u(TextBox, {
1166
- text,
1167
- height: textHeight,
1168
- padding: textPadding,
1169
- strokeWidth: textboxStrokeWidth,
1170
- stroke: textboxStroke,
1171
- fill: textboxFill,
1172
- textFill,
1173
- fontFamily: textFontFamily
1174
- })
1175
- }),
1176
- /* @__PURE__ */ u(Annotations, {
1177
- x: annotationOffsetX,
1178
- y: annotationOffsetY,
1179
- annotationIDs,
1180
- stepSize
1181
- })
1182
- ]
1183
- }) : /* @__PURE__ */ u(k, { children: [/* @__PURE__ */ u("g", {
1184
- transform: `translate(${iconOffsetX} ${iconOffsetY})scale(1.0002)`,
1185
- children: /* @__PURE__ */ u(Icon, {
1186
- ...icon,
1187
- shape: "square"
1188
- })
1189
- }), /* @__PURE__ */ u("g", {
1190
- transform: `translate(${textboxOffsetX} ${textboxOffsetY})scale(1.0002)`,
1191
- children: /* @__PURE__ */ u(TextBox, {
1192
- text,
1193
- height: textHeight,
1194
- padding: textPadding,
1195
- stroke: textboxStroke,
1196
- fill: textboxFill
1197
- })
1198
- })] });
1199
- };
1200
-
1201
- //#endregion
1202
- //#region src/vertex3.tsx
1203
- const Vertex3 = ({ text = "", textHeight = 10, textPadding = 4, textFill = "#287EC4", textboxFill = "white", textboxStroke = "#CCCCCC", textboxStrokeWidth = 1, textFontFamily = "Verdana", annotationGutter = 2, annotations = [], cornerRadius = 3, icon = {}, subText = { text: "" }, showLabel = true, noLabelRadius = 5, expansionIcon, scale = 1 }) => {
1204
- icon = {
1205
- height: 50,
1206
- imageChar: "?",
1207
- imageFontFamily: "FontAwesome",
1208
- imageCharFill: "#555555",
1209
- fill: "transparent",
1210
- strokeWidth: 0,
1211
- ...icon
1212
- };
1213
- subText = {
1214
- text: "",
1215
- fill: "white",
1216
- textFill: "#555555",
1217
- ...subText
1218
- };
1219
- expansionIcon = expansionIcon ? {
1220
- height: 16,
1221
- shape: "circle",
1222
- padding: 6,
1223
- imageChar: "?",
1224
- imageFontFamily: "FontAwesome",
1225
- imageCharFill: "black",
1226
- fill: "whitesmoke",
1227
- stroke: "whitesmoke",
1228
- strokeWidth: 0,
1229
- ...expansionIcon
1230
- } : void 0;
1231
- let fullAnnotationWidth = 0;
1232
- const annoOffsetY = 0;
1233
- const labelWidth = T(() => {
1234
- return Utility.textSize(text, textFontFamily, textHeight, false).width;
1235
- }, [
1236
- text,
1237
- textFontFamily,
1238
- textHeight
1239
- ]);
1240
- let labelShapeWidth = 0;
1241
- if (text !== "") labelShapeWidth = labelWidth + textPadding * 2 + textboxStrokeWidth * 2;
1242
- fullAnnotationWidth += labelShapeWidth + annotationGutter;
1243
- const textOffsetX = fullAnnotationWidth - labelShapeWidth / 2;
1244
- const textShapeHeight = textHeight + textPadding * 2 + textboxStrokeWidth * 2;
1245
- const annotationArr = [];
1246
- annotations.forEach((anno, idx) => {
1247
- const annoText = anno.imageChar;
1248
- const annoShapeWidth = textShapeHeight;
1249
- fullAnnotationWidth += annoShapeWidth + annotationGutter;
1250
- const annoOffsetX = fullAnnotationWidth - annoShapeWidth / 2;
1251
- annotationArr.push(/* @__PURE__ */ u("g", {
1252
- className: "vertex3-anno",
1253
- "data-click": "annotation",
1254
- "data-click-data": JSON.stringify(anno),
1255
- transform: `translate(${annoOffsetX} ${annoOffsetY})`,
1256
- children: /* @__PURE__ */ u(Icon, {
1257
- ...anno,
1258
- shape: "square",
1259
- height: textShapeHeight,
1260
- imageChar: annoText,
1261
- imageFontFamily: anno.imageFontFamily,
1262
- cornerRadius,
1263
- strokeWidth: 0
1264
- })
1265
- }, idx));
1266
- });
1267
- if (annotations.length > 0) fullAnnotationWidth += annotationGutter * (annotations.length - 1);
1268
- const textElement = /* @__PURE__ */ u("g", {
1269
- "data-click": "text",
1270
- transform: `translate(${textOffsetX} ${annoOffsetY})`,
1271
- children: !showLabel || text === "" ? /* @__PURE__ */ u("circle", {
1272
- r: noLabelRadius,
1273
- stroke: textboxStroke,
1274
- fill: textFill
1275
- }) : /* @__PURE__ */ u(TextBox, {
1276
- text,
1277
- height: textHeight,
1278
- padding: textPadding,
1279
- strokeWidth: textboxStrokeWidth,
1280
- stroke: textboxStroke,
1281
- fill: textboxFill,
1282
- textFill,
1283
- fontFamily: textFontFamily,
1284
- cornerRadius
1285
- })
1286
- });
1287
- const iconHeight = icon.height || 20;
1288
- const iconStrokeWidth = icon.strokeWidth || 0;
1289
- const iconOffsetX = 0;
1290
- let iconOffsetY = 0;
1291
- const subTextOffsetX = 0;
1292
- let subTextOffsetY = textShapeHeight + annotationGutter * 2;
1293
- if (text !== "" || annotationArr.length > 0) iconOffsetY = -(iconHeight / 2) - iconStrokeWidth - textShapeHeight / 2 - annotationGutter * 2;
1294
- else if (subText.text !== "") subTextOffsetY = iconHeight / 2 + iconStrokeWidth + annotationGutter * 2;
1295
- const subtextElement = subText.text === "" ? null : /* @__PURE__ */ u("g", {
1296
- "data-click": "subtext",
1297
- transform: `translate(${subTextOffsetX} ${subTextOffsetY})`,
1298
- children: /* @__PURE__ */ u(TextBox, {
1299
- fill: subText.fill || "#FFFFFF",
1300
- textFill: subText.textFill || textFill,
1301
- ...subText,
1302
- height: textHeight,
1303
- padding: textPadding,
1304
- strokeWidth: 0,
1305
- stroke: textboxStroke,
1306
- fontFamily: textFontFamily,
1307
- cornerRadius
1308
- })
1309
- });
1310
- return /* @__PURE__ */ u("g", {
1311
- transform: `scale(${scale})`,
1312
- children: [
1313
- /* @__PURE__ */ u("g", {
1314
- "data-click": "icon",
1315
- transform: `translate(${iconOffsetX} ${iconOffsetY})`,
1316
- children: [/* @__PURE__ */ u(Icon, { ...icon }), expansionIcon && /* @__PURE__ */ u("g", {
1317
- "data-click": "expanded-icon",
1318
- "data-click-data": JSON.stringify(expansionIcon),
1319
- transform: `translate(${(icon.height + iconStrokeWidth) / 2 - expansionIcon.height / 2} ${-(icon.height + iconStrokeWidth) / 2 + expansionIcon.height / 2})`,
1320
- children: /* @__PURE__ */ u(Icon, { ...expansionIcon })
1321
- })]
1322
- }),
1323
- /* @__PURE__ */ u("g", {
1324
- transform: `translate(${-fullAnnotationWidth / 2} ${annoOffsetY})`,
1325
- children: [textElement, annotationArr]
1326
- }),
1327
- subtextElement
1328
- ]
1329
- });
1330
- };
1331
- const CentroidVertex3 = function({ id, categoryID = "", text = "", textHeight = 12, textPadding = 10, textFill = "#287EC4", textboxFill = "white", textboxStroke = "#CCCCCC", textboxStrokeWidth = 1, textFontFamily = "Verdana", annotationGutter = 2, annotations = [], cornerRadius, icon = {}, subText = {}, expansionIcon, scale = 1 }) {
1332
- icon = {
1333
- height: 91,
1334
- padding: 40,
1335
- imageCharFill: "#555555",
1336
- imageFontFamily: "FontAwesome",
1337
- fill: "#FFCC33",
1338
- stroke: "#DFDFDF",
1339
- imageChar: "?",
1340
- strokeWidth: 4,
1341
- yOffset: -15,
1342
- ...icon
1343
- };
1344
- subText = {
1345
- text: "",
1346
- fill: "transparent",
1347
- textFill: "#555555",
1348
- ...subText
1349
- };
1350
- return /* @__PURE__ */ u(Vertex3, {
1351
- id,
1352
- categoryID,
1353
- text,
1354
- textHeight,
1355
- textPadding,
1356
- textFill,
1357
- textboxFill,
1358
- textboxStroke,
1359
- textboxStrokeWidth,
1360
- textFontFamily,
1361
- annotationGutter,
1362
- annotations,
1363
- cornerRadius,
1364
- icon,
1365
- subText,
1366
- expansionIcon,
1367
- scale,
1368
- icon,
1369
- subText
1370
- });
1371
- };
1372
-
1373
- //#endregion
1374
- //#region src/vertex4.tsx
1375
- const Vertex4 = ({ categoryID = "", text = "", textHeight = 10, textPadding = 4, textFill = "#287EC4", textboxFill = "white", textboxStroke = "#CCCCCC", textboxStrokeWidth = 1, textFontFamily = "Verdana", annotationGutter = 2, annotations = [], iconAnnotations = [], cornerRadius = 3, icon = {}, subText = {}, showLabel = true, noLabelRadius = 5, iconBorderWidth = 1, iconBorderColor = "#333", iconBackgroundColor = "#fff", iconFontColor = "#000", iconFontSize = 20, iconFontFamily = "FontAwesome", shapeOffsetX = 0, shapeOffsetY = 0, iconOffsetX = 0, iconOffsetY = 0, iconPadding = 4, iconText = "?", shapeRendering = "auto" }) => {
1376
- icon = {
1377
- height: 50,
1378
- imageChar: "?",
1379
- imageFontFamily: "FontAwesome",
1380
- imageCharFill: "#555555",
1381
- fill: "transparent",
1382
- strokeWidth: 0,
1383
- ...icon
1384
- };
1385
- subText = {
1386
- text: "",
1387
- fill: "white",
1388
- textFill: "#555555",
1389
- ...subText
1390
- };
1391
- const annoOffsetY = 0;
1392
- const labelWidth = T(() => {
1393
- return Utility.textSize(text, textFontFamily, textHeight, false).width;
1394
- }, [
1395
- text,
1396
- textFontFamily,
1397
- textHeight
1398
- ]);
1399
- let labelShapeWidth = 0;
1400
- if (text !== "") labelShapeWidth = labelWidth + textPadding * 2 + textboxStrokeWidth * 2;
1401
- let fullAnnotationWidth = labelShapeWidth + annotationGutter;
1402
- const textOffsetX = fullAnnotationWidth - labelShapeWidth / 2;
1403
- const textShapeHeight = textHeight + annotationGutter * 2 + textboxStrokeWidth * 2;
1404
- const annoWidthArr = annotations.map((anno) => {
1405
- return Utility.textSize(anno.imageChar, anno.imageFontFamily, anno.height, false).width;
1406
- });
1407
- const annotationArr = [];
1408
- let _labelAnnoOffsetX = fullAnnotationWidth;
1409
- annotations.forEach((anno, i$3) => {
1410
- const annoText = anno.imageChar;
1411
- const annoTextHeight = anno.height ?? textShapeHeight;
1412
- _labelAnnoOffsetX += annoWidthArr[i$3] + annotationGutter;
1413
- const annoOffsetX = _labelAnnoOffsetX - annoWidthArr[i$3] / 2;
1414
- annotationArr.push(/* @__PURE__ */ u("g", {
1415
- className: "vertex3-anno",
1416
- "data-click": "annotation",
1417
- "data-click-data": JSON.stringify(anno),
1418
- transform: `translate(${annoOffsetX} ${annoOffsetY})`,
1419
- children: /* @__PURE__ */ u(Icon, {
1420
- ...anno,
1421
- shape: "rectangle",
1422
- width: annoWidthArr[i$3],
1423
- height: annoTextHeight,
1424
- imageChar: annoText,
1425
- imageFontFamily: anno.imageFontFamily,
1426
- cornerRadius,
1427
- strokeWidth: 0
1428
- })
1429
- }, i$3));
1430
- });
1431
- if (annotations.length > 0) fullAnnotationWidth += annotationGutter * (annotations.length - 1);
1432
- const iconAnnotationArr = [];
1433
- iconAnnotations.forEach((anno, i$3) => {
1434
- const x$1 = anno.shapeOffsetX;
1435
- const y$2 = anno.shapeOffsetY;
1436
- iconAnnotationArr.push(/* @__PURE__ */ u("g", {
1437
- className: "vertex3-iconAnno",
1438
- "data-click": "icon-annotation",
1439
- "data-click-data": JSON.stringify(anno),
1440
- transform: `translate(${x$1} ${y$2})`,
1441
- children: /* @__PURE__ */ u(Icon, {
1442
- ...anno,
1443
- shape: anno.shape ?? "square",
1444
- imageChar: anno.imageChar,
1445
- imageFontFamily: anno.imageFontFamily,
1446
- cornerRadius,
1447
- stroke: anno.stroke,
1448
- strokeWidth: anno.strokeWidth
1449
- })
1450
- }, i$3));
1451
- });
1452
- const textElement = /* @__PURE__ */ u("g", {
1453
- "data-click": "text",
1454
- transform: `translate(${textOffsetX} ${annoOffsetY})`,
1455
- children: !showLabel || text === "" ? /* @__PURE__ */ u("circle", {
1456
- r: noLabelRadius,
1457
- stroke: textboxStroke,
1458
- fill: textFill
1459
- }) : /* @__PURE__ */ u(TextBox, {
1460
- text,
1461
- height: textHeight,
1462
- padding: textPadding,
1463
- strokeWidth: textboxStrokeWidth,
1464
- stroke: textboxStroke,
1465
- fill: textboxFill,
1466
- textFill,
1467
- fontFamily: textFontFamily,
1468
- cornerRadius
1469
- })
1470
- });
1471
- const subTextOffsetX = 0;
1472
- const subTextOffsetY = textShapeHeight + annotationGutter * 2;
1473
- const subtextElement = subText.text === "" ? null : /* @__PURE__ */ u("g", {
1474
- "data-click": "subtext",
1475
- transform: `translate(${subTextOffsetX} ${subTextOffsetY})`,
1476
- children: /* @__PURE__ */ u(TextBox, {
1477
- fill: subText.fill || "#FFFFFF",
1478
- textFill: subText.textFill || textFill,
1479
- ...subText,
1480
- height: textHeight,
1481
- padding: textPadding,
1482
- strokeWidth: 0,
1483
- stroke: textboxStroke,
1484
- fontFamily: textFontFamily,
1485
- cornerRadius
1486
- })
1487
- });
1488
- return /* @__PURE__ */ u("g", { children: [
1489
- /* @__PURE__ */ u("g", {
1490
- "data-click": "icon",
1491
- transform: `translate(${shapeOffsetX} ${shapeOffsetY})`,
1492
- children: [/* @__PURE__ */ u(Icon, {
1493
- ...icon,
1494
- strokeWidth: iconBorderWidth,
1495
- shape: "circle",
1496
- height: iconFontSize,
1497
- fill: iconBackgroundColor,
1498
- stroke: iconBorderColor,
1499
- imageFontFamily: iconFontFamily,
1500
- imageChar: iconText,
1501
- imageCharFill: iconFontColor,
1502
- padding: iconPadding,
1503
- xOffset: iconOffsetX,
1504
- yOffset: iconOffsetY,
1505
- cornerRadius,
1506
- shapeRendering
1507
- }), iconAnnotationArr]
1508
- }),
1509
- /* @__PURE__ */ u("g", {
1510
- transform: `translate(${-fullAnnotationWidth / 2} ${annoOffsetY})`,
1511
- children: [textElement, annotationArr]
1512
- }),
1513
- subtextElement
1514
- ] });
1515
- };
1516
- const CentroidVertex4 = function({ id, categoryID = "", text = "", textHeight = 12, textPadding = 10, textFill = "#287EC4", textboxFill = "white", textboxStroke = "#CCCCCC", textboxStrokeWidth = 1, textFontFamily = "Verdana", annotationGutter = 2, annotations = [], iconAnnotations = [], cornerRadius, icon = {}, subText = {}, showLabel = true, noLabelRadius = 5, iconBorderWidth = 1, iconBorderColor = "#333", iconBackgroundColor = "#fff", iconFontColor = "#000", iconFontSize = 20, iconFontFamily = "FontAwesome", shapeOffsetX = 0, shapeOffsetY = 0, iconOffsetX = 0, iconOffsetY = 0, iconPadding = 4, iconText = "?", shapeRendering = "auto" }) {
1517
- icon = {
1518
- height: 91,
1519
- padding: 40,
1520
- imageCharFill: "#555555",
1521
- imageFontFamily: "FontAwesome",
1522
- fill: "#FFCC33",
1523
- stroke: "#DFDFDF",
1524
- imageChar: "?",
1525
- strokeWidth: 4,
1526
- yOffset: -15,
1527
- ...icon
1528
- };
1529
- subText = {
1530
- text: "",
1531
- fill: "transparent",
1532
- textFill: "#555555",
1533
- ...subText
1534
- };
1535
- return /* @__PURE__ */ u(Vertex4, {
1536
- id,
1537
- categoryID,
1538
- text,
1539
- textHeight,
1540
- textPadding,
1541
- textFill,
1542
- textboxFill,
1543
- textboxStroke,
1544
- textboxStrokeWidth,
1545
- textFontFamily,
1546
- annotationGutter,
1547
- annotations,
1548
- iconAnnotations,
1549
- cornerRadius,
1550
- icon,
1551
- subText,
1552
- showLabel,
1553
- noLabelRadius,
1554
- iconBorderWidth,
1555
- iconBorderColor,
1556
- iconBackgroundColor,
1557
- iconFontColor,
1558
- iconFontSize,
1559
- iconFontFamily,
1560
- shapeOffsetX,
1561
- shapeOffsetY,
1562
- iconOffsetX,
1563
- iconOffsetY,
1564
- iconPadding,
1565
- iconText,
1566
- shapeRendering,
1567
- icon,
1568
- subText
1569
- });
1570
- };
1571
-
1572
- //#endregion
1573
- //#region src/subgraph.tsx
1574
- const Subgraph = ({ text, width = 100, height = 100, fill = "transparent", stroke = "black", fontHeight = 12, fontFamily }) => {
1575
- const tSize = Utility.textSize(text, fontFamily, fontHeight, false);
1576
- return /* @__PURE__ */ u(k, { children: [/* @__PURE__ */ u(Rectangle, {
1577
- width,
1578
- height,
1579
- fill,
1580
- stroke
1581
- }), /* @__PURE__ */ u("g", {
1582
- transform: `translate(${(-width + tSize.width) / 2 + 4} ${(-height + tSize.height) / 2 + 4})`,
1583
- children: /* @__PURE__ */ u(Text, {
1584
- height: fontHeight,
1585
- text,
1586
- fontFamily
1587
- })
1588
- })] });
1589
- };
1590
-
1591
- //#endregion
1592
- export { Annotations, BUILD_VERSION, CentroidVertex3, CentroidVertex4, Circle, Edge, HTMLAdapter, Icon, IconLabelledRect, Icons, Image, ImageChar, LabelledRect, PKG_NAME, PKG_VERSION, preact_shim_exports as React, Rectangle, SVGAdapter, Shape, Span, Square, Subgraph, Text, TextBox, TextLine, Vertex, Vertex2, Vertex3, Vertex4, render, svgRender };
1593
- //# sourceMappingURL=index.js.map
1
+ var t=Object.defineProperty,e=(e,n)=>t(e,"name",{value:n,configurable:!0});import{Utility as n,Palette as i,HTMLWidget as o,SVGWidget as r}from"@hpcc-js/common";const l="@hpcc-js/react",_="3.4.2",a="3.16.0";var s,c,u,h,f,d,p,g,m,x,y,v={},k=[],F=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,b=Array.isArray;function C(t,e){for(var n in e)t[n]=e[n];return t}function w(t){t&&t.parentNode&&t.parentNode.removeChild(t)}function S(t,e,n){var i,o,r,l={};for(r in e)"key"==r?i=e[r]:"ref"==r?o=e[r]:l[r]=e[r];if(arguments.length>2&&(l.children=arguments.length>3?s.call(arguments,2):n),"function"==typeof t&&null!=t.defaultProps)for(r in t.defaultProps)void 0===l[r]&&(l[r]=t.defaultProps[r]);return $(t,l,i,o,null)}function $(t,e,n,i,o){var r={type:t,props:e,key:n,ref:i,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:null==o?++u:o,__i:-1,__u:0};return null==o&&null!=c.vnode&&c.vnode(r),r}function R(t){return t.children}function W(t,e){this.props=t,this.context=e}function P(t,e){if(null==e)return t.__?P(t.__,t.__i+1):null;for(var n;e<t.__k.length;e++)if(null!=(n=t.__k[e])&&null!=n.__e)return n.__e;return"function"==typeof t.type?P(t):null}function H(t){var e,n;if(null!=(t=t.__)&&null!=t.__c){for(t.__e=t.__c.base=null,e=0;e<t.__k.length;e++)if(null!=(n=t.__k[e])&&null!=n.__e){t.__e=t.__c.base=n.__e;break}return H(t)}}function O(t){(!t.__d&&(t.__d=!0)&&h.push(t)&&!A.__r++||f!=c.debounceRendering)&&((f=c.debounceRendering)||d)(A)}function A(){for(var t,e,n,i,o,r,l,_=1;h.length;)h.length>_&&h.sort(p),t=h.shift(),_=h.length,t.__d&&(n=void 0,i=void 0,o=(i=(e=t).__v).__e,r=[],l=[],e.__P&&((n=C({},i)).__v=i.__v+1,c.vnode&&c.vnode(n),V(e.__P,n,i,e.__n,e.__P.namespaceURI,32&i.__u?[o]:null,r,null==o?P(i):o,!!(32&i.__u),l),n.__v=i.__v,n.__.__k[n.__i]=n,B(r,n,l),i.__e=i.__=null,n.__e!=o&&H(n)));A.__r=0}function E(t,e,n,i,o,r,l,_,a,s,c){var u,h,f,d,p,g,m,x=i&&i.__k||k,y=e.length;for(a=N(n,e,x,a,y),u=0;u<y;u++)null!=(f=n.__k[u])&&(h=-1==f.__i?v:x[f.__i]||v,f.__i=u,g=V(t,f,h,o,r,l,_,a,s,c),d=f.__e,f.ref&&h.ref!=f.ref&&(h.ref&&G(h.ref,null,f),c.push(f.ref,f.__c||d,f)),null==p&&null!=d&&(p=d),(m=!!(4&f.__u))||h.__k===f.__k?a=T(f,a,t,m):"function"==typeof f.type&&void 0!==g?a=g:d&&(a=d.nextSibling),f.__u&=-7);return n.__e=p,a}function N(t,e,n,i,o){var r,l,_,a,s,c=n.length,u=c,h=0;for(t.__k=new Array(o),r=0;r<o;r++)null!=(l=e[r])&&"boolean"!=typeof l&&"function"!=typeof l?(a=r+h,(l=t.__k[r]="string"==typeof l||"number"==typeof l||"bigint"==typeof l||l.constructor==String?$(null,l,null,null,null):b(l)?$(R,{children:l},null,null,null):null==l.constructor&&l.__b>0?$(l.type,l.props,l.key,l.ref?l.ref:null,l.__v):l).__=t,l.__b=t.__b+1,_=null,-1!=(s=l.__i=U(l,n,a,u))&&(u--,(_=n[s])&&(_.__u|=2)),null==_||null==_.__v?(-1==s&&(o>c?h--:o<c&&h++),"function"!=typeof l.type&&(l.__u|=4)):s!=a&&(s==a-1?h--:s==a+1?h++:(s>a?h--:h++,l.__u|=4))):t.__k[r]=null;if(u)for(r=0;r<c;r++)null!=(_=n[r])&&!(2&_.__u)&&(_.__e==i&&(i=P(_)),X(_,_));return i}function T(t,e,n,i){var o,r;if("function"==typeof t.type){for(o=t.__k,r=0;o&&r<o.length;r++)o[r]&&(o[r].__=t,e=T(o[r],e,n,i));return e}t.__e!=e&&(i&&(e&&t.type&&!e.parentNode&&(e=P(t)),n.insertBefore(t.__e,e||null)),e=t.__e);do{e=e&&e.nextSibling}while(null!=e&&8==e.nodeType);return e}function D(t,e){return e=e||[],null==t||"boolean"==typeof t||(b(t)?t.some(function(t){D(t,e)}):e.push(t)),e}function U(t,e,n,i){var o,r,l,_=t.key,a=t.type,s=e[n],c=null!=s&&!(2&s.__u);if(null===s&&null==t.key||c&&_==s.key&&a==s.type)return n;if(i>(c?1:0))for(o=n-1,r=n+1;o>=0||r<e.length;)if(null!=(s=e[l=o>=0?o--:r++])&&!(2&s.__u)&&_==s.key&&a==s.type)return l;return-1}function L(t,e,n){"-"==e[0]?t.setProperty(e,null==n?"":n):t[e]=null==n?"":"number"!=typeof n||F.test(e)?n:n+"px"}function z(t,e,n,i,o){var r,l;t:if("style"==e)if("string"==typeof n)t.style.cssText=n;else{if("string"==typeof i&&(t.style.cssText=i=""),i)for(e in i)n&&e in n||L(t.style,e,"");if(n)for(e in n)i&&n[e]==i[e]||L(t.style,e,n[e])}else if("o"==e[0]&&"n"==e[1])r=e!=(e=e.replace(g,"$1")),l=e.toLowerCase(),e=l in t||"onFocusOut"==e||"onFocusIn"==e?l.slice(2):e.slice(2),t.l||(t.l={}),t.l[e+r]=n,n?i?n.u=i.u:(n.u=m,t.addEventListener(e,r?y:x,r)):t.removeEventListener(e,r?y:x,r);else{if("http://www.w3.org/2000/svg"==o)e=e.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!=e&&"height"!=e&&"href"!=e&&"list"!=e&&"form"!=e&&"tabIndex"!=e&&"download"!=e&&"rowSpan"!=e&&"colSpan"!=e&&"role"!=e&&"popover"!=e&&e in t)try{t[e]=null==n?"":n;break t}catch(_){}"function"==typeof n||(null==n||!1===n&&"-"!=e[4]?t.removeAttribute(e):t.setAttribute(e,"popover"==e&&1==n?"":n))}}function I(t){return function(e){if(this.l){var n=this.l[e.type+t];if(null==e.t)e.t=m++;else if(e.t<n.u)return;return n(c.event?c.event(e):e)}}}function V(t,e,n,i,o,r,l,_,a,s){var u,h,f,d,p,g,m,x,y,v,k,F,S,$,P,H,O,A=e.type;if(null!=e.constructor)return null;128&n.__u&&(a=!!(32&n.__u),r=[_=e.__e=n.__e]),(u=c.__b)&&u(e);t:if("function"==typeof A)try{if(x=e.props,y="prototype"in A&&A.prototype.render,v=(u=A.contextType)&&i[u.__c],k=u?v?v.props.value:u.__:i,n.__c?m=(h=e.__c=n.__c).__=h.__E:(y?e.__c=h=new A(x,k):(e.__c=h=new W(x,k),h.constructor=A,h.render=Y),v&&v.sub(h),h.props=x,h.state||(h.state={}),h.context=k,h.__n=i,f=h.__d=!0,h.__h=[],h._sb=[]),y&&null==h.__s&&(h.__s=h.state),y&&null!=A.getDerivedStateFromProps&&(h.__s==h.state&&(h.__s=C({},h.__s)),C(h.__s,A.getDerivedStateFromProps(x,h.__s))),d=h.props,p=h.state,h.__v=e,f)y&&null==A.getDerivedStateFromProps&&null!=h.componentWillMount&&h.componentWillMount(),y&&null!=h.componentDidMount&&h.__h.push(h.componentDidMount);else{if(y&&null==A.getDerivedStateFromProps&&x!==d&&null!=h.componentWillReceiveProps&&h.componentWillReceiveProps(x,k),!h.__e&&null!=h.shouldComponentUpdate&&!1===h.shouldComponentUpdate(x,h.__s,k)||e.__v==n.__v){for(e.__v!=n.__v&&(h.props=x,h.state=h.__s,h.__d=!1),e.__e=n.__e,e.__k=n.__k,e.__k.some(function(t){t&&(t.__=e)}),F=0;F<h._sb.length;F++)h.__h.push(h._sb[F]);h._sb=[],h.__h.length&&l.push(h);break t}null!=h.componentWillUpdate&&h.componentWillUpdate(x,h.__s,k),y&&null!=h.componentDidUpdate&&h.__h.push(function(){h.componentDidUpdate(d,p,g)})}if(h.context=k,h.props=x,h.__P=t,h.__e=!1,S=c.__r,$=0,y){for(h.state=h.__s,h.__d=!1,S&&S(e),u=h.render(h.props,h.state,h.context),P=0;P<h._sb.length;P++)h.__h.push(h._sb[P]);h._sb=[]}else do{h.__d=!1,S&&S(e),u=h.render(h.props,h.state,h.context),h.state=h.__s}while(h.__d&&++$<25);h.state=h.__s,null!=h.getChildContext&&(i=C(C({},i),h.getChildContext())),y&&!f&&null!=h.getSnapshotBeforeUpdate&&(g=h.getSnapshotBeforeUpdate(d,p)),H=u,null!=u&&u.type===R&&null==u.key&&(H=j(u.props.children)),_=E(t,b(H)?H:[H],e,n,i,o,r,l,_,a,s),h.base=e.__e,e.__u&=-161,h.__h.length&&l.push(h),m&&(h.__E=h.__=null)}catch(N){if(e.__v=null,a||null!=r)if(N.then){for(e.__u|=a?160:128;_&&8==_.nodeType&&_.nextSibling;)_=_.nextSibling;r[r.indexOf(_)]=null,e.__e=_}else{for(O=r.length;O--;)w(r[O]);M(e)}else e.__e=n.__e,e.__k=n.__k,N.then||M(e);c.__e(N,e,n)}else null==r&&e.__v==n.__v?(e.__k=n.__k,e.__e=n.__e):_=e.__e=q(n.__e,e,n,i,o,r,l,a,s);return(u=c.diffed)&&u(e),128&e.__u?void 0:_}function M(t){t&&t.__c&&(t.__c.__e=!0),t&&t.__k&&t.__k.forEach(M)}function B(t,e,n){for(var i=0;i<n.length;i++)G(n[i],n[++i],n[++i]);c.__c&&c.__c(e,t),t.some(function(e){try{t=e.__h,e.__h=[],t.some(function(t){t.call(e)})}catch(n){c.__e(n,e.__v)}})}function j(t){return"object"!=typeof t||null==t||t.__b&&t.__b>0?t:b(t)?t.map(j):C({},t)}function q(t,e,n,i,o,r,l,_,a){var u,h,f,d,p,g,m,x=n.props,y=e.props,k=e.type;if("svg"==k?o="http://www.w3.org/2000/svg":"math"==k?o="http://www.w3.org/1998/Math/MathML":o||(o="http://www.w3.org/1999/xhtml"),null!=r)for(u=0;u<r.length;u++)if((p=r[u])&&"setAttribute"in p==!!k&&(k?p.localName==k:3==p.nodeType)){t=p,r[u]=null;break}if(null==t){if(null==k)return document.createTextNode(y);t=document.createElementNS(o,k,y.is&&y),_&&(c.__m&&c.__m(e,r),_=!1),r=null}if(null==k)x===y||_&&t.data==y||(t.data=y);else{if(r=r&&s.call(t.childNodes),x=n.props||v,!_&&null!=r)for(x={},u=0;u<t.attributes.length;u++)x[(p=t.attributes[u]).name]=p.value;for(u in x)if(p=x[u],"children"==u);else if("dangerouslySetInnerHTML"==u)f=p;else if(!(u in y)){if("value"==u&&"defaultValue"in y||"checked"==u&&"defaultChecked"in y)continue;z(t,u,null,p,o)}for(u in y)p=y[u],"children"==u?d=p:"dangerouslySetInnerHTML"==u?h=p:"value"==u?g=p:"checked"==u?m=p:_&&"function"!=typeof p||x[u]===p||z(t,u,p,x[u],o);if(h)_||f&&(h.__html==f.__html||h.__html==t.innerHTML)||(t.innerHTML=h.__html),e.__k=[];else if(f&&(t.innerHTML=""),E("template"==e.type?t.content:t,b(d)?d:[d],e,n,i,"foreignObject"==k?"http://www.w3.org/1999/xhtml":o,r,l,r?r[0]:n.__k&&P(n,0),_,a),null!=r)for(u=r.length;u--;)w(r[u]);_||(u="value","progress"==k&&null==g?t.removeAttribute("value"):null!=g&&(g!==t[u]||"progress"==k&&!g||"option"==k&&g!=x[u])&&z(t,u,g,x[u],o),u="checked",null!=m&&m!=t[u]&&z(t,u,m,x[u],o))}return t}function G(t,e,n){try{if("function"==typeof t){var i="function"==typeof t.__u;i&&t.__u(),i&&null==e||(t.__u=t(e))}else t.current=e}catch(o){c.__e(o,n)}}function X(t,e,n){var i,o;if(c.unmount&&c.unmount(t),(i=t.ref)&&(i.current&&i.current!=t.__e||G(i,null,e)),null!=(i=t.__c)){if(i.componentWillUnmount)try{i.componentWillUnmount()}catch(r){c.__e(r,e)}i.base=i.__P=null}if(i=t.__k)for(o=0;o<i.length;o++)i[o]&&X(i[o],e,n||"function"!=typeof t.type);n||w(t.__e),t.__c=t.__=t.__e=void 0}function Y(t,e,n){return this.constructor(t,n)}function J(t,e,n){var i,o,r,l;e==document&&(e=document.documentElement),c.__&&c.__(t,e),o=(i="function"==typeof n)?null:n&&n.__k||e.__k,r=[],l=[],V(e,t=(!i&&n||e).__k=S(R,null,[t]),o||v,v,e.namespaceURI,!i&&n?[n]:o?null:e.firstChild?s.call(e.childNodes):null,r,!i&&n?n:o?o.__e:e.firstChild,i,l),B(r,t,l)}e(C,"d$1"),e(w,"g$1"),e(S,"_$1"),e($,"m$1"),e(R,"k$1"),e(W,"x"),e(P,"S"),e(H,"C$1"),e(O,"M"),e(A,"$"),e(E,"I"),e(N,"P$1"),e(T,"A"),e(D,"H$1"),e(U,"L"),e(L,"T$2"),e(z,"j$2"),e(I,"F$1"),e(V,"O"),e(M,"z$1"),e(B,"N$1"),e(j,"V$1"),e(q,"q$2"),e(G,"B$2"),e(X,"D$1"),e(Y,"E$1"),e(J,"G$1"),s=k.slice,c={__e:/* @__PURE__ */e(function(t,e,n,i){for(var o,r,l;e=e.__;)if((o=e.__c)&&!o.__)try{if((r=o.constructor)&&null!=r.getDerivedStateFromError&&(o.setState(r.getDerivedStateFromError(t)),l=o.__d),null!=o.componentDidCatch&&(o.componentDidCatch(t,i||{}),l=o.__d),l)return o.__E=o}catch(_){t=_}throw t},"__e")},u=0,W.prototype.setState=function(t,e){var n;n=null!=this.__s&&this.__s!=this.state?this.__s:this.__s=C({},this.state),"function"==typeof t&&(t=t(C({},n),this.props)),t&&C(n,t),null!=t&&this.__v&&(e&&this._sb.push(e),O(this))},W.prototype.forceUpdate=function(t){this.__v&&(this.__e=!0,t&&this.__h.push(t),O(this))},W.prototype.render=R,h=[],d="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,p=/* @__PURE__ */e(function(t,e){return t.__v.__b-e.__v.__b},"e$1"),A.__r=0,g=/(PointerCapture)$|Capture$/i,m=0,x=I(!1),y=I(!0);var Z=0;function K(t,e,n,i,o,r){e||(e={});var l,_,a=e;if("ref"in a)for(_ in a={},e)"ref"==_?l=e[_]:a[_]=e[_];var s={type:t,props:a,key:n,ref:l,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--Z,__i:-1,__u:0,__source:o,__self:r};if("function"==typeof t&&(l=t.defaultProps))for(_ in l)void 0===a[_]&&(a[_]=l[_]);return c.vnode&&c.vnode(s),s}e(K,"u$1");var Q,tt,et,nt,it=0,ot=[],rt=c,lt=rt.__b,_t=rt.__r,at=rt.diffed,st=rt.__c,ct=rt.unmount,ut=rt.__;function ht(t,e){rt.__h&&rt.__h(tt,t,it||e),it=0;var n=tt.__H||(tt.__H={__:[],__h:[]});return t>=n.__.length&&n.__.push({}),n.__[t]}function ft(t){return it=1,dt(wt,t)}function dt(t,n,i){var o=ht(Q++,2);if(o.t=t,!o.__c&&(o.__=[i?i(n):wt(void 0,n),function(t){var e=o.__N?o.__N[0]:o.__[0],n=o.t(e,t);e!==n&&(o.__N=[n,o.__[1]],o.__c.setState({}))}],o.__c=tt,!tt.__f)){var r=/* @__PURE__ */e(function(t,e,n){if(!o.__c.__H)return!0;var i=o.__c.__H.__.filter(function(t){return!!t.__c});if(i.every(function(t){return!t.__N}))return!l||l.call(this,t,e,n);var r=o.__c.props!==t;return i.forEach(function(t){if(t.__N){var e=t.__[0];t.__=t.__N,t.__N=void 0,e!==t.__[0]&&(r=!0)}}),l&&l.call(this,t,e,n)||r},"f");tt.__f=!0;var l=tt.shouldComponentUpdate,_=tt.componentWillUpdate;tt.componentWillUpdate=function(t,e,n){if(this.__e){var i=l;l=void 0,r(t,e,n),l=i}_&&_.call(this,t,e,n)},tt.shouldComponentUpdate=r}return o.__N||o.__}function pt(t,e){var n=ht(Q++,3);!rt.__s&&Ct(n.__H,e)&&(n.__=t,n.u=e,tt.__H.__h.push(n))}function gt(t,e){var n=ht(Q++,4);!rt.__s&&Ct(n.__H,e)&&(n.__=t,n.u=e,tt.__h.push(n))}function mt(t,e){var n=ht(Q++,7);return Ct(n.__H,e)&&(n.__=t(),n.__H=e,n.__h=t),n.__}function xt(t,e){return it=8,mt(function(){return t},e)}function yt(){for(var t;t=ot.shift();)if(t.__P&&t.__H)try{t.__H.__h.forEach(Ft),t.__H.__h.forEach(bt),t.__H.__h=[]}catch(e){t.__H.__h=[],rt.__e(e,t.__v)}}e(ht,"p"),e(ft,"d"),e(dt,"h"),e(pt,"y"),e(gt,"_"),e(mt,"T$1"),e(xt,"q$1"),e(yt,"j$1"),rt.__b=function(t){tt=null,lt&&lt(t)},rt.__=function(t,e){t&&e.__k&&e.__k.__m&&(t.__m=e.__k.__m),ut&&ut(t,e)},rt.__r=function(t){_t&&_t(t),Q=0;var e=(tt=t.__c).__H;e&&(et===tt?(e.__h=[],tt.__h=[],e.__.forEach(function(t){t.__N&&(t.__=t.__N),t.u=t.__N=void 0})):(e.__h.forEach(Ft),e.__h.forEach(bt),e.__h=[],Q=0)),et=tt},rt.diffed=function(t){at&&at(t);var e=t.__c;e&&e.__H&&(e.__H.__h.length&&(1!==ot.push(e)&&nt===rt.requestAnimationFrame||((nt=rt.requestAnimationFrame)||kt)(yt)),e.__H.__.forEach(function(t){t.u&&(t.__H=t.u),t.u=void 0})),et=tt=null},rt.__c=function(t,e){e.some(function(t){try{t.__h.forEach(Ft),t.__h=t.__h.filter(function(t){return!t.__||bt(t)})}catch(n){e.some(function(t){t.__h&&(t.__h=[])}),e=[],rt.__e(n,t.__v)}}),st&&st(t,e)},rt.unmount=function(t){ct&&ct(t);var e,n=t.__c;n&&n.__H&&(n.__H.__.forEach(function(t){try{Ft(t)}catch(n){e=n}}),n.__H=void 0,e&&rt.__e(e,n.__v))};var vt="function"==typeof requestAnimationFrame;function kt(t){var n,i=/* @__PURE__ */e(function(){clearTimeout(o),vt&&cancelAnimationFrame(n),setTimeout(t)},"r"),o=setTimeout(i,35);vt&&(n=requestAnimationFrame(i))}function Ft(t){var e=tt,n=t.__c;"function"==typeof n&&(t.__c=void 0,n()),tt=e}function bt(t){var e=tt;t.__c=t.__(),tt=e}function Ct(t,e){return!t||t.length!==e.length||e.some(function(e,n){return e!==t[n]})}function wt(t,e){return"function"==typeof e?e(t):e}function St(t,e){for(var n in e)t[n]=e[n];return t}function $t(t,e){for(var n in t)if("__source"!==n&&!(n in e))return!0;for(var i in e)if("__source"!==i&&t[i]!==e[i])return!0;return!1}function Rt(t,e){this.props=t,this.context=e}e(kt,"w"),e(Ft,"z"),e(bt,"B$1"),e(Ct,"C"),e(wt,"D"),e(St,"g"),e($t,"E"),e(Rt,"N"),(Rt.prototype=new W).isPureReactComponent=!0,Rt.prototype.shouldComponentUpdate=function(t,e){return $t(this.props,t)||$t(this.state,e)};var Wt=c.__b;c.__b=function(t){t.type&&t.type.__f&&t.ref&&(t.props.ref=t.ref,t.ref=null),Wt&&Wt(t)};var Pt=c.__e;c.__e=function(t,e,n,i){if(t.then)for(var o,r=e;r=r.__;)if((o=r.__c)&&o.__c)return null==e.__e&&(e.__e=n.__e,e.__k=n.__k),o.__c(t,e);Pt(t,e,n,i)};var Ht=c.unmount;function Ot(t,e,n){return t&&(t.__c&&t.__c.__H&&(t.__c.__H.__.forEach(function(t){"function"==typeof t.__c&&t.__c()}),t.__c.__H=null),null!=(t=St({},t)).__c&&(t.__c.__P===n&&(t.__c.__P=e),t.__c.__e=!0,t.__c=null),t.__k=t.__k&&t.__k.map(function(t){return Ot(t,e,n)})),t}function At(t,e,n){return t&&n&&(t.__v=null,t.__k=t.__k&&t.__k.map(function(t){return At(t,e,n)}),t.__c&&t.__c.__P===e&&(t.__e&&n.appendChild(t.__e),t.__c.__e=!0,t.__c.__P=n)),t}function Et(){this.__u=0,this.o=null,this.__b=null}function Nt(t){var e=t.__.__c;return e&&e.__a&&e.__a(t)}function Tt(){this.i=null,this.l=null}e(Ot,"V"),e(At,"W"),e(Et,"P"),e(Nt,"j"),e(Tt,"B"),c.unmount=function(t){var e=t.__c;e&&e.__R&&e.__R(),e&&32&t.__u&&(t.type=null),Ht&&Ht(t)},(Et.prototype=new W).__c=function(t,n){var i=n.__c,o=this;null==o.o&&(o.o=[]),o.o.push(i);var r=Nt(o.__v),l=!1,_=/* @__PURE__ */e(function(){l||(l=!0,i.__R=null,r?r(a):a())},"i");i.__R=_;var a=/* @__PURE__ */e(function(){if(! --o.__u){if(o.state.__a){var t=o.state.__a;o.__v.__k[0]=At(t,t.__c.__P,t.__c.__O)}var e;for(o.setState({__a:o.__b=null});e=o.o.pop();)e.forceUpdate()}},"l");o.__u++||32&n.__u||o.setState({__a:o.__b=o.__v.__k[0]}),t.then(_,_)},Et.prototype.componentWillUnmount=function(){this.o=[]},Et.prototype.render=function(t,e){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),i=this.__v.__k[0].__c;this.__v.__k[0]=Ot(this.__b,n,i.__O=i.__P)}this.__b=null}var o=e.__a&&S(R,null,t.fallback);return o&&(o.__u&=-33),[S(R,null,e.__a?null:t.children),o]};var Dt=/* @__PURE__ */e(function(t,e,n){if(++n[1]===n[0]&&t.l.delete(e),t.props.revealOrder&&("t"!==t.props.revealOrder[0]||!t.l.size))for(n=t.i;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;t.i=n=n[2]}},"H");(Tt.prototype=new W).__a=function(t){var n=this,i=Nt(n.__v),o=n.l.get(t);return o[0]++,function(r){var l=/* @__PURE__ */e(function(){n.props.revealOrder?(o.push(r),Dt(n,t,o)):r()},"o");i?i(l):l()}},Tt.prototype.render=function(t){this.i=null,this.l=/* @__PURE__ */new Map;var e=D(t.children);t.revealOrder&&"b"===t.revealOrder[0]&&e.reverse();for(var n=e.length;n--;)this.l.set(e[n],this.i=[1,0,this.i]);return t.children},Tt.prototype.componentDidUpdate=Tt.prototype.componentDidMount=function(){var t=this;this.l.forEach(function(e,n){Dt(t,n,e)})};var Ut="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,Lt=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,zt=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,It=/[A-Z0-9]/g,Vt="undefined"!=typeof document,Mt=/* @__PURE__ */e(function(t){return("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/:/fil|che|ra/).test(t)},"X");W.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(t){Object.defineProperty(W.prototype,t,{configurable:!0,get:/* @__PURE__ */e(function(){return this["UNSAFE_"+t]},"get"),set:/* @__PURE__ */e(function(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:e})},"set")})});var Bt=c.event;function jt(){}function qt(){return this.cancelBubble}function Gt(){return this.defaultPrevented}e(jt,"rn"),e(qt,"un"),e(Gt,"on"),c.event=function(t){return Bt&&(t=Bt(t)),t.persist=jt,t.isPropagationStopped=qt,t.isDefaultPrevented=Gt,t.nativeEvent=t};var Xt={enumerable:!1,configurable:!0,get:/* @__PURE__ */e(function(){return this.class},"get")},Yt=c.vnode;c.vnode=function(t){"string"==typeof t.type&&function(t){var e=t.props,n=t.type,i={},o=-1===n.indexOf("-");for(var r in e){var l=e[r];if(!("value"===r&&"defaultValue"in e&&null==l||Vt&&"children"===r&&"noscript"===n||"class"===r||"className"===r)){var _=r.toLowerCase();"defaultValue"===r&&"value"in e&&null==e.value?r="value":"download"===r&&!0===l?l="":"translate"===_&&"no"===l?l=!1:"o"===_[0]&&"n"===_[1]?"ondoubleclick"===_?r="ondblclick":"onchange"!==_||"input"!==n&&"textarea"!==n||Mt(e.type)?"onfocus"===_?r="onfocusin":"onblur"===_?r="onfocusout":zt.test(r)&&(r=_):_=r="oninput":o&&Lt.test(r)?r=r.replace(It,"-$&").toLowerCase():null===l&&(l=void 0),"oninput"===_&&i[r=_]&&(r="oninputCapture"),i[r]=l}}"select"==n&&i.multiple&&Array.isArray(i.value)&&(i.value=D(e.children).forEach(function(t){t.props.selected=-1!=i.value.indexOf(t.props.value)})),"select"==n&&null!=i.defaultValue&&(i.value=D(e.children).forEach(function(t){t.props.selected=i.multiple?-1!=i.defaultValue.indexOf(t.props.value):i.defaultValue==t.props.value})),e.class&&!e.className?(i.class=e.class,Object.defineProperty(i,"className",Xt)):(e.className&&!e.class||e.class&&e.className)&&(i.class=i.className=e.className),t.props=i}(t),t.$$typeof=Ut,Yt&&Yt(t)};var Jt=c.__r;c.__r=function(t){Jt&&Jt(t),t.__c};var Zt=c.diffed;function Kt(t){return!!t.__k&&(J(null,t),!0)}c.diffed=function(t){Zt&&Zt(t);var e=t.props,n=t.__e;null!=n&&"textarea"===t.type&&"value"in e&&e.value!==n.value&&(n.value=null==e.value?"":e.value)},e(Kt,"bn");const Qt=/* @__PURE__ */Object.freeze(/* @__PURE__ */Object.defineProperty({__proto__:null,Component:W,Fragment:R,createElement:S,h:S,render:J,unmountComponentAtNode:Kt,useCallback:xt,useEffect:pt,useLayoutEffect:gt,useMemo:mt,useReducer:dt,useState:ft},Symbol.toStringTag,{value:"Module"})),te=/* @__PURE__ */e(({href:t,x:e,y:n=0,height:i=12})=>/* @__PURE__ */K("image",{xlinkHref:t,x:e-i/2,y:n-i/2,width:i,height:i}),"Image"),ee=/* @__PURE__ */e(({x:t,y:e=0,height:i=12,fill:o,stroke:r,fontFamily:l="FontAwesome",char:_="",fontWeight:a})=>{const s=mt(()=>"FontAwesome"===l?n.faChar(_):_,[_,l]);/* @__PURE__ */
2
+ return K("text",{x:t,y:e,fill:o,stroke:r,fontFamily:l,fontSize:`${i}px`,fontWeight:a,dominantBaseline:"middle",style:{textAnchor:"middle",alignmentBaseline:"middle"},children:s})},"ImageChar"),ne=/* @__PURE__ */e(({radius:t=32,fill:e="navy",stroke:n=e,strokeWidth:i=1,shapeRendering:o})=>/* @__PURE__ */K("circle",{r:t,fill:e,stroke:n,strokeWidth:i,shapeRendering:o}),"Circle"),ie=/* @__PURE__ */e(({radius:t=30,cornerRadius:e=0,fill:n="white",stroke:i,strokeWidth:o=1,shapeRendering:r})=>/* @__PURE__ */K("rect",{x:-t,y:-t,rx:e,ry:e,width:2*t,height:2*t,fill:n,stroke:i||n,strokeWidth:o,shapeRendering:r}),"Square"),oe=/* @__PURE__ */e(({width:t=30,height:e=30,cornerRadius:n=0,fill:i="white",stroke:o="black",strokeWidth:r=1,shapeRendering:l})=>/* @__PURE__ */K("rect",{x:-t/2,y:-e/2,rx:n,ry:n,width:t,height:e,fill:i,stroke:o||i,strokeWidth:r,shapeRendering:l}),"Rectangle"),re=/* @__PURE__ */e(({shape:t="circle",height:e=128,width:n,fill:i,stroke:o,strokeWidth:r=1,shapeRendering:l,cornerRadius:_})=>{switch(t){case"square":/* @__PURE__ */
3
+ return K(ie,{radius:e/2,fill:i,stroke:o,strokeWidth:r,shapeRendering:l,cornerRadius:_});case"rectangle":/* @__PURE__ */
4
+ return K(oe,{width:n??e,height:e,fill:i,stroke:o,strokeWidth:r,shapeRendering:l,cornerRadius:_});default:/* @__PURE__ */
5
+ return K(ne,{radius:e/2,fill:i,stroke:o,strokeWidth:r,shapeRendering:l})}},"Shape"),le=/* @__PURE__ */e(({shape:t="circle",width:e,height:n=32,fill:o,stroke:r,strokeWidth:l=0,imageUrl:_="",imageFontFamily:a="FontAwesome",imageChar:s="",imageCharFill:c=i.textColor(o),padding:u=n/5,xOffset:h=0,yOffset:f=0,cornerRadius:d,shapeRendering:p})=>/* @__PURE__ */K(R,{children:[
6
+ /* @__PURE__ */K(re,{shape:t,width:e,height:n,fill:o,stroke:r,strokeWidth:l,shapeRendering:p,cornerRadius:d}),_?/* @__PURE__ */K(te,{href:_,x:h,y:f,height:n-u}):/* @__PURE__ */K(ee,{x:h,y:f,height:n-u,fontFamily:a,char:s,fill:c,fontWeight:400})]}),"Icon"),_e=/* @__PURE__ */e(({icons:t=[]})=>/* @__PURE__ */K(R,{children:t.map(t=>/* @__PURE__ */K("g",{id:t.id,children:/* @__PURE__ */K(le,{...t})},t.id))}),"Icons"),ae=/* @__PURE__ */e(({text:t,height:e=12,anchor:n="middle",baseline:i="middle",fontFamily:o="Verdana",fill:r="black"})=>/* @__PURE__ */K("text",{"font-family":o,"font-size":`${e}px`,"text-anchor":n,"dominant-baseline":i,fill:r,children:t}),"TextLine"),se=/* @__PURE__ */e(({text:t,height:e=12,fontFamily:i="Verdana",fill:o="black",onSizeUpdate:r})=>{const[l,_]=ft(0),[a,s]=ft(0);pt(()=>{r&&r({width:l,height:a})},[l,a,r]);const c=mt(()=>t.split("\n"),[t]);gt(()=>{const t=n.textSize(c,i,e);_(t.width),s(t.height)},[i,e,c]);/* @__PURE__ */
7
+ return K("g",{children:mt(()=>{const t=-a/2+e/2;return c.map((n,r)=>/* @__PURE__ */K("g",{transform:`translate(0 ${t+r*(e+2)})`,children:/* @__PURE__ */K(ae,{text:n,height:e,fontFamily:i,fill:o})},`key-${r}`))},[c,a,e,i,o])})},"Text"),ce=/* @__PURE__ */e(({text:t,height:e=12,fontFamily:n="Verdana",padding:i=4,fill:o="whitesmoke",stroke:r="lightgray",textFill:l="black",strokeWidth:_=1,cornerRadius:a=0,onSizeUpdate:s})=>{const[c,u]=ft(0),[h,f]=ft(0);pt(()=>{s&&s({width:c,height:h})},[c,h,s]);const d=xt(t=>{u(t.width),f(t.height)},[]),p=c+2*i+_,g=h+2*i+_,m=Math.floor(e/10);/* @__PURE__ */
8
+ return K(R,{children:[
9
+ /* @__PURE__ */K(oe,{width:p,height:g,fill:o,stroke:r,strokeWidth:_,cornerRadius:a}),
10
+ /* @__PURE__ */K("g",{transform:`translate(0 ${m})`,children:/* @__PURE__ */K(se,{text:t,fontFamily:n,height:e,fill:l,onSizeUpdate:d})})]})},"TextBox"),ue=/* @__PURE__ */e(({text:t,height:e=12,width:i=12,fontFamily:o="Verdana",fontSize:r=10,padding:l=3,fill:_="whitesmoke",stroke:a="lightgray",textFill:s="black",strokeWidth:c=1,cornerRadius:u=0,onSizeUpdate:h})=>{const[f,d]=ft(i),[p,g]=ft(e);return gt(()=>{const e=n.textSize(t,o,r);d(e.width+2*l),g(e.height+2*l)},[t,o,r,l]),gt(()=>{h&&h({width:f,height:p})},[f,p,l,h]),/* @__PURE__ */K(R,{children:[
11
+ /* @__PURE__ */K(oe,{width:i,height:e,fill:_,stroke:a,strokeWidth:c,cornerRadius:u}),
12
+ /* @__PURE__ */K("g",{transform:`translate(${-i/2+l} ${-e/2+l})`,children:/* @__PURE__ */K(ae,{text:t,fontFamily:o,height:r,fill:s,anchor:"start",baseline:"hanging"})})]})},"LabelledRect"),he=/* @__PURE__ */e(({icon:t,iconFontFamily:e,text:n,height:i=12,width:o=12,fontFamily:r="Verdana",fontSize:l=10,padding:_=3,fill:a="whitesmoke",stroke:s="lightgray",textFill:c="black",strokeWidth:u=1,cornerRadius:h=0})=>/* @__PURE__ */K(R,{children:[
13
+ /* @__PURE__ */K(oe,{width:o,height:i,fill:a,stroke:s,strokeWidth:u,cornerRadius:h}),
14
+ /* @__PURE__ */K("g",{transform:`translate(${-o/2+_} ${-i/2+_})`,children:/* @__PURE__ */K(le,{shape:"square",imageFontFamily:e,imageChar:t,height:i,fill:a,imageCharFill:c})}),
15
+ /* @__PURE__ */K("g",{transform:`translate(${-o/2+2*_+i} ${-i/2+_})`,children:/* @__PURE__ */K(ae,{text:n,fontFamily:r,height:l,fill:c,anchor:"start",baseline:"hanging"})})]}),"IconLabelledRect"),fe=/* @__PURE__ */e(({label:t,labelPos:e,labelFill:n="black",labelHeight:i=12,path:o,stroke:r,strokeWidth:l,strokeDasharray:_})=>/* @__PURE__ */K(R,{children:[
16
+ /* @__PURE__ */K("path",{d:o,stroke:r,style:{strokeWidth:l,strokeDasharray:_}}),t&&e&&2===e.length?/* @__PURE__ */K("g",{transform:`translate(${e[0]} ${e[1]})`,children:/* @__PURE__ */K(se,{text:t,fill:n,height:i})}):void 0]}),"Edge");function de(t,e,n,i){J(S(t,e),n,i)}function pe(t,e,n,i){J(S("svg",null,S(t,e)),n,i)}e(de,"render"),e(pe,"svgRender");const ge=class _HTMLAdapter extends o{constructor(t){super(),this._component=t}props(t){return arguments.length?(this._props={...this._props,...t},this):this._props}prop(t,e){return 1===arguments.length?this._props[t]:(this._props[t]=e,this)}update(t,e){super.update(t,e),de(this._component,this._props,t)}};e(ge,"HTMLAdapter");let me=ge;me.prototype._class+=" react_HTMLAdapter",me.prototype.publish("props",{},"object","Properties");const xe=class _SVGAdapter extends r{constructor(t){super(),this._component=t}props(t){return arguments.length?(this._props={...this._props,...t},this):this._props}prop(t,e){return 1===arguments.length?this._props[t]:(this._props[t]=e,this)}update(t,e){super.update(t,e),de(this._component,this._props,t)}};e(xe,"SVGAdapter");let ye=xe;ye.prototype._class+=" react_SVGAdapter",ye.prototype.publish("props",{},"object","Properties");const ve=/* @__PURE__ */e(({text:t})=>/* @__PURE__ */K("span",{children:t}),"Span"),ke=/* @__PURE__ */e(({x:t,y:e,annotationIDs:n=[],stepSize:i=-16})=>/* @__PURE__ */K(R,{children:n.map((n,o)=>/* @__PURE__ */K("g",{transform:`translate(${t+o*i} ${e})`,children:/* @__PURE__ */K("use",{xlinkHref:"#"+n})},n))}),"Annotations"),Fe=/* @__PURE__ */e(({categoryID:t="",text:e="",textHeight:n=12,textPadding:i=4,icon:o={},annotationsHeight:r=12,annotationIDs:l=[],textFill:_,textboxFill:a,textboxStroke:s,textFontFamily:c,onSizeUpdate:u,showLabel:h=!0,scale:f=1})=>{o={imageChar:"fa-question",height:32,fill:"transparent",...o};const[d,p]=ft(0),[g,m]=ft(0);pt(()=>{u&&u({width:0,height:0})},[d,g,u]);let x=d;x+=4;let y=-(2*o.height/6+n+8)/2;const v=o.height/3+g/2+i;let k=o.height/3+g+i+r/3;h||(y+=(n+8)/2,k-=g+i);const F=xt(t=>{p(t.width),m(t.height)},[]),b=h?/* @__PURE__ */K("g",{transform:`translate(0 ${v})`,children:/* @__PURE__ */K(ce,{text:e,height:n,padding:i,onSizeUpdate:F,textFill:_,fill:a,stroke:s,fontFamily:c})}):void 0;/* @__PURE__ */
17
+ return K("g",t?{transform:`translate(0 ${y}) scale(${f})`,children:[
18
+ /* @__PURE__ */K("use",{xlinkHref:"#"+t}),b,
19
+ /* @__PURE__ */K(ke,{x:x/2,y:k,annotationIDs:l})]}:{transform:`translate(0 ${y}) scale(${f})`,children:[
20
+ /* @__PURE__ */K(le,{...o}),b]})},"Vertex"),be=/* @__PURE__ */e(({categoryID:t="",text:e="",textHeight:i=12,textPadding:o=4,icon:r={},textFill:l="black",textboxFill:_="white",textboxStroke:a="black",textFontFamily:s,annotationsHeight:c=12,annotationIDs:u=[]})=>{r={imageChar:"fa-question",imageCharFill:"white",height:32,fill:"black",shape:"square",...r};const h=i+2*o,{width:f}=mt(()=>n.textSize(e,s,i,!1),[e,s,i]),d=c,p=h/2,g=-(2*r.height/6+i+8)/2,m=-r.height/2,x=Math.ceil(f/2+o),y=p-r.height/2,v=d/2,k=p;return t?/* @__PURE__ */K("g",{transform:`translate(0 ${g})`,children:[
21
+ /* @__PURE__ */K("g",{transform:`translate(${m} 0)`,children:/* @__PURE__ */K("use",{xlinkHref:"#"+t})}),
22
+ /* @__PURE__ */K("g",{transform:`translate(${x} ${y})`,children:/* @__PURE__ */K(ce,{text:e,height:i,padding:o,strokeWidth:1,stroke:a,fill:_,textFill:l,fontFamily:s})}),
23
+ /* @__PURE__ */K(ke,{x:v,y:k,annotationIDs:u,stepSize:d})]}):/* @__PURE__ */K(R,{children:[
24
+ /* @__PURE__ */K("g",{transform:`translate(${m} 0)scale(1.0002)`,children:/* @__PURE__ */K(le,{...r,shape:"square"})}),
25
+ /* @__PURE__ */K("g",{transform:`translate(${x} ${y})scale(1.0002)`,children:/* @__PURE__ */K(ce,{text:e,height:i,padding:o,stroke:a,fill:_})})]})},"Vertex2"),Ce=/* @__PURE__ */e(({text:t="",textHeight:e=10,textPadding:i=4,textFill:o="#287EC4",textboxFill:r="white",textboxStroke:l="#CCCCCC",textboxStrokeWidth:_=1,textFontFamily:a="Verdana",annotationGutter:s=2,annotations:c=[],cornerRadius:u=3,icon:h={},subText:f={text:""},showLabel:d=!0,noLabelRadius:p=5,expansionIcon:g,scale:m=1})=>{h={height:50,imageChar:"?",imageFontFamily:"FontAwesome",imageCharFill:"#555555",fill:"transparent",strokeWidth:0,...h},f={text:"",fill:"white",textFill:"#555555",...f},g=g?{height:16,shape:"circle",padding:6,imageChar:"?",imageFontFamily:"FontAwesome",imageCharFill:"black",fill:"whitesmoke",stroke:"whitesmoke",strokeWidth:0,...g}:void 0;let x=0;const y=mt(()=>n.textSize(t,a,e,!1).width,[t,a,e]);let v=0;""!==t&&(v=y+2*i+2*_),x+=v+s;const k=x-v/2,F=e+2*i+2*_,b=[];c.forEach((t,e)=>{const n=t.imageChar;x+=F+s;const i=x-F/2;b.push(
26
+ /* @__PURE__ */K("g",{className:"vertex3-anno","data-click":"annotation","data-click-data":JSON.stringify(t),transform:`translate(${i} 0)`,children:/* @__PURE__ */K(le,{...t,shape:"square",height:F,imageChar:n,imageFontFamily:t.imageFontFamily,cornerRadius:u,strokeWidth:0})},e))}),c.length>0&&(x+=s*(c.length-1));const C=/* @__PURE__ */K("g",{"data-click":"text",transform:`translate(${k} 0)`,children:d&&""!==t?/* @__PURE__ */K(ce,{text:t,height:e,padding:i,strokeWidth:_,stroke:l,fill:r,textFill:o,fontFamily:a,cornerRadius:u}):/* @__PURE__ */K("circle",{r:p,stroke:l,fill:o})}),w=h.height||20,S=h.strokeWidth||0;let $=0;let R=F+2*s;""!==t||b.length>0?$=-w/2-S-F/2-2*s:""!==f.text&&(R=w/2+S+2*s);const W=""===f.text?null:/* @__PURE__ */K("g",{"data-click":"subtext",transform:`translate(0 ${R})`,children:/* @__PURE__ */K(ce,{fill:f.fill||"#FFFFFF",textFill:f.textFill||o,...f,height:e,padding:i,strokeWidth:0,stroke:l,fontFamily:a,cornerRadius:u})});/* @__PURE__ */
27
+ return K("g",{transform:`scale(${m})`,children:[
28
+ /* @__PURE__ */K("g",{"data-click":"icon",transform:`translate(0 ${$})`,children:[
29
+ /* @__PURE__ */K(le,{...h}),g&&/* @__PURE__ */K("g",{"data-click":"expanded-icon","data-click-data":JSON.stringify(g),transform:`translate(${(h.height+S)/2-g.height/2} ${-(h.height+S)/2+g.height/2})`,children:/* @__PURE__ */K(le,{...g})})]}),
30
+ /* @__PURE__ */K("g",{transform:`translate(${-x/2} 0)`,children:[C,b]}),W]})},"Vertex3"),we=/* @__PURE__ */e(function({id:t,categoryID:e="",text:n="",textHeight:i=12,textPadding:o=10,textFill:r="#287EC4",textboxFill:l="white",textboxStroke:_="#CCCCCC",textboxStrokeWidth:a=1,textFontFamily:s="Verdana",annotationGutter:c=2,annotations:u=[],cornerRadius:h,icon:f={},subText:d={},expansionIcon:p,scale:g=1}){f={height:91,padding:40,imageCharFill:"#555555",imageFontFamily:"FontAwesome",fill:"#FFCC33",stroke:"#DFDFDF",imageChar:"?",strokeWidth:4,yOffset:-15,...f},d={text:"",fill:"transparent",textFill:"#555555",...d};/* @__PURE__ */
31
+ return K(Ce,{...{id:t,categoryID:e,text:n,textHeight:i,textPadding:o,textFill:r,textboxFill:l,textboxStroke:_,textboxStrokeWidth:a,textFontFamily:s,annotationGutter:c,annotations:u,cornerRadius:h,icon:f,subText:d,expansionIcon:p,scale:g},icon:f,subText:d})},"CentroidVertex3"),Se=/* @__PURE__ */e(({categoryID:t="",text:e="",textHeight:i=10,textPadding:o=4,textFill:r="#287EC4",textboxFill:l="white",textboxStroke:_="#CCCCCC",textboxStrokeWidth:a=1,textFontFamily:s="Verdana",annotationGutter:c=2,annotations:u=[],iconAnnotations:h=[],cornerRadius:f=3,icon:d={},subText:p={},showLabel:g=!0,noLabelRadius:m=5,iconBorderWidth:x=1,iconBorderColor:y="#333",iconBackgroundColor:v="#fff",iconFontColor:k="#000",iconFontSize:F=20,iconFontFamily:b="FontAwesome",shapeOffsetX:C=0,shapeOffsetY:w=0,iconOffsetX:S=0,iconOffsetY:$=0,iconPadding:R=4,iconText:W="?",shapeRendering:P="auto"})=>{d={height:50,imageChar:"?",imageFontFamily:"FontAwesome",imageCharFill:"#555555",fill:"transparent",strokeWidth:0,...d},p={text:"",fill:"white",textFill:"#555555",...p};const H=mt(()=>n.textSize(e,s,i,!1).width,[e,s,i]);let O=0;""!==e&&(O=H+2*o+2*a);let A=O+c;const E=A-O/2,N=i+2*c+2*a,T=u.map(t=>n.textSize(t.imageChar,t.imageFontFamily,t.height,!1).width),D=[];let U=A;u.forEach((t,e)=>{const n=t.imageChar,i=t.height??N;U+=T[e]+c;const o=U-T[e]/2;D.push(
32
+ /* @__PURE__ */K("g",{className:"vertex3-anno","data-click":"annotation","data-click-data":JSON.stringify(t),transform:`translate(${o} 0)`,children:/* @__PURE__ */K(le,{...t,shape:"rectangle",width:T[e],height:i,imageChar:n,imageFontFamily:t.imageFontFamily,cornerRadius:f,strokeWidth:0})},e))}),u.length>0&&(A+=c*(u.length-1));const L=[];h.forEach((t,e)=>{const n=t.shapeOffsetX,i=t.shapeOffsetY;L.push(
33
+ /* @__PURE__ */K("g",{className:"vertex3-iconAnno","data-click":"icon-annotation","data-click-data":JSON.stringify(t),transform:`translate(${n} ${i})`,children:/* @__PURE__ */K(le,{...t,shape:t.shape??"square",imageChar:t.imageChar,imageFontFamily:t.imageFontFamily,cornerRadius:f,stroke:t.stroke,strokeWidth:t.strokeWidth})},e))});const z=/* @__PURE__ */K("g",{"data-click":"text",transform:`translate(${E} 0)`,children:g&&""!==e?/* @__PURE__ */K(ce,{text:e,height:i,padding:o,strokeWidth:a,stroke:_,fill:l,textFill:r,fontFamily:s,cornerRadius:f}):/* @__PURE__ */K("circle",{r:m,stroke:_,fill:r})}),I=N+2*c,V=""===p.text?null:/* @__PURE__ */K("g",{"data-click":"subtext",transform:`translate(0 ${I})`,children:/* @__PURE__ */K(ce,{fill:p.fill||"#FFFFFF",textFill:p.textFill||r,...p,height:i,padding:o,strokeWidth:0,stroke:_,fontFamily:s,cornerRadius:f})});/* @__PURE__ */
34
+ return K("g",{children:[
35
+ /* @__PURE__ */K("g",{"data-click":"icon",transform:`translate(${C} ${w})`,children:[
36
+ /* @__PURE__ */K(le,{...d,strokeWidth:x,shape:"circle",height:F,fill:v,stroke:y,imageFontFamily:b,imageChar:W,imageCharFill:k,padding:R,xOffset:S,yOffset:$,cornerRadius:f,shapeRendering:P}),L]}),
37
+ /* @__PURE__ */K("g",{transform:`translate(${-A/2} 0)`,children:[z,D]}),V]})},"Vertex4"),$e=/* @__PURE__ */e(function({id:t,categoryID:e="",text:n="",textHeight:i=12,textPadding:o=10,textFill:r="#287EC4",textboxFill:l="white",textboxStroke:_="#CCCCCC",textboxStrokeWidth:a=1,textFontFamily:s="Verdana",annotationGutter:c=2,annotations:u=[],iconAnnotations:h=[],cornerRadius:f,icon:d={},subText:p={},showLabel:g=!0,noLabelRadius:m=5,iconBorderWidth:x=1,iconBorderColor:y="#333",iconBackgroundColor:v="#fff",iconFontColor:k="#000",iconFontSize:F=20,iconFontFamily:b="FontAwesome",shapeOffsetX:C=0,shapeOffsetY:w=0,iconOffsetX:S=0,iconOffsetY:$=0,iconPadding:R=4,iconText:W="?",shapeRendering:P="auto"}){d={height:91,padding:40,imageCharFill:"#555555",imageFontFamily:"FontAwesome",fill:"#FFCC33",stroke:"#DFDFDF",imageChar:"?",strokeWidth:4,yOffset:-15,...d},p={text:"",fill:"transparent",textFill:"#555555",...p};/* @__PURE__ */
38
+ return K(Se,{...{id:t,categoryID:e,text:n,textHeight:i,textPadding:o,textFill:r,textboxFill:l,textboxStroke:_,textboxStrokeWidth:a,textFontFamily:s,annotationGutter:c,annotations:u,iconAnnotations:h,cornerRadius:f,icon:d,subText:p,showLabel:g,noLabelRadius:m,iconBorderWidth:x,iconBorderColor:y,iconBackgroundColor:v,iconFontColor:k,iconFontSize:F,iconFontFamily:b,shapeOffsetX:C,shapeOffsetY:w,iconOffsetX:S,iconOffsetY:$,iconPadding:R,iconText:W,shapeRendering:P},icon:d,subText:p})},"CentroidVertex4"),Re=/* @__PURE__ */e(({text:t,width:e=100,height:i=100,fill:o="transparent",stroke:r="black",fontHeight:l=12,fontFamily:_})=>{const a=n.textSize(t,_,l,!1);/* @__PURE__ */
39
+ return K(R,{children:[
40
+ /* @__PURE__ */K(oe,{width:e,height:i,fill:o,stroke:r}),
41
+ /* @__PURE__ */K("g",{transform:`translate(${(-e+a.width)/2+4} ${(-i+a.height)/2+4})`,children:/* @__PURE__ */K(se,{height:l,text:t,fontFamily:_})})]})},"Subgraph");export{ke as Annotations,a as BUILD_VERSION,we as CentroidVertex3,$e as CentroidVertex4,ne as Circle,fe as Edge,me as HTMLAdapter,le as Icon,he as IconLabelledRect,_e as Icons,te as Image,ee as ImageChar,ue as LabelledRect,l as PKG_NAME,_ as PKG_VERSION,Qt as React,oe as Rectangle,ye as SVGAdapter,re as Shape,ve as Span,ie as Square,Re as Subgraph,se as Text,ce as TextBox,ae as TextLine,Fe as Vertex,be as Vertex2,Ce as Vertex3,Se as Vertex4,de as render,pe as svgRender};
42
+ //# sourceMappingURL=index.js.map