@vunk/form 2.18.2 → 2.19.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/components/_plugin-vue_export-helper.cjs +1 -11
- package/components/api-tables-select/index.cjs +1 -467
- package/components/api-tables-select/index.mjs +56 -413
- package/components/api-tables-select/src/ctx.d.ts +147 -173
- package/components/api-tables-select/src/index.vue.d.ts +390 -983
- package/components/button/index.cjs +1 -112
- package/components/button/index.mjs +56 -85
- package/components/button/src/ctx.d.ts +28 -113
- package/components/button/src/index.vue.d.ts +314 -621
- package/components/card-input-collection/index.cjs +1 -370
- package/components/card-input-collection/index.mjs +175 -277
- package/components/card-input-collection/src/core.vue.d.ts +57 -950
- package/components/card-input-collection/src/ctx.d.ts +19 -49
- package/components/card-input-collection/src/index.vue.d.ts +49 -112
- package/components/cascader/index.cjs +1 -150
- package/components/cascader/index.mjs +88 -116
- package/components/cascader/src/ctx.d.ts +148 -207
- package/components/cascader/src/index.vue.d.ts +335 -525
- package/components/cascader/src/use.d.ts +1 -1
- package/components/checkbox/index.cjs +1 -152
- package/components/checkbox/index.mjs +75 -119
- package/components/checkbox/src/ctx.d.ts +46 -69
- package/components/checkbox/src/index.vue.d.ts +445 -1012
- package/components/cloneDeep.cjs +1 -2106
- package/components/color-picker/index.cjs +1 -80
- package/components/color-picker/index.mjs +46 -69
- package/components/color-picker/src/ctx.d.ts +138 -107
- package/components/color-picker/src/index.vue.d.ts +305 -255
- package/components/date-picker/index.cjs +1 -119
- package/components/date-picker/index.mjs +63 -97
- package/components/date-picker/src/ctx.d.ts +131 -206
- package/components/date-picker/src/index.vue.d.ts +287 -1359
- package/components/date-picker/src/types.d.ts +7 -7
- package/components/date-picker-range/index.cjs +1 -177
- package/components/date-picker-range/index.mjs +62 -113
- package/components/date-picker-range/src/ctx.d.ts +139 -207
- package/components/date-picker-range/src/index.vue.d.ts +896 -450
- package/components/debounce.cjs +1 -0
- package/components/dialog/index.cjs +1 -126
- package/components/dialog/index.mjs +65 -99
- package/components/dialog/src/ctx.d.ts +17 -108
- package/components/dialog/src/index.vue.d.ts +77 -1070
- package/components/dialog-input-collection/index.cjs +1 -624
- package/components/dialog-input-collection/index.mjs +276 -498
- package/components/dialog-input-collection/src/ctx.d.ts +20 -50
- package/components/dialog-input-collection/src/dialog-form.vue.d.ts +28 -6366
- package/components/dialog-input-collection/src/index.vue.d.ts +66 -7629
- package/components/dialog-input-collection/src/layout.vue.d.ts +16 -72
- package/components/download-plus/index.cjs +1 -456
- package/components/download-plus/index.mjs +214 -358
- package/components/download-plus/src/ctx.d.ts +20 -50
- package/components/download-plus/src/index.vue.d.ts +434 -1171
- package/components/editable-text/index.cjs +1 -295
- package/components/editable-text/index.mjs +113 -239
- package/components/editable-text/src/ctx.d.ts +20 -50
- package/components/editable-text/src/index.vue.d.ts +62 -3257
- package/components/el-slider/index.cjs +1 -0
- package/components/el-slider/index.d.ts +5 -0
- package/components/el-slider/index.mjs +475 -0
- package/components/el-slider/src/button.d.ts +36 -0
- package/components/el-slider/src/button.vue.d.ts +42 -0
- package/components/el-slider/src/composables/index.cjs +1 -0
- package/components/el-slider/src/composables/index.d.ts +6 -0
- package/components/el-slider/src/composables/index.mjs +9 -0
- package/components/el-slider/src/composables/use-lifecycle.d.ts +4 -0
- package/components/el-slider/src/composables/use-marks.d.ts +7 -0
- package/components/el-slider/src/composables/use-slide.d.ts +23 -0
- package/components/el-slider/src/composables/use-slider-button.d.ts +18 -0
- package/components/el-slider/src/composables/use-stops.d.ts +8 -0
- package/components/el-slider/src/composables/use-watch.d.ts +4 -0
- package/components/el-slider/src/constants.d.ts +14 -0
- package/components/el-slider/src/marker.d.ts +37 -0
- package/components/el-slider/src/slider-core.vue.d.ts +219 -0
- package/components/el-slider/src/slider.d.ts +175 -0
- package/components/esri-input-geojson/index.cjs +2 -1604
- package/components/esri-input-geojson/index.mjs +666 -1289
- package/components/esri-input-geojson/src/append.vue.d.ts +225 -1084
- package/components/esri-input-geojson/src/const.d.ts +1 -1
- package/components/esri-input-geojson/src/ctx.d.ts +62 -158
- package/components/esri-input-geojson/src/default-view.vue.d.ts +12 -132
- package/components/esri-input-geojson/src/index.vue.d.ts +1470 -789
- package/components/esri-input-geojson/src/viewer.vue.d.ts +424 -287
- package/components/fieldset/index.cjs +1 -110
- package/components/fieldset/index.mjs +62 -77
- package/components/fieldset/src/ctx.d.ts +4 -4
- package/components/fieldset/src/index.vue.d.ts +10 -9
- package/components/form/index.cjs +1 -248
- package/components/form/index.mjs +107 -161
- package/components/form/src/ctx.d.ts +15 -64
- package/components/form/src/index.vue.d.ts +360 -2416
- package/components/form-item/index.cjs +1 -294
- package/components/form-item/index.mjs +139 -229
- package/components/form-item/src/core.vue.d.ts +33 -1853
- package/components/form-item/src/ctx.d.ts +17 -47
- package/components/form-item/src/index.vue.d.ts +41 -103
- package/components/form-item-renderer/index.cjs +1 -193
- package/components/form-item-renderer/index.mjs +102 -162
- package/components/form-item-renderer/src/core.vue.d.ts +12 -11
- package/components/form-item-renderer/src/ctx.d.ts +3 -3
- package/components/form-item-renderer/src/index.vue.d.ts +25 -73
- package/components/form-item-renderer-template/index.cjs +1 -47
- package/components/form-item-renderer-template/index.mjs +19 -33
- package/components/form-item-renderer-template/src/index.vue.d.ts +4 -3
- package/components/forms-provider/index.cjs +1 -99
- package/components/forms-provider/index.mjs +44 -73
- package/components/forms-provider/src/core.d.ts +3 -2
- package/components/forms-provider/src/index.vue.d.ts +5 -2
- package/components/forms-provider/src/segment.vue.d.ts +12 -8
- package/components/forms-provider/src/view.vue.d.ts +17 -3
- package/components/index.cjs +1 -399
- package/components/index2.cjs +1 -17
- package/components/information/index.cjs +1 -65
- package/components/information/index.mjs +28 -38
- package/components/information/src/ctx.d.ts +2 -2
- package/components/information/src/index.vue.d.ts +7 -6
- package/components/information-collection/index.cjs +1 -81
- package/components/information-collection/index.mjs +44 -48
- package/components/information-collection/src/ctx.d.ts +20 -50
- package/components/information-collection/src/index.vue.d.ts +49 -112
- package/components/information-renderer/index.cjs +1 -16
- package/components/information-renderer/index.mjs +9 -10
- package/components/information-tag/index.cjs +1 -101
- package/components/information-tag/index.mjs +44 -54
- package/components/information-tag/src/ctx.d.ts +5 -19
- package/components/information-tag/src/index.vue.d.ts +24 -51
- package/components/information-templates-default/index.cjs +1 -101
- package/components/information-templates-default/index.mjs +63 -73
- package/components/information-templates-default/src/index.vue.d.ts +2 -1
- package/components/input/index.cjs +1 -115
- package/components/input/index.mjs +60 -83
- package/components/input/src/ctx.d.ts +50 -151
- package/components/input/src/index.vue.d.ts +389 -947
- package/components/input-array/index.cjs +1 -310
- package/components/input-array/index.mjs +114 -244
- package/components/input-array/src/ctx.d.ts +19 -49
- package/components/input-array/src/form-template.vue.d.ts +2 -901
- package/components/input-array/src/index.vue.d.ts +45 -731
- package/components/input-collection/index.cjs +1 -452
- package/components/input-collection/index.mjs +195 -355
- package/components/input-collection/src/core.vue.d.ts +59 -1019
- package/components/input-collection/src/ctx.d.ts +19 -49
- package/components/input-collection/src/index.vue.d.ts +47 -110
- package/components/input-file/index.cjs +1 -142
- package/components/input-file/index.mjs +68 -100
- package/components/input-file/src/ctx.d.ts +8 -29
- package/components/input-file/src/index.vue.d.ts +447 -76
- package/components/input-file/src/template.vue.d.ts +2 -124
- package/components/input-link/index.cjs +1 -167
- package/components/input-link/index.mjs +60 -83
- package/components/input-link/src/ctx.d.ts +48 -135
- package/components/input-link/src/index.vue.d.ts +835 -312
- package/components/input-number/index.cjs +1 -119
- package/components/input-number/index.mjs +73 -87
- package/components/input-number/src/ctx.d.ts +38 -131
- package/components/input-number/src/index.vue.d.ts +321 -682
- package/components/input-tag/index.cjs +1 -100
- package/components/input-tag/index.mjs +51 -78
- package/components/input-tag/src/ctx.d.ts +41 -143
- package/components/input-tag/src/index.vue.d.ts +322 -775
- package/components/isObject.cjs +1 -165
- package/components/monaco-editor/index.cjs +1 -83
- package/components/monaco-editor/index.mjs +40 -59
- package/components/monaco-editor/src/ctx.d.ts +19 -44
- package/components/monaco-editor/src/index.vue.d.ts +212 -111
- package/components/radio/index.cjs +1 -267
- package/components/radio/index.mjs +110 -209
- package/components/radio/src/ctx.d.ts +27 -91
- package/components/radio/src/index.vue.d.ts +299 -1279
- package/components/radio/src/option.vue.d.ts +28 -878
- package/components/radio/src/wraper.vue.d.ts +67 -198
- package/components/renderer-data/index.cjs +1 -41
- package/components/renderer-data/index.mjs +19 -26
- package/components/renderer-data/src/ctx.d.ts +1 -1
- package/components/renderer-data/src/index.vue.d.ts +5 -4
- package/components/select/index.cjs +1 -311
- package/components/select/index.mjs +156 -214
- package/components/select/src/core.vue.d.ts +446 -1028
- package/components/select/src/ctx.d.ts +60 -215
- package/components/select/src/index.vue.d.ts +318 -593
- package/components/select/src/options.vue.d.ts +4 -3
- package/components/slider/index.cjs +1 -88
- package/components/slider/index.mjs +41 -70
- package/components/slider/src/ctx.d.ts +63 -174
- package/components/slider/src/index.vue.d.ts +154 -419
- package/components/style.css +1 -0
- package/components/switch/index.cjs +1 -88
- package/components/switch/index.mjs +37 -69
- package/components/switch/src/ctx.d.ts +30 -109
- package/components/switch/src/index.vue.d.ts +90 -697
- package/components/switch/src/types.d.ts +2 -2
- package/components/tables-select/index.cjs +1 -263
- package/components/tables-select/index.mjs +101 -172
- package/components/tables-select/src/ctx.d.ts +68 -99
- package/components/tables-select/src/index.vue.d.ts +233 -4988
- package/components/template-instances-provider/index.cjs +1 -31
- package/components/template-instances-provider/index.mjs +18 -22
- package/components/template-instances-provider/src/index.vue.d.ts +5 -4
- package/components/templates-default/index.cjs +1 -235
- package/components/templates-default/index.mjs +152 -211
- package/components/templates-default/src/ctx.d.ts +2 -2
- package/components/templates-default/src/index.vue.d.ts +7337 -145
- package/components/templates-element-plus/index.cjs +1 -112
- package/components/templates-element-plus/index.mjs +49 -91
- package/components/templates-element-plus/src/ctx.d.ts +1 -1
- package/components/templates-element-plus/src/index.vue.d.ts +59 -251
- package/components/templates-esri/index.cjs +1 -65
- package/components/templates-esri/index.mjs +29 -39
- package/components/templates-esri/src/ctx.d.ts +1 -1
- package/components/templates-esri/src/index.vue.d.ts +2184 -25
- package/components/templates-layout/index.cjs +1 -137
- package/components/templates-layout/index.mjs +78 -116
- package/components/templates-layout/src/ctx.d.ts +1 -1
- package/components/templates-layout/src/index.vue.d.ts +73 -404
- package/components/templates-variant/index.cjs +1 -70
- package/components/templates-variant/index.mjs +33 -43
- package/components/templates-variant/src/ctx.d.ts +1 -1
- package/components/templates-variant/src/index.vue.d.ts +1272 -25
- package/components/time-picker/index.cjs +1 -104
- package/components/time-picker/index.mjs +57 -87
- package/components/time-picker/src/ctx.d.ts +130 -212
- package/components/time-picker/src/index.vue.d.ts +283 -1371
- package/components/upload/index.cjs +1 -663
- package/components/upload/index.mjs +343 -537
- package/components/upload/src/ctx.d.ts +106 -191
- package/components/upload/src/file.vue.d.ts +168 -745
- package/components/upload/src/index.vue.d.ts +647 -1888
- package/components/upload/src/types.d.ts +1 -1
- package/components/upload/src/wraper.vue.d.ts +233 -407
- package/components/upload-plus/index.cjs +21 -18673
- package/components/upload-plus/index.mjs +4566 -18366
- package/components/upload-plus/src/api.d.ts +1 -1
- package/components/upload-plus/src/ctx.d.ts +21 -51
- package/components/upload-plus/src/index.vue.d.ts +53 -1657
- package/components/use-watch.cjs +1 -0
- package/components/van-cascader/index.cjs +1 -125
- package/components/van-cascader/index.mjs +51 -96
- package/components/van-cascader/src/ctx.d.ts +143 -203
- package/components/van-cascader/src/index.vue.d.ts +332 -988
- package/components/var-datetime-picker/index.cjs +1 -333
- package/components/var-datetime-picker/index.mjs +173 -254
- package/components/var-datetime-picker/src/ctx.d.ts +18 -48
- package/components/var-datetime-picker/src/index.vue.d.ts +628 -1090
- package/components/vditor/index.cjs +1 -86
- package/components/vditor/index.mjs +40 -66
- package/components/vditor/src/ctx.d.ts +15 -45
- package/components/vditor/src/index.vue.d.ts +195 -120
- package/composables/element-plus/index.cjs +1 -23
- package/composables/element-plus/index.mjs +14 -18
- package/composables/index.cjs +1 -161
- package/composables/index.d.ts +1 -0
- package/composables/index.mjs +100 -135
- package/composables/useForm.d.ts +2 -2
- package/composables/useRtl.d.ts +18 -0
- package/composables/useTemplateInstances.d.ts +3 -3
- package/index.css +1 -562
- package/index.d.ts +0 -3
- package/index.esm.js +23 -48
- package/locale/index.cjs +1 -102
- package/locale/index.mjs +34 -34
- package/locale/lang/index.cjs +1 -2
- package/locale/lang/index.d.ts +1 -0
- package/package.json +14 -85
- package/shared/const/index.cjs +1 -59
- package/shared/const/index.d.ts +1 -1
- package/shared/const/index.mjs +18 -20
- package/shared/element-plus/ctx.d.ts +40 -37
- package/shared/element-plus/index.cjs +1 -211
- package/shared/element-plus/index.mjs +93 -161
- package/shared/element-plus/instances.d.ts +224 -321
- package/shared/form/index.cjs +1 -33
- package/shared/form/index.mjs +23 -25
- package/shared/helper/index.cjs +1 -11
- package/shared/helper/index.mjs +7 -8
- package/shared/index.cjs +1 -8
- package/shared/index.mjs +5 -1
- package/shared/infer-prop/index.cjs +1 -36
- package/shared/infer-prop/index.mjs +22 -28
- package/shared/progress-it/index.cjs +1 -42
- package/shared/progress-it/index.mjs +15 -31
- package/shared/rules/index.cjs +1 -56
- package/shared/rules/index.mjs +19 -18
- package/shared/types/form/index.cjs +1 -2
- package/shared/types/index.cjs +1 -2
- package/shared/types/source/index.cjs +1 -2
- package/shared/types/source-manager/index.cjs +1 -2
- package/shared/upload/index.cjs +1 -774
- package/shared/upload/index.mjs +180 -764
- package/component.d.ts +0 -3
- package/components/_plugin-vue_export-helper.mjs +0 -9
- package/components/card-input-collection/index.css +0 -21
- package/components/cascader/index.css +0 -9
- package/components/checkbox/index.css +0 -30
- package/components/cloneDeep.mjs +0 -2104
- package/components/date-picker-range/index.css +0 -18
- package/components/dialog-input-collection/index.css +0 -21
- package/components/download-plus/index.css +0 -68
- package/components/editable-text/index.css +0 -9
- package/components/esri-input-geojson/index.css +0 -32
- package/components/fieldset/index.css +0 -5
- package/components/form-item/index.css +0 -35
- package/components/index.mjs +0 -378
- package/components/index2.mjs +0 -14
- package/components/information-tag/index.css +0 -6
- package/components/information-templates-default/index.css +0 -16
- package/components/input-array/index.css +0 -14
- package/components/input-collection/index.css +0 -20
- package/components/input-link/index.css +0 -4
- package/components/input-number/index.css +0 -13
- package/components/isObject.mjs +0 -158
- package/components/monaco-editor/index.css +0 -4
- package/components/radio/index.css +0 -40
- package/components/select/index.css +0 -15
- package/components/switch/index.css +0 -10
- package/components/tables-select/index.css +0 -3
- package/components/templates-layout/index.css +0 -3
- package/components/upload/index.css +0 -34
- package/components/upload-plus/index.css +0 -84
- package/components/van-cascader/index.css +0 -6
- package/components/var-datetime-picker/index.css +0 -17
- package/defaults.d.ts +0 -5
|
@@ -1,52 +1,39 @@
|
|
|
1
|
-
import { defineComponent, resolveComponent, openBlock, createBlock, withCtx, createVNode, createCommentVNode, renderSlot, provide, resolveDynamicComponent, normalizeProps, mergeProps, ref, shallowRef, computed, watch, onMounted, nextTick, createElementBlock, toHandlers, withDirectives, createElementVNode, vShow } from
|
|
2
|
-
import { _VkfInputCtx, VkfInput } from
|
|
3
|
-
import { bindPropsFactory, onEmitsFactory } from
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { _ as
|
|
7
|
-
import { VaTdtBasemap,
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import { VkAsyncTeleport } from
|
|
11
|
-
import
|
|
12
|
-
import { useComputedReadonly } from
|
|
13
|
-
import { useLocale } from
|
|
14
|
-
import { Deferred } from
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
EDIT_TYPE2["POINT"] = "point";
|
|
18
|
-
EDIT_TYPE2["POLYGON"] = "polygon";
|
|
19
|
-
EDIT_TYPE2["LINE_STRING"] = "line_string";
|
|
20
|
-
return EDIT_TYPE2;
|
|
21
|
-
})(EDIT_TYPE || {});
|
|
22
|
-
const EDIT_TYPE_OPTIONS = [
|
|
1
|
+
import { defineComponent as F, resolveComponent as h, openBlock as w, createBlock as _, withCtx as v, createVNode as y, createCommentVNode as O, unref as te, renderSlot as A, provide as G, resolveDynamicComponent as Te, normalizeProps as Re, mergeProps as fe, ref as N, shallowRef as k, computed as ne, watch as oe, onMounted as Fe, nextTick as Le, createElementBlock as $e, toHandlers as Be, withDirectives as Ue, createElementVNode as re, vShow as Ge } from "vue";
|
|
2
|
+
import { _VkfInputCtx as T, VkfInput as Ne } from "@vunk/form/components/input";
|
|
3
|
+
import { bindPropsFactory as De, onEmitsFactory as Je } from "@vunk/core/shared/utils-vue";
|
|
4
|
+
import { ElUpload as qe, ElButtonGroup as ze, ElIcon as Ze, ElButton as He, ElMessage as ae } from "element-plus";
|
|
5
|
+
import { k as xe, e as Ye, l as Xe, n as Ke } from "../index.cjs";
|
|
6
|
+
import { _ as Y } from "../_plugin-vue_export-helper.cjs";
|
|
7
|
+
import { VaMapView as ce, VaTdtBasemap as de, VaGraphicsLayer as Qe, VaSketch as We } from "@vuesri/core";
|
|
8
|
+
import je from "@arcgis/core/views/MapView";
|
|
9
|
+
import et from "@arcgis/core/views/SceneView";
|
|
10
|
+
import { VkAsyncTeleport as tt } from "@vunk/core";
|
|
11
|
+
import nt from "@arcgis/core/Graphic";
|
|
12
|
+
import { useComputedReadonly as ot } from "@vunk/form/composables";
|
|
13
|
+
import { useLocale as rt } from "@vunk/form/composables/element-plus";
|
|
14
|
+
import { Deferred as at } from "@vunk/core/shared/utils-promise";
|
|
15
|
+
var lt = /* @__PURE__ */ ((e) => (e.POINT = "point", e.POLYGON = "polygon", e.LINE_STRING = "line_string", e))(lt || {});
|
|
16
|
+
const it = [
|
|
23
17
|
{
|
|
24
|
-
label: "
|
|
25
|
-
value: "point"
|
|
18
|
+
label: "点",
|
|
19
|
+
value: "point",
|
|
26
20
|
availableCreatureTools: ["point"]
|
|
27
21
|
},
|
|
28
22
|
{
|
|
29
|
-
label: "
|
|
30
|
-
value: "line_string"
|
|
23
|
+
label: "线",
|
|
24
|
+
value: "line_string",
|
|
31
25
|
availableCreatureTools: ["polyline"]
|
|
32
26
|
},
|
|
33
27
|
{
|
|
34
|
-
label: "
|
|
35
|
-
value: "polygon"
|
|
28
|
+
label: "面",
|
|
29
|
+
value: "polygon",
|
|
36
30
|
availableCreatureTools: ["polygon", "circle", "rectangle"]
|
|
37
31
|
}
|
|
38
|
-
]
|
|
39
|
-
const EDIT_TYPE_REFLECT = EDIT_TYPE_OPTIONS.reduce((acc, cur) => {
|
|
40
|
-
acc[cur.value] = cur;
|
|
41
|
-
return acc;
|
|
42
|
-
}, {});
|
|
43
|
-
const EMPTY_FEATURE_COLLECTION = {
|
|
32
|
+
], le = it.reduce((e, t) => (e[t.value] = t, e), {}), ut = {
|
|
44
33
|
type: "FeatureCollection",
|
|
45
34
|
features: []
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
const props = {
|
|
49
|
-
..._VkfInputCtx.props,
|
|
35
|
+
}, X = {
|
|
36
|
+
...T.props,
|
|
50
37
|
viewComponent: null,
|
|
51
38
|
viewComponentAttrs: null,
|
|
52
39
|
readonly: {
|
|
@@ -78,27 +65,27 @@ const props = {
|
|
|
78
65
|
viewModelActivePointSymbol: null,
|
|
79
66
|
modelValue: {
|
|
80
67
|
type: Object,
|
|
81
|
-
default: () =>
|
|
68
|
+
default: () => ut
|
|
82
69
|
},
|
|
83
70
|
multiple: {
|
|
84
71
|
type: Boolean,
|
|
85
|
-
default:
|
|
72
|
+
default: !0
|
|
86
73
|
},
|
|
87
74
|
skipSave: {
|
|
88
75
|
type: Boolean,
|
|
89
|
-
default:
|
|
76
|
+
default: !1
|
|
90
77
|
},
|
|
91
78
|
showMap: {
|
|
92
79
|
type: Boolean,
|
|
93
|
-
default:
|
|
80
|
+
default: !1
|
|
94
81
|
},
|
|
95
82
|
dialogEdit: {
|
|
96
83
|
type: Boolean,
|
|
97
|
-
default:
|
|
84
|
+
default: !0
|
|
98
85
|
},
|
|
99
86
|
dialogEditFullscreen: {
|
|
100
87
|
type: Boolean,
|
|
101
|
-
default:
|
|
88
|
+
default: !0
|
|
102
89
|
},
|
|
103
90
|
dialogEditTitle: {
|
|
104
91
|
type: String,
|
|
@@ -106,7 +93,7 @@ const props = {
|
|
|
106
93
|
},
|
|
107
94
|
flying: {
|
|
108
95
|
type: Boolean,
|
|
109
|
-
default:
|
|
96
|
+
default: !1
|
|
110
97
|
},
|
|
111
98
|
layerIndex: {
|
|
112
99
|
type: Number,
|
|
@@ -116,44 +103,37 @@ const props = {
|
|
|
116
103
|
type: Object,
|
|
117
104
|
default: void 0
|
|
118
105
|
}
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
const emits = {
|
|
122
|
-
..._VkfInputCtx.emits,
|
|
106
|
+
}, st = De(X), K = {
|
|
107
|
+
...T.emits,
|
|
123
108
|
"update:modelValue": (e) => e,
|
|
124
109
|
"update:flying": null,
|
|
125
110
|
/**
|
|
126
111
|
* 点击地图定位按钮
|
|
127
112
|
*/
|
|
128
|
-
|
|
113
|
+
appendFly: null,
|
|
129
114
|
appendEdit: null
|
|
130
|
-
}
|
|
131
|
-
const createOnEmits = onEmitsFactory(emits);
|
|
132
|
-
|
|
133
|
-
var ctx = /*#__PURE__*/Object.freeze({
|
|
115
|
+
}, ft = Je(K), Cn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
134
116
|
__proto__: null,
|
|
135
|
-
createBindProps:
|
|
136
|
-
createOnEmits:
|
|
137
|
-
emits:
|
|
138
|
-
props:
|
|
139
|
-
})
|
|
140
|
-
|
|
141
|
-
var _sfc_main$3 = defineComponent({
|
|
117
|
+
createBindProps: st,
|
|
118
|
+
createOnEmits: ft,
|
|
119
|
+
emits: K,
|
|
120
|
+
props: X
|
|
121
|
+
}, Symbol.toStringTag, { value: "Module" })), ct = F({
|
|
142
122
|
components: {
|
|
143
|
-
ElButton,
|
|
144
|
-
ElIcon,
|
|
145
|
-
ElButtonGroup,
|
|
146
|
-
Upload:
|
|
147
|
-
Edit:
|
|
148
|
-
ElUpload,
|
|
149
|
-
MapLocation:
|
|
123
|
+
ElButton: He,
|
|
124
|
+
ElIcon: Ze,
|
|
125
|
+
ElButtonGroup: ze,
|
|
126
|
+
Upload: Xe,
|
|
127
|
+
Edit: Ye,
|
|
128
|
+
ElUpload: qe,
|
|
129
|
+
MapLocation: xe
|
|
150
130
|
},
|
|
151
131
|
props: {
|
|
152
132
|
disabled: Boolean,
|
|
153
133
|
dialog: Boolean,
|
|
154
134
|
upload: {
|
|
155
135
|
type: Boolean,
|
|
156
|
-
default:
|
|
136
|
+
default: !0
|
|
157
137
|
}
|
|
158
138
|
},
|
|
159
139
|
emits: {
|
|
@@ -162,120 +142,88 @@ var _sfc_main$3 = defineComponent({
|
|
|
162
142
|
fly: null
|
|
163
143
|
},
|
|
164
144
|
methods: {
|
|
165
|
-
getFile(
|
|
166
|
-
this.$emit("upload",
|
|
145
|
+
getFile(e) {
|
|
146
|
+
this.$emit("upload", e);
|
|
167
147
|
},
|
|
168
148
|
uploadClick(e) {
|
|
169
|
-
const
|
|
170
|
-
|
|
171
|
-
target.click();
|
|
149
|
+
const t = e.target.querySelector("input[type=file]");
|
|
150
|
+
t && t.click();
|
|
172
151
|
}
|
|
173
152
|
}
|
|
174
153
|
});
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
const _component_Edit = resolveComponent("Edit");
|
|
181
|
-
const _component_ElButton = resolveComponent("ElButton");
|
|
182
|
-
const _component_MapLocation = resolveComponent("MapLocation");
|
|
183
|
-
const _component_ElButtonGroup = resolveComponent("ElButtonGroup");
|
|
184
|
-
return openBlock(), createBlock(_component_ElButtonGroup, null, {
|
|
185
|
-
default: withCtx(() => [
|
|
186
|
-
_ctx.upload ? (openBlock(), createBlock(_component_ElUpload, {
|
|
154
|
+
function dt(e, t, o, n, r, a) {
|
|
155
|
+
const l = h("Upload"), i = h("ElIcon"), s = h("ElUpload"), c = h("Edit"), f = h("ElButton"), p = h("MapLocation"), m = h("ElButtonGroup");
|
|
156
|
+
return w(), _(m, null, {
|
|
157
|
+
default: v(() => [
|
|
158
|
+
e.upload ? (w(), _(s, {
|
|
187
159
|
key: 0,
|
|
188
160
|
class: "el-button el-button--default vkf-esri-input-geojson__upload",
|
|
189
161
|
action: "",
|
|
190
162
|
accept: "file",
|
|
191
|
-
multiple:
|
|
192
|
-
"show-file-list":
|
|
193
|
-
"auto-upload":
|
|
194
|
-
"on-change":
|
|
195
|
-
disabled:
|
|
196
|
-
onClick:
|
|
163
|
+
multiple: !1,
|
|
164
|
+
"show-file-list": !1,
|
|
165
|
+
"auto-upload": !1,
|
|
166
|
+
"on-change": e.getFile,
|
|
167
|
+
disabled: e.disabled,
|
|
168
|
+
onClick: e.uploadClick
|
|
197
169
|
}, {
|
|
198
|
-
default:
|
|
199
|
-
|
|
200
|
-
default:
|
|
201
|
-
|
|
170
|
+
default: v(() => [
|
|
171
|
+
y(i, { color: "var(--el-color-primary)" }, {
|
|
172
|
+
default: v(() => [
|
|
173
|
+
y(l)
|
|
202
174
|
]),
|
|
203
175
|
_: 1
|
|
204
|
-
/* STABLE */
|
|
205
176
|
})
|
|
206
177
|
]),
|
|
207
178
|
_: 1
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
_ctx.dialog ? (openBlock(), createBlock(_component_ElButton, {
|
|
179
|
+
}, 8, ["on-change", "disabled", "onClick"])) : O("", !0),
|
|
180
|
+
e.dialog ? (w(), _(f, {
|
|
211
181
|
key: 1,
|
|
212
|
-
disabled:
|
|
213
|
-
onClick:
|
|
182
|
+
disabled: e.disabled,
|
|
183
|
+
onClick: t[0] || (t[0] = (g) => e.$emit("edit"))
|
|
214
184
|
}, {
|
|
215
|
-
default:
|
|
216
|
-
|
|
217
|
-
default:
|
|
218
|
-
|
|
185
|
+
default: v(() => [
|
|
186
|
+
y(i, { color: "var(--el-color-primary)" }, {
|
|
187
|
+
default: v(() => [
|
|
188
|
+
y(c)
|
|
219
189
|
]),
|
|
220
190
|
_: 1
|
|
221
|
-
/* STABLE */
|
|
222
191
|
})
|
|
223
192
|
]),
|
|
224
193
|
_: 1
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
onClick: _cache[1] || (_cache[1] = ($event) => _ctx.$emit("fly"))
|
|
194
|
+
}, 8, ["disabled"])) : O("", !0),
|
|
195
|
+
y(f, {
|
|
196
|
+
onClick: t[1] || (t[1] = (g) => e.$emit("fly"))
|
|
229
197
|
}, {
|
|
230
|
-
default:
|
|
231
|
-
|
|
232
|
-
default:
|
|
233
|
-
|
|
198
|
+
default: v(() => [
|
|
199
|
+
y(i, { color: "var(--el-color-primary)" }, {
|
|
200
|
+
default: v(() => [
|
|
201
|
+
y(p)
|
|
234
202
|
]),
|
|
235
203
|
_: 1
|
|
236
|
-
/* STABLE */
|
|
237
204
|
})
|
|
238
205
|
]),
|
|
239
206
|
_: 1
|
|
240
|
-
/* STABLE */
|
|
241
207
|
})
|
|
242
208
|
]),
|
|
243
209
|
_: 1
|
|
244
|
-
/* STABLE */
|
|
245
210
|
});
|
|
246
211
|
}
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
var _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
212
|
+
const pt = /* @__PURE__ */ Y(ct, [["render", dt]]), vt = /* @__PURE__ */ F({
|
|
250
213
|
__name: "default-view",
|
|
251
|
-
setup(
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
return __returned__;
|
|
214
|
+
setup(e) {
|
|
215
|
+
return (t, o) => (w(), _(te(ce), null, {
|
|
216
|
+
default: v(() => [
|
|
217
|
+
y(te(de)),
|
|
218
|
+
A(t.$slots, "default")
|
|
219
|
+
]),
|
|
220
|
+
_: 3
|
|
221
|
+
}));
|
|
260
222
|
}
|
|
261
|
-
})
|
|
262
|
-
|
|
263
|
-
function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
|
|
264
|
-
return openBlock(), createBlock($setup["VaMapView"], null, {
|
|
265
|
-
default: withCtx(() => [
|
|
266
|
-
createVNode($setup["VaTdtBasemap"]),
|
|
267
|
-
renderSlot(_ctx.$slots, "default")
|
|
268
|
-
]),
|
|
269
|
-
_: 3
|
|
270
|
-
/* FORWARDED */
|
|
271
|
-
});
|
|
272
|
-
}
|
|
273
|
-
var DefaultView = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["render", _sfc_render$2], ["__file", "/home/runner/work/private-vunk-form/private-vunk-form/packages/components/esri-input-geojson/src/default-view.vue"]]);
|
|
274
|
-
|
|
275
|
-
var _sfc_main$1 = defineComponent({
|
|
223
|
+
}), yt = F({
|
|
276
224
|
components: {
|
|
277
|
-
VaTdtBasemap,
|
|
278
|
-
VaMapView
|
|
225
|
+
VaTdtBasemap: de,
|
|
226
|
+
VaMapView: ce
|
|
279
227
|
},
|
|
280
228
|
props: {
|
|
281
229
|
view: {
|
|
@@ -284,1313 +232,742 @@ var _sfc_main$1 = defineComponent({
|
|
|
284
232
|
},
|
|
285
233
|
viewComponent: {
|
|
286
234
|
type: [Object, Function],
|
|
287
|
-
default: () =>
|
|
235
|
+
default: () => vt
|
|
288
236
|
},
|
|
289
237
|
viewComponentAttrs: {
|
|
290
238
|
type: Object,
|
|
291
239
|
default: () => ({})
|
|
292
240
|
}
|
|
293
241
|
},
|
|
294
|
-
setup(
|
|
295
|
-
|
|
296
|
-
provide("vaView", props.view);
|
|
297
|
-
if (props.view instanceof MapView) {
|
|
298
|
-
provide("vaMapView", props.view);
|
|
299
|
-
}
|
|
300
|
-
if (props.view instanceof SceneView) {
|
|
301
|
-
provide("vaSceneView", props.view);
|
|
302
|
-
}
|
|
303
|
-
}
|
|
304
|
-
return {};
|
|
242
|
+
setup(e) {
|
|
243
|
+
return e.view && (G("vaView", e.view), e.view instanceof je && G("vaMapView", e.view), e.view instanceof et && G("vaSceneView", e.view)), {};
|
|
305
244
|
}
|
|
306
245
|
});
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
renderSlot(_ctx.$slots, "default")
|
|
315
|
-
]),
|
|
316
|
-
_: 3
|
|
317
|
-
/* FORWARDED */
|
|
318
|
-
},
|
|
319
|
-
16
|
|
320
|
-
/* FULL_PROPS */
|
|
321
|
-
)) : renderSlot(_ctx.$slots, "default", { key: 1 });
|
|
246
|
+
function ht(e, t, o, n, r, a) {
|
|
247
|
+
return e.view ? A(e.$slots, "default", { key: 1 }) : (w(), _(Te(e.viewComponent), Re(fe({ key: 0 }, e.viewComponentAttrs)), {
|
|
248
|
+
default: v(() => [
|
|
249
|
+
A(e.$slots, "default")
|
|
250
|
+
]),
|
|
251
|
+
_: 3
|
|
252
|
+
}, 16));
|
|
322
253
|
}
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
this._array = null;
|
|
327
|
-
return Promise.resolve();
|
|
254
|
+
const mt = /* @__PURE__ */ Y(yt, [["render", ht]]);
|
|
255
|
+
function gt() {
|
|
256
|
+
return this._array = null, Promise.resolve();
|
|
328
257
|
}
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
this._array = null;
|
|
333
|
-
return Promise.resolve(array ? {done: false, value: array} : {done: true, value: undefined});
|
|
258
|
+
function wt() {
|
|
259
|
+
var e = this._array;
|
|
260
|
+
return this._array = null, Promise.resolve(e ? { done: !1, value: e } : { done: !0, value: void 0 });
|
|
334
261
|
}
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
return new ArraySource(array instanceof Uint8Array ? array : new Uint8Array(array));
|
|
262
|
+
function R(e) {
|
|
263
|
+
return new Q(e instanceof Uint8Array ? e : new Uint8Array(e));
|
|
338
264
|
}
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
this._array = array;
|
|
265
|
+
function Q(e) {
|
|
266
|
+
this._array = e;
|
|
342
267
|
}
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
return fetch(url).then(function(response) {
|
|
349
|
-
return response.body && response.body.getReader
|
|
350
|
-
? response.body.getReader()
|
|
351
|
-
: response.arrayBuffer().then(array);
|
|
268
|
+
Q.prototype.read = wt;
|
|
269
|
+
Q.prototype.cancel = gt;
|
|
270
|
+
function _t(e) {
|
|
271
|
+
return fetch(e).then(function(t) {
|
|
272
|
+
return t.body && t.body.getReader ? t.body.getReader() : t.arrayBuffer().then(R);
|
|
352
273
|
});
|
|
353
274
|
}
|
|
354
|
-
|
|
355
|
-
function
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
request.onerror = reject;
|
|
361
|
-
request.ontimeout = reject;
|
|
362
|
-
request.open("GET", url, true);
|
|
363
|
-
request.send();
|
|
275
|
+
function bt(e) {
|
|
276
|
+
return new Promise(function(t, o) {
|
|
277
|
+
var n = new XMLHttpRequest();
|
|
278
|
+
n.responseType = "arraybuffer", n.onload = function() {
|
|
279
|
+
t(R(n.response));
|
|
280
|
+
}, n.onerror = o, n.ontimeout = o, n.open("GET", e, !0), n.send();
|
|
364
281
|
});
|
|
365
282
|
}
|
|
366
|
-
|
|
367
|
-
function
|
|
368
|
-
return (typeof fetch === "function" ? fetchPath : requestPath)(path);
|
|
283
|
+
function D(e) {
|
|
284
|
+
return (typeof fetch == "function" ? _t : bt)(e);
|
|
369
285
|
}
|
|
370
|
-
|
|
371
|
-
function
|
|
372
|
-
return typeof source.read === "function" ? source : source.getReader();
|
|
286
|
+
function ie(e) {
|
|
287
|
+
return typeof e.read == "function" ? e : e.getReader();
|
|
373
288
|
}
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
function slice_cancel() {
|
|
289
|
+
var W = new Uint8Array(0);
|
|
290
|
+
function kt() {
|
|
378
291
|
return this._source.cancel();
|
|
379
292
|
}
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
if (!
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
c.set(a);
|
|
386
|
-
c.set(b, a.length);
|
|
387
|
-
return c;
|
|
293
|
+
function Ct(e, t) {
|
|
294
|
+
if (!e.length) return t;
|
|
295
|
+
if (!t.length) return e;
|
|
296
|
+
var o = new Uint8Array(e.length + t.length);
|
|
297
|
+
return o.set(e), o.set(t, e.length), o;
|
|
388
298
|
}
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
that._array = empty;
|
|
394
|
-
that._index = 0;
|
|
395
|
-
return result.done ? (array.length > 0
|
|
396
|
-
? {done: false, value: array}
|
|
397
|
-
: {done: true, value: undefined})
|
|
398
|
-
: {done: false, value: concat$1(array, result.value)};
|
|
299
|
+
function St() {
|
|
300
|
+
var e = this, t = e._array.subarray(e._index);
|
|
301
|
+
return e._source.read().then(function(o) {
|
|
302
|
+
return e._array = W, e._index = 0, o.done ? t.length > 0 ? { done: !1, value: t } : { done: !0, value: void 0 } : { done: !1, value: Ct(t, o.value) };
|
|
399
303
|
});
|
|
400
304
|
}
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
return
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
// Otherwise, read chunks repeatedly until the request is fulfilled.
|
|
412
|
-
var array = new Uint8Array(length);
|
|
413
|
-
array.set(this._array.subarray(this._index));
|
|
414
|
-
return (function read() {
|
|
415
|
-
return that._source.read().then(function(result) {
|
|
416
|
-
|
|
417
|
-
// When done, it’s possible the request wasn’t fully fullfilled!
|
|
418
|
-
// If so, the pre-allocated array is too big and needs slicing.
|
|
419
|
-
if (result.done) {
|
|
420
|
-
that._array = empty;
|
|
421
|
-
that._index = 0;
|
|
422
|
-
return index > 0 ? array.subarray(0, index) : null;
|
|
423
|
-
}
|
|
424
|
-
|
|
425
|
-
// If this chunk fulfills the request, return the resulting array.
|
|
426
|
-
if (index + result.value.length >= length) {
|
|
427
|
-
that._array = result.value;
|
|
428
|
-
that._index = length - index;
|
|
429
|
-
array.set(result.value.subarray(0, length - index), index);
|
|
430
|
-
return array;
|
|
431
|
-
}
|
|
432
|
-
|
|
433
|
-
// Otherwise copy this chunk into the array, then read the next chunk.
|
|
434
|
-
array.set(result.value, index);
|
|
435
|
-
index += result.value.length;
|
|
436
|
-
return read();
|
|
305
|
+
function Et(e) {
|
|
306
|
+
if ((e |= 0) < 0) throw new Error("invalid length");
|
|
307
|
+
var t = this, o = this._array.length - this._index;
|
|
308
|
+
if (this._index + e <= this._array.length)
|
|
309
|
+
return Promise.resolve(this._array.subarray(this._index, this._index += e));
|
|
310
|
+
var n = new Uint8Array(e);
|
|
311
|
+
return n.set(this._array.subarray(this._index)), function r() {
|
|
312
|
+
return t._source.read().then(function(a) {
|
|
313
|
+
return a.done ? (t._array = W, t._index = 0, o > 0 ? n.subarray(0, o) : null) : o + a.value.length >= e ? (t._array = a.value, t._index = e - o, n.set(a.value.subarray(0, e - o), o), n) : (n.set(a.value, o), o += a.value.length, r());
|
|
437
314
|
});
|
|
438
|
-
}
|
|
315
|
+
}();
|
|
439
316
|
}
|
|
440
|
-
|
|
441
|
-
function
|
|
442
|
-
return typeof source.slice === "function" ? source :
|
|
443
|
-
new SliceSource(typeof source.read === "function" ? source
|
|
444
|
-
: source.getReader());
|
|
317
|
+
function pe(e) {
|
|
318
|
+
return typeof e.slice == "function" ? e : new L(typeof e.read == "function" ? e : e.getReader());
|
|
445
319
|
}
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
this._source = source;
|
|
449
|
-
this._array = empty;
|
|
450
|
-
this._index = 0;
|
|
320
|
+
function L(e) {
|
|
321
|
+
this._source = e, this._array = W, this._index = 0;
|
|
451
322
|
}
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
function dbf_cancel() {
|
|
323
|
+
L.prototype.read = St;
|
|
324
|
+
L.prototype.slice = Et;
|
|
325
|
+
L.prototype.cancel = kt;
|
|
326
|
+
function Vt() {
|
|
458
327
|
return this._source.cancel();
|
|
459
328
|
}
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
return /^[nf]$/i.test(value) ? false
|
|
463
|
-
: /^[yt]$/i.test(value) ? true
|
|
464
|
-
: null;
|
|
329
|
+
function Pt(e) {
|
|
330
|
+
return /^[nf]$/i.test(e) ? !1 : /^[yt]$/i.test(e) ? !0 : null;
|
|
465
331
|
}
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
return new Date(+value.substring(0, 4), value.substring(4, 6) - 1, +value.substring(6, 8));
|
|
332
|
+
function It(e) {
|
|
333
|
+
return new Date(+e.substring(0, 4), e.substring(4, 6) - 1, +e.substring(6, 8));
|
|
469
334
|
}
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
return !(value = value.trim()) || isNaN(value = +value) ? null : value;
|
|
335
|
+
function M(e) {
|
|
336
|
+
return !(e = e.trim()) || isNaN(e = +e) ? null : e;
|
|
473
337
|
}
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
return value.trim() || null;
|
|
338
|
+
function Mt(e) {
|
|
339
|
+
return e.trim() || null;
|
|
477
340
|
}
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
N: readNumber
|
|
341
|
+
var Ot = {
|
|
342
|
+
B: M,
|
|
343
|
+
C: Mt,
|
|
344
|
+
D: It,
|
|
345
|
+
F: M,
|
|
346
|
+
L: Pt,
|
|
347
|
+
M,
|
|
348
|
+
N: M
|
|
487
349
|
};
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
return p;
|
|
495
|
-
}, {})} : {done: true, value: undefined};
|
|
350
|
+
function At() {
|
|
351
|
+
var e = this, t = 1;
|
|
352
|
+
return e._source.slice(e._recordLength).then(function(o) {
|
|
353
|
+
return o && o[0] !== 26 ? { done: !1, value: e._fields.reduce(function(n, r) {
|
|
354
|
+
return n[r.name] = Ot[r.type](e._decode(o.subarray(t, t += r.length))), n;
|
|
355
|
+
}, {}) } : { done: !0, value: void 0 };
|
|
496
356
|
});
|
|
497
357
|
}
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
return new DataView(array.buffer, array.byteOffset, array.byteLength);
|
|
358
|
+
function C(e) {
|
|
359
|
+
return new DataView(e.buffer, e.byteOffset, e.byteLength);
|
|
501
360
|
}
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
return source.slice(head.getUint16(8, true) - 32).then(function(array) {
|
|
508
|
-
return new Dbf(source, decoder, head, view(array));
|
|
361
|
+
function Tt(e, t) {
|
|
362
|
+
return e = pe(e), e.slice(32).then(function(o) {
|
|
363
|
+
var n = C(o);
|
|
364
|
+
return e.slice(n.getUint16(8, !0) - 32).then(function(r) {
|
|
365
|
+
return new ve(e, t, n, C(r));
|
|
509
366
|
});
|
|
510
367
|
});
|
|
511
368
|
}
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
this._recordLength = head.getUint16(10, true);
|
|
517
|
-
this._fields = [];
|
|
518
|
-
for (var n = 0; body.getUint8(n) !== 0x0d; n += 32) {
|
|
519
|
-
for (var j = 0; j < 11; ++j) if (body.getUint8(n + j) === 0) break;
|
|
369
|
+
function ve(e, t, o, n) {
|
|
370
|
+
this._source = e, this._decode = t.decode.bind(t), this._recordLength = o.getUint16(10, !0), this._fields = [];
|
|
371
|
+
for (var r = 0; n.getUint8(r) !== 13; r += 32) {
|
|
372
|
+
for (var a = 0; a < 11 && n.getUint8(r + a) !== 0; ++a) ;
|
|
520
373
|
this._fields.push({
|
|
521
|
-
name: this._decode(new Uint8Array(
|
|
522
|
-
type: String.fromCharCode(
|
|
523
|
-
length:
|
|
374
|
+
name: this._decode(new Uint8Array(n.buffer, n.byteOffset + r, a)),
|
|
375
|
+
type: String.fromCharCode(n.getUint8(r + 11)),
|
|
376
|
+
length: n.getUint8(r + 16)
|
|
524
377
|
});
|
|
525
378
|
}
|
|
526
379
|
}
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
function cancel() {
|
|
380
|
+
var ye = ve.prototype;
|
|
381
|
+
ye.read = At;
|
|
382
|
+
ye.cancel = Vt;
|
|
383
|
+
function Rt() {
|
|
533
384
|
return this._source.cancel();
|
|
534
385
|
}
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
return {type: "MultiPoint", coordinates: coordinates};
|
|
386
|
+
function J(e) {
|
|
387
|
+
var t = 40, o, n = e.getInt32(36, !0), r = new Array(n);
|
|
388
|
+
for (o = 0; o < n; ++o, t += 16) r[o] = [e.getFloat64(t, !0), e.getFloat64(t + 8, !0)];
|
|
389
|
+
return { type: "MultiPoint", coordinates: r };
|
|
540
390
|
}
|
|
541
|
-
|
|
542
|
-
function parseNull() {
|
|
391
|
+
function Ft() {
|
|
543
392
|
return null;
|
|
544
393
|
}
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
while (++i < n) area += ring[i - 1][1] * ring[i][0] - ring[i - 1][0] * ring[i][1];
|
|
578
|
-
return area >= 0;
|
|
579
|
-
}
|
|
580
|
-
|
|
581
|
-
function ringContainsSome(ring, hole) {
|
|
582
|
-
var i = -1, n = hole.length, c;
|
|
583
|
-
while (++i < n) {
|
|
584
|
-
if (c = ringContains(ring, hole[i])) {
|
|
585
|
-
return c > 0;
|
|
586
|
-
}
|
|
587
|
-
}
|
|
588
|
-
return false;
|
|
589
|
-
}
|
|
590
|
-
|
|
591
|
-
function ringContains(ring, point) {
|
|
592
|
-
var x = point[0], y = point[1], contains = -1;
|
|
593
|
-
for (var i = 0, n = ring.length, j = n - 1; i < n; j = i++) {
|
|
594
|
-
var pi = ring[i], xi = pi[0], yi = pi[1],
|
|
595
|
-
pj = ring[j], xj = pj[0], yj = pj[1];
|
|
596
|
-
if (segmentContains(pi, pj, point)) {
|
|
394
|
+
function q(e) {
|
|
395
|
+
return { type: "Point", coordinates: [e.getFloat64(4, !0), e.getFloat64(12, !0)] };
|
|
396
|
+
}
|
|
397
|
+
function z(e) {
|
|
398
|
+
var t = 44, o, n = e.getInt32(36, !0), r = e.getInt32(40, !0), a = new Array(n), l = new Array(r), i = [], s = [];
|
|
399
|
+
for (o = 0; o < n; ++o, t += 4) a[o] = e.getInt32(t, !0);
|
|
400
|
+
for (o = 0; o < r; ++o, t += 16) l[o] = [e.getFloat64(t, !0), e.getFloat64(t + 8, !0)];
|
|
401
|
+
return a.forEach(function(c, f) {
|
|
402
|
+
var p = l.slice(c, a[f + 1]);
|
|
403
|
+
Lt(p) ? i.push([p]) : s.push(p);
|
|
404
|
+
}), s.forEach(function(c) {
|
|
405
|
+
i.some(function(f) {
|
|
406
|
+
if ($t(f[0], c))
|
|
407
|
+
return f.push(c), !0;
|
|
408
|
+
}) || i.push([c]);
|
|
409
|
+
}), i.length === 1 ? { type: "Polygon", coordinates: i[0] } : { type: "MultiPolygon", coordinates: i };
|
|
410
|
+
}
|
|
411
|
+
function Lt(e) {
|
|
412
|
+
if ((o = e.length) < 4) return !1;
|
|
413
|
+
for (var t = 0, o, n = e[o - 1][1] * e[0][0] - e[o - 1][0] * e[0][1]; ++t < o; ) n += e[t - 1][1] * e[t][0] - e[t - 1][0] * e[t][1];
|
|
414
|
+
return n >= 0;
|
|
415
|
+
}
|
|
416
|
+
function $t(e, t) {
|
|
417
|
+
for (var o = -1, n = t.length, r; ++o < n; )
|
|
418
|
+
if (r = Bt(e, t[o]))
|
|
419
|
+
return r > 0;
|
|
420
|
+
return !1;
|
|
421
|
+
}
|
|
422
|
+
function Bt(e, t) {
|
|
423
|
+
for (var o = t[0], n = t[1], r = -1, a = 0, l = e.length, i = l - 1; a < l; i = a++) {
|
|
424
|
+
var s = e[a], c = s[0], f = s[1], p = e[i], m = p[0], g = p[1];
|
|
425
|
+
if (Ut(s, p, t))
|
|
597
426
|
return 0;
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
var
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
var t =
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
}
|
|
630
|
-
|
|
631
|
-
function shp_read() {
|
|
632
|
-
var that = this;
|
|
633
|
-
++that._index;
|
|
634
|
-
return that._source.slice(12).then(function(array) {
|
|
635
|
-
if (array == null) return {done: true, value: undefined};
|
|
636
|
-
var header = view(array);
|
|
637
|
-
|
|
638
|
-
// If the record starts with an invalid shape type (see #36), scan ahead in
|
|
639
|
-
// four-byte increments to find the next valid record, identified by the
|
|
640
|
-
// expected index, a non-empty content length and a valid shape type.
|
|
641
|
-
function skip() {
|
|
642
|
-
return that._source.slice(4).then(function(chunk) {
|
|
643
|
-
if (chunk == null) return {done: true, value: undefined};
|
|
644
|
-
header = view(array = concat(array.slice(4), chunk));
|
|
645
|
-
return header.getInt32(0, false) !== that._index ? skip() : read();
|
|
427
|
+
f > n != g > n && o < (m - c) * (n - f) / (g - f) + c && (r = -r);
|
|
428
|
+
}
|
|
429
|
+
return r;
|
|
430
|
+
}
|
|
431
|
+
function Ut(e, t, o) {
|
|
432
|
+
var n = o[0] - e[0], r = o[1] - e[1];
|
|
433
|
+
if (n === 0 && r === 0) return !0;
|
|
434
|
+
var a = t[0] - e[0], l = t[1] - e[1];
|
|
435
|
+
if (a === 0 && l === 0) return !1;
|
|
436
|
+
var i = (n * a + r * l) / (a * a + l * l);
|
|
437
|
+
return i < 0 || i > 1 ? !1 : i === 0 || i === 1 ? !0 : i * a === n && i * l === r;
|
|
438
|
+
}
|
|
439
|
+
function Z(e) {
|
|
440
|
+
var t = 44, o, n = e.getInt32(36, !0), r = e.getInt32(40, !0), a = new Array(n), l = new Array(r);
|
|
441
|
+
for (o = 0; o < n; ++o, t += 4) a[o] = e.getInt32(t, !0);
|
|
442
|
+
for (o = 0; o < r; ++o, t += 16) l[o] = [e.getFloat64(t, !0), e.getFloat64(t + 8, !0)];
|
|
443
|
+
return n === 1 ? { type: "LineString", coordinates: l } : { type: "MultiLineString", coordinates: a.map(function(i, s) {
|
|
444
|
+
return l.slice(i, a[s + 1]);
|
|
445
|
+
}) };
|
|
446
|
+
}
|
|
447
|
+
function ue(e, t) {
|
|
448
|
+
var o = new Uint8Array(e.length + t.length);
|
|
449
|
+
return o.set(e, 0), o.set(t, e.length), o;
|
|
450
|
+
}
|
|
451
|
+
function Gt() {
|
|
452
|
+
var e = this;
|
|
453
|
+
return ++e._index, e._source.slice(12).then(function(t) {
|
|
454
|
+
if (t == null) return { done: !0, value: void 0 };
|
|
455
|
+
var o = C(t);
|
|
456
|
+
function n() {
|
|
457
|
+
return e._source.slice(4).then(function(a) {
|
|
458
|
+
return a == null ? { done: !0, value: void 0 } : (o = C(t = ue(t.slice(4), a)), o.getInt32(0, !1) !== e._index ? n() : r());
|
|
646
459
|
});
|
|
647
460
|
}
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
var length = header.getInt32(4, false) * 2 - 4, type = header.getInt32(8, true);
|
|
653
|
-
return length < 0 || (type && type !== that._type) ? skip() : that._source.slice(length).then(function(chunk) {
|
|
654
|
-
return {done: false, value: type ? that._parse(view(concat(array.slice(8), chunk))) : null};
|
|
461
|
+
function r() {
|
|
462
|
+
var a = o.getInt32(4, !1) * 2 - 4, l = o.getInt32(8, !0);
|
|
463
|
+
return a < 0 || l && l !== e._type ? n() : e._source.slice(a).then(function(i) {
|
|
464
|
+
return { done: !1, value: l ? e._parse(C(ue(t.slice(8), i))) : null };
|
|
655
465
|
});
|
|
656
466
|
}
|
|
657
|
-
|
|
658
|
-
return read();
|
|
467
|
+
return r();
|
|
659
468
|
});
|
|
660
469
|
}
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
13:
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
470
|
+
var se = {
|
|
471
|
+
0: Ft,
|
|
472
|
+
1: q,
|
|
473
|
+
3: Z,
|
|
474
|
+
5: z,
|
|
475
|
+
8: J,
|
|
476
|
+
11: q,
|
|
477
|
+
// PointZ
|
|
478
|
+
13: Z,
|
|
479
|
+
// PolyLineZ
|
|
480
|
+
15: z,
|
|
481
|
+
// PolygonZ
|
|
482
|
+
18: J,
|
|
483
|
+
// MultiPointZ
|
|
484
|
+
21: q,
|
|
485
|
+
// PointM
|
|
486
|
+
23: Z,
|
|
487
|
+
// PolyLineM
|
|
488
|
+
25: z,
|
|
489
|
+
// PolygonM
|
|
490
|
+
28: J
|
|
491
|
+
// MultiPointM
|
|
676
492
|
};
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
return source.slice(100).then(function(array) {
|
|
681
|
-
return new Shp(source, view(array));
|
|
493
|
+
function Nt(e) {
|
|
494
|
+
return e = pe(e), e.slice(100).then(function(t) {
|
|
495
|
+
return new he(e, C(t));
|
|
682
496
|
});
|
|
683
497
|
}
|
|
684
|
-
function
|
|
685
|
-
var
|
|
686
|
-
if (!(
|
|
687
|
-
this._source =
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
498
|
+
function he(e, t) {
|
|
499
|
+
var o = t.getInt32(32, !0);
|
|
500
|
+
if (!(o in se)) throw new Error("unsupported shape type: " + o);
|
|
501
|
+
this._source = e, this._type = o, this._index = 0, this._parse = se[o], this.bbox = [t.getFloat64(36, !0), t.getFloat64(44, !0), t.getFloat64(52, !0), t.getFloat64(60, !0)];
|
|
502
|
+
}
|
|
503
|
+
var me = he.prototype;
|
|
504
|
+
me.read = Gt;
|
|
505
|
+
me.cancel = Rt;
|
|
506
|
+
function Dt() {
|
|
692
507
|
}
|
|
693
|
-
|
|
694
|
-
var prototype$1 = Shp.prototype;
|
|
695
|
-
prototype$1.read = shp_read;
|
|
696
|
-
prototype$1.cancel = cancel;
|
|
697
|
-
|
|
698
|
-
function noop() {}
|
|
699
|
-
|
|
700
|
-
function shapefile_cancel() {
|
|
508
|
+
function Jt() {
|
|
701
509
|
return Promise.all([
|
|
702
510
|
this._dbf && this._dbf.cancel(),
|
|
703
511
|
this._shp.cancel()
|
|
704
|
-
]).then(
|
|
512
|
+
]).then(Dt);
|
|
705
513
|
}
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
var that = this;
|
|
514
|
+
function qt() {
|
|
515
|
+
var e = this;
|
|
709
516
|
return Promise.all([
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
]).then(function(
|
|
713
|
-
var
|
|
714
|
-
return
|
|
715
|
-
done:
|
|
517
|
+
e._dbf ? e._dbf.read() : { value: {} },
|
|
518
|
+
e._shp.read()
|
|
519
|
+
]).then(function(t) {
|
|
520
|
+
var o = t[0], n = t[1];
|
|
521
|
+
return n.done ? n : {
|
|
522
|
+
done: !1,
|
|
716
523
|
value: {
|
|
717
524
|
type: "Feature",
|
|
718
|
-
properties:
|
|
719
|
-
geometry:
|
|
525
|
+
properties: o.value,
|
|
526
|
+
geometry: n.value
|
|
720
527
|
}
|
|
721
528
|
};
|
|
722
529
|
});
|
|
723
530
|
}
|
|
724
|
-
|
|
725
|
-
function shapefile(shpSource, dbfSource, decoder) {
|
|
531
|
+
function zt(e, t, o) {
|
|
726
532
|
return Promise.all([
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
]).then(function(
|
|
730
|
-
return new
|
|
533
|
+
Nt(e),
|
|
534
|
+
t && Tt(t, o)
|
|
535
|
+
]).then(function(n) {
|
|
536
|
+
return new ge(n[0], n[1]);
|
|
731
537
|
});
|
|
732
538
|
}
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
function open(shp, dbf, options) {
|
|
745
|
-
if (typeof dbf === "string") {
|
|
746
|
-
if (!/\.dbf$/.test(dbf)) dbf += ".dbf";
|
|
747
|
-
dbf = path(dbf);
|
|
748
|
-
} else if (dbf instanceof ArrayBuffer || dbf instanceof Uint8Array) {
|
|
749
|
-
dbf = array(dbf);
|
|
750
|
-
} else if (dbf != null) {
|
|
751
|
-
dbf = stream(dbf);
|
|
752
|
-
}
|
|
753
|
-
if (typeof shp === "string") {
|
|
754
|
-
if (!/\.shp$/.test(shp)) shp += ".shp";
|
|
755
|
-
if (dbf === undefined) dbf = path(shp.substring(0, shp.length - 4) + ".dbf").catch(function() {});
|
|
756
|
-
shp = path(shp);
|
|
757
|
-
} else if (shp instanceof ArrayBuffer || shp instanceof Uint8Array) {
|
|
758
|
-
shp = array(shp);
|
|
759
|
-
} else {
|
|
760
|
-
shp = stream(shp);
|
|
761
|
-
}
|
|
762
|
-
return Promise.all([shp, dbf]).then(function(sources) {
|
|
763
|
-
var shp = sources[0], dbf = sources[1], encoding = "windows-1252";
|
|
764
|
-
return shapefile(shp, dbf, dbf && new TextDecoder(encoding));
|
|
539
|
+
function ge(e, t) {
|
|
540
|
+
this._shp = e, this._dbf = t, this.bbox = e.bbox;
|
|
541
|
+
}
|
|
542
|
+
var we = ge.prototype;
|
|
543
|
+
we.read = qt;
|
|
544
|
+
we.cancel = Jt;
|
|
545
|
+
function Zt(e, t, o) {
|
|
546
|
+
return typeof t == "string" ? (/\.dbf$/.test(t) || (t += ".dbf"), t = D(t)) : t instanceof ArrayBuffer || t instanceof Uint8Array ? t = R(t) : t != null && (t = ie(t)), typeof e == "string" ? (/\.shp$/.test(e) || (e += ".shp"), t === void 0 && (t = D(e.substring(0, e.length - 4) + ".dbf").catch(function() {
|
|
547
|
+
})), e = D(e)) : e instanceof ArrayBuffer || e instanceof Uint8Array ? e = R(e) : e = ie(e), Promise.all([e, t]).then(function(n) {
|
|
548
|
+
var r = n[0], a = n[1], l = "windows-1252";
|
|
549
|
+
return zt(r, a, a && new TextDecoder(l));
|
|
765
550
|
});
|
|
766
551
|
}
|
|
767
|
-
|
|
768
|
-
const
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
type: "FeatureCollection",
|
|
774
|
-
features: []
|
|
775
|
-
};
|
|
776
|
-
reader.onload = function() {
|
|
777
|
-
open(this.result).then((source) => source.read().then(
|
|
778
|
-
function log(result) {
|
|
779
|
-
if (!result.done) {
|
|
780
|
-
data.features.push(result.value);
|
|
781
|
-
source.read().then(log);
|
|
782
|
-
} else {
|
|
783
|
-
if (result.value) {
|
|
784
|
-
data.features.push(result.value);
|
|
785
|
-
}
|
|
786
|
-
resolve(data);
|
|
787
|
-
}
|
|
788
|
-
}
|
|
789
|
-
)).catch(reject);
|
|
790
|
-
};
|
|
791
|
-
});
|
|
792
|
-
};
|
|
793
|
-
|
|
794
|
-
const toGeojson = (file) => {
|
|
795
|
-
const actions = {
|
|
796
|
-
shp: shpToGeojson
|
|
552
|
+
const Ht = (e) => new Promise((t, o) => {
|
|
553
|
+
const n = new FileReader();
|
|
554
|
+
n.readAsArrayBuffer(e);
|
|
555
|
+
const r = {
|
|
556
|
+
type: "FeatureCollection",
|
|
557
|
+
features: []
|
|
797
558
|
};
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
559
|
+
n.onload = function() {
|
|
560
|
+
Zt(this.result).then((a) => a.read().then(
|
|
561
|
+
function l(i) {
|
|
562
|
+
i.done ? (i.value && r.features.push(i.value), t(r)) : (r.features.push(i.value), a.read().then(l));
|
|
563
|
+
}
|
|
564
|
+
)).catch(o);
|
|
565
|
+
};
|
|
566
|
+
}), xt = (e) => {
|
|
567
|
+
const t = {
|
|
568
|
+
shp: Ht
|
|
569
|
+
};
|
|
570
|
+
return new Promise((o, n) => {
|
|
571
|
+
const r = e.name.split(".").pop();
|
|
572
|
+
r && t[r] ? o(t[r](e)) : n(new Error(`Can't resolve the .${r} file`));
|
|
805
573
|
});
|
|
806
574
|
};
|
|
807
|
-
|
|
808
575
|
/* @preserve
|
|
809
576
|
* @terraformer/arcgis - v2.1.1 - MIT
|
|
810
577
|
* Copyright (c) 2012-2022 Environmental Systems Research Institute, Inc.
|
|
811
578
|
* Tue Aug 02 2022 14:23:48 GMT-0700 (Pacific Daylight Time)
|
|
812
579
|
*/
|
|
813
|
-
|
|
814
|
-
*
|
|
815
|
-
|
|
816
|
-
var
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
var
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
return
|
|
851
|
-
}
|
|
852
|
-
var
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
if (
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
var closeRing = function closeRing(coordinates) {
|
|
868
|
-
if (!pointsEqual(coordinates[0], coordinates[coordinates.length - 1])) {
|
|
869
|
-
coordinates.push(coordinates[0]);
|
|
870
|
-
}
|
|
871
|
-
|
|
872
|
-
return coordinates;
|
|
873
|
-
}; // determine if polygon ring coordinates are clockwise. clockwise signifies outer ring, counter-clockwise an inner ring
|
|
874
|
-
// or hole. this logic was found at http://stackoverflow.com/questions/1165647/how-to-determine-if-a-list-of-polygon-
|
|
875
|
-
// points-are-in-clockwise-order
|
|
876
|
-
|
|
877
|
-
var ringIsClockwise = function ringIsClockwise(ringToTest) {
|
|
878
|
-
var total = 0;
|
|
879
|
-
var i = 0;
|
|
880
|
-
var rLength = ringToTest.length;
|
|
881
|
-
var pt1 = ringToTest[i];
|
|
882
|
-
var pt2;
|
|
883
|
-
|
|
884
|
-
for (i; i < rLength - 1; i++) {
|
|
885
|
-
pt2 = ringToTest[i + 1];
|
|
886
|
-
total += (pt2[0] - pt1[0]) * (pt2[1] + pt1[1]);
|
|
887
|
-
pt1 = pt2;
|
|
888
|
-
}
|
|
889
|
-
|
|
890
|
-
return total >= 0;
|
|
891
|
-
}; // This function ensures that rings are oriented in the right directions
|
|
892
|
-
// from http://jsperf.com/cloning-an-object/2
|
|
893
|
-
|
|
894
|
-
var shallowClone = function shallowClone(obj) {
|
|
895
|
-
var target = {};
|
|
896
|
-
|
|
897
|
-
for (var i in obj) {
|
|
898
|
-
// both arcgis attributes and geojson props are just hardcoded keys
|
|
899
|
-
if (obj.hasOwnProperty(i)) {
|
|
900
|
-
// eslint-disable-line no-prototype-builtins
|
|
901
|
-
target[i] = obj[i];
|
|
902
|
-
}
|
|
903
|
-
}
|
|
904
|
-
|
|
905
|
-
return target;
|
|
906
|
-
};
|
|
907
|
-
|
|
908
|
-
/* Copyright (c) 2012-2019 Environmental Systems Research Institute, Inc.
|
|
909
|
-
* Apache-2.0 */
|
|
910
|
-
|
|
911
|
-
var coordinatesContainCoordinates = function coordinatesContainCoordinates(outer, inner) {
|
|
912
|
-
var intersects = arrayIntersectsArray(outer, inner);
|
|
913
|
-
var contains = coordinatesContainPoint(outer, inner[0]);
|
|
914
|
-
|
|
915
|
-
if (!intersects && contains) {
|
|
916
|
-
return true;
|
|
917
|
-
}
|
|
918
|
-
|
|
919
|
-
return false;
|
|
920
|
-
}; // do any polygons in this array contain any other polygons in this array?
|
|
921
|
-
// used for checking for holes in arcgis rings
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
var convertRingsToGeoJSON = function convertRingsToGeoJSON(rings) {
|
|
925
|
-
var outerRings = [];
|
|
926
|
-
var holes = [];
|
|
927
|
-
var x; // iterator
|
|
928
|
-
|
|
929
|
-
var outerRing; // current outer ring being evaluated
|
|
930
|
-
|
|
931
|
-
var hole; // current hole being evaluated
|
|
932
|
-
// for each ring
|
|
933
|
-
|
|
934
|
-
for (var r = 0; r < rings.length; r++) {
|
|
935
|
-
var ring = closeRing(rings[r].slice(0));
|
|
936
|
-
|
|
937
|
-
if (ring.length < 4) {
|
|
938
|
-
continue;
|
|
939
|
-
} // is this ring an outer ring? is it clockwise?
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
if (ringIsClockwise(ring)) {
|
|
943
|
-
var polygon = [ring.slice().reverse()]; // wind outer rings counterclockwise for RFC 7946 compliance
|
|
944
|
-
|
|
945
|
-
outerRings.push(polygon); // push to outer rings
|
|
946
|
-
} else {
|
|
947
|
-
holes.push(ring.slice().reverse()); // wind inner rings clockwise for RFC 7946 compliance
|
|
948
|
-
}
|
|
949
|
-
}
|
|
950
|
-
|
|
951
|
-
var uncontainedHoles = []; // while there are holes left...
|
|
952
|
-
|
|
953
|
-
while (holes.length) {
|
|
954
|
-
// pop a hole off out stack
|
|
955
|
-
hole = holes.pop(); // loop over all outer rings and see if they contain our hole.
|
|
956
|
-
|
|
957
|
-
var contained = false;
|
|
958
|
-
|
|
959
|
-
for (x = outerRings.length - 1; x >= 0; x--) {
|
|
960
|
-
outerRing = outerRings[x][0];
|
|
961
|
-
|
|
962
|
-
if (coordinatesContainCoordinates(outerRing, hole)) {
|
|
963
|
-
// the hole is contained push it into our polygon
|
|
964
|
-
outerRings[x].push(hole);
|
|
965
|
-
contained = true;
|
|
580
|
+
var Yt = function(t, o, n, r) {
|
|
581
|
+
var a = (r[0] - n[0]) * (t[1] - n[1]) - (r[1] - n[1]) * (t[0] - n[0]), l = (o[0] - t[0]) * (t[1] - n[1]) - (o[1] - t[1]) * (t[0] - n[0]), i = (r[1] - n[1]) * (o[0] - t[0]) - (r[0] - n[0]) * (o[1] - t[1]);
|
|
582
|
+
if (i !== 0) {
|
|
583
|
+
var s = a / i, c = l / i;
|
|
584
|
+
if (s >= 0 && s <= 1 && c >= 0 && c <= 1)
|
|
585
|
+
return !0;
|
|
586
|
+
}
|
|
587
|
+
return !1;
|
|
588
|
+
}, Xt = function(t, o) {
|
|
589
|
+
for (var n = !1, r = -1, a = t.length, l = a - 1; ++r < a; l = r)
|
|
590
|
+
(t[r][1] <= o[1] && o[1] < t[l][1] || t[l][1] <= o[1] && o[1] < t[r][1]) && o[0] < (t[l][0] - t[r][0]) * (o[1] - t[r][1]) / (t[l][1] - t[r][1]) + t[r][0] && (n = !n);
|
|
591
|
+
return n;
|
|
592
|
+
}, Kt = function(t, o) {
|
|
593
|
+
for (var n = 0; n < t.length; n++)
|
|
594
|
+
if (t[n] !== o[n])
|
|
595
|
+
return !1;
|
|
596
|
+
return !0;
|
|
597
|
+
}, _e = function(t, o) {
|
|
598
|
+
for (var n = 0; n < t.length - 1; n++)
|
|
599
|
+
for (var r = 0; r < o.length - 1; r++)
|
|
600
|
+
if (Yt(t[n], t[n + 1], o[r], o[r + 1]))
|
|
601
|
+
return !0;
|
|
602
|
+
return !1;
|
|
603
|
+
}, H = function(t) {
|
|
604
|
+
return Kt(t[0], t[t.length - 1]) || t.push(t[0]), t;
|
|
605
|
+
}, x = function(t) {
|
|
606
|
+
var o = 0, n = 0, r = t.length, a = t[n], l;
|
|
607
|
+
for (n; n < r - 1; n++)
|
|
608
|
+
l = t[n + 1], o += (l[0] - a[0]) * (l[1] + a[1]), a = l;
|
|
609
|
+
return o >= 0;
|
|
610
|
+
}, be = function(t) {
|
|
611
|
+
var o = {};
|
|
612
|
+
for (var n in t)
|
|
613
|
+
t.hasOwnProperty(n) && (o[n] = t[n]);
|
|
614
|
+
return o;
|
|
615
|
+
}, Qt = function(t, o) {
|
|
616
|
+
var n = _e(t, o), r = Xt(t, o[0]);
|
|
617
|
+
return !!(!n && r);
|
|
618
|
+
}, Wt = function(t) {
|
|
619
|
+
for (var o = [], n = [], r, a, l, i = 0; i < t.length; i++) {
|
|
620
|
+
var s = H(t[i].slice(0));
|
|
621
|
+
if (!(s.length < 4))
|
|
622
|
+
if (x(s)) {
|
|
623
|
+
var c = [s.slice().reverse()];
|
|
624
|
+
o.push(c);
|
|
625
|
+
} else
|
|
626
|
+
n.push(s.slice().reverse());
|
|
627
|
+
}
|
|
628
|
+
for (var f = []; n.length; ) {
|
|
629
|
+
l = n.pop();
|
|
630
|
+
var p = !1;
|
|
631
|
+
for (r = o.length - 1; r >= 0; r--)
|
|
632
|
+
if (a = o[r][0], Qt(a, l)) {
|
|
633
|
+
o[r].push(l), p = !0;
|
|
966
634
|
break;
|
|
967
635
|
}
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
while (uncontainedHoles.length) {
|
|
979
|
-
// pop a hole off out stack
|
|
980
|
-
hole = uncontainedHoles.pop(); // loop over all outer rings and see if any intersect our hole.
|
|
981
|
-
|
|
982
|
-
var intersects = false;
|
|
983
|
-
|
|
984
|
-
for (x = outerRings.length - 1; x >= 0; x--) {
|
|
985
|
-
outerRing = outerRings[x][0];
|
|
986
|
-
|
|
987
|
-
if (arrayIntersectsArray(outerRing, hole)) {
|
|
988
|
-
// the hole is contained push it into our polygon
|
|
989
|
-
outerRings[x].push(hole);
|
|
990
|
-
intersects = true;
|
|
636
|
+
p || f.push(l);
|
|
637
|
+
}
|
|
638
|
+
for (; f.length; ) {
|
|
639
|
+
l = f.pop();
|
|
640
|
+
var m = !1;
|
|
641
|
+
for (r = o.length - 1; r >= 0; r--)
|
|
642
|
+
if (a = o[r][0], _e(a, l)) {
|
|
643
|
+
o[r].push(l), m = !0;
|
|
991
644
|
break;
|
|
992
645
|
}
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
}
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
return {
|
|
1002
|
-
type: 'Polygon',
|
|
1003
|
-
coordinates: outerRings[0]
|
|
1004
|
-
};
|
|
1005
|
-
} else {
|
|
1006
|
-
return {
|
|
1007
|
-
type: 'MultiPolygon',
|
|
1008
|
-
coordinates: outerRings
|
|
1009
|
-
};
|
|
1010
|
-
}
|
|
1011
|
-
};
|
|
1012
|
-
|
|
1013
|
-
var getId = function getId(attributes, idAttribute) {
|
|
1014
|
-
var keys = ['OBJECTID', 'FID'];
|
|
1015
|
-
|
|
1016
|
-
for (var i = 0; i < keys.length; i++) {
|
|
1017
|
-
var key = keys[i];
|
|
1018
|
-
|
|
1019
|
-
if (key in attributes && (typeof attributes[key] === 'string' || typeof attributes[key] === 'number')) {
|
|
1020
|
-
return attributes[key];
|
|
1021
|
-
}
|
|
1022
|
-
}
|
|
1023
|
-
|
|
1024
|
-
throw Error('No valid id attribute found');
|
|
1025
|
-
};
|
|
1026
|
-
|
|
1027
|
-
var arcgisToGeoJSON = function arcgisToGeoJSON(arcgis, idAttribute) {
|
|
1028
|
-
var geojson = {};
|
|
1029
|
-
|
|
1030
|
-
if (arcgis.features) {
|
|
1031
|
-
geojson.type = 'FeatureCollection';
|
|
1032
|
-
geojson.features = [];
|
|
1033
|
-
|
|
1034
|
-
for (var i = 0; i < arcgis.features.length; i++) {
|
|
1035
|
-
geojson.features.push(arcgisToGeoJSON(arcgis.features[i], idAttribute));
|
|
1036
|
-
}
|
|
1037
|
-
}
|
|
1038
|
-
|
|
1039
|
-
if (typeof arcgis.x === 'number' && typeof arcgis.y === 'number') {
|
|
1040
|
-
geojson.type = 'Point';
|
|
1041
|
-
geojson.coordinates = [arcgis.x, arcgis.y];
|
|
1042
|
-
|
|
1043
|
-
if (typeof arcgis.z === 'number') {
|
|
1044
|
-
geojson.coordinates.push(arcgis.z);
|
|
1045
|
-
}
|
|
1046
|
-
}
|
|
1047
|
-
|
|
1048
|
-
if (arcgis.points) {
|
|
1049
|
-
geojson.type = 'MultiPoint';
|
|
1050
|
-
geojson.coordinates = arcgis.points.slice(0);
|
|
1051
|
-
}
|
|
1052
|
-
|
|
1053
|
-
if (arcgis.paths) {
|
|
1054
|
-
if (arcgis.paths.length === 1) {
|
|
1055
|
-
geojson.type = 'LineString';
|
|
1056
|
-
geojson.coordinates = arcgis.paths[0].slice(0);
|
|
1057
|
-
} else {
|
|
1058
|
-
geojson.type = 'MultiLineString';
|
|
1059
|
-
geojson.coordinates = arcgis.paths.slice(0);
|
|
1060
|
-
}
|
|
1061
|
-
}
|
|
1062
|
-
|
|
1063
|
-
if (arcgis.rings) {
|
|
1064
|
-
geojson = convertRingsToGeoJSON(arcgis.rings.slice(0));
|
|
1065
|
-
}
|
|
1066
|
-
|
|
1067
|
-
if (typeof arcgis.xmin === 'number' && typeof arcgis.ymin === 'number' && typeof arcgis.xmax === 'number' && typeof arcgis.ymax === 'number') {
|
|
1068
|
-
geojson.type = 'Polygon';
|
|
1069
|
-
geojson.coordinates = [[[arcgis.xmax, arcgis.ymax], [arcgis.xmin, arcgis.ymax], [arcgis.xmin, arcgis.ymin], [arcgis.xmax, arcgis.ymin], [arcgis.xmax, arcgis.ymax]]];
|
|
1070
|
-
}
|
|
1071
|
-
|
|
1072
|
-
if (arcgis.geometry || arcgis.attributes) {
|
|
1073
|
-
geojson.type = 'Feature';
|
|
1074
|
-
geojson.geometry = arcgis.geometry ? arcgisToGeoJSON(arcgis.geometry) : null;
|
|
1075
|
-
geojson.properties = arcgis.attributes ? shallowClone(arcgis.attributes) : null;
|
|
1076
|
-
|
|
1077
|
-
if (arcgis.attributes) {
|
|
1078
|
-
try {
|
|
1079
|
-
geojson.id = getId(arcgis.attributes, idAttribute);
|
|
1080
|
-
} catch (err) {// don't set an id
|
|
1081
|
-
}
|
|
1082
|
-
}
|
|
1083
|
-
} // if no valid geometry was encountered
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
if (JSON.stringify(geojson.geometry) === JSON.stringify({})) {
|
|
1087
|
-
geojson.geometry = null;
|
|
1088
|
-
}
|
|
1089
|
-
|
|
1090
|
-
if (arcgis.spatialReference && arcgis.spatialReference.wkid && arcgis.spatialReference.wkid !== 4326) {
|
|
1091
|
-
console.warn('Object converted in non-standard crs - ' + JSON.stringify(arcgis.spatialReference));
|
|
1092
|
-
}
|
|
1093
|
-
|
|
1094
|
-
return geojson;
|
|
1095
|
-
};
|
|
1096
|
-
|
|
1097
|
-
/* Copyright (c) 2012-2019 Environmental Systems Research Institute, Inc.
|
|
1098
|
-
* Apache-2.0 */
|
|
1099
|
-
// outer rings are clockwise, holes are counterclockwise
|
|
1100
|
-
// used for converting GeoJSON Polygons to ArcGIS Polygons
|
|
1101
|
-
|
|
1102
|
-
var orientRings = function orientRings(poly) {
|
|
1103
|
-
var output = [];
|
|
1104
|
-
var polygon = poly.slice(0);
|
|
1105
|
-
var outerRing = closeRing(polygon.shift().slice(0));
|
|
1106
|
-
|
|
1107
|
-
if (outerRing.length >= 4) {
|
|
1108
|
-
if (!ringIsClockwise(outerRing)) {
|
|
1109
|
-
outerRing.reverse();
|
|
1110
|
-
}
|
|
1111
|
-
|
|
1112
|
-
output.push(outerRing);
|
|
1113
|
-
|
|
1114
|
-
for (var i = 0; i < polygon.length; i++) {
|
|
1115
|
-
var hole = closeRing(polygon[i].slice(0));
|
|
1116
|
-
|
|
1117
|
-
if (hole.length >= 4) {
|
|
1118
|
-
if (ringIsClockwise(hole)) {
|
|
1119
|
-
hole.reverse();
|
|
1120
|
-
}
|
|
1121
|
-
|
|
1122
|
-
output.push(hole);
|
|
1123
|
-
}
|
|
1124
|
-
}
|
|
1125
|
-
}
|
|
1126
|
-
|
|
1127
|
-
return output;
|
|
1128
|
-
}; // This function flattens holes in multipolygons to one array of polygons
|
|
1129
|
-
// used for converting GeoJSON Polygons to ArcGIS Polygons
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
var flattenMultiPolygonRings = function flattenMultiPolygonRings(rings) {
|
|
1133
|
-
var output = [];
|
|
1134
|
-
|
|
1135
|
-
for (var i = 0; i < rings.length; i++) {
|
|
1136
|
-
var polygon = orientRings(rings[i]);
|
|
1137
|
-
|
|
1138
|
-
for (var x = polygon.length - 1; x >= 0; x--) {
|
|
1139
|
-
var ring = polygon[x].slice(0);
|
|
1140
|
-
output.push(ring);
|
|
1141
|
-
}
|
|
1142
|
-
}
|
|
1143
|
-
|
|
1144
|
-
return output;
|
|
1145
|
-
};
|
|
1146
|
-
|
|
1147
|
-
var geojsonToArcGIS = function geojsonToArcGIS(geojson, idAttribute) {
|
|
1148
|
-
idAttribute = idAttribute || 'OBJECTID';
|
|
1149
|
-
var spatialReference = {
|
|
1150
|
-
wkid: 4326
|
|
646
|
+
m || o.push([l.reverse()]);
|
|
647
|
+
}
|
|
648
|
+
return o.length === 1 ? {
|
|
649
|
+
type: "Polygon",
|
|
650
|
+
coordinates: o[0]
|
|
651
|
+
} : {
|
|
652
|
+
type: "MultiPolygon",
|
|
653
|
+
coordinates: o
|
|
1151
654
|
};
|
|
1152
|
-
|
|
1153
|
-
var
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
655
|
+
}, jt = function(t, o) {
|
|
656
|
+
for (var n = ["OBJECTID", "FID"], r = 0; r < n.length; r++) {
|
|
657
|
+
var a = n[r];
|
|
658
|
+
if (a in t && (typeof t[a] == "string" || typeof t[a] == "number"))
|
|
659
|
+
return t[a];
|
|
660
|
+
}
|
|
661
|
+
throw Error("No valid id attribute found");
|
|
662
|
+
}, en = function e(t, o) {
|
|
663
|
+
var n = {};
|
|
664
|
+
if (t.features) {
|
|
665
|
+
n.type = "FeatureCollection", n.features = [];
|
|
666
|
+
for (var r = 0; r < t.features.length; r++)
|
|
667
|
+
n.features.push(e(t.features[r], o));
|
|
668
|
+
}
|
|
669
|
+
if (typeof t.x == "number" && typeof t.y == "number" && (n.type = "Point", n.coordinates = [t.x, t.y], typeof t.z == "number" && n.coordinates.push(t.z)), t.points && (n.type = "MultiPoint", n.coordinates = t.points.slice(0)), t.paths && (t.paths.length === 1 ? (n.type = "LineString", n.coordinates = t.paths[0].slice(0)) : (n.type = "MultiLineString", n.coordinates = t.paths.slice(0))), t.rings && (n = Wt(t.rings.slice(0))), typeof t.xmin == "number" && typeof t.ymin == "number" && typeof t.xmax == "number" && typeof t.ymax == "number" && (n.type = "Polygon", n.coordinates = [[[t.xmax, t.ymax], [t.xmin, t.ymax], [t.xmin, t.ymin], [t.xmax, t.ymin], [t.xmax, t.ymax]]]), (t.geometry || t.attributes) && (n.type = "Feature", n.geometry = t.geometry ? e(t.geometry) : null, n.properties = t.attributes ? be(t.attributes) : null, t.attributes))
|
|
670
|
+
try {
|
|
671
|
+
n.id = jt(t.attributes, o);
|
|
672
|
+
} catch {
|
|
673
|
+
}
|
|
674
|
+
return JSON.stringify(n.geometry) === JSON.stringify({}) && (n.geometry = null), t.spatialReference && t.spatialReference.wkid && t.spatialReference.wkid !== 4326 && console.warn("Object converted in non-standard crs - " + JSON.stringify(t.spatialReference)), n;
|
|
675
|
+
}, ke = function(t) {
|
|
676
|
+
var o = [], n = t.slice(0), r = H(n.shift().slice(0));
|
|
677
|
+
if (r.length >= 4) {
|
|
678
|
+
x(r) || r.reverse(), o.push(r);
|
|
679
|
+
for (var a = 0; a < n.length; a++) {
|
|
680
|
+
var l = H(n[a].slice(0));
|
|
681
|
+
l.length >= 4 && (x(l) && l.reverse(), o.push(l));
|
|
682
|
+
}
|
|
683
|
+
}
|
|
684
|
+
return o;
|
|
685
|
+
}, tn = function(t) {
|
|
686
|
+
for (var o = [], n = 0; n < t.length; n++)
|
|
687
|
+
for (var r = ke(t[n]), a = r.length - 1; a >= 0; a--) {
|
|
688
|
+
var l = r[a].slice(0);
|
|
689
|
+
o.push(l);
|
|
690
|
+
}
|
|
691
|
+
return o;
|
|
692
|
+
}, nn = function e(t, o) {
|
|
693
|
+
o = o || "OBJECTID";
|
|
694
|
+
var n = {
|
|
695
|
+
wkid: 4326
|
|
696
|
+
}, r = {}, a;
|
|
697
|
+
switch (t.type) {
|
|
698
|
+
case "Point":
|
|
699
|
+
r.x = t.coordinates[0], r.y = t.coordinates[1], t.coordinates[2] != null && (r.z = t.coordinates[2]), r.spatialReference = n;
|
|
1165
700
|
break;
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
result.points = geojson.coordinates.slice(0);
|
|
1169
|
-
|
|
1170
|
-
if (geojson.coordinates[0][2] != null) {
|
|
1171
|
-
result.hasZ = true;
|
|
1172
|
-
}
|
|
1173
|
-
|
|
1174
|
-
result.spatialReference = spatialReference;
|
|
701
|
+
case "MultiPoint":
|
|
702
|
+
r.points = t.coordinates.slice(0), t.coordinates[0][2] != null && (r.hasZ = !0), r.spatialReference = n;
|
|
1175
703
|
break;
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
result.paths = [geojson.coordinates.slice(0)];
|
|
1179
|
-
|
|
1180
|
-
if (geojson.coordinates[0][2] != null) {
|
|
1181
|
-
result.hasZ = true;
|
|
1182
|
-
}
|
|
1183
|
-
|
|
1184
|
-
result.spatialReference = spatialReference;
|
|
704
|
+
case "LineString":
|
|
705
|
+
r.paths = [t.coordinates.slice(0)], t.coordinates[0][2] != null && (r.hasZ = !0), r.spatialReference = n;
|
|
1185
706
|
break;
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
result.paths = geojson.coordinates.slice(0);
|
|
1189
|
-
|
|
1190
|
-
if (geojson.coordinates[0][0][2] != null) {
|
|
1191
|
-
result.hasZ = true;
|
|
1192
|
-
}
|
|
1193
|
-
|
|
1194
|
-
result.spatialReference = spatialReference;
|
|
707
|
+
case "MultiLineString":
|
|
708
|
+
r.paths = t.coordinates.slice(0), t.coordinates[0][0][2] != null && (r.hasZ = !0), r.spatialReference = n;
|
|
1195
709
|
break;
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
result.rings = orientRings(geojson.coordinates.slice(0));
|
|
1199
|
-
|
|
1200
|
-
if (geojson.coordinates[0][0][2] != null) {
|
|
1201
|
-
result.hasZ = true;
|
|
1202
|
-
}
|
|
1203
|
-
|
|
1204
|
-
result.spatialReference = spatialReference;
|
|
710
|
+
case "Polygon":
|
|
711
|
+
r.rings = ke(t.coordinates.slice(0)), t.coordinates[0][0][2] != null && (r.hasZ = !0), r.spatialReference = n;
|
|
1205
712
|
break;
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
result.rings = flattenMultiPolygonRings(geojson.coordinates.slice(0));
|
|
1209
|
-
|
|
1210
|
-
if (geojson.coordinates[0][0][0][2] != null) {
|
|
1211
|
-
result.hasZ = true;
|
|
1212
|
-
}
|
|
1213
|
-
|
|
1214
|
-
result.spatialReference = spatialReference;
|
|
713
|
+
case "MultiPolygon":
|
|
714
|
+
r.rings = tn(t.coordinates.slice(0)), t.coordinates[0][0][0][2] != null && (r.hasZ = !0), r.spatialReference = n;
|
|
1215
715
|
break;
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
if (geojson.geometry) {
|
|
1219
|
-
result.geometry = geojsonToArcGIS(geojson.geometry, idAttribute);
|
|
1220
|
-
}
|
|
1221
|
-
|
|
1222
|
-
result.attributes = geojson.properties ? shallowClone(geojson.properties) : {};
|
|
1223
|
-
|
|
1224
|
-
if (geojson.id) {
|
|
1225
|
-
result.attributes[idAttribute] = geojson.id;
|
|
1226
|
-
}
|
|
1227
|
-
|
|
716
|
+
case "Feature":
|
|
717
|
+
t.geometry && (r.geometry = e(t.geometry, o)), r.attributes = t.properties ? be(t.properties) : {}, t.id && (r.attributes[o] = t.id);
|
|
1228
718
|
break;
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
for (i = 0; i < geojson.features.length; i++) {
|
|
1234
|
-
result.push(geojsonToArcGIS(geojson.features[i], idAttribute));
|
|
1235
|
-
}
|
|
1236
|
-
|
|
719
|
+
case "FeatureCollection":
|
|
720
|
+
for (r = [], a = 0; a < t.features.length; a++)
|
|
721
|
+
r.push(e(t.features[a], o));
|
|
1237
722
|
break;
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
for (i = 0; i < geojson.geometries.length; i++) {
|
|
1243
|
-
result.push(geojsonToArcGIS(geojson.geometries[i], idAttribute));
|
|
1244
|
-
}
|
|
1245
|
-
|
|
723
|
+
case "GeometryCollection":
|
|
724
|
+
for (r = [], a = 0; a < t.geometries.length; a++)
|
|
725
|
+
r.push(e(t.geometries[a], o));
|
|
1246
726
|
break;
|
|
1247
727
|
}
|
|
1248
|
-
|
|
1249
|
-
return result;
|
|
728
|
+
return r;
|
|
1250
729
|
};
|
|
1251
|
-
|
|
1252
|
-
var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
730
|
+
const on = /* @__PURE__ */ F({
|
|
1253
731
|
name: "VkfEsriInputGeojson",
|
|
1254
732
|
components: {
|
|
1255
|
-
VkfInput,
|
|
1256
|
-
VaSketch,
|
|
1257
|
-
ViewerVue,
|
|
1258
|
-
VkAsyncTeleport,
|
|
1259
|
-
DocumentChecked:
|
|
1260
|
-
VaGraphicsLayer
|
|
733
|
+
VkfInput: Ne,
|
|
734
|
+
VaSketch: We,
|
|
735
|
+
ViewerVue: mt,
|
|
736
|
+
VkAsyncTeleport: tt,
|
|
737
|
+
DocumentChecked: Ke,
|
|
738
|
+
VaGraphicsLayer: Qe
|
|
1261
739
|
},
|
|
1262
|
-
props,
|
|
1263
|
-
emits,
|
|
1264
|
-
setup(
|
|
1265
|
-
emit
|
|
740
|
+
props: X,
|
|
741
|
+
emits: K,
|
|
742
|
+
setup(e, {
|
|
743
|
+
emit: t
|
|
1266
744
|
}) {
|
|
1267
|
-
const
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
const shetchPanel = computed(() => {
|
|
1282
|
-
const container = sketchRef.value?.container;
|
|
1283
|
-
return container?.querySelector(".esri-sketch__panel");
|
|
1284
|
-
});
|
|
1285
|
-
const viewDef = new Deferred();
|
|
1286
|
-
const layerRef = shallowRef();
|
|
1287
|
-
const sketchLoad = async e => {
|
|
1288
|
-
await e.sketch.when();
|
|
1289
|
-
sketchRef.value = e.sketch;
|
|
1290
|
-
viewDef.resolve(sketchRef.value.view);
|
|
1291
|
-
};
|
|
1292
|
-
const layerLoad = async ({
|
|
1293
|
-
view,
|
|
1294
|
-
layer
|
|
745
|
+
const o = T.createBindProps(e, ["inputSlots", "readonly", "modelValue"]), n = T.createOnEmits(t, ["update:modelValue"]), {
|
|
746
|
+
tr: r
|
|
747
|
+
} = rt(), a = (u) => {
|
|
748
|
+
const d = r("el.table.emptyText", "暂无数据");
|
|
749
|
+
return !u || !u.features.length ? d : JSON.stringify(u);
|
|
750
|
+
}, l = ot(e), i = N(!e.view), s = k(), c = ne(() => {
|
|
751
|
+
var d;
|
|
752
|
+
const u = (d = s.value) == null ? void 0 : d.container;
|
|
753
|
+
return u == null ? void 0 : u.querySelector(".esri-sketch__panel");
|
|
754
|
+
}), f = new at(), p = k(), m = async (u) => {
|
|
755
|
+
await u.sketch.when(), s.value = u.sketch, f.resolve(s.value.view);
|
|
756
|
+
}, g = async ({
|
|
757
|
+
view: u,
|
|
758
|
+
layer: d
|
|
1295
759
|
}) => {
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
if (Array.isArray(props2.editTypes)) {
|
|
1301
|
-
return props2.editTypes.reduce((pre, cur) => {
|
|
1302
|
-
return pre.concat(EDIT_TYPE_REFLECT[cur].availableCreatureTools);
|
|
1303
|
-
}, []);
|
|
1304
|
-
} else {
|
|
1305
|
-
return EDIT_TYPE_REFLECT[props2.editTypes].availableCreatureTools;
|
|
1306
|
-
}
|
|
1307
|
-
});
|
|
1308
|
-
const sketchValueUpdating = ref(false);
|
|
1309
|
-
const sketchValue = shallowRef([]);
|
|
1310
|
-
watch(() => props2.modelValue, (v, ov) => {
|
|
1311
|
-
if (sketchValueUpdating.value) return;
|
|
1312
|
-
uSketchValue();
|
|
1313
|
-
if (!ov?.features.length) {
|
|
1314
|
-
fly();
|
|
1315
|
-
}
|
|
760
|
+
f.resolve(u), p.value = d;
|
|
761
|
+
}, $ = ne(() => Array.isArray(e.editTypes) ? e.editTypes.reduce((u, d) => u.concat(le[d].availableCreatureTools), []) : le[e.editTypes].availableCreatureTools), B = N(!1), S = k([]);
|
|
762
|
+
oe(() => e.modelValue, (u, d) => {
|
|
763
|
+
B.value || (Ae(), d != null && d.features.length || V());
|
|
1316
764
|
}, {
|
|
1317
|
-
immediate:
|
|
765
|
+
immediate: !0
|
|
1318
766
|
});
|
|
1319
|
-
const
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
};
|
|
1325
|
-
const normalMapRef = shallowRef();
|
|
1326
|
-
const dialogMapRef = shallowRef();
|
|
1327
|
-
const mapTo = shallowRef();
|
|
1328
|
-
onMounted(() => {
|
|
1329
|
-
mapTo.value = normalMapRef.value;
|
|
767
|
+
const Ce = (u) => {
|
|
768
|
+
S.value = Array.isArray(u) ? u : u.toArray(), e.skipSave && ee();
|
|
769
|
+
}, U = k(), j = k(), I = k();
|
|
770
|
+
Fe(() => {
|
|
771
|
+
I.value = U.value;
|
|
1330
772
|
});
|
|
1331
|
-
const
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
}
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
};
|
|
1341
|
-
const doSave = () => {
|
|
1342
|
-
u();
|
|
1343
|
-
ElMessage({
|
|
1344
|
-
message: tr("vkf.esriInputGeojson.saveSuccess", "\u4FDD\u5B58\u6210\u529F"),
|
|
773
|
+
const E = N(!1), Se = (u) => {
|
|
774
|
+
E.value = u;
|
|
775
|
+
}, Ee = async () => {
|
|
776
|
+
I.value = j.value;
|
|
777
|
+
}, Ve = async () => {
|
|
778
|
+
I.value = U.value;
|
|
779
|
+
}, Pe = () => {
|
|
780
|
+
ee(), ae({
|
|
781
|
+
message: r("vkf.esriInputGeojson.saveSuccess", "保存成功"),
|
|
1345
782
|
type: "success"
|
|
1346
|
-
});
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
"disabled": props2.disabled,
|
|
1356
|
-
"onUpload": onUpload,
|
|
1357
|
-
"onEdit": onEdit,
|
|
1358
|
-
"onFly": () => {
|
|
1359
|
-
if (!props2.showMap && !props2.view) {
|
|
1360
|
-
dialogShow.value = true;
|
|
1361
|
-
}
|
|
1362
|
-
emit("appendFly");
|
|
1363
|
-
fly();
|
|
783
|
+
}), E.value = !1, e.view && (i.value = !1);
|
|
784
|
+
}, Ie = () => y(pt, {
|
|
785
|
+
dialog: !l.value && e.dialogEdit,
|
|
786
|
+
upload: !l.value,
|
|
787
|
+
disabled: e.disabled,
|
|
788
|
+
onUpload: Me,
|
|
789
|
+
onEdit: Oe,
|
|
790
|
+
onFly: () => {
|
|
791
|
+
!e.showMap && !e.view && (E.value = !0), t("appendFly"), V();
|
|
1364
792
|
}
|
|
1365
793
|
}, null);
|
|
1366
|
-
async function
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
emit("update:modelValue", res);
|
|
794
|
+
async function Me(u) {
|
|
795
|
+
u.raw && xt(u.raw).then((d) => {
|
|
796
|
+
t("update:modelValue", d);
|
|
1370
797
|
}).then(() => {
|
|
1371
|
-
|
|
1372
|
-
}).then(
|
|
798
|
+
ae.success(r("vkf.esriInputGeojson.uploadSuccess", "上传成功"));
|
|
799
|
+
}).then(V);
|
|
1373
800
|
}
|
|
1374
|
-
function
|
|
1375
|
-
|
|
1376
|
-
dialogShow.value = true;
|
|
1377
|
-
} else {
|
|
1378
|
-
sketchIf.value = true;
|
|
1379
|
-
}
|
|
1380
|
-
emit("appendEdit");
|
|
801
|
+
function Oe() {
|
|
802
|
+
e.view ? i.value = !0 : E.value = !0, t("appendEdit");
|
|
1381
803
|
}
|
|
1382
|
-
function
|
|
1383
|
-
|
|
1384
|
-
const
|
|
1385
|
-
|
|
1386
|
-
});
|
|
1387
|
-
emit("update:modelValue", {
|
|
804
|
+
function ee() {
|
|
805
|
+
B.value = !0;
|
|
806
|
+
const u = S.value.map((d) => en(d));
|
|
807
|
+
t("update:modelValue", {
|
|
1388
808
|
type: "FeatureCollection",
|
|
1389
|
-
features
|
|
1390
|
-
})
|
|
1391
|
-
|
|
1392
|
-
sketchValueUpdating.value = false;
|
|
809
|
+
features: u
|
|
810
|
+
}), Le(() => {
|
|
811
|
+
B.value = !1;
|
|
1393
812
|
});
|
|
1394
813
|
}
|
|
1395
|
-
function
|
|
1396
|
-
const
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
if (g.rings) {
|
|
1400
|
-
g.type = "polygon";
|
|
1401
|
-
item.symbol = props2.viewModelActiveFillSymbol;
|
|
1402
|
-
} else if (g.paths) {
|
|
1403
|
-
g.type = "polyline";
|
|
1404
|
-
item.symbol = props2.viewModelActiveLineSymbol;
|
|
1405
|
-
} else if (g.x) {
|
|
1406
|
-
g.type = "point";
|
|
1407
|
-
item.symbol = props2.viewModelActivePointSymbol;
|
|
1408
|
-
}
|
|
1409
|
-
return new Graphic(item);
|
|
814
|
+
function Ae() {
|
|
815
|
+
const d = nn(e.modelValue).map((P) => {
|
|
816
|
+
const b = P.geometry;
|
|
817
|
+
return b.rings ? (b.type = "polygon", P.symbol = e.viewModelActiveFillSymbol) : b.paths ? (b.type = "polyline", P.symbol = e.viewModelActiveLineSymbol) : b.x && (b.type = "point", P.symbol = e.viewModelActivePointSymbol), new nt(P);
|
|
1410
818
|
});
|
|
1411
|
-
|
|
819
|
+
S.value = d;
|
|
1412
820
|
}
|
|
1413
|
-
|
|
1414
|
-
|
|
821
|
+
oe(() => e.flying, (u) => {
|
|
822
|
+
u && V();
|
|
1415
823
|
});
|
|
1416
|
-
async function
|
|
1417
|
-
const
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
view.goTo(sketchValue.value).finally(() => {
|
|
1422
|
-
emit("update:flying", false);
|
|
1423
|
-
});
|
|
824
|
+
async function V() {
|
|
825
|
+
const u = await f.promise;
|
|
826
|
+
u && (t("update:flying", !0), await u.when(), u.goTo(S.value).finally(() => {
|
|
827
|
+
t("update:flying", !1);
|
|
828
|
+
}));
|
|
1424
829
|
}
|
|
1425
830
|
return {
|
|
1426
|
-
inputBindProps,
|
|
1427
|
-
inputOnEmits,
|
|
1428
|
-
append,
|
|
1429
|
-
availableCreatureTools
|
|
1430
|
-
sketchValue,
|
|
1431
|
-
handleUpdateSketchValue,
|
|
1432
|
-
sketchRef,
|
|
1433
|
-
sketchLoad,
|
|
1434
|
-
shetchPanel,
|
|
1435
|
-
dialogShow,
|
|
1436
|
-
setDialogShow,
|
|
1437
|
-
normalMapRef,
|
|
1438
|
-
dialogMapRef,
|
|
1439
|
-
dialogOnOpen,
|
|
1440
|
-
dialogOnClose,
|
|
1441
|
-
mapTo,
|
|
1442
|
-
doSave,
|
|
1443
|
-
readonly,
|
|
1444
|
-
layerLoad,
|
|
1445
|
-
sketchIf,
|
|
1446
|
-
fly,
|
|
1447
|
-
layerRef,
|
|
1448
|
-
getInputModelValue,
|
|
1449
|
-
tr
|
|
831
|
+
inputBindProps: o,
|
|
832
|
+
inputOnEmits: n,
|
|
833
|
+
append: Ie,
|
|
834
|
+
availableCreatureTools: $,
|
|
835
|
+
sketchValue: S,
|
|
836
|
+
handleUpdateSketchValue: Ce,
|
|
837
|
+
sketchRef: s,
|
|
838
|
+
sketchLoad: m,
|
|
839
|
+
shetchPanel: c,
|
|
840
|
+
dialogShow: E,
|
|
841
|
+
setDialogShow: Se,
|
|
842
|
+
normalMapRef: U,
|
|
843
|
+
dialogMapRef: j,
|
|
844
|
+
dialogOnOpen: Ee,
|
|
845
|
+
dialogOnClose: Ve,
|
|
846
|
+
mapTo: I,
|
|
847
|
+
doSave: Pe,
|
|
848
|
+
readonly: l,
|
|
849
|
+
layerLoad: g,
|
|
850
|
+
sketchIf: i,
|
|
851
|
+
fly: V,
|
|
852
|
+
layerRef: p,
|
|
853
|
+
getInputModelValue: a,
|
|
854
|
+
tr: r
|
|
1450
855
|
};
|
|
1451
856
|
}
|
|
1452
|
-
})
|
|
1453
|
-
|
|
1454
|
-
const _hoisted_1 = { class: "vkf-form-item" };
|
|
1455
|
-
const _hoisted_2 = {
|
|
857
|
+
}), rn = { class: "vkf-form-item" }, an = {
|
|
1456
858
|
ref: "normalMapRef",
|
|
1457
859
|
class: "vkf-esri-input-geojson__map"
|
|
1458
|
-
}
|
|
1459
|
-
const _hoisted_3 = {
|
|
860
|
+
}, ln = {
|
|
1460
861
|
ref: "dialogMapRef",
|
|
1461
862
|
class: "vkf-esri-input-geojson-dialog__map"
|
|
1462
863
|
};
|
|
1463
|
-
function
|
|
1464
|
-
const
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
1473
|
-
renderSlot(_ctx.$slots, "custom", {
|
|
1474
|
-
modelValue: _ctx.modelValue,
|
|
1475
|
-
fly: _ctx.fly,
|
|
1476
|
-
setDialogShow: _ctx.setDialogShow,
|
|
1477
|
-
layer: _ctx.layerRef,
|
|
1478
|
-
showMap: _ctx.showMap
|
|
864
|
+
function un(e, t, o, n, r, a) {
|
|
865
|
+
const l = h("VkfInput"), i = h("DocumentChecked"), s = h("ElIcon"), c = h("VkAsyncTeleport"), f = h("VaSketch"), p = h("VaGraphicsLayer"), m = h("ViewerVue"), g = h("ElDialog");
|
|
866
|
+
return w(), $e("div", rn, [
|
|
867
|
+
A(e.$slots, "custom", {
|
|
868
|
+
modelValue: e.modelValue,
|
|
869
|
+
fly: e.fly,
|
|
870
|
+
setDialogShow: e.setDialogShow,
|
|
871
|
+
layer: e.layerRef,
|
|
872
|
+
showMap: e.showMap
|
|
1479
873
|
}, () => [
|
|
1480
|
-
|
|
1481
|
-
readonly:
|
|
1482
|
-
"model-value":
|
|
1483
|
-
},
|
|
874
|
+
y(l, fe({
|
|
875
|
+
readonly: !0,
|
|
876
|
+
"model-value": e.getInputModelValue(e.modelValue)
|
|
877
|
+
}, e.inputBindProps, {
|
|
1484
878
|
"input-slots": {
|
|
1485
|
-
append:
|
|
879
|
+
append: e.append
|
|
1486
880
|
}
|
|
1487
|
-
},
|
|
881
|
+
}, Be(e.inputOnEmits)), null, 16, ["model-value", "input-slots"])
|
|
1488
882
|
]),
|
|
1489
|
-
|
|
1490
|
-
default:
|
|
1491
|
-
|
|
1492
|
-
view:
|
|
1493
|
-
"view-component":
|
|
1494
|
-
"view-component-attrs":
|
|
883
|
+
y(c, { to: e.mapTo }, {
|
|
884
|
+
default: v(() => [
|
|
885
|
+
y(m, {
|
|
886
|
+
view: e.view,
|
|
887
|
+
"view-component": e.viewComponent,
|
|
888
|
+
"view-component-attrs": e.viewComponentAttrs
|
|
1495
889
|
}, {
|
|
1496
|
-
default:
|
|
1497
|
-
|
|
1498
|
-
index:
|
|
1499
|
-
graphics:
|
|
1500
|
-
onLoad:
|
|
890
|
+
default: v(() => [
|
|
891
|
+
y(p, {
|
|
892
|
+
index: e.layerIndex,
|
|
893
|
+
graphics: e.sketchValue,
|
|
894
|
+
onLoad: e.layerLoad
|
|
1501
895
|
}, {
|
|
1502
|
-
default:
|
|
1503
|
-
|
|
896
|
+
default: v(() => [
|
|
897
|
+
e.readonly || !e.sketchIf ? O("", !0) : (w(), _(f, {
|
|
1504
898
|
key: 0,
|
|
1505
|
-
"view-model-active-fill-symbol":
|
|
1506
|
-
"view-model-active-line-symbol":
|
|
1507
|
-
"view-model-active-point-symbol":
|
|
1508
|
-
multiple:
|
|
1509
|
-
"available-creature-tools":
|
|
1510
|
-
"model-value":
|
|
1511
|
-
"visible-elements":
|
|
1512
|
-
"onUpdate:modelValue":
|
|
1513
|
-
onLoad:
|
|
899
|
+
"view-model-active-fill-symbol": e.viewModelActiveFillSymbol,
|
|
900
|
+
"view-model-active-line-symbol": e.viewModelActiveLineSymbol,
|
|
901
|
+
"view-model-active-point-symbol": e.viewModelActivePointSymbol,
|
|
902
|
+
multiple: e.multiple,
|
|
903
|
+
"available-creature-tools": e.availableCreatureTools,
|
|
904
|
+
"model-value": e.sketchValue,
|
|
905
|
+
"visible-elements": e.visibleElements,
|
|
906
|
+
"onUpdate:modelValue": e.handleUpdateSketchValue,
|
|
907
|
+
onLoad: e.sketchLoad
|
|
1514
908
|
}, {
|
|
1515
|
-
default:
|
|
1516
|
-
!
|
|
909
|
+
default: v(() => [
|
|
910
|
+
!e.skipSave && e.shetchPanel ? (w(), _(c, {
|
|
1517
911
|
key: 0,
|
|
1518
|
-
to:
|
|
912
|
+
to: e.shetchPanel
|
|
1519
913
|
}, {
|
|
1520
|
-
default:
|
|
1521
|
-
|
|
914
|
+
default: v(() => [
|
|
915
|
+
y(s, {
|
|
1522
916
|
class: "esri-sketch-ui-save esri-widget--button",
|
|
1523
|
-
onClick:
|
|
917
|
+
onClick: e.doSave
|
|
1524
918
|
}, {
|
|
1525
|
-
default:
|
|
1526
|
-
|
|
919
|
+
default: v(() => [
|
|
920
|
+
y(i)
|
|
1527
921
|
]),
|
|
1528
922
|
_: 1
|
|
1529
|
-
/* STABLE */
|
|
1530
923
|
}, 8, ["onClick"])
|
|
1531
924
|
]),
|
|
1532
925
|
_: 1
|
|
1533
|
-
|
|
1534
|
-
}, 8, ["to"])) : createCommentVNode("v-if", true)
|
|
926
|
+
}, 8, ["to"])) : O("", !0)
|
|
1535
927
|
]),
|
|
1536
928
|
_: 1
|
|
1537
|
-
|
|
1538
|
-
}, 8, ["view-model-active-fill-symbol", "view-model-active-line-symbol", "view-model-active-point-symbol", "multiple", "available-creature-tools", "model-value", "visible-elements", "onUpdate:modelValue", "onLoad"])) : createCommentVNode("v-if", true)
|
|
929
|
+
}, 8, ["view-model-active-fill-symbol", "view-model-active-line-symbol", "view-model-active-point-symbol", "multiple", "available-creature-tools", "model-value", "visible-elements", "onUpdate:modelValue", "onLoad"]))
|
|
1539
930
|
]),
|
|
1540
931
|
_: 1
|
|
1541
|
-
/* STABLE */
|
|
1542
932
|
}, 8, ["index", "graphics", "onLoad"])
|
|
1543
933
|
]),
|
|
1544
934
|
_: 1
|
|
1545
|
-
/* STABLE */
|
|
1546
935
|
}, 8, ["view", "view-component", "view-component-attrs"])
|
|
1547
936
|
]),
|
|
1548
937
|
_: 1
|
|
1549
|
-
/* STABLE */
|
|
1550
938
|
}, 8, ["to"]),
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
_hoisted_2,
|
|
1554
|
-
null,
|
|
1555
|
-
512
|
|
1556
|
-
/* NEED_PATCH */
|
|
1557
|
-
), [
|
|
1558
|
-
[vShow, _ctx.showMap]
|
|
939
|
+
Ue(re("div", an, null, 512), [
|
|
940
|
+
[Ge, e.showMap]
|
|
1559
941
|
]),
|
|
1560
|
-
|
|
1561
|
-
modelValue:
|
|
1562
|
-
"onUpdate:modelValue":
|
|
1563
|
-
title:
|
|
1564
|
-
fullscreen:
|
|
942
|
+
y(g, {
|
|
943
|
+
modelValue: e.dialogShow,
|
|
944
|
+
"onUpdate:modelValue": t[0] || (t[0] = ($) => e.dialogShow = $),
|
|
945
|
+
title: e.dialogEditTitle || e.tr("vkf.esriInputGeojson.dialogEditTitle", "绘制图斑"),
|
|
946
|
+
fullscreen: e.dialogEditFullscreen,
|
|
1565
947
|
"modal-class": "vkf-esri-input-geojson-dialog",
|
|
1566
|
-
"append-to-body":
|
|
1567
|
-
"close-on-click-modal":
|
|
1568
|
-
draggable:
|
|
1569
|
-
onOpen:
|
|
1570
|
-
onClose:
|
|
948
|
+
"append-to-body": !0,
|
|
949
|
+
"close-on-click-modal": !1,
|
|
950
|
+
draggable: !0,
|
|
951
|
+
onOpen: e.dialogOnOpen,
|
|
952
|
+
onClose: e.dialogOnClose
|
|
1571
953
|
}, {
|
|
1572
|
-
default:
|
|
1573
|
-
|
|
1574
|
-
"div",
|
|
1575
|
-
_hoisted_3,
|
|
1576
|
-
null,
|
|
1577
|
-
512
|
|
1578
|
-
/* NEED_PATCH */
|
|
1579
|
-
)
|
|
954
|
+
default: v(() => [
|
|
955
|
+
re("div", ln, null, 512)
|
|
1580
956
|
]),
|
|
1581
957
|
_: 1
|
|
1582
|
-
/* STABLE */
|
|
1583
958
|
}, 8, ["modelValue", "title", "fullscreen", "onOpen", "onClose"])
|
|
1584
959
|
]);
|
|
1585
960
|
}
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
var types = /*#__PURE__*/Object.freeze({
|
|
961
|
+
const Sn = /* @__PURE__ */ Y(on, [["render", un]]), En = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1589
962
|
__proto__: null
|
|
1590
|
-
});
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
963
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
|
964
|
+
export {
|
|
965
|
+
lt as EDIT_TYPE,
|
|
966
|
+
it as EDIT_TYPE_OPTIONS,
|
|
967
|
+
le as EDIT_TYPE_REFLECT,
|
|
968
|
+
ut as EMPTY_FEATURE_COLLECTION,
|
|
969
|
+
Sn as VkfEsriInputGeojson,
|
|
970
|
+
Cn as _VkfEsriInputGeojsonCtx,
|
|
971
|
+
En as __VkfEsriInputGeojson,
|
|
972
|
+
Sn as default
|
|
1594
973
|
};
|
|
1595
|
-
|
|
1596
|
-
export { EDIT_TYPE, EDIT_TYPE_OPTIONS, EDIT_TYPE_REFLECT, EMPTY_FEATURE_COLLECTION, VkfEsriInputGeojson, ctx as _VkfEsriInputGeojsonCtx, types as __VkfEsriInputGeojson, VkfEsriInputGeojson as default };
|