@darajs/ui-utils 1.29.13 → 1.30.1

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.
@@ -1,83 +1,1861 @@
1
- /**
2
- * Copyright 2023 Impulse Innovations Limited
3
- *
4
- *
5
- * Licensed under the Apache License, Version 2.0 (the "License");
6
- * you may not use this file except in compliance with the License.
7
- * You may obtain a copy of the License at
8
- *
9
- * http://www.apache.org/licenses/LICENSE-2.0
10
- *
11
- * Unless required by applicable law or agreed to in writing, software
12
- * distributed under the License is distributed on an "AS IS" BASIS,
13
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- * See the License for the specific language governing permissions and
15
- * limitations under the License.
16
- */
17
- import { scaleLinear, scaleTime } from 'd3-scale';
18
- import { useCallback, useMemo } from 'react';
19
- import useDeepCompare from './use-deep-compare';
20
- /**
21
- * An underlying helper hook that uses d3 to create a function for getting the axis properties for an axis based
22
- * on the pixel size of that axis. This hook should not be used directly, use one of the wrappers for it,
23
- * e.g. useD3LinearAxis or useD3TimeAxis
24
- *
25
- * @param data the underlying data for the axis
26
- * @param domain the target domain for the axis
27
- * @param getScale a function to get the d3Scale instance with domain applied
28
- * @param domainFormatter a function to translate the d3 domain back into a recharts domain
29
- */
30
- export function useD3Axis(data, getScale, domainFormatter, domain) {
31
- // eslint-disable-next-line react-hooks/exhaustive-deps
32
- const valueScale = useMemo(() => getScale(data, domain), useDeepCompare([data, domain, getScale]));
33
- return useCallback((axisSize) => {
34
- const scale = valueScale.range([0, axisSize]).nice();
35
- return {
36
- domain: domainFormatter(scale.domain()),
37
- tickFormatter: scale.tickFormat(),
38
- ticks: scale.ticks(),
39
- type: 'number',
40
- };
41
- }, [domainFormatter, valueScale]);
42
- }
43
- /** Helper function for getting a linear d3Scale instance, based on data and domain */
44
- const getLinearScale = (data, domain) => {
45
- return scaleLinear().domain([data ? Math.min(...data) : domain[0], data ? Math.max(...data) : domain[1]]);
1
+ import { useCallback as e, useMemo as t, useRef as n } from "react";
2
+ import r from "lodash/isEqual";
3
+ //#region ../../node_modules/.pnpm/d3-array@3.2.4/node_modules/d3-array/src/ascending.js
4
+ function i(e, t) {
5
+ return e == null || t == null ? NaN : e < t ? -1 : e > t ? 1 : e >= t ? 0 : NaN;
6
+ }
7
+ //#endregion
8
+ //#region ../../node_modules/.pnpm/d3-array@3.2.4/node_modules/d3-array/src/descending.js
9
+ function a(e, t) {
10
+ return e == null || t == null ? NaN : t < e ? -1 : t > e ? 1 : t >= e ? 0 : NaN;
11
+ }
12
+ //#endregion
13
+ //#region ../../node_modules/.pnpm/d3-array@3.2.4/node_modules/d3-array/src/bisector.js
14
+ function o(e) {
15
+ let t, n, r;
16
+ e.length === 2 ? (t = e === i || e === a ? e : s, n = e, r = e) : (t = i, n = (t, n) => i(e(t), n), r = (t, n) => e(t) - n);
17
+ function o(e, r, i = 0, a = e.length) {
18
+ if (i < a) {
19
+ if (t(r, r) !== 0) return a;
20
+ do {
21
+ let t = i + a >>> 1;
22
+ n(e[t], r) < 0 ? i = t + 1 : a = t;
23
+ } while (i < a);
24
+ }
25
+ return i;
26
+ }
27
+ function c(e, r, i = 0, a = e.length) {
28
+ if (i < a) {
29
+ if (t(r, r) !== 0) return a;
30
+ do {
31
+ let t = i + a >>> 1;
32
+ n(e[t], r) <= 0 ? i = t + 1 : a = t;
33
+ } while (i < a);
34
+ }
35
+ return i;
36
+ }
37
+ function l(e, t, n = 0, i = e.length) {
38
+ let a = o(e, t, n, i - 1);
39
+ return a > n && r(e[a - 1], t) > -r(e[a], t) ? a - 1 : a;
40
+ }
41
+ return {
42
+ left: o,
43
+ center: l,
44
+ right: c
45
+ };
46
+ }
47
+ function s() {
48
+ return 0;
49
+ }
50
+ //#endregion
51
+ //#region ../../node_modules/.pnpm/d3-array@3.2.4/node_modules/d3-array/src/number.js
52
+ function c(e) {
53
+ return e === null ? NaN : +e;
54
+ }
55
+ //#endregion
56
+ //#region ../../node_modules/.pnpm/d3-array@3.2.4/node_modules/d3-array/src/bisect.js
57
+ var l = o(i), u = l.right;
58
+ l.left, o(c).center;
59
+ //#endregion
60
+ //#region ../../node_modules/.pnpm/d3-array@3.2.4/node_modules/d3-array/src/ticks.js
61
+ var d = Math.sqrt(50), f = Math.sqrt(10), p = Math.sqrt(2);
62
+ function m(e, t, n) {
63
+ let r = (t - e) / Math.max(0, n), i = Math.floor(Math.log10(r)), a = r / Math.pow(10, i), o = a >= d ? 10 : a >= f ? 5 : a >= p ? 2 : 1, s, c, l;
64
+ return i < 0 ? (l = Math.pow(10, -i) / o, s = Math.round(e * l), c = Math.round(t * l), s / l < e && ++s, c / l > t && --c, l = -l) : (l = Math.pow(10, i) * o, s = Math.round(e / l), c = Math.round(t / l), s * l < e && ++s, c * l > t && --c), c < s && .5 <= n && n < 2 ? m(e, t, n * 2) : [
65
+ s,
66
+ c,
67
+ l
68
+ ];
69
+ }
70
+ function h(e, t, n) {
71
+ if (t = +t, e = +e, n = +n, !(n > 0)) return [];
72
+ if (e === t) return [e];
73
+ let r = t < e, [i, a, o] = r ? m(t, e, n) : m(e, t, n);
74
+ if (!(a >= i)) return [];
75
+ let s = a - i + 1, c = Array(s);
76
+ if (r) if (o < 0) for (let e = 0; e < s; ++e) c[e] = (a - e) / -o;
77
+ else for (let e = 0; e < s; ++e) c[e] = (a - e) * o;
78
+ else if (o < 0) for (let e = 0; e < s; ++e) c[e] = (i + e) / -o;
79
+ else for (let e = 0; e < s; ++e) c[e] = (i + e) * o;
80
+ return c;
81
+ }
82
+ function g(e, t, n) {
83
+ return t = +t, e = +e, n = +n, m(e, t, n)[2];
84
+ }
85
+ function _(e, t, n) {
86
+ t = +t, e = +e, n = +n;
87
+ let r = t < e, i = r ? g(t, e, n) : g(e, t, n);
88
+ return (r ? -1 : 1) * (i < 0 ? 1 / -i : i);
89
+ }
90
+ //#endregion
91
+ //#region ../../node_modules/.pnpm/d3-scale@4.0.2/node_modules/d3-scale/src/init.js
92
+ function v(e, t) {
93
+ switch (arguments.length) {
94
+ case 0: break;
95
+ case 1:
96
+ this.range(e);
97
+ break;
98
+ default:
99
+ this.range(t).domain(e);
100
+ break;
101
+ }
102
+ return this;
103
+ }
104
+ //#endregion
105
+ //#region ../../node_modules/.pnpm/d3-color@3.1.0/node_modules/d3-color/src/define.js
106
+ function y(e, t, n) {
107
+ e.prototype = t.prototype = n, n.constructor = e;
108
+ }
109
+ function b(e, t) {
110
+ var n = Object.create(e.prototype);
111
+ for (var r in t) n[r] = t[r];
112
+ return n;
113
+ }
114
+ //#endregion
115
+ //#region ../../node_modules/.pnpm/d3-color@3.1.0/node_modules/d3-color/src/color.js
116
+ function x() {}
117
+ var S = .7, C = 1 / S, w = "\\s*([+-]?\\d+)\\s*", T = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*", E = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*", ee = /^#([0-9a-f]{3,8})$/, te = RegExp(`^rgb\\(${w},${w},${w}\\)$`), ne = RegExp(`^rgb\\(${E},${E},${E}\\)$`), re = RegExp(`^rgba\\(${w},${w},${w},${T}\\)$`), ie = RegExp(`^rgba\\(${E},${E},${E},${T}\\)$`), ae = RegExp(`^hsl\\(${T},${E},${E}\\)$`), oe = RegExp(`^hsla\\(${T},${E},${E},${T}\\)$`), se = {
118
+ aliceblue: 15792383,
119
+ antiquewhite: 16444375,
120
+ aqua: 65535,
121
+ aquamarine: 8388564,
122
+ azure: 15794175,
123
+ beige: 16119260,
124
+ bisque: 16770244,
125
+ black: 0,
126
+ blanchedalmond: 16772045,
127
+ blue: 255,
128
+ blueviolet: 9055202,
129
+ brown: 10824234,
130
+ burlywood: 14596231,
131
+ cadetblue: 6266528,
132
+ chartreuse: 8388352,
133
+ chocolate: 13789470,
134
+ coral: 16744272,
135
+ cornflowerblue: 6591981,
136
+ cornsilk: 16775388,
137
+ crimson: 14423100,
138
+ cyan: 65535,
139
+ darkblue: 139,
140
+ darkcyan: 35723,
141
+ darkgoldenrod: 12092939,
142
+ darkgray: 11119017,
143
+ darkgreen: 25600,
144
+ darkgrey: 11119017,
145
+ darkkhaki: 12433259,
146
+ darkmagenta: 9109643,
147
+ darkolivegreen: 5597999,
148
+ darkorange: 16747520,
149
+ darkorchid: 10040012,
150
+ darkred: 9109504,
151
+ darksalmon: 15308410,
152
+ darkseagreen: 9419919,
153
+ darkslateblue: 4734347,
154
+ darkslategray: 3100495,
155
+ darkslategrey: 3100495,
156
+ darkturquoise: 52945,
157
+ darkviolet: 9699539,
158
+ deeppink: 16716947,
159
+ deepskyblue: 49151,
160
+ dimgray: 6908265,
161
+ dimgrey: 6908265,
162
+ dodgerblue: 2003199,
163
+ firebrick: 11674146,
164
+ floralwhite: 16775920,
165
+ forestgreen: 2263842,
166
+ fuchsia: 16711935,
167
+ gainsboro: 14474460,
168
+ ghostwhite: 16316671,
169
+ gold: 16766720,
170
+ goldenrod: 14329120,
171
+ gray: 8421504,
172
+ green: 32768,
173
+ greenyellow: 11403055,
174
+ grey: 8421504,
175
+ honeydew: 15794160,
176
+ hotpink: 16738740,
177
+ indianred: 13458524,
178
+ indigo: 4915330,
179
+ ivory: 16777200,
180
+ khaki: 15787660,
181
+ lavender: 15132410,
182
+ lavenderblush: 16773365,
183
+ lawngreen: 8190976,
184
+ lemonchiffon: 16775885,
185
+ lightblue: 11393254,
186
+ lightcoral: 15761536,
187
+ lightcyan: 14745599,
188
+ lightgoldenrodyellow: 16448210,
189
+ lightgray: 13882323,
190
+ lightgreen: 9498256,
191
+ lightgrey: 13882323,
192
+ lightpink: 16758465,
193
+ lightsalmon: 16752762,
194
+ lightseagreen: 2142890,
195
+ lightskyblue: 8900346,
196
+ lightslategray: 7833753,
197
+ lightslategrey: 7833753,
198
+ lightsteelblue: 11584734,
199
+ lightyellow: 16777184,
200
+ lime: 65280,
201
+ limegreen: 3329330,
202
+ linen: 16445670,
203
+ magenta: 16711935,
204
+ maroon: 8388608,
205
+ mediumaquamarine: 6737322,
206
+ mediumblue: 205,
207
+ mediumorchid: 12211667,
208
+ mediumpurple: 9662683,
209
+ mediumseagreen: 3978097,
210
+ mediumslateblue: 8087790,
211
+ mediumspringgreen: 64154,
212
+ mediumturquoise: 4772300,
213
+ mediumvioletred: 13047173,
214
+ midnightblue: 1644912,
215
+ mintcream: 16121850,
216
+ mistyrose: 16770273,
217
+ moccasin: 16770229,
218
+ navajowhite: 16768685,
219
+ navy: 128,
220
+ oldlace: 16643558,
221
+ olive: 8421376,
222
+ olivedrab: 7048739,
223
+ orange: 16753920,
224
+ orangered: 16729344,
225
+ orchid: 14315734,
226
+ palegoldenrod: 15657130,
227
+ palegreen: 10025880,
228
+ paleturquoise: 11529966,
229
+ palevioletred: 14381203,
230
+ papayawhip: 16773077,
231
+ peachpuff: 16767673,
232
+ peru: 13468991,
233
+ pink: 16761035,
234
+ plum: 14524637,
235
+ powderblue: 11591910,
236
+ purple: 8388736,
237
+ rebeccapurple: 6697881,
238
+ red: 16711680,
239
+ rosybrown: 12357519,
240
+ royalblue: 4286945,
241
+ saddlebrown: 9127187,
242
+ salmon: 16416882,
243
+ sandybrown: 16032864,
244
+ seagreen: 3050327,
245
+ seashell: 16774638,
246
+ sienna: 10506797,
247
+ silver: 12632256,
248
+ skyblue: 8900331,
249
+ slateblue: 6970061,
250
+ slategray: 7372944,
251
+ slategrey: 7372944,
252
+ snow: 16775930,
253
+ springgreen: 65407,
254
+ steelblue: 4620980,
255
+ tan: 13808780,
256
+ teal: 32896,
257
+ thistle: 14204888,
258
+ tomato: 16737095,
259
+ turquoise: 4251856,
260
+ violet: 15631086,
261
+ wheat: 16113331,
262
+ white: 16777215,
263
+ whitesmoke: 16119285,
264
+ yellow: 16776960,
265
+ yellowgreen: 10145074
46
266
  };
