@d3-maps/vue 0.10.0 → 0.11.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.
- package/README.md +20 -18
- package/dist/index.d.ts +21 -21
- package/dist/index.js +35 -75
- package/dist/{index.css → style.css} +10 -10
- package/package.json +9 -20
- package/dist/index.iife.js +0 -1
package/README.md
CHANGED
|
@@ -1,39 +1,41 @@
|
|
|
1
|
-
# @d3-maps/vue
|
|
1
|
+
# @d3-maps/vue [](https://bundlejs.com/?q=@d3-maps/vue&config={%22esbuild%22:{%22external%22:[%22vue%22]}})
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Interactive SVG maps with Vue and D3.
|
|
4
4
|
|
|
5
5
|
[**Docs**](https://d3-maps.netlify.app/guide) · [**Examples**](https://d3-maps.netlify.app/examples)
|
|
6
6
|
|
|
7
7
|
## Features
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
9
|
+
✨ Drop-in components, powerful defaults
|
|
10
|
+
🧩 Zoom, drag, lines, markers, and more
|
|
11
|
+
⚛️ Reactive rendering
|
|
12
|
+
📱 Responsive by default
|
|
13
|
+
🪶 Lightweight and tree-shakable
|
|
14
|
+
🧑💻 Fully typed
|
|
15
|
+
🗄️ SSR friendly
|
|
16
|
+
🗺️ Supports TopoJSON and GeoJSON
|
|
16
17
|
|
|
17
18
|
## Installation
|
|
18
19
|
|
|
19
|
-
npm
|
|
20
|
-
|
|
21
20
|
```bash
|
|
22
21
|
npm install @d3-maps/vue
|
|
23
22
|
```
|
|
24
23
|
|
|
25
|
-
pnpm
|
|
26
|
-
|
|
27
24
|
```bash
|
|
28
25
|
pnpm add @d3-maps/vue
|
|
29
26
|
```
|
|
30
27
|
|
|
31
|
-
bun
|
|
32
|
-
|
|
33
28
|
```bash
|
|
34
29
|
bun add @d3-maps/vue
|
|
35
30
|
```
|
|
36
31
|
|
|
32
|
+
```html
|
|
33
|
+
<script type="module">
|
|
34
|
+
import { MapBase, MapFeatures } from 'https://esm.sh/@d3-maps/vue'
|
|
35
|
+
import 'https://esm.sh/@d3-maps/vue/style.css'
|
|
36
|
+
</script>
|
|
37
|
+
```
|
|
38
|
+
|
|
37
39
|
## Usage
|
|
38
40
|
|
|
39
41
|
```html
|
|
@@ -59,7 +61,7 @@ Registers all components in the app
|
|
|
59
61
|
|
|
60
62
|
```js
|
|
61
63
|
import { createApp } from 'vue'
|
|
62
|
-
import '@d3-maps/vue/
|
|
64
|
+
import '@d3-maps/vue/style.css'
|
|
63
65
|
import { plugin as D3MapsVue } from '@d3-maps/vue'
|
|
64
66
|
import App from './App.vue'
|
|
65
67
|
|
|
@@ -72,7 +74,7 @@ _Nuxt 3_ \
|
|
|
72
74
|
Create `~/plugins/d3-maps-vue.client.ts`:
|
|
73
75
|
|
|
74
76
|
```ts
|
|
75
|
-
import '@d3-maps/vue/
|
|
77
|
+
import '@d3-maps/vue/style.css'
|
|
76
78
|
import { plugin as D3MapsVue } from '@d3-maps/vue'
|
|
77
79
|
|
|
78
80
|
export default defineNuxtPlugin((nuxtApp) => {
|
|
@@ -82,4 +84,4 @@ export default defineNuxtPlugin((nuxtApp) => {
|
|
|
82
84
|
|
|
83
85
|
## License
|
|
84
86
|
|
|
85
|
-
MIT licensed. Copyright ©
|
|
87
|
+
MIT licensed. Copyright © 2026 Georgii Bukharov. See [LICENCE](../../LICENCE) for more details.
|
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as _$vue from "vue";
|
|
2
2
|
import { App, ComputedRef, InjectionKey, MaybeRef, Ref, StyleValue } from "vue";
|
|
3
|
-
import * as _d3_maps_core0 from "@d3-maps/core";
|
|
3
|
+
import * as _$_d3_maps_core0 from "@d3-maps/core";
|
|
4
4
|
import { MapAnnotationProps, MapContext, MapFeatureProps, MapFeaturesProps, MapGraticuleProps, MapLineProps, MapMarkerProps, MapObjectProps, MapObjectState, MapProps, ObjectZoomView, ZoomEvent, ZoomObject, ZoomProps, createZoomBehavior, getFeatureKey, getInverseZoomScale, getObjectZoomView, getZoomViewportCenter } from "@d3-maps/core";
|
|
5
|
-
export * from "@d3-maps/core
|
|
5
|
+
export * from "@d3-maps/core";
|
|
6
6
|
|
|
7
7
|
//#region src/components/MapAnnotation.vue.d.ts
|
|
8
8
|
type __VLS_Props$5 = MapAnnotationProps<StyleValue>;
|
|
@@ -10,7 +10,7 @@ declare var __VLS_13: {};
|
|
|
10
10
|
type __VLS_Slots$4 = {} & {
|
|
11
11
|
default?: (props: typeof __VLS_13) => any;
|
|
12
12
|
};
|
|
13
|
-
declare const __VLS_base$4:
|
|
13
|
+
declare const __VLS_base$4: _$vue.DefineComponent<__VLS_Props$5, {}, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {}, string, _$vue.PublicProps, Readonly<__VLS_Props$5> & Readonly<{}>, {}, {}, {}, {}, string, _$vue.ComponentProvideOptions, false, {}, any>;
|
|
14
14
|
declare const __VLS_export$8: __VLS_WithSlots$4<typeof __VLS_base$4, __VLS_Slots$4>;
|
|
15
15
|
declare const _default: typeof __VLS_export$8;
|
|
16
16
|
type __VLS_WithSlots$4<T, S> = T & {
|
|
@@ -29,7 +29,7 @@ type MapContextProps = Partial<MapProps> & {
|
|
|
29
29
|
type __VLS_Slots$3 = {
|
|
30
30
|
default?: (props: MapContext) => unknown;
|
|
31
31
|
};
|
|
32
|
-
declare const __VLS_base$3:
|
|
32
|
+
declare const __VLS_base$3: _$vue.DefineComponent<MapConfigProps | MapContextProps, {}, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {}, string, _$vue.PublicProps, Readonly<MapConfigProps | MapContextProps> & Readonly<{}>, {}, {}, {}, {}, string, _$vue.ComponentProvideOptions, false, {}, any>;
|
|
33
33
|
declare const __VLS_export$7: __VLS_WithSlots$3<typeof __VLS_base$3, __VLS_Slots$3>;
|
|
34
34
|
declare const _default$1: typeof __VLS_export$7;
|
|
35
35
|
type __VLS_WithSlots$3<T, S> = T & {
|
|
@@ -40,20 +40,20 @@ type __VLS_WithSlots$3<T, S> = T & {
|
|
|
40
40
|
//#endregion
|
|
41
41
|
//#region src/components/MapFeature.vue.d.ts
|
|
42
42
|
type __VLS_Props$4 = MapFeatureProps<StyleValue>;
|
|
43
|
-
declare const __VLS_export$6:
|
|
43
|
+
declare const __VLS_export$6: _$vue.DefineComponent<__VLS_Props$4, {}, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {}, string, _$vue.PublicProps, Readonly<__VLS_Props$4> & Readonly<{}>, {}, {}, {}, {}, string, _$vue.ComponentProvideOptions, false, {}, any>;
|
|
44
44
|
declare const _default$2: typeof __VLS_export$6;
|
|
45
45
|
//#endregion
|
|
46
46
|
//#region src/components/MapFeatures.vue.d.ts
|
|
47
47
|
type __VLS_Props$3 = MapFeaturesProps<StyleValue>;
|
|
48
48
|
declare var __VLS_1$2: {
|
|
49
|
-
features: _d3_maps_core0.MapFeatureData[];
|
|
49
|
+
features: _$_d3_maps_core0.MapFeatureData[];
|
|
50
50
|
};
|
|
51
51
|
type __VLS_Slots$2 = {} & {
|
|
52
52
|
default?: (props: typeof __VLS_1$2) => any;
|
|
53
53
|
};
|
|
54
|
-
declare const __VLS_base$2:
|
|
54
|
+
declare const __VLS_base$2: _$vue.DefineComponent<__VLS_Props$3, {}, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {}, string, _$vue.PublicProps, Readonly<__VLS_Props$3> & Readonly<{}>, {
|
|
55
55
|
idKey: string;
|
|
56
|
-
}, {}, {}, {}, string,
|
|
56
|
+
}, {}, {}, {}, string, _$vue.ComponentProvideOptions, false, {}, any>;
|
|
57
57
|
declare const __VLS_export$5: __VLS_WithSlots$2<typeof __VLS_base$2, __VLS_Slots$2>;
|
|
58
58
|
declare const _default$3: typeof __VLS_export$5;
|
|
59
59
|
type __VLS_WithSlots$2<T, S> = T & {
|
|
@@ -64,15 +64,15 @@ type __VLS_WithSlots$2<T, S> = T & {
|
|
|
64
64
|
//#endregion
|
|
65
65
|
//#region src/components/MapGraticule.vue.d.ts
|
|
66
66
|
type __VLS_Props$2 = MapGraticuleProps<StyleValue>;
|
|
67
|
-
declare const __VLS_export$4:
|
|
67
|
+
declare const __VLS_export$4: _$vue.DefineComponent<__VLS_Props$2, {}, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {}, string, _$vue.PublicProps, Readonly<__VLS_Props$2> & Readonly<{}>, {}, {}, {}, {}, string, _$vue.ComponentProvideOptions, false, {}, any>;
|
|
68
68
|
declare const _default$4: typeof __VLS_export$4;
|
|
69
69
|
//#endregion
|
|
70
70
|
//#region src/components/MapLine.vue.d.ts
|
|
71
71
|
type __VLS_Props$1 = MapLineProps<StyleValue>;
|
|
72
|
-
declare const __VLS_export$3:
|
|
72
|
+
declare const __VLS_export$3: _$vue.DefineComponent<__VLS_Props$1, {}, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {}, string, _$vue.PublicProps, Readonly<__VLS_Props$1> & Readonly<{}>, {
|
|
73
73
|
cartesian: boolean;
|
|
74
74
|
custom: boolean;
|
|
75
|
-
}, {}, {}, {}, string,
|
|
75
|
+
}, {}, {}, {}, string, _$vue.ComponentProvideOptions, false, {}, any>;
|
|
76
76
|
declare const _default$5: typeof __VLS_export$3;
|
|
77
77
|
//#endregion
|
|
78
78
|
//#region src/components/MapMarker.vue.d.ts
|
|
@@ -83,9 +83,9 @@ declare var __VLS_1$1: {};
|
|
|
83
83
|
type __VLS_Slots$1 = {} & {
|
|
84
84
|
default?: (props: typeof __VLS_1$1) => any;
|
|
85
85
|
};
|
|
86
|
-
declare const __VLS_base$1:
|
|
86
|
+
declare const __VLS_base$1: _$vue.DefineComponent<Props, {}, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {}, string, _$vue.PublicProps, Readonly<Props> & Readonly<{}>, {
|
|
87
87
|
name: string;
|
|
88
|
-
}, {}, {}, {}, string,
|
|
88
|
+
}, {}, {}, {}, string, _$vue.ComponentProvideOptions, false, {}, any>;
|
|
89
89
|
declare const __VLS_export$2: __VLS_WithSlots$1<typeof __VLS_base$1, __VLS_Slots$1>;
|
|
90
90
|
declare const _default$6: typeof __VLS_export$2;
|
|
91
91
|
type __VLS_WithSlots$1<T, S> = T & {
|
|
@@ -96,7 +96,7 @@ type __VLS_WithSlots$1<T, S> = T & {
|
|
|
96
96
|
//#endregion
|
|
97
97
|
//#region src/components/MapMesh.vue.d.ts
|
|
98
98
|
type __VLS_Props = MapObjectProps<StyleValue>;
|
|
99
|
-
declare const __VLS_export$1:
|
|
99
|
+
declare const __VLS_export$1: _$vue.DefineComponent<__VLS_Props, {}, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {}, string, _$vue.PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, _$vue.ComponentProvideOptions, false, {}, any>;
|
|
100
100
|
declare const _default$7: typeof __VLS_export$1;
|
|
101
101
|
//#endregion
|
|
102
102
|
//#region src/components/MapZoom.vue.d.ts
|
|
@@ -104,16 +104,16 @@ declare var __VLS_1: {};
|
|
|
104
104
|
type __VLS_Slots = {} & {
|
|
105
105
|
default?: (props: typeof __VLS_1) => any;
|
|
106
106
|
};
|
|
107
|
-
declare const __VLS_base:
|
|
108
|
-
container:
|
|
109
|
-
zoomBehavior:
|
|
110
|
-
}, {}, {}, {},
|
|
107
|
+
declare const __VLS_base: _$vue.DefineComponent<ZoomProps, {
|
|
108
|
+
container: _$vue.Ref<SVGGElement | null, SVGGElement | null>;
|
|
109
|
+
zoomBehavior: _$vue.ComputedRef<_$_d3_maps_core0.DefaultZoomBehavior>;
|
|
110
|
+
}, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {} & {
|
|
111
111
|
zoom: (payload: ZoomEvent) => any;
|
|
112
112
|
zoomStart: (payload: ZoomEvent) => any;
|
|
113
113
|
zoomEnd: (payload: ZoomEvent) => any;
|
|
114
114
|
"update:center": (payload: [number, number]) => any;
|
|
115
115
|
"update:zoom": (payload: number) => any;
|
|
116
|
-
}, string,
|
|
116
|
+
}, string, _$vue.PublicProps, Readonly<ZoomProps> & Readonly<{
|
|
117
117
|
onZoom?: ((payload: ZoomEvent) => any) | undefined;
|
|
118
118
|
onZoomStart?: ((payload: ZoomEvent) => any) | undefined;
|
|
119
119
|
onZoomEnd?: ((payload: ZoomEvent) => any) | undefined;
|
|
@@ -123,7 +123,7 @@ declare const __VLS_base: vue36.DefineComponent<ZoomProps, {
|
|
|
123
123
|
zoom: number;
|
|
124
124
|
minZoom: number;
|
|
125
125
|
maxZoom: number;
|
|
126
|
-
}, {}, {}, {}, string,
|
|
126
|
+
}, {}, {}, {}, string, _$vue.ComponentProvideOptions, false, {}, any>;
|
|
127
127
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
128
128
|
declare const _default$8: typeof __VLS_export;
|
|
129
129
|
type __VLS_WithSlots<T, S> = T & {
|
package/dist/index.js
CHANGED
|
@@ -1,22 +1,16 @@
|
|
|
1
1
|
import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createVNode, defineComponent, guardReactiveProps, inject, mergeProps, normalizeProps, onBeforeUnmount, onMounted, onUnmounted, openBlock, provide, ref, renderList, renderSlot, toRef, unref, useAttrs, watch, withCtx } from "vue";
|
|
2
2
|
import { applyZoom, applyZoomGroupTransform, createZoomBehavior, getAnnotationGeometry, getFeatureKey, getFeatureKey as getFeatureKey$1, getInverseZoomScale, getLinePath, getMarkerTransform, getObjectZoomView, getObjectZoomView as getObjectZoomView$1, getZoomViewportCenter, getZoomViewportCenter as getZoomViewportCenter$1, isString, makeMapContext, renderGraticule, renderOutline, resolveObjectStyle, setupZoom, useMapObjectEvents } from "@d3-maps/core";
|
|
3
|
-
|
|
4
|
-
//#region rolldown:runtime
|
|
3
|
+
//#region \0rolldown/runtime.js
|
|
5
4
|
var __defProp = Object.defineProperty;
|
|
6
|
-
var __exportAll = (all,
|
|
5
|
+
var __exportAll = (all, no_symbols) => {
|
|
7
6
|
let target = {};
|
|
8
|
-
for (var name in all) {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
}
|
|
14
|
-
if (symbols) {
|
|
15
|
-
__defProp(target, Symbol.toStringTag, { value: "Module" });
|
|
16
|
-
}
|
|
7
|
+
for (var name in all) __defProp(target, name, {
|
|
8
|
+
get: all[name],
|
|
9
|
+
enumerable: true
|
|
10
|
+
});
|
|
11
|
+
if (!no_symbols) __defProp(target, Symbol.toStringTag, { value: "Module" });
|
|
17
12
|
return target;
|
|
18
13
|
};
|
|
19
|
-
|
|
20
14
|
//#endregion
|
|
21
15
|
//#region src/hooks/useMapContext.ts
|
|
22
16
|
const mapContextKey = Symbol("MapContext");
|
|
@@ -25,7 +19,6 @@ function useMapContext() {
|
|
|
25
19
|
if (!context) throw new Error("useMapContext must be used inside Map");
|
|
26
20
|
return context;
|
|
27
21
|
}
|
|
28
|
-
|
|
29
22
|
//#endregion
|
|
30
23
|
//#region src/hooks/useMapZoom.ts
|
|
31
24
|
const mapZoomKey = Symbol("MapZoom");
|
|
@@ -114,7 +107,6 @@ function useMapZoom() {
|
|
|
114
107
|
}
|
|
115
108
|
};
|
|
116
109
|
}
|
|
117
|
-
|
|
118
110
|
//#endregion
|
|
119
111
|
//#region src/hooks/useMapObject.ts
|
|
120
112
|
function useMapObject(styles) {
|
|
@@ -135,11 +127,12 @@ function useMapObject(styles) {
|
|
|
135
127
|
onBlur
|
|
136
128
|
};
|
|
137
129
|
}
|
|
138
|
-
|
|
139
130
|
//#endregion
|
|
140
131
|
//#region src/components/MapLine.vue?vue&type=script&setup=true&lang.ts
|
|
141
132
|
const _hoisted_1$7 = ["d", "fill"];
|
|
142
|
-
|
|
133
|
+
//#endregion
|
|
134
|
+
//#region src/components/MapLine.vue
|
|
135
|
+
var MapLine_default = /* @__PURE__ */ defineComponent({
|
|
143
136
|
inheritAttrs: false,
|
|
144
137
|
__name: "MapLine",
|
|
145
138
|
props: {
|
|
@@ -186,15 +179,12 @@ var MapLine_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ define
|
|
|
186
179
|
};
|
|
187
180
|
}
|
|
188
181
|
});
|
|
189
|
-
|
|
190
|
-
//#endregion
|
|
191
|
-
//#region src/components/MapLine.vue
|
|
192
|
-
var MapLine_default = MapLine_vue_vue_type_script_setup_true_lang_default;
|
|
193
|
-
|
|
194
182
|
//#endregion
|
|
195
183
|
//#region src/components/MapMarker.vue?vue&type=script&setup=true&lang.ts
|
|
196
184
|
const _hoisted_1$6 = ["transform", "name"];
|
|
197
|
-
|
|
185
|
+
//#endregion
|
|
186
|
+
//#region src/components/MapMarker.vue
|
|
187
|
+
var MapMarker_default = /* @__PURE__ */ defineComponent({
|
|
198
188
|
__name: "MapMarker",
|
|
199
189
|
props: {
|
|
200
190
|
name: { default: "marker" },
|
|
@@ -218,16 +208,13 @@ var MapMarker_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defi
|
|
|
218
208
|
};
|
|
219
209
|
}
|
|
220
210
|
});
|
|
221
|
-
|
|
222
|
-
//#endregion
|
|
223
|
-
//#region src/components/MapMarker.vue
|
|
224
|
-
var MapMarker_default = MapMarker_vue_vue_type_script_setup_true_lang_default;
|
|
225
|
-
|
|
226
211
|
//#endregion
|
|
227
212
|
//#region src/components/MapAnnotation.vue?vue&type=script&setup=true&lang.ts
|
|
228
213
|
const _hoisted_1$5 = ["transform"];
|
|
229
214
|
const _hoisted_2$1 = ["transform"];
|
|
230
|
-
|
|
215
|
+
//#endregion
|
|
216
|
+
//#region src/components/MapAnnotation.vue
|
|
217
|
+
var MapAnnotation_default = /* @__PURE__ */ defineComponent({
|
|
231
218
|
inheritAttrs: false,
|
|
232
219
|
__name: "MapAnnotation",
|
|
233
220
|
props: {
|
|
@@ -273,11 +260,6 @@ var MapAnnotation_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */
|
|
|
273
260
|
};
|
|
274
261
|
}
|
|
275
262
|
});
|
|
276
|
-
|
|
277
|
-
//#endregion
|
|
278
|
-
//#region src/components/MapAnnotation.vue
|
|
279
|
-
var MapAnnotation_default = MapAnnotation_vue_vue_type_script_setup_true_lang_default;
|
|
280
|
-
|
|
281
263
|
//#endregion
|
|
282
264
|
//#region src/hooks/useCreateMapContext.ts
|
|
283
265
|
function useCreateMapContext(config, context) {
|
|
@@ -289,11 +271,12 @@ function useCreateMapContext(config, context) {
|
|
|
289
271
|
return makeMapContext(resolvedConfig);
|
|
290
272
|
});
|
|
291
273
|
}
|
|
292
|
-
|
|
293
274
|
//#endregion
|
|
294
275
|
//#region src/components/MapBase.vue?vue&type=script&setup=true&lang.ts
|
|
295
276
|
const _hoisted_1$4 = ["viewBox"];
|
|
296
|
-
|
|
277
|
+
//#endregion
|
|
278
|
+
//#region src/components/MapBase.vue
|
|
279
|
+
var MapBase_default = /* @__PURE__ */ defineComponent({
|
|
297
280
|
__name: "MapBase",
|
|
298
281
|
props: {
|
|
299
282
|
width: {},
|
|
@@ -302,6 +285,7 @@ var MapBase_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ define
|
|
|
302
285
|
projection: { type: Function },
|
|
303
286
|
projectionConfig: {},
|
|
304
287
|
data: {},
|
|
288
|
+
topologyObjectKey: {},
|
|
305
289
|
dataTransformer: { type: Function },
|
|
306
290
|
context: {}
|
|
307
291
|
},
|
|
@@ -318,15 +302,12 @@ var MapBase_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ define
|
|
|
318
302
|
};
|
|
319
303
|
}
|
|
320
304
|
});
|
|
321
|
-
|
|
322
|
-
//#endregion
|
|
323
|
-
//#region src/components/MapBase.vue
|
|
324
|
-
var MapBase_default = MapBase_vue_vue_type_script_setup_true_lang_default;
|
|
325
|
-
|
|
326
305
|
//#endregion
|
|
327
306
|
//#region src/components/MapFeature.vue?vue&type=script&setup=true&lang.ts
|
|
328
307
|
const _hoisted_1$3 = ["d"];
|
|
329
|
-
|
|
308
|
+
//#endregion
|
|
309
|
+
//#region src/components/MapFeature.vue
|
|
310
|
+
var MapFeature_default = /* @__PURE__ */ defineComponent({
|
|
330
311
|
__name: "MapFeature",
|
|
331
312
|
props: {
|
|
332
313
|
data: {},
|
|
@@ -345,15 +326,12 @@ var MapFeature_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ def
|
|
|
345
326
|
};
|
|
346
327
|
}
|
|
347
328
|
});
|
|
348
|
-
|
|
349
|
-
//#endregion
|
|
350
|
-
//#region src/components/MapFeature.vue
|
|
351
|
-
var MapFeature_default = MapFeature_vue_vue_type_script_setup_true_lang_default;
|
|
352
|
-
|
|
353
329
|
//#endregion
|
|
354
330
|
//#region src/components/MapFeatures.vue?vue&type=script&setup=true&lang.ts
|
|
355
331
|
const _hoisted_1$2 = { name: "features" };
|
|
356
|
-
|
|
332
|
+
//#endregion
|
|
333
|
+
//#region src/components/MapFeatures.vue
|
|
334
|
+
var MapFeatures_default = /* @__PURE__ */ defineComponent({
|
|
357
335
|
__name: "MapFeatures",
|
|
358
336
|
props: {
|
|
359
337
|
idKey: { default: "id" },
|
|
@@ -373,17 +351,14 @@ var MapFeatures_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ de
|
|
|
373
351
|
};
|
|
374
352
|
}
|
|
375
353
|
});
|
|
376
|
-
|
|
377
|
-
//#endregion
|
|
378
|
-
//#region src/components/MapFeatures.vue
|
|
379
|
-
var MapFeatures_default = MapFeatures_vue_vue_type_script_setup_true_lang_default;
|
|
380
|
-
|
|
381
354
|
//#endregion
|
|
382
355
|
//#region src/components/MapGraticule.vue?vue&type=script&setup=true&lang.ts
|
|
383
356
|
const _hoisted_1$1 = ["d", "fill"];
|
|
384
357
|
const _hoisted_2 = ["d"];
|
|
385
358
|
const _hoisted_3 = ["d", "stroke"];
|
|
386
|
-
|
|
359
|
+
//#endregion
|
|
360
|
+
//#region src/components/MapGraticule.vue
|
|
361
|
+
var MapGraticule_default = /* @__PURE__ */ defineComponent({
|
|
387
362
|
inheritAttrs: false,
|
|
388
363
|
__name: "MapGraticule",
|
|
389
364
|
props: {
|
|
@@ -431,15 +406,12 @@ var MapGraticule_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ d
|
|
|
431
406
|
};
|
|
432
407
|
}
|
|
433
408
|
});
|
|
434
|
-
|
|
435
|
-
//#endregion
|
|
436
|
-
//#region src/components/MapGraticule.vue
|
|
437
|
-
var MapGraticule_default = MapGraticule_vue_vue_type_script_setup_true_lang_default;
|
|
438
|
-
|
|
439
409
|
//#endregion
|
|
440
410
|
//#region src/components/MapMesh.vue?vue&type=script&setup=true&lang.ts
|
|
441
411
|
const _hoisted_1 = ["d"];
|
|
442
|
-
|
|
412
|
+
//#endregion
|
|
413
|
+
//#region src/components/MapMesh.vue
|
|
414
|
+
var MapMesh_default = /* @__PURE__ */ defineComponent({
|
|
443
415
|
__name: "MapMesh",
|
|
444
416
|
props: { styles: {} },
|
|
445
417
|
setup(__props) {
|
|
@@ -456,14 +428,9 @@ var MapMesh_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ define
|
|
|
456
428
|
};
|
|
457
429
|
}
|
|
458
430
|
});
|
|
459
|
-
|
|
460
431
|
//#endregion
|
|
461
|
-
//#region src/components/
|
|
462
|
-
var
|
|
463
|
-
|
|
464
|
-
//#endregion
|
|
465
|
-
//#region src/components/MapZoom.vue?vue&type=script&setup=true&lang.ts
|
|
466
|
-
var MapZoom_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
432
|
+
//#region src/components/MapZoom.vue
|
|
433
|
+
var MapZoom_default = /* @__PURE__ */ defineComponent({
|
|
467
434
|
__name: "MapZoom",
|
|
468
435
|
props: {
|
|
469
436
|
center: {},
|
|
@@ -512,11 +479,6 @@ var MapZoom_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ define
|
|
|
512
479
|
};
|
|
513
480
|
}
|
|
514
481
|
});
|
|
515
|
-
|
|
516
|
-
//#endregion
|
|
517
|
-
//#region src/components/MapZoom.vue
|
|
518
|
-
var MapZoom_default = MapZoom_vue_vue_type_script_setup_true_lang_default;
|
|
519
|
-
|
|
520
482
|
//#endregion
|
|
521
483
|
//#region src/components/index.ts
|
|
522
484
|
var components_exports = /* @__PURE__ */ __exportAll({
|
|
@@ -530,7 +492,6 @@ var components_exports = /* @__PURE__ */ __exportAll({
|
|
|
530
492
|
MapMesh: () => MapMesh_default,
|
|
531
493
|
MapZoom: () => MapZoom_default
|
|
532
494
|
});
|
|
533
|
-
|
|
534
495
|
//#endregion
|
|
535
496
|
//#region src/plugin.ts
|
|
536
497
|
/**
|
|
@@ -541,6 +502,5 @@ const plugin = { install(app) {
|
|
|
541
502
|
app.component(name, component);
|
|
542
503
|
});
|
|
543
504
|
} };
|
|
544
|
-
|
|
545
505
|
//#endregion
|
|
546
|
-
export { MapAnnotation_default as MapAnnotation, MapBase_default as MapBase, MapFeature_default as MapFeature, MapFeatures_default as MapFeatures, MapGraticule_default as MapGraticule, MapLine_default as MapLine, MapMarker_default as MapMarker, MapMesh_default as MapMesh, MapZoom_default as MapZoom, getFeatureKey, getInverseZoomScale, getObjectZoomView, getZoomViewportCenter, mapContextKey, mapZoomKey, plugin, useCreateMapContext, useCreateMapZoom, useMapContext, useMapObject, useMapZoom };
|
|
506
|
+
export { MapAnnotation_default as MapAnnotation, MapBase_default as MapBase, MapFeature_default as MapFeature, MapFeatures_default as MapFeatures, MapGraticule_default as MapGraticule, MapLine_default as MapLine, MapMarker_default as MapMarker, MapMesh_default as MapMesh, MapZoom_default as MapZoom, getFeatureKey, getInverseZoomScale, getObjectZoomView, getZoomViewportCenter, mapContextKey, mapZoomKey, plugin, useCreateMapContext, useCreateMapZoom, useMapContext, useMapObject, useMapZoom };
|
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
:root {
|
|
2
|
-
--d3m-stroke-w:
|
|
2
|
+
--d3m-stroke-w: .5;
|
|
3
3
|
}
|
|
4
|
+
|
|
4
5
|
.d3-map {
|
|
5
6
|
width: 100%;
|
|
6
7
|
height: auto;
|
|
7
|
-
|
|
8
|
-
[name="graticule"],
|
|
9
|
-
[name="feature"],
|
|
10
|
-
[name="mesh"] {
|
|
8
|
+
|
|
9
|
+
& [name="background"], & [name="graticule"], & [name="feature"], & [name="mesh"] {
|
|
11
10
|
outline-style: none;
|
|
11
|
+
|
|
12
12
|
&:not([stroke-width]) {
|
|
13
|
-
stroke-width: var(--d3m-stroke-w)
|
|
13
|
+
stroke-width: var(--d3m-stroke-w);
|
|
14
14
|
}
|
|
15
15
|
}
|
|
16
|
-
|
|
17
|
-
[name="line"],
|
|
18
|
-
[name="annotation-line"] {
|
|
16
|
+
|
|
17
|
+
& [name="border"], & [name="line"], & [name="annotation-line"] {
|
|
19
18
|
&:not([stroke-width]) {
|
|
20
19
|
stroke-width: calc(var(--d3m-stroke-w) * 2);
|
|
21
20
|
}
|
|
22
21
|
}
|
|
23
|
-
|
|
22
|
+
|
|
23
|
+
& [name="zoom"] path {
|
|
24
24
|
vector-effect: non-scaling-stroke;
|
|
25
25
|
}
|
|
26
26
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@d3-maps/vue",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.11.1",
|
|
5
5
|
"private": false,
|
|
6
6
|
"description": "Vue bindings for @d3-maps/core to build reactive D3 SVG maps",
|
|
7
7
|
"author": "Georgii Bukharov <souljorje@gmail.com>",
|
|
@@ -25,23 +25,12 @@
|
|
|
25
25
|
"map"
|
|
26
26
|
],
|
|
27
27
|
"exports": {
|
|
28
|
-
".":
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
"browser": "./dist/index.iife.js",
|
|
32
|
-
"default": "./dist/index.js"
|
|
33
|
-
},
|
|
34
|
-
"./index.css": {
|
|
35
|
-
"default": "./dist/index.css"
|
|
36
|
-
}
|
|
28
|
+
".": "./dist/index.js",
|
|
29
|
+
"./package.json": "./package.json",
|
|
30
|
+
"./style.css": "./dist/style.css"
|
|
37
31
|
},
|
|
38
|
-
"
|
|
39
|
-
"
|
|
40
|
-
"browser": "dist/index.iife.js",
|
|
41
|
-
"unpkg": "dist/index.iife.js",
|
|
42
|
-
"jsdelivr": "dist/index.iife.js",
|
|
43
|
-
"style": "dist/index.css",
|
|
44
|
-
"types": "dist/index.d.ts",
|
|
32
|
+
"style": "dist/style.css",
|
|
33
|
+
"types": "./dist/index.d.ts",
|
|
45
34
|
"files": [
|
|
46
35
|
"dist/*"
|
|
47
36
|
],
|
|
@@ -49,13 +38,13 @@
|
|
|
49
38
|
"vue": "3.5.25"
|
|
50
39
|
},
|
|
51
40
|
"dependencies": {
|
|
52
|
-
"@d3-maps/core": "0.
|
|
41
|
+
"@d3-maps/core": "0.12.0"
|
|
53
42
|
},
|
|
54
43
|
"devDependencies": {
|
|
55
44
|
"@vitejs/plugin-vue": "^6.0.2",
|
|
56
45
|
"@vue/test-utils": "^2.4.6",
|
|
57
46
|
"jsdom": "^27.3.0",
|
|
58
|
-
"tsdown": "0.
|
|
47
|
+
"tsdown": "0.21.7",
|
|
59
48
|
"typescript": "^5.9.3",
|
|
60
49
|
"unplugin-vue": "^6.0.1",
|
|
61
50
|
"vite-tsconfig-paths": "^6.1.1",
|
|
@@ -66,7 +55,7 @@
|
|
|
66
55
|
"scripts": {
|
|
67
56
|
"typecheck": "vue-tsc --noEmit",
|
|
68
57
|
"typecheck:test": "vue-tsc -p tsconfig.test.json --noEmit",
|
|
69
|
-
"build": "
|
|
58
|
+
"build": "tsdown",
|
|
70
59
|
"test": "vitest run",
|
|
71
60
|
"test:watch": "vitest"
|
|
72
61
|
}
|
package/dist/index.iife.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(function(e,t){var n=Object.defineProperty,r=(e,t)=>{let r={};for(var i in e)n(r,i,{get:e[i],enumerable:!0});return t&&n(r,Symbol.toStringTag,{value:`Module`}),r},i=class{constructor(){this._partials=new Float64Array(32),this._n=0}add(e){let t=this._partials,n=0;for(let r=0;r<this._n&&r<32;r++){let i=t[r],a=e+i,o=Math.abs(e)<Math.abs(i)?e-(a-i):i-(a-e);o&&(t[n++]=o),e=a}return t[n]=e,this._n=n+1,this}valueOf(){let e=this._partials,t=this._n,n,r,i,a=0;if(t>0){for(a=e[--t];t>0&&(n=a,r=e[--t],a=n+r,i=r-(a-n),!i););t>0&&(i<0&&e[t-1]<0||i>0&&e[t-1]>0)&&(r=i*2,n=a+r,r==n-a&&(a=n))}return a}};function*a(e){for(let t of e)yield*t}function o(e){return Array.from(a(e))}function s(e,t,n){e=+e,t=+t,n=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+n;for(var r=-1,i=Math.max(0,Math.ceil((t-e)/n))|0,a=Array(i);++r<i;)a[r]=e+r*n;return a}var c=1e-6,l=1e-12,u=Math.PI,d=u/2,f=u/4,p=u*2,m=180/u,h=u/180,g=Math.abs,_=Math.atan,v=Math.atan2,y=Math.cos,b=Math.ceil,x=Math.sin,S=Math.sign||function(e){return e>0?1:e<0?-1:0},C=Math.sqrt;function w(e){return e>1?0:e<-1?u:Math.acos(e)}function T(e){return e>1?d:e<-1?-d:Math.asin(e)}function E(){}function D(e,t){e&&k.hasOwnProperty(e.type)&&k[e.type](e,t)}var O={Feature:function(e,t){D(e.geometry,t)},FeatureCollection:function(e,t){for(var n=e.features,r=-1,i=n.length;++r<i;)D(n[r].geometry,t)}},k={Sphere:function(e,t){t.sphere()},Point:function(e,t){e=e.coordinates,t.point(e[0],e[1],e[2])},MultiPoint:function(e,t){for(var n=e.coordinates,r=-1,i=n.length;++r<i;)e=n[r],t.point(e[0],e[1],e[2])},LineString:function(e,t){A(e.coordinates,t,0)},MultiLineString:function(e,t){for(var n=e.coordinates,r=-1,i=n.length;++r<i;)A(n[r],t,0)},Polygon:function(e,t){j(e.coordinates,t)},MultiPolygon:function(e,t){for(var n=e.coordinates,r=-1,i=n.length;++r<i;)j(n[r],t)},GeometryCollection:function(e,t){for(var n=e.geometries,r=-1,i=n.length;++r<i;)D(n[r],t)}};function A(e,t,n){var r=-1,i=e.length-n,a;for(t.lineStart();++r<i;)a=e[r],t.point(a[0],a[1],a[2]);t.lineEnd()}function j(e,t){var n=-1,r=e.length;for(t.polygonStart();++n<r;)A(e[n],t,1);t.polygonEnd()}function M(e,t){e&&O.hasOwnProperty(e.type)?O[e.type](e,t):D(e,t)}function N(e){return[v(e[1],e[0]),T(e[2])]}function P(e){var t=e[0],n=e[1],r=y(n);return[r*y(t),r*x(t),x(n)]}function F(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function ee(e,t){return[e[1]*t[2]-e[2]*t[1],e[2]*t[0]-e[0]*t[2],e[0]*t[1]-e[1]*t[0]]}function I(e,t){e[0]+=t[0],e[1]+=t[1],e[2]+=t[2]}function te(e,t){return[e[0]*t,e[1]*t,e[2]*t]}function ne(e){var t=C(e[0]*e[0]+e[1]*e[1]+e[2]*e[2]);e[0]/=t,e[1]/=t,e[2]/=t}function re(e,t){function n(n,r){return n=e(n,r),t(n[0],n[1])}return e.invert&&t.invert&&(n.invert=function(n,r){return n=t.invert(n,r),n&&e.invert(n[0],n[1])}),n}function ie(e,t){return g(e)>u&&(e-=Math.round(e/p)*p),[e,t]}ie.invert=ie;function ae(e,t,n){return(e%=p)?t||n?re(se(e),ce(t,n)):se(e):t||n?ce(t,n):ie}function oe(e){return function(t,n){return t+=e,g(t)>u&&(t-=Math.round(t/p)*p),[t,n]}}function se(e){var t=oe(e);return t.invert=oe(-e),t}function ce(e,t){var n=y(e),r=x(e),i=y(t),a=x(t);function o(e,t){var o=y(t),s=y(e)*o,c=x(e)*o,l=x(t),u=l*n+s*r;return[v(c*i-u*a,s*n-l*r),T(u*i+c*a)]}return o.invert=function(e,t){var o=y(t),s=y(e)*o,c=x(e)*o,l=x(t),u=l*i-c*a;return[v(c*i+l*a,s*n+u*r),T(u*n-s*r)]},o}function le(e,t,n,r,i,a){if(n){var o=y(t),s=x(t),c=r*n;i==null?(i=t+r*p,a=t-c/2):(i=ue(o,i),a=ue(o,a),(r>0?i<a:i>a)&&(i+=r*p));for(var l,u=i;r>0?u>a:u<a;u-=c)l=N([o,-s*y(u),-s*x(u)]),e.point(l[0],l[1])}}function ue(e,t){t=P(t),t[0]-=e,ne(t);var n=w(-t[1]);return((-t[2]<0?-n:n)+p-c)%p}function de(){var e=[],t;return{point:function(e,n,r){t.push([e,n,r])},lineStart:function(){e.push(t=[])},lineEnd:E,rejoin:function(){e.length>1&&e.push(e.pop().concat(e.shift()))},result:function(){var n=e;return e=[],t=null,n}}}function fe(e,t){return g(e[0]-t[0])<c&&g(e[1]-t[1])<c}function pe(e,t,n,r){this.x=e,this.z=t,this.o=n,this.e=r,this.v=!1,this.n=this.p=null}function me(e,t,n,r,i){var a=[],o=[],s,l;if(e.forEach(function(e){if(!((t=e.length-1)<=0)){var t,n=e[0],r=e[t],l;if(fe(n,r)){if(!n[2]&&!r[2]){for(i.lineStart(),s=0;s<t;++s)i.point((n=e[s])[0],n[1]);i.lineEnd();return}r[0]+=2*c}a.push(l=new pe(n,e,null,!0)),o.push(l.o=new pe(n,null,l,!1)),a.push(l=new pe(r,e,null,!1)),o.push(l.o=new pe(r,null,l,!0))}}),a.length){for(o.sort(t),he(a),he(o),s=0,l=o.length;s<l;++s)o[s].e=n=!n;for(var u=a[0],d,f;;){for(var p=u,m=!0;p.v;)if((p=p.n)===u)return;d=p.z,i.lineStart();do{if(p.v=p.o.v=!0,p.e){if(m)for(s=0,l=d.length;s<l;++s)i.point((f=d[s])[0],f[1]);else r(p.x,p.n.x,1,i);p=p.n}else{if(m)for(d=p.p.z,s=d.length-1;s>=0;--s)i.point((f=d[s])[0],f[1]);else r(p.x,p.p.x,-1,i);p=p.p}p=p.o,d=p.z,m=!m}while(!p.v);i.lineEnd()}}}function he(e){if(t=e.length){for(var t,n=0,r=e[0],i;++n<t;)r.n=i=e[n],i.p=r,r=i;r.n=i=e[0],i.p=r}}function ge(e){return g(e[0])<=u?e[0]:S(e[0])*((g(e[0])+u)%p-u)}function _e(e,t){var n=ge(t),r=t[1],a=x(r),o=[x(n),-y(n),0],s=0,m=0,h=new i;a===1?r=d+c:a===-1&&(r=-d-c);for(var g=0,_=e.length;g<_;++g)if(S=(b=e[g]).length)for(var b,S,C=b[S-1],w=ge(C),E=C[1]/2+f,D=x(E),O=y(E),k=0;k<S;++k,w=j,D=N,O=F,C=A){var A=b[k],j=ge(A),M=A[1]/2+f,N=x(M),F=y(M),I=j-w,te=I>=0?1:-1,re=te*I,ie=re>u,ae=D*N;if(h.add(v(ae*te*x(re),O*F+ae*y(re))),s+=ie?I+te*p:I,ie^w>=n^j>=n){var oe=ee(P(C),P(A));ne(oe);var se=ee(o,oe);ne(se);var ce=(ie^I>=0?-1:1)*T(se[2]);(r>ce||r===ce&&(oe[0]||oe[1]))&&(m+=ie^I>=0?1:-1)}}return(s<-c||s<c&&h<-l)^m&1}function ve(e,t,n,r){return function(i){var a=t(i),s=de(),c=t(s),l=!1,u,d,f,p={point:m,lineStart:g,lineEnd:_,polygonStart:function(){p.point=v,p.lineStart=y,p.lineEnd=b,d=[],u=[]},polygonEnd:function(){p.point=m,p.lineStart=g,p.lineEnd=_,d=o(d);var e=_e(u,r);d.length?(l||=(i.polygonStart(),!0),me(d,be,e,n,i)):e&&(l||=(i.polygonStart(),!0),i.lineStart(),n(null,null,1,i),i.lineEnd()),l&&=(i.polygonEnd(),!1),d=u=null},sphere:function(){i.polygonStart(),i.lineStart(),n(null,null,1,i),i.lineEnd(),i.polygonEnd()}};function m(t,n){e(t,n)&&i.point(t,n)}function h(e,t){a.point(e,t)}function g(){p.point=h,a.lineStart()}function _(){p.point=m,a.lineEnd()}function v(e,t){f.push([e,t]),c.point(e,t)}function y(){c.lineStart(),f=[]}function b(){v(f[0][0],f[0][1]),c.lineEnd();var e=c.clean(),t=s.result(),n,r=t.length,a,o,p;if(f.pop(),u.push(f),f=null,r){if(e&1){if(o=t[0],(a=o.length-1)>0){for(l||=(i.polygonStart(),!0),i.lineStart(),n=0;n<a;++n)i.point((p=o[n])[0],p[1]);i.lineEnd()}return}r>1&&e&2&&t.push(t.pop().concat(t.shift())),d.push(t.filter(ye))}}return p}}function ye(e){return e.length>1}function be(e,t){return((e=e.x)[0]<0?e[1]-d-c:d-e[1])-((t=t.x)[0]<0?t[1]-d-c:d-t[1])}var xe=ve(function(){return!0},Se,we,[-u,-d]);function Se(e){var t=NaN,n=NaN,r=NaN,i;return{lineStart:function(){e.lineStart(),i=1},point:function(a,o){var s=a>0?u:-u,l=g(a-t);g(l-u)<c?(e.point(t,n=(n+o)/2>0?d:-d),e.point(r,n),e.lineEnd(),e.lineStart(),e.point(s,n),e.point(a,n),i=0):r!==s&&l>=u&&(g(t-r)<c&&(t-=r*c),g(a-s)<c&&(a-=s*c),n=Ce(t,n,a,o),e.point(r,n),e.lineEnd(),e.lineStart(),e.point(s,n),i=0),e.point(t=a,n=o),r=s},lineEnd:function(){e.lineEnd(),t=n=NaN},clean:function(){return 2-i}}}function Ce(e,t,n,r){var i,a,o=x(e-n);return g(o)>c?_((x(t)*(a=y(r))*x(n)-x(r)*(i=y(t))*x(e))/(i*a*o)):(t+r)/2}function we(e,t,n,r){var i;if(e==null)i=n*d,r.point(-u,i),r.point(0,i),r.point(u,i),r.point(u,0),r.point(u,-i),r.point(0,-i),r.point(-u,-i),r.point(-u,0),r.point(-u,i);else if(g(e[0]-t[0])>c){var a=e[0]<t[0]?u:-u;i=n*a/2,r.point(-a,i),r.point(0,i),r.point(a,i)}else r.point(t[0],t[1])}function Te(e){var t=y(e),n=2*h,r=t>0,i=g(t)>c;function a(t,r,i,a){le(a,e,n,i,t,r)}function o(e,n){return y(e)*y(n)>t}function s(e){var t,n,a,s,c;return{lineStart:function(){s=a=!1,c=1},point:function(f,p){var m=[f,p],h,g=o(f,p),_=r?g?0:d(f,p):g?d(f+(f<0?u:-u),p):0;if(!t&&(s=a=g)&&e.lineStart(),g!==a&&(h=l(t,m),(!h||fe(t,h)||fe(m,h))&&(m[2]=1)),g!==a)c=0,g?(e.lineStart(),h=l(m,t),e.point(h[0],h[1])):(h=l(t,m),e.point(h[0],h[1],2),e.lineEnd()),t=h;else if(i&&t&&r^g){var v;!(_&n)&&(v=l(m,t,!0))&&(c=0,r?(e.lineStart(),e.point(v[0][0],v[0][1]),e.point(v[1][0],v[1][1]),e.lineEnd()):(e.point(v[1][0],v[1][1]),e.lineEnd(),e.lineStart(),e.point(v[0][0],v[0][1],3)))}g&&(!t||!fe(t,m))&&e.point(m[0],m[1]),t=m,a=g,n=_},lineEnd:function(){a&&e.lineEnd(),t=null},clean:function(){return c|(s&&a)<<1}}}function l(e,n,r){var i=P(e),a=P(n),o=[1,0,0],s=ee(i,a),l=F(s,s),d=s[0],f=l-d*d;if(!f)return!r&&e;var p=t*l/f,m=-t*d/f,h=ee(o,s),_=te(o,p);I(_,te(s,m));var v=h,y=F(_,v),b=F(v,v),x=y*y-b*(F(_,_)-1);if(!(x<0)){var S=C(x),w=te(v,(-y-S)/b);if(I(w,_),w=N(w),!r)return w;var T=e[0],E=n[0],D=e[1],O=n[1],k;E<T&&(k=T,T=E,E=k);var A=E-T,j=g(A-u)<c,M=j||A<c;if(!j&&O<D&&(k=D,D=O,O=k),M?j?D+O>0^w[1]<(g(w[0]-T)<c?D:O):D<=w[1]&&w[1]<=O:A>u^(T<=w[0]&&w[0]<=E)){var ne=te(v,(-y+S)/b);return I(ne,_),[w,N(ne)]}}}function d(t,n){var i=r?e:u-e,a=0;return t<-i?a|=1:t>i&&(a|=2),n<-i?a|=4:n>i&&(a|=8),a}return ve(o,s,a,r?[0,-e]:[-u,e-u])}function Ee(e,t,n,r,i,a){var o=e[0],s=e[1],c=t[0],l=t[1],u=0,d=1,f=c-o,p=l-s,m=n-o;if(!(!f&&m>0)){if(m/=f,f<0){if(m<u)return;m<d&&(d=m)}else if(f>0){if(m>d)return;m>u&&(u=m)}if(m=i-o,!(!f&&m<0)){if(m/=f,f<0){if(m>d)return;m>u&&(u=m)}else if(f>0){if(m<u)return;m<d&&(d=m)}if(m=r-s,!(!p&&m>0)){if(m/=p,p<0){if(m<u)return;m<d&&(d=m)}else if(p>0){if(m>d)return;m>u&&(u=m)}if(m=a-s,!(!p&&m<0)){if(m/=p,p<0){if(m>d)return;m>u&&(u=m)}else if(p>0){if(m<u)return;m<d&&(d=m)}return u>0&&(e[0]=o+u*f,e[1]=s+u*p),d<1&&(t[0]=o+d*f,t[1]=s+d*p),!0}}}}}var De=1e9,Oe=-De;function ke(e,t,n,r){function i(i,a){return e<=i&&i<=n&&t<=a&&a<=r}function a(i,a,o,c){var l=0,d=0;if(i==null||(l=s(i,o))!==(d=s(a,o))||u(i,a)<0^o>0)do c.point(l===0||l===3?e:n,l>1?r:t);while((l=(l+o+4)%4)!==d);else c.point(a[0],a[1])}function s(r,i){return g(r[0]-e)<c?i>0?0:3:g(r[0]-n)<c?i>0?2:1:g(r[1]-t)<c?i>0?1:0:i>0?3:2}function l(e,t){return u(e.x,t.x)}function u(e,t){var n=s(e,1),r=s(t,1);return n===r?n===0?t[1]-e[1]:n===1?e[0]-t[0]:n===2?e[1]-t[1]:t[0]-e[0]:n-r}return function(s){var c=s,u=de(),d,f,p,m,h,g,_,v,y,b,x,S={point:C,lineStart:D,lineEnd:O,polygonStart:T,polygonEnd:E};function C(e,t){i(e,t)&&c.point(e,t)}function w(){for(var t=0,n=0,i=f.length;n<i;++n)for(var a=f[n],o=1,s=a.length,c=a[0],l,u,d=c[0],p=c[1];o<s;++o)l=d,u=p,c=a[o],d=c[0],p=c[1],u<=r?p>r&&(d-l)*(r-u)>(p-u)*(e-l)&&++t:p<=r&&(d-l)*(r-u)<(p-u)*(e-l)&&--t;return t}function T(){c=u,d=[],f=[],x=!0}function E(){var e=w(),t=x&&e,n=(d=o(d)).length;(t||n)&&(s.polygonStart(),t&&(s.lineStart(),a(null,null,1,s),s.lineEnd()),n&&me(d,l,e,a,s),s.polygonEnd()),c=s,d=f=p=null}function D(){S.point=k,f&&f.push(p=[]),b=!0,y=!1,_=v=NaN}function O(){d&&(k(m,h),g&&y&&u.rejoin(),d.push(u.result())),S.point=C,y&&c.lineEnd()}function k(a,o){var s=i(a,o);if(f&&p.push([a,o]),b)m=a,h=o,g=s,b=!1,s&&(c.lineStart(),c.point(a,o));else if(s&&y)c.point(a,o);else{var l=[_=Math.max(Oe,Math.min(De,_)),v=Math.max(Oe,Math.min(De,v))],u=[a=Math.max(Oe,Math.min(De,a)),o=Math.max(Oe,Math.min(De,o))];Ee(l,u,e,t,n,r)?(y||(c.lineStart(),c.point(l[0],l[1])),c.point(u[0],u[1]),s||c.lineEnd(),x=!1):s&&(c.lineStart(),c.point(a,o),x=!1)}_=a,v=o,y=s}return S}}function Ae(e,t,n){var r=s(e,t-c,n).concat(t);return function(e){return r.map(function(t){return[e,t]})}}function je(e,t,n){var r=s(e,t-c,n).concat(t);return function(e){return r.map(function(t){return[t,e]})}}function Me(){var e,t,n,r,i,a,o,l,u=10,d=u,f=90,p=360,m,h,_,v,y=2.5;function x(){return{type:`MultiLineString`,coordinates:S()}}function S(){return s(b(r/f)*f,n,f).map(_).concat(s(b(l/p)*p,o,p).map(v)).concat(s(b(t/u)*u,e,u).filter(function(e){return g(e%f)>c}).map(m)).concat(s(b(a/d)*d,i,d).filter(function(e){return g(e%p)>c}).map(h))}return x.lines=function(){return S().map(function(e){return{type:`LineString`,coordinates:e}})},x.outline=function(){return{type:`Polygon`,coordinates:[_(r).concat(v(o).slice(1),_(n).reverse().slice(1),v(l).reverse().slice(1))]}},x.extent=function(e){return arguments.length?x.extentMajor(e).extentMinor(e):x.extentMinor()},x.extentMajor=function(e){return arguments.length?(r=+e[0][0],n=+e[1][0],l=+e[0][1],o=+e[1][1],r>n&&(e=r,r=n,n=e),l>o&&(e=l,l=o,o=e),x.precision(y)):[[r,l],[n,o]]},x.extentMinor=function(n){return arguments.length?(t=+n[0][0],e=+n[1][0],a=+n[0][1],i=+n[1][1],t>e&&(n=t,t=e,e=n),a>i&&(n=a,a=i,i=n),x.precision(y)):[[t,a],[e,i]]},x.step=function(e){return arguments.length?x.stepMajor(e).stepMinor(e):x.stepMinor()},x.stepMajor=function(e){return arguments.length?(f=+e[0],p=+e[1],x):[f,p]},x.stepMinor=function(e){return arguments.length?(u=+e[0],d=+e[1],x):[u,d]},x.precision=function(s){return arguments.length?(y=+s,m=Ae(a,i,90),h=je(t,e,y),_=Ae(l,o,90),v=je(r,n,y),x):y},x.extentMajor([[-180,-90+c],[180,90-c]]).extentMinor([[-180,-80-c],[180,80+c]])}var Ne=e=>e,Pe=new i,Fe=new i,Ie,Le,Re,ze,L={point:E,lineStart:E,lineEnd:E,polygonStart:function(){L.lineStart=Be,L.lineEnd=Ue},polygonEnd:function(){L.lineStart=L.lineEnd=L.point=E,Pe.add(g(Fe)),Fe=new i},result:function(){var e=Pe/2;return Pe=new i,e}};function Be(){L.point=Ve}function Ve(e,t){L.point=He,Ie=Re=e,Le=ze=t}function He(e,t){Fe.add(ze*e-Re*t),Re=e,ze=t}function Ue(){He(Ie,Le)}var We=L,Ge=1/0,Ke=Ge,qe=-Ge,Je=qe,Ye={point:Xe,lineStart:E,lineEnd:E,polygonStart:E,polygonEnd:E,result:function(){var e=[[Ge,Ke],[qe,Je]];return qe=Je=-(Ke=Ge=1/0),e}};function Xe(e,t){e<Ge&&(Ge=e),e>qe&&(qe=e),t<Ke&&(Ke=t),t>Je&&(Je=t)}var Ze=Ye,Qe=0,$e=0,et=0,tt=0,nt=0,rt=0,it=0,at=0,ot=0,st,ct,R,z,B={point:lt,lineStart:ut,lineEnd:pt,polygonStart:function(){B.lineStart=mt,B.lineEnd=ht},polygonEnd:function(){B.point=lt,B.lineStart=ut,B.lineEnd=pt},result:function(){var e=ot?[it/ot,at/ot]:rt?[tt/rt,nt/rt]:et?[Qe/et,$e/et]:[NaN,NaN];return Qe=$e=et=tt=nt=rt=it=at=ot=0,e}};function lt(e,t){Qe+=e,$e+=t,++et}function ut(){B.point=dt}function dt(e,t){B.point=ft,lt(R=e,z=t)}function ft(e,t){var n=e-R,r=t-z,i=C(n*n+r*r);tt+=i*(R+e)/2,nt+=i*(z+t)/2,rt+=i,lt(R=e,z=t)}function pt(){B.point=lt}function mt(){B.point=gt}function ht(){_t(st,ct)}function gt(e,t){B.point=_t,lt(st=R=e,ct=z=t)}function _t(e,t){var n=e-R,r=t-z,i=C(n*n+r*r);tt+=i*(R+e)/2,nt+=i*(z+t)/2,rt+=i,i=z*e-R*t,it+=i*(R+e),at+=i*(z+t),ot+=i*3,lt(R=e,z=t)}var vt=B;function yt(e){this._context=e}yt.prototype={_radius:4.5,pointRadius:function(e){return this._radius=e,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){this._line===0&&this._context.closePath(),this._point=NaN},point:function(e,t){switch(this._point){case 0:this._context.moveTo(e,t),this._point=1;break;case 1:this._context.lineTo(e,t);break;default:this._context.moveTo(e+this._radius,t),this._context.arc(e,t,this._radius,0,p);break}},result:E};var bt=new i,xt,St,Ct,wt,Tt,Et={point:E,lineStart:function(){Et.point=Dt},lineEnd:function(){xt&&Ot(St,Ct),Et.point=E},polygonStart:function(){xt=!0},polygonEnd:function(){xt=null},result:function(){var e=+bt;return bt=new i,e}};function Dt(e,t){Et.point=Ot,St=wt=e,Ct=Tt=t}function Ot(e,t){wt-=e,Tt-=t,bt.add(C(wt*wt+Tt*Tt)),wt=e,Tt=t}var kt=Et;let At,jt,Mt,Nt;var Pt=class{constructor(e){this._append=e==null?Ft:It(e),this._radius=4.5,this._=``}pointRadius(e){return this._radius=+e,this}polygonStart(){this._line=0}polygonEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){this._line===0&&(this._+=`Z`),this._point=NaN}point(e,t){switch(this._point){case 0:this._append`M${e},${t}`,this._point=1;break;case 1:this._append`L${e},${t}`;break;default:if(this._append`M${e},${t}`,this._radius!==Mt||this._append!==jt){let e=this._radius,t=this._;this._=``,this._append`m0,${e}a${e},${e} 0 1,1 0,${-2*e}a${e},${e} 0 1,1 0,${2*e}z`,Mt=e,jt=this._append,Nt=this._,this._=t}this._+=Nt;break}}result(){let e=this._;return this._=``,e.length?e:null}};function Ft(e){let t=1;this._+=e[0];for(let n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function It(e){let t=Math.floor(e);if(!(t>=0))throw RangeError(`invalid digits: ${e}`);if(t>15)return Ft;if(t!==At){let e=10**t;At=t,jt=function(t){let n=1;this._+=t[0];for(let r=t.length;n<r;++n)this._+=Math.round(arguments[n]*e)/e+t[n]}}return jt}function Lt(e,t){let n=3,r=4.5,i,a;function o(e){return e&&(typeof r==`function`&&a.pointRadius(+r.apply(this,arguments)),M(e,i(a))),a.result()}return o.area=function(e){return M(e,i(We)),We.result()},o.measure=function(e){return M(e,i(kt)),kt.result()},o.bounds=function(e){return M(e,i(Ze)),Ze.result()},o.centroid=function(e){return M(e,i(vt)),vt.result()},o.projection=function(t){return arguments.length?(i=t==null?(e=null,Ne):(e=t).stream,o):e},o.context=function(e){return arguments.length?(a=e==null?(t=null,new Pt(n)):new yt(t=e),typeof r!=`function`&&a.pointRadius(r),o):t},o.pointRadius=function(e){return arguments.length?(r=typeof e==`function`?e:(a.pointRadius(+e),+e),o):r},o.digits=function(e){if(!arguments.length)return n;if(e==null)n=null;else{let t=Math.floor(e);if(!(t>=0))throw RangeError(`invalid digits: ${e}`);n=t}return t===null&&(a=new Pt(n)),o},o.projection(e).digits(n).context(t)}function Rt(e){return function(t){var n=new zt;for(var r in e)n[r]=e[r];return n.stream=t,n}}function zt(){}zt.prototype={constructor:zt,point:function(e,t){this.stream.point(e,t)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};function Bt(e,t,n){var r=e.clipExtent&&e.clipExtent();return e.scale(150).translate([0,0]),r!=null&&e.clipExtent(null),M(n,e.stream(Ze)),t(Ze.result()),r!=null&&e.clipExtent(r),e}function Vt(e,t,n){return Bt(e,function(n){var r=t[1][0]-t[0][0],i=t[1][1]-t[0][1],a=Math.min(r/(n[1][0]-n[0][0]),i/(n[1][1]-n[0][1])),o=+t[0][0]+(r-a*(n[1][0]+n[0][0]))/2,s=+t[0][1]+(i-a*(n[1][1]+n[0][1]))/2;e.scale(150*a).translate([o,s])},n)}function Ht(e,t,n){return Vt(e,[[0,0],t],n)}function Ut(e,t,n){return Bt(e,function(n){var r=+t,i=r/(n[1][0]-n[0][0]),a=(r-i*(n[1][0]+n[0][0]))/2,o=-i*n[0][1];e.scale(150*i).translate([a,o])},n)}function Wt(e,t,n){return Bt(e,function(n){var r=+t,i=r/(n[1][1]-n[0][1]),a=-i*n[0][0],o=(r-i*(n[1][1]+n[0][1]))/2;e.scale(150*i).translate([a,o])},n)}var Gt=16,Kt=y(30*h);function qt(e,t){return+t?Yt(e,t):Jt(e)}function Jt(e){return Rt({point:function(t,n){t=e(t,n),this.stream.point(t[0],t[1])}})}function Yt(e,t){function n(r,i,a,o,s,l,u,d,f,p,m,h,_,y){var b=u-r,x=d-i,S=b*b+x*x;if(S>4*t&&_--){var w=o+p,E=s+m,D=l+h,O=C(w*w+E*E+D*D),k=T(D/=O),A=g(g(D)-1)<c||g(a-f)<c?(a+f)/2:v(E,w),j=e(A,k),M=j[0],N=j[1],P=M-r,F=N-i,ee=x*P-b*F;(ee*ee/S>t||g((b*P+x*F)/S-.5)>.3||o*p+s*m+l*h<Kt)&&(n(r,i,a,o,s,l,M,N,A,w/=O,E/=O,D,_,y),y.point(M,N),n(M,N,A,w,E,D,u,d,f,p,m,h,_,y))}}return function(t){var r,i,a,o,s,c,l,u,d,f,p,m,h={point:g,lineStart:_,lineEnd:y,polygonStart:function(){t.polygonStart(),h.lineStart=b},polygonEnd:function(){t.polygonEnd(),h.lineStart=_}};function g(n,r){n=e(n,r),t.point(n[0],n[1])}function _(){u=NaN,h.point=v,t.lineStart()}function v(r,i){var a=P([r,i]),o=e(r,i);n(u,d,l,f,p,m,u=o[0],d=o[1],l=r,f=a[0],p=a[1],m=a[2],Gt,t),t.point(u,d)}function y(){h.point=g,t.lineEnd()}function b(){_(),h.point=x,h.lineEnd=S}function x(e,t){v(r=e,t),i=u,a=d,o=f,s=p,c=m,h.point=v}function S(){n(u,d,l,f,p,m,i,a,r,o,s,c,Gt,t),h.lineEnd=y,y()}return h}}var Xt=Rt({point:function(e,t){this.stream.point(e*h,t*h)}});function Zt(e){return Rt({point:function(t,n){var r=e(t,n);return this.stream.point(r[0],r[1])}})}function Qt(e,t,n,r,i){function a(a,o){return a*=r,o*=i,[t+e*a,n-e*o]}return a.invert=function(a,o){return[(a-t)/e*r,(n-o)/e*i]},a}function $t(e,t,n,r,i,a){if(!a)return Qt(e,t,n,r,i);var o=y(a),s=x(a),c=o*e,l=s*e,u=o/e,d=s/e,f=(s*n-o*t)/e,p=(s*t+o*n)/e;function m(e,a){return e*=r,a*=i,[c*e-l*a+t,n-l*e-c*a]}return m.invert=function(e,t){return[r*(u*e-d*t+f),i*(p-d*e-u*t)]},m}function en(e){return tn(function(){return e})()}function tn(e){var t,n=150,r=480,i=250,a=0,o=0,s=0,c=0,l=0,u,d=0,f=1,p=1,g=null,_=xe,v=null,y,b,x,S=Ne,w=.5,T,E,D,O,k;function A(e){return D(e[0]*h,e[1]*h)}function j(e){return e=D.invert(e[0],e[1]),e&&[e[0]*m,e[1]*m]}A.stream=function(e){return O&&k===e?O:O=Xt(Zt(u)(_(T(S(k=e)))))},A.preclip=function(e){return arguments.length?(_=e,g=void 0,N()):_},A.postclip=function(e){return arguments.length?(S=e,v=y=b=x=null,N()):S},A.clipAngle=function(e){return arguments.length?(_=+e?Te(g=e*h):(g=null,xe),N()):g*m},A.clipExtent=function(e){return arguments.length?(S=e==null?(v=y=b=x=null,Ne):ke(v=+e[0][0],y=+e[0][1],b=+e[1][0],x=+e[1][1]),N()):v==null?null:[[v,y],[b,x]]},A.scale=function(e){return arguments.length?(n=+e,M()):n},A.translate=function(e){return arguments.length?(r=+e[0],i=+e[1],M()):[r,i]},A.center=function(e){return arguments.length?(a=e[0]%360*h,o=e[1]%360*h,M()):[a*m,o*m]},A.rotate=function(e){return arguments.length?(s=e[0]%360*h,c=e[1]%360*h,l=e.length>2?e[2]%360*h:0,M()):[s*m,c*m,l*m]},A.angle=function(e){return arguments.length?(d=e%360*h,M()):d*m},A.reflectX=function(e){return arguments.length?(f=e?-1:1,M()):f<0},A.reflectY=function(e){return arguments.length?(p=e?-1:1,M()):p<0},A.precision=function(e){return arguments.length?(T=qt(E,w=e*e),N()):C(w)},A.fitExtent=function(e,t){return Vt(A,e,t)},A.fitSize=function(e,t){return Ht(A,e,t)},A.fitWidth=function(e,t){return Ut(A,e,t)},A.fitHeight=function(e,t){return Wt(A,e,t)};function M(){var e=$t(n,0,0,f,p,d).apply(null,t(a,o)),m=$t(n,r-e[0],i-e[1],f,p,d);return u=ae(s,c,l),E=re(t,m),D=re(u,E),T=qt(E,w),N()}function N(){return O=k=null,A}return function(){return t=e.apply(this,arguments),A.invert=t.invert&&j,M()}}function nn(e,t){var n=t*t,r=n*n;return[e*(.8707-.131979*n+r*(-.013791+r*(.003971*n-.001529*r))),t*(1.007226+n*(.015085+r*(-.044475+.028874*n-.005916*r)))]}nn.invert=function(e,t){var n=t,r=25,i;do{var a=n*n,o=a*a;n-=i=(n*(1.007226+a*(.015085+o*(-.044475+.028874*a-.005916*o)))-t)/(1.007226+a*(.015085*3+o*(-.044475*7+.028874*9*a-.005916*11*o)))}while(g(i)>c&&--r>0);return[e/(.8707+(a=n*n)*(-.131979+a*(-.013791+a*a*a*(.003971-.001529*a)))),n]};function rn(){return en(nn).scale(175.295)}function an(e){return function(){return e}}let on=Math.PI,sn=2*on,cn=1e-6,ln=sn-cn;function un(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function dn(e){let t=Math.floor(e);if(!(t>=0))throw Error(`invalid digits: ${e}`);if(t>15)return un;let n=10**t;return function(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=Math.round(arguments[t]*n)/n+e[t]}}var fn=class{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._=``,this._append=e==null?un:dn(e)}moveTo(e,t){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(e,t){this._append`L${this._x1=+e},${this._y1=+t}`}quadraticCurveTo(e,t,n,r){this._append`Q${+e},${+t},${this._x1=+n},${this._y1=+r}`}bezierCurveTo(e,t,n,r,i,a){this._append`C${+e},${+t},${+n},${+r},${this._x1=+i},${this._y1=+a}`}arcTo(e,t,n,r,i){if(e=+e,t=+t,n=+n,r=+r,i=+i,i<0)throw Error(`negative radius: ${i}`);let a=this._x1,o=this._y1,s=n-e,c=r-t,l=a-e,u=o-t,d=l*l+u*u;if(this._x1===null)this._append`M${this._x1=e},${this._y1=t}`;else if(d>cn)if(!(Math.abs(u*s-c*l)>cn)||!i)this._append`L${this._x1=e},${this._y1=t}`;else{let f=n-a,p=r-o,m=s*s+c*c,h=f*f+p*p,g=Math.sqrt(m),_=Math.sqrt(d),v=i*Math.tan((on-Math.acos((m+d-h)/(2*g*_)))/2),y=v/_,b=v/g;Math.abs(y-1)>cn&&this._append`L${e+y*l},${t+y*u}`,this._append`A${i},${i},0,0,${+(u*f>l*p)},${this._x1=e+b*s},${this._y1=t+b*c}`}}arc(e,t,n,r,i,a){if(e=+e,t=+t,n=+n,a=!!a,n<0)throw Error(`negative radius: ${n}`);let o=n*Math.cos(r),s=n*Math.sin(r),c=e+o,l=t+s,u=1^a,d=a?r-i:i-r;this._x1===null?this._append`M${c},${l}`:(Math.abs(this._x1-c)>cn||Math.abs(this._y1-l)>cn)&&this._append`L${c},${l}`,n&&(d<0&&(d=d%sn+sn),d>ln?this._append`A${n},${n},0,1,${u},${e-o},${t-s}A${n},${n},0,1,${u},${this._x1=c},${this._y1=l}`:d>cn&&this._append`A${n},${n},0,${+(d>=on)},${u},${this._x1=e+n*Math.cos(i)},${this._y1=t+n*Math.sin(i)}`)}rect(e,t,n,r){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}h${n=+n}v${+r}h${-n}Z`}toString(){return this._}};function pn(){return new fn}pn.prototype=fn.prototype;function mn(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(n==null)t=null;else{let e=Math.floor(n);if(!(e>=0))throw RangeError(`invalid digits: ${n}`);t=e}return e},()=>new fn(t)}Array.prototype.slice;function hn(e){return typeof e==`object`&&`length`in e?e:Array.from(e)}function gn(e){this._context=e}gn.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function _n(e){return new gn(e)}function vn(e){return e[0]}function yn(e){return e[1]}function bn(e,t){var n=an(!0),r=null,i=_n,a=null,o=mn(s);e=typeof e==`function`?e:e===void 0?vn:an(e),t=typeof t==`function`?t:t===void 0?yn:an(t);function s(s){var c,l=(s=hn(s)).length,u,d=!1,f;for(r??(a=i(f=o())),c=0;c<=l;++c)!(c<l&&n(u=s[c],c,s))===d&&((d=!d)?a.lineStart():a.lineEnd()),d&&a.point(+e(u,c,s),+t(u,c,s));if(f)return a=null,f+``||null}return s.x=function(t){return arguments.length?(e=typeof t==`function`?t:an(+t),s):e},s.y=function(e){return arguments.length?(t=typeof e==`function`?e:an(+e),s):t},s.defined=function(e){return arguments.length?(n=typeof e==`function`?e:an(!!e),s):n},s.curve=function(e){return arguments.length?(i=e,r!=null&&(a=i(r)),s):i},s.context=function(e){return arguments.length?(e==null?r=a=null:a=i(r=e),s):r},s}function xn(e){this._context=e}xn.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),n===2)this._context.lineTo(e[1],t[1]);else for(var r=Sn(e),i=Sn(t),a=0,o=1;o<n;++a,++o)this._context.bezierCurveTo(r[0][a],i[0][a],r[1][a],i[1][a],e[o],t[o]);(this._line||this._line!==0&&n===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function Sn(e){var t,n=e.length-1,r,i=Array(n),a=Array(n),o=Array(n);for(i[0]=0,a[0]=2,o[0]=e[0]+2*e[1],t=1;t<n-1;++t)i[t]=1,a[t]=4,o[t]=4*e[t]+2*e[t+1];for(i[n-1]=2,a[n-1]=7,o[n-1]=8*e[n-1]+e[n],t=1;t<n;++t)r=i[t]/a[t-1],a[t]-=r,o[t]-=r*o[t-1];for(i[n-1]=o[n-1]/a[n-1],t=n-2;t>=0;--t)i[t]=(o[t]-i[t+1])/a[t];for(a[n-1]=(e[n]+i[n-1])/2,t=0;t<n-1;++t)a[t]=2*e[t+1]-i[t+1];return[i,a]}function Cn(e){return new xn(e)}function wn(e){return e}function Tn(e){if(e==null)return wn;var t,n,r=e.scale[0],i=e.scale[1],a=e.translate[0],o=e.translate[1];return function(e,s){s||(t=n=0);var c=2,l=e.length,u=Array(l);for(u[0]=(t+=e[0])*r+a,u[1]=(n+=e[1])*i+o;c<l;)u[c]=e[c],++c;return u}}function En(e,t){for(var n,r=e.length,i=r-t;i<--r;)n=e[i],e[i++]=e[r],e[r]=n}function Dn(e,t){return typeof t==`string`&&(t=e.objects[t]),t.type===`GeometryCollection`?{type:`FeatureCollection`,features:t.geometries.map(function(t){return On(e,t)})}:On(e,t)}function On(e,t){var n=t.id,r=t.bbox,i=t.properties==null?{}:t.properties,a=kn(e,t);return n==null&&r==null?{type:`Feature`,properties:i,geometry:a}:r==null?{type:`Feature`,id:n,properties:i,geometry:a}:{type:`Feature`,id:n,bbox:r,properties:i,geometry:a}}function kn(e,t){var n=Tn(e.transform),r=e.arcs;function i(e,t){t.length&&t.pop();for(var i=r[e<0?~e:e],a=0,o=i.length;a<o;++a)t.push(n(i[a],a));e<0&&En(t,o)}function a(e){return n(e)}function o(e){for(var t=[],n=0,r=e.length;n<r;++n)i(e[n],t);return t.length<2&&t.push(t[0]),t}function s(e){for(var t=o(e);t.length<4;)t.push(t[0]);return t}function c(e){return e.map(s)}function l(e){var t=e.type,n;switch(t){case`GeometryCollection`:return{type:t,geometries:e.geometries.map(l)};case`Point`:n=a(e.coordinates);break;case`MultiPoint`:n=e.coordinates.map(a);break;case`LineString`:n=o(e.arcs);break;case`MultiLineString`:n=e.arcs.map(o);break;case`Polygon`:n=c(e.arcs);break;case`MultiPolygon`:n=e.arcs.map(c);break;default:return null}return{type:t,coordinates:n}}return l(t)}function An(e,t){var n={},r={},i={},a=[],o=-1;t.forEach(function(n,r){var i=e.arcs[n<0?~n:n],a;i.length<3&&!i[1][0]&&!i[1][1]&&(a=t[++o],t[o]=n,t[r]=a)}),t.forEach(function(e){var t=s(e),n=t[0],a=t[1],o,c;if(o=i[n])if(delete i[o.end],o.push(e),o.end=a,c=r[a]){delete r[c.start];var l=c===o?o:o.concat(c);r[l.start=o.start]=i[l.end=c.end]=l}else r[o.start]=i[o.end]=o;else if(o=r[a])if(delete r[o.start],o.unshift(e),o.start=n,c=i[n]){delete i[c.end];var u=c===o?o:c.concat(o);r[u.start=c.start]=i[u.end=o.end]=u}else r[o.start]=i[o.end]=o;else o=[e],r[o.start=n]=i[o.end=a]=o});function s(t){var n=e.arcs[t<0?~t:t],r=n[0],i;return e.transform?(i=[0,0],n.forEach(function(e){i[0]+=e[0],i[1]+=e[1]})):i=n[n.length-1],t<0?[i,r]:[r,i]}function c(e,t){for(var r in e){var i=e[r];delete t[i.start],delete i.start,delete i.end,i.forEach(function(e){n[e<0?~e:e]=1}),a.push(i)}}return c(i,r),c(r,i),t.forEach(function(e){n[e<0?~e:e]||a.push([e])}),a}function jn(e){return kn(e,Mn.apply(this,arguments))}function Mn(e,t,n){var r,i,a;if(arguments.length>1)r=Nn(e,t,n);else for(i=0,r=Array(a=e.arcs.length);i<a;++i)r[i]=i;return{type:`MultiLineString`,arcs:An(e,r)}}function Nn(e,t,n){var r=[],i=[],a;function o(e){var t=e<0?~e:e;(i[t]||(i[t]=[])).push({i:e,g:a})}function s(e){e.forEach(o)}function c(e){e.forEach(s)}function l(e){e.forEach(c)}function u(e){switch(a=e,e.type){case`GeometryCollection`:e.geometries.forEach(u);break;case`LineString`:s(e.arcs);break;case`MultiLineString`:case`Polygon`:c(e.arcs);break;case`MultiPolygon`:l(e.arcs);break}}return u(t),i.forEach(n==null?function(e){r.push(e[0].i)}:function(e){n(e[0].g,e[e.length-1].g)&&r.push(e[0].i)}),r}var Pn=`http://www.w3.org/1999/xhtml`,Fn={svg:`http://www.w3.org/2000/svg`,xhtml:Pn,xlink:`http://www.w3.org/1999/xlink`,xml:`http://www.w3.org/XML/1998/namespace`,xmlns:`http://www.w3.org/2000/xmlns/`};function In(e){var t=e+=``,n=t.indexOf(`:`);return n>=0&&(t=e.slice(0,n))!==`xmlns`&&(e=e.slice(n+1)),Fn.hasOwnProperty(t)?{space:Fn[t],local:e}:e}function Ln(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===Pn&&t.documentElement.namespaceURI===Pn?t.createElement(e):t.createElementNS(n,e)}}function Rn(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function zn(e){var t=In(e);return(t.local?Rn:Ln)(t)}function Bn(){}function Vn(e){return e==null?Bn:function(){return this.querySelector(e)}}function Hn(e){typeof e!=`function`&&(e=Vn(e));for(var t=this._groups,n=t.length,r=Array(n),i=0;i<n;++i)for(var a=t[i],o=a.length,s=r[i]=Array(o),c,l,u=0;u<o;++u)(c=a[u])&&(l=e.call(c,c.__data__,u,a))&&(`__data__`in c&&(l.__data__=c.__data__),s[u]=l);return new V(r,this._parents)}function Un(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function Wn(){return[]}function Gn(e){return e==null?Wn:function(){return this.querySelectorAll(e)}}function Kn(e){return function(){return Un(e.apply(this,arguments))}}function qn(e){e=typeof e==`function`?Kn(e):Gn(e);for(var t=this._groups,n=t.length,r=[],i=[],a=0;a<n;++a)for(var o=t[a],s=o.length,c,l=0;l<s;++l)(c=o[l])&&(r.push(e.call(c,c.__data__,l,o)),i.push(c));return new V(r,i)}function Jn(e){return function(){return this.matches(e)}}function Yn(e){return function(t){return t.matches(e)}}var Xn=Array.prototype.find;function Zn(e){return function(){return Xn.call(this.children,e)}}function Qn(){return this.firstElementChild}function $n(e){return this.select(e==null?Qn:Zn(typeof e==`function`?e:Yn(e)))}var er=Array.prototype.filter;function tr(){return Array.from(this.children)}function nr(e){return function(){return er.call(this.children,e)}}function rr(e){return this.selectAll(e==null?tr:nr(typeof e==`function`?e:Yn(e)))}function ir(e){typeof e!=`function`&&(e=Jn(e));for(var t=this._groups,n=t.length,r=Array(n),i=0;i<n;++i)for(var a=t[i],o=a.length,s=r[i]=[],c,l=0;l<o;++l)(c=a[l])&&e.call(c,c.__data__,l,a)&&s.push(c);return new V(r,this._parents)}function ar(e){return Array(e.length)}function or(){return new V(this._enter||this._groups.map(ar),this._parents)}function sr(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}sr.prototype={constructor:sr,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function cr(e){return function(){return e}}function lr(e,t,n,r,i,a){for(var o=0,s,c=t.length,l=a.length;o<l;++o)(s=t[o])?(s.__data__=a[o],r[o]=s):n[o]=new sr(e,a[o]);for(;o<c;++o)(s=t[o])&&(i[o]=s)}function ur(e,t,n,r,i,a,o){var s,c,l=new Map,u=t.length,d=a.length,f=Array(u),p;for(s=0;s<u;++s)(c=t[s])&&(f[s]=p=o.call(c,c.__data__,s,t)+``,l.has(p)?i[s]=c:l.set(p,c));for(s=0;s<d;++s)p=o.call(e,a[s],s,a)+``,(c=l.get(p))?(r[s]=c,c.__data__=a[s],l.delete(p)):n[s]=new sr(e,a[s]);for(s=0;s<u;++s)(c=t[s])&&l.get(f[s])===c&&(i[s]=c)}function dr(e){return e.__data__}function fr(e,t){if(!arguments.length)return Array.from(this,dr);var n=t?ur:lr,r=this._parents,i=this._groups;typeof e!=`function`&&(e=cr(e));for(var a=i.length,o=Array(a),s=Array(a),c=Array(a),l=0;l<a;++l){var u=r[l],d=i[l],f=d.length,p=pr(e.call(u,u&&u.__data__,l,r)),m=p.length,h=s[l]=Array(m),g=o[l]=Array(m);n(u,d,h,g,c[l]=Array(f),p,t);for(var _=0,v=0,y,b;_<m;++_)if(y=h[_]){for(_>=v&&(v=_+1);!(b=g[v])&&++v<m;);y._next=b||null}}return o=new V(o,r),o._enter=s,o._exit=c,o}function pr(e){return typeof e==`object`&&`length`in e?e:Array.from(e)}function mr(){return new V(this._exit||this._groups.map(ar),this._parents)}function hr(e,t,n){var r=this.enter(),i=this,a=this.exit();return typeof e==`function`?(r=e(r),r&&=r.selection()):r=r.append(e+``),t!=null&&(i=t(i),i&&=i.selection()),n==null?a.remove():n(a),r&&i?r.merge(i).order():i}function gr(e){for(var t=e.selection?e.selection():e,n=this._groups,r=t._groups,i=n.length,a=r.length,o=Math.min(i,a),s=Array(i),c=0;c<o;++c)for(var l=n[c],u=r[c],d=l.length,f=s[c]=Array(d),p,m=0;m<d;++m)(p=l[m]||u[m])&&(f[m]=p);for(;c<i;++c)s[c]=n[c];return new V(s,this._parents)}function _r(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var r=e[t],i=r.length-1,a=r[i],o;--i>=0;)(o=r[i])&&(a&&o.compareDocumentPosition(a)^4&&a.parentNode.insertBefore(o,a),a=o);return this}function vr(e){e||=yr;function t(t,n){return t&&n?e(t.__data__,n.__data__):!t-!n}for(var n=this._groups,r=n.length,i=Array(r),a=0;a<r;++a){for(var o=n[a],s=o.length,c=i[a]=Array(s),l,u=0;u<s;++u)(l=o[u])&&(c[u]=l);c.sort(t)}return new V(i,this._parents).order()}function yr(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function br(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function xr(){return Array.from(this)}function Sr(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],i=0,a=r.length;i<a;++i){var o=r[i];if(o)return o}return null}function Cr(){let e=0;for(let t of this)++e;return e}function wr(){return!this.node()}function Tr(e){for(var t=this._groups,n=0,r=t.length;n<r;++n)for(var i=t[n],a=0,o=i.length,s;a<o;++a)(s=i[a])&&e.call(s,s.__data__,a,i);return this}function Er(e){return function(){this.removeAttribute(e)}}function Dr(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Or(e,t){return function(){this.setAttribute(e,t)}}function kr(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function Ar(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function jr(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}function Mr(e,t){var n=In(e);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((t==null?n.local?Dr:Er:typeof t==`function`?n.local?jr:Ar:n.local?kr:Or)(n,t))}function Nr(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function Pr(e){return function(){this.style.removeProperty(e)}}function Fr(e,t,n){return function(){this.style.setProperty(e,t,n)}}function Ir(e,t,n){return function(){var r=t.apply(this,arguments);r==null?this.style.removeProperty(e):this.style.setProperty(e,r,n)}}function Lr(e,t,n){return arguments.length>1?this.each((t==null?Pr:typeof t==`function`?Ir:Fr)(e,t,n??``)):Rr(this.node(),e)}function Rr(e,t){return e.style.getPropertyValue(t)||Nr(e).getComputedStyle(e,null).getPropertyValue(t)}function zr(e){return function(){delete this[e]}}function Br(e,t){return function(){this[e]=t}}function Vr(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function Hr(e,t){return arguments.length>1?this.each((t==null?zr:typeof t==`function`?Vr:Br)(e,t)):this.node()[e]}function Ur(e){return e.trim().split(/^|\s+/)}function Wr(e){return e.classList||new Gr(e)}function Gr(e){this._node=e,this._names=Ur(e.getAttribute(`class`)||``)}Gr.prototype={add:function(e){this._names.indexOf(e)<0&&(this._names.push(e),this._node.setAttribute(`class`,this._names.join(` `)))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute(`class`,this._names.join(` `)))},contains:function(e){return this._names.indexOf(e)>=0}};function Kr(e,t){for(var n=Wr(e),r=-1,i=t.length;++r<i;)n.add(t[r])}function qr(e,t){for(var n=Wr(e),r=-1,i=t.length;++r<i;)n.remove(t[r])}function Jr(e){return function(){Kr(this,e)}}function Yr(e){return function(){qr(this,e)}}function Xr(e,t){return function(){(t.apply(this,arguments)?Kr:qr)(this,e)}}function Zr(e,t){var n=Ur(e+``);if(arguments.length<2){for(var r=Wr(this.node()),i=-1,a=n.length;++i<a;)if(!r.contains(n[i]))return!1;return!0}return this.each((typeof t==`function`?Xr:t?Jr:Yr)(n,t))}function Qr(){this.textContent=``}function $r(e){return function(){this.textContent=e}}function ei(e){return function(){this.textContent=e.apply(this,arguments)??``}}function ti(e){return arguments.length?this.each(e==null?Qr:(typeof e==`function`?ei:$r)(e)):this.node().textContent}function ni(){this.innerHTML=``}function ri(e){return function(){this.innerHTML=e}}function ii(e){return function(){this.innerHTML=e.apply(this,arguments)??``}}function ai(e){return arguments.length?this.each(e==null?ni:(typeof e==`function`?ii:ri)(e)):this.node().innerHTML}function oi(){this.nextSibling&&this.parentNode.appendChild(this)}function si(){return this.each(oi)}function ci(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function li(){return this.each(ci)}function ui(e){var t=typeof e==`function`?e:zn(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function di(){return null}function fi(e,t){var n=typeof e==`function`?e:zn(e),r=t==null?di:typeof t==`function`?t:Vn(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function pi(){var e=this.parentNode;e&&e.removeChild(this)}function mi(){return this.each(pi)}function hi(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function gi(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function _i(e){return this.select(e?gi:hi)}function vi(e){return arguments.length?this.property(`__data__`,e):this.node().__data__}function yi(e){return function(t){e.call(this,t,this.__data__)}}function bi(e){return e.trim().split(/^|\s+/).map(function(e){var t=``,n=e.indexOf(`.`);return n>=0&&(t=e.slice(n+1),e=e.slice(0,n)),{type:e,name:t}})}function xi(e){return function(){var t=this.__on;if(t){for(var n=0,r=-1,i=t.length,a;n<i;++n)a=t[n],(!e.type||a.type===e.type)&&a.name===e.name?this.removeEventListener(a.type,a.listener,a.options):t[++r]=a;++r?t.length=r:delete this.__on}}}function Si(e,t,n){return function(){var r=this.__on,i,a=yi(t);if(r){for(var o=0,s=r.length;o<s;++o)if((i=r[o]).type===e.type&&i.name===e.name){this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=a,i.options=n),i.value=t;return}}this.addEventListener(e.type,a,n),i={type:e.type,name:e.name,value:t,listener:a,options:n},r?r.push(i):this.__on=[i]}}function Ci(e,t,n){var r=bi(e+``),i,a=r.length,o;if(arguments.length<2){var s=this.node().__on;if(s){for(var c=0,l=s.length,u;c<l;++c)for(i=0,u=s[c];i<a;++i)if((o=r[i]).type===u.type&&o.name===u.name)return u.value}return}for(s=t?Si:xi,i=0;i<a;++i)this.each(s(r[i],t,n));return this}function wi(e,t,n){var r=Nr(e),i=r.CustomEvent;typeof i==`function`?i=new i(t,n):(i=r.document.createEvent(`Event`),n?(i.initEvent(t,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(t,!1,!1)),e.dispatchEvent(i)}function Ti(e,t){return function(){return wi(this,e,t)}}function Ei(e,t){return function(){return wi(this,e,t.apply(this,arguments))}}function Di(e,t){return this.each((typeof t==`function`?Ei:Ti)(e,t))}function*Oi(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],i=0,a=r.length,o;i<a;++i)(o=r[i])&&(yield o)}var ki=[null];function V(e,t){this._groups=e,this._parents=t}function Ai(){return new V([[document.documentElement]],ki)}function ji(){return this}V.prototype=Ai.prototype={constructor:V,select:Hn,selectAll:qn,selectChild:$n,selectChildren:rr,filter:ir,data:fr,enter:or,exit:mr,join:hr,merge:gr,selection:ji,order:_r,sort:vr,call:br,nodes:xr,node:Sr,size:Cr,empty:wr,each:Tr,attr:Mr,style:Lr,property:Hr,classed:Zr,text:ti,html:ai,raise:si,lower:li,append:ui,insert:fi,remove:mi,clone:_i,datum:vi,on:Ci,dispatch:Di,[Symbol.iterator]:Oi};var Mi=Ai;function H(e){return typeof e==`string`?new V([[document.querySelector(e)]],[document.documentElement]):new V([[e]],ki)}function Ni(e){let t;for(;t=e.sourceEvent;)e=t;return e}function Pi(e,t){if(e=Ni(e),t===void 0&&(t=e.currentTarget),t){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=e.clientX,r.y=e.clientY,r=r.matrixTransform(t.getScreenCTM().inverse()),[r.x,r.y]}if(t.getBoundingClientRect){var i=t.getBoundingClientRect();return[e.clientX-i.left-t.clientLeft,e.clientY-i.top-t.clientTop]}}return[e.pageX,e.pageY]}var Fi={value:()=>{}};function Ii(){for(var e=0,t=arguments.length,n={},r;e<t;++e){if(!(r=arguments[e]+``)||r in n||/[\s.]/.test(r))throw Error(`illegal type: `+r);n[r]=[]}return new Li(n)}function Li(e){this._=e}function Ri(e,t){return e.trim().split(/^|\s+/).map(function(e){var n=``,r=e.indexOf(`.`);if(r>=0&&(n=e.slice(r+1),e=e.slice(0,r)),e&&!t.hasOwnProperty(e))throw Error(`unknown type: `+e);return{type:e,name:n}})}Li.prototype=Ii.prototype={constructor:Li,on:function(e,t){var n=this._,r=Ri(e+``,n),i,a=-1,o=r.length;if(arguments.length<2){for(;++a<o;)if((i=(e=r[a]).type)&&(i=zi(n[i],e.name)))return i;return}if(t!=null&&typeof t!=`function`)throw Error(`invalid callback: `+t);for(;++a<o;)if(i=(e=r[a]).type)n[i]=Bi(n[i],e.name,t);else if(t==null)for(i in n)n[i]=Bi(n[i],e.name,null);return this},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new Li(e)},call:function(e,t){if((i=arguments.length-2)>0)for(var n=Array(i),r=0,i,a;r<i;++r)n[r]=arguments[r+2];if(!this._.hasOwnProperty(e))throw Error(`unknown type: `+e);for(a=this._[e],r=0,i=a.length;r<i;++r)a[r].value.apply(t,n)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw Error(`unknown type: `+e);for(var r=this._[e],i=0,a=r.length;i<a;++i)r[i].value.apply(t,n)}};function zi(e,t){for(var n=0,r=e.length,i;n<r;++n)if((i=e[n]).name===t)return i.value}function Bi(e,t,n){for(var r=0,i=e.length;r<i;++r)if(e[r].name===t){e[r]=Fi,e=e.slice(0,r).concat(e.slice(r+1));break}return n!=null&&e.push({name:t,value:n}),e}var Vi=Ii;let Hi={capture:!0,passive:!1};function Ui(e){e.preventDefault(),e.stopImmediatePropagation()}function Wi(e){var t=e.document.documentElement,n=H(e).on(`dragstart.drag`,Ui,Hi);`onselectstart`in t?n.on(`selectstart.drag`,Ui,Hi):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect=`none`)}function Gi(e,t){var n=e.document.documentElement,r=H(e).on(`dragstart.drag`,null);t&&(r.on(`click.drag`,Ui,Hi),setTimeout(function(){r.on(`click.drag`,null)},0)),`onselectstart`in n?r.on(`selectstart.drag`,null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}function Ki(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function qi(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function Ji(){}var Yi=.7,Xi=1/Yi,Zi=`\\s*([+-]?\\d+)\\s*`,Qi=`\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*`,U=`\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*`,$i=/^#([0-9a-f]{3,8})$/,ea=RegExp(`^rgb\\(${Zi},${Zi},${Zi}\\)$`),ta=RegExp(`^rgb\\(${U},${U},${U}\\)$`),na=RegExp(`^rgba\\(${Zi},${Zi},${Zi},${Qi}\\)$`),ra=RegExp(`^rgba\\(${U},${U},${U},${Qi}\\)$`),ia=RegExp(`^hsl\\(${Qi},${U},${U}\\)$`),aa=RegExp(`^hsla\\(${Qi},${U},${U},${Qi}\\)$`),oa={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};Ki(Ji,da,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:sa,formatHex:sa,formatHex8:ca,formatHsl:la,formatRgb:ua,toString:ua});function sa(){return this.rgb().formatHex()}function ca(){return this.rgb().formatHex8()}function la(){return Ca(this).formatHsl()}function ua(){return this.rgb().formatRgb()}function da(e){var t,n;return e=(e+``).trim().toLowerCase(),(t=$i.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?fa(t):n===3?new W(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?pa(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?pa(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=ea.exec(e))?new W(t[1],t[2],t[3],1):(t=ta.exec(e))?new W(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=na.exec(e))?pa(t[1],t[2],t[3],t[4]):(t=ra.exec(e))?pa(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=ia.exec(e))?Sa(t[1],t[2]/100,t[3]/100,1):(t=aa.exec(e))?Sa(t[1],t[2]/100,t[3]/100,t[4]):oa.hasOwnProperty(e)?fa(oa[e]):e===`transparent`?new W(NaN,NaN,NaN,0):null}function fa(e){return new W(e>>16&255,e>>8&255,e&255,1)}function pa(e,t,n,r){return r<=0&&(e=t=n=NaN),new W(e,t,n,r)}function ma(e){return e instanceof Ji||(e=da(e)),e?(e=e.rgb(),new W(e.r,e.g,e.b,e.opacity)):new W}function ha(e,t,n,r){return arguments.length===1?ma(e):new W(e,t,n,r??1)}function W(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}Ki(W,ha,qi(Ji,{brighter(e){return e=e==null?Xi:Xi**+e,new W(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Yi:Yi**+e,new W(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new W(ba(this.r),ba(this.g),ba(this.b),ya(this.opacity))},displayable(){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},hex:ga,formatHex:ga,formatHex8:_a,formatRgb:va,toString:va}));function ga(){return`#${xa(this.r)}${xa(this.g)}${xa(this.b)}`}function _a(){return`#${xa(this.r)}${xa(this.g)}${xa(this.b)}${xa((isNaN(this.opacity)?1:this.opacity)*255)}`}function va(){let e=ya(this.opacity);return`${e===1?`rgb(`:`rgba(`}${ba(this.r)}, ${ba(this.g)}, ${ba(this.b)}${e===1?`)`:`, ${e})`}`}function ya(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function ba(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function xa(e){return e=ba(e),(e<16?`0`:``)+e.toString(16)}function Sa(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new G(e,t,n,r)}function Ca(e){if(e instanceof G)return new G(e.h,e.s,e.l,e.opacity);if(e instanceof Ji||(e=da(e)),!e)return new G;if(e instanceof G)return e;e=e.rgb();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;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 G(o,s,c,e.opacity)}function wa(e,t,n,r){return arguments.length===1?Ca(e):new G(e,t,n,r??1)}function G(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}Ki(G,wa,qi(Ji,{brighter(e){return e=e==null?Xi:Xi**+e,new G(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Yi:Yi**+e,new G(this.h,this.s,this.l*e,this.opacity)},rgb(){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;return new W(Da(e>=240?e-240:e+120,i,r),Da(e,i,r),Da(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new G(Ta(this.h),Ea(this.s),Ea(this.l),ya(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){let e=ya(this.opacity);return`${e===1?`hsl(`:`hsla(`}${Ta(this.h)}, ${Ea(this.s)*100}%, ${Ea(this.l)*100}%${e===1?`)`:`, ${e})`}`}}));function Ta(e){return e=(e||0)%360,e<0?e+360:e}function Ea(e){return Math.max(0,Math.min(1,e||0))}function Da(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}var Oa=e=>()=>e;function ka(e,t){return function(n){return e+n*t}}function Aa(e,t,n){return e**=+n,t=t**+n-e,n=1/n,function(r){return(e+r*t)**+n}}function ja(e){return(e=+e)==1?Ma:function(t,n){return n-t?Aa(t,n,e):Oa(isNaN(t)?n:t)}}function Ma(e,t){var n=t-e;return n?ka(e,n):Oa(isNaN(e)?t:e)}var Na=(function e(t){var n=ja(t);function r(e,t){var r=n((e=ha(e)).r,(t=ha(t)).r),i=n(e.g,t.g),a=n(e.b,t.b),o=Ma(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=i(t),e.b=a(t),e.opacity=o(t),e+``}}return r.gamma=e,r})(1);function K(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}var Pa=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Fa=new RegExp(Pa.source,`g`);function Ia(e){return function(){return e}}function La(e){return function(t){return e(t)+``}}function Ra(e,t){var n=Pa.lastIndex=Fa.lastIndex=0,r,i,a,o=-1,s=[],c=[];for(e+=``,t+=``;(r=Pa.exec(e))&&(i=Fa.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({i:o,x:K(r,i)})),n=Fa.lastIndex;return n<t.length&&(a=t.slice(n),s[o]?s[o]+=a:s[++o]=a),s.length<2?c[0]?La(c[0].x):Ia(t):(t=c.length,function(e){for(var n=0,r;n<t;++n)s[(r=c[n]).i]=r.x(e);return s.join(``)})}var za=180/Math.PI,Ba={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Va(e,t,n,r,i,a){var o,s,c;return(o=Math.sqrt(e*e+t*t))&&(e/=o,t/=o),(c=e*n+t*r)&&(n-=e*c,r-=t*c),(s=Math.sqrt(n*n+r*r))&&(n/=s,r/=s,c/=s),e*r<t*n&&(e=-e,t=-t,c=-c,o=-o),{translateX:i,translateY:a,rotate:Math.atan2(t,e)*za,skewX:Math.atan(c)*za,scaleX:o,scaleY:s}}var Ha;function Ua(e){let t=new(typeof DOMMatrix==`function`?DOMMatrix:WebKitCSSMatrix)(e+``);return t.isIdentity?Ba:Va(t.a,t.b,t.c,t.d,t.e,t.f)}function Wa(e){return e==null||(Ha||=document.createElementNS(`http://www.w3.org/2000/svg`,`g`),Ha.setAttribute(`transform`,e),!(e=Ha.transform.baseVal.consolidate()))?Ba:(e=e.matrix,Va(e.a,e.b,e.c,e.d,e.e,e.f))}function Ga(e,t,n,r){function i(e){return e.length?e.pop()+` `:``}function a(e,r,i,a,o,s){if(e!==i||r!==a){var c=o.push(`translate(`,null,t,null,n);s.push({i:c-4,x:K(e,i)},{i:c-2,x:K(r,a)})}else (i||a)&&o.push(`translate(`+i+t+a+n)}function o(e,t,n,a){e===t?t&&n.push(i(n)+`rotate(`+t+r):(e-t>180?t+=360:t-e>180&&(e+=360),a.push({i:n.push(i(n)+`rotate(`,null,r)-2,x:K(e,t)}))}function s(e,t,n,a){e===t?t&&n.push(i(n)+`skewX(`+t+r):a.push({i:n.push(i(n)+`skewX(`,null,r)-2,x:K(e,t)})}function c(e,t,n,r,a,o){if(e!==n||t!==r){var s=a.push(i(a)+`scale(`,null,`,`,null,`)`);o.push({i:s-4,x:K(e,n)},{i:s-2,x:K(t,r)})}else (n!==1||r!==1)&&a.push(i(a)+`scale(`+n+`,`+r+`)`)}return function(t,n){var r=[],i=[];return t=e(t),n=e(n),a(t.translateX,t.translateY,n.translateX,n.translateY,r,i),o(t.rotate,n.rotate,r,i),s(t.skewX,n.skewX,r,i),c(t.scaleX,t.scaleY,n.scaleX,n.scaleY,r,i),t=n=null,function(e){for(var t=-1,n=i.length,a;++t<n;)r[(a=i[t]).i]=a.x(e);return r.join(``)}}}var Ka=Ga(Ua,`px, `,`px)`,`deg)`),qa=Ga(Wa,`, `,`)`,`)`),Ja=1e-12;function Ya(e){return((e=Math.exp(e))+1/e)/2}function Xa(e){return((e=Math.exp(e))-1/e)/2}function Za(e){return((e=Math.exp(2*e))-1)/(e+1)}var Qa=(function e(t,n,r){function i(e,i){var a=e[0],o=e[1],s=e[2],c=i[0],l=i[1],u=i[2],d=c-a,f=l-o,p=d*d+f*f,m,h;if(p<Ja)h=Math.log(u/s)/t,m=function(e){return[a+e*d,o+e*f,s*Math.exp(t*e*h)]};else{var g=Math.sqrt(p),_=(u*u-s*s+r*p)/(2*s*n*g),v=(u*u-s*s-r*p)/(2*u*n*g),y=Math.log(Math.sqrt(_*_+1)-_);h=(Math.log(Math.sqrt(v*v+1)-v)-y)/t,m=function(e){var r=e*h,i=Ya(y),c=s/(n*g)*(i*Za(t*r+y)-Xa(y));return[a+c*d,o+c*f,s*i/Ya(t*r+y)]}}return m.duration=h*1e3*t/Math.SQRT2,m}return i.rho=function(t){var n=Math.max(.001,+t),r=n*n;return e(n,r,r*r)},i})(Math.SQRT2,2,4),$a=0,eo=0,to=0,no=1e3,ro,io,ao=0,oo=0,so=0,co=typeof performance==`object`&&performance.now?performance:Date,lo=typeof window==`object`&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function uo(){return oo||=(lo(fo),co.now()+so)}function fo(){oo=0}function po(){this._call=this._time=this._next=null}po.prototype=mo.prototype={constructor:po,restart:function(e,t,n){if(typeof e!=`function`)throw TypeError(`callback is not a function`);n=(n==null?uo():+n)+(t==null?0:+t),!this._next&&io!==this&&(io?io._next=this:ro=this,io=this),this._call=e,this._time=n,yo()},stop:function(){this._call&&(this._call=null,this._time=1/0,yo())}};function mo(e,t,n){var r=new po;return r.restart(e,t,n),r}function ho(){uo(),++$a;for(var e=ro,t;e;)(t=oo-e._time)>=0&&e._call.call(void 0,t),e=e._next;--$a}function go(){oo=(ao=co.now())+so,$a=eo=0;try{ho()}finally{$a=0,vo(),oo=0}}function _o(){var e=co.now(),t=e-ao;t>no&&(so-=t,ao=e)}function vo(){for(var e,t=ro,n,r=1/0;t;)t._call?(r>t._time&&(r=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:ro=n);io=e,yo(r)}function yo(e){$a||(eo&&=clearTimeout(eo),e-oo>24?(e<1/0&&(eo=setTimeout(go,e-co.now()-so)),to&&=clearInterval(to)):(to||=(ao=co.now(),setInterval(_o,no)),$a=1,lo(go)))}function bo(e,t,n){var r=new po;return t=t==null?0:+t,r.restart(n=>{r.stop(),e(n+t)},t,n),r}var xo=Vi(`start`,`end`,`cancel`,`interrupt`),So=[],Co=0,wo=1,To=2,Eo=3,Do=4,Oo=5,ko=6;function Ao(e,t,n,r,i,a){var o=e.__transition;if(!o)e.__transition={};else if(n in o)return;Mo(e,n,{name:t,index:r,group:i,on:xo,tween:So,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:Co})}function jo(e,t){var n=J(e,t);if(n.state>Co)throw Error(`too late; already scheduled`);return n}function q(e,t){var n=J(e,t);if(n.state>Eo)throw Error(`too late; already running`);return n}function J(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw Error(`transition not found`);return n}function Mo(e,t,n){var r=e.__transition,i;r[t]=n,n.timer=mo(a,0,n.time);function a(e){n.state=wo,n.timer.restart(o,n.delay,n.time),n.delay<=e&&o(e-n.delay)}function o(a){var l,u,d,f;if(n.state!==wo)return c();for(l in r)if(f=r[l],f.name===n.name){if(f.state===Eo)return bo(o);f.state===Do?(f.state=ko,f.timer.stop(),f.on.call(`interrupt`,e,e.__data__,f.index,f.group),delete r[l]):+l<t&&(f.state=ko,f.timer.stop(),f.on.call(`cancel`,e,e.__data__,f.index,f.group),delete r[l])}if(bo(function(){n.state===Eo&&(n.state=Do,n.timer.restart(s,n.delay,n.time),s(a))}),n.state=To,n.on.call(`start`,e,e.__data__,n.index,n.group),n.state===To){for(n.state=Eo,i=Array(d=n.tween.length),l=0,u=-1;l<d;++l)(f=n.tween[l].value.call(e,e.__data__,n.index,n.group))&&(i[++u]=f);i.length=u+1}}function s(t){for(var r=t<n.duration?n.ease.call(null,t/n.duration):(n.timer.restart(c),n.state=Oo,1),a=-1,o=i.length;++a<o;)i[a].call(e,r);n.state===Oo&&(n.on.call(`end`,e,e.__data__,n.index,n.group),c())}function c(){for(var i in n.state=ko,n.timer.stop(),delete r[t],r)return;delete e.__transition}}function No(e,t){var n=e.__transition,r,i,a=!0,o;if(n){for(o in t=t==null?null:t+``,n){if((r=n[o]).name!==t){a=!1;continue}i=r.state>To&&r.state<Oo,r.state=ko,r.timer.stop(),r.on.call(i?`interrupt`:`cancel`,e,e.__data__,r.index,r.group),delete n[o]}a&&delete e.__transition}}function Po(e){return this.each(function(){No(this,e)})}function Fo(e,t){var n,r;return function(){var i=q(this,e),a=i.tween;if(a!==n){r=n=a;for(var o=0,s=r.length;o<s;++o)if(r[o].name===t){r=r.slice(),r.splice(o,1);break}}i.tween=r}}function Io(e,t,n){var r,i;if(typeof n!=`function`)throw Error();return function(){var a=q(this,e),o=a.tween;if(o!==r){i=(r=o).slice();for(var s={name:t,value:n},c=0,l=i.length;c<l;++c)if(i[c].name===t){i[c]=s;break}c===l&&i.push(s)}a.tween=i}}function Lo(e,t){var n=this._id;if(e+=``,arguments.length<2){for(var r=J(this.node(),n).tween,i=0,a=r.length,o;i<a;++i)if((o=r[i]).name===e)return o.value;return null}return this.each((t==null?Fo:Io)(n,e,t))}function Ro(e,t,n){var r=e._id;return e.each(function(){var e=q(this,r);(e.value||={})[t]=n.apply(this,arguments)}),function(e){return J(e,r).value[t]}}function zo(e,t){var n;return(typeof t==`number`?K:t instanceof da?Na:(n=da(t))?(t=n,Na):Ra)(e,t)}function Bo(e){return function(){this.removeAttribute(e)}}function Vo(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Ho(e,t,n){var r,i=n+``,a;return function(){var o=this.getAttribute(e);return o===i?null:o===r?a:a=t(r=o,n)}}function Uo(e,t,n){var r,i=n+``,a;return function(){var o=this.getAttributeNS(e.space,e.local);return o===i?null:o===r?a:a=t(r=o,n)}}function Wo(e,t,n){var r,i,a;return function(){var o,s=n(this),c;return s==null?void this.removeAttribute(e):(o=this.getAttribute(e),c=s+``,o===c?null:o===r&&c===i?a:(i=c,a=t(r=o,s)))}}function Go(e,t,n){var r,i,a;return function(){var o,s=n(this),c;return s==null?void this.removeAttributeNS(e.space,e.local):(o=this.getAttributeNS(e.space,e.local),c=s+``,o===c?null:o===r&&c===i?a:(i=c,a=t(r=o,s)))}}function Ko(e,t){var n=In(e),r=n===`transform`?qa:zo;return this.attrTween(e,typeof t==`function`?(n.local?Go:Wo)(n,r,Ro(this,`attr.`+e,t)):t==null?(n.local?Vo:Bo)(n):(n.local?Uo:Ho)(n,r,t))}function qo(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function Jo(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function Yo(e,t){var n,r;function i(){var i=t.apply(this,arguments);return i!==r&&(n=(r=i)&&Jo(e,i)),n}return i._value=t,i}function Xo(e,t){var n,r;function i(){var i=t.apply(this,arguments);return i!==r&&(n=(r=i)&&qo(e,i)),n}return i._value=t,i}function Zo(e,t){var n=`attr.`+e;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(t==null)return this.tween(n,null);if(typeof t!=`function`)throw Error();var r=In(e);return this.tween(n,(r.local?Yo:Xo)(r,t))}function Qo(e,t){return function(){jo(this,e).delay=+t.apply(this,arguments)}}function $o(e,t){return t=+t,function(){jo(this,e).delay=t}}function es(e){var t=this._id;return arguments.length?this.each((typeof e==`function`?Qo:$o)(t,e)):J(this.node(),t).delay}function ts(e,t){return function(){q(this,e).duration=+t.apply(this,arguments)}}function ns(e,t){return t=+t,function(){q(this,e).duration=t}}function rs(e){var t=this._id;return arguments.length?this.each((typeof e==`function`?ts:ns)(t,e)):J(this.node(),t).duration}function is(e,t){if(typeof t!=`function`)throw Error();return function(){q(this,e).ease=t}}function as(e){var t=this._id;return arguments.length?this.each(is(t,e)):J(this.node(),t).ease}function os(e,t){return function(){var n=t.apply(this,arguments);if(typeof n!=`function`)throw Error();q(this,e).ease=n}}function ss(e){if(typeof e!=`function`)throw Error();return this.each(os(this._id,e))}function cs(e){typeof e!=`function`&&(e=Jn(e));for(var t=this._groups,n=t.length,r=Array(n),i=0;i<n;++i)for(var a=t[i],o=a.length,s=r[i]=[],c,l=0;l<o;++l)(c=a[l])&&e.call(c,c.__data__,l,a)&&s.push(c);return new Y(r,this._parents,this._name,this._id)}function ls(e){if(e._id!==this._id)throw Error();for(var t=this._groups,n=e._groups,r=t.length,i=n.length,a=Math.min(r,i),o=Array(r),s=0;s<a;++s)for(var c=t[s],l=n[s],u=c.length,d=o[s]=Array(u),f,p=0;p<u;++p)(f=c[p]||l[p])&&(d[p]=f);for(;s<r;++s)o[s]=t[s];return new Y(o,this._parents,this._name,this._id)}function us(e){return(e+``).trim().split(/^|\s+/).every(function(e){var t=e.indexOf(`.`);return t>=0&&(e=e.slice(0,t)),!e||e===`start`})}function ds(e,t,n){var r,i,a=us(t)?jo:q;return function(){var o=a(this,e),s=o.on;s!==r&&(i=(r=s).copy()).on(t,n),o.on=i}}function fs(e,t){var n=this._id;return arguments.length<2?J(this.node(),n).on.on(e):this.each(ds(n,e,t))}function ps(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function ms(){return this.on(`end.remove`,ps(this._id))}function hs(e){var t=this._name,n=this._id;typeof e!=`function`&&(e=Vn(e));for(var r=this._groups,i=r.length,a=Array(i),o=0;o<i;++o)for(var s=r[o],c=s.length,l=a[o]=Array(c),u,d,f=0;f<c;++f)(u=s[f])&&(d=e.call(u,u.__data__,f,s))&&(`__data__`in u&&(d.__data__=u.__data__),l[f]=d,Ao(l[f],t,n,f,l,J(u,n)));return new Y(a,this._parents,t,n)}function gs(e){var t=this._name,n=this._id;typeof e!=`function`&&(e=Gn(e));for(var r=this._groups,i=r.length,a=[],o=[],s=0;s<i;++s)for(var c=r[s],l=c.length,u,d=0;d<l;++d)if(u=c[d]){for(var f=e.call(u,u.__data__,d,c),p,m=J(u,n),h=0,g=f.length;h<g;++h)(p=f[h])&&Ao(p,t,n,h,f,m);a.push(f),o.push(u)}return new Y(a,o,t,n)}var _s=Mi.prototype.constructor;function vs(){return new _s(this._groups,this._parents)}function ys(e,t){var n,r,i;return function(){var a=Rr(this,e),o=(this.style.removeProperty(e),Rr(this,e));return a===o?null:a===n&&o===r?i:i=t(n=a,r=o)}}function bs(e){return function(){this.style.removeProperty(e)}}function xs(e,t,n){var r,i=n+``,a;return function(){var o=Rr(this,e);return o===i?null:o===r?a:a=t(r=o,n)}}function Ss(e,t,n){var r,i,a;return function(){var o=Rr(this,e),s=n(this),c=s+``;return s??(c=s=(this.style.removeProperty(e),Rr(this,e))),o===c?null:o===r&&c===i?a:(i=c,a=t(r=o,s))}}function Cs(e,t){var n,r,i,a=`style.`+t,o=`end.`+a,s;return function(){var c=q(this,e),l=c.on,u=c.value[a]==null?s||=bs(t):void 0;(l!==n||i!==u)&&(r=(n=l).copy()).on(o,i=u),c.on=r}}function ws(e,t,n){var r=(e+=``)==`transform`?Ka:zo;return t==null?this.styleTween(e,ys(e,r)).on(`end.style.`+e,bs(e)):typeof t==`function`?this.styleTween(e,Ss(e,r,Ro(this,`style.`+e,t))).each(Cs(this._id,e)):this.styleTween(e,xs(e,r,t),n).on(`end.style.`+e,null)}function Ts(e,t,n){return function(r){this.style.setProperty(e,t.call(this,r),n)}}function Es(e,t,n){var r,i;function a(){var a=t.apply(this,arguments);return a!==i&&(r=(i=a)&&Ts(e,a,n)),r}return a._value=t,a}function Ds(e,t,n){var r=`style.`+(e+=``);if(arguments.length<2)return(r=this.tween(r))&&r._value;if(t==null)return this.tween(r,null);if(typeof t!=`function`)throw Error();return this.tween(r,Es(e,t,n??``))}function Os(e){return function(){this.textContent=e}}function ks(e){return function(){this.textContent=e(this)??``}}function As(e){return this.tween(`text`,typeof e==`function`?ks(Ro(this,`text`,e)):Os(e==null?``:e+``))}function js(e){return function(t){this.textContent=e.call(this,t)}}function Ms(e){var t,n;function r(){var r=e.apply(this,arguments);return r!==n&&(t=(n=r)&&js(r)),t}return r._value=e,r}function Ns(e){var t=`text`;if(arguments.length<1)return(t=this.tween(t))&&t._value;if(e==null)return this.tween(t,null);if(typeof e!=`function`)throw Error();return this.tween(t,Ms(e))}function Ps(){for(var e=this._name,t=this._id,n=Rs(),r=this._groups,i=r.length,a=0;a<i;++a)for(var o=r[a],s=o.length,c,l=0;l<s;++l)if(c=o[l]){var u=J(c,t);Ao(c,e,n,l,o,{time:u.time+u.delay+u.duration,delay:0,duration:u.duration,ease:u.ease})}return new Y(r,this._parents,e,n)}function Fs(){var e,t,n=this,r=n._id,i=n.size();return new Promise(function(a,o){var s={value:o},c={value:function(){--i===0&&a()}};n.each(function(){var n=q(this,r),i=n.on;i!==e&&(t=(e=i).copy(),t._.cancel.push(s),t._.interrupt.push(s),t._.end.push(c)),n.on=t}),i===0&&a()})}var Is=0;function Y(e,t,n,r){this._groups=e,this._parents=t,this._name=n,this._id=r}function Ls(e){return Mi().transition(e)}function Rs(){return++Is}var X=Mi.prototype;Y.prototype=Ls.prototype={constructor:Y,select:hs,selectAll:gs,selectChild:X.selectChild,selectChildren:X.selectChildren,filter:cs,merge:ls,selection:vs,transition:Ps,call:X.call,nodes:X.nodes,node:X.node,size:X.size,empty:X.empty,each:X.each,on:fs,attr:Ko,attrTween:Zo,style:ws,styleTween:Ds,text:As,textTween:Ns,remove:ms,tween:Lo,delay:es,duration:rs,ease:as,easeVarying:ss,end:Fs,[Symbol.iterator]:X[Symbol.iterator]};function zs(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var Bs={time:null,delay:0,duration:250,ease:zs};function Vs(e,t){for(var n;!(n=e.__transition)||!(n=n[t]);)if(!(e=e.parentNode))throw Error(`transition ${t} not found`);return n}function Hs(e){var t,n;e instanceof Y?(t=e._id,e=e._name):(t=Rs(),(n=Bs).time=uo(),e=e==null?null:e+``);for(var r=this._groups,i=r.length,a=0;a<i;++a)for(var o=r[a],s=o.length,c,l=0;l<s;++l)(c=o[l])&&Ao(c,e,t,l,o,n||Vs(c,t));return new Y(r,this._parents,e,t)}Mi.prototype.interrupt=Po,Mi.prototype.transition=Hs;var Us=e=>()=>e;function Ws(e,{sourceEvent:t,target:n,transform:r,dispatch:i}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:r,enumerable:!0,configurable:!0},_:{value:i}})}function Z(e,t,n){this.k=e,this.x=t,this.y=n}Z.prototype={constructor:Z,scale:function(e){return e===1?this:new Z(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new Z(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return`translate(`+this.x+`,`+this.y+`) scale(`+this.k+`)`}};var Gs=new Z(1,0,0);Ks.prototype=Z.prototype;function Ks(e){for(;!e.__zoom;)if(!(e=e.parentNode))return Gs;return e.__zoom}function qs(e){e.stopImmediatePropagation()}function Js(e){e.preventDefault(),e.stopImmediatePropagation()}function Ys(e){return(!e.ctrlKey||e.type===`wheel`)&&!e.button}function Xs(){var e=this;return e instanceof SVGElement?(e=e.ownerSVGElement||e,e.hasAttribute(`viewBox`)?(e=e.viewBox.baseVal,[[e.x,e.y],[e.x+e.width,e.y+e.height]]):[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]):[[0,0],[e.clientWidth,e.clientHeight]]}function Zs(){return this.__zoom||Gs}function Qs(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function $s(){return navigator.maxTouchPoints||`ontouchstart`in this}function ec(e,t,n){var r=e.invertX(t[0][0])-n[0][0],i=e.invertX(t[1][0])-n[1][0],a=e.invertY(t[0][1])-n[0][1],o=e.invertY(t[1][1])-n[1][1];return e.translate(i>r?(r+i)/2:Math.min(0,r)||Math.max(0,i),o>a?(a+o)/2:Math.min(0,a)||Math.max(0,o))}function tc(){var e=Ys,t=Xs,n=ec,r=Qs,i=$s,a=[0,1/0],o=[[-1/0,-1/0],[1/0,1/0]],s=250,c=Qa,l=Vi(`start`,`zoom`,`end`),u,d,f,p=500,m=150,h=0,g=10;function _(e){e.property(`__zoom`,Zs).on(`wheel.zoom`,w,{passive:!1}).on(`mousedown.zoom`,T).on(`dblclick.zoom`,E).filter(i).on(`touchstart.zoom`,D).on(`touchmove.zoom`,O).on(`touchend.zoom touchcancel.zoom`,k).style(`-webkit-tap-highlight-color`,`rgba(0,0,0,0)`)}_.transform=function(e,t,n,r){var i=e.selection?e.selection():e;i.property(`__zoom`,Zs),e===i?i.interrupt().each(function(){S(this,arguments).event(r).start().zoom(null,typeof t==`function`?t.apply(this,arguments):t).end()}):x(e,t,n,r)},_.scaleBy=function(e,t,n,r){_.scaleTo(e,function(){return this.__zoom.k*(typeof t==`function`?t.apply(this,arguments):t)},n,r)},_.scaleTo=function(e,r,i,a){_.transform(e,function(){var e=t.apply(this,arguments),a=this.__zoom,s=i==null?b(e):typeof i==`function`?i.apply(this,arguments):i,c=a.invert(s),l=typeof r==`function`?r.apply(this,arguments):r;return n(y(v(a,l),s,c),e,o)},i,a)},_.translateBy=function(e,r,i,a){_.transform(e,function(){return n(this.__zoom.translate(typeof r==`function`?r.apply(this,arguments):r,typeof i==`function`?i.apply(this,arguments):i),t.apply(this,arguments),o)},null,a)},_.translateTo=function(e,r,i,a,s){_.transform(e,function(){var e=t.apply(this,arguments),s=this.__zoom,c=a==null?b(e):typeof a==`function`?a.apply(this,arguments):a;return n(Gs.translate(c[0],c[1]).scale(s.k).translate(typeof r==`function`?-r.apply(this,arguments):-r,typeof i==`function`?-i.apply(this,arguments):-i),e,o)},a,s)};function v(e,t){return t=Math.max(a[0],Math.min(a[1],t)),t===e.k?e:new Z(t,e.x,e.y)}function y(e,t,n){var r=t[0]-n[0]*e.k,i=t[1]-n[1]*e.k;return r===e.x&&i===e.y?e:new Z(e.k,r,i)}function b(e){return[(+e[0][0]+ +e[1][0])/2,(+e[0][1]+ +e[1][1])/2]}function x(e,n,r,i){e.on(`start.zoom`,function(){S(this,arguments).event(i).start()}).on(`interrupt.zoom end.zoom`,function(){S(this,arguments).event(i).end()}).tween(`zoom`,function(){var e=this,a=arguments,o=S(e,a).event(i),s=t.apply(e,a),l=r==null?b(s):typeof r==`function`?r.apply(e,a):r,u=Math.max(s[1][0]-s[0][0],s[1][1]-s[0][1]),d=e.__zoom,f=typeof n==`function`?n.apply(e,a):n,p=c(d.invert(l).concat(u/d.k),f.invert(l).concat(u/f.k));return function(e){if(e===1)e=f;else{var t=p(e),n=u/t[2];e=new Z(n,l[0]-t[0]*n,l[1]-t[1]*n)}o.zoom(null,e)}})}function S(e,t,n){return!n&&e.__zooming||new C(e,t)}function C(e,n){this.that=e,this.args=n,this.active=0,this.sourceEvent=null,this.extent=t.apply(e,n),this.taps=0}C.prototype={event:function(e){return e&&(this.sourceEvent=e),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit(`start`)),this},zoom:function(e,t){return this.mouse&&e!==`mouse`&&(this.mouse[1]=t.invert(this.mouse[0])),this.touch0&&e!==`touch`&&(this.touch0[1]=t.invert(this.touch0[0])),this.touch1&&e!==`touch`&&(this.touch1[1]=t.invert(this.touch1[0])),this.that.__zoom=t,this.emit(`zoom`),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit(`end`)),this},emit:function(e){var t=H(this.that).datum();l.call(e,this.that,new Ws(e,{sourceEvent:this.sourceEvent,target:_,type:e,transform:this.that.__zoom,dispatch:l}),t)}};function w(t,...i){if(!e.apply(this,arguments))return;var s=S(this,i).event(t),c=this.__zoom,l=Math.max(a[0],Math.min(a[1],c.k*2**r.apply(this,arguments))),u=Pi(t);if(s.wheel)(s.mouse[0][0]!==u[0]||s.mouse[0][1]!==u[1])&&(s.mouse[1]=c.invert(s.mouse[0]=u)),clearTimeout(s.wheel);else if(c.k===l)return;else s.mouse=[u,c.invert(u)],No(this),s.start();Js(t),s.wheel=setTimeout(d,m),s.zoom(`mouse`,n(y(v(c,l),s.mouse[0],s.mouse[1]),s.extent,o));function d(){s.wheel=null,s.end()}}function T(t,...r){if(f||!e.apply(this,arguments))return;var i=t.currentTarget,a=S(this,r,!0).event(t),s=H(t.view).on(`mousemove.zoom`,d,!0).on(`mouseup.zoom`,p,!0),c=Pi(t,i),l=t.clientX,u=t.clientY;Wi(t.view),qs(t),a.mouse=[c,this.__zoom.invert(c)],No(this),a.start();function d(e){if(Js(e),!a.moved){var t=e.clientX-l,r=e.clientY-u;a.moved=t*t+r*r>h}a.event(e).zoom(`mouse`,n(y(a.that.__zoom,a.mouse[0]=Pi(e,i),a.mouse[1]),a.extent,o))}function p(e){s.on(`mousemove.zoom mouseup.zoom`,null),Gi(e.view,a.moved),Js(e),a.event(e).end()}}function E(r,...i){if(e.apply(this,arguments)){var a=this.__zoom,c=Pi(r.changedTouches?r.changedTouches[0]:r,this),l=a.invert(c),u=a.k*(r.shiftKey?.5:2),d=n(y(v(a,u),c,l),t.apply(this,i),o);Js(r),s>0?H(this).transition().duration(s).call(x,d,c,r):H(this).call(_.transform,d,c,r)}}function D(t,...n){if(e.apply(this,arguments)){var r=t.touches,i=r.length,a=S(this,n,t.changedTouches.length===i).event(t),o,s,c,l;for(qs(t),s=0;s<i;++s)c=r[s],l=Pi(c,this),l=[l,this.__zoom.invert(l),c.identifier],a.touch0?!a.touch1&&a.touch0[2]!==l[2]&&(a.touch1=l,a.taps=0):(a.touch0=l,o=!0,a.taps=1+!!u);u&&=clearTimeout(u),o&&(a.taps<2&&(d=l[0],u=setTimeout(function(){u=null},p)),No(this),a.start())}}function O(e,...t){if(this.__zooming){var r=S(this,t).event(e),i=e.changedTouches,a=i.length,s,c,l,u;for(Js(e),s=0;s<a;++s)c=i[s],l=Pi(c,this),r.touch0&&r.touch0[2]===c.identifier?r.touch0[0]=l:r.touch1&&r.touch1[2]===c.identifier&&(r.touch1[0]=l);if(c=r.that.__zoom,r.touch1){var d=r.touch0[0],f=r.touch0[1],p=r.touch1[0],m=r.touch1[1],h=(h=p[0]-d[0])*h+(h=p[1]-d[1])*h,g=(g=m[0]-f[0])*g+(g=m[1]-f[1])*g;c=v(c,Math.sqrt(h/g)),l=[(d[0]+p[0])/2,(d[1]+p[1])/2],u=[(f[0]+m[0])/2,(f[1]+m[1])/2]}else if(r.touch0)l=r.touch0[0],u=r.touch0[1];else return;r.zoom(`touch`,n(y(c,l,u),r.extent,o))}}function k(e,...t){if(this.__zooming){var n=S(this,t).event(e),r=e.changedTouches,i=r.length,a,o;for(qs(e),f&&clearTimeout(f),f=setTimeout(function(){f=null},p),a=0;a<i;++a)o=r[a],n.touch0&&n.touch0[2]===o.identifier?delete n.touch0:n.touch1&&n.touch1[2]===o.identifier&&delete n.touch1;if(n.touch1&&!n.touch0&&(n.touch0=n.touch1,delete n.touch1),n.touch0)n.touch0[1]=this.__zoom.invert(n.touch0[0]);else if(n.end(),n.taps===2&&(o=Pi(o,this),Math.hypot(d[0]-o[0],d[1]-o[1])<g)){var s=H(this).on(`dblclick.zoom`);s&&s.apply(this,arguments)}}}return _.wheelDelta=function(e){return arguments.length?(r=typeof e==`function`?e:Us(+e),_):r},_.filter=function(t){return arguments.length?(e=typeof t==`function`?t:Us(!!t),_):e},_.touchable=function(e){return arguments.length?(i=typeof e==`function`?e:Us(!!e),_):i},_.extent=function(e){return arguments.length?(t=typeof e==`function`?e:Us([[+e[0][0],+e[0][1]],[+e[1][0],+e[1][1]]]),_):t},_.scaleExtent=function(e){return arguments.length?(a[0]=+e[0],a[1]=+e[1],_):[a[0],a[1]]},_.translateExtent=function(e){return arguments.length?(o[0][0]=+e[0][0],o[1][0]=+e[1][0],o[0][1]=+e[0][1],o[1][1]=+e[1][1],_):[[o[0][0],o[0][1]],[o[1][0],o[1][1]]]},_.constrain=function(e){return arguments.length?(n=e,_):n},_.duration=function(e){return arguments.length?(s=+e,_):s},_.interpolate=function(e){return arguments.length?(c=e,_):c},_.on=function(){var e=l.on.apply(l,arguments);return e===l?_:e},_.clickDistance=function(e){return arguments.length?(h=(e=+e)*e,_):Math.sqrt(h)},_.tapDistance=function(e){return arguments.length?(g=+e,_):g},_}function nc(e){return typeof e==`string`}function rc(e){return e!==`undefined`}let ic=e=>typeof e==`object`&&!!e;function ac(e){return typeof Element<`u`&&e instanceof Element}let Q=e=>Number.isFinite(e);function oc(e){return nc(e)||Q(e)}function sc(e){return typeof e==`function`}function cc(e,t,n){return`translate(${e}, ${t}) scale(${n??1})`}function lc(e){return e?e instanceof SVGSVGElement?e:e.closest(`svg`):null}function uc(){}function dc(e,t){if(t)for(let n of Object.keys(t)){let r=t[n];if(!rc(r))continue;let i=e[n];if(!sc(i))continue;let a=Array.isArray(r)?r:[r];i.apply(e,a)}}let fc={length:30,angle:-90,margin:0};function pc({length:e=fc.length,angle:t=fc.angle,margin:n=fc.margin}={}){let r=n+e,i=[n,0],a=[r,0],o=t*Math.PI/180,s=Math.cos(o)*r,c=Math.sin(o)*r;return{lineTransform:`rotate(${t})`,lineCoordinates:[i,a],contentTransform:cc(s,c)}}function mc(e,t=`id`,n){let r=e[t];if(oc(r))return r;let i=e.properties?.[t];return oc(i)?i:n}function hc(e,t){let n=Me();return dc(n,t),e.path(n())}function gc(e){return e.path({type:`Sphere`})}function _c(e,{coordinates:t,curve:n=Cn,custom:r=!1,cartesian:i=!1,midpoint:a}){if(!i&&!r)return!e||t.length<2?void 0:e.path({type:`LineString`,coordinates:t})??void 0;let o=i?t:vc(e,t);return a&&(a[0]!==0||a[1]!==0)?xc(o,n,a):yc(o,n)}function vc(e,t){return!e||t.length<2?[]:t.map(t=>e.projection(t)).filter(e=>e!=null)}function yc(e,t){if(e.length<2)return;let n=bn();return t&&n.curve(t),n(e)??void 0}function bc(e,t=[0,0]){let[[n,r],[i,a]]=e,[o,s]=t,c=(n+i)/2,l=(r+a)/2,u=i-n,d=a-r,f=Math.hypot(u,d);if(f===0)return[c,l];let p=u/f,m=d/f,h=m,g=-p,_=o/100,v=s/100;return[c+p*f*_+h*f*v,l+m*f*_+g*f*v]}function xc(e,t,n){if(!(e.length<2))return yc(e.flatMap((t,r)=>r===0?[t]:[bc([e[r-1],t],n),t]),t)}function Sc({width:e,height:t,config:n={},projection:r}){let i=r(),{fitExtent:a,fitSize:o,fitWidth:s,fitHeight:c}=n;return a||o||s||c||i.fitExtent([[1,1],[e-1,t-1]],{type:`Sphere`}),dc(i,{precision:.2,...n}),i}function Cc(e,t){let n;if(Ec(e)){let t=Dn(e,Dc(e));n=t.type===`FeatureCollection`?t:{type:`FeatureCollection`,features:[t]}}else n=e;return t?t(n.features):n.features}function wc(e){if(Ec(e))return jn(e,Dc(e))}function Tc({width:e=600,height:t,aspectRatio:n=2/1,data:r,dataTransformer:i,projection:a=rn,projectionConfig:o}){let s=Cc(r,i),c=t||e/n,l=Sc({width:e,height:c,projection:a,config:o}),u=Lt().projection(l),d=wc(r);return{width:e,height:c,projection:l,features:s,path:u,renderMesh:()=>d?u(d):null}}function Ec(e){return e?.type===`Topology`}function Dc(e){let t=Object.keys(e.objects)[0];return e.objects[t]}function Oc(e,t){return t?.[e]??t?.default}function kc(e,t=!1){let n=`default`,r=!1,i=!1,a=!1,o=null,s=uc,c=()=>a?`active`:i?`focus`:r?`hover`:`default`,l=t=>n===t?n:(n=t,e?.(n),n),u=()=>l(c()),d=()=>{a=!1,o=null,s(),s=uc},f=()=>{t&&(s(),s=Nc(`mouseup`,()=>(r=Mc(o),d(),u())))};return{onMouseenter:()=>(r=!0,u()),onMouseleave:()=>(r=!1,d(),u()),onMousedown:e=>(a=!0,o=jc(e),f(),u()),onMouseup:()=>(d(),u()),onFocus:()=>(i=!0,u()),onBlur:()=>(i=!1,d(),u()),dispose:()=>d()}}function Ac(e){return ac(e)?e:!ic(e)||!(`currentTarget`in e)?null:ac(e.currentTarget)?e.currentTarget:null}function jc(e){return Ac(e)??e??null}function Mc(e){let t=Ac(e);if(!ac(t))return!1;try{return t.matches(`:hover`)}catch{return!1}}function Nc(e,t){return typeof window>`u`?uc:(window.addEventListener(e,t,!0),()=>{window.removeEventListener(e,t,!0)})}function Pc(e,t){let n=e?.projection(t);if(n)return cc(...n)}let Fc={zoom:1,minZoom:1,maxZoom:8};function Ic(e,t={}){let n=tc();return dc(n,{scaleExtent:[[t.minZoom??Fc.minZoom,t.maxZoom??Fc.maxZoom]],translateExtent:[[[0,0],[e?.width??0,e?.height??0]]],...t.config}),t.onZoomStart&&n.on(`start`,t.onZoomStart),t.onZoom&&n.on(`zoom`,t.onZoom),t.onZoomEnd&&n.on(`end`,t.onZoomEnd),n}function Lc(e){qc(e.element,t=>{Gc(t,e)})}function Rc(e,t){!e||!t||e.setAttribute(`transform`,t.toString())}function zc(e){qc(e.element,t=>{t.call(e.behavior)})}function Bc(e,t,n={}){let{path:r,width:i,height:a}=e,o=n.minZoom??Fc.minZoom,s=n.maxZoom??Fc.maxZoom,c=n.padding??.1,[[l,u],[d,f]]=r.bounds(t),p=d-l,m=f-u;if(!(!Number.isFinite(p)||!Number.isFinite(m)||p<=0||m<=0))return{center:[(l+d)/2,(u+f)/2],zoom:Math.min(s,Math.max(o,(1-c)/Math.max(p/i,m/a)))}}function Vc(e,t){return t.invert([e.width/2,e.height/2])}function Hc(e){return Q(e)?e:Wc(e)?e.k:e?.transform?.k??1}function Uc(e,t=1){let n=Hc(e);return!Q(n)||n===0?t:1/n}function Wc(e){return!!(e&&Q(e.k)&&Q(e.x)&&Q(e.y))}function Gc(e,t){let n=Kc(e,t.transition);if(!t.center){n.call(t.behavior.scaleTo,t.zoom??Fc.zoom);return}let r=t.zoom??Fc.zoom,i=Jc(e,t.behavior),a=Yc(t.behavior,Gs.translate((i[0][0]+i[1][0])/2,(i[0][1]+i[1][1])/2).scale(r).translate(-t.center[0],-t.center[1]),i);n.call(t.behavior.transform,a)}function Kc(e,t){if(!t)return e;let n=e.transition();return Q(t.duration)&&n.duration(t.duration),Q(t.delay)&&n.delay(t.delay),t.ease&&n.ease(t.ease),n}function qc(e,t){let n=lc(e);if(n)return t(H(n))}function Jc(e,t){let n=e.node();return n?t.extent().call(n,e.datum()):[[0,0],[0,0]]}function Yc(e,t,n){return e.constrain()(t,n,e.translateExtent())}let Xc=Symbol(`MapContext`);function $(){let e=(0,t.inject)(Xc);if(!e)throw Error(`useMapContext must be used inside Map`);return e}let Zc=Symbol(`MapZoom`);function Qc(e,n,r){let i=$(),a=(0,t.computed)(()=>n.center?.[0]),o=(0,t.computed)(()=>n.center?.[1]),s=(0,t.computed)(()=>Ic(i.value,{minZoom:n.minZoom,maxZoom:n.maxZoom,config:n.config,onZoomStart:e=>r.onZoomStart?.(e),onZoom:t=>{Rc(e.value,t.transform),r.onZoom?.(t)},onZoomEnd:e=>r.onZoomEnd?.(e)})),c={center:(0,t.computed)(()=>n.center),zoom:(0,t.computed)(()=>n.zoom),minZoom:(0,t.computed)(()=>n.minZoom),maxZoom:(0,t.computed)(()=>n.maxZoom),zoomToObject:(e,t)=>{let r=Bc(i.value,e,{minZoom:n.minZoom,maxZoom:n.maxZoom});r&&t(r)}};(0,t.provide)(Zc,c);let l,u;return(0,t.onMounted)(()=>{l=(0,t.watch)(s,t=>{e.value&&zc({element:e.value,behavior:t})},{immediate:!0}),u=(0,t.watch)([a,o,()=>n.zoom,()=>n.transition,s],()=>{e.value&&Lc({element:e.value,behavior:s.value,center:n.center,zoom:n.zoom,transition:n.transition})},{immediate:!0})}),(0,t.onUnmounted)(()=>{l?.(),u?.()}),{zoomBehavior:s,zoomContext:c}}function $c(){let e=(0,t.inject)(Zc,void 0),n=(0,t.inject)(Xc,void 0);if(e)return{...e,zoomToObject:(t,r)=>{if(!n?.value)return;let i=Bc(n.value,t,{minZoom:e.minZoom.value,maxZoom:e.maxZoom.value});i&&r(i)}}}function el(e){let n=(0,t.ref)(`default`),{onMouseenter:r,onMouseleave:i,onMouseup:a,onMousedown:o,onFocus:s,onBlur:c,dispose:l}=kc(e=>{n.value=e},!!$c());return(0,t.onBeforeUnmount)(()=>{l()}),{style:(0,t.computed)(()=>Oc(n.value,(0,t.unref)(e))),onMouseenter:r,onMouseleave:i,onMousedown:o,onMouseup:a,onFocus:s,onBlur:c}}let tl=[`d`,`fill`];var nl=(0,t.defineComponent)({inheritAttrs:!1,__name:`MapLine`,props:{styles:{},coordinates:{},cartesian:{type:Boolean,default:!1},custom:{type:Boolean,default:!1},curve:{},midpoint:{}},setup(e){let n=e,r=(0,t.useAttrs)(),i=$(),a=(0,t.computed)(()=>_c(i.value,{coordinates:n.coordinates,custom:n.custom,curve:n.curve,cartesian:n.cartesian,midpoint:n.midpoint})),o=(0,t.computed)(()=>r.name??`line`),s=(0,t.computed)(()=>r.fill??`none`),{style:c,...l}=el((0,t.toRef)(n,`styles`)),u=(0,t.computed)(()=>({...r,...l,name:o.value}));return(e,n)=>((0,t.openBlock)(),(0,t.createElementBlock)(`path`,(0,t.mergeProps)(u.value,{d:a.value,fill:s.value,style:(0,t.unref)(c)}),null,16,tl))}});let rl=[`transform`,`name`];var il=(0,t.defineComponent)({__name:`MapMarker`,props:{name:{default:`marker`},coordinates:{},styles:{}},setup(e){let n=e,r=$(),i=(0,t.computed)(()=>Pc(r.value,n.coordinates)),{style:a,...o}=el((0,t.toRef)(n,`styles`));return(n,r)=>i.value?((0,t.openBlock)(),(0,t.createElementBlock)(`g`,(0,t.mergeProps)({key:0,transform:i.value,style:(0,t.unref)(a),name:e.name},o),[(0,t.renderSlot)(n.$slots,`default`)],16,rl)):(0,t.createCommentVNode)(`v-if`,!0)}});let al=[`transform`],ol=[`transform`];var sl=(0,t.defineComponent)({inheritAttrs:!1,__name:`MapAnnotation`,props:{coordinates:{},length:{},angle:{},margin:{},curve:{type:Function},midpoint:{},styles:{}},setup(e){let n=e,r=(0,t.computed)(()=>pc({length:n.length,angle:n.angle,margin:n.margin}));return(n,i)=>((0,t.openBlock)(),(0,t.createBlock)(il,{coordinates:e.coordinates,name:`annotation`},{default:(0,t.withCtx)(()=>[(0,t.createElementVNode)(`g`,{transform:r.value.lineTransform},[(0,t.createVNode)(nl,(0,t.mergeProps)(n.$attrs,{coordinates:r.value.lineCoordinates,cartesian:``,curve:e.curve,midpoint:e.midpoint,styles:e.styles,fill:`none`,name:`annotation-line`}),null,16,[`coordinates`,`curve`,`midpoint`,`styles`])],8,al),(0,t.createElementVNode)(`g`,{transform:r.value.contentTransform,name:`annotation-content`},[(0,t.renderSlot)(n.$slots,`default`)],8,ol)]),_:3},8,[`coordinates`]))}});function cl(e,n){return(0,t.computed)(()=>{let r=(0,t.unref)(n);if(r)return r;let i=(0,t.unref)(e);if(i?.data)return Tc(i)})}let ll=[`viewBox`];var ul=(0,t.defineComponent)({__name:`MapBase`,props:{width:{},height:{},aspectRatio:{},projection:{type:Function},projectionConfig:{},data:{},dataTransformer:{type:Function},context:{}},setup(e){let n=e,r=cl(n,(0,t.toRef)(n,`context`)),i=(0,t.computed)(()=>{if(!r.value)throw Error(`Map requires data or context`);return r.value});return(0,t.provide)(Xc,i),(e,n)=>((0,t.openBlock)(),(0,t.createElementBlock)(`svg`,(0,t.mergeProps)({viewBox:`0 0 ${i.value.width} ${i.value.height}`},e.$attrs,{class:`d3-map`}),[(0,t.renderSlot)(e.$slots,`default`,(0,t.normalizeProps)((0,t.guardReactiveProps)(i.value)))],16,ll))}});let dl=[`d`];var fl=(0,t.defineComponent)({__name:`MapFeature`,props:{data:{},styles:{}},setup(e){let n=e,{style:r,...i}=el((0,t.toRef)(n,`styles`)),a=$(),o=(0,t.computed)(()=>a.value.path(n.data)??void 0);return(e,n)=>((0,t.openBlock)(),(0,t.createElementBlock)(`path`,(0,t.mergeProps)({d:o.value,style:(0,t.unref)(r)},i,{name:`feature`}),null,16,dl))}});let pl={name:`features`};var ml=(0,t.defineComponent)({__name:`MapFeatures`,props:{idKey:{default:`id`},styles:{}},setup(e){let n=$(),r=(0,t.computed)(()=>n.value.features);return(n,i)=>((0,t.openBlock)(),(0,t.createElementBlock)(`g`,pl,[(0,t.renderSlot)(n.$slots,`default`,{features:r.value},()=>[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(r.value,(n,r)=>((0,t.openBlock)(),(0,t.createBlock)(fl,{key:(0,t.unref)(mc)(n,e.idKey,r),data:n,styles:e.styles},null,8,[`data`,`styles`]))),128))])]))}});let hl=[`d`,`fill`],gl=[`d`],_l=[`d`,`stroke`];var vl=(0,t.defineComponent)({inheritAttrs:!1,__name:`MapGraticule`,props:{config:{},background:{type:[Boolean,String]},border:{type:[Boolean,String]},styles:{}},setup(e){let n=e,r=$(),i=(0,t.useAttrs)(),a=(0,t.computed)(()=>hc(r.value,n.config)??void 0),o=(0,t.computed)(()=>gc(r.value)??void 0),s=(0,t.computed)(()=>nc(n.background)?n.background:void 0),c=(0,t.computed)(()=>nc(n.border)?n.border:void 0),{style:l,...u}=el((0,t.toRef)(n,`styles`));return(n,r)=>((0,t.openBlock)(),(0,t.createElementBlock)(`g`,null,[e.background?((0,t.openBlock)(),(0,t.createElementBlock)(`path`,{key:0,d:o.value,fill:s.value,"pointer-events":`none`,name:`background`},null,8,hl)):(0,t.createCommentVNode)(`v-if`,!0),(0,t.createElementVNode)(`path`,(0,t.mergeProps)({d:a.value,fill:`none`,style:(0,t.unref)(l)},(0,t.mergeProps)(u,(0,t.unref)(i)),{name:`graticule`}),null,16,gl),e.border?((0,t.openBlock)(),(0,t.createElementBlock)(`path`,{key:1,d:o.value,fill:`none`,stroke:c.value,"pointer-events":`none`,name:`border`},null,8,_l)):(0,t.createCommentVNode)(`v-if`,!0)]))}});let yl=[`d`];var bl=(0,t.defineComponent)({__name:`MapMesh`,props:{styles:{}},setup(e){let n=e,r=$(),i=(0,t.computed)(()=>r.value.renderMesh()??void 0),{style:a,...o}=el((0,t.toRef)(n,`styles`));return(e,n)=>((0,t.openBlock)(),(0,t.createElementBlock)(`path`,(0,t.mergeProps)({d:i.value,fill:`none`,style:(0,t.unref)(a)},o,{name:`mesh`}),null,16,yl))}}),xl=(0,t.defineComponent)({__name:`MapZoom`,props:{center:{},zoom:{default:1},minZoom:{default:1},maxZoom:{default:8},transition:{},config:{}},emits:[`zoomStart`,`zoom`,`zoomEnd`,`update:center`,`update:zoom`],setup(e,{expose:n,emit:r}){let i=e,a=r,o=(0,t.ref)(null),s=$();function c(e,t){return!!(t&&e[0]===t[0]&&e[1]===t[1])}let{zoomBehavior:l}=Qc(o,i,{onZoomStart:e=>a(`zoomStart`,e),onZoom:e=>{let t=Vc(s.value,e.transform),n=e.transform.k;c(t,i.center)||a(`update:center`,t),n!==i.zoom&&a(`update:zoom`,n),a(`zoom`,e)},onZoomEnd:e=>a(`zoomEnd`,e)});return n({container:o,zoomBehavior:l}),(e,n)=>((0,t.openBlock)(),(0,t.createElementBlock)(`g`,{ref_key:`container`,ref:o,name:`zoom`},[(0,t.renderSlot)(e.$slots,`default`)],512))}}),Sl=r({MapAnnotation:()=>sl,MapBase:()=>ul,MapFeature:()=>fl,MapFeatures:()=>ml,MapGraticule:()=>vl,MapLine:()=>nl,MapMarker:()=>il,MapMesh:()=>bl,MapZoom:()=>xl});e.MapAnnotation=sl,e.MapBase=ul,e.MapFeature=fl,e.MapFeatures=ml,e.MapGraticule=vl,e.MapLine=nl,e.MapMarker=il,e.MapMesh=bl,e.MapZoom=xl,e.getFeatureKey=mc,e.getInverseZoomScale=Uc,e.getObjectZoomView=Bc,e.getZoomViewportCenter=Vc,e.mapContextKey=Xc,e.mapZoomKey=Zc,e.plugin={install(e){Object.entries(Sl).forEach(([t,n])=>{e.component(t,n)})}},e.useCreateMapContext=cl,e.useCreateMapZoom=Qc,e.useMapContext=$,e.useMapObject=el,e.useMapZoom=$c})(this.D3Maps=this.D3Maps||{},Vue);
|