47
- /**
48
- * Hook that returns a function that generates the props for a linearly scaled axis based on the size in pixels of the
49
- * axis
50
- *
51
- * @param data the underlying data for the axis
52
- * @param domain the target domain for the axis
53
- */
54
- export function useD3LinearAxis(data, domain) {
55
- return useD3Axis(data, getLinearScale, (dm) => dm, domain);
56
- }
57
- /** Helper function for getting a time d3Scale instance, based on data and domain */
58
- const getTimeScale = (data, domain) => {
59
- return scaleTime().domain([data ? data[0] : domain[0], data ? data[data.length - 1] : domain[1]]);
267
+ y(x, D, {
268
+ copy(e) {
269
+ return Object.assign(new this.constructor(), this, e);
270
+ },
271
+ displayable() {
272
+ return this.rgb().displayable();
273
+ },
274
+ hex: ce,
275
+ formatHex: ce,
276
+ formatHex8: le,
277
+ formatHsl: ue,
278
+ formatRgb: de,
279
+ toString: de
280
+ });
281
+ function ce() {
282
+ return this.rgb().formatHex();
283
+ }
284
+ function le() {
285
+ return this.rgb().formatHex8();
286
+ }
287
+ function ue() {
288
+ return be(this).formatHsl();
289
+ }
290
+ function de() {
291
+ return this.rgb().formatRgb();
292
+ }
293
+ function D(e) {
294
+ var t, n;
295
+ return e = (e + "").trim().toLowerCase(), (t = ee.exec(e)) ? (n = t[1].length, t = parseInt(t[1], 16), n === 6 ? fe(t) : n === 3 ? new k(t >> 8 & 15 | t >> 4 & 240, t >> 4 & 15 | t & 240, (t & 15) << 4 | t & 15, 1) : n === 8 ? O(t >> 24 & 255, t >> 16 & 255, t >> 8 & 255, (t & 255) / 255) : n === 4 ? O(t >> 12 & 15 | t >> 8 & 240, t >> 8 & 15 | t >> 4 & 240, t >> 4 & 15 | t & 240, ((t & 15) << 4 | t & 15) / 255) : null) : (t = te.exec(e)) ? new k(t[1], t[2], t[3], 1) : (t = ne.exec(e)) ? new k(t[1] * 255 / 100, t[2] * 255 / 100, t[3] * 255 / 100, 1) : (t = re.exec(e)) ? O(t[1], t[2], t[3], t[4]) : (t = ie.exec(e)) ? O(t[1] * 255 / 100, t[2] * 255 / 100, t[3] * 255 / 100, t[4]) : (t = ae.exec(e)) ? ye(t[1], t[2] / 100, t[3] / 100, 1) : (t = oe.exec(e)) ? ye(t[1], t[2] / 100, t[3] / 100, t[4]) : se.hasOwnProperty(e) ? fe(se[e]) : e === "transparent" ? new k(NaN, NaN, NaN, 0) : null;
296
+ }
297
+ function fe(e) {
298
+ return new k(e >> 16 & 255, e >> 8 & 255, e & 255, 1);
299
+ }
300
+ function O(e, t, n, r) {
301
+ return r <= 0 && (e = t = n = NaN), new k(e, t, n, r);
302
+ }
303
+ function pe(e) {
304
+ return e instanceof x || (e = D(e)), e ? (e = e.rgb(), new k(e.r, e.g, e.b, e.opacity)) : new k();
305
+ }
306
+ function me(e, t, n, r) {
307
+ return arguments.length === 1 ? pe(e) : new k(e, t, n, r == null ? 1 : r);
308
+ }
309
+ function k(e, t, n, r) {
310
+ this.r = +e, this.g = +t, this.b = +n, this.opacity = +r;
311
+ }
312
+ y(k, me, b(x, {
313
+ brighter(e) {
314
+ return e = e == null ? C : Math.pow(C, e), new k(this.r * e, this.g * e, this.b * e, this.opacity);
315
+ },
316
+ darker(e) {
317
+ return e = e == null ? S : Math.pow(S, e), new k(this.r * e, this.g * e, this.b * e, this.opacity);
318
+ },
319
+ rgb() {
320
+ return this;
321
+ },
322
+ clamp() {
323
+ return new k(A(this.r), A(this.g), A(this.b), ve(this.opacity));
324
+ },
325
+ displayable() {
326
+ return -.5 <= this.r && this.r < 255.5 && -.5 <= this.g && this.g < 255.5 && -.5 <= this.b && this.b < 255.5 && 0 <= this.opacity && this.opacity <= 1;
327
+ },
328
+ hex: he,
329
+ formatHex: he,
330
+ formatHex8: ge,
331
+ formatRgb: _e,
332
+ toString: _e
333
+ }));
334
+ function he() {
335
+ return `#${j(this.r)}${j(this.g)}${j(this.b)}`;
336
+ }
337
+ function ge() {
338
+ return `#${j(this.r)}${j(this.g)}${j(this.b)}${j((isNaN(this.opacity) ? 1 : this.opacity) * 255)}`;
339
+ }
340
+ function _e() {
341
+ let e = ve(this.opacity);
342
+ return `${e === 1 ? "rgb(" : "rgba("}${A(this.r)}, ${A(this.g)}, ${A(this.b)}${e === 1 ? ")" : `, ${e})`}`;
343
+ }
344
+ function ve(e) {
345
+ return isNaN(e) ? 1 : Math.max(0, Math.min(1, e));
346
+ }
347
+ function A(e) {
348
+ return Math.max(0, Math.min(255, Math.round(e) || 0));
349
+ }
350
+ function j(e) {
351
+ return e = A(e), (e < 16 ? "0" : "") + e.toString(16);
352
+ }
353
+ function ye(e, t, n, r) {
354
+ return r <= 0 ? e = t = n = NaN : n <= 0 || n >= 1 ? e = t = NaN : t <= 0 && (e = NaN), new M(e, t, n, r);
355
+ }
356
+ function be(e) {
357
+ if (e instanceof M) return new M(e.h, e.s, e.l, e.opacity);
358
+ if (e instanceof x || (e = D(e)), !e) return new M();
359
+ if (e instanceof M) return e;
360
+ e = e.rgb();
361
+ var t = e.r / 255, n = e.g / 255, r = e.b / 255, i = Math.min(t, n, r), a = Math.max(t, n, r), o = NaN, s = a - i, c = (a + i) / 2;
362
+ return s ? (o = t === a ? (n - r) / s + (n < r) * 6 : n === a ? (r - t) / s + 2 : (t - n) / s + 4, s /= c < .5 ? a + i : 2 - a - i, o *= 60) : s = c > 0 && c < 1 ? 0 : o, new M(o, s, c, e.opacity);
363
+ }
364
+ function xe(e, t, n, r) {
365
+ return arguments.length === 1 ? be(e) : new M(e, t, n, r == null ? 1 : r);
366
+ }
367
+ function M(e, t, n, r) {
368
+ this.h = +e, this.s = +t, this.l = +n, this.opacity = +r;
369
+ }
370
+ y(M, xe, b(x, {
371
+ brighter(e) {
372
+ return e = e == null ? C : Math.pow(C, e), new M(this.h, this.s, this.l * e, this.opacity);
373
+ },
374
+ darker(e) {
375
+ return e = e == null ? S : Math.pow(S, e), new M(this.h, this.s, this.l * e, this.opacity);
376
+ },
377
+ rgb() {
378
+ var e = this.h % 360 + (this.h < 0) * 360, t = isNaN(e) || isNaN(this.s) ? 0 : this.s, n = this.l, r = n + (n < .5 ? n : 1 - n) * t, i = 2 * n - r;
379
+ return new k(we(e >= 240 ? e - 240 : e + 120, i, r), we(e, i, r), we(e < 120 ? e + 240 : e - 120, i, r), this.opacity);
380
+ },
381
+ clamp() {
382
+ return new M(Se(this.h), Ce(this.s), Ce(this.l), ve(this.opacity));
383
+ },
384
+ displayable() {
385
+ return (0 <= this.s && this.s <= 1 || isNaN(this.s)) && 0 <= this.l && this.l <= 1 && 0 <= this.opacity && this.opacity <= 1;
386
+ },
387
+ formatHsl() {
388
+ let e = ve(this.opacity);
389
+ return `${e === 1 ? "hsl(" : "hsla("}${Se(this.h)}, ${Ce(this.s) * 100}%, ${Ce(this.l) * 100}%${e === 1 ? ")" : `, ${e})`}`;
390
+ }
391
+ }));
392
+ function Se(e) {
393
+ return e = (e || 0) % 360, e < 0 ? e + 360 : e;
394
+ }
395
+ function Ce(e) {
396
+ return Math.max(0, Math.min(1, e || 0));
397
+ }
398
+ function we(e, t, n) {
399
+ return (e < 60 ? t + (n - t) * e / 60 : e < 180 ? n : e < 240 ? t + (n - t) * (240 - e) / 60 : t) * 255;
400
+ }
401
+ //#endregion
402
+ //#region ../../node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/constant.js
403
+ var Te = (e) => () => e;
404
+ //#endregion
405
+ //#region ../../node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/color.js
406
+ function Ee(e, t) {
407
+ return function(n) {
408
+ return e + n * t;
409
+ };
410
+ }
411
+ function De(e, t, n) {
412
+ return e = Math.pow(e, n), t = Math.pow(t, n) - e, n = 1 / n, function(r) {
413
+ return Math.pow(e + r * t, n);
414
+ };
415
+ }
416
+ function Oe(e) {
417
+ return (e = +e) == 1 ? ke : function(t, n) {
418
+ return n - t ? De(t, n, e) : Te(isNaN(t) ? n : t);
419
+ };
420
+ }
421
+ function ke(e, t) {
422
+ var n = t - e;
423
+ return n ? Ee(e, n) : Te(isNaN(e) ? t : e);
424
+ }
425
+ //#endregion
426
+ //#region ../../node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/rgb.js
427
+ var Ae = (function e(t) {
428
+ var n = Oe(t);
429
+ function r(e, t) {
430
+ var r = n((e = me(e)).r, (t = me(t)).r), i = n(e.g, t.g), a = n(e.b, t.b), o = ke(e.opacity, t.opacity);
431
+ return function(t) {
432
+ return e.r = r(t), e.g = i(t), e.b = a(t), e.opacity = o(t), e + "";
433
+ };
434
+ }
435
+ return r.gamma = e, r;
436
+ })(1);
437
+ //#endregion
438
+ //#region ../../node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/numberArray.js
439
+ function je(e, t) {
440
+ t || (t = []);
441
+ var n = e ? Math.min(t.length, e.length) : 0, r = t.slice(), i;
442
+ return function(a) {
443
+ for (i = 0; i < n; ++i) r[i] = e[i] * (1 - a) + t[i] * a;
444
+ return r;
445
+ };
446
+ }
447
+ function Me(e) {
448
+ return ArrayBuffer.isView(e) && !(e instanceof DataView);
449
+ }
450
+ //#endregion
451
+ //#region ../../node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/array.js
452
+ function Ne(e, t) {
453
+ var n = t ? t.length : 0, r = e ? Math.min(n, e.length) : 0, i = Array(r), a = Array(n), o;
454
+ for (o = 0; o < r; ++o) i[o] = He(e[o], t[o]);
455
+ for (; o < n; ++o) a[o] = t[o];
456
+ return function(e) {
457
+ for (o = 0; o < r; ++o) a[o] = i[o](e);
458
+ return a;
459
+ };
460
+ }
461
+ //#endregion
462
+ //#region ../../node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/date.js
463
+ function Pe(e, t) {
464
+ var n = /* @__PURE__ */ new Date();
465
+ return e = +e, t = +t, function(r) {
466
+ return n.setTime(e * (1 - r) + t * r), n;
467
+ };
468
+ }
469
+ //#endregion
470
+ //#region ../../node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/number.js
471
+ function Fe(e, t) {
472
+ return e = +e, t = +t, function(n) {
473
+ return e * (1 - n) + t * n;
474
+ };
475
+ }
476
+ //#endregion
477
+ //#region ../../node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/object.js
478
+ function Ie(e, t) {
479
+ var n = {}, r = {}, i;
480
+ for (i in (typeof e != "object" || !e) && (e = {}), (typeof t != "object" || !t) && (t = {}), t) i in e ? n[i] = He(e[i], t[i]) : r[i] = t[i];
481
+ return function(e) {
482
+ for (i in n) r[i] = n[i](e);
483
+ return r;
484
+ };
485
+ }
486
+ //#endregion
487
+ //#region ../../node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/string.js
488
+ var Le = /[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g, Re = new RegExp(Le.source, "g");
489
+ function ze(e) {
490
+ return function() {
491
+ return e;
492
+ };
493
+ }
494
+ function Be(e) {
495
+ return function(t) {
496
+ return e(t) + "";
497
+ };
498
+ }
499
+ function Ve(e, t) {
500
+ var n = Le.lastIndex = Re.lastIndex = 0, r, i, a, o = -1, s = [], c = [];
501
+ for (e += "", t += ""; (r = Le.exec(e)) && (i = Re.exec(t));) (a = i.index) > n && (a = t.slice(n, a), s[o] ? s[o] += a : s[++o] = a), (r = r[0]) === (i = i[0]) ? s[o] ? s[o] += i : s[++o] = i : (s[++o] = null, c.push({
502
+ i: o,
503
+ x: Fe(r, i)
504
+ })), n = Re.lastIndex;
505
+ return n < t.length && (a = t.slice(n), s[o] ? s[o] += a : s[++o] = a), s.length < 2 ? c[0] ? Be(c[0].x) : ze(t) : (t = c.length, function(e) {
506
+ for (var n = 0, r; n < t; ++n) s[(r = c[n]).i] = r.x(e);
507
+ return s.join("");
508
+ });
509
+ }
510
+ //#endregion
511
+ //#region ../../node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/value.js
512
+ function He(e, t) {
513
+ var n = typeof t, r;
514
+ return t == null || n === "boolean" ? Te(t) : (n === "number" ? Fe : n === "string" ? (r = D(t)) ? (t = r, Ae) : Ve : t instanceof D ? Ae : t instanceof Date ? Pe : Me(t) ? je : Array.isArray(t) ? Ne : typeof t.valueOf != "function" && typeof t.toString != "function" || isNaN(t) ? Ie : Fe)(e, t);
515
+ }
516
+ //#endregion
517
+ //#region ../../node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/round.js
518
+ function Ue(e, t) {
519
+ return e = +e, t = +t, function(n) {
520
+ return Math.round(e * (1 - n) + t * n);
521
+ };
522
+ }
523
+ //#endregion
524
+ //#region ../../node_modules/.pnpm/d3-scale@4.0.2/node_modules/d3-scale/src/constant.js
525
+ function We(e) {
526
+ return function() {
527
+ return e;
528
+ };
529
+ }
530
+ //#endregion
531
+ //#region ../../node_modules/.pnpm/d3-scale@4.0.2/node_modules/d3-scale/src/number.js
532
+ function Ge(e) {
533
+ return +e;
534
+ }
535
+ //#endregion
536
+ //#region ../../node_modules/.pnpm/d3-scale@4.0.2/node_modules/d3-scale/src/continuous.js
537
+ var Ke = [0, 1];
538
+ function N(e) {
539
+ return e;
540
+ }
541
+ function qe(e, t) {
542
+ return (t -= e = +e) ? function(n) {
543
+ return (n - e) / t;
544
+ } : We(isNaN(t) ? NaN : .5);
545
+ }
546
+ function Je(e, t) {
547
+ var n;
548
+ return e > t && (n = e, e = t, t = n), function(n) {
549
+ return Math.max(e, Math.min(t, n));
550
+ };
551
+ }
552
+ function Ye(e, t, n) {
553
+ var r = e[0], i = e[1], a = t[0], o = t[1];
554
+ return i < r ? (r = qe(i, r), a = n(o, a)) : (r = qe(r, i), a = n(a, o)), function(e) {
555
+ return a(r(e));
556
+ };
557
+ }
558
+ function Xe(e, t, n) {
559
+ var r = Math.min(e.length, t.length) - 1, i = Array(r), a = Array(r), o = -1;
560
+ for (e[r] < e[0] && (e = e.slice().reverse(), t = t.slice().reverse()); ++o < r;) i[o] = qe(e[o], e[o + 1]), a[o] = n(t[o], t[o + 1]);
561
+ return function(t) {
562
+ var n = u(e, t, 1, r) - 1;
563
+ return a[n](i[n](t));
564
+ };
565
+ }
566
+ function Ze(e, t) {
567
+ return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown());
568
+ }
569
+ function Qe() {
570
+ var e = Ke, t = Ke, n = He, r, i, a, o = N, s, c, l;
571
+ function u() {
572
+ var n = Math.min(e.length, t.length);
573
+ return o !== N && (o = Je(e[0], e[n - 1])), s = n > 2 ? Xe : Ye, c = l = null, d;
574
+ }
575
+ function d(i) {
576
+ return i == null || isNaN(i = +i) ? a : (c || (c = s(e.map(r), t, n)))(r(o(i)));
577
+ }
578
+ return d.invert = function(n) {
579
+ return o(i((l || (l = s(t, e.map(r), Fe)))(n)));
580
+ }, d.domain = function(t) {
581
+ return arguments.length ? (e = Array.from(t, Ge), u()) : e.slice();
582
+ }, d.range = function(e) {
583
+ return arguments.length ? (t = Array.from(e), u()) : t.slice();
584
+ }, d.rangeRound = function(e) {
585
+ return t = Array.from(e), n = Ue, u();
586
+ }, d.clamp = function(e) {
587
+ return arguments.length ? (o = e ? !0 : N, u()) : o !== N;
588
+ }, d.interpolate = function(e) {
589
+ return arguments.length ? (n = e, u()) : n;
590
+ }, d.unknown = function(e) {
591
+ return arguments.length ? (a = e, d) : a;
592
+ }, function(e, t) {
593
+ return r = e, i = t, u();
594
+ };
595
+ }
596
+ function $e() {
597
+ return Qe()(N, N);
598
+ }
599
+ //#endregion
600
+ //#region ../../node_modules/.pnpm/d3-format@2.0.0/node_modules/d3-format/src/formatDecimal.js
601
+ function et(e) {
602
+ return Math.abs(e = Math.round(e)) >= 1e21 ? e.toLocaleString("en").replace(/,/g, "") : e.toString(10);
603
+ }
604
+ function tt(e, t) {
605
+ if ((n = (e = t ? e.toExponential(t - 1) : e.toExponential()).indexOf("e")) < 0) return null;
606
+ var n, r = e.slice(0, n);
607
+ return [r.length > 1 ? r[0] + r.slice(2) : r, +e.slice(n + 1)];
608
+ }
609
+ //#endregion
610
+ //#region ../../node_modules/.pnpm/d3-format@2.0.0/node_modules/d3-format/src/exponent.js
611
+ function P(e) {
612
+ return e = tt(Math.abs(e)), e ? e[1] : NaN;
613
+ }
614
+ //#endregion
615
+ //#region ../../node_modules/.pnpm/d3-format@2.0.0/node_modules/d3-format/src/formatGroup.js
616
+ function nt(e, t) {
617
+ return function(n, r) {
618
+ for (var i = n.length, a = [], o = 0, s = e[0], c = 0; i > 0 && s > 0 && (c + s + 1 > r && (s = Math.max(1, r - c)), a.push(n.substring(i -= s, i + s)), !((c += s + 1) > r));) s = e[o = (o + 1) % e.length];
619
+ return a.reverse().join(t);
620
+ };
621
+ }
622
+ //#endregion
623
+ //#region ../../node_modules/.pnpm/d3-format@2.0.0/node_modules/d3-format/src/formatNumerals.js
624
+ function rt(e) {
625
+ return function(t) {
626
+ return t.replace(/[0-9]/g, function(t) {
627
+ return e[+t];
628
+ });
629
+ };
630
+ }
631
+ //#endregion
632
+ //#region ../../node_modules/.pnpm/d3-format@2.0.0/node_modules/d3-format/src/formatSpecifier.js
633
+ var it = /^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;
634
+ function at(e) {
635
+ if (!(t = it.exec(e))) throw Error("invalid format: " + e);
636
+ var t;
637
+ return new ot({
638
+ fill: t[1],
639
+ align: t[2],
640
+ sign: t[3],
641
+ symbol: t[4],
642
+ zero: t[5],
643
+ width: t[6],
644
+ comma: t[7],
645
+ precision: t[8] && t[8].slice(1),
646
+ trim: t[9],
647
+ type: t[10]
648
+ });
649
+ }
650
+ at.prototype = ot.prototype;
651
+ function ot(e) {
652
+ this.fill = e.fill === void 0 ? " " : e.fill + "", this.align = e.align === void 0 ? ">" : e.align + "", this.sign = e.sign === void 0 ? "-" : e.sign + "", this.symbol = e.symbol === void 0 ? "" : e.symbol + "", this.zero = !!e.zero, this.width = e.width === void 0 ? void 0 : +e.width, this.comma = !!e.comma, this.precision = e.precision === void 0 ? void 0 : +e.precision, this.trim = !!e.trim, this.type = e.type === void 0 ? "" : e.type + "";
653
+ }
654
+ ot.prototype.toString = function() {
655
+ return this.fill + this.align + this.sign + this.symbol + (this.zero ? "0" : "") + (this.width === void 0 ? "" : Math.max(1, this.width | 0)) + (this.comma ? "," : "") + (this.precision === void 0 ? "" : "." + Math.max(0, this.precision | 0)) + (this.trim ? "~" : "") + this.type;
60
656
  };
61
- /**
62
- * Hook that returns a function that generates the props for a time scaled axis based on the size in pixels of the
63
- * axis
64
- *
65
- * @param data the underlying data for the axis
66
- * @param domain the target domain for the axis
67
- */
68
- export function useD3TimeAxis(data, domain) {
69
- return useD3Axis(data, getTimeScale, (dm) => dm, domain);
70
- }
71
- /**
72
- * Hook that returns a function that generates the props for an ordinal (categorical) scaled axis, doesn't actually use
73
- * the ordinal scale as it doesn't need to, but has the same returned api as the others so it can be substituted in.
74
- *
75
- * @param mapping a mapping dict that translates the numeric value to a label
76
- */
77
- export function useD3OrdinalAxis(mapping) {
78
- return () => ({
79
- tickFormatter: (tick) => mapping[tick],
80
- type: 'category',
81
- });
657
+ //#endregion
658
+ //#region ../../node_modules/.pnpm/d3-format@2.0.0/node_modules/d3-format/src/formatTrim.js
659
+ function st(e) {
660
+ out: for (var t = e.length, n = 1, r = -1, i; n < t; ++n) switch (e[n]) {
661
+ case ".":
662
+ r = i = n;
663
+ break;
664
+ case "0":
665
+ r === 0 && (r = n), i = n;
666
+ break;
667
+ default:
668
+ if (!+e[n]) break out;
669
+ r > 0 && (r = 0);
670
+ break;
671
+ }
672
+ return r > 0 ? e.slice(0, r) + e.slice(i + 1) : e;
673
+ }
674
+ //#endregion
675
+ //#region ../../node_modules/.pnpm/d3-format@2.0.0/node_modules/d3-format/src/formatPrefixAuto.js
676
+ var ct;
677
+ function lt(e, t) {
678
+ var n = tt(e, t);
679
+ if (!n) return e + "";
680
+ var r = n[0], i = n[1], a = i - (ct = Math.max(-8, Math.min(8, Math.floor(i / 3))) * 3) + 1, o = r.length;
681
+ return a === o ? r : a > o ? r + Array(a - o + 1).join("0") : a > 0 ? r.slice(0, a) + "." + r.slice(a) : "0." + Array(1 - a).join("0") + tt(e, Math.max(0, t + a - 1))[0];
682
+ }
683
+ //#endregion
684
+ //#region ../../node_modules/.pnpm/d3-format@2.0.0/node_modules/d3-format/src/formatRounded.js
685
+ function ut(e, t) {
686
+ var n = tt(e, t);
687
+ if (!n) return e + "";
688
+ var r = n[0], i = n[1];
689
+ return i < 0 ? "0." + Array(-i).join("0") + r : r.length > i + 1 ? r.slice(0, i + 1) + "." + r.slice(i + 1) : r + Array(i - r.length + 2).join("0");
690
+ }
691
+ //#endregion
692
+ //#region ../../node_modules/.pnpm/d3-format@2.0.0/node_modules/d3-format/src/formatTypes.js
693
+ var dt = {
694
+ "%": (e, t) => (e * 100).toFixed(t),
695
+ b: (e) => Math.round(e).toString(2),
696
+ c: (e) => e + "",
697
+ d: et,
698
+ e: (e, t) => e.toExponential(t),
699
+ f: (e, t) => e.toFixed(t),
700
+ g: (e, t) => e.toPrecision(t),
701
+ o: (e) => Math.round(e).toString(8),
702
+ p: (e, t) => ut(e * 100, t),
703
+ r: ut,
704
+ s: lt,
705
+ X: (e) => Math.round(e).toString(16).toUpperCase(),
706
+ x: (e) => Math.round(e).toString(16)
707
+ };
708
+ //#endregion
709
+ //#region ../../node_modules/.pnpm/d3-format@2.0.0/node_modules/d3-format/src/identity.js
710
+ function ft(e) {
711
+ return e;
712
+ }
713
+ //#endregion
714
+ //#region ../../node_modules/.pnpm/d3-format@2.0.0/node_modules/d3-format/src/locale.js
715
+ var pt = Array.prototype.map, mt = [
716
+ "y",
717
+ "z",
718
+ "a",
719
+ "f",
720
+ "p",
721
+ "n",
722
+ "µ",
723
+ "m",
724
+ "",
725
+ "k",
726
+ "M",
727
+ "G",
728
+ "T",
729
+ "P",
730
+ "E",
731
+ "Z",
732
+ "Y"
733
+ ];
734
+ function ht(e) {
735
+ var t = e.grouping === void 0 || e.thousands === void 0 ? ft : nt(pt.call(e.grouping, Number), e.thousands + ""), n = e.currency === void 0 ? "" : e.currency[0] + "", r = e.currency === void 0 ? "" : e.currency[1] + "", i = e.decimal === void 0 ? "." : e.decimal + "", a = e.numerals === void 0 ? ft : rt(pt.call(e.numerals, String)), o = e.percent === void 0 ? "%" : e.percent + "", s = e.minus === void 0 ? "−" : e.minus + "", c = e.nan === void 0 ? "NaN" : e.nan + "";
736
+ function l(e) {
737
+ e = at(e);
738
+ var l = e.fill, u = e.align, d = e.sign, f = e.symbol, p = e.zero, m = e.width, h = e.comma, g = e.precision, _ = e.trim, v = e.type;
739
+ v === "n" ? (h = !0, v = "g") : dt[v] || (g === void 0 && (g = 12), _ = !0, v = "g"), (p || l === "0" && u === "=") && (p = !0, l = "0", u = "=");
740
+ var y = f === "$" ? n : f === "#" && /[boxX]/.test(v) ? "0" + v.toLowerCase() : "", b = f === "$" ? r : /[%p]/.test(v) ? o : "", x = dt[v], S = /[defgprs%]/.test(v);
741
+ g = g === void 0 ? 6 : /[gprs]/.test(v) ? Math.max(1, Math.min(21, g)) : Math.max(0, Math.min(20, g));
742
+ function C(e) {
743
+ var n = y, r = b, o, f, C;
744
+ if (v === "c") r = x(e) + r, e = "";
745
+ else {
746
+ e = +e;
747
+ var w = e < 0 || 1 / e < 0;
748
+ if (e = isNaN(e) ? c : x(Math.abs(e), g), _ && (e = st(e)), w && +e == 0 && d !== "+" && (w = !1), n = (w ? d === "(" ? d : s : d === "-" || d === "(" ? "" : d) + n, r = (v === "s" ? mt[8 + ct / 3] : "") + r + (w && d === "(" ? ")" : ""), S) {
749
+ for (o = -1, f = e.length; ++o < f;) if (C = e.charCodeAt(o), 48 > C || C > 57) {
750
+ r = (C === 46 ? i + e.slice(o + 1) : e.slice(o)) + r, e = e.slice(0, o);
751
+ break;
752
+ }
753
+ }
754
+ }
755
+ h && !p && (e = t(e, Infinity));
756
+ var T = n.length + e.length + r.length, E = T < m ? Array(m - T + 1).join(l) : "";
757
+ switch (h && p && (e = t(E + e, E.length ? m - r.length : Infinity), E = ""), u) {
758
+ case "<":
759
+ e = n + e + r + E;
760
+ break;
761
+ case "=":
762
+ e = n + E + e + r;
763
+ break;
764
+ case "^":
765
+ e = E.slice(0, T = E.length >> 1) + n + e + r + E.slice(T);
766
+ break;
767
+ default:
768
+ e = E + n + e + r;
769
+ break;
770
+ }
771
+ return a(e);
772
+ }
773
+ return C.toString = function() {
774
+ return e + "";
775
+ }, C;
776
+ }
777
+ function u(e, t) {
778
+ var n = l((e = at(e), e.type = "f", e)), r = Math.max(-8, Math.min(8, Math.floor(P(t) / 3))) * 3, i = Math.pow(10, -r), a = mt[8 + r / 3];
779
+ return function(e) {
780
+ return n(i * e) + a;
781
+ };
782
+ }
783
+ return {
784
+ format: l,
785
+ formatPrefix: u
786
+ };
787
+ }
788
+ //#endregion
789
+ //#region ../../node_modules/.pnpm/d3-format@2.0.0/node_modules/d3-format/src/defaultLocale.js
790
+ var gt, _t, vt;
791
+ yt({
792
+ thousands: ",",
793
+ grouping: [3],
794
+ currency: ["$", ""]
795
+ });
796
+ function yt(e) {
797
+ return gt = ht(e), _t = gt.format, vt = gt.formatPrefix, gt;
798
+ }
799
+ //#endregion
800
+ //#region ../../node_modules/.pnpm/d3-format@2.0.0/node_modules/d3-format/src/precisionFixed.js
801
+ function bt(e) {
802
+ return Math.max(0, -P(Math.abs(e)));
803
+ }
804
+ //#endregion
805
+ //#region ../../node_modules/.pnpm/d3-format@2.0.0/node_modules/d3-format/src/precisionPrefix.js
806
+ function xt(e, t) {
807
+ return Math.max(0, Math.max(-8, Math.min(8, Math.floor(P(t) / 3))) * 3 - P(Math.abs(e)));
808
+ }
809
+ //#endregion
810
+ //#region ../../node_modules/.pnpm/d3-format@2.0.0/node_modules/d3-format/src/precisionRound.js
811
+ function St(e, t) {
812
+ return e = Math.abs(e), t = Math.abs(t) - e, Math.max(0, P(t) - P(e)) + 1;
813
+ }
814
+ //#endregion
815
+ //#region ../../node_modules/.pnpm/d3-scale@4.0.2/node_modules/d3-scale/src/tickFormat.js
816
+ function Ct(e, t, n, r) {
817
+ var i = _(e, t, n), a;
818
+ switch (r = at(r == null ? ",f" : r), r.type) {
819
+ case "s":
820
+ var o = Math.max(Math.abs(e), Math.abs(t));
821
+ return r.precision == null && !isNaN(a = xt(i, o)) && (r.precision = a), vt(r, o);
822
+ case "":
823
+ case "e":
824
+ case "g":
825
+ case "p":
826
+ case "r":
827
+ r.precision == null && !isNaN(a = St(i, Math.max(Math.abs(e), Math.abs(t)))) && (r.precision = a - (r.type === "e"));
828
+ break;
829
+ case "f":
830
+ case "%":
831
+ r.precision == null && !isNaN(a = bt(i)) && (r.precision = a - (r.type === "%") * 2);
832
+ break;
833
+ }
834
+ return _t(r);
835
+ }
836
+ //#endregion
837
+ //#region ../../node_modules/.pnpm/d3-scale@4.0.2/node_modules/d3-scale/src/linear.js
838
+ function wt(e) {
839
+ var t = e.domain;
840
+ return e.ticks = function(e) {
841
+ var n = t();
842
+ return h(n[0], n[n.length - 1], e == null ? 10 : e);
843
+ }, e.tickFormat = function(e, n) {
844
+ var r = t();
845
+ return Ct(r[0], r[r.length - 1], e == null ? 10 : e, n);
846
+ }, e.nice = function(n) {
847
+ n == null && (n = 10);
848
+ var r = t(), i = 0, a = r.length - 1, o = r[i], s = r[a], c, l, u = 10;
849
+ for (s < o && (l = o, o = s, s = l, l = i, i = a, a = l); u-- > 0;) {
850
+ if (l = g(o, s, n), l === c) return r[i] = o, r[a] = s, t(r);
851
+ if (l > 0) o = Math.floor(o / l) * l, s = Math.ceil(s / l) * l;
852
+ else if (l < 0) o = Math.ceil(o * l) / l, s = Math.floor(s * l) / l;
853
+ else break;
854
+ c = l;
855
+ }
856
+ return e;
857
+ }, e;
858
+ }
859
+ function Tt() {
860
+ var e = $e();
861
+ return e.copy = function() {
862
+ return Ze(e, Tt());
863
+ }, v.apply(e, arguments), wt(e);
864
+ }
865
+ //#endregion
866
+ //#region ../../node_modules/.pnpm/d3-scale@4.0.2/node_modules/d3-scale/src/nice.js
867
+ function Et(e, t) {
868
+ e = e.slice();
869
+ var n = 0, r = e.length - 1, i = e[n], a = e[r], o;
870
+ return a < i && (o = n, n = r, r = o, o = i, i = a, a = o), e[n] = t.floor(i), e[r] = t.ceil(a), e;
871
+ }
872
+ //#endregion
873
+ //#region ../../node_modules/.pnpm/d3-time@2.1.1/node_modules/d3-time/src/interval.js
874
+ var Dt = /* @__PURE__ */ new Date(), Ot = /* @__PURE__ */ new Date();
875
+ function F(e, t, n, r) {
876
+ function i(t) {
877
+ return e(t = arguments.length === 0 ? /* @__PURE__ */ new Date() : /* @__PURE__ */ new Date(+t)), t;
878
+ }
879
+ return i.floor = function(t) {
880
+ return e(t = /* @__PURE__ */ new Date(+t)), t;
881
+ }, i.ceil = function(n) {
882
+ return e(n = /* @__PURE__ */ new Date(n - 1)), t(n, 1), e(n), n;
883
+ }, i.round = function(e) {
884
+ var t = i(e), n = i.ceil(e);
885
+ return e - t < n - e ? t : n;
886
+ }, i.offset = function(e, n) {
887
+ return t(e = /* @__PURE__ */ new Date(+e), n == null ? 1 : Math.floor(n)), e;
888
+ }, i.range = function(n, r, a) {
889
+ var o = [], s;
890
+ if (n = i.ceil(n), a = a == null ? 1 : Math.floor(a), !(n < r) || !(a > 0)) return o;
891
+ do
892
+ o.push(s = /* @__PURE__ */ new Date(+n)), t(n, a), e(n);
893
+ while (s < n && n < r);
894
+ return o;
895
+ }, i.filter = function(n) {
896
+ return F(function(t) {
897
+ if (t >= t) for (; e(t), !n(t);) t.setTime(t - 1);
898
+ }, function(e, r) {
899
+ if (e >= e) if (r < 0) for (; ++r <= 0;) for (; t(e, -1), !n(e););
900
+ else for (; --r >= 0;) for (; t(e, 1), !n(e););
901
+ });
902
+ }, n && (i.count = function(t, r) {
903
+ return Dt.setTime(+t), Ot.setTime(+r), e(Dt), e(Ot), Math.floor(n(Dt, Ot));
904
+ }, i.every = function(e) {
905
+ return e = Math.floor(e), !isFinite(e) || !(e > 0) ? null : e > 1 ? i.filter(r ? function(t) {
906
+ return r(t) % e === 0;
907
+ } : function(t) {
908
+ return i.count(0, t) % e === 0;
909
+ }) : i;
910
+ }), i;
911
+ }
912
+ //#endregion
913
+ //#region ../../node_modules/.pnpm/d3-time@2.1.1/node_modules/d3-time/src/millisecond.js
914
+ var kt = F(function() {}, function(e, t) {
915
+ e.setTime(+e + t);
916
+ }, function(e, t) {
917
+ return t - e;
918
+ });
919
+ kt.every = function(e) {
920
+ return e = Math.floor(e), !isFinite(e) || !(e > 0) ? null : e > 1 ? F(function(t) {
921
+ t.setTime(Math.floor(t / e) * e);
922
+ }, function(t, n) {
923
+ t.setTime(+t + n * e);
924
+ }, function(t, n) {
925
+ return (n - t) / e;
926
+ }) : kt;
927
+ }, kt.range;
928
+ //#endregion
929
+ //#region ../../node_modules/.pnpm/d3-time@2.1.1/node_modules/d3-time/src/duration.js
930
+ var I = 1e3, L = I * 60, R = L * 60, z = R * 24, At = z * 7, jt = z * 30, Mt = z * 365, B = F(function(e) {
931
+ e.setTime(e - e.getMilliseconds());
932
+ }, function(e, t) {
933
+ e.setTime(+e + t * I);
934
+ }, function(e, t) {
935
+ return (t - e) / I;
936
+ }, function(e) {
937
+ return e.getUTCSeconds();
938
+ });
939
+ B.range;
940
+ //#endregion
941
+ //#region ../../node_modules/.pnpm/d3-time@2.1.1/node_modules/d3-time/src/minute.js
942
+ var Nt = F(function(e) {
943
+ e.setTime(e - e.getMilliseconds() - e.getSeconds() * I);
944
+ }, function(e, t) {
945
+ e.setTime(+e + t * L);
946
+ }, function(e, t) {
947
+ return (t - e) / L;
948
+ }, function(e) {
949
+ return e.getMinutes();
950
+ });
951
+ Nt.range;
952
+ //#endregion
953
+ //#region ../../node_modules/.pnpm/d3-time@2.1.1/node_modules/d3-time/src/hour.js
954
+ var Pt = F(function(e) {
955
+ e.setTime(e - e.getMilliseconds() - e.getSeconds() * I - e.getMinutes() * L);
956
+ }, function(e, t) {
957
+ e.setTime(+e + t * R);
958
+ }, function(e, t) {
959
+ return (t - e) / R;
960
+ }, function(e) {
961
+ return e.getHours();
962
+ });
963
+ Pt.range;
964
+ //#endregion
965
+ //#region ../../node_modules/.pnpm/d3-time@2.1.1/node_modules/d3-time/src/day.js
966
+ var V = F((e) => e.setHours(0, 0, 0, 0), (e, t) => e.setDate(e.getDate() + t), (e, t) => (t - e - (t.getTimezoneOffset() - e.getTimezoneOffset()) * L) / z, (e) => e.getDate() - 1);
967
+ V.range;
968
+ //#endregion
969
+ //#region ../../node_modules/.pnpm/d3-time@2.1.1/node_modules/d3-time/src/week.js
970
+ function H(e) {
971
+ return F(function(t) {
972
+ t.setDate(t.getDate() - (t.getDay() + 7 - e) % 7), t.setHours(0, 0, 0, 0);
973
+ }, function(e, t) {
974
+ e.setDate(e.getDate() + t * 7);
975
+ }, function(e, t) {
976
+ return (t - e - (t.getTimezoneOffset() - e.getTimezoneOffset()) * L) / At;
977
+ });
978
+ }
979
+ var Ft = H(0), It = H(1), Lt = H(2), Rt = H(3), U = H(4), zt = H(5), Bt = H(6);
980
+ Ft.range, It.range, Lt.range, Rt.range, U.range, zt.range, Bt.range;
981
+ //#endregion
982
+ //#region ../../node_modules/.pnpm/d3-time@2.1.1/node_modules/d3-time/src/month.js
983
+ var Vt = F(function(e) {
984
+ e.setDate(1), e.setHours(0, 0, 0, 0);
985
+ }, function(e, t) {
986
+ e.setMonth(e.getMonth() + t);
987
+ }, function(e, t) {
988
+ return t.getMonth() - e.getMonth() + (t.getFullYear() - e.getFullYear()) * 12;
989
+ }, function(e) {
990
+ return e.getMonth();
991
+ });
992
+ Vt.range;
993
+ //#endregion
994
+ //#region ../../node_modules/.pnpm/d3-time@2.1.1/node_modules/d3-time/src/year.js
995
+ var W = F(function(e) {
996
+ e.setMonth(0, 1), e.setHours(0, 0, 0, 0);
997
+ }, function(e, t) {
998
+ e.setFullYear(e.getFullYear() + t);
999
+ }, function(e, t) {
1000
+ return t.getFullYear() - e.getFullYear();
1001
+ }, function(e) {
1002
+ return e.getFullYear();
1003
+ });
1004
+ W.every = function(e) {
1005
+ return !isFinite(e = Math.floor(e)) || !(e > 0) ? null : F(function(t) {
1006
+ t.setFullYear(Math.floor(t.getFullYear() / e) * e), t.setMonth(0, 1), t.setHours(0, 0, 0, 0);
1007
+ }, function(t, n) {
1008
+ t.setFullYear(t.getFullYear() + n * e);
1009
+ });
1010
+ }, W.range;
1011
+ //#endregion
1012
+ //#region ../../node_modules/.pnpm/d3-time@2.1.1/node_modules/d3-time/src/utcMinute.js
1013
+ var Ht = F(function(e) {
1014
+ e.setUTCSeconds(0, 0);
1015
+ }, function(e, t) {
1016
+ e.setTime(+e + t * L);
1017
+ }, function(e, t) {
1018
+ return (t - e) / L;
1019
+ }, function(e) {
1020
+ return e.getUTCMinutes();
1021
+ });
1022
+ Ht.range;
1023
+ //#endregion
1024
+ //#region ../../node_modules/.pnpm/d3-time@2.1.1/node_modules/d3-time/src/utcHour.js
1025
+ var Ut = F(function(e) {
1026
+ e.setUTCMinutes(0, 0, 0);
1027
+ }, function(e, t) {
1028
+ e.setTime(+e + t * R);
1029
+ }, function(e, t) {
1030
+ return (t - e) / R;
1031
+ }, function(e) {
1032
+ return e.getUTCHours();
1033
+ });
1034
+ Ut.range;
1035
+ //#endregion
1036
+ //#region ../../node_modules/.pnpm/d3-time@2.1.1/node_modules/d3-time/src/utcDay.js
1037
+ var Wt = F(function(e) {
1038
+ e.setUTCHours(0, 0, 0, 0);
1039
+ }, function(e, t) {
1040
+ e.setUTCDate(e.getUTCDate() + t);
1041
+ }, function(e, t) {
1042
+ return (t - e) / z;
1043
+ }, function(e) {
1044
+ return e.getUTCDate() - 1;
1045
+ });
1046
+ Wt.range;
1047
+ //#endregion
1048
+ //#region ../../node_modules/.pnpm/d3-time@2.1.1/node_modules/d3-time/src/utcWeek.js
1049
+ function G(e) {
1050
+ return F(function(t) {
1051
+ t.setUTCDate(t.getUTCDate() - (t.getUTCDay() + 7 - e) % 7), t.setUTCHours(0, 0, 0, 0);
1052
+ }, function(e, t) {
1053
+ e.setUTCDate(e.getUTCDate() + t * 7);
1054
+ }, function(e, t) {
1055
+ return (t - e) / At;
1056
+ });
1057
+ }
1058
+ var Gt = G(0), Kt = G(1), qt = G(2), Jt = G(3), K = G(4), Yt = G(5), Xt = G(6);
1059
+ Gt.range, Kt.range, qt.range, Jt.range, K.range, Yt.range, Xt.range;
1060
+ //#endregion
1061
+ //#region ../../node_modules/.pnpm/d3-time@2.1.1/node_modules/d3-time/src/utcMonth.js
1062
+ var Zt = F(function(e) {
1063
+ e.setUTCDate(1), e.setUTCHours(0, 0, 0, 0);
1064
+ }, function(e, t) {
1065
+ e.setUTCMonth(e.getUTCMonth() + t);
1066
+ }, function(e, t) {
1067
+ return t.getUTCMonth() - e.getUTCMonth() + (t.getUTCFullYear() - e.getUTCFullYear()) * 12;
1068
+ }, function(e) {
1069
+ return e.getUTCMonth();
1070
+ });
1071
+ Zt.range;
1072
+ //#endregion
1073
+ //#region ../../node_modules/.pnpm/d3-time@2.1.1/node_modules/d3-time/src/utcYear.js
1074
+ var q = F(function(e) {
1075
+ e.setUTCMonth(0, 1), e.setUTCHours(0, 0, 0, 0);
1076
+ }, function(e, t) {
1077
+ e.setUTCFullYear(e.getUTCFullYear() + t);
1078
+ }, function(e, t) {
1079
+ return t.getUTCFullYear() - e.getUTCFullYear();
1080
+ }, function(e) {
1081
+ return e.getUTCFullYear();
1082
+ });
1083
+ q.every = function(e) {
1084
+ return !isFinite(e = Math.floor(e)) || !(e > 0) ? null : F(function(t) {
1085
+ t.setUTCFullYear(Math.floor(t.getUTCFullYear() / e) * e), t.setUTCMonth(0, 1), t.setUTCHours(0, 0, 0, 0);
1086
+ }, function(t, n) {
1087
+ t.setUTCFullYear(t.getUTCFullYear() + n * e);
1088
+ });
1089
+ }, q.range;
1090
+ //#endregion
1091
+ //#region ../../node_modules/.pnpm/d3-array@2.12.1/node_modules/d3-array/src/ascending.js
1092
+ function Qt(e, t) {
1093
+ return e < t ? -1 : e > t ? 1 : e >= t ? 0 : NaN;
1094
+ }
1095
+ //#endregion
1096
+ //#region ../../node_modules/.pnpm/d3-array@2.12.1/node_modules/d3-array/src/bisector.js
1097
+ function $t(e) {
1098
+ let t = e, n = e;
1099
+ e.length === 1 && (t = (t, n) => e(t) - n, n = en(e));
1100
+ function r(e, t, r, i) {
1101
+ for (r == null && (r = 0), i == null && (i = e.length); r < i;) {
1102
+ let a = r + i >>> 1;
1103
+ n(e[a], t) < 0 ? r = a + 1 : i = a;
1104
+ }
1105
+ return r;
1106
+ }
1107
+ function i(e, t, r, i) {
1108
+ for (r == null && (r = 0), i == null && (i = e.length); r < i;) {
1109
+ let a = r + i >>> 1;
1110
+ n(e[a], t) > 0 ? i = a : r = a + 1;
1111
+ }
1112
+ return r;
1113
+ }
1114
+ function a(e, n, i, a) {
1115
+ i == null && (i = 0), a == null && (a = e.length);
1116
+ let o = r(e, n, i, a - 1);
1117
+ return o > i && t(e[o - 1], n) > -t(e[o], n) ? o - 1 : o;
1118
+ }
1119
+ return {
1120
+ left: r,
1121
+ center: a,
1122
+ right: i
1123
+ };
1124
+ }
1125
+ function en(e) {
1126
+ return (t, n) => Qt(e(t), n);
1127
+ }
1128
+ //#endregion
1129
+ //#region ../../node_modules/.pnpm/d3-array@2.12.1/node_modules/d3-array/src/ticks.js
1130
+ var tn = Math.sqrt(50), nn = Math.sqrt(10), rn = Math.sqrt(2);
1131
+ function an(e, t, n) {
1132
+ var r = Math.abs(t - e) / Math.max(0, n), i = Math.pow(10, Math.floor(Math.log(r) / Math.LN10)), a = r / i;
1133
+ return a >= tn ? i *= 10 : a >= nn ? i *= 5 : a >= rn && (i *= 2), t < e ? -i : i;
1134
+ }
1135
+ //#endregion
1136
+ //#region ../../node_modules/.pnpm/d3-time@2.1.1/node_modules/d3-time/src/ticks.js
1137
+ function on(e, t, n, r, i, a) {
1138
+ let o = [
1139
+ [
1140
+ B,
1141
+ 1,
1142
+ I
1143
+ ],
1144
+ [
1145
+ B,
1146
+ 5,
1147
+ 5 * I
1148
+ ],
1149
+ [
1150
+ B,
1151
+ 15,
1152
+ 15 * I
1153
+ ],
1154
+ [
1155
+ B,
1156
+ 30,
1157
+ 30 * I
1158
+ ],
1159
+ [
1160
+ a,
1161
+ 1,
1162
+ L
1163
+ ],
1164
+ [
1165
+ a,
1166
+ 5,
1167
+ 5 * L
1168
+ ],
1169
+ [
1170
+ a,
1171
+ 15,
1172
+ 15 * L
1173
+ ],
1174
+ [
1175
+ a,
1176
+ 30,
1177
+ 30 * L
1178
+ ],
1179
+ [
1180
+ i,
1181
+ 1,
1182
+ R
1183
+ ],
1184
+ [
1185
+ i,
1186
+ 3,
1187
+ 3 * R
1188
+ ],
1189
+ [
1190
+ i,
1191
+ 6,
1192
+ 6 * R
1193
+ ],
1194
+ [
1195
+ i,
1196
+ 12,
1197
+ 12 * R
1198
+ ],
1199
+ [
1200
+ r,
1201
+ 1,
1202
+ z
1203
+ ],
1204
+ [
1205
+ r,
1206
+ 2,
1207
+ 2 * z
1208
+ ],
1209
+ [
1210
+ n,
1211
+ 1,
1212
+ At
1213
+ ],
1214
+ [
1215
+ t,
1216
+ 1,
1217
+ jt
1218
+ ],
1219
+ [
1220
+ t,
1221
+ 3,
1222
+ 3 * jt
1223
+ ],
1224
+ [
1225
+ e,
1226
+ 1,
1227
+ Mt
1228
+ ]
1229
+ ];
1230
+ function s(e, t, n) {
1231
+ let r = t < e;
1232
+ r && ([e, t] = [t, e]);
1233
+ let i = n && typeof n.range == "function" ? n : c(e, t, n), a = i ? i.range(e, +t + 1) : [];
1234
+ return r ? a.reverse() : a;
1235
+ }
1236
+ function c(t, n, r) {
1237
+ let i = Math.abs(n - t) / r, a = $t(([, , e]) => e).right(o, i);
1238
+ if (a === o.length) return e.every(an(t / Mt, n / Mt, r));
1239
+ if (a === 0) return kt.every(Math.max(an(t, n, r), 1));
1240
+ let [s, c] = o[i / o[a - 1][2] < o[a][2] / i ? a - 1 : a];
1241
+ return s.every(c);
1242
+ }
1243
+ return [s, c];
1244
+ }
1245
+ var [sn, cn] = on(q, Zt, Gt, Wt, Ut, Ht), [ln, un] = on(W, Vt, Ft, V, Pt, Nt);
1246
+ //#endregion
1247
+ //#region ../../node_modules/.pnpm/d3-time-format@3.0.0/node_modules/d3-time-format/src/locale.js
1248
+ function dn(e) {
1249
+ if (0 <= e.y && e.y < 100) {
1250
+ var t = new Date(-1, e.m, e.d, e.H, e.M, e.S, e.L);
1251
+ return t.setFullYear(e.y), t;
1252
+ }
1253
+ return new Date(e.y, e.m, e.d, e.H, e.M, e.S, e.L);
1254
+ }
1255
+ function fn(e) {
1256
+ if (0 <= e.y && e.y < 100) {
1257
+ var t = new Date(Date.UTC(-1, e.m, e.d, e.H, e.M, e.S, e.L));
1258
+ return t.setUTCFullYear(e.y), t;
1259
+ }
1260
+ return new Date(Date.UTC(e.y, e.m, e.d, e.H, e.M, e.S, e.L));
1261
+ }
1262
+ function J(e, t, n) {
1263
+ return {
1264
+ y: e,
1265
+ m: t,
1266
+ d: n,
1267
+ H: 0,
1268
+ M: 0,
1269
+ S: 0,
1270
+ L: 0
1271
+ };
1272
+ }
1273
+ function pn(e) {
1274
+ var t = e.dateTime, n = e.date, r = e.time, i = e.periods, a = e.days, o = e.shortDays, s = e.months, c = e.shortMonths, l = Z(i), u = Q(i), d = Z(a), f = Q(a), p = Z(o), m = Q(o), h = Z(s), g = Q(s), _ = Z(c), v = Q(c), y = {
1275
+ a: oe,
1276
+ A: se,
1277
+ b: ce,
1278
+ B: le,
1279
+ c: null,
1280
+ d: Rn,
1281
+ e: Rn,
1282
+ f: Un,
1283
+ g: er,
1284
+ G: nr,
1285
+ H: zn,
1286
+ I: Bn,
1287
+ j: Vn,
1288
+ L: Hn,
1289
+ m: Wn,
1290
+ M: Gn,
1291
+ p: ue,
1292
+ q: de,
1293
+ Q: Tr,
1294
+ s: Er,
1295
+ S: Kn,
1296
+ u: qn,
1297
+ U: Jn,
1298
+ V: Xn,
1299
+ w: Zn,
1300
+ W: Qn,
1301
+ x: null,
1302
+ X: null,
1303
+ y: $n,
1304
+ Y: tr,
1305
+ Z: rr,
1306
+ "%": wr
1307
+ }, b = {
1308
+ a: D,
1309
+ A: fe,
1310
+ b: O,
1311
+ B: pe,
1312
+ c: null,
1313
+ d: ir,
1314
+ e: ir,
1315
+ f: lr,
1316
+ g: br,
1317
+ G: Sr,
1318
+ H: ar,
1319
+ I: or,
1320
+ j: sr,
1321
+ L: cr,
1322
+ m: ur,
1323
+ M: dr,
1324
+ p: me,
1325
+ q: k,
1326
+ Q: Tr,
1327
+ s: Er,
1328
+ S: fr,
1329
+ u: pr,
1330
+ U: mr,
1331
+ V: gr,
1332
+ w: _r,
1333
+ W: vr,
1334
+ x: null,
1335
+ X: null,
1336
+ y: yr,
1337
+ Y: xr,
1338
+ Z: Cr,
1339
+ "%": wr
1340
+ }, x = {
1341
+ a: E,
1342
+ A: ee,
1343
+ b: te,
1344
+ B: ne,
1345
+ c: re,
1346
+ d: On,
1347
+ e: On,
1348
+ f: Pn,
1349
+ g: wn,
1350
+ G: Cn,
1351
+ H: An,
1352
+ I: An,
1353
+ j: kn,
1354
+ L: Nn,
1355
+ m: Dn,
1356
+ M: jn,
1357
+ p: T,
1358
+ q: En,
1359
+ Q: In,
1360
+ s: Ln,
1361
+ S: Mn,
1362
+ u: yn,
1363
+ U: bn,
1364
+ V: xn,
1365
+ w: vn,
1366
+ W: Sn,
1367
+ x: ie,
1368
+ X: ae,
1369
+ y: wn,
1370
+ Y: Cn,
1371
+ Z: Tn,
1372
+ "%": Fn
1373
+ };
1374
+ y.x = S(n, y), y.X = S(r, y), y.c = S(t, y), b.x = S(n, b), b.X = S(r, b), b.c = S(t, b);
1375
+ function S(e, t) {
1376
+ return function(n) {
1377
+ var r = [], i = -1, a = 0, o = e.length, s, c, l;
1378
+ for (n instanceof Date || (n = /* @__PURE__ */ new Date(+n)); ++i < o;) e.charCodeAt(i) === 37 && (r.push(e.slice(a, i)), (c = mn[s = e.charAt(++i)]) == null ? c = s === "e" ? " " : "0" : s = e.charAt(++i), (l = t[s]) && (s = l(n, c)), r.push(s), a = i + 1);
1379
+ return r.push(e.slice(a, i)), r.join("");
1380
+ };
1381
+ }
1382
+ function C(e, t) {
1383
+ return function(n) {
1384
+ var r = J(1900, void 0, 1), i = w(r, e, n += "", 0), a, o;
1385
+ if (i != n.length) return null;
1386
+ if ("Q" in r) return new Date(r.Q);
1387
+ if ("s" in r) return new Date(r.s * 1e3 + ("L" in r ? r.L : 0));
1388
+ if (t && !("Z" in r) && (r.Z = 0), "p" in r && (r.H = r.H % 12 + r.p * 12), r.m === void 0 && (r.m = "q" in r ? r.q : 0), "V" in r) {
1389
+ if (r.V < 1 || r.V > 53) return null;
1390
+ "w" in r || (r.w = 1), "Z" in r ? (a = fn(J(r.y, 0, 1)), o = a.getUTCDay(), a = o > 4 || o === 0 ? Kt.ceil(a) : Kt(a), a = Wt.offset(a, (r.V - 1) * 7), r.y = a.getUTCFullYear(), r.m = a.getUTCMonth(), r.d = a.getUTCDate() + (r.w + 6) % 7) : (a = dn(J(r.y, 0, 1)), o = a.getDay(), a = o > 4 || o === 0 ? It.ceil(a) : It(a), a = V.offset(a, (r.V - 1) * 7), r.y = a.getFullYear(), r.m = a.getMonth(), r.d = a.getDate() + (r.w + 6) % 7);
1391
+ } else ("W" in r || "U" in r) && ("w" in r || (r.w = "u" in r ? r.u % 7 : +("W" in r)), o = "Z" in r ? fn(J(r.y, 0, 1)).getUTCDay() : dn(J(r.y, 0, 1)).getDay(), r.m = 0, r.d = "W" in r ? (r.w + 6) % 7 + r.W * 7 - (o + 5) % 7 : r.w + r.U * 7 - (o + 6) % 7);
1392
+ return "Z" in r ? (r.H += r.Z / 100 | 0, r.M += r.Z % 100, fn(r)) : dn(r);
1393
+ };
1394
+ }
1395
+ function w(e, t, n, r) {
1396
+ for (var i = 0, a = t.length, o = n.length, s, c; i < a;) {
1397
+ if (r >= o) return -1;
1398
+ if (s = t.charCodeAt(i++), s === 37) {
1399
+ if (s = t.charAt(i++), c = x[s in mn ? t.charAt(i++) : s], !c || (r = c(e, n, r)) < 0) return -1;
1400
+ } else if (s != n.charCodeAt(r++)) return -1;
1401
+ }
1402
+ return r;
1403
+ }
1404
+ function T(e, t, n) {
1405
+ var r = l.exec(t.slice(n));
1406
+ return r ? (e.p = u.get(r[0].toLowerCase()), n + r[0].length) : -1;
1407
+ }
1408
+ function E(e, t, n) {
1409
+ var r = p.exec(t.slice(n));
1410
+ return r ? (e.w = m.get(r[0].toLowerCase()), n + r[0].length) : -1;
1411
+ }
1412
+ function ee(e, t, n) {
1413
+ var r = d.exec(t.slice(n));
1414
+ return r ? (e.w = f.get(r[0].toLowerCase()), n + r[0].length) : -1;
1415
+ }
1416
+ function te(e, t, n) {
1417
+ var r = _.exec(t.slice(n));
1418
+ return r ? (e.m = v.get(r[0].toLowerCase()), n + r[0].length) : -1;
1419
+ }
1420
+ function ne(e, t, n) {
1421
+ var r = h.exec(t.slice(n));
1422
+ return r ? (e.m = g.get(r[0].toLowerCase()), n + r[0].length) : -1;
1423
+ }
1424
+ function re(e, n, r) {
1425
+ return w(e, t, n, r);
1426
+ }
1427
+ function ie(e, t, r) {
1428
+ return w(e, n, t, r);
1429
+ }
1430
+ function ae(e, t, n) {
1431
+ return w(e, r, t, n);
1432
+ }
1433
+ function oe(e) {
1434
+ return o[e.getDay()];
1435
+ }
1436
+ function se(e) {
1437
+ return a[e.getDay()];
1438
+ }
1439
+ function ce(e) {
1440
+ return c[e.getMonth()];
1441
+ }
1442
+ function le(e) {
1443
+ return s[e.getMonth()];
1444
+ }
1445
+ function ue(e) {
1446
+ return i[+(e.getHours() >= 12)];
1447
+ }
1448
+ function de(e) {
1449
+ return 1 + ~~(e.getMonth() / 3);
1450
+ }
1451
+ function D(e) {
1452
+ return o[e.getUTCDay()];
1453
+ }
1454
+ function fe(e) {
1455
+ return a[e.getUTCDay()];
1456
+ }
1457
+ function O(e) {
1458
+ return c[e.getUTCMonth()];
1459
+ }
1460
+ function pe(e) {
1461
+ return s[e.getUTCMonth()];
1462
+ }
1463
+ function me(e) {
1464
+ return i[+(e.getUTCHours() >= 12)];
1465
+ }
1466
+ function k(e) {
1467
+ return 1 + ~~(e.getUTCMonth() / 3);
1468
+ }
1469
+ return {
1470
+ format: function(e) {
1471
+ var t = S(e += "", y);
1472
+ return t.toString = function() {
1473
+ return e;
1474
+ }, t;
1475
+ },
1476
+ parse: function(e) {
1477
+ var t = C(e += "", !1);
1478
+ return t.toString = function() {
1479
+ return e;
1480
+ }, t;
1481
+ },
1482
+ utcFormat: function(e) {
1483
+ var t = S(e += "", b);
1484
+ return t.toString = function() {
1485
+ return e;
1486
+ }, t;
1487
+ },
1488
+ utcParse: function(e) {
1489
+ var t = C(e += "", !0);
1490
+ return t.toString = function() {
1491
+ return e;
1492
+ }, t;
1493
+ }
1494
+ };
1495
+ }
1496
+ var mn = {
1497
+ "-": "",
1498
+ _: " ",
1499
+ 0: "0"
1500
+ }, Y = /^\s*\d+/, hn = /^%/, gn = /[\\^$*+?|[\]().{}]/g;
1501
+ function X(e, t, n) {
1502
+ var r = e < 0 ? "-" : "", i = (r ? -e : e) + "", a = i.length;
1503
+ return r + (a < n ? Array(n - a + 1).join(t) + i : i);
1504
+ }
1505
+ function _n(e) {
1506
+ return e.replace(gn, "\\$&");
1507
+ }
1508
+ function Z(e) {
1509
+ return RegExp("^(?:" + e.map(_n).join("|") + ")", "i");
1510
+ }
1511
+ function Q(e) {
1512
+ return new Map(e.map((e, t) => [e.toLowerCase(), t]));
1513
+ }
1514
+ function vn(e, t, n) {
1515
+ var r = Y.exec(t.slice(n, n + 1));
1516
+ return r ? (e.w = +r[0], n + r[0].length) : -1;
1517
+ }
1518
+ function yn(e, t, n) {
1519
+ var r = Y.exec(t.slice(n, n + 1));
1520
+ return r ? (e.u = +r[0], n + r[0].length) : -1;
1521
+ }
1522
+ function bn(e, t, n) {
1523
+ var r = Y.exec(t.slice(n, n + 2));
1524
+ return r ? (e.U = +r[0], n + r[0].length) : -1;
1525
+ }
1526
+ function xn(e, t, n) {
1527
+ var r = Y.exec(t.slice(n, n + 2));
1528
+ return r ? (e.V = +r[0], n + r[0].length) : -1;
1529
+ }
1530
+ function Sn(e, t, n) {
1531
+ var r = Y.exec(t.slice(n, n + 2));
1532
+ return r ? (e.W = +r[0], n + r[0].length) : -1;
1533
+ }
1534
+ function Cn(e, t, n) {
1535
+ var r = Y.exec(t.slice(n, n + 4));
1536
+ return r ? (e.y = +r[0], n + r[0].length) : -1;
1537
+ }
1538
+ function wn(e, t, n) {
1539
+ var r = Y.exec(t.slice(n, n + 2));
1540
+ return r ? (e.y = +r[0] + (+r[0] > 68 ? 1900 : 2e3), n + r[0].length) : -1;
1541
+ }
1542
+ function Tn(e, t, n) {
1543
+ var r = /^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n, n + 6));
1544
+ return r ? (e.Z = r[1] ? 0 : -(r[2] + (r[3] || "00")), n + r[0].length) : -1;
1545
+ }
1546
+ function En(e, t, n) {
1547
+ var r = Y.exec(t.slice(n, n + 1));
1548
+ return r ? (e.q = r[0] * 3 - 3, n + r[0].length) : -1;
1549
+ }
1550
+ function Dn(e, t, n) {
1551
+ var r = Y.exec(t.slice(n, n + 2));
1552
+ return r ? (e.m = r[0] - 1, n + r[0].length) : -1;
1553
+ }
1554
+ function On(e, t, n) {
1555
+ var r = Y.exec(t.slice(n, n + 2));
1556
+ return r ? (e.d = +r[0], n + r[0].length) : -1;
1557
+ }
1558
+ function kn(e, t, n) {
1559
+ var r = Y.exec(t.slice(n, n + 3));
1560
+ return r ? (e.m = 0, e.d = +r[0], n + r[0].length) : -1;
1561
+ }
1562
+ function An(e, t, n) {
1563
+ var r = Y.exec(t.slice(n, n + 2));
1564
+ return r ? (e.H = +r[0], n + r[0].length) : -1;
1565
+ }
1566
+ function jn(e, t, n) {
1567
+ var r = Y.exec(t.slice(n, n + 2));
1568
+ return r ? (e.M = +r[0], n + r[0].length) : -1;
1569
+ }
1570
+ function Mn(e, t, n) {
1571
+ var r = Y.exec(t.slice(n, n + 2));
1572
+ return r ? (e.S = +r[0], n + r[0].length) : -1;
1573
+ }
1574
+ function Nn(e, t, n) {
1575
+ var r = Y.exec(t.slice(n, n + 3));
1576
+ return r ? (e.L = +r[0], n + r[0].length) : -1;
1577
+ }
1578
+ function Pn(e, t, n) {
1579
+ var r = Y.exec(t.slice(n, n + 6));
1580
+ return r ? (e.L = Math.floor(r[0] / 1e3), n + r[0].length) : -1;
1581
+ }
1582
+ function Fn(e, t, n) {
1583
+ var r = hn.exec(t.slice(n, n + 1));
1584
+ return r ? n + r[0].length : -1;
1585
+ }
1586
+ function In(e, t, n) {
1587
+ var r = Y.exec(t.slice(n));
1588
+ return r ? (e.Q = +r[0], n + r[0].length) : -1;
1589
+ }
1590
+ function Ln(e, t, n) {
1591
+ var r = Y.exec(t.slice(n));
1592
+ return r ? (e.s = +r[0], n + r[0].length) : -1;
1593
+ }
1594
+ function Rn(e, t) {
1595
+ return X(e.getDate(), t, 2);
1596
+ }
1597
+ function zn(e, t) {
1598
+ return X(e.getHours(), t, 2);
1599
+ }
1600
+ function Bn(e, t) {
1601
+ return X(e.getHours() % 12 || 12, t, 2);
1602
+ }
1603
+ function Vn(e, t) {
1604
+ return X(1 + V.count(W(e), e), t, 3);
1605
+ }
1606
+ function Hn(e, t) {
1607
+ return X(e.getMilliseconds(), t, 3);
1608
+ }
1609
+ function Un(e, t) {
1610
+ return Hn(e, t) + "000";
1611
+ }
1612
+ function Wn(e, t) {
1613
+ return X(e.getMonth() + 1, t, 2);
1614
+ }
1615
+ function Gn(e, t) {
1616
+ return X(e.getMinutes(), t, 2);
1617
+ }
1618
+ function Kn(e, t) {
1619
+ return X(e.getSeconds(), t, 2);
1620
+ }
1621
+ function qn(e) {
1622
+ var t = e.getDay();
1623
+ return t === 0 ? 7 : t;
1624
+ }
1625
+ function Jn(e, t) {
1626
+ return X(Ft.count(W(e) - 1, e), t, 2);
1627
+ }
1628
+ function Yn(e) {
1629
+ var t = e.getDay();
1630
+ return t >= 4 || t === 0 ? U(e) : U.ceil(e);
1631
+ }
1632
+ function Xn(e, t) {
1633
+ return e = Yn(e), X(U.count(W(e), e) + (W(e).getDay() === 4), t, 2);
1634
+ }
1635
+ function Zn(e) {
1636
+ return e.getDay();
1637
+ }
1638
+ function Qn(e, t) {
1639
+ return X(It.count(W(e) - 1, e), t, 2);
1640
+ }
1641
+ function $n(e, t) {
1642
+ return X(e.getFullYear() % 100, t, 2);
1643
+ }
1644
+ function er(e, t) {
1645
+ return e = Yn(e), X(e.getFullYear() % 100, t, 2);
1646
+ }
1647
+ function tr(e, t) {
1648
+ return X(e.getFullYear() % 1e4, t, 4);
1649
+ }
1650
+ function nr(e, t) {
1651
+ var n = e.getDay();
1652
+ return e = n >= 4 || n === 0 ? U(e) : U.ceil(e), X(e.getFullYear() % 1e4, t, 4);
1653
+ }
1654
+ function rr(e) {
1655
+ var t = e.getTimezoneOffset();
1656
+ return (t > 0 ? "-" : (t *= -1, "+")) + X(t / 60 | 0, "0", 2) + X(t % 60, "0", 2);
1657
+ }
1658
+ function ir(e, t) {
1659
+ return X(e.getUTCDate(), t, 2);
1660
+ }
1661
+ function ar(e, t) {
1662
+ return X(e.getUTCHours(), t, 2);
1663
+ }
1664
+ function or(e, t) {
1665
+ return X(e.getUTCHours() % 12 || 12, t, 2);
1666
+ }
1667
+ function sr(e, t) {
1668
+ return X(1 + Wt.count(q(e), e), t, 3);
1669
+ }
1670
+ function cr(e, t) {
1671
+ return X(e.getUTCMilliseconds(), t, 3);
1672
+ }
1673
+ function lr(e, t) {
1674
+ return cr(e, t) + "000";
1675
+ }
1676
+ function ur(e, t) {
1677
+ return X(e.getUTCMonth() + 1, t, 2);
1678
+ }
1679
+ function dr(e, t) {
1680
+ return X(e.getUTCMinutes(), t, 2);
1681
+ }
1682
+ function fr(e, t) {
1683
+ return X(e.getUTCSeconds(), t, 2);
1684
+ }
1685
+ function pr(e) {
1686
+ var t = e.getUTCDay();
1687
+ return t === 0 ? 7 : t;
1688
+ }
1689
+ function mr(e, t) {
1690
+ return X(Gt.count(q(e) - 1, e), t, 2);
1691
+ }
1692
+ function hr(e) {
1693
+ var t = e.getUTCDay();
1694
+ return t >= 4 || t === 0 ? K(e) : K.ceil(e);
1695
+ }
1696
+ function gr(e, t) {
1697
+ return e = hr(e), X(K.count(q(e), e) + (q(e).getUTCDay() === 4), t, 2);
1698
+ }
1699
+ function _r(e) {
1700
+ return e.getUTCDay();
1701
+ }
1702
+ function vr(e, t) {
1703
+ return X(Kt.count(q(e) - 1, e), t, 2);
1704
+ }
1705
+ function yr(e, t) {
1706
+ return X(e.getUTCFullYear() % 100, t, 2);
1707
+ }
1708
+ function br(e, t) {
1709
+ return e = hr(e), X(e.getUTCFullYear() % 100, t, 2);
1710
+ }
1711
+ function xr(e, t) {
1712
+ return X(e.getUTCFullYear() % 1e4, t, 4);
1713
+ }
1714
+ function Sr(e, t) {
1715
+ var n = e.getUTCDay();
1716
+ return e = n >= 4 || n === 0 ? K(e) : K.ceil(e), X(e.getUTCFullYear() % 1e4, t, 4);
1717
+ }
1718
+ function Cr() {
1719
+ return "+0000";
1720
+ }
1721
+ function wr() {
1722
+ return "%";
1723
+ }
1724
+ function Tr(e) {
1725
+ return +e;
1726
+ }
1727
+ function Er(e) {
1728
+ return Math.floor(e / 1e3);
1729
+ }
1730
+ //#endregion
1731
+ //#region ../../node_modules/.pnpm/d3-time-format@3.0.0/node_modules/d3-time-format/src/defaultLocale.js
1732
+ var $, Dr;
1733
+ Or({
1734
+ dateTime: "%x, %X",
1735
+ date: "%-m/%-d/%Y",
1736
+ time: "%-I:%M:%S %p",
1737
+ periods: ["AM", "PM"],
1738
+ days: [
1739
+ "Sunday",
1740
+ "Monday",
1741
+ "Tuesday",
1742
+ "Wednesday",
1743
+ "Thursday",
1744
+ "Friday",
1745
+ "Saturday"
1746
+ ],
1747
+ shortDays: [
1748
+ "Sun",
1749
+ "Mon",
1750
+ "Tue",
1751
+ "Wed",
1752
+ "Thu",
1753
+ "Fri",
1754
+ "Sat"
1755
+ ],
1756
+ months: [
1757
+ "January",
1758
+ "February",
1759
+ "March",
1760
+ "April",
1761
+ "May",
1762
+ "June",
1763
+ "July",
1764
+ "August",
1765
+ "September",
1766
+ "October",
1767
+ "November",
1768
+ "December"
1769
+ ],
1770
+ shortMonths: [
1771
+ "Jan",
1772
+ "Feb",
1773
+ "Mar",
1774
+ "Apr",
1775
+ "May",
1776
+ "Jun",
1777
+ "Jul",
1778
+ "Aug",
1779
+ "Sep",
1780
+ "Oct",
1781
+ "Nov",
1782
+ "Dec"
1783
+ ]
1784
+ });
1785
+ function Or(e) {
1786
+ return $ = pn(e), Dr = $.format, $.parse, $.utcFormat, $.utcParse, $;
1787
+ }
1788
+ //#endregion
1789
+ //#region ../../node_modules/.pnpm/d3-scale@4.0.2/node_modules/d3-scale/src/time.js
1790
+ function kr(e) {
1791
+ return new Date(e);
1792
+ }
1793
+ function Ar(e) {
1794
+ return e instanceof Date ? +e : +/* @__PURE__ */ new Date(+e);
1795
+ }
1796
+ function jr(e, t, n, r, i, a, o, s, c, l) {
1797
+ var u = $e(), d = u.invert, f = u.domain, p = l(".%L"), m = l(":%S"), h = l("%I:%M"), g = l("%I %p"), _ = l("%a %d"), v = l("%b %d"), y = l("%B"), b = l("%Y");
1798
+ function x(e) {
1799
+ return (c(e) < e ? p : s(e) < e ? m : o(e) < e ? h : a(e) < e ? g : r(e) < e ? i(e) < e ? _ : v : n(e) < e ? y : b)(e);
1800
+ }
1801
+ return u.invert = function(e) {
1802
+ return new Date(d(e));
1803
+ }, u.domain = function(e) {
1804
+ return arguments.length ? f(Array.from(e, Ar)) : f().map(kr);
1805
+ }, u.ticks = function(t) {
1806
+ var n = f();
1807
+ return e(n[0], n[n.length - 1], t == null ? 10 : t);
1808
+ }, u.tickFormat = function(e, t) {
1809
+ return t == null ? x : l(t);
1810
+ }, u.nice = function(e) {
1811
+ var n = f();
1812
+ return (!e || typeof e.range != "function") && (e = t(n[0], n[n.length - 1], e == null ? 10 : e)), e ? f(Et(n, e)) : u;
1813
+ }, u.copy = function() {
1814
+ return Ze(u, jr(e, t, n, r, i, a, o, s, c, l));
1815
+ }, u;
1816
+ }
1817
+ function Mr() {
1818
+ return v.apply(jr(ln, un, W, Vt, Ft, V, Pt, Nt, B, Dr).domain([new Date(2e3, 0, 1), new Date(2e3, 0, 2)]), arguments);
1819
+ }
1820
+ //#endregion
1821
+ //#region src/use-deep-compare.tsx
1822
+ function Nr(e) {
1823
+ let t = n();
1824
+ return r(e, t.current) || (t.current = e), t.current;
1825
+ }
1826
+ //#endregion
1827
+ //#region src/use-d3-axis.tsx
1828
+ function Pr(n, r, i, a) {
1829
+ let o = t(() => r(n, a), Nr([
1830
+ n,
1831
+ a,
1832
+ r
1833
+ ]));
1834
+ return e((e) => {
1835
+ let t = o.range([0, e]).nice();
1836
+ return {
1837
+ domain: i(t.domain()),
1838
+ tickFormatter: t.tickFormat(),
1839
+ ticks: t.ticks(),
1840
+ type: "number"
1841
+ };
1842
+ }, [i, o]);
1843
+ }
1844
+ var Fr = (e, t) => Tt().domain([e ? Math.min(...e) : t[0], e ? Math.max(...e) : t[1]]);
1845
+ function Ir(e, t) {
1846
+ return Pr(e, Fr, (e) => e, t);
1847
+ }
1848
+ var Lr = (e, t) => Mr().domain([e ? e[0] : t[0], e ? e[e.length - 1] : t[1]]);
1849
+ function Rr(e, t) {
1850
+ return Pr(e, Lr, (e) => e, t);
1851
+ }
1852
+ function zr(e) {
1853
+ return () => ({
1854
+ tickFormatter: (t) => e[t],
1855
+ type: "category"
1856
+ });
82
1857
  }
1858
+ //#endregion
1859
+ export { Pr as useD3Axis, Ir as useD3LinearAxis, zr as useD3OrdinalAxis, Rr as useD3TimeAxis };
1860
+
83
1861
  //# sourceMappingURL=use-d3-axis.js.map